@stacksjs/dns 0.64.0 → 0.64.2

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 vk=Object.create;var{getPrototypeOf:jk,defineProperty:RF,getOwnPropertyNames:dk}=Object;var Ok=Object.prototype.hasOwnProperty;var u=(r,f,s)=>{s=r!=null?vk(jk(r)):{};const w=f||!r||!r.__esModule?RF(s,"default",{value:r,enumerable:!0}):s;for(let h of dk(r))if(!Ok.call(w,h))RF(w,h,{get:()=>r[h],enumerable:!0});return w};var v=(r,f)=>()=>(f||r((f={exports:{}}).exports,f),f.exports);var Sf=(r,f)=>{for(var s in f)RF(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 Pf=(r)=>{let f=r.httpHandler;return{setHttpHandler(s){f=s},httpHandler(){return f},updateHttpClientConfig(s,w){f.updateHttpClientConfig(s,w)},httpHandlerConfigs(){return f.httpHandlerConfigs()}}},Xf=(r)=>{return{httpHandler:r.httpHandler()}};var _C=()=>{};var Is=v((Vu,rL)=>{var{defineProperty:$E,getOwnPropertyDescriptor:ck,getOwnPropertyNames:bk}=Object,gk=Object.prototype.hasOwnProperty,EE=(r,f)=>$E(r,"name",{value:f,configurable:!0}),_k=(r,f)=>{for(var s in f)$E(r,s,{get:f[s],enumerable:!0})},xk=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of bk(f))if(!gk.call(r,h)&&h!==s)$E(r,h,{get:()=>f[h],enumerable:!(w=ck(f,h))||w.enumerable})}return r},ek=(r)=>xk($E({},"__esModule",{value:!0}),r),xC={};_k(xC,{AlgorithmId:()=>aC,EndpointURLScheme:()=>oC,FieldPosition:()=>pC,HttpApiKeyAuthLocation:()=>nC,HttpAuthLocation:()=>eC,IniSectionType:()=>uC,RequestHandlerProtocol:()=>tC,SMITHY_CONTEXT_KEY:()=>uk,getDefaultClientConfiguration:()=>ak,resolveDefaultRuntimeConfig:()=>pk});rL.exports=ek(xC);var eC=((r)=>{return r.HEADER="header",r.QUERY="query",r})(eC||{}),nC=((r)=>{return r.HEADER="header",r.QUERY="query",r})(nC||{}),oC=((r)=>{return r.HTTP="http",r.HTTPS="https",r})(oC||{}),aC=((r)=>{return r.MD5="md5",r.CRC32="crc32",r.CRC32C="crc32c",r.SHA1="sha1",r.SHA256="sha256",r})(aC||{}),nk=EE((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"),ok=EE((r)=>{const f={};return r.checksumAlgorithms().forEach((s)=>{f[s.algorithmId()]=s.checksumConstructor()}),f},"resolveChecksumRuntimeConfig"),ak=EE((r)=>{return{...nk(r)}},"getDefaultClientConfiguration"),pk=EE((r)=>{return{...ok(r)}},"resolveDefaultRuntimeConfig"),pC=((r)=>{return r[r.HEADER=0]="HEADER",r[r.TRAILER=1]="TRAILER",r})(pC||{}),uk="__smithy_context",uC=((r)=>{return r.PROFILE="profile",r.SSO_SESSION="sso-session",r.SERVICES="services",r})(uC||{}),tC=((r)=>{return r.HTTP_0_9="http/0.9",r.HTTP_1_0="http/1.0",r.TDS_8_0="tds/8.0",r})(tC||{})});var tk;var sL=G(()=>{tk=u(Is(),1)});var fL=()=>{};function rD(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=rD(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 y0{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 wL=()=>{};var ir=G(()=>{_C();sL();fL();wL()});function Yf(r){return r}var sD=(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)},fD,Kf=(r)=>({applyToStack:(f)=>{f.add(sD(r),fD)}});var aw=G(()=>{ir();fD={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var wD=()=>(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}},hD,Zf=(r)=>({applyToStack:(f)=>{f.add(wD(),hD)}});var hL=G(()=>{hD={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var pw=G(()=>{hL()});var $L="X-Amzn-Trace-Id",$D="AWS_LAMBDA_FUNCTION_NAME",ED="_X_AMZN_TRACE_ID",ID=(r)=>(f)=>async(s)=>{const{request:w}=s;if(!Qr.isInstance(w)||r.runtime!=="node"||w.headers.hasOwnProperty($L))return f(s);const h=process.env[$D],$=process.env[ED],E=(I)=>typeof I==="string"&&I.length>0;if(E(h)&&E($))w.headers[$L]=$;return f({...s,request:w})},FD,lf=(r)=>({applyToStack:(f)=>{f.add(ID(r),FD)}});var uw=G(()=>{ir();FD={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});function Jf(r){return{...r,customUserAgent:typeof r.customUserAgent==="string"?[[r.customUserAgent]]:r.customUserAgent}}var UD,I1=(r)=>UD.test(r)||r.startsWith("[")&&r.endsWith("]");var WF=G(()=>{UD=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 TD,F1=(r,f=!1)=>{if(!f)return TD.test(r);const s=r.split(".");for(let w of s)if(!F1(w))return!1;return!0};var zF=G(()=>{TD=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var ur;var IE=G(()=>{ur={}});var T0="endpoints";function Zs(r){if(typeof r!=="object"||r==null)return r;if("ref"in r)return`\$${Zs(r.ref)}`;if("fn"in r)return`${r.fn}(${(r.argv||[]).map(Zs).join(", ")})`;return JSON.stringify(r,null,2)}var U1=()=>{};var Wr;var EL=G(()=>{Wr=class Wr extends Error{constructor(r){super(r);this.name="EndpointError"}}});var IL=()=>{};var FL=()=>{};var UL=()=>{};var TL=()=>{};var GL=()=>{};var CL=()=>{};var ls=G(()=>{EL();IL();FL();UL();TL();GL();CL()});var LL=(r,f)=>r===f;var AL=(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 RL=G(()=>{ls()});var FE=(r,f)=>AL(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 WL=G(()=>{ls();RL()});var zL=(r)=>r!=null;var SL=(r)=>!r;var UE,SF,PL=(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:D="",query:B={}}=r,Q=new URL(`${Z}//${z}${S?`:${S}`:""}${D}`);return Q.search=Object.entries(B).map(([i,x])=>`${i}=${x}`).join("&"),Q}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(UE.EndpointURLScheme).includes(F))return null;const U=I1(h),C=s.includes(`${w}:${SF[F]}`)||typeof r==="string"&&r.includes(`${w}:${SF[F]}`),L=`${w}${C?`:${SF[F]}`:""}`;return{scheme:F,authority:L,path:$,normalizedPath:$.endsWith("/")?$:`${$}/`,isIp:U}};var XL=G(()=>{UE=u(Is(),1);WF();SF={[UE.EndpointURLScheme.HTTP]:80,[UE.EndpointURLScheme.HTTPS]:443}});var YL=(r,f)=>r===f;var KL=(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 ZL=(r)=>encodeURIComponent(r).replace(/[!*'()]/g,(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`);var PF=G(()=>{WL();zF();XL()});var lL;var JL=G(()=>{PF();lL={booleanEquals:LL,getAttr:FE,isSet:zL,isValidHostLabel:F1,not:SL,parseURL:PL,stringEquals:YL,substring:KL,uriEncode:ZL}});var TE=(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(FE(w[F],U))}else s.push(w[I]);h=E+1}return s.join("")};var XF=G(()=>{PF()});var QL=({ref:r},f)=>{return{...f.endpointParams,...f.referenceRecord}[r]};var m0=(r,f,s)=>{if(typeof r==="string")return TE(r,s);else if(r.fn)return GE(r,s);else if(r.ref)return QL(r,s);throw new Wr(`'${f}': ${String(r)} is not a string, function or reference.`)};var T1=G(()=>{ls();YF();XF()});var GE=({fn:r,argv:f},s)=>{const w=f.map(($)=>["boolean","number"].includes(typeof $)?$:m0($,"arg",s)),h=r.split(".");if(h[0]in ur&&h[1]!=null)return ur[h[0]][h[1]](...w);return lL[r](...w)};var YF=G(()=>{IE();JL();T1()});var ML=({assign:r,...f},s)=>{if(r&&r in s.referenceRecord)throw new Wr(`'${r}' is already defined in Reference Record.`);const w=GE(f,s);return s.logger?.debug?.(`${T0} evaluateCondition: ${Zs(f)} = ${Zs(w)}`),{result:w===""?!0:!!w,...r!=null&&{toAssign:{name:r,value:w}}}};var BL=G(()=>{U1();ls();YF()});var tw=(r=[],f)=>{const s={};for(let w of r){const{result:h,toAssign:$}=ML(w,{...f,referenceRecord:{...f.referenceRecord,...s}});if(!h)return{result:h};if($)s[$.name]=$.value,f.logger?.debug?.(`${T0} assign: ${$.name} := ${Zs($.value)}`)}return{result:!0,referenceRecord:s}};var CE=G(()=>{U1();BL()});var HL=(r,f)=>Object.entries(r).reduce((s,[w,h])=>({...s,[w]:h.map(($)=>{const E=m0($,"Header value entry",f);if(typeof E!=="string")throw new Wr(`Header '${w}' value '${E}' is not a string`);return E})}),{});var VL=G(()=>{ls();T1()});var KF=(r,f)=>{if(Array.isArray(r))return r.map((s)=>KF(s,f));switch(typeof r){case"string":return TE(r,f);case"object":if(r===null)throw new Wr(`Unexpected endpoint property: ${r}`);return LE(r,f);case"boolean":return r;default:throw new Wr(`Unexpected endpoint property type: ${typeof r}`)}};var kL=G(()=>{ls();XF();ZF()});var LE=(r,f)=>Object.entries(r).reduce((s,[w,h])=>({...s,[w]:KF(h,f)}),{});var ZF=G(()=>{kL()});var DL=(r,f)=>{const s=m0(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 iL=G(()=>{ls();T1()});var yL=(r,f)=>{const{conditions:s,endpoint:w}=r,{result:h,referenceRecord:$}=tw(s,f);if(!h)return;const E={...f,referenceRecord:{...f.referenceRecord,...$}},{url:I,properties:F,headers:U}=w;return f.logger?.debug?.(`${T0} Resolving endpoint from template: ${Zs(w)}`),{...U!=null&&{headers:HL(U,E)},...F!=null&&{properties:LE(F,E)},url:DL(I,E)}};var mL=G(()=>{U1();CE();VL();ZF();iL()});var NL=(r,f)=>{const{conditions:s,error:w}=r,{result:h,referenceRecord:$}=tw(s,f);if(!h)return;throw new Wr(m0(w,"Error",{...f,referenceRecord:{...f.referenceRecord,...$}}))};var qL=G(()=>{ls();CE();T1()});var vL=(r,f)=>{const{conditions:s,rules:w}=r,{result:h,referenceRecord:$}=tw(s,f);if(!h)return;return AE(w,{...f,referenceRecord:{...f.referenceRecord,...$}})};var jL=G(()=>{CE();lF()});var AE=(r,f)=>{for(let s of r)if(s.type==="endpoint"){const w=yL(s,f);if(w)return w}else if(s.type==="error")NL(s,f);else if(s.type==="tree"){const w=vL(s,f);if(w)return w}else throw new Wr(`Unknown endpoint rule: ${s}`);throw new Wr("Rules evaluation failed")};var lF=G(()=>{ls();mL();qL();jL()});var dL=G(()=>{IE();lF()});var ps=(r,f)=>{const{endpointParams:s,logger:w}=f,{parameters:h,rules:$}=r;f.logger?.debug?.(`${T0} Initial EndpointParams: ${Zs(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=AE($,{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?.(`${T0} Resolved endpoint: ${Zs(F)}`),F};var OL=G(()=>{U1();ls();dL()});var us=G(()=>{WF();zF();IE();OL();ls()});var JF=G(()=>{us()});var QF=(r,f=!1)=>{if(f){for(let s of r.split("."))if(!QF(s))return!1;return!0}if(!F1(r))return!1;if(r.length<3||r.length>63)return!1;if(r!==r.toLowerCase())return!1;if(I1(r))return!1;return!0};var cL=G(()=>{us();JF()});var bL=(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 _L;var gL=G(()=>{_L={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 CD,LD="",xL=(r)=>{const{partitions:f}=CD;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}},eL=()=>LD;var MF=G(()=>{gL();CD=_L});var ts;var nL=G(()=>{us();cL();MF();ts={isVirtualHostableS3Bucket:QF,parseArn:bL,partition:xL};ur.aws=ts});var oL=G(()=>{us()});var aL=G(()=>{us()});var pL=()=>{};var uL=()=>{};var tL=()=>{};var r8=()=>{};var s8=()=>{};var f8=G(()=>{aL();pL();uL();tL();r8();s8()});var Ww=G(()=>{nL();MF();JF();oL();f8()});var BF="user-agent",RE="x-amz-user-agent",HF=" ",WE="/",w8,h8,VF="-";var $8=G(()=>{w8=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,h8=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});var AD=(r)=>(f,s)=>async(w)=>{const{request:h}=w;if(!Qr.isInstance(h))return f(w);const{headers:$}=h,E=s?.userAgent?.map(kF)||[],I=(await r.defaultUserAgentProvider()).map(kF),F=r?.customUserAgent?.map(kF)||[],U=eL(),C=(U?[U]:[]).concat([...I,...E,...F]).join(HF),L=[...I.filter((z)=>z.startsWith("aws-sdk-")),...F].join(HF);if(r.runtime!=="browser"){if(L)$[RE]=$[RE]?`${$[BF]} ${L}`:L;$[BF]=C}else $[RE]=C;return f({...w,request:h})},kF=(r)=>{const f=r[0].split(WE).map((E)=>E.replace(w8,VF)).join(WE),s=r[1]?.replace(h8,VF),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}`}},"")},RD,Qf=(r)=>({applyToStack:(f)=>{f.add(AD(r),RD)}});var E8=G(()=>{Ww();ir();$8();RD={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var rh=G(()=>{E8()});var sh=(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 N0;var I8=G(()=>{(function(r){r.ENV="env",r.CONFIG="shared config entry"})(N0||(N0={}))});var DF=G(()=>{I8()});var WD="AWS_USE_DUALSTACK_ENDPOINT",zD="use_dualstack_endpoint",Mf;var F8=G(()=>{DF();Mf={environmentVariableSelector:(r)=>sh(r,WD,N0.ENV),configFileSelector:(r)=>sh(r,zD,N0.CONFIG),default:!1}});var SD="AWS_USE_FIPS_ENDPOINT",PD="use_fips_endpoint",Bf;var U8=G(()=>{DF();Bf={environmentVariableSelector:(r)=>sh(r,SD,N0.ENV),configFileSelector:(r)=>sh(r,PD,N0.CONFIG),default:!1}});var iF,Js=(r)=>r[iF.SMITHY_CONTEXT_KEY]||(r[iF.SMITHY_CONTEXT_KEY]={});var T8=G(()=>{iF=u(Is(),1)});var yr=(r)=>{if(typeof r==="function")return r;const f=Promise.resolve(r);return()=>f};var rf=G(()=>{T8()});var G8=G(()=>{rf()});var C8=G(()=>{rf()});var L8=G(()=>{F8();U8();G8();C8()});var Qs,Hf;var A8=G(()=>{Qs={environmentVariableSelector:(r)=>r.AWS_REGION,configFileSelector:(r)=>r.region,default:()=>{throw new Error("Region is missing")}},Hf={preferredFile:"credentials"}});var zE=(r)=>typeof r==="string"&&(r.startsWith("fips-")||r.endsWith("-fips"));var yF=(r)=>zE(r)?["fips-aws-global","aws-fips"].includes(r)?"us-east-1":r.replace(/fips-(dkr-|prod-)?|-fips/,""):r;var R8=()=>{};var Vf=(r)=>{const{region:f,useFipsEndpoint:s}=r;if(!f)throw new Error("Region is missing");return{...r,region:async()=>{if(typeof f==="string")return yF(f);const w=await f();return yF(w)},useFipsEndpoint:async()=>{const w=typeof f==="string"?f:await f();if(zE(w))return!0;return typeof s!=="function"?Promise.resolve(!!s):s()}}};var W8=G(()=>{R8()});var z8=G(()=>{A8();W8()});var S8=()=>{};var P8=()=>{};var X8=()=>{};var Y8=G(()=>{S8();P8();X8()});var Ms=G(()=>{L8();z8();Y8()});var G1=v((jfr,J8)=>{var{defineProperty:SE,getOwnPropertyDescriptor:XD,getOwnPropertyNames:YD}=Object,KD=Object.prototype.hasOwnProperty,Z8=(r,f)=>SE(r,"name",{value:f,configurable:!0}),ZD=(r,f)=>{for(var s in f)SE(r,s,{get:f[s],enumerable:!0})},lD=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of YD(f))if(!KD.call(r,h)&&h!==s)SE(r,h,{get:()=>f[h],enumerable:!(w=XD(f,h))||w.enumerable})}return r},JD=(r)=>lD(SE({},"__esModule",{value:!0}),r),l8={};ZD(l8,{getSmithyContext:()=>QD,normalizeProvider:()=>MD});J8.exports=JD(l8);var K8=Is(),QD=Z8((r)=>r[K8.SMITHY_CONTEXT_KEY]||(r[K8.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),MD=Z8((r)=>{if(typeof r==="function")return r;const f=Promise.resolve(r);return()=>f},"normalizeProvider")});var mF=v((dfr,V8)=>{var{defineProperty:PE,getOwnPropertyDescriptor:BD,getOwnPropertyNames:HD}=Object,VD=Object.prototype.hasOwnProperty,zw=(r,f)=>PE(r,"name",{value:f,configurable:!0}),kD=(r,f)=>{for(var s in f)PE(r,s,{get:f[s],enumerable:!0})},DD=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of HD(f))if(!VD.call(r,h)&&h!==s)PE(r,h,{get:()=>f[h],enumerable:!(w=BD(f,h))||w.enumerable})}return r},iD=(r)=>DD(PE({},"__esModule",{value:!0}),r),Q8={};kD(Q8,{CredentialsProviderError:()=>yD,ProviderError:()=>XE,TokenProviderError:()=>mD,chain:()=>ND,fromStatic:()=>qD,memoize:()=>vD});V8.exports=iD(Q8);var M8=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)}};zw(M8,"ProviderError");var XE=M8,B8=class r extends XE{constructor(f,s=!0){super(f,s);this.name="CredentialsProviderError",Object.setPrototypeOf(this,r.prototype)}};zw(B8,"CredentialsProviderError");var yD=B8,H8=class r extends XE{constructor(f,s=!0){super(f,s);this.name="TokenProviderError",Object.setPrototypeOf(this,r.prototype)}};zw(H8,"TokenProviderError");var mD=H8,ND=zw((...r)=>async()=>{if(r.length===0)throw new XE("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"),qD=zw((r)=>()=>Promise.resolve(r),"fromStatic"),vD=zw((r,f,s)=>{let w,h,$,E=!1;const I=zw(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 fh=v((k8)=>{Object.defineProperty(k8,"__esModule",{value:!0});k8.getHomeDir=void 0;var jD=import.meta.require("os"),dD=import.meta.require("path"),NF={},OD=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},cD=()=>{const{HOME:r,USERPROFILE:f,HOMEPATH:s,HOMEDRIVE:w=`C:${dD.sep}`}=process.env;if(r)return r;if(f)return f;if(s)return`${w}${s}`;const h=OD();if(!NF[h])NF[h]=jD.homedir();return NF[h]};k8.getHomeDir=cD});var qF=v((i8)=>{Object.defineProperty(i8,"__esModule",{value:!0});i8.getSSOTokenFilepath=void 0;var bD=import.meta.require("crypto"),gD=import.meta.require("path"),_D=fh(),xD=(r)=>{const s=bD.createHash("sha1").update(r).digest("hex");return gD.join(_D.getHomeDir(),".aws","sso","cache",`${s}.json`)};i8.getSSOTokenFilepath=xD});var q8=v((m8)=>{Object.defineProperty(m8,"__esModule",{value:!0});m8.getSSOTokenFromFile=void 0;var eD=import.meta.require("fs"),nD=qF(),{readFile:oD}=eD.promises,aD=async(r)=>{const f=nD.getSSOTokenFilepath(r),s=await oD(f,"utf8");return JSON.parse(s)};m8.getSSOTokenFromFile=aD});var jF=v((v8)=>{Object.defineProperty(v8,"__esModule",{value:!0});v8.slurpFile=void 0;var pD=import.meta.require("fs"),{readFile:uD}=pD.promises,vF={},tD=(r,f)=>{if(!vF[r]||(f===null||f===void 0?void 0:f.ignoreCache))vF[r]=uD(r,"utf8");return vF[r]};v8.slurpFile=tD});var bF=v((_fr,L1)=>{var{defineProperty:ZE,getOwnPropertyDescriptor:ri,getOwnPropertyNames:si}=Object,fi=Object.prototype.hasOwnProperty,Bs=(r,f)=>ZE(r,"name",{value:f,configurable:!0}),wi=(r,f)=>{for(var s in f)ZE(r,s,{get:f[s],enumerable:!0})},dF=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of si(f))if(!fi.call(r,h)&&h!==s)ZE(r,h,{get:()=>f[h],enumerable:!(w=ri(f,h))||w.enumerable})}return r},cF=(r,f,s)=>(dF(r,f,"default"),s&&dF(s,f,"default")),hi=(r)=>dF(ZE({},"__esModule",{value:!0}),r),C1={};wi(C1,{CONFIG_PREFIX_SEPARATOR:()=>Sw,DEFAULT_PROFILE:()=>b8,ENV_PROFILE:()=>c8,getProfileName:()=>$i,loadSharedConfigFiles:()=>_8,loadSsoSessionData:()=>Si,parseKnownFiles:()=>Xi});L1.exports=hi(C1);cF(C1,fh(),L1.exports);var c8="AWS_PROFILE",b8="default",$i=Bs((r)=>r.profile||process.env[c8]||b8,"getProfileName");cF(C1,qF(),L1.exports);cF(C1,q8(),L1.exports);var YE=Is(),Ei=Bs((r)=>Object.entries(r).filter(([f])=>{const s=f.indexOf(Sw);if(s===-1)return!1;return Object.values(YE.IniSectionType).includes(f.substring(0,s))}).reduce((f,[s,w])=>{const h=s.indexOf(Sw),$=s.substring(0,h)===YE.IniSectionType.PROFILE?s.substring(h+1):s;return f[$]=w,f},{...r.default&&{default:r.default}}),"getConfigData"),KE=import.meta.require("path"),Ii=fh(),Fi="AWS_CONFIG_FILE",g8=Bs(()=>process.env[Fi]||KE.join(Ii.getHomeDir(),".aws","config"),"getConfigFilepath"),Ui=fh(),Ti="AWS_SHARED_CREDENTIALS_FILE",Gi=Bs(()=>process.env[Ti]||KE.join(Ui.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),Ci=fh(),Li=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Ai=["__proto__","profile __proto__"],OF=Bs((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=Li.exec(I);if(F){const[,U,,C]=F;if(Object.values(YE.IniSectionType).includes(U))s=[U,C].join(Sw)}else s=I;if(Ai.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(Sw):F;f[s][C]=U}}}}return f},"parseIni"),d8=jF(),O8=Bs(()=>({}),"swallowError"),Sw=".",_8=Bs(async(r={})=>{const{filepath:f=Gi(),configFilepath:s=g8()}=r,w=Ci.getHomeDir();let $=f;if(f.startsWith("~/"))$=KE.join(w,f.slice(2));let E=s;if(s.startsWith("~/"))E=KE.join(w,s.slice(2));const I=await Promise.all([d8.slurpFile(E,{ignoreCache:r.ignoreCache}).then(OF).then(Ei).catch(O8),d8.slurpFile($,{ignoreCache:r.ignoreCache}).then(OF).catch(O8)]);return{configFile:I[0],credentialsFile:I[1]}},"loadSharedConfigFiles"),Ri=Bs((r)=>Object.entries(r).filter(([f])=>f.startsWith(YE.IniSectionType.SSO_SESSION+Sw)).reduce((f,[s,w])=>({...f,[s.substring(s.indexOf(Sw)+1)]:w}),{}),"getSsoSessionData"),Wi=jF(),zi=Bs(()=>({}),"swallowError"),Si=Bs(async(r={})=>Wi.slurpFile(r.configFilepath??g8()).then(OF).then(Ri).catch(zi),"loadSsoSessionData"),Pi=Bs((...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"),Xi=Bs(async(r)=>{const f=await _8(r);return Pi(f.configFile,f.credentialsFile)},"parseKnownFiles")});var o8=v((xfr,n8)=>{function gF(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:lE,getOwnPropertyDescriptor:Yi,getOwnPropertyNames:Ki}=Object,Zi=Object.prototype.hasOwnProperty,wh=(r,f)=>lE(r,"name",{value:f,configurable:!0}),li=(r,f)=>{for(var s in f)lE(r,s,{get:f[s],enumerable:!0})},Ji=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Ki(f))if(!Zi.call(r,h)&&h!==s)lE(r,h,{get:()=>f[h],enumerable:!(w=Yi(f,h))||w.enumerable})}return r},Qi=(r)=>Ji(lE({},"__esModule",{value:!0}),r),e8={};li(e8,{loadConfig:()=>ki});n8.exports=Qi(e8);var A1=mF();wh(gF,"getSelectorName");var Mi=wh((r,f)=>async()=>{try{const s=r(process.env);if(s===void 0)throw new Error;return s}catch(s){throw new A1.CredentialsProviderError(s.message||`Not found in ENV: ${gF(r.toString())}`,{logger:f})}},"fromEnv"),x8=bF(),Bi=wh((r,{preferredFile:f="config",...s}={})=>async()=>{const w=x8.getProfileName(s),{configFile:h,credentialsFile:$}=await x8.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 A1.CredentialsProviderError(U.message||`Not found in config files w/ profile [${w}]: ${gF(r.toString())}`,{logger:s.logger})}},"fromSharedConfigFiles"),Hi=wh((r)=>typeof r==="function","isFunction"),Vi=wh((r)=>Hi(r)?async()=>await r():A1.fromStatic(r),"fromStatic"),ki=wh(({environmentVariableSelector:r,configFileSelector:f,default:s},w={})=>A1.memoize(A1.chain(Mi(r),Bi(f,w),Vi(s))),"loadConfig")});var sA=v((t8)=>{Object.defineProperty(t8,"__esModule",{value:!0});t8.getEndpointUrlConfig=void 0;var a8=bF(),p8="AWS_ENDPOINT_URL",u8="endpoint_url",Di=(r)=>({environmentVariableSelector:(f)=>{const s=r.split(" ").map(($)=>$.toUpperCase()),w=f[[p8,...s].join("_")];if(w)return w;const h=f[p8];if(h)return h;return},configFileSelector:(f,s)=>{if(s&&f.services){const h=s[["services",f.services].join(a8.CONFIG_PREFIX_SEPARATOR)];if(h){const $=r.split(" ").map((I)=>I.toLowerCase()),E=h[[$.join("_"),u8].join(a8.CONFIG_PREFIX_SEPARATOR)];if(E)return E}}const w=f[u8];if(w)return w;return},default:void 0});t8.getEndpointUrlConfig=Di});var hA=v((fA)=>{Object.defineProperty(fA,"__esModule",{value:!0});fA.getEndpointFromConfig=void 0;var ii=o8(),yi=sA(),mi=async(r)=>ii.loadConfig(yi.getEndpointUrlConfig(r))();fA.getEndpointFromConfig=mi});var FA=v((ofr,IA)=>{function EA(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:Ni,getOwnPropertyNames:qi}=Object,vi=Object.prototype.hasOwnProperty,ji=(r,f)=>JE(r,"name",{value:f,configurable:!0}),di=(r,f)=>{for(var s in f)JE(r,s,{get:f[s],enumerable:!0})},Oi=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of qi(f))if(!vi.call(r,h)&&h!==s)JE(r,h,{get:()=>f[h],enumerable:!(w=Ni(f,h))||w.enumerable})}return r},ci=(r)=>Oi(JE({},"__esModule",{value:!0}),r),$A={};di($A,{parseQueryString:()=>EA});IA.exports=ci($A);ji(EA,"parseQueryString")});var CA=v((afr,GA)=>{var{defineProperty:QE,getOwnPropertyDescriptor:bi,getOwnPropertyNames:gi}=Object,_i=Object.prototype.hasOwnProperty,xi=(r,f)=>QE(r,"name",{value:f,configurable:!0}),ei=(r,f)=>{for(var s in f)QE(r,s,{get:f[s],enumerable:!0})},ni=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of gi(f))if(!_i.call(r,h)&&h!==s)QE(r,h,{get:()=>f[h],enumerable:!(w=bi(f,h))||w.enumerable})}return r},oi=(r)=>ni(QE({},"__esModule",{value:!0}),r),UA={};ei(UA,{parseUrl:()=>TA});GA.exports=oi(UA);var ai=FA(),TA=xi((r)=>{if(typeof r==="string")return TA(new URL(r));const{hostname:f,pathname:s,port:w,protocol:h,search:$}=r;let E;if($)E=ai.parseQueryString($);return{hostname:f,port:w?parseInt(w):void 0,protocol:h,path:s,query:E}},"parseUrl")});var xF=v((pfr,PA)=>{function SA(r,f,s){return{applyToStack:(w)=>{w.add(AA(r,s),WA),w.add(RA(r,f),zA)}}}var{defineProperty:ME,getOwnPropertyDescriptor:pi,getOwnPropertyNames:ui}=Object,ti=Object.prototype.hasOwnProperty,_F=(r,f)=>ME(r,"name",{value:f,configurable:!0}),ry=(r,f)=>{for(var s in f)ME(r,s,{get:f[s],enumerable:!0})},sy=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of ui(f))if(!ti.call(r,h)&&h!==s)ME(r,h,{get:()=>f[h],enumerable:!(w=pi(f,h))||w.enumerable})}return r},fy=(r)=>sy(ME({},"__esModule",{value:!0}),r),LA={};ry(LA,{deserializerMiddleware:()=>AA,deserializerMiddlewareOption:()=>WA,getSerdePlugin:()=>SA,serializerMiddleware:()=>RA,serializerMiddlewareOption:()=>zA});PA.exports=fy(LA);var AA=_F((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"),RA=_F((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"),WA={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},zA={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};_F(SA,"getSerdePlugin")});var MA=v((ufr,QA)=>{var{defineProperty:HE,getOwnPropertyDescriptor:wy,getOwnPropertyNames:hy}=Object,$y=Object.prototype.hasOwnProperty,sf=(r,f)=>HE(r,"name",{value:f,configurable:!0}),Ey=(r,f)=>{for(var s in f)HE(r,s,{get:f[s],enumerable:!0})},Iy=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of hy(f))if(!$y.call(r,h)&&h!==s)HE(r,h,{get:()=>f[h],enumerable:!(w=wy(f,h))||w.enumerable})}return r},Fy=(r)=>Iy(HE({},"__esModule",{value:!0}),r),YA={};Ey(YA,{endpointMiddleware:()=>lA,endpointMiddlewareOptions:()=>JA,getEndpointFromInstructions:()=>KA,getEndpointPlugin:()=>Sy,resolveEndpointConfig:()=>Py,resolveParams:()=>ZA,toEndpointV1:()=>eF});QA.exports=Fy(YA);var Uy=sf(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(Ay(f)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Ly(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"),Ty=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Gy=/(\d+\.){3}\d+/,Cy=/\.\./,Ly=sf((r)=>Ty.test(r)&&!Gy.test(r)&&!Cy.test(r),"isDnsCompatibleBucketName"),Ay=sf((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"),Ry=sf((r,f,s)=>{const w=sf(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"),Wy=hA(),XA=CA(),eF=sf((r)=>{if(typeof r==="object"){if("url"in r)return XA.parseUrl(r.url);return r}return XA.parseUrl(r)},"toEndpointV1"),KA=sf(async(r,f,s,w)=>{if(!s.endpoint){const E=await Wy.getEndpointFromConfig(s.serviceId||"");if(E)s.endpoint=()=>Promise.resolve(eF(E))}const h=await ZA(r,f,s);if(typeof s.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return s.endpointProvider(h,w)},"getEndpointFromInstructions"),ZA=sf(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 Ry(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 Uy(h);return h},"resolveParams"),BE=G1(),lA=sf(({config:r,instructions:f})=>{return(s,w)=>async(h)=>{var $,E,I;const F=await KA(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"),zy=xF(),JA={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:zy.serializerMiddlewareOption.name},Sy=sf((r,f)=>({applyToStack:(s)=>{s.addRelativeTo(lA({config:r,instructions:f}),JA)}}),"getEndpointPlugin"),Py=sf((r)=>{const f=r.tls??!0,{endpoint:s}=r,w=s!=null?async()=>eF(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 G0=v((tfr,NA)=>{function iA(r){return Object.keys(r).reduce((f,s)=>{const w=r[s];return{...f,[s]:Array.isArray(w)?[...w]:w}},{})}function mA(r){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(r)}var{defineProperty:VE,getOwnPropertyDescriptor:Xy,getOwnPropertyNames:Yy}=Object,Ky=Object.prototype.hasOwnProperty,q0=(r,f)=>VE(r,"name",{value:f,configurable:!0}),Zy=(r,f)=>{for(var s in f)VE(r,s,{get:f[s],enumerable:!0})},ly=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Yy(f))if(!Ky.call(r,h)&&h!==s)VE(r,h,{get:()=>f[h],enumerable:!(w=Xy(f,h))||w.enumerable})}return r},Jy=(r)=>ly(VE({},"__esModule",{value:!0}),r),BA={};Zy(BA,{Field:()=>By,Fields:()=>Hy,HttpRequest:()=>Vy,HttpResponse:()=>ky,IHttpRequest:()=>HA.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Qy,isValidHostname:()=>mA,resolveHttpHandlerRuntimeConfig:()=>My});NA.exports=Jy(BA);var Qy=q0((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"),My=q0((r)=>{return{httpHandler:r.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),HA=Is(),VA=class r{constructor({name:f,kind:s=HA.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}};q0(VA,"Field");var By=VA,kA=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)}};q0(kA,"Fields");var Hy=kA,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=iA(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)}};q0(DA,"HttpRequest");var Vy=DA;q0(iA,"cloneQuery");var yA=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"}};q0(yA,"HttpResponse");var ky=yA;q0(mA,"isValidHostname")});var nF=v((qA)=>{function iy(r){return r&&r.__esModule?r:{default:r}}function yy(){if(kE>DE.length-16)Dy.default.randomFillSync(DE),kE=0;return DE.slice(kE,kE+=16)}Object.defineProperty(qA,"__esModule",{value:!0});qA.default=yy;var Dy=iy(import.meta.require("crypto")),DE=new Uint8Array(256),kE=DE.length});var dA=v((vA)=>{Object.defineProperty(vA,"__esModule",{value:!0});vA.default=void 0;var Ny=/^(?:[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;vA.default=Ny});var R1=v((OA)=>{function vy(r){return r&&r.__esModule?r:{default:r}}function jy(r){return typeof r==="string"&&qy.default.test(r)}Object.defineProperty(OA,"__esModule",{value:!0});OA.default=void 0;var qy=vy(dA()),dy=jy;OA.default=dy});var W1=v((gA)=>{function cy(r){return r&&r.__esModule?r:{default:r}}function bA(r,f=0){return dr[r[f+0]]+dr[r[f+1]]+dr[r[f+2]]+dr[r[f+3]]+"-"+dr[r[f+4]]+dr[r[f+5]]+"-"+dr[r[f+6]]+dr[r[f+7]]+"-"+dr[r[f+8]]+dr[r[f+9]]+"-"+dr[r[f+10]]+dr[r[f+11]]+dr[r[f+12]]+dr[r[f+13]]+dr[r[f+14]]+dr[r[f+15]]}function by(r,f=0){const s=bA(r,f);if(!Oy.default(s))throw TypeError("Stringified UUID is invalid");return s}Object.defineProperty(gA,"__esModule",{value:!0});gA.default=void 0;gA.unsafeStringify=bA;var Oy=cy(R1()),dr=[];for(let r=0;r<256;++r)dr.push((r+256).toString(16).slice(1));var gy=by;gA.default=gy});var oA=v((eA)=>{function ny(r){return r&&r.__esModule?r:{default:r}}function oy(r,f,s){let w=f&&s||0;const h=f||new Array(16);r=r||{};let $=r.node||xA,E=r.clockseq!==void 0?r.clockseq:oF;if($==null||E==null){const z=r.random||(r.rng||xy.default)();if($==null)$=xA=[z[0]|1,z[1],z[2],z[3],z[4],z[5]];if(E==null)E=oF=(z[6]<<8|z[7])&16383}let I=r.msecs!==void 0?r.msecs:Date.now(),F=r.nsecs!==void 0?r.nsecs:pF+1;const U=I-aF+(F-pF)/1e4;if(U<0&&r.clockseq===void 0)E=E+1&16383;if((U<0||I>aF)&&r.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");aF=I,pF=F,oF=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||ey.unsafeStringify(h)}Object.defineProperty(eA,"__esModule",{value:!0});eA.default=void 0;var xy=ny(nF()),ey=W1(),xA,oF,aF=0,pF=0,ay=oy;eA.default=ay});var uF=v((aA)=>{function uy(r){return r&&r.__esModule?r:{default:r}}function ty(r){if(!py.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(aA,"__esModule",{value:!0});aA.default=void 0;var py=uy(R1()),rm=ty;aA.default=rm});var tF=v((rR)=>{function wm(r){return r&&r.__esModule?r:{default:r}}function hm(r){r=unescape(encodeURIComponent(r));const f=[];for(let s=0;s<r.length;++s)f.push(r.charCodeAt(s));return f}function $m(r,f,s){function w(h,$,E,I){var F;if(typeof h==="string")h=hm(h);if(typeof $==="string")$=fm.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 sm.unsafeStringify(U)}try{w.name=r}catch(h){}return w.DNS=uA,w.URL=tA,w}Object.defineProperty(rR,"__esModule",{value:!0});rR.URL=rR.DNS=void 0;rR.default=$m;var sm=W1(),fm=wm(uF()),uA="6ba7b810-9dad-11d1-80b4-00c04fd430c8";rR.DNS=uA;var tA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";rR.URL=tA});var hR=v((fR)=>{function Um(r){return r&&r.__esModule?r:{default:r}}function Tm(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return Fm.default.createHash("md5").update(r).digest()}Object.defineProperty(fR,"__esModule",{value:!0});fR.default=void 0;var Fm=Um(import.meta.require("crypto")),Gm=Tm;fR.default=Gm});var FR=v((ER)=>{function $R(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(ER,"__esModule",{value:!0});ER.default=void 0;var Cm=$R(tF()),Lm=$R(hR()),Am=Cm.default("v3",48,Lm.default),Rm=Am;ER.default=Rm});var GR=v((UR)=>{function zm(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(UR,"__esModule",{value:!0});UR.default=void 0;var Wm=zm(import.meta.require("crypto")),Sm={randomUUID:Wm.default.randomUUID};UR.default=Sm});var WR=v((AR)=>{function LR(r){return r&&r.__esModule?r:{default:r}}function Ym(r,f,s){if(CR.default.randomUUID&&!f&&!r)return CR.default.randomUUID();r=r||{};const w=r.random||(r.rng||Pm.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 Xm.unsafeStringify(w)}Object.defineProperty(AR,"__esModule",{value:!0});AR.default=void 0;var CR=LR(GR()),Pm=LR(nF()),Xm=W1(),Km=Ym;AR.default=Km});var PR=v((zR)=>{function lm(r){return r&&r.__esModule?r:{default:r}}function Jm(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return Zm.default.createHash("sha1").update(r).digest()}Object.defineProperty(zR,"__esModule",{value:!0});zR.default=void 0;var Zm=lm(import.meta.require("crypto")),Qm=Jm;zR.default=Qm});var ZR=v((YR)=>{function XR(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(YR,"__esModule",{value:!0});YR.default=void 0;var Mm=XR(tF()),Bm=XR(PR()),Hm=Mm.default("v5",80,Bm.default),Vm=Hm;YR.default=Vm});var QR=v((lR)=>{Object.defineProperty(lR,"__esModule",{value:!0});lR.default=void 0;var km="00000000-0000-0000-0000-000000000000";lR.default=km});var HR=v((MR)=>{function im(r){return r&&r.__esModule?r:{default:r}}function ym(r){if(!Dm.default(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}Object.defineProperty(MR,"__esModule",{value:!0});MR.default=void 0;var Dm=im(R1()),mm=ym;MR.default=mm});var rU=v((ff)=>{function C0(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(ff,"__esModule",{value:!0});Object.defineProperty(ff,"NIL",{enumerable:!0,get:function(){return dm.default}});Object.defineProperty(ff,"parse",{enumerable:!0,get:function(){return gm.default}});Object.defineProperty(ff,"stringify",{enumerable:!0,get:function(){return bm.default}});Object.defineProperty(ff,"v1",{enumerable:!0,get:function(){return Nm.default}});Object.defineProperty(ff,"v3",{enumerable:!0,get:function(){return qm.default}});Object.defineProperty(ff,"v4",{enumerable:!0,get:function(){return vm.default}});Object.defineProperty(ff,"v5",{enumerable:!0,get:function(){return jm.default}});Object.defineProperty(ff,"validate",{enumerable:!0,get:function(){return cm.default}});Object.defineProperty(ff,"version",{enumerable:!0,get:function(){return Om.default}});var Nm=C0(oA()),qm=C0(FR()),vm=C0(WR()),jm=C0(ZR()),dm=C0(QR()),Om=C0(HR()),cm=C0(R1()),bm=C0(W1()),gm=C0(uF())});var sU=v((W0r,iR)=>{var{defineProperty:iE,getOwnPropertyDescriptor:_m,getOwnPropertyNames:xm}=Object,em=Object.prototype.hasOwnProperty,hh=(r,f)=>iE(r,"name",{value:f,configurable:!0}),nm=(r,f)=>{for(var s in f)iE(r,s,{get:f[s],enumerable:!0})},om=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of xm(f))if(!em.call(r,h)&&h!==s)iE(r,h,{get:()=>f[h],enumerable:!(w=_m(f,h))||w.enumerable})}return r},am=(r)=>om(iE({},"__esModule",{value:!0}),r),VR={};nm(VR,{isClockSkewCorrectedError:()=>kR,isClockSkewError:()=>wN,isRetryableByTrait:()=>fN,isServerError:()=>$N,isThrottlingError:()=>hN,isTransientError:()=>DR});iR.exports=am(VR);var pm=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],um=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],tm=["TimeoutError","RequestTimeout","RequestTimeoutException"],rN=[500,502,503,504],sN=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],fN=hh((r)=>r.$retryable!==void 0,"isRetryableByTrait"),wN=hh((r)=>pm.includes(r.name),"isClockSkewError"),kR=hh((r)=>{var f;return(f=r.$metadata)==null?void 0:f.clockSkewCorrected},"isClockSkewCorrectedError"),hN=hh((r)=>{var f,s;return((f=r.$metadata)==null?void 0:f.httpStatusCode)===429||um.includes(r.name)||((s=r.$retryable)==null?void 0:s.throttling)==!0},"isThrottlingError"),DR=hh((r)=>{var f;return kR(r)||tm.includes(r.name)||sN.includes((r==null?void 0:r.code)||"")||rN.includes(((f=r.$metadata)==null?void 0:f.httpStatusCode)||0)},"isTransientError"),$N=hh((r)=>{var f;if(((f=r.$metadata)==null?void 0:f.httpStatusCode)!==void 0){const s=r.$metadata.httpStatusCode;if(500<=s&&s<=599&&!DR(r))return!0;return!1}return!1},"isServerError")});var eR=v((z0r,xR)=>{var{defineProperty:yE,getOwnPropertyDescriptor:EN,getOwnPropertyNames:IN}=Object,FN=Object.prototype.hasOwnProperty,wf=(r,f)=>yE(r,"name",{value:f,configurable:!0}),UN=(r,f)=>{for(var s in f)yE(r,s,{get:f[s],enumerable:!0})},TN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of IN(f))if(!FN.call(r,h)&&h!==s)yE(r,h,{get:()=>f[h],enumerable:!(w=EN(f,h))||w.enumerable})}return r},GN=(r)=>TN(yE({},"__esModule",{value:!0}),r),mR={};UN(mR,{AdaptiveRetryStrategy:()=>zN,ConfiguredRetryStrategy:()=>SN,DEFAULT_MAX_ATTEMPTS:()=>fU,DEFAULT_RETRY_DELAY_BASE:()=>z1,DEFAULT_RETRY_MODE:()=>CN,DefaultRateLimiter:()=>vR,INITIAL_RETRY_TOKENS:()=>wU,INVOCATION_ID_HEADER:()=>AN,MAXIMUM_RETRY_DELAY:()=>hU,NO_RETRY_INCREMENT:()=>cR,REQUEST_HEADER:()=>RN,RETRY_COST:()=>dR,RETRY_MODES:()=>NR,StandardRetryStrategy:()=>$U,THROTTLING_RETRY_DELAY_BASE:()=>jR,TIMEOUT_RETRY_COST:()=>OR});xR.exports=GN(mR);var NR=((r)=>{return r.STANDARD="standard",r.ADAPTIVE="adaptive",r})(NR||{}),fU=3,CN="standard",LN=sU(),qR=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(),LN.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))}};wf(qR,"DefaultRateLimiter");var vR=qR,z1=100,hU=20000,jR=500,wU=500,dR=5,OR=10,cR=1,AN="amz-sdk-invocation-id",RN="amz-sdk-request",WN=wf(()=>{let r=z1;return{computeNextBackoffDelay:wf((w)=>{return Math.floor(Math.min(hU,Math.random()*2**w*r))},"computeNextBackoffDelay"),setDelayBase:wf((w)=>{r=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),yR=wf(({retryDelay:r,retryCount:f,retryCost:s})=>{return{getRetryCount:wf(()=>f,"getRetryCount"),getRetryDelay:wf(()=>Math.min(hU,r),"getRetryDelay"),getRetryCost:wf(()=>s,"getRetryCost")}},"createDefaultRetryToken"),bR=class r{constructor(f){this.maxAttempts=f,this.mode="standard",this.capacity=wU,this.retryBackoffStrategy=WN(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return yR({retryDelay:z1,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"?jR:z1);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,yR({retryDelay:E,retryCount:f.getRetryCount()+1,retryCost:I})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(wU,this.capacity+(f.getRetryCost()??cR))}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 ${fU}`),fU}}shouldRetry(f,s,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(s.errorType)&&this.isRetryableError(s.errorType)}getCapacityCost(f){return f==="TRANSIENT"?OR:dR}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}};wf(bR,"StandardRetryStrategy");var $U=bR,gR=class r{constructor(f,s){this.maxAttemptsProvider=f,this.mode="adaptive";const{rateLimiter:w}=s??{};this.rateLimiter=w??new vR,this.standardRetryStrategy=new $U(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)}};wf(gR,"AdaptiveRetryStrategy");var zN=gR,_R=class r extends $U{constructor(f,s=z1){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}};wf(_R,"ConfiguredRetryStrategy");var SN=_R});var uR=v((S0r,pR)=>{var{defineProperty:mE,getOwnPropertyDescriptor:PN,getOwnPropertyNames:XN}=Object,YN=Object.prototype.hasOwnProperty,Hs=(r,f)=>mE(r,"name",{value:f,configurable:!0}),KN=(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 XN(f))if(!YN.call(r,h)&&h!==s)mE(r,h,{get:()=>f[h],enumerable:!(w=PN(f,h))||w.enumerable})}return r},lN=(r)=>ZN(mE({},"__esModule",{value:!0}),r),aR={};KN(aR,{constructStack:()=>EU});pR.exports=lN(aR);var Pw=Hs((r,f)=>{const s=[];if(r)s.push(r);if(f)for(let w of f)s.push(w);return s},"getAllAliases"),v0=Hs((r,f)=>{return`${r||"anonymous"}${f&&f.length>0?` (a.k.a. ${f.join(",")})`:""}`},"getMiddlewareNameWithAliases"),EU=Hs(()=>{let r=[],f=[],s=!1;const w=new Set,h=Hs((L)=>L.sort((z,S)=>nR[S.step]-nR[z.step]||oR[S.priority||"normal"]-oR[z.priority||"normal"]),"sort"),$=Hs((L)=>{let z=!1;const S=Hs((Z)=>{const D=Pw(Z.name,Z.aliases);if(D.includes(L)){z=!0;for(let B of D)w.delete(B);return!1}return!0},"filterCb");return r=r.filter(S),f=f.filter(S),z},"removeByName"),E=Hs((L)=>{let z=!1;const S=Hs((Z)=>{if(Z.middleware===L){z=!0;for(let D of Pw(Z.name,Z.aliases))w.delete(D);return!1}return!0},"filterCb");return r=r.filter(S),f=f.filter(S),z},"removeByReference"),I=Hs((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=Hs((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=Hs((L=!1)=>{const z=[],S=[],Z={};return r.forEach((B)=>{const Q={...B,before:[],after:[]};for(let i of Pw(Q.name,Q.aliases))Z[i]=Q;z.push(Q)}),f.forEach((B)=>{const Q={...B,before:[],after:[]};for(let i of Pw(Q.name,Q.aliases))Z[i]=Q;S.push(Q)}),S.forEach((B)=>{if(B.toMiddleware){const Q=Z[B.toMiddleware];if(Q===void 0){if(L)return;throw new Error(`${B.toMiddleware} is not found when adding ${v0(B.name,B.aliases)} middleware ${B.relation} ${B.toMiddleware}`)}if(B.relation==="after")Q.after.push(B);if(B.relation==="before")Q.before.push(B)}}),h(z).map(F).reduce((B,Q)=>{return B.push(...Q),B},[])},"getMiddlewareList"),C={add:(L,z={})=>{const{name:S,override:Z,aliases:D}=z,B={step:"initialize",priority:"normal",middleware:L,...z},Q=Pw(S,D);if(Q.length>0){if(Q.some((i)=>w.has(i))){if(!Z)throw new Error(`Duplicate middleware name '${v0(S,D)}'`);for(let i of Q){const x=r.findIndex((hr)=>{var kr;return hr.name===i||((kr=hr.aliases)==null?void 0:kr.some((Rw)=>Rw===i))});if(x===-1)continue;const e=r[x];if(e.step!==B.step||B.priority!==e.priority)throw new Error(`"${v0(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${v0(S,D)}" middleware with ${B.priority} priority in ${B.step} step.`);r.splice(x,1)}}for(let i of Q)w.add(i)}r.push(B)},addRelativeTo:(L,z)=>{const{name:S,override:Z,aliases:D}=z,B={middleware:L,...z},Q=Pw(S,D);if(Q.length>0){if(Q.some((i)=>w.has(i))){if(!Z)throw new Error(`Duplicate middleware name '${v0(S,D)}'`);for(let i of Q){const x=f.findIndex((hr)=>{var kr;return hr.name===i||((kr=hr.aliases)==null?void 0:kr.some((Rw)=>Rw===i))});if(x===-1)continue;const e=f[x];if(e.toMiddleware!==B.toMiddleware||e.relation!==B.relation)throw new Error(`"${v0(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${v0(S,D)}" middleware ${B.relation} "${B.toMiddleware}" middleware.`);f.splice(x,1)}}for(let i of Q)w.add(i)}f.push(B)},clone:()=>I(EU()),use:(L)=>{L.applyToStack(C)},remove:(L)=>{if(typeof L==="string")return $(L);else return E(L)},removeByTag:(L)=>{let z=!1;const S=Hs((Z)=>{const{tags:D,name:B,aliases:Q}=Z;if(D&&D.includes(L)){const i=Pw(B,Q);for(let x of i)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(EU());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 v0(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"),nR={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},oR={high:3,normal:2,low:1}});var IU=v((P0r,rW)=>{var{defineProperty:NE,getOwnPropertyDescriptor:JN,getOwnPropertyNames:QN}=Object,MN=Object.prototype.hasOwnProperty,BN=(r,f)=>NE(r,"name",{value:f,configurable:!0}),HN=(r,f)=>{for(var s in f)NE(r,s,{get:f[s],enumerable:!0})},VN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of QN(f))if(!MN.call(r,h)&&h!==s)NE(r,h,{get:()=>f[h],enumerable:!(w=JN(f,h))||w.enumerable})}return r},kN=(r)=>VN(NE({},"__esModule",{value:!0}),r),tR={};HN(tR,{isArrayBuffer:()=>DN});rW.exports=kN(tR);var DN=BN((r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]","isArrayBuffer")});var S1=v((X0r,wW)=>{var{defineProperty:qE,getOwnPropertyDescriptor:iN,getOwnPropertyNames:yN}=Object,mN=Object.prototype.hasOwnProperty,sW=(r,f)=>qE(r,"name",{value:f,configurable:!0}),NN=(r,f)=>{for(var s in f)qE(r,s,{get:f[s],enumerable:!0})},qN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of yN(f))if(!mN.call(r,h)&&h!==s)qE(r,h,{get:()=>f[h],enumerable:!(w=iN(f,h))||w.enumerable})}return r},vN=(r)=>qN(qE({},"__esModule",{value:!0}),r),fW={};NN(fW,{fromArrayBuffer:()=>dN,fromString:()=>ON});wW.exports=vN(fW);var jN=IU(),FU=import.meta.require("buffer"),dN=sW((r,f=0,s=r.byteLength-f)=>{if(!jN.isArrayBuffer(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return FU.Buffer.from(r,f,s)},"fromArrayBuffer"),ON=sW((r,f)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return f?FU.Buffer.from(r,f):FU.Buffer.from(r)},"fromString")});var EW=v((hW)=>{Object.defineProperty(hW,"__esModule",{value:!0});hW.fromBase64=void 0;var cN=S1(),bN=/^[A-Za-z0-9+/]*={0,2}$/,gN=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!bN.exec(r))throw new TypeError("Invalid base64 string.");const f=cN.fromString(r,"base64");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)};hW.fromBase64=gN});var j0=v((K0r,TW)=>{var{defineProperty:vE,getOwnPropertyDescriptor:_N,getOwnPropertyNames:xN}=Object,eN=Object.prototype.hasOwnProperty,UU=(r,f)=>vE(r,"name",{value:f,configurable:!0}),nN=(r,f)=>{for(var s in f)vE(r,s,{get:f[s],enumerable:!0})},oN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of xN(f))if(!eN.call(r,h)&&h!==s)vE(r,h,{get:()=>f[h],enumerable:!(w=_N(f,h))||w.enumerable})}return r},aN=(r)=>oN(vE({},"__esModule",{value:!0}),r),IW={};nN(IW,{fromUtf8:()=>UW,toUint8Array:()=>pN,toUtf8:()=>uN});TW.exports=aN(IW);var FW=S1(),UW=UU((r)=>{const f=FW.fromString(r,"utf8");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),pN=UU((r)=>{if(typeof r==="string")return UW(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},"toUint8Array"),uN=UU((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 FW.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")},"toUtf8")});var LW=v((GW)=>{Object.defineProperty(GW,"__esModule",{value:!0});GW.toBase64=void 0;var tN=S1(),rq=j0(),sq=(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 tN.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString("base64")};GW.toBase64=sq});var dE=v((l0r,jE)=>{var{defineProperty:AW,getOwnPropertyDescriptor:fq,getOwnPropertyNames:wq}=Object,hq=Object.prototype.hasOwnProperty,TU=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of wq(f))if(!hq.call(r,h)&&h!==s)AW(r,h,{get:()=>f[h],enumerable:!(w=fq(f,h))||w.enumerable})}return r},RW=(r,f,s)=>(TU(r,f,"default"),s&&TU(s,f,"default")),$q=(r)=>TU(AW({},"__esModule",{value:!0}),r),GU={};jE.exports=$q(GU);RW(GU,EW(),jE.exports);RW(GU,LW(),jE.exports)});var SW=v((WW)=>{Object.defineProperty(WW,"__esModule",{value:!0});WW.getAwsChunkedEncodingStream=void 0;var Eq=import.meta.require("stream"),Iq=(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 Eq.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};WW.getAwsChunkedEncodingStream=Iq});var LU=v((Q0r,YW)=>{var{defineProperty:OE,getOwnPropertyDescriptor:Fq,getOwnPropertyNames:Uq}=Object,Tq=Object.prototype.hasOwnProperty,CU=(r,f)=>OE(r,"name",{value:f,configurable:!0}),Gq=(r,f)=>{for(var s in f)OE(r,s,{get:f[s],enumerable:!0})},Cq=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Uq(f))if(!Tq.call(r,h)&&h!==s)OE(r,h,{get:()=>f[h],enumerable:!(w=Fq(f,h))||w.enumerable})}return r},Lq=(r)=>Cq(OE({},"__esModule",{value:!0}),r),PW={};Gq(PW,{escapeUri:()=>XW,escapeUriPath:()=>Rq});YW.exports=Lq(PW);var XW=CU((r)=>encodeURIComponent(r).replace(/[!'()*]/g,Aq),"escapeUri"),Aq=CU((r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Rq=CU((r)=>r.split("/").map(XW).join("/"),"escapeUriPath")});var RU=v((M0r,lW)=>{function ZW(r){const f=[];for(let s of Object.keys(r).sort()){const w=r[s];if(s=AU.escapeUri(s),Array.isArray(w))for(let h=0,$=w.length;h<$;h++)f.push(`${s}=${AU.escapeUri(w[h])}`);else{let h=s;if(w||typeof w==="string")h+=`=${AU.escapeUri(w)}`;f.push(h)}}return f.join("&")}var{defineProperty:cE,getOwnPropertyDescriptor:Wq,getOwnPropertyNames:zq}=Object,Sq=Object.prototype.hasOwnProperty,Pq=(r,f)=>cE(r,"name",{value:f,configurable:!0}),Xq=(r,f)=>{for(var s in f)cE(r,s,{get:f[s],enumerable:!0})},Yq=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of zq(f))if(!Sq.call(r,h)&&h!==s)cE(r,h,{get:()=>f[h],enumerable:!(w=Wq(f,h))||w.enumerable})}return r},Kq=(r)=>Yq(cE({},"__esModule",{value:!0}),r),KW={};Xq(KW,{buildQueryString:()=>ZW});lW.exports=Kq(KW);var AU=LU();Pq(ZW,"buildQueryString")});var OW=v((B0r,dW)=>{async function SU(r,f,s=JW){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(JW,s)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout($),I()}),r.on("error",()=>{E=!0,clearTimeout($),I()})})]);if(!E)iW(r,f.body)}function iW(r,f){if(f instanceof DW.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 jW(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:Zq,defineProperty:P1,getOwnPropertyDescriptor:lq,getOwnPropertyNames:Jq,getPrototypeOf:Qq}=Object,Mq=Object.prototype.hasOwnProperty,Jr=(r,f)=>P1(r,"name",{value:f,configurable:!0}),Bq=(r,f)=>{for(var s in f)P1(r,s,{get:f[s],enumerable:!0})},MW=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Jq(f))if(!Mq.call(r,h)&&h!==s)P1(r,h,{get:()=>f[h],enumerable:!(w=lq(f,h))||w.enumerable})}return r},Hq=(r,f,s)=>(s=r!=null?Zq(Qq(r)):{},MW(f||!r||!r.__esModule?P1(s,"default",{value:r,enumerable:!0}):s,r)),Vq=(r)=>MW(P1({},"__esModule",{value:!0}),r),BW={};Bq(BW,{DEFAULT_REQUEST_TIMEOUT:()=>mq,NodeHttp2Handler:()=>dq,NodeHttpHandler:()=>Nq,streamCollector:()=>cq});dW.exports=Vq(BW);var HW=G0(),VW=RU(),WU=import.meta.require("http"),zU=import.meta.require("https"),kq=["ECONNRESET","EPIPE","ETIMEDOUT"],kW=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"),Dq=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"),iq=Jr((r,{keepAlive:f,keepAliveMsecs:s})=>{if(f!==!0)return;r.on("socket",(w)=>{w.setKeepAlive(f,s||0)})},"setSocketKeepAlive"),yq=Jr((r,f,s=0)=>{r.setTimeout(s,()=>{r.destroy(),f(Object.assign(new Error(`Connection timed out after ${s} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),DW=import.meta.require("stream"),JW=1000;Jr(SU,"writeRequestBody");Jr(iW,"writeBody");var mq=0,yW=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 Uk=Object.create;var{getPrototypeOf:Gk,defineProperty:WF,getOwnPropertyNames:Tk}=Object;var Lk=Object.prototype.hasOwnProperty;var g=(r,s,f)=>{f=r!=null?Uk(Gk(r)):{};const w=s||!r||!r.__esModule?WF(f,"default",{value:r,enumerable:!0}):f;for(let h of Tk(r))if(!Lk.call(w,h))WF(w,h,{get:()=>r[h],enumerable:!0});return w};var v=(r,s)=>()=>(s||r((s={exports:{}}).exports,s),s.exports);var Lf=(r,s)=>{for(var f in s)WF(r,f,{get:s[f],enumerable:!0,configurable:!0,set:(w)=>s[f]=()=>w})};var T=(r,s)=>()=>(r&&(s=r(r=0)),s);var Wf=(r)=>{let s=r.httpHandler;return{setHttpHandler(f){s=f},httpHandler(){return s},updateHttpClientConfig(f,w){s.updateHttpClientConfig(f,w)},httpHandlerConfigs(){return s.httpHandlerConfigs()}}},Af=(r)=>{return{httpHandler:r.httpHandler()}};var dL=()=>{};var T0=v((tp,aL)=>{var{defineProperty:p3,getOwnPropertyDescriptor:Wk,getOwnPropertyNames:Ak}=Object,zk=Object.prototype.hasOwnProperty,u3=(r,s)=>p3(r,"name",{value:s,configurable:!0}),Ck=(r,s)=>{for(var f in s)p3(r,f,{get:s[f],enumerable:!0})},Rk=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Ak(s))if(!zk.call(r,h)&&h!==f)p3(r,h,{get:()=>s[h],enumerable:!(w=Wk(s,h))||w.enumerable})}return r},Pk=(r)=>Rk(p3({},"__esModule",{value:!0}),r),bL={};Ck(bL,{AlgorithmId:()=>xL,EndpointURLScheme:()=>gL,FieldPosition:()=>eL,HttpApiKeyAuthLocation:()=>_L,HttpAuthLocation:()=>cL,IniSectionType:()=>nL,RequestHandlerProtocol:()=>oL,SMITHY_CONTEXT_KEY:()=>Sk,getDefaultClientConfiguration:()=>Kk,resolveDefaultRuntimeConfig:()=>Zk});aL.exports=Pk(bL);var cL=((r)=>{return r.HEADER="header",r.QUERY="query",r})(cL||{}),_L=((r)=>{return r.HEADER="header",r.QUERY="query",r})(_L||{}),gL=((r)=>{return r.HTTP="http",r.HTTPS="https",r})(gL||{}),xL=((r)=>{return r.MD5="md5",r.CRC32="crc32",r.CRC32C="crc32c",r.SHA1="sha1",r.SHA256="sha256",r})(xL||{}),Xk=u3((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"),Yk=u3((r)=>{const s={};return r.checksumAlgorithms().forEach((f)=>{s[f.algorithmId()]=f.checksumConstructor()}),s},"resolveChecksumRuntimeConfig"),Kk=u3((r)=>{return{...Xk(r)}},"getDefaultClientConfiguration"),Zk=u3((r)=>{return{...Yk(r)}},"resolveDefaultRuntimeConfig"),eL=((r)=>{return r[r.HEADER=0]="HEADER",r[r.TRAILER=1]="TRAILER",r})(eL||{}),Sk="__smithy_context",nL=((r)=>{return r.PROFILE="profile",r.SSO_SESSION="sso-session",r.SERVICES="services",r})(nL||{}),oL=((r)=>{return r.HTTP_0_9="http/0.9",r.HTTP_1_0="http/1.0",r.TDS_8_0="tds/8.0",r})(oL||{})});var Jk;var pL=T(()=>{Jk=g(T0(),1)});var uL=()=>{};function Qk(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=Qk(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 Fw{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 tL=()=>{};var Nr=T(()=>{dL();pL();uL();tL()});function zf(r){return r}var Mk=(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 $=w.hostname;if(w.port!=null)$+=`:${w.port}`;w.headers.host=$}return s(f)},Bk,Cf=(r)=>({applyToStack:(s)=>{s.add(Mk(r),Bk)}});var _w=T(()=>{Nr();Bk={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var Vk=()=>(r,s)=>async(f)=>{try{const w=await r(f),{clientName:h,commandName:$,logger:E,dynamoDbDocumentClientOptions:I={}}=s,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:U}=I,L=F??s.inputFilterSensitiveLog,C=U??s.outputFilterSensitiveLog,{$metadata:Y,...X}=w.output;return E?.info?.({clientName:h,commandName:$,input:L(f.input),output:C(X),metadata:Y}),w}catch(w){const{clientName:h,commandName:$,logger:E,dynamoDbDocumentClientOptions:I={}}=s,{overrideInputFilterSensitiveLog:F}=I,U=F??s.inputFilterSensitiveLog;throw E?.error?.({clientName:h,commandName:$,input:U(f.input),error:w,metadata:w.$metadata}),w}},Hk,Rf=(r)=>({applyToStack:(s)=>{s.add(Vk(),Hk)}});var r8=T(()=>{Hk={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var gw=T(()=>{r8()});var f8="X-Amzn-Trace-Id",Dk="AWS_LAMBDA_FUNCTION_NAME",kk="_X_AMZN_TRACE_ID",lk=(r)=>(s)=>async(f)=>{const{request:w}=f;if(!Mr.isInstance(w)||r.runtime!=="node"||w.headers.hasOwnProperty(f8))return s(f);const h=process.env[Dk],$=process.env[kk],E=(I)=>typeof I==="string"&&I.length>0;if(E(h)&&E($))w.headers[f8]=$;return s({...f,request:w})},Nk,Pf=(r)=>({applyToStack:(s)=>{s.add(lk(r),Nk)}});var xw=T(()=>{Nr();Nk={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});function Xf(r){return{...r,customUserAgent:typeof r.customUserAgent==="string"?[[r.customUserAgent]]:r.customUserAgent}}var qk,s1=(r)=>qk.test(r)||r.startsWith("[")&&r.endsWith("]");var AF=T(()=>{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 yk,w1=(r,s=!1)=>{if(!s)return yk.test(r);const f=r.split(".");for(let w of f)if(!w1(w))return!1;return!0};var zF=T(()=>{yk=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var ar;var t3=T(()=>{ar={}});var Is="endpoints";function Y0(r){if(typeof r!=="object"||r==null)return r;if("ref"in r)return`\$${Y0(r.ref)}`;if("fn"in r)return`${r.fn}(${(r.argv||[]).map(Y0).join(", ")})`;return JSON.stringify(r,null,2)}var h1=()=>{};var Cr;var s8=T(()=>{Cr=class Cr extends Error{constructor(r){super(r);this.name="EndpointError"}}});var w8=()=>{};var h8=()=>{};var $8=()=>{};var E8=()=>{};var I8=()=>{};var F8=()=>{};var K0=T(()=>{s8();w8();h8();$8();E8();I8();F8()});var U8=(r,s)=>r===s;var G8=(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 Cr(`Path: '${r}' does not end with ']'`);const $=w.slice(h+1,-1);if(Number.isNaN(parseInt($)))throw new Cr(`Invalid array index: '${$}' in path: '${r}'`);if(h!==0)f.push(w.slice(0,h));f.push($)}else f.push(w)}return f};var T8=T(()=>{K0()});var r$=(r,s)=>G8(s).reduce((f,w)=>{if(typeof f!=="object")throw new Cr(`Index '${w}' in '${s}' not found in '${JSON.stringify(r)}'`);else if(Array.isArray(f))return f[parseInt(w)];return f[w]},r);var L8=T(()=>{K0();T8()});var W8=(r)=>r!=null;var A8=(r)=>!r;var f$,CF,z8=(r)=>{const s=(()=>{try{if(r instanceof URL)return r;if(typeof r==="object"&&"hostname"in r){const{hostname:Y,port:X,protocol:M="",path:l="",query:q={}}=r,D=new URL(`${M}//${Y}${X?`:${X}`:""}${l}`);return D.search=Object.entries(q).map(([m,p])=>`${m}=${p}`).join("&"),D}return new URL(r)}catch(Y){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:$,protocol:E,search:I}=s;if(I)return null;const F=E.slice(0,-1);if(!Object.values(f$.EndpointURLScheme).includes(F))return null;const U=s1(h),L=f.includes(`${w}:${CF[F]}`)||typeof r==="string"&&r.includes(`${w}:${CF[F]}`),C=`${w}${L?`:${CF[F]}`:""}`;return{scheme:F,authority:C,path:$,normalizedPath:$.endsWith("/")?$:`${$}/`,isIp:U}};var C8=T(()=>{f$=g(T0(),1);AF();CF={[f$.EndpointURLScheme.HTTP]:80,[f$.EndpointURLScheme.HTTPS]:443}});var R8=(r,s)=>r===s;var P8=(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 X8=(r)=>encodeURIComponent(r).replace(/[!*'()]/g,(s)=>`%${s.charCodeAt(0).toString(16).toUpperCase()}`);var RF=T(()=>{L8();zF();C8()});var Y8;var K8=T(()=>{RF();Y8={booleanEquals:U8,getAttr:r$,isSet:W8,isValidHostLabel:w1,not:A8,parseURL:z8,stringEquals:R8,substring:P8,uriEncode:X8}});var s$=(r,s)=>{const f=[],w={...s.endpointParams,...s.referenceRecord};let h=0;while(h<r.length){const $=r.indexOf("{",h);if($===-1){f.push(r.slice(h));break}f.push(r.slice(h,$));const E=r.indexOf("}",$);if(E===-1){f.push(r.slice($));break}if(r[$+1]==="{"&&r[E+1]==="}")f.push(r.slice($+1,E)),h=E+2;const I=r.substring($+1,E);if(I.includes("#")){const[F,U]=I.split("#");f.push(r$(w[F],U))}else f.push(w[I]);h=E+1}return f.join("")};var PF=T(()=>{RF()});var Z8=({ref:r},s)=>{return{...s.endpointParams,...s.referenceRecord}[r]};var Vs=(r,s,f)=>{if(typeof r==="string")return s$(r,f);else if(r.fn)return w$(r,f);else if(r.ref)return Z8(r,f);throw new Cr(`'${s}': ${String(r)} is not a string, function or reference.`)};var $1=T(()=>{K0();XF();PF()});var w$=({fn:r,argv:s},f)=>{const w=s.map(($)=>["boolean","number"].includes(typeof $)?$:Vs($,"arg",f)),h=r.split(".");if(h[0]in ar&&h[1]!=null)return ar[h[0]][h[1]](...w);return Y8[r](...w)};var XF=T(()=>{t3();K8();$1()});var S8=({assign:r,...s},f)=>{if(r&&r in f.referenceRecord)throw new Cr(`'${r}' is already defined in Reference Record.`);const w=w$(s,f);return f.logger?.debug?.(`${Is} evaluateCondition: ${Y0(s)} = ${Y0(w)}`),{result:w===""?!0:!!w,...r!=null&&{toAssign:{name:r,value:w}}}};var J8=T(()=>{h1();K0();XF()});var ew=(r=[],s)=>{const f={};for(let w of r){const{result:h,toAssign:$}=S8(w,{...s,referenceRecord:{...s.referenceRecord,...f}});if(!h)return{result:h};if($)f[$.name]=$.value,s.logger?.debug?.(`${Is} assign: ${$.name} := ${Y0($.value)}`)}return{result:!0,referenceRecord:f}};var h$=T(()=>{h1();J8()});var Q8=(r,s)=>Object.entries(r).reduce((f,[w,h])=>({...f,[w]:h.map(($)=>{const E=Vs($,"Header value entry",s);if(typeof E!=="string")throw new Cr(`Header '${w}' value '${E}' is not a string`);return E})}),{});var M8=T(()=>{K0();$1()});var YF=(r,s)=>{if(Array.isArray(r))return r.map((f)=>YF(f,s));switch(typeof r){case"string":return s$(r,s);case"object":if(r===null)throw new Cr(`Unexpected endpoint property: ${r}`);return $$(r,s);case"boolean":return r;default:throw new Cr(`Unexpected endpoint property type: ${typeof r}`)}};var B8=T(()=>{K0();PF();KF()});var $$=(r,s)=>Object.entries(r).reduce((f,[w,h])=>({...f,[w]:YF(h,s)}),{});var KF=T(()=>{B8()});var V8=(r,s)=>{const f=Vs(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 Cr(`Endpoint URL must be a string, got ${typeof f}`)};var H8=T(()=>{K0();$1()});var D8=(r,s)=>{const{conditions:f,endpoint:w}=r,{result:h,referenceRecord:$}=ew(f,s);if(!h)return;const E={...s,referenceRecord:{...s.referenceRecord,...$}},{url:I,properties:F,headers:U}=w;return s.logger?.debug?.(`${Is} Resolving endpoint from template: ${Y0(w)}`),{...U!=null&&{headers:Q8(U,E)},...F!=null&&{properties:$$(F,E)},url:V8(I,E)}};var k8=T(()=>{h1();h$();M8();KF();H8()});var l8=(r,s)=>{const{conditions:f,error:w}=r,{result:h,referenceRecord:$}=ew(f,s);if(!h)return;throw new Cr(Vs(w,"Error",{...s,referenceRecord:{...s.referenceRecord,...$}}))};var N8=T(()=>{K0();h$();$1()});var q8=(r,s)=>{const{conditions:f,rules:w}=r,{result:h,referenceRecord:$}=ew(f,s);if(!h)return;return E$(w,{...s,referenceRecord:{...s.referenceRecord,...$}})};var y8=T(()=>{h$();ZF()});var E$=(r,s)=>{for(let f of r)if(f.type==="endpoint"){const w=D8(f,s);if(w)return w}else if(f.type==="error")l8(f,s);else if(f.type==="tree"){const w=q8(f,s);if(w)return w}else throw new Cr(`Unknown endpoint rule: ${f}`);throw new Cr("Rules evaluation failed")};var ZF=T(()=>{K0();k8();N8();y8()});var m8=T(()=>{t3();ZF()});var x0=(r,s)=>{const{endpointParams:f,logger:w}=s,{parameters:h,rules:$}=r;s.logger?.debug?.(`${Is} Initial EndpointParams: ${Y0(f)}`);const E=Object.entries(h).filter(([,U])=>U.default!=null).map(([U,L])=>[U,L.default]);if(E.length>0)for(let[U,L]of E)f[U]=f[U]??L;const I=Object.entries(h).filter(([,U])=>U.required).map(([U])=>U);for(let U of I)if(f[U]==null)throw new Cr(`Missing required parameter: '${U}'`);const F=E$($,{endpointParams:f,logger:w,referenceRecord:{}});if(s.endpointParams?.Endpoint)try{const U=new URL(s.endpointParams.Endpoint),{protocol:L,port:C}=U;F.url.protocol=L,F.url.port=C}catch(U){}return s.logger?.debug?.(`${Is} Resolved endpoint: ${Y0(F)}`),F};var j8=T(()=>{h1();K0();m8()});var e0=T(()=>{AF();zF();t3();j8();K0()});var SF=T(()=>{e0()});var JF=(r,s=!1)=>{if(s){for(let f of r.split("."))if(!JF(f))return!1;return!0}if(!w1(r))return!1;if(r.length<3||r.length>63)return!1;if(r!==r.toLowerCase())return!1;if(s1(r))return!1;return!0};var v8=T(()=>{e0();SF()});var O8=(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:$,accountId:E,resourceId:F}};var d8;var i8=T(()=>{d8={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 jk,vk="",b8=(r)=>{const{partitions:s}=jk;for(let w of s){const{regions:h,outputs:$}=w;for(let[E,I]of Object.entries(h))if(E===r)return{...$,...I}}for(let w of s){const{regionRegex:h,outputs:$}=w;if(new RegExp(h).test(r))return{...$}}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}},c8=()=>vk;var QF=T(()=>{i8();jk=d8});var n0;var _8=T(()=>{e0();v8();QF();n0={isVirtualHostableS3Bucket:JF,parseArn:O8,partition:b8};ar.aws=n0});var g8=T(()=>{e0()});var x8=T(()=>{e0()});var e8=()=>{};var n8=()=>{};var o8=()=>{};var a8=()=>{};var p8=()=>{};var u8=T(()=>{x8();e8();n8();o8();a8();p8()});var Uw=T(()=>{_8();QF();SF();g8();u8()});var MF="user-agent",I$="x-amz-user-agent",BF=" ",F$="/",t8,rW,VF="-";var fW=T(()=>{t8=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,rW=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});var Ok=(r)=>(s,f)=>async(w)=>{const{request:h}=w;if(!Mr.isInstance(h))return s(w);const{headers:$}=h,E=f?.userAgent?.map(HF)||[],I=(await r.defaultUserAgentProvider()).map(HF),F=r?.customUserAgent?.map(HF)||[],U=c8(),L=(U?[U]:[]).concat([...I,...E,...F]).join(BF),C=[...I.filter((Y)=>Y.startsWith("aws-sdk-")),...F].join(BF);if(r.runtime!=="browser"){if(C)$[I$]=$[I$]?`${$[MF]} ${C}`:C;$[MF]=L}else $[I$]=L;return s({...w,request:h})},HF=(r)=>{const s=r[0].split(F$).map((E)=>E.replace(t8,VF)).join(F$),f=r[1]?.replace(rW,VF),w=s.indexOf(F$),h=s.substring(0,w);let $=s.substring(w+1);if(h==="api")$=$.toLowerCase();return[h,$,f].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}`}},"")},ik,Yf=(r)=>({applyToStack:(s)=>{s.add(Ok(r),ik)}});var sW=T(()=>{Uw();Nr();fW();ik={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var nw=T(()=>{sW()});var ow=(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 Hs;var wW=T(()=>{(function(r){r.ENV="env",r.CONFIG="shared config entry"})(Hs||(Hs={}))});var DF=T(()=>{wW()});var dk="AWS_USE_DUALSTACK_ENDPOINT",bk="use_dualstack_endpoint",Kf;var hW=T(()=>{DF();Kf={environmentVariableSelector:(r)=>ow(r,dk,Hs.ENV),configFileSelector:(r)=>ow(r,bk,Hs.CONFIG),default:!1}});var ck="AWS_USE_FIPS_ENDPOINT",_k="use_fips_endpoint",Zf;var $W=T(()=>{DF();Zf={environmentVariableSelector:(r)=>ow(r,ck,Hs.ENV),configFileSelector:(r)=>ow(r,_k,Hs.CONFIG),default:!1}});var pr=v((A0r,UW)=>{var{defineProperty:U$,getOwnPropertyDescriptor:gk,getOwnPropertyNames:xk}=Object,ek=Object.prototype.hasOwnProperty,IW=(r,s)=>U$(r,"name",{value:s,configurable:!0}),nk=(r,s)=>{for(var f in s)U$(r,f,{get:s[f],enumerable:!0})},ok=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of xk(s))if(!ek.call(r,h)&&h!==f)U$(r,h,{get:()=>s[h],enumerable:!(w=gk(s,h))||w.enumerable})}return r},ak=(r)=>ok(U$({},"__esModule",{value:!0}),r),FW={};nk(FW,{getSmithyContext:()=>pk,normalizeProvider:()=>uk});UW.exports=ak(FW);var EW=T0(),pk=IW((r)=>r[EW.SMITHY_CONTEXT_KEY]||(r[EW.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),uk=IW((r)=>{if(typeof r==="function")return r;const s=Promise.resolve(r);return()=>s},"normalizeProvider")});var tk;var GW=T(()=>{tk=g(pr(),1)});var rl;var TW=T(()=>{rl=g(pr(),1)});var LW=T(()=>{hW();$W();GW();TW()});var Z0,Sf;var WW=T(()=>{Z0={environmentVariableSelector:(r)=>r.AWS_REGION,configFileSelector:(r)=>r.region,default:()=>{throw new Error("Region is missing")}},Sf={preferredFile:"credentials"}});var G$=(r)=>typeof r==="string"&&(r.startsWith("fips-")||r.endsWith("-fips"));var kF=(r)=>G$(r)?["fips-aws-global","aws-fips"].includes(r)?"us-east-1":r.replace(/fips-(dkr-|prod-)?|-fips/,""):r;var AW=()=>{};var Jf=(r)=>{const{region:s,useFipsEndpoint:f}=r;if(!s)throw new Error("Region is missing");return{...r,region:async()=>{if(typeof s==="string")return kF(s);const w=await s();return kF(w)},useFipsEndpoint:async()=>{const w=typeof s==="string"?s:await s();if(G$(w))return!0;return typeof f!=="function"?Promise.resolve(!!f):f()}}};var zW=T(()=>{AW()});var CW=T(()=>{WW();zW()});var RW=()=>{};var PW=()=>{};var XW=()=>{};var YW=T(()=>{RW();PW();XW()});var S0=T(()=>{LW();CW();YW()});var lF=v((sfr,QW)=>{var{defineProperty:T$,getOwnPropertyDescriptor:fl,getOwnPropertyNames:sl}=Object,wl=Object.prototype.hasOwnProperty,Gw=(r,s)=>T$(r,"name",{value:s,configurable:!0}),hl=(r,s)=>{for(var f in s)T$(r,f,{get:s[f],enumerable:!0})},$l=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of sl(s))if(!wl.call(r,h)&&h!==f)T$(r,h,{get:()=>s[h],enumerable:!(w=fl(s,h))||w.enumerable})}return r},El=(r)=>$l(T$({},"__esModule",{value:!0}),r),KW={};hl(KW,{CredentialsProviderError:()=>Il,ProviderError:()=>L$,TokenProviderError:()=>Fl,chain:()=>Ul,fromStatic:()=>Gl,memoize:()=>Tl});QW.exports=El(KW);var ZW=class r extends Error{constructor(s,f=!0){var w;let h,$=!0;if(typeof f==="boolean")h=void 0,$=f;else if(f!=null&&typeof f==="object")h=f.logger,$=f.tryNextLink??!0;super(s);this.name="ProviderError",this.tryNextLink=$,Object.setPrototypeOf(this,r.prototype),(w=h==null?void 0:h.debug)==null||w.call(h,`@smithy/property-provider ${$?"->":"(!)"} ${s}`)}static from(s,f=!0){return Object.assign(new this(s.message,f),s)}};Gw(ZW,"ProviderError");var L$=ZW,SW=class r extends L${constructor(s,f=!0){super(s,f);this.name="CredentialsProviderError",Object.setPrototypeOf(this,r.prototype)}};Gw(SW,"CredentialsProviderError");var Il=SW,JW=class r extends L${constructor(s,f=!0){super(s,f);this.name="TokenProviderError",Object.setPrototypeOf(this,r.prototype)}};Gw(JW,"TokenProviderError");var Fl=JW,Ul=Gw((...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"),Gl=Gw((r)=>()=>Promise.resolve(r),"fromStatic"),Tl=Gw((r,s,f)=>{let w,h,$,E=!1;const I=Gw(async()=>{if(!h)h=r();try{w=await h,$=!0,E=!1}finally{h=void 0}return w},"coalesceProvider");if(s===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(f&&!f(w))return E=!0,w;if(s(w))return await I(),w;return w}},"memoize")});var aw=v((MW)=>{Object.defineProperty(MW,"__esModule",{value:!0});MW.getHomeDir=void 0;var Ll=import.meta.require("os"),Wl=import.meta.require("path"),NF={},Al=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},zl=()=>{const{HOME:r,USERPROFILE:s,HOMEPATH:f,HOMEDRIVE:w=`C:${Wl.sep}`}=process.env;if(r)return r;if(s)return s;if(f)return`${w}${f}`;const h=Al();if(!NF[h])NF[h]=Ll.homedir();return NF[h]};MW.getHomeDir=zl});var qF=v((VW)=>{Object.defineProperty(VW,"__esModule",{value:!0});VW.getSSOTokenFilepath=void 0;var Cl=import.meta.require("crypto"),Rl=import.meta.require("path"),Pl=aw(),Xl=(r)=>{const f=Cl.createHash("sha1").update(r).digest("hex");return Rl.join(Pl.getHomeDir(),".aws","sso","cache",`${f}.json`)};VW.getSSOTokenFilepath=Xl});var lW=v((DW)=>{Object.defineProperty(DW,"__esModule",{value:!0});DW.getSSOTokenFromFile=void 0;var Yl=import.meta.require("fs"),Kl=qF(),{readFile:Zl}=Yl.promises,Sl=async(r)=>{const s=Kl.getSSOTokenFilepath(r),f=await Zl(s,"utf8");return JSON.parse(f)};DW.getSSOTokenFromFile=Sl});var mF=v((NW)=>{Object.defineProperty(NW,"__esModule",{value:!0});NW.slurpFile=void 0;var Jl=import.meta.require("fs"),{readFile:Ql}=Jl.promises,yF={},Ml=(r,s)=>{if(!yF[r]||(s===null||s===void 0?void 0:s.ignoreCache))yF[r]=Ql(r,"utf8");return yF[r]};NW.slurpFile=Ml});var iF=v((Ifr,I1)=>{var{defineProperty:z$,getOwnPropertyDescriptor:Bl,getOwnPropertyNames:Vl}=Object,Hl=Object.prototype.hasOwnProperty,J0=(r,s)=>z$(r,"name",{value:s,configurable:!0}),Dl=(r,s)=>{for(var f in s)z$(r,f,{get:s[f],enumerable:!0})},jF=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Vl(s))if(!Hl.call(r,h)&&h!==f)z$(r,h,{get:()=>s[h],enumerable:!(w=Bl(s,h))||w.enumerable})}return r},OF=(r,s,f)=>(jF(r,s,"default"),f&&jF(f,s,"default")),kl=(r)=>jF(z$({},"__esModule",{value:!0}),r),E1={};Dl(E1,{CONFIG_PREFIX_SEPARATOR:()=>Tw,DEFAULT_PROFILE:()=>vW,ENV_PROFILE:()=>jW,getProfileName:()=>ll,loadSharedConfigFiles:()=>iW,loadSsoSessionData:()=>gl,parseKnownFiles:()=>el});I1.exports=kl(E1);OF(E1,aw(),I1.exports);var jW="AWS_PROFILE",vW="default",ll=J0((r)=>r.profile||process.env[jW]||vW,"getProfileName");OF(E1,qF(),I1.exports);OF(E1,lW(),I1.exports);var W$=T0(),Nl=J0((r)=>Object.entries(r).filter(([s])=>{const f=s.indexOf(Tw);if(f===-1)return!1;return Object.values(W$.IniSectionType).includes(s.substring(0,f))}).reduce((s,[f,w])=>{const h=f.indexOf(Tw),$=f.substring(0,h)===W$.IniSectionType.PROFILE?f.substring(h+1):f;return s[$]=w,s},{...r.default&&{default:r.default}}),"getConfigData"),A$=import.meta.require("path"),ql=aw(),yl="AWS_CONFIG_FILE",OW=J0(()=>process.env[yl]||A$.join(ql.getHomeDir(),".aws","config"),"getConfigFilepath"),ml=aw(),jl="AWS_SHARED_CREDENTIALS_FILE",vl=J0(()=>process.env[jl]||A$.join(ml.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),Ol=aw(),il=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,dl=["__proto__","profile __proto__"],vF=J0((r)=>{const s={};let f,w;for(let h of r.split(/\r?\n/)){const $=h.split(/(^|\s)[;#]/)[0].trim();if($[0]==="["&&$[$.length-1]==="]"){f=void 0,w=void 0;const I=$.substring(1,$.length-1),F=il.exec(I);if(F){const[,U,,L]=F;if(Object.values(W$.IniSectionType).includes(U))f=[U,L].join(Tw)}else f=I;if(dl.includes(I))throw new Error(`Found invalid profile name "${I}"`)}else if(f){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;s[f]=s[f]||{};const L=w?[w,F].join(Tw):F;s[f][L]=U}}}}return s},"parseIni"),yW=mF(),mW=J0(()=>({}),"swallowError"),Tw=".",iW=J0(async(r={})=>{const{filepath:s=vl(),configFilepath:f=OW()}=r,w=Ol.getHomeDir();let $=s;if(s.startsWith("~/"))$=A$.join(w,s.slice(2));let E=f;if(f.startsWith("~/"))E=A$.join(w,f.slice(2));const I=await Promise.all([yW.slurpFile(E,{ignoreCache:r.ignoreCache}).then(vF).then(Nl).catch(mW),yW.slurpFile($,{ignoreCache:r.ignoreCache}).then(vF).catch(mW)]);return{configFile:I[0],credentialsFile:I[1]}},"loadSharedConfigFiles"),bl=J0((r)=>Object.entries(r).filter(([s])=>s.startsWith(W$.IniSectionType.SSO_SESSION+Tw)).reduce((s,[f,w])=>({...s,[f.substring(f.indexOf(Tw)+1)]:w}),{}),"getSsoSessionData"),cl=mF(),_l=J0(()=>({}),"swallowError"),gl=J0(async(r={})=>cl.slurpFile(r.configFilepath??OW()).then(vF).then(bl).catch(_l),"loadSsoSessionData"),xl=J0((...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"),el=J0(async(r)=>{const s=await iW(r);return xl(s.configFile,s.credentialsFile)},"parseKnownFiles")});var _W=v((Ffr,cW)=>{function dF(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:C$,getOwnPropertyDescriptor:nl,getOwnPropertyNames:ol}=Object,al=Object.prototype.hasOwnProperty,pw=(r,s)=>C$(r,"name",{value:s,configurable:!0}),pl=(r,s)=>{for(var f in s)C$(r,f,{get:s[f],enumerable:!0})},ul=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of ol(s))if(!al.call(r,h)&&h!==f)C$(r,h,{get:()=>s[h],enumerable:!(w=nl(s,h))||w.enumerable})}return r},tl=(r)=>ul(C$({},"__esModule",{value:!0}),r),bW={};pl(bW,{loadConfig:()=>hN});cW.exports=tl(bW);var F1=lF();pw(dF,"getSelectorName");var rN=pw((r,s)=>async()=>{try{const f=r(process.env);if(f===void 0)throw new Error;return f}catch(f){throw new F1.CredentialsProviderError(f.message||`Not found in ENV: ${dF(r.toString())}`,{logger:s})}},"fromEnv"),dW=iF(),fN=pw((r,{preferredFile:s="config",...f}={})=>async()=>{const w=dW.getProfileName(f),{configFile:h,credentialsFile:$}=await dW.loadSharedConfigFiles(f),E=$[w]||{},I=h[w]||{},F=s==="config"?{...E,...I}:{...I,...E};try{const L=r(F,s==="config"?h:$);if(L===void 0)throw new Error;return L}catch(U){throw new F1.CredentialsProviderError(U.message||`Not found in config files w/ profile [${w}]: ${dF(r.toString())}`,{logger:f.logger})}},"fromSharedConfigFiles"),sN=pw((r)=>typeof r==="function","isFunction"),wN=pw((r)=>sN(r)?async()=>await r():F1.fromStatic(r),"fromStatic"),hN=pw(({environmentVariableSelector:r,configFileSelector:s,default:f},w={})=>F1.memoize(F1.chain(rN(r),fN(s,w),wN(f))),"loadConfig")});var aW=v((nW)=>{Object.defineProperty(nW,"__esModule",{value:!0});nW.getEndpointUrlConfig=void 0;var gW=iF(),xW="AWS_ENDPOINT_URL",eW="endpoint_url",$N=(r)=>({environmentVariableSelector:(s)=>{const f=r.split(" ").map(($)=>$.toUpperCase()),w=s[[xW,...f].join("_")];if(w)return w;const h=s[xW];if(h)return h;return},configFileSelector:(s,f)=>{if(f&&s.services){const h=f[["services",s.services].join(gW.CONFIG_PREFIX_SEPARATOR)];if(h){const $=r.split(" ").map((I)=>I.toLowerCase()),E=h[[$.join("_"),eW].join(gW.CONFIG_PREFIX_SEPARATOR)];if(E)return E}}const w=s[eW];if(w)return w;return},default:void 0});nW.getEndpointUrlConfig=$N});var tW=v((pW)=>{Object.defineProperty(pW,"__esModule",{value:!0});pW.getEndpointFromConfig=void 0;var EN=_W(),IN=aW(),FN=async(r)=>EN.loadConfig(IN.getEndpointUrlConfig(r))();pW.getEndpointFromConfig=FN});var wA=v((Tfr,sA)=>{function fA(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:R$,getOwnPropertyDescriptor:UN,getOwnPropertyNames:GN}=Object,TN=Object.prototype.hasOwnProperty,LN=(r,s)=>R$(r,"name",{value:s,configurable:!0}),WN=(r,s)=>{for(var f in s)R$(r,f,{get:s[f],enumerable:!0})},AN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of GN(s))if(!TN.call(r,h)&&h!==f)R$(r,h,{get:()=>s[h],enumerable:!(w=UN(s,h))||w.enumerable})}return r},zN=(r)=>AN(R$({},"__esModule",{value:!0}),r),rA={};WN(rA,{parseQueryString:()=>fA});sA.exports=zN(rA);LN(fA,"parseQueryString")});var IA=v((Lfr,EA)=>{var{defineProperty:P$,getOwnPropertyDescriptor:CN,getOwnPropertyNames:RN}=Object,PN=Object.prototype.hasOwnProperty,XN=(r,s)=>P$(r,"name",{value:s,configurable:!0}),YN=(r,s)=>{for(var f in s)P$(r,f,{get:s[f],enumerable:!0})},KN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of RN(s))if(!PN.call(r,h)&&h!==f)P$(r,h,{get:()=>s[h],enumerable:!(w=CN(s,h))||w.enumerable})}return r},ZN=(r)=>KN(P$({},"__esModule",{value:!0}),r),hA={};YN(hA,{parseUrl:()=>$A});EA.exports=ZN(hA);var SN=wA(),$A=XN((r)=>{if(typeof r==="string")return $A(new URL(r));const{hostname:s,pathname:f,port:w,protocol:h,search:$}=r;let E;if($)E=SN.parseQueryString($);return{hostname:s,port:w?parseInt(w):void 0,protocol:h,path:f,query:E}},"parseUrl")});var cF=v((Wfr,AA)=>{function WA(r,s,f){return{applyToStack:(w)=>{w.add(UA(r,f),TA),w.add(GA(r,s),LA)}}}var{defineProperty:X$,getOwnPropertyDescriptor:JN,getOwnPropertyNames:QN}=Object,MN=Object.prototype.hasOwnProperty,bF=(r,s)=>X$(r,"name",{value:s,configurable:!0}),BN=(r,s)=>{for(var f in s)X$(r,f,{get:s[f],enumerable:!0})},VN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of QN(s))if(!MN.call(r,h)&&h!==f)X$(r,h,{get:()=>s[h],enumerable:!(w=JN(s,h))||w.enumerable})}return r},HN=(r)=>VN(X$({},"__esModule",{value:!0}),r),FA={};BN(FA,{deserializerMiddleware:()=>UA,deserializerMiddlewareOption:()=>TA,getSerdePlugin:()=>WA,serializerMiddleware:()=>GA,serializerMiddlewareOption:()=>LA});AA.exports=HN(FA);var UA=bF((r,s)=>(f)=>async(w)=>{const{response:h}=await f(w);try{const $=await s(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"),GA=bF((r,s)=>(f,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 s(h.input,{...r,endpoint:E});return f({...h,request:I})},"serializerMiddleware"),TA={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},LA={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};bF(WA,"getSerdePlugin")});var ZA=v((Afr,KA)=>{var{defineProperty:K$,getOwnPropertyDescriptor:DN,getOwnPropertyNames:kN}=Object,lN=Object.prototype.hasOwnProperty,o0=(r,s)=>K$(r,"name",{value:s,configurable:!0}),NN=(r,s)=>{for(var f in s)K$(r,f,{get:s[f],enumerable:!0})},qN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of kN(s))if(!lN.call(r,h)&&h!==f)K$(r,h,{get:()=>s[h],enumerable:!(w=DN(s,h))||w.enumerable})}return r},yN=(r)=>qN(K$({},"__esModule",{value:!0}),r),CA={};NN(CA,{endpointMiddleware:()=>XA,endpointMiddlewareOptions:()=>YA,getEndpointFromInstructions:()=>RA,getEndpointPlugin:()=>gN,resolveEndpointConfig:()=>xN,resolveParams:()=>PA,toEndpointV1:()=>_F});KA.exports=yN(CA);var mN=o0(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(dN(s)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!iN(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"),jN=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,vN=/(\d+\.){3}\d+/,ON=/\.\./,iN=o0((r)=>jN.test(r)&&!vN.test(r)&&!ON.test(r),"isDnsCompatibleBucketName"),dN=o0((r)=>{const[s,f,w,,,h]=r.split(":"),$=s==="arn"&&r.split(":").length>=6,E=Boolean($&&f&&w&&h);if($&&!E)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return E},"isArnBucketName"),bN=o0((r,s,f)=>{const w=o0(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:$,hostname:E,port:I,path:F}=h;return`${$}//${E}${I?":"+I:""}${F}`}}return h};return w},"createConfigValueProvider"),cN=tW(),zA=IA(),_F=o0((r)=>{if(typeof r==="object"){if("url"in r)return zA.parseUrl(r.url);return r}return zA.parseUrl(r)},"toEndpointV1"),RA=o0(async(r,s,f,w)=>{if(!f.endpoint){const E=await cN.getEndpointFromConfig(f.serviceId||"");if(E)f.endpoint=()=>Promise.resolve(_F(E))}const h=await PA(r,s,f);if(typeof f.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return f.endpointProvider(h,w)},"getEndpointFromInstructions"),PA=o0(async(r,s,f)=>{var w;const h={},$=((w=s==null?void 0:s.getEndpointParameterInstructions)==null?void 0:w.call(s))||{};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 bN(I.name,E,f)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(I))}if(Object.keys($).length===0)Object.assign(h,f);if(String(f.serviceId).toLowerCase()==="s3")await mN(h);return h},"resolveParams"),Y$=pr(),XA=o0(({config:r,instructions:s})=>{return(f,w)=>async(h)=>{var $,E,I;const F=await RA(h.input,{getEndpointParameterInstructions(){return s}},{...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 L=Y$.getSmithyContext(w),C=(I=L==null?void 0:L.selectedHttpAuthScheme)==null?void 0:I.httpAuthOption;if(C)C.signingProperties=Object.assign(C.signingProperties||{},{signing_region:U.signingRegion,signingRegion:U.signingRegion,signing_service:U.signingName,signingName:U.signingName,signingRegionSet:U.signingRegionSet},U.properties)}return f({...h})}},"endpointMiddleware"),_N=cF(),YA={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:_N.serializerMiddlewareOption.name},gN=o0((r,s)=>({applyToStack:(f)=>{f.addRelativeTo(XA({config:r,instructions:s}),YA)}}),"getEndpointPlugin"),xN=o0((r)=>{const s=r.tls??!0,{endpoint:f}=r,w=f!=null?async()=>_F(await Y$.normalizeProvider(f)()):void 0;return{...r,endpoint:w,tls:s,isCustomEndpoint:!!f,useDualstackEndpoint:Y$.normalizeProvider(r.useDualstackEndpoint??!1),useFipsEndpoint:Y$.normalizeProvider(r.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var Fs=v((zfr,kA)=>{function VA(r){return Object.keys(r).reduce((s,f)=>{const w=r[f];return{...s,[f]:Array.isArray(w)?[...w]:w}},{})}function DA(r){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(r)}var{defineProperty:Z$,getOwnPropertyDescriptor:eN,getOwnPropertyNames:nN}=Object,oN=Object.prototype.hasOwnProperty,Ds=(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})},pN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of nN(s))if(!oN.call(r,h)&&h!==f)Z$(r,h,{get:()=>s[h],enumerable:!(w=eN(s,h))||w.enumerable})}return r},uN=(r)=>pN(Z$({},"__esModule",{value:!0}),r),SA={};aN(SA,{Field:()=>fq,Fields:()=>sq,HttpRequest:()=>wq,HttpResponse:()=>hq,IHttpRequest:()=>JA.HttpRequest,getHttpHandlerExtensionConfiguration:()=>tN,isValidHostname:()=>DA,resolveHttpHandlerRuntimeConfig:()=>rq});kA.exports=uN(SA);var tN=Ds((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"),rq=Ds((r)=>{return{httpHandler:r.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),JA=T0(),QA=class r{constructor({name:s,kind:f=JA.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}};Ds(QA,"Field");var fq=QA,MA=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)}};Ds(MA,"Fields");var sq=MA,BA=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=VA(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)}};Ds(BA,"HttpRequest");var wq=BA;Ds(VA,"cloneQuery");var HA=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"}};Ds(HA,"HttpResponse");var hq=HA;Ds(DA,"isValidHostname")});var gF=v((lA)=>{function Eq(r){return r&&r.__esModule?r:{default:r}}function Iq(){if(S$>J$.length-16)$q.default.randomFillSync(J$),S$=0;return J$.slice(S$,S$+=16)}Object.defineProperty(lA,"__esModule",{value:!0});lA.default=Iq;var $q=Eq(import.meta.require("crypto")),J$=new Uint8Array(256),S$=J$.length});var yA=v((NA)=>{Object.defineProperty(NA,"__esModule",{value:!0});NA.default=void 0;var Uq=/^(?:[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;NA.default=Uq});var U1=v((mA)=>{function Tq(r){return r&&r.__esModule?r:{default:r}}function Lq(r){return typeof r==="string"&&Gq.default.test(r)}Object.defineProperty(mA,"__esModule",{value:!0});mA.default=void 0;var Gq=Tq(yA()),Wq=Lq;mA.default=Wq});var G1=v((OA)=>{function zq(r){return r&&r.__esModule?r:{default:r}}function vA(r,s=0){return vr[r[s+0]]+vr[r[s+1]]+vr[r[s+2]]+vr[r[s+3]]+"-"+vr[r[s+4]]+vr[r[s+5]]+"-"+vr[r[s+6]]+vr[r[s+7]]+"-"+vr[r[s+8]]+vr[r[s+9]]+"-"+vr[r[s+10]]+vr[r[s+11]]+vr[r[s+12]]+vr[r[s+13]]+vr[r[s+14]]+vr[r[s+15]]}function Cq(r,s=0){const f=vA(r,s);if(!Aq.default(f))throw TypeError("Stringified UUID is invalid");return f}Object.defineProperty(OA,"__esModule",{value:!0});OA.default=void 0;OA.unsafeStringify=vA;var Aq=zq(U1()),vr=[];for(let r=0;r<256;++r)vr.push((r+256).toString(16).slice(1));var Rq=Cq;OA.default=Rq});var _A=v((bA)=>{function Kq(r){return r&&r.__esModule?r:{default:r}}function Zq(r,s,f){let w=s&&f||0;const h=s||new Array(16);r=r||{};let $=r.node||dA,E=r.clockseq!==void 0?r.clockseq:xF;if($==null||E==null){const Y=r.random||(r.rng||Xq.default)();if($==null)$=dA=[Y[0]|1,Y[1],Y[2],Y[3],Y[4],Y[5]];if(E==null)E=xF=(Y[6]<<8|Y[7])&16383}let I=r.msecs!==void 0?r.msecs:Date.now(),F=r.nsecs!==void 0?r.nsecs:nF+1;const U=I-eF+(F-nF)/1e4;if(U<0&&r.clockseq===void 0)E=E+1&16383;if((U<0||I>eF)&&r.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");eF=I,nF=F,xF=E,I+=12219292800000;const L=((I&268435455)*1e4+F)%4294967296;h[w++]=L>>>24&255,h[w++]=L>>>16&255,h[w++]=L>>>8&255,h[w++]=L&255;const C=I/4294967296*1e4&268435455;h[w++]=C>>>8&255,h[w++]=C&255,h[w++]=C>>>24&15|16,h[w++]=C>>>16&255,h[w++]=E>>>8|128,h[w++]=E&255;for(let Y=0;Y<6;++Y)h[w+Y]=$[Y];return s||Yq.unsafeStringify(h)}Object.defineProperty(bA,"__esModule",{value:!0});bA.default=void 0;var Xq=Kq(gF()),Yq=G1(),dA,xF,eF=0,nF=0,Sq=Zq;bA.default=Sq});var oF=v((gA)=>{function Qq(r){return r&&r.__esModule?r:{default:r}}function Mq(r){if(!Jq.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(gA,"__esModule",{value:!0});gA.default=void 0;var Jq=Qq(U1()),Bq=Mq;gA.default=Bq});var aF=v((oA)=>{function Dq(r){return r&&r.__esModule?r:{default:r}}function kq(r){r=unescape(encodeURIComponent(r));const s=[];for(let f=0;f<r.length;++f)s.push(r.charCodeAt(f));return s}function lq(r,s,f){function w(h,$,E,I){var F;if(typeof h==="string")h=kq(h);if(typeof $==="string")$=Hq.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=f(U),U[6]=U[6]&15|s,U[8]=U[8]&63|128,E){I=I||0;for(let L=0;L<16;++L)E[I+L]=U[L];return E}return Vq.unsafeStringify(U)}try{w.name=r}catch(h){}return w.DNS=eA,w.URL=nA,w}Object.defineProperty(oA,"__esModule",{value:!0});oA.URL=oA.DNS=void 0;oA.default=lq;var Vq=G1(),Hq=Dq(oF()),eA="6ba7b810-9dad-11d1-80b4-00c04fd430c8";oA.DNS=eA;var nA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";oA.URL=nA});var tA=v((pA)=>{function mq(r){return r&&r.__esModule?r:{default:r}}function jq(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return yq.default.createHash("md5").update(r).digest()}Object.defineProperty(pA,"__esModule",{value:!0});pA.default=void 0;var yq=mq(import.meta.require("crypto")),vq=jq;pA.default=vq});var wz=v((fz)=>{function rz(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(fz,"__esModule",{value:!0});fz.default=void 0;var Oq=rz(aF()),iq=rz(tA()),dq=Oq.default("v3",48,iq.default),bq=dq;fz.default=bq});var Ez=v((hz)=>{function _q(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(hz,"__esModule",{value:!0});hz.default=void 0;var cq=_q(import.meta.require("crypto")),gq={randomUUID:cq.default.randomUUID};hz.default=gq});var Tz=v((Uz)=>{function Fz(r){return r&&r.__esModule?r:{default:r}}function nq(r,s,f){if(Iz.default.randomUUID&&!s&&!r)return Iz.default.randomUUID();r=r||{};const w=r.random||(r.rng||xq.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 eq.unsafeStringify(w)}Object.defineProperty(Uz,"__esModule",{value:!0});Uz.default=void 0;var Iz=Fz(Ez()),xq=Fz(gF()),eq=G1(),oq=nq;Uz.default=oq});var Az=v((Lz)=>{function pq(r){return r&&r.__esModule?r:{default:r}}function uq(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return aq.default.createHash("sha1").update(r).digest()}Object.defineProperty(Lz,"__esModule",{value:!0});Lz.default=void 0;var aq=pq(import.meta.require("crypto")),tq=uq;Lz.default=tq});var Pz=v((Cz)=>{function zz(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(Cz,"__esModule",{value:!0});Cz.default=void 0;var ry=zz(aF()),fy=zz(Az()),sy=ry.default("v5",80,fy.default),wy=sy;Cz.default=wy});var Kz=v((Xz)=>{Object.defineProperty(Xz,"__esModule",{value:!0});Xz.default=void 0;var hy="00000000-0000-0000-0000-000000000000";Xz.default=hy});var Jz=v((Zz)=>{function Ey(r){return r&&r.__esModule?r:{default:r}}function Iy(r){if(!$y.default(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}Object.defineProperty(Zz,"__esModule",{value:!0});Zz.default=void 0;var $y=Ey(U1()),Fy=Iy;Zz.default=Fy});var pF=v((a0)=>{function Us(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(a0,"__esModule",{value:!0});Object.defineProperty(a0,"NIL",{enumerable:!0,get:function(){return Wy.default}});Object.defineProperty(a0,"parse",{enumerable:!0,get:function(){return Ry.default}});Object.defineProperty(a0,"stringify",{enumerable:!0,get:function(){return Cy.default}});Object.defineProperty(a0,"v1",{enumerable:!0,get:function(){return Uy.default}});Object.defineProperty(a0,"v3",{enumerable:!0,get:function(){return Gy.default}});Object.defineProperty(a0,"v4",{enumerable:!0,get:function(){return Ty.default}});Object.defineProperty(a0,"v5",{enumerable:!0,get:function(){return Ly.default}});Object.defineProperty(a0,"validate",{enumerable:!0,get:function(){return zy.default}});Object.defineProperty(a0,"version",{enumerable:!0,get:function(){return Ay.default}});var Uy=Us(_A()),Gy=Us(wz()),Ty=Us(Tz()),Ly=Us(Pz()),Wy=Us(Kz()),Ay=Us(Jz()),zy=Us(U1()),Cy=Us(G1()),Ry=Us(oF())});var Lw=v((lfr,Vz)=>{var{defineProperty:Q$,getOwnPropertyDescriptor:Py,getOwnPropertyNames:Xy}=Object,Yy=Object.prototype.hasOwnProperty,uw=(r,s)=>Q$(r,"name",{value:s,configurable:!0}),Ky=(r,s)=>{for(var f in s)Q$(r,f,{get:s[f],enumerable:!0})},Zy=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Xy(s))if(!Yy.call(r,h)&&h!==f)Q$(r,h,{get:()=>s[h],enumerable:!(w=Py(s,h))||w.enumerable})}return r},Sy=(r)=>Zy(Q$({},"__esModule",{value:!0}),r),Qz={};Ky(Qz,{isClockSkewCorrectedError:()=>Mz,isClockSkewError:()=>Dy,isRetryableByTrait:()=>Hy,isServerError:()=>ly,isThrottlingError:()=>ky,isTransientError:()=>Bz});Vz.exports=Sy(Qz);var Jy=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Qy=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],My=["TimeoutError","RequestTimeout","RequestTimeoutException"],By=[500,502,503,504],Vy=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Hy=uw((r)=>r.$retryable!==void 0,"isRetryableByTrait"),Dy=uw((r)=>Jy.includes(r.name),"isClockSkewError"),Mz=uw((r)=>{var s;return(s=r.$metadata)==null?void 0:s.clockSkewCorrected},"isClockSkewCorrectedError"),ky=uw((r)=>{var s,f;return((s=r.$metadata)==null?void 0:s.httpStatusCode)===429||Qy.includes(r.name)||((f=r.$retryable)==null?void 0:f.throttling)==!0},"isThrottlingError"),Bz=uw((r)=>{var s;return Mz(r)||My.includes(r.name)||Vy.includes((r==null?void 0:r.code)||"")||By.includes(((s=r.$metadata)==null?void 0:s.httpStatusCode)||0)},"isTransientError"),ly=uw((r)=>{var s;if(((s=r.$metadata)==null?void 0:s.httpStatusCode)!==void 0){const f=r.$metadata.httpStatusCode;if(500<=f&&f<=599&&!Bz(r))return!0;return!1}return!1},"isServerError")});var bz=v((Nfr,dz)=>{var{defineProperty:M$,getOwnPropertyDescriptor:Ny,getOwnPropertyNames:qy}=Object,yy=Object.prototype.hasOwnProperty,p0=(r,s)=>M$(r,"name",{value:s,configurable:!0}),my=(r,s)=>{for(var f in s)M$(r,f,{get:s[f],enumerable:!0})},jy=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of qy(s))if(!yy.call(r,h)&&h!==f)M$(r,h,{get:()=>s[h],enumerable:!(w=Ny(s,h))||w.enumerable})}return r},vy=(r)=>jy(M$({},"__esModule",{value:!0}),r),Dz={};my(Dz,{AdaptiveRetryStrategy:()=>_y,ConfiguredRetryStrategy:()=>gy,DEFAULT_MAX_ATTEMPTS:()=>uF,DEFAULT_RETRY_DELAY_BASE:()=>T1,DEFAULT_RETRY_MODE:()=>Oy,DefaultRateLimiter:()=>Nz,INITIAL_RETRY_TOKENS:()=>tF,INVOCATION_ID_HEADER:()=>dy,MAXIMUM_RETRY_DELAY:()=>r5,NO_RETRY_INCREMENT:()=>jz,REQUEST_HEADER:()=>by,RETRY_COST:()=>yz,RETRY_MODES:()=>kz,StandardRetryStrategy:()=>f5,THROTTLING_RETRY_DELAY_BASE:()=>qz,TIMEOUT_RETRY_COST:()=>mz});dz.exports=vy(Dz);var kz=((r)=>{return r.STANDARD="standard",r.ADAPTIVE="adaptive",r})(kz||{}),uF=3,Oy="standard",iy=Lw(),lz=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(),iy.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))}};p0(lz,"DefaultRateLimiter");var Nz=lz,T1=100,r5=20000,qz=500,tF=500,yz=5,mz=10,jz=1,dy="amz-sdk-invocation-id",by="amz-sdk-request",cy=p0(()=>{let r=T1;return{computeNextBackoffDelay:p0((w)=>{return Math.floor(Math.min(r5,Math.random()*2**w*r))},"computeNextBackoffDelay"),setDelayBase:p0((w)=>{r=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),Hz=p0(({retryDelay:r,retryCount:s,retryCost:f})=>{return{getRetryCount:p0(()=>s,"getRetryCount"),getRetryDelay:p0(()=>Math.min(r5,r),"getRetryDelay"),getRetryCost:p0(()=>f,"getRetryCost")}},"createDefaultRetryToken"),vz=class r{constructor(s){this.maxAttempts=s,this.mode="standard",this.capacity=tF,this.retryBackoffStrategy=cy(),this.maxAttemptsProvider=typeof s==="function"?s:async()=>s}async acquireInitialRetryToken(s){return Hz({retryDelay:T1,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"?qz:T1);const $=this.retryBackoffStrategy.computeNextBackoffDelay(s.getRetryCount()),E=f.retryAfterHint?Math.max(f.retryAfterHint.getTime()-Date.now()||0,$):$,I=this.getCapacityCost(h);return this.capacity-=I,Hz({retryDelay:E,retryCount:s.getRetryCount()+1,retryCost:I})}throw new Error("No retry token available")}recordSuccess(s){this.capacity=Math.max(tF,this.capacity+(s.getRetryCost()??jz))}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 ${uF}`),uF}}shouldRetry(s,f,w){return s.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(f.errorType)&&this.isRetryableError(f.errorType)}getCapacityCost(s){return s==="TRANSIENT"?mz:yz}isRetryableError(s){return s==="THROTTLING"||s==="TRANSIENT"}};p0(vz,"StandardRetryStrategy");var f5=vz,Oz=class r{constructor(s,f){this.maxAttemptsProvider=s,this.mode="adaptive";const{rateLimiter:w}=f??{};this.rateLimiter=w??new Nz,this.standardRetryStrategy=new f5(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)}};p0(Oz,"AdaptiveRetryStrategy");var _y=Oz,iz=class r extends f5{constructor(s,f=T1){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}};p0(iz,"ConfiguredRetryStrategy");var gy=iz});var V$=v((qfr,xz)=>{var{defineProperty:B$,getOwnPropertyDescriptor:xy,getOwnPropertyNames:ey}=Object,ny=Object.prototype.hasOwnProperty,Q0=(r,s)=>B$(r,"name",{value:s,configurable:!0}),oy=(r,s)=>{for(var f in s)B$(r,f,{get:s[f],enumerable:!0})},ay=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of ey(s))if(!ny.call(r,h)&&h!==f)B$(r,h,{get:()=>s[h],enumerable:!(w=xy(s,h))||w.enumerable})}return r},py=(r)=>ay(B$({},"__esModule",{value:!0}),r),gz={};oy(gz,{constructStack:()=>s5});xz.exports=py(gz);var Ww=Q0((r,s)=>{const f=[];if(r)f.push(r);if(s)for(let w of s)f.push(w);return f},"getAllAliases"),ks=Q0((r,s)=>{return`${r||"anonymous"}${s&&s.length>0?` (a.k.a. ${s.join(",")})`:""}`},"getMiddlewareNameWithAliases"),s5=Q0(()=>{let r=[],s=[],f=!1;const w=new Set,h=Q0((C)=>C.sort((Y,X)=>cz[X.step]-cz[Y.step]||_z[X.priority||"normal"]-_z[Y.priority||"normal"]),"sort"),$=Q0((C)=>{let Y=!1;const X=Q0((M)=>{const l=Ww(M.name,M.aliases);if(l.includes(C)){Y=!0;for(let q of l)w.delete(q);return!1}return!0},"filterCb");return r=r.filter(X),s=s.filter(X),Y},"removeByName"),E=Q0((C)=>{let Y=!1;const X=Q0((M)=>{if(M.middleware===C){Y=!0;for(let l of Ww(M.name,M.aliases))w.delete(l);return!1}return!0},"filterCb");return r=r.filter(X),s=s.filter(X),Y},"removeByReference"),I=Q0((C)=>{var Y;return r.forEach((X)=>{C.add(X.middleware,{...X})}),s.forEach((X)=>{C.addRelativeTo(X.middleware,{...X})}),(Y=C.identifyOnResolve)==null||Y.call(C,L.identifyOnResolve()),C},"cloneTo"),F=Q0((C)=>{const Y=[];return C.before.forEach((X)=>{if(X.before.length===0&&X.after.length===0)Y.push(X);else Y.push(...F(X))}),Y.push(C),C.after.reverse().forEach((X)=>{if(X.before.length===0&&X.after.length===0)Y.push(X);else Y.push(...F(X))}),Y},"expandRelativeMiddlewareList"),U=Q0((C=!1)=>{const Y=[],X=[],M={};return r.forEach((q)=>{const D={...q,before:[],after:[]};for(let m of Ww(D.name,D.aliases))M[m]=D;Y.push(D)}),s.forEach((q)=>{const D={...q,before:[],after:[]};for(let m of Ww(D.name,D.aliases))M[m]=D;X.push(D)}),X.forEach((q)=>{if(q.toMiddleware){const D=M[q.toMiddleware];if(D===void 0){if(C)return;throw new Error(`${q.toMiddleware} is not found when adding ${ks(q.name,q.aliases)} middleware ${q.relation} ${q.toMiddleware}`)}if(q.relation==="after")D.after.push(q);if(q.relation==="before")D.before.push(q)}}),h(Y).map(F).reduce((q,D)=>{return q.push(...D),q},[])},"getMiddlewareList"),L={add:(C,Y={})=>{const{name:X,override:M,aliases:l}=Y,q={step:"initialize",priority:"normal",middleware:C,...Y},D=Ww(X,l);if(D.length>0){if(D.some((m)=>w.has(m))){if(!M)throw new Error(`Duplicate middleware name '${ks(X,l)}'`);for(let m of D){const p=r.findIndex((Wr)=>{var br;return Wr.name===m||((br=Wr.aliases)==null?void 0:br.some((Iw)=>Iw===m))});if(p===-1)continue;const t=r[p];if(t.step!==q.step||q.priority!==t.priority)throw new Error(`"${ks(t.name,t.aliases)}" middleware with ${t.priority} priority in ${t.step} step cannot be overridden by "${ks(X,l)}" middleware with ${q.priority} priority in ${q.step} step.`);r.splice(p,1)}}for(let m of D)w.add(m)}r.push(q)},addRelativeTo:(C,Y)=>{const{name:X,override:M,aliases:l}=Y,q={middleware:C,...Y},D=Ww(X,l);if(D.length>0){if(D.some((m)=>w.has(m))){if(!M)throw new Error(`Duplicate middleware name '${ks(X,l)}'`);for(let m of D){const p=s.findIndex((Wr)=>{var br;return Wr.name===m||((br=Wr.aliases)==null?void 0:br.some((Iw)=>Iw===m))});if(p===-1)continue;const t=s[p];if(t.toMiddleware!==q.toMiddleware||t.relation!==q.relation)throw new Error(`"${ks(t.name,t.aliases)}" middleware ${t.relation} "${t.toMiddleware}" middleware cannot be overridden by "${ks(X,l)}" middleware ${q.relation} "${q.toMiddleware}" middleware.`);s.splice(p,1)}}for(let m of D)w.add(m)}s.push(q)},clone:()=>I(s5()),use:(C)=>{C.applyToStack(L)},remove:(C)=>{if(typeof C==="string")return $(C);else return E(C)},removeByTag:(C)=>{let Y=!1;const X=Q0((M)=>{const{tags:l,name:q,aliases:D}=M;if(l&&l.includes(C)){const m=Ww(q,D);for(let p of m)w.delete(p);return Y=!0,!1}return!0},"filterCb");return r=r.filter(X),s=s.filter(X),Y},concat:(C)=>{var Y;const X=I(s5());return X.use(C),X.identifyOnResolve(f||X.identifyOnResolve()||(((Y=C.identifyOnResolve)==null?void 0:Y.call(C))??!1)),X},applyToStack:I,identify:()=>{return U(!0).map((C)=>{const Y=C.step??C.relation+" "+C.toMiddleware;return ks(C.name,C.aliases)+" - "+Y})},identifyOnResolve(C){if(typeof C==="boolean")f=C;return f},resolve:(C,Y)=>{for(let X of U().map((M)=>M.middleware).reverse())C=X(C,Y);if(f)console.log(L.identify());return C}};return L},"constructStack"),cz={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},_z={high:3,normal:2,low:1}});var w5=v((yfr,nz)=>{var{defineProperty:H$,getOwnPropertyDescriptor:uy,getOwnPropertyNames:ty}=Object,rm=Object.prototype.hasOwnProperty,fm=(r,s)=>H$(r,"name",{value:s,configurable:!0}),sm=(r,s)=>{for(var f in s)H$(r,f,{get:s[f],enumerable:!0})},wm=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of ty(s))if(!rm.call(r,h)&&h!==f)H$(r,h,{get:()=>s[h],enumerable:!(w=uy(s,h))||w.enumerable})}return r},hm=(r)=>wm(H$({},"__esModule",{value:!0}),r),ez={};sm(ez,{isArrayBuffer:()=>$m});nz.exports=hm(ez);var $m=fm((r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]","isArrayBuffer")});var L1=v((mfr,pz)=>{var{defineProperty:D$,getOwnPropertyDescriptor:Em,getOwnPropertyNames:Im}=Object,Fm=Object.prototype.hasOwnProperty,oz=(r,s)=>D$(r,"name",{value:s,configurable:!0}),Um=(r,s)=>{for(var f in s)D$(r,f,{get:s[f],enumerable:!0})},Gm=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Im(s))if(!Fm.call(r,h)&&h!==f)D$(r,h,{get:()=>s[h],enumerable:!(w=Em(s,h))||w.enumerable})}return r},Tm=(r)=>Gm(D$({},"__esModule",{value:!0}),r),az={};Um(az,{fromArrayBuffer:()=>Wm,fromString:()=>Am});pz.exports=Tm(az);var Lm=w5(),h5=import.meta.require("buffer"),Wm=oz((r,s=0,f=r.byteLength-s)=>{if(!Lm.isArrayBuffer(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return h5.Buffer.from(r,s,f)},"fromArrayBuffer"),Am=oz((r,s)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return s?h5.Buffer.from(r,s):h5.Buffer.from(r)},"fromString")});var rC=v((uz)=>{Object.defineProperty(uz,"__esModule",{value:!0});uz.fromBase64=void 0;var zm=L1(),Cm=/^[A-Za-z0-9+/]*={0,2}$/,Rm=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Cm.exec(r))throw new TypeError("Invalid base64 string.");const s=zm.fromString(r,"base64");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength)};uz.fromBase64=Rm});var ls=v((vfr,hC)=>{var{defineProperty:k$,getOwnPropertyDescriptor:Pm,getOwnPropertyNames:Xm}=Object,Ym=Object.prototype.hasOwnProperty,$5=(r,s)=>k$(r,"name",{value:s,configurable:!0}),Km=(r,s)=>{for(var f in s)k$(r,f,{get:s[f],enumerable:!0})},Zm=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Xm(s))if(!Ym.call(r,h)&&h!==f)k$(r,h,{get:()=>s[h],enumerable:!(w=Pm(s,h))||w.enumerable})}return r},Sm=(r)=>Zm(k$({},"__esModule",{value:!0}),r),fC={};Km(fC,{fromUtf8:()=>wC,toUint8Array:()=>Jm,toUtf8:()=>Qm});hC.exports=Sm(fC);var sC=L1(),wC=$5((r)=>{const s=sC.fromString(r,"utf8");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Jm=$5((r)=>{if(typeof r==="string")return wC(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},"toUint8Array"),Qm=$5((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 sC.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")},"toUtf8")});var IC=v(($C)=>{Object.defineProperty($C,"__esModule",{value:!0});$C.toBase64=void 0;var Mm=L1(),Bm=ls(),Vm=(r)=>{let s;if(typeof r==="string")s=Bm.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 Mm.fromArrayBuffer(s.buffer,s.byteOffset,s.byteLength).toString("base64")};$C.toBase64=Vm});var N$=v((ifr,l$)=>{var{defineProperty:FC,getOwnPropertyDescriptor:Hm,getOwnPropertyNames:Dm}=Object,km=Object.prototype.hasOwnProperty,E5=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Dm(s))if(!km.call(r,h)&&h!==f)FC(r,h,{get:()=>s[h],enumerable:!(w=Hm(s,h))||w.enumerable})}return r},UC=(r,s,f)=>(E5(r,s,"default"),f&&E5(f,s,"default")),lm=(r)=>E5(FC({},"__esModule",{value:!0}),r),I5={};l$.exports=lm(I5);UC(I5,rC(),l$.exports);UC(I5,IC(),l$.exports)});var LC=v((GC)=>{Object.defineProperty(GC,"__esModule",{value:!0});GC.getAwsChunkedEncodingStream=void 0;var Nm=import.meta.require("stream"),qm=(r,s)=>{const{base64Encoder:f,bodyLengthChecker:w,checksumAlgorithmFn:h,checksumLocationName:$,streamHasher:E}=s,I=f!==void 0&&h!==void 0&&$!==void 0&&E!==void 0,F=I?E(h,r):void 0,U=new Nm.Readable({read:()=>{}});return r.on("data",(L)=>{const C=w(L)||0;U.push(`${C.toString(16)}\r\n`),U.push(L),U.push("\r\n")}),r.on("end",async()=>{if(U.push("0\r\n"),I){const L=f(await F);U.push(`${$}:${L}\r\n`),U.push("\r\n")}U.push(null)}),U};GC.getAwsChunkedEncodingStream=qm});var U5=v((bfr,zC)=>{var{defineProperty:q$,getOwnPropertyDescriptor:ym,getOwnPropertyNames:mm}=Object,jm=Object.prototype.hasOwnProperty,F5=(r,s)=>q$(r,"name",{value:s,configurable:!0}),vm=(r,s)=>{for(var f in s)q$(r,f,{get:s[f],enumerable:!0})},Om=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of mm(s))if(!jm.call(r,h)&&h!==f)q$(r,h,{get:()=>s[h],enumerable:!(w=ym(s,h))||w.enumerable})}return r},im=(r)=>Om(q$({},"__esModule",{value:!0}),r),WC={};vm(WC,{escapeUri:()=>AC,escapeUriPath:()=>bm});zC.exports=im(WC);var AC=F5((r)=>encodeURIComponent(r).replace(/[!'()*]/g,dm),"escapeUri"),dm=F5((r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),bm=F5((r)=>r.split("/").map(AC).join("/"),"escapeUriPath")});var T5=v((cfr,PC)=>{function RC(r){const s=[];for(let f of Object.keys(r).sort()){const w=r[f];if(f=G5.escapeUri(f),Array.isArray(w))for(let h=0,$=w.length;h<$;h++)s.push(`${f}=${G5.escapeUri(w[h])}`);else{let h=f;if(w||typeof w==="string")h+=`=${G5.escapeUri(w)}`;s.push(h)}}return s.join("&")}var{defineProperty:y$,getOwnPropertyDescriptor:cm,getOwnPropertyNames:_m}=Object,gm=Object.prototype.hasOwnProperty,xm=(r,s)=>y$(r,"name",{value:s,configurable:!0}),em=(r,s)=>{for(var f in s)y$(r,f,{get:s[f],enumerable:!0})},nm=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of _m(s))if(!gm.call(r,h)&&h!==f)y$(r,h,{get:()=>s[h],enumerable:!(w=cm(s,h))||w.enumerable})}return r},om=(r)=>nm(y$({},"__esModule",{value:!0}),r),CC={};em(CC,{buildQueryString:()=>RC});PC.exports=om(CC);var G5=U5();xm(RC,"buildQueryString")});var yC=v((_fr,qC)=>{async function A5(r,s,f=XC){const w=s.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(XC,f)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout($),I()}),r.on("error",()=>{E=!0,clearTimeout($),I()})})]);if(!E)BC(r,s.body)}function BC(r,s){if(s instanceof MC.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 NC(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 $=new Uint8Array(h);let E=0;for(let I of s)$.set(I,E),E+=I.length;return $}var{create:am,defineProperty:W1,getOwnPropertyDescriptor:pm,getOwnPropertyNames:um,getPrototypeOf:tm}=Object,rj=Object.prototype.hasOwnProperty,Qr=(r,s)=>W1(r,"name",{value:s,configurable:!0}),fj=(r,s)=>{for(var f in s)W1(r,f,{get:s[f],enumerable:!0})},KC=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of um(s))if(!rj.call(r,h)&&h!==f)W1(r,h,{get:()=>s[h],enumerable:!(w=pm(s,h))||w.enumerable})}return r},sj=(r,s,f)=>(f=r!=null?am(tm(r)):{},KC(s||!r||!r.__esModule?W1(f,"default",{value:r,enumerable:!0}):f,r)),wj=(r)=>KC(W1({},"__esModule",{value:!0}),r),ZC={};fj(ZC,{DEFAULT_REQUEST_TIMEOUT:()=>Fj,NodeHttp2Handler:()=>Wj,NodeHttpHandler:()=>Uj,streamCollector:()=>zj});qC.exports=wj(ZC);var SC=Fs(),JC=T5(),L5=import.meta.require("http"),W5=import.meta.require("https"),hj=["ECONNRESET","EPIPE","ETIMEDOUT"],QC=Qr((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"),$j=Qr((r,s,f=0)=>{if(!f)return;const w=setTimeout(()=>{r.destroy(),s(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f);r.on("socket",(h)=>{if(h.connecting)h.on("connect",()=>{clearTimeout(w)});else clearTimeout(w)})},"setConnectionTimeout"),Ej=Qr((r,{keepAlive:s,keepAliveMsecs:f})=>{if(s!==!0)return;r.on("socket",(w)=>{w.setKeepAlive(s,f||0)})},"setSocketKeepAlive"),Ij=Qr((r,s,f=0)=>{r.setTimeout(f,()=>{r.destroy(),s(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),MC=import.meta.require("stream"),XC=1000;Qr(A5,"writeRequestBody");Qr(BC,"writeBody");var Fj=0,VC=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 L=15000;if(Date.now()-L<f)return f;if(I&&F)for(let C in I){const Y=((h=I[C])==null?void 0:h.length)??0,X=(($=F[C])==null?void 0:$.length)??0;if(Y>=U&&X>=2*U)return(E=w==null?void 0:w.warn)==null||E.call(w,`@smithy/node-http-handler:WARN - socket usage at capacity=${Y} and ${X} 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 WU.Agent||typeof($==null?void 0:$.destroy)==="function")return $;return new WU.Agent({keepAlive:!0,maxSockets:50,...$})})(),httpsAgent:(()=>{if(E instanceof zU.Agent||typeof(E==null?void 0:E.destroy)==="function")return E;return new zU.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(i)=>{await E,clearTimeout(w),h(i)},"resolve"),F=Jr(async(i)=>{await E,clearTimeout(w),$(i)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(s==null?void 0:s.aborted){const i=new Error("Request aborted");i.name="AbortError",F(i);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=VW.buildQueryString(f.query||{});let z=void 0;if(f.username!=null||f.password!=null){const i=f.username??"",x=f.password??"";z=`${i}:${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},B=(U?zU.request:WU.request)(Z,(i)=>{const x=new HW.HttpResponse({statusCode:i.statusCode||-1,reason:i.statusMessage,headers:kW(i.headers),body:i});I({response:x})});if(B.on("error",(i)=>{if(kq.includes(i.code))F(Object.assign(i,{name:"TimeoutError"}));else F(i)}),Dq(B,F,this.config.connectionTimeout),yq(B,F,this.config.requestTimeout),s){const i=Jr(()=>{B.destroy();const x=new Error("Request aborted");x.name="AbortError",F(x)},"onAbort");if(typeof s.addEventListener==="function"){const x=s;x.addEventListener("abort",i,{once:!0}),B.once("close",()=>x.removeEventListener("abort",i))}else s.onabort=i}const Q=Z.agent;if(typeof Q==="object"&&"keepAlive"in Q)iq(B,{keepAlive:Q.keepAlive,keepAliveMsecs:Q.keepAliveMsecs});E=SU(B,f,this.config.requestTimeout).catch((i)=>{return clearTimeout(w),$(i)})})}updateHttpClientConfig(f,s){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[f]:s}})}httpHandlerConfigs(){return this.config??{}}};Jr(yW,"NodeHttpHandler");var Nq=yW,QW=import.meta.require("http2"),qq=Hq(import.meta.require("http2")),mW=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(mW,"NodeHttp2ConnectionPool");var vq=mW,NW=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 $=qq.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 vq;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(NW,"NodeHttp2ConnectionManager");var jq=NW,qW=class r{constructor(f){this.metadata={handlerProtocol:"h2"},this.connectionManager=new jq({}),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(lr)=>{await U,$(lr)},"resolve"),L=Jr(async(lr)=>{await U,E(lr)},"reject");if(s==null?void 0:s.aborted){F=!0;const lr=new Error("Request aborted");lr.name="AbortError",L(lr);return}const{hostname:z,method:S,port:Z,protocol:D,query:B}=f;let Q="";if(f.username!=null||f.password!=null){const lr=f.username??"",as=f.password??"";Q=`${lr}:${as}@`}const i=`${D}//${Q}${z}${Z?`:${Z}`:""}`,x={destination:new URL(i)},e=this.connectionManager.lease(x,{requestTimeout:(I=this.config)==null?void 0:I.sessionTimeout,disableConcurrentStreams:h||!1}),hr=Jr((lr)=>{if(h)this.destroySession(e);F=!0,L(lr)},"rejectWithDestroy"),kr=VW.buildQueryString(B||{});let Rw=f.path;if(kr)Rw+=`?${kr}`;if(f.fragment)Rw+=`#${f.fragment}`;const Ks=e.request({...f.headers,[QW.constants.HTTP2_HEADER_PATH]:Rw,[QW.constants.HTTP2_HEADER_METHOD]:S});if(e.ref(),Ks.on("response",(lr)=>{const as=new HW.HttpResponse({statusCode:lr[":status"]||-1,headers:kW(lr),body:Ks});if(F=!0,C({response:as}),h)e.close(),this.connectionManager.deleteSession(i,e)}),w)Ks.setTimeout(w,()=>{Ks.close();const lr=new Error(`Stream timed out because of no activity for ${w} ms`);lr.name="TimeoutError",hr(lr)});if(s){const lr=Jr(()=>{Ks.close();const as=new Error("Request aborted");as.name="AbortError",hr(as)},"onAbort");if(typeof s.addEventListener==="function"){const as=s;as.addEventListener("abort",lr,{once:!0}),Ks.once("close",()=>as.removeEventListener("abort",lr))}else s.onabort=lr}Ks.on("frameError",(lr,as,qk)=>{hr(new Error(`Frame type id ${lr} in stream id ${qk} has failed with code ${as}.`))}),Ks.on("error",hr),Ks.on("aborted",()=>{hr(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Ks.rstCode}.`))}),Ks.on("close",()=>{if(e.unref(),h)e.destroy();if(!F)hr(new Error("Unexpected error: http2 request did not get a response"))}),U=SU(Ks,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(qW,"NodeHttp2Handler");var dq=qW,vW=class r extends DW.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(f,s,w){this.bufferedBytes.push(f),w()}};Jr(vW,"Collector");var Oq=vW,cq=Jr((r)=>{if(bq(r))return jW(r);return new Promise((f,s)=>{const w=new Oq;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"),bq=Jr((r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream,"isReadableStreamInstance");Jr(jW,"collectReadableStream")});var aW=v((H0r,oW)=>{function gW(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 xW(r){const f=await nW(r),s=uq.fromBase64(f);return new Uint8Array(s)}async function eW(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 nW(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:gE,getOwnPropertyDescriptor:gq,getOwnPropertyNames:_q}=Object,xq=Object.prototype.hasOwnProperty,L0=(r,f)=>gE(r,"name",{value:f,configurable:!0}),eq=(r,f)=>{for(var s in f)gE(r,s,{get:f[s],enumerable:!0})},nq=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of _q(f))if(!xq.call(r,h)&&h!==s)gE(r,h,{get:()=>f[h],enumerable:!(w=gq(f,h))||w.enumerable})}return r},oq=(r)=>nq(gE({},"__esModule",{value:!0}),r),bW={};eq(bW,{FetchHttpHandler:()=>pq,keepAliveSupport:()=>bE,streamCollector:()=>tq});oW.exports=oq(bW);var cW=G0(),aq=RU();L0(gW,"requestTimeout");var bE={supported:void 0},_W=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(bE.supported===void 0)bE.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 Q=new Error("Request aborted");return Q.name="AbortError",Promise.reject(Q)}let E=f.path;const I=aq.buildQueryString(f.query||{});if(I)E+=`?${I}`;if(f.fragment)E+=`#${f.fragment}`;let F="";if(f.username!=null||f.password!=null){const Q=f.username??"",i=f.password??"";F=`${Q}:${i}@`}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(bE.supported)S.keepalive=h;let Z=L0(()=>{},"removeSignalEventListener");const D=new Request(L,S),B=[fetch(D).then((Q)=>{const i=Q.headers,x={};for(let hr of i.entries())x[hr[0]]=hr[1];if(Q.body==null)return Q.blob().then((hr)=>({response:new cW.HttpResponse({headers:x,reason:Q.statusText,statusCode:Q.status,body:hr})}));return{response:new cW.HttpResponse({headers:x,reason:Q.statusText,statusCode:Q.status,body:Q.body})}}),gW(w)];if(s)B.push(new Promise((Q,i)=>{const x=L0(()=>{const e=new Error("Request aborted");e.name="AbortError",i(e)},"onAbort");if(typeof s.addEventListener==="function"){const e=s;e.addEventListener("abort",x,{once:!0}),Z=L0(()=>e.removeEventListener("abort",x),"removeSignalEventListener")}else s.onabort=x}));return Promise.race(B).finally(Z)}updateHttpClientConfig(f,s){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return w[f]=s,w})}httpHandlerConfigs(){return this.config??{}}};L0(_W,"FetchHttpHandler");var pq=_W,uq=dE(),tq=L0((r)=>{if(typeof Blob==="function"&&r instanceof Blob)return xW(r);return eW(r)},"streamCollector");L0(xW,"collectBlob");L0(eW,"collectStream");L0(nW,"readToBase64")});var xE=v((V0r,fz)=>{function rz(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 PU)f[s/2]=PU[w];else throw new Error(`Cannot decode unrecognized sequence ${w} as hexadecimal`)}return f}function sz(r){let f="";for(let s=0;s<r.byteLength;s++)f+=tW[r[s]];return f}var{defineProperty:_E,getOwnPropertyDescriptor:rv,getOwnPropertyNames:sv}=Object,fv=Object.prototype.hasOwnProperty,pW=(r,f)=>_E(r,"name",{value:f,configurable:!0}),wv=(r,f)=>{for(var s in f)_E(r,s,{get:f[s],enumerable:!0})},hv=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of sv(f))if(!fv.call(r,h)&&h!==s)_E(r,h,{get:()=>f[h],enumerable:!(w=rv(f,h))||w.enumerable})}return r},$v=(r)=>hv(_E({},"__esModule",{value:!0}),r),uW={};wv(uW,{fromHex:()=>rz,toHex:()=>sz});fz.exports=$v(uW);var tW={},PU={};for(let r=0;r<256;r++){let f=r.toString(16).toLowerCase();if(f.length===1)f=`0${f}`;tW[r]=f,PU[f]=r}pW(rz,"fromHex");pW(sz,"toHex")});var X1=v((wz)=>{Object.defineProperty(wz,"__esModule",{value:!0});wz.isReadableStream=void 0;var Ev=(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)};wz.isReadableStream=Ev});var Tz=v((Fz)=>{Object.defineProperty(Fz,"__esModule",{value:!0});Fz.sdkStreamMixin=void 0;var Iv=aW(),Fv=dE(),Uv=xE(),Tv=j0(),$z=X1(),Ez="The stream has already been transformed.",Gv=(r)=>{var f,s;if(!Iz(r)&&!$z.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(Ez);return w=!0,await Iv.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 Fv.toBase64(I);else if(E==="hex")return Uv.toHex(I);else if(E===void 0||E==="utf8"||E==="utf-8")return Tv.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(Ez);if(w=!0,Iz(r))return $(r);else if($z.isReadableStream(r))return r;else throw new Error(`Cannot transform payload to web stream, got ${r}`)}})};Fz.sdkStreamMixin=Gv;var Iz=(r)=>typeof Blob==="function"&&r instanceof Blob});var Az=v((Cz)=>{Object.defineProperty(Cz,"__esModule",{value:!0});Cz.sdkStreamMixin=void 0;var Cv=OW(),Lv=S1(),XU=import.meta.require("stream"),Av=import.meta.require("util"),Rv=Tz(),Gz="The stream has already been transformed.",Wv=(r)=>{var f,s;if(!(r instanceof XU.Readable))try{return Rv.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(Gz);return w=!0,await Cv.streamCollector(r)};return Object.assign(r,{transformToByteArray:h,transformToString:async($)=>{const E=await h();if($===void 0||Buffer.isEncoding($))return Lv.fromArrayBuffer(E.buffer,E.byteOffset,E.byteLength).toString($);else return new Av.TextDecoder($).decode(E)},transformToWebStream:()=>{if(w)throw new Error(Gz);if(r.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof XU.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,XU.Readable.toWeb(r)}})};Cz.sdkStreamMixin=Wv});var zz=v((Rz)=>{async function zv(r){if(typeof r.stream==="function")r=r.stream();return r.tee()}Object.defineProperty(Rz,"__esModule",{value:!0});Rz.splitStream=void 0;Rz.splitStream=zv});var Yz=v((Pz)=>{async function Xv(r){if(Pv.isReadableStream(r))return Sv.splitStream(r);const f=new Sz.PassThrough,s=new Sz.PassThrough;return r.pipe(f),r.pipe(s),[f,s]}Object.defineProperty(Pz,"__esModule",{value:!0});Pz.splitStream=void 0;var Sz=import.meta.require("stream"),Sv=zz(),Pv=X1();Pz.splitStream=Xv});var lz=v((Kz)=>{async function Yv(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(Kz,"__esModule",{value:!0});Kz.headStream=void 0;Kz.headStream=Yv});var Bz=v((Qz)=>{Object.defineProperty(Qz,"__esModule",{value:!0});Qz.headStream=void 0;var Kv=import.meta.require("stream"),Zv=lz(),lv=X1(),Jv=(r,f)=>{if(lv.isReadableStream(r))return Zv.headStream(r,f);return new Promise((s,w)=>{const h=new Jz;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($)})})};Qz.headStream=Jv;class Jz extends Kv.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 yz=v((v0r,Yw)=>{function kz(r,f="utf-8"){if(f==="base64")return Hz.toBase64(r);return Vz.toUtf8(r)}function Dz(r,f){if(f==="base64")return KU.mutate(Hz.fromBase64(r));return KU.mutate(Vz.fromUtf8(r))}var{defineProperty:eE,getOwnPropertyDescriptor:Qv,getOwnPropertyNames:Mv}=Object,Bv=Object.prototype.hasOwnProperty,ZU=(r,f)=>eE(r,"name",{value:f,configurable:!0}),Hv=(r,f)=>{for(var s in f)eE(r,s,{get:f[s],enumerable:!0})},YU=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Mv(f))if(!Bv.call(r,h)&&h!==s)eE(r,h,{get:()=>f[h],enumerable:!(w=Qv(f,h))||w.enumerable})}return r},Y1=(r,f,s)=>(YU(r,f,"default"),s&&YU(s,f,"default")),Vv=(r)=>YU(eE({},"__esModule",{value:!0}),r),Xw={};Hv(Xw,{Uint8ArrayBlobAdapter:()=>KU});Yw.exports=Vv(Xw);var Hz=dE(),Vz=j0();ZU(kz,"transformToString");ZU(Dz,"transformFromString");var iz=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 kz(this,f)}};ZU(iz,"Uint8ArrayBlobAdapter");var KU=iz;Y1(Xw,SW(),Yw.exports);Y1(Xw,Az(),Yw.exports);Y1(Xw,Yz(),Yw.exports);Y1(Xw,Bz(),Yw.exports);Y1(Xw,X1(),Yw.exports)});var Fh=v((j0r,wS)=>{function nz(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`${hj[w]}, ${F} ${yU[s]} ${f} ${U}:${C}:${L} GMT`}function aE(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(f){return"%"+f.charCodeAt(0).toString(16).toUpperCase()})}function mU(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,qj(w,h,$);else $=f;for(let E of Object.keys($)){if(!Array.isArray($[E])){w[E]=$[E];continue}sS(w,null,$,E)}return w}function fS(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:pE,getOwnPropertyDescriptor:kv,getOwnPropertyNames:Dv}=Object,iv=Object.prototype.hasOwnProperty,q=(r,f)=>pE(r,"name",{value:f,configurable:!0}),yv=(r,f)=>{for(var s in f)pE(r,s,{get:f[s],enumerable:!0})},mv=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Dv(f))if(!iv.call(r,h)&&h!==s)pE(r,h,{get:()=>f[h],enumerable:!(w=kv(f,h))||w.enumerable})}return r},Nv=(r)=>mv(pE({},"__esModule",{value:!0}),r),Nz={};yv(Nz,{Client:()=>vv,Command:()=>Oz,LazyJsonString:()=>yj,NoOpLogger:()=>qv,SENSITIVE_STRING:()=>Ov,ServiceException:()=>Kj,StringWrapper:()=>Q1,_json:()=>VU,collectBody:()=>jv,convertMap:()=>mj,createAggregatedClient:()=>cv,dateToUtcString:()=>nz,decorateServiceException:()=>az,emitWarningIfUnsupportedVersion:()=>Qj,expectBoolean:()=>gv,expectByte:()=>HU,expectFloat32:()=>nE,expectInt:()=>xv,expectInt32:()=>MU,expectLong:()=>l1,expectNonNull:()=>nv,expectNumber:()=>Z1,expectObject:()=>bz,expectShort:()=>BU,expectString:()=>ov,expectUnion:()=>av,extendedEncodeURIComponent:()=>aE,getArrayIfSingleItem:()=>ij,getDefaultClientConfiguration:()=>kj,getDefaultExtensionConfiguration:()=>uz,getValueFromTextNode:()=>tz,handleFloat:()=>tv,limitedParseDouble:()=>iU,limitedParseFloat:()=>rj,limitedParseFloat32:()=>sj,loadConfigsForDefaultMode:()=>Jj,logger:()=>J1,map:()=>mU,parseBoolean:()=>bv,parseEpochTimestamp:()=>Lj,parseRfc3339DateTime:()=>Ej,parseRfc3339DateTimeWithOffset:()=>Fj,parseRfc7231DateTime:()=>Cj,resolveDefaultRuntimeConfig:()=>Dj,resolvedPath:()=>dj,serializeDateTime:()=>cj,serializeFloat:()=>Oj,splitEvery:()=>fS,strictParseByte:()=>ez,strictParseDouble:()=>DU,strictParseFloat:()=>pv,strictParseFloat32:()=>gz,strictParseInt:()=>fj,strictParseInt32:()=>wj,strictParseLong:()=>xz,strictParseShort:()=>$h,take:()=>Nj,throwDefaultError:()=>pz,withBaseException:()=>Zj});wS.exports=Nv(Nz);var qz=class r{trace(){}debug(){}info(){}warn(){}error(){}};q(qz,"NoOpLogger");var qv=qz,vz=uR(),jz=class r{constructor(f){this.middlewareStack=vz.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(jz,"Client");var vv=jz,lU=yz(),jv=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"),QU=Is(),dz=class r{constructor(){this.middlewareStack=vz.constructStack()}static classBuilder(){return new dv}resolveMiddlewareWithContext(f,s,w,{middlewareFn:h,clientName:$,commandName:E,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,smithyContext:U,additionalContext:C,CommandCtor:L}){for(let B of h.bind(this)(L,f,s,w))this.middlewareStack.use(B);const z=f.concat(this.middlewareStack),{logger:S}=s,Z={logger:S,clientName:$,commandName:E,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,[QU.SMITHY_CONTEXT_KEY]:{commandInstance:this,...U},...C},{requestHandler:D}=s;return z.resolve((B)=>D.handle(B.request,w||{}),Z)}};q(dz,"Command");var Oz=dz,cz=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(cz,"ClassBuilder");var dv=cz,Ov="***SensitiveInformation***",cv=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"),bv=q((r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},"parseBoolean"),gv=q((r)=>{if(r===null||r===void 0)return;if(typeof r==="number"){if(r===0||r===1)J1.warn(oE(`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(oE(`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"),Z1=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(oE(`Expected number but observed string: ${r}`));return f}}if(typeof r==="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)},"expectNumber"),_v=Math.ceil(340282346638528860000000000000000000000),nE=q((r)=>{const f=Z1(r);if(f!==void 0&&!Number.isNaN(f)&&f!==1/0&&f!==-1/0){if(Math.abs(f)>_v)throw new TypeError(`Expected 32-bit float, got ${r}`)}return f},"expectFloat32"),l1=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"),xv=l1,MU=q((r)=>kU(r,32),"expectInt32"),BU=q((r)=>kU(r,16),"expectShort"),HU=q((r)=>kU(r,8),"expectByte"),kU=q((r,f)=>{const s=l1(r);if(s!==void 0&&ev(s,f)!==s)throw new TypeError(`Expected ${f}-bit integer, got ${r}`);return s},"expectSizedInt"),ev=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"),nv=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"),bz=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"),ov=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(oE(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)},"expectString"),av=q((r)=>{if(r===null||r===void 0)return;const f=bz(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"),DU=q((r)=>{if(typeof r=="string")return Z1(Ih(r));return Z1(r)},"strictParseDouble"),pv=DU,gz=q((r)=>{if(typeof r=="string")return nE(Ih(r));return nE(r)},"strictParseFloat32"),uv=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Ih=q((r)=>{const f=r.match(uv);if(f===null||f[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},"parseNumber"),iU=q((r)=>{if(typeof r=="string")return _z(r);return Z1(r)},"limitedParseDouble"),tv=iU,rj=iU,sj=q((r)=>{if(typeof r=="string")return _z(r);return nE(r)},"limitedParseFloat32"),_z=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"),xz=q((r)=>{if(typeof r==="string")return l1(Ih(r));return l1(r)},"strictParseLong"),fj=xz,wj=q((r)=>{if(typeof r==="string")return MU(Ih(r));return MU(r)},"strictParseInt32"),$h=q((r)=>{if(typeof r==="string")return BU(Ih(r));return BU(r)},"strictParseShort"),ez=q((r)=>{if(typeof r==="string")return HU(Ih(r));return HU(r)},"strictParseByte"),oE=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},hj=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],yU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];q(nz,"dateToUtcString");var $j=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ej=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=$j.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,$,E,I,F,U]=f,C=$h(Eh(w)),L=kf(h,"month",1,12),z=kf($,"day",1,31);return K1(C,L,z,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U})},"parseRfc3339DateTime"),Ij=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Fj=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=Ij.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,$,E,I,F,U,C]=f,L=$h(Eh(w)),z=kf(h,"month",1,12),S=kf($,"day",1,31),Z=K1(L,z,S,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U});if(C.toUpperCase()!="Z")Z.setTime(Z.getTime()-Yj(C));return Z},"parseRfc3339DateTimeWithOffset"),Uj=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$/),Tj=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$/),Gj=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})$/),Cj=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=Uj.exec(r);if(f){const[s,w,h,$,E,I,F,U]=f;return K1($h(Eh($)),JU(h),kf(w,"day",1,31),{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U})}if(f=Tj.exec(r),f){const[s,w,h,$,E,I,F,U]=f;return Wj(K1(Aj($),JU(h),kf(w,"day",1,31),{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U}))}if(f=Gj.exec(r),f){const[s,w,h,$,E,I,F,U]=f;return K1($h(Eh(U)),JU(w),kf(h.trimLeft(),"day",1,31),{hours:$,minutes:E,seconds:I,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),Lj=q((r)=>{if(r===null||r===void 0)return;let f;if(typeof r==="number")f=r;else if(typeof r==="string")f=DU(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"),K1=q((r,f,s,w)=>{const h=f-1;return Sj(r,h,s),new Date(Date.UTC(r,h,s,kf(w.hours,"hour",0,23),kf(w.minutes,"minute",0,59),kf(w.seconds,"seconds",0,60),Xj(w.fractionalMilliseconds)))},"buildDate"),Aj=q((r)=>{const f=new Date().getUTCFullYear(),s=Math.floor(f/100)*100+$h(Eh(r));if(s<f)return s+100;return s},"parseTwoDigitYear"),Rj=1576800000000,Wj=q((r)=>{if(r.getTime()-new Date().getTime()>Rj)return new Date(Date.UTC(r.getUTCFullYear()-100,r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()));return r},"adjustRfc850Year"),JU=q((r)=>{const f=yU.indexOf(r);if(f<0)throw new TypeError(`Invalid month: ${r}`);return f+1},"parseMonthByShortName"),zj=[31,28,31,30,31,30,31,31,30,31,30,31],Sj=q((r,f,s)=>{let w=zj[f];if(f===1&&Pj(r))w=29;if(s>w)throw new TypeError(`Invalid day for ${yU[f]} in ${r}: ${s}`)},"validateDayOfMonth"),Pj=q((r)=>{return r%4===0&&(r%100!==0||r%400===0)},"isLeapYear"),kf=q((r,f,s,w)=>{const h=ez(Eh(r));if(h<s||h>w)throw new TypeError(`${f} must be between ${s} and ${w}, inclusive`);return h},"parseDateValue"),Xj=q((r)=>{if(r===null||r===void 0)return 0;return gz("0."+r)*1000},"parseMilliseconds"),Yj=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"),Eh=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"),oz=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(oz,"ServiceException");var Kj=oz,az=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"),pz=q(({output:r,parsedBody:f,exceptionCtor:s,errorCode:w})=>{const h=lj(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 az(E,f)},"throwDefaultError"),Zj=q((r)=>{return({output:f,parsedBody:s,errorCode:w})=>{pz({output:f,parsedBody:s,exceptionCtor:r,errorCode:w})}},"withBaseException"),lj=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"),Jj=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"),mz=!1,Qj=q((r)=>{if(r&&!mz&&parseInt(r.substring(1,r.indexOf(".")))<16)mz=!0},"emitWarningIfUnsupportedVersion"),Mj=q((r)=>{const f=[];for(let s in QU.AlgorithmId){const w=QU.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"),Bj=q((r)=>{const f={};return r.checksumAlgorithms().forEach((s)=>{f[s.algorithmId()]=s.checksumConstructor()}),f},"resolveChecksumRuntimeConfig"),Hj=q((r)=>{let f=r.retryStrategy;return{setRetryStrategy(s){f=s},retryStrategy(){return f}}},"getRetryConfiguration"),Vj=q((r)=>{const f={};return f.retryStrategy=r.retryStrategy(),f},"resolveRetryRuntimeConfig"),uz=q((r)=>{return{...Mj(r),...Hj(r)}},"getDefaultExtensionConfiguration"),kj=uz,Dj=q((r)=>{return{...Bj(r),...Vj(r)}},"resolveDefaultRuntimeConfig");q(aE,"extendedEncodeURIComponent");var ij=q((r)=>Array.isArray(r)?r:[r],"getArrayIfSingleItem"),tz=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]=tz(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 rS=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(rS,"LazyJsonString");var yj=rS;q(mU,"map");var mj=q((r)=>{const f={};for(let[s,w]of Object.entries(r||{}))f[s]=[,w];return f},"convertMap"),Nj=q((r,f)=>{const s={};for(let w in f)sS(s,r,f,w);return s},"take"),qj=q((r,f,s)=>{return mU(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"),sS=q((r,f,s,w)=>{if(f!==null){let E=s[w];if(typeof E==="function")E=[,E];const[I=vj,F=jj,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"),vj=q((r)=>r!=null,"nonNullish"),jj=q((r)=>r,"pass"),dj=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)=>aE(I)).join("/"):aE(E))}else throw new Error("No value provided for input HTTP label: "+s+".");return r},"resolvedPath"),Oj=q((r)=>{if(r!==r)return"NaN";switch(r){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return r}},"serializeFloat"),cj=q((r)=>r.toISOString().replace(".000Z","Z"),"serializeDateTime"),VU=q((r)=>{if(r==null)return{};if(Array.isArray(r))return r.filter((f)=>f!=null).map(VU);if(typeof r==="object"){const f={};for(let s of Object.keys(r)){if(r[s]==null)continue;f[s]=VU(r[s])}return f}return r},"_json");q(fS,"splitEvery")});var ES=v((hS)=>{Object.defineProperty(hS,"__esModule",{value:!0});hS.isStreamingPayload=void 0;var bj=import.meta.require("stream"),gj=(r)=>(r===null||r===void 0?void 0:r.body)instanceof bj.Readable||typeof ReadableStream!=="undefined"&&(r===null||r===void 0?void 0:r.body)instanceof ReadableStream;hS.isStreamingPayload=gj});var lS=v((c0r,ZS)=>{var{defineProperty:uE,getOwnPropertyDescriptor:_j,getOwnPropertyNames:xj}=Object,ej=Object.prototype.hasOwnProperty,Dr=(r,f)=>uE(r,"name",{value:f,configurable:!0}),nj=(r,f)=>{for(var s in f)uE(r,s,{get:f[s],enumerable:!0})},oj=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of xj(f))if(!ej.call(r,h)&&h!==s)uE(r,h,{get:()=>f[h],enumerable:!(w=_j(f,h))||w.enumerable})}return r},aj=(r)=>oj(uE({},"__esModule",{value:!0}),r),FS={};nj(FS,{AdaptiveRetryStrategy:()=>tj,CONFIG_MAX_ATTEMPTS:()=>qU,CONFIG_RETRY_MODE:()=>zS,ENV_MAX_ATTEMPTS:()=>NU,ENV_RETRY_MODE:()=>WS,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>rd,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>fd,StandardRetryStrategy:()=>AS,defaultDelayDecider:()=>TS,defaultRetryDecider:()=>GS,getOmitRetryHeadersPlugin:()=>wd,getRetryAfterHint:()=>KS,getRetryPlugin:()=>Ud,omitRetryHeadersMiddleware:()=>SS,omitRetryHeadersMiddlewareOptions:()=>PS,resolveRetryConfig:()=>sd,retryMiddleware:()=>XS,retryMiddlewareOptions:()=>YS});ZS.exports=aj(FS);var Uh=G0(),US=rU(),Kr=eR(),pj=Dr((r,f)=>{const s=r,w=(f==null?void 0:f.noRetryIncrement)??Kr.NO_RETRY_INCREMENT,h=(f==null?void 0:f.retryCost)??Kr.RETRY_COST,$=(f==null?void 0:f.timeoutRetryCost)??Kr.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"),TS=Dr((r,f)=>Math.floor(Math.min(Kr.MAXIMUM_RETRY_DELAY,Math.random()*2**f*r)),"defaultDelayDecider"),d0=sU(),GS=Dr((r)=>{if(!r)return!1;return d0.isRetryableByTrait(r)||d0.isClockSkewError(r)||d0.isThrottlingError(r)||d0.isTransientError(r)},"defaultRetryDecider"),CS=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"),LS=class r{constructor(f,s){this.maxAttemptsProvider=f,this.mode=Kr.RETRY_MODES.STANDARD,this.retryDecider=(s==null?void 0:s.retryDecider)??GS,this.delayDecider=(s==null?void 0:s.delayDecider)??TS,this.retryQuota=(s==null?void 0:s.retryQuota)??pj(Kr.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=Kr.DEFAULT_MAX_ATTEMPTS}return f}async retry(f,s,w){let h,$=0,E=0;const I=await this.getMaxAttempts(),{request:F}=s;if(Uh.HttpRequest.isInstance(F))F.headers[Kr.INVOCATION_ID_HEADER]=US.v4();while(!0)try{if(Uh.HttpRequest.isInstance(F))F.headers[Kr.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=CS(U);if($++,this.shouldRetry(C,$,I)){h=this.retryQuota.retrieveRetryTokens(C);const L=this.delayDecider(d0.isThrottlingError(C)?Kr.THROTTLING_RETRY_DELAY_BASE:Kr.DEFAULT_RETRY_DELAY_BASE,$),z=uj(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(LS,"StandardRetryStrategy");var AS=LS,uj=Dr((r)=>{if(!Uh.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"),RS=class r extends AS{constructor(f,s){const{rateLimiter:w,...h}=s??{};super(f,h);this.rateLimiter=w??new Kr.DefaultRateLimiter,this.mode=Kr.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(RS,"AdaptiveRetryStrategy");var tj=RS,IS=G1(),NU="AWS_MAX_ATTEMPTS",qU="max_attempts",rd={environmentVariableSelector:(r)=>{const f=r[NU];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Environment variable ${NU} mast be a number, got "${f}"`);return s},configFileSelector:(r)=>{const f=r[qU];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Shared config file entry ${qU} mast be a number, got "${f}"`);return s},default:Kr.DEFAULT_MAX_ATTEMPTS},sd=Dr((r)=>{const{retryStrategy:f}=r,s=IS.normalizeProvider(r.maxAttempts??Kr.DEFAULT_MAX_ATTEMPTS);return{...r,maxAttempts:s,retryStrategy:async()=>{if(f)return f;if(await IS.normalizeProvider(r.retryMode)()===Kr.RETRY_MODES.ADAPTIVE)return new Kr.AdaptiveRetryStrategy(s);return new Kr.StandardRetryStrategy(s)}}},"resolveRetryConfig"),WS="AWS_RETRY_MODE",zS="retry_mode",fd={environmentVariableSelector:(r)=>r[WS],configFileSelector:(r)=>r[zS],default:Kr.DEFAULT_RETRY_MODE},SS=Dr(()=>(r)=>async(f)=>{const{request:s}=f;if(Uh.HttpRequest.isInstance(s))delete s.headers[Kr.INVOCATION_ID_HEADER],delete s.headers[Kr.REQUEST_HEADER];return r(f)},"omitRetryHeadersMiddleware"),PS={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},wd=Dr((r)=>({applyToStack:(f)=>{f.addRelativeTo(SS(),PS)}}),"getOmitRetryHeadersPlugin"),hd=Fh(),$d=ES(),XS=Dr((r)=>(f,s)=>async(w)=>{var h;let $=await r.retryStrategy();const E=await r.maxAttempts();if(Ed($)){$=$;let I=await $.acquireInitialRetryToken(s.partition_id),F=new Error,U=0,C=0;const{request:L}=w,z=Uh.HttpRequest.isInstance(L);if(z)L.headers[Kr.INVOCATION_ID_HEADER]=US.v4();while(!0)try{if(z)L.headers[Kr.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=Id(S);if(F=CS(S),z&&$d.isStreamingPayload(L))throw(h=s.logger instanceof hd.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(B){if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=U+1,F.$metadata.totalRetryDelay=C,F}U=I.getRetryCount();const D=I.getRetryDelay();C+=D,await new Promise((B)=>setTimeout(B,D))}}else{if($=$,$==null?void 0:$.mode)s.userAgent=[...s.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(f,w)}},"retryMiddleware"),Ed=Dr((r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined","isRetryStrategyV2"),Id=Dr((r)=>{const f={error:r,errorType:Fd(r)},s=KS(r.$response);if(s)f.retryAfterHint=s;return f},"getRetryErrorInfo"),Fd=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"),YS={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Ud=Dr((r)=>({applyToStack:(f)=>{f.add(XS(r),YS)}}),"getRetryPlugin"),KS=Dr((r)=>{if(!Uh.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 Or=v((b0r,bS)=>{function MS(r){const f=new Map;for(let s of r)f.set(s.schemeId,s);return f}function jS(r,f){return new OS(r,f)}function cS(r,f,s,w,h){return zr(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 id(f,E.client,I,...F);else throw new Error(`Invalid client, expected instance of ${r.name}`);yield L;const z=U;U=yd(L,w),C=!!(U&&(!E.stopOnSameToken||U!==z))}return},"paginateOperation")}var{defineProperty:r3,getOwnPropertyDescriptor:Td,getOwnPropertyNames:Gd}=Object,Cd=Object.prototype.hasOwnProperty,zr=(r,f)=>r3(r,"name",{value:f,configurable:!0}),Ld=(r,f)=>{for(var s in f)r3(r,s,{get:f[s],enumerable:!0})},Ad=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Gd(f))if(!Cd.call(r,h)&&h!==s)r3(r,h,{get:()=>f[h],enumerable:!(w=Td(f,h))||w.enumerable})}return r},Rd=(r)=>Ad(r3({},"__esModule",{value:!0}),r),JS={};Ld(JS,{DefaultIdentityProviderConfig:()=>ld,EXPIRATION_MS:()=>qS,HttpApiKeyAuthSigner:()=>Jd,HttpBearerAuthSigner:()=>Qd,NoAuthSigner:()=>Md,RequestBuilder:()=>OS,createIsIdentityExpiredFunction:()=>NS,createPaginator:()=>cS,doesIdentityRequireRefresh:()=>vS,getHttpAuthSchemeEndpointRuleSetPlugin:()=>zd,getHttpAuthSchemePlugin:()=>Pd,getHttpSigningPlugin:()=>Zd,getSmithyContext:()=>Vd,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>BS,httpAuthSchemeMiddleware:()=>vU,httpAuthSchemeMiddlewareOptions:()=>HS,httpSigningMiddleware:()=>VS,httpSigningMiddlewareOptions:()=>kS,isIdentityExpired:()=>Bd,memoizeIdentityProvider:()=>Hd,normalizeProvider:()=>kd,requestBuilder:()=>jS});bS.exports=Rd(JS);var QS=G1();zr(MS,"convertHttpAuthSchemesToMap");var vU=zr((r,f)=>(s,w)=>async(h)=>{var $;const E=r.httpAuthSchemeProvider(await f.httpAuthSchemeParametersProvider(r,w,h.input)),I=MS(r.httpAuthSchemes),F=QS.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"),Wd=MA(),BS={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Wd.endpointMiddlewareOptions.name},zd=zr((r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s})=>({applyToStack:(w)=>{w.addRelativeTo(vU(r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s}),BS)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Sd=xF(),HS={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Sd.serializerMiddlewareOption.name},Pd=zr((r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s})=>({applyToStack:(w)=>{w.addRelativeTo(vU(r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s}),HS)}}),"getHttpAuthSchemePlugin"),s3=G0(),Xd=zr((r)=>(f)=>{throw f},"defaultErrorHandler"),Yd=zr((r,f)=>{},"defaultSuccessHandler"),VS=zr((r)=>(f,s)=>async(w)=>{if(!s3.HttpRequest.isInstance(w.request))return f(w);const $=QS.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||Xd)(E));return(F.successHandler||Yd)(U.response,E),U},"httpSigningMiddleware"),Kd=lS(),kS={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:Kd.retryMiddlewareOptions.name},Zd=zr((r)=>({applyToStack:(f)=>{f.addRelativeTo(VS(r),kS)}}),"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)}};zr(DS,"DefaultIdentityProviderConfig");var ld=DS,tE=Is(),iS=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=s3.HttpRequest.clone(f);if(w.in===tE.HttpApiKeyAuthLocation.QUERY)h.query[w.name]=s.apiKey;else if(w.in===tE.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}};zr(iS,"HttpApiKeyAuthSigner");var Jd=iS,yS=class r{async sign(f,s,w){const h=s3.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}};zr(yS,"HttpBearerAuthSigner");var Qd=yS,mS=class r{async sign(f,s,w){return f}};zr(mS,"NoAuthSigner");var Md=mS,NS=zr((r)=>(f)=>vS(f)&&f.expiration.getTime()-Date.now()<r,"createIsIdentityExpiredFunction"),qS=300000,Bd=NS(qS),vS=zr((r)=>r.expiration!==void 0,"doesIdentityRequireRefresh"),Hd=zr((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=zr(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"),Vd=zr((r)=>r[tE.SMITHY_CONTEXT_KEY]||(r[tE.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),kd=zr((r)=>{if(typeof r==="function")return r;const f=Promise.resolve(r);return()=>f},"normalizeProvider"),Dd=Fh();zr(jS,"requestBuilder");var dS=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 s3.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=Dd.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}};zr(dS,"RequestBuilder");var OS=dS,id=zr(async(r,f,s,...w)=>{return await f.send(new r(s),...w)},"makePagedClientRequest");zr(cS,"createPaginator");var yd=zr((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 md(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(gS)===-1)try{const E=r(h);w.headers={...w.headers,[gS]:String(E)}}catch(E){}}return f({...s,request:w})}}var gS="content-length",Nd,Df=(r)=>({applyToStack:(f)=>{f.add(md(r.bodyLengthChecker),Nd)}});var Th=G(()=>{ir();Nd={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var _S=async(r)=>{const f=r?.Bucket||"";if(typeof r.Bucket==="string")r.Bucket=f.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Od(f)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!dd(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},qd,vd,jd,dd=(r)=>qd.test(r)&&!vd.test(r)&&!jd.test(r),Od=(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 xS=G(()=>{qd=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,vd=/(\d+\.){3}\d+/,jd=/\.\./});var eS=G(()=>{xS()});var nS=(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};var Vs;var M1=G(()=>{Vs=class Vs extends Error{constructor(r,f=!0){let s,w=!0;if(typeof f==="boolean")s=void 0,w=f;else if(f!=null&&typeof f==="object")s=f.logger,w=f.tryNextLink??!0;super(r);this.name="ProviderError",this.tryNextLink=w,Object.setPrototypeOf(this,Vs.prototype),s?.debug?.(`@smithy/property-provider ${w?"->":"(!)"} ${r}`)}static from(r,f=!0){return Object.assign(new this(r.message,f),r)}}});var _;var oS=G(()=>{M1();_=class _ extends Vs{constructor(r,f=!0){super(r,f);this.name="CredentialsProviderError",Object.setPrototypeOf(this,_.prototype)}}});var Fs;var aS=G(()=>{M1();Fs=class Fs extends Vs{constructor(r,f=!0){super(r,f);this.name="TokenProviderError",Object.setPrototypeOf(this,Fs.prototype)}}});var A0=(...r)=>async()=>{if(r.length===0)throw new Vs("No providers in chain");let f;for(let s of r)try{return await s()}catch(w){if(f=w,w?.tryNextLink)continue;throw w}throw f};var pS=G(()=>{M1()});var uS=(r)=>()=>Promise.resolve(r);var Kw=(r,f,s)=>{let w,h,$,E=!1;const I=async()=>{if(!h)h=r();try{w=await h,$=!0,E=!1}finally{h=void 0}return w};if(f===void 0)return async(F)=>{if(!$||F?.forceRefresh)w=await I();return w};return async(F)=>{if(!$||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}};var Lr=G(()=>{oS();M1();aS();pS()});function f3(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 tS=(r,f)=>async()=>{try{const s=r(process.env);if(s===void 0)throw new Error;return s}catch(s){throw new _(s.message||`Not found in ENV: ${f3(r.toString())}`,{logger:f})}};var rP=G(()=>{Lr()});import{homedir as cd}from"os";import{sep as bd}from"path";var jU,gd=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},O0=()=>{const{HOME:r,USERPROFILE:f,HOMEPATH:s,HOMEDRIVE:w=`C:${bd}`}=process.env;if(r)return r;if(f)return f;if(s)return`${w}${s}`;const h=gd();if(!jU[h])jU[h]=cd();return jU[h]};var Gh=G(()=>{jU={}});var sP="AWS_PROFILE",ks=(r)=>r.profile||process.env.AWS_PROFILE||"default";import{createHash as _d}from"crypto";import{join as xd}from"path";var w3=(r)=>{const s=_d("sha1").update(r).digest("hex");return xd(O0(),".aws","sso","cache",`${s}.json`)};var dU=G(()=>{Gh()});import{promises as ed}from"fs";var nd,h3=async(r)=>{const f=w3(r),s=await nd(f,"utf8");return JSON.parse(s)};var fP=G(()=>{dU();({readFile:nd}=ed)});var OU,wP=(r)=>Object.entries(r).filter(([f])=>{const s=f.indexOf(Ds);if(s===-1)return!1;return Object.values(OU.IniSectionType).includes(f.substring(0,s))}).reduce((f,[s,w])=>{const h=s.indexOf(Ds),$=s.substring(0,h)===OU.IniSectionType.PROFILE?s.substring(h+1):s;return f[$]=w,f},{...r.default&&{default:r.default}});var hP=G(()=>{OU=u(Is(),1);Ch()});import{join as od}from"path";var ad="AWS_CONFIG_FILE",$3=()=>process.env[ad]||od(O0(),".aws","config");var cU=G(()=>{Gh()});import{join as pd}from"path";var ud="AWS_SHARED_CREDENTIALS_FILE",$P=()=>process.env[ud]||pd(O0(),".aws","credentials");var EP=G(()=>{Gh()});var IP,td,rO,B1=(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=td.exec(I);if(F){const[,U,,C]=F;if(Object.values(IP.IniSectionType).includes(U))s=[U,C].join(Ds)}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(Ds):F;f[s][C]=U}}}}return f};var bU=G(()=>{IP=u(Is(),1);Ch();td=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,rO=["__proto__","profile __proto__"]});import{promises as sO}from"fs";var fO,gU,H1=(r,f)=>{if(!gU[r]||f?.ignoreCache)gU[r]=fO(r,"utf8");return gU[r]};var _U=G(()=>{({readFile:fO}=sO),gU={}});import{join as FP}from"path";var UP=()=>({}),Ds=".",E3=async(r={})=>{const{filepath:f=$P(),configFilepath:s=$3()}=r,w=O0();let $=f;if(f.startsWith("~/"))$=FP(w,f.slice(2));let E=s;if(s.startsWith("~/"))E=FP(w,s.slice(2));const I=await Promise.all([H1(E,{ignoreCache:r.ignoreCache}).then(B1).then(wP).catch(UP),H1($,{ignoreCache:r.ignoreCache}).then(B1).catch(UP)]);return{configFile:I[0],credentialsFile:I[1]}};var Ch=G(()=>{hP();cU();EP();Gh();bU();_U()});var TP,GP=(r)=>Object.entries(r).filter(([f])=>f.startsWith(TP.IniSectionType.SSO_SESSION+Ds)).reduce((f,[s,w])=>({...f,[s.substring(s.indexOf(Ds)+1)]:w}),{});var CP=G(()=>{TP=u(Is(),1);Ch()});var wO=()=>({}),I3=async(r={})=>H1(r.configFilepath??$3()).then(B1).then(GP).catch(wO);var LP=G(()=>{cU();CP();bU();_U()});var AP=(...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 c0=async(r)=>{const f=await E3(r);return AP(f.configFile,f.credentialsFile)};var RP=G(()=>{Ch()});var WP=()=>{};var hf=G(()=>{Gh();dU();fP();Ch();LP();RP();WP()});var zP=(r,{preferredFile:f="config",...s}={})=>async()=>{const w=ks(s),{configFile:h,credentialsFile:$}=await E3(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 _(U.message||`Not found in config files w/ profile [${w}]: ${f3(r.toString())}`,{logger:s.logger})}};var SP=G(()=>{Lr();hf()});var hO=(r)=>typeof r==="function",PP=(r)=>hO(r)?async()=>await r():uS(r);var XP=G(()=>{Lr()});var t=({environmentVariableSelector:r,configFileSelector:f,default:s},w={})=>Kw(A0(tS(r),zP(f,w),PP(s)));var YP=G(()=>{Lr();rP();SP();XP()});var $f=G(()=>{YP()});var KP="AWS_ENDPOINT_URL",ZP="endpoint_url",lP=(r)=>({environmentVariableSelector:(f)=>{const s=r.split(" ").map(($)=>$.toUpperCase()),w=f[[KP,...s].join("_")];if(w)return w;const h=f[KP];if(h)return h;return},configFileSelector:(f,s)=>{if(s&&f.services){const h=s[["services",f.services].join(Ds)];if(h){const $=r.split(" ").map((I)=>I.toLowerCase()),E=h[[$.join("_"),ZP].join(Ds)];if(E)return E}}const w=f[ZP];if(w)return w;return},default:void 0});var JP=G(()=>{hf()});var QP=async(r)=>t(lP(r))();var MP=G(()=>{$f();JP()});function BP(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 gr=(r)=>{if(typeof r==="string")return gr(new URL(r));const{hostname:f,pathname:s,port:w,protocol:h,search:$}=r;let E;if($)E=BP($);return{hostname:f,port:w?parseInt(w):void 0,protocol:h,path:s,query:E}};var b0=()=>{};var F3=(r)=>{if(typeof r==="object"){if("url"in r)return gr(r.url);return r}return gr(r)};var U3=G(()=>{b0()});var HP=async(r,f,s,w)=>{if(!s.endpoint){const E=await QP(s.serviceId||"");if(E)s.endpoint=()=>Promise.resolve(F3(E))}const h=await $O(r,f,s);if(typeof s.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return s.endpointProvider(h,w)},$O=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 nS(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 _S(w);return w};var xU=G(()=>{eS();MP();U3()});var VP=G(()=>{xU();U3()});var kP=({config:r,instructions:f})=>{return(s,w)=>async(h)=>{const $=await HP(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=Js(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 eU=G(()=>{rf();xU()});var DP=(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 iP=(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 R(r,f,s){return{applyToStack:(w)=>{w.add(DP(r,s),EO),w.add(iP(r,f),nU)}}}var EO,nU;var yP=G(()=>{EO={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},nU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var H=G(()=>{yP()});var IO,W=(r,f)=>({applyToStack:(s)=>{s.addRelativeTo(kP({config:r,instructions:f}),IO)}});var mP=G(()=>{H();eU();IO={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:nU.name}});var yf=(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 NP=G(()=>{rf();U3()});var qP=()=>{};var M=G(()=>{VP();eU();mP();NP();qP()});var is,Zw=3,ys;var T3=G(()=>{(function(r){r.STANDARD="standard",r.ADAPTIVE="adaptive"})(is||(is={}));ys=is.STANDARD});var vP,jP,dP,OP;var cP=G(()=>{vP=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],jP=["TimeoutError","RequestTimeout","RequestTimeoutException"],dP=[500,502,503,504],OP=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var FO=(r)=>r.$metadata?.clockSkewCorrected,Lh=(r)=>r.$metadata?.httpStatusCode===429||vP.includes(r.name)||r.$retryable?.throttling==!0,G3=(r)=>FO(r)||jP.includes(r.name)||OP.includes(r?.code||"")||dP.includes(r.$metadata?.httpStatusCode||0),bP=(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 V1=G(()=>{cP()});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(),Lh(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 oU=G(()=>{V1()});var lw=100,k1=20000,aU=500,L3=500,pU=5,uU=10,tU=1,A3="amz-sdk-invocation-id",R3="amz-sdk-request";var gP=()=>{let r=lw;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(k1,Math.random()*2**w*r))},setDelayBase:(w)=>{r=w}}};var _P=()=>{};var r5=({retryDelay:r,retryCount:f,retryCost:s})=>{return{getRetryCount:()=>f,getRetryDelay:()=>Math.min(k1,r),getRetryCost:()=>s}};var xP=()=>{};class Ah{constructor(r){this.maxAttempts=r,this.mode=is.STANDARD,this.capacity=L3,this.retryBackoffStrategy=gP(),this.maxAttemptsProvider=typeof r==="function"?r:async()=>r}async acquireInitialRetryToken(r){return r5({retryDelay:lw,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"?aU:lw);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,r5({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()??tU))}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 ${Zw}`),Zw}}shouldRetry(r,f,s){return r.getRetryCount()+1<s&&this.capacity>=this.getCapacityCost(f.errorType)&&this.isRetryableError(f.errorType)}getCapacityCost(r){return r==="TRANSIENT"?uU:pU}isRetryableError(r){return r==="THROTTLING"||r==="TRANSIENT"}}var W3=G(()=>{T3();_P();xP()});class s5{constructor(r,f){this.maxAttemptsProvider=r,this.mode=is.ADAPTIVE;const{rateLimiter:s}=f??{};this.rateLimiter=s??new C3,this.standardRetryStrategy=new Ah(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 eP=G(()=>{T3();oU();W3()});var nP=G(()=>{W3()});var oP=()=>{};var Rs=G(()=>{eP();nP();oU();W3();T3();oP()});var mf,x1r,e1r,aP,n1r,o1r,a1r,p1r,u1r,t1r;var pP=G(()=>{mf=u(rU(),1),x1r=mf.default.v1,e1r=mf.default.v3,aP=mf.default.v4,n1r=mf.default.v5,o1r=mf.default.NIL,a1r=mf.default.version,p1r=mf.default.validate,u1r=mf.default.stringify,t1r=mf.default.parse});var uP=G(()=>{Rs()});var f5=G(()=>{Rs()});var w5=G(()=>{V1()});var h5=(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 $5=G(()=>{ir();V1();Rs();uP();f5();w5()});var tP=G(()=>{Rs();$5()});var rX="AWS_MAX_ATTEMPTS",sX="max_attempts",Nf,qf=(r)=>{const{retryStrategy:f}=r,s=yr(r.maxAttempts??Zw);return{...r,maxAttempts:s,retryStrategy:async()=>{if(f)return f;if(await yr(r.retryMode)()===is.ADAPTIVE)return new s5(s);return new Ah(s)}}},UO="AWS_RETRY_MODE",TO="retry_mode",vf;var fX=G(()=>{rf();Rs();Nf={environmentVariableSelector:(r)=>{const f=r[rX];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Environment variable ${rX} mast be a number, got "${f}"`);return s},configFileSelector:(r)=>{const f=r[sX];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Shared config file entry ${sX} mast be a number, got "${f}"`);return s},default:Zw},vf={environmentVariableSelector:(r)=>r[UO],configFileSelector:(r)=>r[TO],default:ys}});var wX=G(()=>{ir();Rs()});class Ws{trace(){}debug(){}info(){}warn(){}error(){}}var Jw=(r,f)=>{const s=[];if(r)s.push(r);if(f)for(let w of f)s.push(w);return s},g0=(r,f)=>{return`${r||"anonymous"}${f&&f.length>0?` (a.k.a. ${f.join(",")})`:""}`},Rh=()=>{let r=[],f=[],s=!1;const w=new Set,h=(L)=>L.sort((z,S)=>hX[S.step]-hX[z.step]||$X[S.priority||"normal"]-$X[z.priority||"normal"]),$=(L)=>{let z=!1;const S=(Z)=>{const D=Jw(Z.name,Z.aliases);if(D.includes(L)){z=!0;for(let B of D)w.delete(B);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 D of Jw(Z.name,Z.aliases))w.delete(D);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((B)=>{const Q={...B,before:[],after:[]};for(let i of Jw(Q.name,Q.aliases))Z[i]=Q;z.push(Q)}),f.forEach((B)=>{const Q={...B,before:[],after:[]};for(let i of Jw(Q.name,Q.aliases))Z[i]=Q;S.push(Q)}),S.forEach((B)=>{if(B.toMiddleware){const Q=Z[B.toMiddleware];if(Q===void 0){if(L)return;throw new Error(`${B.toMiddleware} is not found when adding ${g0(B.name,B.aliases)} middleware ${B.relation} ${B.toMiddleware}`)}if(B.relation==="after")Q.after.push(B);if(B.relation==="before")Q.before.push(B)}}),h(z).map(F).reduce((B,Q)=>{return B.push(...Q),B},[])},C={add:(L,z={})=>{const{name:S,override:Z,aliases:D}=z,B={step:"initialize",priority:"normal",middleware:L,...z},Q=Jw(S,D);if(Q.length>0){if(Q.some((i)=>w.has(i))){if(!Z)throw new Error(`Duplicate middleware name '${g0(S,D)}'`);for(let i of Q){const x=r.findIndex((hr)=>hr.name===i||hr.aliases?.some((kr)=>kr===i));if(x===-1)continue;const e=r[x];if(e.step!==B.step||B.priority!==e.priority)throw new Error(`"${g0(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${g0(S,D)}" middleware with ${B.priority} priority in ${B.step} step.`);r.splice(x,1)}}for(let i of Q)w.add(i)}r.push(B)},addRelativeTo:(L,z)=>{const{name:S,override:Z,aliases:D}=z,B={middleware:L,...z},Q=Jw(S,D);if(Q.length>0){if(Q.some((i)=>w.has(i))){if(!Z)throw new Error(`Duplicate middleware name '${g0(S,D)}'`);for(let i of Q){const x=f.findIndex((hr)=>hr.name===i||hr.aliases?.some((kr)=>kr===i));if(x===-1)continue;const e=f[x];if(e.toMiddleware!==B.toMiddleware||e.relation!==B.relation)throw new Error(`"${g0(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${g0(S,D)}" middleware ${B.relation} "${B.toMiddleware}" middleware.`);f.splice(x,1)}}for(let i of Q)w.add(i)}f.push(B)},clone:()=>I(Rh()),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:D,name:B,aliases:Q}=Z;if(D&&D.includes(L)){const i=Jw(B,Q);for(let x of i)w.delete(x);return z=!0,!1}return!0};return r=r.filter(S),f=f.filter(S),z},concat:(L)=>{const z=I(Rh());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 g0(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},hX,$X;var EX=G(()=>{hX={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},$X={high:3,normal:2,low:1}});var E5=G(()=>{EX()});class zs{constructor(r){this.middlewareStack=Rh(),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 IX=G(()=>{E5()});var FX=(r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]";import{Buffer as I5}from"buffer";var R0=(r,f=0,s=r.byteLength-f)=>{if(!FX(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return I5.from(r,f,s)},Wh=(r,f)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return f?I5.from(r,f):I5.from(r)};var Qw=()=>{};var GO,Us=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!GO.exec(r))throw new TypeError("Invalid base64 string.");const f=Wh(r,"base64");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)};var UX=G(()=>{Qw();GO=/^[A-Za-z0-9+/]*={0,2}$/});var _r=(r)=>{const f=Wh(r,"utf8");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var F5=G(()=>{Qw()});var TX=(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 GX=G(()=>{F5()});var Ts=(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 R0(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};var CX=G(()=>{Qw()});var jf=G(()=>{F5();GX();CX()});var Gs=(r)=>{let f;if(typeof r==="string")f=_r(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 R0(f.buffer,f.byteOffset,f.byteLength).toString("base64")};var LX=G(()=>{Qw();jf()});var W0=G(()=>{UX();LX()});function AX(r,f="utf-8"){if(f==="base64")return Gs(r);return Ts(r)}function RX(r,f){if(f==="base64")return z0.mutate(Us(r));return z0.mutate(_r(r))}var WX=G(()=>{W0();jf();U5()});var z0;var U5=G(()=>{WX();z0=class z0 extends Uint8Array{static fromString(r,f="utf-8"){switch(typeof r){case"string":return RX(r,f);default:throw new Error(`Unsupported conversion from ${typeof r} to Uint8ArrayBlobAdapter.`)}}static mutate(r){return Object.setPrototypeOf(r,z0.prototype),r}transformToString(r="utf-8"){return AX(this,r)}}});var zX=()=>{};var D1=(r)=>encodeURIComponent(r).replace(/[!'()*]/g,CO),CO=(r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`;var SX=()=>{};var PX=G(()=>{SX()});function z3(r){const f=[];for(let s of Object.keys(r).sort()){const w=r[s];if(s=D1(s),Array.isArray(w))for(let h=0,$=w.length;h<$;h++)f.push(`${s}=${D1(w[h])}`);else{let h=s;if(w||typeof w==="string")h+=`=${D1(w)}`;f.push(h)}}return f.join("&")}var S3=G(()=>{PX()});var XX;var YX=G(()=>{XX=["ECONNRESET","EPIPE","ETIMEDOUT"]});var T5=(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 G5=()=>{};var KX=(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 ZX=(r,{keepAlive:f,keepAliveMsecs:s})=>{if(f!==!0)return;r.on("socket",(w)=>{w.setKeepAlive(f,s||0)})};var lX=(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 LO}from"stream";async function C5(r,f,s=JX){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(JX,s)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout($),I()}),r.on("error",()=>{E=!0,clearTimeout($),I()})})]);if(!E)AO(r,f.body)}function AO(r,f){if(f instanceof LO){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 JX=1000;var L5=()=>{};import{Agent as QX,request as RO}from"http";import{Agent as MX,request as WO}from"https";class tr{static create(r){if(typeof r?.handle==="function")return r;return new tr(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 QX||typeof h?.destroy==="function")return h;return new QX({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if($ instanceof MX||typeof $?.destroy==="function")return $;return new MX({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(Q)=>{await $,clearTimeout(s),w(Q)},I=async(Q)=>{await $,clearTimeout(s),h(Q)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(f?.aborted){const Q=new Error("Request aborted");Q.name="AbortError",I(Q);return}const F=r.protocol==="https:",U=F?this.config.httpsAgent:this.config.httpAgent;s=setTimeout(()=>{this.socketWarningTimestamp=tr.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 Q=r.username??"",i=r.password??"";L=`${Q}:${i}`}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},D=(F?WO:RO)(S,(Q)=>{const i=new y0({statusCode:Q.statusCode||-1,reason:Q.statusMessage,headers:T5(Q.headers),body:Q});E({response:i})});if(D.on("error",(Q)=>{if(XX.includes(Q.code))I(Object.assign(Q,{name:"TimeoutError"}));else I(Q)}),KX(D,I,this.config.connectionTimeout),lX(D,I,this.config.requestTimeout),f){const Q=()=>{D.destroy();const i=new Error("Request aborted");i.name="AbortError",I(i)};if(typeof f.addEventListener==="function"){const i=f;i.addEventListener("abort",Q,{once:!0}),D.once("close",()=>i.removeEventListener("abort",Q))}else f.onabort=Q}const B=S.agent;if(typeof B==="object"&&"keepAlive"in B)ZX(D,{keepAlive:B.keepAlive,keepAliveMsecs:B.keepAliveMsecs});$=C5(D,r,this.config.requestTimeout).catch((Q)=>{return clearTimeout(s),h(Q)})})}updateHttpClientConfig(r,f){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[r]:f}})}httpHandlerConfigs(){return this.config??{}}}var BX=G(()=>{ir();S3();YX();G5();L5()});var HX=()=>{};var VX=G(()=>{HX()});var kX=G(()=>{ir();S3();G5();VX();L5()});import{Writable as zO}from"stream";var A5;var DX=G(()=>{A5=class A5 extends zO{constructor(){super(...arguments);this.bufferedBytes=[]}_write(r,f,s){this.bufferedBytes.push(r),s()}}});async function PO(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 ms=(r)=>{if(SO(r))return PO(r);return new Promise((f,s)=>{const w=new A5;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)})})},SO=(r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream;var iX=G(()=>{DX()});var _0=G(()=>{BX();kX();iX()});var yX=G(()=>{ir();S3()});async function XO(r){const f=await KO(r),s=Us(f);return new Uint8Array(s)}async function YO(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 KO(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 mX=(r)=>{if(typeof Blob==="function"&&r instanceof Blob)return XO(r);return YO(r)};var NX=G(()=>{W0()});var qX=G(()=>{yX();NX()});var i1=(r)=>typeof ReadableStream==="function"&&(r?.constructor?.name===ReadableStream.name||r instanceof ReadableStream);var dX,vX="The stream has already been transformed.",OX=(r)=>{if(!jX(r)&&!i1(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(vX);return f=!0,await mX(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 Gs($);else if(h==="hex")return dX.toHex($);else if(h===void 0||h==="utf8"||h==="utf-8")return Ts($);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(vX);if(f=!0,jX(r))return w(r);else if(i1(r))return r;else throw new Error(`Cannot transform payload to web stream, got ${r}`)}})},jX=(r)=>typeof Blob==="function"&&r instanceof Blob;var cX=G(()=>{qX();W0();dX=u(xE(),1);jf()});import{Readable as R5}from"stream";import{TextDecoder as ZO}from"util";var bX="The stream has already been transformed.",gX=(r)=>{if(!(r instanceof R5))try{return OX(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(bX);return f=!0,await ms(r)};return Object.assign(r,{transformToByteArray:s,transformToString:async(w)=>{const h=await s();if(w===void 0||Buffer.isEncoding(w))return R0(h.buffer,h.byteOffset,h.byteLength).toString(w);else return new ZO(w).decode(h)},transformToWebStream:()=>{if(f)throw new Error(bX);if(r.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof R5.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,R5.toWeb(r)}})};var _X=G(()=>{_0();Qw();cX()});var xX=()=>{};var eX=()=>{};var W5=G(()=>{U5();zX();_X();xX();eX()});var xr=async(r=new Uint8Array,f)=>{if(r instanceof Uint8Array)return z0.mutate(r);if(!r)return z0.mutate(new Uint8Array);const s=f.streamCollector(r);return z0.mutate(await s)};var nX=G(()=>{W5()});class A{constructor(){this.middlewareStack=Rh()}static classBuilder(){return new aX}resolveMiddlewareWithContext(r,f,s,{middlewareFn:w,clientName:h,commandName:$,inputFilterSensitiveLog:E,outputFilterSensitiveLog:I,smithyContext:F,additionalContext:U,CommandCtor:C}){for(let D of w.bind(this)(C,r,f,s))this.middlewareStack.use(D);const L=r.concat(this.middlewareStack),{logger:z}=f,S={logger:z,clientName:h,commandName:$,inputFilterSensitiveLog:E,outputFilterSensitiveLog:I,[oX.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...U},{requestHandler:Z}=f;return L.resolve((D)=>Z.handle(D.request,s||{}),S)}}class aX{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 oX;var pX=G(()=>{E5();oX=u(Is(),1)});var o="***SensitiveInformation***";var df=(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 mr=(r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},x0=(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}`)},Cs=(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}`)},lO,uX=(r)=>{const f=Cs(r);if(f!==void 0&&!Number.isNaN(f)&&f!==1/0&&f!==-1/0){if(Math.abs(f)>lO)throw new TypeError(`Expected 32-bit float, got ${r}`)}return f},zh=(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}`)},Mw=(r)=>z5(r,32),tX=(r)=>z5(r,16),rY=(r)=>z5(r,8),z5=(r,f)=>{const s=zh(r);if(s!==void 0&&JO(s,f)!==s)throw new TypeError(`Expected ${f}-bit integer, got ${r}`);return s},JO=(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]}},y=(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},d=(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}`)},S5=(r)=>{if(typeof r=="string")return Cs(Sh(r));return Cs(r)},sY,fY=(r)=>{if(typeof r=="string")return uX(Sh(r));return uX(r)},QO,Sh=(r)=>{const f=r.match(QO);if(f===null||f[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},P5=(r)=>{if(typeof r=="string")return MO(r);return Cs(r)},MO=(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}`)}},er=(r)=>{if(typeof r==="string")return zh(Sh(r));return zh(r)},$r=(r)=>{if(typeof r==="string")return Mw(Sh(r));return Mw(r)},X5=(r)=>{if(typeof r==="string")return tX(Sh(r));return tX(r)},wY=(r)=>{if(typeof r==="string")return rY(Sh(r));return rY(r)},P3=(r)=>{return String(new TypeError(r).stack||r).split("\n").slice(0,5).filter((f)=>!f.includes("stackTraceWarning")).join("\n")},X3;var Y5=G(()=>{lO=Math.ceil(340282346638528860000000000000000000000),sY=S5,QO=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,X3={warn:console.warn}});var BO,HO,hY=(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=HO.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,$,E,I,F,U]=f,C=X5(K5(w)),L=Bw(h,"month",1,12),z=Bw($,"day",1,31);return $Y(C,L,z,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U})},VO,Hw=(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=VO.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,$,E,I,F,U,C]=f,L=X5(K5(w)),z=Bw(h,"month",1,12),S=Bw($,"day",1,31),Z=$Y(L,z,S,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U});if(C.toUpperCase()!="Z")Z.setTime(Z.getTime()-mO(C));return Z},u3r,t3r,rIr,Of=(r)=>{if(r===null||r===void 0)return;let f;if(typeof r==="number")f=r;else if(typeof r==="string")f=S5(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))},$Y=(r,f,s,w)=>{const h=f-1;return DO(r,h,s),new Date(Date.UTC(r,h,s,Bw(w.hours,"hour",0,23),Bw(w.minutes,"minute",0,59),Bw(w.seconds,"seconds",0,60),yO(w.fractionalMilliseconds)))},kO,DO=(r,f,s)=>{let w=kO[f];if(f===1&&iO(r))w=29;if(s>w)throw new TypeError(`Invalid day for ${BO[f]} in ${r}: ${s}`)},iO=(r)=>{return r%4===0&&(r%100!==0||r%400===0)},Bw=(r,f,s,w)=>{const h=wY(K5(r));if(h<s||h>w)throw new TypeError(`${f} must be between ${s} and ${w}, inclusive`);return h},yO=(r)=>{if(r===null||r===void 0)return 0;return fY("0."+r)*1000},mO=(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},K5=(r)=>{let f=0;while(f<r.length-1&&r.charAt(f)==="0")f++;if(f===0)return r;return r.slice(f)};var EY=G(()=>{Y5();BO=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],HO=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),VO=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),u3r=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$/),t3r=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$/),rIr=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})$/),kO=[31,28,31,30,31,30,31,31,30,31,30,31]});var Ns,k=(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 Z5=G(()=>{Ns=class Ns extends Error{constructor(r){super(r.message);Object.setPrototypeOf(this,Ns.prototype),this.name=r.name,this.$fault=r.$fault,this.$metadata=r.$metadata}}});var NO=({output:r,parsedBody:f,exceptionCtor:s,errorCode:w})=>{const h=qO(r),$=h.httpStatusCode?h.httpStatusCode+"":void 0,E=new s({name:f?.code||f?.Code||w||$||"UnknownError",$fault:"client",$metadata:h});throw k(E,f)},cf=(r)=>{return({output:f,parsedBody:s,errorCode:w})=>{NO({output:f,parsedBody:s,exceptionCtor:r,errorCode:w})}},qO=(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 IY=G(()=>{Z5()});var bf=(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 FY=!1,gf=(r)=>{if(r&&!FY&&parseInt(r.substring(1,r.indexOf(".")))<16)FY=!0};var l5,UY=(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}}},TY=(r)=>{const f={};return r.checksumAlgorithms().forEach((s)=>{f[s.algorithmId()]=s.checksumConstructor()}),f};var GY=G(()=>{l5=u(Is(),1)});var CY=(r)=>{let f=r.retryStrategy;return{setRetryStrategy(s){f=s},retryStrategy(){return f}}},LY=(r)=>{const f={};return f.retryStrategy=r.retryStrategy(),f};var _f=(r)=>{return{...UY(r),...CY(r)}},xf=(r)=>{return{...TY(r),...LY(r)}};var AY=G(()=>{GY()});var RY=G(()=>{AY()});function Y3(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(f){return"%"+f.charCodeAt(0).toString(16).toUpperCase()})}var Cr=(r)=>Array.isArray(r)?r:[r];var J5=function(){const r=Object.getPrototypeOf(this).constructor,s=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(s,r.prototype),s};var WY=G(()=>{J5.prototype=Object.create(String.prototype,{constructor:{value:J5,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(J5,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,vO(w,h,$);else $=f;for(let E of Object.keys($)){if(!Array.isArray($[E])){w[E]=$[E];continue}zY(w,null,$,E)}return w}var p=(r,f)=>{const s={};for(let w in f)zY(s,r,f,w);return s},vO=(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},{}))},zY=(r,f,s,w)=>{if(f!==null){let E=s[w];if(typeof E==="function")E=[,E];const[I=jO,F=dO,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]=$}},jO=(r)=>r!=null,dO=(r)=>r;var SY=()=>{};var PY=(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(()=>{IX();nX();pX();EY();IY();RY();Z5();WY();Y5();SY()});import{Readable as OO}from"stream";var XY=(r)=>r?.body instanceof OO||typeof ReadableStream!=="undefined"&&r?.body instanceof ReadableStream;var YY=()=>{};var cO=(r)=>(f,s)=>async(w)=>{let h=await r.retryStrategy();const $=await r.maxAttempts();if(bO(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]=aP();while(!0)try{if(L)C.headers[R3]=`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=gO(z);if(I=h5(z),L&&XY(C))throw(s.logger instanceof Ws?console:s.logger)?.warn("An error was encountered in a non-retryable streaming request."),I;try{E=await h.refreshRetryTokenForRetry(E,S)}catch(D){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((D)=>setTimeout(D,Z))}}else{if(h=h,h?.mode)s.userAgent=[...s.userAgent||[],["cfg/retry-mode",h.mode]];return h.retry(f,w)}},bO=(r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined",gO=(r)=>{const f={error:r,errorType:_O(r)},s=eO(r.$response);if(s)f.retryAfterHint=s;return f},_O=(r)=>{if(Lh(r))return"THROTTLING";if(G3(r))return"TRANSIENT";if(bP(r))return"SERVER_ERROR";return"CLIENT_ERROR"},xO,ef=(r)=>({applyToStack:(f)=>{f.add(cO(r),xO)}}),eO=(r)=>{if(!y0.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 KY=G(()=>{ir();V1();Y();Rs();pP();YY();xO={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var Ef=G(()=>{tP();$5();fX();f5();wX();w5();KY()});var aY=v((G2r,l3)=>{var ZY,lY,JY,QY,MY,BY,HY,VY,kY,DY,iY,yY,mY,K3,Q5,NY,qY,vY,Ph,jY,dY,OY,cY,bY,gY,_Y,xY,eY,Z3,nY,oY;(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 l3==="object"&&typeof G2r==="object")r(s(f,s(G2r)));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]};ZY=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)},lY=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},JY=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},QY=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},MY=function(h,$){return function(E,I){$(E,I,h)}},BY=function(h,$,E,I,F,U){function C(hr){if(hr!==void 0&&typeof hr!=="function")throw new TypeError("Function expected");return hr}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):{}),D,B=!1;for(var Q=E.length-1;Q>=0;Q--){var i={};for(var x in I)i[x]=x==="access"?{}:I[x];for(var x in I.access)i.access[x]=I.access[x];i.addInitializer=function(hr){if(B)throw new TypeError("Cannot add initializers after decoration has completed");U.push(C(hr||null))};var e=E[Q](L==="accessor"?{get:Z.get,set:Z.set}:Z[z],i);if(L==="accessor"){if(e===void 0)continue;if(e===null||typeof e!=="object")throw new TypeError("Object expected");if(D=C(e.get))Z.get=D;if(D=C(e.set))Z.set=D;if(D=C(e.init))F.unshift(D)}else if(D=C(e))if(L==="field")F.unshift(D);else Z[z]=D}if(S)Object.defineProperty(S,I.name,Z);B=!0},HY=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},VY=function(h){return typeof h==="symbol"?h:"".concat(h)},kY=function(h,$,E){if(typeof $==="symbol")$=$.description?"[".concat($.description,"]"):"";return Object.defineProperty(h,"name",{configurable:!0,value:E?"".concat(E," ",$):$})},DY=function(h,$){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(h,$)},iY=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(D){C(D)}}function z(Z){try{S(I.throw(Z))}catch(D){C(D)}}function S(Z){Z.done?U(Z.value):F(Z.value).then(L,z)}S((I=I.apply(h,$||[])).next())})},yY=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}}},mY=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.")},Q5=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},NY=function(){for(var h=[],$=0;$<arguments.length;$++)h=h.concat(Q5(arguments[$]));return h},qY=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},vY=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($))},Ph=function(h){return this instanceof Ph?(this.v=h,this):new Ph(h)},jY=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(Q){return function(i){return Promise.resolve(i).then(Q,D)}}function L(Q,i){if(I[Q]){if(F[Q]=function(x){return new Promise(function(e,hr){U.push([Q,x,e,hr])>1||z(Q,x)})},i)F[Q]=i(F[Q])}}function z(Q,i){try{S(I[Q](i))}catch(x){B(U[0][3],x)}}function S(Q){Q.value instanceof Ph?Promise.resolve(Q.value.v).then(Z,D):B(U[0][2],Q)}function Z(Q){z("next",Q)}function D(Q){z("throw",Q)}function B(Q,i){if(Q(i),U.shift(),U.length)z(U[0][0],U[0][1])}},dY=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:Ph(h[F](C)),done:!1}:U?U(C):C}:U}},OY=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)}},cY=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=$};bY=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),$},gY=function(h){return h&&h.__esModule?h:{default:h}},_Y=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)},xY=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},eY=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($)},nY=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};oY=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",ZY),r("__assign",lY),r("__rest",JY),r("__decorate",QY),r("__param",MY),r("__esDecorate",BY),r("__runInitializers",HY),r("__propKey",VY),r("__setFunctionName",kY),r("__metadata",DY),r("__awaiter",iY),r("__generator",yY),r("__exportStar",mY),r("__createBinding",Z3),r("__values",K3),r("__read",Q5),r("__spread",NY),r("__spreadArrays",qY),r("__spreadArray",vY),r("__await",Ph),r("__asyncGenerator",jY),r("__asyncDelegator",dY),r("__asyncValues",OY),r("__makeTemplateObject",cY),r("__importStar",bY),r("__importDefault",gY),r("__classPrivateFieldGet",_Y),r("__classPrivateFieldSet",xY),r("__classPrivateFieldIn",eY),r("__addDisposableResource",nY),r("__disposeResources",oY)})});var rK=v((C2r,tY)=>{var{defineProperty:J3,getOwnPropertyDescriptor:nO,getOwnPropertyNames:oO}=Object,aO=Object.prototype.hasOwnProperty,pO=(r,f)=>J3(r,"name",{value:f,configurable:!0}),uO=(r,f)=>{for(var s in f)J3(r,s,{get:f[s],enumerable:!0})},tO=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of oO(f))if(!aO.call(r,h)&&h!==s)J3(r,h,{get:()=>f[h],enumerable:!(w=nO(f,h))||w.enumerable})}return r},rc=(r)=>tO(J3({},"__esModule",{value:!0}),r),uY={};uO(uY,{emitWarningIfUnsupportedVersion:()=>sc});tY.exports=rc(uY);var pY=!1,sc=pO((r)=>{if(r&&!pY&&parseInt(r.substring(1,r.indexOf(".")))<18)pY=!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:$,httpsAgent:E}=s||{};return{connectionTimeout:w,requestTimeout:f??h,httpAgent:(()=>{if($ instanceof L5.Agent||typeof($==null?void 0:$.destroy)==="function")return $;return new L5.Agent({keepAlive:!0,maxSockets:50,...$})})(),httpsAgent:(()=>{if(E instanceof W5.Agent||typeof(E==null?void 0:E.destroy)==="function")return E;return new W5.Agent({keepAlive:!0,maxSockets:50,...E})})(),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;let w;return new Promise((h,$)=>{let E=void 0;const I=Qr(async(m)=>{await E,clearTimeout(w),h(m)},"resolve"),F=Qr(async(m)=>{await E,clearTimeout(w),$(m)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(f==null?void 0:f.aborted){const m=new Error("Request aborted");m.name="AbortError",F(m);return}const U=s.protocol==="https:",L=U?this.config.httpsAgent:this.config.httpAgent;w=setTimeout(()=>{this.socketWarningTimestamp=r.checkSocketUsage(L,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const C=JC.buildQueryString(s.query||{});let Y=void 0;if(s.username!=null||s.password!=null){const m=s.username??"",p=s.password??"";Y=`${m}:${p}`}let X=s.path;if(C)X+=`?${C}`;if(s.fragment)X+=`#${s.fragment}`;const M={headers:s.headers,host:s.hostname,method:s.method,path:X,port:s.port,agent:L,auth:Y},q=(U?W5.request:L5.request)(M,(m)=>{const p=new SC.HttpResponse({statusCode:m.statusCode||-1,reason:m.statusMessage,headers:QC(m.headers),body:m});I({response:p})});if(q.on("error",(m)=>{if(hj.includes(m.code))F(Object.assign(m,{name:"TimeoutError"}));else F(m)}),$j(q,F,this.config.connectionTimeout),Ij(q,F,this.config.requestTimeout),f){const m=Qr(()=>{q.destroy();const p=new Error("Request aborted");p.name="AbortError",F(p)},"onAbort");if(typeof f.addEventListener==="function"){const p=f;p.addEventListener("abort",m,{once:!0}),q.once("close",()=>p.removeEventListener("abort",m))}else f.onabort=m}const D=M.agent;if(typeof D==="object"&&"keepAlive"in D)Ej(q,{keepAlive:D.keepAlive,keepAliveMsecs:D.keepAliveMsecs});E=A5(q,s,this.config.requestTimeout).catch((m)=>{return clearTimeout(w),$(m)})})}updateHttpClientConfig(s,f){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[s]:f}})}httpHandlerConfigs(){return this.config??{}}};Qr(VC,"NodeHttpHandler");var Uj=VC,YC=import.meta.require("http2"),Gj=sj(import.meta.require("http2")),HC=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()}}};Qr(HC,"NodeHttp2ConnectionPool");var Tj=HC,DC=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 $=Gj.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 "+s.destination.toString())});$.unref();const E=Qr(()=>{$.destroy(),this.deleteSession(w,$)},"destroySessionCb");if($.on("goaway",E),$.on("error",E),$.on("frameError",E),$.on("close",()=>this.deleteSession(w,$)),f.requestTimeout)$.setTimeout(f.requestTimeout,E);const I=this.sessionCache.get(w)||new Tj;return I.offerLast($),this.sessionCache.set(w,I),$}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()}};Qr(DC,"NodeHttp2ConnectionManager");var Lj=DC,kC=class r{constructor(s){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Lj({}),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 L=Qr(async(Jr)=>{await U,$(Jr)},"resolve"),C=Qr(async(Jr)=>{await U,E(Jr)},"reject");if(f==null?void 0:f.aborted){F=!0;const Jr=new Error("Request aborted");Jr.name="AbortError",C(Jr);return}const{hostname:Y,method:X,port:M,protocol:l,query:q}=s;let D="";if(s.username!=null||s.password!=null){const Jr=s.username??"",g0=s.password??"";D=`${Jr}:${g0}@`}const m=`${l}//${D}${Y}${M?`:${M}`:""}`,p={destination:new URL(m)},t=this.connectionManager.lease(p,{requestTimeout:(I=this.config)==null?void 0:I.sessionTimeout,disableConcurrentStreams:h||!1}),Wr=Qr((Jr)=>{if(h)this.destroySession(t);F=!0,C(Jr)},"rejectWithDestroy"),br=JC.buildQueryString(q||{});let Iw=s.path;if(br)Iw+=`?${br}`;if(s.fragment)Iw+=`#${s.fragment}`;const X0=t.request({...s.headers,[YC.constants.HTTP2_HEADER_PATH]:Iw,[YC.constants.HTTP2_HEADER_METHOD]:X});if(t.ref(),X0.on("response",(Jr)=>{const g0=new SC.HttpResponse({statusCode:Jr[":status"]||-1,headers:QC(Jr),body:X0});if(F=!0,L({response:g0}),h)t.close(),this.connectionManager.deleteSession(m,t)}),w)X0.setTimeout(w,()=>{X0.close();const Jr=new Error(`Stream timed out because of no activity for ${w} ms`);Jr.name="TimeoutError",Wr(Jr)});if(f){const Jr=Qr(()=>{X0.close();const g0=new Error("Request aborted");g0.name="AbortError",Wr(g0)},"onAbort");if(typeof f.addEventListener==="function"){const g0=f;g0.addEventListener("abort",Jr,{once:!0}),X0.once("close",()=>g0.removeEventListener("abort",Jr))}else f.onabort=Jr}X0.on("frameError",(Jr,g0,Fk)=>{Wr(new Error(`Frame type id ${Jr} in stream id ${Fk} has failed with code ${g0}.`))}),X0.on("error",Wr),X0.on("aborted",()=>{Wr(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${X0.rstCode}.`))}),X0.on("close",()=>{if(t.unref(),h)t.destroy();if(!F)Wr(new Error("Unexpected error: http2 request did not get a response"))}),U=A5(X0,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()}};Qr(kC,"NodeHttp2Handler");var Wj=kC,lC=class r extends MC.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(s,f,w){this.bufferedBytes.push(s),w()}};Qr(lC,"Collector");var Aj=lC,zj=Qr((r)=>{if(Cj(r))return NC(r);return new Promise((s,f)=>{const w=new Aj;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"),Cj=Qr((r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream,"isReadableStreamInstance");Qr(NC,"collectReadableStream")});var _C=v((gfr,cC)=>{function vC(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 iC(r){const s=await bC(r),f=Qj.fromBase64(s);return new Uint8Array(f)}async function dC(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 $=new Uint8Array(h);let E=0;for(let I of s)$.set(I,E),E+=I.length;return $}function bC(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??"",$=h.indexOf(","),E=$>-1?$+1:h.length;s(h.substring(E))},w.onabort=()=>f(new Error("Read aborted")),w.onerror=()=>f(w.error),w.readAsDataURL(r)})}var{defineProperty:j$,getOwnPropertyDescriptor:Rj,getOwnPropertyNames:Pj}=Object,Xj=Object.prototype.hasOwnProperty,Gs=(r,s)=>j$(r,"name",{value:s,configurable:!0}),Yj=(r,s)=>{for(var f in s)j$(r,f,{get:s[f],enumerable:!0})},Kj=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Pj(s))if(!Xj.call(r,h)&&h!==f)j$(r,h,{get:()=>s[h],enumerable:!(w=Rj(s,h))||w.enumerable})}return r},Zj=(r)=>Kj(j$({},"__esModule",{value:!0}),r),jC={};Yj(jC,{FetchHttpHandler:()=>Jj,keepAliveSupport:()=>m$,streamCollector:()=>Mj});cC.exports=Zj(jC);var mC=Fs(),Sj=T5();Gs(vC,"requestTimeout");var m$={supported:void 0},OC=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}={}){if(!this.config)this.config=await this.configProvider;const w=this.config.requestTimeout,h=this.config.keepAlive===!0,$=this.config.credentials;if(f==null?void 0:f.aborted){const D=new Error("Request aborted");return D.name="AbortError",Promise.reject(D)}let E=s.path;const I=Sj.buildQueryString(s.query||{});if(I)E+=`?${I}`;if(s.fragment)E+=`#${s.fragment}`;let F="";if(s.username!=null||s.password!=null){const D=s.username??"",m=s.password??"";F=`${D}:${m}@`}const{port:U,method:L}=s,C=`${s.protocol}//${F}${s.hostname}${U?`:${U}`:""}${E}`,Y=L==="GET"||L==="HEAD"?void 0:s.body,X={body:Y,headers:new Headers(s.headers),method:L,credentials:$};if(Y)X.duplex="half";if(typeof AbortController!=="undefined")X.signal=f;if(m$.supported)X.keepalive=h;let M=Gs(()=>{},"removeSignalEventListener");const l=new Request(C,X),q=[fetch(l).then((D)=>{const m=D.headers,p={};for(let Wr of m.entries())p[Wr[0]]=Wr[1];if(D.body==null)return D.blob().then((Wr)=>({response:new mC.HttpResponse({headers:p,reason:D.statusText,statusCode:D.status,body:Wr})}));return{response:new mC.HttpResponse({headers:p,reason:D.statusText,statusCode:D.status,body:D.body})}}),vC(w)];if(f)q.push(new Promise((D,m)=>{const p=Gs(()=>{const t=new Error("Request aborted");t.name="AbortError",m(t)},"onAbort");if(typeof f.addEventListener==="function"){const t=f;t.addEventListener("abort",p,{once:!0}),M=Gs(()=>t.removeEventListener("abort",p),"removeSignalEventListener")}else f.onabort=p}));return Promise.race(q).finally(M)}updateHttpClientConfig(s,f){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return w[s]=f,w})}httpHandlerConfigs(){return this.config??{}}};Gs(OC,"FetchHttpHandler");var Jj=OC,Qj=N$(),Mj=Gs((r)=>{if(typeof Blob==="function"&&r instanceof Blob)return iC(r);return dC(r)},"streamCollector");Gs(iC,"collectBlob");Gs(dC,"collectStream");Gs(bC,"readToBase64")});var C5=v((xfr,aC)=>{function nC(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 z5)s[f/2]=z5[w];else throw new Error(`Cannot decode unrecognized sequence ${w} as hexadecimal`)}return s}function oC(r){let s="";for(let f=0;f<r.byteLength;f++)s+=eC[r[f]];return s}var{defineProperty:v$,getOwnPropertyDescriptor:Bj,getOwnPropertyNames:Vj}=Object,Hj=Object.prototype.hasOwnProperty,gC=(r,s)=>v$(r,"name",{value:s,configurable:!0}),Dj=(r,s)=>{for(var f in s)v$(r,f,{get:s[f],enumerable:!0})},kj=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Vj(s))if(!Hj.call(r,h)&&h!==f)v$(r,h,{get:()=>s[h],enumerable:!(w=Bj(s,h))||w.enumerable})}return r},lj=(r)=>kj(v$({},"__esModule",{value:!0}),r),xC={};Dj(xC,{fromHex:()=>nC,toHex:()=>oC});aC.exports=lj(xC);var eC={},z5={};for(let r=0;r<256;r++){let s=r.toString(16).toLowerCase();if(s.length===1)s=`0${s}`;eC[r]=s,z5[s]=r}gC(nC,"fromHex");gC(oC,"toHex")});var A1=v((pC)=>{Object.defineProperty(pC,"__esModule",{value:!0});pC.isReadableStream=void 0;var Nj=(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)};pC.isReadableStream=Nj});var hR=v((sR)=>{Object.defineProperty(sR,"__esModule",{value:!0});sR.sdkStreamMixin=void 0;var qj=_C(),yj=N$(),mj=C5(),jj=ls(),tC=A1(),rR="The stream has already been transformed.",vj=(r)=>{var s,f;if(!fR(r)&&!tC.isReadableStream(r)){const E=((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 ${E}`)}let w=!1;const h=async()=>{if(w)throw new Error(rR);return w=!0,await qj.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 yj.toBase64(I);else if(E==="hex")return mj.toHex(I);else if(E===void 0||E==="utf8"||E==="utf-8")return jj.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(rR);if(w=!0,fR(r))return $(r);else if(tC.isReadableStream(r))return r;else throw new Error(`Cannot transform payload to web stream, got ${r}`)}})};sR.sdkStreamMixin=vj;var fR=(r)=>typeof Blob==="function"&&r instanceof Blob});var FR=v((ER)=>{Object.defineProperty(ER,"__esModule",{value:!0});ER.sdkStreamMixin=void 0;var Oj=yC(),ij=L1(),R5=import.meta.require("stream"),dj=import.meta.require("util"),bj=hR(),$R="The stream has already been transformed.",cj=(r)=>{var s,f;if(!(r instanceof R5.Readable))try{return bj.sdkStreamMixin(r)}catch($){const E=((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 ${E}`)}let w=!1;const h=async()=>{if(w)throw new Error($R);return w=!0,await Oj.streamCollector(r)};return Object.assign(r,{transformToByteArray:h,transformToString:async($)=>{const E=await h();if($===void 0||Buffer.isEncoding($))return ij.fromArrayBuffer(E.buffer,E.byteOffset,E.byteLength).toString($);else return new dj.TextDecoder($).decode(E)},transformToWebStream:()=>{if(w)throw new Error($R);if(r.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof R5.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,R5.Readable.toWeb(r)}})};ER.sdkStreamMixin=cj});var TR=v((UR)=>{async function _j(r){if(typeof r.stream==="function")r=r.stream();return r.tee()}Object.defineProperty(UR,"__esModule",{value:!0});UR.splitStream=void 0;UR.splitStream=_j});var zR=v((WR)=>{async function ej(r){if(xj.isReadableStream(r))return gj.splitStream(r);const s=new LR.PassThrough,f=new LR.PassThrough;return r.pipe(s),r.pipe(f),[s,f]}Object.defineProperty(WR,"__esModule",{value:!0});WR.splitStream=void 0;var LR=import.meta.require("stream"),gj=TR(),xj=A1();WR.splitStream=ej});var PR=v((CR)=>{async function nj(r,s){var f;let w=0;const h=[],$=r.getReader();let E=!1;while(!E){const{done:U,value:L}=await $.read();if(L)h.push(L),w+=(f=L===null||L===void 0?void 0:L.byteLength)!==null&&f!==void 0?f:0;if(w>=s)break;E=U}$.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(CR,"__esModule",{value:!0});CR.headStream=void 0;CR.headStream=nj});var ZR=v((YR)=>{Object.defineProperty(YR,"__esModule",{value:!0});YR.headStream=void 0;var oj=import.meta.require("stream"),aj=PR(),pj=A1(),uj=(r,s)=>{if(pj.isReadableStream(r))return aj.headStream(r,s);return new Promise((f,w)=>{const h=new XR;h.limit=s,r.pipe(h),r.on("error",($)=>{h.end(),w($)}),h.on("error",w),h.on("finish",function(){const $=new Uint8Array(Buffer.concat(this.buffers));f($)})})};YR.headStream=uj;class XR extends oj.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,$=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=$.subarray(0,$.byteLength-h),this.emit("finish")}f()}}});var i$=v((rsr,zw)=>{function QR(r,s="utf-8"){if(s==="base64")return SR.toBase64(r);return JR.toUtf8(r)}function MR(r,s){if(s==="base64")return X5.mutate(SR.fromBase64(r));return X5.mutate(JR.fromUtf8(r))}var{defineProperty:O$,getOwnPropertyDescriptor:tj,getOwnPropertyNames:rv}=Object,fv=Object.prototype.hasOwnProperty,Y5=(r,s)=>O$(r,"name",{value:s,configurable:!0}),sv=(r,s)=>{for(var f in s)O$(r,f,{get:s[f],enumerable:!0})},P5=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of rv(s))if(!fv.call(r,h)&&h!==f)O$(r,h,{get:()=>s[h],enumerable:!(w=tj(s,h))||w.enumerable})}return r},z1=(r,s,f)=>(P5(r,s,"default"),f&&P5(f,s,"default")),wv=(r)=>P5(O$({},"__esModule",{value:!0}),r),Aw={};sv(Aw,{Uint8ArrayBlobAdapter:()=>X5});zw.exports=wv(Aw);var SR=N$(),JR=ls();Y5(QR,"transformToString");Y5(MR,"transformFromString");var BR=class r extends Uint8Array{static fromString(s,f="utf-8"){switch(typeof s){case"string":return MR(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 QR(this,s)}};Y5(BR,"Uint8ArrayBlobAdapter");var X5=BR;z1(Aw,LC(),zw.exports);z1(Aw,FR(),zw.exports);z1(Aw,zR(),zw.exports);z1(Aw,ZR(),zw.exports);z1(Aw,A1(),zw.exports)});var sh=v((fsr,aR)=>{function dR(r){const s=r.getUTCFullYear(),f=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${$}`:`${$}`,L=E<10?`0${E}`:`${E}`,C=I<10?`0${I}`:`${I}`;return`${kv[w]}, ${F} ${k5[f]} ${s} ${U}:${L}:${C} GMT`}function c$(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(s){return"%"+s.charCodeAt(0).toString(16).toUpperCase()})}function l5(r,s,f){let w,h,$;if(typeof s==="undefined"&&typeof f==="undefined")w={},$=r;else if(w=r,typeof s==="function")return h=s,$=f,GO(w,h,$);else $=s;for(let E of Object.keys($)){if(!Array.isArray($[E])){w[E]=$[E];continue}nR(w,null,$,E)}return w}function oR(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 $="";for(let E=0;E<w.length;E++){if($==="")$=w[E];else $+=s+w[E];if((E+1)%f===0)h.push($),$=""}if($!=="")h.push($);return h}var{defineProperty:_$,getOwnPropertyDescriptor:hv,getOwnPropertyNames:$v}=Object,Ev=Object.prototype.hasOwnProperty,j=(r,s)=>_$(r,"name",{value:s,configurable:!0}),Iv=(r,s)=>{for(var f in s)_$(r,f,{get:s[f],enumerable:!0})},Fv=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of $v(s))if(!Ev.call(r,h)&&h!==f)_$(r,h,{get:()=>s[h],enumerable:!(w=hv(s,h))||w.enumerable})}return r},Uv=(r)=>Fv(_$({},"__esModule",{value:!0}),r),HR={};Iv(HR,{Client:()=>Tv,Command:()=>qR,LazyJsonString:()=>IO,NoOpLogger:()=>Gv,SENSITIVE_STRING:()=>Av,ServiceException:()=>ov,StringWrapper:()=>Y1,_json:()=>B5,collectBody:()=>Lv,convertMap:()=>FO,createAggregatedClient:()=>zv,dateToUtcString:()=>dR,decorateServiceException:()=>cR,emitWarningIfUnsupportedVersion:()=>tv,expectBoolean:()=>Rv,expectByte:()=>M5,expectFloat32:()=>d$,expectInt:()=>Xv,expectInt32:()=>J5,expectLong:()=>P1,expectNonNull:()=>Kv,expectNumber:()=>R1,expectObject:()=>mR,expectShort:()=>Q5,expectString:()=>Zv,expectUnion:()=>Sv,extendedEncodeURIComponent:()=>c$,getArrayIfSingleItem:()=>EO,getDefaultClientConfiguration:()=>hO,getDefaultExtensionConfiguration:()=>gR,getValueFromTextNode:()=>xR,handleFloat:()=>Mv,limitedParseDouble:()=>D5,limitedParseFloat:()=>Bv,limitedParseFloat32:()=>Vv,loadConfigsForDefaultMode:()=>uv,logger:()=>X1,map:()=>l5,parseBoolean:()=>Cv,parseEpochTimestamp:()=>iv,parseRfc3339DateTime:()=>Nv,parseRfc3339DateTimeWithOffset:()=>yv,parseRfc7231DateTime:()=>Ov,resolveDefaultRuntimeConfig:()=>$O,resolvedPath:()=>WO,serializeDateTime:()=>zO,serializeFloat:()=>AO,splitEvery:()=>oR,strictParseByte:()=>iR,strictParseDouble:()=>H5,strictParseFloat:()=>Jv,strictParseFloat32:()=>jR,strictParseInt:()=>Hv,strictParseInt32:()=>Dv,strictParseLong:()=>OR,strictParseShort:()=>tw,take:()=>UO,throwDefaultError:()=>_R,withBaseException:()=>av});aR.exports=Uv(HR);var DR=class r{trace(){}debug(){}info(){}warn(){}error(){}};j(DR,"NoOpLogger");var Gv=DR,kR=V$(),lR=class r{constructor(s){this.middlewareStack=kR.constructStack(),this.config=s}send(s,f,w){const h=typeof f!=="function"?f:void 0,$=typeof f==="function"?f:w,E=s.resolveMiddleware(this.middlewareStack,this.config,h);if($)E(s).then((I)=>$(null,I.output),(I)=>$(I)).catch(()=>{});else return E(s).then((I)=>I.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};j(lR,"Client");var Tv=lR,K5=i$(),Lv=j(async(r=new Uint8Array,s)=>{if(r instanceof Uint8Array)return K5.Uint8ArrayBlobAdapter.mutate(r);if(!r)return K5.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const f=s.streamCollector(r);return K5.Uint8ArrayBlobAdapter.mutate(await f)},"collectBody"),S5=T0(),NR=class r{constructor(){this.middlewareStack=kR.constructStack()}static classBuilder(){return new Wv}resolveMiddlewareWithContext(s,f,w,{middlewareFn:h,clientName:$,commandName:E,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,smithyContext:U,additionalContext:L,CommandCtor:C}){for(let q of h.bind(this)(C,s,f,w))this.middlewareStack.use(q);const Y=s.concat(this.middlewareStack),{logger:X}=f,M={logger:X,clientName:$,commandName:E,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,[S5.SMITHY_CONTEXT_KEY]:{commandInstance:this,...U},...L},{requestHandler:l}=f;return Y.resolve((q)=>l.handle(q.request,w||{}),M)}};j(NR,"Command");var qR=NR,yR=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 qR{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})}},j(s,"CommandRef"),s)}};j(yR,"ClassBuilder");var Wv=yR,Av="***SensitiveInformation***",zv=j((r,s)=>{for(let f of Object.keys(r)){const w=r[f],h=j(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"),$=(f[0].toLowerCase()+f.slice(1)).replace(/Command$/,"");s.prototype[$]=h}},"createAggregatedClient"),Cv=j((r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},"parseBoolean"),Rv=j((r)=>{if(r===null||r===void 0)return;if(typeof r==="number"){if(r===0||r===1)X1.warn(b$(`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")X1.warn(b$(`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"),R1=j((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))X1.warn(b$(`Expected number but observed string: ${r}`));return s}}if(typeof r==="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)},"expectNumber"),Pv=Math.ceil(340282346638528860000000000000000000000),d$=j((r)=>{const s=R1(r);if(s!==void 0&&!Number.isNaN(s)&&s!==1/0&&s!==-1/0){if(Math.abs(s)>Pv)throw new TypeError(`Expected 32-bit float, got ${r}`)}return s},"expectFloat32"),P1=j((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"),Xv=P1,J5=j((r)=>V5(r,32),"expectInt32"),Q5=j((r)=>V5(r,16),"expectShort"),M5=j((r)=>V5(r,8),"expectByte"),V5=j((r,s)=>{const f=P1(r);if(f!==void 0&&Yv(f,s)!==f)throw new TypeError(`Expected ${s}-bit integer, got ${r}`);return f},"expectSizedInt"),Yv=j((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"),Kv=j((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"),mR=j((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"),Zv=j((r)=>{if(r===null||r===void 0)return;if(typeof r==="string")return r;if(["boolean","number","bigint"].includes(typeof r))return X1.warn(b$(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)},"expectString"),Sv=j((r)=>{if(r===null||r===void 0)return;const s=mR(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"),H5=j((r)=>{if(typeof r=="string")return R1(fh(r));return R1(r)},"strictParseDouble"),Jv=H5,jR=j((r)=>{if(typeof r=="string")return d$(fh(r));return d$(r)},"strictParseFloat32"),Qv=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,fh=j((r)=>{const s=r.match(Qv);if(s===null||s[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},"parseNumber"),D5=j((r)=>{if(typeof r=="string")return vR(r);return R1(r)},"limitedParseDouble"),Mv=D5,Bv=D5,Vv=j((r)=>{if(typeof r=="string")return vR(r);return d$(r)},"limitedParseFloat32"),vR=j((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"),OR=j((r)=>{if(typeof r==="string")return P1(fh(r));return P1(r)},"strictParseLong"),Hv=OR,Dv=j((r)=>{if(typeof r==="string")return J5(fh(r));return J5(r)},"strictParseInt32"),tw=j((r)=>{if(typeof r==="string")return Q5(fh(r));return Q5(r)},"strictParseShort"),iR=j((r)=>{if(typeof r==="string")return M5(fh(r));return M5(r)},"strictParseByte"),b$=j((r)=>{return String(new TypeError(r).stack||r).split("\n").slice(0,5).filter((s)=>!s.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),X1={warn:console.warn},kv=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],k5=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];j(dR,"dateToUtcString");var lv=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Nv=j((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=lv.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,$,E,I,F,U]=s,L=tw(rh(w)),C=Qf(h,"month",1,12),Y=Qf($,"day",1,31);return C1(L,C,Y,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U})},"parseRfc3339DateTime"),qv=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),yv=j((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=qv.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,$,E,I,F,U,L]=s,C=tw(rh(w)),Y=Qf(h,"month",1,12),X=Qf($,"day",1,31),M=C1(C,Y,X,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U});if(L.toUpperCase()!="Z")M.setTime(M.getTime()-nv(L));return M},"parseRfc3339DateTimeWithOffset"),mv=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$/),jv=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$/),vv=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})$/),Ov=j((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=mv.exec(r);if(s){const[f,w,h,$,E,I,F,U]=s;return C1(tw(rh($)),Z5(h),Qf(w,"day",1,31),{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U})}if(s=jv.exec(r),s){const[f,w,h,$,E,I,F,U]=s;return cv(C1(dv($),Z5(h),Qf(w,"day",1,31),{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U}))}if(s=vv.exec(r),s){const[f,w,h,$,E,I,F,U]=s;return C1(tw(rh(U)),Z5(w),Qf(h.trimLeft(),"day",1,31),{hours:$,minutes:E,seconds:I,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),iv=j((r)=>{if(r===null||r===void 0)return;let s;if(typeof r==="number")s=r;else if(typeof r==="string")s=H5(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"),C1=j((r,s,f,w)=>{const h=s-1;return gv(r,h,f),new Date(Date.UTC(r,h,f,Qf(w.hours,"hour",0,23),Qf(w.minutes,"minute",0,59),Qf(w.seconds,"seconds",0,60),ev(w.fractionalMilliseconds)))},"buildDate"),dv=j((r)=>{const s=new Date().getUTCFullYear(),f=Math.floor(s/100)*100+tw(rh(r));if(f<s)return f+100;return f},"parseTwoDigitYear"),bv=1576800000000,cv=j((r)=>{if(r.getTime()-new Date().getTime()>bv)return new Date(Date.UTC(r.getUTCFullYear()-100,r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()));return r},"adjustRfc850Year"),Z5=j((r)=>{const s=k5.indexOf(r);if(s<0)throw new TypeError(`Invalid month: ${r}`);return s+1},"parseMonthByShortName"),_v=[31,28,31,30,31,30,31,31,30,31,30,31],gv=j((r,s,f)=>{let w=_v[s];if(s===1&&xv(r))w=29;if(f>w)throw new TypeError(`Invalid day for ${k5[s]} in ${r}: ${f}`)},"validateDayOfMonth"),xv=j((r)=>{return r%4===0&&(r%100!==0||r%400===0)},"isLeapYear"),Qf=j((r,s,f,w)=>{const h=iR(rh(r));if(h<f||h>w)throw new TypeError(`${s} must be between ${f} and ${w}, inclusive`);return h},"parseDateValue"),ev=j((r)=>{if(r===null||r===void 0)return 0;return jR("0."+r)*1000},"parseMilliseconds"),nv=j((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"),rh=j((r)=>{let s=0;while(s<r.length-1&&r.charAt(s)==="0")s++;if(s===0)return r;return r.slice(s)},"stripLeadingZeroes"),bR=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}};j(bR,"ServiceException");var ov=bR,cR=j((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"),_R=j(({output:r,parsedBody:s,exceptionCtor:f,errorCode:w})=>{const h=pv(r),$=h.httpStatusCode?h.httpStatusCode+"":void 0,E=new f({name:(s==null?void 0:s.code)||(s==null?void 0:s.Code)||w||$||"UnknownError",$fault:"client",$metadata:h});throw cR(E,s)},"throwDefaultError"),av=j((r)=>{return({output:s,parsedBody:f,errorCode:w})=>{_R({output:s,parsedBody:f,exceptionCtor:r,errorCode:w})}},"withBaseException"),pv=j((r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),"deserializeMetadata"),uv=j((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"),VR=!1,tv=j((r)=>{if(r&&!VR&&parseInt(r.substring(1,r.indexOf(".")))<16)VR=!0},"emitWarningIfUnsupportedVersion"),rO=j((r)=>{const s=[];for(let f in S5.AlgorithmId){const w=S5.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"),fO=j((r)=>{const s={};return r.checksumAlgorithms().forEach((f)=>{s[f.algorithmId()]=f.checksumConstructor()}),s},"resolveChecksumRuntimeConfig"),sO=j((r)=>{let s=r.retryStrategy;return{setRetryStrategy(f){s=f},retryStrategy(){return s}}},"getRetryConfiguration"),wO=j((r)=>{const s={};return s.retryStrategy=r.retryStrategy(),s},"resolveRetryRuntimeConfig"),gR=j((r)=>{return{...rO(r),...sO(r)}},"getDefaultExtensionConfiguration"),hO=gR,$O=j((r)=>{return{...fO(r),...wO(r)}},"resolveDefaultRuntimeConfig");j(c$,"extendedEncodeURIComponent");var EO=j((r)=>Array.isArray(r)?r:[r],"getArrayIfSingleItem"),xR=j((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]=xR(r[f]);return r},"getValueFromTextNode"),Y1=j(function(){const r=Object.getPrototypeOf(this).constructor,f=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(f,r.prototype),f},"StringWrapper");Y1.prototype=Object.create(String.prototype,{constructor:{value:Y1,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Y1,String);var eR=class r extends Y1{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))}};j(eR,"LazyJsonString");var IO=eR;j(l5,"map");var FO=j((r)=>{const s={};for(let[f,w]of Object.entries(r||{}))s[f]=[,w];return s},"convertMap"),UO=j((r,s)=>{const f={};for(let w in s)nR(f,r,s,w);return f},"take"),GO=j((r,s,f)=>{return l5(r,Object.entries(f).reduce((w,[h,$])=>{if(Array.isArray($))w[h]=$;else if(typeof $==="function")w[h]=[s,$()];else w[h]=[s,$];return w},{}))},"mapWithFilter"),nR=j((r,s,f,w)=>{if(s!==null){let E=f[w];if(typeof E==="function")E=[,E];const[I=TO,F=LO,U=w]=E;if(typeof I==="function"&&I(s[U])||typeof I!=="function"&&!!I)r[w]=F(s[U]);return}let[h,$]=f[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"),TO=j((r)=>r!=null,"nonNullish"),LO=j((r)=>r,"pass"),WO=j((r,s,f,w,h,$)=>{if(s!=null&&s[f]!==void 0){const E=w();if(E.length<=0)throw new Error("Empty value provided for input HTTP label: "+f+".");r=r.replace(h,$?E.split("/").map((I)=>c$(I)).join("/"):c$(E))}else throw new Error("No value provided for input HTTP label: "+f+".");return r},"resolvedPath"),AO=j((r)=>{if(r!==r)return"NaN";switch(r){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return r}},"serializeFloat"),zO=j((r)=>r.toISOString().replace(".000Z","Z"),"serializeDateTime"),B5=j((r)=>{if(r==null)return{};if(Array.isArray(r))return r.filter((s)=>s!=null).map(B5);if(typeof r==="object"){const s={};for(let f of Object.keys(r)){if(r[f]==null)continue;s[f]=B5(r[f])}return s}return r},"_json");j(oR,"splitEvery")});var tR=v((pR)=>{Object.defineProperty(pR,"__esModule",{value:!0});pR.isStreamingPayload=void 0;var CO=import.meta.require("stream"),RO=(r)=>(r===null||r===void 0?void 0:r.body)instanceof CO.Readable||typeof ReadableStream!=="undefined"&&(r===null||r===void 0?void 0:r.body)instanceof ReadableStream;pR.isStreamingPayload=RO});var RP=v((hsr,CP)=>{var{defineProperty:g$,getOwnPropertyDescriptor:PO,getOwnPropertyNames:XO}=Object,YO=Object.prototype.hasOwnProperty,kr=(r,s)=>g$(r,"name",{value:s,configurable:!0}),KO=(r,s)=>{for(var f in s)g$(r,f,{get:s[f],enumerable:!0})},ZO=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of XO(s))if(!YO.call(r,h)&&h!==f)g$(r,h,{get:()=>s[h],enumerable:!(w=PO(s,h))||w.enumerable})}return r},SO=(r)=>ZO(g$({},"__esModule",{value:!0}),r),fP={};KO(fP,{AdaptiveRetryStrategy:()=>MO,CONFIG_MAX_ATTEMPTS:()=>q5,CONFIG_RETRY_MODE:()=>GP,ENV_MAX_ATTEMPTS:()=>N5,ENV_RETRY_MODE:()=>UP,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>BO,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>HO,StandardRetryStrategy:()=>IP,defaultDelayDecider:()=>wP,defaultRetryDecider:()=>hP,getOmitRetryHeadersPlugin:()=>DO,getRetryAfterHint:()=>zP,getRetryPlugin:()=>mO,omitRetryHeadersMiddleware:()=>TP,omitRetryHeadersMiddlewareOptions:()=>LP,resolveRetryConfig:()=>VO,retryMiddleware:()=>WP,retryMiddlewareOptions:()=>AP});CP.exports=SO(fP);var wh=Fs(),sP=pF(),Zr=bz(),JO=kr((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,$=(s==null?void 0:s.timeoutRetryCost)??Zr.TIMEOUT_RETRY_COST;let E=r;const I=kr((C)=>C.name==="TimeoutError"?$:h,"getCapacityAmount"),F=kr((C)=>I(C)<=E,"hasRetryTokens");return Object.freeze({hasRetryTokens:F,retrieveRetryTokens:kr((C)=>{if(!F(C))throw new Error("No retry token available");const Y=I(C);return E-=Y,Y},"retrieveRetryTokens"),releaseRetryTokens:kr((C)=>{E+=C??w,E=Math.min(E,f)},"releaseRetryTokens")})},"getDefaultRetryQuota"),wP=kr((r,s)=>Math.floor(Math.min(Zr.MAXIMUM_RETRY_DELAY,Math.random()*2**s*r)),"defaultDelayDecider"),Ns=Lw(),hP=kr((r)=>{if(!r)return!1;return Ns.isRetryableByTrait(r)||Ns.isClockSkewError(r)||Ns.isThrottlingError(r)||Ns.isTransientError(r)},"defaultRetryDecider"),$P=kr((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"),EP=class r{constructor(s,f){this.maxAttemptsProvider=s,this.mode=Zr.RETRY_MODES.STANDARD,this.retryDecider=(f==null?void 0:f.retryDecider)??hP,this.delayDecider=(f==null?void 0:f.delayDecider)??wP,this.retryQuota=(f==null?void 0:f.retryQuota)??JO(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,$=0,E=0;const I=await this.getMaxAttempts(),{request:F}=f;if(wh.HttpRequest.isInstance(F))F.headers[Zr.INVOCATION_ID_HEADER]=sP.v4();while(!0)try{if(wh.HttpRequest.isInstance(F))F.headers[Zr.REQUEST_HEADER]=`attempt=${$+1}; max=${I}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:U,output:L}=await s(f);if(w==null?void 0:w.afterRequest)w.afterRequest(U);return this.retryQuota.releaseRetryTokens(h),L.$metadata.attempts=$+1,L.$metadata.totalRetryDelay=E,{response:U,output:L}}catch(U){const L=$P(U);if($++,this.shouldRetry(L,$,I)){h=this.retryQuota.retrieveRetryTokens(L);const C=this.delayDecider(Ns.isThrottlingError(L)?Zr.THROTTLING_RETRY_DELAY_BASE:Zr.DEFAULT_RETRY_DELAY_BASE,$),Y=QO(L.$response),X=Math.max(Y||0,C);E+=X,await new Promise((M)=>setTimeout(M,X));continue}if(!L.$metadata)L.$metadata={};throw L.$metadata.attempts=$,L.$metadata.totalRetryDelay=E,L}}};kr(EP,"StandardRetryStrategy");var IP=EP,QO=kr((r)=>{if(!wh.HttpResponse.isInstance(r))return;const s=Object.keys(r.headers).find(($)=>$.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"),FP=class r extends IP{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)}})}};kr(FP,"AdaptiveRetryStrategy");var MO=FP,rP=pr(),N5="AWS_MAX_ATTEMPTS",q5="max_attempts",BO={environmentVariableSelector:(r)=>{const s=r[N5];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Environment variable ${N5} mast be a number, got "${s}"`);return f},configFileSelector:(r)=>{const s=r[q5];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Shared config file entry ${q5} mast be a number, got "${s}"`);return f},default:Zr.DEFAULT_MAX_ATTEMPTS},VO=kr((r)=>{const{retryStrategy:s}=r,f=rP.normalizeProvider(r.maxAttempts??Zr.DEFAULT_MAX_ATTEMPTS);return{...r,maxAttempts:f,retryStrategy:async()=>{if(s)return s;if(await rP.normalizeProvider(r.retryMode)()===Zr.RETRY_MODES.ADAPTIVE)return new Zr.AdaptiveRetryStrategy(f);return new Zr.StandardRetryStrategy(f)}}},"resolveRetryConfig"),UP="AWS_RETRY_MODE",GP="retry_mode",HO={environmentVariableSelector:(r)=>r[UP],configFileSelector:(r)=>r[GP],default:Zr.DEFAULT_RETRY_MODE},TP=kr(()=>(r)=>async(s)=>{const{request:f}=s;if(wh.HttpRequest.isInstance(f))delete f.headers[Zr.INVOCATION_ID_HEADER],delete f.headers[Zr.REQUEST_HEADER];return r(s)},"omitRetryHeadersMiddleware"),LP={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},DO=kr((r)=>({applyToStack:(s)=>{s.addRelativeTo(TP(),LP)}}),"getOmitRetryHeadersPlugin"),kO=sh(),lO=tR(),WP=kr((r)=>(s,f)=>async(w)=>{var h;let $=await r.retryStrategy();const E=await r.maxAttempts();if(NO($)){$=$;let I=await $.acquireInitialRetryToken(f.partition_id),F=new Error,U=0,L=0;const{request:C}=w,Y=wh.HttpRequest.isInstance(C);if(Y)C.headers[Zr.INVOCATION_ID_HEADER]=sP.v4();while(!0)try{if(Y)C.headers[Zr.REQUEST_HEADER]=`attempt=${U+1}; max=${E}`;const{response:X,output:M}=await s(w);return $.recordSuccess(I),M.$metadata.attempts=U+1,M.$metadata.totalRetryDelay=L,{response:X,output:M}}catch(X){const M=qO(X);if(F=$P(X),Y&&lO.isStreamingPayload(C))throw(h=f.logger instanceof kO.NoOpLogger?console:f.logger)==null||h.warn("An error was encountered in a non-retryable streaming request."),F;try{I=await $.refreshRetryTokenForRetry(I,M)}catch(q){if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=U+1,F.$metadata.totalRetryDelay=L,F}U=I.getRetryCount();const l=I.getRetryDelay();L+=l,await new Promise((q)=>setTimeout(q,l))}}else{if($=$,$==null?void 0:$.mode)f.userAgent=[...f.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(s,w)}},"retryMiddleware"),NO=kr((r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined","isRetryStrategyV2"),qO=kr((r)=>{const s={error:r,errorType:yO(r)},f=zP(r.$response);if(f)s.retryAfterHint=f;return s},"getRetryErrorInfo"),yO=kr((r)=>{if(Ns.isThrottlingError(r))return"THROTTLING";if(Ns.isTransientError(r))return"TRANSIENT";if(Ns.isServerError(r))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),AP={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},mO=kr((r)=>({applyToStack:(s)=>{s.add(WP(r),AP)}}),"getRetryPlugin"),zP=kr((r)=>{if(!wh.HttpResponse.isInstance(r))return;const s=Object.keys(r.headers).find(($)=>$.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 Or=v(($sr,mP)=>{function YP(r){const s=new Map;for(let f of r)s.set(f.schemeId,f);return s}function lP(r,s){return new qP(r,s)}function yP(r,s,f,w,h){return Rr(async function*$(E,I,...F){let U=E.startingToken||void 0,L=!0,C;while(L){if(I[f]=U,h)I[h]=I[h]??E.pageSize;if(E.client instanceof r)C=await Ei(s,E.client,I,...F);else throw new Error(`Invalid client, expected instance of ${r.name}`);yield C;const Y=U;U=Ii(C,w),L=!!(U&&(!E.stopOnSameToken||U!==Y))}return},"paginateOperation")}var{defineProperty:e$,getOwnPropertyDescriptor:jO,getOwnPropertyNames:vO}=Object,OO=Object.prototype.hasOwnProperty,Rr=(r,s)=>e$(r,"name",{value:s,configurable:!0}),iO=(r,s)=>{for(var f in s)e$(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(!OO.call(r,h)&&h!==f)e$(r,h,{get:()=>s[h],enumerable:!(w=jO(s,h))||w.enumerable})}return r},bO=(r)=>dO(e$({},"__esModule",{value:!0}),r),PP={};iO(PP,{DefaultIdentityProviderConfig:()=>pO,EXPIRATION_MS:()=>DP,HttpApiKeyAuthSigner:()=>uO,HttpBearerAuthSigner:()=>tO,NoAuthSigner:()=>ri,RequestBuilder:()=>qP,createIsIdentityExpiredFunction:()=>HP,createPaginator:()=>yP,doesIdentityRequireRefresh:()=>kP,getHttpAuthSchemeEndpointRuleSetPlugin:()=>_O,getHttpAuthSchemePlugin:()=>xO,getHttpSigningPlugin:()=>aO,getSmithyContext:()=>wi,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>KP,httpAuthSchemeMiddleware:()=>y5,httpAuthSchemeMiddlewareOptions:()=>ZP,httpSigningMiddleware:()=>SP,httpSigningMiddlewareOptions:()=>JP,isIdentityExpired:()=>fi,memoizeIdentityProvider:()=>si,normalizeProvider:()=>hi,requestBuilder:()=>lP});mP.exports=bO(PP);var XP=pr();Rr(YP,"convertHttpAuthSchemesToMap");var y5=Rr((r,s)=>(f,w)=>async(h)=>{var $;const E=r.httpAuthSchemeProvider(await s.httpAuthSchemeParametersProvider(r,w,h.input)),I=YP(r.httpAuthSchemes),F=XP.getSmithyContext(w),U=[];for(let L of E){const C=I.get(L.schemeId);if(!C){U.push(`HttpAuthScheme \`${L.schemeId}\` was not enabled for this service.`);continue}const Y=C.identityProvider(await s.identityProviderConfigProvider(r));if(!Y){U.push(`HttpAuthScheme \`${L.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:X={},signingProperties:M={}}=(($=L.propertiesExtractor)==null?void 0:$.call(L,r,w))||{};L.identityProperties=Object.assign(L.identityProperties||{},X),L.signingProperties=Object.assign(L.signingProperties||{},M),F.selectedHttpAuthScheme={httpAuthOption:L,identity:await Y(L.identityProperties),signer:C.signer};break}if(!F.selectedHttpAuthScheme)throw new Error(U.join("\n"));return f(h)},"httpAuthSchemeMiddleware"),cO=ZA(),KP={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:cO.endpointMiddlewareOptions.name},_O=Rr((r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f})=>({applyToStack:(w)=>{w.addRelativeTo(y5(r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f}),KP)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),gO=cF(),ZP={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:gO.serializerMiddlewareOption.name},xO=Rr((r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f})=>({applyToStack:(w)=>{w.addRelativeTo(y5(r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f}),ZP)}}),"getHttpAuthSchemePlugin"),n$=Fs(),eO=Rr((r)=>(s)=>{throw s},"defaultErrorHandler"),nO=Rr((r,s)=>{},"defaultSuccessHandler"),SP=Rr((r)=>(s,f)=>async(w)=>{if(!n$.HttpRequest.isInstance(w.request))return s(w);const $=XP.getSmithyContext(f).selectedHttpAuthScheme;if(!$)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:E={}},identity:I,signer:F}=$,U=await s({...w,request:await F.sign(w.request,I,E)}).catch((F.errorHandler||eO)(E));return(F.successHandler||nO)(U.response,E),U},"httpSigningMiddleware"),oO=RP(),JP={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:oO.retryMiddlewareOptions.name},aO=Rr((r)=>({applyToStack:(s)=>{s.addRelativeTo(SP(r),JP)}}),"getHttpSigningPlugin"),QP=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)}};Rr(QP,"DefaultIdentityProviderConfig");var pO=QP,x$=T0(),MP=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}};Rr(MP,"HttpApiKeyAuthSigner");var uO=MP,BP=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}};Rr(BP,"HttpBearerAuthSigner");var tO=BP,VP=class r{async sign(s,f,w){return s}};Rr(VP,"NoAuthSigner");var ri=VP,HP=Rr((r)=>(s)=>kP(s)&&s.expiration.getTime()-Date.now()<r,"createIsIdentityExpiredFunction"),DP=300000,fi=HP(DP),kP=Rr((r)=>r.expiration!==void 0,"doesIdentityRequireRefresh"),si=Rr((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=Rr(async(U)=>{if(!$)$=w(U);try{h=await $,E=!0,I=!1}finally{$=void 0}return h},"coalesceProvider");if(s===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(!f(h))return I=!0,h;if(s(h))return await F(U),h;return h}},"memoizeIdentityProvider"),wi=Rr((r)=>r[x$.SMITHY_CONTEXT_KEY]||(r[x$.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),hi=Rr((r)=>{if(typeof r==="function")return r;const s=Promise.resolve(r);return()=>s},"normalizeProvider"),$i=sh();Rr(lP,"requestBuilder");var NP=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 $ of this.resolvePathStack)$(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(($)=>{this.path=$i.resolvedPath($,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}};Rr(NP,"RequestBuilder");var qP=NP,Ei=Rr(async(r,s,f,...w)=>{return await s.send(new r(f),...w)},"makePagedClientRequest");Rr(yP,"createPaginator");var Ii=Rr((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 Fi(r){return(s)=>async(f)=>{const w=f.request;if(Mr.isInstance(w)){const{body:h,headers:$}=w;if(h&&Object.keys($).map((E)=>E.toLowerCase()).indexOf(jP)===-1)try{const E=r(h);w.headers={...w.headers,[jP]:String(E)}}catch(E){}}return s({...f,request:w})}}var jP="content-length",Ui,Mf=(r)=>({applyToStack:(s)=>{s.add(Fi(r.bodyLengthChecker),Ui)}});var hh=T(()=>{Nr();Ui={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var vP=async(r)=>{const s=r?.Bucket||"";if(typeof r.Bucket==="string")r.Bucket=s.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Ai(s)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Wi(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},Gi,Ti,Li,Wi=(r)=>Gi.test(r)&&!Ti.test(r)&&!Li.test(r),Ai=(r)=>{const[s,f,w,,,h]=r.split(":"),$=s==="arn"&&r.split(":").length>=6,E=Boolean($&&f&&w&&h);if($&&!E)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return E};var OP=T(()=>{Gi=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ti=/(\d+\.){3}\d+/,Li=/\.\./});var iP=T(()=>{OP()});var dP=(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:$,hostname:E,port:I,path:F}=h;return`${$}//${E}${I?":"+I:""}${F}`}}return h};return w};var M0;var K1=T(()=>{M0=class M0 extends Error{constructor(r,s=!0){let f,w=!0;if(typeof s==="boolean")f=void 0,w=s;else if(s!=null&&typeof s==="object")f=s.logger,w=s.tryNextLink??!0;super(r);this.name="ProviderError",this.tryNextLink=w,Object.setPrototypeOf(this,M0.prototype),f?.debug?.(`@smithy/property-provider ${w?"->":"(!)"} ${r}`)}static from(r,s=!0){return Object.assign(new this(r.message,s),r)}}});var x;var bP=T(()=>{K1();x=class x extends M0{constructor(r,s=!0){super(r,s);this.name="CredentialsProviderError",Object.setPrototypeOf(this,x.prototype)}}});var E0;var cP=T(()=>{K1();E0=class E0 extends M0{constructor(r,s=!0){super(r,s);this.name="TokenProviderError",Object.setPrototypeOf(this,E0.prototype)}}});var Ts=(...r)=>async()=>{if(r.length===0)throw new M0("No providers in chain");let s;for(let f of r)try{return await f()}catch(w){if(s=w,w?.tryNextLink)continue;throw w}throw s};var _P=T(()=>{K1()});var gP=(r)=>()=>Promise.resolve(r);var Cw=(r,s,f)=>{let w,h,$,E=!1;const I=async()=>{if(!h)h=r();try{w=await h,$=!0,E=!1}finally{h=void 0}return w};if(s===void 0)return async(F)=>{if(!$||F?.forceRefresh)w=await I();return w};return async(F)=>{if(!$||F?.forceRefresh)w=await I();if(E)return w;if(f&&!f(w))return E=!0,w;if(s(w))return await I(),w;return w}};var Lr=T(()=>{bP();K1();cP();_P()});function o$(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 xP=(r,s)=>async()=>{try{const f=r(process.env);if(f===void 0)throw new Error;return f}catch(f){throw new x(f.message||`Not found in ENV: ${o$(r.toString())}`,{logger:s})}};var eP=T(()=>{Lr()});import{homedir as zi}from"os";import{sep as Ci}from"path";var m5,Ri=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},qs=()=>{const{HOME:r,USERPROFILE:s,HOMEPATH:f,HOMEDRIVE:w=`C:${Ci}`}=process.env;if(r)return r;if(s)return s;if(f)return`${w}${f}`;const h=Ri();if(!m5[h])m5[h]=zi();return m5[h]};var $h=T(()=>{m5={}});var nP="AWS_PROFILE",B0=(r)=>r.profile||process.env.AWS_PROFILE||"default";import{createHash as Pi}from"crypto";import{join as Xi}from"path";var a$=(r)=>{const f=Pi("sha1").update(r).digest("hex");return Xi(qs(),".aws","sso","cache",`${f}.json`)};var j5=T(()=>{$h()});import{promises as Yi}from"fs";var Ki,p$=async(r)=>{const s=a$(r),f=await Ki(s,"utf8");return JSON.parse(f)};var oP=T(()=>{j5();({readFile:Ki}=Yi)});var v5,aP=(r)=>Object.entries(r).filter(([s])=>{const f=s.indexOf(V0);if(f===-1)return!1;return Object.values(v5.IniSectionType).includes(s.substring(0,f))}).reduce((s,[f,w])=>{const h=f.indexOf(V0),$=f.substring(0,h)===v5.IniSectionType.PROFILE?f.substring(h+1):f;return s[$]=w,s},{...r.default&&{default:r.default}});var pP=T(()=>{v5=g(T0(),1);Eh()});import{join as Zi}from"path";var Si="AWS_CONFIG_FILE",u$=()=>process.env[Si]||Zi(qs(),".aws","config");var O5=T(()=>{$h()});import{join as Ji}from"path";var Qi="AWS_SHARED_CREDENTIALS_FILE",uP=()=>process.env[Qi]||Ji(qs(),".aws","credentials");var tP=T(()=>{$h()});var rX,Mi,Bi,Z1=(r)=>{const s={};let f,w;for(let h of r.split(/\r?\n/)){const $=h.split(/(^|\s)[;#]/)[0].trim();if($[0]==="["&&$[$.length-1]==="]"){f=void 0,w=void 0;const I=$.substring(1,$.length-1),F=Mi.exec(I);if(F){const[,U,,L]=F;if(Object.values(rX.IniSectionType).includes(U))f=[U,L].join(V0)}else f=I;if(Bi.includes(I))throw new Error(`Found invalid profile name "${I}"`)}else if(f){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;s[f]=s[f]||{};const L=w?[w,F].join(V0):F;s[f][L]=U}}}}return s};var i5=T(()=>{rX=g(T0(),1);Eh();Mi=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Bi=["__proto__","profile __proto__"]});import{promises as Vi}from"fs";var Hi,d5,S1=(r,s)=>{if(!d5[r]||s?.ignoreCache)d5[r]=Hi(r,"utf8");return d5[r]};var b5=T(()=>{({readFile:Hi}=Vi),d5={}});import{join as fX}from"path";var sX=()=>({}),V0=".",t$=async(r={})=>{const{filepath:s=uP(),configFilepath:f=u$()}=r,w=qs();let $=s;if(s.startsWith("~/"))$=fX(w,s.slice(2));let E=f;if(f.startsWith("~/"))E=fX(w,f.slice(2));const I=await Promise.all([S1(E,{ignoreCache:r.ignoreCache}).then(Z1).then(aP).catch(sX),S1($,{ignoreCache:r.ignoreCache}).then(Z1).catch(sX)]);return{configFile:I[0],credentialsFile:I[1]}};var Eh=T(()=>{pP();O5();tP();$h();i5();b5()});var wX,hX=(r)=>Object.entries(r).filter(([s])=>s.startsWith(wX.IniSectionType.SSO_SESSION+V0)).reduce((s,[f,w])=>({...s,[f.substring(f.indexOf(V0)+1)]:w}),{});var $X=T(()=>{wX=g(T0(),1);Eh()});var Di=()=>({}),rE=async(r={})=>S1(r.configFilepath??u$()).then(Z1).then(hX).catch(Di);var EX=T(()=>{O5();$X();i5();b5()});var IX=(...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 ys=async(r)=>{const s=await t$(r);return IX(s.configFile,s.credentialsFile)};var FX=T(()=>{Eh()});var UX=()=>{};var u0=T(()=>{$h();j5();oP();Eh();EX();FX();UX()});var GX=(r,{preferredFile:s="config",...f}={})=>async()=>{const w=B0(f),{configFile:h,credentialsFile:$}=await t$(f),E=$[w]||{},I=h[w]||{},F=s==="config"?{...E,...I}:{...I,...E};try{const L=r(F,s==="config"?h:$);if(L===void 0)throw new Error;return L}catch(U){throw new x(U.message||`Not found in config files w/ profile [${w}]: ${o$(r.toString())}`,{logger:f.logger})}};var TX=T(()=>{Lr();u0()});var ki=(r)=>typeof r==="function",LX=(r)=>ki(r)?async()=>await r():gP(r);var WX=T(()=>{Lr()});var u=({environmentVariableSelector:r,configFileSelector:s,default:f},w={})=>Cw(Ts(xP(r),GX(s,w),LX(f)));var AX=T(()=>{Lr();eP();TX();WX()});var t0=T(()=>{AX()});var zX="AWS_ENDPOINT_URL",CX="endpoint_url",RX=(r)=>({environmentVariableSelector:(s)=>{const f=r.split(" ").map(($)=>$.toUpperCase()),w=s[[zX,...f].join("_")];if(w)return w;const h=s[zX];if(h)return h;return},configFileSelector:(s,f)=>{if(f&&s.services){const h=f[["services",s.services].join(V0)];if(h){const $=r.split(" ").map((I)=>I.toLowerCase()),E=h[[$.join("_"),CX].join(V0)];if(E)return E}}const w=s[CX];if(w)return w;return},default:void 0});var PX=T(()=>{u0()});var XX=async(r)=>u(RX(r))();var YX=T(()=>{t0();PX()});function KX(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 cr=(r)=>{if(typeof r==="string")return cr(new URL(r));const{hostname:s,pathname:f,port:w,protocol:h,search:$}=r;let E;if($)E=KX($);return{hostname:s,port:w?parseInt(w):void 0,protocol:h,path:f,query:E}};var ms=()=>{};var fE=(r)=>{if(typeof r==="object"){if("url"in r)return cr(r.url);return r}return cr(r)};var sE=T(()=>{ms()});var ZX=async(r,s,f,w)=>{if(!f.endpoint){const E=await XX(f.serviceId||"");if(E)f.endpoint=()=>Promise.resolve(fE(E))}const h=await li(r,s,f);if(typeof f.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return f.endpointProvider(h,w)},li=async(r,s,f)=>{const w={},h=s?.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 dP(E.name,$,f)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys(h).length===0)Object.assign(w,f);if(String(f.serviceId).toLowerCase()==="s3")await vP(w);return w};var c5=T(()=>{iP();YX();sE()});var SX=T(()=>{c5();sE()});var JX,QX=({config:r,instructions:s})=>{return(f,w)=>async(h)=>{const $=await ZX(h.input,{getEndpointParameterInstructions(){return s}},{...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=JX.getSmithyContext(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 f({...h})}};var _5=T(()=>{JX=g(pr(),1);c5()});var MX=(r,s)=>(f)=>async(w)=>{const{response:h}=await f(w);try{const $=await s(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 BX=(r,s)=>(f,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 s(h.input,{...r,endpoint:$});return f({...h,request:E})};function A(r,s,f){return{applyToStack:(w)=>{w.add(MX(r,f),Ni),w.add(BX(r,s),g5)}}}var Ni,g5;var VX=T(()=>{Ni={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},g5={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var B=T(()=>{VX()});var qi,z=(r,s)=>({applyToStack:(f)=>{f.addRelativeTo(QX({config:r,instructions:s}),qi)}});var HX=T(()=>{B();_5();qi={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:g5.name}});var wE,Bf=(r)=>{const s=r.tls??!0,{endpoint:f}=r,w=f!=null?async()=>fE(await wE.normalizeProvider(f)()):void 0;return{...r,endpoint:w,tls:s,isCustomEndpoint:!!f,useDualstackEndpoint:wE.normalizeProvider(r.useDualstackEndpoint??!1),useFipsEndpoint:wE.normalizeProvider(r.useFipsEndpoint??!1)}};var DX=T(()=>{wE=g(pr(),1);sE()});var kX=()=>{};var Q=T(()=>{SX();_5();HX();DX();kX()});var H0,Rw=3,D0;var hE=T(()=>{(function(r){r.STANDARD="standard",r.ADAPTIVE="adaptive"})(H0||(H0={}));D0=H0.STANDARD});class $E{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(),lX.isThrottlingError(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 lX;var x5=T(()=>{lX=g(Lw(),1)});var Pw=100,J1=20000,e5=500,EE=500,n5=5,o5=10,a5=1,IE="amz-sdk-invocation-id",FE="amz-sdk-request";var NX=()=>{let r=Pw;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(J1,Math.random()*2**w*r))},setDelayBase:(w)=>{r=w}}};var qX=()=>{};var p5=({retryDelay:r,retryCount:s,retryCost:f})=>{return{getRetryCount:()=>s,getRetryDelay:()=>Math.min(J1,r),getRetryCost:()=>f}};var yX=()=>{};class Ih{constructor(r){this.maxAttempts=r,this.mode=H0.STANDARD,this.capacity=EE,this.retryBackoffStrategy=NX(),this.maxAttemptsProvider=typeof r==="function"?r:async()=>r}async acquireInitialRetryToken(r){return p5({retryDelay:Pw,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"?e5:Pw);const h=this.retryBackoffStrategy.computeNextBackoffDelay(r.getRetryCount()),$=s.retryAfterHint?Math.max(s.retryAfterHint.getTime()-Date.now()||0,h):h,E=this.getCapacityCost(w);return this.capacity-=E,p5({retryDelay:$,retryCount:r.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess(r){this.capacity=Math.max(EE,this.capacity+(r.getRetryCost()??a5))}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 ${Rw}`),Rw}}shouldRetry(r,s,f){return r.getRetryCount()+1<f&&this.capacity>=this.getCapacityCost(s.errorType)&&this.isRetryableError(s.errorType)}getCapacityCost(r){return r==="TRANSIENT"?o5:n5}isRetryableError(r){return r==="THROTTLING"||r==="TRANSIENT"}}var UE=T(()=>{hE();qX();yX()});class u5{constructor(r,s){this.maxAttemptsProvider=r,this.mode=H0.ADAPTIVE;const{rateLimiter:f}=s??{};this.rateLimiter=f??new $E,this.standardRetryStrategy=new Ih(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 mX=T(()=>{hE();x5();UE()});var jX=T(()=>{UE()});var vX=()=>{};var L0=T(()=>{mX();jX();x5();UE();hE();vX()});var Vf,f1r,s1r,OX,w1r,h1r,$1r,E1r,I1r,F1r;var iX=T(()=>{Vf=g(pF(),1),f1r=Vf.default.v1,s1r=Vf.default.v3,OX=Vf.default.v4,w1r=Vf.default.v5,h1r=Vf.default.NIL,$1r=Vf.default.version,E1r=Vf.default.validate,I1r=Vf.default.stringify,F1r=Vf.default.parse});var dX=T(()=>{L0()});var t5=T(()=>{L0()});var GE;var rU=T(()=>{GE=g(Lw(),1)});var fU=(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 yi;var sU=T(()=>{Nr();yi=g(Lw(),1);L0();dX();t5();rU()});var bX=T(()=>{L0();sU()});var wU,cX="AWS_MAX_ATTEMPTS",_X="max_attempts",Hf,Df=(r)=>{const{retryStrategy:s}=r,f=wU.normalizeProvider(r.maxAttempts??Rw);return{...r,maxAttempts:f,retryStrategy:async()=>{if(s)return s;if(await wU.normalizeProvider(r.retryMode)()===H0.ADAPTIVE)return new u5(f);return new Ih(f)}}},mi="AWS_RETRY_MODE",ji="retry_mode",kf;var gX=T(()=>{wU=g(pr(),1);L0();Hf={environmentVariableSelector:(r)=>{const s=r[cX];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Environment variable ${cX} mast be a number, got "${s}"`);return f},configFileSelector:(r)=>{const s=r[_X];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Shared config file entry ${_X} mast be a number, got "${s}"`);return f},default:Rw},kf={environmentVariableSelector:(r)=>r[mi],configFileSelector:(r)=>r[ji],default:D0}});var xX=T(()=>{Nr();L0()});class W0{trace(){}debug(){}info(){}warn(){}error(){}}class A0{constructor(r){this.middlewareStack=eX.constructStack(),this.config=r}send(r,s,f){const w=typeof s!=="function"?s:void 0,h=typeof s==="function"?s:f,$=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 eX;var nX=T(()=>{eX=g(V$(),1)});var TE,_r=async(r=new Uint8Array,s)=>{if(r instanceof Uint8Array)return TE.Uint8ArrayBlobAdapter.mutate(r);if(!r)return TE.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const f=s.streamCollector(r);return TE.Uint8ArrayBlobAdapter.mutate(await f)};var oX=T(()=>{TE=g(i$(),1)});class W{constructor(){this.middlewareStack=aX.constructStack()}static classBuilder(){return new uX}resolveMiddlewareWithContext(r,s,f,{middlewareFn:w,clientName:h,commandName:$,inputFilterSensitiveLog:E,outputFilterSensitiveLog:I,smithyContext:F,additionalContext:U,CommandCtor:L}){for(let l of w.bind(this)(L,r,s,f))this.middlewareStack.use(l);const C=r.concat(this.middlewareStack),{logger:Y}=s,X={logger:Y,clientName:h,commandName:$,inputFilterSensitiveLog:E,outputFilterSensitiveLog:I,[pX.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...U},{requestHandler:M}=s;return C.resolve((l)=>M.handle(l.request,f||{}),X)}}class uX{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 W{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 aX,pX;var tX=T(()=>{aX=g(V$(),1),pX=g(T0(),1)});var n="***SensitiveInformation***";var lf=(r,s)=>{for(let f of Object.keys(r)){const w=r[f],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)},$=(f[0].toLowerCase()+f.slice(1)).replace(/Command$/,"");s.prototype[$]=h}};var lr=(r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},js=(r)=>{if(r===null||r===void 0)return;if(typeof r==="number"){if(r===0||r===1)WE.warn(LE(`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")WE.warn(LE(`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}`)},I0=(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))WE.warn(LE(`Expected number but observed string: ${r}`));return s}}if(typeof r==="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)},vi,rY=(r)=>{const s=I0(r);if(s!==void 0&&!Number.isNaN(s)&&s!==1/0&&s!==-1/0){if(Math.abs(s)>vi)throw new TypeError(`Expected 32-bit float, got ${r}`)}return s},Fh=(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}`)},Xw=(r)=>hU(r,32),fY=(r)=>hU(r,16),sY=(r)=>hU(r,8),hU=(r,s)=>{const f=Fh(r);if(f!==void 0&&Oi(f,s)!==f)throw new TypeError(`Expected ${s}-bit integer, got ${r}`);return f},Oi=(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]}},k=(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},i=(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}`)},G=(r)=>{if(r===null||r===void 0)return;if(typeof r==="string")return r;if(["boolean","number","bigint"].includes(typeof r))return WE.warn(LE(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)},$U=(r)=>{if(typeof r=="string")return I0(Uh(r));return I0(r)},wY,hY=(r)=>{if(typeof r=="string")return rY(Uh(r));return rY(r)},ii,Uh=(r)=>{const s=r.match(ii);if(s===null||s[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},EU=(r)=>{if(typeof r=="string")return di(r);return I0(r)},di=(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}`)}},gr=(r)=>{if(typeof r==="string")return Fh(Uh(r));return Fh(r)},hr=(r)=>{if(typeof r==="string")return Xw(Uh(r));return Xw(r)},IU=(r)=>{if(typeof r==="string")return fY(Uh(r));return fY(r)},$Y=(r)=>{if(typeof r==="string")return sY(Uh(r));return sY(r)},LE=(r)=>{return String(new TypeError(r).stack||r).split("\n").slice(0,5).filter((s)=>!s.includes("stackTraceWarning")).join("\n")},WE;var FU=T(()=>{vi=Math.ceil(340282346638528860000000000000000000000),wY=$U,ii=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,WE={warn:console.warn}});var bi,ci,EY=(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=ci.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,$,E,I,F,U]=s,L=IU(UU(w)),C=Yw(h,"month",1,12),Y=Yw($,"day",1,31);return IY(L,C,Y,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U})},_i,Kw=(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=_i.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,$,E,I,F,U,L]=s,C=IU(UU(w)),Y=Yw(h,"month",1,12),X=Yw($,"day",1,31),M=IY(C,Y,X,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U});if(L.toUpperCase()!="Z")M.setTime(M.getTime()-oi(L));return M},_1r,g1r,x1r,Nf=(r)=>{if(r===null||r===void 0)return;let s;if(typeof r==="number")s=r;else if(typeof r==="string")s=$U(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))},IY=(r,s,f,w)=>{const h=s-1;return xi(r,h,f),new Date(Date.UTC(r,h,f,Yw(w.hours,"hour",0,23),Yw(w.minutes,"minute",0,59),Yw(w.seconds,"seconds",0,60),ni(w.fractionalMilliseconds)))},gi,xi=(r,s,f)=>{let w=gi[s];if(s===1&&ei(r))w=29;if(f>w)throw new TypeError(`Invalid day for ${bi[s]} in ${r}: ${f}`)},ei=(r)=>{return r%4===0&&(r%100!==0||r%400===0)},Yw=(r,s,f,w)=>{const h=$Y(UU(r));if(h<f||h>w)throw new TypeError(`${s} must be between ${f} and ${w}, inclusive`);return h},ni=(r)=>{if(r===null||r===void 0)return 0;return hY("0."+r)*1000},oi=(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 FY=T(()=>{FU();bi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ci=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),_i=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),_1r=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$/),g1r=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$/),x1r=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})$/),gi=[31,28,31,30,31,30,31,31,30,31,30,31]});var k0,H=(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 GU=T(()=>{k0=class k0 extends Error{constructor(r){super(r.message);Object.setPrototypeOf(this,k0.prototype),this.name=r.name,this.$fault=r.$fault,this.$metadata=r.$metadata}}});var ai=({output:r,parsedBody:s,exceptionCtor:f,errorCode:w})=>{const h=pi(r),$=h.httpStatusCode?h.httpStatusCode+"":void 0,E=new f({name:s?.code||s?.Code||w||$||"UnknownError",$fault:"client",$metadata:h});throw H(E,s)},qf=(r)=>{return({output:s,parsedBody:f,errorCode:w})=>{ai({output:s,parsedBody:f,exceptionCtor:r,errorCode:w})}},pi=(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 UY=T(()=>{GU()});var yf=(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 GY=!1,mf=(r)=>{if(r&&!GY&&parseInt(r.substring(1,r.indexOf(".")))<16)GY=!0};var TU,TY=(r)=>{const s=[];for(let f in TU.AlgorithmId){const w=TU.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}}},LY=(r)=>{const s={};return r.checksumAlgorithms().forEach((f)=>{s[f.algorithmId()]=f.checksumConstructor()}),s};var WY=T(()=>{TU=g(T0(),1)});var AY=(r)=>{let s=r.retryStrategy;return{setRetryStrategy(f){s=f},retryStrategy(){return s}}},zY=(r)=>{const s={};return s.retryStrategy=r.retryStrategy(),s};var jf=(r)=>{return{...TY(r),...AY(r)}},vf=(r)=>{return{...LY(r),...zY(r)}};var CY=T(()=>{WY()});var RY=T(()=>{CY()});function AE(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(s){return"%"+s.charCodeAt(0).toString(16).toUpperCase()})}var Tr=(r)=>Array.isArray(r)?r:[r];var LU=function(){const r=Object.getPrototypeOf(this).constructor,f=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(f,r.prototype),f};var PY=T(()=>{LU.prototype=Object.create(String.prototype,{constructor:{value:LU,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(LU,String)});function R(r,s,f){let w,h,$;if(typeof s==="undefined"&&typeof f==="undefined")w={},$=r;else if(w=r,typeof s==="function")return h=s,$=f,ui(w,h,$);else $=s;for(let E of Object.keys($)){if(!Array.isArray($[E])){w[E]=$[E];continue}XY(w,null,$,E)}return w}var a=(r,s)=>{const f={};for(let w in s)XY(f,r,s,w);return f},ui=(r,s,f)=>{return R(r,Object.entries(f).reduce((w,[h,$])=>{if(Array.isArray($))w[h]=$;else if(typeof $==="function")w[h]=[s,$()];else w[h]=[s,$];return w},{}))},XY=(r,s,f,w)=>{if(s!==null){let E=f[w];if(typeof E==="function")E=[,E];const[I=ti,F=rd,U=w]=E;if(typeof I==="function"&&I(s[U])||typeof I!=="function"&&!!I)r[w]=F(s[U]);return}let[h,$]=f[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]=$}},ti=(r)=>r!=null,rd=(r)=>r;var YY=()=>{};var KY=(r)=>{if(r!==r)return"NaN";switch(r){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return r}};var N=(r)=>{if(r==null)return{};if(Array.isArray(r))return r.filter((s)=>s!=null).map(N);if(typeof r==="object"){const s={};for(let f of Object.keys(r)){if(r[f]==null)continue;s[f]=N(r[f])}return s}return r};var K=T(()=>{nX();oX();tX();FY();UY();RY();GU();PY();FU();YY()});import{Readable as fd}from"stream";var ZY=(r)=>r?.body instanceof fd||typeof ReadableStream!=="undefined"&&r?.body instanceof ReadableStream;var SY=()=>{};var Gh,sd=(r)=>(s,f)=>async(w)=>{let h=await r.retryStrategy();const $=await r.maxAttempts();if(wd(h)){h=h;let E=await h.acquireInitialRetryToken(f.partition_id),I=new Error,F=0,U=0;const{request:L}=w,C=Mr.isInstance(L);if(C)L.headers[IE]=OX();while(!0)try{if(C)L.headers[FE]=`attempt=${F+1}; max=${$}`;const{response:Y,output:X}=await s(w);return h.recordSuccess(E),X.$metadata.attempts=F+1,X.$metadata.totalRetryDelay=U,{response:Y,output:X}}catch(Y){const X=hd(Y);if(I=fU(Y),C&&ZY(L))throw(f.logger instanceof W0?console:f.logger)?.warn("An error was encountered in a non-retryable streaming request."),I;try{E=await h.refreshRetryTokenForRetry(E,X)}catch(l){if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=F+1,I.$metadata.totalRetryDelay=U,I}F=E.getRetryCount();const M=E.getRetryDelay();U+=M,await new Promise((l)=>setTimeout(l,M))}}else{if(h=h,h?.mode)f.userAgent=[...f.userAgent||[],["cfg/retry-mode",h.mode]];return h.retry(s,w)}},wd=(r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined",hd=(r)=>{const s={error:r,errorType:$d(r)},f=Id(r.$response);if(f)s.retryAfterHint=f;return s},$d=(r)=>{if(Gh.isThrottlingError(r))return"THROTTLING";if(Gh.isTransientError(r))return"TRANSIENT";if(Gh.isServerError(r))return"SERVER_ERROR";return"CLIENT_ERROR"},Ed,Of=(r)=>({applyToStack:(s)=>{s.add(sd(r),Ed)}}),Id=(r)=>{if(!Fw.isInstance(r))return;const s=Object.keys(r.headers).find(($)=>$.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 JY=T(()=>{Nr();Gh=g(Lw(),1);K();L0();iX();SY();Ed={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var rf=T(()=>{bX();sU();gX();t5();xX();rU();JY()});var uY=v((s$r,RE)=>{var QY,MY,BY,VY,HY,DY,kY,lY,NY,qY,yY,mY,jY,zE,WU,vY,OY,iY,Th,dY,bY,cY,_Y,gY,xY,eY,nY,oY,CE,aY,pY;(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 RE==="object"&&typeof s$r==="object")r(f(s,f(s$r)));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[$]=h?h($,E):E}}})(function(r){var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,$){h.__proto__=$}||function(h,$){for(var E in $)if(Object.prototype.hasOwnProperty.call($,E))h[E]=$[E]};QY=function(h,$){if(typeof $!=="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");s(h,$);function E(){this.constructor=h}h.prototype=$===null?Object.create($):(E.prototype=$.prototype,new E)},MY=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},BY=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},VY=function(h,$,E,I){var F=arguments.length,U=F<3?$:I===null?I=Object.getOwnPropertyDescriptor($,E):I,L;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")U=Reflect.decorate(h,$,E,I);else for(var C=h.length-1;C>=0;C--)if(L=h[C])U=(F<3?L(U):F>3?L($,E,U):L($,E))||U;return F>3&&U&&Object.defineProperty($,E,U),U},HY=function(h,$){return function(E,I){$(E,I,h)}},DY=function(h,$,E,I,F,U){function L(Wr){if(Wr!==void 0&&typeof Wr!=="function")throw new TypeError("Function expected");return Wr}var C=I.kind,Y=C==="getter"?"get":C==="setter"?"set":"value",X=!$&&h?I.static?h:h.prototype:null,M=$||(X?Object.getOwnPropertyDescriptor(X,I.name):{}),l,q=!1;for(var D=E.length-1;D>=0;D--){var m={};for(var p in I)m[p]=p==="access"?{}:I[p];for(var p in I.access)m.access[p]=I.access[p];m.addInitializer=function(Wr){if(q)throw new TypeError("Cannot add initializers after decoration has completed");U.push(L(Wr||null))};var t=E[D](C==="accessor"?{get:M.get,set:M.set}:M[Y],m);if(C==="accessor"){if(t===void 0)continue;if(t===null||typeof t!=="object")throw new TypeError("Object expected");if(l=L(t.get))M.get=l;if(l=L(t.set))M.set=l;if(l=L(t.init))F.unshift(l)}else if(l=L(t))if(C==="field")F.unshift(l);else M[Y]=l}if(X)Object.defineProperty(X,I.name,M);q=!0},kY=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},lY=function(h){return typeof h==="symbol"?h:"".concat(h)},NY=function(h,$,E){if(typeof $==="symbol")$=$.description?"[".concat($.description,"]"):"";return Object.defineProperty(h,"name",{configurable:!0,value:E?"".concat(E," ",$):$})},qY=function(h,$){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(h,$)},yY=function(h,$,E,I){function F(U){return U instanceof E?U:new E(function(L){L(U)})}return new(E||(E=Promise))(function(U,L){function C(M){try{X(I.next(M))}catch(l){L(l)}}function Y(M){try{X(I.throw(M))}catch(l){L(l)}}function X(M){M.done?U(M.value):F(M.value).then(C,Y)}X((I=I.apply(h,$||[])).next())})},mY=function(h,$){var E={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},I,F,U,L;return L={next:C(0),throw:C(1),return:C(2)},typeof Symbol==="function"&&(L[Symbol.iterator]=function(){return this}),L;function C(X){return function(M){return Y([X,M])}}function Y(X){if(I)throw new TypeError("Generator is already executing.");while(L&&(L=0,X[0]&&(E=0)),E)try{if(I=1,F&&(U=X[0]&2?F.return:X[0]?F.throw||((U=F.return)&&U.call(F),0):F.next)&&!(U=U.call(F,X[1])).done)return U;if(F=0,U)X=[X[0]&2,U.value];switch(X[0]){case 0:case 1:U=X;break;case 4:return E.label++,{value:X[1],done:!1};case 5:E.label++,F=X[1],X=[0];continue;case 7:X=E.ops.pop(),E.trys.pop();continue;default:if((U=E.trys,!(U=U.length>0&&U[U.length-1]))&&(X[0]===6||X[0]===2)){E=0;continue}if(X[0]===3&&(!U||X[1]>U[0]&&X[1]<U[3])){E.label=X[1];break}if(X[0]===6&&E.label<U[1]){E.label=U[1],U=X;break}if(U&&E.label<U[2]){E.label=U[2],E.ops.push(X);break}if(U[2])E.ops.pop();E.trys.pop();continue}X=$.call(h,E)}catch(M){X=[6,M],F=0}finally{I=U=0}if(X[0]&5)throw X[1];return{value:X[0]?X[1]:void 0,done:!0}}},jY=function(h,$){for(var E in h)if(E!=="default"&&!Object.prototype.hasOwnProperty.call($,E))CE($,h,E)},CE=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]},zE=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.")},WU=function(h,$){var E=typeof Symbol==="function"&&h[Symbol.iterator];if(!E)return h;var I=E.call(h),F,U=[],L;try{while(($===void 0||$-- >0)&&!(F=I.next()).done)U.push(F.value)}catch(C){L={error:C}}finally{try{if(F&&!F.done&&(E=I.return))E.call(I)}finally{if(L)throw L.error}}return U},vY=function(){for(var h=[],$=0;$<arguments.length;$++)h=h.concat(WU(arguments[$]));return h},OY=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[$],L=0,C=U.length;L<C;L++,F++)I[F]=U[L];return I},iY=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($))},Th=function(h){return this instanceof Th?(this.v=h,this):new Th(h)},dY=function(h,$,E){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var I=E.apply(h,$||[]),F,U=[];return F={},C("next"),C("throw"),C("return",L),F[Symbol.asyncIterator]=function(){return this},F;function L(D){return function(m){return Promise.resolve(m).then(D,l)}}function C(D,m){if(I[D]){if(F[D]=function(p){return new Promise(function(t,Wr){U.push([D,p,t,Wr])>1||Y(D,p)})},m)F[D]=m(F[D])}}function Y(D,m){try{X(I[D](m))}catch(p){q(U[0][3],p)}}function X(D){D.value instanceof Th?Promise.resolve(D.value.v).then(M,l):q(U[0][2],D)}function M(D){Y("next",D)}function l(D){Y("throw",D)}function q(D,m){if(D(m),U.shift(),U.length)Y(U[0][0],U[0][1])}},bY=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(L){return(E=!E)?{value:Th(h[F](L)),done:!1}:U?U(L):L}:U}},cY=function(h){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var $=h[Symbol.asyncIterator],E;return $?$.call(h):(h=typeof zE==="function"?zE(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(L){return new Promise(function(C,Y){L=h[U](L),F(C,Y,L.done,L.value)})}}function F(U,L,C,Y){Promise.resolve(Y).then(function(X){U({value:X,done:C})},L)}},_Y=function(h,$){if(Object.defineProperty)Object.defineProperty(h,"raw",{value:$});else h.raw=$;return h};var f=Object.create?function(h,$){Object.defineProperty(h,"default",{enumerable:!0,value:$})}:function(h,$){h.default=$};gY=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))CE($,h,E)}return f($,h),$},xY=function(h){return h&&h.__esModule?h:{default:h}},eY=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)},nY=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},oY=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($)},aY=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};pY=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",QY),r("__assign",MY),r("__rest",BY),r("__decorate",VY),r("__param",HY),r("__esDecorate",DY),r("__runInitializers",kY),r("__propKey",lY),r("__setFunctionName",NY),r("__metadata",qY),r("__awaiter",yY),r("__generator",mY),r("__exportStar",jY),r("__createBinding",CE),r("__values",zE),r("__read",WU),r("__spread",vY),r("__spreadArrays",OY),r("__spreadArray",iY),r("__await",Th),r("__asyncGenerator",dY),r("__asyncDelegator",bY),r("__asyncValues",cY),r("__makeTemplateObject",_Y),r("__importStar",gY),r("__importDefault",xY),r("__classPrivateFieldGet",eY),r("__classPrivateFieldSet",nY),r("__classPrivateFieldIn",oY),r("__addDisposableResource",aY),r("__disposeResources",pY)})});var sK=v((w$r,fK)=>{var{defineProperty:PE,getOwnPropertyDescriptor:Fd,getOwnPropertyNames:Ud}=Object,Gd=Object.prototype.hasOwnProperty,Td=(r,s)=>PE(r,"name",{value:s,configurable:!0}),Ld=(r,s)=>{for(var f in s)PE(r,f,{get:s[f],enumerable:!0})},Wd=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Ud(s))if(!Gd.call(r,h)&&h!==f)PE(r,h,{get:()=>s[h],enumerable:!(w=Fd(s,h))||w.enumerable})}return r},Ad=(r)=>Wd(PE({},"__esModule",{value:!0}),r),rK={};Ld(rK,{emitWarningIfUnsupportedVersion:()=>zd});fK.exports=Ad(rK);var tY=!1,zd=Td((r)=>{if(r&&!tY&&parseInt(r.substring(1,r.indexOf(".")))<18)tY=!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 XK=v((L2r,PK)=>{function k5(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:fc,getOwnPropertyNames:wc}=Object,hc=Object.prototype.hasOwnProperty,Nr=(r,f)=>V3(r,"name",{value:f,configurable:!0}),$c=(r,f)=>{for(var s in f)V3(r,s,{get:f[s],enumerable:!0})},Ec=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of wc(f))if(!hc.call(r,h)&&h!==s)V3(r,h,{get:()=>f[h],enumerable:!(w=fc(f,h))||w.enumerable})}return r},Ic=(r)=>Ec(V3({},"__esModule",{value:!0}),r),$K={};$c($K,{SignatureV4:()=>ic,clearCredentialCache:()=>lc,createScope:()=>B3,getCanonicalHeaders:()=>V5,getCanonicalQuery:()=>LK,getPayloadHash:()=>H3,getSigningKey:()=>CK,moveHeadersToQuery:()=>zK,prepareRequest:()=>D5});PK.exports=Ic($K);var sK=G1(),M5=j0(),Fc="X-Amz-Algorithm",Uc="X-Amz-Credential",EK="X-Amz-Date",Tc="X-Amz-SignedHeaders",Gc="X-Amz-Expires",IK="X-Amz-Signature",FK="X-Amz-Security-Token",UK="authorization",TK=EK.toLowerCase(),Cc="date",Lc=[UK,TK,Cc],Ac=IK.toLowerCase(),H5="x-amz-content-sha256",Rc=FK.toLowerCase(),Wc={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},zc=/^proxy-/,Sc=/^sec-/,B5="AWS4-HMAC-SHA256",Pc="AWS4-HMAC-SHA256-PAYLOAD",Xc="UNSIGNED-PAYLOAD",Yc=50,GK="aws4_request",Kc=604800,e0=xE(),Zc=j0(),Xh={},M3=[],B3=Nr((r,f,s)=>`${r}/${f}/${s}/${GK}`,"createScope"),CK=Nr(async(r,f,s,w,h)=>{const $=await fK(r,f.secretAccessKey,f.accessKeyId),E=`${s}:${w}:${h}:${e0.toHex($)}:${f.sessionToken}`;if(E in Xh)return Xh[E];M3.push(E);while(M3.length>Yc)delete Xh[M3.shift()];let I=`AWS4${f.secretAccessKey}`;for(let F of[s,w,h,GK])I=await fK(r,I,F);return Xh[E]=I},"getSigningKey"),lc=Nr(()=>{M3.length=0,Object.keys(Xh).forEach((r)=>{delete Xh[r]})},"clearCredentialCache"),fK=Nr((r,f,s)=>{const w=new r(f);return w.update(Zc.toUint8Array(s)),w.digest()},"hmac"),V5=Nr(({headers:r},f,s)=>{const w={};for(let h of Object.keys(r).sort()){if(r[h]==null)continue;const $=h.toLowerCase();if($ in Wc||(f==null?void 0:f.has($))||zc.test($)||Sc.test($)){if(!s||s&&!s.has($))continue}w[$]=r[h].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),y1=LU(),LK=Nr(({query:r={}})=>{const f=[],s={};for(let w of Object.keys(r).sort()){if(w.toLowerCase()===Ac)continue;f.push(w);const h=r[w];if(typeof h==="string")s[w]=`${y1.escapeUri(w)}=${y1.escapeUri(h)}`;else if(Array.isArray(h))s[w]=h.slice(0).reduce(($,E)=>$.concat([`${y1.escapeUri(w)}=${y1.escapeUri(E)}`]),[]).sort().join("&")}return f.map((w)=>s[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),Jc=IU(),Qc=j0(),H3=Nr(async({headers:r,body:f},s)=>{for(let w of Object.keys(r))if(w.toLowerCase()===H5)return r[w];if(f==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof f==="string"||ArrayBuffer.isView(f)||Jc.isArrayBuffer(f)){const w=new s;return w.update(Qc.toUint8Array(f)),e0.toHex(await w.digest())}return Xc},"getPayloadHash"),wK=j0(),AK=class r{format(f){const s=[];for(let $ of Object.keys(f)){const E=wK.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=wK.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(Hc.fromNumber(f.value.valueOf()).bytes,1),C;case"uuid":if(!Bc.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);const L=new Uint8Array(17);return L[0]=9,L.set(e0.fromHex(f.value.replace(/\-/g,"")),1),L}}};Nr(AK,"HeaderFormatter");var Mc=AK,Bc=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,RK=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)k5(s);return new r(s)}valueOf(){const f=this.bytes.slice(0),s=f[0]&128;if(s)k5(f);return parseInt(e0.toHex(f),16)*(s?-1:1)}toString(){return String(this.valueOf())}};Nr(RK,"Int64");var Hc=RK;Nr(k5,"negate");var Vc=Nr((r,f)=>{r=r.toLowerCase();for(let s of Object.keys(f))if(r===s.toLowerCase())return!0;return!1},"hasHeader"),WK=G0(),zK=Nr((r,f={})=>{var s;const{headers:w,query:h={}}=WK.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"),D5=Nr((r)=>{r=WK.HttpRequest.clone(r);for(let f of Object.keys(r.headers))if(Lc.indexOf(f.toLowerCase())>-1)delete r.headers[f];return r},"prepareRequest"),kc=Nr((r)=>Dc(r).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),Dc=Nr((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"),SK=class r{constructor({applyChecksum:f,credentials:s,region:w,service:h,sha256:$,uriEscapePath:E=!0}){this.headerFormatter=new Mc,this.service=h,this.sha256=$,this.uriEscapePath=E,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=sK.normalizeProvider(w),this.credentialProvider=sK.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}=Q3(w);if(h>Kc)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const Z=B3(S,L,U??this.service),D=zK(D5(f),{unhoistableHeaders:E});if(C.sessionToken)D.query[FK]=C.sessionToken;D.query[Fc]=B5,D.query[Uc]=`${C.accessKeyId}/${Z}`,D.query[EK]=z,D.query[Gc]=h.toString(10);const B=V5(D,$,I);return D.query[Tc]=hK(B),D.query[IK]=await this.getSignature(z,Z,this.getSigningKey(C,L,S,U),this.createCanonicalRequest(D,B,await H3(f,this.sha256))),D}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}=Q3(w),C=B3(F,I,E??this.service),L=await H3({headers:{},body:s},this.sha256),z=new this.sha256;z.update(f);const S=e0.toHex(await z.digest()),Z=[Pc,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}=Q3(s),F=new this.sha256(await this.getSigningKey($,E,I,h));return F.update(M5.toUint8Array(f)),e0.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=D5(f),{longDate:C,shortDate:L}=Q3(s),z=B3(L,F,E??this.service);if(U.headers[TK]=C,I.sessionToken)U.headers[Rc]=I.sessionToken;const S=await H3(U,this.sha256);if(!Vc(H5,U.headers)&&this.applyChecksum)U.headers[H5]=S;const Z=V5(U,h,w),D=await this.getSignature(C,z,this.getSigningKey(I,F,L,E),this.createCanonicalRequest(U,Z,S));return U.headers[UK]=`${B5} Credential=${I.accessKeyId}/${z}, SignedHeaders=${hK(Z)}, Signature=${D}`,U}createCanonicalRequest(f,s,w){const h=Object.keys(s).sort();return`${f.method}
13
- ${this.getCanonicalPath(f)}
14
- ${LK(f)}
15
- ${h.map(($)=>`${$}:${s[$]}`).join("\n")}
10
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var ZK=v((h$r,KK)=>{function PU(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:SE,getOwnPropertyDescriptor:Cd,getOwnPropertyNames:Rd}=Object,Pd=Object.prototype.hasOwnProperty,qr=(r,s)=>SE(r,"name",{value:s,configurable:!0}),Xd=(r,s)=>{for(var f in s)SE(r,f,{get:s[f],enumerable:!0})},Yd=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Rd(s))if(!Pd.call(r,h)&&h!==f)SE(r,h,{get:()=>s[h],enumerable:!(w=Cd(s,h))||w.enumerable})}return r},Kd=(r)=>Yd(SE({},"__esModule",{value:!0}),r),IK={};Xd(IK,{SignatureV4:()=>ed,clearCredentialCache:()=>vd,createScope:()=>KE,getCanonicalHeaders:()=>RU,getCanonicalQuery:()=>zK,getPayloadHash:()=>ZE,getSigningKey:()=>AK,moveHeadersToQuery:()=>XK,prepareRequest:()=>XU});KK.exports=Kd(IK);var wK=pr(),AU=ls(),Zd="X-Amz-Algorithm",Sd="X-Amz-Credential",FK="X-Amz-Date",Jd="X-Amz-SignedHeaders",Qd="X-Amz-Expires",UK="X-Amz-Signature",GK="X-Amz-Security-Token",TK="authorization",LK=FK.toLowerCase(),Md="date",Bd=[TK,LK,Md],Vd=UK.toLowerCase(),CU="x-amz-content-sha256",Hd=GK.toLowerCase(),Dd={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},kd=/^proxy-/,ld=/^sec-/,zU="AWS4-HMAC-SHA256",Nd="AWS4-HMAC-SHA256-PAYLOAD",qd="UNSIGNED-PAYLOAD",yd=50,WK="aws4_request",md=604800,vs=C5(),jd=ls(),Lh={},YE=[],KE=qr((r,s,f)=>`${r}/${s}/${f}/${WK}`,"createScope"),AK=qr(async(r,s,f,w,h)=>{const $=await hK(r,s.secretAccessKey,s.accessKeyId),E=`${f}:${w}:${h}:${vs.toHex($)}:${s.sessionToken}`;if(E in Lh)return Lh[E];YE.push(E);while(YE.length>yd)delete Lh[YE.shift()];let I=`AWS4${s.secretAccessKey}`;for(let F of[f,w,h,WK])I=await hK(r,I,F);return Lh[E]=I},"getSigningKey"),vd=qr(()=>{YE.length=0,Object.keys(Lh).forEach((r)=>{delete Lh[r]})},"clearCredentialCache"),hK=qr((r,s,f)=>{const w=new r(s);return w.update(jd.toUint8Array(f)),w.digest()},"hmac"),RU=qr(({headers:r},s,f)=>{const w={};for(let h of Object.keys(r).sort()){if(r[h]==null)continue;const $=h.toLowerCase();if($ in Dd||(s==null?void 0:s.has($))||kd.test($)||ld.test($)){if(!f||f&&!f.has($))continue}w[$]=r[h].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),Q1=U5(),zK=qr(({query:r={}})=>{const s=[],f={};for(let w of Object.keys(r).sort()){if(w.toLowerCase()===Vd)continue;s.push(w);const h=r[w];if(typeof h==="string")f[w]=`${Q1.escapeUri(w)}=${Q1.escapeUri(h)}`;else if(Array.isArray(h))f[w]=h.slice(0).reduce(($,E)=>$.concat([`${Q1.escapeUri(w)}=${Q1.escapeUri(E)}`]),[]).sort().join("&")}return s.map((w)=>f[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),Od=w5(),id=ls(),ZE=qr(async({headers:r,body:s},f)=>{for(let w of Object.keys(r))if(w.toLowerCase()===CU)return r[w];if(s==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof s==="string"||ArrayBuffer.isView(s)||Od.isArrayBuffer(s)){const w=new f;return w.update(id.toUint8Array(s)),vs.toHex(await w.digest())}return qd},"getPayloadHash"),$K=ls(),CK=class r{format(s){const f=[];for(let $ of Object.keys(s)){const E=$K.fromUtf8($);f.push(Uint8Array.from([E.byteLength]),E,this.formatHeaderValue(s[$]))}const w=new Uint8Array(f.reduce(($,E)=>$+E.byteLength,0));let h=0;for(let $ of f)w.set($,h),h+=$.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 $=new DataView(new ArrayBuffer(3+s.value.byteLength));$.setUint8(0,6),$.setUint16(1,s.value.byteLength,!1);const E=new Uint8Array($.buffer);return E.set(s.value,3),E;case"string":const I=$K.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 L=new Uint8Array(9);return L[0]=8,L.set(cd.fromNumber(s.value.valueOf()).bytes,1),L;case"uuid":if(!bd.test(s.value))throw new Error(`Invalid UUID received: ${s.value}`);const C=new Uint8Array(17);return C[0]=9,C.set(vs.fromHex(s.value.replace(/\-/g,"")),1),C}}};qr(CK,"HeaderFormatter");var dd=CK,bd=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,RK=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)PU(f);return new r(f)}valueOf(){const s=this.bytes.slice(0),f=s[0]&128;if(f)PU(s);return parseInt(vs.toHex(s),16)*(f?-1:1)}toString(){return String(this.valueOf())}};qr(RK,"Int64");var cd=RK;qr(PU,"negate");var _d=qr((r,s)=>{r=r.toLowerCase();for(let f of Object.keys(s))if(r===f.toLowerCase())return!0;return!1},"hasHeader"),PK=Fs(),XK=qr((r,s={})=>{var f;const{headers:w,query:h={}}=PK.HttpRequest.clone(r);for(let $ of Object.keys(w)){const E=$.toLowerCase();if(E.slice(0,6)==="x-amz-"&&!((f=s.unhoistableHeaders)==null?void 0:f.has(E)))h[$]=w[$],delete w[$]}return{...r,headers:w,query:h}},"moveHeadersToQuery"),XU=qr((r)=>{r=PK.HttpRequest.clone(r);for(let s of Object.keys(r.headers))if(Bd.indexOf(s.toLowerCase())>-1)delete r.headers[s];return r},"prepareRequest"),gd=qr((r)=>xd(r).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),xd=qr((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"),YK=class r{constructor({applyChecksum:s,credentials:f,region:w,service:h,sha256:$,uriEscapePath:E=!0}){this.headerFormatter=new dd,this.service=h,this.sha256=$,this.uriEscapePath=E,this.applyChecksum=typeof s==="boolean"?s:!0,this.regionProvider=wK.normalizeProvider(w),this.credentialProvider=wK.normalizeProvider(f)}async presign(s,f={}){const{signingDate:w=new Date,expiresIn:h=3600,unsignableHeaders:$,unhoistableHeaders:E,signableHeaders:I,signingRegion:F,signingService:U}=f,L=await this.credentialProvider();this.validateResolvedCredentials(L);const C=F??await this.regionProvider(),{longDate:Y,shortDate:X}=XE(w);if(h>md)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const M=KE(X,C,U??this.service),l=XK(XU(s),{unhoistableHeaders:E});if(L.sessionToken)l.query[GK]=L.sessionToken;l.query[Zd]=zU,l.query[Sd]=`${L.accessKeyId}/${M}`,l.query[FK]=Y,l.query[Qd]=h.toString(10);const q=RU(l,$,I);return l.query[Jd]=EK(q),l.query[UK]=await this.getSignature(Y,M,this.getSigningKey(L,C,X,U),this.createCanonicalRequest(l,q,await ZE(s,this.sha256))),l}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:$,signingService:E}){const I=$??await this.regionProvider(),{shortDate:F,longDate:U}=XE(w),L=KE(F,I,E??this.service),C=await ZE({headers:{},body:f},this.sha256),Y=new this.sha256;Y.update(s);const X=vs.toHex(await Y.digest()),M=[Nd,U,L,h,X,C].join("\n");return this.signString(M,{signingDate:w,signingRegion:I,signingService:E})}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((E)=>{return{message:s.message,signature:E}})}async signString(s,{signingDate:f=new Date,signingRegion:w,signingService:h}={}){const $=await this.credentialProvider();this.validateResolvedCredentials($);const E=w??await this.regionProvider(),{shortDate:I}=XE(f),F=new this.sha256(await this.getSigningKey($,E,I,h));return F.update(AU.toUint8Array(s)),vs.toHex(await F.digest())}async signRequest(s,{signingDate:f=new Date,signableHeaders:w,unsignableHeaders:h,signingRegion:$,signingService:E}={}){const I=await this.credentialProvider();this.validateResolvedCredentials(I);const F=$??await this.regionProvider(),U=XU(s),{longDate:L,shortDate:C}=XE(f),Y=KE(C,F,E??this.service);if(U.headers[LK]=L,I.sessionToken)U.headers[Hd]=I.sessionToken;const X=await ZE(U,this.sha256);if(!_d(CU,U.headers)&&this.applyChecksum)U.headers[CU]=X;const M=RU(U,h,w),l=await this.getSignature(L,Y,this.getSigningKey(I,F,C,E),this.createCanonicalRequest(U,M,X));return U.headers[TK]=`${zU} Credential=${I.accessKeyId}/${Y}, SignedHeaders=${EK(M)}, Signature=${l}`,U}createCanonicalRequest(s,f,w){const h=Object.keys(f).sort();return`${s.method}
11
+ ${this.getCanonicalPath(s)}
12
+ ${zK(s)}
13
+ ${h.map(($)=>`${$}:${f[$]}`).join("\n")}
16
14
 
17
15
  ${h.join(";")}
18
- ${w}`}async createStringToSign(f,s,w){const h=new this.sha256;h.update(M5.toUint8Array(w));const $=await h.digest();return`${B5}
19
- ${f}
16
+ ${w}`}async createStringToSign(s,f,w){const h=new this.sha256;h.update(AU.toUint8Array(w));const $=await h.digest();return`${zU}
20
17
  ${s}
21
- ${e0.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 y1.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(M5.toUint8Array($)),e0.toHex(await E.digest())}getSigningKey(f,s,w,h){return CK(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")}};Nr(SK,"SignatureV4");var ic=SK,Q3=Nr((r)=>{const f=kc(r).replace(/[\-:]/g,"");return{longDate:f,shortDate:f.slice(0,8)}},"formatDate"),hK=Nr((r)=>Object.keys(r).sort().join(";"),"getCanonicalHeaderList")});var VK=v((A2r,HK)=>{var{defineProperty:k3,getOwnPropertyDescriptor:yc,getOwnPropertyNames:mc}=Object,Nc=Object.prototype.hasOwnProperty,Ss=(r,f)=>k3(r,"name",{value:f,configurable:!0}),qc=(r,f)=>{for(var s in f)k3(r,s,{get:f[s],enumerable:!0})},vc=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of mc(f))if(!Nc.call(r,h)&&h!==s)k3(r,h,{get:()=>f[h],enumerable:!(w=yc(f,h))||w.enumerable})}return r},jc=(r)=>vc(k3({},"__esModule",{value:!0}),r),JK={};qc(JK,{AWSSDKSigV4Signer:()=>bc,AwsSdkSigV4ASigner:()=>_c,AwsSdkSigV4Signer:()=>m5,NODE_SIGV4A_CONFIG_OPTIONS:()=>nc,resolveAWSSDKSigV4Config:()=>oc,resolveAwsSdkSigV4AConfig:()=>ec,resolveAwsSdkSigV4Config:()=>BK,validateSigningProperties:()=>y5});HK.exports=jc(JK);var dc=G0(),Oc=G0(),YK=Ss((r)=>{var f,s;return Oc.HttpResponse.isInstance(r)?((f=r.headers)==null?void 0:f.date)??((s=r.headers)==null?void 0:s.Date):void 0},"getDateHeader"),i5=Ss((r)=>new Date(Date.now()+r),"getSkewCorrectedDate"),cc=Ss((r,f)=>Math.abs(i5(f).getTime()-r)>=300000,"isClockSkewed"),KK=Ss((r,f)=>{const s=Date.parse(r);if(cc(s,f))return s-Date.now();return f},"getUpdatedSystemClockOffset"),m1=Ss((r,f)=>{if(!f)throw new Error(`Property \`${r}\` is not resolved for AWS SDK SigV4Auth`);return f},"throwSigningPropertyError"),y5=Ss(async(r)=>{var f,s,w;const h=m1("context",r.context),$=m1("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 m1("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"),QK=class r{async sign(f,s,w){var h;if(!dc.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const $=await y5(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:i5(E.systemClockOffset),signingRegion:F,signingService:U})}errorHandler(f){return(s)=>{const w=s.ServerTime??YK(s.$response);if(w){const h=m1("config",f.config),$=h.systemClockOffset;if(h.systemClockOffset=KK(w,h.systemClockOffset),h.systemClockOffset!==$&&s.$metadata)s.$metadata.clockSkewCorrected=!0}throw s}}successHandler(f,s){const w=YK(f);if(w){const h=m1("config",s.config);h.systemClockOffset=KK(w,h.systemClockOffset)}}};Ss(QK,"AwsSdkSigV4Signer");var m5=QK,bc=m5,gc=G0(),MK=class r extends m5{async sign(f,s,w){var h;if(!gc.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 y5(w),L=(await((h=$.sigv4aSigningRegionSet)==null?void 0:h.call($))??F??[I]).join(",");return await E.sign(f,{signingDate:i5($.systemClockOffset),signingRegion:L,signingService:U})}};Ss(MK,"AwsSdkSigV4ASigner");var _c=MK,xc=Or(),ZK=mF(),ec=Ss((r)=>{return r.sigv4aSigningRegionSet=xc.normalizeProvider(r.sigv4aSigningRegionSet),r},"resolveAwsSdkSigV4AConfig"),nc={environmentVariableSelector(r){if(r.AWS_SIGV4A_SIGNING_REGION_SET)return r.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((f)=>f.trim());throw new ZK.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 ZK.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},Vw=Or(),lK=XK(),BK=Ss((r)=>{let f;if(r.credentials)f=Vw.memoizeIdentityProvider(r.credentials,Vw.isIdentityExpired,Vw.doesIdentityRequireRefresh);if(!f)if(r.credentialDefaultProvider)f=Vw.normalizeProvider(r.credentialDefaultProvider(Object.assign({},r,{parentClientConfig:r})));else f=Ss(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:s=!0,systemClockOffset:w=r.systemClockOffset||0,sha256:h}=r;let $;if(r.signer)$=Vw.normalizeProvider(r.signer);else if(r.regionInfoProvider)$=Ss(()=>Vw.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||lK.SignatureV4)(C)}),"signer");else $=Ss(async(E)=>{E=Object.assign({},{name:"sigv4",signingName:r.signingName||r.defaultSigningName,signingRegion:await Vw.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||lK.SignatureV4)(U)},"signer");return{...r,systemClockOffset:w,signingEscapePath:s,credentials:f,signer:$}},"resolveAwsSdkSigV4Config"),oc=BK});var D3=v((rb)=>{var ac=":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",kK="[: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]["+ac+"]*",pc=new RegExp("^"+kK+"$"),uc=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},tc=function(r){const f=pc.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=tc;rb.getAllMatches=uc;rb.nameRegexp=kK});var q5=v((Wb)=>{function iK(r){return r===" "||r==="\t"||r==="\n"||r==="\r"}function yK(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.",rs(r,f));else if(r[f]=="?"&&r[f+1]==">"){f++;break}else continue}return f}function mK(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 Tb(r,f){let s="",w="",h=!1;for(;f<r.length;f++){if(r[f]===Fb||r[f]===Ub)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 NK(r,f){const s=N5.getAllMatches(r,Gb),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(!Ab($))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 Cb(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 Lb(r,f){if(f++,r[f]===";")return-1;if(r[f]==="#")return f++,Cb(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 Ab(r){return N5.isName(r)}function Rb(r){return N5.isName(r)}function rs(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 N5=D3(),Ib={allowBooleanAttributes:!1,unpairedTags:[]};Wb.validate=function(r,f){f=Object.assign({},Ib,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,$=yK(r,$),$.err)return $}else if(r[$]==="<"){let E=$;if($++,r[$]==="!"){$=mK(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(!Rb(F)){let L;if(F.trim().length===0)L="Invalid space after '<'.";else L="Tag '"+F+"' is an invalid name.";return Mr("InvalidTag",L,rs(r,$))}const U=Tb(r,$);if(U===!1)return Mr("InvalidAttr","Attributes for '"+F+"' have open quote.",rs(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=NK(C,f);if(z===!0)w=!0;else return Mr(z.err.code,z.err.msg,rs(r,L+z.err.line))}else if(I)if(!U.tagClosed)return Mr("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",rs(r,$));else if(C.trim().length>0)return Mr("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",rs(r,E));else if(s.length===0)return Mr("InvalidTag","Closing tag '"+F+"' has not been opened.",rs(r,E));else{const L=s.pop();if(F!==L.tagName){let z=rs(r,L.tagStartPos);return Mr("InvalidTag","Expected closing tag '"+L.tagName+"' (opened in line "+z.line+", col "+z.col+") instead of closing tag '"+F+"'.",rs(r,E))}if(s.length==0)h=!0}else{const L=NK(C,f);if(L!==!0)return Mr(L.err.code,L.err.msg,rs(r,$-C.length+L.err.line));if(h===!0)return Mr("InvalidXml","Multiple possible root nodes found.",rs(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]==="!"){$++,$=mK(r,$);continue}else if(r[$+1]==="?"){if($=yK(r,++$),$.err)return $}else break;else if(r[$]==="&"){const L=Lb(r,$);if(L==-1)return Mr("InvalidChar","char '&' is not expected.",rs(r,$));$=L}else if(h===!0&&!iK(r[$]))return Mr("InvalidXml","Extra text at the end",rs(r,$));if(r[$]==="<")$--}}else{if(iK(r[$]))continue;return Mr("InvalidChar","char '"+r[$]+"' is not expected.",rs(r,$))}if(!w)return Mr("InvalidXml","Start tag expected.",1);else if(s.length==1)return Mr("InvalidTag","Unclosed tag '"+s[0].tagName+"'.",rs(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 Fb='"',Ub="'",Gb=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var vK=v((Pb)=>{var qK={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}},Sb=function(r){return Object.assign({},qK,r)};Pb.buildOptions=Sb;Pb.defaultOptions=qK});var OK=v((S2r,dK)=>{class jK{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})}}dK.exports=jK});var bK=v((P2r,cK)=>{function Zb(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&&Qb(r,f)){if(f+=7,[entityName,val,f]=lb(r,f+1),val.indexOf("&")===-1)s[Vb(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(h&&Mb(r,f))f+=8;else if(h&&Bb(r,f))f+=8;else if(h&&Hb(r,f))f+=9;else if(Jb)$=!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 lb(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 Jb(r,f){if(r[f+1]==="!"&&r[f+2]==="-"&&r[f+3]==="-")return!0;return!1}function Qb(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 Mb(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 Bb(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 Hb(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 Vb(r){if(Kb.isName(r))return r;else throw new Error(`Invalid entity name ${r}`)}var Kb=D3();cK.exports=Zb});var _K=v((X2r,gK)=>{function yb(r,f={}){if(f=Object.assign({},ib,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&&kb.test(s))return Number.parseInt(s,16);else{const w=Db.exec(s);if(w){const h=w[1],$=w[2];let E=mb(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 mb(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 kb=/^[-+]?0x[a-fA-F0-9]+$/,Db=/^([\-\+])?(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 ib={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};gK.exports=yb});var oK=v((Y2r,nK)=>{function vb(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 jb(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 j5(r,this.options.parseTagValue,this.options.numberParseOptions);else if(r.trim()===r)return j5(r,this.options.parseTagValue,this.options.numberParseOptions);else return r}}}function db(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 cb(r,f,s){if(!this.options.ignoreAttributes&&typeof r==="string"){const w=xK.getAllMatches(r,Ob),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]=j5(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 gb(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 xb(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 eb(r,f,s){const w="*."+s;for(let h in r){const $=r[h];if(w===$||f===$)return!0}return!1}function nb(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 kw(r,f,s,w){const h=r.indexOf(f,s);if(h===-1)throw new Error(w);else return h+f.length-1}function v5(r,f,s,w=">"){const h=nb(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 ob(r,f,s){const w=s;let h=1;for(;s<r.length;s++)if(r[s]==="<")if(r[s+1]==="/"){const $=kw(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=kw(r,"?>",s+1,"StopNode is not closed.");else if(r.substr(s+1,3)==="!--")s=kw(r,"-->",s+3,"StopNode is not closed.");else if(r.substr(s+1,2)==="![")s=kw(r,"]]>",s,"StopNode is not closed.")-2;else{const $=v5(r,s,">");if($){if(($&&$.tagName)===f&&$.tagExp[$.tagExp.length-1]!=="/")h++;s=$.closeIndex}}}function j5(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 qb(r,s)}else if(xK.isExist(r))return r;else return""}var xK=D3(),q1=OK(),Nb=bK(),qb=_K();class eK{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=vb,this.parseXml=bb,this.parseTextData=jb,this.resolveNameSpace=db,this.buildAttributesMap=cb,this.isItStopNode=eb,this.replaceEntitiesValue=_b,this.readStopNodeData=ob,this.saveTextToParentTag=xb,this.addChild=gb}}var Ob=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),bb=function(r){r=r.replace(/\r\n?/g,"\n");const f=new q1("!xml");let s=f,w="",h="";for(let $=0;$<r.length;$++)if(r[$]==="<")if(r[$+1]==="/"){const I=kw(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=v5(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 q1(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=kw(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=Nb(r,$);this.docTypeEntities=I.entities,$=I.i}else if(r.substr($+1,2)==="!["){const I=kw(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=v5(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 B=this.readStopNodeData(r,U,z+1);if(!B)throw new Error(`Unexpected end of ${U}`);$=B.i,Z=B.tagContent}const D=new q1(F);if(F!==C&&L)D[":@"]=this.buildAttributesMap(C,h,F);if(Z)Z=this.parseTextData(Z,F,h,!0,L,!0,!0);h=h.substr(0,h.lastIndexOf(".")),D.add(this.options.textNodeName,Z),this.addChild(s,D,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 q1(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 q1(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},_b=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};nK.exports=eK});var pK=v((rg)=>{function ab(r,f){return aK(r,f)}function aK(r,f,s){let w;const h={};for(let $=0;$<r.length;$++){const E=r[$],I=pb(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=aK(E[I],f,F);const C=tb(U,f);if(E[":@"])ub(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 pb(r){const f=Object.keys(r);for(let s=0;s<f.length;s++){const w=f[s];if(w!==":@")return w}}function ub(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 tb(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=ab});var rZ=v((Z2r,tK)=>{var{buildOptions:fg}=vK(),wg=oK(),{prettify:hg}=pK(),$g=q5();class uK{constructor(r){this.externalEntities={},this.options=fg(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=$g.validate(r,f);if(h!==!0)throw Error(`${h.err.msg}:${h.err.line}:${h.err.col}`)}const s=new wg(this.options);s.addExternalEntities(this.externalEntities);const w=s.parseXml(r);if(this.options.preserveOrder||w===void 0)return w;else return hg(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}}tK.exports=uK});var $Z=v((l2r,hZ)=>{function Eg(r,f){let s="";if(f.format&&f.indentBy.length>0)s="\n";return fZ(r,f,"",s)}function fZ(r,f,s,w){let h="",$=!1;for(let E=0;E<r.length;E++){const I=r[E],F=Ig(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(!Fg(U,f))Z=f.tagValueProcessor(F,Z),Z=wZ(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=sZ(I[":@"],f),D=F==="?xml"?"":w;let B=I[F][0][f.textNodeName];B=B.length!==0?" "+B:"",h+=D+`<${F}${B}${Z}?>`,$=!0;continue}let C=w;if(C!=="")C+=f.indentBy;const L=sZ(I[":@"],f),z=w+`<${F}${L}`,S=fZ(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 Ig(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 sZ(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=wZ(h,f),h===!0&&f.suppressBooleanAttributes)s+=` ${w.substr(f.attributeNamePrefix.length)}`;else s+=` ${w.substr(f.attributeNamePrefix.length)}="${h}"`}return s}function Fg(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 wZ(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}hZ.exports=Eg});var IZ=v((J2r,EZ)=>{function n0(r){if(this.options=Object.assign({},Tg,r),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Lg;if(this.processTextOrObjNode=Gg,this.options.format)this.indentate=Cg,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function Gg(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 Cg(r){return this.options.indentBy.repeat(r)}function Lg(r){if(r.startsWith(this.options.attributeNamePrefix)&&r!==this.options.textNodeName)return r.substr(this.attrPrefixLen);else return!1}var Ug=$Z(),Tg={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};n0.prototype.build=function(r){if(this.options.preserveOrder)return Ug(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}};n0.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}};n0.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+'"'};n0.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}};n0.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};n0.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}};n0.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};EZ.exports=n0});var UZ=v((Q2r,FZ)=>{var Ag=q5(),Rg=rZ(),Wg=IZ();FZ.exports={XMLParser:Rg,XMLValidator:Ag,XMLBuilder:Wg}});var RZ=v((M2r,AZ)=>{var{defineProperty:i3,getOwnPropertyDescriptor:zg,getOwnPropertyNames:Sg}=Object,Pg=Object.prototype.hasOwnProperty,Ps=(r,f)=>i3(r,"name",{value:f,configurable:!0}),Xg=(r,f)=>{for(var s in f)i3(r,s,{get:f[s],enumerable:!0})},Yg=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Sg(f))if(!Pg.call(r,h)&&h!==s)i3(r,h,{get:()=>f[h],enumerable:!(w=zg(f,h))||w.enumerable})}return r},Kg=(r)=>Yg(i3({},"__esModule",{value:!0}),r),TZ={};Xg(TZ,{_toBool:()=>lg,_toNum:()=>Jg,_toStr:()=>Zg,awsExpectUnion:()=>Mg,loadRestJsonErrorCode:()=>Vg,loadRestXmlErrorCode:()=>yg,parseJsonBody:()=>CZ,parseJsonErrorBody:()=>Hg,parseXmlBody:()=>LZ,parseXmlErrorBody:()=>ig});AZ.exports=Kg(TZ);var Zg=Ps((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"),lg=Ps((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"),Jg=Ps((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"),Qg=Fh(),Mg=Ps((r)=>{if(r==null)return;if(typeof r==="object"&&"__type"in r)delete r.__type;return Qg.expectUnion(r)},"awsExpectUnion"),Bg=Fh(),GZ=Ps((r,f)=>Bg.collectBody(r,f).then((s)=>f.utf8Encoder(s)),"collectBodyString"),CZ=Ps((r,f)=>GZ(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"),Hg=Ps(async(r,f)=>{const s=await CZ(r,f);return s.message=s.message??s.Message,s},"parseJsonErrorBody"),Vg=Ps((r,f)=>{const s=Ps(($,E)=>Object.keys($).find((I)=>I.toLowerCase()===E.toLowerCase()),"findKey"),w=Ps(($)=>{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"),kg=Fh(),Dg=UZ(),LZ=Ps((r,f)=>GZ(r,f).then((s)=>{if(s.length){const w=new Dg.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 kg.getValueFromTextNode(I)}return{}}),"parseXmlBody"),ig=Ps(async(r,f)=>{const s=await LZ(r,f);if(s.Error)s.Error.message=s.Error.message??s.Error.Message;return s},"parseXmlErrorBody"),yg=Ps((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((v1)=>{Object.defineProperty(v1,"__esModule",{value:!0});var d5=aY();d5.__exportStar(rK(),v1);d5.__exportStar(VK(),v1);d5.__exportStar(RZ(),v1)});var y3="AWS_ACCESS_KEY_ID",m3="AWS_SECRET_ACCESS_KEY",KZ="AWS_SESSION_TOKEN",ZZ="AWS_CREDENTIAL_EXPIRATION",lZ="AWS_CREDENTIAL_SCOPE",JZ="AWS_ACCOUNT_ID",O5=(r)=>async()=>{r?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const f=process.env[y3],s=process.env[m3],w=process.env[KZ],h=process.env[ZZ],$=process.env[lZ],E=process.env[JZ];if(f&&s)return{accessKeyId:f,secretAccessKey:s,...w&&{sessionToken:w},...h&&{expiration:new Date(h)},...$&&{credentialScope:$},...E&&{accountId:E}};throw new _("Unable to find environment variable credentials.",{logger:r?.logger})};var QZ=G(()=>{Lr()});var MZ={};Sf(MZ,{fromEnv:()=>O5,ENV_SESSION:()=>KZ,ENV_SECRET:()=>m3,ENV_KEY:()=>y3,ENV_EXPIRATION:()=>ZZ,ENV_CREDENTIAL_SCOPE:()=>lZ,ENV_ACCOUNT_ID:()=>JZ});var c5=G(()=>{QZ()});import{Buffer as qg}from"buffer";import{request as vg}from"http";function o0(r){return new Promise((f,s)=>{const w=vg({method:"GET",...r,hostname:r.hostname?.replace(/^\[(.+)\]$/,"$1")});w.on("error",(h)=>{s(Object.assign(new Vs("Unable to connect to instance metadata service"),h)),w.destroy()}),w.on("timeout",()=>{s(new Vs("TimeoutError from instance metadata service")),w.destroy()}),w.on("response",(h)=>{const{statusCode:$=400}=h;if($<200||300<=$)s(Object.assign(new Vs("Error response received from instance metadata service"),{statusCode:$})),w.destroy();const E=[];h.on("data",(I)=>{E.push(I)}),h.on("end",()=>{f(qg.concat(E)),w.destroy()})}),w.end()})}var N3=G(()=>{Lr()});var q3=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.AccessKeyId==="string"&&typeof r.SecretAccessKey==="string"&&typeof r.Token==="string"&&typeof r.Expiration==="string",v3=(r)=>({accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.Token,expiration:new Date(r.Expiration),...r.AccountId&&{accountId:r.AccountId}});var jg=1000,dg=0,j1=({maxRetries:r=0,timeout:f=1000})=>({maxRetries:r,timeout:f});var d1=(r,f)=>{let s=r();for(let w=0;w<f;w++)s=s.catch(r);return s};import{parse as Og}from"url";var j3="AWS_CONTAINER_CREDENTIALS_FULL_URI",d3="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b5="AWS_CONTAINER_AUTHORIZATION_TOKEN",cg=(r={})=>{const{timeout:f,maxRetries:s}=j1(r);return()=>d1(async()=>{const w=await eg({logger:r.logger}),h=JSON.parse(await bg(f,w));if(!q3(h))throw new _("Invalid response received from instance metadata service.",{logger:r.logger});return v3(h)},s)},bg=async(r,f)=>{if(process.env[b5])f.headers={...f.headers,Authorization:process.env[b5]};return(await o0({...f,timeout:r})).toString()},gg="169.254.170.2",_g,xg,eg=async({logger:r})=>{if(process.env[d3])return{hostname:gg,path:process.env[d3]};if(process.env[j3]){const f=Og(process.env[j3]);if(!f.hostname||!(f.hostname in _g))throw new _(`${f.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:r});if(!f.protocol||!(f.protocol in xg))throw new _(`${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 _(`The container metadata credential provider cannot be used unless the ${d3} or ${j3} environment variable is set`,{tryNextLink:!1,logger:r})};var BZ=G(()=>{Lr();N3();_g={localhost:!0,"127.0.0.1":!0},xg={"http:":!0,"https:":!0}});var O3;var HZ=G(()=>{Lr();O3=class O3 extends _{constructor(r,f=!0){super(r,f);this.tryNextLink=f,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,O3.prototype)}}});var Dw;var g5=G(()=>{(function(r){r.IPv4="http://169.254.169.254",r.IPv6="http://[fd00:ec2::254]"})(Dw||(Dw={}))});var VZ;var kZ=G(()=>{VZ={environmentVariableSelector:(r)=>r.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(r)=>r.ec2_metadata_service_endpoint,default:void 0}});var a0;var _5=G(()=>{(function(r){r.IPv4="IPv4",r.IPv6="IPv6"})(a0||(a0={}))});var ng="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",og="ec2_metadata_service_endpoint_mode",DZ;var iZ=G(()=>{_5();DZ={environmentVariableSelector:(r)=>r[ng],configFileSelector:(r)=>r[og],default:a0.IPv4}});var c3=async()=>gr(await ag()||await pg()),ag=async()=>t(VZ)(),pg=async()=>{const r=await t(DZ)();switch(r){case a0.IPv4:return Dw.IPv4;case a0.IPv6:return Dw.IPv6;default:throw new Error(`Unsupported endpoint mode: ${r}. Select from ${Object.values(a0)}`)}};var x5=G(()=>{$f();b0();g5();kZ();_5();iZ()});var e5=(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 yZ=(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=e5(h,s)}catch($){if(w)s.warn("Credential renew failed: ",$),h=e5(w,s);else throw $}return w=h,h}};var mZ=()=>{};var vZ="/latest/meta-data/iam/security-credentials/",ug="/latest/api/token",n5="AWS_EC2_METADATA_V1_DISABLED",NZ="ec2_metadata_v1_disabled",qZ="x-aws-ec2-metadata-token",tg=(r={})=>yZ(r_(r),{logger:r.logger}),r_=(r={})=>{let f=!1;const{logger:s,profile:w}=r,{timeout:h,maxRetries:$}=j1(r),E=async(I,F)=>{if(f||F.headers?.[qZ]==null){let L=!1,z=!1;const S=await t({environmentVariableSelector:(Z)=>{const D=Z[n5];if(z=!!D&&D!=="false",D===void 0)throw new _(`${n5} not set in env, checking config file next.`,{logger:r.logger});return z},configFileSelector:(Z)=>{const D=Z[NZ];return L=!!D&&D!=="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 (${NZ})`);if(z)Z.push(`process environment variable (${n5})`);throw new O3(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Z.join(", ")}].`)}}const C=(await d1(async()=>{let L;try{L=await f_(F)}catch(z){if(z.statusCode===401)f=!1;throw z}return L},I)).trim();return d1(async()=>{let L;try{L=await w_(C,F,r)}catch(z){if(z.statusCode===401)f=!1;throw z}return L},I)};return async()=>{const I=await c3();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 s_({...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:{[qZ]:F},timeout:h})}}},s_=async(r)=>o0({...r,path:ug,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),f_=async(r)=>(await o0({...r,path:vZ})).toString(),w_=async(r,f,s)=>{const w=JSON.parse((await o0({...f,path:vZ+r})).toString());if(!q3(w))throw new _("Invalid response received from instance metadata service.",{logger:s.logger});return v3(w)};var jZ=G(()=>{$f();Lr();HZ();N3();x5();mZ()});var dZ=()=>{};var O1={};Sf(O1,{providerConfigFromInit:()=>j1,httpRequest:()=>o0,getInstanceMetadataEndpoint:()=>c3,fromInstanceMetadata:()=>tg,fromContainerMetadata:()=>cg,Endpoint:()=>Dw,ENV_CMDS_RELATIVE_URI:()=>d3,ENV_CMDS_FULL_URI:()=>j3,ENV_CMDS_AUTH_TOKEN:()=>b5,DEFAULT_TIMEOUT:()=>jg,DEFAULT_MAX_RETRIES:()=>dg});var c1=G(()=>{BZ();jZ();dZ();N3();x5();g5()});var h_="169.254.170.2",$_="169.254.170.23",E_="[fd00:ec2::23]",OZ=(r,f)=>{if(r.protocol==="https:")return;if(r.hostname===h_||r.hostname===$_||r.hostname===E_)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 _(`URL not accepted. It must either be HTTPS or match one of the following:
18
+ ${f}
19
+ ${vs.toHex($)}`}getCanonicalPath({path:s}){if(this.uriEscapePath){const f=[];for(let $ of s.split("/")){if(($==null?void 0:$.length)===0)continue;if($===".")continue;if($==="..")f.pop();else f.push($)}const w=`${(s==null?void 0:s.startsWith("/"))?"/":""}${f.join("/")}${f.length>0&&(s==null?void 0:s.endsWith("/"))?"/":""}`;return Q1.escapeUri(w).replace(/%2F/g,"/")}return s}async getSignature(s,f,w,h){const $=await this.createStringToSign(s,f,h),E=new this.sha256(await w);return E.update(AU.toUint8Array($)),vs.toHex(await E.digest())}getSigningKey(s,f,w,h){return AK(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")}};qr(YK,"SignatureV4");var ed=YK,XE=qr((r)=>{const s=gd(r).replace(/[\-:]/g,"");return{longDate:s,shortDate:s.slice(0,8)}},"formatDate"),EK=qr((r)=>Object.keys(r).sort().join(";"),"getCanonicalHeaderList")});var lK=v(($$r,kK)=>{var{defineProperty:JE,getOwnPropertyDescriptor:nd,getOwnPropertyNames:od}=Object,ad=Object.prototype.hasOwnProperty,z0=(r,s)=>JE(r,"name",{value:s,configurable:!0}),pd=(r,s)=>{for(var f in s)JE(r,f,{get:s[f],enumerable:!0})},ud=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of od(s))if(!ad.call(r,h)&&h!==f)JE(r,h,{get:()=>s[h],enumerable:!(w=nd(s,h))||w.enumerable})}return r},td=(r)=>ud(JE({},"__esModule",{value:!0}),r),BK={};pd(BK,{AWSSDKSigV4Signer:()=>wb,AwsSdkSigV4ASigner:()=>$b,AwsSdkSigV4Signer:()=>ZU,NODE_SIGV4A_CONFIG_OPTIONS:()=>Fb,resolveAWSSDKSigV4Config:()=>Ub,resolveAwsSdkSigV4AConfig:()=>Ib,resolveAwsSdkSigV4Config:()=>DK,validateSigningProperties:()=>KU});kK.exports=td(BK);var rb=Fs(),fb=Fs(),SK=z0((r)=>{var s,f;return fb.HttpResponse.isInstance(r)?((s=r.headers)==null?void 0:s.date)??((f=r.headers)==null?void 0:f.Date):void 0},"getDateHeader"),YU=z0((r)=>new Date(Date.now()+r),"getSkewCorrectedDate"),sb=z0((r,s)=>Math.abs(YU(s).getTime()-r)>=300000,"isClockSkewed"),JK=z0((r,s)=>{const f=Date.parse(r);if(sb(f,s))return f-Date.now();return s},"getUpdatedSystemClockOffset"),M1=z0((r,s)=>{if(!s)throw new Error(`Property \`${r}\` is not resolved for AWS SDK SigV4Auth`);return s},"throwSigningPropertyError"),KU=z0(async(r)=>{var s,f,w;const h=M1("context",r.context),$=M1("config",r.config),E=(w=(f=(s=h.endpointV2)==null?void 0:s.properties)==null?void 0:f.authSchemes)==null?void 0:w[0],F=await M1("signer",$.signer)(E),U=r==null?void 0:r.signingRegion,L=r==null?void 0:r.signingRegionSet,C=r==null?void 0:r.signingName;return{config:$,signer:F,signingRegion:U,signingRegionSet:L,signingName:C}},"validateSigningProperties"),VK=class r{async sign(s,f,w){var h;if(!rb.HttpRequest.isInstance(s))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const $=await KU(w),{config:E,signer:I}=$;let{signingRegion:F,signingName:U}=$;const L=w.context;if(((h=L==null?void 0:L.authSchemes)==null?void 0:h.length)??0>1){const[Y,X]=L.authSchemes;if((Y==null?void 0:Y.name)==="sigv4a"&&(X==null?void 0:X.name)==="sigv4")F=(X==null?void 0:X.signingRegion)??F,U=(X==null?void 0:X.signingName)??U}return await I.sign(s,{signingDate:YU(E.systemClockOffset),signingRegion:F,signingService:U})}errorHandler(s){return(f)=>{const w=f.ServerTime??SK(f.$response);if(w){const h=M1("config",s.config),$=h.systemClockOffset;if(h.systemClockOffset=JK(w,h.systemClockOffset),h.systemClockOffset!==$&&f.$metadata)f.$metadata.clockSkewCorrected=!0}throw f}}successHandler(s,f){const w=SK(s);if(w){const h=M1("config",f.config);h.systemClockOffset=JK(w,h.systemClockOffset)}}};z0(VK,"AwsSdkSigV4Signer");var ZU=VK,wb=ZU,hb=Fs(),HK=class r extends ZU{async sign(s,f,w){var h;if(!hb.HttpRequest.isInstance(s))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 KU(w),C=(await((h=$.sigv4aSigningRegionSet)==null?void 0:h.call($))??F??[I]).join(",");return await E.sign(s,{signingDate:YU($.systemClockOffset),signingRegion:C,signingService:U})}};z0(HK,"AwsSdkSigV4ASigner");var $b=HK,Eb=Or(),QK=lF(),Ib=z0((r)=>{return r.sigv4aSigningRegionSet=Eb.normalizeProvider(r.sigv4aSigningRegionSet),r},"resolveAwsSdkSigV4AConfig"),Fb={environmentVariableSelector(r){if(r.AWS_SIGV4A_SIGNING_REGION_SET)return r.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((s)=>s.trim());throw new QK.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 QK.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},Zw=Or(),MK=ZK(),DK=z0((r)=>{let s;if(r.credentials)s=Zw.memoizeIdentityProvider(r.credentials,Zw.isIdentityExpired,Zw.doesIdentityRequireRefresh);if(!s)if(r.credentialDefaultProvider)s=Zw.normalizeProvider(r.credentialDefaultProvider(Object.assign({},r,{parentClientConfig:r})));else s=z0(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:f=!0,systemClockOffset:w=r.systemClockOffset||0,sha256:h}=r;let $;if(r.signer)$=Zw.normalizeProvider(r.signer);else if(r.regionInfoProvider)$=z0(()=>Zw.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 L={...r,credentials:s,region:r.signingRegion,service:r.signingName,sha256:h,uriEscapePath:f};return new(r.signerConstructor||MK.SignatureV4)(L)}),"signer");else $=z0(async(E)=>{E=Object.assign({},{name:"sigv4",signingName:r.signingName||r.defaultSigningName,signingRegion:await Zw.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:s,region:r.signingRegion,service:r.signingName,sha256:h,uriEscapePath:f};return new(r.signerConstructor||MK.SignatureV4)(U)},"signer");return{...r,systemClockOffset:w,signingEscapePath:f,credentials:s,signer:$}},"resolveAwsSdkSigV4Config"),Ub=DK});var QE=v((Ab)=>{var Gb=":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",NK="[: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]["+Gb+"]*",Tb=new RegExp("^"+NK+"$"),Lb=function(r,s){const f=[];let w=s.exec(r);while(w){const h=[];h.startIndex=s.lastIndex-w[0].length;const $=w.length;for(let E=0;E<$;E++)h.push(w[E]);f.push(h),w=s.exec(r)}return f},Wb=function(r){const s=Tb.exec(r);return!(s===null||typeof s==="undefined")};Ab.isExist=function(r){return typeof r!=="undefined"};Ab.isEmptyObject=function(r){return Object.keys(r).length===0};Ab.merge=function(r,s,f){if(s){const w=Object.keys(s),h=w.length;for(let $=0;$<h;$++)if(f==="strict")r[w[$]]=[s[w[$]]];else r[w[$]]=s[w[$]]}};Ab.getValue=function(r){if(Ab.isExist(r))return r;else return""};Ab.isName=Wb;Ab.getAllMatches=Lb;Ab.nameRegexp=NK});var JU=v((Db)=>{function yK(r){return r===" "||r==="\t"||r==="\n"||r==="\r"}function mK(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 Br("InvalidXml","XML declaration allowed only at the start of the document.",ur(r,s));else if(r[s]=="?"&&r[s+1]==">"){s++;break}else continue}return s}function jK(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 Jb(r,s){let f="",w="",h=!1;for(;s<r.length;s++){if(r[s]===Zb||r[s]===Sb)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 vK(r,s){const f=SU.getAllMatches(r,Qb),w={};for(let h=0;h<f.length;h++){if(f[h][1].length===0)return Br("InvalidAttr","Attribute '"+f[h][2]+"' has no space in starting.",B1(f[h]));else if(f[h][3]!==void 0&&f[h][4]===void 0)return Br("InvalidAttr","Attribute '"+f[h][2]+"' is without value.",B1(f[h]));else if(f[h][3]===void 0&&!s.allowBooleanAttributes)return Br("InvalidAttr","boolean attribute '"+f[h][2]+"' is not allowed.",B1(f[h]));const $=f[h][2];if(!Vb($))return Br("InvalidAttr","Attribute '"+$+"' is an invalid name.",B1(f[h]));if(!w.hasOwnProperty($))w[$]=1;else return Br("InvalidAttr","Attribute '"+$+"' is repeated.",B1(f[h]))}return!0}function Mb(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 Bb(r,s){if(s++,r[s]===";")return-1;if(r[s]==="#")return s++,Mb(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 Br(r,s,f){return{err:{code:r,msg:s,line:f.line||f,col:f.col}}}function Vb(r){return SU.isName(r)}function Hb(r){return SU.isName(r)}function ur(r,s){const f=r.substring(0,s).split(/\r?\n/);return{line:f.length,col:f[f.length-1].length+1}}function B1(r){return r.startIndex+r[1].length}var SU=QE(),Kb={allowBooleanAttributes:!1,unpairedTags:[]};Db.validate=function(r,s){s=Object.assign({},Kb,s);const f=[];let w=!1,h=!1;if(r[0]==="\uFEFF")r=r.substr(1);for(let $=0;$<r.length;$++)if(r[$]==="<"&&r[$+1]==="?"){if($+=2,$=mK(r,$),$.err)return $}else if(r[$]==="<"){let E=$;if($++,r[$]==="!"){$=jK(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(!Hb(F)){let C;if(F.trim().length===0)C="Invalid space after '<'.";else C="Tag '"+F+"' is an invalid name.";return Br("InvalidTag",C,ur(r,$))}const U=Jb(r,$);if(U===!1)return Br("InvalidAttr","Attributes for '"+F+"' have open quote.",ur(r,$));let L=U.value;if($=U.index,L[L.length-1]==="/"){const C=$-L.length;L=L.substring(0,L.length-1);const Y=vK(L,s);if(Y===!0)w=!0;else return Br(Y.err.code,Y.err.msg,ur(r,C+Y.err.line))}else if(I)if(!U.tagClosed)return Br("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",ur(r,$));else if(L.trim().length>0)return Br("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",ur(r,E));else if(f.length===0)return Br("InvalidTag","Closing tag '"+F+"' has not been opened.",ur(r,E));else{const C=f.pop();if(F!==C.tagName){let Y=ur(r,C.tagStartPos);return Br("InvalidTag","Expected closing tag '"+C.tagName+"' (opened in line "+Y.line+", col "+Y.col+") instead of closing tag '"+F+"'.",ur(r,E))}if(f.length==0)h=!0}else{const C=vK(L,s);if(C!==!0)return Br(C.err.code,C.err.msg,ur(r,$-L.length+C.err.line));if(h===!0)return Br("InvalidXml","Multiple possible root nodes found.",ur(r,$));else if(s.unpairedTags.indexOf(F)!==-1);else f.push({tagName:F,tagStartPos:E});w=!0}for($++;$<r.length;$++)if(r[$]==="<")if(r[$+1]==="!"){$++,$=jK(r,$);continue}else if(r[$+1]==="?"){if($=mK(r,++$),$.err)return $}else break;else if(r[$]==="&"){const C=Bb(r,$);if(C==-1)return Br("InvalidChar","char '&' is not expected.",ur(r,$));$=C}else if(h===!0&&!yK(r[$]))return Br("InvalidXml","Extra text at the end",ur(r,$));if(r[$]==="<")$--}}else{if(yK(r[$]))continue;return Br("InvalidChar","char '"+r[$]+"' is not expected.",ur(r,$))}if(!w)return Br("InvalidXml","Start tag expected.",1);else if(f.length==1)return Br("InvalidTag","Unclosed tag '"+f[0].tagName+"'.",ur(r,f[0].tagStartPos));else if(f.length>0)return Br("InvalidXml","Invalid '"+JSON.stringify(f.map(($)=>$.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var Zb='"',Sb="'",Qb=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var iK=v((Nb)=>{var OK={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}},lb=function(r){return Object.assign({},OK,r)};Nb.buildOptions=lb;Nb.defaultOptions=OK});var cK=v((U$r,bK)=>{class dK{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})}}bK.exports=dK});var gK=v((G$r,_K)=>{function jb(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,$=!1,E="";for(;s<r.length;s++)if(r[s]==="<"&&!$){if(h&&ib(r,s)){if(s+=7,[entityName,val,s]=vb(r,s+1),val.indexOf("&")===-1)f[_b(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(h&&db(r,s))s+=8;else if(h&&bb(r,s))s+=8;else if(h&&cb(r,s))s+=9;else if(Ob)$=!0;else throw new Error("Invalid DOCTYPE");w++,E=""}else if(r[s]===">"){if($){if(r[s-1]==="-"&&r[s-2]==="-")$=!1,w--}else w--;if(w===0)break}else if(r[s]==="[")h=!0;else E+=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 vb(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 Ob(r,s){if(r[s+1]==="!"&&r[s+2]==="-"&&r[s+3]==="-")return!0;return!1}function ib(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 db(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 bb(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 cb(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 _b(r){if(mb.isName(r))return r;else throw new Error(`Invalid entity name ${r}`)}var mb=QE();_K.exports=jb});var eK=v((T$r,xK)=>{function nb(r,s={}){if(s=Object.assign({},eb,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&&gb.test(f))return Number.parseInt(f,16);else{const w=xb.exec(f);if(w){const h=w[1],$=w[2];let E=ob(w[3]);const I=w[4]||w[6];if(!s.leadingZeros&&$.length>0&&h&&f[2]!==".")return r;else if(!s.leadingZeros&&$.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"&&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(f===U)return F;else if(f===h+U)return F;return r}}else return r}}function ob(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 gb=/^[-+]?0x[a-fA-F0-9]+$/,xb=/^([\-\+])?(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 eb={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};xK.exports=nb});var pK=v((L$r,aK)=>{function ub(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 tb(r,s,f,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(s,r,f,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 MU(r,this.options.parseTagValue,this.options.numberParseOptions);else if(r.trim()===r)return MU(r,this.options.parseTagValue,this.options.numberParseOptions);else return r}}}function rc(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 sc(r,s,f){if(!this.options.ignoreAttributes&&typeof r==="string"){const w=nK.getAllMatches(r,fc),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 L=this.options.attributeValueProcessor(I,F,s);if(L===null||L===void 0)$[U]=F;else if(typeof L!==typeof F||L!==F)$[U]=L;else $[U]=MU(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 hc(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 Ec(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 Ic(r,s,f){const w="*."+f;for(let h in r){const $=r[h];if(w===$||s===$)return!0}return!1}function Fc(r,s,f=">"){let w,h="";for(let $=s;$<r.length;$++){let E=r[$];if(w){if(E===w)w=""}else if(E==='"'||E==="'")w=E;else if(E===f[0])if(f[1]){if(r[$+1]===f[1])return{data:h,index:$}}else return{data:h,index:$};else if(E==="\t")E=" ";h+=E}}function Sw(r,s,f,w){const h=r.indexOf(s,f);if(h===-1)throw new Error(w);else return h+s.length-1}function QU(r,s,f,w=">"){const h=Fc(r,s+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 L=F;if(f){const C=F.indexOf(":");if(C!==-1)F=F.substr(C+1),U=F!==h.data.substr(C+1)}return{tagName:F,tagExp:$,closeIndex:E,attrExpPresent:U,rawTagName:L}}function Uc(r,s,f){const w=f;let h=1;for(;f<r.length;f++)if(r[f]==="<")if(r[f+1]==="/"){const $=Sw(r,">",f,`${s} is not closed`);if(r.substring(f+2,$).trim()===s){if(h--,h===0)return{tagContent:r.substring(w,f),i:$}}f=$}else if(r[f+1]==="?")f=Sw(r,"?>",f+1,"StopNode is not closed.");else if(r.substr(f+1,3)==="!--")f=Sw(r,"-->",f+3,"StopNode is not closed.");else if(r.substr(f+1,2)==="![")f=Sw(r,"]]>",f,"StopNode is not closed.")-2;else{const $=QU(r,f,">");if($){if(($&&$.tagName)===s&&$.tagExp[$.tagExp.length-1]!=="/")h++;f=$.closeIndex}}}function MU(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 pb(r,f)}else if(nK.isExist(r))return r;else return""}var nK=QE(),V1=cK(),ab=gK(),pb=eK();class oK{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=ub,this.parseXml=wc,this.parseTextData=tb,this.resolveNameSpace=rc,this.buildAttributesMap=sc,this.isItStopNode=Ic,this.replaceEntitiesValue=$c,this.readStopNodeData=Uc,this.saveTextToParentTag=Ec,this.addChild=hc}}var fc=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),wc=function(r){r=r.replace(/\r\n?/g,"\n");const s=new V1("!xml");let f=s,w="",h="";for(let $=0;$<r.length;$++)if(r[$]==="<")if(r[$+1]==="/"){const I=Sw(r,">",$,"Closing Tag is not closed.");let F=r.substring($+2,I).trim();if(this.options.removeNSPrefix){const C=F.indexOf(":");if(C!==-1)F=F.substr(C+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 L=0;if(U&&this.options.unpairedTags.indexOf(U)!==-1)L=h.lastIndexOf(".",h.lastIndexOf(".")-1),this.tagsNodeStack.pop();else L=h.lastIndexOf(".");h=h.substring(0,L),f=this.tagsNodeStack.pop(),w="",$=I}else if(r[$+1]==="?"){let I=QU(r,$,!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 V1(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)}$=I.closeIndex+1}else if(r.substr($+1,3)==="!--"){const I=Sw(r,"-->",$+4,"Comment is not closed.");if(this.options.commentPropName){const F=r.substring($+4,I-2);w=this.saveTextToParentTag(w,f,h),f.add(this.options.commentPropName,[{[this.options.textNodeName]:F}])}$=I}else if(r.substr($+1,2)==="!D"){const I=ab(r,$);this.docTypeEntities=I.entities,$=I.i}else if(r.substr($+1,2)==="!["){const I=Sw(r,"]]>",$,"CDATA is not closed.")-2,F=r.substring($+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);$=I+2}else{let I=QU(r,$,this.options.removeNSPrefix),F=I.tagName;const U=I.rawTagName;let{tagExp:L,attrExpPresent:C,closeIndex:Y}=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 X=f;if(X&&this.options.unpairedTags.indexOf(X.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 M="";if(L.length>0&&L.lastIndexOf("/")===L.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),h=h.substr(0,h.length-1),L=F;else L=L.substr(0,L.length-1);$=I.closeIndex}else if(this.options.unpairedTags.indexOf(F)!==-1)$=I.closeIndex;else{const q=this.readStopNodeData(r,U,Y+1);if(!q)throw new Error(`Unexpected end of ${U}`);$=q.i,M=q.tagContent}const l=new V1(F);if(F!==L&&C)l[":@"]=this.buildAttributesMap(L,h,F);if(M)M=this.parseTextData(M,F,h,!0,C,!0,!0);h=h.substr(0,h.lastIndexOf(".")),l.add(this.options.textNodeName,M),this.addChild(f,l,h)}else{if(L.length>0&&L.lastIndexOf("/")===L.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),h=h.substr(0,h.length-1),L=F;else L=L.substr(0,L.length-1);if(this.options.transformTagName)F=this.options.transformTagName(F);const M=new V1(F);if(F!==L&&C)M[":@"]=this.buildAttributesMap(L,h,F);this.addChild(f,M,h),h=h.substr(0,h.lastIndexOf("."))}else{const M=new V1(F);if(this.tagsNodeStack.push(f),F!==L&&C)M[":@"]=this.buildAttributesMap(L,h,F);this.addChild(f,M,h),f=M}w="",$=Y}}else w+=r[$];return s.child},$c=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};aK.exports=oK});var tK=v((Ac)=>{function Gc(r,s){return uK(r,s)}function uK(r,s,f){let w;const h={};for(let $=0;$<r.length;$++){const E=r[$],I=Tc(E);let F="";if(f===void 0)F=I;else F=f+"."+I;if(I===s.textNodeName)if(w===void 0)w=E[I];else w+=""+E[I];else if(I===void 0)continue;else if(E[I]){let U=uK(E[I],s,F);const L=Wc(U,s);if(E[":@"])Lc(U,E[":@"],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,L))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 Tc(r){const s=Object.keys(r);for(let f=0;f<s.length;f++){const w=s[f];if(w!==":@")return w}}function Lc(r,s,f,w){if(s){const h=Object.keys(s),$=h.length;for(let E=0;E<$;E++){const I=h[E];if(w.isArray(I,f+"."+I,!0,!0))r[I]=[s[I]];else r[I]=s[I]}}}function Wc(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}Ac.prettify=Gc});var s7=v((A$r,f7)=>{var{buildOptions:Cc}=iK(),Rc=pK(),{prettify:Pc}=tK(),Xc=JU();class r7{constructor(r){this.externalEntities={},this.options=Cc(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=Xc.validate(r,s);if(h!==!0)throw Error(`${h.err.msg}:${h.err.line}:${h.err.col}`)}const f=new Rc(this.options);f.addExternalEntities(this.externalEntities);const w=f.parseXml(r);if(this.options.preserveOrder||w===void 0)return w;else return Pc(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}}f7.exports=r7});var I7=v((z$r,E7)=>{function Yc(r,s){let f="";if(s.format&&s.indentBy.length>0)f="\n";return h7(r,s,"",f)}function h7(r,s,f,w){let h="",$=!1;for(let E=0;E<r.length;E++){const I=r[E],F=Kc(I);if(F===void 0)continue;let U="";if(f.length===0)U=F;else U=`${f}.${F}`;if(F===s.textNodeName){let M=I[F];if(!Zc(U,s))M=s.tagValueProcessor(F,M),M=$7(M,s);if($)h+=w;h+=M,$=!1;continue}else if(F===s.cdataPropName){if($)h+=w;h+=`<![CDATA[${I[F][0][s.textNodeName]}]]>`,$=!1;continue}else if(F===s.commentPropName){h+=w+`<!--${I[F][0][s.textNodeName]}-->`,$=!0;continue}else if(F[0]==="?"){const M=w7(I[":@"],s),l=F==="?xml"?"":w;let q=I[F][0][s.textNodeName];q=q.length!==0?" "+q:"",h+=l+`<${F}${q}${M}?>`,$=!0;continue}let L=w;if(L!=="")L+=s.indentBy;const C=w7(I[":@"],s),Y=w+`<${F}${C}`,X=h7(I[F],s,U,L);if(s.unpairedTags.indexOf(F)!==-1)if(s.suppressUnpairedNode)h+=Y+">";else h+=Y+"/>";else if((!X||X.length===0)&&s.suppressEmptyNode)h+=Y+"/>";else if(X&&X.endsWith(">"))h+=Y+`>${X}${w}</${F}>`;else{if(h+=Y+">",X&&w!==""&&(X.includes("/>")||X.includes("</")))h+=w+s.indentBy+X+w;else h+=X;h+=`</${F}>`}$=!0}return h}function Kc(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 w7(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=$7(h,s),h===!0&&s.suppressBooleanAttributes)f+=` ${w.substr(s.attributeNamePrefix.length)}`;else f+=` ${w.substr(s.attributeNamePrefix.length)}="${h}"`}return f}function Zc(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 $7(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}E7.exports=Yc});var U7=v((C$r,F7)=>{function Os(r){if(this.options=Object.assign({},Jc,r),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Bc;if(this.processTextOrObjNode=Qc,this.options.format)this.indentate=Mc,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function Qc(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 Mc(r){return this.options.indentBy.repeat(r)}function Bc(r){if(r.startsWith(this.options.attributeNamePrefix)&&r!==this.options.textNodeName)return r.substr(this.attrPrefixLen);else return!1}var Sc=I7(),Jc={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};Os.prototype.build=function(r){if(this.options.preserveOrder)return Sc(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}};Os.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 $=this.isAttribute(h);if($)f+=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,"",s)}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(s)+"<"+h+"?"+this.tagEndChar;else w+=this.indentate(s)+"<"+h+"/"+this.tagEndChar;else if(typeof U==="object")if(this.options.oneListGroup){const L=this.j2x(U,s+1);if(E+=L.val,this.options.attributesGroupName&&U.hasOwnProperty(this.options.attributesGroupName))I+=L.attrStr}else E+=this.processTextOrObjNode(U,h,s);else if(this.options.oneListGroup){let L=this.options.tagValueProcessor(h,U);L=this.replaceEntitiesValue(L),E+=L}else E+=this.buildTextValNode(U,h,"",s)}if(this.options.oneListGroup)E=this.buildObjectNode(E,h,I,s);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++)f+=this.buildAttrPairStr($[I],""+r[h][$[I]])}else w+=this.processTextOrObjNode(r[h],h,s)}return{attrStr:f,val:w}};Os.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+'"'};Os.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,$="";if(s[0]==="?")$="?",h="";if((f||f==="")&&r.indexOf("<")===-1)return this.indentate(w)+"<"+s+f+$+">"+r+h;else if(this.options.commentPropName!==!1&&s===this.options.commentPropName&&$.length===0)return this.indentate(w)+`<!--${r}-->`+this.newLine;else return this.indentate(w)+"<"+s+f+$+this.tagEndChar+r+this.indentate(w)+h}};Os.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};Os.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}};Os.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};F7.exports=Os});var T7=v((R$r,G7)=>{var Vc=JU(),Hc=s7(),Dc=U7();G7.exports={XMLParser:Hc,XMLValidator:Vc,XMLBuilder:Dc}});var R7=v((P$r,C7)=>{var{defineProperty:ME,getOwnPropertyDescriptor:kc,getOwnPropertyNames:lc}=Object,Nc=Object.prototype.hasOwnProperty,C0=(r,s)=>ME(r,"name",{value:s,configurable:!0}),qc=(r,s)=>{for(var f in s)ME(r,f,{get:s[f],enumerable:!0})},yc=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of lc(s))if(!Nc.call(r,h)&&h!==f)ME(r,h,{get:()=>s[h],enumerable:!(w=kc(s,h))||w.enumerable})}return r},mc=(r)=>yc(ME({},"__esModule",{value:!0}),r),L7={};qc(L7,{_toBool:()=>vc,_toNum:()=>Oc,_toStr:()=>jc,awsExpectUnion:()=>dc,loadRestJsonErrorCode:()=>_c,loadRestXmlErrorCode:()=>nc,parseJsonBody:()=>A7,parseJsonErrorBody:()=>cc,parseXmlBody:()=>z7,parseXmlErrorBody:()=>ec});C7.exports=mc(L7);var jc=C0((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"),vc=C0((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"),Oc=C0((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"),ic=sh(),dc=C0((r)=>{if(r==null)return;if(typeof r==="object"&&"__type"in r)delete r.__type;return ic.expectUnion(r)},"awsExpectUnion"),bc=sh(),W7=C0((r,s)=>bc.collectBody(r,s).then((f)=>s.utf8Encoder(f)),"collectBodyString"),A7=C0((r,s)=>W7(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"),cc=C0(async(r,s)=>{const f=await A7(r,s);return f.message=f.message??f.Message,f},"parseJsonErrorBody"),_c=C0((r,s)=>{const f=C0(($,E)=>Object.keys($).find((I)=>I.toLowerCase()===E.toLowerCase()),"findKey"),w=C0(($)=>{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=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"),gc=sh(),xc=T7(),z7=C0((r,s)=>W7(r,s).then((f)=>{if(f.length){const w=new xc.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 $="#text",E=Object.keys(h)[0],I=h[E];if(I[$])I[E]=I[$],delete I[$];return gc.getValueFromTextNode(I)}return{}}),"parseXmlBody"),ec=C0(async(r,s)=>{const f=await z7(r,s);if(f.Error)f.Error.message=f.Error.message??f.Error.Message;return f},"parseXmlErrorBody"),nc=C0((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 Vr=v((H1)=>{Object.defineProperty(H1,"__esModule",{value:!0});var BU=uY();BU.__exportStar(sK(),H1);BU.__exportStar(lK(),H1);BU.__exportStar(R7(),H1)});var VE="AWS_ACCESS_KEY_ID",HE="AWS_SECRET_ACCESS_KEY",J7="AWS_SESSION_TOKEN",Q7="AWS_CREDENTIAL_EXPIRATION",M7="AWS_CREDENTIAL_SCOPE",B7="AWS_ACCOUNT_ID",VU=(r)=>async()=>{r?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const s=process.env[VE],f=process.env[HE],w=process.env[J7],h=process.env[Q7],$=process.env[M7],E=process.env[B7];if(s&&f)return{accessKeyId:s,secretAccessKey:f,...w&&{sessionToken:w},...h&&{expiration:new Date(h)},...$&&{credentialScope:$},...E&&{accountId:E}};throw new x("Unable to find environment variable credentials.",{logger:r?.logger})};var V7=T(()=>{Lr()});var H7={};Lf(H7,{fromEnv:()=>VU,ENV_SESSION:()=>J7,ENV_SECRET:()=>HE,ENV_KEY:()=>VE,ENV_EXPIRATION:()=>Q7,ENV_CREDENTIAL_SCOPE:()=>M7,ENV_ACCOUNT_ID:()=>B7});var HU=T(()=>{V7()});import{Buffer as pc}from"buffer";import{request as uc}from"http";function is(r){return new Promise((s,f)=>{const w=uc({method:"GET",...r,hostname:r.hostname?.replace(/^\[(.+)\]$/,"$1")});w.on("error",(h)=>{f(Object.assign(new M0("Unable to connect to instance metadata service"),h)),w.destroy()}),w.on("timeout",()=>{f(new M0("TimeoutError from instance metadata service")),w.destroy()}),w.on("response",(h)=>{const{statusCode:$=400}=h;if($<200||300<=$)f(Object.assign(new M0("Error response received from instance metadata service"),{statusCode:$})),w.destroy();const E=[];h.on("data",(I)=>{E.push(I)}),h.on("end",()=>{s(pc.concat(E)),w.destroy()})}),w.end()})}var DE=T(()=>{Lr()});var kE=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.AccessKeyId==="string"&&typeof r.SecretAccessKey==="string"&&typeof r.Token==="string"&&typeof r.Expiration==="string",lE=(r)=>({accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.Token,expiration:new Date(r.Expiration),...r.AccountId&&{accountId:r.AccountId}});var tc=1000,r_=0,D1=({maxRetries:r=0,timeout:s=1000})=>({maxRetries:r,timeout:s});var k1=(r,s)=>{let f=r();for(let w=0;w<s;w++)f=f.catch(r);return f};import{parse as f_}from"url";var NE="AWS_CONTAINER_CREDENTIALS_FULL_URI",qE="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",DU="AWS_CONTAINER_AUTHORIZATION_TOKEN",s_=(r={})=>{const{timeout:s,maxRetries:f}=D1(r);return()=>k1(async()=>{const w=await I_({logger:r.logger}),h=JSON.parse(await w_(s,w));if(!kE(h))throw new x("Invalid response received from instance metadata service.",{logger:r.logger});return lE(h)},f)},w_=async(r,s)=>{if(process.env[DU])s.headers={...s.headers,Authorization:process.env[DU]};return(await is({...s,timeout:r})).toString()},h_="169.254.170.2",$_,E_,I_=async({logger:r})=>{if(process.env[qE])return{hostname:h_,path:process.env[qE]};if(process.env[NE]){const s=f_(process.env[NE]);if(!s.hostname||!(s.hostname in $_))throw new x(`${s.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:r});if(!s.protocol||!(s.protocol in E_))throw new x(`${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 x(`The container metadata credential provider cannot be used unless the ${qE} or ${NE} environment variable is set`,{tryNextLink:!1,logger:r})};var D7=T(()=>{Lr();DE();$_={localhost:!0,"127.0.0.1":!0},E_={"http:":!0,"https:":!0}});var yE;var k7=T(()=>{Lr();yE=class yE extends x{constructor(r,s=!0){super(r,s);this.tryNextLink=s,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,yE.prototype)}}});var Jw;var kU=T(()=>{(function(r){r.IPv4="http://169.254.169.254",r.IPv6="http://[fd00:ec2::254]"})(Jw||(Jw={}))});var l7;var N7=T(()=>{l7={environmentVariableSelector:(r)=>r.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(r)=>r.ec2_metadata_service_endpoint,default:void 0}});var ds;var lU=T(()=>{(function(r){r.IPv4="IPv4",r.IPv6="IPv6"})(ds||(ds={}))});var F_="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",U_="ec2_metadata_service_endpoint_mode",q7;var y7=T(()=>{lU();q7={environmentVariableSelector:(r)=>r[F_],configFileSelector:(r)=>r[U_],default:ds.IPv4}});var mE=async()=>cr(await G_()||await T_()),G_=async()=>u(l7)(),T_=async()=>{const r=await u(q7)();switch(r){case ds.IPv4:return Jw.IPv4;case ds.IPv6:return Jw.IPv6;default:throw new Error(`Unsupported endpoint mode: ${r}. Select from ${Object.values(ds)}`)}};var NU=T(()=>{t0();ms();kU();N7();lU();y7()});var qU=(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 m7=(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=qU(h,f)}catch($){if(w)f.warn("Credential renew failed: ",$),h=qU(w,f);else throw $}return w=h,h}};var j7=()=>{};var i7="/latest/meta-data/iam/security-credentials/",L_="/latest/api/token",yU="AWS_EC2_METADATA_V1_DISABLED",v7="ec2_metadata_v1_disabled",O7="x-aws-ec2-metadata-token",W_=(r={})=>m7(A_(r),{logger:r.logger}),A_=(r={})=>{let s=!1;const{logger:f,profile:w}=r,{timeout:h,maxRetries:$}=D1(r),E=async(I,F)=>{if(s||F.headers?.[O7]==null){let C=!1,Y=!1;const X=await u({environmentVariableSelector:(M)=>{const l=M[yU];if(Y=!!l&&l!=="false",l===void 0)throw new x(`${yU} not set in env, checking config file next.`,{logger:r.logger});return Y},configFileSelector:(M)=>{const l=M[v7];return C=!!l&&l!=="false",C},default:!1},{profile:w})();if(r.ec2MetadataV1Disabled||X){const M=[];if(r.ec2MetadataV1Disabled)M.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(C)M.push(`config file profile (${v7})`);if(Y)M.push(`process environment variable (${yU})`);throw new yE(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${M.join(", ")}].`)}}const L=(await k1(async()=>{let C;try{C=await C_(F)}catch(Y){if(Y.statusCode===401)s=!1;throw Y}return C},I)).trim();return k1(async()=>{let C;try{C=await R_(L,F,r)}catch(Y){if(Y.statusCode===401)s=!1;throw Y}return C},I)};return async()=>{const I=await mE();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 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))s=!0;return f?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E($,{...I,timeout:h})}return E($,{...I,headers:{[O7]:F},timeout:h})}}},z_=async(r)=>is({...r,path:L_,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),C_=async(r)=>(await is({...r,path:i7})).toString(),R_=async(r,s,f)=>{const w=JSON.parse((await is({...s,path:i7+r})).toString());if(!kE(w))throw new x("Invalid response received from instance metadata service.",{logger:f.logger});return lE(w)};var d7=T(()=>{t0();Lr();k7();DE();NU();j7()});var b7=()=>{};var l1={};Lf(l1,{providerConfigFromInit:()=>D1,httpRequest:()=>is,getInstanceMetadataEndpoint:()=>mE,fromInstanceMetadata:()=>W_,fromContainerMetadata:()=>s_,Endpoint:()=>Jw,ENV_CMDS_RELATIVE_URI:()=>qE,ENV_CMDS_FULL_URI:()=>NE,ENV_CMDS_AUTH_TOKEN:()=>DU,DEFAULT_TIMEOUT:()=>tc,DEFAULT_MAX_RETRIES:()=>r_});var N1=T(()=>{D7();d7();b7();DE();NU();kU()});var q1=(r)=>encodeURIComponent(r).replace(/[!'()*]/g,P_),P_=(r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`;var c7=()=>{};var _7=T(()=>{c7()});function mU(r){const s=[];for(let f of Object.keys(r).sort()){const w=r[f];if(f=q1(f),Array.isArray(w))for(let h=0,$=w.length;h<$;h++)s.push(`${f}=${q1(w[h])}`);else{let h=f;if(w||typeof w==="string")h+=`=${q1(w)}`;s.push(h)}}return s.join("&")}var jU=T(()=>{_7()});var g7;var x7=T(()=>{g7=["ECONNRESET","EPIPE","ETIMEDOUT"]});var vU=(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 OU=()=>{};var e7=(r,s,f=0)=>{if(!f)return;const w=setTimeout(()=>{r.destroy(),s(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f);r.on("socket",(h)=>{if(h.connecting)h.on("connect",()=>{clearTimeout(w)});else clearTimeout(w)})};var n7=(r,{keepAlive:s,keepAliveMsecs:f})=>{if(s!==!0)return;r.on("socket",(w)=>{w.setKeepAlive(s,f||0)})};var o7=(r,s,f=0)=>{r.setTimeout(f,()=>{r.destroy(),s(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))})};import{Readable as X_}from"stream";async function iU(r,s,f=a7){const w=s.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(a7,f)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout($),I()}),r.on("error",()=>{E=!0,clearTimeout($),I()})})]);if(!E)Y_(r,s.body)}function Y_(r,s){if(s instanceof X_){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 a7=1000;var dU=()=>{};import{Agent as p7,request as K_}from"http";import{Agent as u7,request as Z_}from"https";class tr{static create(r){if(typeof r?.handle==="function")return r;return new tr(r)}static checkSocketUsage(r,s,f=console){const{sockets:w,requests:h,maxSockets:$}=r;if(typeof $!=="number"||$===1/0)return s;const E=15000;if(Date.now()-E<s)return s;if(w&&h)for(let I in w){const F=w[I]?.length??0,U=h[I]?.length??0;if(F>=$&&U>=2*$)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:$}=r||{};return{connectionTimeout:f,requestTimeout:s??w,httpAgent:(()=>{if(h instanceof p7||typeof h?.destroy==="function")return h;return new p7({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if($ instanceof u7||typeof $?.destroy==="function")return $;return new u7({keepAlive:!0,maxSockets:50,...$})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(r,{abortSignal:s}={}){if(!this.config)this.config=await this.configProvider;let f;return new Promise((w,h)=>{let $=void 0;const E=async(D)=>{await $,clearTimeout(f),w(D)},I=async(D)=>{await $,clearTimeout(f),h(D)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(s?.aborted){const D=new Error("Request aborted");D.name="AbortError",I(D);return}const F=r.protocol==="https:",U=F?this.config.httpsAgent:this.config.httpAgent;f=setTimeout(()=>{this.socketWarningTimestamp=tr.checkSocketUsage(U,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const L=mU(r.query||{});let C=void 0;if(r.username!=null||r.password!=null){const D=r.username??"",m=r.password??"";C=`${D}:${m}`}let Y=r.path;if(L)Y+=`?${L}`;if(r.fragment)Y+=`#${r.fragment}`;const X={headers:r.headers,host:r.hostname,method:r.method,path:Y,port:r.port,agent:U,auth:C},l=(F?Z_:K_)(X,(D)=>{const m=new Fw({statusCode:D.statusCode||-1,reason:D.statusMessage,headers:vU(D.headers),body:D});E({response:m})});if(l.on("error",(D)=>{if(g7.includes(D.code))I(Object.assign(D,{name:"TimeoutError"}));else I(D)}),e7(l,I,this.config.connectionTimeout),o7(l,I,this.config.requestTimeout),s){const D=()=>{l.destroy();const m=new Error("Request aborted");m.name="AbortError",I(m)};if(typeof s.addEventListener==="function"){const m=s;m.addEventListener("abort",D,{once:!0}),l.once("close",()=>m.removeEventListener("abort",D))}else s.onabort=D}const q=X.agent;if(typeof q==="object"&&"keepAlive"in q)n7(l,{keepAlive:q.keepAlive,keepAliveMsecs:q.keepAliveMsecs});$=iU(l,r,this.config.requestTimeout).catch((D)=>{return clearTimeout(f),h(D)})})}updateHttpClientConfig(r,s){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[r]:s}})}httpHandlerConfigs(){return this.config??{}}}var t7=T(()=>{Nr();jU();x7();OU();dU()});var rZ=()=>{};var fZ=T(()=>{rZ()});var sZ=T(()=>{Nr();jU();OU();fZ();dU()});import{Writable as S_}from"stream";var bU;var wZ=T(()=>{bU=class bU extends S_{constructor(){super(...arguments);this.bufferedBytes=[]}_write(r,s,f){this.bufferedBytes.push(r),f()}}});async function Q_(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 $=new Uint8Array(h);let E=0;for(let I of s)$.set(I,E),E+=I.length;return $}var df=(r)=>{if(J_(r))return Q_(r);return new Promise((s,f)=>{const w=new bU;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)})})},J_=(r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream;var hZ=T(()=>{wZ()});var Qw=T(()=>{t7();sZ();hZ()});var M_="169.254.170.2",B_="169.254.170.23",V_="[fd00:ec2::23]",$Z=(r,s)=>{if(r.protocol==="https:")return;if(r.hostname===M_||r.hostname===B_||r.hostname===V_)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 $=parseInt(h,10);return 0<=$&&$<=255};if(f[0]==="127"&&w(f[1])&&w(f[2])&&w(f[3])&&f.length===4)return}throw new x(`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 cZ=G(()=>{Lr()});function bZ(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 gZ(r,f){const w=await gX(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 _("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:hY(h.Expiration)}}if(r.statusCode>=400&&r.statusCode<500){let h={};try{h=JSON.parse(w)}catch($){}throw Object.assign(new _(`Server responded with status: ${r.statusCode}`,{logger:f}),{Code:h.Code,Message:h.Message})}throw new _(`Server responded with status: ${r.statusCode}`,{logger:f})}var _Z=G(()=>{Lr();ir();Y();W5()});var xZ=(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 I_ from"fs/promises";var F_="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",U_="http://169.254.170.2",T_="AWS_CONTAINER_CREDENTIALS_FULL_URI",G_="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",C_="AWS_CONTAINER_AUTHORIZATION_TOKEN",eZ=(r={})=>{r.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let f;const s=r.awsContainerCredentialsRelativeUri??process.env[F_],w=r.awsContainerCredentialsFullUri??process.env[T_],h=r.awsContainerAuthorizationToken??process.env[C_],$=r.awsContainerAuthorizationTokenFile??process.env[G_],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=`${U_}${s}`;else throw new _(`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);OZ(I,r.logger);const F=new tr({requestTimeout:r.timeout??1000,connectionTimeout:r.timeout??1000});return xZ(async()=>{const U=bZ(I);if(h)U.headers.Authorization=h;else if($)U.headers.Authorization=(await I_.readFile($)).toString();try{const C=await F.handle(U);return gZ(C.response)}catch(C){throw new _(String(C),{logger:r.logger})}},r.maxRetries??3,r.timeout??1000)};var nZ=G(()=>{_0();Lr();cZ();_Z()});var o5={};Sf(o5,{fromHttp:()=>eZ});var a5=G(()=>{nZ()});var L_="AWS_EC2_METADATA_DISABLED",oZ=async(r)=>{const{ENV_CMDS_FULL_URI:f,ENV_CMDS_RELATIVE_URI:s,fromContainerMetadata:w,fromInstanceMetadata:h}=await Promise.resolve().then(() => (c1(),O1));if(process.env[s]||process.env[f]){r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:$}=await Promise.resolve().then(() => (a5(),o5));return A0($(r),w(r))}if(process.env[L_])return async()=>{throw new _("EC2 Instance Metadata Service access disabled",{logger:r.logger})};return r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),h(r)};var aZ=G(()=>{Lr()});var p5=(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 pZ=300000,Yh="To refresh this SSO session run 'aws sso login' with the corresponding profile.";function A_(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}function u5(r){return{schemeId:"smithy.api#noAuth"}}var uZ,tZ=async(r,f,s)=>{return{operation:Js(f).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},r7=(r)=>{const f=[];switch(r.operation){case"CreateToken":{f.push(u5(r));break}case"RegisterClient":{f.push(u5(r));break}case"StartDeviceAuthorization":{f.push(u5(r));break}default:f.push(A_(r))}return f},s7=(r)=>{return{...uZ.resolveAwsSdkSigV4Config(r)}};var t5=G(()=>{uZ=u(Br(),1);rf()});var f7=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},p0;var Kh=G(()=>{p0={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var h7;var w7=G(()=>{h7={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 rT;var sT=G(()=>{rT={isCrtAvailable:!1}});var $7=()=>{if(rT.isCrtAvailable)return["md/crt-avail"];return null};var E7=G(()=>{sT()});import{platform as W_,release as z_}from"os";import{env as I7,versions as S_}from"process";var P_="AWS_SDK_UA_APP_ID",X_="sdk-ua-app-id",nf=({serviceId:r,clientVersion:f})=>{const s=[["aws-sdk-js",f],["ua","2.0"],[`os/${W_()}`,z_()],["lang/js"],["md/nodejs",`${S_.node}`]],w=$7();if(w)s.push(w);if(r)s.push([`api/${r}`,f]);if(I7.AWS_EXECUTION_ENV)s.push([`exec-env/${I7.AWS_EXECUTION_ENV}`]);const h=t({environmentVariableSelector:(E)=>E[P_],configFileSelector:(E)=>E[X_],default:void 0})();let $=void 0;return async()=>{if(!$){const E=await h;$=E?[...s,[`app/${E}`]]:[...s]}return $}};var Zh=G(()=>{$f();E7();sT()});import{Buffer as Y_}from"buffer";import{createHash as K_,createHmac as Z_}from"crypto";function F7(r,f){if(Y_.isBuffer(r))return r;if(typeof r==="string")return Wh(r,f);if(ArrayBuffer.isView(r))return R0(r.buffer,r.byteOffset,r.byteLength);return R0(r)}class If{constructor(r,f){this.algorithmIdentifier=r,this.secret=f,this.reset()}update(r,f){this.hash.update(TX(F7(r,f)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Z_(this.algorithmIdentifier,F7(this.secret)):K_(this.algorithmIdentifier)}}var lh=G(()=>{Qw();jf()});import{fstatSync as l_,lstatSync as J_}from"fs";var of=(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 J_(r.path).size;else if(typeof r.fd==="number")return l_(r.fd).size;throw new Error(`Body Length computation failed for ${r}`)};var U7=()=>{};var Jh=G(()=>{U7()});var T7,G7,C7,S7,P7,qs,L7,X7,A7,R7,W7,z7,Q_,Y7;var K7=G(()=>{T7={["required"]:!1,type:"String"},G7={["required"]:!0,default:!1,type:"Boolean"},C7={["ref"]:"Endpoint"},S7={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},P7={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},qs={},L7={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},X7={["ref"]:"PartitionResult"},A7={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[X7,"supportsDualStack"]}]},R7=[S7],W7=[P7],z7=[{["ref"]:"Region"}],Q_={version:"1.0",parameters:{Region:T7,UseDualStack:G7,UseFIPS:G7,Endpoint:T7},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[C7]}],rules:[{conditions:R7,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:W7,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:C7,properties:qs,headers:qs},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:z7}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:z7,assign:"PartitionResult"}],rules:[{conditions:[S7,P7],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,L7]},A7],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:qs,headers:qs},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:R7,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[L7,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[X7,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:qs,headers:qs},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:qs,headers:qs},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:W7,rules:[{conditions:[A7],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:qs,headers:qs},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:qs,headers:qs},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},Y7=Q_});var Z7=(r,f={})=>{return ps(Y7,{endpointParams:r,logger:f.logger})};var l7=G(()=>{Ww();us();K7();ur.aws=ts});var J7,Q7,M7=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??Us,base64Encoder:r?.base64Encoder??Gs,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??Z7,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??r7,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new J7.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(f)=>f.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Q7.NoAuthSigner}],logger:r?.logger??new Ws,serviceId:r?.serviceId??"SSO OIDC",urlParser:r?.urlParser??gr,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Ts}};var B7=G(()=>{J7=u(Br(),1),Q7=u(Or(),1);Y();b0();W0();jf();t5();l7()});var H7="AWS_EXECUTION_ENV",fT="AWS_REGION",wT="AWS_DEFAULT_REGION",V7="AWS_EC2_METADATA_DISABLED",k7,D7="/latest/meta-data/placement/region";var i7=G(()=>{k7=["in-region","cross-region","mobile","standard","legacy"]});var y7;var m7=G(()=>{y7={environmentVariableSelector:(r)=>{return r.AWS_DEFAULTS_MODE},configFileSelector:(r)=>{return r.defaults_mode},default:"legacy"}});var af=({region:r=t(Qs),defaultsMode:f=t(y7)}={})=>Kw(async()=>{const s=typeof f==="function"?await f():f;switch(s?.toLowerCase()){case"auto":return M_(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 ${k7.join(", ")}, got ${s}`)}}),M_=async(r)=>{if(r){const f=typeof r==="function"?await r():r,s=await B_();if(!s)return"standard";if(f===s)return"in-region";else return"cross-region"}return"standard"},B_=async()=>{if(process.env[H7]&&(process.env[fT]||process.env[wT]))return process.env[fT]??process.env[wT];if(!process.env[V7])try{const{getInstanceMetadataEndpoint:r,httpRequest:f}=await Promise.resolve().then(() => (c1(),O1)),s=await r();return(await f({...s,path:D7})).toString()}catch(r){}};var N7=G(()=>{Ms();$f();Lr();i7();m7()});var Qh=G(()=>{N7()});var q7,v7=(r)=>{gf(process.version);const f=af(r),s=()=>f().then(bf),w=M7(r);return q7.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??of,credentialDefaultProvider:r?.credentialDefaultProvider??S0,defaultUserAgentProvider:r?.defaultUserAgentProvider??nf({serviceId:w.serviceId,clientVersion:h7.version}),maxAttempts:r?.maxAttempts??t(Nf),region:r?.region??t(Qs,Hf),requestHandler:tr.create(r?.requestHandler??s),retryMode:r?.retryMode??t({...vf,default:async()=>(await s()).retryMode||ys}),sha256:r?.sha256??If.bind(null,"sha256"),streamCollector:r?.streamCollector??ms,useDualstackEndpoint:r?.useDualstackEndpoint??t(Mf),useFipsEndpoint:r?.useFipsEndpoint??t(Bf)}};var j7=G(()=>{w7();q7=u(Br(),1);b1();Zh();Ms();lh();Ef();$f();_0();Jh();Rs();B7();Y();Qh();Y()});var pf=(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}}},uf=(r)=>{return{region:r.region()}};var d7=()=>{};var O7=()=>{};var c7=G(()=>{O7()});var b7=G(()=>{d7();c7()});var Mh=G(()=>{b7()});var g7=(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}}},_7=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var b3=(r)=>r,x7=(r,f)=>{const s={...b3(pf(r)),...b3(_f(r)),...b3(Pf(r)),...b3(g7(r))};return f.forEach((w)=>w.configure(s)),{...r,...uf(s),...xf(s),...Xf(s),..._7(s)}};var e7=G(()=>{Mh();ir();Y()});var Bh,g3;var hT=G(()=>{aw();pw();uw();rh();Ms();Bh=u(Or(),1);Th();M();Ef();Y();t5();Kh();j7();e7();g3=class g3 extends zs{constructor(...[r]){const f=v7(r||{}),s=f7(f),w=Jf(s),h=qf(w),$=Vf(h),E=Yf($),I=yf(E),F=s7(I),U=x7(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Qf(this.config)),this.middlewareStack.use(ef(this.config)),this.middlewareStack.use(Df(this.config)),this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(Zf(this.config)),this.middlewareStack.use(lf(this.config)),this.middlewareStack.use(Bh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:tZ,identityProviderConfigProvider:async(C)=>new Bh.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(Bh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var Hr;var _3=G(()=>{Y();Hr=class Hr extends Ns{constructor(r){super(r);Object.setPrototypeOf(this,Hr.prototype)}}});var g1,_1,x1,e1,n1,o1,a1,p1,u1,t1,r$,s$,f$,w$,$T=(r)=>({...r,...r.clientSecret&&{clientSecret:o},...r.refreshToken&&{refreshToken:o},...r.codeVerifier&&{codeVerifier:o}}),ET=(r)=>({...r,...r.accessToken&&{accessToken:o},...r.refreshToken&&{refreshToken:o},...r.idToken&&{idToken:o}}),IT=(r)=>({...r,...r.refreshToken&&{refreshToken:o},...r.assertion&&{assertion:o},...r.subjectToken&&{subjectToken:o},...r.codeVerifier&&{codeVerifier:o}}),FT=(r)=>({...r,...r.accessToken&&{accessToken:o},...r.refreshToken&&{refreshToken:o},...r.idToken&&{idToken:o}}),UT=(r)=>({...r,...r.clientSecret&&{clientSecret:o}}),TT=(r)=>({...r,...r.clientSecret&&{clientSecret:o}});var iw=G(()=>{Y();_3();g1=class g1 extends Hr{constructor(r){super({name:"AccessDeniedException",$fault:"client",...r});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,g1.prototype),this.error=r.error,this.error_description=r.error_description}};_1=class _1 extends Hr{constructor(r){super({name:"AuthorizationPendingException",$fault:"client",...r});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,_1.prototype),this.error=r.error,this.error_description=r.error_description}};x1=class x1 extends Hr{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,x1.prototype),this.error=r.error,this.error_description=r.error_description}};e1=class e1 extends Hr{constructor(r){super({name:"InternalServerException",$fault:"server",...r});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,e1.prototype),this.error=r.error,this.error_description=r.error_description}};n1=class n1 extends Hr{constructor(r){super({name:"InvalidClientException",$fault:"client",...r});this.name="InvalidClientException",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:"InvalidGrantException",$fault:"client",...r});this.name="InvalidGrantException",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:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",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:"InvalidScopeException",$fault:"client",...r});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,p1.prototype),this.error=r.error,this.error_description=r.error_description}};u1=class u1 extends Hr{constructor(r){super({name:"SlowDownException",$fault:"client",...r});this.name="SlowDownException",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:"UnauthorizedClientException",$fault:"client",...r});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,t1.prototype),this.error=r.error,this.error_description=r.error_description}};r$=class r$ extends Hr{constructor(r){super({name:"UnsupportedGrantTypeException",$fault:"client",...r});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,r$.prototype),this.error=r.error,this.error_description=r.error_description}};s$=class s$ extends Hr{constructor(r){super({name:"InvalidRequestRegionException",$fault:"client",...r});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,s$.prototype),this.error=r.error,this.error_description=r.error_description,this.endpoint=r.endpoint,this.region=r.region}};f$=class f$ extends Hr{constructor(r){super({name:"InvalidClientMetadataException",$fault:"client",...r});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,f$.prototype),this.error=r.error,this.error_description=r.error_description}};w$=class w$ extends Hr{constructor(r){super({name:"InvalidRedirectUriException",$fault:"client",...r});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,w$.prototype),this.error=r.error,this.error_description=r.error_description}}});var P0,h$,n7=async(r,f)=>{const s=h$.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()},o7=async(r,f)=>{const s=h$.requestBuilder(r,f),w={"content-type":"application/json"};s.bp("/token");const h=P({[__]:[,"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()},a7=async(r,f)=>{const s=h$.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()},p7=async(r,f)=>{const s=h$.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()},u7=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return x3(r,f);const s=P({$metadata:qr(r)}),w=y(d(await P0.parseJsonBody(r.body,f)),"body"),h=p(w,{accessToken:T,expiresIn:Mw,idToken:T,refreshToken:T,tokenType:T});return Object.assign(s,h),s},t7=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return x3(r,f);const s=P({$metadata:qr(r)}),w=y(d(await P0.parseJsonBody(r.body,f)),"body"),h=p(w,{accessToken:T,expiresIn:Mw,idToken:T,issuedTokenType:T,refreshToken:T,scope:m,tokenType:T});return Object.assign(s,h),s},rl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return x3(r,f);const s=P({$metadata:qr(r)}),w=y(d(await P0.parseJsonBody(r.body,f)),"body"),h=p(w,{authorizationEndpoint:T,clientId:T,clientIdIssuedAt:zh,clientSecret:T,clientSecretExpiresAt:zh,tokenEndpoint:T});return Object.assign(s,h),s},sl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return x3(r,f);const s=P({$metadata:qr(r)}),w=y(d(await P0.parseJsonBody(r.body,f)),"body"),h=p(w,{deviceCode:T,expiresIn:Mw,interval:Mw,userCode:T,verificationUri:T,verificationUriComplete:T});return Object.assign(s,h),s},x3=async(r,f)=>{const s={...r,body:await P0.parseJsonErrorBody(r.body,f)},w=P0.loadRestJsonErrorCode(r,s.body);switch(w){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await k_(s,f);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await D_(s,f);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await i_(s,f);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await y_(s,f);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await m_(s,f);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await q_(s,f);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await j_(s,f);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await O_(s,f);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await c_(s,f);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await b_(s,f);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await g_(s,f);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await d_(s,f);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await N_(s,f);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await v_(s,f);default:const h=s.body;return V_({output:r,parsedBody:h,errorCode:w})}},V_,k_=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:qr(r),...s});return k($,r.body)},D_=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:qr(r),...s});return k($,r.body)},i_=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:qr(r),...s});return k($,r.body)},y_=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:qr(r),...s});return k($,r.body)},m_=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:qr(r),...s});return k($,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 f$({$metadata:qr(r),...s});return k($,r.body)},q_=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:qr(r),...s});return k($,r.body)},v_=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new w$({$metadata:qr(r),...s});return k($,r.body)},j_=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:qr(r),...s});return k($,r.body)},d_=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 s$({$metadata:qr(r),...s});return k($,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 p1({$metadata:qr(r),...s});return k($,r.body)},c_=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:qr(r),...s});return k($,r.body)},b_=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:qr(r),...s});return k($,r.body)},g_=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new r$({$metadata:qr(r),...s});return k($,r.body)},qr=(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"]}),__="aws_iam";var $$=G(()=>{P0=u(Br(),1),h$=u(Or(),1);Y();iw();_3();V_=cf(Hr)});var e3;var GT=G(()=>{M();H();Y();Kh();iw();$$();e3=class e3 extends A.classBuilder().ep({...p0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f($T,ET).ser(n7).de(u7).build(){}});var n3;var CT=G(()=>{M();H();Y();Kh();iw();$$();n3=class n3 extends A.classBuilder().ep({...p0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(IT,FT).ser(o7).de(t7).build(){}});var o3;var LT=G(()=>{M();H();Y();Kh();iw();$$();o3=class o3 extends A.classBuilder().ep({...p0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,UT).ser(a7).de(rl).build(){}});var a3;var AT=G(()=>{M();H();Y();Kh();iw();$$();a3=class a3 extends A.classBuilder().ep({...p0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(TT,void 0).ser(p7).de(sl).build(){}});var x_,RT;var fl=G(()=>{Y();GT();CT();LT();AT();hT();x_={CreateTokenCommand:e3,CreateTokenWithIAMCommand:n3,RegisterClientCommand:o3,StartDeviceAuthorizationCommand:a3};RT=class RT extends g3{};df(x_,RT)});var wl=G(()=>{GT();CT();LT();AT()});var hl=G(()=>{iw()});var WT={};Sf(WT,{__Client:()=>zs,UnsupportedGrantTypeException:()=>r$,UnauthorizedClientException:()=>t1,StartDeviceAuthorizationRequestFilterSensitiveLog:()=>TT,StartDeviceAuthorizationCommand:()=>a3,SlowDownException:()=>u1,SSOOIDCServiceException:()=>Hr,SSOOIDCClient:()=>g3,SSOOIDC:()=>RT,RegisterClientResponseFilterSensitiveLog:()=>UT,RegisterClientCommand:()=>o3,InvalidScopeException:()=>p1,InvalidRequestRegionException:()=>s$,InvalidRequestException:()=>a1,InvalidRedirectUriException:()=>w$,InvalidGrantException:()=>o1,InvalidClientMetadataException:()=>f$,InvalidClientException:()=>n1,InternalServerException:()=>e1,ExpiredTokenException:()=>x1,CreateTokenWithIAMResponseFilterSensitiveLog:()=>FT,CreateTokenWithIAMRequestFilterSensitiveLog:()=>IT,CreateTokenWithIAMCommand:()=>n3,CreateTokenResponseFilterSensitiveLog:()=>ET,CreateTokenRequestFilterSensitiveLog:()=>$T,CreateTokenCommand:()=>e3,AuthorizationPendingException:()=>_1,AccessDeniedException:()=>g1,$Command:()=>A});var zT=G(()=>{hT();fl();wl();hl();_3()});var ST,$l=async(r)=>{const{SSOOIDCClient:f}=await Promise.resolve().then(() => (zT(),WT));if(ST[r])return ST[r];const s=new f({region:r});return ST[r]=s,s};var El=G(()=>{ST={}});var Il=async(r,f)=>{const{CreateTokenCommand:s}=await Promise.resolve().then(() => (zT(),WT));return(await $l(f)).send(new s({clientId:r.clientId,clientSecret:r.clientSecret,refreshToken:r.refreshToken,grantType:"refresh_token"}))};var Fl=G(()=>{El()});var PT=(r)=>{if(r.expiration&&r.expiration.getTime()<Date.now())throw new Fs(`Token is expired. ${Yh}`,!1)};var Ul=G(()=>{Lr()});var u0=(r,f,s=!1)=>{if(typeof f==="undefined")throw new Fs(`Value not present for '${r}' in SSO Token${s?". Cannot refresh":""}. ${Yh}`,!1)};var Tl=G(()=>{Lr()});import{promises as e_}from"fs";var n_,Gl=(r,f)=>{const s=w3(r),w=JSON.stringify(f,null,2);return n_(s,w)};var Cl=G(()=>{hf();({writeFile:n_}=e_)});var Ll,Al=(r={})=>async()=>{r.logger?.debug("@aws-sdk/token-providers - fromSso");const f=await c0(r),s=ks(r),w=f[s];if(!w)throw new Fs(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!w.sso_session)throw new Fs(`Profile '${s}' is missing required property 'sso_session'.`);const h=w.sso_session,E=(await I3(r))[h];if(!E)throw new Fs(`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 Fs(`Sso session '${h}' is missing required property '${S}'.`,!1);const{sso_start_url:I,sso_region:F}=E;let U;try{U=await h3(h)}catch(S){throw new Fs(`The SSO session token associated with profile=${s} was not found or is invalid. ${Yh}`,!1)}u0("accessToken",U.accessToken),u0("expiresAt",U.expiresAt);const{accessToken:C,expiresAt:L}=U,z={token:C,expiration:new Date(L)};if(z.expiration.getTime()-Date.now()>pZ)return z;if(Date.now()-Ll.getTime()<30000)return PT(z),z;u0("clientId",U.clientId,!0),u0("clientSecret",U.clientSecret,!0),u0("refreshToken",U.refreshToken,!0);try{Ll.setTime(Date.now());const S=await Il(U,F);u0("accessToken",S.accessToken),u0("expiresIn",S.expiresIn);const Z=new Date(Date.now()+S.expiresIn*1000);try{await Gl(h,{...U,accessToken:S.accessToken,expiresAt:Z.toISOString(),refreshToken:S.refreshToken})}catch(D){}return{token:S.accessToken,expiration:Z}}catch(S){return PT(z),z}};var Rl=G(()=>{Lr();hf();Fl();Ul();Tl();Cl();Ll=new Date(0)});var Wl=G(()=>{Lr()});var zl=G(()=>{Lr()});var Sl=G(()=>{Rl();Wl();zl()});function o_(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}function p3(r){return{schemeId:"smithy.api#noAuth"}}var Pl,Xl=async(r,f,s)=>{return{operation:Js(f).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Yl=(r)=>{const f=[];switch(r.operation){case"GetRoleCredentials":{f.push(p3(r));break}case"ListAccountRoles":{f.push(p3(r));break}case"ListAccounts":{f.push(p3(r));break}case"Logout":{f.push(p3(r));break}default:f.push(o_(r))}return f},Kl=(r)=>{return{...Pl.resolveAwsSdkSigV4Config(r)}};var XT=G(()=>{Pl=u(Br(),1);rf()});var Zl=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},t0;var Hh=G(()=>{t0={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var Jl;var ll=G(()=>{Jl={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 Ql,Ml,Bl,yl,ml,vs,Hl,Nl,Vl,kl,Dl,il,p_,ql;var vl=G(()=>{Ql={["required"]:!1,type:"String"},Ml={["required"]:!0,default:!1,type:"Boolean"},Bl={["ref"]:"Endpoint"},yl={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},ml={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},vs={},Hl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Nl={["ref"]:"PartitionResult"},Vl={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Nl,"supportsDualStack"]}]},kl=[yl],Dl=[ml],il=[{["ref"]:"Region"}],p_={version:"1.0",parameters:{Region:Ql,UseDualStack:Ml,UseFIPS:Ml,Endpoint:Ql},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[Bl]}],rules:[{conditions:kl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Dl,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:Bl,properties:vs,headers:vs},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:il}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:il,assign:"PartitionResult"}],rules:[{conditions:[yl,ml],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Hl]},Vl],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vs,headers:vs},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:kl,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Hl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Nl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:vs,headers:vs},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:vs,headers:vs},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Dl,rules:[{conditions:[Vl],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vs,headers:vs},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:vs,headers:vs},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},ql=p_});var jl=(r,f={})=>{return ps(ql,{endpointParams:r,logger:f.logger})};var dl=G(()=>{Ww();us();vl();ur.aws=ts});var Ol,cl,bl=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??Us,base64Encoder:r?.base64Encoder??Gs,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??jl,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??Yl,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new Ol.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(f)=>f.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new cl.NoAuthSigner}],logger:r?.logger??new Ws,serviceId:r?.serviceId??"SSO",urlParser:r?.urlParser??gr,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Ts}};var gl=G(()=>{Ol=u(Br(),1),cl=u(Or(),1);Y();b0();W0();jf();XT();dl()});var _l,xl=(r)=>{gf(process.version);const f=af(r),s=()=>f().then(bf),w=bl(r);return _l.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??of,defaultUserAgentProvider:r?.defaultUserAgentProvider??nf({serviceId:w.serviceId,clientVersion:Jl.version}),maxAttempts:r?.maxAttempts??t(Nf),region:r?.region??t(Qs,Hf),requestHandler:tr.create(r?.requestHandler??s),retryMode:r?.retryMode??t({...vf,default:async()=>(await s()).retryMode||ys}),sha256:r?.sha256??If.bind(null,"sha256"),streamCollector:r?.streamCollector??ms,useDualstackEndpoint:r?.useDualstackEndpoint??t(Mf),useFipsEndpoint:r?.useFipsEndpoint??t(Bf)}};var el=G(()=>{ll();_l=u(Br(),1);Zh();Ms();lh();Ef();$f();_0();Jh();Rs();gl();Y();Qh();Y()});var nl=(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}}},ol=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var u3=(r)=>r,al=(r,f)=>{const s={...u3(pf(r)),...u3(_f(r)),...u3(Pf(r)),...u3(nl(r))};return f.forEach((w)=>w.configure(s)),{...r,...uf(s),...xf(s),...Xf(s),...ol(s)}};var pl=G(()=>{Mh();ir();Y()});var Vh,X0;var E$=G(()=>{aw();pw();uw();rh();Ms();Vh=u(Or(),1);Th();M();Ef();Y();XT();Hh();el();pl();X0=class X0 extends zs{constructor(...[r]){const f=xl(r||{}),s=Zl(f),w=Jf(s),h=qf(w),$=Vf(h),E=Yf($),I=yf(E),F=Kl(I),U=al(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Qf(this.config)),this.middlewareStack.use(ef(this.config)),this.middlewareStack.use(Df(this.config)),this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(Zf(this.config)),this.middlewareStack.use(lf(this.config)),this.middlewareStack.use(Vh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Xl,identityProviderConfigProvider:async(C)=>new Vh.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(Vh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var Y0;var YT=G(()=>{Y();Y0=class Y0 extends Ns{constructor(r){super(r);Object.setPrototypeOf(this,Y0.prototype)}}});var t3,rI,sI,fI,ul=(r)=>({...r,...r.accessToken&&{accessToken:o}}),u_=(r)=>({...r,...r.secretAccessKey&&{secretAccessKey:o},...r.sessionToken&&{sessionToken:o}}),tl=(r)=>({...r,...r.roleCredentials&&{roleCredentials:u_(r.roleCredentials)}}),rJ=(r)=>({...r,...r.accessToken&&{accessToken:o}}),sJ=(r)=>({...r,...r.accessToken&&{accessToken:o}}),fJ=(r)=>({...r,...r.accessToken&&{accessToken:o}});var yw=G(()=>{Y();YT();t3=class t3 extends Y0{constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,t3.prototype)}};rI=class rI extends Y0{constructor(r){super({name:"ResourceNotFoundException",$fault:"client",...r});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,rI.prototype)}};sI=class sI extends Y0{constructor(r){super({name:"TooManyRequestsException",$fault:"client",...r});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,sI.prototype)}};fI=class fI extends Y0{constructor(r){super({name:"UnauthorizedException",$fault:"client",...r});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,fI.prototype)}}});var rw,I$,wJ=async(r,f)=>{const s=I$.requestBuilder(r,f),w=P({},hI,{[EI]:r[$I]});s.bp("/federation/credentials");const h=P({[$x]:[,y(r[hx],"roleName")],[CJ]:[,y(r[GJ],"accountId")]});let $;return s.m("GET").h(w).q(h).b($),s.build()},hJ=async(r,f)=>{const s=I$.requestBuilder(r,f),w=P({},hI,{[EI]:r[$I]});s.bp("/assignment/roles");const h=P({[WJ]:[,r[RJ]],[AJ]:[()=>r.maxResults!==void 0,()=>r[LJ].toString()],[CJ]:[,y(r[GJ],"accountId")]});let $;return s.m("GET").h(w).q(h).b($),s.build()},$J=async(r,f)=>{const s=I$.requestBuilder(r,f),w=P({},hI,{[EI]:r[$I]});s.bp("/assignment/accounts");const h=P({[WJ]:[,r[RJ]],[AJ]:[()=>r.maxResults!==void 0,()=>r[LJ].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},EJ=async(r,f)=>{const s=I$.requestBuilder(r,f),w=P({},hI,{[EI]:r[$I]});s.bp("/logout");let h;return s.m("POST").h(w).b(h),s.build()},IJ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,f);const s=P({$metadata:sw(r)}),w=y(d(await rw.parseJsonBody(r.body,f)),"body"),h=p(w,{roleCredentials:m});return Object.assign(s,h),s},FJ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,f);const s=P({$metadata:sw(r)}),w=y(d(await rw.parseJsonBody(r.body,f)),"body"),h=p(w,{nextToken:T,roleList:m});return Object.assign(s,h),s},UJ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,f);const s=P({$metadata:sw(r)}),w=y(d(await rw.parseJsonBody(r.body,f)),"body"),h=p(w,{accountList:m,nextToken:T});return Object.assign(s,h),s},TJ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,f);const s=P({$metadata:sw(r)});return await xr(r.body,f),s},wI=async(r,f)=>{const s={...r,body:await rw.parseJsonErrorBody(r.body,f)},w=rw.loadRestJsonErrorCode(r,s.body);switch(w){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await rx(s,f);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await sx(s,f);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await fx(s,f);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await wx(s,f);default:const h=s.body;return t_({output:r,parsedBody:h,errorCode:w})}},t_,rx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const $=new t3({$metadata:sw(r),...s});return k($,r.body)},sx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const $=new rI({$metadata:sw(r),...s});return k($,r.body)},fx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const $=new sI({$metadata:sw(r),...s});return k($,r.body)},wx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const $=new fI({$metadata:sw(r),...s});return k($,r.body)},sw=(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"]}),hI=(r)=>r!==void 0&&r!==null&&r!==""&&(!Object.getOwnPropertyNames(r).includes("length")||r.length!=0)&&(!Object.getOwnPropertyNames(r).includes("size")||r.size!=0),GJ="accountId",$I="accessToken",CJ="account_id",LJ="maxResults",AJ="max_result",RJ="nextToken",WJ="next_token",hx="roleName",$x="role_name",EI="x-amz-sso_bearer_token";var F$=G(()=>{rw=u(Br(),1),I$=u(Or(),1);Y();yw();YT();t_=cf(Y0)});var U$;var KT=G(()=>{M();H();Y();Hh();yw();F$();U$=class U$ extends A.classBuilder().ep({...t0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(ul,tl).ser(wJ).de(IJ).build(){}});var T$;var II=G(()=>{M();H();Y();Hh();yw();F$();T$=class T$ extends A.classBuilder().ep({...t0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(rJ,void 0).ser(hJ).de(FJ).build(){}});var G$;var FI=G(()=>{M();H();Y();Hh();yw();F$();G$=class G$ extends A.classBuilder().ep({...t0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(sJ,void 0).ser($J).de(UJ).build(){}});var ZT;var lT=G(()=>{M();H();Y();Hh();yw();F$();ZT=class ZT extends A.classBuilder().ep({...t0}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(fJ,void 0).ser(EJ).de(TJ).build(){}});var Ex,zJ;var SJ=G(()=>{Y();KT();II();FI();lT();E$();Ex={GetRoleCredentialsCommand:U$,ListAccountRolesCommand:T$,ListAccountsCommand:G$,LogoutCommand:ZT};zJ=class zJ extends X0{};df(Ex,zJ)});var PJ=G(()=>{KT();II();FI();lT()});var XJ=()=>{};var YJ,$4r;var KJ=G(()=>{YJ=u(Or(),1);II();E$();$4r=YJ.createPaginator(X0,T$,"nextToken","nextToken","maxResults")});var ZJ,U4r;var lJ=G(()=>{ZJ=u(Or(),1);FI();E$();U4r=ZJ.createPaginator(X0,G$,"nextToken","nextToken","maxResults")});var JJ=G(()=>{XJ();KJ();lJ()});var QJ=G(()=>{yw()});var MJ=G(()=>{E$();SJ();PJ();JJ();QJ()});var BJ={};Sf(BJ,{SSOClient:()=>X0,GetRoleCredentialsCommand:()=>U$});var HJ=G(()=>{MJ()});var C$=!1,JT=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 kr=await Al({profile:I})();U={accessToken:kr.token,expiresAt:new Date(kr.expiration).toISOString()}}catch(kr){throw new _(kr.message,{tryNextLink:C$,logger:F})}else try{U=await h3(r)}catch(kr){throw new _("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:C$,logger:F})}if(new Date(U.expiresAt).getTime()-Date.now()<=0)throw new _("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:C$,logger:F});const{accessToken:L}=U,{SSOClient:z,GetRoleCredentialsCommand:S}=await Promise.resolve().then(() => (HJ(),BJ)),Z=$||new z(Object.assign({},E??{},{region:E?.region??w}));let D;try{D=await Z.send(new S({accountId:s,roleName:h,accessToken:L}))}catch(kr){throw new _(kr,{tryNextLink:C$,logger:F})}const{roleCredentials:{accessKeyId:B,secretAccessKey:Q,sessionToken:i,expiration:x,credentialScope:e,accountId:hr}={}}=D;if(!B||!Q||!i||!x)throw new _("SSO returns an invalid temporary credential.",{tryNextLink:C$,logger:F});return{accessKeyId:B,secretAccessKey:Q,sessionToken:i,expiration:new Date(x),...e&&{credentialScope:e},...hr&&{accountId:hr}}};var VJ=G(()=>{Sl();Lr();hf()});var QT=(r,f)=>{const{sso_start_url:s,sso_account_id:w,sso_region:h,sso_role_name:$}=r;if(!s||!w||!h||!$)throw new _(`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 MT=G(()=>{Lr()});var Ix=(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=ks(r);if(!f&&!s&&!w&&!h&&!$){const U=(await c0(r))[I];if(!U)throw new _(`Profile ${I} was not found.`,{logger:r.logger});if(!p5(U))throw new _(`Profile ${I} is not configured with SSO credentials.`,{logger:r.logger});if(U?.sso_session){const B=(await I3(r))[U.sso_session],Q=` configurations in profile ${I} and sso-session ${U.sso_session}`;if(w&&w!==B.sso_region)throw new _("Conflicting SSO region"+Q,{tryNextLink:!1,logger:r.logger});if(f&&f!==B.sso_start_url)throw new _("Conflicting SSO start_url"+Q,{tryNextLink:!1,logger:r.logger});U.sso_region=B.sso_region,U.sso_start_url=B.sso_start_url}const{sso_start_url:C,sso_account_id:L,sso_region:z,sso_role_name:S,sso_session:Z}=QT(U,r.logger);return JT({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 _('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:r.logger});else return JT({ssoStartUrl:f,ssoSession:$,ssoAccountId:s,ssoRegion:w,ssoRoleName:h,ssoClient:E,clientConfig:r.clientConfig,profile:I})};var kJ=G(()=>{Lr();hf();VJ();MT()});var DJ=()=>{};var BT={};Sf(BT,{validateSsoProfile:()=>QT,isSsoProfile:()=>p5,fromSSO:()=>Ix});var HT=G(()=>{kJ();DJ();MT()});var iJ=(r,f,s)=>{const w={EcsContainer:async(h)=>{const{fromHttp:$}=await Promise.resolve().then(() => (a5(),o5)),{fromContainerMetadata:E}=await Promise.resolve().then(() => (c1(),O1));return s?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),A0($(h??{}),E(h))},Ec2InstanceMetadata:async(h)=>{s?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:$}=await Promise.resolve().then(() => (c1(),O1));return $(h)},Environment:async(h)=>{s?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:$}=await Promise.resolve().then(() => (c5(),MZ));return $(h)}};if(r in w)return w[r];else throw new _(`Unsupported credential source in profile ${f}. Got ${r}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:s})};var yJ=G(()=>{Lr()});function Fx(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}function mJ(r){return{schemeId:"smithy.api#noAuth"}}var NJ,qJ=async(r,f,s)=>{return{operation:Js(f).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},vJ=(r)=>{const f=[];switch(r.operation){case"AssumeRoleWithSAML":{f.push(mJ(r));break}case"AssumeRoleWithWebIdentity":{f.push(mJ(r));break}default:f.push(Fx(r))}return f},Ux=(r)=>({...r,stsClientCtor:K0}),jJ=(r)=>{const f=Ux(r);return{...NJ.resolveAwsSdkSigV4Config(f)}};var VT=G(()=>{NJ=u(Br(),1);rf();L$()});var dJ=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,defaultSigningName:"sts"}},nr;var tf=G(()=>{nr={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 cJ;var OJ=G(()=>{cJ={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 bJ,kT,uJ,gJ,cr,_J,tJ,r9,or,Xs,xJ,s9,f9,eJ,w9,nJ,oJ,aJ,pJ,Gx,h9;var $9=G(()=>{bJ={["required"]:!1,["type"]:"String"},kT={["required"]:!0,default:!1,["type"]:"Boolean"},uJ={["ref"]:"Endpoint"},gJ={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},cr={["ref"]:"Region"},_J={["fn"]:"aws.partition",["argv"]:[cr],assign:"PartitionResult"},tJ={["ref"]:"UseFIPS"},r9={["ref"]:"UseDualStack"},or={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},Xs={},xJ={conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"aws-global"]}],["endpoint"]:or,["type"]:"endpoint"},s9={["fn"]:"booleanEquals",["argv"]:[tJ,!0]},f9={["fn"]:"booleanEquals",["argv"]:[r9,!0]},eJ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},w9={["ref"]:"PartitionResult"},nJ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[w9,"supportsDualStack"]}]},oJ=[{["fn"]:"isSet",["argv"]:[uJ]}],aJ=[s9],pJ=[f9],Gx={version:"1.0",parameters:{Region:bJ,UseDualStack:kT,UseFIPS:kT,Endpoint:bJ,UseGlobalEndpoint:kT},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:oJ},gJ,_J,{["fn"]:"booleanEquals",["argv"]:[tJ,!1]},{["fn"]:"booleanEquals",["argv"]:[r9,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"ap-northeast-1"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"ap-south-1"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"ap-southeast-1"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"ap-southeast-2"]}],endpoint:or,["type"]:"endpoint"},xJ,{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"ca-central-1"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"eu-central-1"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"eu-north-1"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"eu-west-1"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"eu-west-2"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"eu-west-3"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"sa-east-1"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"us-east-1"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"us-east-2"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"us-west-1"]}],endpoint:or,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[cr,"us-west-2"]}],endpoint:or,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:Xs},["type"]:"endpoint"}],["type"]:"tree"},{conditions:oJ,rules:[{conditions:aJ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:pJ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:uJ,properties:Xs,headers:Xs},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[gJ],rules:[{conditions:[_J],rules:[{conditions:[s9,f9],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,eJ]},nJ],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Xs,headers:Xs},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:aJ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[eJ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[w9,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Xs,headers:Xs},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Xs,headers:Xs},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:pJ,rules:[{conditions:[nJ],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Xs,headers:Xs},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},xJ,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:Xs,headers:Xs},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},h9=Gx});var E9=(r,f={})=>{return ps(h9,{endpointParams:r,logger:f.logger})};var I9=G(()=>{Ww();us();$9();ur.aws=ts});var F9,U9,T9=(r)=>{return{apiVersion:"2011-06-15",base64Decoder:r?.base64Decoder??Us,base64Encoder:r?.base64Encoder??Gs,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??E9,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??vJ,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new F9.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(f)=>f.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new U9.NoAuthSigner}],logger:r?.logger??new Ws,serviceId:r?.serviceId??"STS",urlParser:r?.urlParser??gr,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Ts}};var G9=G(()=>{F9=u(Br(),1),U9=u(Or(),1);Y();b0();W0();jf();VT();I9()});var UI,C9,L9=(r)=>{gf(process.version);const f=af(r),s=()=>f().then(bf),w=T9(r);return UI.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??of,credentialDefaultProvider:r?.credentialDefaultProvider??S0,defaultUserAgentProvider:r?.defaultUserAgentProvider??nf({serviceId:w.serviceId,clientVersion:cJ.version}),httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4")||(async($)=>await S0($?.__config||{})()),signer:new UI.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new C9.NoAuthSigner}],maxAttempts:r?.maxAttempts??t(Nf),region:r?.region??t(Qs,Hf),requestHandler:tr.create(r?.requestHandler??s),retryMode:r?.retryMode??t({...vf,default:async()=>(await s()).retryMode||ys}),sha256:r?.sha256??If.bind(null,"sha256"),streamCollector:r?.streamCollector??ms,useDualstackEndpoint:r?.useDualstackEndpoint??t(Mf),useFipsEndpoint:r?.useFipsEndpoint??t(Bf)}};var A9=G(()=>{OJ();UI=u(Br(),1);b1();Zh();Ms();C9=u(Or(),1);lh();Ef();$f();_0();Jh();Rs();G9();Y();Qh();Y()});var R9=(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}}},W9=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var TI=(r)=>r,z9=(r,f)=>{const s={...TI(pf(r)),...TI(_f(r)),...TI(Pf(r)),...TI(R9(r))};return f.forEach((w)=>w.configure(s)),{...r,...uf(s),...xf(s),...Xf(s),...W9(s)}};var S9=G(()=>{Mh();ir();Y()});var kh,K0;var L$=G(()=>{aw();pw();uw();rh();Ms();kh=u(Or(),1);Th();M();Ef();Y();VT();tf();A9();S9();K0=class K0 extends zs{constructor(...[r]){const f=L9(r||{}),s=dJ(f),w=Jf(s),h=qf(w),$=Vf(h),E=Yf($),I=yf(E),F=jJ(I),U=z9(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Qf(this.config)),this.middlewareStack.use(ef(this.config)),this.middlewareStack.use(Df(this.config)),this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(Zf(this.config)),this.middlewareStack.use(lf(this.config)),this.middlewareStack.use(kh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:qJ,identityProviderConfigProvider:async(C)=>new kh.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(kh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var ss;var GI=G(()=>{Y();ss=class ss extends Ns{constructor(r){super(r);Object.setPrototypeOf(this,ss.prototype)}}});var A$,R$,W$,z$,S$,P$,X$,Y$,Dh=(r)=>({...r,...r.SecretAccessKey&&{SecretAccessKey:o}}),DT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),iT=(r)=>({...r,...r.SAMLAssertion&&{SAMLAssertion:o}}),yT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),mT=(r)=>({...r,...r.WebIdentityToken&&{WebIdentityToken:o}}),NT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),qT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),vT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}});var fw=G(()=>{Y();GI();A$=class A$ extends ss{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,A$.prototype)}};R$=class R$ extends ss{constructor(r){super({name:"MalformedPolicyDocumentException",$fault:"client",...r});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,R$.prototype)}};W$=class W$ extends ss{constructor(r){super({name:"PackedPolicyTooLargeException",$fault:"client",...r});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,W$.prototype)}};z$=class z$ extends ss{constructor(r){super({name:"RegionDisabledException",$fault:"client",...r});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,z$.prototype)}};S$=class S$ extends ss{constructor(r){super({name:"IDPRejectedClaimException",$fault:"client",...r});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,S$.prototype)}};P$=class P$ extends ss{constructor(r){super({name:"InvalidIdentityTokenException",$fault:"client",...r});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,P$.prototype)}};X$=class X$ extends ss{constructor(r){super({name:"IDPCommunicationErrorException",$fault:"client",...r});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,X$.prototype)}};Y$=class Y$ extends ss{constructor(r){super({name:"InvalidAuthorizationMessageException",$fault:"client",...r});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Y$.prototype)}}});var Ff,P9=async(r,f)=>{const s=$w;let w;return w=Uw({...Xx(r,f),[Iw]:px,[Fw]:Ew}),hw(f,s,"/",void 0,w)},X9=async(r,f)=>{const s=$w;let w;return w=Uw({...Yx(r,f),[Iw]:ux,[Fw]:Ew}),hw(f,s,"/",void 0,w)},Y9=async(r,f)=>{const s=$w;let w;return w=Uw({...Kx(r,f),[Iw]:tx,[Fw]:Ew}),hw(f,s,"/",void 0,w)},K9=async(r,f)=>{const s=$w;let w;return w=Uw({...Zx(r,f),[Iw]:re,[Fw]:Ew}),hw(f,s,"/",void 0,w)},Z9=async(r,f)=>{const s=$w;let w;return w=Uw({...lx(r,f),[Iw]:se,[Fw]:Ew}),hw(f,s,"/",void 0,w)},l9=async(r,f)=>{const s=$w;let w;return w=Uw({...Jx(r,f),[Iw]:fe,[Fw]:Ew}),hw(f,s,"/",void 0,w)},J9=async(r,f)=>{const s=$w;let w;return w=Uw({...Qx(r,f),[Iw]:we,[Fw]:Ew}),hw(f,s,"/",void 0,w)},Q9=async(r,f)=>{const s=$w;let w;return w=Uw({...Mx(r,f),[Iw]:he,[Fw]:Ew}),hw(f,s,"/",void 0,w)},M9=async(r,f)=>{if(r.statusCode>=300)return ww(r,f);const s=await Ff.parseXmlBody(r.body,f);let w={};return w=ix(s.AssumeRoleResult,f),{$metadata:ar(r),...w}},B9=async(r,f)=>{if(r.statusCode>=300)return ww(r,f);const s=await Ff.parseXmlBody(r.body,f);let w={};return w=yx(s.AssumeRoleWithSAMLResult,f),{$metadata:ar(r),...w}},H9=async(r,f)=>{if(r.statusCode>=300)return ww(r,f);const s=await Ff.parseXmlBody(r.body,f);let w={};return w=mx(s.AssumeRoleWithWebIdentityResult,f),{$metadata:ar(r),...w}},V9=async(r,f)=>{if(r.statusCode>=300)return ww(r,f);const s=await Ff.parseXmlBody(r.body,f);let w={};return w=Nx(s.DecodeAuthorizationMessageResult,f),{$metadata:ar(r),...w}},k9=async(r,f)=>{if(r.statusCode>=300)return ww(r,f);const s=await Ff.parseXmlBody(r.body,f);let w={};return w=jx(s.GetAccessKeyInfoResult,f),{$metadata:ar(r),...w}},D9=async(r,f)=>{if(r.statusCode>=300)return ww(r,f);const s=await Ff.parseXmlBody(r.body,f);let w={};return w=dx(s.GetCallerIdentityResult,f),{$metadata:ar(r),...w}},i9=async(r,f)=>{if(r.statusCode>=300)return ww(r,f);const s=await Ff.parseXmlBody(r.body,f);let w={};return w=Ox(s.GetFederationTokenResult,f),{$metadata:ar(r),...w}},y9=async(r,f)=>{if(r.statusCode>=300)return ww(r,f);const s=await Ff.parseXmlBody(r.body,f);let w={};return w=cx(s.GetSessionTokenResult,f),{$metadata:ar(r),...w}},ww=async(r,f)=>{const s={...r,body:await Ff.parseXmlErrorBody(r.body,f)},w=$e(r,s.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Cx(s,f);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await zx(s,f);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Sx(s,f);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Px(s,f);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Ax(s,f);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Wx(s,f);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Lx(s,f);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Rx(s,f);default:const h=s.body;return ax({output:r,parsedBody:h.Error,errorCode:w})}},Cx=async(r,f)=>{const s=r.body,w=qx(s.Error,f),h=new A$({$metadata:ar(r),...w});return k(h,s)},Lx=async(r,f)=>{const s=r.body,w=bx(s.Error,f),h=new X$({$metadata:ar(r),...w});return k(h,s)},Ax=async(r,f)=>{const s=r.body,w=gx(s.Error,f),h=new S$({$metadata:ar(r),...w});return k(h,s)},Rx=async(r,f)=>{const s=r.body,w=_x(s.Error,f),h=new Y$({$metadata:ar(r),...w});return k(h,s)},Wx=async(r,f)=>{const s=r.body,w=xx(s.Error,f),h=new P$({$metadata:ar(r),...w});return k(h,s)},zx=async(r,f)=>{const s=r.body,w=ex(s.Error,f),h=new R$({$metadata:ar(r),...w});return k(h,s)},Sx=async(r,f)=>{const s=r.body,w=nx(s.Error,f),h=new W$({$metadata:ar(r),...w});return k(h,s)},Px=async(r,f)=>{const s=r.body,w=ox(s.Error,f),h=new z$({$metadata:ar(r),...w});return k(h,s)},Xx=(r,f)=>{const s={};if(r[J0]!=null)s[J0]=r[J0];if(r[Nh]!=null)s[Nh]=r[Nh];if(r[ds]!=null){const w=CI(r[ds],f);if(r[ds]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;s[E]=$})}if(r[js]!=null)s[js]=r[js];if(r[ws]!=null)s[ws]=r[ws];if(r[vh]!=null){const w=m9(r[vh],f);if(r[vh]?.length===0)s.Tags=[];Object.entries(w).forEach(([h,$])=>{const E=`Tags.${h}`;s[E]=$})}if(r[FG]!=null){const w=Dx(r[FG],f);if(r[FG]?.length===0)s.TransitiveTagKeys=[];Object.entries(w).forEach(([h,$])=>{const E=`TransitiveTagKeys.${h}`;s[E]=$})}if(r[bT]!=null)s[bT]=r[bT];if(r[qh]!=null)s[qh]=r[qh];if(r[jh]!=null)s[jh]=r[jh];if(r[cs]!=null)s[cs]=r[cs];if(r[tT]!=null){const w=Vx(r[tT],f);if(r[tT]?.length===0)s.ProvidedContexts=[];Object.entries(w).forEach(([h,$])=>{const E=`ProvidedContexts.${h}`;s[E]=$})}return s},Yx=(r,f)=>{const s={};if(r[J0]!=null)s[J0]=r[J0];if(r[pT]!=null)s[pT]=r[pT];if(r[hG]!=null)s[hG]=r[hG];if(r[ds]!=null){const w=CI(r[ds],f);if(r[ds]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;s[E]=$})}if(r[js]!=null)s[js]=r[js];if(r[ws]!=null)s[ws]=r[ws];return s},Kx=(r,f)=>{const s={};if(r[J0]!=null)s[J0]=r[J0];if(r[Nh]!=null)s[Nh]=r[Nh];if(r[GG]!=null)s[GG]=r[GG];if(r[rG]!=null)s[rG]=r[rG];if(r[ds]!=null){const w=CI(r[ds],f);if(r[ds]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;s[E]=$})}if(r[js]!=null)s[js]=r[js];if(r[ws]!=null)s[ws]=r[ws];return s},Zx=(r,f)=>{const s={};if(r[gT]!=null)s[gT]=r[gT];return s},lx=(r,f)=>{const s={};if(r[ih]!=null)s[ih]=r[ih];return s},Jx=(r,f)=>{return{}},Qx=(r,f)=>{const s={};if(r[oT]!=null)s[oT]=r[oT];if(r[js]!=null)s[js]=r[js];if(r[ds]!=null){const w=CI(r[ds],f);if(r[ds]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;s[E]=$})}if(r[ws]!=null)s[ws]=r[ws];if(r[vh]!=null){const w=m9(r[vh],f);if(r[vh]?.length===0)s.Tags=[];Object.entries(w).forEach(([h,$])=>{const E=`Tags.${h}`;s[E]=$})}return s},Mx=(r,f)=>{const s={};if(r[ws]!=null)s[ws]=r[ws];if(r[qh]!=null)s[qh]=r[qh];if(r[jh]!=null)s[jh]=r[jh];return s},CI=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;const $=Bx(h,f);Object.entries($).forEach(([E,I])=>{s[`member.${w}.${E}`]=I}),w++}return s},Bx=(r,f)=>{const s={};if(r[CG]!=null)s[CG]=r[CG];return s},Hx=(r,f)=>{const s={};if(r[uT]!=null)s[uT]=r[uT];if(r[dT]!=null)s[dT]=r[dT];return s},Vx=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;const $=Hx(h,f);Object.entries($).forEach(([E,I])=>{s[`member.${w}.${E}`]=I}),w++}return s},kx=(r,f)=>{const s={};if(r[nT]!=null)s[nT]=r[nT];if(r[TG]!=null)s[TG]=r[TG];return s},Dx=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;s[`member.${w}`]=h,w++}return s},m9=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;const $=kx(h,f);Object.entries($).forEach(([E,I])=>{s[`member.${w}.${E}`]=I}),w++}return s},LG=(r,f)=>{const s={};if(r[jT]!=null)s[jT]=T(r[jT]);if(r[l0]!=null)s[l0]=T(r[l0]);return s},ix=(r,f)=>{const s={};if(r[fs]!=null)s[fs]=K$(r[fs],f);if(r[Z0]!=null)s[Z0]=LG(r[Z0],f);if(r[Os]!=null)s[Os]=$r(r[Os]);if(r[cs]!=null)s[cs]=T(r[cs]);return s},yx=(r,f)=>{const s={};if(r[fs]!=null)s[fs]=K$(r[fs],f);if(r[Z0]!=null)s[Z0]=LG(r[Z0],f);if(r[Os]!=null)s[Os]=$r(r[Os]);if(r[fG]!=null)s[fG]=T(r[fG]);if(r[EG]!=null)s[EG]=T(r[EG]);if(r[eT]!=null)s[eT]=T(r[eT]);if(r[mh]!=null)s[mh]=T(r[mh]);if(r[aT]!=null)s[aT]=T(r[aT]);if(r[cs]!=null)s[cs]=T(r[cs]);return s},mx=(r,f)=>{const s={};if(r[fs]!=null)s[fs]=K$(r[fs],f);if(r[$G]!=null)s[$G]=T(r[$G]);if(r[Z0]!=null)s[Z0]=LG(r[Z0],f);if(r[Os]!=null)s[Os]=$r(r[Os]);if(r[sG]!=null)s[sG]=T(r[sG]);if(r[mh]!=null)s[mh]=T(r[mh]);if(r[cs]!=null)s[cs]=T(r[cs]);return s},K$=(r,f)=>{const s={};if(r[ih]!=null)s[ih]=T(r[ih]);if(r[wG]!=null)s[wG]=T(r[wG]);if(r[IG]!=null)s[IG]=T(r[IG]);if(r[cT]!=null)s[cT]=y(Hw(r[cT]));return s},Nx=(r,f)=>{const s={};if(r[OT]!=null)s[OT]=T(r[OT]);return s},qx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},vx=(r,f)=>{const s={};if(r[xT]!=null)s[xT]=T(r[xT]);if(r[l0]!=null)s[l0]=T(r[l0]);return s},jx=(r,f)=>{const s={};if(r[yh]!=null)s[yh]=T(r[yh]);return s},dx=(r,f)=>{const s={};if(r[UG]!=null)s[UG]=T(r[UG]);if(r[yh]!=null)s[yh]=T(r[yh]);if(r[l0]!=null)s[l0]=T(r[l0]);return s},Ox=(r,f)=>{const s={};if(r[fs]!=null)s[fs]=K$(r[fs],f);if(r[_T]!=null)s[_T]=vx(r[_T],f);if(r[Os]!=null)s[Os]=$r(r[Os]);return s},cx=(r,f)=>{const s={};if(r[fs]!=null)s[fs]=K$(r[fs],f);return s},bx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},gx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},_x=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},xx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},ex=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},nx=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},ox=(r,f)=>{const s={};if(r[Sr]!=null)s[Sr]=T(r[Sr]);return s},ar=(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"]}),ax,hw=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)},$w,Ew="2011-06-15",Iw="Action",ih="AccessKeyId",px="AssumeRole",jT="AssumedRoleId",Z0="AssumedRoleUser",ux="AssumeRoleWithSAML",tx="AssumeRoleWithWebIdentity",yh="Account",l0="Arn",mh="Audience",fs="Credentials",dT="ContextAssertion",re="DecodeAuthorizationMessage",OT="DecodedMessage",ws="DurationSeconds",cT="Expiration",bT="ExternalId",gT="EncodedMessage",_T="FederatedUser",xT="FederatedUserId",se="GetAccessKeyInfo",fe="GetCallerIdentity",we="GetFederationToken",he="GetSessionToken",eT="Issuer",nT="Key",oT="Name",aT="NameQualifier",js="Policy",ds="PolicyArns",pT="PrincipalArn",uT="ProviderArn",tT="ProvidedContexts",rG="ProviderId",Os="PackedPolicySize",sG="Provider",J0="RoleArn",Nh="RoleSessionName",fG="Subject",wG="SecretAccessKey",hG="SAMLAssertion",$G="SubjectFromWebIdentityToken",cs="SourceIdentity",qh="SerialNumber",EG="SubjectType",IG="SessionToken",vh="Tags",jh="TokenCode",FG="TransitiveTagKeys",UG="UserId",Fw="Version",TG="Value",GG="WebIdentityToken",CG="arn",Sr="message",Uw=(r)=>Object.entries(r).map(([f,s])=>Y3(f)+"="+Y3(s)).join("&"),$e=(r,f)=>{if(f.Error?.Code!==void 0)return f.Error.Code;if(r.statusCode==404)return"NotFound"};var Q0=G(()=>{Ff=u(Br(),1);ir();Y();fw();GI();ax=cf(ss),$w={"content-type":"application/x-www-form-urlencoded"}});var dh;var LI=G(()=>{M();H();Y();tf();fw();Q0();dh=class dh extends A.classBuilder().ep({...nr}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,DT).ser(P9).de(M9).build(){}});var AI;var AG=G(()=>{M();H();Y();tf();fw();Q0();AI=class AI extends A.classBuilder().ep({...nr}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(iT,yT).ser(X9).de(B9).build(){}});var Oh;var RI=G(()=>{M();H();Y();tf();fw();Q0();Oh=class Oh extends A.classBuilder().ep({...nr}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(mT,NT).ser(Y9).de(H9).build(){}});var WI;var RG=G(()=>{M();H();Y();tf();Q0();WI=class WI extends A.classBuilder().ep({...nr}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(K9).de(V9).build(){}});var zI;var WG=G(()=>{M();H();Y();tf();Q0();zI=class zI extends A.classBuilder().ep({...nr}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(Z9).de(k9).build(){}});var SI;var zG=G(()=>{M();H();Y();tf();Q0();SI=class SI extends A.classBuilder().ep({...nr}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(l9).de(D9).build(){}});var PI;var SG=G(()=>{M();H();Y();tf();fw();Q0();PI=class PI extends A.classBuilder().ep({...nr}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,qT).ser(J9).de(i9).build(){}});var XI;var PG=G(()=>{M();H();Y();tf();fw();Q0();XI=class XI extends A.classBuilder().ep({...nr}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,vT).ser(Q9).de(y9).build(){}});var Ee,XG;var N9=G(()=>{Y();LI();AG();RI();RG();WG();zG();SG();PG();L$();Ee={AssumeRoleCommand:dh,AssumeRoleWithSAMLCommand:AI,AssumeRoleWithWebIdentityCommand:Oh,DecodeAuthorizationMessageCommand:WI,GetAccessKeyInfoCommand:zI,GetCallerIdentityCommand:SI,GetFederationTokenCommand:PI,GetSessionTokenCommand:XI};XG=class XG extends K0{};df(Ee,XG)});var q9=G(()=>{LI();AG();RI();RG();WG();zG();SG();PG()});var v9=G(()=>{fw()});var j9="us-east-1",d9=(r)=>{if(typeof r?.Arn==="string"){const f=r.Arn.split(":");if(f.length>4&&f[4]!=="")return f[4]}return},O9=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)`,`${j9} (STS default)`),w??h??j9},c9=(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 O9(C,r?.parentClientConfig?.region,z),Z=!g9(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 dh($));if(!E||!E.AccessKeyId||!E.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${$.RoleArn}`);const F=d9(I);return{accessKeyId:E.AccessKeyId,secretAccessKey:E.SecretAccessKey,sessionToken:E.SessionToken,expiration:E.Expiration,...E.CredentialScope&&{credentialScope:E.CredentialScope},...F&&{accountId:F}}}},b9=(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 O9(F,r?.parentClientConfig?.region,C),z=!g9(U);s=new f({region:L,requestHandler:z?U:void 0,logger:I})}const{Credentials:h,AssumedRoleUser:$}=await s.send(new Oh(w));if(!h||!h.AccessKeyId||!h.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const E=d9($);return{accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.SessionToken,expiration:h.Expiration,...h.CredentialScope&&{credentialScope:h.CredentialScope},...E&&{accountId:E}}}},g9=(r)=>{return r?.metadata?.handlerProtocol==="h2"};var _9=G(()=>{LI();RI()});var x9=(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)}}},e9=(r={},f)=>c9(r,x9(K0,f)),n9=(r={},f)=>b9(r,x9(K0,f)),Ie=(r)=>(f)=>r({roleAssumer:e9(f),roleAssumerWithWebIdentity:n9(f),...f});var o9=G(()=>{_9();L$()});var YG={};Sf(YG,{getDefaultRoleAssumerWithWebIdentity:()=>n9,getDefaultRoleAssumer:()=>e9,decorateDefaultCredentialProvider:()=>Ie,__Client:()=>zs,STSServiceException:()=>ss,STSClient:()=>K0,STS:()=>XG,RegionDisabledException:()=>z$,PackedPolicyTooLargeException:()=>W$,MalformedPolicyDocumentException:()=>R$,InvalidIdentityTokenException:()=>P$,InvalidAuthorizationMessageException:()=>Y$,IDPRejectedClaimException:()=>S$,IDPCommunicationErrorException:()=>X$,GetSessionTokenResponseFilterSensitiveLog:()=>vT,GetSessionTokenCommand:()=>XI,GetFederationTokenResponseFilterSensitiveLog:()=>qT,GetFederationTokenCommand:()=>PI,GetCallerIdentityCommand:()=>SI,GetAccessKeyInfoCommand:()=>zI,ExpiredTokenException:()=>A$,DecodeAuthorizationMessageCommand:()=>WI,CredentialsFilterSensitiveLog:()=>Dh,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>NT,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>mT,AssumeRoleWithWebIdentityCommand:()=>Oh,AssumeRoleWithSAMLResponseFilterSensitiveLog:()=>yT,AssumeRoleWithSAMLRequestFilterSensitiveLog:()=>iT,AssumeRoleWithSAMLCommand:()=>AI,AssumeRoleResponseFilterSensitiveLog:()=>DT,AssumeRoleCommand:()=>dh,$Command:()=>A});var KG=G(()=>{L$();N9();q9();v9();o9();GI()});var a9=(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&&(Fe(r,{profile:f,logger:s})||Ue(r,{profile:f,logger:s}))},Fe=(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},Ue=(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},p9=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(() => (KG(),YG));s.roleAssumer=C({...s.clientConfig,credentialProviderLogger:s.logger,parentClientConfig:s?.parentClientConfig},s.clientPlugins)}const{source_profile:$}=h;if($&&$ in w)throw new _(`Detected a cycle attempting to resolve credentials for profile ${ks(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=$?YI($,{...f,[$]:{...f[$],role_arn:h.role_arn??f[$].role_arn}},s,{...w,[$]:!0}):(await iJ(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 _(`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 u9=G(()=>{Lr();hf();yJ();ZG()});var t9=(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 Te}from"child_process";import{promisify as Ge}from"util";var rQ=async(r,f,s)=>{const w=f[r];if(f[r]){const h=w.credential_process;if(h!==void 0){const $=Ge(Te);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 t9(r,I,f)}catch(E){throw new _(E.message,{logger:s})}}else throw new _(`Profile ${r} did not contain credential_process.`,{logger:s})}else throw new _(`Profile ${r} could not be found in shared credentials file.`,{logger:s})};var sQ=G(()=>{Lr()});var Ce=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const f=await c0(r);return rQ(ks(r),f,r.logger)};var fQ=G(()=>{hf();sQ()});var lG={};Sf(lG,{fromProcess:()=>Ce});var JG=G(()=>{fQ()});var wQ=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.credential_process==="string",hQ=async(r,f)=>Promise.resolve().then(() => (JG(),lG)).then(({fromProcess:s})=>s({...r,profile:f})());var $Q=async(r,f={})=>{const{fromSSO:s}=await Promise.resolve().then(() => (HT(),BT));return s({profile:r,logger:f.logger})()},EQ=(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 QG=(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 BG=(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(() => (KG(),YG));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 Le}from"fs";var Ae="AWS_WEB_IDENTITY_TOKEN_FILE",Re="AWS_ROLE_ARN",We="AWS_ROLE_SESSION_NAME",ze=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const f=r?.webIdentityTokenFile??process.env[Ae],s=r?.roleArn??process.env[Re],w=r?.roleSessionName??process.env[We];if(!f||!s)throw new _("Web identity configuration not specified",{logger:r.logger});return BG({...r,webIdentityToken:Le(f,{encoding:"ascii"}),roleArn:s,roleSessionName:w})()};var IQ=G(()=>{Lr()});var HG={};Sf(HG,{fromWebToken:()=>BG,fromTokenFile:()=>ze});var VG=G(()=>{IQ()});var FQ=(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,UQ=async(r,f)=>Promise.resolve().then(() => (VG(),HG)).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 YI=async(r,f,s,w={})=>{const h=f[r];if(Object.keys(w).length>0&&QG(h))return MG(h,s);if(a9(h,{profile:r,logger:s.logger}))return p9(r,f,s,w);if(QG(h))return MG(h,s);if(FQ(h))return UQ(h,s);if(wQ(h))return hQ(s,r);if(EQ(h))return await $Q(r,s);throw new _(`Could not resolve credentials using profile: [${r}] in configuration/credentials file(s).`,{logger:s.logger})};var ZG=G(()=>{Lr();u9()});var Se=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const f=await c0(r);return YI(ks(r),f,r)};var TQ=G(()=>{hf();ZG()});var GQ={};Sf(GQ,{fromIni:()=>Se});var CQ=G(()=>{TQ()});var LQ=!1,S0=(r={})=>Kw(A0(async()=>{if(r.profile??process.env[sP]){if(process.env[y3]&&process.env[m3]){if(!LQ)(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 EZ=T(()=>{Lr()});function FZ(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 UZ(r,s){const w=await IZ.sdkStreamMixin(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 x("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:EY(h.Expiration)}}if(r.statusCode>=400&&r.statusCode<500){let h={};try{h=JSON.parse(w)}catch($){}throw Object.assign(new x(`Server responded with status: ${r.statusCode}`,{logger:s}),{Code:h.Code,Message:h.Message})}throw new x(`Server responded with status: ${r.statusCode}`,{logger:s})}var IZ;var GZ=T(()=>{Lr();Nr();K();IZ=g(i$(),1)});var TZ=(r,s,f)=>{return async()=>{for(let w=0;w<s;++w)try{return await r()}catch(h){await new Promise(($)=>setTimeout($,f))}return await r()}};import H_ from"fs/promises";var D_="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",k_="http://169.254.170.2",l_="AWS_CONTAINER_CREDENTIALS_FULL_URI",N_="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",q_="AWS_CONTAINER_AUTHORIZATION_TOKEN",LZ=(r={})=>{r.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let s;const f=r.awsContainerCredentialsRelativeUri??process.env[D_],w=r.awsContainerCredentialsFullUri??process.env[l_],h=r.awsContainerAuthorizationToken??process.env[q_],$=r.awsContainerAuthorizationTokenFile??process.env[N_],E=r.logger?.constructor?.name==="NoOpLogger"||!r.logger?console.warn:r.logger.warn;if(f&&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)s=w;else if(f)s=`${k_}${f}`;else throw new x(`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);$Z(I,r.logger);const F=new tr({requestTimeout:r.timeout??1000,connectionTimeout:r.timeout??1000});return TZ(async()=>{const U=FZ(I);if(h)U.headers.Authorization=h;else if($)U.headers.Authorization=(await H_.readFile($)).toString();try{const L=await F.handle(U);return UZ(L.response)}catch(L){throw new x(String(L),{logger:r.logger})}},r.maxRetries??3,r.timeout??1000)};var WZ=T(()=>{Qw();Lr();EZ();GZ()});var cU={};Lf(cU,{fromHttp:()=>LZ});var _U=T(()=>{WZ()});var y_="AWS_EC2_METADATA_DISABLED",AZ=async(r)=>{const{ENV_CMDS_FULL_URI:s,ENV_CMDS_RELATIVE_URI:f,fromContainerMetadata:w,fromInstanceMetadata:h}=await Promise.resolve().then(() => (N1(),l1));if(process.env[f]||process.env[s]){r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:$}=await Promise.resolve().then(() => (_U(),cU));return Ts($(r),w(r))}if(process.env[y_])return async()=>{throw new x("EC2 Instance Metadata Service access disabled",{logger:r.logger})};return r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),h(r)};var zZ=T(()=>{Lr()});var gU=(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 CZ=300000,Wh="To refresh this SSO session run 'aws sso login' with the corresponding profile.";function m_(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}function xU(r){return{schemeId:"smithy.api#noAuth"}}var RZ,jE,PZ=async(r,s,f)=>{return{operation:jE.getSmithyContext(s).operation,region:await jE.normalizeProvider(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},XZ=(r)=>{const s=[];switch(r.operation){case"CreateToken":{s.push(xU(r));break}case"RegisterClient":{s.push(xU(r));break}case"StartDeviceAuthorization":{s.push(xU(r));break}default:s.push(m_(r))}return s},YZ=(r)=>{return{...RZ.resolveAwsSdkSigV4Config(r)}};var eU=T(()=>{RZ=g(Vr(),1),jE=g(pr(),1)});var KZ=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},bs;var Ah=T(()=>{bs={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var SZ;var ZZ=T(()=>{SZ={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 nU;var oU=T(()=>{nU={isCrtAvailable:!1}});var JZ=()=>{if(nU.isCrtAvailable)return["md/crt-avail"];return null};var QZ=T(()=>{oU()});import{platform as v_,release as O_}from"os";import{env as MZ,versions as i_}from"process";var d_="AWS_SDK_UA_APP_ID",b_="sdk-ua-app-id",bf=({serviceId:r,clientVersion:s})=>{const f=[["aws-sdk-js",s],["ua","2.0"],[`os/${v_()}`,O_()],["lang/js"],["md/nodejs",`${i_.node}`]],w=JZ();if(w)f.push(w);if(r)f.push([`api/${r}`,s]);if(MZ.AWS_EXECUTION_ENV)f.push([`exec-env/${MZ.AWS_EXECUTION_ENV}`]);const h=u({environmentVariableSelector:(E)=>E[d_],configFileSelector:(E)=>E[b_],default:void 0})();let $=void 0;return async()=>{if(!$){const E=await h;$=E?[...f,[`app/${E}`]]:[...f]}return $}};var zh=T(()=>{t0();QZ();oU()});var BZ=(r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]";import{Buffer as aU}from"buffer";var Mw=(r,s=0,f=r.byteLength-s)=>{if(!BZ(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return aU.from(r,s,f)},Ch=(r,s)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return s?aU.from(r,s):aU.from(r)};var Rh=()=>{};var F0=(r)=>{const s=Ch(r,"utf8");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var pU=T(()=>{Rh()});var VZ=(r)=>{if(typeof r==="string")return F0(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)};var HZ=T(()=>{pU()});var cf=(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 Mw(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};var DZ=T(()=>{Rh()});var cs=T(()=>{pU();HZ();DZ()});import{Buffer as c_}from"buffer";import{createHash as __,createHmac as g_}from"crypto";function kZ(r,s){if(c_.isBuffer(r))return r;if(typeof r==="string")return Ch(r,s);if(ArrayBuffer.isView(r))return Mw(r.buffer,r.byteOffset,r.byteLength);return Mw(r)}class ff{constructor(r,s){this.algorithmIdentifier=r,this.secret=s,this.reset()}update(r,s){this.hash.update(VZ(kZ(r,s)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?g_(this.algorithmIdentifier,kZ(this.secret)):__(this.algorithmIdentifier)}}var Ph=T(()=>{Rh();cs()});import{fstatSync as x_,lstatSync as e_}from"fs";var _f=(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 e_(r.path).size;else if(typeof r.fd==="number")return x_(r.fd).size;throw new Error(`Body Length computation failed for ${r}`)};var lZ=()=>{};var Xh=T(()=>{lZ()});var n_,gf=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!n_.exec(r))throw new TypeError("Invalid base64 string.");const s=Ch(r,"base64");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength)};var NZ=T(()=>{Rh();n_=/^[A-Za-z0-9+/]*={0,2}$/});var xf=(r)=>{let s;if(typeof r==="string")s=F0(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 Mw(s.buffer,s.byteOffset,s.byteLength).toString("base64")};var qZ=T(()=>{Rh();cs()});var Yh=T(()=>{NZ();qZ()});var yZ,mZ,jZ,cZ,_Z,l0,vZ,gZ,OZ,iZ,dZ,bZ,o_,xZ;var eZ=T(()=>{yZ={["required"]:!1,type:"String"},mZ={["required"]:!0,default:!1,type:"Boolean"},jZ={["ref"]:"Endpoint"},cZ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},_Z={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},l0={},vZ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},gZ={["ref"]:"PartitionResult"},OZ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[gZ,"supportsDualStack"]}]},iZ=[cZ],dZ=[_Z],bZ=[{["ref"]:"Region"}],o_={version:"1.0",parameters:{Region:yZ,UseDualStack:mZ,UseFIPS:mZ,Endpoint:yZ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[jZ]}],rules:[{conditions:iZ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:dZ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:jZ,properties:l0,headers:l0},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:bZ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:bZ,assign:"PartitionResult"}],rules:[{conditions:[cZ,_Z],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,vZ]},OZ],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l0,headers:l0},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:iZ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[vZ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[gZ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:l0,headers:l0},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l0,headers:l0},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:dZ,rules:[{conditions:[OZ],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l0,headers:l0},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:l0,headers:l0},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},xZ=o_});var nZ=(r,s={})=>{return x0(xZ,{endpointParams:r,logger:s.logger})};var oZ=T(()=>{Uw();e0();eZ();ar.aws=n0});var aZ,pZ,uZ=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??gf,base64Encoder:r?.base64Encoder??xf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??nZ,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??XZ,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new aZ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new pZ.NoAuthSigner}],logger:r?.logger??new W0,serviceId:r?.serviceId??"SSO OIDC",urlParser:r?.urlParser??cr,utf8Decoder:r?.utf8Decoder??F0,utf8Encoder:r?.utf8Encoder??cf}};var tZ=T(()=>{aZ=g(Vr(),1),pZ=g(Or(),1);K();ms();Yh();cs();eU();oZ()});var rS="AWS_EXECUTION_ENV",uU="AWS_REGION",tU="AWS_DEFAULT_REGION",fS="AWS_EC2_METADATA_DISABLED",sS,wS="/latest/meta-data/placement/region";var hS=T(()=>{sS=["in-region","cross-region","mobile","standard","legacy"]});var $S;var ES=T(()=>{$S={environmentVariableSelector:(r)=>{return r.AWS_DEFAULTS_MODE},configFileSelector:(r)=>{return r.defaults_mode},default:"legacy"}});var ef=({region:r=u(Z0),defaultsMode:s=u($S)}={})=>Cw(async()=>{const f=typeof s==="function"?await s():s;switch(f?.toLowerCase()){case"auto":return a_(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 ${sS.join(", ")}, got ${f}`)}}),a_=async(r)=>{if(r){const s=typeof r==="function"?await r():r,f=await p_();if(!f)return"standard";if(s===f)return"in-region";else return"cross-region"}return"standard"},p_=async()=>{if(process.env[rS]&&(process.env[uU]||process.env[tU]))return process.env[uU]??process.env[tU];if(!process.env[fS])try{const{getInstanceMetadataEndpoint:r,httpRequest:s}=await Promise.resolve().then(() => (N1(),l1)),f=await r();return(await s({...f,path:wS})).toString()}catch(r){}};var IS=T(()=>{S0();t0();Lr();hS();ES()});var Kh=T(()=>{IS()});var FS,US=(r)=>{mf(process.version);const s=ef(r),f=()=>s().then(yf),w=uZ(r);return FS.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??_f,credentialDefaultProvider:r?.credentialDefaultProvider??Ls,defaultUserAgentProvider:r?.defaultUserAgentProvider??bf({serviceId:w.serviceId,clientVersion:SZ.version}),maxAttempts:r?.maxAttempts??u(Hf),region:r?.region??u(Z0,Sf),requestHandler:tr.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...kf,default:async()=>(await f()).retryMode||D0}),sha256:r?.sha256??ff.bind(null,"sha256"),streamCollector:r?.streamCollector??df,useDualstackEndpoint:r?.useDualstackEndpoint??u(Kf),useFipsEndpoint:r?.useFipsEndpoint??u(Zf)}};var GS=T(()=>{ZZ();FS=g(Vr(),1);y1();zh();S0();Ph();rf();t0();Qw();Xh();L0();tZ();K();Kh();K()});var nf=(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}}},of=(r)=>{return{region:r.region()}};var TS=()=>{};var LS=()=>{};var WS=T(()=>{LS()});var AS=T(()=>{TS();WS()});var Zh=T(()=>{AS()});var zS=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const $=s.findIndex((E)=>E.schemeId===h.schemeId);if($===-1)s.push(h);else s.splice($,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},CS=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var vE=(r)=>r,RS=(r,s)=>{const f={...vE(nf(r)),...vE(jf(r)),...vE(Wf(r)),...vE(zS(r))};return s.forEach((w)=>w.configure(f)),{...r,...of(f),...vf(f),...Af(f),...CS(f)}};var PS=T(()=>{Zh();Nr();K()});var Sh,OE;var rG=T(()=>{_w();gw();xw();nw();S0();Sh=g(Or(),1);hh();Q();rf();K();eU();Ah();GS();PS();OE=class OE extends A0{constructor(...[r]){const s=US(r||{}),f=KZ(s),w=Xf(f),h=Df(w),$=Jf(h),E=zf($),I=Bf(E),F=YZ(I),U=RS(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Yf(this.config)),this.middlewareStack.use(Of(this.config)),this.middlewareStack.use(Mf(this.config)),this.middlewareStack.use(Cf(this.config)),this.middlewareStack.use(Rf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Sh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:PZ,identityProviderConfigProvider:async(L)=>new Sh.DefaultIdentityProviderConfig({"aws.auth#sigv4":L.credentials})})),this.middlewareStack.use(Sh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var Hr;var iE=T(()=>{K();Hr=class Hr extends k0{constructor(r){super(r);Object.setPrototypeOf(this,Hr.prototype)}}});var m1,j1,v1,O1,i1,d1,b1,c1,_1,g1,x1,e1,n1,o1,fG=(r)=>({...r,...r.clientSecret&&{clientSecret:n},...r.refreshToken&&{refreshToken:n},...r.codeVerifier&&{codeVerifier:n}}),sG=(r)=>({...r,...r.accessToken&&{accessToken:n},...r.refreshToken&&{refreshToken:n},...r.idToken&&{idToken:n}}),wG=(r)=>({...r,...r.refreshToken&&{refreshToken:n},...r.assertion&&{assertion:n},...r.subjectToken&&{subjectToken:n},...r.codeVerifier&&{codeVerifier:n}}),hG=(r)=>({...r,...r.accessToken&&{accessToken:n},...r.refreshToken&&{refreshToken:n},...r.idToken&&{idToken:n}}),$G=(r)=>({...r,...r.clientSecret&&{clientSecret:n}}),EG=(r)=>({...r,...r.clientSecret&&{clientSecret:n}});var Bw=T(()=>{K();iE();m1=class m1 extends Hr{constructor(r){super({name:"AccessDeniedException",$fault:"client",...r});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,m1.prototype),this.error=r.error,this.error_description=r.error_description}};j1=class j1 extends Hr{constructor(r){super({name:"AuthorizationPendingException",$fault:"client",...r});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,j1.prototype),this.error=r.error,this.error_description=r.error_description}};v1=class v1 extends Hr{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,v1.prototype),this.error=r.error,this.error_description=r.error_description}};O1=class O1 extends Hr{constructor(r){super({name:"InternalServerException",$fault:"server",...r});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,O1.prototype),this.error=r.error,this.error_description=r.error_description}};i1=class i1 extends Hr{constructor(r){super({name:"InvalidClientException",$fault:"client",...r});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,i1.prototype),this.error=r.error,this.error_description=r.error_description}};d1=class d1 extends Hr{constructor(r){super({name:"InvalidGrantException",$fault:"client",...r});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,d1.prototype),this.error=r.error,this.error_description=r.error_description}};b1=class b1 extends Hr{constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,b1.prototype),this.error=r.error,this.error_description=r.error_description}};c1=class c1 extends Hr{constructor(r){super({name:"InvalidScopeException",$fault:"client",...r});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,c1.prototype),this.error=r.error,this.error_description=r.error_description}};_1=class _1 extends Hr{constructor(r){super({name:"SlowDownException",$fault:"client",...r});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,_1.prototype),this.error=r.error,this.error_description=r.error_description}};g1=class g1 extends Hr{constructor(r){super({name:"UnauthorizedClientException",$fault:"client",...r});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,g1.prototype),this.error=r.error,this.error_description=r.error_description}};x1=class x1 extends Hr{constructor(r){super({name:"UnsupportedGrantTypeException",$fault:"client",...r});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,x1.prototype),this.error=r.error,this.error_description=r.error_description}};e1=class e1 extends Hr{constructor(r){super({name:"InvalidRequestRegionException",$fault:"client",...r});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,e1.prototype),this.error=r.error,this.error_description=r.error_description,this.endpoint=r.endpoint,this.region=r.region}};n1=class n1 extends Hr{constructor(r){super({name:"InvalidClientMetadataException",$fault:"client",...r});this.name="InvalidClientMetadataException",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:"InvalidRedirectUriException",$fault:"client",...r});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,o1.prototype),this.error=r.error,this.error_description=r.error_description}}});var Ws,a1,XS=async(r,s)=>{const f=a1.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/token");let h;return h=JSON.stringify(a(r,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:($)=>N($)})),f.m("POST").h(w).b(h),f.build()},YS=async(r,s)=>{const f=a1.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/token");const h=R({[Ag]:[,"t"]});let $;return $=JSON.stringify(a(r,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(E)=>N(E),subjectToken:[],subjectTokenType:[]})),f.m("POST").h(w).q(h).b($),f.build()},KS=async(r,s)=>{const f=a1.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/client/register");let h;return h=JSON.stringify(a(r,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:($)=>N($),issuerUrl:[],redirectUris:($)=>N($),scopes:($)=>N($)})),f.m("POST").h(w).b(h),f.build()},ZS=async(r,s)=>{const f=a1.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/device_authorization");let h;return h=JSON.stringify(a(r,{clientId:[],clientSecret:[],startUrl:[]})),f.m("POST").h(w).b(h),f.build()},SS=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return dE(r,s);const f=R({$metadata:yr(r)}),w=k(i(await Ws.parseJsonBody(r.body,s)),"body"),h=a(w,{accessToken:G,expiresIn:Xw,idToken:G,refreshToken:G,tokenType:G});return Object.assign(f,h),f},JS=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return dE(r,s);const f=R({$metadata:yr(r)}),w=k(i(await Ws.parseJsonBody(r.body,s)),"body"),h=a(w,{accessToken:G,expiresIn:Xw,idToken:G,issuedTokenType:G,refreshToken:G,scope:N,tokenType:G});return Object.assign(f,h),f},QS=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return dE(r,s);const f=R({$metadata:yr(r)}),w=k(i(await Ws.parseJsonBody(r.body,s)),"body"),h=a(w,{authorizationEndpoint:G,clientId:G,clientIdIssuedAt:Fh,clientSecret:G,clientSecretExpiresAt:Fh,tokenEndpoint:G});return Object.assign(f,h),f},MS=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return dE(r,s);const f=R({$metadata:yr(r)}),w=k(i(await Ws.parseJsonBody(r.body,s)),"body"),h=a(w,{deviceCode:G,expiresIn:Xw,interval:Xw,userCode:G,verificationUri:G,verificationUriComplete:G});return Object.assign(f,h),f},dE=async(r,s)=>{const f={...r,body:await Ws.parseJsonErrorBody(r.body,s)},w=Ws.loadRestJsonErrorCode(r,f.body);switch(w){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await rg(f,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await fg(f,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await sg(f,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await wg(f,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await hg(f,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Eg(f,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Fg(f,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await Gg(f,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await Tg(f,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await Lg(f,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await Wg(f,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await Ug(f,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await $g(f,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Ig(f,s);default:const h=f.body;return t_({output:r,parsedBody:h,errorCode:w})}},t_,rg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new m1({$metadata:yr(r),...f});return H($,r.body)},fg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new j1({$metadata:yr(r),...f});return H($,r.body)},sg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new v1({$metadata:yr(r),...f});return H($,r.body)},wg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new O1({$metadata:yr(r),...f});return H($,r.body)},hg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new i1({$metadata:yr(r),...f});return H($,r.body)},$g=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new n1({$metadata:yr(r),...f});return H($,r.body)},Eg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new d1({$metadata:yr(r),...f});return H($,r.body)},Ig=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new o1({$metadata:yr(r),...f});return H($,r.body)},Fg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new b1({$metadata:yr(r),...f});return H($,r.body)},Ug=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{endpoint:G,error:G,error_description:G,region:G});Object.assign(f,h);const $=new e1({$metadata:yr(r),...f});return H($,r.body)},Gg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new c1({$metadata:yr(r),...f});return H($,r.body)},Tg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new _1({$metadata:yr(r),...f});return H($,r.body)},Lg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new g1({$metadata:yr(r),...f});return H($,r.body)},Wg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{error:G,error_description:G});Object.assign(f,h);const $=new x1({$metadata:yr(r),...f});return H($,r.body)},yr=(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"]}),Ag="aws_iam";var p1=T(()=>{Ws=g(Vr(),1),a1=g(Or(),1);K();Bw();iE();t_=qf(Hr)});var bE;var IG=T(()=>{Q();B();K();Ah();Bw();p1();bE=class bE extends W.classBuilder().ep({...bs}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(fG,sG).ser(XS).de(SS).build(){}});var cE;var FG=T(()=>{Q();B();K();Ah();Bw();p1();cE=class cE extends W.classBuilder().ep({...bs}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(wG,hG).ser(YS).de(JS).build(){}});var _E;var UG=T(()=>{Q();B();K();Ah();Bw();p1();_E=class _E extends W.classBuilder().ep({...bs}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,$G).ser(KS).de(QS).build(){}});var gE;var GG=T(()=>{Q();B();K();Ah();Bw();p1();gE=class gE extends W.classBuilder().ep({...bs}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(EG,void 0).ser(ZS).de(MS).build(){}});var zg,TG;var BS=T(()=>{K();IG();FG();UG();GG();rG();zg={CreateTokenCommand:bE,CreateTokenWithIAMCommand:cE,RegisterClientCommand:_E,StartDeviceAuthorizationCommand:gE};TG=class TG extends OE{};lf(zg,TG)});var VS=T(()=>{IG();FG();UG();GG()});var HS=T(()=>{Bw()});var LG={};Lf(LG,{__Client:()=>A0,UnsupportedGrantTypeException:()=>x1,UnauthorizedClientException:()=>g1,StartDeviceAuthorizationRequestFilterSensitiveLog:()=>EG,StartDeviceAuthorizationCommand:()=>gE,SlowDownException:()=>_1,SSOOIDCServiceException:()=>Hr,SSOOIDCClient:()=>OE,SSOOIDC:()=>TG,RegisterClientResponseFilterSensitiveLog:()=>$G,RegisterClientCommand:()=>_E,InvalidScopeException:()=>c1,InvalidRequestRegionException:()=>e1,InvalidRequestException:()=>b1,InvalidRedirectUriException:()=>o1,InvalidGrantException:()=>d1,InvalidClientMetadataException:()=>n1,InvalidClientException:()=>i1,InternalServerException:()=>O1,ExpiredTokenException:()=>v1,CreateTokenWithIAMResponseFilterSensitiveLog:()=>hG,CreateTokenWithIAMRequestFilterSensitiveLog:()=>wG,CreateTokenWithIAMCommand:()=>cE,CreateTokenResponseFilterSensitiveLog:()=>sG,CreateTokenRequestFilterSensitiveLog:()=>fG,CreateTokenCommand:()=>bE,AuthorizationPendingException:()=>j1,AccessDeniedException:()=>m1,$Command:()=>W});var WG=T(()=>{rG();BS();VS();HS();iE()});var AG,DS=async(r)=>{const{SSOOIDCClient:s}=await Promise.resolve().then(() => (WG(),LG));if(AG[r])return AG[r];const f=new s({region:r});return AG[r]=f,f};var kS=T(()=>{AG={}});var lS=async(r,s)=>{const{CreateTokenCommand:f}=await Promise.resolve().then(() => (WG(),LG));return(await DS(s)).send(new f({clientId:r.clientId,clientSecret:r.clientSecret,refreshToken:r.refreshToken,grantType:"refresh_token"}))};var NS=T(()=>{kS()});var zG=(r)=>{if(r.expiration&&r.expiration.getTime()<Date.now())throw new E0(`Token is expired. ${Wh}`,!1)};var qS=T(()=>{Lr()});var _s=(r,s,f=!1)=>{if(typeof s==="undefined")throw new E0(`Value not present for '${r}' in SSO Token${f?". Cannot refresh":""}. ${Wh}`,!1)};var yS=T(()=>{Lr()});import{promises as Cg}from"fs";var Rg,mS=(r,s)=>{const f=a$(r),w=JSON.stringify(s,null,2);return Rg(f,w)};var jS=T(()=>{u0();({writeFile:Rg}=Cg)});var vS,OS=(r={})=>async()=>{r.logger?.debug("@aws-sdk/token-providers - fromSso");const s=await ys(r),f=B0(r),w=s[f];if(!w)throw new E0(`Profile '${f}' could not be found in shared credentials file.`,!1);else if(!w.sso_session)throw new E0(`Profile '${f}' is missing required property 'sso_session'.`);const h=w.sso_session,E=(await rE(r))[h];if(!E)throw new E0(`Sso session '${h}' could not be found in shared credentials file.`,!1);for(let X of["sso_start_url","sso_region"])if(!E[X])throw new E0(`Sso session '${h}' is missing required property '${X}'.`,!1);const{sso_start_url:I,sso_region:F}=E;let U;try{U=await p$(h)}catch(X){throw new E0(`The SSO session token associated with profile=${f} was not found or is invalid. ${Wh}`,!1)}_s("accessToken",U.accessToken),_s("expiresAt",U.expiresAt);const{accessToken:L,expiresAt:C}=U,Y={token:L,expiration:new Date(C)};if(Y.expiration.getTime()-Date.now()>CZ)return Y;if(Date.now()-vS.getTime()<30000)return zG(Y),Y;_s("clientId",U.clientId,!0),_s("clientSecret",U.clientSecret,!0),_s("refreshToken",U.refreshToken,!0);try{vS.setTime(Date.now());const X=await lS(U,F);_s("accessToken",X.accessToken),_s("expiresIn",X.expiresIn);const M=new Date(Date.now()+X.expiresIn*1000);try{await mS(h,{...U,accessToken:X.accessToken,expiresAt:M.toISOString(),refreshToken:X.refreshToken})}catch(l){}return{token:X.accessToken,expiration:M}}catch(X){return zG(Y),Y}};var iS=T(()=>{Lr();u0();NS();qS();yS();jS();vS=new Date(0)});var dS=T(()=>{Lr()});var bS=T(()=>{Lr()});var cS=T(()=>{iS();dS();bS()});function Pg(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}function xE(r){return{schemeId:"smithy.api#noAuth"}}var _S,eE,gS=async(r,s,f)=>{return{operation:eE.getSmithyContext(s).operation,region:await eE.normalizeProvider(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},xS=(r)=>{const s=[];switch(r.operation){case"GetRoleCredentials":{s.push(xE(r));break}case"ListAccountRoles":{s.push(xE(r));break}case"ListAccounts":{s.push(xE(r));break}case"Logout":{s.push(xE(r));break}default:s.push(Pg(r))}return s},eS=(r)=>{return{..._S.resolveAwsSdkSigV4Config(r)}};var CG=T(()=>{_S=g(Vr(),1),eE=g(pr(),1)});var nS=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},gs;var Jh=T(()=>{gs={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var aS;var oS=T(()=>{aS={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 pS,uS,tS,$9,E9,N0,r9,I9,f9,s9,w9,h9,Yg,F9;var U9=T(()=>{pS={["required"]:!1,type:"String"},uS={["required"]:!0,default:!1,type:"Boolean"},tS={["ref"]:"Endpoint"},$9={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},E9={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},N0={},r9={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},I9={["ref"]:"PartitionResult"},f9={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[I9,"supportsDualStack"]}]},s9=[$9],w9=[E9],h9=[{["ref"]:"Region"}],Yg={version:"1.0",parameters:{Region:pS,UseDualStack:uS,UseFIPS:uS,Endpoint:pS},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[tS]}],rules:[{conditions:s9,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:w9,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:tS,properties:N0,headers:N0},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:h9}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:h9,assign:"PartitionResult"}],rules:[{conditions:[$9,E9],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,r9]},f9],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:N0,headers:N0},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:s9,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[r9,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[I9,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:N0,headers:N0},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:N0,headers:N0},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:w9,rules:[{conditions:[f9],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:N0,headers:N0},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:N0,headers:N0},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},F9=Yg});var G9=(r,s={})=>{return x0(F9,{endpointParams:r,logger:s.logger})};var T9=T(()=>{Uw();e0();U9();ar.aws=n0});var L9,W9,A9=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??gf,base64Encoder:r?.base64Encoder??xf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??G9,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??xS,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new L9.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new W9.NoAuthSigner}],logger:r?.logger??new W0,serviceId:r?.serviceId??"SSO",urlParser:r?.urlParser??cr,utf8Decoder:r?.utf8Decoder??F0,utf8Encoder:r?.utf8Encoder??cf}};var z9=T(()=>{L9=g(Vr(),1),W9=g(Or(),1);K();ms();Yh();cs();CG();T9()});var C9,R9=(r)=>{mf(process.version);const s=ef(r),f=()=>s().then(yf),w=A9(r);return C9.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??_f,defaultUserAgentProvider:r?.defaultUserAgentProvider??bf({serviceId:w.serviceId,clientVersion:aS.version}),maxAttempts:r?.maxAttempts??u(Hf),region:r?.region??u(Z0,Sf),requestHandler:tr.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...kf,default:async()=>(await f()).retryMode||D0}),sha256:r?.sha256??ff.bind(null,"sha256"),streamCollector:r?.streamCollector??df,useDualstackEndpoint:r?.useDualstackEndpoint??u(Kf),useFipsEndpoint:r?.useFipsEndpoint??u(Zf)}};var P9=T(()=>{oS();C9=g(Vr(),1);zh();S0();Ph();rf();t0();Qw();Xh();L0();z9();K();Kh();K()});var X9=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const $=s.findIndex((E)=>E.schemeId===h.schemeId);if($===-1)s.push(h);else s.splice($,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},Y9=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var nE=(r)=>r,K9=(r,s)=>{const f={...nE(nf(r)),...nE(jf(r)),...nE(Wf(r)),...nE(X9(r))};return s.forEach((w)=>w.configure(f)),{...r,...of(f),...vf(f),...Af(f),...Y9(f)}};var Z9=T(()=>{Zh();Nr();K()});var Qh,As;var u1=T(()=>{_w();gw();xw();nw();S0();Qh=g(Or(),1);hh();Q();rf();K();CG();Jh();P9();Z9();As=class As extends A0{constructor(...[r]){const s=R9(r||{}),f=nS(s),w=Xf(f),h=Df(w),$=Jf(h),E=zf($),I=Bf(E),F=eS(I),U=K9(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Yf(this.config)),this.middlewareStack.use(Of(this.config)),this.middlewareStack.use(Mf(this.config)),this.middlewareStack.use(Cf(this.config)),this.middlewareStack.use(Rf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Qh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:gS,identityProviderConfigProvider:async(L)=>new Qh.DefaultIdentityProviderConfig({"aws.auth#sigv4":L.credentials})})),this.middlewareStack.use(Qh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var zs;var RG=T(()=>{K();zs=class zs extends k0{constructor(r){super(r);Object.setPrototypeOf(this,zs.prototype)}}});var oE,aE,pE,uE,S9=(r)=>({...r,...r.accessToken&&{accessToken:n}}),Kg=(r)=>({...r,...r.secretAccessKey&&{secretAccessKey:n},...r.sessionToken&&{sessionToken:n}}),J9=(r)=>({...r,...r.roleCredentials&&{roleCredentials:Kg(r.roleCredentials)}}),Q9=(r)=>({...r,...r.accessToken&&{accessToken:n}}),M9=(r)=>({...r,...r.accessToken&&{accessToken:n}}),B9=(r)=>({...r,...r.accessToken&&{accessToken:n}});var Vw=T(()=>{K();RG();oE=class oE extends zs{constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,oE.prototype)}};aE=class aE extends zs{constructor(r){super({name:"ResourceNotFoundException",$fault:"client",...r});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,aE.prototype)}};pE=class pE extends zs{constructor(r){super({name:"TooManyRequestsException",$fault:"client",...r});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,pE.prototype)}};uE=class uE extends zs{constructor(r){super({name:"UnauthorizedException",$fault:"client",...r});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,uE.prototype)}}});var xs,t1,V9=async(r,s)=>{const f=t1.requestBuilder(r,s),w=R({},rI,{[sI]:r[fI]});f.bp("/federation/credentials");const h=R({[Vg]:[,k(r[Bg],"roleName")],[j9]:[,k(r[m9],"accountId")]});let $;return f.m("GET").h(w).q(h).b($),f.build()},H9=async(r,s)=>{const f=t1.requestBuilder(r,s),w=R({},rI,{[sI]:r[fI]});f.bp("/assignment/roles");const h=R({[d9]:[,r[i9]],[O9]:[()=>r.maxResults!==void 0,()=>r[v9].toString()],[j9]:[,k(r[m9],"accountId")]});let $;return f.m("GET").h(w).q(h).b($),f.build()},D9=async(r,s)=>{const f=t1.requestBuilder(r,s),w=R({},rI,{[sI]:r[fI]});f.bp("/assignment/accounts");const h=R({[d9]:[,r[i9]],[O9]:[()=>r.maxResults!==void 0,()=>r[v9].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},k9=async(r,s)=>{const f=t1.requestBuilder(r,s),w=R({},rI,{[sI]:r[fI]});f.bp("/logout");let h;return f.m("POST").h(w).b(h),f.build()},l9=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return tE(r,s);const f=R({$metadata:es(r)}),w=k(i(await xs.parseJsonBody(r.body,s)),"body"),h=a(w,{roleCredentials:N});return Object.assign(f,h),f},N9=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return tE(r,s);const f=R({$metadata:es(r)}),w=k(i(await xs.parseJsonBody(r.body,s)),"body"),h=a(w,{nextToken:G,roleList:N});return Object.assign(f,h),f},q9=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return tE(r,s);const f=R({$metadata:es(r)}),w=k(i(await xs.parseJsonBody(r.body,s)),"body"),h=a(w,{accountList:N,nextToken:G});return Object.assign(f,h),f},y9=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return tE(r,s);const f=R({$metadata:es(r)});return await _r(r.body,s),f},tE=async(r,s)=>{const f={...r,body:await xs.parseJsonErrorBody(r.body,s)},w=xs.loadRestJsonErrorCode(r,f.body);switch(w){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await Sg(f,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await Jg(f,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Qg(f,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Mg(f,s);default:const h=f.body;return Zg({output:r,parsedBody:h,errorCode:w})}},Zg,Sg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{message:G});Object.assign(f,h);const $=new oE({$metadata:es(r),...f});return H($,r.body)},Jg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{message:G});Object.assign(f,h);const $=new aE({$metadata:es(r),...f});return H($,r.body)},Qg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{message:G});Object.assign(f,h);const $=new pE({$metadata:es(r),...f});return H($,r.body)},Mg=async(r,s)=>{const f=R({}),w=r.body,h=a(w,{message:G});Object.assign(f,h);const $=new uE({$metadata:es(r),...f});return H($,r.body)},es=(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"]}),rI=(r)=>r!==void 0&&r!==null&&r!==""&&(!Object.getOwnPropertyNames(r).includes("length")||r.length!=0)&&(!Object.getOwnPropertyNames(r).includes("size")||r.size!=0),m9="accountId",fI="accessToken",j9="account_id",v9="maxResults",O9="max_result",i9="nextToken",d9="next_token",Bg="roleName",Vg="role_name",sI="x-amz-sso_bearer_token";var r3=T(()=>{xs=g(Vr(),1),t1=g(Or(),1);K();Vw();RG();Zg=qf(zs)});var f3;var PG=T(()=>{Q();B();K();Jh();Vw();r3();f3=class f3 extends W.classBuilder().ep({...gs}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(S9,J9).ser(V9).de(l9).build(){}});var s3;var wI=T(()=>{Q();B();K();Jh();Vw();r3();s3=class s3 extends W.classBuilder().ep({...gs}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(Q9,void 0).ser(H9).de(N9).build(){}});var w3;var hI=T(()=>{Q();B();K();Jh();Vw();r3();w3=class w3 extends W.classBuilder().ep({...gs}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(M9,void 0).ser(D9).de(q9).build(){}});var XG;var YG=T(()=>{Q();B();K();Jh();Vw();r3();XG=class XG extends W.classBuilder().ep({...gs}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(B9,void 0).ser(k9).de(y9).build(){}});var Hg,b9;var c9=T(()=>{K();PG();wI();hI();YG();u1();Hg={GetRoleCredentialsCommand:f3,ListAccountRolesCommand:s3,ListAccountsCommand:w3,LogoutCommand:XG};b9=class b9 extends As{};lf(Hg,b9)});var _9=T(()=>{PG();wI();hI();YG()});var g9=()=>{};var x9,$Tr;var e9=T(()=>{x9=g(Or(),1);wI();u1();$Tr=x9.createPaginator(As,s3,"nextToken","nextToken","maxResults")});var n9,UTr;var o9=T(()=>{n9=g(Or(),1);hI();u1();UTr=n9.createPaginator(As,w3,"nextToken","nextToken","maxResults")});var a9=T(()=>{g9();e9();o9()});var p9=T(()=>{Vw()});var u9=T(()=>{u1();c9();_9();a9();p9()});var t9={};Lf(t9,{SSOClient:()=>As,GetRoleCredentialsCommand:()=>f3});var rJ=T(()=>{u9()});var h3=!1,KG=async({ssoStartUrl:r,ssoSession:s,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoClient:$,clientConfig:E,profile:I,logger:F})=>{let U;const L="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{const br=await OS({profile:I})();U={accessToken:br.token,expiresAt:new Date(br.expiration).toISOString()}}catch(br){throw new x(br.message,{tryNextLink:h3,logger:F})}else try{U=await p$(r)}catch(br){throw new x("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:h3,logger:F})}if(new Date(U.expiresAt).getTime()-Date.now()<=0)throw new x("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:h3,logger:F});const{accessToken:C}=U,{SSOClient:Y,GetRoleCredentialsCommand:X}=await Promise.resolve().then(() => (rJ(),t9)),M=$||new Y(Object.assign({},E??{},{region:E?.region??w}));let l;try{l=await M.send(new X({accountId:f,roleName:h,accessToken:C}))}catch(br){throw new x(br,{tryNextLink:h3,logger:F})}const{roleCredentials:{accessKeyId:q,secretAccessKey:D,sessionToken:m,expiration:p,credentialScope:t,accountId:Wr}={}}=l;if(!q||!D||!m||!p)throw new x("SSO returns an invalid temporary credential.",{tryNextLink:h3,logger:F});return{accessKeyId:q,secretAccessKey:D,sessionToken:m,expiration:new Date(p),...t&&{credentialScope:t},...Wr&&{accountId:Wr}}};var fJ=T(()=>{cS();Lr();u0()});var ZG=(r,s)=>{const{sso_start_url:f,sso_account_id:w,sso_region:h,sso_role_name:$}=r;if(!f||!w||!h||!$)throw new x(`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 SG=T(()=>{Lr()});var Dg=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:s,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoSession:$}=r,{ssoClient:E}=r,I=B0(r);if(!s&&!f&&!w&&!h&&!$){const U=(await ys(r))[I];if(!U)throw new x(`Profile ${I} was not found.`,{logger:r.logger});if(!gU(U))throw new x(`Profile ${I} is not configured with SSO credentials.`,{logger:r.logger});if(U?.sso_session){const q=(await rE(r))[U.sso_session],D=` configurations in profile ${I} and sso-session ${U.sso_session}`;if(w&&w!==q.sso_region)throw new x("Conflicting SSO region"+D,{tryNextLink:!1,logger:r.logger});if(s&&s!==q.sso_start_url)throw new x("Conflicting SSO start_url"+D,{tryNextLink:!1,logger:r.logger});U.sso_region=q.sso_region,U.sso_start_url=q.sso_start_url}const{sso_start_url:L,sso_account_id:C,sso_region:Y,sso_role_name:X,sso_session:M}=ZG(U,r.logger);return KG({ssoStartUrl:L,ssoSession:M,ssoAccountId:C,ssoRegion:Y,ssoRoleName:X,ssoClient:E,clientConfig:r.clientConfig,profile:I})}else if(!s||!f||!w||!h)throw new x('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:r.logger});else return KG({ssoStartUrl:s,ssoSession:$,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoClient:E,clientConfig:r.clientConfig,profile:I})};var sJ=T(()=>{Lr();u0();fJ();SG()});var wJ=()=>{};var JG={};Lf(JG,{validateSsoProfile:()=>ZG,isSsoProfile:()=>gU,fromSSO:()=>Dg});var QG=T(()=>{sJ();wJ();SG()});var hJ=(r,s,f)=>{const w={EcsContainer:async(h)=>{const{fromHttp:$}=await Promise.resolve().then(() => (_U(),cU)),{fromContainerMetadata:E}=await Promise.resolve().then(() => (N1(),l1));return f?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),Ts($(h??{}),E(h))},Ec2InstanceMetadata:async(h)=>{f?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:$}=await Promise.resolve().then(() => (N1(),l1));return $(h)},Environment:async(h)=>{f?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:$}=await Promise.resolve().then(() => (HU(),H7));return $(h)}};if(r in w)return w[r];else throw new x(`Unsupported credential source in profile ${s}. Got ${r}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:f})};var $J=T(()=>{Lr()});function kg(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}function EJ(r){return{schemeId:"smithy.api#noAuth"}}var IJ,$I,FJ=async(r,s,f)=>{return{operation:$I.getSmithyContext(s).operation,region:await $I.normalizeProvider(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},UJ=(r)=>{const s=[];switch(r.operation){case"AssumeRoleWithSAML":{s.push(EJ(r));break}case"AssumeRoleWithWebIdentity":{s.push(EJ(r));break}default:s.push(kg(r))}return s},lg=(r)=>({...r,stsClientCtor:Cs}),GJ=(r)=>{const s=lg(r);return{...IJ.resolveAwsSdkSigV4Config(s)}};var MG=T(()=>{IJ=g(Vr(),1),$I=g(pr(),1);$3()});var TJ=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,defaultSigningName:"sts"}},xr;var af=T(()=>{xr={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 WJ;var LJ=T(()=>{WJ={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 AJ,BG,SJ,zJ,ir,CJ,JJ,QJ,er,R0,RJ,MJ,BJ,PJ,VJ,XJ,YJ,KJ,ZJ,qg,HJ;var DJ=T(()=>{AJ={["required"]:!1,["type"]:"String"},BG={["required"]:!0,default:!1,["type"]:"Boolean"},SJ={["ref"]:"Endpoint"},zJ={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},ir={["ref"]:"Region"},CJ={["fn"]:"aws.partition",["argv"]:[ir],assign:"PartitionResult"},JJ={["ref"]:"UseFIPS"},QJ={["ref"]:"UseDualStack"},er={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},R0={},RJ={conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"aws-global"]}],["endpoint"]:er,["type"]:"endpoint"},MJ={["fn"]:"booleanEquals",["argv"]:[JJ,!0]},BJ={["fn"]:"booleanEquals",["argv"]:[QJ,!0]},PJ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},VJ={["ref"]:"PartitionResult"},XJ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[VJ,"supportsDualStack"]}]},YJ=[{["fn"]:"isSet",["argv"]:[SJ]}],KJ=[MJ],ZJ=[BJ],qg={version:"1.0",parameters:{Region:AJ,UseDualStack:BG,UseFIPS:BG,Endpoint:AJ,UseGlobalEndpoint:BG},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:YJ},zJ,CJ,{["fn"]:"booleanEquals",["argv"]:[JJ,!1]},{["fn"]:"booleanEquals",["argv"]:[QJ,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"ap-northeast-1"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"ap-south-1"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"ap-southeast-1"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"ap-southeast-2"]}],endpoint:er,["type"]:"endpoint"},RJ,{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"ca-central-1"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"eu-central-1"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"eu-north-1"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"eu-west-1"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"eu-west-2"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"eu-west-3"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"sa-east-1"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"us-east-1"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"us-east-2"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"us-west-1"]}],endpoint:er,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ir,"us-west-2"]}],endpoint:er,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:R0},["type"]:"endpoint"}],["type"]:"tree"},{conditions:YJ,rules:[{conditions:KJ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:ZJ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:SJ,properties:R0,headers:R0},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[zJ],rules:[{conditions:[CJ],rules:[{conditions:[MJ,BJ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,PJ]},XJ],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:R0,headers:R0},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:KJ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[PJ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[VJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:R0,headers:R0},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:R0,headers:R0},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:ZJ,rules:[{conditions:[XJ],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:R0,headers:R0},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},RJ,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:R0,headers:R0},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},HJ=qg});var kJ=(r,s={})=>{return x0(HJ,{endpointParams:r,logger:s.logger})};var lJ=T(()=>{Uw();e0();DJ();ar.aws=n0});var NJ,qJ,yJ=(r)=>{return{apiVersion:"2011-06-15",base64Decoder:r?.base64Decoder??gf,base64Encoder:r?.base64Encoder??xf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??kJ,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??UJ,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new NJ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new qJ.NoAuthSigner}],logger:r?.logger??new W0,serviceId:r?.serviceId??"STS",urlParser:r?.urlParser??cr,utf8Decoder:r?.utf8Decoder??F0,utf8Encoder:r?.utf8Encoder??cf}};var mJ=T(()=>{NJ=g(Vr(),1),qJ=g(Or(),1);K();ms();Yh();cs();MG();lJ()});var EI,jJ,vJ=(r)=>{mf(process.version);const s=ef(r),f=()=>s().then(yf),w=yJ(r);return EI.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??_f,credentialDefaultProvider:r?.credentialDefaultProvider??Ls,defaultUserAgentProvider:r?.defaultUserAgentProvider??bf({serviceId:w.serviceId,clientVersion:WJ.version}),httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4")||(async($)=>await Ls($?.__config||{})()),signer:new EI.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new jJ.NoAuthSigner}],maxAttempts:r?.maxAttempts??u(Hf),region:r?.region??u(Z0,Sf),requestHandler:tr.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...kf,default:async()=>(await f()).retryMode||D0}),sha256:r?.sha256??ff.bind(null,"sha256"),streamCollector:r?.streamCollector??df,useDualstackEndpoint:r?.useDualstackEndpoint??u(Kf),useFipsEndpoint:r?.useFipsEndpoint??u(Zf)}};var OJ=T(()=>{LJ();EI=g(Vr(),1);y1();zh();S0();jJ=g(Or(),1);Ph();rf();t0();Qw();Xh();L0();mJ();K();Kh();K()});var iJ=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const $=s.findIndex((E)=>E.schemeId===h.schemeId);if($===-1)s.push(h);else s.splice($,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},dJ=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var II=(r)=>r,bJ=(r,s)=>{const f={...II(nf(r)),...II(jf(r)),...II(Wf(r)),...II(iJ(r))};return s.forEach((w)=>w.configure(f)),{...r,...of(f),...vf(f),...Af(f),...dJ(f)}};var cJ=T(()=>{Zh();Nr();K()});var Mh,Cs;var $3=T(()=>{_w();gw();xw();nw();S0();Mh=g(Or(),1);hh();Q();rf();K();MG();af();OJ();cJ();Cs=class Cs extends A0{constructor(...[r]){const s=vJ(r||{}),f=TJ(s),w=Xf(f),h=Df(w),$=Jf(h),E=zf($),I=Bf(E),F=GJ(I),U=bJ(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Yf(this.config)),this.middlewareStack.use(Of(this.config)),this.middlewareStack.use(Mf(this.config)),this.middlewareStack.use(Cf(this.config)),this.middlewareStack.use(Rf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Mh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:FJ,identityProviderConfigProvider:async(L)=>new Mh.DefaultIdentityProviderConfig({"aws.auth#sigv4":L.credentials})})),this.middlewareStack.use(Mh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var r0;var FI=T(()=>{K();r0=class r0 extends k0{constructor(r){super(r);Object.setPrototypeOf(this,r0.prototype)}}});var E3,I3,F3,U3,G3,T3,L3,W3,Bh=(r)=>({...r,...r.SecretAccessKey&&{SecretAccessKey:n}}),VG=(r)=>({...r,...r.Credentials&&{Credentials:Bh(r.Credentials)}}),HG=(r)=>({...r,...r.SAMLAssertion&&{SAMLAssertion:n}}),DG=(r)=>({...r,...r.Credentials&&{Credentials:Bh(r.Credentials)}}),kG=(r)=>({...r,...r.WebIdentityToken&&{WebIdentityToken:n}}),lG=(r)=>({...r,...r.Credentials&&{Credentials:Bh(r.Credentials)}}),NG=(r)=>({...r,...r.Credentials&&{Credentials:Bh(r.Credentials)}}),qG=(r)=>({...r,...r.Credentials&&{Credentials:Bh(r.Credentials)}});var ns=T(()=>{K();FI();E3=class E3 extends r0{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,E3.prototype)}};I3=class I3 extends r0{constructor(r){super({name:"MalformedPolicyDocumentException",$fault:"client",...r});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,I3.prototype)}};F3=class F3 extends r0{constructor(r){super({name:"PackedPolicyTooLargeException",$fault:"client",...r});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,F3.prototype)}};U3=class U3 extends r0{constructor(r){super({name:"RegionDisabledException",$fault:"client",...r});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,U3.prototype)}};G3=class G3 extends r0{constructor(r){super({name:"IDPRejectedClaimException",$fault:"client",...r});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,G3.prototype)}};T3=class T3 extends r0{constructor(r){super({name:"InvalidIdentityTokenException",$fault:"client",...r});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,T3.prototype)}};L3=class L3 extends r0{constructor(r){super({name:"IDPCommunicationErrorException",$fault:"client",...r});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,L3.prototype)}};W3=class W3 extends r0{constructor(r){super({name:"InvalidAuthorizationMessageException",$fault:"client",...r});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,W3.prototype)}}});var sf,_J=async(r,s)=>{const f=ps;let w;return w=fw({...cg(r,s),[ts]:Yx,[rw]:us}),as(s,f,"/",void 0,w)},gJ=async(r,s)=>{const f=ps;let w;return w=fw({..._g(r,s),[ts]:Kx,[rw]:us}),as(s,f,"/",void 0,w)},xJ=async(r,s)=>{const f=ps;let w;return w=fw({...gg(r,s),[ts]:Zx,[rw]:us}),as(s,f,"/",void 0,w)},eJ=async(r,s)=>{const f=ps;let w;return w=fw({...xg(r,s),[ts]:Sx,[rw]:us}),as(s,f,"/",void 0,w)},nJ=async(r,s)=>{const f=ps;let w;return w=fw({...eg(r,s),[ts]:Jx,[rw]:us}),as(s,f,"/",void 0,w)},oJ=async(r,s)=>{const f=ps;let w;return w=fw({...ng(r,s),[ts]:Qx,[rw]:us}),as(s,f,"/",void 0,w)},aJ=async(r,s)=>{const f=ps;let w;return w=fw({...og(r,s),[ts]:Mx,[rw]:us}),as(s,f,"/",void 0,w)},pJ=async(r,s)=>{const f=ps;let w;return w=fw({...ag(r,s),[ts]:Bx,[rw]:us}),as(s,f,"/",void 0,w)},uJ=async(r,s)=>{if(r.statusCode>=300)return os(r,s);const f=await sf.parseXmlBody(r.body,s);let w={};return w=sx(f.AssumeRoleResult,s),{$metadata:nr(r),...w}},tJ=async(r,s)=>{if(r.statusCode>=300)return os(r,s);const f=await sf.parseXmlBody(r.body,s);let w={};return w=wx(f.AssumeRoleWithSAMLResult,s),{$metadata:nr(r),...w}},rQ=async(r,s)=>{if(r.statusCode>=300)return os(r,s);const f=await sf.parseXmlBody(r.body,s);let w={};return w=hx(f.AssumeRoleWithWebIdentityResult,s),{$metadata:nr(r),...w}},fQ=async(r,s)=>{if(r.statusCode>=300)return os(r,s);const f=await sf.parseXmlBody(r.body,s);let w={};return w=$x(f.DecodeAuthorizationMessageResult,s),{$metadata:nr(r),...w}},sQ=async(r,s)=>{if(r.statusCode>=300)return os(r,s);const f=await sf.parseXmlBody(r.body,s);let w={};return w=Fx(f.GetAccessKeyInfoResult,s),{$metadata:nr(r),...w}},wQ=async(r,s)=>{if(r.statusCode>=300)return os(r,s);const f=await sf.parseXmlBody(r.body,s);let w={};return w=Ux(f.GetCallerIdentityResult,s),{$metadata:nr(r),...w}},hQ=async(r,s)=>{if(r.statusCode>=300)return os(r,s);const f=await sf.parseXmlBody(r.body,s);let w={};return w=Gx(f.GetFederationTokenResult,s),{$metadata:nr(r),...w}},$Q=async(r,s)=>{if(r.statusCode>=300)return os(r,s);const f=await sf.parseXmlBody(r.body,s);let w={};return w=Tx(f.GetSessionTokenResult,s),{$metadata:nr(r),...w}},os=async(r,s)=>{const f={...r,body:await sf.parseXmlErrorBody(r.body,s)},w=Vx(r,f.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await yg(f,s);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await ig(f,s);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await dg(f,s);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await bg(f,s);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await jg(f,s);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Og(f,s);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await mg(f,s);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await vg(f,s);default:const h=f.body;return Xx({output:r,parsedBody:h.Error,errorCode:w})}},yg=async(r,s)=>{const f=r.body,w=Ex(f.Error,s),h=new E3({$metadata:nr(r),...w});return H(h,f)},mg=async(r,s)=>{const f=r.body,w=Lx(f.Error,s),h=new L3({$metadata:nr(r),...w});return H(h,f)},jg=async(r,s)=>{const f=r.body,w=Wx(f.Error,s),h=new G3({$metadata:nr(r),...w});return H(h,f)},vg=async(r,s)=>{const f=r.body,w=Ax(f.Error,s),h=new W3({$metadata:nr(r),...w});return H(h,f)},Og=async(r,s)=>{const f=r.body,w=zx(f.Error,s),h=new T3({$metadata:nr(r),...w});return H(h,f)},ig=async(r,s)=>{const f=r.body,w=Cx(f.Error,s),h=new I3({$metadata:nr(r),...w});return H(h,f)},dg=async(r,s)=>{const f=r.body,w=Rx(f.Error,s),h=new F3({$metadata:nr(r),...w});return H(h,f)},bg=async(r,s)=>{const f=r.body,w=Px(f.Error,s),h=new U3({$metadata:nr(r),...w});return H(h,f)},cg=(r,s)=>{const f={};if(r[Xs]!=null)f[Xs]=r[Xs];if(r[kh]!=null)f[kh]=r[kh];if(r[y0]!=null){const w=UI(r[y0],s);if(r[y0]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;f[E]=$})}if(r[q0]!=null)f[q0]=r[q0];if(r[s0]!=null)f[s0]=r[s0];if(r[Nh]!=null){const w=EQ(r[Nh],s);if(r[Nh]?.length===0)f.Tags=[];Object.entries(w).forEach(([h,$])=>{const E=`Tags.${h}`;f[E]=$})}if(r[hT]!=null){const w=fx(r[hT],s);if(r[hT]?.length===0)f.TransitiveTagKeys=[];Object.entries(w).forEach(([h,$])=>{const E=`TransitiveTagKeys.${h}`;f[E]=$})}if(r[OG]!=null)f[OG]=r[OG];if(r[lh]!=null)f[lh]=r[lh];if(r[qh]!=null)f[qh]=r[qh];if(r[j0]!=null)f[j0]=r[j0];if(r[oG]!=null){const w=tg(r[oG],s);if(r[oG]?.length===0)f.ProvidedContexts=[];Object.entries(w).forEach(([h,$])=>{const E=`ProvidedContexts.${h}`;f[E]=$})}return f},_g=(r,s)=>{const f={};if(r[Xs]!=null)f[Xs]=r[Xs];if(r[eG]!=null)f[eG]=r[eG];if(r[rT]!=null)f[rT]=r[rT];if(r[y0]!=null){const w=UI(r[y0],s);if(r[y0]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;f[E]=$})}if(r[q0]!=null)f[q0]=r[q0];if(r[s0]!=null)f[s0]=r[s0];return f},gg=(r,s)=>{const f={};if(r[Xs]!=null)f[Xs]=r[Xs];if(r[kh]!=null)f[kh]=r[kh];if(r[IT]!=null)f[IT]=r[IT];if(r[aG]!=null)f[aG]=r[aG];if(r[y0]!=null){const w=UI(r[y0],s);if(r[y0]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;f[E]=$})}if(r[q0]!=null)f[q0]=r[q0];if(r[s0]!=null)f[s0]=r[s0];return f},xg=(r,s)=>{const f={};if(r[iG]!=null)f[iG]=r[iG];return f},eg=(r,s)=>{const f={};if(r[Vh]!=null)f[Vh]=r[Vh];return f},ng=(r,s)=>{return{}},og=(r,s)=>{const f={};if(r[gG]!=null)f[gG]=r[gG];if(r[q0]!=null)f[q0]=r[q0];if(r[y0]!=null){const w=UI(r[y0],s);if(r[y0]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;f[E]=$})}if(r[s0]!=null)f[s0]=r[s0];if(r[Nh]!=null){const w=EQ(r[Nh],s);if(r[Nh]?.length===0)f.Tags=[];Object.entries(w).forEach(([h,$])=>{const E=`Tags.${h}`;f[E]=$})}return f},ag=(r,s)=>{const f={};if(r[s0]!=null)f[s0]=r[s0];if(r[lh]!=null)f[lh]=r[lh];if(r[qh]!=null)f[qh]=r[qh];return f},UI=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;const $=pg(h,s);Object.entries($).forEach(([E,I])=>{f[`member.${w}.${E}`]=I}),w++}return f},pg=(r,s)=>{const f={};if(r[FT]!=null)f[FT]=r[FT];return f},ug=(r,s)=>{const f={};if(r[nG]!=null)f[nG]=r[nG];if(r[mG]!=null)f[mG]=r[mG];return f},tg=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;const $=ug(h,s);Object.entries($).forEach(([E,I])=>{f[`member.${w}.${E}`]=I}),w++}return f},rx=(r,s)=>{const f={};if(r[_G]!=null)f[_G]=r[_G];if(r[ET]!=null)f[ET]=r[ET];return f},fx=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;f[`member.${w}`]=h,w++}return f},EQ=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;const $=rx(h,s);Object.entries($).forEach(([E,I])=>{f[`member.${w}.${E}`]=I}),w++}return f},UT=(r,s)=>{const f={};if(r[yG]!=null)f[yG]=G(r[yG]);if(r[Ps]!=null)f[Ps]=G(r[Ps]);return f},sx=(r,s)=>{const f={};if(r[f0]!=null)f[f0]=A3(r[f0],s);if(r[Rs]!=null)f[Rs]=UT(r[Rs],s);if(r[m0]!=null)f[m0]=hr(r[m0]);if(r[j0]!=null)f[j0]=G(r[j0]);return f},wx=(r,s)=>{const f={};if(r[f0]!=null)f[f0]=A3(r[f0],s);if(r[Rs]!=null)f[Rs]=UT(r[Rs],s);if(r[m0]!=null)f[m0]=hr(r[m0]);if(r[uG]!=null)f[uG]=G(r[uG]);if(r[sT]!=null)f[sT]=G(r[sT]);if(r[cG]!=null)f[cG]=G(r[cG]);if(r[Dh]!=null)f[Dh]=G(r[Dh]);if(r[xG]!=null)f[xG]=G(r[xG]);if(r[j0]!=null)f[j0]=G(r[j0]);return f},hx=(r,s)=>{const f={};if(r[f0]!=null)f[f0]=A3(r[f0],s);if(r[fT]!=null)f[fT]=G(r[fT]);if(r[Rs]!=null)f[Rs]=UT(r[Rs],s);if(r[m0]!=null)f[m0]=hr(r[m0]);if(r[pG]!=null)f[pG]=G(r[pG]);if(r[Dh]!=null)f[Dh]=G(r[Dh]);if(r[j0]!=null)f[j0]=G(r[j0]);return f},A3=(r,s)=>{const f={};if(r[Vh]!=null)f[Vh]=G(r[Vh]);if(r[tG]!=null)f[tG]=G(r[tG]);if(r[wT]!=null)f[wT]=G(r[wT]);if(r[vG]!=null)f[vG]=k(Kw(r[vG]));return f},$x=(r,s)=>{const f={};if(r[jG]!=null)f[jG]=G(r[jG]);return f},Ex=(r,s)=>{const f={};if(r[Pr]!=null)f[Pr]=G(r[Pr]);return f},Ix=(r,s)=>{const f={};if(r[bG]!=null)f[bG]=G(r[bG]);if(r[Ps]!=null)f[Ps]=G(r[Ps]);return f},Fx=(r,s)=>{const f={};if(r[Hh]!=null)f[Hh]=G(r[Hh]);return f},Ux=(r,s)=>{const f={};if(r[$T]!=null)f[$T]=G(r[$T]);if(r[Hh]!=null)f[Hh]=G(r[Hh]);if(r[Ps]!=null)f[Ps]=G(r[Ps]);return f},Gx=(r,s)=>{const f={};if(r[f0]!=null)f[f0]=A3(r[f0],s);if(r[dG]!=null)f[dG]=Ix(r[dG],s);if(r[m0]!=null)f[m0]=hr(r[m0]);return f},Tx=(r,s)=>{const f={};if(r[f0]!=null)f[f0]=A3(r[f0],s);return f},Lx=(r,s)=>{const f={};if(r[Pr]!=null)f[Pr]=G(r[Pr]);return f},Wx=(r,s)=>{const f={};if(r[Pr]!=null)f[Pr]=G(r[Pr]);return f},Ax=(r,s)=>{const f={};if(r[Pr]!=null)f[Pr]=G(r[Pr]);return f},zx=(r,s)=>{const f={};if(r[Pr]!=null)f[Pr]=G(r[Pr]);return f},Cx=(r,s)=>{const f={};if(r[Pr]!=null)f[Pr]=G(r[Pr]);return f},Rx=(r,s)=>{const f={};if(r[Pr]!=null)f[Pr]=G(r[Pr]);return f},Px=(r,s)=>{const f={};if(r[Pr]!=null)f[Pr]=G(r[Pr]);return f},nr=(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"]}),Xx,as=async(r,s,f,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)+f:F+f,headers:s};if(w!==void 0)U.hostname=w;if(h!==void 0)U.body=h;return new Mr(U)},ps,us="2011-06-15",ts="Action",Vh="AccessKeyId",Yx="AssumeRole",yG="AssumedRoleId",Rs="AssumedRoleUser",Kx="AssumeRoleWithSAML",Zx="AssumeRoleWithWebIdentity",Hh="Account",Ps="Arn",Dh="Audience",f0="Credentials",mG="ContextAssertion",Sx="DecodeAuthorizationMessage",jG="DecodedMessage",s0="DurationSeconds",vG="Expiration",OG="ExternalId",iG="EncodedMessage",dG="FederatedUser",bG="FederatedUserId",Jx="GetAccessKeyInfo",Qx="GetCallerIdentity",Mx="GetFederationToken",Bx="GetSessionToken",cG="Issuer",_G="Key",gG="Name",xG="NameQualifier",q0="Policy",y0="PolicyArns",eG="PrincipalArn",nG="ProviderArn",oG="ProvidedContexts",aG="ProviderId",m0="PackedPolicySize",pG="Provider",Xs="RoleArn",kh="RoleSessionName",uG="Subject",tG="SecretAccessKey",rT="SAMLAssertion",fT="SubjectFromWebIdentityToken",j0="SourceIdentity",lh="SerialNumber",sT="SubjectType",wT="SessionToken",Nh="Tags",qh="TokenCode",hT="TransitiveTagKeys",$T="UserId",rw="Version",ET="Value",IT="WebIdentityToken",FT="arn",Pr="message",fw=(r)=>Object.entries(r).map(([s,f])=>AE(s)+"="+AE(f)).join("&"),Vx=(r,s)=>{if(s.Error?.Code!==void 0)return s.Error.Code;if(r.statusCode==404)return"NotFound"};var Ys=T(()=>{sf=g(Vr(),1);Nr();K();ns();FI();Xx=qf(r0),ps={"content-type":"application/x-www-form-urlencoded"}});var yh;var GI=T(()=>{Q();B();K();af();ns();Ys();yh=class yh extends W.classBuilder().ep({...xr}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,VG).ser(_J).de(uJ).build(){}});var TI;var GT=T(()=>{Q();B();K();af();ns();Ys();TI=class TI extends W.classBuilder().ep({...xr}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(HG,DG).ser(gJ).de(tJ).build(){}});var mh;var LI=T(()=>{Q();B();K();af();ns();Ys();mh=class mh extends W.classBuilder().ep({...xr}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(kG,lG).ser(xJ).de(rQ).build(){}});var WI;var TT=T(()=>{Q();B();K();af();Ys();WI=class WI extends W.classBuilder().ep({...xr}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(eJ).de(fQ).build(){}});var AI;var LT=T(()=>{Q();B();K();af();Ys();AI=class AI extends W.classBuilder().ep({...xr}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(nJ).de(sQ).build(){}});var zI;var WT=T(()=>{Q();B();K();af();Ys();zI=class zI extends W.classBuilder().ep({...xr}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(oJ).de(wQ).build(){}});var CI;var AT=T(()=>{Q();B();K();af();ns();Ys();CI=class CI extends W.classBuilder().ep({...xr}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,NG).ser(aJ).de(hQ).build(){}});var RI;var zT=T(()=>{Q();B();K();af();ns();Ys();RI=class RI extends W.classBuilder().ep({...xr}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,qG).ser(pJ).de($Q).build(){}});var Hx,CT;var IQ=T(()=>{K();GI();GT();LI();TT();LT();WT();AT();zT();$3();Hx={AssumeRoleCommand:yh,AssumeRoleWithSAMLCommand:TI,AssumeRoleWithWebIdentityCommand:mh,DecodeAuthorizationMessageCommand:WI,GetAccessKeyInfoCommand:AI,GetCallerIdentityCommand:zI,GetFederationTokenCommand:CI,GetSessionTokenCommand:RI};CT=class CT extends Cs{};lf(Hx,CT)});var FQ=T(()=>{GI();GT();LI();TT();LT();WT();AT();zT()});var UQ=T(()=>{ns()});var GQ="us-east-1",TQ=(r)=>{if(typeof r?.Arn==="string"){const s=r.Arn.split(":");if(s.length>4&&s[4]!=="")return s[4]}return},LQ=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)`,`${GQ} (STS default)`),w??h??GQ},WQ=(r,s)=>{let f,w;return async(h,$)=>{if(w=h,!f){const{logger:U=r?.parentClientConfig?.logger,region:L,requestHandler:C=r?.parentClientConfig?.requestHandler,credentialProviderLogger:Y}=r,X=await LQ(L,r?.parentClientConfig?.region,Y),M=!zQ(C);f=new s({credentialDefaultProvider:()=>async()=>w,region:X,requestHandler:M?C:void 0,logger:U})}const{Credentials:E,AssumedRoleUser:I}=await f.send(new yh($));if(!E||!E.AccessKeyId||!E.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${$.RoleArn}`);const F=TQ(I);return{accessKeyId:E.AccessKeyId,secretAccessKey:E.SecretAccessKey,sessionToken:E.SessionToken,expiration:E.Expiration,...E.CredentialScope&&{credentialScope:E.CredentialScope},...F&&{accountId:F}}}},AQ=(r,s)=>{let f;return async(w)=>{if(!f){const{logger:I=r?.parentClientConfig?.logger,region:F,requestHandler:U=r?.parentClientConfig?.requestHandler,credentialProviderLogger:L}=r,C=await LQ(F,r?.parentClientConfig?.region,L),Y=!zQ(U);f=new s({region:C,requestHandler:Y?U:void 0,logger:I})}const{Credentials:h,AssumedRoleUser:$}=await f.send(new mh(w));if(!h||!h.AccessKeyId||!h.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const E=TQ($);return{accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.SessionToken,expiration:h.Expiration,...h.CredentialScope&&{credentialScope:h.CredentialScope},...E&&{accountId:E}}}},zQ=(r)=>{return r?.metadata?.handlerProtocol==="h2"};var CQ=T(()=>{GI();LI()});var RQ=(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)}}},PQ=(r={},s)=>WQ(r,RQ(Cs,s)),XQ=(r={},s)=>AQ(r,RQ(Cs,s)),Dx=(r)=>(s)=>r({roleAssumer:PQ(s),roleAssumerWithWebIdentity:XQ(s),...s});var YQ=T(()=>{CQ();$3()});var RT={};Lf(RT,{getDefaultRoleAssumerWithWebIdentity:()=>XQ,getDefaultRoleAssumer:()=>PQ,decorateDefaultCredentialProvider:()=>Dx,__Client:()=>A0,STSServiceException:()=>r0,STSClient:()=>Cs,STS:()=>CT,RegionDisabledException:()=>U3,PackedPolicyTooLargeException:()=>F3,MalformedPolicyDocumentException:()=>I3,InvalidIdentityTokenException:()=>T3,InvalidAuthorizationMessageException:()=>W3,IDPRejectedClaimException:()=>G3,IDPCommunicationErrorException:()=>L3,GetSessionTokenResponseFilterSensitiveLog:()=>qG,GetSessionTokenCommand:()=>RI,GetFederationTokenResponseFilterSensitiveLog:()=>NG,GetFederationTokenCommand:()=>CI,GetCallerIdentityCommand:()=>zI,GetAccessKeyInfoCommand:()=>AI,ExpiredTokenException:()=>E3,DecodeAuthorizationMessageCommand:()=>WI,CredentialsFilterSensitiveLog:()=>Bh,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>lG,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>kG,AssumeRoleWithWebIdentityCommand:()=>mh,AssumeRoleWithSAMLResponseFilterSensitiveLog:()=>DG,AssumeRoleWithSAMLRequestFilterSensitiveLog:()=>HG,AssumeRoleWithSAMLCommand:()=>TI,AssumeRoleResponseFilterSensitiveLog:()=>VG,AssumeRoleCommand:()=>yh,$Command:()=>W});var PT=T(()=>{$3();IQ();FQ();UQ();YQ();FI()});var KQ=(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&&(kx(r,{profile:s,logger:f})||lx(r,{profile:s,logger:f}))},kx=(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},lx=(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},ZQ=async(r,s,f,w={})=>{f.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const h=s[r];if(!f.roleAssumer){const{getDefaultRoleAssumer:L}=await Promise.resolve().then(() => (PT(),RT));f.roleAssumer=L({...f.clientConfig,credentialProviderLogger:f.logger,parentClientConfig:f?.parentClientConfig},f.clientPlugins)}const{source_profile:$}=h;if($&&$ in w)throw new x(`Detected a cycle attempting to resolve credentials for profile ${B0(f)}. Profiles visited: `+Object.keys(w).join(", "),{logger:f.logger});f.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${$?`source_profile=[${$}]`:`profile=[${r}]`}`);const E=$?PI($,{...s,[$]:{...s[$],role_arn:h.role_arn??s[$].role_arn}},f,{...w,[$]:!0}):(await hJ(h.credential_source,r,f.logger)(f))(),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 x(`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 E;return f.roleAssumer(U,I)};var SQ=T(()=>{Lr();u0();$J();XT()});var JQ=(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 h=new Date;if(new Date(s.Expiration)<h)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;return{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}}};import{exec as Nx}from"child_process";import{promisify as qx}from"util";var QQ=async(r,s,f)=>{const w=s[r];if(s[r]){const h=w.credential_process;if(h!==void 0){const $=qx(Nx);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 JQ(r,I,s)}catch(E){throw new x(E.message,{logger:f})}}else throw new x(`Profile ${r} did not contain credential_process.`,{logger:f})}else throw new x(`Profile ${r} could not be found in shared credentials file.`,{logger:f})};var MQ=T(()=>{Lr()});var yx=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const s=await ys(r);return QQ(B0(r),s,r.logger)};var BQ=T(()=>{u0();MQ()});var YT={};Lf(YT,{fromProcess:()=>yx});var KT=T(()=>{BQ()});var VQ=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.credential_process==="string",HQ=async(r,s)=>Promise.resolve().then(() => (KT(),YT)).then(({fromProcess:f})=>f({...r,profile:s})());var DQ=async(r,s={})=>{const{fromSSO:f}=await Promise.resolve().then(() => (QG(),JG));return f({profile:r,logger:s.logger})()},kQ=(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 ZT=(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,ST=(r,s)=>{return s?.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 JT=(r)=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:s,roleSessionName:f,webIdentityToken:w,providerId:h,policyArns:$,policy:E,durationSeconds:I}=r;let{roleAssumerWithWebIdentity:F}=r;if(!F){const{getDefaultRoleAssumerWithWebIdentity:U}=await Promise.resolve().then(() => (PT(),RT));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:$,Policy:E,DurationSeconds:I})};import{readFileSync as mx}from"fs";var jx="AWS_WEB_IDENTITY_TOKEN_FILE",vx="AWS_ROLE_ARN",Ox="AWS_ROLE_SESSION_NAME",ix=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const s=r?.webIdentityTokenFile??process.env[jx],f=r?.roleArn??process.env[vx],w=r?.roleSessionName??process.env[Ox];if(!s||!f)throw new x("Web identity configuration not specified",{logger:r.logger});return JT({...r,webIdentityToken:mx(s,{encoding:"ascii"}),roleArn:f,roleSessionName:w})()};var lQ=T(()=>{Lr()});var QT={};Lf(QT,{fromWebToken:()=>JT,fromTokenFile:()=>ix});var MT=T(()=>{lQ()});var NQ=(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,qQ=async(r,s)=>Promise.resolve().then(() => (MT(),QT)).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})());var PI=async(r,s,f,w={})=>{const h=s[r];if(Object.keys(w).length>0&&ZT(h))return ST(h,f);if(KQ(h,{profile:r,logger:f.logger}))return ZQ(r,s,f,w);if(ZT(h))return ST(h,f);if(NQ(h))return qQ(h,f);if(VQ(h))return HQ(f,r);if(kQ(h))return await DQ(r,f);throw new x(`Could not resolve credentials using profile: [${r}] in configuration/credentials file(s).`,{logger:f.logger})};var XT=T(()=>{Lr();SQ()});var dx=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await ys(r);return PI(B0(r),s,r)};var yQ=T(()=>{u0();XT()});var mQ={};Lf(mQ,{fromIni:()=>dx});var jQ=T(()=>{yQ()});var vQ=!1,Ls=(r={})=>Cw(Ts(async()=>{if(r.profile??process.env[nP]){if(process.env[VE]&&process.env[HE]){if(!vQ)(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
- `),LQ=!0}throw new _("AWS_PROFILE is set, skipping fromEnv provider.",{logger:r.logger,tryNextLink:!0})}return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),O5(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 _("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:r.logger});const{fromSSO:E}=await Promise.resolve().then(() => (HT(),BT));return E(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:f}=await Promise.resolve().then(() => (CQ(),GQ));return f(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:f}=await Promise.resolve().then(() => (JG(),lG));return f(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:f}=await Promise.resolve().then(() => (VG(),HG));return f(r)()},async()=>{return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await oZ(r))()},async()=>{throw new _("Could not load credentials from any providers",{tryNextLink:!1,logger:r.logger})}),Xe,Pe),Pe=(r)=>r?.expiration!==void 0,Xe=(r)=>r?.expiration!==void 0&&r.expiration.getTime()-Date.now()<300000;var AQ=G(()=>{c5();Lr();hf();aZ()});var b1=G(()=>{AQ()});aw();pw();uw();rh();Ms();var bh=u(Or(),1);Th();M();Ef();Y();var WZ=u(Br(),1);rf();function mg(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}var zZ=async(r,f,s)=>{return{operation:Js(f).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},SZ=(r)=>{const f=[];switch(r.operation){default:f.push(mg(r))}return f},PZ=(r)=>{return{...WZ.resolveAwsSdkSigV4Config(r)}};var XZ=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53"}},l={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var YZ={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 DQ=u(Br(),1);b1();Zh();Ms();lh();Ef();$f();_0();Jh();Rs();var VQ=u(Br(),1);Y();b0();W0();jf();Ww();us();var RQ={["required"]:!1,type:"String"},WQ={["required"]:!0,default:!1,type:"Boolean"},zQ={["ref"]:"Endpoint"},KI={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},MQ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},br={},SQ={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},ch={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},mw={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},M0={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},PQ={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},XQ={["fn"]:"stringEquals",["argv"]:[ch,"aws-us-gov"]},YQ={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},KQ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},ZQ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},lQ=[KI],JQ=[MQ],QQ=[{["ref"]:"Region"}],Ye={version:"1.0",parameters:{Region:RQ,UseDualStack:WQ,UseFIPS:WQ,Endpoint:RQ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[zQ]}],rules:[{conditions:lQ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:JQ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:zQ,properties:br,headers:br},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:QQ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:QQ,assign:"PartitionResult"}],rules:[{conditions:[SQ,mw,M0],endpoint:{url:"https://route53.amazonaws.com",properties:PQ,headers:br},type:"endpoint"},{conditions:[SQ,KI,M0],endpoint:{url:"https://route53-fips.amazonaws.com",properties:PQ,headers:br},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ch,"aws-cn"]},mw,M0],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:br},type:"endpoint"},{conditions:[XQ,mw,M0],endpoint:YQ,type:"endpoint"},{conditions:[XQ,KI,M0],endpoint:YQ,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ch,"aws-iso"]},mw,M0],endpoint:{url:"https://route53.c2s.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-iso-east-1"}]},headers:br},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ch,"aws-iso-b"]},mw,M0],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isob-east-1"}]},headers:br},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ch,"aws-iso-e"]},mw,M0],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"eu-isoe-west-1"}]},headers:br},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[ch,"aws-iso-f"]},mw,M0],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:br},type:"endpoint"},{conditions:[KI,MQ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,KQ]},ZQ],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:br,headers:br},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:lQ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[KQ,!0]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:br,headers:br},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:JQ,rules:[{conditions:[ZQ],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:br,headers:br},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:br,headers:br},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},BQ=Ye;var HQ=(r,f={})=>{return ps(BQ,{endpointParams:r,logger:f.logger})};ur.aws=ts;var kQ=(r)=>{return{apiVersion:"2013-04-01",base64Decoder:r?.base64Decoder??Us,base64Encoder:r?.base64Encoder??Gs,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??HQ,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??SZ,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new VQ.AwsSdkSigV4Signer}],logger:r?.logger??new Ws,serviceId:r?.serviceId??"Route 53",urlParser:r?.urlParser??gr,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Ts}};Y();Qh();Y();var iQ=(r)=>{gf(process.version);const f=af(r),s=()=>f().then(bf),w=kQ(r);return DQ.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??of,credentialDefaultProvider:r?.credentialDefaultProvider??S0,defaultUserAgentProvider:r?.defaultUserAgentProvider??nf({serviceId:w.serviceId,clientVersion:YZ.version}),maxAttempts:r?.maxAttempts??t(Nf),region:r?.region??t(Qs,Hf),requestHandler:tr.create(r?.requestHandler??s),retryMode:r?.retryMode??t({...vf,default:async()=>(await s()).retryMode||ys}),sha256:r?.sha256??If.bind(null,"sha256"),streamCollector:r?.streamCollector??ms,useDualstackEndpoint:r?.useDualstackEndpoint??t(Mf),useFipsEndpoint:r?.useFipsEndpoint??t(Bf)}};Mh();ir();Y();var yQ=(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}}},mQ=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var ZI=(r)=>r,NQ=(r,f)=>{const s={...ZI(pf(r)),...ZI(_f(r)),...ZI(Pf(r)),...ZI(yQ(r))};return f.forEach((w)=>w.configure(s)),{...r,...uf(s),...xf(s),...Xf(s),...mQ(s)}};class kG extends zs{constructor(...[r]){const f=iQ(r||{}),s=XZ(f),w=Jf(s),h=qf(w),$=Vf(h),E=Yf($),I=yf(E),F=PZ(I),U=NQ(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Qf(this.config)),this.middlewareStack.use(ef(this.config)),this.middlewareStack.use(Df(this.config)),this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(Zf(this.config)),this.middlewareStack.use(lf(this.config)),this.middlewareStack.use(bh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:zZ,identityProviderConfigProvider:async(C)=>new bh.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(bh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}Y();var lI=/^\/(hostedzone|change|delegationset)\//;function Ke(){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(lI,"")}}});else w.push(h)}return r({...f,input:{...f.input,ChangeBatch:{...s,Changes:w}}})}}var Ze={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},qQ=(r)=>({applyToStack:(f)=>{f.add(Ke(),Ze)}});function Je(){return(r)=>async(f)=>{const s={...f.input};for(let w of le){const h=s[w];if(h)s[w]=h.replace(lI,"")}return r({...f,input:s})}}var le=["DelegationSetId","HostedZoneId","Id"],Qe={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},N=(r)=>({applyToStack:(f)=>{f.add(Je(),Qe)}});M();H();Y();var g=u(Br(),1);function vQ(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function jQ(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 jQ(""+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}="${vQ(""+h)}"`}return f+=!r?"/>":`>${this.children.map((w)=>w.toString()).join("")}</${this.name}>`}}var O=u(Or(),1);Y();Y();class j extends Ns{constructor(r){super(r);Object.setPrototypeOf(this,j.prototype)}}class JI extends j{constructor(r){super({name:"ConcurrentModification",$fault:"client",...r});this.name="ConcurrentModification",this.$fault="client",Object.setPrototypeOf(this,JI.prototype)}}class QI extends j{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,QI.prototype)}}class MI extends j{constructor(r){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...r});this.name="InvalidKeySigningKeyStatus",this.$fault="client",Object.setPrototypeOf(this,MI.prototype)}}class BI extends j{constructor(r){super({name:"InvalidKMSArn",$fault:"client",...r});this.name="InvalidKMSArn",this.$fault="client",Object.setPrototypeOf(this,BI.prototype)}}class HI extends j{constructor(r){super({name:"InvalidSigningStatus",$fault:"client",...r});this.name="InvalidSigningStatus",this.$fault="client",Object.setPrototypeOf(this,HI.prototype)}}class VI extends j{constructor(r){super({name:"NoSuchKeySigningKey",$fault:"client",...r});this.name="NoSuchKeySigningKey",this.$fault="client",Object.setPrototypeOf(this,VI.prototype)}}class kI extends j{constructor(r){super({name:"ConflictingDomainExists",$fault:"client",...r});this.name="ConflictingDomainExists",this.$fault="client",Object.setPrototypeOf(this,kI.prototype)}}class DI extends j{constructor(r){super({name:"InvalidVPCId",$fault:"client",...r});this.name="InvalidVPCId",this.$fault="client",Object.setPrototypeOf(this,DI.prototype)}}class iI extends j{constructor(r){super({name:"LimitsExceeded",$fault:"client",...r});this.name="LimitsExceeded",this.$fault="client",Object.setPrototypeOf(this,iI.prototype)}}class yI extends j{constructor(r){super({name:"NoSuchHostedZone",$fault:"client",...r});this.name="NoSuchHostedZone",this.$fault="client",Object.setPrototypeOf(this,yI.prototype)}}class mI extends j{constructor(r){super({name:"NotAuthorizedException",$fault:"client",...r});this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,mI.prototype)}}class NI extends j{constructor(r){super({name:"PriorRequestNotComplete",$fault:"client",...r});this.name="PriorRequestNotComplete",this.$fault="client",Object.setPrototypeOf(this,NI.prototype)}}class qI extends j{constructor(r){super({name:"PublicZoneVPCAssociation",$fault:"client",...r});this.name="PublicZoneVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,qI.prototype)}}class vI extends j{constructor(r){super({name:"CidrBlockInUseException",$fault:"client",...r});this.name="CidrBlockInUseException",this.$fault="client",Object.setPrototypeOf(this,vI.prototype),this.Message=r.Message}}class jI extends j{constructor(r){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...r});this.name="CidrCollectionVersionMismatchException",this.$fault="client",Object.setPrototypeOf(this,jI.prototype),this.Message=r.Message}}class dI extends j{constructor(r){super({name:"NoSuchCidrCollectionException",$fault:"client",...r});this.name="NoSuchCidrCollectionException",this.$fault="client",Object.setPrototypeOf(this,dI.prototype),this.Message=r.Message}}class OI extends j{constructor(r){super({name:"InvalidChangeBatch",$fault:"client",...r});this.name="InvalidChangeBatch",this.$fault="client",Object.setPrototypeOf(this,OI.prototype),this.messages=r.messages}}class cI extends j{constructor(r){super({name:"NoSuchHealthCheck",$fault:"client",...r});this.name="NoSuchHealthCheck",this.$fault="client",Object.setPrototypeOf(this,cI.prototype)}}class bI extends j{constructor(r){super({name:"ThrottlingException",$fault:"client",...r});this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,bI.prototype)}}class gI extends j{constructor(r){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...r});this.name="CidrCollectionAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,gI.prototype),this.Message=r.Message}}class _I extends j{constructor(r){super({name:"HealthCheckAlreadyExists",$fault:"client",...r});this.name="HealthCheckAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,_I.prototype)}}class xI extends j{constructor(r){super({name:"TooManyHealthChecks",$fault:"client",...r});this.name="TooManyHealthChecks",this.$fault="client",Object.setPrototypeOf(this,xI.prototype)}}class eI extends j{constructor(r){super({name:"DelegationSetNotAvailable",$fault:"client",...r});this.name="DelegationSetNotAvailable",this.$fault="client",Object.setPrototypeOf(this,eI.prototype)}}class nI extends j{constructor(r){super({name:"DelegationSetNotReusable",$fault:"client",...r});this.name="DelegationSetNotReusable",this.$fault="client",Object.setPrototypeOf(this,nI.prototype)}}class oI extends j{constructor(r){super({name:"HostedZoneAlreadyExists",$fault:"client",...r});this.name="HostedZoneAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,oI.prototype)}}class aI extends j{constructor(r){super({name:"InvalidDomainName",$fault:"client",...r});this.name="InvalidDomainName",this.$fault="client",Object.setPrototypeOf(this,aI.prototype)}}class pI extends j{constructor(r){super({name:"NoSuchDelegationSet",$fault:"client",...r});this.name="NoSuchDelegationSet",this.$fault="client",Object.setPrototypeOf(this,pI.prototype)}}class uI extends j{constructor(r){super({name:"TooManyHostedZones",$fault:"client",...r});this.name="TooManyHostedZones",this.$fault="client",Object.setPrototypeOf(this,uI.prototype)}}class tI extends j{constructor(r){super({name:"InvalidArgument",$fault:"client",...r});this.name="InvalidArgument",this.$fault="client",Object.setPrototypeOf(this,tI.prototype)}}class r2 extends j{constructor(r){super({name:"InvalidKeySigningKeyName",$fault:"client",...r});this.name="InvalidKeySigningKeyName",this.$fault="client",Object.setPrototypeOf(this,r2.prototype)}}class s2 extends j{constructor(r){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...r});this.name="KeySigningKeyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,s2.prototype)}}class f2 extends j{constructor(r){super({name:"TooManyKeySigningKeys",$fault:"client",...r});this.name="TooManyKeySigningKeys",this.$fault="client",Object.setPrototypeOf(this,f2.prototype)}}class w2 extends j{constructor(r){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...r});this.name="InsufficientCloudWatchLogsResourcePolicy",this.$fault="client",Object.setPrototypeOf(this,w2.prototype)}}class h2 extends j{constructor(r){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...r});this.name="NoSuchCloudWatchLogsLogGroup",this.$fault="client",Object.setPrototypeOf(this,h2.prototype)}}class $2 extends j{constructor(r){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...r});this.name="QueryLoggingConfigAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,$2.prototype)}}class E2 extends j{constructor(r){super({name:"DelegationSetAlreadyCreated",$fault:"client",...r});this.name="DelegationSetAlreadyCreated",this.$fault="client",Object.setPrototypeOf(this,E2.prototype)}}class I2 extends j{constructor(r){super({name:"DelegationSetAlreadyReusable",$fault:"client",...r});this.name="DelegationSetAlreadyReusable",this.$fault="client",Object.setPrototypeOf(this,I2.prototype)}}class F2 extends j{constructor(r){super({name:"HostedZoneNotFound",$fault:"client",...r});this.name="HostedZoneNotFound",this.$fault="client",Object.setPrototypeOf(this,F2.prototype)}}class U2 extends j{constructor(r){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...r});this.name="InvalidTrafficPolicyDocument",this.$fault="client",Object.setPrototypeOf(this,U2.prototype)}}class T2 extends j{constructor(r){super({name:"TooManyTrafficPolicies",$fault:"client",...r});this.name="TooManyTrafficPolicies",this.$fault="client",Object.setPrototypeOf(this,T2.prototype)}}class G2 extends j{constructor(r){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,G2.prototype)}}class C2 extends j{constructor(r){super({name:"NoSuchTrafficPolicy",$fault:"client",...r});this.name="NoSuchTrafficPolicy",this.$fault="client",Object.setPrototypeOf(this,C2.prototype)}}class L2 extends j{constructor(r){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...r});this.name="TooManyTrafficPolicyInstances",this.$fault="client",Object.setPrototypeOf(this,L2.prototype)}}class A2 extends j{constructor(r){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyInstanceAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,A2.prototype)}}class R2 extends j{constructor(r){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...r});this.name="TooManyTrafficPolicyVersionsForCurrentPolicy",this.$fault="client",Object.setPrototypeOf(this,R2.prototype)}}class W2 extends j{constructor(r){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...r});this.name="TooManyVPCAssociationAuthorizations",this.$fault="client",Object.setPrototypeOf(this,W2.prototype)}}class z2 extends j{constructor(r){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...r});this.name="KeySigningKeyInParentDSRecord",this.$fault="client",Object.setPrototypeOf(this,z2.prototype)}}class S2 extends j{constructor(r){super({name:"KeySigningKeyInUse",$fault:"client",...r});this.name="KeySigningKeyInUse",this.$fault="client",Object.setPrototypeOf(this,S2.prototype)}}class P2 extends j{constructor(r){super({name:"CidrCollectionInUseException",$fault:"client",...r});this.name="CidrCollectionInUseException",this.$fault="client",Object.setPrototypeOf(this,P2.prototype),this.Message=r.Message}}class X2 extends j{constructor(r){super({name:"HealthCheckInUse",$fault:"client",...r});this.name="HealthCheckInUse",this.$fault="client",Object.setPrototypeOf(this,X2.prototype)}}class Y2 extends j{constructor(r){super({name:"HostedZoneNotEmpty",$fault:"client",...r});this.name="HostedZoneNotEmpty",this.$fault="client",Object.setPrototypeOf(this,Y2.prototype)}}class K2 extends j{constructor(r){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...r});this.name="NoSuchQueryLoggingConfig",this.$fault="client",Object.setPrototypeOf(this,K2.prototype)}}class Z2 extends j{constructor(r){super({name:"DelegationSetInUse",$fault:"client",...r});this.name="DelegationSetInUse",this.$fault="client",Object.setPrototypeOf(this,Z2.prototype)}}class l2 extends j{constructor(r){super({name:"TrafficPolicyInUse",$fault:"client",...r});this.name="TrafficPolicyInUse",this.$fault="client",Object.setPrototypeOf(this,l2.prototype)}}class J2 extends j{constructor(r){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...r});this.name="NoSuchTrafficPolicyInstance",this.$fault="client",Object.setPrototypeOf(this,J2.prototype)}}class Q2 extends j{constructor(r){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...r});this.name="VPCAssociationAuthorizationNotFound",this.$fault="client",Object.setPrototypeOf(this,Q2.prototype)}}class M2 extends j{constructor(r){super({name:"DNSSECNotFound",$fault:"client",...r});this.name="DNSSECNotFound",this.$fault="client",Object.setPrototypeOf(this,M2.prototype)}}class B2 extends j{constructor(r){super({name:"LastVPCAssociation",$fault:"client",...r});this.name="LastVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,B2.prototype)}}class H2 extends j{constructor(r){super({name:"VPCAssociationNotFound",$fault:"client",...r});this.name="VPCAssociationNotFound",this.$fault="client",Object.setPrototypeOf(this,H2.prototype)}}class V2 extends j{constructor(r){super({name:"HostedZonePartiallyDelegated",$fault:"client",...r});this.name="HostedZonePartiallyDelegated",this.$fault="client",Object.setPrototypeOf(this,V2.prototype)}}class k2 extends j{constructor(r){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...r});this.name="KeySigningKeyWithActiveStatusNotFound",this.$fault="client",Object.setPrototypeOf(this,k2.prototype)}}class D2 extends j{constructor(r){super({name:"NoSuchChange",$fault:"client",...r});this.name="NoSuchChange",this.$fault="client",Object.setPrototypeOf(this,D2.prototype)}}class i2 extends j{constructor(r){super({name:"NoSuchGeoLocation",$fault:"client",...r});this.name="NoSuchGeoLocation",this.$fault="client",Object.setPrototypeOf(this,i2.prototype)}}class y2 extends j{constructor(r){super({name:"IncompatibleVersion",$fault:"client",...r});this.name="IncompatibleVersion",this.$fault="client",Object.setPrototypeOf(this,y2.prototype)}}class m2 extends j{constructor(r){super({name:"HostedZoneNotPrivate",$fault:"client",...r});this.name="HostedZoneNotPrivate",this.$fault="client",Object.setPrototypeOf(this,m2.prototype)}}class N2 extends j{constructor(r){super({name:"NoSuchCidrLocationException",$fault:"client",...r});this.name="NoSuchCidrLocationException",this.$fault="client",Object.setPrototypeOf(this,N2.prototype),this.Message=r.Message}}class q2 extends j{constructor(r){super({name:"InvalidPaginationToken",$fault:"client",...r});this.name="InvalidPaginationToken",this.$fault="client",Object.setPrototypeOf(this,q2.prototype)}}class v2 extends j{constructor(r){super({name:"HealthCheckVersionMismatch",$fault:"client",...r});this.name="HealthCheckVersionMismatch",this.$fault="client",Object.setPrototypeOf(this,v2.prototype)}}class j2 extends j{constructor(r){super({name:"ConflictingTypes",$fault:"client",...r});this.name="ConflictingTypes",this.$fault="client",Object.setPrototypeOf(this,j2.prototype)}}var eQ=async(r,f)=>{const s=O.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()},nQ=async(r,f)=>{const s=O.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=Vr;const $=new V(Ta);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)$.c(V.of(Ua,r[Ur]).n(Ur));if(r[Rr]!=null)$.c(p$(r[Rr],f).n(Rr));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},oQ=async(r,f)=>{const s=O.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=Vr;const $=new V(Aa);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.lc(r,"Changes","Changes",()=>on(r[mH],f)),r[d2]!=null)$.c(V.of(d2,String(r[d2])).n(d2));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},aQ=async(r,f)=>{const s=O.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=Vr;const $=new V(Qa);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[c2]!=null)$.c(xn(r[c2],f).n(c2));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},pQ=async(r,f)=>{const s=O.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=Vr;const $=new V(Ma);return $.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.lc(r,"AddTags","AddTags",()=>Uo(r[Fa],f)),$.lc(r,"RemoveTagKeys","RemoveTagKeys",()=>Fo(r[wp],f)),h+=$.toString(),s.m("POST").h(w).b(h),s.build()},uQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/cidrcollection");let h;h=Vr;const $=new V(Ra);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Pr]!=null)$.c(V.of(Ka,r[Pr]).n(Pr));if(r[n]!=null)$.c(V.of(Za,r[n]).n(n));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},tQ=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/healthcheck");let h;h=Vr;const $=new V(Wa);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Pr]!=null)$.c(V.of(Oa,r[Pr]).n(Pr));if(r[ew]!=null)$.c(so(r[ew],f).n(ew));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},rM=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone");let h;h=Vr;const $=new V(za);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Pr]!=null)$.c(V.of(O6,r[Pr]).n(Pr));if(r[g2]!=null)$.c(V.of(E0,r[g2]).n(g2));if(r[_2]!=null)$.c(fo(r[_2],f).n(_2));if(r[n]!=null)$.c(V.of(Rf,r[n]).n(n));if(r[Rr]!=null)$.c(p$(r[Rr],f).n(Rr));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},sM=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/keysigningkey");let h;h=Vr;const $=new V(Sa);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Pr]!=null)$.c(V.of(O6,r[Pr]).n(Pr));if(r[sr]!=null)$.c(V.of(E0,r[sr]).n(sr));if(r[tG]!=null)$.c(V.of(Ip,r[tG]).n(tG));if(r[n]!=null)$.c(V.of(Ep,r[n]).n(n));if(r[$s]!=null)$.c(V.of(Fp,r[$s]).n($s));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},fM=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/queryloggingconfig");let h;h=Vr;const $=new V(la);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.cc(r,b2),r[sr]!=null)$.c(V.of(E0,r[sr]).n(sr));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},wM=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/delegationset");let h;h=Vr;const $=new V(Ja);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Pr]!=null)$.c(V.of(O6,r[Pr]).n(Pr));if(r[sr]!=null)$.c(V.of(E0,r[sr]).n(sr));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},hM=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicy");let h;h=Vr;const $=new V(Ha);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)$.c(V.of(b6,r[Ur]).n(Ur));if(r[H0]!=null)$.c(V.of(vH,r[H0]).n(H0));if(r[n]!=null)$.c(V.of(Lp,r[n]).n(n));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},$M=async(r,f)=>{const s=O.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicyinstance");let h;h=Vr;const $=new V(Ba);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[sr]!=null)$.c(V.of(E0,r[sr]).n(sr));if(r[n]!=null)$.c(V.of(Rf,r[n]).n(n));if(r[vr]!=null)$.c(V.of(vr,String(r[vr])).n(vr));if($.cc(r,f1),r[bs]!=null)$.c(V.of(bs,String(r[bs])).n(bs));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},EM=async(r,f)=>{const s=O.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=Vr;const $=new V(Va);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)$.c(V.of(b6,r[Ur]).n(Ur));if(r[H0]!=null)$.c(V.of(vH,r[H0]).n(H0));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},IM=async(r,f)=>{const s=O.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=Vr;const $=new V(ka);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Rr]!=null)$.c(p$(r[Rr],f).n(Rr));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},FM=async(r,f)=>{const s=O.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()},UM=async(r,f)=>{const s=O.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()},TM=async(r,f)=>{const s=O.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()},GM=async(r,f)=>{const s=O.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()},CM=async(r,f)=>{const s=O.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()},LM=async(r,f)=>{const s=O.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()},AM=async(r,f)=>{const s=O.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()},RM=async(r,f)=>{const s=O.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()},WM=async(r,f)=>{const s=O.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()},zM=async(r,f)=>{const s=O.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=Vr;const $=new V(ia);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Rr]!=null)$.c(p$(r[Rr],f).n(Rr));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},SM=async(r,f)=>{const s=O.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()},PM=async(r,f)=>{const s=O.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=Vr;const $=new V(ma);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)$.c(V.of(ya,r[Ur]).n(Ur));if(r[Rr]!=null)$.c(p$(r[Rr],f).n(Rr));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},XM=async(r,f)=>{const s=O.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()},YM=async(r,f)=>{const s=O.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()},KM=async(r,f)=>{const s=O.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()},ZM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/checkeripranges");let h;return s.m("GET").h(w).b(h),s.build()},lM=async(r,f)=>{const s=O.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()},JM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/geolocation");const h=P({[Yp]:[,r[h0]],[Kp]:[,r[$0]],[ip]:[,r[I0]]});let $;return s.m("GET").h(w).q(h).b($),s.build()},QM=async(r,f)=>{const s=O.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()},MM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheckcount");let h;return s.m("GET").h(w).b(h),s.build()},BM=async(r,f)=>{const s=O.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()},HM=async(r,f)=>{const s=O.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()},VM=async(r,f)=>{const s=O.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()},kM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzonecount");let h;return s.m("GET").h(w).b(h),s.build()},DM=async(r,f)=>{const s=O.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()},iM=async(r,f)=>{const s=O.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()},yM=async(r,f)=>{const s=O.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()},mM=async(r,f)=>{const s=O.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()},NM=async(r,f)=>{const s=O.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()},qM=async(r,f)=>{const s=O.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()},vM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstancecount");let h;return s.m("GET").h(w).b(h),s.build()},jM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),s.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=P({[F0]:[,r[pr]],[h1]:[,r[Xr]],[fE]:[()=>r.MaxResults!==void 0,()=>r[rE].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},dM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/cidrcollection");const h=P({[h1]:[,r[Xr]],[fE]:[()=>r.MaxResults!==void 0,()=>r[rE].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},OM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/cidrcollection/{CollectionId}"),s.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=P({[h1]:[,r[Xr]],[fE]:[()=>r.MaxResults!==void 0,()=>r[rE].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},cM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/geolocations");const h=P({[yp]:[,r[hp]],[mp]:[,r[$p]],[Np]:[,r[Cp]],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},bM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheck");const h=P({[g6]:[,r[gs]],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},gM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone");const h=P({[g6]:[,r[gs]],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()],[Zp]:[,r[g2]],[Mp]:[,r[ga]]});let $;return s.m("GET").h(w).q(h).b($),s.build()},_M=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzonesbyname");const h=P({[lp]:[,r[Rf]],[sE]:[,r[sr]],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},xM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzonesbyvpc");const h=P({[dp]:[,y(r[o$],"VPCId")],[cp]:[,y(r[a$],"VPCRegion")],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()],[h1]:[,r[Xr]]});let $;return s.m("GET").h(w).q(h).b($),s.build()},eM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/queryloggingconfig");const h=P({[sE]:[,r[sr]],[h1]:[,r[Xr]],[fE]:[()=>r.MaxResults!==void 0,()=>r[rE].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},nM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=P({[Hp]:[,r[Tp]],[qp]:[,r[Gp]],[Bp]:[,r[Up]],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},oM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/delegationset");const h=P({[g6]:[,r[gs]],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},aM=async(r,f)=>{const s=O.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()},pM=async(r,f)=>{const s=O.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=Vr;const $=new V(xa);return $.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.lc(r,"ResourceIds","ResourceIds",()=>To(r[aa],f)),h+=$.toString(),s.m("POST").h(w).b(h),s.build()},uM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicies");const h=P({[vp]:[,r[t2]],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},tM=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstances");const h=P({[sE]:[,r[Tw]],[_6]:[,r[_s]],[x6]:[,r[xs]],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},rB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstances/hostedzone");const h=P({[jH]:[,y(r[sr],"HostedZoneId")],[_6]:[,r[_s]],[x6]:[,r[xs]],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},sB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");const h=P({[jH]:[,y(r[f1],"TrafficPolicyId")],[Op]:[y(r.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>r[bs].toString()],[sE]:[,r[Tw]],[_6]:[,r[_s]],[x6]:[,r[xs]],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},fB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicies/{Id}/versions"),s.p("Id",()=>r.Id,"{Id}",!1);const h=P({[jp]:[,r[rF]],[ns]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},wB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=P({[h1]:[,r[Xr]],[fE]:[()=>r.MaxResults!==void 0,()=>r[rE].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},hB=async(r,f)=>{const s=O.requestBuilder(r,f),w={};s.bp("/2013-04-01/testdnsanswer");const h=P({[sE]:[,y(r[sr],"HostedZoneId")],[Vp]:[,y(r[a2],"RecordName")],[kp]:[,y(r[p2],"RecordType")],[Dp]:[,r[oa]],[Jp]:[,r[Na]],[Qp]:[,r[qa]]});let $;return s.m("GET").h(w).q(h).b($),s.build()},$B=async(r,f)=>{const s=O.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=Vr;const $=new V(Wp);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[w0]!=null)$.c(JH(r[w0],f).n(w0));if($.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>QH(r[Nw],f)),r[Uf]!=null)$.c(V.of(Uf,String(r[Uf])).n(Uf));if(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));if($.cc(r,c$),r[jw]!=null)$.c(V.of(jw,String(r[jw])).n(jw));if(r[Cf]!=null)$.c(V.of(Cf,String(r[Cf])).n(Cf));if($.cc(r,Gw),$.cc(r,_$),r[Lf]!=null)$.c(V.of(Lf,String(r[Lf])).n(Lf));if(r[Af]!=null)$.c(V.of(Af,String(r[Af])).n(Af));return $.lc(r,"Regions","Regions",()=>MH(r[qw],f)),$.lc(r,"ResetElements","ResetElements",()=>wo(r[na],f)),$.cc(r,x$),$.cc(r,n$),h+=$.toString(),s.m("POST").h(w).b(h),s.build()},EB=async(r,f)=>{const s=O.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=Vr;const $=new V(zp);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)$.c(V.of(c6,r[Ur]).n(Ur));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},IB=async(r,f)=>{const s=O.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=Vr;const $=new V(Sp);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ur]!=null)$.c(V.of(b6,r[Ur]).n(Ur));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},FB=async(r,f)=>{const s=O.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=Vr;const $=new V(Pp);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[vr]!=null)$.c(V.of(vr,String(r[vr])).n(vr));if($.cc(r,f1),r[bs]!=null)$.c(V.of(bs,String(r[bs])).n(bs));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},UB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);return s},TB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);return s},GB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Gr]!=null)s[Gr]=T(w[Gr]);return s},CB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);return s},LB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)});return await xr(r.body,f),s},AB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r),[i0]:[,r.headers[F0]]}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[dG]!=null)s[dG]=So(w[dG],f);return s},RB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r),[i0]:[,r.headers[F0]]}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Wf]!=null)s[Wf]=hF(w[Wf],f);return s},WB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r),[i0]:[,r.headers[F0]]}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);if(w[Ls]!=null)s[Ls]=u$(w[Ls],f);if(w[Ys]!=null)s[Ys]=$F(w[Ys],f);if(w[Rr]!=null)s[Rr]=d6(w[Rr],f);return s},zB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r),[i0]:[,r.headers[F0]]}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);if(w[r6]!=null)s[r6]=kH(w[r6],f);return s},SB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r),[i0]:[,r.headers[F0]]}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Cw]!=null)s[Cw]=v6(w[Cw],f);return s},PB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r),[i0]:[,r.headers[F0]]}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Ls]!=null)s[Ls]=u$(w[Ls],f);return s},XB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r),[i0]:[,r.headers[F0]]}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[As]!=null)s[As]=t$(w[As],f);return s},YB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r),[i0]:[,r.headers[F0]]}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Es]!=null)s[Es]=EF(w[Es],f);return s},KB=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r),[i0]:[,r.headers[F0]]}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[As]!=null)s[As]=t$(w[As],f);return s},ZB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[sr]!=null)s[sr]=T(w[sr]);if(w[Rr]!=null)s[Rr]=d6(w[Rr],f);return s},lB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);return s},JB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)});return await xr(r.body,f),s},QB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)});return await xr(r.body,f),s},MB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);return s},BB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);return s},HB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)});return await xr(r.body,f),s},VB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)});return await xr(r.body,f),s},kB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)});return await xr(r.body,f),s},DB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)});return await xr(r.body,f),s},iB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)});return await xr(r.body,f),s},yB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);return s},mB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);return s},NB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);return s},qB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[B0]!=null)s[B0]=er(w[B0]);if(w[V0]!=null)s[V0]=Go(w[V0],f);return s},vB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[wr]!=null)s[wr]=es(w[wr],f);return s},jB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.CheckerIpRanges==="")s[J$]=[];else if(w[J$]!=null&&w[J$][zf]!=null)s[J$]=Ao(Cr(w[J$][zf]),f);return s},dB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.KeySigningKeys==="")s[D$]=[];else if(w[D$]!=null&&w[D$][zf]!=null)s[D$]=bo(Cr(w[D$][zf]),f);if(w[$s]!=null)s[$s]=Bo(w[$s],f);return s},OB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[b$]!=null)s[b$]=BH(w[b$],f);return s},cB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Wf]!=null)s[Wf]=hF(w[Wf],f);return s},bB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[aG]!=null)s[aG]=er(w[aG]);return s},gB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.HealthCheckObservations==="")s[r0]=[];else if(w[r0]!=null&&w[r0][sF]!=null)s[r0]=HH(Cr(w[r0][sF]),f);return s},_B=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.HealthCheckObservations==="")s[r0]=[];else if(w[r0]!=null&&w[r0][sF]!=null)s[r0]=HH(Cr(w[r0][sF]),f);return s},xB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Ls]!=null)s[Ls]=u$(w[Ls],f);if(w[Ys]!=null)s[Ys]=$F(w[Ys],f);if(w.VPCs==="")s[f0]=[];else if(w[f0]!=null&&w[f0][Rr]!=null)s[f0]=yH(Cr(w[f0][Rr]),f);return s},eB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[pG]!=null)s[pG]=er(w[pG]);return s},nB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[B0]!=null)s[B0]=er(w[B0]);if(w[V0]!=null)s[V0]=vo(w[V0],f);return s},oB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Cw]!=null)s[Cw]=v6(w[Cw],f);return s},aB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Ls]!=null)s[Ls]=u$(w[Ls],f);return s},pB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[B0]!=null)s[B0]=er(w[B0]);if(w[V0]!=null)s[V0]=to(w[V0],f);return s},uB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[As]!=null)s[As]=t$(w[As],f);return s},tB=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Es]!=null)s[Es]=EF(w[Es],f);return s},rH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[y6]!=null)s[y6]=$r(w[y6]);return s},sH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.CidrBlocks==="")s[Z$]=[];else if(w[Z$]!=null&&w[Z$][zf]!=null)s[Z$]=Wo(Cr(w[Z$][zf]),f);if(w[Xr]!=null)s[Xr]=T(w[Xr]);return s},fH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.CidrCollections==="")s[l$]=[];else if(w[l$]!=null&&w[l$][zf]!=null)s[l$]=Yo(Cr(w[l$][zf]),f);if(w[Xr]!=null)s[Xr]=T(w[Xr]);return s},wH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.CidrLocations==="")s[Q$]=[];else if(w[Q$]!=null&&w[Q$][zf]!=null)s[Q$]=go(Cr(w[Q$][zf]),f);if(w[Xr]!=null)s[Xr]=T(w[Xr]);return s},hH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.GeoLocationDetailsList==="")s[H$]=[];else if(w[H$]!=null&&w[H$][b$]!=null)s[H$]=ko(Cr(w[H$][b$]),f);if(w[Tr]!=null)s[Tr]=mr(w[Tr]);if(w[a]!=null)s[a]=$r(w[a]);if(w[$6]!=null)s[$6]=T(w[$6]);if(w[E6]!=null)s[E6]=T(w[E6]);if(w[C6]!=null)s[C6]=T(w[C6]);return s},$H=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.HealthChecks==="")s[V$]=[];else if(w[V$]!=null&&w[V$][Wf]!=null)s[V$]=No(Cr(w[V$][Wf]),f);if(w[Tr]!=null)s[Tr]=mr(w[Tr]);if(w[gs]!=null)s[gs]=T(w[gs]);if(w[a]!=null)s[a]=$r(w[a]);if(w[k0]!=null)s[k0]=T(w[k0]);return s},EH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.HostedZones==="")s[s0]=[];else if(w[s0]!=null&&w[s0][Ys]!=null)s[s0]=VH(Cr(w[s0][Ys]),f);if(w[Tr]!=null)s[Tr]=mr(w[Tr]);if(w[gs]!=null)s[gs]=T(w[gs]);if(w[a]!=null)s[a]=$r(w[a]);if(w[k0]!=null)s[k0]=T(w[k0]);return s},IH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Rf]!=null)s[Rf]=T(w[Rf]);if(w[sr]!=null)s[sr]=T(w[sr]);if(w.HostedZones==="")s[s0]=[];else if(w[s0]!=null&&w[s0][Ys]!=null)s[s0]=VH(Cr(w[s0][Ys]),f);if(w[Tr]!=null)s[Tr]=mr(w[Tr]);if(w[a]!=null)s[a]=$r(w[a]);if(w[I6]!=null)s[I6]=T(w[I6]);if(w[F6]!=null)s[F6]=T(w[F6]);return s},FH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.HostedZoneSummaries==="")s[k$]=[];else if(w[k$]!=null&&w[k$][cQ]!=null)s[k$]=Oo(Cr(w[k$][cQ]),f);if(w[a]!=null)s[a]=$r(w[a]);if(w[Xr]!=null)s[Xr]=T(w[Xr]);return s},UH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Xr]!=null)s[Xr]=T(w[Xr]);if(w.QueryLoggingConfigs==="")s[y$]=[];else if(w[y$]!=null&&w[y$][Cw]!=null)s[y$]=xo(Cr(w[y$][Cw]),f);return s},TH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Tr]!=null)s[Tr]=mr(w[Tr]);if(w[a]!=null)s[a]=$r(w[a]);if(w[U6]!=null)s[U6]=T(w[U6]);if(w[T6]!=null)s[T6]=T(w[T6]);if(w[G6]!=null)s[G6]=T(w[G6]);if(w.ResourceRecordSets==="")s[N$]=[];else if(w[N$]!=null&&w[N$][th]!=null)s[N$]=po(Cr(w[N$][th]),f);return s},GH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.DelegationSets==="")s[M$]=[];else if(w[M$]!=null&&w[M$][Ls]!=null)s[M$]=Jo(Cr(w[M$][Ls]),f);if(w[Tr]!=null)s[Tr]=mr(w[Tr]);if(w[gs]!=null)s[gs]=T(w[gs]);if(w[a]!=null)s[a]=$r(w[a]);if(w[k0]!=null)s[k0]=T(w[k0]);return s},CH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[e$]!=null)s[e$]=iH(w[e$],f);return s},LH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w.ResourceTagSets==="")s[q$]=[];else if(w[q$]!=null&&w[q$][e$]!=null)s[q$]=uo(Cr(w[q$][e$]),f);return s},AH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Tr]!=null)s[Tr]=mr(w[Tr]);if(w[a]!=null)s[a]=$r(w[a]);if(w[t2]!=null)s[t2]=T(w[t2]);if(w.TrafficPolicySummaries==="")s[v$]=[];else if(w[v$]!=null&&w[v$][xQ]!=null)s[v$]=ha(Cr(w[v$][xQ]),f);return s},RH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Tw]!=null)s[Tw]=T(w[Tw]);if(w[Tr]!=null)s[Tr]=mr(w[Tr]);if(w[a]!=null)s[a]=$r(w[a]);if(w[_s]!=null)s[_s]=T(w[_s]);if(w[xs]!=null)s[xs]=T(w[xs]);if(w.TrafficPolicyInstances==="")s[hs]=[];else if(w[hs]!=null&&w[hs][Es]!=null)s[hs]=j6(Cr(w[hs][Es]),f);return s},WH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Tr]!=null)s[Tr]=mr(w[Tr]);if(w[a]!=null)s[a]=$r(w[a]);if(w[_s]!=null)s[_s]=T(w[_s]);if(w[xs]!=null)s[xs]=T(w[xs]);if(w.TrafficPolicyInstances==="")s[hs]=[];else if(w[hs]!=null&&w[hs][Es]!=null)s[hs]=j6(Cr(w[hs][Es]),f);return s},zH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Tw]!=null)s[Tw]=T(w[Tw]);if(w[Tr]!=null)s[Tr]=mr(w[Tr]);if(w[a]!=null)s[a]=$r(w[a]);if(w[_s]!=null)s[_s]=T(w[_s]);if(w[xs]!=null)s[xs]=T(w[xs]);if(w.TrafficPolicyInstances==="")s[hs]=[];else if(w[hs]!=null&&w[hs][Es]!=null)s[hs]=j6(Cr(w[hs][Es]),f);return s},SH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Tr]!=null)s[Tr]=mr(w[Tr]);if(w[a]!=null)s[a]=$r(w[a]);if(w.TrafficPolicies==="")s[j$]=[];else if(w[j$]!=null&&w[j$][As]!=null)s[j$]=wa(Cr(w[j$][As]),f);if(w[rF]!=null)s[rF]=T(w[rF]);return s},PH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[sr]!=null)s[sr]=T(w[sr]);if(w[Xr]!=null)s[Xr]=T(w[Xr]);if(w.VPCs==="")s[f0]=[];else if(w[f0]!=null&&w[f0][Rr]!=null)s[f0]=yH(Cr(w[f0][Rr]),f);return s},XH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[L6]!=null)s[L6]=T(w[L6]);if(w[X6]!=null)s[X6]=T(w[X6]);if(w.RecordData==="")s[m$]=[];else if(w[m$]!=null&&w[m$][gQ]!=null)s[m$]=eo(Cr(w[m$][gQ]),f);if(w[a2]!=null)s[a2]=T(w[a2]);if(w[p2]!=null)s[p2]=T(w[p2]);if(w[Y6]!=null)s[Y6]=T(w[Y6]);return s},YH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Wf]!=null)s[Wf]=hF(w[Wf],f);return s},KH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Ys]!=null)s[Ys]=$F(w[Ys],f);return s},ZH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[As]!=null)s[As]=t$(w[As],f);return s},lH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return c(r,f);const s=P({$metadata:J(r)}),w=y(d(await g.parseXmlBody(r.body,f)),"body");if(w[Es]!=null)s[Es]=EF(w[Es],f);return s},c=async(r,f)=>{const s={...r,body:await g.parseXmlErrorBody(r.body,f)},w=g.loadRestXmlErrorCode(r,s.body);switch(w){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await De(s,f);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await rn(s,f);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await wn(s,f);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await fn(s,f);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await $n(s,f);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await Kn(s,f);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await ie(s,f);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await In(s,f);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await Ln(s,f);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await Yn(s,f);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await Qn(s,f);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await Mn(s,f);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await Bn(s,f);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await Be(s,f);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await ke(s,f);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await Rn(s,f);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await ue(s,f);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await Xn(s,f);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await Vn(s,f);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await He(s,f);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await Oe(s,f);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await kn(s,f);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await ve(s,f);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await je(s,f);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await ge(s,f);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await te(s,f);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await Sn(s,f);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await Dn(s,f);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await pe(s,f);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await sn(s,f);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await Fn(s,f);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await yn(s,f);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await ae(s,f);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await zn(s,f);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await Hn(s,f);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await me(s,f);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await Ne(s,f);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await xe(s,f);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await En(s,f);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await mn(s,f);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await jn(s,f);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await ln(s,f);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await Nn(s,f);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await dn(s,f);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await qn(s,f);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await vn(s,f);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await Un(s,f);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await Tn(s,f);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await Ve(s,f);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await ce(s,f);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await _e(s,f);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await Zn(s,f);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await qe(s,f);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await On(s,f);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await Jn(s,f);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await cn(s,f);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await de(s,f);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await Cn(s,f);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await bn(s,f);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await ne(s,f);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await Gn(s,f);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await An(s,f);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await Pn(s,f);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await oe(s,f);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await ee(s,f);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await Wn(s,f);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await hn(s,f);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await be(s,f);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await ye(s,f);default:const h=s.body;return Me({output:r,parsedBody:h.Error,errorCode:w})}},Me=cf(j),Be=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new vI({$metadata:J(r),...s});return k(h,r.body.Error)},He=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new gI({$metadata:J(r),...s});return k(h,r.body.Error)},Ve=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new P2({$metadata:J(r),...s});return k(h,r.body.Error)},ke=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new jI({$metadata:J(r),...s});return k(h,r.body.Error)},De=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new JI({$metadata:J(r),...s});return k(h,r.body.Error)},ie=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new kI({$metadata:J(r),...s});return k(h,r.body.Error)},ye=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new j2({$metadata:J(r),...s});return k(h,r.body.Error)},me=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new E2({$metadata:J(r),...s});return k(h,r.body.Error)},Ne=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new I2({$metadata:J(r),...s});return k(h,r.body.Error)},qe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new Z2({$metadata:J(r),...s});return k(h,r.body.Error)},ve=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new eI({$metadata:J(r),...s});return k(h,r.body.Error)},je=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new nI({$metadata:J(r),...s});return k(h,r.body.Error)},de=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new M2({$metadata:J(r),...s});return k(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 _I({$metadata:J(r),...s});return k(h,r.body.Error)},ce=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new X2({$metadata:J(r),...s});return k(h,r.body.Error)},be=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new v2({$metadata:J(r),...s});return k(h,r.body.Error)},ge=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new oI({$metadata:J(r),...s});return k(h,r.body.Error)},_e=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new Y2({$metadata:J(r),...s});return k(h,r.body.Error)},xe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new F2({$metadata:J(r),...s});return k(h,r.body.Error)},ee=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new m2({$metadata:J(r),...s});return k(h,r.body.Error)},ne=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new V2({$metadata:J(r),...s});return k(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 y2({$metadata:J(r),...s});return k(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 w2({$metadata:J(r),...s});return k(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 tI({$metadata:J(r),...s});return k(h,r.body.Error)},ue=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);if(w.messages==="")s[O$]=[];else if(w[O$]!=null&&w[O$][Zr]!=null)s[O$]=Ho(Cr(w[O$][Zr]),f);const h=new OI({$metadata:J(r),...s});return k(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 aI({$metadata:J(r),...s});return k(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 QI({$metadata:J(r),...s});return k(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 r2({$metadata:J(r),...s});return k(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 MI({$metadata:J(r),...s});return k(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 BI({$metadata:J(r),...s});return k(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 q2({$metadata:J(r),...s});return k(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 HI({$metadata:J(r),...s});return k(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 U2({$metadata:J(r),...s});return k(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 DI({$metadata:J(r),...s});return k(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 s2({$metadata:J(r),...s});return k(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 z2({$metadata:J(r),...s});return k(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:J(r),...s});return k(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 k2({$metadata:J(r),...s});return k(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 B2({$metadata:J(r),...s});return k(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 iI({$metadata:J(r),...s});return k(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 D2({$metadata:J(r),...s});return k(h,r.body.Error)},Rn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new dI({$metadata:J(r),...s});return k(h,r.body.Error)},Wn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Zr]!=null)s[Zr]=T(w[Zr]);const h=new N2({$metadata:J(r),...s});return k(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 h2({$metadata:J(r),...s});return k(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 pI({$metadata:J(r),...s});return k(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:J(r),...s});return k(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:J(r),...s});return k(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 yI({$metadata:J(r),...s});return k(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 VI({$metadata:J(r),...s});return k(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 K2({$metadata:J(r),...s});return k(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 C2({$metadata:J(r),...s});return k(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 J2({$metadata:J(r),...s});return k(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 mI({$metadata:J(r),...s});return k(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 NI({$metadata:J(r),...s});return k(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 qI({$metadata:J(r),...s});return k(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 $2({$metadata:J(r),...s});return k(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 bI({$metadata:J(r),...s});return k(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 xI({$metadata:J(r),...s});return k(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 uI({$metadata:J(r),...s});return k(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 f2({$metadata:J(r),...s});return k(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 T2({$metadata:J(r),...s});return k(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 L2({$metadata:J(r),...s});return k(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 R2({$metadata:J(r),...s});return k(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 W2({$metadata:J(r),...s});return k(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 G2({$metadata:J(r),...s});return k(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 A2({$metadata:J(r),...s});return k(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 l2({$metadata:J(r),...s});return k(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 Q2({$metadata:J(r),...s});return k(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 H2({$metadata:J(r),...s});return k(h,r.body.Error)},JH=(r,f)=>{const s=new V(w0);if(r[jr]!=null)s.c(V.of(Da,r[jr]).n(jr));if(r[n]!=null)s.c(V.of(Ia,r[n]).n(n));return s},gn=(r,f)=>{const s=new V(cw);if(r[sr]!=null)s.c(V.of(E0,r[sr]).n(sr));if(s.cc(r,Rf),r[nh]!=null)s.c(V.of(Ea,String(r[nh])).n(nh));return s},_n=(r,f)=>{const s=new V(NH);if(r[_h]!=null)s.c(V.of(Ga,r[_h]).n(_h));if(r[th]!=null)s.c(Eo(r[th],f).n(th));return s},xn=(r,f)=>{const s=new V(c2);if(r[Ur]!=null)s.c(V.of(c6,r[Ur]).n(Ur));return s.lc(r,"Changes","Changes",()=>en(r[mH],f)),s},en=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return _n(s,f).n(NH)})},QH=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of(g$,s).n(q6)})},nn=(r,f)=>{const s=new V(Ca);if(r[pr]!=null)s.c(V.of(Xa,r[pr]).n(pr));if(r[_h]!=null)s.c(V.of(La,r[_h]).n(_h));return s.lc(r,"CidrList","CidrList",()=>an(r[Ya],f)),s},on=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return nn(s,f).n(zf)})},an=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of(dQ,s).n(dQ)})},pn=(r,f)=>{const s=new V(bw);if(r[eh]!=null)s.c(V.of(Xp,r[eh]).n(eh));if(r[pr]!=null)s.c(V.of(Pa,r[pr]).n(pr));return s},un=(r,f)=>{const s=new V(gw);return s.cc(r,e2),s.cc(r,n2),s},tn=(r,f)=>{const s=new V(_w);if(r[h0]!=null)s.c(V.of(va,r[h0]).n(h0));if(r[$0]!=null)s.c(V.of(ja,r[$0]).n($0));if(r[I0]!=null)s.c(V.of(da,r[I0]).n(I0));return s},ro=(r,f)=>{const s=new V(xw);if(s.cc(r,O2),s.cc(r,x2),r[gw]!=null)s.c(un(r[gw],f).n(gw));if(r[vw]!=null)s.c(V.of(vw,String(r[vw])).n(vw));return s},so=(r,f)=>{const s=new V(ew);if(s.cc(r,Gw),r[Af]!=null)s.c(V.of(Af,String(r[Af])).n(Af));if(r[Ar]!=null)s.c(V.of(ba,r[Ar]).n(Ar));if(s.cc(r,x$),s.cc(r,c$),s.cc(r,n$),r[Ow]!=null)s.c(V.of(Ow,String(r[Ow])).n(Ow));if(r[Gf]!=null)s.c(V.of(Gf,String(r[Gf])).n(Gf));if(r[dw]!=null)s.c(V.of(dw,String(r[dw])).n(dw));if(r[Lf]!=null)s.c(V.of(Lf,String(r[Lf])).n(Lf));if(r[Uf]!=null)s.c(V.of(Uf,String(r[Uf])).n(Uf));if(r[Cf]!=null)s.c(V.of(Cf,String(r[Cf])).n(Cf));if(s.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>QH(r[Nw],f)),r[Tf]!=null)s.c(V.of(Tf,String(r[Tf])).n(Tf));if(s.lc(r,"Regions","Regions",()=>MH(r[qw],f)),r[w0]!=null)s.c(JH(r[w0],f).n(w0));return s.cc(r,_$),s.cc(r,o2),s},MH=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of(ca,s).n(jr)})},fo=(r,f)=>{const s=new V(_2);if(r[Ur]!=null)s.c(V.of(c6,r[Ur]).n(Ur));if(r[uh]!=null)s.c(V.of(_a,String(r[uh])).n(uh));return s},wo=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of(_Q,s).n(_Q)})},ho=(r,f)=>{const s=new V(fF);if(r[Yr]!=null)s.c(V.of(ea,r[Yr]).n(Yr));return s},$o=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return ho(s,f).n(fF)})},Eo=(r,f)=>{const s=new V(th);if(r[n]!=null)s.c(V.of(Rf,r[n]).n(n));if(r[Ar]!=null)s.c(V.of(fp,r[Ar]).n(Ar));if(r[r1]!=null)s.c(V.of(ua,r[r1]).n(r1));if(r[w1]!=null)s.c(V.of(sp,String(r[w1])).n(w1));if(r[jr]!=null)s.c(V.of(rp,r[jr]).n(jr));if(r[_w]!=null)s.c(tn(r[_w],f).n(_w));if(r[oh]!=null)s.c(V.of(pa,r[oh]).n(oh));if(r[ph]!=null)s.c(V.of(ta,String(r[ph])).n(ph));if(r[vr]!=null)s.c(V.of(vr,String(r[vr])).n(vr));if(s.lc(r,"ResourceRecords","ResourceRecords",()=>$o(r[gh],f)),r[cw]!=null)s.c(gn(r[cw],f).n(cw));if(s.cc(r,g$),s.cc(r,u2),r[bw]!=null)s.c(pn(r[bw],f).n(bw));if(r[xw]!=null)s.c(ro(r[xw],f).n(xw));return s},Io=(r,f)=>{const s=new V(wF);if(r[nw]!=null)s.c(V.of(qH,r[nw]).n(nw));if(r[Yr]!=null)s.c(V.of(Rp,r[Yr]).n(Yr));return s},Fo=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of(qH,s).n(nw)})},Uo=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return Io(s,f).n(wF)})},To=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of(Ap,s).n(E0)})},p$=(r,f)=>{const s=new V(Rr);return s.cc(r,a$),s.cc(r,o$),s},Go=(r,f)=>{const s={};if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[Yr]!=null)s[Yr]=er(r[Yr]);return s},Co=(r,f)=>{const s={};if(r[jr]!=null)s[jr]=T(r[jr]);if(r[n]!=null)s[n]=T(r[n]);return s},Lo=(r,f)=>{const s={};if(r[sr]!=null)s[sr]=T(r[sr]);if(r[Rf]!=null)s[Rf]=T(r[Rf]);if(r[nh]!=null)s[nh]=mr(r[nh]);return s},es=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[$s]!=null)s[$s]=T(r[$s]);if(r[l6]!=null)s[l6]=y(Hw(r[l6]));if(r[Ur]!=null)s[Ur]=T(r[Ur]);return s},Ao=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},Ro=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},Wo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return zo(s,f)})},zo=(r,f)=>{const s={};if(r[iG]!=null)s[iG]=T(r[iG]);if(r[pr]!=null)s[pr]=T(r[pr]);return s},So=(r,f)=>{const s={};if(r[xh]!=null)s[xh]=T(r[xh]);if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[n]!=null)s[n]=T(r[n]);if(r[D0]!=null)s[D0]=er(r[D0]);return s},Po=(r,f)=>{const s={};if(r[eh]!=null)s[eh]=T(r[eh]);if(r[pr]!=null)s[pr]=T(r[pr]);return s},Xo=(r,f)=>{const s={};if(r[nG]!=null)s[nG]=$r(r[nG]);if(r[N6]!=null)s[N6]=sY(r[N6]);if(r[qG]!=null)s[qG]=T(r[qG]);if(r[P6]!=null)s[P6]=$r(r[P6]);if(r[h6]!=null)s[h6]=T(r[h6]);if(r[A6]!=null)s[A6]=T(r[A6]);if(r[k6]!=null)s[k6]=T(r[k6]);if(r.Dimensions==="")s[B$]=[];else if(r[B$]!=null&&r[B$][OQ]!=null)s[B$]=Mo(Cr(r[B$][OQ]),f);return s},Yo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Ko(s,f)})},Ko=(r,f)=>{const s={};if(r[xh]!=null)s[xh]=T(r[xh]);if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[n]!=null)s[n]=T(r[n]);if(r[D0]!=null)s[D0]=er(r[D0]);return s},Zo=(r,f)=>{const s={};if(r[e2]!=null)s[e2]=T(r[e2]);if(r[n2]!=null)s[n2]=T(r[n2]);return s},u$=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[Pr]!=null)s[Pr]=T(r[Pr]);if(r.NameServers==="")s[i$]=[];else if(r[i$]!=null&&r[i$][bQ]!=null)s[i$]=lo(Cr(r[i$][bQ]),f);return s},lo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},Jo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return u$(s,f)})},Qo=(r,f)=>{const s={};if(r[n]!=null)s[n]=T(r[n]);if(r[Yr]!=null)s[Yr]=T(r[Yr]);return s},Mo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Qo(s,f)})},Bo=(r,f)=>{const s={};if(r[V6]!=null)s[V6]=T(r[V6]);if(r[s1]!=null)s[s1]=T(r[s1]);return s},Ho=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},Vo=(r,f)=>{const s={};if(r[h0]!=null)s[h0]=T(r[h0]);if(r[$0]!=null)s[$0]=T(r[$0]);if(r[I0]!=null)s[I0]=T(r[I0]);return s},BH=(r,f)=>{const s={};if(r[h0]!=null)s[h0]=T(r[h0]);if(r[mG]!=null)s[mG]=T(r[mG]);if(r[$0]!=null)s[$0]=T(r[$0]);if(r[NG]!=null)s[NG]=T(r[NG]);if(r[I0]!=null)s[I0]=T(r[I0]);if(r[M6]!=null)s[M6]=T(r[M6]);return s},ko=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return BH(s,f)})},Do=(r,f)=>{const s={};if(r[O2]!=null)s[O2]=T(r[O2]);if(r[x2]!=null)s[x2]=T(r[x2]);if(r[gw]!=null)s[gw]=Zo(r[gw],f);if(r[vw]!=null)s[vw]=$r(r[vw]);return s},hF=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[Pr]!=null)s[Pr]=T(r[Pr]);if(r[ah]!=null)s[ah]=DH(r[ah],f);if(r[ew]!=null)s[ew]=io(r[ew],f);if(r[jw]!=null)s[jw]=er(r[jw]);if(r[jG]!=null)s[jG]=Xo(r[jG],f);return s},io=(r,f)=>{const s={};if(r[Gw]!=null)s[Gw]=T(r[Gw]);if(r[Af]!=null)s[Af]=$r(r[Af]);if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[x$]!=null)s[x$]=T(r[x$]);if(r[c$]!=null)s[c$]=T(r[c$]);if(r[n$]!=null)s[n$]=T(r[n$]);if(r[Ow]!=null)s[Ow]=$r(r[Ow]);if(r[Gf]!=null)s[Gf]=$r(r[Gf]);if(r[dw]!=null)s[dw]=mr(r[dw]);if(r[Lf]!=null)s[Lf]=mr(r[Lf]);if(r[Uf]!=null)s[Uf]=mr(r[Uf]);if(r[Cf]!=null)s[Cf]=$r(r[Cf]);if(r.ChildHealthChecks==="")s[Nw]=[];else if(r[Nw]!=null&&r[Nw][q6]!=null)s[Nw]=Ro(Cr(r[Nw][q6]),f);if(r[Tf]!=null)s[Tf]=mr(r[Tf]);if(r.Regions==="")s[qw]=[];else if(r[qw]!=null&&r[qw][jr]!=null)s[qw]=mo(Cr(r[qw][jr]),f);if(r[w0]!=null)s[w0]=Co(r[w0],f);if(r[_$]!=null)s[_$]=T(r[_$]);if(r[o2]!=null)s[o2]=T(r[o2]);return s},yo=(r,f)=>{const s={};if(r[jr]!=null)s[jr]=T(r[jr]);if(r[Gw]!=null)s[Gw]=T(r[Gw]);if(r[H6]!=null)s[H6]=ra(r[H6],f);return s},HH=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return yo(s,f)})},mo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},No=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return hF(s,f)})},$F=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[n]!=null)s[n]=T(r[n]);if(r[Pr]!=null)s[Pr]=T(r[Pr]);if(r[OG]!=null)s[OG]=qo(r[OG],f);if(r[K6]!=null)s[K6]=er(r[K6]);if(r[ah]!=null)s[ah]=DH(r[ah],f);return s},qo=(r,f)=>{const s={};if(r[Ur]!=null)s[Ur]=T(r[Ur]);if(r[uh]!=null)s[uh]=mr(r[uh]);return s},vo=(r,f)=>{const s={};if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[Yr]!=null)s[Yr]=er(r[Yr]);return s},jo=(r,f)=>{const s={};if(r[W6]!=null)s[W6]=T(r[W6]);if(r[z6]!=null)s[z6]=T(r[z6]);return s},VH=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return $F(s,f)})},Oo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return co(s,f)})},co=(r,f)=>{const s={};if(r[sr]!=null)s[sr]=T(r[sr]);if(r[n]!=null)s[n]=T(r[n]);if(r[R6]!=null)s[R6]=jo(r[R6],f);return s},kH=(r,f)=>{const s={};if(r[n]!=null)s[n]=T(r[n]);if(r[uG]!=null)s[uG]=T(r[uG]);if(r[oG]!=null)s[oG]=$r(r[oG]);if(r[J6]!=null)s[J6]=T(r[J6]);if(r[Q6]!=null)s[Q6]=$r(r[Q6]);if(r[cG]!=null)s[cG]=T(r[cG]);if(r[bG]!=null)s[bG]=$r(r[bG]);if(r[s6]!=null)s[s6]=$r(r[s6]);if(r[xG]!=null)s[xG]=T(r[xG]);if(r[S6]!=null)s[S6]=T(r[S6]);if(r[_G]!=null)s[_G]=T(r[_G]);if(r[gG]!=null)s[gG]=T(r[gG]);if(r[$s]!=null)s[$s]=T(r[$s]);if(r[s1]!=null)s[s1]=T(r[s1]);if(r[yG]!=null)s[yG]=y(Hw(r[yG]));if(r[f6]!=null)s[f6]=y(Hw(r[f6]));return s},bo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return kH(s,f)})},DH=(r,f)=>{const s={};if(r[B6]!=null)s[B6]=T(r[B6]);if(r[eG]!=null)s[eG]=T(r[eG]);return s},go=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return _o(s,f)})},_o=(r,f)=>{const s={};if(r[pr]!=null)s[pr]=T(r[pr]);return s},v6=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[sr]!=null)s[sr]=T(r[sr]);if(r[b2]!=null)s[b2]=T(r[b2]);return s},xo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return v6(s,f)})},eo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},no=(r,f)=>{const s={};if(r[Yr]!=null)s[Yr]=T(r[Yr]);return s},oo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return no(s,f)})},ao=(r,f)=>{const s={};if(r[n]!=null)s[n]=T(r[n]);if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[r1]!=null)s[r1]=T(r[r1]);if(r[w1]!=null)s[w1]=er(r[w1]);if(r[jr]!=null)s[jr]=T(r[jr]);if(r[_w]!=null)s[_w]=Vo(r[_w],f);if(r[oh]!=null)s[oh]=T(r[oh]);if(r[ph]!=null)s[ph]=mr(r[ph]);if(r[vr]!=null)s[vr]=er(r[vr]);if(r.ResourceRecords==="")s[gh]=[];else if(r[gh]!=null&&r[gh][fF]!=null)s[gh]=oo(Cr(r[gh][fF]),f);if(r[cw]!=null)s[cw]=Lo(r[cw],f);if(r[g$]!=null)s[g$]=T(r[g$]);if(r[u2]!=null)s[u2]=T(r[u2]);if(r[bw]!=null)s[bw]=Po(r[bw],f);if(r[xw]!=null)s[xw]=Do(r[xw],f);return s},po=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return ao(s,f)})},iH=(r,f)=>{const s={};if(r[Z6]!=null)s[Z6]=T(r[Z6]);if(r[E0]!=null)s[E0]=T(r[E0]);if(r.Tags==="")s[d$]=[];else if(r[d$]!=null&&r[d$][wF]!=null)s[d$]=fa(Cr(r[d$][wF]),f);return s},uo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return iH(s,f)})},to=(r,f)=>{const s={};if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[Yr]!=null)s[Yr]=er(r[Yr]);return s},ra=(r,f)=>{const s={};if(r[$s]!=null)s[$s]=T(r[$s]);if(r[vG]!=null)s[vG]=y(Hw(r[vG]));return s},sa=(r,f)=>{const s={};if(r[nw]!=null)s[nw]=T(r[nw]);if(r[Yr]!=null)s[Yr]=T(r[Yr]);return s},fa=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return sa(s,f)})},wa=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return t$(s,f)})},t$=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[D0]!=null)s[D0]=$r(r[D0]);if(r[n]!=null)s[n]=T(r[n]);if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[H0]!=null)s[H0]=T(r[H0]);if(r[Ur]!=null)s[Ur]=T(r[Ur]);return s},EF=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[sr]!=null)s[sr]=T(r[sr]);if(r[n]!=null)s[n]=T(r[n]);if(r[vr]!=null)s[vr]=er(r[vr]);if(r[D6]!=null)s[D6]=T(r[D6]);if(r[Zr]!=null)s[Zr]=T(r[Zr]);if(r[f1]!=null)s[f1]=T(r[f1]);if(r[bs]!=null)s[bs]=$r(r[bs]);if(r[m6]!=null)s[m6]=T(r[m6]);return s},j6=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return EF(s,f)})},ha=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return $a(s,f)})},$a=(r,f)=>{const s={};if(r[Gr]!=null)s[Gr]=T(r[Gr]);if(r[n]!=null)s[n]=T(r[n]);if(r[Ar]!=null)s[Ar]=T(r[Ar]);if(r[w6]!=null)s[w6]=$r(r[w6]);if(r[i6]!=null)s[i6]=$r(r[i6]);return s},d6=(r,f)=>{const s={};if(r[a$]!=null)s[a$]=T(r[a$]);if(r[o$]!=null)s[o$]=T(r[o$]);return s},yH=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return d6(s,f)})},J=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var _h="Action",Ea="AliasHealthEnabled",w0="AlarmIdentifier",Ia="AlarmName",Fa="AddTags",cw="AliasTarget",Ua="AssociateVPCComment",Ta="AssociateVPCWithHostedZoneRequest",O2="AWSRegion",xh="Arn",vw="Bias",Ur="Comment",Ga="ChangeAction",c2="ChangeBatch",Z$="CidrBlocks",iG="CidrBlock",h0="ContinentCode",Ca="CidrCollectionChange",La="CidrCollectionChangeAction",Aa="ChangeCidrCollectionRequest",Ra="CreateCidrCollectionRequest",l$="CidrCollections",$0="CountryCode",yG="CreatedDate",Nw="ChildHealthChecks",Wa="CreateHealthCheckRequest",q6="ChildHealthCheck",za="CreateHostedZoneRequest",wr="ChangeInfo",J$="CheckerIpRanges",eh="CollectionId",Sa="CreateKeySigningKeyRequest",Q$="CidrLocations",Pa="CidrLocationNameDefaultAllowed",Xa="CidrLocationNameDefaultNotAllowed",Ya="CidrList",Ka="CidrNonce",Za="CollectionName",mG="ContinentName",NG="CountryName",qG="ComparisonOperator",la="CreateQueryLoggingConfigRequest",Pr="CallerReference",bw="CidrRoutingConfig",Ja="CreateReusableDelegationSetRequest",Qa="ChangeResourceRecordSetsRequest",vG="CheckedTime",Ma="ChangeTagsForResourceRequest",Ba="CreateTrafficPolicyInstanceRequest",Ha="CreateTrafficPolicyRequest",Va="CreateTrafficPolicyVersionRequest",d2="CollectionVersion",ka="CreateVPCAssociationAuthorizationRequest",jG="CloudWatchAlarmConfiguration",b2="CloudWatchLogsLogGroupArn",Da="CloudWatchRegion",mH="Changes",NH="Change",dQ="Cidr",dG="Collection",OG="Config",gw="Coordinates",B0="Count",H0="Document",cG="DigestAlgorithmMnemonic",bG="DigestAlgorithmType",gG="DNSKEYRecord",Rf="DNSName",Ls="DelegationSet",g2="DelegationSetId",_G="DSRecord",M$="DelegationSets",xG="DigestValue",ia="DeleteVPCAssociationAuthorizationRequest",ya="DisassociateVPCComment",ma="DisassociateVPCFromHostedZoneRequest",eG="Description",Uf="Disabled",B$="Dimensions",OQ="Dimension",Na="EDNS0ClientSubnetIP",qa="EDNS0ClientSubnetMask",nG="EvaluationPeriods",Tf="EnableSNI",nh="EvaluateTargetHealth",oh="Failover",c$="FullyQualifiedDomainName",Gf="FailureThreshold",oG="Flag",_w="GeoLocation",va="GeoLocationContinentCode",ja="GeoLocationCountryCode",b$="GeoLocationDetails",H$="GeoLocationDetailsList",da="GeoLocationSubdivisionCode",xw="GeoProximityLocation",Wf="HealthCheck",ew="HealthCheckConfig",aG="HealthCheckCount",g$="HealthCheckId",Oa="HealthCheckNonce",r0="HealthCheckObservations",sF="HealthCheckObservation",ca="HealthCheckRegion",ba="HealthCheckType",jw="HealthCheckVersion",V$="HealthChecks",Cf="HealthThreshold",Ys="HostedZone",_2="HostedZoneConfig",pG="HostedZoneCount",sr="HostedZoneId",Tw="HostedZoneIdMarker",k$="HostedZoneSummaries",cQ="HostedZoneSummary",ga="HostedZoneType",s0="HostedZones",Lf="Inverted",_$="InsufficientDataHealthStatus",Gw="IPAddress",_a="IsPrivateZone",Tr="IsTruncated",Gr="Id",nw="Key",uG="KmsArn",tG="KeyManagementServiceArn",r6="KeySigningKey",D$="KeySigningKeys",s6="KeyTag",i0="Location",f6="LastModifiedDate",pr="LocationName",ah="LinkedService",xa="ListTagsForResourcesRequest",w6="LatestVersion",x2="LocalZoneGroup",e2="Latitude",V0="Limit",n2="Longitude",gs="Marker",a="MaxItems",dw="MeasureLatency",h6="MetricName",rE="MaxResults",ph="MultiValueAnswer",Zr="Message",n="Name",$6="NextContinentCode",E6="NextCountryCode",I6="NextDNSName",F6="NextHostedZoneId",k0="NextMarker",U6="NextRecordIdentifier",T6="NextRecordName",G6="NextRecordType",i$="NameServers",C6="NextSubdivisionCode",bQ="NameServer",Xr="NextToken",L6="Nameserver",A6="Namespace",O6="Nonce",R6="Owner",W6="OwningAccount",z6="OwningService",Af="Port",S6="PublicKey",uh="PrivateZone",P6="Period",X6="Protocol",Cw="QueryLoggingConfig",y$="QueryLoggingConfigs",qw="Regions",Y6="ResponseCode",o2="RoutingControlArn",c6="ResourceDescription",gQ="RecordDataEntry",ea="RData",m$="RecordData",na="ResetElements",_Q="ResettableElementName",E0="ResourceId",oa="ResolverIP",aa="ResourceIds",Ow="RequestInterval",a2="RecordName",x$="ResourcePath",fF="ResourceRecord",N$="ResourceRecordSets",K6="ResourceRecordSetCount",pa="ResourceRecordSetFailover",ua="ResourceRecordSetIdentifier",ta="ResourceRecordSetMultiValueAnswer",rp="ResourceRecordSetRegion",sp="ResourceRecordSetWeight",th="ResourceRecordSet",fp="RRType",gh="ResourceRecords",p2="RecordType",wp="RemoveTagKeys",e$="ResourceTagSet",q$="ResourceTagSets",Z6="ResourceType",jr="Region",$s="Status",l6="SubmittedAt",J6="SigningAlgorithmMnemonic",Q6="SigningAlgorithmType",I0="SubdivisionCode",hp="StartContinentCode",$p="StartCountryCode",r1="SetIdentifier",Ep="SigningKeyName",Ip="SigningKeyString",Fp="SigningKeyStatus",s1="StatusMessage",M6="SubdivisionName",B6="ServicePrincipal",H6="StatusReport",Up="StartRecordIdentifier",Tp="StartRecordName",Gp="StartRecordType",n$="SearchString",Cp="StartSubdivisionCode",V6="ServeSignature",k6="Statistic",D6="State",Ar="Type",qH="TagKey",As="TrafficPolicy",b6="TrafficPolicyComment",i6="TrafficPolicyCount",vH="TrafficPolicyDocument",f1="TrafficPolicyId",y6="TrafficPolicyInstanceCount",u2="TrafficPolicyInstanceId",t2="TrafficPolicyIdMarker",_s="TrafficPolicyInstanceNameMarker",xs="TrafficPolicyInstanceTypeMarker",Es="TrafficPolicyInstance",hs="TrafficPolicyInstances",Lp="TrafficPolicyName",v$="TrafficPolicySummaries",xQ="TrafficPolicySummary",m6="TrafficPolicyType",bs="TrafficPolicyVersion",rF="TrafficPolicyVersionMarker",j$="TrafficPolicies",Ap="TagResourceId",vr="TTL",Rp="TagValue",wF="Tag",d$="Tags",N6="Threshold",Wp="UpdateHealthCheckRequest",zp="UpdateHostedZoneCommentRequest",Sp="UpdateTrafficPolicyCommentRequest",Pp="UpdateTrafficPolicyInstanceRequest",Xp="UUID",Yr="Value",Rr="VPC",o$="VPCId",a$="VPCRegion",f0="VPCs",D0="Version",w1="Weight",Yp="continentcode",Kp="countrycode",Zp="delegationsetid",lp="dnsname",Jp="edns0clientsubnetip",Qp="edns0clientsubnetmask",Mp="hostedzonetype",sE="hostedzoneid",Bp="identifier",jH="id",F0="location",fE="maxresults",ns="maxitems",g6="marker",zf="member",X="message",O$="messages",h1="nexttoken",Hp="name",Vp="recordname",kp="recordtype",Dp="resolverip",ip="subdivisioncode",yp="startcontinentcode",mp="startcountrycode",Np="startsubdivisioncode",qp="type",vp="trafficpolicyid",_6="trafficpolicyinstancename",x6="trafficpolicyinstancetype",jp="trafficpolicyversion",dp="vpcid",Vr='<?xml version="1.0" encoding="UTF-8"?>',Op="version",cp="vpcregion";class e6 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(eQ).de(UB).build(){}M();H();Y();class n6 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(nQ).de(TB).build(){}M();H();Y();class o6 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(oQ).de(GB).build(){}M();H();Y();class a6 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),qQ(s),N(s)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(aQ).de(CB).build(){}M();H();Y();class p6 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(pQ).de(LB).build(){}M();H();Y();class u6 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(uQ).de(AB).build(){}M();H();Y();class t6 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(tQ).de(RB).build(){}M();H();Y();class r4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(rM).de(WB).build(){}M();H();Y();class s4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(sM).de(zB).build(){}M();H();Y();class f4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(fM).de(SB).build(){}M();H();Y();class w4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(wM).de(PB).build(){}M();H();Y();class h4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(hM).de(XB).build(){}M();H();Y();class $4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser($M).de(YB).build(){}M();H();Y();class E4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(EM).de(KB).build(){}M();H();Y();class I4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(IM).de(ZB).build(){}M();H();Y();class F4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(FM).de(lB).build(){}M();H();Y();class U4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(UM).de(JB).build(){}M();H();Y();class T4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(TM).de(QB).build(){}M();H();Y();class G4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(GM).de(MB).build(){}M();H();Y();class C4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(CM).de(BB).build(){}M();H();Y();class L4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(LM).de(HB).build(){}M();H();Y();class A4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(AM).de(VB).build(){}M();H();Y();class R4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(RM).de(kB).build(){}M();H();Y();class W4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(WM).de(DB).build(){}M();H();Y();class z4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(zM).de(iB).build(){}M();H();Y();class S4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser(SM).de(yB).build(){}M();H();Y();class P4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(PM).de(mB).build(){}M();H();Y();class X4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(XM).de(NB).build(){}M();H();Y();class Y4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(YM).de(qB).build(){}M();H();Y();class K4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser(KM).de(vB).build(){}M();H();Y();class Z4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(ZM).de(jB).build(){}M();H();Y();class l4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser(lM).de(dB).build(){}M();H();Y();class J4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser(JM).de(OB).build(){}M();H();Y();class Q4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser(QM).de(cB).build(){}M();H();Y();class M4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser(MM).de(bB).build(){}M();H();Y();class B4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(BM).de(gB).build(){}M();H();Y();class H4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(HM).de(_B).build(){}M();H();Y();class V4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(VM).de(xB).build(){}M();H();Y();class k4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(kM).de(eB).build(){}M();H();Y();class D4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(DM).de(nB).build(){}M();H();Y();class i4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(iM).de(oB).build(){}M();H();Y();class y4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser(yM).de(aB).build(){}M();H();Y();class m4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(mM).de(pB).build(){}M();H();Y();class N4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(NM).de(uB).build(){}M();H();Y();class q4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(qM).de(tB).build(){}M();H();Y();class v4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(vM).de(rH).build(){}M();H();Y();class j4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(jM).de(sH).build(){}M();H();Y();class d4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(dM).de(fH).build(){}M();H();Y();class O4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(OM).de(wH).build(){}M();H();Y();class c4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(cM).de(hH).build(){}M();H();Y();class b4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser(bM).de($H).build(){}M();H();Y();class g4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(_M).de(IH).build(){}M();H();Y();class _4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(xM).de(FH).build(){}M();H();Y();class x4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(gM).de(EH).build(){}M();H();Y();class e4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(eM).de(UH).build(){}M();H();Y();class n4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(nM).de(TH).build(){}M();H();Y();class o4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(oM).de(GH).build(){}M();H();Y();class a4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(aM).de(CH).build(){}M();H();Y();class p4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(pM).de(LH).build(){}M();H();Y();class u4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(uM).de(AH).build(){}M();H();Y();class t4 extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(rB).de(WH).build(){}M();H();Y();class rC extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(sB).de(zH).build(){}M();H();Y();class sC extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(tM).de(RH).build(){}M();H();Y();class fC extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(fB).de(SH).build(){}M();H();Y();class wC extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(wB).de(PH).build(){}M();H();Y();class hC extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(hB).de(XH).build(){}M();H();Y();class $C extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser($B).de(YH).build(){}M();H();Y();class EC extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(EB).de(KH).build(){}M();H();Y();class IC extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser(IB).de(ZH).build(){}M();H();Y();class FC extends A.classBuilder().ep({...l}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions()),N(s)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(FB).de(lH).build(){}var bp={ActivateKeySigningKeyCommand:e6,AssociateVPCWithHostedZoneCommand:n6,ChangeCidrCollectionCommand:o6,ChangeResourceRecordSetsCommand:a6,ChangeTagsForResourceCommand:p6,CreateCidrCollectionCommand:u6,CreateHealthCheckCommand:t6,CreateHostedZoneCommand:r4,CreateKeySigningKeyCommand:s4,CreateQueryLoggingConfigCommand:f4,CreateReusableDelegationSetCommand:w4,CreateTrafficPolicyCommand:h4,CreateTrafficPolicyInstanceCommand:$4,CreateTrafficPolicyVersionCommand:E4,CreateVPCAssociationAuthorizationCommand:I4,DeactivateKeySigningKeyCommand:F4,DeleteCidrCollectionCommand:U4,DeleteHealthCheckCommand:T4,DeleteHostedZoneCommand:G4,DeleteKeySigningKeyCommand:C4,DeleteQueryLoggingConfigCommand:L4,DeleteReusableDelegationSetCommand:A4,DeleteTrafficPolicyCommand:R4,DeleteTrafficPolicyInstanceCommand:W4,DeleteVPCAssociationAuthorizationCommand:z4,DisableHostedZoneDNSSECCommand:S4,DisassociateVPCFromHostedZoneCommand:P4,EnableHostedZoneDNSSECCommand:X4,GetAccountLimitCommand:Y4,GetChangeCommand:K4,GetCheckerIpRangesCommand:Z4,GetDNSSECCommand:l4,GetGeoLocationCommand:J4,GetHealthCheckCommand:Q4,GetHealthCheckCountCommand:M4,GetHealthCheckLastFailureReasonCommand:B4,GetHealthCheckStatusCommand:H4,GetHostedZoneCommand:V4,GetHostedZoneCountCommand:k4,GetHostedZoneLimitCommand:D4,GetQueryLoggingConfigCommand:i4,GetReusableDelegationSetCommand:y4,GetReusableDelegationSetLimitCommand:m4,GetTrafficPolicyCommand:N4,GetTrafficPolicyInstanceCommand:q4,GetTrafficPolicyInstanceCountCommand:v4,ListCidrBlocksCommand:j4,ListCidrCollectionsCommand:d4,ListCidrLocationsCommand:O4,ListGeoLocationsCommand:c4,ListHealthChecksCommand:b4,ListHostedZonesCommand:x4,ListHostedZonesByNameCommand:g4,ListHostedZonesByVPCCommand:_4,ListQueryLoggingConfigsCommand:e4,ListResourceRecordSetsCommand:n4,ListReusableDelegationSetsCommand:o4,ListTagsForResourceCommand:a4,ListTagsForResourcesCommand:p4,ListTrafficPoliciesCommand:u4,ListTrafficPolicyInstancesCommand:sC,ListTrafficPolicyInstancesByHostedZoneCommand:t4,ListTrafficPolicyInstancesByPolicyCommand:rC,ListTrafficPolicyVersionsCommand:fC,ListVPCAssociationAuthorizationsCommand:wC,TestDNSAnswerCommand:hC,UpdateHealthCheckCommand:$C,UpdateHostedZoneCommentCommand:EC,UpdateTrafficPolicyCommentCommand:IC,UpdateTrafficPolicyInstanceCommand:FC};class Lw extends kG{}df(bp,Lw);aw();pw();uw();rh();Ms();var $1=u(Or(),1);Th();M();Ef();Y();var dH=u(Br(),1);rf();function gp(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}var OH=async(r,f,s)=>{return{operation:Js(f).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},cH=(r)=>{const f=[];switch(r.operation){default:f.push(gp(r))}return f},bH=(r)=>{return{...dH.resolveAwsSdkSigV4Config(r)}};var gH=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53domains"}},b={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var _H={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 EV=u(Br(),1);b1();Zh();Ms();lh();Ef();$f();_0();Jh();Rs();var hV=u(Br(),1);Y();b0();W0();jf();Ww();us();var xH={["required"]:!1,type:"String"},eH={["required"]:!0,default:!1,type:"Boolean"},nH={["ref"]:"Endpoint"},rV={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},sV={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},U0={},oH={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},aH={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},pH=[rV],uH=[sV],tH=[{["ref"]:"Region"}],xp={version:"1.0",parameters:{Region:xH,UseDualStack:eH,UseFIPS:eH,Endpoint:xH},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[nH]}],rules:[{conditions:pH,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:uH,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:nH,properties:U0,headers:U0},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:tH}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:tH,assign:"PartitionResult"}],rules:[{conditions:[rV,sV],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,oH]},aH],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:U0,headers:U0},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:pH,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[oH,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:U0,headers:U0},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:uH,rules:[{conditions:[aH],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:U0,headers:U0},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:U0,headers:U0},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},fV=xp;var wV=(r,f={})=>{return ps(fV,{endpointParams:r,logger:f.logger})};ur.aws=ts;var $V=(r)=>{return{apiVersion:"2014-05-15",base64Decoder:r?.base64Decoder??Us,base64Encoder:r?.base64Encoder??Gs,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??wV,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??cH,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new hV.AwsSdkSigV4Signer}],logger:r?.logger??new Ws,serviceId:r?.serviceId??"Route 53 Domains",urlParser:r?.urlParser??gr,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Ts}};Y();Qh();Y();var IV=(r)=>{gf(process.version);const f=af(r),s=()=>f().then(bf),w=$V(r);return EV.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??of,credentialDefaultProvider:r?.credentialDefaultProvider??S0,defaultUserAgentProvider:r?.defaultUserAgentProvider??nf({serviceId:w.serviceId,clientVersion:_H.version}),maxAttempts:r?.maxAttempts??t(Nf),region:r?.region??t(Qs,Hf),requestHandler:tr.create(r?.requestHandler??s),retryMode:r?.retryMode??t({...vf,default:async()=>(await s()).retryMode||ys}),sha256:r?.sha256??If.bind(null,"sha256"),streamCollector:r?.streamCollector??ms,useDualstackEndpoint:r?.useDualstackEndpoint??t(Mf),useFipsEndpoint:r?.useFipsEndpoint??t(Bf)}};Mh();ir();Y();var FV=(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}}},UV=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var IF=(r)=>r,TV=(r,f)=>{const s={...IF(pf(r)),...IF(_f(r)),...IF(Pf(r)),...IF(FV(r))};return f.forEach((w)=>w.configure(s)),{...r,...uf(s),...xf(s),...Xf(s),...UV(s)}};class UC extends zs{constructor(...[r]){const f=IV(r||{}),s=gH(f),w=Jf(s),h=qf(w),$=Vf(h),E=Yf($),I=yf(E),F=bH(I),U=TV(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Qf(this.config)),this.middlewareStack.use(ef(this.config)),this.middlewareStack.use(Df(this.config)),this.middlewareStack.use(Kf(this.config)),this.middlewareStack.use(Zf(this.config)),this.middlewareStack.use(lf(this.config)),this.middlewareStack.use($1.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:OH,identityProviderConfigProvider:async(C)=>new $1.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use($1.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}Y();M();H();Y();Y();Y();class os extends Ns{constructor(r){super(r);Object.setPrototypeOf(this,os.prototype)}}class FF extends os{constructor(r){super({name:"DomainLimitExceeded",$fault:"client",...r});this.name="DomainLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,FF.prototype)}}class UF extends os{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,UF.prototype)}}class TF extends os{constructor(r){super({name:"OperationLimitExceeded",$fault:"client",...r});this.name="OperationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,TF.prototype)}}class GF extends os{constructor(r){super({name:"UnsupportedTLD",$fault:"client",...r});this.name="UnsupportedTLD",this.$fault="client",Object.setPrototypeOf(this,GF.prototype)}}class CF extends os{constructor(r){super({name:"DnssecLimitExceeded",$fault:"client",...r});this.name="DnssecLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,CF.prototype)}}class LF extends os{constructor(r){super({name:"DuplicateRequest",$fault:"client",...r});this.name="DuplicateRequest",this.$fault="client",Object.setPrototypeOf(this,LF.prototype),this.requestId=r.requestId}}class AF extends os{constructor(r){super({name:"TLDRulesViolation",$fault:"client",...r});this.name="TLDRulesViolation",this.$fault="client",Object.setPrototypeOf(this,AF.prototype)}}var GV=(r)=>({...r,...r.Password&&{Password:o}}),CV=(r)=>({...r,...r.AuthCode&&{AuthCode:o}});var LV=(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}}),AV=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),RV=(r)=>({...r,...r.emailAddress&&{emailAddress:o}}),WV=(r)=>({...r,...r.AuthCode&&{AuthCode:o}}),zV=(r)=>({...r,...r.AuthCode&&{AuthCode:o},...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),SV=(r)=>({...r,...r.Password&&{Password:o}}),PV=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),XV=(r)=>({...r,...r.FIAuthKey&&{FIAuthKey:o}});var fr=u(Br(),1);ir();Y();function Fr(r){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${r}`}}var YV=async(r,f)=>{const s=Fr("AcceptDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},KV=async(r,f)=>{const s=Fr("AssociateDelegationSignerToDomain");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},ZV=async(r,f)=>{const s=Fr("CancelDomainTransferToAnotherAwsAccount");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},lV=async(r,f)=>{const s=Fr("CheckDomainAvailability");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},JV=async(r,f)=>{const s=Fr("CheckDomainTransferability");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},QV=async(r,f)=>{const s=Fr("DeleteDomain");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},MV=async(r,f)=>{const s=Fr("DeleteTagsForDomain");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},BV=async(r,f)=>{const s=Fr("DisableDomainAutoRenew");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},HV=async(r,f)=>{const s=Fr("DisableDomainTransferLock");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},VV=async(r,f)=>{const s=Fr("DisassociateDelegationSignerFromDomain");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},kV=async(r,f)=>{const s=Fr("EnableDomainAutoRenew");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},DV=async(r,f)=>{const s=Fr("EnableDomainTransferLock");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},iV=async(r,f)=>{const s=Fr("GetContactReachabilityStatus");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},yV=async(r,f)=>{const s=Fr("GetDomainDetail");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},mV=async(r,f)=>{const s=Fr("GetDomainSuggestions");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},NV=async(r,f)=>{const s=Fr("GetOperationDetail");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},qV=async(r,f)=>{const s=Fr("ListDomains");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},vV=async(r,f)=>{const s=Fr("ListOperations");let w;return w=JSON.stringify(su(r,f)),Ir(f,s,"/",void 0,w)},jV=async(r,f)=>{const s=Fr("ListPrices");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},dV=async(r,f)=>{const s=Fr("ListTagsForDomain");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},OV=async(r,f)=>{const s=Fr("PushDomain");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},cV=async(r,f)=>{const s=Fr("RegisterDomain");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},bV=async(r,f)=>{const s=Fr("RejectDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},gV=async(r,f)=>{const s=Fr("RenewDomain");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},_V=async(r,f)=>{const s=Fr("ResendContactReachabilityEmail");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},xV=async(r,f)=>{const s=Fr("ResendOperationAuthorization");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},eV=async(r,f)=>{const s=Fr("RetrieveDomainAuthCode");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},nV=async(r,f)=>{const s=Fr("TransferDomain");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},oV=async(r,f)=>{const s=Fr("TransferDomainToAnotherAwsAccount");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},aV=async(r,f)=>{const s=Fr("UpdateDomainContact");let w;return w=JSON.stringify(fu(r,f)),Ir(f,s,"/",void 0,w)},pV=async(r,f)=>{const s=Fr("UpdateDomainContactPrivacy");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},uV=async(r,f)=>{const s=Fr("UpdateDomainNameservers");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},tV=async(r,f)=>{const s=Fr("UpdateTagsForDomain");let w;return w=JSON.stringify(m(r)),Ir(f,s,"/",void 0,w)},rk=async(r,f)=>{const s=Fr("ViewBilling");let w;return w=JSON.stringify(wu(r,f)),Ir(f,s,"/",void 0,w)},sk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},fk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},wk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},hk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},$k=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Ek=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Ik=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Fk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Uk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Tk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Gk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Ck=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Lk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Ak=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=Tu(s,f),{$metadata:rr(r),...w}},Rk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Wk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=Gu(s,f),{$metadata:rr(r),...w}},zk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=Cu(s,f),{$metadata:rr(r),...w}},Sk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=Lu(s,f),{$metadata:rr(r),...w}},Pk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=Au(s,f),{$metadata:rr(r),...w}},Xk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Yk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);return await xr(r.body,f),{$metadata:rr(r)}},Kk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Zk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},lk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Jk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Qk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);return await xr(r.body,f),{$metadata:rr(r)}},Mk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Bk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Hk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Vk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},kk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},Dk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},ik=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:rr(r),...w}},yk=async(r,f)=>{if(r.statusCode>=300)return Er(r,f);const s=await fr.parseJsonBody(r.body,f);let w={};return w=zu(s,f),{$metadata:rr(r),...w}},Er=async(r,f)=>{const s={...r,body:await fr.parseJsonErrorBody(r.body,f)},w=fr.loadRestJsonErrorCode(r,s.body);switch(w){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await np(s,f);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await ap(s,f);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await pp(s,f);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await tp(s,f);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await ep(s,f);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await op(s,f);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await up(s,f);default:const h=s.body;return Su({output:r,parsedBody:h,errorCode:w})}},ep=async(r,f)=>{const s=r.body,w=m(s),h=new CF({$metadata:rr(r),...w});return k(h,s)},np=async(r,f)=>{const s=r.body,w=m(s),h=new FF({$metadata:rr(r),...w});return k(h,s)},op=async(r,f)=>{const s=r.body,w=m(s),h=new LF({$metadata:rr(r),...w});return k(h,s)},ap=async(r,f)=>{const s=r.body,w=m(s),h=new UF({$metadata:rr(r),...w});return k(h,s)},pp=async(r,f)=>{const s=r.body,w=m(s),h=new TF({$metadata:rr(r),...w});return k(h,s)},up=async(r,f)=>{const s=r.body,w=m(s),h=new AF({$metadata:rr(r),...w});return k(h,s)},tp=async(r,f)=>{const s=r.body,w=m(s),h=new GF({$metadata:rr(r),...w});return k(h,s)},ru=(r,f)=>{return p(r,{Currency:[],MaxPrice:PY})},su=(r,f)=>{return p(r,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:m,SubmittedSince:(s)=>s.getTime()/1000,Type:m})},fu=(r,f)=>{return p(r,{AdminContact:m,BillingContact:m,Consent:(s)=>ru(s,f),DomainName:[],RegistrantContact:m,TechContact:m})},wu=(r,f)=>{return p(r,{End:(s)=>s.getTime()/1000,Marker:[],MaxItems:[],Start:(s)=>s.getTime()/1000})},hu=(r,f)=>{return p(r,{BillDate:(s)=>y(Of(Cs(s))),DomainName:T,InvoiceId:T,Operation:T,Price:P5})},$u=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return hu(w,f)})},Eu=(r,f)=>{return p(r,{ChangeOwnershipPrice:(s)=>wE(s,f),Name:T,RegistrationPrice:(s)=>wE(s,f),RenewalPrice:(s)=>wE(s,f),RestorationPrice:(s)=>wE(s,f),TransferPrice:(s)=>wE(s,f)})},Iu=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Eu(w,f)})},Fu=(r,f)=>{return p(r,{AutoRenew:x0,DomainName:T,Expiry:(s)=>y(Of(Cs(s))),TransferLock:x0})},Uu=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Fu(w,f)})},Tu=(r,f)=>{return p(r,{AbuseContactEmail:T,AbuseContactPhone:T,AdminContact:m,AdminPrivacy:x0,AutoRenew:x0,BillingContact:m,BillingPrivacy:x0,CreationDate:(s)=>y(Of(Cs(s))),DnsSec:T,DnssecKeys:m,DomainName:T,ExpirationDate:(s)=>y(Of(Cs(s))),Nameservers:m,RegistrantContact:m,RegistrantPrivacy:x0,RegistrarName:T,RegistrarUrl:T,RegistryDomainId:T,Reseller:T,StatusList:m,TechContact:m,TechPrivacy:x0,UpdatedDate:(s)=>y(Of(Cs(s))),WhoIsServer:T})},Gu=(r,f)=>{return p(r,{DomainName:T,LastUpdatedDate:(s)=>y(Of(Cs(s))),Message:T,OperationId:T,Status:T,StatusFlag:T,SubmittedDate:(s)=>y(Of(Cs(s))),Type:T})},Cu=(r,f)=>{return p(r,{Domains:(s)=>Uu(s,f),NextPageMarker:T})},Lu=(r,f)=>{return p(r,{NextPageMarker:T,Operations:(s)=>Wu(s,f)})},Au=(r,f)=>{return p(r,{NextPageMarker:T,Prices:(s)=>Iu(s,f)})},Ru=(r,f)=>{return p(r,{DomainName:T,LastUpdatedDate:(s)=>y(Of(Cs(s))),Message:T,OperationId:T,Status:T,StatusFlag:T,SubmittedDate:(s)=>y(Of(Cs(s))),Type:T})},Wu=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Ru(w,f)})},wE=(r,f)=>{return p(r,{Currency:T,Price:P5})},zu=(r,f)=>{return p(r,{BillingRecords:(s)=>$u(s,f),NextPageMarker:T})},rr=(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 Su=cf(os),Ir=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 TC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(GV,void 0).ser(YV).de(sk).build(){}M();H();Y();class GC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser(KV).de(fk).build(){}M();H();Y();class CC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(ZV).de(wk).build(){}M();H();Y();class LC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser(lV).de(hk).build(){}M();H();Y();class AC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(CV,void 0).ser(JV).de($k).build(){}M();H();Y();class RC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(QV).de(Ek).build(){}M();H();Y();class WC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser(MV).de(Ik).build(){}M();H();Y();class zC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(BV).de(Fk).build(){}M();H();Y();class SC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(HV).de(Uk).build(){}M();H();Y();class PC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(VV).de(Tk).build(){}M();H();Y();class XC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(kV).de(Gk).build(){}M();H();Y();class YC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(DV).de(Ck).build(){}M();H();Y();class KC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(iV).de(Lk).build(){}M();H();Y();class ZC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,LV).ser(yV).de(Ak).build(){}M();H();Y();class lC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(mV).de(Rk).build(){}M();H();Y();class JC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(NV).de(Wk).build(){}M();H();Y();class QC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(qV).de(zk).build(){}M();H();Y();class MC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(vV).de(Sk).build(){}M();H();Y();class BC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(jV).de(Pk).build(){}M();H();Y();class HC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(dV).de(Xk).build(){}M();H();Y();class VC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(OV).de(Yk).build(){}M();H();Y();class kC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(AV,void 0).ser(cV).de(Kk).build(){}M();H();Y();class DC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser(bV).de(Zk).build(){}M();H();Y();class iC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(gV).de(lk).build(){}M();H();Y();class yC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,RV).ser(_V).de(Jk).build(){}M();H();Y();class mC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(xV).de(Qk).build(){}M();H();Y();class NC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,WV).ser(eV).de(Mk).build(){}M();H();Y();class qC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(zV,void 0).ser(nV).de(Bk).build(){}M();H();Y();class vC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,SV).ser(oV).de(Hk).build(){}M();H();Y();class jC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(PV,void 0).ser(aV).de(Vk).build(){}M();H();Y();class dC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(pV).de(kk).build(){}M();H();Y();class OC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(XV,void 0).ser(uV).de(Dk).build(){}M();H();Y();class cC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(tV).de(ik).build(){}M();H();Y();class bC extends A.classBuilder().ep({...b}).m(function(r,f,s,w){return[R(s,this.serialize,this.deserialize),W(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(rk).de(yk).build(){}var Pu={AcceptDomainTransferFromAnotherAwsAccountCommand:TC,AssociateDelegationSignerToDomainCommand:GC,CancelDomainTransferToAnotherAwsAccountCommand:CC,CheckDomainAvailabilityCommand:LC,CheckDomainTransferabilityCommand:AC,DeleteDomainCommand:RC,DeleteTagsForDomainCommand:WC,DisableDomainAutoRenewCommand:zC,DisableDomainTransferLockCommand:SC,DisassociateDelegationSignerFromDomainCommand:PC,EnableDomainAutoRenewCommand:XC,EnableDomainTransferLockCommand:YC,GetContactReachabilityStatusCommand:KC,GetDomainDetailCommand:ZC,GetDomainSuggestionsCommand:lC,GetOperationDetailCommand:JC,ListDomainsCommand:QC,ListOperationsCommand:MC,ListPricesCommand:BC,ListTagsForDomainCommand:HC,PushDomainCommand:VC,RegisterDomainCommand:kC,RejectDomainTransferFromAnotherAwsAccountCommand:DC,RenewDomainCommand:iC,ResendContactReachabilityEmailCommand:yC,ResendOperationAuthorizationCommand:mC,RetrieveDomainAuthCodeCommand:NC,TransferDomainCommand:qC,TransferDomainToAnotherAwsAccountCommand:vC,UpdateDomainContactCommand:jC,UpdateDomainContactPrivacyCommand:dC,UpdateDomainNameserversCommand:OC,UpdateTagsForDomainCommand:cC,ViewBillingCommand:bC};class hE extends UC{}df(Pu,hE);import{runAction as Xu}from"@stacksjs/actions";import{config as Nk}from"@stacksjs/config";import{Action as Yu}from"@stacksjs/enums";import{err as ow,handleError as gC,ok as E1}from"@stacksjs/error-handling";import{log as Aw}from"@stacksjs/logging";import{path as Ku}from"@stacksjs/path";import{fs as mk}from"@stacksjs/storage";async function DHr(r){const f=new Lw,s=await f.listHostedZonesByName({DNSName:r});if(!s||!s.HostedZones)return ow(`No hosted zones found for domain: ${r}`);const w=s.HostedZones.find(($)=>$.Name===`${r}.`);if(!w)return ow(`Hosted Zone not found for domain: ${r}`);const h=await f.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return ow(`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}),Aw.info(`Deleted Hosted Zone for domain: ${r}`),E1("success")}async function iHr(r){const f=new Lw,s=await f.listHostedZonesByName({DNSName:r});if(!s||!s.HostedZones)return ow(`No hosted zones found for domain: ${r}`);const w=s.HostedZones.find(($)=>$.Name===`${r}.`);if(!w)return ow(`Hosted Zone not found for domain: ${r}`);const h=await f.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return ow(`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 Aw.info(`Deleted DNS records for domain: ${r}`),E1("success")}async function yHr(r){const f=new Lw,w=(await f.listHostedZonesByName({DNSName:r})).HostedZones?.find(($)=>$.Name===`${r}.`);if(w)return E1(w);const h=await f.createHostedZone({Name:r,CallerReference:`${Date.now()}`});if(!h.HostedZone)return ow("Failed to create hosted zone");return E1(h)}function Zu(r){try{const f=Ku.projectConfigPath("dns.ts"),w=mk.readFileSync(f,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${r.map((h)=>`'${h}'`).join(", ")}]`);mk.writeFileSync(f,w,"utf-8"),Aw.info("Nameservers have been set.")}catch(f){console.error("Error updating nameservers:",f)}}async function mHr(r){try{const f=new Lw,{HostedZones:s}=await f.listHostedZonesByName({DNSName:r});if(!s)return gC(`No hosted zones found for domain ${r}`);const w=s[0];if(w&&w.Name===`${r}.`)return E1(w.Id);return E1(null)}catch(f){return console.error(f),gC(`Failed to find hosted zone for domain ${r}`)}}async function lu(r){if(!r)return[];try{return(await new hE().getDomainDetail({DomainName:r}))?.Nameservers?.map((w)=>w.Name)||[]}catch(f){console.error(f),gC("Error getting domain detail")}}async function Ju(r,f){if(!f)f=Nk.app.url;const s=await lu(f);if(s&&r&&JSON.stringify(s.sort())!==JSON.stringify(r.sort()))return Aw.info("Updating your domain nameservers to match the ones in your hosted zone..."),Aw.debug("Hosted zone nameservers:",r),Aw.debug("Domain nameservers:",s),await new hE().updateDomainNameservers({DomainName:f,Nameservers:r.map((h)=>({Name:h}))}),Zu(r),Aw.info("Nameservers updated."),!0;Aw.success("Your nameservers are up to date.")}async function NHr(r){if(!r)r=Nk.app.url;const f=new Lw,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 Ju($,r),!0}return!1}async function qHr(r){return await Xu(Yu.DomainsAdd,r)}export{Zu as writeNameserversToConfig,Ju as updateNameservers,NHr as hasUserDomainBeenAddedToCloud,lu as getNameservers,mHr as findHostedZone,iHr as deleteHostedZoneRecords,DHr as deleteHostedZone,yHr as createHostedZone,qHr as addDomain};
33
+ `),vQ=!0}throw new x("AWS_PROFILE is set, skipping fromEnv provider.",{logger:r.logger,tryNextLink:!0})}return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),VU(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:s,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoSession:$}=r;if(!s&&!f&&!w&&!h&&!$)throw new x("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:r.logger});const{fromSSO:E}=await Promise.resolve().then(() => (QG(),JG));return E(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:s}=await Promise.resolve().then(() => (jQ(),mQ));return s(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:s}=await Promise.resolve().then(() => (KT(),YT));return s(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:s}=await Promise.resolve().then(() => (MT(),QT));return s(r)()},async()=>{return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await AZ(r))()},async()=>{throw new x("Could not load credentials from any providers",{tryNextLink:!1,logger:r.logger})}),cx,bx),bx=(r)=>r?.expiration!==void 0,cx=(r)=>r?.expiration!==void 0&&r.expiration.getTime()-Date.now()<300000;var OQ=T(()=>{HU();Lr();u0();zZ()});var y1=T(()=>{OQ()});_w();gw();xw();nw();S0();var vh=g(Or(),1);hh();Q();rf();K();var P7=g(Vr(),1),BE=g(pr(),1);function oc(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}var X7=async(r,s,f)=>{return{operation:BE.getSmithyContext(s).operation,region:await BE.normalizeProvider(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Y7=(r)=>{const s=[];switch(r.operation){default:s.push(oc(r))}return s},K7=(r)=>{return{...P7.resolveAwsSdkSigV4Config(r)}};var Z7=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53"}},S={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var S7={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 wM=g(Vr(),1);y1();zh();S0();Ph();rf();t0();Qw();Xh();L0();var fM=g(Vr(),1);K();ms();Yh();cs();Uw();e0();var iQ={["required"]:!1,type:"String"},dQ={["required"]:!0,default:!1,type:"Boolean"},bQ={["ref"]:"Endpoint"},XI={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},uQ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},dr={},cQ={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},jh={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},Hw={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},Ks={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},_Q={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},gQ={["fn"]:"stringEquals",["argv"]:[jh,"aws-us-gov"]},xQ={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},eQ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},nQ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},oQ=[XI],aQ=[uQ],pQ=[{["ref"]:"Region"}],_x={version:"1.0",parameters:{Region:iQ,UseDualStack:dQ,UseFIPS:dQ,Endpoint:iQ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[bQ]}],rules:[{conditions:oQ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:aQ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:bQ,properties:dr,headers:dr},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:pQ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:pQ,assign:"PartitionResult"}],rules:[{conditions:[cQ,Hw,Ks],endpoint:{url:"https://route53.amazonaws.com",properties:_Q,headers:dr},type:"endpoint"},{conditions:[cQ,XI,Ks],endpoint:{url:"https://route53-fips.amazonaws.com",properties:_Q,headers:dr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[jh,"aws-cn"]},Hw,Ks],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:dr},type:"endpoint"},{conditions:[gQ,Hw,Ks],endpoint:xQ,type:"endpoint"},{conditions:[gQ,XI,Ks],endpoint:xQ,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[jh,"aws-iso"]},Hw,Ks],endpoint:{url:"https://route53.c2s.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-iso-east-1"}]},headers:dr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[jh,"aws-iso-b"]},Hw,Ks],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isob-east-1"}]},headers:dr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[jh,"aws-iso-e"]},Hw,Ks],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"eu-isoe-west-1"}]},headers:dr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[jh,"aws-iso-f"]},Hw,Ks],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:dr},type:"endpoint"},{conditions:[XI,uQ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,eQ]},nQ],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:dr,headers:dr},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:oQ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[eQ,!0]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:dr,headers:dr},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:aQ,rules:[{conditions:[nQ],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:dr,headers:dr},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:dr,headers:dr},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},tQ=_x;var rM=(r,s={})=>{return x0(tQ,{endpointParams:r,logger:s.logger})};ar.aws=n0;var sM=(r)=>{return{apiVersion:"2013-04-01",base64Decoder:r?.base64Decoder??gf,base64Encoder:r?.base64Encoder??xf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??rM,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??Y7,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new fM.AwsSdkSigV4Signer}],logger:r?.logger??new W0,serviceId:r?.serviceId??"Route 53",urlParser:r?.urlParser??cr,utf8Decoder:r?.utf8Decoder??F0,utf8Encoder:r?.utf8Encoder??cf}};K();Kh();K();var hM=(r)=>{mf(process.version);const s=ef(r),f=()=>s().then(yf),w=sM(r);return wM.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??_f,credentialDefaultProvider:r?.credentialDefaultProvider??Ls,defaultUserAgentProvider:r?.defaultUserAgentProvider??bf({serviceId:w.serviceId,clientVersion:S7.version}),maxAttempts:r?.maxAttempts??u(Hf),region:r?.region??u(Z0,Sf),requestHandler:tr.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...kf,default:async()=>(await f()).retryMode||D0}),sha256:r?.sha256??ff.bind(null,"sha256"),streamCollector:r?.streamCollector??df,useDualstackEndpoint:r?.useDualstackEndpoint??u(Kf),useFipsEndpoint:r?.useFipsEndpoint??u(Zf)}};Zh();Nr();K();var $M=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const $=s.findIndex((E)=>E.schemeId===h.schemeId);if($===-1)s.push(h);else s.splice($,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},EM=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var YI=(r)=>r,IM=(r,s)=>{const f={...YI(nf(r)),...YI(jf(r)),...YI(Wf(r)),...YI($M(r))};return s.forEach((w)=>w.configure(f)),{...r,...of(f),...vf(f),...Af(f),...EM(f)}};class BT extends A0{constructor(...[r]){const s=hM(r||{}),f=Z7(s),w=Xf(f),h=Df(w),$=Jf(h),E=zf($),I=Bf(E),F=K7(I),U=IM(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Yf(this.config)),this.middlewareStack.use(Of(this.config)),this.middlewareStack.use(Mf(this.config)),this.middlewareStack.use(Cf(this.config)),this.middlewareStack.use(Rf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(vh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:X7,identityProviderConfigProvider:async(L)=>new vh.DefaultIdentityProviderConfig({"aws.auth#sigv4":L.credentials})})),this.middlewareStack.use(vh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}K();var KI=/^\/(hostedzone|change|delegationset)\//;function gx(){return(r)=>async(s)=>{const{ChangeBatch:f}=s.input,w=[];for(let h of f.Changes){const{AliasTarget:$}=h.ResourceRecordSet;if($)w.push({...h,ResourceRecordSet:{...h.ResourceRecordSet,AliasTarget:{...$,HostedZoneId:$.HostedZoneId.replace(KI,"")}}});else w.push(h)}return r({...s,input:{...s.input,ChangeBatch:{...f,Changes:w}}})}}var xx={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},FM=(r)=>({applyToStack:(s)=>{s.add(gx(),xx)}});function nx(){return(r)=>async(s)=>{const f={...s.input};for(let w of ex){const h=f[w];if(h)f[w]=h.replace(KI,"")}return r({...s,input:f})}}var ex=["DelegationSetId","HostedZoneId","Id"],ox={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},y=(r)=>({applyToStack:(s)=>{s.add(nx(),ox)}});Q();B();K();var _=g(Vr(),1);function UM(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function GM(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 VT{constructor(r){this.value=r}toString(){return GM(""+this.value)}}class V{static of(r,s,f){const w=new V(r);if(s!==void 0)w.addChildNode(new VT(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=V.of(s,r[s]).withName(f);this.c(w)}}l(r,s,f,w){if(r[s]!=null)w().map(($)=>{$.withName(f),this.c($)})}lc(r,s,f,w){if(r[s]!=null){const h=w(),$=new V(f);h.map((E)=>{$.c(E)}),this.c($)}}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}="${UM(""+h)}"`}return s+=!r?"/>":`>${this.children.map((w)=>w.toString()).join("")}</${this.name}>`}}var d=g(Or(),1);K();K();class O extends k0{constructor(r){super(r);Object.setPrototypeOf(this,O.prototype)}}class ZI extends O{constructor(r){super({name:"ConcurrentModification",$fault:"client",...r});this.name="ConcurrentModification",this.$fault="client",Object.setPrototypeOf(this,ZI.prototype)}}class SI extends O{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,SI.prototype)}}class JI extends O{constructor(r){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...r});this.name="InvalidKeySigningKeyStatus",this.$fault="client",Object.setPrototypeOf(this,JI.prototype)}}class QI extends O{constructor(r){super({name:"InvalidKMSArn",$fault:"client",...r});this.name="InvalidKMSArn",this.$fault="client",Object.setPrototypeOf(this,QI.prototype)}}class MI extends O{constructor(r){super({name:"InvalidSigningStatus",$fault:"client",...r});this.name="InvalidSigningStatus",this.$fault="client",Object.setPrototypeOf(this,MI.prototype)}}class BI extends O{constructor(r){super({name:"NoSuchKeySigningKey",$fault:"client",...r});this.name="NoSuchKeySigningKey",this.$fault="client",Object.setPrototypeOf(this,BI.prototype)}}class VI extends O{constructor(r){super({name:"ConflictingDomainExists",$fault:"client",...r});this.name="ConflictingDomainExists",this.$fault="client",Object.setPrototypeOf(this,VI.prototype)}}class HI extends O{constructor(r){super({name:"InvalidVPCId",$fault:"client",...r});this.name="InvalidVPCId",this.$fault="client",Object.setPrototypeOf(this,HI.prototype)}}class DI extends O{constructor(r){super({name:"LimitsExceeded",$fault:"client",...r});this.name="LimitsExceeded",this.$fault="client",Object.setPrototypeOf(this,DI.prototype)}}class kI extends O{constructor(r){super({name:"NoSuchHostedZone",$fault:"client",...r});this.name="NoSuchHostedZone",this.$fault="client",Object.setPrototypeOf(this,kI.prototype)}}class lI extends O{constructor(r){super({name:"NotAuthorizedException",$fault:"client",...r});this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,lI.prototype)}}class NI extends O{constructor(r){super({name:"PriorRequestNotComplete",$fault:"client",...r});this.name="PriorRequestNotComplete",this.$fault="client",Object.setPrototypeOf(this,NI.prototype)}}class qI extends O{constructor(r){super({name:"PublicZoneVPCAssociation",$fault:"client",...r});this.name="PublicZoneVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,qI.prototype)}}class yI extends O{constructor(r){super({name:"CidrBlockInUseException",$fault:"client",...r});this.name="CidrBlockInUseException",this.$fault="client",Object.setPrototypeOf(this,yI.prototype),this.Message=r.Message}}class mI extends O{constructor(r){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...r});this.name="CidrCollectionVersionMismatchException",this.$fault="client",Object.setPrototypeOf(this,mI.prototype),this.Message=r.Message}}class jI extends O{constructor(r){super({name:"NoSuchCidrCollectionException",$fault:"client",...r});this.name="NoSuchCidrCollectionException",this.$fault="client",Object.setPrototypeOf(this,jI.prototype),this.Message=r.Message}}class vI extends O{constructor(r){super({name:"InvalidChangeBatch",$fault:"client",...r});this.name="InvalidChangeBatch",this.$fault="client",Object.setPrototypeOf(this,vI.prototype),this.messages=r.messages}}class OI extends O{constructor(r){super({name:"NoSuchHealthCheck",$fault:"client",...r});this.name="NoSuchHealthCheck",this.$fault="client",Object.setPrototypeOf(this,OI.prototype)}}class iI extends O{constructor(r){super({name:"ThrottlingException",$fault:"client",...r});this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,iI.prototype)}}class dI extends O{constructor(r){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...r});this.name="CidrCollectionAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,dI.prototype),this.Message=r.Message}}class bI extends O{constructor(r){super({name:"HealthCheckAlreadyExists",$fault:"client",...r});this.name="HealthCheckAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,bI.prototype)}}class cI extends O{constructor(r){super({name:"TooManyHealthChecks",$fault:"client",...r});this.name="TooManyHealthChecks",this.$fault="client",Object.setPrototypeOf(this,cI.prototype)}}class _I extends O{constructor(r){super({name:"DelegationSetNotAvailable",$fault:"client",...r});this.name="DelegationSetNotAvailable",this.$fault="client",Object.setPrototypeOf(this,_I.prototype)}}class gI extends O{constructor(r){super({name:"DelegationSetNotReusable",$fault:"client",...r});this.name="DelegationSetNotReusable",this.$fault="client",Object.setPrototypeOf(this,gI.prototype)}}class xI extends O{constructor(r){super({name:"HostedZoneAlreadyExists",$fault:"client",...r});this.name="HostedZoneAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,xI.prototype)}}class eI extends O{constructor(r){super({name:"InvalidDomainName",$fault:"client",...r});this.name="InvalidDomainName",this.$fault="client",Object.setPrototypeOf(this,eI.prototype)}}class nI extends O{constructor(r){super({name:"NoSuchDelegationSet",$fault:"client",...r});this.name="NoSuchDelegationSet",this.$fault="client",Object.setPrototypeOf(this,nI.prototype)}}class oI extends O{constructor(r){super({name:"TooManyHostedZones",$fault:"client",...r});this.name="TooManyHostedZones",this.$fault="client",Object.setPrototypeOf(this,oI.prototype)}}class aI extends O{constructor(r){super({name:"InvalidArgument",$fault:"client",...r});this.name="InvalidArgument",this.$fault="client",Object.setPrototypeOf(this,aI.prototype)}}class pI extends O{constructor(r){super({name:"InvalidKeySigningKeyName",$fault:"client",...r});this.name="InvalidKeySigningKeyName",this.$fault="client",Object.setPrototypeOf(this,pI.prototype)}}class uI extends O{constructor(r){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...r});this.name="KeySigningKeyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,uI.prototype)}}class tI extends O{constructor(r){super({name:"TooManyKeySigningKeys",$fault:"client",...r});this.name="TooManyKeySigningKeys",this.$fault="client",Object.setPrototypeOf(this,tI.prototype)}}class r2 extends O{constructor(r){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...r});this.name="InsufficientCloudWatchLogsResourcePolicy",this.$fault="client",Object.setPrototypeOf(this,r2.prototype)}}class f2 extends O{constructor(r){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...r});this.name="NoSuchCloudWatchLogsLogGroup",this.$fault="client",Object.setPrototypeOf(this,f2.prototype)}}class s2 extends O{constructor(r){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...r});this.name="QueryLoggingConfigAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,s2.prototype)}}class w2 extends O{constructor(r){super({name:"DelegationSetAlreadyCreated",$fault:"client",...r});this.name="DelegationSetAlreadyCreated",this.$fault="client",Object.setPrototypeOf(this,w2.prototype)}}class h2 extends O{constructor(r){super({name:"DelegationSetAlreadyReusable",$fault:"client",...r});this.name="DelegationSetAlreadyReusable",this.$fault="client",Object.setPrototypeOf(this,h2.prototype)}}class $2 extends O{constructor(r){super({name:"HostedZoneNotFound",$fault:"client",...r});this.name="HostedZoneNotFound",this.$fault="client",Object.setPrototypeOf(this,$2.prototype)}}class E2 extends O{constructor(r){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...r});this.name="InvalidTrafficPolicyDocument",this.$fault="client",Object.setPrototypeOf(this,E2.prototype)}}class I2 extends O{constructor(r){super({name:"TooManyTrafficPolicies",$fault:"client",...r});this.name="TooManyTrafficPolicies",this.$fault="client",Object.setPrototypeOf(this,I2.prototype)}}class F2 extends O{constructor(r){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,F2.prototype)}}class U2 extends O{constructor(r){super({name:"NoSuchTrafficPolicy",$fault:"client",...r});this.name="NoSuchTrafficPolicy",this.$fault="client",Object.setPrototypeOf(this,U2.prototype)}}class G2 extends O{constructor(r){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...r});this.name="TooManyTrafficPolicyInstances",this.$fault="client",Object.setPrototypeOf(this,G2.prototype)}}class T2 extends O{constructor(r){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyInstanceAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,T2.prototype)}}class L2 extends O{constructor(r){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...r});this.name="TooManyTrafficPolicyVersionsForCurrentPolicy",this.$fault="client",Object.setPrototypeOf(this,L2.prototype)}}class W2 extends O{constructor(r){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...r});this.name="TooManyVPCAssociationAuthorizations",this.$fault="client",Object.setPrototypeOf(this,W2.prototype)}}class A2 extends O{constructor(r){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...r});this.name="KeySigningKeyInParentDSRecord",this.$fault="client",Object.setPrototypeOf(this,A2.prototype)}}class z2 extends O{constructor(r){super({name:"KeySigningKeyInUse",$fault:"client",...r});this.name="KeySigningKeyInUse",this.$fault="client",Object.setPrototypeOf(this,z2.prototype)}}class C2 extends O{constructor(r){super({name:"CidrCollectionInUseException",$fault:"client",...r});this.name="CidrCollectionInUseException",this.$fault="client",Object.setPrototypeOf(this,C2.prototype),this.Message=r.Message}}class R2 extends O{constructor(r){super({name:"HealthCheckInUse",$fault:"client",...r});this.name="HealthCheckInUse",this.$fault="client",Object.setPrototypeOf(this,R2.prototype)}}class P2 extends O{constructor(r){super({name:"HostedZoneNotEmpty",$fault:"client",...r});this.name="HostedZoneNotEmpty",this.$fault="client",Object.setPrototypeOf(this,P2.prototype)}}class X2 extends O{constructor(r){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...r});this.name="NoSuchQueryLoggingConfig",this.$fault="client",Object.setPrototypeOf(this,X2.prototype)}}class Y2 extends O{constructor(r){super({name:"DelegationSetInUse",$fault:"client",...r});this.name="DelegationSetInUse",this.$fault="client",Object.setPrototypeOf(this,Y2.prototype)}}class K2 extends O{constructor(r){super({name:"TrafficPolicyInUse",$fault:"client",...r});this.name="TrafficPolicyInUse",this.$fault="client",Object.setPrototypeOf(this,K2.prototype)}}class Z2 extends O{constructor(r){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...r});this.name="NoSuchTrafficPolicyInstance",this.$fault="client",Object.setPrototypeOf(this,Z2.prototype)}}class S2 extends O{constructor(r){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...r});this.name="VPCAssociationAuthorizationNotFound",this.$fault="client",Object.setPrototypeOf(this,S2.prototype)}}class J2 extends O{constructor(r){super({name:"DNSSECNotFound",$fault:"client",...r});this.name="DNSSECNotFound",this.$fault="client",Object.setPrototypeOf(this,J2.prototype)}}class Q2 extends O{constructor(r){super({name:"LastVPCAssociation",$fault:"client",...r});this.name="LastVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,Q2.prototype)}}class M2 extends O{constructor(r){super({name:"VPCAssociationNotFound",$fault:"client",...r});this.name="VPCAssociationNotFound",this.$fault="client",Object.setPrototypeOf(this,M2.prototype)}}class B2 extends O{constructor(r){super({name:"HostedZonePartiallyDelegated",$fault:"client",...r});this.name="HostedZonePartiallyDelegated",this.$fault="client",Object.setPrototypeOf(this,B2.prototype)}}class V2 extends O{constructor(r){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...r});this.name="KeySigningKeyWithActiveStatusNotFound",this.$fault="client",Object.setPrototypeOf(this,V2.prototype)}}class H2 extends O{constructor(r){super({name:"NoSuchChange",$fault:"client",...r});this.name="NoSuchChange",this.$fault="client",Object.setPrototypeOf(this,H2.prototype)}}class D2 extends O{constructor(r){super({name:"NoSuchGeoLocation",$fault:"client",...r});this.name="NoSuchGeoLocation",this.$fault="client",Object.setPrototypeOf(this,D2.prototype)}}class k2 extends O{constructor(r){super({name:"IncompatibleVersion",$fault:"client",...r});this.name="IncompatibleVersion",this.$fault="client",Object.setPrototypeOf(this,k2.prototype)}}class l2 extends O{constructor(r){super({name:"HostedZoneNotPrivate",$fault:"client",...r});this.name="HostedZoneNotPrivate",this.$fault="client",Object.setPrototypeOf(this,l2.prototype)}}class N2 extends O{constructor(r){super({name:"NoSuchCidrLocationException",$fault:"client",...r});this.name="NoSuchCidrLocationException",this.$fault="client",Object.setPrototypeOf(this,N2.prototype),this.Message=r.Message}}class q2 extends O{constructor(r){super({name:"InvalidPaginationToken",$fault:"client",...r});this.name="InvalidPaginationToken",this.$fault="client",Object.setPrototypeOf(this,q2.prototype)}}class y2 extends O{constructor(r){super({name:"HealthCheckVersionMismatch",$fault:"client",...r});this.name="HealthCheckVersionMismatch",this.$fault="client",Object.setPrototypeOf(this,y2.prototype)}}class m2 extends O{constructor(r){super({name:"ConflictingTypes",$fault:"client",...r});this.name="ConflictingTypes",this.$fault="client",Object.setPrototypeOf(this,m2.prototype)}}var PM=async(r,s)=>{const f=d.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()},XM=async(r,s)=>{const f=d.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=Dr;const $=new V(lo);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(ko,r[Fr]).n(Fr));if(r[zr]!=null)$.c(c3(r[zr],s).n(zr));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},YM=async(r,s)=>{const f=d.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=Dr;const $=new V(mo);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.lc(r,"Changes","Changes",()=>Rn(r[EH],s)),r[j2]!=null)$.c(V.of(j2,String(r[j2])).n(j2));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},KM=async(r,s)=>{const f=d.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=Dr;const $=new V(oo);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[O2]!=null)$.c(An(r[O2],s).n(O2));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},ZM=async(r,s)=>{const f=d.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=Dr;const $=new V(ao);return $.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.lc(r,"AddTags","AddTags",()=>kn(r[Do],s)),$.lc(r,"RemoveTagKeys","RemoveTagKeys",()=>Dn(r[Ma],s)),h+=$.toString(),f.m("POST").h(w).b(h),f.build()},SM=async(r,s)=>{const f=d.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/cidrcollection");let h;h=Dr;const $=new V(jo);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Xr]!=null)$.c(V.of(go,r[Xr]).n(Xr));if(r[e]!=null)$.c(V.of(xo,r[e]).n(e));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},JM=async(r,s)=>{const f=d.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/healthcheck");let h;h=Dr;const $=new V(vo);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Xr]!=null)$.c(V.of(Ga,r[Xr]).n(Xr));if(r[dw]!=null)$.c(Sn(r[dw],s).n(dw));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},QM=async(r,s)=>{const f=d.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone");let h;h=Dr;const $=new V(Oo);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Xr]!=null)$.c(V.of(j6,r[Xr]).n(Xr));if(r[d2]!=null)$.c(V.of(ws,r[d2]).n(d2));if(r[b2]!=null)$.c(Jn(r[b2],s).n(b2));if(r[e]!=null)$.c(V.of(Uf,r[e]).n(e));if(r[zr]!=null)$.c(c3(r[zr],s).n(zr));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},MM=async(r,s)=>{const f=d.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/keysigningkey");let h;h=Dr;const $=new V(io);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Xr]!=null)$.c(V.of(j6,r[Xr]).n(Xr));if(r[fr]!=null)$.c(V.of(ws,r[fr]).n(fr));if(r[oT]!=null)$.c(V.of(Da,r[oT]).n(oT));if(r[e]!=null)$.c(V.of(Ha,r[e]).n(e));if(r[h0]!=null)$.c(V.of(ka,r[h0]).n(h0));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},BM=async(r,s)=>{const f=d.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/queryloggingconfig");let h;h=Dr;const $=new V(eo);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.cc(r,i2),r[fr]!=null)$.c(V.of(ws,r[fr]).n(fr));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},VM=async(r,s)=>{const f=d.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/delegationset");let h;h=Dr;const $=new V(no);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Xr]!=null)$.c(V.of(j6,r[Xr]).n(Xr));if(r[fr]!=null)$.c(V.of(ws,r[fr]).n(fr));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},HM=async(r,s)=>{const f=d.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicy");let h;h=Dr;const $=new V(uo);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(O6,r[Fr]).n(Fr));if(r[Ss]!=null)$.c(V.of(UH,r[Ss]).n(Ss));if(r[e]!=null)$.c(V.of(ma,r[e]).n(e));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},DM=async(r,s)=>{const f=d.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicyinstance");let h;h=Dr;const $=new V(po);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[fr]!=null)$.c(V.of(ws,r[fr]).n(fr));if(r[e]!=null)$.c(V.of(Uf,r[e]).n(e));if(r[mr]!=null)$.c(V.of(mr,String(r[mr])).n(mr));if($.cc(r,ph),r[v0]!=null)$.c(V.of(v0,String(r[v0])).n(v0));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},kM=async(r,s)=>{const f=d.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=Dr;const $=new V(to);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(O6,r[Fr]).n(Fr));if(r[Ss]!=null)$.c(V.of(UH,r[Ss]).n(Ss));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},lM=async(r,s)=>{const f=d.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=Dr;const $=new V(ra);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[zr]!=null)$.c(c3(r[zr],s).n(zr));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},NM=async(r,s)=>{const f=d.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()},qM=async(r,s)=>{const f=d.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()},yM=async(r,s)=>{const f=d.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()},mM=async(r,s)=>{const f=d.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()},jM=async(r,s)=>{const f=d.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()},vM=async(r,s)=>{const f=d.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()},OM=async(r,s)=>{const f=d.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()},iM=async(r,s)=>{const f=d.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()},dM=async(r,s)=>{const f=d.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()},bM=async(r,s)=>{const f=d.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=Dr;const $=new V(sa);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[zr]!=null)$.c(c3(r[zr],s).n(zr));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},cM=async(r,s)=>{const f=d.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()},_M=async(r,s)=>{const f=d.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=Dr;const $=new V(ha);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(wa,r[Fr]).n(Fr));if(r[zr]!=null)$.c(c3(r[zr],s).n(zr));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},gM=async(r,s)=>{const f=d.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()},xM=async(r,s)=>{const f=d.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()},eM=async(r,s)=>{const f=d.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()},nM=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/checkeripranges");let h;return f.m("GET").h(w).b(h),f.build()},oM=async(r,s)=>{const f=d.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()},aM=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/geolocation");const h=R({[_a]:[,r[fs]],[ga]:[,r[ss]],[sp]:[,r[hs]]});let $;return f.m("GET").h(w).q(h).b($),f.build()},pM=async(r,s)=>{const f=d.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()},uM=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheckcount");let h;return f.m("GET").h(w).b(h),f.build()},tM=async(r,s)=>{const f=d.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()},rB=async(r,s)=>{const f=d.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()},fB=async(r,s)=>{const f=d.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()},sB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzonecount");let h;return f.m("GET").h(w).b(h),f.build()},wB=async(r,s)=>{const f=d.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()},hB=async(r,s)=>{const f=d.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()},$B=async(r,s)=>{const f=d.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()},EB=async(r,s)=>{const f=d.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()},IB=async(r,s)=>{const f=d.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()},FB=async(r,s)=>{const f=d.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()},UB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstancecount");let h;return f.m("GET").h(w).b(h),f.build()},GB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),f.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=R({[$s]:[,r[or]],[th]:[,r[Yr]],[n3]:[()=>r.MaxResults!==void 0,()=>r[x3].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},TB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/cidrcollection");const h=R({[th]:[,r[Yr]],[n3]:[()=>r.MaxResults!==void 0,()=>r[x3].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},LB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/cidrcollection/{CollectionId}"),f.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=R({[th]:[,r[Yr]],[n3]:[()=>r.MaxResults!==void 0,()=>r[x3].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},WB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/geolocations");const h=R({[wp]:[,r[Ba]],[hp]:[,r[Va]],[$p]:[,r[ya]],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},AB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheck");const h=R({[i6]:[,r[O0]],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},zB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone");const h=R({[i6]:[,r[O0]],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()],[xa]:[,r[d2]],[aa]:[,r[Wa]]});let $;return f.m("GET").h(w).q(h).b($),f.build()},CB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzonesbyname");const h=R({[ea]:[,r[Uf]],[e3]:[,r[fr]],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},RB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzonesbyvpc");const h=R({[Up]:[,k(r[d3],"VPCId")],[Tp]:[,k(r[b3],"VPCRegion")],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()],[th]:[,r[Yr]]});let $;return f.m("GET").h(w).q(h).b($),f.build()},PB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/queryloggingconfig");const h=R({[e3]:[,r[fr]],[th]:[,r[Yr]],[n3]:[()=>r.MaxResults!==void 0,()=>r[x3].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},XB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=R({[ua]:[,r[Na]],[Ep]:[,r[qa]],[pa]:[,r[la]],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},YB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/delegationset");const h=R({[i6]:[,r[O0]],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},KB=async(r,s)=>{const f=d.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()},ZB=async(r,s)=>{const f=d.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=Dr;const $=new V(za);return $.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.lc(r,"ResourceIds","ResourceIds",()=>ln(r[Xa],s)),h+=$.toString(),f.m("POST").h(w).b(h),f.build()},SB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicies");const h=R({[Ip]:[,r[a2]],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},JB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstances");const h=R({[e3]:[,r[sw]],[d6]:[,r[i0]],[b6]:[,r[d0]],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},QB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstances/hostedzone");const h=R({[GH]:[,k(r[fr],"HostedZoneId")],[d6]:[,r[i0]],[b6]:[,r[d0]],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},MB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");const h=R({[GH]:[,k(r[ph],"TrafficPolicyId")],[Gp]:[k(r.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>r[v0].toString()],[e3]:[,r[sw]],[d6]:[,r[i0]],[b6]:[,r[d0]],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},BB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicies/{Id}/versions"),f.p("Id",()=>r.Id,"{Id}",!1);const h=R({[Fp]:[,r[p2]],[c0]:[()=>r.MaxItems!==void 0,()=>r[o].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},VB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=R({[th]:[,r[Yr]],[n3]:[()=>r.MaxResults!==void 0,()=>r[x3].toString()]});let $;return f.m("GET").h(w).q(h).b($),f.build()},HB=async(r,s)=>{const f=d.requestBuilder(r,s),w={};f.bp("/2013-04-01/testdnsanswer");const h=R({[e3]:[,k(r[fr],"HostedZoneId")],[ta]:[,k(r[e2],"RecordName")],[rp]:[,k(r[n2],"RecordType")],[fp]:[,r[Pa]],[na]:[,r[$a]],[oa]:[,r[Ea]]});let $;return f.m("GET").h(w).q(h).b($),f.build()},DB=async(r,s)=>{const f=d.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=Dr;const $=new V(Oa);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[rs]!=null)$.c(aV(r[rs],s).n(rs));if($.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>pV(r[Dw],s)),r[wf]!=null)$.c(V.of(wf,String(r[wf])).n(wf));if(r[hf]!=null)$.c(V.of(hf,String(r[hf])).n(hf));if(r[$f]!=null)$.c(V.of($f,String(r[$f])).n($f));if($.cc(r,q3),r[Nw]!=null)$.c(V.of(Nw,String(r[Nw])).n(Nw));if(r[Ef]!=null)$.c(V.of(Ef,String(r[Ef])).n(Ef));if($.cc(r,ww),$.cc(r,j3),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));return $.lc(r,"Regions","Regions",()=>uV(r[kw],s)),$.lc(r,"ResetElements","ResetElements",()=>Qn(r[Ra],s)),$.cc(r,v3),$.cc(r,i3),h+=$.toString(),f.m("POST").h(w).b(h),f.build()},kB=async(r,s)=>{const f=d.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=Dr;const $=new V(ia);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(v6,r[Fr]).n(Fr));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},lB=async(r,s)=>{const f=d.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=Dr;const $=new V(da);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(O6,r[Fr]).n(Fr));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},NB=async(r,s)=>{const f=d.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=Dr;const $=new V(ba);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[mr]!=null)$.c(V.of(mr,String(r[mr])).n(mr));if($.cc(r,ph),r[v0]!=null)$.c(V.of(v0,String(r[v0])).n(v0));return h+=$.toString(),f.m("POST").h(w).b(h),f.build()},qB=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);return f},yB=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);return f},mB=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Gr]!=null)f[Gr]=G(w[Gr]);return f},jB=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);return f},vB=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)});return await _r(r.body,s),f},OB=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r),[Bs]:[,r.headers[$s]]}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[mT]!=null)f[mT]=dn(w[mT],s);return f},iB=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r),[Bs]:[,r.headers[$s]]}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Gf]!=null)f[Gf]=fF(w[Gf],s);return f},dB=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r),[Bs]:[,r.headers[$s]]}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);if(w[U0]!=null)f[U0]=_3(w[U0],s);if(w[P0]!=null)f[P0]=sF(w[P0],s);if(w[zr]!=null)f[zr]=m6(w[zr],s);return f},bB=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r),[Bs]:[,r.headers[$s]]}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);if(w[aT]!=null)f[aT]=sH(w[aT],s);return f},cB=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r),[Bs]:[,r.headers[$s]]}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[hw]!=null)f[hw]=q6(w[hw],s);return f},_B=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r),[Bs]:[,r.headers[$s]]}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[U0]!=null)f[U0]=_3(w[U0],s);return f},gB=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r),[Bs]:[,r.headers[$s]]}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[G0]!=null)f[G0]=g3(w[G0],s);return f},xB=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r),[Bs]:[,r.headers[$s]]}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[$0]!=null)f[$0]=wF(w[$0],s);return f},eB=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r),[Bs]:[,r.headers[$s]]}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[G0]!=null)f[G0]=g3(w[G0],s);return f},nB=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[fr]!=null)f[fr]=G(w[fr]);if(w[zr]!=null)f[zr]=m6(w[zr],s);return f},oB=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);return f},aB=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)});return await _r(r.body,s),f},pB=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)});return await _r(r.body,s),f},uB=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);return f},tB=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);return f},rV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)});return await _r(r.body,s),f},fV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)});return await _r(r.body,s),f},sV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)});return await _r(r.body,s),f},wV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)});return await _r(r.body,s),f},hV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)});return await _r(r.body,s),f},$V=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);return f},EV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);return f},IV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);return f},FV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Zs]!=null)f[Zs]=gr(w[Zs]);if(w[Js]!=null)f[Js]=Nn(w[Js],s);return f},UV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=b0(w[wr],s);return f},GV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.CheckerIpRanges==="")f[R3]=[];else if(w[R3]!=null&&w[R3][Tf]!=null)f[R3]=mn(Tr(w[R3][Tf]),s);return f},TV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.KeySigningKeys==="")f[J3]=[];else if(w[J3]!=null&&w[J3][Tf]!=null)f[J3]=To(Tr(w[J3][Tf]),s);if(w[h0]!=null)f[h0]=pn(w[h0],s);return f},LV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[y3]!=null)f[y3]=tV(w[y3],s);return f},WV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Gf]!=null)f[Gf]=fF(w[Gf],s);return f},AV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[xT]!=null)f[xT]=gr(w[xT]);return f},zV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.HealthCheckObservations==="")f[pf]=[];else if(w[pf]!=null&&w[pf][u2]!=null)f[pf]=rH(Tr(w[pf][u2]),s);return f},CV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.HealthCheckObservations==="")f[pf]=[];else if(w[pf]!=null&&w[pf][u2]!=null)f[pf]=rH(Tr(w[pf][u2]),s);return f},RV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[U0]!=null)f[U0]=_3(w[U0],s);if(w[P0]!=null)f[P0]=sF(w[P0],s);if(w.VPCs==="")f[tf]=[];else if(w[tf]!=null&&w[tf][zr]!=null)f[tf]=$H(Tr(w[tf][zr]),s);return f},PV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[eT]!=null)f[eT]=gr(w[eT]);return f},XV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Zs]!=null)f[Zs]=gr(w[Zs]);if(w[Js]!=null)f[Js]=Io(w[Js],s);return f},YV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[hw]!=null)f[hw]=q6(w[hw],s);return f},KV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[U0]!=null)f[U0]=_3(w[U0],s);return f},ZV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Zs]!=null)f[Zs]=gr(w[Zs]);if(w[Js]!=null)f[Js]=Ko(w[Js],s);return f},SV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[G0]!=null)f[G0]=g3(w[G0],s);return f},JV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[$0]!=null)f[$0]=wF(w[$0],s);return f},QV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[D6]!=null)f[D6]=hr(w[D6]);return f},MV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.CidrBlocks==="")f[z3]=[];else if(w[z3]!=null&&w[z3][Tf]!=null)f[z3]=vn(Tr(w[z3][Tf]),s);if(w[Yr]!=null)f[Yr]=G(w[Yr]);return f},BV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.CidrCollections==="")f[C3]=[];else if(w[C3]!=null&&w[C3][Tf]!=null)f[C3]=_n(Tr(w[C3][Tf]),s);if(w[Yr]!=null)f[Yr]=G(w[Yr]);return f},VV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.CidrLocations==="")f[P3]=[];else if(w[P3]!=null&&w[P3][Tf]!=null)f[P3]=Lo(Tr(w[P3][Tf]),s);if(w[Yr]!=null)f[Yr]=G(w[Yr]);return f},HV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.GeoLocationDetailsList==="")f[K3]=[];else if(w[K3]!=null&&w[K3][y3]!=null)f[K3]=ro(Tr(w[K3][y3]),s);if(w[Ur]!=null)f[Ur]=lr(w[Ur]);if(w[o]!=null)f[o]=hr(w[o]);if(w[f6]!=null)f[f6]=G(w[f6]);if(w[s6]!=null)f[s6]=G(w[s6]);if(w[F6]!=null)f[F6]=G(w[F6]);return f},DV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.HealthChecks==="")f[Z3]=[];else if(w[Z3]!=null&&w[Z3][Gf]!=null)f[Z3]=$o(Tr(w[Z3][Gf]),s);if(w[Ur]!=null)f[Ur]=lr(w[Ur]);if(w[O0]!=null)f[O0]=G(w[O0]);if(w[o]!=null)f[o]=hr(w[o]);if(w[Qs]!=null)f[Qs]=G(w[Qs]);return f},kV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.HostedZones==="")f[uf]=[];else if(w[uf]!=null&&w[uf][P0]!=null)f[uf]=fH(Tr(w[uf][P0]),s);if(w[Ur]!=null)f[Ur]=lr(w[Ur]);if(w[O0]!=null)f[O0]=G(w[O0]);if(w[o]!=null)f[o]=hr(w[o]);if(w[Qs]!=null)f[Qs]=G(w[Qs]);return f},lV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Uf]!=null)f[Uf]=G(w[Uf]);if(w[fr]!=null)f[fr]=G(w[fr]);if(w.HostedZones==="")f[uf]=[];else if(w[uf]!=null&&w[uf][P0]!=null)f[uf]=fH(Tr(w[uf][P0]),s);if(w[Ur]!=null)f[Ur]=lr(w[Ur]);if(w[o]!=null)f[o]=hr(w[o]);if(w[w6]!=null)f[w6]=G(w[w6]);if(w[h6]!=null)f[h6]=G(w[h6]);return f},NV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.HostedZoneSummaries==="")f[S3]=[];else if(w[S3]!=null&&w[S3][WM]!=null)f[S3]=Uo(Tr(w[S3][WM]),s);if(w[o]!=null)f[o]=hr(w[o]);if(w[Yr]!=null)f[Yr]=G(w[Yr]);return f},qV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Yr]!=null)f[Yr]=G(w[Yr]);if(w.QueryLoggingConfigs==="")f[M3]=[];else if(w[M3]!=null&&w[M3][hw]!=null)f[M3]=Ao(Tr(w[M3][hw]),s);return f},yV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=lr(w[Ur]);if(w[o]!=null)f[o]=hr(w[o]);if(w[$6]!=null)f[$6]=G(w[$6]);if(w[E6]!=null)f[E6]=G(w[E6]);if(w[I6]!=null)f[I6]=G(w[I6]);if(w.ResourceRecordSets==="")f[V3]=[];else if(w[V3]!=null&&w[V3][nh]!=null)f[V3]=Xo(Tr(w[V3][nh]),s);return f},mV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.DelegationSets==="")f[X3]=[];else if(w[X3]!=null&&w[X3][U0]!=null)f[X3]=nn(Tr(w[X3][U0]),s);if(w[Ur]!=null)f[Ur]=lr(w[Ur]);if(w[O0]!=null)f[O0]=G(w[O0]);if(w[o]!=null)f[o]=hr(w[o]);if(w[Qs]!=null)f[Qs]=G(w[Qs]);return f},jV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[O3]!=null)f[O3]=hH(w[O3],s);return f},vV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w.ResourceTagSets==="")f[H3]=[];else if(w[H3]!=null&&w[H3][O3]!=null)f[H3]=Yo(Tr(w[H3][O3]),s);return f},OV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=lr(w[Ur]);if(w[o]!=null)f[o]=hr(w[o]);if(w[a2]!=null)f[a2]=G(w[a2]);if(w.TrafficPolicySummaries==="")f[D3]=[];else if(w[D3]!=null&&w[D3][RM]!=null)f[D3]=Mo(Tr(w[D3][RM]),s);return f},iV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[sw]!=null)f[sw]=G(w[sw]);if(w[Ur]!=null)f[Ur]=lr(w[Ur]);if(w[o]!=null)f[o]=hr(w[o]);if(w[i0]!=null)f[i0]=G(w[i0]);if(w[d0]!=null)f[d0]=G(w[d0]);if(w.TrafficPolicyInstances==="")f[w0]=[];else if(w[w0]!=null&&w[w0][$0]!=null)f[w0]=y6(Tr(w[w0][$0]),s);return f},dV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=lr(w[Ur]);if(w[o]!=null)f[o]=hr(w[o]);if(w[i0]!=null)f[i0]=G(w[i0]);if(w[d0]!=null)f[d0]=G(w[d0]);if(w.TrafficPolicyInstances==="")f[w0]=[];else if(w[w0]!=null&&w[w0][$0]!=null)f[w0]=y6(Tr(w[w0][$0]),s);return f},bV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[sw]!=null)f[sw]=G(w[sw]);if(w[Ur]!=null)f[Ur]=lr(w[Ur]);if(w[o]!=null)f[o]=hr(w[o]);if(w[i0]!=null)f[i0]=G(w[i0]);if(w[d0]!=null)f[d0]=G(w[d0]);if(w.TrafficPolicyInstances==="")f[w0]=[];else if(w[w0]!=null&&w[w0][$0]!=null)f[w0]=y6(Tr(w[w0][$0]),s);return f},cV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=lr(w[Ur]);if(w[o]!=null)f[o]=hr(w[o]);if(w.TrafficPolicies==="")f[k3]=[];else if(w[k3]!=null&&w[k3][G0]!=null)f[k3]=Qo(Tr(w[k3][G0]),s);if(w[p2]!=null)f[p2]=G(w[p2]);return f},_V=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[fr]!=null)f[fr]=G(w[fr]);if(w[Yr]!=null)f[Yr]=G(w[Yr]);if(w.VPCs==="")f[tf]=[];else if(w[tf]!=null&&w[tf][zr]!=null)f[tf]=$H(Tr(w[tf][zr]),s);return f},gV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[U6]!=null)f[U6]=G(w[U6]);if(w[C6]!=null)f[C6]=G(w[C6]);if(w.RecordData==="")f[B3]=[];else if(w[B3]!=null&&w[B3][zM]!=null)f[B3]=zo(Tr(w[B3][zM]),s);if(w[e2]!=null)f[e2]=G(w[e2]);if(w[n2]!=null)f[n2]=G(w[n2]);if(w[R6]!=null)f[R6]=G(w[R6]);return f},xV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[Gf]!=null)f[Gf]=fF(w[Gf],s);return f},eV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[P0]!=null)f[P0]=sF(w[P0],s);return f},nV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[G0]!=null)f[G0]=g3(w[G0],s);return f},oV=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,s);const f=R({$metadata:J(r)}),w=k(i(await _.parseXmlBody(r.body,s)),"body");if(w[$0]!=null)f[$0]=wF(w[$0],s);return f},b=async(r,s)=>{const f={...r,body:await _.parseXmlErrorBody(r.body,s)},w=_.loadRestXmlErrorCode(r,f.body);switch(w){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await fe(f,s);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await Se(f,s);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await Me(f,s);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await Qe(f,s);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await Ve(f,s);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await ge(f,s);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await se(f,s);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await De(f,s);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await me(f,s);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await _e(f,s);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await oe(f,s);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await ae(f,s);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await pe(f,s);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await px(f,s);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await re(f,s);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await ve(f,s);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await Ke(f,s);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await ce(f,s);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await te(f,s);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await ux(f,s);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await Ge(f,s);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await rn(f,s);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await Ie(f,s);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await Fe(f,s);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await We(f,s);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await Ze(f,s);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await de(f,s);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await fn(f,s);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await Ye(f,s);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await Je(f,s);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await ke(f,s);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await sn(f,s);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await Xe(f,s);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await ie(f,s);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await ue(f,s);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await he(f,s);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await $e(f,s);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await ze(f,s);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await He(f,s);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await wn(f,s);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await In(f,s);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await ee(f,s);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await hn(f,s);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await Fn(f,s);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await $n(f,s);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await En(f,s);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await le(f,s);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await Ne(f,s);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await tx(f,s);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await Te(f,s);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await Ae(f,s);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await xe(f,s);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await Ee(f,s);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await Un(f,s);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await ne(f,s);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await Gn(f,s);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await Ue(f,s);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await ye(f,s);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await Tn(f,s);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await Re(f,s);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await qe(f,s);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await je(f,s);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await be(f,s);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await Pe(f,s);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await Ce(f,s);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await Oe(f,s);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await Be(f,s);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await Le(f,s);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await we(f,s);default:const h=f.body;return ax({output:r,parsedBody:h.Error,errorCode:w})}},ax=qf(O),px=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[Sr]!=null)f[Sr]=G(w[Sr]);const h=new yI({$metadata:J(r),...f});return H(h,r.body.Error)},ux=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[Sr]!=null)f[Sr]=G(w[Sr]);const h=new dI({$metadata:J(r),...f});return H(h,r.body.Error)},tx=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[Sr]!=null)f[Sr]=G(w[Sr]);const h=new C2({$metadata:J(r),...f});return H(h,r.body.Error)},re=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[Sr]!=null)f[Sr]=G(w[Sr]);const h=new mI({$metadata:J(r),...f});return H(h,r.body.Error)},fe=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new ZI({$metadata:J(r),...f});return H(h,r.body.Error)},se=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new VI({$metadata:J(r),...f});return H(h,r.body.Error)},we=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new m2({$metadata:J(r),...f});return H(h,r.body.Error)},he=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new w2({$metadata:J(r),...f});return H(h,r.body.Error)},$e=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new h2({$metadata:J(r),...f});return H(h,r.body.Error)},Ee=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new Y2({$metadata:J(r),...f});return H(h,r.body.Error)},Ie=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new _I({$metadata:J(r),...f});return H(h,r.body.Error)},Fe=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new gI({$metadata:J(r),...f});return H(h,r.body.Error)},Ue=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new J2({$metadata:J(r),...f});return H(h,r.body.Error)},Ge=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new bI({$metadata:J(r),...f});return H(h,r.body.Error)},Te=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new R2({$metadata:J(r),...f});return H(h,r.body.Error)},Le=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new y2({$metadata:J(r),...f});return H(h,r.body.Error)},We=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new xI({$metadata:J(r),...f});return H(h,r.body.Error)},Ae=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new P2({$metadata:J(r),...f});return H(h,r.body.Error)},ze=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new $2({$metadata:J(r),...f});return H(h,r.body.Error)},Ce=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new l2({$metadata:J(r),...f});return H(h,r.body.Error)},Re=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new B2({$metadata:J(r),...f});return H(h,r.body.Error)},Pe=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new k2({$metadata:J(r),...f});return H(h,r.body.Error)},Xe=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new r2({$metadata:J(r),...f});return H(h,r.body.Error)},Ye=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new aI({$metadata:J(r),...f});return H(h,r.body.Error)},Ke=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);if(w.messages==="")f[N3]=[];else if(w[N3]!=null&&w[N3][Sr]!=null)f[N3]=un(Tr(w[N3][Sr]),s);const h=new vI({$metadata:J(r),...f});return H(h,r.body.Error)},Ze=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new eI({$metadata:J(r),...f});return H(h,r.body.Error)},Se=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new SI({$metadata:J(r),...f});return H(h,r.body.Error)},Je=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new pI({$metadata:J(r),...f});return H(h,r.body.Error)},Qe=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new JI({$metadata:J(r),...f});return H(h,r.body.Error)},Me=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new QI({$metadata:J(r),...f});return H(h,r.body.Error)},Be=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new q2({$metadata:J(r),...f});return H(h,r.body.Error)},Ve=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new MI({$metadata:J(r),...f});return H(h,r.body.Error)},He=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new E2({$metadata:J(r),...f});return H(h,r.body.Error)},De=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new HI({$metadata:J(r),...f});return H(h,r.body.Error)},ke=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new uI({$metadata:J(r),...f});return H(h,r.body.Error)},le=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new A2({$metadata:J(r),...f});return H(h,r.body.Error)},Ne=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new z2({$metadata:J(r),...f});return H(h,r.body.Error)},qe=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new V2({$metadata:J(r),...f});return H(h,r.body.Error)},ye=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new Q2({$metadata:J(r),...f});return H(h,r.body.Error)},me=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new DI({$metadata:J(r),...f});return H(h,r.body.Error)},je=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new H2({$metadata:J(r),...f});return H(h,r.body.Error)},ve=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[Sr]!=null)f[Sr]=G(w[Sr]);const h=new jI({$metadata:J(r),...f});return H(h,r.body.Error)},Oe=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[Sr]!=null)f[Sr]=G(w[Sr]);const h=new N2({$metadata:J(r),...f});return H(h,r.body.Error)},ie=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new f2({$metadata:J(r),...f});return H(h,r.body.Error)},de=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new nI({$metadata:J(r),...f});return H(h,r.body.Error)},be=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new D2({$metadata:J(r),...f});return H(h,r.body.Error)},ce=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new OI({$metadata:J(r),...f});return H(h,r.body.Error)},_e=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new kI({$metadata:J(r),...f});return H(h,r.body.Error)},ge=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new BI({$metadata:J(r),...f});return H(h,r.body.Error)},xe=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new X2({$metadata:J(r),...f});return H(h,r.body.Error)},ee=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new U2({$metadata:J(r),...f});return H(h,r.body.Error)},ne=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new Z2({$metadata:J(r),...f});return H(h,r.body.Error)},oe=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new lI({$metadata:J(r),...f});return H(h,r.body.Error)},ae=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new NI({$metadata:J(r),...f});return H(h,r.body.Error)},pe=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new qI({$metadata:J(r),...f});return H(h,r.body.Error)},ue=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new s2({$metadata:J(r),...f});return H(h,r.body.Error)},te=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new iI({$metadata:J(r),...f});return H(h,r.body.Error)},rn=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new cI({$metadata:J(r),...f});return H(h,r.body.Error)},fn=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new oI({$metadata:J(r),...f});return H(h,r.body.Error)},sn=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new tI({$metadata:J(r),...f});return H(h,r.body.Error)},wn=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new I2({$metadata:J(r),...f});return H(h,r.body.Error)},hn=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new G2({$metadata:J(r),...f});return H(h,r.body.Error)},$n=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new L2({$metadata:J(r),...f});return H(h,r.body.Error)},En=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new W2({$metadata:J(r),...f});return H(h,r.body.Error)},In=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new F2({$metadata:J(r),...f});return H(h,r.body.Error)},Fn=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new T2({$metadata:J(r),...f});return H(h,r.body.Error)},Un=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new K2({$metadata:J(r),...f});return H(h,r.body.Error)},Gn=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new S2({$metadata:J(r),...f});return H(h,r.body.Error)},Tn=async(r,s)=>{const f=R({}),w=r.body.Error;if(w[P]!=null)f[P]=G(w[P]);const h=new M2({$metadata:J(r),...f});return H(h,r.body.Error)},aV=(r,s)=>{const f=new V(rs);if(r[jr]!=null)f.c(V.of(fa,r[jr]).n(jr));if(r[e]!=null)f.c(V.of(Ho,r[e]).n(e));return f},Ln=(r,s)=>{const f=new V(mw);if(r[fr]!=null)f.c(V.of(ws,r[fr]).n(fr));if(f.cc(r,Uf),r[ch]!=null)f.c(V.of(Vo,String(r[ch])).n(ch));return f},Wn=(r,s)=>{const f=new V(IH);if(r[ih]!=null)f.c(V.of(No,r[ih]).n(ih));if(r[nh]!=null)f.c(Vn(r[nh],s).n(nh));return f},An=(r,s)=>{const f=new V(O2);if(r[Fr]!=null)f.c(V.of(v6,r[Fr]).n(Fr));return f.lc(r,"Changes","Changes",()=>zn(r[EH],s)),f},zn=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return Wn(f,s).n(IH)})},pV=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return V.of(m3,f).n(N6)})},Cn=(r,s)=>{const f=new V(qo);if(r[or]!=null)f.c(V.of(co,r[or]).n(or));if(r[ih]!=null)f.c(V.of(yo,r[ih]).n(ih));return f.lc(r,"CidrList","CidrList",()=>Pn(r[_o],s)),f},Rn=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return Cn(f,s).n(Tf)})},Pn=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return V.of(TM,f).n(TM)})},Xn=(r,s)=>{const f=new V(jw);if(r[bh]!=null)f.c(V.of(ca,r[bh]).n(bh));if(r[or]!=null)f.c(V.of(bo,r[or]).n(or));return f},Yn=(r,s)=>{const f=new V(vw);return f.cc(r,_2),f.cc(r,g2),f},Kn=(r,s)=>{const f=new V(Ow);if(r[fs]!=null)f.c(V.of(Ia,r[fs]).n(fs));if(r[ss]!=null)f.c(V.of(Fa,r[ss]).n(ss));if(r[hs]!=null)f.c(V.of(Ua,r[hs]).n(hs));return f},Zn=(r,s)=>{const f=new V(iw);if(f.cc(r,v2),f.cc(r,c2),r[vw]!=null)f.c(Yn(r[vw],s).n(vw));if(r[lw]!=null)f.c(V.of(lw,String(r[lw])).n(lw));return f},Sn=(r,s)=>{const f=new V(dw);if(f.cc(r,ww),r[Ff]!=null)f.c(V.of(Ff,String(r[Ff])).n(Ff));if(r[Ar]!=null)f.c(V.of(La,r[Ar]).n(Ar));if(f.cc(r,v3),f.cc(r,q3),f.cc(r,i3),r[yw]!=null)f.c(V.of(yw,String(r[yw])).n(yw));if(r[$f]!=null)f.c(V.of($f,String(r[$f])).n($f));if(r[qw]!=null)f.c(V.of(qw,String(r[qw])).n(qw));if(r[If]!=null)f.c(V.of(If,String(r[If])).n(If));if(r[wf]!=null)f.c(V.of(wf,String(r[wf])).n(wf));if(r[Ef]!=null)f.c(V.of(Ef,String(r[Ef])).n(Ef));if(f.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>pV(r[Dw],s)),r[hf]!=null)f.c(V.of(hf,String(r[hf])).n(hf));if(f.lc(r,"Regions","Regions",()=>uV(r[kw],s)),r[rs]!=null)f.c(aV(r[rs],s).n(rs));return f.cc(r,j3),f.cc(r,x2),f},uV=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return V.of(Ta,f).n(jr)})},Jn=(r,s)=>{const f=new V(b2);if(r[Fr]!=null)f.c(V.of(v6,r[Fr]).n(Fr));if(r[eh]!=null)f.c(V.of(Aa,String(r[eh])).n(eh));return f},Qn=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return V.of(CM,f).n(CM)})},Mn=(r,s)=>{const f=new V(t2);if(r[Kr]!=null)f.c(V.of(Ca,r[Kr]).n(Kr));return f},Bn=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return Mn(f,s).n(t2)})},Vn=(r,s)=>{const f=new V(nh);if(r[e]!=null)f.c(V.of(Uf,r[e]).n(e));if(r[Ar]!=null)f.c(V.of(Qa,r[Ar]).n(Ar));if(r[oh]!=null)f.c(V.of(Ka,r[oh]).n(oh));if(r[uh]!=null)f.c(V.of(Ja,String(r[uh])).n(uh));if(r[jr]!=null)f.c(V.of(Sa,r[jr]).n(jr));if(r[Ow]!=null)f.c(Kn(r[Ow],s).n(Ow));if(r[_h]!=null)f.c(V.of(Ya,r[_h]).n(_h));if(r[xh]!=null)f.c(V.of(Za,String(r[xh])).n(xh));if(r[mr]!=null)f.c(V.of(mr,String(r[mr])).n(mr));if(f.lc(r,"ResourceRecords","ResourceRecords",()=>Bn(r[Oh],s)),r[mw]!=null)f.c(Ln(r[mw],s).n(mw));if(f.cc(r,m3),f.cc(r,o2),r[jw]!=null)f.c(Xn(r[jw],s).n(jw));if(r[iw]!=null)f.c(Zn(r[iw],s).n(iw));return f},Hn=(r,s)=>{const f=new V(rF);if(r[bw]!=null)f.c(V.of(FH,r[bw]).n(bw));if(r[Kr]!=null)f.c(V.of(va,r[Kr]).n(Kr));return f},Dn=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return V.of(FH,f).n(bw)})},kn=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return Hn(f,s).n(rF)})},ln=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return V.of(ja,f).n(ws)})},c3=(r,s)=>{const f=new V(zr);return f.cc(r,b3),f.cc(r,d3),f},Nn=(r,s)=>{const f={};if(r[Ar]!=null)f[Ar]=G(r[Ar]);if(r[Kr]!=null)f[Kr]=gr(r[Kr]);return f},qn=(r,s)=>{const f={};if(r[jr]!=null)f[jr]=G(r[jr]);if(r[e]!=null)f[e]=G(r[e]);return f},yn=(r,s)=>{const f={};if(r[fr]!=null)f[fr]=G(r[fr]);if(r[Uf]!=null)f[Uf]=G(r[Uf]);if(r[ch]!=null)f[ch]=lr(r[ch]);return f},b0=(r,s)=>{const f={};if(r[Gr]!=null)f[Gr]=G(r[Gr]);if(r[h0]!=null)f[h0]=G(r[h0]);if(r[Y6]!=null)f[Y6]=k(Kw(r[Y6]));if(r[Fr]!=null)f[Fr]=G(r[Fr]);return f},mn=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return G(f)})},jn=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return G(f)})},vn=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return On(f,s)})},On=(r,s)=>{const f={};if(r[HT]!=null)f[HT]=G(r[HT]);if(r[or]!=null)f[or]=G(r[or]);return f},dn=(r,s)=>{const f={};if(r[dh]!=null)f[dh]=G(r[dh]);if(r[Gr]!=null)f[Gr]=G(r[Gr]);if(r[e]!=null)f[e]=G(r[e]);if(r[Ms]!=null)f[Ms]=gr(r[Ms]);return f},bn=(r,s)=>{const f={};if(r[bh]!=null)f[bh]=G(r[bh]);if(r[or]!=null)f[or]=G(r[or]);return f},cn=(r,s)=>{const f={};if(r[_T]!=null)f[_T]=hr(r[_T]);if(r[l6]!=null)f[l6]=wY(r[l6]);if(r[NT]!=null)f[NT]=G(r[NT]);if(r[z6]!=null)f[z6]=hr(r[z6]);if(r[r6]!=null)f[r6]=G(r[r6]);if(r[G6]!=null)f[G6]=G(r[G6]);if(r[B6]!=null)f[B6]=G(r[B6]);if(r.Dimensions==="")f[Y3]=[];else if(r[Y3]!=null&&r[Y3][LM]!=null)f[Y3]=an(Tr(r[Y3][LM]),s);return f},_n=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return gn(f,s)})},gn=(r,s)=>{const f={};if(r[dh]!=null)f[dh]=G(r[dh]);if(r[Gr]!=null)f[Gr]=G(r[Gr]);if(r[e]!=null)f[e]=G(r[e]);if(r[Ms]!=null)f[Ms]=gr(r[Ms]);return f},xn=(r,s)=>{const f={};if(r[_2]!=null)f[_2]=G(r[_2]);if(r[g2]!=null)f[g2]=G(r[g2]);return f},_3=(r,s)=>{const f={};if(r[Gr]!=null)f[Gr]=G(r[Gr]);if(r[Xr]!=null)f[Xr]=G(r[Xr]);if(r.NameServers==="")f[Q3]=[];else if(r[Q3]!=null&&r[Q3][AM]!=null)f[Q3]=en(Tr(r[Q3][AM]),s);return f},en=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return G(f)})},nn=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return _3(f,s)})},on=(r,s)=>{const f={};if(r[e]!=null)f[e]=G(r[e]);if(r[Kr]!=null)f[Kr]=G(r[Kr]);return f},an=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return on(f,s)})},pn=(r,s)=>{const f={};if(r[M6]!=null)f[M6]=G(r[M6]);if(r[ah]!=null)f[ah]=G(r[ah]);return f},un=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return G(f)})},tn=(r,s)=>{const f={};if(r[fs]!=null)f[fs]=G(r[fs]);if(r[ss]!=null)f[ss]=G(r[ss]);if(r[hs]!=null)f[hs]=G(r[hs]);return f},tV=(r,s)=>{const f={};if(r[fs]!=null)f[fs]=G(r[fs]);if(r[kT]!=null)f[kT]=G(r[kT]);if(r[ss]!=null)f[ss]=G(r[ss]);if(r[lT]!=null)f[lT]=G(r[lT]);if(r[hs]!=null)f[hs]=G(r[hs]);if(r[S6]!=null)f[S6]=G(r[S6]);return f},ro=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return tV(f,s)})},fo=(r,s)=>{const f={};if(r[v2]!=null)f[v2]=G(r[v2]);if(r[c2]!=null)f[c2]=G(r[c2]);if(r[vw]!=null)f[vw]=xn(r[vw],s);if(r[lw]!=null)f[lw]=hr(r[lw]);return f},fF=(r,s)=>{const f={};if(r[Gr]!=null)f[Gr]=G(r[Gr]);if(r[Xr]!=null)f[Xr]=G(r[Xr]);if(r[gh]!=null)f[gh]=wH(r[gh],s);if(r[dw]!=null)f[dw]=so(r[dw],s);if(r[Nw]!=null)f[Nw]=gr(r[Nw]);if(r[yT]!=null)f[yT]=cn(r[yT],s);return f},so=(r,s)=>{const f={};if(r[ww]!=null)f[ww]=G(r[ww]);if(r[Ff]!=null)f[Ff]=hr(r[Ff]);if(r[Ar]!=null)f[Ar]=G(r[Ar]);if(r[v3]!=null)f[v3]=G(r[v3]);if(r[q3]!=null)f[q3]=G(r[q3]);if(r[i3]!=null)f[i3]=G(r[i3]);if(r[yw]!=null)f[yw]=hr(r[yw]);if(r[$f]!=null)f[$f]=hr(r[$f]);if(r[qw]!=null)f[qw]=lr(r[qw]);if(r[If]!=null)f[If]=lr(r[If]);if(r[wf]!=null)f[wf]=lr(r[wf]);if(r[Ef]!=null)f[Ef]=hr(r[Ef]);if(r.ChildHealthChecks==="")f[Dw]=[];else if(r[Dw]!=null&&r[Dw][N6]!=null)f[Dw]=jn(Tr(r[Dw][N6]),s);if(r[hf]!=null)f[hf]=lr(r[hf]);if(r.Regions==="")f[kw]=[];else if(r[kw]!=null&&r[kw][jr]!=null)f[kw]=ho(Tr(r[kw][jr]),s);if(r[rs]!=null)f[rs]=qn(r[rs],s);if(r[j3]!=null)f[j3]=G(r[j3]);if(r[x2]!=null)f[x2]=G(r[x2]);return f},wo=(r,s)=>{const f={};if(r[jr]!=null)f[jr]=G(r[jr]);if(r[ww]!=null)f[ww]=G(r[ww]);if(r[Q6]!=null)f[Q6]=Zo(r[Q6],s);return f},rH=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return wo(f,s)})},ho=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return G(f)})},$o=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return fF(f,s)})},sF=(r,s)=>{const f={};if(r[Gr]!=null)f[Gr]=G(r[Gr]);if(r[e]!=null)f[e]=G(r[e]);if(r[Xr]!=null)f[Xr]=G(r[Xr]);if(r[jT]!=null)f[jT]=Eo(r[jT],s);if(r[P6]!=null)f[P6]=gr(r[P6]);if(r[gh]!=null)f[gh]=wH(r[gh],s);return f},Eo=(r,s)=>{const f={};if(r[Fr]!=null)f[Fr]=G(r[Fr]);if(r[eh]!=null)f[eh]=lr(r[eh]);return f},Io=(r,s)=>{const f={};if(r[Ar]!=null)f[Ar]=G(r[Ar]);if(r[Kr]!=null)f[Kr]=gr(r[Kr]);return f},Fo=(r,s)=>{const f={};if(r[L6]!=null)f[L6]=G(r[L6]);if(r[W6]!=null)f[W6]=G(r[W6]);return f},fH=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return sF(f,s)})},Uo=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Go(f,s)})},Go=(r,s)=>{const f={};if(r[fr]!=null)f[fr]=G(r[fr]);if(r[e]!=null)f[e]=G(r[e]);if(r[T6]!=null)f[T6]=Fo(r[T6],s);return f},sH=(r,s)=>{const f={};if(r[e]!=null)f[e]=G(r[e]);if(r[nT]!=null)f[nT]=G(r[nT]);if(r[gT]!=null)f[gT]=hr(r[gT]);if(r[K6]!=null)f[K6]=G(r[K6]);if(r[Z6]!=null)f[Z6]=hr(r[Z6]);if(r[vT]!=null)f[vT]=G(r[vT]);if(r[OT]!=null)f[OT]=hr(r[OT]);if(r[pT]!=null)f[pT]=hr(r[pT]);if(r[bT]!=null)f[bT]=G(r[bT]);if(r[A6]!=null)f[A6]=G(r[A6]);if(r[dT]!=null)f[dT]=G(r[dT]);if(r[iT]!=null)f[iT]=G(r[iT]);if(r[h0]!=null)f[h0]=G(r[h0]);if(r[ah]!=null)f[ah]=G(r[ah]);if(r[DT]!=null)f[DT]=k(Kw(r[DT]));if(r[uT]!=null)f[uT]=k(Kw(r[uT]));return f},To=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return sH(f,s)})},wH=(r,s)=>{const f={};if(r[J6]!=null)f[J6]=G(r[J6]);if(r[cT]!=null)f[cT]=G(r[cT]);return f},Lo=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Wo(f,s)})},Wo=(r,s)=>{const f={};if(r[or]!=null)f[or]=G(r[or]);return f},q6=(r,s)=>{const f={};if(r[Gr]!=null)f[Gr]=G(r[Gr]);if(r[fr]!=null)f[fr]=G(r[fr]);if(r[i2]!=null)f[i2]=G(r[i2]);return f},Ao=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return q6(f,s)})},zo=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return G(f)})},Co=(r,s)=>{const f={};if(r[Kr]!=null)f[Kr]=G(r[Kr]);return f},Ro=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Co(f,s)})},Po=(r,s)=>{const f={};if(r[e]!=null)f[e]=G(r[e]);if(r[Ar]!=null)f[Ar]=G(r[Ar]);if(r[oh]!=null)f[oh]=G(r[oh]);if(r[uh]!=null)f[uh]=gr(r[uh]);if(r[jr]!=null)f[jr]=G(r[jr]);if(r[Ow]!=null)f[Ow]=tn(r[Ow],s);if(r[_h]!=null)f[_h]=G(r[_h]);if(r[xh]!=null)f[xh]=lr(r[xh]);if(r[mr]!=null)f[mr]=gr(r[mr]);if(r.ResourceRecords==="")f[Oh]=[];else if(r[Oh]!=null&&r[Oh][t2]!=null)f[Oh]=Ro(Tr(r[Oh][t2]),s);if(r[mw]!=null)f[mw]=yn(r[mw],s);if(r[m3]!=null)f[m3]=G(r[m3]);if(r[o2]!=null)f[o2]=G(r[o2]);if(r[jw]!=null)f[jw]=bn(r[jw],s);if(r[iw]!=null)f[iw]=fo(r[iw],s);return f},Xo=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Po(f,s)})},hH=(r,s)=>{const f={};if(r[X6]!=null)f[X6]=G(r[X6]);if(r[ws]!=null)f[ws]=G(r[ws]);if(r.Tags==="")f[l3]=[];else if(r[l3]!=null&&r[l3][rF]!=null)f[l3]=Jo(Tr(r[l3][rF]),s);return f},Yo=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return hH(f,s)})},Ko=(r,s)=>{const f={};if(r[Ar]!=null)f[Ar]=G(r[Ar]);if(r[Kr]!=null)f[Kr]=gr(r[Kr]);return f},Zo=(r,s)=>{const f={};if(r[h0]!=null)f[h0]=G(r[h0]);if(r[qT]!=null)f[qT]=k(Kw(r[qT]));return f},So=(r,s)=>{const f={};if(r[bw]!=null)f[bw]=G(r[bw]);if(r[Kr]!=null)f[Kr]=G(r[Kr]);return f},Jo=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return So(f,s)})},Qo=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return g3(f,s)})},g3=(r,s)=>{const f={};if(r[Gr]!=null)f[Gr]=G(r[Gr]);if(r[Ms]!=null)f[Ms]=hr(r[Ms]);if(r[e]!=null)f[e]=G(r[e]);if(r[Ar]!=null)f[Ar]=G(r[Ar]);if(r[Ss]!=null)f[Ss]=G(r[Ss]);if(r[Fr]!=null)f[Fr]=G(r[Fr]);return f},wF=(r,s)=>{const f={};if(r[Gr]!=null)f[Gr]=G(r[Gr]);if(r[fr]!=null)f[fr]=G(r[fr]);if(r[e]!=null)f[e]=G(r[e]);if(r[mr]!=null)f[mr]=gr(r[mr]);if(r[V6]!=null)f[V6]=G(r[V6]);if(r[Sr]!=null)f[Sr]=G(r[Sr]);if(r[ph]!=null)f[ph]=G(r[ph]);if(r[v0]!=null)f[v0]=hr(r[v0]);if(r[k6]!=null)f[k6]=G(r[k6]);return f},y6=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return wF(f,s)})},Mo=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Bo(f,s)})},Bo=(r,s)=>{const f={};if(r[Gr]!=null)f[Gr]=G(r[Gr]);if(r[e]!=null)f[e]=G(r[e]);if(r[Ar]!=null)f[Ar]=G(r[Ar]);if(r[tT]!=null)f[tT]=hr(r[tT]);if(r[H6]!=null)f[H6]=hr(r[H6]);return f},m6=(r,s)=>{const f={};if(r[b3]!=null)f[b3]=G(r[b3]);if(r[d3]!=null)f[d3]=G(r[d3]);return f},$H=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return m6(f,s)})},J=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var ih="Action",Vo="AliasHealthEnabled",rs="AlarmIdentifier",Ho="AlarmName",Do="AddTags",mw="AliasTarget",ko="AssociateVPCComment",lo="AssociateVPCWithHostedZoneRequest",v2="AWSRegion",dh="Arn",lw="Bias",Fr="Comment",No="ChangeAction",O2="ChangeBatch",z3="CidrBlocks",HT="CidrBlock",fs="ContinentCode",qo="CidrCollectionChange",yo="CidrCollectionChangeAction",mo="ChangeCidrCollectionRequest",jo="CreateCidrCollectionRequest",C3="CidrCollections",ss="CountryCode",DT="CreatedDate",Dw="ChildHealthChecks",vo="CreateHealthCheckRequest",N6="ChildHealthCheck",Oo="CreateHostedZoneRequest",wr="ChangeInfo",R3="CheckerIpRanges",bh="CollectionId",io="CreateKeySigningKeyRequest",P3="CidrLocations",bo="CidrLocationNameDefaultAllowed",co="CidrLocationNameDefaultNotAllowed",_o="CidrList",go="CidrNonce",xo="CollectionName",kT="ContinentName",lT="CountryName",NT="ComparisonOperator",eo="CreateQueryLoggingConfigRequest",Xr="CallerReference",jw="CidrRoutingConfig",no="CreateReusableDelegationSetRequest",oo="ChangeResourceRecordSetsRequest",qT="CheckedTime",ao="ChangeTagsForResourceRequest",po="CreateTrafficPolicyInstanceRequest",uo="CreateTrafficPolicyRequest",to="CreateTrafficPolicyVersionRequest",j2="CollectionVersion",ra="CreateVPCAssociationAuthorizationRequest",yT="CloudWatchAlarmConfiguration",i2="CloudWatchLogsLogGroupArn",fa="CloudWatchRegion",EH="Changes",IH="Change",TM="Cidr",mT="Collection",jT="Config",vw="Coordinates",Zs="Count",Ss="Document",vT="DigestAlgorithmMnemonic",OT="DigestAlgorithmType",iT="DNSKEYRecord",Uf="DNSName",U0="DelegationSet",d2="DelegationSetId",dT="DSRecord",X3="DelegationSets",bT="DigestValue",sa="DeleteVPCAssociationAuthorizationRequest",wa="DisassociateVPCComment",ha="DisassociateVPCFromHostedZoneRequest",cT="Description",wf="Disabled",Y3="Dimensions",LM="Dimension",$a="EDNS0ClientSubnetIP",Ea="EDNS0ClientSubnetMask",_T="EvaluationPeriods",hf="EnableSNI",ch="EvaluateTargetHealth",_h="Failover",q3="FullyQualifiedDomainName",$f="FailureThreshold",gT="Flag",Ow="GeoLocation",Ia="GeoLocationContinentCode",Fa="GeoLocationCountryCode",y3="GeoLocationDetails",K3="GeoLocationDetailsList",Ua="GeoLocationSubdivisionCode",iw="GeoProximityLocation",Gf="HealthCheck",dw="HealthCheckConfig",xT="HealthCheckCount",m3="HealthCheckId",Ga="HealthCheckNonce",pf="HealthCheckObservations",u2="HealthCheckObservation",Ta="HealthCheckRegion",La="HealthCheckType",Nw="HealthCheckVersion",Z3="HealthChecks",Ef="HealthThreshold",P0="HostedZone",b2="HostedZoneConfig",eT="HostedZoneCount",fr="HostedZoneId",sw="HostedZoneIdMarker",S3="HostedZoneSummaries",WM="HostedZoneSummary",Wa="HostedZoneType",uf="HostedZones",If="Inverted",j3="InsufficientDataHealthStatus",ww="IPAddress",Aa="IsPrivateZone",Ur="IsTruncated",Gr="Id",bw="Key",nT="KmsArn",oT="KeyManagementServiceArn",aT="KeySigningKey",J3="KeySigningKeys",pT="KeyTag",Bs="Location",uT="LastModifiedDate",or="LocationName",gh="LinkedService",za="ListTagsForResourcesRequest",tT="LatestVersion",c2="LocalZoneGroup",_2="Latitude",Js="Limit",g2="Longitude",O0="Marker",o="MaxItems",qw="MeasureLatency",r6="MetricName",x3="MaxResults",xh="MultiValueAnswer",Sr="Message",e="Name",f6="NextContinentCode",s6="NextCountryCode",w6="NextDNSName",h6="NextHostedZoneId",Qs="NextMarker",$6="NextRecordIdentifier",E6="NextRecordName",I6="NextRecordType",Q3="NameServers",F6="NextSubdivisionCode",AM="NameServer",Yr="NextToken",U6="Nameserver",G6="Namespace",j6="Nonce",T6="Owner",L6="OwningAccount",W6="OwningService",Ff="Port",A6="PublicKey",eh="PrivateZone",z6="Period",C6="Protocol",hw="QueryLoggingConfig",M3="QueryLoggingConfigs",kw="Regions",R6="ResponseCode",x2="RoutingControlArn",v6="ResourceDescription",zM="RecordDataEntry",Ca="RData",B3="RecordData",Ra="ResetElements",CM="ResettableElementName",ws="ResourceId",Pa="ResolverIP",Xa="ResourceIds",yw="RequestInterval",e2="RecordName",v3="ResourcePath",t2="ResourceRecord",V3="ResourceRecordSets",P6="ResourceRecordSetCount",Ya="ResourceRecordSetFailover",Ka="ResourceRecordSetIdentifier",Za="ResourceRecordSetMultiValueAnswer",Sa="ResourceRecordSetRegion",Ja="ResourceRecordSetWeight",nh="ResourceRecordSet",Qa="RRType",Oh="ResourceRecords",n2="RecordType",Ma="RemoveTagKeys",O3="ResourceTagSet",H3="ResourceTagSets",X6="ResourceType",jr="Region",h0="Status",Y6="SubmittedAt",K6="SigningAlgorithmMnemonic",Z6="SigningAlgorithmType",hs="SubdivisionCode",Ba="StartContinentCode",Va="StartCountryCode",oh="SetIdentifier",Ha="SigningKeyName",Da="SigningKeyString",ka="SigningKeyStatus",ah="StatusMessage",S6="SubdivisionName",J6="ServicePrincipal",Q6="StatusReport",la="StartRecordIdentifier",Na="StartRecordName",qa="StartRecordType",i3="SearchString",ya="StartSubdivisionCode",M6="ServeSignature",B6="Statistic",V6="State",Ar="Type",FH="TagKey",G0="TrafficPolicy",O6="TrafficPolicyComment",H6="TrafficPolicyCount",UH="TrafficPolicyDocument",ph="TrafficPolicyId",D6="TrafficPolicyInstanceCount",o2="TrafficPolicyInstanceId",a2="TrafficPolicyIdMarker",i0="TrafficPolicyInstanceNameMarker",d0="TrafficPolicyInstanceTypeMarker",$0="TrafficPolicyInstance",w0="TrafficPolicyInstances",ma="TrafficPolicyName",D3="TrafficPolicySummaries",RM="TrafficPolicySummary",k6="TrafficPolicyType",v0="TrafficPolicyVersion",p2="TrafficPolicyVersionMarker",k3="TrafficPolicies",ja="TagResourceId",mr="TTL",va="TagValue",rF="Tag",l3="Tags",l6="Threshold",Oa="UpdateHealthCheckRequest",ia="UpdateHostedZoneCommentRequest",da="UpdateTrafficPolicyCommentRequest",ba="UpdateTrafficPolicyInstanceRequest",ca="UUID",Kr="Value",zr="VPC",d3="VPCId",b3="VPCRegion",tf="VPCs",Ms="Version",uh="Weight",_a="continentcode",ga="countrycode",xa="delegationsetid",ea="dnsname",na="edns0clientsubnetip",oa="edns0clientsubnetmask",aa="hostedzonetype",e3="hostedzoneid",pa="identifier",GH="id",$s="location",n3="maxresults",c0="maxitems",i6="marker",Tf="member",P="message",N3="messages",th="nexttoken",ua="name",ta="recordname",rp="recordtype",fp="resolverip",sp="subdivisioncode",wp="startcontinentcode",hp="startcountrycode",$p="startsubdivisioncode",Ep="type",Ip="trafficpolicyid",d6="trafficpolicyinstancename",b6="trafficpolicyinstancetype",Fp="trafficpolicyversion",Up="vpcid",Dr='<?xml version="1.0" encoding="UTF-8"?>',Gp="version",Tp="vpcregion";class c6 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(PM).de(qB).build(){}Q();B();K();class _6 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(XM).de(yB).build(){}Q();B();K();class g6 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(YM).de(mB).build(){}Q();B();K();class x6 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),FM(f),y(f)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(KM).de(jB).build(){}Q();B();K();class e6 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(ZM).de(vB).build(){}Q();B();K();class n6 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(SM).de(OB).build(){}Q();B();K();class o6 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(JM).de(iB).build(){}Q();B();K();class a6 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(QM).de(dB).build(){}Q();B();K();class p6 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(MM).de(bB).build(){}Q();B();K();class u6 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(BM).de(cB).build(){}Q();B();K();class t6 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(VM).de(_B).build(){}Q();B();K();class r4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(HM).de(gB).build(){}Q();B();K();class f4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(DM).de(xB).build(){}Q();B();K();class s4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(kM).de(eB).build(){}Q();B();K();class w4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(lM).de(nB).build(){}Q();B();K();class h4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(NM).de(oB).build(){}Q();B();K();class $4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(qM).de(aB).build(){}Q();B();K();class E4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(yM).de(pB).build(){}Q();B();K();class I4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(mM).de(uB).build(){}Q();B();K();class F4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(jM).de(tB).build(){}Q();B();K();class U4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(vM).de(rV).build(){}Q();B();K();class G4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(OM).de(fV).build(){}Q();B();K();class T4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(iM).de(sV).build(){}Q();B();K();class L4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(dM).de(wV).build(){}Q();B();K();class W4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(bM).de(hV).build(){}Q();B();K();class A4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser(cM).de($V).build(){}Q();B();K();class z4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(_M).de(EV).build(){}Q();B();K();class C4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(gM).de(IV).build(){}Q();B();K();class R4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(xM).de(FV).build(){}Q();B();K();class P4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser(eM).de(UV).build(){}Q();B();K();class X4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(nM).de(GV).build(){}Q();B();K();class Y4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser(oM).de(TV).build(){}Q();B();K();class K4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser(aM).de(LV).build(){}Q();B();K();class Z4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser(pM).de(WV).build(){}Q();B();K();class S4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser(uM).de(AV).build(){}Q();B();K();class J4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(tM).de(zV).build(){}Q();B();K();class Q4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(rB).de(CV).build(){}Q();B();K();class M4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(fB).de(RV).build(){}Q();B();K();class B4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(sB).de(PV).build(){}Q();B();K();class V4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(wB).de(XV).build(){}Q();B();K();class H4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(hB).de(YV).build(){}Q();B();K();class D4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser($B).de(KV).build(){}Q();B();K();class k4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(EB).de(ZV).build(){}Q();B();K();class l4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(IB).de(SV).build(){}Q();B();K();class N4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(FB).de(JV).build(){}Q();B();K();class q4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(UB).de(QV).build(){}Q();B();K();class y4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(GB).de(MV).build(){}Q();B();K();class m4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(TB).de(BV).build(){}Q();B();K();class j4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(LB).de(VV).build(){}Q();B();K();class v4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(WB).de(HV).build(){}Q();B();K();class O4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser(AB).de(DV).build(){}Q();B();K();class i4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(CB).de(lV).build(){}Q();B();K();class d4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(RB).de(NV).build(){}Q();B();K();class b4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(zB).de(kV).build(){}Q();B();K();class c4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(PB).de(qV).build(){}Q();B();K();class _4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(XB).de(yV).build(){}Q();B();K();class g4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(YB).de(mV).build(){}Q();B();K();class x4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(KB).de(jV).build(){}Q();B();K();class e4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(ZB).de(vV).build(){}Q();B();K();class n4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(SB).de(OV).build(){}Q();B();K();class o4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(QB).de(dV).build(){}Q();B();K();class a4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(MB).de(bV).build(){}Q();B();K();class p4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(JB).de(iV).build(){}Q();B();K();class u4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(BB).de(cV).build(){}Q();B();K();class t4 extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(VB).de(_V).build(){}Q();B();K();class rL extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(HB).de(gV).build(){}Q();B();K();class fL extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser(DB).de(xV).build(){}Q();B();K();class sL extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(kB).de(eV).build(){}Q();B();K();class wL extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser(lB).de(nV).build(){}Q();B();K();class hL extends W.classBuilder().ep({...S}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions()),y(f)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(NB).de(oV).build(){}var Lp={ActivateKeySigningKeyCommand:c6,AssociateVPCWithHostedZoneCommand:_6,ChangeCidrCollectionCommand:g6,ChangeResourceRecordSetsCommand:x6,ChangeTagsForResourceCommand:e6,CreateCidrCollectionCommand:n6,CreateHealthCheckCommand:o6,CreateHostedZoneCommand:a6,CreateKeySigningKeyCommand:p6,CreateQueryLoggingConfigCommand:u6,CreateReusableDelegationSetCommand:t6,CreateTrafficPolicyCommand:r4,CreateTrafficPolicyInstanceCommand:f4,CreateTrafficPolicyVersionCommand:s4,CreateVPCAssociationAuthorizationCommand:w4,DeactivateKeySigningKeyCommand:h4,DeleteCidrCollectionCommand:$4,DeleteHealthCheckCommand:E4,DeleteHostedZoneCommand:I4,DeleteKeySigningKeyCommand:F4,DeleteQueryLoggingConfigCommand:U4,DeleteReusableDelegationSetCommand:G4,DeleteTrafficPolicyCommand:T4,DeleteTrafficPolicyInstanceCommand:L4,DeleteVPCAssociationAuthorizationCommand:W4,DisableHostedZoneDNSSECCommand:A4,DisassociateVPCFromHostedZoneCommand:z4,EnableHostedZoneDNSSECCommand:C4,GetAccountLimitCommand:R4,GetChangeCommand:P4,GetCheckerIpRangesCommand:X4,GetDNSSECCommand:Y4,GetGeoLocationCommand:K4,GetHealthCheckCommand:Z4,GetHealthCheckCountCommand:S4,GetHealthCheckLastFailureReasonCommand:J4,GetHealthCheckStatusCommand:Q4,GetHostedZoneCommand:M4,GetHostedZoneCountCommand:B4,GetHostedZoneLimitCommand:V4,GetQueryLoggingConfigCommand:H4,GetReusableDelegationSetCommand:D4,GetReusableDelegationSetLimitCommand:k4,GetTrafficPolicyCommand:l4,GetTrafficPolicyInstanceCommand:N4,GetTrafficPolicyInstanceCountCommand:q4,ListCidrBlocksCommand:y4,ListCidrCollectionsCommand:m4,ListCidrLocationsCommand:j4,ListGeoLocationsCommand:v4,ListHealthChecksCommand:O4,ListHostedZonesCommand:b4,ListHostedZonesByNameCommand:i4,ListHostedZonesByVPCCommand:d4,ListQueryLoggingConfigsCommand:c4,ListResourceRecordSetsCommand:_4,ListReusableDelegationSetsCommand:g4,ListTagsForResourceCommand:x4,ListTagsForResourcesCommand:e4,ListTrafficPoliciesCommand:n4,ListTrafficPolicyInstancesCommand:p4,ListTrafficPolicyInstancesByHostedZoneCommand:o4,ListTrafficPolicyInstancesByPolicyCommand:a4,ListTrafficPolicyVersionsCommand:u4,ListVPCAssociationAuthorizationsCommand:t4,TestDNSAnswerCommand:rL,UpdateHealthCheckCommand:fL,UpdateHostedZoneCommentCommand:sL,UpdateTrafficPolicyCommentCommand:wL,UpdateTrafficPolicyInstanceCommand:hL};class $w extends BT{}lf(Lp,$w);_w();gw();xw();nw();S0();var r1=g(Or(),1);hh();Q();rf();K();var TH=g(Vr(),1),hF=g(pr(),1);function Wp(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}var LH=async(r,s,f)=>{return{operation:hF.getSmithyContext(s).operation,region:await hF.normalizeProvider(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},WH=(r)=>{const s=[];switch(r.operation){default:s.push(Wp(r))}return s},AH=(r)=>{return{...TH.resolveAwsSdkSigV4Config(r)}};var zH=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53domains"}},c={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var CH={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 kH=g(Vr(),1);y1();zh();S0();Ph();rf();t0();Qw();Xh();L0();var HH=g(Vr(),1);K();ms();Yh();cs();Uw();e0();var RH={["required"]:!1,type:"String"},PH={["required"]:!0,default:!1,type:"Boolean"},XH={["ref"]:"Endpoint"},QH={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},MH={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},Es={},YH={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},KH={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},ZH=[QH],SH=[MH],JH=[{["ref"]:"Region"}],zp={version:"1.0",parameters:{Region:RH,UseDualStack:PH,UseFIPS:PH,Endpoint:RH},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[XH]}],rules:[{conditions:ZH,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:SH,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:XH,properties:Es,headers:Es},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:JH}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:JH,assign:"PartitionResult"}],rules:[{conditions:[QH,MH],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,YH]},KH],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Es,headers:Es},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:ZH,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[YH,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Es,headers:Es},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:SH,rules:[{conditions:[KH],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Es,headers:Es},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:Es,headers:Es},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},BH=zp;var VH=(r,s={})=>{return x0(BH,{endpointParams:r,logger:s.logger})};ar.aws=n0;var DH=(r)=>{return{apiVersion:"2014-05-15",base64Decoder:r?.base64Decoder??gf,base64Encoder:r?.base64Encoder??xf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??VH,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??WH,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new HH.AwsSdkSigV4Signer}],logger:r?.logger??new W0,serviceId:r?.serviceId??"Route 53 Domains",urlParser:r?.urlParser??cr,utf8Decoder:r?.utf8Decoder??F0,utf8Encoder:r?.utf8Encoder??cf}};K();Kh();K();var lH=(r)=>{mf(process.version);const s=ef(r),f=()=>s().then(yf),w=DH(r);return kH.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??_f,credentialDefaultProvider:r?.credentialDefaultProvider??Ls,defaultUserAgentProvider:r?.defaultUserAgentProvider??bf({serviceId:w.serviceId,clientVersion:CH.version}),maxAttempts:r?.maxAttempts??u(Hf),region:r?.region??u(Z0,Sf),requestHandler:tr.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...kf,default:async()=>(await f()).retryMode||D0}),sha256:r?.sha256??ff.bind(null,"sha256"),streamCollector:r?.streamCollector??df,useDualstackEndpoint:r?.useDualstackEndpoint??u(Kf),useFipsEndpoint:r?.useFipsEndpoint??u(Zf)}};Zh();Nr();K();var NH=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const $=s.findIndex((E)=>E.schemeId===h.schemeId);if($===-1)s.push(h);else s.splice($,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},qH=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var $F=(r)=>r,yH=(r,s)=>{const f={...$F(nf(r)),...$F(jf(r)),...$F(Wf(r)),...$F(NH(r))};return s.forEach((w)=>w.configure(f)),{...r,...of(f),...vf(f),...Af(f),...qH(f)}};class $L extends A0{constructor(...[r]){const s=lH(r||{}),f=zH(s),w=Xf(f),h=Df(w),$=Jf(h),E=zf($),I=Bf(E),F=AH(I),U=yH(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Yf(this.config)),this.middlewareStack.use(Of(this.config)),this.middlewareStack.use(Mf(this.config)),this.middlewareStack.use(Cf(this.config)),this.middlewareStack.use(Rf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(r1.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:LH,identityProviderConfigProvider:async(L)=>new r1.DefaultIdentityProviderConfig({"aws.auth#sigv4":L.credentials})})),this.middlewareStack.use(r1.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}K();Q();B();K();K();K();class _0 extends k0{constructor(r){super(r);Object.setPrototypeOf(this,_0.prototype)}}class EF extends _0{constructor(r){super({name:"DomainLimitExceeded",$fault:"client",...r});this.name="DomainLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,EF.prototype)}}class IF extends _0{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,IF.prototype)}}class FF extends _0{constructor(r){super({name:"OperationLimitExceeded",$fault:"client",...r});this.name="OperationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,FF.prototype)}}class UF extends _0{constructor(r){super({name:"UnsupportedTLD",$fault:"client",...r});this.name="UnsupportedTLD",this.$fault="client",Object.setPrototypeOf(this,UF.prototype)}}class GF extends _0{constructor(r){super({name:"DnssecLimitExceeded",$fault:"client",...r});this.name="DnssecLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,GF.prototype)}}class TF extends _0{constructor(r){super({name:"DuplicateRequest",$fault:"client",...r});this.name="DuplicateRequest",this.$fault="client",Object.setPrototypeOf(this,TF.prototype),this.requestId=r.requestId}}class LF extends _0{constructor(r){super({name:"TLDRulesViolation",$fault:"client",...r});this.name="TLDRulesViolation",this.$fault="client",Object.setPrototypeOf(this,LF.prototype)}}var mH=(r)=>({...r,...r.Password&&{Password:n}}),jH=(r)=>({...r,...r.AuthCode&&{AuthCode:n}});var vH=(r)=>({...r,...r.AdminContact&&{AdminContact:n},...r.RegistrantContact&&{RegistrantContact:n},...r.TechContact&&{TechContact:n},...r.AbuseContactEmail&&{AbuseContactEmail:n},...r.AbuseContactPhone&&{AbuseContactPhone:n},...r.BillingContact&&{BillingContact:n}}),OH=(r)=>({...r,...r.AdminContact&&{AdminContact:n},...r.RegistrantContact&&{RegistrantContact:n},...r.TechContact&&{TechContact:n},...r.BillingContact&&{BillingContact:n}}),iH=(r)=>({...r,...r.emailAddress&&{emailAddress:n}}),dH=(r)=>({...r,...r.AuthCode&&{AuthCode:n}}),bH=(r)=>({...r,...r.AuthCode&&{AuthCode:n},...r.AdminContact&&{AdminContact:n},...r.RegistrantContact&&{RegistrantContact:n},...r.TechContact&&{TechContact:n},...r.BillingContact&&{BillingContact:n}}),cH=(r)=>({...r,...r.Password&&{Password:n}}),_H=(r)=>({...r,...r.AdminContact&&{AdminContact:n},...r.RegistrantContact&&{RegistrantContact:n},...r.TechContact&&{TechContact:n},...r.BillingContact&&{BillingContact:n}}),gH=(r)=>({...r,...r.FIAuthKey&&{FIAuthKey:n}});var sr=g(Vr(),1);Nr();K();function Ir(r){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${r}`}}var xH=async(r,s)=>{const f=Ir("AcceptDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},eH=async(r,s)=>{const f=Ir("AssociateDelegationSignerToDomain");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},nH=async(r,s)=>{const f=Ir("CancelDomainTransferToAnotherAwsAccount");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},oH=async(r,s)=>{const f=Ir("CheckDomainAvailability");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},aH=async(r,s)=>{const f=Ir("CheckDomainTransferability");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},pH=async(r,s)=>{const f=Ir("DeleteDomain");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},uH=async(r,s)=>{const f=Ir("DeleteTagsForDomain");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},tH=async(r,s)=>{const f=Ir("DisableDomainAutoRenew");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},rD=async(r,s)=>{const f=Ir("DisableDomainTransferLock");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},fD=async(r,s)=>{const f=Ir("DisassociateDelegationSignerFromDomain");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},sD=async(r,s)=>{const f=Ir("EnableDomainAutoRenew");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},wD=async(r,s)=>{const f=Ir("EnableDomainTransferLock");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},hD=async(r,s)=>{const f=Ir("GetContactReachabilityStatus");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},$D=async(r,s)=>{const f=Ir("GetDomainDetail");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},ED=async(r,s)=>{const f=Ir("GetDomainSuggestions");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},ID=async(r,s)=>{const f=Ir("GetOperationDetail");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},FD=async(r,s)=>{const f=Ir("ListDomains");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},UD=async(r,s)=>{const f=Ir("ListOperations");let w;return w=JSON.stringify(Jp(r,s)),Er(s,f,"/",void 0,w)},GD=async(r,s)=>{const f=Ir("ListPrices");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},TD=async(r,s)=>{const f=Ir("ListTagsForDomain");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},LD=async(r,s)=>{const f=Ir("PushDomain");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},WD=async(r,s)=>{const f=Ir("RegisterDomain");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},AD=async(r,s)=>{const f=Ir("RejectDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},zD=async(r,s)=>{const f=Ir("RenewDomain");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},CD=async(r,s)=>{const f=Ir("ResendContactReachabilityEmail");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},RD=async(r,s)=>{const f=Ir("ResendOperationAuthorization");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},PD=async(r,s)=>{const f=Ir("RetrieveDomainAuthCode");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},XD=async(r,s)=>{const f=Ir("TransferDomain");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},YD=async(r,s)=>{const f=Ir("TransferDomainToAnotherAwsAccount");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},KD=async(r,s)=>{const f=Ir("UpdateDomainContact");let w;return w=JSON.stringify(Qp(r,s)),Er(s,f,"/",void 0,w)},ZD=async(r,s)=>{const f=Ir("UpdateDomainContactPrivacy");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},SD=async(r,s)=>{const f=Ir("UpdateDomainNameservers");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},JD=async(r,s)=>{const f=Ir("UpdateTagsForDomain");let w;return w=JSON.stringify(N(r)),Er(s,f,"/",void 0,w)},QD=async(r,s)=>{const f=Ir("ViewBilling");let w;return w=JSON.stringify(Mp(r,s)),Er(s,f,"/",void 0,w)},MD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},BD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},VD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},HD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},DD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},kD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},lD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},ND=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},qD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},yD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},mD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},jD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},vD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},OD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=Np(f,s),{$metadata:rr(r),...w}},iD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},dD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=qp(f,s),{$metadata:rr(r),...w}},bD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=yp(f,s),{$metadata:rr(r),...w}},cD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=mp(f,s),{$metadata:rr(r),...w}},_D=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=jp(f,s),{$metadata:rr(r),...w}},gD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},xD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);return await _r(r.body,s),{$metadata:rr(r)}},eD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},nD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},oD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},aD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},pD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);return await _r(r.body,s),{$metadata:rr(r)}},uD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},tD=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},rk=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},fk=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},sk=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},wk=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},hk=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=N(f),{$metadata:rr(r),...w}},$k=async(r,s)=>{if(r.statusCode>=300)return $r(r,s);const f=await sr.parseJsonBody(r.body,s);let w={};return w=ip(f,s),{$metadata:rr(r),...w}},$r=async(r,s)=>{const f={...r,body:await sr.parseJsonErrorBody(r.body,s)},w=sr.loadRestJsonErrorCode(r,f.body);switch(w){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await Rp(f,s);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await Xp(f,s);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await Yp(f,s);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await Zp(f,s);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await Cp(f,s);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await Pp(f,s);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await Kp(f,s);default:const h=f.body;return dp({output:r,parsedBody:h,errorCode:w})}},Cp=async(r,s)=>{const f=r.body,w=N(f),h=new GF({$metadata:rr(r),...w});return H(h,f)},Rp=async(r,s)=>{const f=r.body,w=N(f),h=new EF({$metadata:rr(r),...w});return H(h,f)},Pp=async(r,s)=>{const f=r.body,w=N(f),h=new TF({$metadata:rr(r),...w});return H(h,f)},Xp=async(r,s)=>{const f=r.body,w=N(f),h=new IF({$metadata:rr(r),...w});return H(h,f)},Yp=async(r,s)=>{const f=r.body,w=N(f),h=new FF({$metadata:rr(r),...w});return H(h,f)},Kp=async(r,s)=>{const f=r.body,w=N(f),h=new LF({$metadata:rr(r),...w});return H(h,f)},Zp=async(r,s)=>{const f=r.body,w=N(f),h=new UF({$metadata:rr(r),...w});return H(h,f)},Sp=(r,s)=>{return a(r,{Currency:[],MaxPrice:KY})},Jp=(r,s)=>{return a(r,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:N,SubmittedSince:(f)=>f.getTime()/1000,Type:N})},Qp=(r,s)=>{return a(r,{AdminContact:N,BillingContact:N,Consent:(f)=>Sp(f,s),DomainName:[],RegistrantContact:N,TechContact:N})},Mp=(r,s)=>{return a(r,{End:(f)=>f.getTime()/1000,Marker:[],MaxItems:[],Start:(f)=>f.getTime()/1000})},Bp=(r,s)=>{return a(r,{BillDate:(f)=>k(Nf(I0(f))),DomainName:G,InvoiceId:G,Operation:G,Price:EU})},Vp=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Bp(w,s)})},Hp=(r,s)=>{return a(r,{ChangeOwnershipPrice:(f)=>o3(f,s),Name:G,RegistrationPrice:(f)=>o3(f,s),RenewalPrice:(f)=>o3(f,s),RestorationPrice:(f)=>o3(f,s),TransferPrice:(f)=>o3(f,s)})},Dp=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Hp(w,s)})},kp=(r,s)=>{return a(r,{AutoRenew:js,DomainName:G,Expiry:(f)=>k(Nf(I0(f))),TransferLock:js})},lp=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return kp(w,s)})},Np=(r,s)=>{return a(r,{AbuseContactEmail:G,AbuseContactPhone:G,AdminContact:N,AdminPrivacy:js,AutoRenew:js,BillingContact:N,BillingPrivacy:js,CreationDate:(f)=>k(Nf(I0(f))),DnsSec:G,DnssecKeys:N,DomainName:G,ExpirationDate:(f)=>k(Nf(I0(f))),Nameservers:N,RegistrantContact:N,RegistrantPrivacy:js,RegistrarName:G,RegistrarUrl:G,RegistryDomainId:G,Reseller:G,StatusList:N,TechContact:N,TechPrivacy:js,UpdatedDate:(f)=>k(Nf(I0(f))),WhoIsServer:G})},qp=(r,s)=>{return a(r,{DomainName:G,LastUpdatedDate:(f)=>k(Nf(I0(f))),Message:G,OperationId:G,Status:G,StatusFlag:G,SubmittedDate:(f)=>k(Nf(I0(f))),Type:G})},yp=(r,s)=>{return a(r,{Domains:(f)=>lp(f,s),NextPageMarker:G})},mp=(r,s)=>{return a(r,{NextPageMarker:G,Operations:(f)=>Op(f,s)})},jp=(r,s)=>{return a(r,{NextPageMarker:G,Prices:(f)=>Dp(f,s)})},vp=(r,s)=>{return a(r,{DomainName:G,LastUpdatedDate:(f)=>k(Nf(I0(f))),Message:G,OperationId:G,Status:G,StatusFlag:G,SubmittedDate:(f)=>k(Nf(I0(f))),Type:G})},Op=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return vp(w,s)})},o3=(r,s)=>{return a(r,{Currency:G,Price:EU})},ip=(r,s)=>{return a(r,{BillingRecords:(f)=>Vp(f,s),NextPageMarker:G})},rr=(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 dp=qf(_0),Er=async(r,s,f,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)+f:F+f,headers:s};if(w!==void 0)U.hostname=w;if(h!==void 0)U.body=h;return new Mr(U)};class EL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(mH,void 0).ser(xH).de(MD).build(){}Q();B();K();class IL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser(eH).de(BD).build(){}Q();B();K();class FL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(nH).de(VD).build(){}Q();B();K();class UL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser(oH).de(HD).build(){}Q();B();K();class GL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(jH,void 0).ser(aH).de(DD).build(){}Q();B();K();class TL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(pH).de(kD).build(){}Q();B();K();class LL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser(uH).de(lD).build(){}Q();B();K();class WL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(tH).de(ND).build(){}Q();B();K();class AL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(rD).de(qD).build(){}Q();B();K();class zL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(fD).de(yD).build(){}Q();B();K();class CL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(sD).de(mD).build(){}Q();B();K();class RL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(wD).de(jD).build(){}Q();B();K();class PL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(hD).de(vD).build(){}Q();B();K();class XL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,vH).ser($D).de(OD).build(){}Q();B();K();class YL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(ED).de(iD).build(){}Q();B();K();class KL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(ID).de(dD).build(){}Q();B();K();class ZL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(FD).de(bD).build(){}Q();B();K();class SL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(UD).de(cD).build(){}Q();B();K();class JL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(GD).de(_D).build(){}Q();B();K();class QL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(TD).de(gD).build(){}Q();B();K();class ML extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(LD).de(xD).build(){}Q();B();K();class BL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(OH,void 0).ser(WD).de(eD).build(){}Q();B();K();class VL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser(AD).de(nD).build(){}Q();B();K();class HL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(zD).de(oD).build(){}Q();B();K();class DL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,iH).ser(CD).de(aD).build(){}Q();B();K();class kL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(RD).de(pD).build(){}Q();B();K();class lL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,dH).ser(PD).de(uD).build(){}Q();B();K();class NL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(bH,void 0).ser(XD).de(tD).build(){}Q();B();K();class qL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,cH).ser(YD).de(rk).build(){}Q();B();K();class yL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(_H,void 0).ser(KD).de(fk).build(){}Q();B();K();class mL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(ZD).de(sk).build(){}Q();B();K();class jL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(gH,void 0).ser(SD).de(wk).build(){}Q();B();K();class vL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(JD).de(hk).build(){}Q();B();K();class OL extends W.classBuilder().ep({...c}).m(function(r,s,f,w){return[A(f,this.serialize,this.deserialize),z(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(QD).de($k).build(){}var bp={AcceptDomainTransferFromAnotherAwsAccountCommand:EL,AssociateDelegationSignerToDomainCommand:IL,CancelDomainTransferToAnotherAwsAccountCommand:FL,CheckDomainAvailabilityCommand:UL,CheckDomainTransferabilityCommand:GL,DeleteDomainCommand:TL,DeleteTagsForDomainCommand:LL,DisableDomainAutoRenewCommand:WL,DisableDomainTransferLockCommand:AL,DisassociateDelegationSignerFromDomainCommand:zL,EnableDomainAutoRenewCommand:CL,EnableDomainTransferLockCommand:RL,GetContactReachabilityStatusCommand:PL,GetDomainDetailCommand:XL,GetDomainSuggestionsCommand:YL,GetOperationDetailCommand:KL,ListDomainsCommand:ZL,ListOperationsCommand:SL,ListPricesCommand:JL,ListTagsForDomainCommand:QL,PushDomainCommand:ML,RegisterDomainCommand:BL,RejectDomainTransferFromAnotherAwsAccountCommand:VL,RenewDomainCommand:HL,ResendContactReachabilityEmailCommand:DL,ResendOperationAuthorizationCommand:kL,RetrieveDomainAuthCodeCommand:lL,TransferDomainCommand:NL,TransferDomainToAnotherAwsAccountCommand:qL,UpdateDomainContactCommand:yL,UpdateDomainContactPrivacyCommand:mL,UpdateDomainNameserversCommand:jL,UpdateTagsForDomainCommand:vL,ViewBillingCommand:OL};class a3 extends $L{}lf(bp,a3);import{runAction as cp}from"@stacksjs/actions";import{config as Ik}from"@stacksjs/config";import{Action as _p}from"@stacksjs/enums";import{err as cw,handleError as iL,ok as f1}from"@stacksjs/error-handling";import{log as Ew}from"@stacksjs/logging";import{path as gp}from"@stacksjs/path";import{fs as Ek}from"@stacksjs/storage";async function DBr(r){const s=new $w,f=await s.listHostedZonesByName({DNSName:r});if(!f||!f.HostedZones)return cw(`No hosted zones found for domain: ${r}`);const w=f.HostedZones.find(($)=>$.Name===`${r}.`);if(!w)return cw(`Hosted Zone not found for domain: ${r}`);const h=await s.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return cw(`No DNS records found for domain: ${r}`);for(let $ of h.ResourceRecordSets)if($.Type!=="NS"&&$.Type!=="SOA")await s.changeResourceRecordSets({HostedZoneId:w.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:$}]}});return await s.deleteHostedZone({Id:w.Id}),Ew.info(`Deleted Hosted Zone for domain: ${r}`),f1("success")}async function kBr(r){const s=new $w,f=await s.listHostedZonesByName({DNSName:r});if(!f||!f.HostedZones)return cw(`No hosted zones found for domain: ${r}`);const w=f.HostedZones.find(($)=>$.Name===`${r}.`);if(!w)return cw(`Hosted Zone not found for domain: ${r}`);const h=await s.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return cw(`No DNS records found for domain: ${r}`);for(let $ of h.ResourceRecordSets)if($.Type!=="NS"&&$.Type!=="SOA")await s.changeResourceRecordSets({HostedZoneId:w.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:$}]}});return Ew.info(`Deleted DNS records for domain: ${r}`),f1("success")}async function lBr(r){const s=new $w,w=(await s.listHostedZonesByName({DNSName:r})).HostedZones?.find(($)=>$.Name===`${r}.`);if(w)return f1(w);const h=await s.createHostedZone({Name:r,CallerReference:`${Date.now()}`});if(!h.HostedZone)return cw("Failed to create hosted zone");return f1(h)}function xp(r){try{const s=gp.projectConfigPath("dns.ts"),w=Ek.readFileSync(s,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${r.map((h)=>`'${h}'`).join(", ")}]`);Ek.writeFileSync(s,w,"utf-8"),Ew.info("Nameservers have been set.")}catch(s){console.error("Error updating nameservers:",s)}}async function NBr(r){try{const s=new $w,{HostedZones:f}=await s.listHostedZonesByName({DNSName:r});if(!f)return iL(`No hosted zones found for domain ${r}`);const w=f[0];if(w&&w.Name===`${r}.`)return f1(w.Id);return f1(null)}catch(s){return console.error(s),iL(`Failed to find hosted zone for domain ${r}`)}}async function ep(r){if(!r)return[];try{return(await new a3().getDomainDetail({DomainName:r}))?.Nameservers?.map((w)=>w.Name)||[]}catch(s){console.error(s),iL("Error getting domain detail")}}async function np(r,s){if(!s)s=Ik.app.url;const f=await ep(s);if(f&&r&&JSON.stringify(f.sort())!==JSON.stringify(r.sort()))return Ew.info("Updating your domain nameservers to match the ones in your hosted zone..."),Ew.debug("Hosted zone nameservers:",r),Ew.debug("Domain nameservers:",f),await new a3().updateDomainNameservers({DomainName:s,Nameservers:r.map((h)=>({Name:h}))}),xp(r),Ew.info("Nameservers updated."),!0;Ew.success("Your nameservers are up to date.")}async function qBr(r){if(!r)r=Ik.app.url;const s=new $w,f=await s.listHostedZonesByName({DNSName:r});if(!f||!f.HostedZones)return!1;const w=f.HostedZones.find((h)=>h.Name===`${r}.`);if(w){const $=(await s.getHostedZone({Id:w.Id})).DelegationSet?.NameServers||[];return await np($,r),!0}return!1}async function yBr(r){return await cp(_p.DomainsAdd,r)}export{xp as writeNameserversToConfig,np as updateNameservers,qBr as hasUserDomainBeenAddedToCloud,ep as getNameservers,NBr as findHostedZone,kBr as deleteHostedZoneRecords,DBr as deleteHostedZone,lBr as createHostedZone,yBr as addDomain};
34
34
 
35
- //# debugId=4DCE8F45792298AF64756E2164756E21
35
+ //# debugId=AFE81098547C027664756E2164756E21
36
36
  //# sourceMappingURL=index.js.map