@stacksjs/dns 0.70.23 → 0.70.26

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,63 +1,4 @@
1
1
  // @bun
2
- var Zl=Object.create;var{getPrototypeOf:Jl,defineProperty:HT,getOwnPropertyNames:Vl}=Object;var Pl=Object.prototype.hasOwnProperty;var Y=(f,h,w)=>{w=f!=null?Zl(Jl(f)):{};let s=h||!f||!f.__esModule?HT(w,"default",{value:f,enumerable:!0}):w;for(let $ of Vl(f))if(!Pl.call(s,$))HT(s,$,{get:()=>f[$],enumerable:!0});return s};var H=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports);var Ch=(f,h)=>{for(var w in h)HT(f,w,{get:h[w],enumerable:!0,configurable:!0,set:(s)=>h[w]=()=>s})};var G=(f,h)=>()=>(f&&(h=f(f=0)),h);var L0=import.meta.require;var Zw=(f)=>{return{setHttpHandler(h){f.httpHandler=h},httpHandler(){return f.httpHandler},updateHttpClientConfig(h,w){f.httpHandler?.updateHttpClientConfig(h,w)},httpHandlerConfigs(){return f.httpHandler.httpHandlerConfigs()}}},Jw=(f)=>{return{httpHandler:f.httpHandler()}};var OL=()=>{};var F1=H((r20,xL)=>{var{defineProperty:f5,getOwnPropertyDescriptor:Hl,getOwnPropertyNames:Nl}=Object,Dl=Object.prototype.hasOwnProperty,h5=(f,h)=>f5(f,"name",{value:h,configurable:!0}),ql=(f,h)=>{for(var w in h)f5(f,w,{get:h[w],enumerable:!0})},kl=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Nl(h))if(!Dl.call(f,$)&&$!==w)f5(f,$,{get:()=>h[$],enumerable:!(s=Hl(h,$))||s.enumerable})}return f},yl=(f)=>kl(f5({},"__esModule",{value:!0}),f),lL={};ql(lL,{AlgorithmId:()=>dL,EndpointURLScheme:()=>mL,FieldPosition:()=>iL,HttpApiKeyAuthLocation:()=>bL,HttpAuthLocation:()=>vL,IniSectionType:()=>cL,RequestHandlerProtocol:()=>gL,SMITHY_CONTEXT_KEY:()=>bl,getDefaultClientConfiguration:()=>ll,resolveDefaultRuntimeConfig:()=>vl});xL.exports=yl(lL);var vL=((f)=>{return f.HEADER="header",f.QUERY="query",f})(vL||{}),bL=((f)=>{return f.HEADER="header",f.QUERY="query",f})(bL||{}),mL=((f)=>{return f.HTTP="http",f.HTTPS="https",f})(mL||{}),dL=((f)=>{return f.MD5="md5",f.CRC32="crc32",f.CRC32C="crc32c",f.SHA1="sha1",f.SHA256="sha256",f})(dL||{}),jl=h5((f)=>{let h=[];if(f.sha256!==void 0)h.push({algorithmId:()=>"sha256",checksumConstructor:()=>f.sha256});if(f.md5!=null)h.push({algorithmId:()=>"md5",checksumConstructor:()=>f.md5});return{addChecksumAlgorithm(w){h.push(w)},checksumAlgorithms(){return h}}},"getChecksumConfiguration"),Ol=h5((f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h},"resolveChecksumRuntimeConfig"),ll=h5((f)=>{return jl(f)},"getDefaultClientConfiguration"),vl=h5((f)=>{return Ol(f)},"resolveDefaultRuntimeConfig"),iL=((f)=>{return f[f.HEADER=0]="HEADER",f[f.TRAILER=1]="TRAILER",f})(iL||{}),bl="__smithy_context",cL=((f)=>{return f.PROFILE="profile",f.SSO_SESSION="sso-session",f.SERVICES="services",f})(cL||{}),gL=((f)=>{return f.HTTP_0_9="http/0.9",f.HTTP_1_0="http/1.0",f.TDS_8_0="tds/8.0",f})(gL||{})});var ml;var _L=G(()=>{ml=Y(F1(),1)});var nL=()=>{};class _0{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){let h=new _0({...f,headers:{...f.headers}});if(h.query)h.query=dl(h.query);return h}static isInstance(f){if(!f)return!1;let h=f;return"method"in h&&"protocol"in h&&"hostname"in h&&"path"in h&&typeof h.query==="object"&&typeof h.headers==="object"}clone(){return _0.clone(this)}}function dl(f){return Object.keys(f).reduce((h,w)=>{let s=f[w];return{...h,[w]:Array.isArray(s)?[...s]:s}},{})}class xh{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;let h=f;return typeof h.statusCode==="number"&&typeof h.headers==="object"}}var eL=()=>{};var r1=G(()=>{OL();_L();nL();eL()});function Vw(f){return f}var il=(f)=>(h)=>async(w)=>{if(!_0.isInstance(w.request))return h(w);let{request:s}=w,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let E=s.hostname;if(s.port!=null)E+=`:${s.port}`;s.headers.host=E}return h(w)},cl,Pw=(f)=>({applyToStack:(h)=>{h.add(il(f),cl)}});var w5=G(()=>{r1();cl={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var gl=()=>(f,h)=>async(w)=>{try{let s=await f(w),{clientName:$,commandName:E,logger:U,dynamoDbDocumentClientOptions:T={}}=h,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:r}=T,C=F??h.inputFilterSensitiveLog,I=r??h.outputFilterSensitiveLog,{$metadata:L,...B}=s.output;return U?.info?.({clientName:$,commandName:E,input:C(w.input),output:I(B),metadata:L}),s}catch(s){let{clientName:$,commandName:E,logger:U,dynamoDbDocumentClientOptions:T={}}=h,{overrideInputFilterSensitiveLog:F}=T,r=F??h.inputFilterSensitiveLog;throw U?.error?.({clientName:$,commandName:E,input:r(w.input),error:s,metadata:s.$metadata}),s}},xl,Hw=(f)=>({applyToStack:(h)=>{h.add(gl(),xl)}});var aL=G(()=>{xl={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var s5=G(()=>{aL()});var NT="X-Amzn-Trace-Id",_l="AWS_LAMBDA_FUNCTION_NAME",nl="_X_AMZN_TRACE_ID",el=(f)=>(h)=>async(w)=>{let{request:s}=w;if(!_0.isInstance(s)||f.runtime!=="node")return h(w);let $=Object.keys(s.headers??{}).find((F)=>F.toLowerCase()===NT.toLowerCase())??NT;if(s.headers.hasOwnProperty($))return h(w);let E=process.env[_l],U=process.env[nl],T=(F)=>typeof F==="string"&&F.length>0;if(T(E)&&T(U))s.headers[NT]=U;return h({...w,request:s})},al,Nw=(f)=>({applyToStack:(h)=>{h.add(el(f),al)}});var $5=G(()=>{r1();al={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});var Ih=H((D20,tL)=>{var{defineProperty:E5,getOwnPropertyDescriptor:pl,getOwnPropertyNames:ol}=Object,ul=Object.prototype.hasOwnProperty,oL=(f,h)=>E5(f,"name",{value:h,configurable:!0}),tl=(f,h)=>{for(var w in h)E5(f,w,{get:h[w],enumerable:!0})},fv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ol(h))if(!ul.call(f,$)&&$!==w)E5(f,$,{get:()=>h[$],enumerable:!(s=pl(h,$))||s.enumerable})}return f},hv=(f)=>fv(E5({},"__esModule",{value:!0}),f),uL={};tl(uL,{getSmithyContext:()=>wv,normalizeProvider:()=>sv});tL.exports=hv(uL);var pL=F1(),wv=oL((f)=>f[pL.SMITHY_CONTEXT_KEY]||(f[pL.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),sv=oL((f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h},"normalizeProvider")});var N=H((q20,UG)=>{var{defineProperty:U5,getOwnPropertyDescriptor:$v,getOwnPropertyNames:Ev}=Object,Uv=Object.prototype.hasOwnProperty,DT=(f,h)=>U5(f,"name",{value:h,configurable:!0}),Tv=(f,h)=>{for(var w in h)U5(f,w,{get:h[w],enumerable:!0})},Fv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ev(h))if(!Uv.call(f,$)&&$!==w)U5(f,$,{get:()=>h[$],enumerable:!(s=$v(h,$))||s.enumerable})}return f},rv=(f)=>Fv(U5({},"__esModule",{value:!0}),f),fG={};Tv(fG,{deserializerMiddleware:()=>hG,deserializerMiddlewareOption:()=>sG,getSerdePlugin:()=>EG,serializerMiddleware:()=>wG,serializerMiddlewareOption:()=>$G});UG.exports=rv(fG);var hG=DT((f,h)=>(w,s)=>async($)=>{let{response:E}=await w($);try{let U=await h(E,f);return{response:E,output:U}}catch(U){if(Object.defineProperty(U,"$response",{value:E}),!("$metadata"in U)){try{U.message+=`
3
- Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`}catch(F){if(!s.logger||s.logger?.constructor?.name==="NoOpLogger")console.warn("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.");else s.logger?.warn?.("Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.")}if(typeof U.$responseBodyText!=="undefined"){if(U.$response)U.$response.body=U.$responseBodyText}}throw U}},"deserializerMiddleware"),wG=DT((f,h)=>(w,s)=>async($)=>{let E=s.endpointV2?.url&&f.urlParser?async()=>f.urlParser(s.endpointV2.url):f.endpoint;if(!E)throw new Error("No valid endpoint provider available.");let U=await h($.input,{...f,endpoint:E});return w({...$,request:U})},"serializerMiddleware"),sG={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},$G={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function EG(f,h,w){return{applyToStack:(s)=>{s.add(hG(f,w),sG),s.add(wG(f,h),$G)}}}DT(EG,"getSerdePlugin")});var u0=H((k20,IG)=>{var{defineProperty:T5,getOwnPropertyDescriptor:Cv,getOwnPropertyNames:Iv}=Object,Lv=Object.prototype.hasOwnProperty,Lh=(f,h)=>T5(f,"name",{value:h,configurable:!0}),Gv=(f,h)=>{for(var w in h)T5(f,w,{get:h[w],enumerable:!0})},Wv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Iv(h))if(!Lv.call(f,$)&&$!==w)T5(f,$,{get:()=>h[$],enumerable:!(s=Cv(h,$))||s.enumerable})}return f},Bv=(f)=>Wv(T5({},"__esModule",{value:!0}),f),TG={};Gv(TG,{Field:()=>Rv,Fields:()=>Xv,HttpRequest:()=>Sv,HttpResponse:()=>Yv,IHttpRequest:()=>FG.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Av,isValidHostname:()=>CG,resolveHttpHandlerRuntimeConfig:()=>zv});IG.exports=Bv(TG);var Av=Lh((f)=>{return{setHttpHandler(h){f.httpHandler=h},httpHandler(){return f.httpHandler},updateHttpClientConfig(h,w){f.httpHandler?.updateHttpClientConfig(h,w)},httpHandlerConfigs(){return f.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),zv=Lh((f)=>{return{httpHandler:f.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),FG=F1(),Rv=class{static{Lh(this,"Field")}constructor({name:f,kind:h=FG.FieldPosition.HEADER,values:w=[]}){this.name=f,this.kind=h,this.values=w}add(f){this.values.push(f)}set(f){this.values=f}remove(f){this.values=this.values.filter((h)=>h!==f)}toString(){return this.values.map((f)=>f.includes(",")||f.includes(" ")?`"${f}"`:f).join(", ")}get(){return this.values}},Xv=class{constructor({fields:f=[],encoding:h="utf-8"}){this.entries={},f.forEach(this.setField.bind(this)),this.encoding=h}static{Lh(this,"Fields")}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((h)=>h.kind===f)}},Sv=class f{static{Lh(this,"HttpRequest")}constructor(h){this.method=h.method||"GET",this.hostname=h.hostname||"localhost",this.port=h.port,this.query=h.query||{},this.headers=h.headers||{},this.body=h.body,this.protocol=h.protocol?h.protocol.slice(-1)!==":"?`${h.protocol}:`:h.protocol:"https:",this.path=h.path?h.path.charAt(0)!=="/"?`/${h.path}`:h.path:"/",this.username=h.username,this.password=h.password,this.fragment=h.fragment}static clone(h){let w=new f({...h,headers:{...h.headers}});if(w.query)w.query=rG(w.query);return w}static isInstance(h){if(!h)return!1;let w=h;return"method"in w&&"protocol"in w&&"hostname"in w&&"path"in w&&typeof w.query==="object"&&typeof w.headers==="object"}clone(){return f.clone(this)}};function rG(f){return Object.keys(f).reduce((h,w)=>{let s=f[w];return{...h,[w]:Array.isArray(s)?[...s]:s}},{})}Lh(rG,"cloneQuery");var Yv=class{static{Lh(this,"HttpResponse")}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;let h=f;return typeof h.statusCode==="number"&&typeof h.headers==="object"}};function CG(f){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(f)}Lh(CG,"isValidHostname")});var qT=H((l20,GG)=>{var{defineProperty:F5,getOwnPropertyDescriptor:Qv,getOwnPropertyNames:Kv}=Object,Mv=Object.prototype.hasOwnProperty,Zv=(f,h)=>F5(f,"name",{value:h,configurable:!0}),Jv=(f,h)=>{for(var w in h)F5(f,w,{get:h[w],enumerable:!0})},Vv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Kv(h))if(!Mv.call(f,$)&&$!==w)F5(f,$,{get:()=>h[$],enumerable:!(s=Qv(h,$))||s.enumerable})}return f},Pv=(f)=>Vv(F5({},"__esModule",{value:!0}),f),LG={};Jv(LG,{isArrayBuffer:()=>Hv});GG.exports=Pv(LG);var Hv=Zv((f)=>typeof ArrayBuffer==="function"&&f instanceof ArrayBuffer||Object.prototype.toString.call(f)==="[object ArrayBuffer]","isArrayBuffer")});var o1=H((v20,AG)=>{var{defineProperty:r5,getOwnPropertyDescriptor:Nv,getOwnPropertyNames:Dv}=Object,qv=Object.prototype.hasOwnProperty,WG=(f,h)=>r5(f,"name",{value:h,configurable:!0}),kv=(f,h)=>{for(var w in h)r5(f,w,{get:h[w],enumerable:!0})},yv=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Dv(h))if(!qv.call(f,$)&&$!==w)r5(f,$,{get:()=>h[$],enumerable:!(s=Nv(h,$))||s.enumerable})}return f},jv=(f)=>yv(r5({},"__esModule",{value:!0}),f),BG={};kv(BG,{fromArrayBuffer:()=>lv,fromString:()=>vv});AG.exports=jv(BG);var Ov=qT(),kT=L0("node:buffer"),lv=WG((f,h=0,w=f.byteLength-h)=>{if(!Ov.isArrayBuffer(f))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof f} (${f})`);return kT.Buffer.from(f,h,w)},"fromArrayBuffer"),vv=WG((f,h)=>{if(typeof f!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof f} (${f})`);return h?kT.Buffer.from(f,h):kT.Buffer.from(f)},"fromString")});var XG=H((zG)=>{Object.defineProperty(zG,"__esModule",{value:!0});zG.fromBase64=void 0;var bv=o1(),mv=/^[A-Za-z0-9+/]*={0,2}$/,dv=(f)=>{if(f.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!mv.exec(f))throw new TypeError("Invalid base64 string.");let h=bv.fromString(f,"base64");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength)};zG.fromBase64=dv});var u1=H((m20,KG)=>{var{defineProperty:C5,getOwnPropertyDescriptor:iv,getOwnPropertyNames:cv}=Object,gv=Object.prototype.hasOwnProperty,yT=(f,h)=>C5(f,"name",{value:h,configurable:!0}),xv=(f,h)=>{for(var w in h)C5(f,w,{get:h[w],enumerable:!0})},_v=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of cv(h))if(!gv.call(f,$)&&$!==w)C5(f,$,{get:()=>h[$],enumerable:!(s=iv(h,$))||s.enumerable})}return f},nv=(f)=>_v(C5({},"__esModule",{value:!0}),f),SG={};xv(SG,{fromUtf8:()=>QG,toUint8Array:()=>ev,toUtf8:()=>av});KG.exports=nv(SG);var YG=o1(),QG=yT((f)=>{let h=YG.fromString(f,"utf8");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),ev=yT((f)=>{if(typeof f==="string")return QG(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)},"toUint8Array"),av=yT((f)=>{if(typeof f==="string")return f;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return YG.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString("utf8")},"toUtf8")});var JG=H((MG)=>{Object.defineProperty(MG,"__esModule",{value:!0});MG.toBase64=void 0;var pv=o1(),ov=u1(),uv=(f)=>{let h;if(typeof f==="string")h=ov.fromUtf8(f);else h=f;if(typeof h!=="object"||typeof h.byteOffset!=="number"||typeof h.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return pv.fromArrayBuffer(h.buffer,h.byteOffset,h.byteLength).toString("base64")};MG.toBase64=uv});var Gh=H((i20,I5)=>{var{defineProperty:VG,getOwnPropertyDescriptor:tv,getOwnPropertyNames:fb}=Object,hb=Object.prototype.hasOwnProperty,jT=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of fb(h))if(!hb.call(f,$)&&$!==w)VG(f,$,{get:()=>h[$],enumerable:!(s=tv(h,$))||s.enumerable})}return f},PG=(f,h,w)=>(jT(f,h,"default"),w&&jT(w,h,"default")),wb=(f)=>jT(VG({},"__esModule",{value:!0}),f),OT={};I5.exports=wb(OT);PG(OT,XG(),I5.exports);PG(OT,JG(),I5.exports)});var lT=H((NG)=>{Object.defineProperty(NG,"__esModule",{value:!0});NG.ChecksumStream=void 0;var sb=Gh(),$b=L0("node:stream");class HG extends $b.Duplex{constructor({expectedChecksum:f,checksum:h,source:w,checksumSourceLocation:s,base64Encoder:$}){var E,U;super();if(typeof w.pipe==="function")this.source=w;else throw new Error(`@smithy/util-stream: unsupported source type ${(U=(E=w===null||w===void 0?void 0:w.constructor)===null||E===void 0?void 0:E.name)!==null&&U!==void 0?U:w} in ChecksumStream.`);this.base64Encoder=$!==null&&$!==void 0?$:sb.toBase64,this.expectedChecksum=f,this.checksum=h,this.checksumSourceLocation=s,this.source.pipe(this)}_read(f){}_write(f,h,w){try{this.checksum.update(f),this.push(f)}catch(s){return w(s)}return w()}async _final(f){try{let h=await this.checksum.digest(),w=this.base64Encoder(h);if(this.expectedChecksum!==w)return f(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${w}" in response header "${this.checksumSourceLocation}".`))}catch(h){return f(h)}return this.push(null),f()}}NG.ChecksumStream=HG});var Wh=H((qG)=>{Object.defineProperty(qG,"__esModule",{value:!0});qG.isBlob=qG.isReadableStream=void 0;var Eb=(f)=>{var h;return typeof ReadableStream==="function"&&(((h=f===null||f===void 0?void 0:f.constructor)===null||h===void 0?void 0:h.name)===ReadableStream.name||f instanceof ReadableStream)};qG.isReadableStream=Eb;var Ub=(f)=>{var h;return typeof Blob==="function"&&(((h=f===null||f===void 0?void 0:f.constructor)===null||h===void 0?void 0:h.name)===Blob.name||f instanceof Blob)};qG.isBlob=Ub});var lG=H((jG)=>{Object.defineProperty(jG,"__esModule",{value:!0});jG.ChecksumStream=void 0;var Fb=typeof ReadableStream==="function"?ReadableStream:function(){};class yG extends Fb{}jG.ChecksumStream=yG});var mG=H((vG)=>{Object.defineProperty(vG,"__esModule",{value:!0});vG.createChecksumStream=void 0;var rb=Gh(),Cb=Wh(),Ib=lG(),Lb=({expectedChecksum:f,checksum:h,source:w,checksumSourceLocation:s,base64Encoder:$})=>{var E,U;if(!Cb.isReadableStream(w))throw new Error(`@smithy/util-stream: unsupported source type ${(U=(E=w===null||w===void 0?void 0:w.constructor)===null||E===void 0?void 0:E.name)!==null&&U!==void 0?U:w} in ChecksumStream.`);let T=$!==null&&$!==void 0?$:rb.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let F=new TransformStream({start(){},async transform(C,I){h.update(C),I.enqueue(C)},async flush(C){let I=await h.digest(),L=T(I);if(f!==L){let B=new Error(`Checksum mismatch: expected "${f}" but received "${L}" in response header "${s}".`);C.error(B)}else C.terminate()}});w.pipeThrough(F);let r=F.readable;return Object.setPrototypeOf(r,Ib.ChecksumStream.prototype),r};vG.createChecksumStream=Lb});var cG=H((dG)=>{Object.defineProperty(dG,"__esModule",{value:!0});dG.createChecksumStream=void 0;var Gb=Wh(),Wb=lT(),Bb=mG();function Ab(f){if(typeof ReadableStream==="function"&&Gb.isReadableStream(f.source))return Bb.createChecksumStream(f);return new Wb.ChecksumStream(f)}dG.createChecksumStream=Ab});var vT=H((xG)=>{Object.defineProperty(xG,"__esModule",{value:!0});xG.ByteArrayCollector=void 0;class gG{constructor(f){this.allocByteArray=f,this.byteLength=0,this.byteArrays=[]}push(f){this.byteArrays.push(f),this.byteLength+=f.byteLength}flush(){if(this.byteArrays.length===1){let w=this.byteArrays[0];return this.reset(),w}let f=this.allocByteArray(this.byteLength),h=0;for(let w=0;w<this.byteArrays.length;++w){let s=this.byteArrays[w];f.set(s,h),h+=s.byteLength}return this.reset(),f}reset(){this.byteArrays=[],this.byteLength=0}}xG.ByteArrayCollector=gG});var uG=H((pG)=>{Object.defineProperty(pG,"__esModule",{value:!0});pG.modeOf=pG.sizeOf=pG.flush=pG.merge=pG.createBufferedReadable=pG.createBufferedReadableStream=void 0;var zb=vT();function nG(f,h,w){let s=f.getReader(),$=!1,E=0,U=["",new zb.ByteArrayCollector((r)=>new Uint8Array(r))],T=-1,F=async(r)=>{let{value:C,done:I}=await s.read(),L=C;if(I){if(T!==-1){let B=L5(U,T);if(Dw(B)>0)r.enqueue(B)}r.close()}else{let B=aG(L,!1);if(T!==B){if(T>=0)r.enqueue(L5(U,T));T=B}if(T===-1){r.enqueue(L);return}let R=Dw(L);E+=R;let K=Dw(U[T]);if(R>=h&&K===0)r.enqueue(L);else{let Q=eG(U,T,L);if(!$&&E>h*2)$=!0,w===null||w===void 0||w.warn(`@smithy/util-stream - stream chunk size ${R} is below threshold of ${h}, automatically buffering.`);if(Q>=h)r.enqueue(L5(U,T));else await F(r)}}};return new ReadableStream({pull:F})}pG.createBufferedReadableStream=nG;pG.createBufferedReadable=nG;function eG(f,h,w){switch(h){case 0:return f[0]+=w,Dw(f[0]);case 1:case 2:return f[h].push(w),Dw(f[h])}}pG.merge=eG;function L5(f,h){switch(h){case 0:let w=f[0];return f[0]="",w;case 1:case 2:return f[h].flush()}throw new Error(`@smithy/util-stream - invalid index ${h} given to flush()`)}pG.flush=L5;function Dw(f){var h,w;return(w=(h=f===null||f===void 0?void 0:f.byteLength)!==null&&h!==void 0?h:f===null||f===void 0?void 0:f.length)!==null&&w!==void 0?w:0}pG.sizeOf=Dw;function aG(f,h=!0){if(h&&typeof Buffer!=="undefined"&&f instanceof Buffer)return 2;if(f instanceof Uint8Array)return 1;if(typeof f==="string")return 0;return-1}pG.modeOf=aG});var wW=H((fW)=>{Object.defineProperty(fW,"__esModule",{value:!0});fW.createBufferedReadable=void 0;var Kb=L0("node:stream"),tG=vT(),mf=uG(),Mb=Wh();function Zb(f,h,w){if(Mb.isReadableStream(f))return mf.createBufferedReadableStream(f,h,w);let s=new Kb.Readable({read(){}}),$=!1,E=0,U=["",new tG.ByteArrayCollector((F)=>new Uint8Array(F)),new tG.ByteArrayCollector((F)=>Buffer.from(new Uint8Array(F)))],T=-1;return f.on("data",(F)=>{let r=mf.modeOf(F,!0);if(T!==r){if(T>=0)s.push(mf.flush(U,T));T=r}if(T===-1){s.push(F);return}let C=mf.sizeOf(F);E+=C;let I=mf.sizeOf(U[T]);if(C>=h&&I===0)s.push(F);else{let L=mf.merge(U,T,F);if(!$&&E>h*2)$=!0,w===null||w===void 0||w.warn(`@smithy/util-stream - stream chunk size ${C} is below threshold of ${h}, automatically buffering.`);if(L>=h)s.push(mf.flush(U,T))}}),f.on("end",()=>{if(T!==-1){let F=mf.flush(U,T);if(mf.sizeOf(F)>0)s.push(F)}s.push(null)}),s}fW.createBufferedReadable=Zb});var EW=H((sW)=>{Object.defineProperty(sW,"__esModule",{value:!0});sW.getAwsChunkedEncodingStream=void 0;var Jb=L0("node:stream"),Vb=(f,h)=>{let{base64Encoder:w,bodyLengthChecker:s,checksumAlgorithmFn:$,checksumLocationName:E,streamHasher:U}=h,T=w!==void 0&&$!==void 0&&E!==void 0&&U!==void 0,F=T?U($,f):void 0,r=new Jb.Readable({read:()=>{}});return f.on("data",(C)=>{let I=s(C)||0;r.push(`${I.toString(16)}\r
4
- `),r.push(C),r.push(`\r
5
- `)}),f.on("end",async()=>{if(r.push(`0\r
6
- `),T){let C=w(await F);r.push(`${E}:${C}\r
7
- `),r.push(`\r
8
- `)}r.push(null)}),r};sW.getAwsChunkedEncodingStream=Vb});var FW=H((UW)=>{Object.defineProperty(UW,"__esModule",{value:!0});UW.headStream=void 0;async function Pb(f,h){var w;let s=0,$=[],E=f.getReader(),U=!1;while(!U){let{done:r,value:C}=await E.read();if(C)$.push(C),s+=(w=C===null||C===void 0?void 0:C.byteLength)!==null&&w!==void 0?w:0;if(s>=h)break;U=r}E.releaseLock();let T=new Uint8Array(Math.min(h,s)),F=0;for(let r of $){if(r.byteLength>T.byteLength-F){T.set(r.subarray(0,T.byteLength-F),F);break}else T.set(r,F);F+=r.length}return T}UW.headStream=Pb});var LW=H((CW)=>{Object.defineProperty(CW,"__esModule",{value:!0});CW.headStream=void 0;var Hb=L0("node:stream"),Nb=FW(),Db=Wh(),qb=(f,h)=>{if(Db.isReadableStream(f))return Nb.headStream(f,h);return new Promise((w,s)=>{let $=new rW;$.limit=h,f.pipe($),f.on("error",(E)=>{$.end(),s(E)}),$.on("error",s),$.on("finish",function(){let E=new Uint8Array(Buffer.concat(this.buffers));w(E)})})};CW.headStream=qb;class rW extends Hb.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(f,h,w){var s;if(this.buffers.push(f),this.bytesBuffered+=(s=f.byteLength)!==null&&s!==void 0?s:0,this.bytesBuffered>=this.limit){let $=this.bytesBuffered-this.limit,E=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=E.subarray(0,E.byteLength-$),this.emit("finish")}w()}}});var mT=H((fT0,BW)=>{var{defineProperty:G5,getOwnPropertyDescriptor:kb,getOwnPropertyNames:yb}=Object,jb=Object.prototype.hasOwnProperty,bT=(f,h)=>G5(f,"name",{value:h,configurable:!0}),Ob=(f,h)=>{for(var w in h)G5(f,w,{get:h[w],enumerable:!0})},lb=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of yb(h))if(!jb.call(f,$)&&$!==w)G5(f,$,{get:()=>h[$],enumerable:!(s=kb(h,$))||s.enumerable})}return f},vb=(f)=>lb(G5({},"__esModule",{value:!0}),f),GW={};Ob(GW,{escapeUri:()=>WW,escapeUriPath:()=>mb});BW.exports=vb(GW);var WW=bT((f)=>encodeURIComponent(f).replace(/[!'()*]/g,bb),"escapeUri"),bb=bT((f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),mb=bT((f)=>f.split("/").map(WW).join("/"),"escapeUriPath")});var iT=H((hT0,RW)=>{var{defineProperty:W5,getOwnPropertyDescriptor:db,getOwnPropertyNames:ib}=Object,cb=Object.prototype.hasOwnProperty,gb=(f,h)=>W5(f,"name",{value:h,configurable:!0}),xb=(f,h)=>{for(var w in h)W5(f,w,{get:h[w],enumerable:!0})},_b=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ib(h))if(!cb.call(f,$)&&$!==w)W5(f,$,{get:()=>h[$],enumerable:!(s=db(h,$))||s.enumerable})}return f},nb=(f)=>_b(W5({},"__esModule",{value:!0}),f),AW={};xb(AW,{buildQueryString:()=>zW});RW.exports=nb(AW);var dT=mT();function zW(f){let h=[];for(let w of Object.keys(f).sort()){let s=f[w];if(w=dT.escapeUri(w),Array.isArray(s))for(let $=0,E=s.length;$<E;$++)h.push(`${w}=${dT.escapeUri(s[$])}`);else{let $=w;if(s||typeof s==="string")$+=`=${dT.escapeUri(s)}`;h.push($)}}return h.join("&")}gb(zW,"buildQueryString")});var B5=H((wT0,qW)=>{var{create:eb,defineProperty:S$,getOwnPropertyDescriptor:ab,getOwnPropertyNames:pb,getPrototypeOf:ob}=Object,ub=Object.prototype.hasOwnProperty,K0=(f,h)=>S$(f,"name",{value:h,configurable:!0}),tb=(f,h)=>{for(var w in h)S$(f,w,{get:h[w],enumerable:!0})},KW=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of pb(h))if(!ub.call(f,$)&&$!==w)S$(f,$,{get:()=>h[$],enumerable:!(s=ab(h,$))||s.enumerable})}return f},fm=(f,h,w)=>(w=f!=null?eb(ob(f)):{},KW(h||!f||!f.__esModule?S$(w,"default",{value:f,enumerable:!0}):w,f)),hm=(f)=>KW(S$({},"__esModule",{value:!0}),f),MW={};tb(MW,{DEFAULT_REQUEST_TIMEOUT:()=>NW,NodeHttp2Handler:()=>Im,NodeHttpHandler:()=>Tm,streamCollector:()=>Gm});qW.exports=hm(MW);var ZW=u0(),JW=iT(),cT=L0("node:http"),gT=L0("node:https"),wm=["ECONNRESET","EPIPE","ETIMEDOUT"],VW=K0((f)=>{let h={};for(let w of Object.keys(f)){let s=f[w];h[w]=Array.isArray(s)?s.join(","):s}return h},"getTransformedHeaders"),z1={setTimeout:(f,h)=>setTimeout(f,h),clearTimeout:(f)=>clearTimeout(f)},XW=1000,sm=K0((f,h,w=0)=>{if(!w)return-1;let s=K0(($)=>{let E=z1.setTimeout(()=>{f.destroy(),h(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w-$),U=K0((T)=>{if(T?.connecting)T.on("connect",()=>{z1.clearTimeout(E)});else z1.clearTimeout(E)},"doWithSocket");if(f.socket)U(f.socket);else f.on("socket",U)},"registerTimeout");if(w<2000)return s(0),0;return z1.setTimeout(s.bind(null,XW),XW)},"setConnectionTimeout"),$m=3000,Em=K0((f,{keepAlive:h,keepAliveMsecs:w},s=$m)=>{if(h!==!0)return-1;let $=K0(()=>{if(f.socket)f.socket.setKeepAlive(h,w||0);else f.on("socket",(E)=>{E.setKeepAlive(h,w||0)})},"registerListener");if(s===0)return $(),0;return z1.setTimeout($,s)},"setSocketKeepAlive"),SW=3000,Um=K0((f,h,w=NW)=>{let s=K0(($)=>{let E=w-$,U=K0(()=>{f.destroy(),h(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))},"onTimeout");if(f.socket)f.socket.setTimeout(E,U),f.on("close",()=>f.socket?.removeListener("timeout",U));else f.setTimeout(E,U)},"registerTimeout");if(0<w&&w<6000)return s(0),0;return z1.setTimeout(s.bind(null,w===0?0:SW),SW)},"setSocketTimeout"),PW=L0("node:stream"),YW=6000;async function xT(f,h,w=YW){let s=h.headers??{},$=s.Expect||s.expect,E=-1,U=!0;if($==="100-continue")U=await Promise.race([new Promise((T)=>{E=Number(z1.setTimeout(()=>T(!0),Math.max(YW,w)))}),new Promise((T)=>{f.on("continue",()=>{z1.clearTimeout(E),T(!0)}),f.on("response",()=>{z1.clearTimeout(E),T(!1)}),f.on("error",()=>{z1.clearTimeout(E),T(!1)})})]);if(U)HW(f,h.body)}K0(xT,"writeRequestBody");function HW(f,h){if(h instanceof PW.Readable){h.pipe(f);return}if(h){if(Buffer.isBuffer(h)||typeof h==="string"){f.end(h);return}let w=h;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){f.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}f.end(Buffer.from(h));return}f.end()}K0(HW,"writeBody");var NW=0,Tm=class f{constructor(h){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((w,s)=>{if(typeof h==="function")h().then(($)=>{w(this.resolveDefaultConfig($))}).catch(s);else w(this.resolveDefaultConfig(h))})}static{K0(this,"NodeHttpHandler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}static checkSocketUsage(h,w,s=console){let{sockets:$,requests:E,maxSockets:U}=h;if(typeof U!=="number"||U===1/0)return w;let T=15000;if(Date.now()-T<w)return w;if($&&E)for(let F in $){let r=$[F]?.length??0,C=E[F]?.length??0;if(r>=U&&C>=2*U)return s?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${r} and ${C} additional requests are enqueued.
9
- See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
10
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return w}resolveDefaultConfig(h){let{requestTimeout:w,connectionTimeout:s,socketTimeout:$,socketAcquisitionWarningTimeout:E,httpAgent:U,httpsAgent:T}=h||{},F=!0,r=50;return{connectionTimeout:s,requestTimeout:w??$,socketAcquisitionWarningTimeout:E,httpAgent:(()=>{if(U instanceof cT.Agent||typeof U?.destroy==="function")return U;return new cT.Agent({keepAlive:!0,maxSockets:50,...U})})(),httpsAgent:(()=>{if(T instanceof gT.Agent||typeof T?.destroy==="function")return T;return new gT.Agent({keepAlive:!0,maxSockets:50,...T})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(h,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;return new Promise((s,$)=>{let E=void 0,U=[],T=K0(async(y)=>{await E,U.forEach(z1.clearTimeout),s(y)},"resolve"),F=K0(async(y)=>{await E,U.forEach(z1.clearTimeout),$(y)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(w?.aborted){let y=new Error("Request aborted");y.name="AbortError",F(y);return}let r=h.protocol==="https:",C=r?this.config.httpsAgent:this.config.httpAgent;U.push(z1.setTimeout(()=>{this.socketWarningTimestamp=f.checkSocketUsage(C,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let I=JW.buildQueryString(h.query||{}),L=void 0;if(h.username!=null||h.password!=null){let y=h.username??"",n=h.password??"";L=`${y}:${n}`}let B=h.path;if(I)B+=`?${I}`;if(h.fragment)B+=`#${h.fragment}`;let R=h.hostname??"";if(R[0]==="["&&R.endsWith("]"))R=h.hostname.slice(1,-1);else R=h.hostname;let K={headers:h.headers,host:R,method:h.method,path:B,port:h.port,agent:C,auth:L},k=(r?gT.request:cT.request)(K,(y)=>{let n=new ZW.HttpResponse({statusCode:y.statusCode||-1,reason:y.statusMessage,headers:VW(y.headers),body:y});T({response:n})});if(k.on("error",(y)=>{if(wm.includes(y.code))F(Object.assign(y,{name:"TimeoutError"}));else F(y)}),w){let y=K0(()=>{k.destroy();let n=new Error("Request aborted");n.name="AbortError",F(n)},"onAbort");if(typeof w.addEventListener==="function"){let n=w;n.addEventListener("abort",y,{once:!0}),k.once("close",()=>n.removeEventListener("abort",y))}else w.onabort=y}U.push(sm(k,F,this.config.connectionTimeout)),U.push(Um(k,F,this.config.requestTimeout));let D=K.agent;if(typeof D==="object"&&"keepAlive"in D)U.push(Em(k,{keepAlive:D.keepAlive,keepAliveMsecs:D.keepAliveMsecs}));E=xT(k,h,this.config.requestTimeout).catch((y)=>{return U.forEach(z1.clearTimeout),$(y)})})}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[h]:w}})}httpHandlerConfigs(){return this.config??{}}},QW=L0("node:http2"),Fm=fm(L0("node:http2")),rm=class{constructor(f){this.sessions=[],this.sessions=f??[]}static{K0(this,"NodeHttp2ConnectionPool")}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((h)=>h!==f)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(f){for(let h of this.sessions)if(h===f){if(!h.destroyed)h.destroy()}}},Cm=class{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.")}static{K0(this,"NodeHttp2ConnectionManager")}lease(f,h){let w=this.getUrlString(f),s=this.sessionCache.get(w);if(s){let T=s.poll();if(T&&!this.config.disableConcurrency)return T}let $=Fm.default.connect(w);if(this.config.maxConcurrency)$.settings({maxConcurrentStreams:this.config.maxConcurrency},(T)=>{if(T)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+f.destination.toString())});$.unref();let E=K0(()=>{$.destroy(),this.deleteSession(w,$)},"destroySessionCb");if($.on("goaway",E),$.on("error",E),$.on("frameError",E),$.on("close",()=>this.deleteSession(w,$)),h.requestTimeout)$.setTimeout(h.requestTimeout,E);let U=this.sessionCache.get(w)||new rm;return U.offerLast($),this.sessionCache.set(w,U),$}deleteSession(f,h){let w=this.sessionCache.get(f);if(!w)return;if(!w.contains(h))return;w.remove(h),this.sessionCache.set(f,w)}release(f,h){let w=this.getUrlString(f);this.sessionCache.get(w)?.offerLast(h)}destroy(){for(let[f,h]of this.sessionCache){for(let w of h){if(!w.destroyed)w.destroy();h.remove(w)}this.sessionCache.delete(f)}}setMaxConcurrentStreams(f){if(f&&f<=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()}},Im=class f{constructor(h){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Cm({}),this.configProvider=new Promise((w,s)=>{if(typeof h==="function")h().then(($)=>{w($||{})}).catch(s);else w(h||{})})}static{K0(this,"NodeHttp2Handler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}destroy(){this.connectionManager.destroy()}async handle(h,{abortSignal:w}={}){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)}let{requestTimeout:s,disableConcurrentStreams:$}=this.config;return new Promise((E,U)=>{let T=!1,F=void 0,r=K0(async(R0)=>{await F,E(R0)},"resolve"),C=K0(async(R0)=>{await F,U(R0)},"reject");if(w?.aborted){T=!0;let R0=new Error("Request aborted");R0.name="AbortError",C(R0);return}let{hostname:I,method:L,port:B,protocol:R,query:K}=h,Q="";if(h.username!=null||h.password!=null){let R0=h.username??"",p1=h.password??"";Q=`${R0}:${p1}@`}let k=`${R}//${Q}${I}${B?`:${B}`:""}`,D={destination:new URL(k)},y=this.connectionManager.lease(D,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:$||!1}),n=K0((R0)=>{if($)this.destroySession(y);T=!0,C(R0)},"rejectWithDestroy"),I0=JW.buildQueryString(K||{}),v0=h.path;if(I0)v0+=`?${I0}`;if(h.fragment)v0+=`#${h.fragment}`;let $1=y.request({...h.headers,[QW.constants.HTTP2_HEADER_PATH]:v0,[QW.constants.HTTP2_HEADER_METHOD]:L});if(y.ref(),$1.on("response",(R0)=>{let p1=new ZW.HttpResponse({statusCode:R0[":status"]||-1,headers:VW(R0),body:$1});if(T=!0,r({response:p1}),$)y.close(),this.connectionManager.deleteSession(k,y)}),s)$1.setTimeout(s,()=>{$1.close();let R0=new Error(`Stream timed out because of no activity for ${s} ms`);R0.name="TimeoutError",n(R0)});if(w){let R0=K0(()=>{$1.close();let p1=new Error("Request aborted");p1.name="AbortError",n(p1)},"onAbort");if(typeof w.addEventListener==="function"){let p1=w;p1.addEventListener("abort",R0,{once:!0}),$1.once("close",()=>p1.removeEventListener("abort",R0))}else w.onabort=R0}$1.on("frameError",(R0,p1,Ml)=>{n(new Error(`Frame type id ${R0} in stream id ${Ml} has failed with code ${p1}.`))}),$1.on("error",n),$1.on("aborted",()=>{n(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${$1.rstCode}.`))}),$1.on("close",()=>{if(y.unref(),$)y.destroy();if(!T)n(new Error("Unexpected error: http2 request did not get a response"))}),F=xT($1,h,s)})}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[h]:w}})}httpHandlerConfigs(){return this.config??{}}destroySession(h){if(!h.destroyed)h.destroy()}},Lm=class extends PW.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{K0(this,"Collector")}_write(f,h,w){this.bufferedBytes.push(f),w()}},Gm=K0((f)=>{if(Wm(f))return DW(f);return new Promise((h,w)=>{let s=new Lm;f.pipe(s),f.on("error",($)=>{s.end(),w($)}),s.on("error",w),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));h($)})})},"streamCollector"),Wm=K0((f)=>typeof ReadableStream==="function"&&f instanceof ReadableStream,"isReadableStreamInstance");async function DW(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:T,value:F}=await w.read();if(F)h.push(F),$+=F.length;s=T}let E=new Uint8Array($),U=0;for(let T of h)E.set(T,U),U+=T.length;return E}K0(DW,"collectReadableStream")});var mW=H((UT0,bW)=>{var{defineProperty:z5,getOwnPropertyDescriptor:Bm,getOwnPropertyNames:Am}=Object,zm=Object.prototype.hasOwnProperty,Rf=(f,h)=>z5(f,"name",{value:h,configurable:!0}),Rm=(f,h)=>{for(var w in h)z5(f,w,{get:h[w],enumerable:!0})},Xm=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Am(h))if(!zm.call(f,$)&&$!==w)z5(f,$,{get:()=>h[$],enumerable:!(s=Bm(h,$))||s.enumerable})}return f},Sm=(f)=>Xm(z5({},"__esModule",{value:!0}),f),yW={};Rm(yW,{FetchHttpHandler:()=>Qm,keepAliveSupport:()=>A5,streamCollector:()=>Mm});bW.exports=Sm(yW);var kW=u0(),Ym=iT();function _T(f,h){return new Request(f,h)}Rf(_T,"createRequest");function jW(f=0){return new Promise((h,w)=>{if(f)setTimeout(()=>{let s=new Error(`Request did not complete within ${f} ms`);s.name="TimeoutError",w(s)},f)})}Rf(jW,"requestTimeout");var A5={supported:void 0},Qm=class f{static{Rf(this,"FetchHttpHandler")}static create(h){if(typeof h?.handle==="function")return h;return new f(h)}constructor(h){if(typeof h==="function")this.configProvider=h().then((w)=>w||{});else this.config=h??{},this.configProvider=Promise.resolve(this.config);if(A5.supported===void 0)A5.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in _T("https://[::1]"))}destroy(){}async handle(h,{abortSignal:w}={}){if(!this.config)this.config=await this.configProvider;let s=this.config.requestTimeout,$=this.config.keepAlive===!0,E=this.config.credentials;if(w?.aborted){let k=new Error("Request aborted");return k.name="AbortError",Promise.reject(k)}let U=h.path,T=Ym.buildQueryString(h.query||{});if(T)U+=`?${T}`;if(h.fragment)U+=`#${h.fragment}`;let F="";if(h.username!=null||h.password!=null){let k=h.username??"",D=h.password??"";F=`${k}:${D}@`}let{port:r,method:C}=h,I=`${h.protocol}//${F}${h.hostname}${r?`:${r}`:""}${U}`,L=C==="GET"||C==="HEAD"?void 0:h.body,B={body:L,headers:new Headers(h.headers),method:C,credentials:E};if(this.config?.cache)B.cache=this.config.cache;if(L)B.duplex="half";if(typeof AbortController!=="undefined")B.signal=w;if(A5.supported)B.keepalive=$;if(typeof this.config.requestInit==="function")Object.assign(B,this.config.requestInit(h));let R=Rf(()=>{},"removeSignalEventListener"),K=_T(I,B),Q=[fetch(K).then((k)=>{let D=k.headers,y={};for(let I0 of D.entries())y[I0[0]]=I0[1];if(k.body==null)return k.blob().then((I0)=>({response:new kW.HttpResponse({headers:y,reason:k.statusText,statusCode:k.status,body:I0})}));return{response:new kW.HttpResponse({headers:y,reason:k.statusText,statusCode:k.status,body:k.body})}}),jW(s)];if(w)Q.push(new Promise((k,D)=>{let y=Rf(()=>{let n=new Error("Request aborted");n.name="AbortError",D(n)},"onAbort");if(typeof w.addEventListener==="function"){let n=w;n.addEventListener("abort",y,{once:!0}),R=Rf(()=>n.removeEventListener("abort",y),"removeSignalEventListener")}else w.onabort=y}));return Promise.race(Q).finally(R)}updateHttpClientConfig(h,w){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return s[h]=w,s})}httpHandlerConfigs(){return this.config??{}}},Km=Gh(),Mm=Rf(async(f)=>{if(typeof Blob==="function"&&f instanceof Blob||f.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await f.arrayBuffer());return OW(f)}return lW(f)},"streamCollector");async function OW(f){let h=await vW(f),w=Km.fromBase64(h);return new Uint8Array(w)}Rf(OW,"collectBlob");async function lW(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:T,value:F}=await w.read();if(F)h.push(F),$+=F.length;s=T}let E=new Uint8Array($),U=0;for(let T of h)E.set(T,U),U+=T.length;return E}Rf(lW,"collectStream");function vW(f){return new Promise((h,w)=>{let s=new FileReader;s.onloadend=()=>{if(s.readyState!==2)return w(new Error("Reader aborted too early"));let $=s.result??"",E=$.indexOf(","),U=E>-1?E+1:$.length;h($.substring(U))},s.onabort=()=>w(new Error("Read aborted")),s.onerror=()=>w(s.error),s.readAsDataURL(f)})}Rf(vW,"readToBase64")});var eT=H((TT0,_W)=>{var{defineProperty:R5,getOwnPropertyDescriptor:Zm,getOwnPropertyNames:Jm}=Object,Vm=Object.prototype.hasOwnProperty,dW=(f,h)=>R5(f,"name",{value:h,configurable:!0}),Pm=(f,h)=>{for(var w in h)R5(f,w,{get:h[w],enumerable:!0})},Hm=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Jm(h))if(!Vm.call(f,$)&&$!==w)R5(f,$,{get:()=>h[$],enumerable:!(s=Zm(h,$))||s.enumerable})}return f},Nm=(f)=>Hm(R5({},"__esModule",{value:!0}),f),iW={};Pm(iW,{fromHex:()=>gW,toHex:()=>xW});_W.exports=Nm(iW);var cW={},nT={};for(let f=0;f<256;f++){let h=f.toString(16).toLowerCase();if(h.length===1)h=`0${h}`;cW[f]=h,nT[h]=f}function gW(f){if(f.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let h=new Uint8Array(f.length/2);for(let w=0;w<f.length;w+=2){let s=f.slice(w,w+2).toLowerCase();if(s in nT)h[w/2]=nT[s];else throw new Error(`Cannot decode unrecognized sequence ${s} as hexadecimal`)}return h}dW(gW,"fromHex");function xW(f){let h="";for(let w=0;w<f.byteLength;w++)h+=cW[f[w]];return h}dW(xW,"toHex")});var uW=H((pW)=>{Object.defineProperty(pW,"__esModule",{value:!0});pW.sdkStreamMixin=void 0;var Dm=mW(),qm=Gh(),km=eT(),ym=u1(),nW=Wh(),eW="The stream has already been transformed.",jm=(f)=>{var h,w;if(!aW(f)&&!nW.isReadableStream(f)){let U=((w=(h=f===null||f===void 0?void 0:f.__proto__)===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${U}`)}let s=!1,$=async()=>{if(s)throw new Error(eW);return s=!0,await Dm.streamCollector(f)},E=(U)=>{if(typeof U.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
11
- If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return U.stream()};return Object.assign(f,{transformToByteArray:$,transformToString:async(U)=>{let T=await $();if(U==="base64")return qm.toBase64(T);else if(U==="hex")return km.toHex(T);else if(U===void 0||U==="utf8"||U==="utf-8")return ym.toUtf8(T);else if(typeof TextDecoder==="function")return new TextDecoder(U).decode(T);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(s)throw new Error(eW);if(s=!0,aW(f))return E(f);else if(nW.isReadableStream(f))return f;else throw new Error(`Cannot transform payload to web stream, got ${f}`)}})};pW.sdkStreamMixin=jm;var aW=(f)=>typeof Blob==="function"&&f instanceof Blob});var wB=H((fB)=>{Object.defineProperty(fB,"__esModule",{value:!0});fB.sdkStreamMixin=void 0;var Om=B5(),lm=o1(),aT=L0("node:stream"),vm=uW(),tW="The stream has already been transformed.",bm=(f)=>{var h,w;if(!(f instanceof aT.Readable))try{return vm.sdkStreamMixin(f)}catch(E){let U=((w=(h=f===null||f===void 0?void 0:f.__proto__)===null||h===void 0?void 0:h.constructor)===null||w===void 0?void 0:w.name)||f;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${U}`)}let s=!1,$=async()=>{if(s)throw new Error(tW);return s=!0,await Om.streamCollector(f)};return Object.assign(f,{transformToByteArray:$,transformToString:async(E)=>{let U=await $();if(E===void 0||Buffer.isEncoding(E))return lm.fromArrayBuffer(U.buffer,U.byteOffset,U.byteLength).toString(E);else return new TextDecoder(E).decode(U)},transformToWebStream:()=>{if(s)throw new Error(tW);if(f.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof aT.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return s=!0,aT.Readable.toWeb(f)}})};fB.sdkStreamMixin=bm});var EB=H((sB)=>{Object.defineProperty(sB,"__esModule",{value:!0});sB.splitStream=void 0;async function mm(f){if(typeof f.stream==="function")f=f.stream();return f.tee()}sB.splitStream=mm});var CB=H((FB)=>{Object.defineProperty(FB,"__esModule",{value:!0});FB.splitStream=void 0;var UB=L0("node:stream"),dm=EB(),TB=Wh();async function im(f){if(TB.isReadableStream(f)||TB.isBlob(f))return dm.splitStream(f);let h=new UB.PassThrough,w=new UB.PassThrough;return f.pipe(h),f.pipe(w),[h,w]}FB.splitStream=im});var tT=H((LT0,Sf)=>{var{defineProperty:X5,getOwnPropertyDescriptor:cm,getOwnPropertyNames:gm}=Object,xm=Object.prototype.hasOwnProperty,uT=(f,h)=>X5(f,"name",{value:h,configurable:!0}),_m=(f,h)=>{for(var w in h)X5(f,w,{get:h[w],enumerable:!0})},pT=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of gm(h))if(!xm.call(f,$)&&$!==w)X5(f,$,{get:()=>h[$],enumerable:!(s=cm(h,$))||s.enumerable})}return f},Bh=(f,h,w)=>(pT(f,h,"default"),w&&pT(w,h,"default")),nm=(f)=>pT(X5({},"__esModule",{value:!0}),f),Xf={};_m(Xf,{Uint8ArrayBlobAdapter:()=>oT});Sf.exports=nm(Xf);var IB=Gh(),LB=u1();function GB(f,h="utf-8"){if(h==="base64")return IB.toBase64(f);return LB.toUtf8(f)}uT(GB,"transformToString");function WB(f,h){if(h==="base64")return oT.mutate(IB.fromBase64(f));return oT.mutate(LB.fromUtf8(f))}uT(WB,"transformFromString");var oT=class f extends Uint8Array{static{uT(this,"Uint8ArrayBlobAdapter")}static fromString(h,w="utf-8"){switch(typeof h){case"string":return WB(h,w);default:throw new Error(`Unsupported conversion from ${typeof h} to Uint8ArrayBlobAdapter.`)}}static mutate(h){return Object.setPrototypeOf(h,f.prototype),h}transformToString(h="utf-8"){return GB(this,h)}};Bh(Xf,lT(),Sf.exports);Bh(Xf,cG(),Sf.exports);Bh(Xf,wW(),Sf.exports);Bh(Xf,EW(),Sf.exports);Bh(Xf,LW(),Sf.exports);Bh(Xf,wB(),Sf.exports);Bh(Xf,CB(),Sf.exports);Bh(Xf,Wh(),Sf.exports)});var qw=H((GT0,RB)=>{var{defineProperty:wF,getOwnPropertyDescriptor:em,getOwnPropertyNames:am}=Object,pm=Object.prototype.hasOwnProperty,om=(f,h)=>{for(var w in h)wF(f,w,{get:h[w],enumerable:!0})},um=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of am(h))if(!pm.call(f,$)&&$!==w)wF(f,$,{get:()=>h[$],enumerable:!(s=em(h,$))||s.enumerable})}return f},tm=(f)=>um(wF({},"__esModule",{value:!0}),f),BB={};om(BB,{RequestBuilder:()=>zB,collectBody:()=>fd,extendedEncodeURIComponent:()=>hF,requestBuilder:()=>wd,resolvedPath:()=>AB});RB.exports=tm(BB);var fF=tT(),fd=async(f=new Uint8Array,h)=>{if(f instanceof Uint8Array)return fF.Uint8ArrayBlobAdapter.mutate(f);if(!f)return fF.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let w=h.streamCollector(f);return fF.Uint8ArrayBlobAdapter.mutate(await w)};function hF(f){return encodeURIComponent(f).replace(/[!'()*]/g,function(h){return"%"+h.charCodeAt(0).toString(16).toUpperCase()})}var hd=u0(),AB=(f,h,w,s,$,E)=>{if(h!=null&&h[w]!==void 0){let U=s();if(U.length<=0)throw new Error("Empty value provided for input HTTP label: "+w+".");f=f.replace($,E?U.split("/").map((T)=>hF(T)).join("/"):hF(U))}else throw new Error("No value provided for input HTTP label: "+w+".");return f};function wd(f,h){return new zB(f,h)}var zB=class{constructor(f,h){this.input=f,this.context=h,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:f,protocol:h="https",port:w,path:s}=await this.context.endpoint();this.path=s;for(let $ of this.resolvePathStack)$(this.path);return new hd.HttpRequest({protocol:h,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((h)=>{this.path=`${h?.endsWith("/")?h.slice(0,-1):h||""}`+f}),this}p(f,h,w,s){return this.resolvePathStack.push(($)=>{this.path=AB($,this.input,f,h,w,s)}),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}}});var b0=H((BT0,DB)=>{var{defineProperty:Y5,getOwnPropertyDescriptor:sd,getOwnPropertyNames:$d}=Object,Ed=Object.prototype.hasOwnProperty,y0=(f,h)=>Y5(f,"name",{value:h,configurable:!0}),Ud=(f,h)=>{for(var w in h)Y5(f,w,{get:h[w],enumerable:!0})},Td=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of $d(h))if(!Ed.call(f,$)&&$!==w)Y5(f,$,{get:()=>h[$],enumerable:!(s=sd(h,$))||s.enumerable})}return f},Fd=(f)=>Td(Y5({},"__esModule",{value:!0}),f),XB={};Ud(XB,{DefaultIdentityProviderConfig:()=>Sd,EXPIRATION_MS:()=>HB,HttpApiKeyAuthSigner:()=>Yd,HttpBearerAuthSigner:()=>Qd,NoAuthSigner:()=>Kd,createIsIdentityExpiredFunction:()=>PB,createPaginator:()=>JB,doesIdentityRequireRefresh:()=>NB,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Cd,getHttpAuthSchemePlugin:()=>Ld,getHttpSigningPlugin:()=>Bd,getSmithyContext:()=>rd,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>QB,httpAuthSchemeMiddleware:()=>sF,httpAuthSchemeMiddlewareOptions:()=>KB,httpSigningMiddleware:()=>MB,httpSigningMiddlewareOptions:()=>ZB,isIdentityExpired:()=>Md,memoizeIdentityProvider:()=>Zd,normalizeProvider:()=>Ad,requestBuilder:()=>Xd.requestBuilder,setFeature:()=>VB});DB.exports=Fd(XB);var S5=F1(),rd=y0((f)=>f[S5.SMITHY_CONTEXT_KEY]||(f[S5.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),SB=Ih();function YB(f){let h=new Map;for(let w of f)h.set(w.schemeId,w);return h}y0(YB,"convertHttpAuthSchemesToMap");var sF=y0((f,h)=>(w,s)=>async($)=>{let E=f.httpAuthSchemeProvider(await h.httpAuthSchemeParametersProvider(f,s,$.input)),U=YB(f.httpAuthSchemes),T=SB.getSmithyContext(s),F=[];for(let r of E){let C=U.get(r.schemeId);if(!C){F.push(`HttpAuthScheme \`${r.schemeId}\` was not enabled for this service.`);continue}let I=C.identityProvider(await h.identityProviderConfigProvider(f));if(!I){F.push(`HttpAuthScheme \`${r.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:L={},signingProperties:B={}}=r.propertiesExtractor?.(f,s)||{};r.identityProperties=Object.assign(r.identityProperties||{},L),r.signingProperties=Object.assign(r.signingProperties||{},B),T.selectedHttpAuthScheme={httpAuthOption:r,identity:await I(r.identityProperties),signer:C.signer};break}if(!T.selectedHttpAuthScheme)throw new Error(F.join(`
12
- `));return w($)},"httpAuthSchemeMiddleware"),QB={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Cd=y0((f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w})=>({applyToStack:(s)=>{s.addRelativeTo(sF(f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w}),QB)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Id=N(),KB={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Id.serializerMiddlewareOption.name},Ld=y0((f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w})=>({applyToStack:(s)=>{s.addRelativeTo(sF(f,{httpAuthSchemeParametersProvider:h,identityProviderConfigProvider:w}),KB)}}),"getHttpAuthSchemePlugin"),$F=u0(),Gd=y0((f)=>(h)=>{throw h},"defaultErrorHandler"),Wd=y0((f,h)=>{},"defaultSuccessHandler"),MB=y0((f)=>(h,w)=>async(s)=>{if(!$F.HttpRequest.isInstance(s.request))return h(s);let E=SB.getSmithyContext(w).selectedHttpAuthScheme;if(!E)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:U={}},identity:T,signer:F}=E,r=await h({...s,request:await F.sign(s.request,T,U)}).catch((F.errorHandler||Gd)(U));return(F.successHandler||Wd)(r.response,U),r},"httpSigningMiddleware"),ZB={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Bd=y0((f)=>({applyToStack:(h)=>{h.addRelativeTo(MB(f),ZB)}}),"getHttpSigningPlugin"),Ad=y0((f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h},"normalizeProvider"),zd=y0(async(f,h,w,s=(E)=>E,...$)=>{let E=new f(w);return E=s(E)??E,await h.send(E,...$)},"makePagedClientRequest");function JB(f,h,w,s,$){return y0(async function*E(U,T,...F){let r=T,C=U.startingToken??r[w],I=!0,L;while(I){if(r[w]=C,$)r[$]=r[$]??U.pageSize;if(U.client instanceof f)L=await zd(h,U.client,T,U.withCommand,...F);else throw new Error(`Invalid client, expected instance of ${f.name}`);yield L;let B=C;C=Rd(L,s),I=!!(C&&(!U.stopOnSameToken||C!==B))}return},"paginateOperation")}y0(JB,"createPaginator");var Rd=y0((f,h)=>{let w=f,s=h.split(".");for(let $ of s){if(!w||typeof w!=="object")return;w=w[$]}return w},"get"),Xd=qw();function VB(f,h,w){if(!f.__smithy_context)f.__smithy_context={features:{}};else if(!f.__smithy_context.features)f.__smithy_context.features={};f.__smithy_context.features[h]=w}y0(VB,"setFeature");var Sd=class{constructor(f){this.authSchemes=new Map;for(let[h,w]of Object.entries(f))if(w!==void 0)this.authSchemes.set(h,w)}static{y0(this,"DefaultIdentityProviderConfig")}getIdentityProvider(f){return this.authSchemes.get(f)}},Yd=class{static{y0(this,"HttpApiKeyAuthSigner")}async sign(f,h,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(!h.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let s=$F.HttpRequest.clone(f);if(w.in===S5.HttpApiKeyAuthLocation.QUERY)s.query[w.name]=h.apiKey;else if(w.in===S5.HttpApiKeyAuthLocation.HEADER)s.headers[w.name]=w.scheme?`${w.scheme} ${h.apiKey}`:h.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return s}},Qd=class{static{y0(this,"HttpBearerAuthSigner")}async sign(f,h,w){let s=$F.HttpRequest.clone(f);if(!h.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return s.headers.Authorization=`Bearer ${h.token}`,s}},Kd=class{static{y0(this,"NoAuthSigner")}async sign(f,h,w){return f}},PB=y0((f)=>(h)=>NB(h)&&h.expiration.getTime()-Date.now()<f,"createIsIdentityExpiredFunction"),HB=300000,Md=PB(HB),NB=y0((f)=>f.expiration!==void 0,"doesIdentityRequireRefresh"),Zd=y0((f,h,w)=>{if(f===void 0)return;let s=typeof f!=="function"?async()=>Promise.resolve(f):f,$,E,U,T=!1,F=y0(async(r)=>{if(!E)E=s(r);try{$=await E,U=!0,T=!1}finally{E=void 0}return $},"coalesceProvider");if(h===void 0)return async(r)=>{if(!U||r?.forceRefresh)$=await F(r);return $};return async(r)=>{if(!U||r?.forceRefresh)$=await F(r);if(T)return $;if(!w($))return T=!0,$;if(h($))return await F(r),$;return $}},"memoizeIdentityProvider")});function Jd(f){if(f===void 0)return!0;return typeof f==="string"&&f.length<=50}function kw(f){let h=qB.normalizeProvider(f.userAgentAppId??EF),{customUserAgent:w}=f;return Object.assign(f,{customUserAgent:typeof w==="string"?[[w]]:w,userAgentAppId:async()=>{let s=await h();if(!Jd(s)){let $=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console:f.logger;if(typeof s!=="string")$?.warn("userAgentAppId must be a string or undefined.");else if(s.length>50)$?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s}})}var qB,EF=void 0;var kB=G(()=>{qB=Y(b0(),1)});class _h{constructor({size:f,params:h}){if(this.data=new Map,this.parameters=[],this.capacity=f??50,h)this.parameters=h}get(f,h){let w=this.hash(f);if(w===!1)return h();if(!this.data.has(w)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:E,done:U}=s.next();if(this.data.delete(E),U||++$>10)break}}this.data.set(w,h())}return this.data.get(w)}size(){return this.data.size}hash(f){let h="",{parameters:w}=this;if(w.length===0)return!1;for(let s of w){let $=String(f[s]??"");if($.includes("|;"))return!1;h+=$+"|;"}return h}}var Vd,Y$=(f)=>Vd.test(f)||f.startsWith("[")&&f.endsWith("]");var UF=G(()=>{Vd=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$")});var Pd,Q$=(f,h=!1)=>{if(!h)return Pd.test(f);let w=f.split(".");for(let s of w)if(!Q$(s))return!1;return!0};var TF=G(()=>{Pd=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var t1;var Q5=G(()=>{t1={}});var df="endpoints";function H1(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`$${H1(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(H1).join(", ")})`;return JSON.stringify(f,null,2)}var K$=()=>{};var P0;var yB=G(()=>{P0=class P0 extends Error{constructor(f){super(f);this.name="EndpointError"}}});var jB=()=>{};var OB=()=>{};var lB=()=>{};var vB=()=>{};var bB=()=>{};var mB=()=>{};var N1=G(()=>{yB();jB();OB();lB();vB();bB();mB()});var dB=(f,h)=>f===h;var iB=(f)=>{let h=f.split("."),w=[];for(let s of h){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new P0(`Path: '${f}' does not end with ']'`);let E=s.slice($+1,-1);if(Number.isNaN(parseInt(E)))throw new P0(`Invalid array index: '${E}' in path: '${f}'`);if($!==0)w.push(s.slice(0,$));w.push(E)}else w.push(s)}return w};var cB=G(()=>{N1()});var K5=(f,h)=>iB(h).reduce((w,s)=>{if(typeof w!=="object")throw new P0(`Index '${s}' in '${h}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(s)];return w[s]},f);var gB=G(()=>{N1();cB()});var xB=(f)=>f!=null;var _B=(f)=>!f;var M5,FF,nB=(f)=>{let h=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){let{hostname:L,port:B,protocol:R="",path:K="",query:Q={}}=f,k=new URL(`${R}//${L}${B?`:${B}`:""}${K}`);return k.search=Object.entries(Q).map(([D,y])=>`${D}=${y}`).join("&"),k}return new URL(f)}catch(L){return null}})();if(!h)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;let w=h.href,{host:s,hostname:$,pathname:E,protocol:U,search:T}=h;if(T)return null;let F=U.slice(0,-1);if(!Object.values(M5.EndpointURLScheme).includes(F))return null;let r=Y$($),C=w.includes(`${s}:${FF[F]}`)||typeof f==="string"&&f.includes(`${s}:${FF[F]}`),I=`${s}${C?`:${FF[F]}`:""}`;return{scheme:F,authority:I,path:E,normalizedPath:E.endsWith("/")?E:`${E}/`,isIp:r}};var eB=G(()=>{M5=Y(F1(),1);UF();FF={[M5.EndpointURLScheme.HTTP]:80,[M5.EndpointURLScheme.HTTPS]:443}});var aB=(f,h)=>f===h;var pB=(f,h,w,s)=>{if(h>=w||f.length<w)return null;if(!s)return f.substring(h,w);return f.substring(f.length-w,f.length-h)};var oB=(f)=>encodeURIComponent(f).replace(/[!*'()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase()}`);var rF=G(()=>{gB();TF();eB()});var uB;var tB=G(()=>{rF();uB={booleanEquals:dB,getAttr:K5,isSet:xB,isValidHostLabel:Q$,not:_B,parseURL:nB,stringEquals:aB,substring:pB,uriEncode:oB}});var Z5=(f,h)=>{let w=[],s={...h.endpointParams,...h.referenceRecord},$=0;while($<f.length){let E=f.indexOf("{",$);if(E===-1){w.push(f.slice($));break}w.push(f.slice($,E));let U=f.indexOf("}",E);if(U===-1){w.push(f.slice(E));break}if(f[E+1]==="{"&&f[U+1]==="}")w.push(f.slice(E+1,U)),$=U+2;let T=f.substring(E+1,U);if(T.includes("#")){let[F,r]=T.split("#");w.push(K5(s[F],r))}else w.push(s[T]);$=U+1}return w.join("")};var CF=G(()=>{rF()});var fA=({ref:f},h)=>{return{...h.endpointParams,...h.referenceRecord}[f]};var Ah=(f,h,w)=>{if(typeof f==="string")return Z5(f,w);else if(f.fn)return J5(f,w);else if(f.ref)return fA(f,w);throw new P0(`'${h}': ${String(f)} is not a string, function or reference.`)};var M$=G(()=>{N1();IF();CF()});var J5=({fn:f,argv:h},w)=>{let s=h.map((E)=>["boolean","number"].includes(typeof E)?E:Ah(E,"arg",w)),$=f.split(".");if($[0]in t1&&$[1]!=null)return t1[$[0]][$[1]](...s);return uB[f](...s)};var IF=G(()=>{Q5();tB();M$()});var hA=({assign:f,...h},w)=>{if(f&&f in w.referenceRecord)throw new P0(`'${f}' is already defined in Reference Record.`);let s=J5(h,w);return w.logger?.debug?.(`${df} evaluateCondition: ${H1(h)} = ${H1(s)}`),{result:s===""?!0:!!s,...f!=null&&{toAssign:{name:f,value:s}}}};var wA=G(()=>{K$();N1();IF()});var yw=(f=[],h)=>{let w={};for(let s of f){let{result:$,toAssign:E}=hA(s,{...h,referenceRecord:{...h.referenceRecord,...w}});if(!$)return{result:$};if(E)w[E.name]=E.value,h.logger?.debug?.(`${df} assign: ${E.name} := ${H1(E.value)}`)}return{result:!0,referenceRecord:w}};var V5=G(()=>{K$();wA()});var sA=(f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:$.map((E)=>{let U=Ah(E,"Header value entry",h);if(typeof U!=="string")throw new P0(`Header '${s}' value '${U}' is not a string`);return U})}),{});var $A=G(()=>{N1();M$()});var LF=(f,h)=>{if(Array.isArray(f))return f.map((w)=>LF(w,h));switch(typeof f){case"string":return Z5(f,h);case"object":if(f===null)throw new P0(`Unexpected endpoint property: ${f}`);return P5(f,h);case"boolean":return f;default:throw new P0(`Unexpected endpoint property type: ${typeof f}`)}};var EA=G(()=>{N1();CF();GF()});var P5=(f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:LF($,h)}),{});var GF=G(()=>{EA()});var UA=(f,h)=>{let w=Ah(f,"Endpoint URL",h);if(typeof w==="string")try{return new URL(w)}catch(s){throw console.error(`Failed to construct URL with ${w}`,s),s}throw new P0(`Endpoint URL must be a string, got ${typeof w}`)};var TA=G(()=>{N1();M$()});var FA=(f,h)=>{let{conditions:w,endpoint:s}=f,{result:$,referenceRecord:E}=yw(w,h);if(!$)return;let U={...h,referenceRecord:{...h.referenceRecord,...E}},{url:T,properties:F,headers:r}=s;return h.logger?.debug?.(`${df} Resolving endpoint from template: ${H1(s)}`),{...r!=null&&{headers:sA(r,U)},...F!=null&&{properties:P5(F,U)},url:UA(T,U)}};var rA=G(()=>{K$();V5();$A();GF();TA()});var CA=(f,h)=>{let{conditions:w,error:s}=f,{result:$,referenceRecord:E}=yw(w,h);if(!$)return;throw new P0(Ah(s,"Error",{...h,referenceRecord:{...h.referenceRecord,...E}}))};var IA=G(()=>{N1();V5();M$()});var LA=(f,h)=>{let{conditions:w,rules:s}=f,{result:$,referenceRecord:E}=yw(w,h);if(!$)return;return H5(s,{...h,referenceRecord:{...h.referenceRecord,...E}})};var GA=G(()=>{V5();WF()});var H5=(f,h)=>{for(let w of f)if(w.type==="endpoint"){let s=FA(w,h);if(s)return s}else if(w.type==="error")CA(w,h);else if(w.type==="tree"){let s=LA(w,h);if(s)return s}else throw new P0(`Unknown endpoint rule: ${w}`);throw new P0("Rules evaluation failed")};var WF=G(()=>{N1();rA();IA();GA()});var WA=G(()=>{Q5();WF()});var nh=(f,h)=>{let{endpointParams:w,logger:s}=h,{parameters:$,rules:E}=f;h.logger?.debug?.(`${df} Initial EndpointParams: ${H1(w)}`);let U=Object.entries($).filter(([,r])=>r.default!=null).map(([r,C])=>[r,C.default]);if(U.length>0)for(let[r,C]of U)w[r]=w[r]??C;let T=Object.entries($).filter(([,r])=>r.required).map(([r])=>r);for(let r of T)if(w[r]==null)throw new P0(`Missing required parameter: '${r}'`);let F=H5(E,{endpointParams:w,logger:s,referenceRecord:{}});return h.logger?.debug?.(`${df} Resolved endpoint: ${H1(F)}`),F};var BA=G(()=>{K$();N1();WA()});var cf=G(()=>{UF();TF();Q5();BA();N1()});var BF=G(()=>{cf()});var AF=(f,h=!1)=>{if(h){for(let w of f.split("."))if(!AF(w))return!1;return!0}if(!Q$(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(Y$(f))return!1;return!0};var AA=G(()=>{cf();BF()});var zA=(f)=>{let h=f.split(":");if(h.length<6)return null;let[w,s,$,E,U,...T]=h;if(w!=="arn"||s===""||$===""||T.join(":")==="")return null;let F=T.map((r)=>r.split("/")).flat();return{partition:s,service:$,region:E,accountId:U,resourceId:F}};var XA;var RA=G(()=>{XA={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"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)"},"mx-central-1":{description:"Mexico (Central)"},"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:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"}});var Nd,Dd="",SA=(f)=>{let{partitions:h}=Nd;for(let s of h){let{regions:$,outputs:E}=s;for(let[U,T]of Object.entries($))if(U===f)return{...E,...T}}for(let s of h){let{regionRegex:$,outputs:E}=s;if(new RegExp($).test(f))return{...E}}let w=h.find((s)=>s.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}},YA=()=>Dd;var zF=G(()=>{RA();Nd=XA});var eh;var QA=G(()=>{cf();AA();zF();eh={isVirtualHostableS3Bucket:AF,parseArn:zA,partition:SA};t1.aws=eh});var KA=G(()=>{cf()});var MA=G(()=>{cf()});var ZA=()=>{};var JA=()=>{};var VA=()=>{};var PA=()=>{};var HA=()=>{};var NA=G(()=>{MA();ZA();JA();VA();PA();HA()});var Z$=G(()=>{QA();zF();BF();KA();NA()});var k5=H((p30,q5)=>{var DA,qA,kA,yA,jA,OA,lA,vA,bA,mA,dA,iA,cA,N5,RF,gA,xA,_A,jw,nA,eA,aA,pA,oA,uA,tA,f7,h7,D5,w7,s7,$7;(function(f){var h=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(s){f(w(h,w(s)))});else if(typeof q5==="object"&&typeof p30==="object")f(w(h,w(p30)));else f(w(h));function w(s,$){if(s!==h)if(typeof Object.create==="function")Object.defineProperty(s,"__esModule",{value:!0});else s.__esModule=!0;return function(E,U){return s[E]=$?$(E,U):U}}})(function(f){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,U){E.__proto__=U}||function(E,U){for(var T in U)if(Object.prototype.hasOwnProperty.call(U,T))E[T]=U[T]};DA=function(E,U){if(typeof U!=="function"&&U!==null)throw new TypeError("Class extends value "+String(U)+" is not a constructor or null");h(E,U);function T(){this.constructor=E}E.prototype=U===null?Object.create(U):(T.prototype=U.prototype,new T)},qA=Object.assign||function(E){for(var U,T=1,F=arguments.length;T<F;T++){U=arguments[T];for(var r in U)if(Object.prototype.hasOwnProperty.call(U,r))E[r]=U[r]}return E},kA=function(E,U){var T={};for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F)&&U.indexOf(F)<0)T[F]=E[F];if(E!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var r=0,F=Object.getOwnPropertySymbols(E);r<F.length;r++)if(U.indexOf(F[r])<0&&Object.prototype.propertyIsEnumerable.call(E,F[r]))T[F[r]]=E[F[r]]}return T},yA=function(E,U,T,F){var r=arguments.length,C=r<3?U:F===null?F=Object.getOwnPropertyDescriptor(U,T):F,I;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")C=Reflect.decorate(E,U,T,F);else for(var L=E.length-1;L>=0;L--)if(I=E[L])C=(r<3?I(C):r>3?I(U,T,C):I(U,T))||C;return r>3&&C&&Object.defineProperty(U,T,C),C},jA=function(E,U){return function(T,F){U(T,F,E)}},OA=function(E,U,T,F,r,C){function I(v0){if(v0!==void 0&&typeof v0!=="function")throw new TypeError("Function expected");return v0}var L=F.kind,B=L==="getter"?"get":L==="setter"?"set":"value",R=!U&&E?F.static?E:E.prototype:null,K=U||(R?Object.getOwnPropertyDescriptor(R,F.name):{}),Q,k=!1;for(var D=T.length-1;D>=0;D--){var y={};for(var n in F)y[n]=n==="access"?{}:F[n];for(var n in F.access)y.access[n]=F.access[n];y.addInitializer=function(v0){if(k)throw new TypeError("Cannot add initializers after decoration has completed");C.push(I(v0||null))};var I0=T[D](L==="accessor"?{get:K.get,set:K.set}:K[B],y);if(L==="accessor"){if(I0===void 0)continue;if(I0===null||typeof I0!=="object")throw new TypeError("Object expected");if(Q=I(I0.get))K.get=Q;if(Q=I(I0.set))K.set=Q;if(Q=I(I0.init))r.unshift(Q)}else if(Q=I(I0))if(L==="field")r.unshift(Q);else K[B]=Q}if(R)Object.defineProperty(R,F.name,K);k=!0},lA=function(E,U,T){var F=arguments.length>2;for(var r=0;r<U.length;r++)T=F?U[r].call(E,T):U[r].call(E);return F?T:void 0},vA=function(E){return typeof E==="symbol"?E:"".concat(E)},bA=function(E,U,T){if(typeof U==="symbol")U=U.description?"[".concat(U.description,"]"):"";return Object.defineProperty(E,"name",{configurable:!0,value:T?"".concat(T," ",U):U})},mA=function(E,U){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(E,U)},dA=function(E,U,T,F){function r(C){return C instanceof T?C:new T(function(I){I(C)})}return new(T||(T=Promise))(function(C,I){function L(K){try{R(F.next(K))}catch(Q){I(Q)}}function B(K){try{R(F.throw(K))}catch(Q){I(Q)}}function R(K){K.done?C(K.value):r(K.value).then(L,B)}R((F=F.apply(E,U||[])).next())})},iA=function(E,U){var T={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},F,r,C,I=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return I.next=L(0),I.throw=L(1),I.return=L(2),typeof Symbol==="function"&&(I[Symbol.iterator]=function(){return this}),I;function L(R){return function(K){return B([R,K])}}function B(R){if(F)throw new TypeError("Generator is already executing.");while(I&&(I=0,R[0]&&(T=0)),T)try{if(F=1,r&&(C=R[0]&2?r.return:R[0]?r.throw||((C=r.return)&&C.call(r),0):r.next)&&!(C=C.call(r,R[1])).done)return C;if(r=0,C)R=[R[0]&2,C.value];switch(R[0]){case 0:case 1:C=R;break;case 4:return T.label++,{value:R[1],done:!1};case 5:T.label++,r=R[1],R=[0];continue;case 7:R=T.ops.pop(),T.trys.pop();continue;default:if((C=T.trys,!(C=C.length>0&&C[C.length-1]))&&(R[0]===6||R[0]===2)){T=0;continue}if(R[0]===3&&(!C||R[1]>C[0]&&R[1]<C[3])){T.label=R[1];break}if(R[0]===6&&T.label<C[1]){T.label=C[1],C=R;break}if(C&&T.label<C[2]){T.label=C[2],T.ops.push(R);break}if(C[2])T.ops.pop();T.trys.pop();continue}R=U.call(E,T)}catch(K){R=[6,K],r=0}finally{F=C=0}if(R[0]&5)throw R[1];return{value:R[0]?R[1]:void 0,done:!0}}},cA=function(E,U){for(var T in E)if(T!=="default"&&!Object.prototype.hasOwnProperty.call(U,T))D5(U,E,T)},D5=Object.create?function(E,U,T,F){if(F===void 0)F=T;var r=Object.getOwnPropertyDescriptor(U,T);if(!r||("get"in r?!U.__esModule:r.writable||r.configurable))r={enumerable:!0,get:function(){return U[T]}};Object.defineProperty(E,F,r)}:function(E,U,T,F){if(F===void 0)F=T;E[F]=U[T]},N5=function(E){var U=typeof Symbol==="function"&&Symbol.iterator,T=U&&E[U],F=0;if(T)return T.call(E);if(E&&typeof E.length==="number")return{next:function(){if(E&&F>=E.length)E=void 0;return{value:E&&E[F++],done:!E}}};throw new TypeError(U?"Object is not iterable.":"Symbol.iterator is not defined.")},RF=function(E,U){var T=typeof Symbol==="function"&&E[Symbol.iterator];if(!T)return E;var F=T.call(E),r,C=[],I;try{while((U===void 0||U-- >0)&&!(r=F.next()).done)C.push(r.value)}catch(L){I={error:L}}finally{try{if(r&&!r.done&&(T=F.return))T.call(F)}finally{if(I)throw I.error}}return C},gA=function(){for(var E=[],U=0;U<arguments.length;U++)E=E.concat(RF(arguments[U]));return E},xA=function(){for(var E=0,U=0,T=arguments.length;U<T;U++)E+=arguments[U].length;for(var F=Array(E),r=0,U=0;U<T;U++)for(var C=arguments[U],I=0,L=C.length;I<L;I++,r++)F[r]=C[I];return F},_A=function(E,U,T){if(T||arguments.length===2){for(var F=0,r=U.length,C;F<r;F++)if(C||!(F in U)){if(!C)C=Array.prototype.slice.call(U,0,F);C[F]=U[F]}}return E.concat(C||Array.prototype.slice.call(U))},jw=function(E){return this instanceof jw?(this.v=E,this):new jw(E)},nA=function(E,U,T){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var F=T.apply(E,U||[]),r,C=[];return r=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),L("next"),L("throw"),L("return",I),r[Symbol.asyncIterator]=function(){return this},r;function I(D){return function(y){return Promise.resolve(y).then(D,Q)}}function L(D,y){if(F[D]){if(r[D]=function(n){return new Promise(function(I0,v0){C.push([D,n,I0,v0])>1||B(D,n)})},y)r[D]=y(r[D])}}function B(D,y){try{R(F[D](y))}catch(n){k(C[0][3],n)}}function R(D){D.value instanceof jw?Promise.resolve(D.value.v).then(K,Q):k(C[0][2],D)}function K(D){B("next",D)}function Q(D){B("throw",D)}function k(D,y){if(D(y),C.shift(),C.length)B(C[0][0],C[0][1])}},eA=function(E){var U,T;return U={},F("next"),F("throw",function(r){throw r}),F("return"),U[Symbol.iterator]=function(){return this},U;function F(r,C){U[r]=E[r]?function(I){return(T=!T)?{value:jw(E[r](I)),done:!1}:C?C(I):I}:C}},aA=function(E){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var U=E[Symbol.asyncIterator],T;return U?U.call(E):(E=typeof N5==="function"?N5(E):E[Symbol.iterator](),T={},F("next"),F("throw"),F("return"),T[Symbol.asyncIterator]=function(){return this},T);function F(C){T[C]=E[C]&&function(I){return new Promise(function(L,B){I=E[C](I),r(L,B,I.done,I.value)})}}function r(C,I,L,B){Promise.resolve(B).then(function(R){C({value:R,done:L})},I)}},pA=function(E,U){if(Object.defineProperty)Object.defineProperty(E,"raw",{value:U});else E.raw=U;return E};var w=Object.create?function(E,U){Object.defineProperty(E,"default",{enumerable:!0,value:U})}:function(E,U){E.default=U},s=function(E){return s=Object.getOwnPropertyNames||function(U){var T=[];for(var F in U)if(Object.prototype.hasOwnProperty.call(U,F))T[T.length]=F;return T},s(E)};oA=function(E){if(E&&E.__esModule)return E;var U={};if(E!=null){for(var T=s(E),F=0;F<T.length;F++)if(T[F]!=="default")D5(U,E,T[F])}return w(U,E),U},uA=function(E){return E&&E.__esModule?E:{default:E}},tA=function(E,U,T,F){if(T==="a"&&!F)throw new TypeError("Private accessor was defined without a getter");if(typeof U==="function"?E!==U||!F:!U.has(E))throw new TypeError("Cannot read private member from an object whose class did not declare it");return T==="m"?F:T==="a"?F.call(E):F?F.value:U.get(E)},f7=function(E,U,T,F,r){if(F==="m")throw new TypeError("Private method is not writable");if(F==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof U==="function"?E!==U||!r:!U.has(E))throw new TypeError("Cannot write private member to an object whose class did not declare it");return F==="a"?r.call(E,T):r?r.value=T:U.set(E,T),T},h7=function(E,U){if(U===null||typeof U!=="object"&&typeof U!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof E==="function"?U===E:E.has(U)},w7=function(E,U,T){if(U!==null&&U!==void 0){if(typeof U!=="object"&&typeof U!=="function")throw new TypeError("Object expected.");var F,r;if(T){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");F=U[Symbol.asyncDispose]}if(F===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(F=U[Symbol.dispose],T)r=F}if(typeof F!=="function")throw new TypeError("Object not disposable.");if(r)F=function(){try{r.call(this)}catch(C){return Promise.reject(C)}};E.stack.push({value:U,dispose:F,async:T})}else if(T)E.stack.push({async:!0});return U};var $=typeof SuppressedError==="function"?SuppressedError:function(E,U,T){var F=new Error(T);return F.name="SuppressedError",F.error=E,F.suppressed=U,F};s7=function(E){function U(C){E.error=E.hasError?new $(C,E.error,"An error was suppressed during disposal."):C,E.hasError=!0}var T,F=0;function r(){while(T=E.stack.pop())try{if(!T.async&&F===1)return F=0,E.stack.push(T),Promise.resolve().then(r);if(T.dispose){var C=T.dispose.call(T.value);if(T.async)return F|=2,Promise.resolve(C).then(r,function(I){return U(I),r()})}else F|=1}catch(I){U(I)}if(F===1)return E.hasError?Promise.reject(E.error):Promise.resolve();if(E.hasError)throw E.error}return r()},$7=function(E,U){if(typeof E==="string"&&/^\.\.?\//.test(E))return E.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(T,F,r,C,I){return F?U?".jsx":".js":r&&(!C||!I)?T:r+C+"."+I.toLowerCase()+"js"});return E},f("__extends",DA),f("__assign",qA),f("__rest",kA),f("__decorate",yA),f("__param",jA),f("__esDecorate",OA),f("__runInitializers",lA),f("__propKey",vA),f("__setFunctionName",bA),f("__metadata",mA),f("__awaiter",dA),f("__generator",iA),f("__exportStar",cA),f("__createBinding",D5),f("__values",N5),f("__read",RF),f("__spread",gA),f("__spreadArrays",xA),f("__spreadArray",_A),f("__await",jw),f("__asyncGenerator",nA),f("__asyncDelegator",eA),f("__asyncValues",aA),f("__makeTemplateObject",pA),f("__importStar",oA),f("__importDefault",uA),f("__classPrivateFieldGet",tA),f("__classPrivateFieldSet",f7),f("__classPrivateFieldIn",h7),f("__addDisposableResource",w7),f("__disposeResources",s7),f("__rewriteRelativeImportExtension",$7)})});var C1=H((o30,F7)=>{var{defineProperty:y5,getOwnPropertyDescriptor:qd,getOwnPropertyNames:kd}=Object,yd=Object.prototype.hasOwnProperty,SF=(f,h)=>y5(f,"name",{value:h,configurable:!0}),jd=(f,h)=>{for(var w in h)y5(f,w,{get:h[w],enumerable:!0})},Od=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of kd(h))if(!yd.call(f,$)&&$!==w)y5(f,$,{get:()=>h[$],enumerable:!(s=qd(h,$))||s.enumerable})}return f},ld=(f)=>Od(y5({},"__esModule",{value:!0}),f),E7={};jd(E7,{emitWarningIfUnsupportedVersion:()=>vd,setCredentialFeature:()=>U7,setFeature:()=>T7,state:()=>XF});F7.exports=ld(E7);var XF={warningEmitted:!1},vd=SF((f)=>{if(f&&!XF.warningEmitted&&parseInt(f.substring(1,f.indexOf(".")))<18)XF.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
13
- no longer support Node.js 16.x on January 6, 2025.
14
-
15
- To continue receiving updates to AWS services, bug fixes, and security
16
- updates please upgrade to a supported Node.js LTS version.
17
-
18
- More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");function U7(f,h,w){if(!f.$source)f.$source={};return f.$source[h]=w,f}SF(U7,"setCredentialFeature");function T7(f,h,w){if(!f.__aws_sdk_context)f.__aws_sdk_context={features:{}};else if(!f.__aws_sdk_context.features)f.__aws_sdk_context.features={};f.__aws_sdk_context.features[h]=w}SF(T7,"setFeature")});var J$=H((u30,C7)=>{var{defineProperty:j5,getOwnPropertyDescriptor:bd,getOwnPropertyNames:md}=Object,dd=Object.prototype.hasOwnProperty,ah=(f,h)=>j5(f,"name",{value:h,configurable:!0}),id=(f,h)=>{for(var w in h)j5(f,w,{get:h[w],enumerable:!0})},cd=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of md(h))if(!dd.call(f,$)&&$!==w)j5(f,$,{get:()=>h[$],enumerable:!(s=bd(h,$))||s.enumerable})}return f},gd=(f)=>cd(j5({},"__esModule",{value:!0}),f),r7={};id(r7,{CredentialsProviderError:()=>xd,ProviderError:()=>O5,TokenProviderError:()=>_d,chain:()=>nd,fromStatic:()=>ed,memoize:()=>ad});C7.exports=gd(r7);var O5=class f extends Error{constructor(h,w=!0){let s,$=!0;if(typeof w==="boolean")s=void 0,$=w;else if(w!=null&&typeof w==="object")s=w.logger,$=w.tryNextLink??!0;super(h);this.name="ProviderError",this.tryNextLink=$,Object.setPrototypeOf(this,f.prototype),s?.debug?.(`@smithy/property-provider ${$?"->":"(!)"} ${h}`)}static{ah(this,"ProviderError")}static from(h,w=!0){return Object.assign(new this(h.message,w),h)}},xd=class f extends O5{constructor(h,w=!0){super(h,w);this.name="CredentialsProviderError",Object.setPrototypeOf(this,f.prototype)}static{ah(this,"CredentialsProviderError")}},_d=class f extends O5{constructor(h,w=!0){super(h,w);this.name="TokenProviderError",Object.setPrototypeOf(this,f.prototype)}static{ah(this,"TokenProviderError")}},nd=ah((...f)=>async()=>{if(f.length===0)throw new O5("No providers in chain");let h;for(let w of f)try{return await w()}catch(s){if(h=s,s?.tryNextLink)continue;throw s}throw h},"chain"),ed=ah((f)=>()=>Promise.resolve(f),"fromStatic"),ad=ah((f,h,w)=>{let s,$,E,U=!1,T=ah(async()=>{if(!$)$=f();try{s=await $,E=!0,U=!1}finally{$=void 0}return s},"coalesceProvider");if(h===void 0)return async(F)=>{if(!E||F?.forceRefresh)s=await T();return s};return async(F)=>{if(!E||F?.forceRefresh)s=await T();if(U)return s;if(w&&!w(s))return U=!0,s;if(h(s))return await T(),s;return s}},"memoize")});var V7=H((t30,J7)=>{var{defineProperty:i5,getOwnPropertyDescriptor:pd,getOwnPropertyNames:od}=Object,ud=Object.prototype.hasOwnProperty,a0=(f,h)=>i5(f,"name",{value:h,configurable:!0}),td=(f,h)=>{for(var w in h)i5(f,w,{get:h[w],enumerable:!0})},fi=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of od(h))if(!ud.call(f,$)&&$!==w)i5(f,$,{get:()=>h[$],enumerable:!(s=pd(h,$))||s.enumerable})}return f},hi=(f)=>fi(i5({},"__esModule",{value:!0}),f),B7={};td(B7,{SignatureV4:()=>Vi,clearCredentialCache:()=>Ri,createScope:()=>b5,getCanonicalHeaders:()=>MF,getCanonicalQuery:()=>K7,getPayloadHash:()=>d5,getSigningKey:()=>Q7,moveHeadersToQuery:()=>Z7,prepareRequest:()=>JF});J7.exports=hi(B7);var I7=Ih(),YF=u1(),wi="X-Amz-Algorithm",si="X-Amz-Credential",A7="X-Amz-Date",$i="X-Amz-SignedHeaders",Ei="X-Amz-Expires",z7="X-Amz-Signature",R7="X-Amz-Security-Token",X7="authorization",S7=A7.toLowerCase(),Ui="date",Ti=[X7,S7,Ui],Fi=z7.toLowerCase(),KF="x-amz-content-sha256",ri=R7.toLowerCase(),Ci={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},Ii=/^proxy-/,Li=/^sec-/,QF="AWS4-HMAC-SHA256",Gi="AWS4-HMAC-SHA256-PAYLOAD",Wi="UNSIGNED-PAYLOAD",Bi=50,Y7="aws4_request",Ai=604800,zh=eT(),zi=u1(),Ow={},v5=[],b5=a0((f,h,w)=>`${f}/${h}/${w}/${Y7}`,"createScope"),Q7=a0(async(f,h,w,s,$)=>{let E=await L7(f,h.secretAccessKey,h.accessKeyId),U=`${w}:${s}:${$}:${zh.toHex(E)}:${h.sessionToken}`;if(U in Ow)return Ow[U];v5.push(U);while(v5.length>Bi)delete Ow[v5.shift()];let T=`AWS4${h.secretAccessKey}`;for(let F of[w,s,$,Y7])T=await L7(f,T,F);return Ow[U]=T},"getSigningKey"),Ri=a0(()=>{v5.length=0,Object.keys(Ow).forEach((f)=>{delete Ow[f]})},"clearCredentialCache"),L7=a0((f,h,w)=>{let s=new f(h);return s.update(zi.toUint8Array(w)),s.digest()},"hmac"),MF=a0(({headers:f},h,w)=>{let s={};for(let $ of Object.keys(f).sort()){if(f[$]==null)continue;let E=$.toLowerCase();if(E in Ci||h?.has(E)||Ii.test(E)||Li.test(E)){if(!w||w&&!w.has(E))continue}s[E]=f[$].trim().replace(/\s+/g," ")}return s},"getCanonicalHeaders"),m5=mT(),K7=a0(({query:f={}})=>{let h=[],w={};for(let s of Object.keys(f)){if(s.toLowerCase()===Fi)continue;let $=m5.escapeUri(s);h.push($);let E=f[s];if(typeof E==="string")w[$]=`${$}=${m5.escapeUri(E)}`;else if(Array.isArray(E))w[$]=E.slice(0).reduce((U,T)=>U.concat([`${$}=${m5.escapeUri(T)}`]),[]).sort().join("&")}return h.sort().map((s)=>w[s]).filter((s)=>s).join("&")},"getCanonicalQuery"),Xi=qT(),Si=u1(),d5=a0(async({headers:f,body:h},w)=>{for(let s of Object.keys(f))if(s.toLowerCase()===KF)return f[s];if(h==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof h==="string"||ArrayBuffer.isView(h)||Xi.isArrayBuffer(h)){let s=new w;return s.update(Si.toUint8Array(h)),zh.toHex(await s.digest())}return Wi},"getPayloadHash"),G7=u1(),Yi=class{static{a0(this,"HeaderFormatter")}format(f){let h=[];for(let $ of Object.keys(f)){let E=G7.fromUtf8($);h.push(Uint8Array.from([E.byteLength]),E,this.formatHeaderValue(f[$]))}let w=new Uint8Array(h.reduce(($,E)=>$+E.byteLength,0)),s=0;for(let $ of h)w.set($,s),s+=$.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":let h=new DataView(new ArrayBuffer(3));return h.setUint8(0,3),h.setInt16(1,f.value,!1),new Uint8Array(h.buffer);case"integer":let w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,f.value,!1),new Uint8Array(w.buffer);case"long":let s=new Uint8Array(9);return s[0]=5,s.set(f.value.bytes,1),s;case"binary":let $=new DataView(new ArrayBuffer(3+f.value.byteLength));$.setUint8(0,6),$.setUint16(1,f.value.byteLength,!1);let E=new Uint8Array($.buffer);return E.set(f.value,3),E;case"string":let U=G7.fromUtf8(f.value),T=new DataView(new ArrayBuffer(3+U.byteLength));T.setUint8(0,7),T.setUint16(1,U.byteLength,!1);let F=new Uint8Array(T.buffer);return F.set(U,3),F;case"timestamp":let r=new Uint8Array(9);return r[0]=8,r.set(Ki.fromNumber(f.value.valueOf()).bytes,1),r;case"uuid":if(!Qi.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);let C=new Uint8Array(17);return C[0]=9,C.set(zh.fromHex(f.value.replace(/\-/g,"")),1),C}}},Qi=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Ki=class f{constructor(h){if(this.bytes=h,h.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static{a0(this,"Int64")}static fromNumber(h){if(h>9223372036854776000||h<-9223372036854776000)throw new Error(`${h} is too large (or, if negative, too small) to represent as an Int64`);let w=new Uint8Array(8);for(let s=7,$=Math.abs(Math.round(h));s>-1&&$>0;s--,$/=256)w[s]=$;if(h<0)ZF(w);return new f(w)}valueOf(){let h=this.bytes.slice(0),w=h[0]&128;if(w)ZF(h);return parseInt(zh.toHex(h),16)*(w?-1:1)}toString(){return String(this.valueOf())}};function ZF(f){for(let h=0;h<8;h++)f[h]^=255;for(let h=7;h>-1;h--)if(f[h]++,f[h]!==0)break}a0(ZF,"negate");var Mi=a0((f,h)=>{f=f.toLowerCase();for(let w of Object.keys(h))if(f===w.toLowerCase())return!0;return!1},"hasHeader"),M7=u0(),Z7=a0((f,h={})=>{let{headers:w,query:s={}}=M7.HttpRequest.clone(f);for(let $ of Object.keys(w)){let E=$.toLowerCase();if(E.slice(0,6)==="x-amz-"&&!h.unhoistableHeaders?.has(E)||h.hoistableHeaders?.has(E))s[$]=w[$],delete w[$]}return{...f,headers:w,query:s}},"moveHeadersToQuery"),JF=a0((f)=>{f=M7.HttpRequest.clone(f);for(let h of Object.keys(f.headers))if(Ti.indexOf(h.toLowerCase())>-1)delete f.headers[h];return f},"prepareRequest"),Zi=a0((f)=>Ji(f).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),Ji=a0((f)=>{if(typeof f==="number")return new Date(f*1000);if(typeof f==="string"){if(Number(f))return new Date(Number(f)*1000);return new Date(f)}return f},"toDate"),Vi=class{constructor({applyChecksum:f,credentials:h,region:w,service:s,sha256:$,uriEscapePath:E=!0}){this.headerFormatter=new Yi,this.service=s,this.sha256=$,this.uriEscapePath=E,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=I7.normalizeProvider(w),this.credentialProvider=I7.normalizeProvider(h)}static{a0(this,"SignatureV4")}async presign(f,h={}){let{signingDate:w=new Date,expiresIn:s=3600,unsignableHeaders:$,unhoistableHeaders:E,signableHeaders:U,hoistableHeaders:T,signingRegion:F,signingService:r}=h,C=await this.credentialProvider();this.validateResolvedCredentials(C);let I=F??await this.regionProvider(),{longDate:L,shortDate:B}=l5(w);if(s>Ai)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let R=b5(B,I,r??this.service),K=Z7(JF(f),{unhoistableHeaders:E,hoistableHeaders:T});if(C.sessionToken)K.query[R7]=C.sessionToken;K.query[wi]=QF,K.query[si]=`${C.accessKeyId}/${R}`,K.query[A7]=L,K.query[Ei]=s.toString(10);let Q=MF(K,$,U);return K.query[$i]=W7(Q),K.query[z7]=await this.getSignature(L,R,this.getSigningKey(C,I,B,r),this.createCanonicalRequest(K,Q,await d5(f,this.sha256))),K}async sign(f,h){if(typeof f==="string")return this.signString(f,h);else if(f.headers&&f.payload)return this.signEvent(f,h);else if(f.message)return this.signMessage(f,h);else return this.signRequest(f,h)}async signEvent({headers:f,payload:h},{signingDate:w=new Date,priorSignature:s,signingRegion:$,signingService:E}){let U=$??await this.regionProvider(),{shortDate:T,longDate:F}=l5(w),r=b5(T,U,E??this.service),C=await d5({headers:{},body:h},this.sha256),I=new this.sha256;I.update(f);let L=zh.toHex(await I.digest()),B=[Gi,F,r,s,L,C].join(`
19
- `);return this.signString(B,{signingDate:w,signingRegion:U,signingService:E})}async signMessage(f,{signingDate:h=new Date,signingRegion:w,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(f.message.headers),payload:f.message.body},{signingDate:h,signingRegion:w,signingService:s,priorSignature:f.priorSignature}).then((E)=>{return{message:f.message,signature:E}})}async signString(f,{signingDate:h=new Date,signingRegion:w,signingService:s}={}){let $=await this.credentialProvider();this.validateResolvedCredentials($);let E=w??await this.regionProvider(),{shortDate:U}=l5(h),T=new this.sha256(await this.getSigningKey($,E,U,s));return T.update(YF.toUint8Array(f)),zh.toHex(await T.digest())}async signRequest(f,{signingDate:h=new Date,signableHeaders:w,unsignableHeaders:s,signingRegion:$,signingService:E}={}){let U=await this.credentialProvider();this.validateResolvedCredentials(U);let T=$??await this.regionProvider(),F=JF(f),{longDate:r,shortDate:C}=l5(h),I=b5(C,T,E??this.service);if(F.headers[S7]=r,U.sessionToken)F.headers[ri]=U.sessionToken;let L=await d5(F,this.sha256);if(!Mi(KF,F.headers)&&this.applyChecksum)F.headers[KF]=L;let B=MF(F,s,w),R=await this.getSignature(r,I,this.getSigningKey(U,T,C,E),this.createCanonicalRequest(F,B,L));return F.headers[X7]=`${QF} Credential=${U.accessKeyId}/${I}, SignedHeaders=${W7(B)}, Signature=${R}`,F}createCanonicalRequest(f,h,w){let s=Object.keys(h).sort();return`${f.method}
20
- ${this.getCanonicalPath(f)}
21
- ${K7(f)}
22
- ${s.map(($)=>`${$}:${h[$]}`).join(`
23
- `)}
24
-
25
- ${s.join(";")}
26
- ${w}`}async createStringToSign(f,h,w){let s=new this.sha256;s.update(YF.toUint8Array(w));let $=await s.digest();return`${QF}
27
- ${f}
28
- ${h}
29
- ${zh.toHex($)}`}getCanonicalPath({path:f}){if(this.uriEscapePath){let h=[];for(let $ of f.split("/")){if($?.length===0)continue;if($===".")continue;if($==="..")h.pop();else h.push($)}let w=`${f?.startsWith("/")?"/":""}${h.join("/")}${h.length>0&&f?.endsWith("/")?"/":""}`;return m5.escapeUri(w).replace(/%2F/g,"/")}return f}async getSignature(f,h,w,s){let $=await this.createStringToSign(f,h,s),E=new this.sha256(await w);return E.update(YF.toUint8Array($)),zh.toHex(await E.digest())}getSigningKey(f,h,w,s){return Q7(this.sha256,f,w,h,s||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")}},l5=a0((f)=>{let h=Zi(f).replace(/[\-:]/g,"");return{longDate:h,shortDate:h.slice(0,8)}},"formatDate"),W7=a0((f)=>Object.keys(f).sort().join(";"),"getCanonicalHeaderList")});var l7=H((w80,O7)=>{var{defineProperty:c5,getOwnPropertyDescriptor:Pi,getOwnPropertyNames:Hi}=Object,Ni=Object.prototype.hasOwnProperty,t0=(f,h)=>c5(f,"name",{value:h,configurable:!0}),Di=(f,h)=>{for(var w in h)c5(f,w,{get:h[w],enumerable:!0})},qi=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Hi(h))if(!Ni.call(f,$)&&$!==w)c5(f,$,{get:()=>h[$],enumerable:!(s=Pi(h,$))||s.enumerable})}return f},ki=(f)=>qi(c5({},"__esModule",{value:!0}),f),q7={};Di(q7,{AWSSDKSigV4Signer:()=>li,AwsSdkSigV4ASigner:()=>bi,AwsSdkSigV4Signer:()=>HF,NODE_SIGV4A_CONFIG_OPTIONS:()=>ii,resolveAWSSDKSigV4Config:()=>gi,resolveAwsSdkSigV4AConfig:()=>di,resolveAwsSdkSigV4Config:()=>k7,validateSigningProperties:()=>PF});O7.exports=ki(q7);var yi=u0(),ji=u0(),P7=t0((f)=>ji.HttpResponse.isInstance(f)?f.headers?.date??f.headers?.Date:void 0,"getDateHeader"),VF=t0((f)=>new Date(Date.now()+f),"getSkewCorrectedDate"),Oi=t0((f,h)=>Math.abs(VF(h).getTime()-f)>=300000,"isClockSkewed"),H7=t0((f,h)=>{let w=Date.parse(f);if(Oi(w,h))return w-Date.now();return h},"getUpdatedSystemClockOffset"),V$=t0((f,h)=>{if(!h)throw new Error(`Property \`${f}\` is not resolved for AWS SDK SigV4Auth`);return h},"throwSigningPropertyError"),PF=t0(async(f)=>{let h=V$("context",f.context),w=V$("config",f.config),s=h.endpointV2?.properties?.authSchemes?.[0],E=await V$("signer",w.signer)(s),U=f?.signingRegion,T=f?.signingRegionSet,F=f?.signingName;return{config:w,signer:E,signingRegion:U,signingRegionSet:T,signingName:F}},"validateSigningProperties"),HF=class{static{t0(this,"AwsSdkSigV4Signer")}async sign(f,h,w){if(!yi.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let s=await PF(w),{config:$,signer:E}=s,{signingRegion:U,signingName:T}=s,F=w.context;if(F?.authSchemes?.length??0>1){let[C,I]=F.authSchemes;if(C?.name==="sigv4a"&&I?.name==="sigv4")U=I?.signingRegion??U,T=I?.signingName??T}return await E.sign(f,{signingDate:VF($.systemClockOffset),signingRegion:U,signingService:T})}errorHandler(f){return(h)=>{let w=h.ServerTime??P7(h.$response);if(w){let s=V$("config",f.config),$=s.systemClockOffset;if(s.systemClockOffset=H7(w,s.systemClockOffset),s.systemClockOffset!==$&&h.$metadata)h.$metadata.clockSkewCorrected=!0}throw h}}successHandler(f,h){let w=P7(f);if(w){let s=V$("config",h.config);s.systemClockOffset=H7(w,s.systemClockOffset)}}},li=HF,vi=u0(),bi=class extends HF{static{t0(this,"AwsSdkSigV4ASigner")}async sign(f,h,w){if(!vi.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:s,signer:$,signingRegion:E,signingRegionSet:U,signingName:T}=await PF(w),r=(await s.sigv4aSigningRegionSet?.()??U??[E]).join(",");return await $.sign(f,{signingDate:VF(s.systemClockOffset),signingRegion:r,signingService:T})}},mi=b0(),N7=J$(),di=t0((f)=>{return f.sigv4aSigningRegionSet=mi.normalizeProvider(f.sigv4aSigningRegionSet),f},"resolveAwsSdkSigV4AConfig"),ii={environmentVariableSelector(f){if(f.AWS_SIGV4A_SIGNING_REGION_SET)return f.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((h)=>h.trim());throw new N7.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(f){if(f.sigv4a_signing_region_set)return(f.sigv4a_signing_region_set??"").split(",").map((h)=>h.trim());throw new N7.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},ci=C1(),ph=b0(),D7=V7(),k7=t0((f)=>{let h=f.credentials,w=!!f.credentials,s=void 0;Object.defineProperty(f,"credentials",{set(r){if(r&&r!==h&&r!==s)w=!0;h=r;let C=y7(f,{credentials:h,credentialDefaultProvider:f.credentialDefaultProvider}),I=j7(f,C);if(w&&!I.attributed)s=t0(async(L)=>I(L).then((B)=>ci.setCredentialFeature(B,"CREDENTIALS_CODE","e")),"resolvedCredentials"),s.memoized=I.memoized,s.configBound=I.configBound,s.attributed=!0;else s=I},get(){return s},enumerable:!0,configurable:!0}),f.credentials=h;let{signingEscapePath:$=!0,systemClockOffset:E=f.systemClockOffset||0,sha256:U}=f,T;if(f.signer)T=ph.normalizeProvider(f.signer);else if(f.regionInfoProvider)T=t0(()=>ph.normalizeProvider(f.region)().then(async(r)=>[await f.regionInfoProvider(r,{useFipsEndpoint:await f.useFipsEndpoint(),useDualstackEndpoint:await f.useDualstackEndpoint()})||{},r]).then(([r,C])=>{let{signingRegion:I,signingService:L}=r;f.signingRegion=f.signingRegion||I||C,f.signingName=f.signingName||L||f.serviceId;let B={...f,credentials:f.credentials,region:f.signingRegion,service:f.signingName,sha256:U,uriEscapePath:$};return new(f.signerConstructor||D7.SignatureV4)(B)}),"signer");else T=t0(async(r)=>{r=Object.assign({},{name:"sigv4",signingName:f.signingName||f.defaultSigningName,signingRegion:await ph.normalizeProvider(f.region)(),properties:{}},r);let{signingRegion:C,signingName:I}=r;f.signingRegion=f.signingRegion||C,f.signingName=f.signingName||I||f.serviceId;let L={...f,credentials:f.credentials,region:f.signingRegion,service:f.signingName,sha256:U,uriEscapePath:$};return new(f.signerConstructor||D7.SignatureV4)(L)},"signer");return Object.assign(f,{systemClockOffset:E,signingEscapePath:$,signer:T})},"resolveAwsSdkSigV4Config"),gi=k7;function y7(f,{credentials:h,credentialDefaultProvider:w}){let s;if(h)if(!h?.memoized)s=ph.memoizeIdentityProvider(h,ph.isIdentityExpired,ph.doesIdentityRequireRefresh);else s=h;else if(w)s=ph.normalizeProvider(w(Object.assign({},f,{parentClientConfig:f})));else s=t0(async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},"credentialsProvider");return s.memoized=!0,s}t0(y7,"normalizeCredentialProvider");function j7(f,h){if(h.configBound)return h;let w=t0(async(s)=>h({...s,callerClientConfig:f}),"fn");return w.memoized=h.memoized,w.configBound=!0,w}t0(j7,"bindCallerConfig")});var i7=H((E80,d7)=>{var{defineProperty:g5,getOwnPropertyDescriptor:xi,getOwnPropertyNames:_i}=Object,ni=Object.prototype.hasOwnProperty,D1=(f,h)=>g5(f,"name",{value:h,configurable:!0}),ei=(f,h)=>{for(var w in h)g5(f,w,{get:h[w],enumerable:!0})},ai=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of _i(h))if(!ni.call(f,$)&&$!==w)g5(f,$,{get:()=>h[$],enumerable:!(s=xi(h,$))||s.enumerable})}return f},pi=(f)=>ai(g5({},"__esModule",{value:!0}),f),m7={};ei(m7,{constructStack:()=>NF});d7.exports=pi(m7);var oh=D1((f,h)=>{let w=[];if(f)w.push(f);if(h)for(let s of h)w.push(s);return w},"getAllAliases"),Rh=D1((f,h)=>{return`${f||"anonymous"}${h&&h.length>0?` (a.k.a. ${h.join(",")})`:""}`},"getMiddlewareNameWithAliases"),NF=D1(()=>{let f=[],h=[],w=!1,s=new Set,$=D1((I)=>I.sort((L,B)=>v7[B.step]-v7[L.step]||b7[B.priority||"normal"]-b7[L.priority||"normal"]),"sort"),E=D1((I)=>{let L=!1,B=D1((R)=>{let K=oh(R.name,R.aliases);if(K.includes(I)){L=!0;for(let Q of K)s.delete(Q);return!1}return!0},"filterCb");return f=f.filter(B),h=h.filter(B),L},"removeByName"),U=D1((I)=>{let L=!1,B=D1((R)=>{if(R.middleware===I){L=!0;for(let K of oh(R.name,R.aliases))s.delete(K);return!1}return!0},"filterCb");return f=f.filter(B),h=h.filter(B),L},"removeByReference"),T=D1((I)=>{return f.forEach((L)=>{I.add(L.middleware,{...L})}),h.forEach((L)=>{I.addRelativeTo(L.middleware,{...L})}),I.identifyOnResolve?.(C.identifyOnResolve()),I},"cloneTo"),F=D1((I)=>{let L=[];return I.before.forEach((B)=>{if(B.before.length===0&&B.after.length===0)L.push(B);else L.push(...F(B))}),L.push(I),I.after.reverse().forEach((B)=>{if(B.before.length===0&&B.after.length===0)L.push(B);else L.push(...F(B))}),L},"expandRelativeMiddlewareList"),r=D1((I=!1)=>{let L=[],B=[],R={};return f.forEach((Q)=>{let k={...Q,before:[],after:[]};for(let D of oh(k.name,k.aliases))R[D]=k;L.push(k)}),h.forEach((Q)=>{let k={...Q,before:[],after:[]};for(let D of oh(k.name,k.aliases))R[D]=k;B.push(k)}),B.forEach((Q)=>{if(Q.toMiddleware){let k=R[Q.toMiddleware];if(k===void 0){if(I)return;throw new Error(`${Q.toMiddleware} is not found when adding ${Rh(Q.name,Q.aliases)} middleware ${Q.relation} ${Q.toMiddleware}`)}if(Q.relation==="after")k.after.push(Q);if(Q.relation==="before")k.before.push(Q)}}),$(L).map(F).reduce((Q,k)=>{return Q.push(...k),Q},[])},"getMiddlewareList"),C={add:(I,L={})=>{let{name:B,override:R,aliases:K}=L,Q={step:"initialize",priority:"normal",middleware:I,...L},k=oh(B,K);if(k.length>0){if(k.some((D)=>s.has(D))){if(!R)throw new Error(`Duplicate middleware name '${Rh(B,K)}'`);for(let D of k){let y=f.findIndex((I0)=>I0.name===D||I0.aliases?.some((v0)=>v0===D));if(y===-1)continue;let n=f[y];if(n.step!==Q.step||Q.priority!==n.priority)throw new Error(`"${Rh(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Rh(B,K)}" middleware with ${Q.priority} priority in ${Q.step} step.`);f.splice(y,1)}}for(let D of k)s.add(D)}f.push(Q)},addRelativeTo:(I,L)=>{let{name:B,override:R,aliases:K}=L,Q={middleware:I,...L},k=oh(B,K);if(k.length>0){if(k.some((D)=>s.has(D))){if(!R)throw new Error(`Duplicate middleware name '${Rh(B,K)}'`);for(let D of k){let y=h.findIndex((I0)=>I0.name===D||I0.aliases?.some((v0)=>v0===D));if(y===-1)continue;let n=h[y];if(n.toMiddleware!==Q.toMiddleware||n.relation!==Q.relation)throw new Error(`"${Rh(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Rh(B,K)}" middleware ${Q.relation} "${Q.toMiddleware}" middleware.`);h.splice(y,1)}}for(let D of k)s.add(D)}h.push(Q)},clone:()=>T(NF()),use:(I)=>{I.applyToStack(C)},remove:(I)=>{if(typeof I==="string")return E(I);else return U(I)},removeByTag:(I)=>{let L=!1,B=D1((R)=>{let{tags:K,name:Q,aliases:k}=R;if(K&&K.includes(I)){let D=oh(Q,k);for(let y of D)s.delete(y);return L=!0,!1}return!0},"filterCb");return f=f.filter(B),h=h.filter(B),L},concat:(I)=>{let L=T(NF());return L.use(I),L.identifyOnResolve(w||L.identifyOnResolve()||(I.identifyOnResolve?.()??!1)),L},applyToStack:T,identify:()=>{return r(!0).map((I)=>{let L=I.step??I.relation+" "+I.toMiddleware;return Rh(I.name,I.aliases)+" - "+L})},identifyOnResolve(I){if(typeof I==="boolean")w=I;return w},resolve:(I,L)=>{for(let B of r().map((R)=>R.middleware).reverse())I=B(I,L);if(w)console.log(C.identify());return I}};return C},"constructStack"),v7={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},b7={high:3,normal:2,low:1}});var Z0=H((U80,Uz)=>{var{defineProperty:n5,getOwnPropertyDescriptor:oi,getOwnPropertyNames:ui}=Object,ti=Object.prototype.hasOwnProperty,b=(f,h)=>n5(f,"name",{value:h,configurable:!0}),fc=(f,h)=>{for(var w in h)n5(f,w,{get:h[w],enumerable:!0})},hc=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ui(h))if(!ti.call(f,$)&&$!==w)n5(f,$,{get:()=>h[$],enumerable:!(s=oi(h,$))||s.enumerable})}return f},wc=(f)=>hc(n5({},"__esModule",{value:!0}),f),g7={};fc(g7,{Client:()=>sc,Command:()=>_7,LazyJsonString:()=>uh,NoOpLogger:()=>tc,SENSITIVE_STRING:()=>Ec,ServiceException:()=>mc,_json:()=>lF,collectBody:()=>DF.collectBody,convertMap:()=>fg,createAggregatedClient:()=>Uc,dateToUtcString:()=>u7,decorateServiceException:()=>t7,emitWarningIfUnsupportedVersion:()=>gc,expectBoolean:()=>Fc,expectByte:()=>OF,expectFloat32:()=>x5,expectInt:()=>Cc,expectInt32:()=>yF,expectLong:()=>N$,expectNonNull:()=>Lc,expectNumber:()=>H$,expectObject:()=>n7,expectShort:()=>jF,expectString:()=>Gc,expectUnion:()=>Wc,extendedEncodeURIComponent:()=>DF.extendedEncodeURIComponent,getArrayIfSingleItem:()=>oc,getDefaultClientConfiguration:()=>ac,getDefaultExtensionConfiguration:()=>hz,getValueFromTextNode:()=>wz,handleFloat:()=>zc,isSerializableHeaderValue:()=>uc,limitedParseDouble:()=>mF,limitedParseFloat:()=>Rc,limitedParseFloat32:()=>Xc,loadConfigsForDefaultMode:()=>cc,logger:()=>D$,map:()=>iF,parseBoolean:()=>Tc,parseEpochTimestamp:()=>Dc,parseRfc3339DateTime:()=>Mc,parseRfc3339DateTimeWithOffset:()=>Jc,parseRfc7231DateTime:()=>Nc,quoteHeader:()=>$z,resolveDefaultRuntimeConfig:()=>pc,resolvedPath:()=>DF.resolvedPath,serializeDateTime:()=>Ug,serializeFloat:()=>Eg,splitEvery:()=>Ez,splitHeader:()=>Tg,strictParseByte:()=>o7,strictParseDouble:()=>bF,strictParseFloat:()=>Bc,strictParseFloat32:()=>e7,strictParseInt:()=>Sc,strictParseInt32:()=>Yc,strictParseLong:()=>p7,strictParseShort:()=>lw,take:()=>hg,throwDefaultError:()=>fz,withBaseException:()=>dc});Uz.exports=wc(g7);var x7=i7(),sc=class{constructor(f){this.config=f,this.middlewareStack=x7.constructStack()}static{b(this,"Client")}send(f,h,w){let s=typeof h!=="function"?h:void 0,$=typeof h==="function"?h:w,E=s===void 0&&this.config.cacheMiddleware===!0,U;if(E){if(!this.handlers)this.handlers=new WeakMap;let T=this.handlers;if(T.has(f.constructor))U=T.get(f.constructor);else U=f.resolveMiddleware(this.middlewareStack,this.config,s),T.set(f.constructor,U)}else delete this.handlers,U=f.resolveMiddleware(this.middlewareStack,this.config,s);if($)U(f).then((T)=>$(null,T.output),(T)=>$(T)).catch(()=>{});else return U(f).then((T)=>T.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}},DF=qw(),kF=F1(),_7=class{constructor(){this.middlewareStack=x7.constructStack()}static{b(this,"Command")}static classBuilder(){return new $c}resolveMiddlewareWithContext(f,h,w,{middlewareFn:s,clientName:$,commandName:E,inputFilterSensitiveLog:U,outputFilterSensitiveLog:T,smithyContext:F,additionalContext:r,CommandCtor:C}){for(let K of s.bind(this)(C,f,h,w))this.middlewareStack.use(K);let I=f.concat(this.middlewareStack),{logger:L}=h,B={logger:L,clientName:$,commandName:E,inputFilterSensitiveLog:U,outputFilterSensitiveLog:T,[kF.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...r},{requestHandler:R}=h;return I.resolve((K)=>R.handle(K.request,w||{}),B)}},$c=class{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}static{b(this,"ClassBuilder")}init(f){this._init=f}ep(f){return this._ep=f,this}m(f){return this._middlewareFn=f,this}s(f,h,w={}){return this._smithyContext={service:f,operation:h,...w},this}c(f={}){return this._additionalContext=f,this}n(f,h){return this._clientName=f,this._commandName=h,this}f(f=(w)=>w,h=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=h,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){let f=this,h;return h=class extends _7{constructor(...[w]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=w??{},f._init(this)}static{b(this,"CommandRef")}static getEndpointParameterInstructions(){return f._ep}resolveMiddleware(w,s,$){return this.resolveMiddlewareWithContext(w,s,$,{CommandCtor:h,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}}}},Ec="***SensitiveInformation***",Uc=b((f,h)=>{for(let w of Object.keys(f)){let s=f[w],$=b(async function(U,T,F){let r=new s(U);if(typeof T==="function")this.send(r,T);else if(typeof F==="function"){if(typeof T!=="object")throw new Error(`Expected http options but got ${typeof T}`);this.send(r,T||{},F)}else return this.send(r,T)},"methodImpl"),E=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");h.prototype[E]=$}},"createAggregatedClient"),Tc=b((f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},"parseBoolean"),Fc=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)D$.warn(_5(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){let h=f.toLowerCase();if(h==="false"||h==="true")D$.warn(_5(`Expected boolean, got ${typeof f}: ${f}`));if(h==="false")return!1;if(h==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},"expectBoolean"),H$=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){let h=parseFloat(f);if(!Number.isNaN(h)){if(String(h)!==String(f))D$.warn(_5(`Expected number but observed string: ${f}`));return h}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},"expectNumber"),rc=Math.ceil(340282346638528860000000000000000000000),x5=b((f)=>{let h=H$(f);if(h!==void 0&&!Number.isNaN(h)&&h!==1/0&&h!==-1/0){if(Math.abs(h)>rc)throw new TypeError(`Expected 32-bit float, got ${f}`)}return h},"expectFloat32"),N$=b((f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},"expectLong"),Cc=N$,yF=b((f)=>vF(f,32),"expectInt32"),jF=b((f)=>vF(f,16),"expectShort"),OF=b((f)=>vF(f,8),"expectByte"),vF=b((f,h)=>{let w=N$(f);if(w!==void 0&&Ic(w,h)!==w)throw new TypeError(`Expected ${h}-bit integer, got ${f}`);return w},"expectSizedInt"),Ic=b((f,h)=>{switch(h){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},"castInt"),Lc=b((f,h)=>{if(f===null||f===void 0){if(h)throw new TypeError(`Expected a non-null value for ${h}`);throw new TypeError("Expected a non-null value")}return f},"expectNonNull"),n7=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;let h=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${h}: ${f}`)},"expectObject"),Gc=b((f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return D$.warn(_5(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},"expectString"),Wc=b((f)=>{if(f===null||f===void 0)return;let h=n7(f),w=Object.entries(h).filter(([,s])=>s!=null).map(([s])=>s);if(w.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(w.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${w} were not null.`);return h},"expectUnion"),bF=b((f)=>{if(typeof f=="string")return H$(bw(f));return H$(f)},"strictParseDouble"),Bc=bF,e7=b((f)=>{if(typeof f=="string")return x5(bw(f));return x5(f)},"strictParseFloat32"),Ac=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,bw=b((f)=>{let h=f.match(Ac);if(h===null||h[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},"parseNumber"),mF=b((f)=>{if(typeof f=="string")return a7(f);return H$(f)},"limitedParseDouble"),zc=mF,Rc=mF,Xc=b((f)=>{if(typeof f=="string")return a7(f);return x5(f)},"limitedParseFloat32"),a7=b((f)=>{switch(f){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${f}`)}},"parseFloatString"),p7=b((f)=>{if(typeof f==="string")return N$(bw(f));return N$(f)},"strictParseLong"),Sc=p7,Yc=b((f)=>{if(typeof f==="string")return yF(bw(f));return yF(f)},"strictParseInt32"),lw=b((f)=>{if(typeof f==="string")return jF(bw(f));return jF(f)},"strictParseShort"),o7=b((f)=>{if(typeof f==="string")return OF(bw(f));return OF(f)},"strictParseByte"),_5=b((f)=>{return String(new TypeError(f).stack||f).split(`
30
- `).slice(0,5).filter((h)=>!h.includes("stackTraceWarning")).join(`
31
- `)},"stackTraceWarning"),D$={warn:console.warn},Qc=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dF=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function u7(f){let h=f.getUTCFullYear(),w=f.getUTCMonth(),s=f.getUTCDay(),$=f.getUTCDate(),E=f.getUTCHours(),U=f.getUTCMinutes(),T=f.getUTCSeconds(),F=$<10?`0${$}`:`${$}`,r=E<10?`0${E}`:`${E}`,C=U<10?`0${U}`:`${U}`,I=T<10?`0${T}`:`${T}`;return`${Qc[s]}, ${F} ${dF[w]} ${h} ${r}:${C}:${I} GMT`}b(u7,"dateToUtcString");var Kc=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Mc=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=Kc.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,E,U,T,F,r]=h,C=lw(vw(s)),I=Yf($,"month",1,12),L=Yf(E,"day",1,31);return P$(C,I,L,{hours:U,minutes:T,seconds:F,fractionalMilliseconds:r})},"parseRfc3339DateTime"),Zc=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Jc=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=Zc.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,E,U,T,F,r,C]=h,I=lw(vw(s)),L=Yf($,"month",1,12),B=Yf(E,"day",1,31),R=P$(I,L,B,{hours:U,minutes:T,seconds:F,fractionalMilliseconds:r});if(C.toUpperCase()!="Z")R.setTime(R.getTime()-bc(C));return R},"parseRfc3339DateTimeWithOffset"),Vc=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$/),Pc=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$/),Hc=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})$/),Nc=b((f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let h=Vc.exec(f);if(h){let[w,s,$,E,U,T,F,r]=h;return P$(lw(vw(E)),qF($),Yf(s,"day",1,31),{hours:U,minutes:T,seconds:F,fractionalMilliseconds:r})}if(h=Pc.exec(f),h){let[w,s,$,E,U,T,F,r]=h;return yc(P$(qc(E),qF($),Yf(s,"day",1,31),{hours:U,minutes:T,seconds:F,fractionalMilliseconds:r}))}if(h=Hc.exec(f),h){let[w,s,$,E,U,T,F,r]=h;return P$(lw(vw(r)),qF(s),Yf($.trimLeft(),"day",1,31),{hours:E,minutes:U,seconds:T,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),Dc=b((f)=>{if(f===null||f===void 0)return;let h;if(typeof f==="number")h=f;else if(typeof f==="string")h=bF(f);else if(typeof f==="object"&&f.tag===1)h=f.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(h)||h===1/0||h===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(h*1000))},"parseEpochTimestamp"),P$=b((f,h,w,s)=>{let $=h-1;return Oc(f,$,w),new Date(Date.UTC(f,$,w,Yf(s.hours,"hour",0,23),Yf(s.minutes,"minute",0,59),Yf(s.seconds,"seconds",0,60),vc(s.fractionalMilliseconds)))},"buildDate"),qc=b((f)=>{let h=new Date().getUTCFullYear(),w=Math.floor(h/100)*100+lw(vw(f));if(w<h)return w+100;return w},"parseTwoDigitYear"),kc=1576800000000,yc=b((f)=>{if(f.getTime()-new Date().getTime()>kc)return new Date(Date.UTC(f.getUTCFullYear()-100,f.getUTCMonth(),f.getUTCDate(),f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()));return f},"adjustRfc850Year"),qF=b((f)=>{let h=dF.indexOf(f);if(h<0)throw new TypeError(`Invalid month: ${f}`);return h+1},"parseMonthByShortName"),jc=[31,28,31,30,31,30,31,31,30,31,30,31],Oc=b((f,h,w)=>{let s=jc[h];if(h===1&&lc(f))s=29;if(w>s)throw new TypeError(`Invalid day for ${dF[h]} in ${f}: ${w}`)},"validateDayOfMonth"),lc=b((f)=>{return f%4===0&&(f%100!==0||f%400===0)},"isLeapYear"),Yf=b((f,h,w,s)=>{let $=o7(vw(f));if($<w||$>s)throw new TypeError(`${h} must be between ${w} and ${s}, inclusive`);return $},"parseDateValue"),vc=b((f)=>{if(f===null||f===void 0)return 0;return e7("0."+f)*1000},"parseMilliseconds"),bc=b((f)=>{let h=f[0],w=1;if(h=="+")w=1;else if(h=="-")w=-1;else throw new TypeError(`Offset direction, ${h}, must be "+" or "-"`);let s=Number(f.substring(1,3)),$=Number(f.substring(4,6));return w*(s*60+$)*60*1000},"parseOffsetToMilliseconds"),vw=b((f)=>{let h=0;while(h<f.length-1&&f.charAt(h)==="0")h++;if(h===0)return f;return f.slice(h)},"stripLeadingZeroes"),mc=class f extends Error{static{b(this,"ServiceException")}constructor(h){super(h.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=h.name,this.$fault=h.$fault,this.$metadata=h.$metadata}static isInstance(h){if(!h)return!1;let w=h;return f.prototype.isPrototypeOf(w)||Boolean(w.$fault)&&Boolean(w.$metadata)&&(w.$fault==="client"||w.$fault==="server")}static[Symbol.hasInstance](h){if(!h)return!1;let w=h;if(this===f)return f.isInstance(h);if(f.isInstance(h)){if(w.name&&this.name)return this.prototype.isPrototypeOf(h)||w.name===this.name;return this.prototype.isPrototypeOf(h)}return!1}},t7=b((f,h={})=>{Object.entries(h).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(f[s]==null||f[s]==="")f[s]=$});let w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f},"decorateServiceException"),fz=b(({output:f,parsedBody:h,exceptionCtor:w,errorCode:s})=>{let $=ic(f),E=$.httpStatusCode?$.httpStatusCode+"":void 0,U=new w({name:h?.code||h?.Code||s||E||"UnknownError",$fault:"client",$metadata:$});throw t7(U,h)},"throwDefaultError"),dc=b((f)=>{return({output:h,parsedBody:w,errorCode:s})=>{fz({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})}},"withBaseException"),ic=b((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),cc=b((f)=>{switch(f){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"),c7=!1,gc=b((f)=>{if(f&&!c7&&parseInt(f.substring(1,f.indexOf(".")))<16)c7=!0},"emitWarningIfUnsupportedVersion"),xc=b((f)=>{let h=[];for(let w in kF.AlgorithmId){let s=kF.AlgorithmId[w];if(f[s]===void 0)continue;h.push({algorithmId:()=>s,checksumConstructor:()=>f[s]})}return{addChecksumAlgorithm(w){h.push(w)},checksumAlgorithms(){return h}}},"getChecksumConfiguration"),_c=b((f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h},"resolveChecksumRuntimeConfig"),nc=b((f)=>{return{setRetryStrategy(h){f.retryStrategy=h},retryStrategy(){return f.retryStrategy}}},"getRetryConfiguration"),ec=b((f)=>{let h={};return h.retryStrategy=f.retryStrategy(),h},"resolveRetryRuntimeConfig"),hz=b((f)=>{return Object.assign(xc(f),nc(f))},"getDefaultExtensionConfiguration"),ac=hz,pc=b((f)=>{return Object.assign(_c(f),ec(f))},"resolveDefaultRuntimeConfig"),oc=b((f)=>Array.isArray(f)?f:[f],"getArrayIfSingleItem"),wz=b((f)=>{for(let w in f)if(f.hasOwnProperty(w)&&f[w]["#text"]!==void 0)f[w]=f[w]["#text"];else if(typeof f[w]==="object"&&f[w]!==null)f[w]=wz(f[w]);return f},"getValueFromTextNode"),uc=b((f)=>{return f!=null},"isSerializableHeaderValue"),uh=b(function f(h){return Object.assign(new String(h),{deserializeJSON(){return JSON.parse(String(h))},toString(){return String(h)},toJSON(){return String(h)}})},"LazyJsonString");uh.from=(f)=>{if(f&&typeof f==="object"&&(f instanceof uh||("deserializeJSON"in f)))return f;else if(typeof f==="string"||Object.getPrototypeOf(f)===String.prototype)return uh(String(f));return uh(JSON.stringify(f))};uh.fromObject=uh.from;var tc=class{static{b(this,"NoOpLogger")}trace(){}debug(){}info(){}warn(){}error(){}};function iF(f,h,w){let s,$,E;if(typeof h==="undefined"&&typeof w==="undefined")s={},E=f;else if(s=f,typeof h==="function")return $=h,E=w,wg(s,$,E);else E=h;for(let U of Object.keys(E)){if(!Array.isArray(E[U])){s[U]=E[U];continue}sz(s,null,E,U)}return s}b(iF,"map");var fg=b((f)=>{let h={};for(let[w,s]of Object.entries(f||{}))h[w]=[,s];return h},"convertMap"),hg=b((f,h)=>{let w={};for(let s in h)sz(w,f,h,s);return w},"take"),wg=b((f,h,w)=>{return iF(f,Object.entries(w).reduce((s,[$,E])=>{if(Array.isArray(E))s[$]=E;else if(typeof E==="function")s[$]=[h,E()];else s[$]=[h,E];return s},{}))},"mapWithFilter"),sz=b((f,h,w,s)=>{if(h!==null){let U=w[s];if(typeof U==="function")U=[,U];let[T=sg,F=$g,r=s]=U;if(typeof T==="function"&&T(h[r])||typeof T!=="function"&&!!T)f[s]=F(h[r]);return}let[$,E]=w[s];if(typeof E==="function"){let U,T=$===void 0&&(U=E())!=null,F=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(T)f[s]=U;else if(F)f[s]=E()}else{let U=$===void 0&&E!=null,T=typeof $==="function"&&!!$(E)||typeof $!=="function"&&!!$;if(U||T)f[s]=E}},"applyInstruction"),sg=b((f)=>f!=null,"nonNullish"),$g=b((f)=>f,"pass");function $z(f){if(f.includes(",")||f.includes('"'))f=`"${f.replace(/"/g,"\\\"")}"`;return f}b($z,"quoteHeader");var Eg=b((f)=>{if(f!==f)return"NaN";switch(f){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return f}},"serializeFloat"),Ug=b((f)=>f.toISOString().replace(".000Z","Z"),"serializeDateTime"),lF=b((f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((h)=>h!=null).map(lF);if(typeof f==="object"){let h={};for(let w of Object.keys(f)){if(f[w]==null)continue;h[w]=lF(f[w])}return h}return f},"_json");function Ez(f,h,w){if(w<=0||!Number.isInteger(w))throw new Error("Invalid number of delimiters ("+w+") for splitEvery.");let s=f.split(h);if(w===1)return s;let $=[],E="";for(let U=0;U<s.length;U++){if(E==="")E=s[U];else E+=h+s[U];if((U+1)%w===0)$.push(E),E=""}if(E!=="")$.push(E);return $}b(Ez,"splitEvery");var Tg=b((f)=>{let h=f.length,w=[],s=!1,$=void 0,E=0;for(let U=0;U<h;++U){let T=f[U];switch(T){case'"':if($!=="\\")s=!s;break;case",":if(!s)w.push(f.slice(E,U)),E=U+1;break;default:}$=T}return w.push(f.slice(E)),w.map((U)=>{U=U.trim();let T=U.length;if(T<2)return U;if(U[0]==='"'&&U[T-1]==='"')U=U.slice(1,T-1);return U.replace(/\\"/g,'"')})},"splitHeader")});var e5=H((Lg)=>{var Fg=":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",Tz="[: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]["+Fg+"]*",rg=new RegExp("^"+Tz+"$"),Cg=function(f,h){let w=[],s=h.exec(f);while(s){let $=[];$.startIndex=h.lastIndex-s[0].length;let E=s.length;for(let U=0;U<E;U++)$.push(s[U]);w.push($),s=h.exec(f)}return w},Ig=function(f){let h=rg.exec(f);return!(h===null||typeof h==="undefined")};Lg.isExist=function(f){return typeof f!=="undefined"};Lg.isEmptyObject=function(f){return Object.keys(f).length===0};Lg.merge=function(f,h,w){if(h){let s=Object.keys(h),$=s.length;for(let E=0;E<$;E++)if(w==="strict")f[s[E]]=[h[s[E]]];else f[s[E]]=h[s[E]]}};Lg.getValue=function(f){if(Lg.isExist(f))return f;else return""};Lg.isName=Ig;Lg.getAllMatches=Cg;Lg.nameRegexp=Tz});var gF=H((Pg)=>{var cF=e5(),Xg={allowBooleanAttributes:!1,unpairedTags:[]};Pg.validate=function(f,h){h=Object.assign({},Xg,h);let w=[],s=!1,$=!1;if(f[0]==="\uFEFF")f=f.substr(1);for(let E=0;E<f.length;E++)if(f[E]==="<"&&f[E+1]==="?"){if(E+=2,E=Cz(f,E),E.err)return E}else if(f[E]==="<"){let U=E;if(E++,f[E]==="!"){E=Iz(f,E);continue}else{let T=!1;if(f[E]==="/")T=!0,E++;let F="";for(;E<f.length&&f[E]!==">"&&f[E]!==" "&&f[E]!=="\t"&&f[E]!==`
32
- `&&f[E]!=="\r";E++)F+=f[E];if(F=F.trim(),F[F.length-1]==="/")F=F.substring(0,F.length-1),E--;if(!Vg(F)){let I;if(F.trim().length===0)I="Invalid space after '<'.";else I="Tag '"+F+"' is an invalid name.";return m0("InvalidTag",I,I1(f,E))}let r=Qg(f,E);if(r===!1)return m0("InvalidAttr","Attributes for '"+F+"' have open quote.",I1(f,E));let C=r.value;if(E=r.index,C[C.length-1]==="/"){let I=E-C.length;C=C.substring(0,C.length-1);let L=Lz(C,h);if(L===!0)s=!0;else return m0(L.err.code,L.err.msg,I1(f,I+L.err.line))}else if(T)if(!r.tagClosed)return m0("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",I1(f,E));else if(C.trim().length>0)return m0("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",I1(f,U));else if(w.length===0)return m0("InvalidTag","Closing tag '"+F+"' has not been opened.",I1(f,U));else{let I=w.pop();if(F!==I.tagName){let L=I1(f,I.tagStartPos);return m0("InvalidTag","Expected closing tag '"+I.tagName+"' (opened in line "+L.line+", col "+L.col+") instead of closing tag '"+F+"'.",I1(f,U))}if(w.length==0)$=!0}else{let I=Lz(C,h);if(I!==!0)return m0(I.err.code,I.err.msg,I1(f,E-C.length+I.err.line));if($===!0)return m0("InvalidXml","Multiple possible root nodes found.",I1(f,E));else if(h.unpairedTags.indexOf(F)!==-1);else w.push({tagName:F,tagStartPos:U});s=!0}for(E++;E<f.length;E++)if(f[E]==="<")if(f[E+1]==="!"){E++,E=Iz(f,E);continue}else if(f[E+1]==="?"){if(E=Cz(f,++E),E.err)return E}else break;else if(f[E]==="&"){let I=Zg(f,E);if(I==-1)return m0("InvalidChar","char '&' is not expected.",I1(f,E));E=I}else if($===!0&&!rz(f[E]))return m0("InvalidXml","Extra text at the end",I1(f,E));if(f[E]==="<")E--}}else{if(rz(f[E]))continue;return m0("InvalidChar","char '"+f[E]+"' is not expected.",I1(f,E))}if(!s)return m0("InvalidXml","Start tag expected.",1);else if(w.length==1)return m0("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",I1(f,w[0].tagStartPos));else if(w.length>0)return m0("InvalidXml","Invalid '"+JSON.stringify(w.map((E)=>E.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};function rz(f){return f===" "||f==="\t"||f===`
33
- `||f==="\r"}function Cz(f,h){let w=h;for(;h<f.length;h++)if(f[h]=="?"||f[h]==" "){let s=f.substr(w,h-w);if(h>5&&s==="xml")return m0("InvalidXml","XML declaration allowed only at the start of the document.",I1(f,h));else if(f[h]=="?"&&f[h+1]==">"){h++;break}else continue}return h}function Iz(f,h){if(f.length>h+5&&f[h+1]==="-"&&f[h+2]==="-"){for(h+=3;h<f.length;h++)if(f[h]==="-"&&f[h+1]==="-"&&f[h+2]===">"){h+=2;break}}else if(f.length>h+8&&f[h+1]==="D"&&f[h+2]==="O"&&f[h+3]==="C"&&f[h+4]==="T"&&f[h+5]==="Y"&&f[h+6]==="P"&&f[h+7]==="E"){let w=1;for(h+=8;h<f.length;h++)if(f[h]==="<")w++;else if(f[h]===">"){if(w--,w===0)break}}else if(f.length>h+9&&f[h+1]==="["&&f[h+2]==="C"&&f[h+3]==="D"&&f[h+4]==="A"&&f[h+5]==="T"&&f[h+6]==="A"&&f[h+7]==="["){for(h+=8;h<f.length;h++)if(f[h]==="]"&&f[h+1]==="]"&&f[h+2]===">"){h+=2;break}}return h}var Sg='"',Yg="'";function Qg(f,h){let w="",s="",$=!1;for(;h<f.length;h++){if(f[h]===Sg||f[h]===Yg)if(s==="")s=f[h];else if(s!==f[h]);else s="";else if(f[h]===">"){if(s===""){$=!0;break}}w+=f[h]}if(s!=="")return!1;return{value:w,index:h,tagClosed:$}}var Kg=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Lz(f,h){let w=cF.getAllMatches(f,Kg),s={};for(let $=0;$<w.length;$++){if(w[$][1].length===0)return m0("InvalidAttr","Attribute '"+w[$][2]+"' has no space in starting.",q$(w[$]));else if(w[$][3]!==void 0&&w[$][4]===void 0)return m0("InvalidAttr","Attribute '"+w[$][2]+"' is without value.",q$(w[$]));else if(w[$][3]===void 0&&!h.allowBooleanAttributes)return m0("InvalidAttr","boolean attribute '"+w[$][2]+"' is not allowed.",q$(w[$]));let E=w[$][2];if(!Jg(E))return m0("InvalidAttr","Attribute '"+E+"' is an invalid name.",q$(w[$]));if(!s.hasOwnProperty(E))s[E]=1;else return m0("InvalidAttr","Attribute '"+E+"' is repeated.",q$(w[$]))}return!0}function Mg(f,h){let w=/\d/;if(f[h]==="x")h++,w=/[\da-fA-F]/;for(;h<f.length;h++){if(f[h]===";")return h;if(!f[h].match(w))break}return-1}function Zg(f,h){if(h++,f[h]===";")return-1;if(f[h]==="#")return h++,Mg(f,h);let w=0;for(;h<f.length;h++,w++){if(f[h].match(/\w/)&&w<20)continue;if(f[h]===";")break;return-1}return h}function m0(f,h,w){return{err:{code:f,msg:h,line:w.line||w,col:w.col}}}function Jg(f){return cF.isName(f)}function Vg(f){return cF.isName(f)}function I1(f,h){let w=f.substring(0,h).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}}function q$(f){return f.startIndex+f[1].length}});var Wz=H((Dg)=>{var Gz={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(f,h){return h},attributeValueProcessor:function(f,h){return h},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(f,h,w){return f}},Ng=function(f){return Object.assign({},Gz,f)};Dg.buildOptions=Ng;Dg.defaultOptions=Gz});var zz=H((B80,Az)=>{class Bz{constructor(f){this.tagname=f,this.child=[],this[":@"]={}}add(f,h){if(f==="__proto__")f="#__proto__";this.child.push({[f]:h})}addChild(f){if(f.tagname==="__proto__")f.tagname="#__proto__";if(f[":@"]&&Object.keys(f[":@"]).length>0)this.child.push({[f.tagname]:f.child,[":@"]:f[":@"]});else this.child.push({[f.tagname]:f.child})}}Az.exports=Bz});var Xz=H((A80,Rz)=>{var yg=e5();function jg(f,h){let w={};if(f[h+3]==="O"&&f[h+4]==="C"&&f[h+5]==="T"&&f[h+6]==="Y"&&f[h+7]==="P"&&f[h+8]==="E"){h=h+9;let s=1,$=!1,E=!1,U="";for(;h<f.length;h++)if(f[h]==="<"&&!E){if($&&vg(f,h)){if(h+=7,[entityName,val,h]=Og(f,h+1),val.indexOf("&")===-1)w[ig(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if($&&bg(f,h))h+=8;else if($&&mg(f,h))h+=8;else if($&&dg(f,h))h+=9;else if(lg)E=!0;else throw new Error("Invalid DOCTYPE");s++,U=""}else if(f[h]===">"){if(E){if(f[h-1]==="-"&&f[h-2]==="-")E=!1,s--}else s--;if(s===0)break}else if(f[h]==="[")$=!0;else U+=f[h];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:w,i:h}}function Og(f,h){let w="";for(;h<f.length&&(f[h]!=="'"&&f[h]!=='"');h++)w+=f[h];if(w=w.trim(),w.indexOf(" ")!==-1)throw new Error("External entites are not supported");let s=f[h++],$="";for(;h<f.length&&f[h]!==s;h++)$+=f[h];return[w,$,h]}function lg(f,h){if(f[h+1]==="!"&&f[h+2]==="-"&&f[h+3]==="-")return!0;return!1}function vg(f,h){if(f[h+1]==="!"&&f[h+2]==="E"&&f[h+3]==="N"&&f[h+4]==="T"&&f[h+5]==="I"&&f[h+6]==="T"&&f[h+7]==="Y")return!0;return!1}function bg(f,h){if(f[h+1]==="!"&&f[h+2]==="E"&&f[h+3]==="L"&&f[h+4]==="E"&&f[h+5]==="M"&&f[h+6]==="E"&&f[h+7]==="N"&&f[h+8]==="T")return!0;return!1}function mg(f,h){if(f[h+1]==="!"&&f[h+2]==="A"&&f[h+3]==="T"&&f[h+4]==="T"&&f[h+5]==="L"&&f[h+6]==="I"&&f[h+7]==="S"&&f[h+8]==="T")return!0;return!1}function dg(f,h){if(f[h+1]==="!"&&f[h+2]==="N"&&f[h+3]==="O"&&f[h+4]==="T"&&f[h+5]==="A"&&f[h+6]==="T"&&f[h+7]==="I"&&f[h+8]==="O"&&f[h+9]==="N")return!0;return!1}function ig(f){if(yg.isName(f))return f;else throw new Error(`Invalid entity name ${f}`)}Rz.exports=jg});var Yz=H((z80,Sz)=>{var cg=/^[-+]?0x[a-fA-F0-9]+$/,gg=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,xg={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function _g(f,h={}){if(h=Object.assign({},xg,h),!f||typeof f!=="string")return f;let w=f.trim();if(h.skipLike!==void 0&&h.skipLike.test(w))return f;else if(f==="0")return 0;else if(h.hex&&cg.test(w))return eg(w,16);else if(w.search(/[eE]/)!==-1){let s=w.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(s){if(h.leadingZeros)w=(s[1]||"")+s[3];else if(s[2]==="0"&&s[3][0]===".");else return f;return h.eNotation?Number(w):f}else return f}else{let s=gg.exec(w);if(s){let $=s[1],E=s[2],U=ng(s[3]);if(!h.leadingZeros&&E.length>0&&$&&w[2]!==".")return f;else if(!h.leadingZeros&&E.length>0&&!$&&w[1]!==".")return f;else if(h.leadingZeros&&E===f)return 0;else{let T=Number(w),F=""+T;if(F.search(/[eE]/)!==-1)if(h.eNotation)return T;else return f;else if(w.indexOf(".")!==-1)if(F==="0"&&U==="")return T;else if(F===U)return T;else if($&&F==="-"+U)return T;else return f;if(E)return U===F||$+U===F?T:f;else return w===F||w===$+F?T:f}}else return f}}function ng(f){if(f&&f.indexOf(".")!==-1){if(f=f.replace(/0+$/,""),f===".")f="0";else if(f[0]===".")f="0"+f;else if(f[f.length-1]===".")f=f.substr(0,f.length-1);return f}return f}function eg(f,h){if(parseInt)return parseInt(f,h);else if(Number.parseInt)return Number.parseInt(f,h);else if(window&&window.parseInt)return window.parseInt(f,h);else throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}Sz.exports=_g});var Zz=H((R80,Mz)=>{var Qz=e5(),k$=zz(),ag=Xz(),pg=Yz();class Kz{constructor(f){this.options=f,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:(h,w)=>String.fromCharCode(Number.parseInt(w,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(h,w)=>String.fromCharCode(Number.parseInt(w,16))}},this.addExternalEntities=og,this.parseXml=wx,this.parseTextData=ug,this.resolveNameSpace=tg,this.buildAttributesMap=hx,this.isItStopNode=Ux,this.replaceEntitiesValue=$x,this.readStopNodeData=Fx,this.saveTextToParentTag=Ex,this.addChild=sx}}function og(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];this.lastEntities[s]={regex:new RegExp("&"+s+";","g"),val:f[s]}}}function ug(f,h,w,s,$,E,U){if(f!==void 0){if(this.options.trimValues&&!s)f=f.trim();if(f.length>0){if(!U)f=this.replaceEntitiesValue(f);let T=this.options.tagValueProcessor(h,f,w,$,E);if(T===null||T===void 0)return f;else if(typeof T!==typeof f||T!==f)return T;else if(this.options.trimValues)return _F(f,this.options.parseTagValue,this.options.numberParseOptions);else if(f.trim()===f)return _F(f,this.options.parseTagValue,this.options.numberParseOptions);else return f}}}function tg(f){if(this.options.removeNSPrefix){let h=f.split(":"),w=f.charAt(0)==="/"?"/":"";if(h[0]==="xmlns")return"";if(h.length===2)f=w+h[1]}return f}var fx=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function hx(f,h,w){if(!this.options.ignoreAttributes&&typeof f==="string"){let s=Qz.getAllMatches(f,fx),$=s.length,E={};for(let U=0;U<$;U++){let T=this.resolveNameSpace(s[U][1]),F=s[U][4],r=this.options.attributeNamePrefix+T;if(T.length){if(this.options.transformAttributeName)r=this.options.transformAttributeName(r);if(r==="__proto__")r="#__proto__";if(F!==void 0){if(this.options.trimValues)F=F.trim();F=this.replaceEntitiesValue(F);let C=this.options.attributeValueProcessor(T,F,h);if(C===null||C===void 0)E[r]=F;else if(typeof C!==typeof F||C!==F)E[r]=C;else E[r]=_F(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)E[r]=!0}}if(!Object.keys(E).length)return;if(this.options.attributesGroupName){let U={};return U[this.options.attributesGroupName]=E,U}return E}}var wx=function(f){f=f.replace(/\r\n?/g,`
34
- `);let h=new k$("!xml"),w=h,s="",$="";for(let E=0;E<f.length;E++)if(f[E]==="<")if(f[E+1]==="/"){let T=th(f,">",E,"Closing Tag is not closed."),F=f.substring(E+2,T).trim();if(this.options.removeNSPrefix){let I=F.indexOf(":");if(I!==-1)F=F.substr(I+1)}if(this.options.transformTagName)F=this.options.transformTagName(F);if(w)s=this.saveTextToParentTag(s,w,$);let r=$.substring($.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(r&&this.options.unpairedTags.indexOf(r)!==-1)C=$.lastIndexOf(".",$.lastIndexOf(".")-1),this.tagsNodeStack.pop();else C=$.lastIndexOf(".");$=$.substring(0,C),w=this.tagsNodeStack.pop(),s="",E=T}else if(f[E+1]==="?"){let T=xF(f,E,!1,"?>");if(!T)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,w,$),this.options.ignoreDeclaration&&T.tagName==="?xml"||this.options.ignorePiTags);else{let F=new k$(T.tagName);if(F.add(this.options.textNodeName,""),T.tagName!==T.tagExp&&T.attrExpPresent)F[":@"]=this.buildAttributesMap(T.tagExp,$,T.tagName);this.addChild(w,F,$)}E=T.closeIndex+1}else if(f.substr(E+1,3)==="!--"){let T=th(f,"-->",E+4,"Comment is not closed.");if(this.options.commentPropName){let F=f.substring(E+4,T-2);s=this.saveTextToParentTag(s,w,$),w.add(this.options.commentPropName,[{[this.options.textNodeName]:F}])}E=T}else if(f.substr(E+1,2)==="!D"){let T=ag(f,E);this.docTypeEntities=T.entities,E=T.i}else if(f.substr(E+1,2)==="!["){let T=th(f,"]]>",E,"CDATA is not closed.")-2,F=f.substring(E+9,T);s=this.saveTextToParentTag(s,w,$);let r=this.parseTextData(F,w.tagname,$,!0,!1,!0,!0);if(r==null)r="";if(this.options.cdataPropName)w.add(this.options.cdataPropName,[{[this.options.textNodeName]:F}]);else w.add(this.options.textNodeName,r);E=T+2}else{let T=xF(f,E,this.options.removeNSPrefix),F=T.tagName,r=T.rawTagName,C=T.tagExp,I=T.attrExpPresent,L=T.closeIndex;if(this.options.transformTagName)F=this.options.transformTagName(F);if(w&&s){if(w.tagname!=="!xml")s=this.saveTextToParentTag(s,w,$,!1)}let B=w;if(B&&this.options.unpairedTags.indexOf(B.tagname)!==-1)w=this.tagsNodeStack.pop(),$=$.substring(0,$.lastIndexOf("."));if(F!==h.tagname)$+=$?"."+F:F;if(this.isItStopNode(this.options.stopNodes,$,F)){let R="";if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),$=$.substr(0,$.length-1),C=F;else C=C.substr(0,C.length-1);E=T.closeIndex}else if(this.options.unpairedTags.indexOf(F)!==-1)E=T.closeIndex;else{let Q=this.readStopNodeData(f,r,L+1);if(!Q)throw new Error(`Unexpected end of ${r}`);E=Q.i,R=Q.tagContent}let K=new k$(F);if(F!==C&&I)K[":@"]=this.buildAttributesMap(C,$,F);if(R)R=this.parseTextData(R,F,$,!0,I,!0,!0);$=$.substr(0,$.lastIndexOf(".")),K.add(this.options.textNodeName,R),this.addChild(w,K,$)}else{if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),$=$.substr(0,$.length-1),C=F;else C=C.substr(0,C.length-1);if(this.options.transformTagName)F=this.options.transformTagName(F);let R=new k$(F);if(F!==C&&I)R[":@"]=this.buildAttributesMap(C,$,F);this.addChild(w,R,$),$=$.substr(0,$.lastIndexOf("."))}else{let R=new k$(F);if(this.tagsNodeStack.push(w),F!==C&&I)R[":@"]=this.buildAttributesMap(C,$,F);this.addChild(w,R,$),w=R}s="",E=L}}else s+=f[E];return h.child};function sx(f,h,w){let s=this.options.updateTag(h.tagname,w,h[":@"]);if(s===!1);else if(typeof s==="string")h.tagname=s,f.addChild(h);else f.addChild(h)}var $x=function(f){if(this.options.processEntities){for(let h in this.docTypeEntities){let w=this.docTypeEntities[h];f=f.replace(w.regx,w.val)}for(let h in this.lastEntities){let w=this.lastEntities[h];f=f.replace(w.regex,w.val)}if(this.options.htmlEntities)for(let h in this.htmlEntities){let w=this.htmlEntities[h];f=f.replace(w.regex,w.val)}f=f.replace(this.ampEntity.regex,this.ampEntity.val)}return f};function Ex(f,h,w,s){if(f){if(s===void 0)s=Object.keys(h.child).length===0;if(f=this.parseTextData(f,h.tagname,w,!1,h[":@"]?Object.keys(h[":@"]).length!==0:!1,s),f!==void 0&&f!=="")h.add(this.options.textNodeName,f);f=""}return f}function Ux(f,h,w){let s="*."+w;for(let $ in f){let E=f[$];if(s===E||h===E)return!0}return!1}function Tx(f,h,w=">"){let s,$="";for(let E=h;E<f.length;E++){let U=f[E];if(s){if(U===s)s=""}else if(U==='"'||U==="'")s=U;else if(U===w[0])if(w[1]){if(f[E+1]===w[1])return{data:$,index:E}}else return{data:$,index:E};else if(U==="\t")U=" ";$+=U}}function th(f,h,w,s){let $=f.indexOf(h,w);if($===-1)throw new Error(s);else return $+h.length-1}function xF(f,h,w,s=">"){let $=Tx(f,h+1,s);if(!$)return;let{data:E,index:U}=$,T=E.search(/\s/),F=E,r=!0;if(T!==-1)F=E.substring(0,T),E=E.substring(T+1).trimStart();let C=F;if(w){let I=F.indexOf(":");if(I!==-1)F=F.substr(I+1),r=F!==$.data.substr(I+1)}return{tagName:F,tagExp:E,closeIndex:U,attrExpPresent:r,rawTagName:C}}function Fx(f,h,w){let s=w,$=1;for(;w<f.length;w++)if(f[w]==="<")if(f[w+1]==="/"){let E=th(f,">",w,`${h} is not closed`);if(f.substring(w+2,E).trim()===h){if($--,$===0)return{tagContent:f.substring(s,w),i:E}}w=E}else if(f[w+1]==="?")w=th(f,"?>",w+1,"StopNode is not closed.");else if(f.substr(w+1,3)==="!--")w=th(f,"-->",w+3,"StopNode is not closed.");else if(f.substr(w+1,2)==="![")w=th(f,"]]>",w,"StopNode is not closed.")-2;else{let E=xF(f,w,">");if(E){if((E&&E.tagName)===h&&E.tagExp[E.tagExp.length-1]!=="/")$++;w=E.closeIndex}}}function _F(f,h,w){if(h&&typeof f==="string"){let s=f.trim();if(s==="true")return!0;else if(s==="false")return!1;else return pg(f,w)}else if(Qz.isExist(f))return f;else return""}Mz.exports=Kz});var Vz=H((Gx)=>{function rx(f,h){return Jz(f,h)}function Jz(f,h,w){let s,$={};for(let E=0;E<f.length;E++){let U=f[E],T=Cx(U),F="";if(w===void 0)F=T;else F=w+"."+T;if(T===h.textNodeName)if(s===void 0)s=U[T];else s+=""+U[T];else if(T===void 0)continue;else if(U[T]){let r=Jz(U[T],h,F),C=Lx(r,h);if(U[":@"])Ix(r,U[":@"],F,h);else if(Object.keys(r).length===1&&r[h.textNodeName]!==void 0&&!h.alwaysCreateTextNode)r=r[h.textNodeName];else if(Object.keys(r).length===0)if(h.alwaysCreateTextNode)r[h.textNodeName]="";else r="";if($[T]!==void 0&&$.hasOwnProperty(T)){if(!Array.isArray($[T]))$[T]=[$[T]];$[T].push(r)}else if(h.isArray(T,F,C))$[T]=[r];else $[T]=r}}if(typeof s==="string"){if(s.length>0)$[h.textNodeName]=s}else if(s!==void 0)$[h.textNodeName]=s;return $}function Cx(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];if(s!==":@")return s}}function Ix(f,h,w,s){if(h){let $=Object.keys(h),E=$.length;for(let U=0;U<E;U++){let T=$[U];if(s.isArray(T,w+"."+T,!0,!0))f[T]=[h[T]];else f[T]=h[T]}}}function Lx(f,h){let{textNodeName:w}=h,s=Object.keys(f).length;if(s===0)return!0;if(s===1&&(f[w]||typeof f[w]==="boolean"||f[w]===0))return!0;return!1}Gx.prettify=rx});var Nz=H((S80,Hz)=>{var{buildOptions:Bx}=Wz(),Ax=Zz(),{prettify:zx}=Vz(),Rx=gF();class Pz{constructor(f){this.externalEntities={},this.options=Bx(f)}parse(f,h){if(typeof f==="string");else if(f.toString)f=f.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(h){if(h===!0)h={};let $=Rx.validate(f,h);if($!==!0)throw Error(`${$.err.msg}:${$.err.line}:${$.err.col}`)}let w=new Ax(this.options);w.addExternalEntities(this.externalEntities);let s=w.parseXml(f);if(this.options.preserveOrder||s===void 0)return s;else return zx(s,this.options)}addEntity(f,h){if(h.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(f.indexOf("&")!==-1||f.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(h==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[f]=h}}Hz.exports=Pz});var jz=H((Y80,yz)=>{function Xx(f,h){let w="";if(h.format&&h.indentBy.length>0)w=`
35
- `;return qz(f,h,"",w)}function qz(f,h,w,s){let $="",E=!1;for(let U=0;U<f.length;U++){let T=f[U],F=Sx(T);if(F===void 0)continue;let r="";if(w.length===0)r=F;else r=`${w}.${F}`;if(F===h.textNodeName){let R=T[F];if(!Yx(r,h))R=h.tagValueProcessor(F,R),R=kz(R,h);if(E)$+=s;$+=R,E=!1;continue}else if(F===h.cdataPropName){if(E)$+=s;$+=`<![CDATA[${T[F][0][h.textNodeName]}]]>`,E=!1;continue}else if(F===h.commentPropName){$+=s+`<!--${T[F][0][h.textNodeName]}-->`,E=!0;continue}else if(F[0]==="?"){let R=Dz(T[":@"],h),K=F==="?xml"?"":s,Q=T[F][0][h.textNodeName];Q=Q.length!==0?" "+Q:"",$+=K+`<${F}${Q}${R}?>`,E=!0;continue}let C=s;if(C!=="")C+=h.indentBy;let I=Dz(T[":@"],h),L=s+`<${F}${I}`,B=qz(T[F],h,r,C);if(h.unpairedTags.indexOf(F)!==-1)if(h.suppressUnpairedNode)$+=L+">";else $+=L+"/>";else if((!B||B.length===0)&&h.suppressEmptyNode)$+=L+"/>";else if(B&&B.endsWith(">"))$+=L+`>${B}${s}</${F}>`;else{if($+=L+">",B&&s!==""&&(B.includes("/>")||B.includes("</")))$+=s+h.indentBy+B+s;else $+=B;$+=`</${F}>`}E=!0}return $}function Sx(f){let h=Object.keys(f);for(let w=0;w<h.length;w++){let s=h[w];if(!f.hasOwnProperty(s))continue;if(s!==":@")return s}}function Dz(f,h){let w="";if(f&&!h.ignoreAttributes)for(let s in f){if(!f.hasOwnProperty(s))continue;let $=h.attributeValueProcessor(s,f[s]);if($=kz($,h),$===!0&&h.suppressBooleanAttributes)w+=` ${s.substr(h.attributeNamePrefix.length)}`;else w+=` ${s.substr(h.attributeNamePrefix.length)}="${$}"`}return w}function Yx(f,h){f=f.substr(0,f.length-h.textNodeName.length-1);let w=f.substr(f.lastIndexOf(".")+1);for(let s in h.stopNodes)if(h.stopNodes[s]===f||h.stopNodes[s]==="*."+w)return!0;return!1}function kz(f,h){if(f&&f.length>0&&h.processEntities)for(let w=0;w<h.entities.length;w++){let s=h.entities[w];f=f.replace(s.regex,s.val)}return f}yz.exports=Xx});var lz=H((Q80,Oz)=>{var Qx=jz(),Kx={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(f,h){return h},attributeValueProcessor:function(f,h){return h},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};function Xh(f){if(this.options=Object.assign({},Kx,f),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Jx;if(this.processTextOrObjNode=Mx,this.options.format)this.indentate=Zx,this.tagEndChar=`>
36
- `,this.newLine=`
37
- `;else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}Xh.prototype.build=function(f){if(this.options.preserveOrder)return Qx(f,this.options);else{if(Array.isArray(f)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)f={[this.options.arrayNodeName]:f};return this.j2x(f,0).val}};Xh.prototype.j2x=function(f,h){let w="",s="";for(let $ in f){if(!Object.prototype.hasOwnProperty.call(f,$))continue;if(typeof f[$]==="undefined"){if(this.isAttribute($))s+=""}else if(f[$]===null)if(this.isAttribute($))s+="";else if($[0]==="?")s+=this.indentate(h)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(h)+"<"+$+"/"+this.tagEndChar;else if(f[$]instanceof Date)s+=this.buildTextValNode(f[$],$,"",h);else if(typeof f[$]!=="object"){let E=this.isAttribute($);if(E)w+=this.buildAttrPairStr(E,""+f[$]);else if($===this.options.textNodeName){let U=this.options.tagValueProcessor($,""+f[$]);s+=this.replaceEntitiesValue(U)}else s+=this.buildTextValNode(f[$],$,"",h)}else if(Array.isArray(f[$])){let E=f[$].length,U="",T="";for(let F=0;F<E;F++){let r=f[$][F];if(typeof r==="undefined");else if(r===null)if($[0]==="?")s+=this.indentate(h)+"<"+$+"?"+this.tagEndChar;else s+=this.indentate(h)+"<"+$+"/"+this.tagEndChar;else if(typeof r==="object")if(this.options.oneListGroup){let C=this.j2x(r,h+1);if(U+=C.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName))T+=C.attrStr}else U+=this.processTextOrObjNode(r,$,h);else if(this.options.oneListGroup){let C=this.options.tagValueProcessor($,r);C=this.replaceEntitiesValue(C),U+=C}else U+=this.buildTextValNode(r,$,"",h)}if(this.options.oneListGroup)U=this.buildObjectNode(U,$,T,h);s+=U}else if(this.options.attributesGroupName&&$===this.options.attributesGroupName){let E=Object.keys(f[$]),U=E.length;for(let T=0;T<U;T++)w+=this.buildAttrPairStr(E[T],""+f[$][E[T]])}else s+=this.processTextOrObjNode(f[$],$,h)}return{attrStr:w,val:s}};Xh.prototype.buildAttrPairStr=function(f,h){if(h=this.options.attributeValueProcessor(f,""+h),h=this.replaceEntitiesValue(h),this.options.suppressBooleanAttributes&&h==="true")return" "+f;else return" "+f+'="'+h+'"'};function Mx(f,h,w){let s=this.j2x(f,w+1);if(f[this.options.textNodeName]!==void 0&&Object.keys(f).length===1)return this.buildTextValNode(f[this.options.textNodeName],h,s.attrStr,w);else return this.buildObjectNode(s.val,h,s.attrStr,w)}Xh.prototype.buildObjectNode=function(f,h,w,s){if(f==="")if(h[0]==="?")return this.indentate(s)+"<"+h+w+"?"+this.tagEndChar;else return this.indentate(s)+"<"+h+w+this.closeTag(h)+this.tagEndChar;else{let $="</"+h+this.tagEndChar,E="";if(h[0]==="?")E="?",$="";if((w||w==="")&&f.indexOf("<")===-1)return this.indentate(s)+"<"+h+w+E+">"+f+$;else if(this.options.commentPropName!==!1&&h===this.options.commentPropName&&E.length===0)return this.indentate(s)+`<!--${f}-->`+this.newLine;else return this.indentate(s)+"<"+h+w+E+this.tagEndChar+f+this.indentate(s)+$}};Xh.prototype.closeTag=function(f){let h="";if(this.options.unpairedTags.indexOf(f)!==-1){if(!this.options.suppressUnpairedNode)h="/"}else if(this.options.suppressEmptyNode)h="/";else h=`></${f}`;return h};Xh.prototype.buildTextValNode=function(f,h,w,s){if(this.options.cdataPropName!==!1&&h===this.options.cdataPropName)return this.indentate(s)+`<![CDATA[${f}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&h===this.options.commentPropName)return this.indentate(s)+`<!--${f}-->`+this.newLine;else if(h[0]==="?")return this.indentate(s)+"<"+h+w+"?"+this.tagEndChar;else{let $=this.options.tagValueProcessor(h,f);if($=this.replaceEntitiesValue($),$==="")return this.indentate(s)+"<"+h+w+this.closeTag(h)+this.tagEndChar;else return this.indentate(s)+"<"+h+w+">"+$+"</"+h+this.tagEndChar}};Xh.prototype.replaceEntitiesValue=function(f){if(f&&f.length>0&&this.options.processEntities)for(let h=0;h<this.options.entities.length;h++){let w=this.options.entities[h];f=f.replace(w.regex,w.val)}return f};function Zx(f){return this.options.indentBy.repeat(f)}function Jx(f){if(f.startsWith(this.options.attributeNamePrefix)&&f!==this.options.textNodeName)return f.substr(this.attrPrefixLen);else return!1}Oz.exports=Xh});var bz=H((K80,vz)=>{var Vx=gF(),Px=Nz(),Hx=lz();vz.exports={XMLParser:Px,XMLValidator:Vx,XMLBuilder:Hx}});var xz=H((M80,gz)=>{var{defineProperty:a5,getOwnPropertyDescriptor:Nx,getOwnPropertyNames:Dx}=Object,qx=Object.prototype.hasOwnProperty,R1=(f,h)=>a5(f,"name",{value:h,configurable:!0}),kx=(f,h)=>{for(var w in h)a5(f,w,{get:h[w],enumerable:!0})},yx=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Dx(h))if(!qx.call(f,$)&&$!==w)a5(f,$,{get:()=>h[$],enumerable:!(s=Nx(h,$))||s.enumerable})}return f},jx=(f)=>yx(a5({},"__esModule",{value:!0}),f),mz={};kx(mz,{_toBool:()=>lx,_toNum:()=>vx,_toStr:()=>Ox,awsExpectUnion:()=>mx,loadRestJsonErrorCode:()=>cx,loadRestXmlErrorCode:()=>nx,parseJsonBody:()=>iz,parseJsonErrorBody:()=>ix,parseXmlBody:()=>cz,parseXmlErrorBody:()=>_x});gz.exports=jx(mz);var Ox=R1((f)=>{if(f==null)return f;if(typeof f==="number"||typeof f==="bigint"){let h=new Error(`Received number ${f} where a string was expected.`);return h.name="Warning",console.warn(h),String(f)}if(typeof f==="boolean"){let h=new Error(`Received boolean ${f} where a string was expected.`);return h.name="Warning",console.warn(h),String(f)}return f},"_toStr"),lx=R1((f)=>{if(f==null)return f;if(typeof f==="string"){let h=f.toLowerCase();if(f!==""&&h!=="false"&&h!=="true"){let w=new Error(`Received string "${f}" where a boolean was expected.`);w.name="Warning",console.warn(w)}return f!==""&&h!=="false"}return f},"_toBool"),vx=R1((f)=>{if(f==null)return f;if(typeof f==="string"){let h=Number(f);if(h.toString()!==f){let w=new Error(`Received string "${f}" where a number was expected.`);return w.name="Warning",console.warn(w),f}return h}return f},"_toNum"),bx=Z0(),mx=R1((f)=>{if(f==null)return;if(typeof f==="object"&&"__type"in f)delete f.__type;return bx.expectUnion(f)},"awsExpectUnion"),dx=Z0(),dz=R1((f,h)=>dx.collectBody(f,h).then((w)=>h.utf8Encoder(w)),"collectBodyString"),iz=R1((f,h)=>dz(f,h).then((w)=>{if(w.length)try{return JSON.parse(w)}catch(s){if(s?.name==="SyntaxError")Object.defineProperty(s,"$responseBodyText",{value:w});throw s}return{}}),"parseJsonBody"),ix=R1(async(f,h)=>{let w=await iz(f,h);return w.message=w.message??w.Message,w},"parseJsonErrorBody"),cx=R1((f,h)=>{let w=R1((E,U)=>Object.keys(E).find((T)=>T.toLowerCase()===U.toLowerCase()),"findKey"),s=R1((E)=>{let U=E;if(typeof U==="number")U=U.toString();if(U.indexOf(",")>=0)U=U.split(",")[0];if(U.indexOf(":")>=0)U=U.split(":")[0];if(U.indexOf("#")>=0)U=U.split("#")[1];return U},"sanitizeErrorCode"),$=w(f.headers,"x-amzn-errortype");if($!==void 0)return s(f.headers[$]);if(h.code!==void 0)return s(h.code);if(h.__type!==void 0)return s(h.__type)},"loadRestJsonErrorCode"),gx=Z0(),xx=bz(),cz=R1((f,h)=>dz(f,h).then((w)=>{if(w.length){let s=new xx.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:R1((F,r)=>r.trim()===""&&r.includes(`
38
- `)?"":void 0,"tagValueProcessor")});s.addEntity("#xD","\r"),s.addEntity("#10",`
39
- `);let $;try{$=s.parse(w,!0)}catch(F){if(F&&typeof F==="object")Object.defineProperty(F,"$responseBodyText",{value:w});throw F}let E="#text",U=Object.keys($)[0],T=$[U];if(T[E])T[U]=T[E],delete T[E];return gx.getValueFromTextNode(T)}return{}}),"parseXmlBody"),_x=R1(async(f,h)=>{let w=await cz(f,h);if(w.Error)w.Error.message=w.Error.message??w.Error.Message;return w},"parseXmlErrorBody"),nx=R1((f,h)=>{if(h?.Error?.Code!==void 0)return h.Error.Code;if(h?.Code!==void 0)return h.Code;if(f.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var j0=H((y$)=>{Object.defineProperty(y$,"__esModule",{value:!0});var nF=k5();nF.__exportStar(C1(),y$);nF.__exportStar(l7(),y$);nF.__exportStar(xz(),y$)});async function _z(f,h,w){if(w.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")ff.setFeature(f,"PROTOCOL_RPC_V2_CBOR","M");if(typeof h.retryStrategy==="function"){let E=await h.retryStrategy();if(typeof E.acquireInitialRetryToken==="function")if(E.constructor?.name?.includes("Adaptive"))ff.setFeature(f,"RETRY_MODE_ADAPTIVE","F");else ff.setFeature(f,"RETRY_MODE_STANDARD","E");else ff.setFeature(f,"RETRY_MODE_LEGACY","D")}if(typeof h.accountIdEndpointMode==="function"){let E=f.endpointV2;if(String(E?.url?.hostname).match(ex))ff.setFeature(f,"ACCOUNT_ID_ENDPOINT","O");switch(await h.accountIdEndpointMode?.()){case"disabled":ff.setFeature(f,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":ff.setFeature(f,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":ff.setFeature(f,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=f.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let E=$;if(E.accountId)ff.setFeature(f,"RESOLVED_ACCOUNT_ID","T");for(let[U,T]of Object.entries(E.$source??{}))ff.setFeature(f,U,T)}}var ff,ex;var nz=G(()=>{ff=Y(j0(),1),ex=/\d{12}\.ddb/});var eF="user-agent",p5="x-amz-user-agent",aF=" ",o5="/",ez,az,pF="-";var pz=G(()=>{ez=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,az=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});function oz(f){let h="";for(let w in f){let s=f[w];if(h.length+s.length+1<=1024){if(h.length)h+=","+s;else h+=s;continue}break}return h}var ax=(f)=>(h,w)=>async(s)=>{let{request:$}=s;if(!_0.isInstance($))return h(s);let{headers:E}=$,U=w?.userAgent?.map(u5)||[],T=(await f.defaultUserAgentProvider()).map(u5);await _z(w,f,s);let F=w;T.push(`m/${oz(Object.assign({},w.__smithy_context?.features,F.__aws_sdk_context?.features))}`);let r=f?.customUserAgent?.map(u5)||[],C=await f.userAgentAppId();if(C)T.push(u5([`app/${C}`]));let I=YA(),L=(I?[I]:[]).concat([...T,...U,...r]).join(aF),B=[...T.filter((R)=>R.startsWith("aws-sdk-")),...r].join(aF);if(f.runtime!=="browser"){if(B)E[p5]=E[p5]?`${E[eF]} ${B}`:B;E[eF]=L}else E[p5]=L;return h({...s,request:$})},u5=(f)=>{let h=f[0].split(o5).map((U)=>U.replace(ez,pF)).join(o5),w=f[1]?.replace(az,pF),s=h.indexOf(o5),$=h.substring(0,s),E=h.substring(s+1);if($==="api")E=E.toLowerCase();return[$,E,w].filter((U)=>U&&U.length>0).reduce((U,T,F)=>{switch(F){case 0:return T;case 1:return`${U}/${T}`;default:return`${U}#${T}`}},"")},px,mw=(f)=>({applyToStack:(h)=>{h.add(ax(f),px)}});var uz=G(()=>{Z$();r1();nz();pz();px={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var j$=G(()=>{kB();uz()});var dw=(f,h,w)=>{if(!(h in f))return;if(f[h]==="true")return!0;if(f[h]==="false")return!1;throw new Error(`Cannot load ${w} "${h}". Expected "true" or "false", got ${f[h]}.`)};var Sh;var tz=G(()=>{(function(f){f.ENV="env",f.CONFIG="shared config entry"})(Sh||(Sh={}))});var oF=G(()=>{tz()});var ox="AWS_USE_DUALSTACK_ENDPOINT",ux="use_dualstack_endpoint",iw;var fR=G(()=>{oF();iw={environmentVariableSelector:(f)=>dw(f,ox,Sh.ENV),configFileSelector:(f)=>dw(f,ux,Sh.CONFIG),default:!1}});var tx="AWS_USE_FIPS_ENDPOINT",f_="use_fips_endpoint",cw;var hR=G(()=>{oF();cw={environmentVariableSelector:(f)=>dw(f,tx,Sh.ENV),configFileSelector:(f)=>dw(f,f_,Sh.CONFIG),default:!1}});var uF,Yh=(f)=>f[uF.SMITHY_CONTEXT_KEY]||(f[uF.SMITHY_CONTEXT_KEY]={});var wR=G(()=>{uF=Y(F1(),1)});var L1=(f)=>{if(typeof f==="function")return f;let h=Promise.resolve(f);return()=>h};var gf=G(()=>{wR()});var sR=G(()=>{gf()});var $R=G(()=>{gf()});var ER=G(()=>{fR();hR();sR();$R()});var Qh,gw;var UR=G(()=>{Qh={environmentVariableSelector:(f)=>f.AWS_REGION,configFileSelector:(f)=>f.region,default:()=>{throw new Error("Region is missing")}},gw={preferredFile:"credentials"}});var t5=(f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips"));var tF=(f)=>t5(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f;var TR=()=>{};var xw=(f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return Object.assign(f,{region:async()=>{if(typeof h==="string")return tF(h);let s=await h();return tF(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(t5(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}})};var FR=G(()=>{TR()});var rR=G(()=>{UR();FR()});var CR=()=>{};var IR=()=>{};var LR=()=>{};var GR=G(()=>{CR();IR();LR()});var Kh=G(()=>{ER();rR();GR()});function h_(f){return(h)=>async(w)=>{let s=w.request;if(_0.isInstance(s)){let{body:$,headers:E}=s;if($&&Object.keys(E).map((U)=>U.toLowerCase()).indexOf(WR)===-1)try{let U=f($);s.headers={...s.headers,[WR]:String(U)}}catch(U){}}return h({...w,request:s})}}var WR="content-length",w_,_w=(f)=>({applyToStack:(h)=>{h.add(h_(f.bodyLengthChecker),w_)}});var fE=G(()=>{r1();w_={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var BR=async(f)=>{let h=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=h.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(T_(h)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!U_(h)||h.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||h.toLowerCase()!==h||h.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},s_,$_,E_,U_=(f)=>s_.test(f)&&!$_.test(f)&&!E_.test(f),T_=(f)=>{let[h,w,s,,,$]=f.split(":"),E=h==="arn"&&f.split(":").length>=6,U=Boolean(E&&w&&s&&$);if(E&&!U)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return U};var AR=G(()=>{s_=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,$_=/(\d+\.){3}\d+/,E_=/\.\./});var zR=G(()=>{AR()});var RR=(f,h,w)=>{let s=async()=>{let $=w[f]??w[h];if(typeof $==="function")return $();return $};if(f==="credentialScope"||h==="CredentialScope")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||h==="AccountId")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||h==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:E,hostname:U,port:T,path:F}=$;return`${E}//${U}${T?":"+T:""}${F}`}}return $};return s};var q1;var O$=G(()=>{q1=class q1 extends Error{constructor(f,h=!0){let w,s=!0;if(typeof h==="boolean")w=void 0,s=h;else if(h!=null&&typeof h==="object")w=h.logger,s=h.tryNextLink??!0;super(f);this.name="ProviderError",this.tryNextLink=s,Object.setPrototypeOf(this,q1.prototype),w?.debug?.(`@smithy/property-provider ${s?"->":"(!)"} ${f}`)}static from(f,h=!0){return Object.assign(new this(f.message,h),f)}}});var a;var XR=G(()=>{O$();a=class a extends q1{constructor(f,h=!0){super(f,h);this.name="CredentialsProviderError",Object.setPrototypeOf(this,a.prototype)}}});var X1;var SR=G(()=>{O$();X1=class X1 extends q1{constructor(f,h=!0){super(f,h);this.name="TokenProviderError",Object.setPrototypeOf(this,X1.prototype)}}});var xf=(...f)=>async()=>{if(f.length===0)throw new q1("No providers in chain");let h;for(let w of f)try{return await w()}catch(s){if(h=s,s?.tryNextLink)continue;throw s}throw h};var YR=G(()=>{O$()});var QR=(f)=>()=>Promise.resolve(f);var fw=(f,h,w)=>{let s,$,E,U=!1,T=async()=>{if(!$)$=f();try{s=await $,E=!0,U=!1}finally{$=void 0}return s};if(h===void 0)return async(F)=>{if(!E||F?.forceRefresh)s=await T();return s};return async(F)=>{if(!E||F?.forceRefresh)s=await T();if(U)return s;if(w&&!w(s))return U=!0,s;if(h(s))return await T(),s;return s}};var S0=G(()=>{XR();O$();SR();YR()});function hE(f){try{let h=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return h.delete("CONFIG"),h.delete("CONFIG_PREFIX_SEPARATOR"),h.delete("ENV"),[...h].join(", ")}catch(h){return f}}var KR=(f,h)=>async()=>{try{let w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new a(w.message||`Not found in ENV: ${hE(f.toString())}`,{logger:h})}};var MR=G(()=>{S0()});import{homedir as F_}from"node:os";import{sep as r_}from"node:path";var f3,C_=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Mh=()=>{let{HOME:f,USERPROFILE:h,HOMEPATH:w,HOMEDRIVE:s=`C:${r_}`}=process.env;if(f)return f;if(h)return h;if(w)return`${s}${w}`;let $=C_();if(!f3[$])f3[$]=F_();return f3[$]};var nw=G(()=>{f3={}});var ZR="AWS_PROFILE",k1=(f)=>f.profile||process.env.AWS_PROFILE||"default";import{createHash as I_}from"node:crypto";import{join as L_}from"node:path";var wE=(f)=>{let w=I_("sha1").update(f).digest("hex");return L_(Mh(),".aws","sso","cache",`${w}.json`)};var h3=G(()=>{nw()});import{promises as G_}from"node:fs";var W_,sE=async(f)=>{let h=wE(f),w=await W_(h,"utf8");return JSON.parse(w)};var JR=G(()=>{h3();({readFile:W_}=G_)});var w3,VR=(f)=>Object.entries(f).filter(([h])=>{let w=h.indexOf(y1);if(w===-1)return!1;return Object.values(w3.IniSectionType).includes(h.substring(0,w))}).reduce((h,[w,s])=>{let $=w.indexOf(y1),E=w.substring(0,$)===w3.IniSectionType.PROFILE?w.substring($+1):w;return h[E]=s,h},{...f.default&&{default:f.default}});var PR=G(()=>{w3=Y(F1(),1);ew()});import{join as B_}from"node:path";var A_="AWS_CONFIG_FILE",$E=()=>process.env[A_]||B_(Mh(),".aws","config");var s3=G(()=>{nw()});import{join as z_}from"node:path";var R_="AWS_SHARED_CREDENTIALS_FILE",HR=()=>process.env[R_]||z_(Mh(),".aws","credentials");var NR=G(()=>{nw()});var DR,X_,S_,l$=(f)=>{let h={},w,s;for(let $ of f.split(/\r?\n/)){let E=$.split(/(^|\s)[;#]/)[0].trim();if(E[0]==="["&&E[E.length-1]==="]"){w=void 0,s=void 0;let T=E.substring(1,E.length-1),F=X_.exec(T);if(F){let[,r,,C]=F;if(Object.values(DR.IniSectionType).includes(r))w=[r,C].join(y1)}else w=T;if(S_.includes(T))throw new Error(`Found invalid profile name "${T}"`)}else if(w){let T=E.indexOf("=");if(![0,-1].includes(T)){let[F,r]=[E.substring(0,T).trim(),E.substring(T+1).trim()];if(r==="")s=F;else{if(s&&$.trimStart()===$)s=void 0;h[w]=h[w]||{};let C=s?[s,F].join(y1):F;h[w][C]=r}}}}return h};var $3=G(()=>{DR=Y(F1(),1);ew();X_=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,S_=["__proto__","profile __proto__"]});import{promises as Y_}from"node:fs";var Q_,E3,v$=(f,h)=>{if(!E3[f]||h?.ignoreCache)E3[f]=Q_(f,"utf8");return E3[f]};var U3=G(()=>{({readFile:Q_}=Y_),E3={}});import{join as qR}from"node:path";var kR=()=>({}),y1=".",EE=async(f={})=>{let{filepath:h=HR(),configFilepath:w=$E()}=f,s=Mh(),$="~/",E=h;if(h.startsWith("~/"))E=qR(s,h.slice(2));let U=w;if(w.startsWith("~/"))U=qR(s,w.slice(2));let T=await Promise.all([v$(U,{ignoreCache:f.ignoreCache}).then(l$).then(VR).catch(kR),v$(E,{ignoreCache:f.ignoreCache}).then(l$).catch(kR)]);return{configFile:T[0],credentialsFile:T[1]}};var ew=G(()=>{PR();s3();NR();nw();$3();U3()});var yR,jR=(f)=>Object.entries(f).filter(([h])=>h.startsWith(yR.IniSectionType.SSO_SESSION+y1)).reduce((h,[w,s])=>({...h,[w.substring(w.indexOf(y1)+1)]:s}),{});var OR=G(()=>{yR=Y(F1(),1);ew()});var K_=()=>({}),UE=async(f={})=>v$(f.configFilepath??$E()).then(l$).then(jR).catch(K_);var lR=G(()=>{s3();OR();$3();U3()});var vR=(...f)=>{let h={};for(let w of f)for(let[s,$]of Object.entries(w))if(h[s]!==void 0)Object.assign(h[s],$);else h[s]=$;return h};var Zh=async(f)=>{let h=await EE(f);return vR(h.configFile,h.credentialsFile)};var bR=G(()=>{ew()});var mR=()=>{};var hf=G(()=>{nw();h3();JR();ew();lR();bR();mR()});var dR=(f,{preferredFile:h="config",...w}={})=>async()=>{let s=k1(w),{configFile:$,credentialsFile:E}=await EE(w),U=E[s]||{},T=$[s]||{},F=h==="config"?{...U,...T}:{...T,...U};try{let C=f(F,h==="config"?$:E);if(C===void 0)throw new Error;return C}catch(r){throw new a(r.message||`Not found in config files w/ profile [${s}]: ${hE(f.toString())}`,{logger:w.logger})}};var iR=G(()=>{S0();hf()});var M_=(f)=>typeof f==="function",cR=(f)=>M_(f)?async()=>await f():QR(f);var gR=G(()=>{S0()});var A0=({environmentVariableSelector:f,configFileSelector:h,default:w},s={})=>fw(xf(KR(f),dR(h,s),cR(w)));var xR=G(()=>{S0();MR();iR();gR()});var Jh=G(()=>{xR()});var _R="AWS_ENDPOINT_URL",nR="endpoint_url",eR=(f)=>({environmentVariableSelector:(h)=>{let w=f.split(" ").map((E)=>E.toUpperCase()),s=h[[_R,...w].join("_")];if(s)return s;let $=h[_R];if($)return $;return},configFileSelector:(h,w)=>{if(w&&h.services){let $=w[["services",h.services].join(y1)];if($){let E=f.split(" ").map((T)=>T.toLowerCase()),U=$[[E.join("_"),nR].join(y1)];if(U)return U}}let s=h[nR];if(s)return s;return},default:void 0});var aR=G(()=>{hf()});var TE=async(f)=>A0(eR(f??""))();var T3=G(()=>{Jh();aR()});function pR(f){let h={};if(f=f.replace(/^\?/,""),f)for(let w of f.split("&")){let[s,$=null]=w.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in h))h[s]=$;else if(Array.isArray(h[s]))h[s].push($);else h[s]=[h[s],$]}return h}var j1=(f)=>{if(typeof f==="string")return j1(new URL(f));let{hostname:h,pathname:w,port:s,protocol:$,search:E}=f,U;if(E)U=pR(E);return{hostname:h,port:s?parseInt(s):void 0,protocol:$,path:w,query:U}};var aw=()=>{};var FE=(f)=>{if(typeof f==="object"){if("url"in f)return j1(f.url);return f}return j1(f)};var rE=G(()=>{aw()});var oR=async(f,h,w,s)=>{if(!w.endpoint){let U;if(w.serviceConfiguredEndpoint)U=await w.serviceConfiguredEndpoint();else U=await TE(w.serviceId);if(U)w.endpoint=()=>Promise.resolve(FE(U))}let $=await Z_(f,h,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,s)},Z_=async(f,h,w)=>{let s={},$=h?.getEndpointParameterInstructions?.()||{};for(let[E,U]of Object.entries($))switch(U.type){case"staticContextParams":s[E]=U.value;break;case"contextParams":s[E]=f[U.name];break;case"clientContextParams":case"builtInParams":s[E]=await RR(U.name,E,w)();break;case"operationContextParams":s[E]=U.get(f);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(U))}if(Object.keys($).length===0)Object.assign(s,w);if(String(w.serviceId).toLowerCase()==="s3")await BR(s);return s};var F3=G(()=>{zR();T3();rE()});var uR=G(()=>{F3();rE()});var tR,fX=({config:f,instructions:h})=>{return(w,s)=>async($)=>{if(f.endpoint)tR.setFeature(s,"ENDPOINT_OVERRIDE","N");let E=await oR($.input,{getEndpointParameterInstructions(){return h}},{...f},s);s.endpointV2=E,s.authSchemes=E.properties?.authSchemes;let U=s.authSchemes?.[0];if(U){s.signing_region=U.signingRegion,s.signing_service=U.signingName;let F=Yh(s)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:U.signingRegion,signingRegion:U.signingRegion,signing_service:U.signingName,signingName:U.signingName,signingRegionSet:U.signingRegionSet},U.properties)}return w({...$})}};var r3=G(()=>{tR=Y(b0(),1);gf();F3()});var hX,J_,z=(f,h)=>({applyToStack:(w)=>{w.addRelativeTo(fX({config:f,instructions:h}),J_)}});var wX=G(()=>{hX=Y(N(),1);r3();J_={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:hX.serializerMiddlewareOption.name}});var pw=(f)=>{let h=f.tls??!0,{endpoint:w,useDualstackEndpoint:s,useFipsEndpoint:$}=f,E=w!=null?async()=>FE(await L1(w)()):void 0,T=Object.assign(f,{endpoint:E,tls:h,isCustomEndpoint:!!w,useDualstackEndpoint:L1(s??!1),useFipsEndpoint:L1($??!1)}),F=void 0;return T.serviceConfiguredEndpoint=async()=>{if(f.serviceId&&!F)F=TE(f.serviceId);return F},T};var sX=G(()=>{gf();T3();rE()});var $X=()=>{};var q=G(()=>{uR();r3();wX();sX();$X()});var O1,hw=3,Vh;var CE=G(()=>{(function(f){f.STANDARD="standard",f.ADAPTIVE="adaptive"})(O1||(O1={}));Vh=O1.STANDARD});var EX,UX,TX,FX;var rX=G(()=>{EX=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],UX=["TimeoutError","RequestTimeout","RequestTimeoutException"],TX=[500,502,503,504],FX=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var V_=(f)=>f.$metadata?.clockSkewCorrected,ow=(f)=>f.$metadata?.httpStatusCode===429||EX.includes(f.name)||f.$retryable?.throttling==!0,b$=(f,h=0)=>V_(f)||UX.includes(f.name)||FX.includes(f?.code||"")||TX.includes(f.$metadata?.httpStatusCode||0)||f.cause!==void 0&&h<=10&&b$(f.cause,h+1),CX=(f)=>{if(f.$metadata?.httpStatusCode!==void 0){let h=f.$metadata.httpStatusCode;if(500<=h&&h<=599&&!b$(f))return!0;return!1}return!1};var m$=G(()=>{rX()});class uw{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?.beta??0.7,this.minCapacity=f?.minCapacity??1,this.minFillRate=f?.minFillRate??0.5,this.scaleConstant=f?.scaleConstant??0.4,this.smooth=f?.smooth??0.8;let h=this.getCurrentTimeInSeconds();this.lastThrottleTime=h,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){let h=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>uw.setTimeoutFn(w,h))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){let f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}let h=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+h),this.lastTimestamp=f}updateClientSendingRate(f){let h;if(this.updateMeasuredRate(),ow(f)){let s=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),h=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),h=this.cubicSuccess(this.getCurrentTimeInSeconds());let w=Math.min(h,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(){let f=this.getCurrentTimeInSeconds(),h=Math.floor(f*2)/2;if(this.requestCount++,h>this.lastTxRateBucket){let w=this.requestCount/(h-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=h}}getPrecise(f){return parseFloat(f.toFixed(8))}}var C3=G(()=>{m$();uw.setTimeoutFn=setTimeout});var ww=100,d$=20000,I3=500,IE=500,L3=5,G3=10,W3=1,LE="amz-sdk-invocation-id",GE="amz-sdk-request";var IX=()=>{let f=ww;return{computeNextBackoffDelay:(s)=>{return Math.floor(Math.min(d$,Math.random()*2**s*f))},setDelayBase:(s)=>{f=s}}};var LX=()=>{};var B3=({retryDelay:f,retryCount:h,retryCost:w})=>{return{getRetryCount:()=>h,getRetryDelay:()=>Math.min(d$,f),getRetryCost:()=>w}};var GX=()=>{};class tw{constructor(f){this.maxAttempts=f,this.mode=O1.STANDARD,this.capacity=IE,this.retryBackoffStrategy=IX(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return B3({retryDelay:ww,retryCount:0})}async refreshRetryTokenForRetry(f,h){let w=await this.getMaxAttempts();if(this.shouldRetry(f,h,w)){let s=h.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?I3:ww);let $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),E=h.retryAfterHint?Math.max(h.retryAfterHint.getTime()-Date.now()||0,$):$,U=this.getCapacityCost(s);return this.capacity-=U,B3({retryDelay:E,retryCount:f.getRetryCount()+1,retryCost:U})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(IE,this.capacity+(f.getRetryCost()??W3))}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 ${hw}`),hw}}shouldRetry(f,h,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(h.errorType)&&this.isRetryableError(h.errorType)}getCapacityCost(f){return f==="TRANSIENT"?G3:L3}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}}var WE=G(()=>{CE();LX();GX()});class A3{constructor(f,h){this.maxAttemptsProvider=f,this.mode=O1.ADAPTIVE;let{rateLimiter:w}=h??{};this.rateLimiter=w??new uw,this.standardRetryStrategy=new tw(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,h){return this.rateLimiter.updateClientSendingRate(h),this.standardRetryStrategy.refreshRetryTokenForRetry(f,h)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}}var WX=G(()=>{CE();C3();WE()});var BX=G(()=>{WE()});var AX=()=>{};var wf=G(()=>{WX();BX();C3();WE();CE();AX()});var z3=H((zX)=>{Object.defineProperty(zX,"__esModule",{value:!0});zX.default=N_;var P_=H_(L0("node:crypto"));function H_(f){return f&&f.__esModule?f:{default:f}}var AE=new Uint8Array(256),BE=AE.length;function N_(){if(BE>AE.length-16)P_.default.randomFillSync(AE),BE=0;return AE.slice(BE,BE+=16)}});var SX=H((RX)=>{Object.defineProperty(RX,"__esModule",{value:!0});RX.default=void 0;var q_=/^(?:[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;RX.default=q_});var i$=H((YX)=>{Object.defineProperty(YX,"__esModule",{value:!0});YX.default=void 0;var k_=y_(SX());function y_(f){return f&&f.__esModule?f:{default:f}}function j_(f){return typeof f==="string"&&k_.default.test(f)}var O_=j_;YX.default=O_});var c$=H((MX)=>{Object.defineProperty(MX,"__esModule",{value:!0});MX.default=void 0;MX.unsafeStringify=KX;var l_=v_(i$());function v_(f){return f&&f.__esModule?f:{default:f}}var f1=[];for(let f=0;f<256;++f)f1.push((f+256).toString(16).slice(1));function KX(f,h=0){return f1[f[h+0]]+f1[f[h+1]]+f1[f[h+2]]+f1[f[h+3]]+"-"+f1[f[h+4]]+f1[f[h+5]]+"-"+f1[f[h+6]]+f1[f[h+7]]+"-"+f1[f[h+8]]+f1[f[h+9]]+"-"+f1[f[h+10]]+f1[f[h+11]]+f1[f[h+12]]+f1[f[h+13]]+f1[f[h+14]]+f1[f[h+15]]}function b_(f,h=0){let w=KX(f,h);if(!l_.default(w))throw TypeError("Stringified UUID is invalid");return w}var m_=b_;MX.default=m_});var HX=H((VX)=>{Object.defineProperty(VX,"__esModule",{value:!0});VX.default=void 0;var i_=g_(z3()),c_=c$();function g_(f){return f&&f.__esModule?f:{default:f}}var JX,R3,X3=0,S3=0;function x_(f,h,w){let s=h&&w||0,$=h||new Array(16);f=f||{};let E=f.node||JX,U=f.clockseq!==void 0?f.clockseq:R3;if(E==null||U==null){let L=f.random||(f.rng||i_.default)();if(E==null)E=JX=[L[0]|1,L[1],L[2],L[3],L[4],L[5]];if(U==null)U=R3=(L[6]<<8|L[7])&16383}let T=f.msecs!==void 0?f.msecs:Date.now(),F=f.nsecs!==void 0?f.nsecs:S3+1,r=T-X3+(F-S3)/1e4;if(r<0&&f.clockseq===void 0)U=U+1&16383;if((r<0||T>X3)&&f.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");X3=T,S3=F,R3=U,T+=12219292800000;let C=((T&268435455)*1e4+F)%4294967296;$[s++]=C>>>24&255,$[s++]=C>>>16&255,$[s++]=C>>>8&255,$[s++]=C&255;let I=T/4294967296*1e4&268435455;$[s++]=I>>>8&255,$[s++]=I&255,$[s++]=I>>>24&15|16,$[s++]=I>>>16&255,$[s++]=U>>>8|128,$[s++]=U&255;for(let L=0;L<6;++L)$[s+L]=E[L];return h||c_.unsafeStringify($)}var __=x_;VX.default=__});var Y3=H((NX)=>{Object.defineProperty(NX,"__esModule",{value:!0});NX.default=void 0;var n_=e_(i$());function e_(f){return f&&f.__esModule?f:{default:f}}function a_(f){if(!n_.default(f))throw TypeError("Invalid UUID");let h,w=new Uint8Array(16);return w[0]=(h=parseInt(f.slice(0,8),16))>>>24,w[1]=h>>>16&255,w[2]=h>>>8&255,w[3]=h&255,w[4]=(h=parseInt(f.slice(9,13),16))>>>8,w[5]=h&255,w[6]=(h=parseInt(f.slice(14,18),16))>>>8,w[7]=h&255,w[8]=(h=parseInt(f.slice(19,23),16))>>>8,w[9]=h&255,w[10]=(h=parseInt(f.slice(24,36),16))/1099511627776&255,w[11]=h/4294967296&255,w[12]=h>>>24&255,w[13]=h>>>16&255,w[14]=h>>>8&255,w[15]=h&255,w}var p_=a_;NX.default=p_});var Q3=H((yX)=>{Object.defineProperty(yX,"__esModule",{value:!0});yX.URL=yX.DNS=void 0;yX.default=hn;var o_=c$(),u_=t_(Y3());function t_(f){return f&&f.__esModule?f:{default:f}}function fn(f){f=unescape(encodeURIComponent(f));let h=[];for(let w=0;w<f.length;++w)h.push(f.charCodeAt(w));return h}var qX="6ba7b810-9dad-11d1-80b4-00c04fd430c8";yX.DNS=qX;var kX="6ba7b811-9dad-11d1-80b4-00c04fd430c8";yX.URL=kX;function hn(f,h,w){function s($,E,U,T){var F;if(typeof $==="string")$=fn($);if(typeof E==="string")E=u_.default(E);if(((F=E)===null||F===void 0?void 0:F.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let r=new Uint8Array(16+$.length);if(r.set(E),r.set($,E.length),r=w(r),r[6]=r[6]&15|h,r[8]=r[8]&63|128,U){T=T||0;for(let C=0;C<16;++C)U[T+C]=r[C];return U}return o_.unsafeStringify(r)}try{s.name=f}catch($){}return s.DNS=qX,s.URL=kX,s}});var vX=H((OX)=>{Object.defineProperty(OX,"__esModule",{value:!0});OX.default=void 0;var $n=En(L0("node:crypto"));function En(f){return f&&f.__esModule?f:{default:f}}function Un(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return $n.default.createHash("md5").update(f).digest()}var Tn=Un;OX.default=Tn});var iX=H((mX)=>{Object.defineProperty(mX,"__esModule",{value:!0});mX.default=void 0;var Fn=bX(Q3()),rn=bX(vX());function bX(f){return f&&f.__esModule?f:{default:f}}var Cn=Fn.default("v3",48,rn.default),In=Cn;mX.default=In});var xX=H((cX)=>{Object.defineProperty(cX,"__esModule",{value:!0});cX.default=void 0;var Ln=Gn(L0("node:crypto"));function Gn(f){return f&&f.__esModule?f:{default:f}}var Wn={randomUUID:Ln.default.randomUUID};cX.default=Wn});var pX=H((eX)=>{Object.defineProperty(eX,"__esModule",{value:!0});eX.default=void 0;var _X=nX(xX()),Bn=nX(z3()),An=c$();function nX(f){return f&&f.__esModule?f:{default:f}}function zn(f,h,w){if(_X.default.randomUUID&&!h&&!f)return _X.default.randomUUID();f=f||{};let s=f.random||(f.rng||Bn.default)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,h){w=w||0;for(let $=0;$<16;++$)h[w+$]=s[$];return h}return An.unsafeStringify(s)}var Rn=zn;eX.default=Rn});var tX=H((oX)=>{Object.defineProperty(oX,"__esModule",{value:!0});oX.default=void 0;var Xn=Sn(L0("node:crypto"));function Sn(f){return f&&f.__esModule?f:{default:f}}function Yn(f){if(Array.isArray(f))f=Buffer.from(f);else if(typeof f==="string")f=Buffer.from(f,"utf8");return Xn.default.createHash("sha1").update(f).digest()}var Qn=Yn;oX.default=Qn});var sS=H((hS)=>{Object.defineProperty(hS,"__esModule",{value:!0});hS.default=void 0;var Kn=fS(Q3()),Mn=fS(tX());function fS(f){return f&&f.__esModule?f:{default:f}}var Zn=Kn.default("v5",80,Mn.default),Jn=Zn;hS.default=Jn});var US=H(($S)=>{Object.defineProperty($S,"__esModule",{value:!0});$S.default=void 0;var Vn="00000000-0000-0000-0000-000000000000";$S.default=Vn});var rS=H((TS)=>{Object.defineProperty(TS,"__esModule",{value:!0});TS.default=void 0;var Pn=Hn(i$());function Hn(f){return f&&f.__esModule?f:{default:f}}function Nn(f){if(!Pn.default(f))throw TypeError("Invalid UUID");return parseInt(f.slice(14,15),16)}var Dn=Nn;TS.default=Dn});var K3=H((sf)=>{Object.defineProperty(sf,"__esModule",{value:!0});Object.defineProperty(sf,"NIL",{enumerable:!0,get:function(){return On.default}});Object.defineProperty(sf,"parse",{enumerable:!0,get:function(){return mn.default}});Object.defineProperty(sf,"stringify",{enumerable:!0,get:function(){return bn.default}});Object.defineProperty(sf,"v1",{enumerable:!0,get:function(){return qn.default}});Object.defineProperty(sf,"v3",{enumerable:!0,get:function(){return kn.default}});Object.defineProperty(sf,"v4",{enumerable:!0,get:function(){return yn.default}});Object.defineProperty(sf,"v5",{enumerable:!0,get:function(){return jn.default}});Object.defineProperty(sf,"validate",{enumerable:!0,get:function(){return vn.default}});Object.defineProperty(sf,"version",{enumerable:!0,get:function(){return ln.default}});var qn=_f(HX()),kn=_f(iX()),yn=_f(pX()),jn=_f(sS()),On=_f(US()),ln=_f(rS()),vn=_f(i$()),bn=_f(c$()),mn=_f(Y3());function _f(f){return f&&f.__esModule?f:{default:f}}});var Qf,uI0,tI0,CS,fL0,hL0,wL0,sL0,$L0,EL0;var IS=G(()=>{Qf=Y(K3(),1),uI0=Qf.default.v1,tI0=Qf.default.v3,CS=Qf.default.v4,fL0=Qf.default.v5,hL0=Qf.default.NIL,wL0=Qf.default.version,sL0=Qf.default.validate,$L0=Qf.default.stringify,EL0=Qf.default.parse});var LS=G(()=>{wf()});var M3=G(()=>{wf()});var Z3=G(()=>{m$()});var J3=(f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)};var V3=G(()=>{r1();m$();wf();LS();M3();Z3()});var GS=G(()=>{wf();V3()});var WS="AWS_MAX_ATTEMPTS",BS="max_attempts",fs,hs=(f)=>{let{retryStrategy:h,retryMode:w,maxAttempts:s}=f,$=L1(s??hw);return Object.assign(f,{maxAttempts:$,retryStrategy:async()=>{if(h)return h;if(await L1(w)()===O1.ADAPTIVE)return new A3($);return new tw($)}})},dn="AWS_RETRY_MODE",cn="retry_mode",ws;var AS=G(()=>{gf();wf();fs={environmentVariableSelector:(f)=>{let h=f[WS];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Environment variable ${WS} mast be a number, got "${h}"`);return w},configFileSelector:(f)=>{let h=f[BS];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Shared config file entry ${BS} mast be a number, got "${h}"`);return w},default:hw},ws={environmentVariableSelector:(f)=>f[dn],configFileSelector:(f)=>f[cn],default:Vh}});var zS=G(()=>{r1();wf()});var sw=(f,h)=>{let w=[];if(f)w.push(f);if(h)for(let s of h)w.push(s);return w},Ph=(f,h)=>{return`${f||"anonymous"}${h&&h.length>0?` (a.k.a. ${h.join(",")})`:""}`},ss=()=>{let f=[],h=[],w=!1,s=new Set,$=(I)=>I.sort((L,B)=>RS[B.step]-RS[L.step]||XS[B.priority||"normal"]-XS[L.priority||"normal"]),E=(I)=>{let L=!1,B=(R)=>{let K=sw(R.name,R.aliases);if(K.includes(I)){L=!0;for(let Q of K)s.delete(Q);return!1}return!0};return f=f.filter(B),h=h.filter(B),L},U=(I)=>{let L=!1,B=(R)=>{if(R.middleware===I){L=!0;for(let K of sw(R.name,R.aliases))s.delete(K);return!1}return!0};return f=f.filter(B),h=h.filter(B),L},T=(I)=>{return f.forEach((L)=>{I.add(L.middleware,{...L})}),h.forEach((L)=>{I.addRelativeTo(L.middleware,{...L})}),I.identifyOnResolve?.(C.identifyOnResolve()),I},F=(I)=>{let L=[];return I.before.forEach((B)=>{if(B.before.length===0&&B.after.length===0)L.push(B);else L.push(...F(B))}),L.push(I),I.after.reverse().forEach((B)=>{if(B.before.length===0&&B.after.length===0)L.push(B);else L.push(...F(B))}),L},r=(I=!1)=>{let L=[],B=[],R={};return f.forEach((Q)=>{let k={...Q,before:[],after:[]};for(let D of sw(k.name,k.aliases))R[D]=k;L.push(k)}),h.forEach((Q)=>{let k={...Q,before:[],after:[]};for(let D of sw(k.name,k.aliases))R[D]=k;B.push(k)}),B.forEach((Q)=>{if(Q.toMiddleware){let k=R[Q.toMiddleware];if(k===void 0){if(I)return;throw new Error(`${Q.toMiddleware} is not found when adding ${Ph(Q.name,Q.aliases)} middleware ${Q.relation} ${Q.toMiddleware}`)}if(Q.relation==="after")k.after.push(Q);if(Q.relation==="before")k.before.push(Q)}}),$(L).map(F).reduce((Q,k)=>{return Q.push(...k),Q},[])},C={add:(I,L={})=>{let{name:B,override:R,aliases:K}=L,Q={step:"initialize",priority:"normal",middleware:I,...L},k=sw(B,K);if(k.length>0){if(k.some((D)=>s.has(D))){if(!R)throw new Error(`Duplicate middleware name '${Ph(B,K)}'`);for(let D of k){let y=f.findIndex((I0)=>I0.name===D||I0.aliases?.some((v0)=>v0===D));if(y===-1)continue;let n=f[y];if(n.step!==Q.step||Q.priority!==n.priority)throw new Error(`"${Ph(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${Ph(B,K)}" middleware with ${Q.priority} priority in ${Q.step} step.`);f.splice(y,1)}}for(let D of k)s.add(D)}f.push(Q)},addRelativeTo:(I,L)=>{let{name:B,override:R,aliases:K}=L,Q={middleware:I,...L},k=sw(B,K);if(k.length>0){if(k.some((D)=>s.has(D))){if(!R)throw new Error(`Duplicate middleware name '${Ph(B,K)}'`);for(let D of k){let y=h.findIndex((I0)=>I0.name===D||I0.aliases?.some((v0)=>v0===D));if(y===-1)continue;let n=h[y];if(n.toMiddleware!==Q.toMiddleware||n.relation!==Q.relation)throw new Error(`"${Ph(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${Ph(B,K)}" middleware ${Q.relation} "${Q.toMiddleware}" middleware.`);h.splice(y,1)}}for(let D of k)s.add(D)}h.push(Q)},clone:()=>T(ss()),use:(I)=>{I.applyToStack(C)},remove:(I)=>{if(typeof I==="string")return E(I);else return U(I)},removeByTag:(I)=>{let L=!1,B=(R)=>{let{tags:K,name:Q,aliases:k}=R;if(K&&K.includes(I)){let D=sw(Q,k);for(let y of D)s.delete(y);return L=!0,!1}return!0};return f=f.filter(B),h=h.filter(B),L},concat:(I)=>{let L=T(ss());return L.use(I),L.identifyOnResolve(w||L.identifyOnResolve()||(I.identifyOnResolve?.()??!1)),L},applyToStack:T,identify:()=>{return r(!0).map((I)=>{let L=I.step??I.relation+" "+I.toMiddleware;return Ph(I.name,I.aliases)+" - "+L})},identifyOnResolve(I){if(typeof I==="boolean")w=I;return w},resolve:(I,L)=>{for(let B of r().map((R)=>R.middleware).reverse())I=B(I,L);if(w)console.log(C.identify());return I}};return C},RS,XS;var SS=G(()=>{RS={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},XS={high:3,normal:2,low:1}});var P3=G(()=>{SS()});class $w{constructor(f){this.config=f,this.middlewareStack=ss()}send(f,h,w){let s=typeof h!=="function"?h:void 0,$=typeof h==="function"?h:w,E=s===void 0&&this.config.cacheMiddleware===!0,U;if(E){if(!this.handlers)this.handlers=new WeakMap;let T=this.handlers;if(T.has(f.constructor))U=T.get(f.constructor);else U=f.resolveMiddleware(this.middlewareStack,this.config,s),T.set(f.constructor,U)}else delete this.handlers,U=f.resolveMiddleware(this.middlewareStack,this.config,s);if($)U(f).then((T)=>$(null,T.output),(T)=>$(T)).catch(()=>{});else return U(f).then((T)=>T.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var YS=G(()=>{P3()});var G1;var QS=G(()=>{G1=Y(qw(),1)});class A{constructor(){this.middlewareStack=ss()}static classBuilder(){return new MS}resolveMiddlewareWithContext(f,h,w,{middlewareFn:s,clientName:$,commandName:E,inputFilterSensitiveLog:U,outputFilterSensitiveLog:T,smithyContext:F,additionalContext:r,CommandCtor:C}){for(let K of s.bind(this)(C,f,h,w))this.middlewareStack.use(K);let I=f.concat(this.middlewareStack),{logger:L}=h,B={logger:L,clientName:$,commandName:E,inputFilterSensitiveLog:U,outputFilterSensitiveLog:T,[KS.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...r},{requestHandler:R}=h;return I.resolve((K)=>R.handle(K.request,w||{}),B)}}class MS{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,h,w={}){return this._smithyContext={service:f,operation:h,...w},this}c(f={}){return this._additionalContext=f,this}n(f,h){return this._clientName=f,this._commandName=h,this}f(f=(w)=>w,h=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=h,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){let f=this,h;return h=class extends A{static getEndpointParameterInstructions(){return f._ep}constructor(...[w]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=w??{},f._init(this)}resolveMiddleware(w,s,$){return this.resolveMiddlewareWithContext(w,s,$,{CommandCtor:h,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}}}}var KS;var ZS=G(()=>{P3();KS=Y(F1(),1)});var T0="***SensitiveInformation***";var $s=(f,h)=>{for(let w of Object.keys(f)){let s=f[w],$=async function(U,T,F){let r=new s(U);if(typeof T==="function")this.send(r,T);else if(typeof F==="function"){if(typeof T!=="object")throw new Error(`Expected http options but got ${typeof T}`);this.send(r,T||{},F)}else return this.send(r,T)},E=(w[0].toLowerCase()+w.slice(1)).replace(/Command$/,"");h.prototype[E]=$}};var n0=(f)=>{switch(f){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${f}"`)}},Hh=(f)=>{if(f===null||f===void 0)return;if(typeof f==="number"){if(f===0||f===1)RE.warn(zE(`Expected boolean, got ${typeof f}: ${f}`));if(f===0)return!1;if(f===1)return!0}if(typeof f==="string"){let h=f.toLowerCase();if(h==="false"||h==="true")RE.warn(zE(`Expected boolean, got ${typeof f}: ${f}`));if(h==="false")return!1;if(h==="true")return!0}if(typeof f==="boolean")return f;throw new TypeError(`Expected boolean, got ${typeof f}: ${f}`)},S1=(f)=>{if(f===null||f===void 0)return;if(typeof f==="string"){let h=parseFloat(f);if(!Number.isNaN(h)){if(String(h)!==String(f))RE.warn(zE(`Expected number but observed string: ${f}`));return h}}if(typeof f==="number")return f;throw new TypeError(`Expected number, got ${typeof f}: ${f}`)},gn,JS=(f)=>{let h=S1(f);if(h!==void 0&&!Number.isNaN(h)&&h!==1/0&&h!==-1/0){if(Math.abs(h)>gn)throw new TypeError(`Expected 32-bit float, got ${f}`)}return h},H3=(f)=>{if(f===null||f===void 0)return;if(Number.isInteger(f)&&!Number.isNaN(f))return f;throw new TypeError(`Expected integer, got ${typeof f}: ${f}`)},VS=(f)=>N3(f,32),PS=(f)=>N3(f,16),HS=(f)=>N3(f,8),N3=(f,h)=>{let w=H3(f);if(w!==void 0&&xn(w,h)!==w)throw new TypeError(`Expected ${h}-bit integer, got ${f}`);return w},xn=(f,h)=>{switch(h){case 32:return Int32Array.of(f)[0];case 16:return Int16Array.of(f)[0];case 8:return Int8Array.of(f)[0]}},j=(f,h)=>{if(f===null||f===void 0){if(h)throw new TypeError(`Expected a non-null value for ${h}`);throw new TypeError("Expected a non-null value")}return f},g=(f)=>{if(f===null||f===void 0)return;if(typeof f==="object"&&!Array.isArray(f))return f;let h=Array.isArray(f)?"array":typeof f;throw new TypeError(`Expected object, got ${h}: ${f}`)},W=(f)=>{if(f===null||f===void 0)return;if(typeof f==="string")return f;if(["boolean","number","bigint"].includes(typeof f))return RE.warn(zE(`Expected string, got ${typeof f}: ${f}`)),String(f);throw new TypeError(`Expected string, got ${typeof f}: ${f}`)},D3=(f)=>{if(typeof f=="string")return S1(Es(f));return S1(f)},NS,DS=(f)=>{if(typeof f=="string")return JS(Es(f));return JS(f)},_n,Es=(f)=>{let h=f.match(_n);if(h===null||h[0].length!==f.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(f)},q3=(f)=>{if(typeof f=="string")return nn(f);return S1(f)},nn=(f)=>{switch(f){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${f}`)}},E1=(f)=>{if(typeof f==="string")return H3(Es(f));return H3(f)},Y0=(f)=>{if(typeof f==="string")return VS(Es(f));return VS(f)},k3=(f)=>{if(typeof f==="string")return PS(Es(f));return PS(f)},qS=(f)=>{if(typeof f==="string")return HS(Es(f));return HS(f)},zE=(f)=>{return String(new TypeError(f).stack||f).split(`
40
- `).slice(0,5).filter((h)=>!h.includes("stackTraceWarning")).join(`
41
- `)},RE;var y3=G(()=>{gn=Math.ceil(340282346638528860000000000000000000000),NS=D3,_n=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,RE={warn:console.warn}});var en,an,kS=(f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=an.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,E,U,T,F,r]=h,C=k3(j3(s)),I=Ew($,"month",1,12),L=Ew(E,"day",1,31);return yS(C,I,L,{hours:U,minutes:T,seconds:F,fractionalMilliseconds:r})},pn,g$=(f)=>{if(f===null||f===void 0)return;if(typeof f!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let h=pn.exec(f);if(!h)throw new TypeError("Invalid RFC-3339 date-time value");let[w,s,$,E,U,T,F,r,C]=h,I=k3(j3(s)),L=Ew($,"month",1,12),B=Ew(E,"day",1,31),R=yS(I,L,B,{hours:U,minutes:T,seconds:F,fractionalMilliseconds:r});if(C.toUpperCase()!="Z")R.setTime(R.getTime()-he(C));return R},pL0,oL0,uL0,Kf=(f)=>{if(f===null||f===void 0)return;let h;if(typeof f==="number")h=f;else if(typeof f==="string")h=D3(f);else if(typeof f==="object"&&f.tag===1)h=f.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(h)||h===1/0||h===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(h*1000))},yS=(f,h,w,s)=>{let $=h-1;return un(f,$,w),new Date(Date.UTC(f,$,w,Ew(s.hours,"hour",0,23),Ew(s.minutes,"minute",0,59),Ew(s.seconds,"seconds",0,60),fe(s.fractionalMilliseconds)))},on,un=(f,h,w)=>{let s=on[h];if(h===1&&tn(f))s=29;if(w>s)throw new TypeError(`Invalid day for ${en[h]} in ${f}: ${w}`)},tn=(f)=>{return f%4===0&&(f%100!==0||f%400===0)},Ew=(f,h,w,s)=>{let $=qS(j3(f));if($<w||$>s)throw new TypeError(`${h} must be between ${w} and ${s}, inclusive`);return $},fe=(f)=>{if(f===null||f===void 0)return 0;return DS("0."+f)*1000},he=(f)=>{let h=f[0],w=1;if(h=="+")w=1;else if(h=="-")w=-1;else throw new TypeError(`Offset direction, ${h}, must be "+" or "-"`);let s=Number(f.substring(1,3)),$=Number(f.substring(4,6));return w*(s*60+$)*60*1000},j3=(f)=>{let h=0;while(h<f.length-1&&f.charAt(h)==="0")h++;if(h===0)return f;return f.slice(h)};var jS=G(()=>{y3();en=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],an=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),pn=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),pL0=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$/),oL0=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$/),uL0=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})$/),on=[31,28,31,30,31,30,31,31,30,31,30,31]});var $f,l=(f,h={})=>{Object.entries(h).filter(([,s])=>s!==void 0).forEach(([s,$])=>{if(f[s]==null||f[s]==="")f[s]=$});let w=f.message||f.Message||"UnknownError";return f.message=w,delete f.Message,f};var O3=G(()=>{$f=class $f extends Error{constructor(f){super(f.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=f.name,this.$fault=f.$fault,this.$metadata=f.$metadata}static isInstance(f){if(!f)return!1;let h=f;return $f.prototype.isPrototypeOf(h)||Boolean(h.$fault)&&Boolean(h.$metadata)&&(h.$fault==="client"||h.$fault==="server")}static[Symbol.hasInstance](f){if(!f)return!1;let h=f;if(this===$f)return $f.isInstance(f);if($f.isInstance(f)){if(h.name&&this.name)return this.prototype.isPrototypeOf(f)||h.name===this.name;return this.prototype.isPrototypeOf(f)}return!1}}});var we=({output:f,parsedBody:h,exceptionCtor:w,errorCode:s})=>{let $=se(f),E=$.httpStatusCode?$.httpStatusCode+"":void 0,U=new w({name:h?.code||h?.Code||s||E||"UnknownError",$fault:"client",$metadata:$});throw l(U,h)},Us=(f)=>{return({output:h,parsedBody:w,errorCode:s})=>{we({output:h,parsedBody:w,exceptionCtor:f,errorCode:s})}},se=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var OS=G(()=>{O3()});var Ts=(f)=>{switch(f){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 lS=!1,Fs=(f)=>{if(f&&!lS&&parseInt(f.substring(1,f.indexOf(".")))<16)lS=!0};var $e;var vS=G(()=>{$e=Y(qw(),1)});var l3,bS=(f)=>{let h=[];for(let w in l3.AlgorithmId){let s=l3.AlgorithmId[w];if(f[s]===void 0)continue;h.push({algorithmId:()=>s,checksumConstructor:()=>f[s]})}return{addChecksumAlgorithm(w){h.push(w)},checksumAlgorithms(){return h}}},mS=(f)=>{let h={};return f.checksumAlgorithms().forEach((w)=>{h[w.algorithmId()]=w.checksumConstructor()}),h};var dS=G(()=>{l3=Y(F1(),1)});var iS=(f)=>{return{setRetryStrategy(h){f.retryStrategy=h},retryStrategy(){return f.retryStrategy}}},cS=(f)=>{let h={};return h.retryStrategy=f.retryStrategy(),h};var rs=(f)=>{return Object.assign(bS(f),iS(f))},Cs=(f)=>{return Object.assign(mS(f),cS(f))};var gS=G(()=>{dS()});var xS=G(()=>{gS()});var G0=(f)=>Array.isArray(f)?f:[f];var x$=(f)=>{return f!=null};var Is=function f(h){return Object.assign(new String(h),{deserializeJSON(){return JSON.parse(String(h))},toString(){return String(h)},toJSON(){return String(h)}})};var _S=G(()=>{Is.from=(f)=>{if(f&&typeof f==="object"&&(f instanceof Is||("deserializeJSON"in f)))return f;else if(typeof f==="string"||Object.getPrototypeOf(f)===String.prototype)return Is(String(f));return Is(JSON.stringify(f))};Is.fromObject=Is.from});class nf{trace(){}debug(){}info(){}warn(){}error(){}}function S(f,h,w){let s,$,E;if(typeof h==="undefined"&&typeof w==="undefined")s={},E=f;else if(s=f,typeof h==="function")return $=h,E=w,Ee(s,$,E);else E=h;for(let U of Object.keys(E)){if(!Array.isArray(E[U])){s[U]=E[U];continue}nS(s,null,E,U)}return s}var H0=(f,h)=>{let w={};for(let s in h)nS(w,f,h,s);return w},Ee=(f,h,w)=>{return S(f,Object.entries(w).reduce((s,[$,E])=>{if(Array.isArray(E))s[$]=E;else if(typeof E==="function")s[$]=[h,E()];else s[$]=[h,E];return s},{}))},nS=(f,h,w,s)=>{if(h!==null){let U=w[s];if(typeof U==="function")U=[,U];let[T=Ue,F=Te,r=s]=U;if(typeof T==="function"&&T(h[r])||typeof T!=="function"&&!!T)f[s]=F(h[r]);return}let[$,E]=w[s];if(typeof E==="function"){let U,T=$===void 0&&(U=E())!=null,F=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(T)f[s]=U;else if(F)f[s]=E()}else{let U=$===void 0&&E!=null,T=typeof $==="function"&&!!$(E)||typeof $!=="function"&&!!$;if(U||T)f[s]=E}},Ue=(f)=>f!=null,Te=(f)=>f;var Fe;var eS=G(()=>{Fe=Y(qw(),1)});var aS=(f)=>{if(f!==f)return"NaN";switch(f){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return f}};var v=(f)=>{if(f==null)return{};if(Array.isArray(f))return f.filter((h)=>h!=null).map(v);if(typeof f==="object"){let h={};for(let w of Object.keys(f)){if(f[w]==null)continue;h[w]=v(f[w])}return h}return f};var J=G(()=>{YS();QS();ZS();jS();OS();O3();vS();xS();_S();y3();eS()});import{Readable as re}from"node:stream";var pS=(f)=>f?.body instanceof re||typeof ReadableStream!=="undefined"&&f?.body instanceof ReadableStream;var oS=()=>{};var Ce=(f)=>(h,w)=>async(s)=>{let $=await f.retryStrategy(),E=await f.maxAttempts();if(Ie($)){$=$;let U=await $.acquireInitialRetryToken(w.partition_id),T=new Error,F=0,r=0,{request:C}=s,I=_0.isInstance(C);if(I)C.headers[LE]=CS();while(!0)try{if(I)C.headers[GE]=`attempt=${F+1}; max=${E}`;let{response:L,output:B}=await h(s);return $.recordSuccess(U),B.$metadata.attempts=F+1,B.$metadata.totalRetryDelay=r,{response:L,output:B}}catch(L){let B=Le(L);if(T=J3(L),I&&pS(C))throw(w.logger instanceof nf?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),T;try{U=await $.refreshRetryTokenForRetry(U,B)}catch(K){if(!T.$metadata)T.$metadata={};throw T.$metadata.attempts=F+1,T.$metadata.totalRetryDelay=r,T}F=U.getRetryCount();let R=U.getRetryDelay();r+=R,await new Promise((K)=>setTimeout(K,R))}}else{if($=$,$?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(h,s)}},Ie=(f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined",Le=(f)=>{let h={error:f,errorType:Ge(f)},w=Be(f.$response);if(w)h.retryAfterHint=w;return h},Ge=(f)=>{if(ow(f))return"THROTTLING";if(b$(f))return"TRANSIENT";if(CX(f))return"SERVER_ERROR";return"CLIENT_ERROR"},We,Ls=(f)=>({applyToStack:(h)=>{h.add(Ce(f),We)}}),Be=(f)=>{if(!xh.isInstance(f))return;let h=Object.keys(f.headers).find((E)=>E.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return new Date(s*1000);return new Date(w)};var uS=G(()=>{r1();m$();J();wf();IS();oS();We={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var Uw=G(()=>{GS();V3();AS();M3();zS();Z3();uS()});var EY,XE="AWS_ACCESS_KEY_ID",SE="AWS_SECRET_ACCESS_KEY",UY="AWS_SESSION_TOKEN",TY="AWS_CREDENTIAL_EXPIRATION",FY="AWS_CREDENTIAL_SCOPE",rY="AWS_ACCOUNT_ID",v3=(f)=>async()=>{f?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let h=process.env[XE],w=process.env[SE],s=process.env[UY],$=process.env[TY],E=process.env[FY],U=process.env[rY];if(h&&w){let T={accessKeyId:h,secretAccessKey:w,...s&&{sessionToken:s},...$&&{expiration:new Date($)},...E&&{credentialScope:E},...U&&{accountId:U}};return EY.setCredentialFeature(T,"CREDENTIALS_ENV_VARS","g"),T}throw new a("Unable to find environment variable credentials.",{logger:f?.logger})};var CY=G(()=>{EY=Y(C1(),1);S0()});var IY={};Ch(IY,{fromEnv:()=>v3,ENV_SESSION:()=>UY,ENV_SECRET:()=>SE,ENV_KEY:()=>XE,ENV_EXPIRATION:()=>TY,ENV_CREDENTIAL_SCOPE:()=>FY,ENV_ACCOUNT_ID:()=>rY});var b3=G(()=>{CY()});import{Buffer as Re}from"node:buffer";import{request as Xe}from"node:http";function Nh(f){return new Promise((h,w)=>{let s=Xe({method:"GET",...f,hostname:f.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{w(Object.assign(new q1("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{w(new q1("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:E=400}=$;if(E<200||300<=E)w(Object.assign(new q1("Error response received from instance metadata service"),{statusCode:E})),s.destroy();let U=[];$.on("data",(T)=>{U.push(T)}),$.on("end",()=>{h(Re.concat(U)),s.destroy()})}),s.end()})}var YE=G(()=>{S0()});var QE=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.AccessKeyId==="string"&&typeof f.SecretAccessKey==="string"&&typeof f.Token==="string"&&typeof f.Expiration==="string",KE=(f)=>({accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.Token,expiration:new Date(f.Expiration),...f.AccountId&&{accountId:f.AccountId}});var Se=1000,Ye=0,_$=({maxRetries:f=0,timeout:h=1000})=>({maxRetries:f,timeout:h});var n$=(f,h)=>{let w=f();for(let s=0;s<h;s++)w=w.catch(f);return w};import{parse as Qe}from"node:url";var ME="AWS_CONTAINER_CREDENTIALS_FULL_URI",ZE="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",m3="AWS_CONTAINER_AUTHORIZATION_TOKEN",Ke=(f={})=>{let{timeout:h,maxRetries:w}=_$(f);return()=>n$(async()=>{let s=await Pe({logger:f.logger}),$=JSON.parse(await Me(h,s));if(!QE($))throw new a("Invalid response received from instance metadata service.",{logger:f.logger});return KE($)},w)},Me=async(f,h)=>{if(process.env[m3])h.headers={...h.headers,Authorization:process.env[m3]};return(await Nh({...h,timeout:f})).toString()},Ze="169.254.170.2",Je,Ve,Pe=async({logger:f})=>{if(process.env[ZE])return{hostname:Ze,path:process.env[ZE]};if(process.env[ME]){let h=Qe(process.env[ME]);if(!h.hostname||!(h.hostname in Je))throw new a(`${h.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:f});if(!h.protocol||!(h.protocol in Ve))throw new a(`${h.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:f});return{...h,port:h.port?parseInt(h.port,10):void 0}}throw new a(`The container metadata credential provider cannot be used unless the ${ZE} or ${ME} environment variable is set`,{tryNextLink:!1,logger:f})};var LY=G(()=>{S0();YE();Je={localhost:!0,"127.0.0.1":!0},Ve={"http:":!0,"https:":!0}});var JE;var GY=G(()=>{S0();JE=class JE extends a{constructor(f,h=!0){super(f,h);this.tryNextLink=h,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,JE.prototype)}}});var Tw;var d3=G(()=>{(function(f){f.IPv4="http://169.254.169.254",f.IPv6="http://[fd00:ec2::254]"})(Tw||(Tw={}))});var WY;var BY=G(()=>{WY={environmentVariableSelector:(f)=>f.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(f)=>f.ec2_metadata_service_endpoint,default:void 0}});var Dh;var i3=G(()=>{(function(f){f.IPv4="IPv4",f.IPv6="IPv6"})(Dh||(Dh={}))});var He="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",Ne="ec2_metadata_service_endpoint_mode",AY;var zY=G(()=>{i3();AY={environmentVariableSelector:(f)=>f[He],configFileSelector:(f)=>f[Ne],default:Dh.IPv4}});var VE=async()=>j1(await De()||await qe()),De=async()=>A0(WY)(),qe=async()=>{let f=await A0(AY)();switch(f){case Dh.IPv4:return Tw.IPv4;case Dh.IPv6:return Tw.IPv6;default:throw new Error(`Unsupported endpoint mode: ${f}. Select from ${Object.values(Dh)}`)}};var c3=G(()=>{Jh();aw();d3();BY();i3();zY()});var g3=(f,h)=>{let w=300+Math.floor(Math.random()*300),s=new Date(Date.now()+w*1000);h.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(s)}.
42
- For more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);let $=f.originalExpiration??f.expiration;return{...f,...$?{originalExpiration:$}:{},expiration:s}};var RY=(f,h={})=>{let w=h?.logger||console,s;return async()=>{let $;try{if($=await f(),$.expiration&&$.expiration.getTime()<Date.now())$=g3($,w)}catch(E){if(s)w.warn("Credential renew failed: ",E),$=g3(s,w);else throw E}return s=$,$}};var XY=()=>{};var QY="/latest/meta-data/iam/security-credentials/",ke="/latest/api/token",x3="AWS_EC2_METADATA_V1_DISABLED",SY="ec2_metadata_v1_disabled",YY="x-aws-ec2-metadata-token",ye=(f={})=>RY(je(f),{logger:f.logger}),je=(f={})=>{let h=!1,{logger:w,profile:s}=f,{timeout:$,maxRetries:E}=_$(f),U=async(T,F)=>{if(h||F.headers?.[YY]==null){let I=!1,L=!1,B=await A0({environmentVariableSelector:(R)=>{let K=R[x3];if(L=!!K&&K!=="false",K===void 0)throw new a(`${x3} not set in env, checking config file next.`,{logger:f.logger});return L},configFileSelector:(R)=>{let K=R[SY];return I=!!K&&K!=="false",I},default:!1},{profile:s})();if(f.ec2MetadataV1Disabled||B){let R=[];if(f.ec2MetadataV1Disabled)R.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(I)R.push(`config file profile (${SY})`);if(L)R.push(`process environment variable (${x3})`);throw new JE(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${R.join(", ")}].`)}}let C=(await n$(async()=>{let I;try{I=await le(F)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},T)).trim();return n$(async()=>{let I;try{I=await ve(C,F,f)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},T)};return async()=>{let T=await VE();if(h)return w?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),U(E,{...T,timeout:$});else{let F;try{F=(await Oe({...T,timeout:$})).toString()}catch(r){if(r?.statusCode===400)throw Object.assign(r,{message:"EC2 Metadata token request returned error"});else if(r.message==="TimeoutError"||[403,404,405].includes(r.statusCode))h=!0;return w?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),U(E,{...T,timeout:$})}return U(E,{...T,headers:{[YY]:F},timeout:$})}}},Oe=async(f)=>Nh({...f,path:ke,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),le=async(f)=>(await Nh({...f,path:QY})).toString(),ve=async(f,h,w)=>{let s=JSON.parse((await Nh({...h,path:QY+f})).toString());if(!QE(s))throw new a("Invalid response received from instance metadata service.",{logger:w.logger});return KE(s)};var KY=G(()=>{Jh();S0();GY();YE();c3();XY()});var MY=()=>{};var e$={};Ch(e$,{providerConfigFromInit:()=>_$,httpRequest:()=>Nh,getInstanceMetadataEndpoint:()=>VE,fromInstanceMetadata:()=>ye,fromContainerMetadata:()=>Ke,Endpoint:()=>Tw,ENV_CMDS_RELATIVE_URI:()=>ZE,ENV_CMDS_FULL_URI:()=>ME,ENV_CMDS_AUTH_TOKEN:()=>m3,DEFAULT_TIMEOUT:()=>Se,DEFAULT_MAX_RETRIES:()=>Ye});var a$=G(()=>{LY();KY();MY();YE();c3();d3()});var p$=(f)=>encodeURIComponent(f).replace(/[!'()*]/g,be),be=(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`;var ZY=()=>{};var JY=G(()=>{ZY()});function _3(f){let h=[];for(let w of Object.keys(f).sort()){let s=f[w];if(w=p$(w),Array.isArray(s))for(let $=0,E=s.length;$<E;$++)h.push(`${w}=${p$(s[$])}`);else{let $=w;if(s||typeof s==="string")$+=`=${p$(s)}`;h.push($)}}return h.join("&")}var n3=G(()=>{JY()});var VY;var PY=G(()=>{VY=["ECONNRESET","EPIPE","ETIMEDOUT"]});var e3=(f)=>{let h={};for(let w of Object.keys(f)){let s=f[w];h[w]=Array.isArray(s)?s.join(","):s}return h};var a3=()=>{};var e0;var Gs=G(()=>{e0={setTimeout:(f,h)=>setTimeout(f,h),clearTimeout:(f)=>clearTimeout(f)}});var HY=1000,NY=(f,h,w=0)=>{if(!w)return-1;let s=($)=>{let E=e0.setTimeout(()=>{f.destroy(),h(Object.assign(new Error(`Socket timed out without establishing a connection within ${w} ms`),{name:"TimeoutError"}))},w-$),U=(T)=>{if(T?.connecting)T.on("connect",()=>{e0.clearTimeout(E)});else e0.clearTimeout(E)};if(f.socket)U(f.socket);else f.on("socket",U)};if(w<2000)return s(0),0;return e0.setTimeout(s.bind(null,HY),HY)};var DY=G(()=>{Gs()});var me=3000,qY=(f,{keepAlive:h,keepAliveMsecs:w},s=me)=>{if(h!==!0)return-1;let $=()=>{if(f.socket)f.socket.setKeepAlive(h,w||0);else f.on("socket",(E)=>{E.setKeepAlive(h,w||0)})};if(s===0)return $(),0;return e0.setTimeout($,s)};var kY=G(()=>{Gs()});var yY=3000,jY=(f,h,w=lY)=>{let s=($)=>{let E=w-$,U=()=>{f.destroy(),h(Object.assign(new Error(`Connection timed out after ${w} ms`),{name:"TimeoutError"}))};if(f.socket)f.socket.setTimeout(E,U),f.on("close",()=>f.socket?.removeListener("timeout",U));else f.setTimeout(E,U)};if(0<w&&w<6000)return s(0),0;return e0.setTimeout(s.bind(null,w===0?0:yY),yY)};var OY=G(()=>{p3();Gs()});import{Readable as de}from"node:stream";async function o3(f,h,w=vY){let s=h.headers??{},$=s.Expect||s.expect,E=-1,U=!0;if($==="100-continue")U=await Promise.race([new Promise((T)=>{E=Number(e0.setTimeout(()=>T(!0),Math.max(vY,w)))}),new Promise((T)=>{f.on("continue",()=>{e0.clearTimeout(E),T(!0)}),f.on("response",()=>{e0.clearTimeout(E),T(!1)}),f.on("error",()=>{e0.clearTimeout(E),T(!1)})})]);if(U)ie(f,h.body)}function ie(f,h){if(h instanceof de){h.pipe(f);return}if(h){if(Buffer.isBuffer(h)||typeof h==="string"){f.end(h);return}let w=h;if(typeof w==="object"&&w.buffer&&typeof w.byteOffset==="number"&&typeof w.byteLength==="number"){f.end(Buffer.from(w.buffer,w.byteOffset,w.byteLength));return}f.end(Buffer.from(h));return}f.end()}var vY=6000;var u3=G(()=>{Gs()});import{Agent as bY,request as ce}from"node:http";import{Agent as mY,request as ge}from"node:https";class Ef{static create(f){if(typeof f?.handle==="function")return f;return new Ef(f)}static checkSocketUsage(f,h,w=console){let{sockets:s,requests:$,maxSockets:E}=f;if(typeof E!=="number"||E===1/0)return h;let U=15000;if(Date.now()-U<h)return h;if(s&&$)for(let T in s){let F=s[T]?.length??0,r=$[T]?.length??0;if(F>=E&&r>=2*E)return w?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${F} and ${r} additional requests are enqueued.
43
- See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
44
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return h}constructor(f){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((h,w)=>{if(typeof f==="function")f().then((s)=>{h(this.resolveDefaultConfig(s))}).catch(w);else h(this.resolveDefaultConfig(f))})}resolveDefaultConfig(f){let{requestTimeout:h,connectionTimeout:w,socketTimeout:s,socketAcquisitionWarningTimeout:$,httpAgent:E,httpsAgent:U}=f||{},T=!0,F=50;return{connectionTimeout:w,requestTimeout:h??s,socketAcquisitionWarningTimeout:$,httpAgent:(()=>{if(E instanceof bY||typeof E?.destroy==="function")return E;return new bY({keepAlive:!0,maxSockets:50,...E})})(),httpsAgent:(()=>{if(U instanceof mY||typeof U?.destroy==="function")return U;return new mY({keepAlive:!0,maxSockets:50,...U})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(f,{abortSignal:h}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,s)=>{let $=void 0,E=[],U=async(D)=>{await $,E.forEach(e0.clearTimeout),w(D)},T=async(D)=>{await $,E.forEach(e0.clearTimeout),s(D)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(h?.aborted){let D=new Error("Request aborted");D.name="AbortError",T(D);return}let F=f.protocol==="https:",r=F?this.config.httpsAgent:this.config.httpAgent;E.push(e0.setTimeout(()=>{this.socketWarningTimestamp=Ef.checkSocketUsage(r,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let C=_3(f.query||{}),I=void 0;if(f.username!=null||f.password!=null){let D=f.username??"",y=f.password??"";I=`${D}:${y}`}let L=f.path;if(C)L+=`?${C}`;if(f.fragment)L+=`#${f.fragment}`;let B=f.hostname??"";if(B[0]==="["&&B.endsWith("]"))B=f.hostname.slice(1,-1);else B=f.hostname;let R={headers:f.headers,host:B,method:f.method,path:L,port:f.port,agent:r,auth:I},Q=(F?ge:ce)(R,(D)=>{let y=new xh({statusCode:D.statusCode||-1,reason:D.statusMessage,headers:e3(D.headers),body:D});U({response:y})});if(Q.on("error",(D)=>{if(VY.includes(D.code))T(Object.assign(D,{name:"TimeoutError"}));else T(D)}),h){let D=()=>{Q.destroy();let y=new Error("Request aborted");y.name="AbortError",T(y)};if(typeof h.addEventListener==="function"){let y=h;y.addEventListener("abort",D,{once:!0}),Q.once("close",()=>y.removeEventListener("abort",D))}else h.onabort=D}E.push(NY(Q,T,this.config.connectionTimeout)),E.push(jY(Q,T,this.config.requestTimeout));let k=R.agent;if(typeof k==="object"&&"keepAlive"in k)E.push(qY(Q,{keepAlive:k.keepAlive,keepAliveMsecs:k.keepAliveMsecs}));$=o3(Q,f,this.config.requestTimeout).catch((D)=>{return E.forEach(e0.clearTimeout),s(D)})})}updateHttpClientConfig(f,h){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[f]:h}})}httpHandlerConfigs(){return this.config??{}}}var lY=0;var p3=G(()=>{r1();n3();PY();a3();DY();kY();OY();Gs();u3()});var dY=()=>{};var iY=G(()=>{dY()});var cY=G(()=>{r1();n3();a3();iY();u3()});import{Writable as xe}from"node:stream";var t3;var gY=G(()=>{t3=class t3 extends xe{constructor(){super(...arguments);this.bufferedBytes=[]}_write(f,h,w){this.bufferedBytes.push(f),w()}}});async function ne(f){let h=[],w=f.getReader(),s=!1,$=0;while(!s){let{done:T,value:F}=await w.read();if(F)h.push(F),$+=F.length;s=T}let E=new Uint8Array($),U=0;for(let T of h)E.set(T,U),U+=T.length;return E}var Ws=(f)=>{if(_e(f))return ne(f);return new Promise((h,w)=>{let s=new t3;f.pipe(s),f.on("error",($)=>{s.end(),w($)}),s.on("error",w),s.on("finish",function(){let $=new Uint8Array(Buffer.concat(this.bufferedBytes));h($)})})},_e=(f)=>typeof ReadableStream==="function"&&f instanceof ReadableStream;var xY=G(()=>{gY()});var o$=G(()=>{p3();cY();xY()});var ee="169.254.170.2",ae="169.254.170.23",pe="[fd00:ec2::23]",_Y=(f,h)=>{if(f.protocol==="https:")return;if(f.hostname===ee||f.hostname===ae||f.hostname===pe)return;if(f.hostname.includes("[")){if(f.hostname==="[::1]"||f.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(f.hostname==="localhost")return;let w=f.hostname.split("."),s=($)=>{let E=parseInt($,10);return 0<=E&&E<=255};if(w[0]==="127"&&s(w[1])&&s(w[2])&&s(w[3])&&w.length===4)return}throw new a(`URL not accepted. It must either be HTTPS or match one of the following:
45
- - loopback CIDR 127.0.0.0/8 or [::1/128]
46
- - ECS container host 169.254.170.2
47
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:h})};var nY=G(()=>{S0()});function aY(f){return new _0({protocol:f.protocol,hostname:f.hostname,port:Number(f.port),path:f.pathname,query:Array.from(f.searchParams.entries()).reduce((h,[w,s])=>{return h[w]=s,h},{}),fragment:f.hash})}async function pY(f,h){let s=await eY.sdkStreamMixin(f.body).transformToString();if(f.statusCode===200){let $=JSON.parse(s);if(typeof $.AccessKeyId!=="string"||typeof $.SecretAccessKey!=="string"||typeof $.Token!=="string"||typeof $.Expiration!=="string")throw new a("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:h});return{accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.Token,expiration:kS($.Expiration)}}if(f.statusCode>=400&&f.statusCode<500){let $={};try{$=JSON.parse(s)}catch(E){}throw Object.assign(new a(`Server responded with status: ${f.statusCode}`,{logger:h}),{Code:$.Code,Message:$.Message})}throw new a(`Server responded with status: ${f.statusCode}`,{logger:h})}var eY;var oY=G(()=>{S0();r1();J();eY=Y(tT(),1)});var uY=(f,h,w)=>{return async()=>{for(let s=0;s<h;++s)try{return await f()}catch($){await new Promise((E)=>setTimeout(E,w))}return await f()}};import oe from"node:fs/promises";var tY,ue="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",te="http://169.254.170.2",fa="AWS_CONTAINER_CREDENTIALS_FULL_URI",ha="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",wa="AWS_CONTAINER_AUTHORIZATION_TOKEN",f9=(f={})=>{f.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let h,w=f.awsContainerCredentialsRelativeUri??process.env[ue],s=f.awsContainerCredentialsFullUri??process.env[fa],$=f.awsContainerAuthorizationToken??process.env[wa],E=f.awsContainerAuthorizationTokenFile??process.env[ha],U=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console.warn:f.logger.warn;if(w&&s)U("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),U("awsContainerCredentialsFullUri will take precedence.");if($&&E)U("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),U("awsContainerAuthorizationToken will take precedence.");if(s)h=s;else if(w)h=`${te}${w}`;else throw new a(`No HTTP credential provider host provided.
48
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:f.logger});let T=new URL(h);_Y(T,f.logger);let F=new Ef({requestTimeout:f.timeout??1000,connectionTimeout:f.timeout??1000});return uY(async()=>{let r=aY(T);if($)r.headers.Authorization=$;else if(E)r.headers.Authorization=(await oe.readFile(E)).toString();try{let C=await F.handle(r);return pY(C.response).then((I)=>tY.setCredentialFeature(I,"CREDENTIALS_HTTP","z"))}catch(C){throw new a(String(C),{logger:f.logger})}},f.maxRetries??3,f.timeout??1000)};var h9=G(()=>{tY=Y(C1(),1);o$();S0();nY();oY()});var f8={};Ch(f8,{fromHttp:()=>f9});var h8=G(()=>{h9()});var w8=(f)=>f&&(typeof f.sso_start_url==="string"||typeof f.sso_account_id==="string"||typeof f.sso_session==="string"||typeof f.sso_region==="string"||typeof f.sso_role_name==="string");var $9=300000,Bs="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var s8=H((kA0,r9)=>{var{defineProperty:HE,getOwnPropertyDescriptor:sa,getOwnPropertyNames:$a}=Object,Ea=Object.prototype.hasOwnProperty,PE=(f,h)=>HE(f,"name",{value:h,configurable:!0}),Ua=(f,h)=>{for(var w in h)HE(f,w,{get:h[w],enumerable:!0})},Ta=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of $a(h))if(!Ea.call(f,$)&&$!==w)HE(f,$,{get:()=>h[$],enumerable:!(s=sa(h,$))||s.enumerable})}return f},Fa=(f)=>Ta(HE({},"__esModule",{value:!0}),f),E9={};Ua(E9,{getHostHeaderPlugin:()=>Ca,hostHeaderMiddleware:()=>T9,hostHeaderMiddlewareOptions:()=>F9,resolveHostHeaderConfig:()=>U9});r9.exports=Fa(E9);var ra=u0();function U9(f){return f}PE(U9,"resolveHostHeaderConfig");var T9=PE((f)=>(h)=>async(w)=>{if(!ra.HttpRequest.isInstance(w.request))return h(w);let{request:s}=w,{handlerProtocol:$=""}=f.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let E=s.hostname;if(s.port!=null)E+=`:${s.port}`;s.headers.host=E}return h(w)},"hostHeaderMiddleware"),F9={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Ca=PE((f)=>({applyToStack:PE((h)=>{h.add(T9(f),F9)},"applyToStack")}),"getHostHeaderPlugin")});var E8=H((yA0,G9)=>{var{defineProperty:NE,getOwnPropertyDescriptor:Ia,getOwnPropertyNames:La}=Object,Ga=Object.prototype.hasOwnProperty,$8=(f,h)=>NE(f,"name",{value:h,configurable:!0}),Wa=(f,h)=>{for(var w in h)NE(f,w,{get:h[w],enumerable:!0})},Ba=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of La(h))if(!Ga.call(f,$)&&$!==w)NE(f,$,{get:()=>h[$],enumerable:!(s=Ia(h,$))||s.enumerable})}return f},Aa=(f)=>Ba(NE({},"__esModule",{value:!0}),f),C9={};Wa(C9,{getLoggerPlugin:()=>za,loggerMiddleware:()=>I9,loggerMiddlewareOptions:()=>L9});G9.exports=Aa(C9);var I9=$8(()=>(f,h)=>async(w)=>{try{let s=await f(w),{clientName:$,commandName:E,logger:U,dynamoDbDocumentClientOptions:T={}}=h,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:r}=T,C=F??h.inputFilterSensitiveLog,I=r??h.outputFilterSensitiveLog,{$metadata:L,...B}=s.output;return U?.info?.({clientName:$,commandName:E,input:C(w.input),output:I(B),metadata:L}),s}catch(s){let{clientName:$,commandName:E,logger:U,dynamoDbDocumentClientOptions:T={}}=h,{overrideInputFilterSensitiveLog:F}=T,r=F??h.inputFilterSensitiveLog;throw U?.error?.({clientName:$,commandName:E,input:r(w.input),error:s,metadata:s.$metadata}),s}},"loggerMiddleware"),L9={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},za=$8((f)=>({applyToStack:$8((h)=>{h.add(I9(),L9)},"applyToStack")}),"getLoggerPlugin")});var T8=H((jA0,z9)=>{var{defineProperty:qE,getOwnPropertyDescriptor:Ra,getOwnPropertyNames:Xa}=Object,Sa=Object.prototype.hasOwnProperty,DE=(f,h)=>qE(f,"name",{value:h,configurable:!0}),Ya=(f,h)=>{for(var w in h)qE(f,w,{get:h[w],enumerable:!0})},Qa=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Xa(h))if(!Sa.call(f,$)&&$!==w)qE(f,$,{get:()=>h[$],enumerable:!(s=Ra(h,$))||s.enumerable})}return f},Ka=(f)=>Qa(qE({},"__esModule",{value:!0}),f),W9={};Ya(W9,{addRecursionDetectionMiddlewareOptions:()=>A9,getRecursionDetectionPlugin:()=>Va,recursionDetectionMiddleware:()=>B9});z9.exports=Ka(W9);var Ma=u0(),U8="X-Amzn-Trace-Id",Za="AWS_LAMBDA_FUNCTION_NAME",Ja="_X_AMZN_TRACE_ID",B9=DE((f)=>(h)=>async(w)=>{let{request:s}=w;if(!Ma.HttpRequest.isInstance(s)||f.runtime!=="node")return h(w);let $=Object.keys(s.headers??{}).find((F)=>F.toLowerCase()===U8.toLowerCase())??U8;if(s.headers.hasOwnProperty($))return h(w);let E=process.env[Za],U=process.env[Ja],T=DE((F)=>typeof F==="string"&&F.length>0,"nonEmptyString");if(T(E)&&T(U))s.headers[U8]=U;return h({...w,request:s})},"recursionDetectionMiddleware"),A9={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Va=DE((f)=>({applyToStack:DE((h)=>{h.add(B9(f),A9)},"applyToStack")}),"getRecursionDetectionPlugin")});var jE=H((OA0,J9)=>{var{defineProperty:kE,getOwnPropertyDescriptor:Pa,getOwnPropertyNames:Ha}=Object,Na=Object.prototype.hasOwnProperty,Q0=(f,h)=>kE(f,"name",{value:h,configurable:!0}),Da=(f,h)=>{for(var w in h)kE(f,w,{get:h[w],enumerable:!0})},qa=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ha(h))if(!Na.call(f,$)&&$!==w)kE(f,$,{get:()=>h[$],enumerable:!(s=Pa(h,$))||s.enumerable})}return f},ka=(f)=>qa(kE({},"__esModule",{value:!0}),f),R9={};Da(R9,{EndpointCache:()=>ya,EndpointError:()=>Y1,customEndpointFunctions:()=>r8,isIpAddress:()=>X9,isValidHostLabel:()=>I8,resolveEndpoint:()=>ta});J9.exports=ka(R9);var ya=class{constructor({size:f,params:h}){if(this.data=new Map,this.parameters=[],this.capacity=f??50,h)this.parameters=h}static{Q0(this,"EndpointCache")}get(f,h){let w=this.hash(f);if(w===!1)return h();if(!this.data.has(w)){if(this.data.size>this.capacity+10){let s=this.data.keys(),$=0;while(!0){let{value:E,done:U}=s.next();if(this.data.delete(E),U||++$>10)break}}this.data.set(w,h())}return this.data.get(w)}size(){return this.data.size}hash(f){let h="",{parameters:w}=this;if(w.length===0)return!1;for(let s of w){let $=String(f[s]??"");if($.includes("|;"))return!1;h+=$+"|;"}return h}},ja=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}$"),X9=Q0((f)=>ja.test(f)||f.startsWith("[")&&f.endsWith("]"),"isIpAddress"),Oa=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),I8=Q0((f,h=!1)=>{if(!h)return Oa.test(f);let w=f.split(".");for(let s of w)if(!I8(s))return!1;return!0},"isValidHostLabel"),r8={},u$="endpoints";function ef(f){if(typeof f!=="object"||f==null)return f;if("ref"in f)return`$${ef(f.ref)}`;if("fn"in f)return`${f.fn}(${(f.argv||[]).map(ef).join(", ")})`;return JSON.stringify(f,null,2)}Q0(ef,"toDebugString");var Y1=class extends Error{static{Q0(this,"EndpointError")}constructor(f){super(f);this.name="EndpointError"}},la=Q0((f,h)=>f===h,"booleanEquals"),va=Q0((f)=>{let h=f.split("."),w=[];for(let s of h){let $=s.indexOf("[");if($!==-1){if(s.indexOf("]")!==s.length-1)throw new Y1(`Path: '${f}' does not end with ']'`);let E=s.slice($+1,-1);if(Number.isNaN(parseInt(E)))throw new Y1(`Invalid array index: '${E}' in path: '${f}'`);if($!==0)w.push(s.slice(0,$));w.push(E)}else w.push(s)}return w},"getAttrPathList"),S9=Q0((f,h)=>va(h).reduce((w,s)=>{if(typeof w!=="object")throw new Y1(`Index '${s}' in '${h}' not found in '${JSON.stringify(f)}'`);else if(Array.isArray(w))return w[parseInt(s)];return w[s]},f),"getAttr"),ba=Q0((f)=>f!=null,"isSet"),ma=Q0((f)=>!f,"not"),C8=F1(),F8={[C8.EndpointURLScheme.HTTP]:80,[C8.EndpointURLScheme.HTTPS]:443},da=Q0((f)=>{let h=(()=>{try{if(f instanceof URL)return f;if(typeof f==="object"&&"hostname"in f){let{hostname:L,port:B,protocol:R="",path:K="",query:Q={}}=f,k=new URL(`${R}//${L}${B?`:${B}`:""}${K}`);return k.search=Object.entries(Q).map(([D,y])=>`${D}=${y}`).join("&"),k}return new URL(f)}catch(L){return null}})();if(!h)return console.error(`Unable to parse ${JSON.stringify(f)} as a whatwg URL.`),null;let w=h.href,{host:s,hostname:$,pathname:E,protocol:U,search:T}=h;if(T)return null;let F=U.slice(0,-1);if(!Object.values(C8.EndpointURLScheme).includes(F))return null;let r=X9($),C=w.includes(`${s}:${F8[F]}`)||typeof f==="string"&&f.includes(`${s}:${F8[F]}`),I=`${s}${C?`:${F8[F]}`:""}`;return{scheme:F,authority:I,path:E,normalizedPath:E.endsWith("/")?E:`${E}/`,isIp:r}},"parseURL"),ia=Q0((f,h)=>f===h,"stringEquals"),ca=Q0((f,h,w,s)=>{if(h>=w||f.length<w)return null;if(!s)return f.substring(h,w);return f.substring(f.length-w,f.length-h)},"substring"),ga=Q0((f)=>encodeURIComponent(f).replace(/[!*'()]/g,(h)=>`%${h.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode"),xa={booleanEquals:la,getAttr:S9,isSet:ba,isValidHostLabel:I8,not:ma,parseURL:da,stringEquals:ia,substring:ca,uriEncode:ga},Y9=Q0((f,h)=>{let w=[],s={...h.endpointParams,...h.referenceRecord},$=0;while($<f.length){let E=f.indexOf("{",$);if(E===-1){w.push(f.slice($));break}w.push(f.slice($,E));let U=f.indexOf("}",E);if(U===-1){w.push(f.slice(E));break}if(f[E+1]==="{"&&f[U+1]==="}")w.push(f.slice(E+1,U)),$=U+2;let T=f.substring(E+1,U);if(T.includes("#")){let[F,r]=T.split("#");w.push(S9(s[F],r))}else w.push(s[T]);$=U+1}return w.join("")},"evaluateTemplate"),_a=Q0(({ref:f},h)=>{return{...h.endpointParams,...h.referenceRecord}[f]},"getReferenceValue"),yE=Q0((f,h,w)=>{if(typeof f==="string")return Y9(f,w);else if(f.fn)return Q9(f,w);else if(f.ref)return _a(f,w);throw new Y1(`'${h}': ${String(f)} is not a string, function or reference.`)},"evaluateExpression"),Q9=Q0(({fn:f,argv:h},w)=>{let s=h.map((E)=>["boolean","number"].includes(typeof E)?E:yE(E,"arg",w)),$=f.split(".");if($[0]in r8&&$[1]!=null)return r8[$[0]][$[1]](...s);return xa[f](...s)},"callFunction"),na=Q0(({assign:f,...h},w)=>{if(f&&f in w.referenceRecord)throw new Y1(`'${f}' is already defined in Reference Record.`);let s=Q9(h,w);return w.logger?.debug?.(`${u$} evaluateCondition: ${ef(h)} = ${ef(s)}`),{result:s===""?!0:!!s,...f!=null&&{toAssign:{name:f,value:s}}}},"evaluateCondition"),L8=Q0((f=[],h)=>{let w={};for(let s of f){let{result:$,toAssign:E}=na(s,{...h,referenceRecord:{...h.referenceRecord,...w}});if(!$)return{result:$};if(E)w[E.name]=E.value,h.logger?.debug?.(`${u$} assign: ${E.name} := ${ef(E.value)}`)}return{result:!0,referenceRecord:w}},"evaluateConditions"),ea=Q0((f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:$.map((E)=>{let U=yE(E,"Header value entry",h);if(typeof U!=="string")throw new Y1(`Header '${s}' value '${U}' is not a string`);return U})}),{}),"getEndpointHeaders"),K9=Q0((f,h)=>{if(Array.isArray(f))return f.map((w)=>K9(w,h));switch(typeof f){case"string":return Y9(f,h);case"object":if(f===null)throw new Y1(`Unexpected endpoint property: ${f}`);return M9(f,h);case"boolean":return f;default:throw new Y1(`Unexpected endpoint property type: ${typeof f}`)}},"getEndpointProperty"),M9=Q0((f,h)=>Object.entries(f).reduce((w,[s,$])=>({...w,[s]:K9($,h)}),{}),"getEndpointProperties"),aa=Q0((f,h)=>{let w=yE(f,"Endpoint URL",h);if(typeof w==="string")try{return new URL(w)}catch(s){throw console.error(`Failed to construct URL with ${w}`,s),s}throw new Y1(`Endpoint URL must be a string, got ${typeof w}`)},"getEndpointUrl"),pa=Q0((f,h)=>{let{conditions:w,endpoint:s}=f,{result:$,referenceRecord:E}=L8(w,h);if(!$)return;let U={...h,referenceRecord:{...h.referenceRecord,...E}},{url:T,properties:F,headers:r}=s;return h.logger?.debug?.(`${u$} Resolving endpoint from template: ${ef(s)}`),{...r!=null&&{headers:ea(r,U)},...F!=null&&{properties:M9(F,U)},url:aa(T,U)}},"evaluateEndpointRule"),oa=Q0((f,h)=>{let{conditions:w,error:s}=f,{result:$,referenceRecord:E}=L8(w,h);if(!$)return;throw new Y1(yE(s,"Error",{...h,referenceRecord:{...h.referenceRecord,...E}}))},"evaluateErrorRule"),ua=Q0((f,h)=>{let{conditions:w,rules:s}=f,{result:$,referenceRecord:E}=L8(w,h);if(!$)return;return Z9(s,{...h,referenceRecord:{...h.referenceRecord,...E}})},"evaluateTreeRule"),Z9=Q0((f,h)=>{for(let w of f)if(w.type==="endpoint"){let s=pa(w,h);if(s)return s}else if(w.type==="error")oa(w,h);else if(w.type==="tree"){let s=ua(w,h);if(s)return s}else throw new Y1(`Unknown endpoint rule: ${w}`);throw new Y1("Rules evaluation failed")},"evaluateRules"),ta=Q0((f,h)=>{let{endpointParams:w,logger:s}=h,{parameters:$,rules:E}=f;h.logger?.debug?.(`${u$} Initial EndpointParams: ${ef(w)}`);let U=Object.entries($).filter(([,r])=>r.default!=null).map(([r,C])=>[r,C.default]);if(U.length>0)for(let[r,C]of U)w[r]=w[r]??C;let T=Object.entries($).filter(([,r])=>r.required).map(([r])=>r);for(let r of T)if(w[r]==null)throw new Y1(`Missing required parameter: '${r}'`);let F=Z9(E,{endpointParams:w,logger:s,referenceRecord:{}});return h.logger?.debug?.(`${u$} Resolved endpoint: ${ef(F)}`),F},"resolveEndpoint")});var lE=H((bA0,O9)=>{var{defineProperty:OE,getOwnPropertyDescriptor:fp,getOwnPropertyNames:hp}=Object,wp=Object.prototype.hasOwnProperty,As=(f,h)=>OE(f,"name",{value:h,configurable:!0}),sp=(f,h)=>{for(var w in h)OE(f,w,{get:h[w],enumerable:!0})},$p=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of hp(h))if(!wp.call(f,$)&&$!==w)OE(f,$,{get:()=>h[$],enumerable:!(s=fp(h,$))||s.enumerable})}return f},Ep=(f)=>$p(OE({},"__esModule",{value:!0}),f),P9={};sp(P9,{ConditionObject:()=>J0.ConditionObject,DeprecatedObject:()=>J0.DeprecatedObject,EndpointError:()=>J0.EndpointError,EndpointObject:()=>J0.EndpointObject,EndpointObjectHeaders:()=>J0.EndpointObjectHeaders,EndpointObjectProperties:()=>J0.EndpointObjectProperties,EndpointParams:()=>J0.EndpointParams,EndpointResolverOptions:()=>J0.EndpointResolverOptions,EndpointRuleObject:()=>J0.EndpointRuleObject,ErrorRuleObject:()=>J0.ErrorRuleObject,EvaluateOptions:()=>J0.EvaluateOptions,Expression:()=>J0.Expression,FunctionArgv:()=>J0.FunctionArgv,FunctionObject:()=>J0.FunctionObject,FunctionReturn:()=>J0.FunctionReturn,ParameterObject:()=>J0.ParameterObject,ReferenceObject:()=>J0.ReferenceObject,ReferenceRecord:()=>J0.ReferenceRecord,RuleSetObject:()=>J0.RuleSetObject,RuleSetRules:()=>J0.RuleSetRules,TreeRuleObject:()=>J0.TreeRuleObject,awsEndpointFunctions:()=>j9,getUserAgentPrefix:()=>rp,isIpAddress:()=>J0.isIpAddress,partition:()=>k9,resolveEndpoint:()=>J0.resolveEndpoint,setPartitionInfo:()=>y9,useDefaultPartitionInfo:()=>Fp});O9.exports=Ep(P9);var J0=jE(),H9=As((f,h=!1)=>{if(h){for(let w of f.split("."))if(!H9(w))return!1;return!0}if(!J0.isValidHostLabel(f))return!1;if(f.length<3||f.length>63)return!1;if(f!==f.toLowerCase())return!1;if(J0.isIpAddress(f))return!1;return!0},"isVirtualHostableS3Bucket"),V9=":",Up="/",Tp=As((f)=>{let h=f.split(V9);if(h.length<6)return null;let[w,s,$,E,U,...T]=h;if(w!=="arn"||s===""||$===""||T.join(V9)==="")return null;let F=T.map((r)=>r.split(Up)).flat();return{partition:s,service:$,region:E,accountId:U,resourceId:F}},"parseArn"),N9={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"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)"},"mx-central-1":{description:"Mexico (Central)"},"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:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],version:"1.1"},D9=N9,q9="",k9=As((f)=>{let{partitions:h}=D9;for(let s of h){let{regions:$,outputs:E}=s;for(let[U,T]of Object.entries($))if(U===f)return{...E,...T}}for(let s of h){let{regionRegex:$,outputs:E}=s;if(new RegExp($).test(f))return{...E}}let w=h.find((s)=>s.id==="aws");if(!w)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...w.outputs}},"partition"),y9=As((f,h="")=>{D9=f,q9=h},"setPartitionInfo"),Fp=As(()=>{y9(N9,"")},"useDefaultPartitionInfo"),rp=As(()=>q9,"getUserAgentPrefix"),j9={isVirtualHostableS3Bucket:H9,parseArn:Tp,partition:k9};J0.customEndpointFunctions.aws=j9});var mE=H((mA0,e9)=>{var{defineProperty:bE,getOwnPropertyDescriptor:Cp,getOwnPropertyNames:Ip}=Object,Lp=Object.prototype.hasOwnProperty,af=(f,h)=>bE(f,"name",{value:h,configurable:!0}),Gp=(f,h)=>{for(var w in h)bE(f,w,{get:h[w],enumerable:!0})},Wp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Ip(h))if(!Lp.call(f,$)&&$!==w)bE(f,$,{get:()=>h[$],enumerable:!(s=Cp(h,$))||s.enumerable})}return f},Bp=(f)=>Wp(bE({},"__esModule",{value:!0}),f),m9={};Gp(m9,{DEFAULT_UA_APP_ID:()=>d9,getUserAgentMiddlewareOptions:()=>n9,getUserAgentPlugin:()=>Kp,resolveUserAgentConfig:()=>c9,userAgentMiddleware:()=>_9});e9.exports=Bp(m9);var Ap=b0(),d9=void 0;function i9(f){if(f===void 0)return!0;return typeof f==="string"&&f.length<=50}af(i9,"isValidUserAgentAppId");function c9(f){let h=Ap.normalizeProvider(f.userAgentAppId??d9),{customUserAgent:w}=f;return Object.assign(f,{customUserAgent:typeof w==="string"?[[w]]:w,userAgentAppId:af(async()=>{let s=await h();if(!i9(s)){let $=f.logger?.constructor?.name==="NoOpLogger"||!f.logger?console:f.logger;if(typeof s!=="string")$?.warn("userAgentAppId must be a string or undefined.");else if(s.length>50)$?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s},"userAgentAppId")})}af(c9,"resolveUserAgentConfig");var zp=lE(),Rp=u0(),Mf=j0(),Xp=/\d{12}\.ddb/;async function g9(f,h,w){if(w.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")Mf.setFeature(f,"PROTOCOL_RPC_V2_CBOR","M");if(typeof h.retryStrategy==="function"){let E=await h.retryStrategy();if(typeof E.acquireInitialRetryToken==="function")if(E.constructor?.name?.includes("Adaptive"))Mf.setFeature(f,"RETRY_MODE_ADAPTIVE","F");else Mf.setFeature(f,"RETRY_MODE_STANDARD","E");else Mf.setFeature(f,"RETRY_MODE_LEGACY","D")}if(typeof h.accountIdEndpointMode==="function"){let E=f.endpointV2;if(String(E?.url?.hostname).match(Xp))Mf.setFeature(f,"ACCOUNT_ID_ENDPOINT","O");switch(await h.accountIdEndpointMode?.()){case"disabled":Mf.setFeature(f,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Mf.setFeature(f,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Mf.setFeature(f,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let $=f.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){let E=$;if(E.accountId)Mf.setFeature(f,"RESOLVED_ACCOUNT_ID","T");for(let[U,T]of Object.entries(E.$source??{}))Mf.setFeature(f,U,T)}}af(g9,"checkFeatures");var l9="user-agent",G8="x-amz-user-agent",v9=" ",W8="/",Sp=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Yp=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,b9="-",Qp=1024;function x9(f){let h="";for(let w in f){let s=f[w];if(h.length+s.length+1<=Qp){if(h.length)h+=","+s;else h+=s;continue}break}return h}af(x9,"encodeFeatures");var _9=af((f)=>(h,w)=>async(s)=>{let{request:$}=s;if(!Rp.HttpRequest.isInstance($))return h(s);let{headers:E}=$,U=w?.userAgent?.map(vE)||[],T=(await f.defaultUserAgentProvider()).map(vE);await g9(w,f,s);let F=w;T.push(`m/${x9(Object.assign({},w.__smithy_context?.features,F.__aws_sdk_context?.features))}`);let r=f?.customUserAgent?.map(vE)||[],C=await f.userAgentAppId();if(C)T.push(vE([`app/${C}`]));let I=zp.getUserAgentPrefix(),L=(I?[I]:[]).concat([...T,...U,...r]).join(v9),B=[...T.filter((R)=>R.startsWith("aws-sdk-")),...r].join(v9);if(f.runtime!=="browser"){if(B)E[G8]=E[G8]?`${E[l9]} ${B}`:B;E[l9]=L}else E[G8]=L;return h({...s,request:$})},"userAgentMiddleware"),vE=af((f)=>{let h=f[0].split(W8).map((U)=>U.replace(Sp,b9)).join(W8),w=f[1]?.replace(Yp,b9),s=h.indexOf(W8),$=h.substring(0,s),E=h.substring(s+1);if($==="api")E=E.toLowerCase();return[$,E,w].filter((U)=>U&&U.length>0).reduce((U,T,F)=>{switch(F){case 0:return T;case 1:return`${U}/${T}`;default:return`${U}#${T}`}},"")},"escapeUserAgent"),n9={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Kp=af((f)=>({applyToStack:af((h)=>{h.add(_9(f),n9)},"applyToStack")}),"getUserAgentPlugin")});var t9=H((dA0,u9)=>{var{defineProperty:dE,getOwnPropertyDescriptor:Mp,getOwnPropertyNames:Zp}=Object,Jp=Object.prototype.hasOwnProperty,a9=(f,h)=>dE(f,"name",{value:h,configurable:!0}),Vp=(f,h)=>{for(var w in h)dE(f,w,{get:h[w],enumerable:!0})},Pp=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Zp(h))if(!Jp.call(f,$)&&$!==w)dE(f,$,{get:()=>h[$],enumerable:!(s=Mp(h,$))||s.enumerable})}return f},Hp=(f)=>Pp(dE({},"__esModule",{value:!0}),f),p9={};Vp(p9,{SelectorType:()=>o9,booleanSelector:()=>Np,numberSelector:()=>Dp});u9.exports=Hp(p9);var Np=a9((f,h,w)=>{if(!(h in f))return;if(f[h]==="true")return!0;if(f[h]==="false")return!1;throw new Error(`Cannot load ${w} "${h}". Expected "true" or "false", got ${f[h]}.`)},"booleanSelector"),Dp=a9((f,h,w)=>{if(!(h in f))return;let s=parseInt(f[h],10);if(Number.isNaN(s))throw new TypeError(`Cannot load ${w} '${h}'. Expected number, got '${f[h]}'.`);return s},"numberSelector"),o9=((f)=>{return f.ENV="env",f.CONFIG="shared config entry",f})(o9||{})});var zs=H((iA0,CQ)=>{var{defineProperty:cE,getOwnPropertyDescriptor:qp,getOwnPropertyNames:kp}=Object,yp=Object.prototype.hasOwnProperty,Uf=(f,h)=>cE(f,"name",{value:h,configurable:!0}),jp=(f,h)=>{for(var w in h)cE(f,w,{get:h[w],enumerable:!0})},Op=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of kp(h))if(!yp.call(f,$)&&$!==w)cE(f,$,{get:()=>h[$],enumerable:!(s=qp(h,$))||s.enumerable})}return f},lp=(f)=>Op(cE({},"__esModule",{value:!0}),f),wQ={};jp(wQ,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>$Q,CONFIG_USE_FIPS_ENDPOINT:()=>UQ,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>vp,DEFAULT_USE_FIPS_ENDPOINT:()=>mp,ENV_USE_DUALSTACK_ENDPOINT:()=>sQ,ENV_USE_FIPS_ENDPOINT:()=>EQ,NODE_REGION_CONFIG_FILE_OPTIONS:()=>_p,NODE_REGION_CONFIG_OPTIONS:()=>xp,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>bp,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>dp,REGION_ENV_NAME:()=>TQ,REGION_INI_NAME:()=>FQ,getRegionInfo:()=>op,resolveCustomEndpointsConfig:()=>ip,resolveEndpointsConfig:()=>gp,resolveRegionConfig:()=>np});CQ.exports=lp(wQ);var qh=t9(),sQ="AWS_USE_DUALSTACK_ENDPOINT",$Q="use_dualstack_endpoint",vp=!1,bp={environmentVariableSelector:(f)=>qh.booleanSelector(f,sQ,qh.SelectorType.ENV),configFileSelector:(f)=>qh.booleanSelector(f,$Q,qh.SelectorType.CONFIG),default:!1},EQ="AWS_USE_FIPS_ENDPOINT",UQ="use_fips_endpoint",mp=!1,dp={environmentVariableSelector:(f)=>qh.booleanSelector(f,EQ,qh.SelectorType.ENV),configFileSelector:(f)=>qh.booleanSelector(f,UQ,qh.SelectorType.CONFIG),default:!1},iE=Ih(),ip=Uf((f)=>{let{tls:h,endpoint:w,urlParser:s,useDualstackEndpoint:$}=f;return Object.assign(f,{tls:h??!0,endpoint:iE.normalizeProvider(typeof w==="string"?s(w):w),isCustomEndpoint:!0,useDualstackEndpoint:iE.normalizeProvider($??!1)})},"resolveCustomEndpointsConfig"),cp=Uf(async(f)=>{let{tls:h=!0}=f,w=await f.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(w))throw new Error("Invalid region in client config");let $=await f.useDualstackEndpoint(),E=await f.useFipsEndpoint(),{hostname:U}=await f.regionInfoProvider(w,{useDualstackEndpoint:$,useFipsEndpoint:E})??{};if(!U)throw new Error("Cannot resolve hostname from client config");return f.urlParser(`${h?"https:":"http:"}//${U}`)},"getEndpointFromRegion"),gp=Uf((f)=>{let h=iE.normalizeProvider(f.useDualstackEndpoint??!1),{endpoint:w,useFipsEndpoint:s,urlParser:$,tls:E}=f;return Object.assign(f,{tls:E??!0,endpoint:w?iE.normalizeProvider(typeof w==="string"?$(w):w):()=>cp({...f,useDualstackEndpoint:h,useFipsEndpoint:s}),isCustomEndpoint:!!w,useDualstackEndpoint:h})},"resolveEndpointsConfig"),TQ="AWS_REGION",FQ="region",xp={environmentVariableSelector:(f)=>f[TQ],configFileSelector:(f)=>f[FQ],default:()=>{throw new Error("Region is missing")}},_p={preferredFile:"credentials"},rQ=Uf((f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips")),"isFipsRegion"),fQ=Uf((f)=>rQ(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f,"getRealRegion"),np=Uf((f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return Object.assign(f,{region:async()=>{if(typeof h==="string")return fQ(h);let s=await h();return fQ(s)},useFipsEndpoint:async()=>{let s=typeof h==="string"?h:await h();if(rQ(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()}})},"resolveRegionConfig"),hQ=Uf((f=[],{useFipsEndpoint:h,useDualstackEndpoint:w})=>f.find(({tags:s})=>h===s.includes("fips")&&w===s.includes("dualstack"))?.hostname,"getHostnameFromVariants"),ep=Uf((f,{regionHostname:h,partitionHostname:w})=>h?h:w?w.replace("{region}",f):void 0,"getResolvedHostname"),ap=Uf((f,{partitionHash:h})=>Object.keys(h||{}).find((w)=>h[w].regions.includes(f))??"aws","getResolvedPartition"),pp=Uf((f,{signingRegion:h,regionRegex:w,useFipsEndpoint:s})=>{if(h)return h;else if(s){let $=w.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),E=f.match($);if(E)return E[0].slice(1,-1)}},"getResolvedSigningRegion"),op=Uf((f,{useFipsEndpoint:h=!1,useDualstackEndpoint:w=!1,signingService:s,regionHash:$,partitionHash:E})=>{let U=ap(f,{partitionHash:E}),T=f in $?f:E[U]?.endpoint??f,F={useFipsEndpoint:h,useDualstackEndpoint:w},r=hQ($[T]?.variants,F),C=hQ(E[U]?.variants,F),I=ep(T,{regionHostname:r,partitionHostname:C});if(I===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:T,useFipsEndpoint:h,useDualstackEndpoint:w}}`);let L=pp(I,{signingRegion:$[T]?.signingRegion,regionRegex:E[U].regionRegex,useFipsEndpoint:h});return{partition:U,signingService:s,hostname:I,...L&&{signingRegion:L},...$[T]?.signingService&&{signingService:$[T].signingService}}},"getRegionInfo")});var A8=H((cA0,BQ)=>{var{defineProperty:gE,getOwnPropertyDescriptor:up,getOwnPropertyNames:tp}=Object,fo=Object.prototype.hasOwnProperty,LQ=(f,h)=>gE(f,"name",{value:h,configurable:!0}),ho=(f,h)=>{for(var w in h)gE(f,w,{get:h[w],enumerable:!0})},wo=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of tp(h))if(!fo.call(f,$)&&$!==w)gE(f,$,{get:()=>h[$],enumerable:!(s=up(h,$))||s.enumerable})}return f},so=(f)=>wo(gE({},"__esModule",{value:!0}),f),GQ={};ho(GQ,{contentLengthMiddleware:()=>B8,contentLengthMiddlewareOptions:()=>WQ,getContentLengthPlugin:()=>Eo});BQ.exports=so(GQ);var $o=u0(),IQ="content-length";function B8(f){return(h)=>async(w)=>{let s=w.request;if($o.HttpRequest.isInstance(s)){let{body:$,headers:E}=s;if($&&Object.keys(E).map((U)=>U.toLowerCase()).indexOf(IQ)===-1)try{let U=f($);s.headers={...s.headers,[IQ]:String(U)}}catch(U){}}return h({...w,request:s})}}LQ(B8,"contentLengthMiddleware");var WQ={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Eo=LQ((f)=>({applyToStack:(h)=>{h.add(B8(f.bodyLengthChecker),WQ)}}),"getContentLengthPlugin")});var Rs=H((AQ)=>{Object.defineProperty(AQ,"__esModule",{value:!0});AQ.getHomeDir=void 0;var Uo=L0("node:os"),To=L0("node:path"),z8={},Fo=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},ro=()=>{let{HOME:f,USERPROFILE:h,HOMEPATH:w,HOMEDRIVE:s=`C:${To.sep}`}=process.env;if(f)return f;if(h)return h;if(w)return`${s}${w}`;let $=Fo();if(!z8[$])z8[$]=Uo.homedir();return z8[$]};AQ.getHomeDir=ro});var R8=H((RQ)=>{Object.defineProperty(RQ,"__esModule",{value:!0});RQ.getSSOTokenFilepath=void 0;var Co=L0("node:crypto"),Io=L0("node:path"),Lo=Rs(),Go=(f)=>{let w=Co.createHash("sha1").update(f).digest("hex");return Io.join(Lo.getHomeDir(),".aws","sso","cache",`${w}.json`)};RQ.getSSOTokenFilepath=Go});var QQ=H((SQ)=>{Object.defineProperty(SQ,"__esModule",{value:!0});SQ.getSSOTokenFromFile=void 0;var Wo=L0("node:fs"),Bo=R8(),{readFile:Ao}=Wo.promises,zo=async(f)=>{let h=Bo.getSSOTokenFilepath(f),w=await Ao(h,"utf8");return JSON.parse(w)};SQ.getSSOTokenFromFile=zo});var S8=H((KQ)=>{Object.defineProperty(KQ,"__esModule",{value:!0});KQ.slurpFile=void 0;var Ro=L0("node:fs"),{readFile:Xo}=Ro.promises,X8={},So=(f,h)=>{if(!X8[f]||(h===null||h===void 0?void 0:h.ignoreCache))X8[f]=Xo(f,"utf8");return X8[f]};KQ.slurpFile=So});var M8=H((eA0,f4)=>{var{defineProperty:nE,getOwnPropertyDescriptor:Yo,getOwnPropertyNames:Qo}=Object,Ko=Object.prototype.hasOwnProperty,l1=(f,h)=>nE(f,"name",{value:h,configurable:!0}),Mo=(f,h)=>{for(var w in h)nE(f,w,{get:h[w],enumerable:!0})},Y8=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Qo(h))if(!Ko.call(f,$)&&$!==w)nE(f,$,{get:()=>h[$],enumerable:!(s=Yo(h,$))||s.enumerable})}return f},K8=(f,h,w)=>(Y8(f,h,"default"),w&&Y8(w,h,"default")),Zo=(f)=>Y8(nE({},"__esModule",{value:!0}),f),t$={};Mo(t$,{CONFIG_PREFIX_SEPARATOR:()=>Fw,DEFAULT_PROFILE:()=>PQ,ENV_PROFILE:()=>VQ,getProfileName:()=>Jo,loadSharedConfigFiles:()=>NQ,loadSsoSessionData:()=>bo,parseKnownFiles:()=>io});f4.exports=Zo(t$);K8(t$,Rs(),f4.exports);var VQ="AWS_PROFILE",PQ="default",Jo=l1((f)=>f.profile||process.env[VQ]||PQ,"getProfileName");K8(t$,R8(),f4.exports);K8(t$,QQ(),f4.exports);var xE=F1(),Vo=l1((f)=>Object.entries(f).filter(([h])=>{let w=h.indexOf(Fw);if(w===-1)return!1;return Object.values(xE.IniSectionType).includes(h.substring(0,w))}).reduce((h,[w,s])=>{let $=w.indexOf(Fw),E=w.substring(0,$)===xE.IniSectionType.PROFILE?w.substring($+1):w;return h[E]=s,h},{...f.default&&{default:f.default}}),"getConfigData"),_E=L0("node:path"),Po=Rs(),Ho="AWS_CONFIG_FILE",HQ=l1(()=>process.env[Ho]||_E.join(Po.getHomeDir(),".aws","config"),"getConfigFilepath"),No=Rs(),Do="AWS_SHARED_CREDENTIALS_FILE",qo=l1(()=>process.env[Do]||_E.join(No.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),ko=Rs(),yo=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,jo=["__proto__","profile __proto__"],Q8=l1((f)=>{let h={},w,s;for(let $ of f.split(/\r?\n/)){let E=$.split(/(^|\s)[;#]/)[0].trim();if(E[0]==="["&&E[E.length-1]==="]"){w=void 0,s=void 0;let T=E.substring(1,E.length-1),F=yo.exec(T);if(F){let[,r,,C]=F;if(Object.values(xE.IniSectionType).includes(r))w=[r,C].join(Fw)}else w=T;if(jo.includes(T))throw new Error(`Found invalid profile name "${T}"`)}else if(w){let T=E.indexOf("=");if(![0,-1].includes(T)){let[F,r]=[E.substring(0,T).trim(),E.substring(T+1).trim()];if(r==="")s=F;else{if(s&&$.trimStart()===$)s=void 0;h[w]=h[w]||{};let C=s?[s,F].join(Fw):F;h[w][C]=r}}}}return h},"parseIni"),ZQ=S8(),JQ=l1(()=>({}),"swallowError"),Fw=".",NQ=l1(async(f={})=>{let{filepath:h=qo(),configFilepath:w=HQ()}=f,s=ko.getHomeDir(),$="~/",E=h;if(h.startsWith("~/"))E=_E.join(s,h.slice(2));let U=w;if(w.startsWith("~/"))U=_E.join(s,w.slice(2));let T=await Promise.all([ZQ.slurpFile(U,{ignoreCache:f.ignoreCache}).then(Q8).then(Vo).catch(JQ),ZQ.slurpFile(E,{ignoreCache:f.ignoreCache}).then(Q8).catch(JQ)]);return{configFile:T[0],credentialsFile:T[1]}},"loadSharedConfigFiles"),Oo=l1((f)=>Object.entries(f).filter(([h])=>h.startsWith(xE.IniSectionType.SSO_SESSION+Fw)).reduce((h,[w,s])=>({...h,[w.substring(w.indexOf(Fw)+1)]:s}),{}),"getSsoSessionData"),lo=S8(),vo=l1(()=>({}),"swallowError"),bo=l1(async(f={})=>lo.slurpFile(f.configFilepath??HQ()).then(Q8).then(Oo).catch(vo),"loadSsoSessionData"),mo=l1((...f)=>{let h={};for(let w of f)for(let[s,$]of Object.entries(w))if(h[s]!==void 0)Object.assign(h[s],$);else h[s]=$;return h},"mergeConfigFiles"),io=l1(async(f)=>{let h=await NQ(f);return mo(h.configFile,h.credentialsFile)},"parseKnownFiles")});var Ss=H((aA0,kQ)=>{var{defineProperty:eE,getOwnPropertyDescriptor:co,getOwnPropertyNames:go}=Object,xo=Object.prototype.hasOwnProperty,Xs=(f,h)=>eE(f,"name",{value:h,configurable:!0}),_o=(f,h)=>{for(var w in h)eE(f,w,{get:h[w],enumerable:!0})},no=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of go(h))if(!xo.call(f,$)&&$!==w)eE(f,$,{get:()=>h[$],enumerable:!(s=co(h,$))||s.enumerable})}return f},eo=(f)=>no(eE({},"__esModule",{value:!0}),f),qQ={};_o(qQ,{loadConfig:()=>to});kQ.exports=eo(qQ);var h4=J$();function Z8(f){try{let h=new Set(Array.from(f.match(/([A-Z_]){3,}/g)??[]));return h.delete("CONFIG"),h.delete("CONFIG_PREFIX_SEPARATOR"),h.delete("ENV"),[...h].join(", ")}catch(h){return f}}Xs(Z8,"getSelectorName");var ao=Xs((f,h)=>async()=>{try{let w=f(process.env);if(w===void 0)throw new Error;return w}catch(w){throw new h4.CredentialsProviderError(w.message||`Not found in ENV: ${Z8(f.toString())}`,{logger:h})}},"fromEnv"),DQ=M8(),po=Xs((f,{preferredFile:h="config",...w}={})=>async()=>{let s=DQ.getProfileName(w),{configFile:$,credentialsFile:E}=await DQ.loadSharedConfigFiles(w),U=E[s]||{},T=$[s]||{},F=h==="config"?{...U,...T}:{...T,...U};try{let C=f(F,h==="config"?$:E);if(C===void 0)throw new Error;return C}catch(r){throw new h4.CredentialsProviderError(r.message||`Not found in config files w/ profile [${s}]: ${Z8(f.toString())}`,{logger:w.logger})}},"fromSharedConfigFiles"),oo=Xs((f)=>typeof f==="function","isFunction"),uo=Xs((f)=>oo(f)?async()=>await f():h4.fromStatic(f),"fromStatic"),to=Xs(({environmentVariableSelector:f,configFileSelector:h,default:w},s={})=>h4.memoize(h4.chain(ao(f),po(h,s),uo(w))),"loadConfig")});var bQ=H((lQ)=>{Object.defineProperty(lQ,"__esModule",{value:!0});lQ.getEndpointUrlConfig=void 0;var yQ=M8(),jQ="AWS_ENDPOINT_URL",OQ="endpoint_url",fu=(f)=>({environmentVariableSelector:(h)=>{let w=f.split(" ").map((E)=>E.toUpperCase()),s=h[[jQ,...w].join("_")];if(s)return s;let $=h[jQ];if($)return $;return},configFileSelector:(h,w)=>{if(w&&h.services){let $=w[["services",h.services].join(yQ.CONFIG_PREFIX_SEPARATOR)];if($){let E=f.split(" ").map((T)=>T.toLowerCase()),U=$[[E.join("_"),OQ].join(yQ.CONFIG_PREFIX_SEPARATOR)];if(U)return U}}let s=h[OQ];if(s)return s;return},default:void 0});lQ.getEndpointUrlConfig=fu});var J8=H((mQ)=>{Object.defineProperty(mQ,"__esModule",{value:!0});mQ.getEndpointFromConfig=void 0;var hu=Ss(),wu=bQ(),su=async(f)=>hu.loadConfig(wu.getEndpointUrlConfig(f!==null&&f!==void 0?f:""))();mQ.getEndpointFromConfig=su});var xQ=H((uA0,gQ)=>{var{defineProperty:aE,getOwnPropertyDescriptor:$u,getOwnPropertyNames:Eu}=Object,Uu=Object.prototype.hasOwnProperty,Tu=(f,h)=>aE(f,"name",{value:h,configurable:!0}),Fu=(f,h)=>{for(var w in h)aE(f,w,{get:h[w],enumerable:!0})},ru=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Eu(h))if(!Uu.call(f,$)&&$!==w)aE(f,$,{get:()=>h[$],enumerable:!(s=$u(h,$))||s.enumerable})}return f},Cu=(f)=>ru(aE({},"__esModule",{value:!0}),f),iQ={};Fu(iQ,{parseQueryString:()=>cQ});gQ.exports=Cu(iQ);function cQ(f){let h={};if(f=f.replace(/^\?/,""),f)for(let w of f.split("&")){let[s,$=null]=w.split("=");if(s=decodeURIComponent(s),$)$=decodeURIComponent($);if(!(s in h))h[s]=$;else if(Array.isArray(h[s]))h[s].push($);else h[s]=[h[s],$]}return h}Tu(cQ,"parseQueryString")});var w4=H((tA0,eQ)=>{var{defineProperty:pE,getOwnPropertyDescriptor:Iu,getOwnPropertyNames:Lu}=Object,Gu=Object.prototype.hasOwnProperty,Wu=(f,h)=>pE(f,"name",{value:h,configurable:!0}),Bu=(f,h)=>{for(var w in h)pE(f,w,{get:h[w],enumerable:!0})},Au=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Lu(h))if(!Gu.call(f,$)&&$!==w)pE(f,$,{get:()=>h[$],enumerable:!(s=Iu(h,$))||s.enumerable})}return f},zu=(f)=>Au(pE({},"__esModule",{value:!0}),f),_Q={};Bu(_Q,{parseUrl:()=>nQ});eQ.exports=zu(_Q);var Ru=xQ(),nQ=Wu((f)=>{if(typeof f==="string")return nQ(new URL(f));let{hostname:h,pathname:w,port:s,protocol:$,search:E}=f,U;if(E)U=Ru.parseQueryString(E);return{hostname:h,port:s?parseInt(s):void 0,protocol:$,path:w,query:U}},"parseUrl")});var Ys=H((f70,hK)=>{var{defineProperty:uE,getOwnPropertyDescriptor:Xu,getOwnPropertyNames:Su}=Object,Yu=Object.prototype.hasOwnProperty,Tf=(f,h)=>uE(f,"name",{value:h,configurable:!0}),Qu=(f,h)=>{for(var w in h)uE(f,w,{get:h[w],enumerable:!0})},Ku=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Su(h))if(!Yu.call(f,$)&&$!==w)uE(f,$,{get:()=>h[$],enumerable:!(s=Xu(h,$))||s.enumerable})}return f},Mu=(f)=>Ku(uE({},"__esModule",{value:!0}),f),pQ={};Qu(pQ,{endpointMiddleware:()=>tQ,endpointMiddlewareOptions:()=>fK,getEndpointFromInstructions:()=>oQ,getEndpointPlugin:()=>ju,resolveEndpointConfig:()=>lu,resolveParams:()=>uQ,toEndpointV1:()=>V8});hK.exports=Mu(pQ);var Zu=Tf(async(f)=>{let h=f?.Bucket||"";if(typeof f.Bucket==="string")f.Bucket=h.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Nu(h)){if(f.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Hu(h)||h.indexOf(".")!==-1&&!String(f.Endpoint).startsWith("http:")||h.toLowerCase()!==h||h.length<3)f.ForcePathStyle=!0;if(f.DisableMultiRegionAccessPoints)f.disableMultiRegionAccessPoints=!0,f.DisableMRAP=!0;return f},"resolveParamsForS3"),Ju=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Vu=/(\d+\.){3}\d+/,Pu=/\.\./,Hu=Tf((f)=>Ju.test(f)&&!Vu.test(f)&&!Pu.test(f),"isDnsCompatibleBucketName"),Nu=Tf((f)=>{let[h,w,s,,,$]=f.split(":"),E=h==="arn"&&f.split(":").length>=6,U=Boolean(E&&w&&s&&$);if(E&&!U)throw new Error(`Invalid ARN: ${f} was an invalid ARN.`);return U},"isArnBucketName"),Du=Tf((f,h,w)=>{let s=Tf(async()=>{let $=w[f]??w[h];if(typeof $==="function")return $();return $},"configProvider");if(f==="credentialScope"||h==="CredentialScope")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.credentialScope??$?.CredentialScope};if(f==="accountId"||h==="AccountId")return async()=>{let $=typeof w.credentials==="function"?await w.credentials():w.credentials;return $?.accountId??$?.AccountId};if(f==="endpoint"||h==="endpoint")return async()=>{let $=await s();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){let{protocol:E,hostname:U,port:T,path:F}=$;return`${E}//${U}${T?":"+T:""}${F}`}}return $};return s},"createConfigValueProvider"),qu=J8(),aQ=w4(),V8=Tf((f)=>{if(typeof f==="object"){if("url"in f)return aQ.parseUrl(f.url);return f}return aQ.parseUrl(f)},"toEndpointV1"),oQ=Tf(async(f,h,w,s)=>{if(!w.endpoint){let U;if(w.serviceConfiguredEndpoint)U=await w.serviceConfiguredEndpoint();else U=await qu.getEndpointFromConfig(w.serviceId);if(U)w.endpoint=()=>Promise.resolve(V8(U))}let $=await uQ(f,h,w);if(typeof w.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return w.endpointProvider($,s)},"getEndpointFromInstructions"),uQ=Tf(async(f,h,w)=>{let s={},$=h?.getEndpointParameterInstructions?.()||{};for(let[E,U]of Object.entries($))switch(U.type){case"staticContextParams":s[E]=U.value;break;case"contextParams":s[E]=f[U.name];break;case"clientContextParams":case"builtInParams":s[E]=await Du(U.name,E,w)();break;case"operationContextParams":s[E]=U.get(f);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(U))}if(Object.keys($).length===0)Object.assign(s,w);if(String(w.serviceId).toLowerCase()==="s3")await Zu(s);return s},"resolveParams"),ku=b0(),oE=Ih(),tQ=Tf(({config:f,instructions:h})=>{return(w,s)=>async($)=>{if(f.endpoint)ku.setFeature(s,"ENDPOINT_OVERRIDE","N");let E=await oQ($.input,{getEndpointParameterInstructions(){return h}},{...f},s);s.endpointV2=E,s.authSchemes=E.properties?.authSchemes;let U=s.authSchemes?.[0];if(U){s.signing_region=U.signingRegion,s.signing_service=U.signingName;let F=oE.getSmithyContext(s)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:U.signingRegion,signingRegion:U.signingRegion,signing_service:U.signingName,signingName:U.signingName,signingRegionSet:U.signingRegionSet},U.properties)}return w({...$})}},"endpointMiddleware"),yu=N(),fK={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:yu.serializerMiddlewareOption.name},ju=Tf((f,h)=>({applyToStack:(w)=>{w.addRelativeTo(tQ({config:f,instructions:h}),fK)}}),"getEndpointPlugin"),Ou=J8(),lu=Tf((f)=>{let h=f.tls??!0,{endpoint:w,useDualstackEndpoint:s,useFipsEndpoint:$}=f,E=w!=null?async()=>V8(await oE.normalizeProvider(w)()):void 0,T=Object.assign(f,{endpoint:E,tls:h,isCustomEndpoint:!!w,useDualstackEndpoint:oE.normalizeProvider(s??!1),useFipsEndpoint:oE.normalizeProvider($??!1)}),F=void 0;return T.serviceConfiguredEndpoint=async()=>{if(f.serviceId&&!F)F=Ou.getEndpointFromConfig(f.serviceId);return F},T},"resolveEndpointConfig")});var H8=H((h70,$K)=>{var{defineProperty:tE,getOwnPropertyDescriptor:vu,getOwnPropertyNames:bu}=Object,mu=Object.prototype.hasOwnProperty,Qs=(f,h)=>tE(f,"name",{value:h,configurable:!0}),du=(f,h)=>{for(var w in h)tE(f,w,{get:h[w],enumerable:!0})},iu=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of bu(h))if(!mu.call(f,$)&&$!==w)tE(f,$,{get:()=>h[$],enumerable:!(s=vu(h,$))||s.enumerable})}return f},cu=(f)=>iu(tE({},"__esModule",{value:!0}),f),wK={};du(wK,{isClockSkewCorrectedError:()=>sK,isClockSkewError:()=>pu,isRetryableByTrait:()=>au,isServerError:()=>uu,isThrottlingError:()=>ou,isTransientError:()=>P8});$K.exports=cu(wK);var gu=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],xu=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],_u=["TimeoutError","RequestTimeout","RequestTimeoutException"],nu=[500,502,503,504],eu=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],au=Qs((f)=>f.$retryable!==void 0,"isRetryableByTrait"),pu=Qs((f)=>gu.includes(f.name),"isClockSkewError"),sK=Qs((f)=>f.$metadata?.clockSkewCorrected,"isClockSkewCorrectedError"),ou=Qs((f)=>f.$metadata?.httpStatusCode===429||xu.includes(f.name)||f.$retryable?.throttling==!0,"isThrottlingError"),P8=Qs((f,h=0)=>sK(f)||_u.includes(f.name)||eu.includes(f?.code||"")||nu.includes(f.$metadata?.httpStatusCode||0)||f.cause!==void 0&&h<=10&&P8(f.cause,h+1),"isTransientError"),uu=Qs((f)=>{if(f.$metadata?.httpStatusCode!==void 0){let h=f.$metadata.httpStatusCode;if(500<=h&&h<=599&&!P8(f))return!0;return!1}return!1},"isServerError")});var hU=H((w70,GK)=>{var{defineProperty:fU,getOwnPropertyDescriptor:tu,getOwnPropertyNames:ft}=Object,ht=Object.prototype.hasOwnProperty,Ff=(f,h)=>fU(f,"name",{value:h,configurable:!0}),wt=(f,h)=>{for(var w in h)fU(f,w,{get:h[w],enumerable:!0})},st=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ft(h))if(!ht.call(f,$)&&$!==w)fU(f,$,{get:()=>h[$],enumerable:!(s=tu(h,$))||s.enumerable})}return f},$t=(f)=>st(fU({},"__esModule",{value:!0}),f),UK={};wt(UK,{AdaptiveRetryStrategy:()=>Ct,ConfiguredRetryStrategy:()=>It,DEFAULT_MAX_ATTEMPTS:()=>N8,DEFAULT_RETRY_DELAY_BASE:()=>s4,DEFAULT_RETRY_MODE:()=>Et,DefaultRateLimiter:()=>FK,INITIAL_RETRY_TOKENS:()=>D8,INVOCATION_ID_HEADER:()=>Tt,MAXIMUM_RETRY_DELAY:()=>q8,NO_RETRY_INCREMENT:()=>LK,REQUEST_HEADER:()=>Ft,RETRY_COST:()=>CK,RETRY_MODES:()=>TK,StandardRetryStrategy:()=>k8,THROTTLING_RETRY_DELAY_BASE:()=>rK,TIMEOUT_RETRY_COST:()=>IK});GK.exports=$t(UK);var TK=((f)=>{return f.STANDARD="standard",f.ADAPTIVE="adaptive",f})(TK||{}),N8=3,Et="standard",Ut=H8(),FK=class f{constructor(h){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=h?.beta??0.7,this.minCapacity=h?.minCapacity??1,this.minFillRate=h?.minFillRate??0.5,this.scaleConstant=h?.scaleConstant??0.4,this.smooth=h?.smooth??0.8;let w=this.getCurrentTimeInSeconds();this.lastThrottleTime=w,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}static{Ff(this,"DefaultRateLimiter")}static{this.setTimeoutFn=setTimeout}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(h){if(!this.enabled)return;if(this.refillTokenBucket(),h>this.currentCapacity){let w=(h-this.currentCapacity)/this.fillRate*1000;await new Promise((s)=>f.setTimeoutFn(s,w))}this.currentCapacity=this.currentCapacity-h}refillTokenBucket(){let h=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=h;return}let w=(h-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+w),this.lastTimestamp=h}updateClientSendingRate(h){let w;if(this.updateMeasuredRate(),Ut.isThrottlingError(h)){let $=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=$,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),w=this.cubicThrottle($),this.enableTokenBucket()}else this.calculateTimeWindow(),w=this.cubicSuccess(this.getCurrentTimeInSeconds());let s=Math.min(w,2*this.measuredTxRate);this.updateTokenBucketRate(s)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(h){return this.getPrecise(h*this.beta)}cubicSuccess(h){return this.getPrecise(this.scaleConstant*Math.pow(h-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(h){this.refillTokenBucket(),this.fillRate=Math.max(h,this.minFillRate),this.maxCapacity=Math.max(h,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let h=this.getCurrentTimeInSeconds(),w=Math.floor(h*2)/2;if(this.requestCount++,w>this.lastTxRateBucket){let s=this.requestCount/(w-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=w}}getPrecise(h){return parseFloat(h.toFixed(8))}},s4=100,q8=20000,rK=500,D8=500,CK=5,IK=10,LK=1,Tt="amz-sdk-invocation-id",Ft="amz-sdk-request",rt=Ff(()=>{let f=s4;return{computeNextBackoffDelay:Ff((s)=>{return Math.floor(Math.min(q8,Math.random()*2**s*f))},"computeNextBackoffDelay"),setDelayBase:Ff((s)=>{f=s},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),EK=Ff(({retryDelay:f,retryCount:h,retryCost:w})=>{return{getRetryCount:Ff(()=>h,"getRetryCount"),getRetryDelay:Ff(()=>Math.min(q8,f),"getRetryDelay"),getRetryCost:Ff(()=>w,"getRetryCost")}},"createDefaultRetryToken"),k8=class{constructor(f){this.maxAttempts=f,this.mode="standard",this.capacity=D8,this.retryBackoffStrategy=rt(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}static{Ff(this,"StandardRetryStrategy")}async acquireInitialRetryToken(f){return EK({retryDelay:s4,retryCount:0})}async refreshRetryTokenForRetry(f,h){let w=await this.getMaxAttempts();if(this.shouldRetry(f,h,w)){let s=h.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?rK:s4);let $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),E=h.retryAfterHint?Math.max(h.retryAfterHint.getTime()-Date.now()||0,$):$,U=this.getCapacityCost(s);return this.capacity-=U,EK({retryDelay:E,retryCount:f.getRetryCount()+1,retryCost:U})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(D8,this.capacity+(f.getRetryCost()??LK))}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 ${N8}`),N8}}shouldRetry(f,h,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(h.errorType)&&this.isRetryableError(h.errorType)}getCapacityCost(f){return f==="TRANSIENT"?IK:CK}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}},Ct=class{constructor(f,h){this.maxAttemptsProvider=f,this.mode="adaptive";let{rateLimiter:w}=h??{};this.rateLimiter=w??new FK,this.standardRetryStrategy=new k8(f)}static{Ff(this,"AdaptiveRetryStrategy")}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,h){return this.rateLimiter.updateClientSendingRate(h),this.standardRetryStrategy.refreshRetryTokenForRetry(f,h)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}},It=class extends k8{static{Ff(this,"ConfiguredRetryStrategy")}constructor(f,h=s4){super(typeof f==="function"?f:async()=>f);if(typeof h==="number")this.computeNextBackoffDelay=()=>h;else this.computeNextBackoffDelay=h}async refreshRetryTokenForRetry(f,h){let w=await super.refreshRetryTokenForRetry(f,h);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}}});var AK=H((WK)=>{Object.defineProperty(WK,"__esModule",{value:!0});WK.isStreamingPayload=void 0;var Lt=L0("node:stream"),Gt=(f)=>(f===null||f===void 0?void 0:f.body)instanceof Lt.Readable||typeof ReadableStream!=="undefined"&&(f===null||f===void 0?void 0:f.body)instanceof ReadableStream;WK.isStreamingPayload=Gt});var $4=H((T70,DK)=>{var{defineProperty:wU,getOwnPropertyDescriptor:Wt,getOwnPropertyNames:Bt}=Object,At=Object.prototype.hasOwnProperty,g0=(f,h)=>wU(f,"name",{value:h,configurable:!0}),zt=(f,h)=>{for(var w in h)wU(f,w,{get:h[w],enumerable:!0})},Rt=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Bt(h))if(!At.call(f,$)&&$!==w)wU(f,$,{get:()=>h[$],enumerable:!(s=Wt(h,$))||s.enumerable})}return f},Xt=(f)=>Rt(wU({},"__esModule",{value:!0}),f),RK={};zt(RK,{AdaptiveRetryStrategy:()=>Qt,CONFIG_MAX_ATTEMPTS:()=>j8,CONFIG_RETRY_MODE:()=>ZK,ENV_MAX_ATTEMPTS:()=>y8,ENV_RETRY_MODE:()=>MK,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>Kt,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>Zt,StandardRetryStrategy:()=>KK,defaultDelayDecider:()=>SK,defaultRetryDecider:()=>YK,getOmitRetryHeadersPlugin:()=>Jt,getRetryAfterHint:()=>NK,getRetryPlugin:()=>qt,omitRetryHeadersMiddleware:()=>JK,omitRetryHeadersMiddlewareOptions:()=>VK,resolveRetryConfig:()=>Mt,retryMiddleware:()=>PK,retryMiddlewareOptions:()=>HK});DK.exports=Xt(RK);var Ks=u0(),XK=K3(),O0=hU(),St=g0((f,h)=>{let w=f,s=h?.noRetryIncrement??O0.NO_RETRY_INCREMENT,$=h?.retryCost??O0.RETRY_COST,E=h?.timeoutRetryCost??O0.TIMEOUT_RETRY_COST,U=f,T=g0((I)=>I.name==="TimeoutError"?E:$,"getCapacityAmount"),F=g0((I)=>T(I)<=U,"hasRetryTokens");return Object.freeze({hasRetryTokens:F,retrieveRetryTokens:g0((I)=>{if(!F(I))throw new Error("No retry token available");let L=T(I);return U-=L,L},"retrieveRetryTokens"),releaseRetryTokens:g0((I)=>{U+=I??s,U=Math.min(U,w)},"releaseRetryTokens")})},"getDefaultRetryQuota"),SK=g0((f,h)=>Math.floor(Math.min(O0.MAXIMUM_RETRY_DELAY,Math.random()*2**h*f)),"defaultDelayDecider"),kh=H8(),YK=g0((f)=>{if(!f)return!1;return kh.isRetryableByTrait(f)||kh.isClockSkewError(f)||kh.isThrottlingError(f)||kh.isTransientError(f)},"defaultRetryDecider"),QK=g0((f)=>{if(f instanceof Error)return f;if(f instanceof Object)return Object.assign(new Error,f);if(typeof f==="string")return new Error(f);return new Error(`AWS SDK error wrapper for ${f}`)},"asSdkError"),KK=class{constructor(f,h){this.maxAttemptsProvider=f,this.mode=O0.RETRY_MODES.STANDARD,this.retryDecider=h?.retryDecider??YK,this.delayDecider=h?.delayDecider??SK,this.retryQuota=h?.retryQuota??St(O0.INITIAL_RETRY_TOKENS)}static{g0(this,"StandardRetryStrategy")}shouldRetry(f,h,w){return h<w&&this.retryDecider(f)&&this.retryQuota.hasRetryTokens(f)}async getMaxAttempts(){let f;try{f=await this.maxAttemptsProvider()}catch(h){f=O0.DEFAULT_MAX_ATTEMPTS}return f}async retry(f,h,w){let s,$=0,E=0,U=await this.getMaxAttempts(),{request:T}=h;if(Ks.HttpRequest.isInstance(T))T.headers[O0.INVOCATION_ID_HEADER]=XK.v4();while(!0)try{if(Ks.HttpRequest.isInstance(T))T.headers[O0.REQUEST_HEADER]=`attempt=${$+1}; max=${U}`;if(w?.beforeRequest)await w.beforeRequest();let{response:F,output:r}=await f(h);if(w?.afterRequest)w.afterRequest(F);return this.retryQuota.releaseRetryTokens(s),r.$metadata.attempts=$+1,r.$metadata.totalRetryDelay=E,{response:F,output:r}}catch(F){let r=QK(F);if($++,this.shouldRetry(r,$,U)){s=this.retryQuota.retrieveRetryTokens(r);let C=this.delayDecider(kh.isThrottlingError(r)?O0.THROTTLING_RETRY_DELAY_BASE:O0.DEFAULT_RETRY_DELAY_BASE,$),I=Yt(r.$response),L=Math.max(I||0,C);E+=L,await new Promise((B)=>setTimeout(B,L));continue}if(!r.$metadata)r.$metadata={};throw r.$metadata.attempts=$,r.$metadata.totalRetryDelay=E,r}}},Yt=g0((f)=>{if(!Ks.HttpResponse.isInstance(f))return;let h=Object.keys(f.headers).find((E)=>E.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return s*1000;return new Date(w).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),Qt=class extends KK{static{g0(this,"AdaptiveRetryStrategy")}constructor(f,h){let{rateLimiter:w,...s}=h??{};super(f,s);this.rateLimiter=w??new O0.DefaultRateLimiter,this.mode=O0.RETRY_MODES.ADAPTIVE}async retry(f,h){return super.retry(f,h,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}},zK=Ih(),y8="AWS_MAX_ATTEMPTS",j8="max_attempts",Kt={environmentVariableSelector:(f)=>{let h=f[y8];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Environment variable ${y8} mast be a number, got "${h}"`);return w},configFileSelector:(f)=>{let h=f[j8];if(!h)return;let w=parseInt(h);if(Number.isNaN(w))throw new Error(`Shared config file entry ${j8} mast be a number, got "${h}"`);return w},default:O0.DEFAULT_MAX_ATTEMPTS},Mt=g0((f)=>{let{retryStrategy:h,retryMode:w,maxAttempts:s}=f,$=zK.normalizeProvider(s??O0.DEFAULT_MAX_ATTEMPTS);return Object.assign(f,{maxAttempts:$,retryStrategy:async()=>{if(h)return h;if(await zK.normalizeProvider(w)()===O0.RETRY_MODES.ADAPTIVE)return new O0.AdaptiveRetryStrategy($);return new O0.StandardRetryStrategy($)}})},"resolveRetryConfig"),MK="AWS_RETRY_MODE",ZK="retry_mode",Zt={environmentVariableSelector:(f)=>f[MK],configFileSelector:(f)=>f[ZK],default:O0.DEFAULT_RETRY_MODE},JK=g0(()=>(f)=>async(h)=>{let{request:w}=h;if(Ks.HttpRequest.isInstance(w))delete w.headers[O0.INVOCATION_ID_HEADER],delete w.headers[O0.REQUEST_HEADER];return f(h)},"omitRetryHeadersMiddleware"),VK={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},Jt=g0((f)=>({applyToStack:(h)=>{h.addRelativeTo(JK(),VK)}}),"getOmitRetryHeadersPlugin"),Vt=Z0(),Pt=AK(),PK=g0((f)=>(h,w)=>async(s)=>{let $=await f.retryStrategy(),E=await f.maxAttempts();if(Ht($)){$=$;let U=await $.acquireInitialRetryToken(w.partition_id),T=new Error,F=0,r=0,{request:C}=s,I=Ks.HttpRequest.isInstance(C);if(I)C.headers[O0.INVOCATION_ID_HEADER]=XK.v4();while(!0)try{if(I)C.headers[O0.REQUEST_HEADER]=`attempt=${F+1}; max=${E}`;let{response:L,output:B}=await h(s);return $.recordSuccess(U),B.$metadata.attempts=F+1,B.$metadata.totalRetryDelay=r,{response:L,output:B}}catch(L){let B=Nt(L);if(T=QK(L),I&&Pt.isStreamingPayload(C))throw(w.logger instanceof Vt.NoOpLogger?console:w.logger)?.warn("An error was encountered in a non-retryable streaming request."),T;try{U=await $.refreshRetryTokenForRetry(U,B)}catch(K){if(!T.$metadata)T.$metadata={};throw T.$metadata.attempts=F+1,T.$metadata.totalRetryDelay=r,T}F=U.getRetryCount();let R=U.getRetryDelay();r+=R,await new Promise((K)=>setTimeout(K,R))}}else{if($=$,$?.mode)w.userAgent=[...w.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(h,s)}},"retryMiddleware"),Ht=g0((f)=>typeof f.acquireInitialRetryToken!=="undefined"&&typeof f.refreshRetryTokenForRetry!=="undefined"&&typeof f.recordSuccess!=="undefined","isRetryStrategyV2"),Nt=g0((f)=>{let h={error:f,errorType:Dt(f)},w=NK(f.$response);if(w)h.retryAfterHint=w;return h},"getRetryErrorInfo"),Dt=g0((f)=>{if(kh.isThrottlingError(f))return"THROTTLING";if(kh.isTransientError(f))return"TRANSIENT";if(kh.isServerError(f))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),HK={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},qt=g0((f)=>({applyToStack:(h)=>{h.add(PK(f),HK)}}),"getRetryPlugin"),NK=g0((f)=>{if(!Ks.HttpResponse.isInstance(f))return;let h=Object.keys(f.headers).find((E)=>E.toLowerCase()==="retry-after");if(!h)return;let w=f.headers[h],s=Number(w);if(!Number.isNaN(s))return new Date(s*1000);return new Date(w)},"getRetryAfterHint")});var O8=H((kK)=>{Object.defineProperty(kK,"__esModule",{value:!0});kK.resolveHttpAuthSchemeConfig=kK.defaultSSOOIDCHttpAuthSchemeProvider=kK.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var kt=j0(),qK=Ih(),yt=async(f,h,w)=>{return{operation:qK.getSmithyContext(h).operation,region:await qK.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};kK.defaultSSOOIDCHttpAuthSchemeParametersProvider=yt;function jt(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function Ot(f){return{schemeId:"smithy.api#noAuth"}}var lt=(f)=>{let h=[];switch(f.operation){case"CreateToken":{h.push(Ot(f));break}default:h.push(jt(f))}return h};kK.defaultSSOOIDCHttpAuthSchemeProvider=lt;var vt=(f)=>{let h=kt.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};kK.resolveHttpAuthSchemeConfig=vt});var l8=H((I70,dt)=>{dt.exports={name:"@aws-sdk/nested-clients",version:"3.777.0",description:"Nested clients for AWS SDK packages.",main:"./dist-cjs/index.js",module:"./dist-es/index.js",types:"./dist-types/index.d.ts",scripts:{build:"yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline nested-clients","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",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=18.0.0"},author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],browser:{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/nested-clients"},exports:{"./sso-oidc":{types:"./dist-types/submodules/sso-oidc/index.d.ts",module:"./dist-es/submodules/sso-oidc/index.js",node:"./dist-cjs/submodules/sso-oidc/index.js",import:"./dist-es/submodules/sso-oidc/index.js",require:"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{types:"./dist-types/submodules/sts/index.d.ts",module:"./dist-es/submodules/sts/index.js",node:"./dist-cjs/submodules/sts/index.js",import:"./dist-es/submodules/sts/index.js",require:"./dist-cjs/submodules/sts/index.js"}}}});var b8=H((L70,dK)=>{var{defineProperty:$U,getOwnPropertyDescriptor:it,getOwnPropertyNames:ct}=Object,gt=Object.prototype.hasOwnProperty,sU=(f,h)=>$U(f,"name",{value:h,configurable:!0}),xt=(f,h)=>{for(var w in h)$U(f,w,{get:h[w],enumerable:!0})},_t=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of ct(h))if(!gt.call(f,$)&&$!==w)$U(f,$,{get:()=>h[$],enumerable:!(s=it(h,$))||s.enumerable})}return f},nt=(f)=>_t($U({},"__esModule",{value:!0}),f),OK={};xt(OK,{NODE_APP_ID_CONFIG_OPTIONS:()=>ut,UA_APP_ID_ENV_NAME:()=>bK,UA_APP_ID_INI_NAME:()=>mK,createDefaultUserAgentProvider:()=>vK,crtAvailability:()=>lK,defaultUserAgent:()=>at});dK.exports=nt(OK);var jK=L0("node:os"),v8=L0("node:process"),lK={isCrtAvailable:!1},et=sU(()=>{if(lK.isCrtAvailable)return["md/crt-avail"];return null},"isCrtAvailable"),vK=sU(({serviceId:f,clientVersion:h})=>{return async(w)=>{let s=[["aws-sdk-js",h],["ua","2.1"],[`os/${jK.platform()}`,jK.release()],["lang/js"],["md/nodejs",`${v8.versions.node}`]],$=et();if($)s.push($);if(f)s.push([`api/${f}`,h]);if(v8.env.AWS_EXECUTION_ENV)s.push([`exec-env/${v8.env.AWS_EXECUTION_ENV}`]);let E=await w?.userAgentAppId?.();return E?[...s,[`app/${E}`]]:[...s]}},"createDefaultUserAgentProvider"),at=vK,pt=mE(),bK="AWS_SDK_UA_APP_ID",mK="sdk_ua_app_id",ot="sdk-ua-app-id",ut={environmentVariableSelector:sU((f)=>f[bK],"environmentVariableSelector"),configFileSelector:sU((f)=>f[mK]??f[ot],"configFileSelector"),default:pt.DEFAULT_UA_APP_ID}});var i8=H((G70,xK)=>{var{defineProperty:EU,getOwnPropertyDescriptor:tt,getOwnPropertyNames:f00}=Object,h00=Object.prototype.hasOwnProperty,cK=(f,h)=>EU(f,"name",{value:h,configurable:!0}),w00=(f,h)=>{for(var w in h)EU(f,w,{get:h[w],enumerable:!0})},s00=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of f00(h))if(!h00.call(f,$)&&$!==w)EU(f,$,{get:()=>h[$],enumerable:!(s=tt(h,$))||s.enumerable})}return f},$00=(f)=>s00(EU({},"__esModule",{value:!0}),f),gK={};w00(gK,{Hash:()=>T00});xK.exports=$00(gK);var m8=o1(),E00=u1(),U00=L0("node:buffer"),iK=L0("node:crypto"),T00=class{static{cK(this,"Hash")}constructor(f,h){this.algorithmIdentifier=f,this.secret=h,this.reset()}update(f,h){this.hash.update(E00.toUint8Array(d8(f,h)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?iK.createHmac(this.algorithmIdentifier,d8(this.secret)):iK.createHash(this.algorithmIdentifier)}};function d8(f,h){if(U00.Buffer.isBuffer(f))return f;if(typeof f==="string")return m8.fromString(f,h);if(ArrayBuffer.isView(f))return m8.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength);return m8.fromArrayBuffer(f)}cK(d8,"castSourceData")});var c8=H((B70,eK)=>{var{defineProperty:UU,getOwnPropertyDescriptor:F00,getOwnPropertyNames:r00}=Object,C00=Object.prototype.hasOwnProperty,I00=(f,h)=>UU(f,"name",{value:h,configurable:!0}),L00=(f,h)=>{for(var w in h)UU(f,w,{get:h[w],enumerable:!0})},G00=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of r00(h))if(!C00.call(f,$)&&$!==w)UU(f,$,{get:()=>h[$],enumerable:!(s=F00(h,$))||s.enumerable})}return f},W00=(f)=>G00(UU({},"__esModule",{value:!0}),f),nK={};L00(nK,{calculateBodyLength:()=>B00});eK.exports=W00(nK);var _K=L0("node:fs"),B00=I00((f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return _K.lstatSync(f.path).size;else if(typeof f.fd==="number")return _K.fstatSync(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)},"calculateBodyLength")});var IM=H((rM)=>{Object.defineProperty(rM,"__esModule",{value:!0});rM.ruleSet=void 0;var EM="required",b1="fn",m1="argv",Js="ref",aK=!0,pK="isSet",E4="booleanEquals",Ms="error",Zs="endpoint",pf="tree",g8="PartitionResult",x8="getAttr",oK={[EM]:!1,type:"String"},uK={[EM]:!0,default:!1,type:"Boolean"},tK={[Js]:"Endpoint"},UM={[b1]:E4,[m1]:[{[Js]:"UseFIPS"},!0]},TM={[b1]:E4,[m1]:[{[Js]:"UseDualStack"},!0]},v1={},fM={[b1]:x8,[m1]:[{[Js]:g8},"supportsFIPS"]},FM={[Js]:g8},hM={[b1]:E4,[m1]:[!0,{[b1]:x8,[m1]:[FM,"supportsDualStack"]}]},wM=[UM],sM=[TM],$M=[{[Js]:"Region"}],A00={version:"1.0",parameters:{Region:oK,UseDualStack:uK,UseFIPS:uK,Endpoint:oK},rules:[{conditions:[{[b1]:pK,[m1]:[tK]}],rules:[{conditions:wM,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Ms},{conditions:sM,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Ms},{endpoint:{url:tK,properties:v1,headers:v1},type:Zs}],type:pf},{conditions:[{[b1]:pK,[m1]:$M}],rules:[{conditions:[{[b1]:"aws.partition",[m1]:$M,assign:g8}],rules:[{conditions:[UM,TM],rules:[{conditions:[{[b1]:E4,[m1]:[aK,fM]},hM],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:v1,headers:v1},type:Zs}],type:pf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Ms}],type:pf},{conditions:wM,rules:[{conditions:[{[b1]:E4,[m1]:[fM,aK]}],rules:[{conditions:[{[b1]:"stringEquals",[m1]:[{[b1]:x8,[m1]:[FM,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:v1,headers:v1},type:Zs},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:v1,headers:v1},type:Zs}],type:pf},{error:"FIPS is enabled but this partition does not support FIPS",type:Ms}],type:pf},{conditions:sM,rules:[{conditions:[hM],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:v1,headers:v1},type:Zs}],type:pf},{error:"DualStack is enabled but this partition does not support DualStack",type:Ms}],type:pf},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:v1,headers:v1},type:Zs}],type:pf}],type:pf},{error:"Invalid Configuration: Missing Region",type:Ms}]};rM.ruleSet=A00});var WM=H((LM)=>{Object.defineProperty(LM,"__esModule",{value:!0});LM.defaultEndpointResolver=void 0;var z00=lE(),_8=jE(),R00=IM(),X00=new _8.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),S00=(f,h={})=>{return X00.get(f,()=>_8.resolveEndpoint(R00.ruleSet,{endpointParams:f,logger:h.logger}))};LM.defaultEndpointResolver=S00;_8.customEndpointFunctions.aws=z00.awsEndpointFunctions});var XM=H((zM)=>{Object.defineProperty(zM,"__esModule",{value:!0});zM.getRuntimeConfig=void 0;var Y00=j0(),Q00=b0(),K00=Z0(),M00=w4(),BM=Gh(),AM=u1(),Z00=O8(),J00=WM(),V00=(f)=>{return{apiVersion:"2019-06-10",base64Decoder:f?.base64Decoder??BM.fromBase64,base64Encoder:f?.base64Encoder??BM.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??J00.defaultEndpointResolver,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??Z00.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new Y00.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Q00.NoAuthSigner}],logger:f?.logger??new K00.NoOpLogger,serviceId:f?.serviceId??"SSO OIDC",urlParser:f?.urlParser??M00.parseUrl,utf8Decoder:f?.utf8Decoder??AM.fromUtf8,utf8Encoder:f?.utf8Encoder??AM.toUtf8}};zM.getRuntimeConfig=V00});var kM=H((X70,qM)=>{var{defineProperty:rU,getOwnPropertyDescriptor:P00,getOwnPropertyNames:H00}=Object,N00=Object.prototype.hasOwnProperty,x0=(f,h)=>rU(f,"name",{value:h,configurable:!0}),D00=(f,h)=>{for(var w in h)rU(f,w,{get:h[w],enumerable:!0})},q00=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of H00(h))if(!N00.call(f,$)&&$!==w)rU(f,$,{get:()=>h[$],enumerable:!(s=P00(h,$))||s.enumerable})}return f},k00=(f)=>q00(rU({},"__esModule",{value:!0}),f),KM={};D00(KM,{DEFAULT_MAX_RETRIES:()=>VM,DEFAULT_TIMEOUT:()=>JM,ENV_CMDS_AUTH_TOKEN:()=>a8,ENV_CMDS_FULL_URI:()=>TU,ENV_CMDS_RELATIVE_URI:()=>FU,Endpoint:()=>PM,fromContainerMetadata:()=>l00,fromInstanceMetadata:()=>$10,getInstanceMetadataEndpoint:()=>NM,httpRequest:()=>Vs,providerConfigFromInit:()=>p8});qM.exports=k00(KM);var y00=L0("node:url"),Zf=J$(),j00=L0("node:buffer"),O00=L0("node:http");function Vs(f){return new Promise((h,w)=>{let s=O00.request({method:"GET",...f,hostname:f.hostname?.replace(/^\[(.+)\]$/,"$1")});s.on("error",($)=>{w(Object.assign(new Zf.ProviderError("Unable to connect to instance metadata service"),$)),s.destroy()}),s.on("timeout",()=>{w(new Zf.ProviderError("TimeoutError from instance metadata service")),s.destroy()}),s.on("response",($)=>{let{statusCode:E=400}=$;if(E<200||300<=E)w(Object.assign(new Zf.ProviderError("Error response received from instance metadata service"),{statusCode:E})),s.destroy();let U=[];$.on("data",(T)=>{U.push(T)}),$.on("end",()=>{h(j00.Buffer.concat(U)),s.destroy()})}),s.end()})}x0(Vs,"httpRequest");var MM=x0((f)=>Boolean(f)&&typeof f==="object"&&typeof f.AccessKeyId==="string"&&typeof f.SecretAccessKey==="string"&&typeof f.Token==="string"&&typeof f.Expiration==="string","isImdsCredentials"),ZM=x0((f)=>({accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.Token,expiration:new Date(f.Expiration),...f.AccountId&&{accountId:f.AccountId}}),"fromImdsCredentials"),JM=1000,VM=0,p8=x0(({maxRetries:f=VM,timeout:h=JM})=>({maxRetries:f,timeout:h}),"providerConfigFromInit"),e8=x0((f,h)=>{let w=f();for(let s=0;s<h;s++)w=w.catch(f);return w},"retry"),TU="AWS_CONTAINER_CREDENTIALS_FULL_URI",FU="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",a8="AWS_CONTAINER_AUTHORIZATION_TOKEN",l00=x0((f={})=>{let{timeout:h,maxRetries:w}=p8(f);return()=>e8(async()=>{let s=await i00({logger:f.logger}),$=JSON.parse(await v00(h,s));if(!MM($))throw new Zf.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:f.logger});return ZM($)},w)},"fromContainerMetadata"),v00=x0(async(f,h)=>{if(process.env[a8])h.headers={...h.headers,Authorization:process.env[a8]};return(await Vs({...h,timeout:f})).toString()},"requestFromEcsImds"),b00="169.254.170.2",m00={localhost:!0,"127.0.0.1":!0},d00={"http:":!0,"https:":!0},i00=x0(async({logger:f})=>{if(process.env[FU])return{hostname:b00,path:process.env[FU]};if(process.env[TU]){let h=y00.parse(process.env[TU]);if(!h.hostname||!(h.hostname in m00))throw new Zf.CredentialsProviderError(`${h.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:f});if(!h.protocol||!(h.protocol in d00))throw new Zf.CredentialsProviderError(`${h.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:f});return{...h,port:h.port?parseInt(h.port,10):void 0}}throw new Zf.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${FU} or ${TU} environment variable is set`,{tryNextLink:!1,logger:f})},"getCmdsUri"),c00=class f extends Zf.CredentialsProviderError{constructor(h,w=!0){super(h,w);this.tryNextLink=w,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,f.prototype)}static{x0(this,"InstanceMetadataV1FallbackError")}},o8=Ss(),g00=w4(),PM=((f)=>{return f.IPv4="http://169.254.169.254",f.IPv6="http://[fd00:ec2::254]",f})(PM||{}),x00="AWS_EC2_METADATA_SERVICE_ENDPOINT",_00="ec2_metadata_service_endpoint",n00={environmentVariableSelector:(f)=>f[x00],configFileSelector:(f)=>f[_00],default:void 0},HM=((f)=>{return f.IPv4="IPv4",f.IPv6="IPv6",f})(HM||{}),e00="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",a00="ec2_metadata_service_endpoint_mode",p00={environmentVariableSelector:(f)=>f[e00],configFileSelector:(f)=>f[a00],default:"IPv4"},NM=x0(async()=>g00.parseUrl(await o00()||await u00()),"getInstanceMetadataEndpoint"),o00=x0(async()=>o8.loadConfig(n00)(),"getFromEndpointConfig"),u00=x0(async()=>{let f=await o8.loadConfig(p00)();switch(f){case"IPv4":return"http://169.254.169.254";case"IPv6":return"http://[fd00:ec2::254]";default:throw new Error(`Unsupported endpoint mode: ${f}. Select from ${Object.values(HM)}`)}},"getFromEndpointModeConfig"),t00=300,f10=300,h10="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",SM=x0((f,h)=>{let w=t00+Math.floor(Math.random()*f10),s=new Date(Date.now()+w*1000);h.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(s)}.
49
- For more information, please visit: `+h10);let $=f.originalExpiration??f.expiration;return{...f,...$?{originalExpiration:$}:{},expiration:s}},"getExtendedInstanceMetadataCredentials"),w10=x0((f,h={})=>{let w=h?.logger||console,s;return async()=>{let $;try{if($=await f(),$.expiration&&$.expiration.getTime()<Date.now())$=SM($,w)}catch(E){if(s)w.warn("Credential renew failed: ",E),$=SM(s,w);else throw E}return s=$,$}},"staticStabilityProvider"),DM="/latest/meta-data/iam/security-credentials/",s10="/latest/api/token",n8="AWS_EC2_METADATA_V1_DISABLED",YM="ec2_metadata_v1_disabled",QM="x-aws-ec2-metadata-token",$10=x0((f={})=>w10(E10(f),{logger:f.logger}),"fromInstanceMetadata"),E10=x0((f={})=>{let h=!1,{logger:w,profile:s}=f,{timeout:$,maxRetries:E}=p8(f),U=x0(async(T,F)=>{if(h||F.headers?.[QM]==null){let I=!1,L=!1,B=await o8.loadConfig({environmentVariableSelector:(R)=>{let K=R[n8];if(L=!!K&&K!=="false",K===void 0)throw new Zf.CredentialsProviderError(`${n8} not set in env, checking config file next.`,{logger:f.logger});return L},configFileSelector:(R)=>{let K=R[YM];return I=!!K&&K!=="false",I},default:!1},{profile:s})();if(f.ec2MetadataV1Disabled||B){let R=[];if(f.ec2MetadataV1Disabled)R.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(I)R.push(`config file profile (${YM})`);if(L)R.push(`process environment variable (${n8})`);throw new c00(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${R.join(", ")}].`)}}let C=(await e8(async()=>{let I;try{I=await T10(F)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},T)).trim();return e8(async()=>{let I;try{I=await F10(C,F,f)}catch(L){if(L.statusCode===401)h=!1;throw L}return I},T)},"getCredentials");return async()=>{let T=await NM();if(h)return w?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),U(E,{...T,timeout:$});else{let F;try{F=(await U10({...T,timeout:$})).toString()}catch(r){if(r?.statusCode===400)throw Object.assign(r,{message:"EC2 Metadata token request returned error"});else if(r.message==="TimeoutError"||[403,404,405].includes(r.statusCode))h=!0;return w?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),U(E,{...T,timeout:$})}return U(E,{...T,headers:{[QM]:F},timeout:$})}}},"getInstanceMetadataProvider"),U10=x0(async(f)=>Vs({...f,path:s10,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),"getMetadataToken"),T10=x0(async(f)=>(await Vs({...f,path:DM})).toString(),"getProfile"),F10=x0(async(f,h,w)=>{let s=JSON.parse((await Vs({...h,path:DM+f})).toString());if(!MM(s))throw new Zf.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:w.logger});return ZM(s)},"getCredentialsFromProfile")});var t8=H((S70,bM)=>{var{create:r10,defineProperty:U4,getOwnPropertyDescriptor:C10,getOwnPropertyNames:I10,getPrototypeOf:L10}=Object,G10=Object.prototype.hasOwnProperty,u8=(f,h)=>U4(f,"name",{value:h,configurable:!0}),W10=(f,h)=>{for(var w in h)U4(f,w,{get:h[w],enumerable:!0})},lM=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of I10(h))if(!G10.call(f,$)&&$!==w)U4(f,$,{get:()=>h[$],enumerable:!(s=C10(h,$))||s.enumerable})}return f},B10=(f,h,w)=>(w=f!=null?r10(L10(f)):{},lM(h||!f||!f.__esModule?U4(w,"default",{value:f,enumerable:!0}):w,f)),A10=(f)=>lM(U4({},"__esModule",{value:!0}),f),vM={};W10(vM,{resolveDefaultsModeConfig:()=>J10});bM.exports=A10(vM);var z10=zs(),yM=Ss(),R10=J$(),X10="AWS_EXECUTION_ENV",jM="AWS_REGION",OM="AWS_DEFAULT_REGION",S10="AWS_EC2_METADATA_DISABLED",Y10=["in-region","cross-region","mobile","standard","legacy"],Q10="/latest/meta-data/placement/region",K10="AWS_DEFAULTS_MODE",M10="defaults_mode",Z10={environmentVariableSelector:(f)=>{return f[K10]},configFileSelector:(f)=>{return f[M10]},default:"legacy"},J10=u8(({region:f=yM.loadConfig(z10.NODE_REGION_CONFIG_OPTIONS),defaultsMode:h=yM.loadConfig(Z10)}={})=>R10.memoize(async()=>{let w=typeof h==="function"?await h():h;switch(w?.toLowerCase()){case"auto":return V10(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Y10.join(", ")}, got ${w}`)}}),"resolveDefaultsModeConfig"),V10=u8(async(f)=>{if(f){let h=typeof f==="function"?await f():f,w=await P10();if(!w)return"standard";if(h===w)return"in-region";else return"cross-region"}return"standard"},"resolveNodeDefaultsModeAuto"),P10=u8(async()=>{if(process.env[X10]&&(process.env[jM]||process.env[OM]))return process.env[jM]??process.env[OM];if(!process.env[S10])try{let{getInstanceMetadataEndpoint:f,httpRequest:h}=await Promise.resolve().then(()=>B10(kM())),w=await f();return(await h({...w,path:Q10})).toString()}catch(f){}},"inferPhysicalRegion")});var xM=H((cM)=>{Object.defineProperty(cM,"__esModule",{value:!0});cM.getRuntimeConfig=void 0;var H10=k5(),N10=H10.__importDefault(l8()),D10=j0(),mM=b8(),CU=zs(),q10=i8(),dM=$4(),Ps=Ss(),iM=B5(),k10=c8(),y10=hU(),j10=XM(),O10=Z0(),l10=t8(),v10=Z0(),b10=(f)=>{v10.emitWarningIfUnsupportedVersion(process.version);let h=l10.resolveDefaultsModeConfig(f),w=()=>h().then(O10.loadConfigsForDefaultMode),s=j10.getRuntimeConfig(f);D10.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??k10.calculateBodyLength,defaultUserAgentProvider:f?.defaultUserAgentProvider??mM.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:N10.default.version}),maxAttempts:f?.maxAttempts??Ps.loadConfig(dM.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),region:f?.region??Ps.loadConfig(CU.NODE_REGION_CONFIG_OPTIONS,{...CU.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:iM.NodeHttpHandler.create(f?.requestHandler??w),retryMode:f?.retryMode??Ps.loadConfig({...dM.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await w()).retryMode||y10.DEFAULT_RETRY_MODE},f),sha256:f?.sha256??q10.Hash.bind(null,"sha256"),streamCollector:f?.streamCollector??iM.streamCollector,useDualstackEndpoint:f?.useDualstackEndpoint??Ps.loadConfig(CU.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:f?.useFipsEndpoint??Ps.loadConfig(CU.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:f?.userAgentAppId??Ps.loadConfig(mM.NODE_APP_ID_CONFIG_OPTIONS,$)}};cM.getRuntimeConfig=b10});var f6=H((Q70,oM)=>{var{defineProperty:IU,getOwnPropertyDescriptor:m10,getOwnPropertyNames:d10}=Object,i10=Object.prototype.hasOwnProperty,Jf=(f,h)=>IU(f,"name",{value:h,configurable:!0}),c10=(f,h)=>{for(var w in h)IU(f,w,{get:h[w],enumerable:!0})},g10=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of d10(h))if(!i10.call(f,$)&&$!==w)IU(f,$,{get:()=>h[$],enumerable:!(s=m10(h,$))||s.enumerable})}return f},x10=(f)=>g10(IU({},"__esModule",{value:!0}),f),nM={};c10(nM,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>a10,NODE_REGION_CONFIG_OPTIONS:()=>e10,REGION_ENV_NAME:()=>eM,REGION_INI_NAME:()=>aM,getAwsRegionExtensionConfiguration:()=>_10,resolveAwsRegionExtensionConfiguration:()=>n10,resolveRegionConfig:()=>p10});oM.exports=x10(nM);var _10=Jf((f)=>{return{setRegion(h){f.region=h},region(){return f.region}}},"getAwsRegionExtensionConfiguration"),n10=Jf((f)=>{return{region:f.region()}},"resolveAwsRegionExtensionConfiguration"),eM="AWS_REGION",aM="region",e10={environmentVariableSelector:Jf((f)=>f[eM],"environmentVariableSelector"),configFileSelector:Jf((f)=>f[aM],"configFileSelector"),default:Jf(()=>{throw new Error("Region is missing")},"default")},a10={preferredFile:"credentials"},pM=Jf((f)=>typeof f==="string"&&(f.startsWith("fips-")||f.endsWith("-fips")),"isFipsRegion"),_M=Jf((f)=>pM(f)?["fips-aws-global","aws-fips"].includes(f)?"us-east-1":f.replace(/fips-(dkr-|prod-)?|-fips/,""):f,"getRealRegion"),p10=Jf((f)=>{let{region:h,useFipsEndpoint:w}=f;if(!h)throw new Error("Region is missing");return Object.assign(f,{region:Jf(async()=>{if(typeof h==="string")return _M(h);let s=await h();return _M(s)},"region"),useFipsEndpoint:Jf(async()=>{let s=typeof h==="string"?h:await h();if(pM(s))return!0;return typeof w!=="function"?Promise.resolve(!!w):w()},"useFipsEndpoint")})},"resolveRegionConfig")});var s6=H((K70,MZ)=>{var{defineProperty:LU,getOwnPropertyDescriptor:o10,getOwnPropertyNames:u10}=Object,t10=Object.prototype.hasOwnProperty,h0=(f,h)=>LU(f,"name",{value:h,configurable:!0}),ff0=(f,h)=>{for(var w in h)LU(f,w,{get:h[w],enumerable:!0})},hf0=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of u10(h))if(!t10.call(f,$)&&$!==w)LU(f,$,{get:()=>h[$],enumerable:!(s=o10(h,$))||s.enumerable})}return f},wf0=(f)=>hf0(LU({},"__esModule",{value:!0}),f),EZ={};ff0(EZ,{$Command:()=>FZ.Command,AccessDeniedException:()=>rZ,AuthorizationPendingException:()=>CZ,CreateTokenCommand:()=>QZ,CreateTokenRequestFilterSensitiveLog:()=>IZ,CreateTokenResponseFilterSensitiveLog:()=>LZ,ExpiredTokenException:()=>GZ,InternalServerException:()=>WZ,InvalidClientException:()=>BZ,InvalidGrantException:()=>AZ,InvalidRequestException:()=>zZ,InvalidScopeException:()=>RZ,SSOOIDC:()=>KZ,SSOOIDCClient:()=>TZ,SSOOIDCServiceException:()=>M1,SlowDownException:()=>XZ,UnauthorizedClientException:()=>SZ,UnsupportedGrantTypeException:()=>YZ,__Client:()=>UZ.Client});MZ.exports=wf0(EZ);var uM=s8(),sf0=E8(),$f0=T8(),tM=mE(),Ef0=zs(),h6=b0(),Uf0=A8(),Tf0=Ys(),fZ=$4(),UZ=Z0(),hZ=O8(),Ff0=h0((f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"})},"resolveClientEndpointParameters"),rf0={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Cf0=xM(),wZ=f6(),sZ=u0(),$Z=Z0(),If0=h0((f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let E=h.findIndex((U)=>U.schemeId===$.schemeId);if(E===-1)h.push($);else h.splice(E,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},"getHttpAuthExtensionConfiguration"),Lf0=h0((f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}},"resolveHttpAuthRuntimeConfig"),Gf0=h0((f,h)=>{let w=Object.assign(wZ.getAwsRegionExtensionConfiguration(f),$Z.getDefaultExtensionConfiguration(f),sZ.getHttpHandlerExtensionConfiguration(f),If0(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,wZ.resolveAwsRegionExtensionConfiguration(w),$Z.resolveDefaultRuntimeConfig(w),sZ.resolveHttpHandlerRuntimeConfig(w),Lf0(w))},"resolveRuntimeExtensions"),TZ=class extends UZ.Client{static{h0(this,"SSOOIDCClient")}config;constructor(...[f]){let h=Cf0.getRuntimeConfig(f||{});super(h);this.initConfig=h;let w=Ff0(h),s=tM.resolveUserAgentConfig(w),$=fZ.resolveRetryConfig(s),E=Ef0.resolveRegionConfig($),U=uM.resolveHostHeaderConfig(E),T=Tf0.resolveEndpointConfig(U),F=hZ.resolveHttpAuthSchemeConfig(T),r=Gf0(F,f?.extensions||[]);this.config=r,this.middlewareStack.use(tM.getUserAgentPlugin(this.config)),this.middlewareStack.use(fZ.getRetryPlugin(this.config)),this.middlewareStack.use(Uf0.getContentLengthPlugin(this.config)),this.middlewareStack.use(uM.getHostHeaderPlugin(this.config)),this.middlewareStack.use(sf0.getLoggerPlugin(this.config)),this.middlewareStack.use($f0.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(h6.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:hZ.defaultSSOOIDCHttpAuthSchemeParametersProvider,identityProviderConfigProvider:h0(async(C)=>new h6.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(h6.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},Wf0=Z0(),Bf0=Ys(),Af0=N(),FZ=Z0(),Hs=Z0(),zf0=Z0(),M1=class f extends zf0.ServiceException{static{h0(this,"SSOOIDCServiceException")}constructor(h){super(h);Object.setPrototypeOf(this,f.prototype)}},rZ=class f extends M1{static{h0(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";error;error_description;constructor(h){super({name:"AccessDeniedException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},CZ=class f extends M1{static{h0(this,"AuthorizationPendingException")}name="AuthorizationPendingException";$fault="client";error;error_description;constructor(h){super({name:"AuthorizationPendingException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},IZ=h0((f)=>({...f,...f.clientSecret&&{clientSecret:Hs.SENSITIVE_STRING},...f.refreshToken&&{refreshToken:Hs.SENSITIVE_STRING},...f.codeVerifier&&{codeVerifier:Hs.SENSITIVE_STRING}}),"CreateTokenRequestFilterSensitiveLog"),LZ=h0((f)=>({...f,...f.accessToken&&{accessToken:Hs.SENSITIVE_STRING},...f.refreshToken&&{refreshToken:Hs.SENSITIVE_STRING},...f.idToken&&{idToken:Hs.SENSITIVE_STRING}}),"CreateTokenResponseFilterSensitiveLog"),GZ=class f extends M1{static{h0(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";error;error_description;constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},WZ=class f extends M1{static{h0(this,"InternalServerException")}name="InternalServerException";$fault="server";error;error_description;constructor(h){super({name:"InternalServerException",$fault:"server",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},BZ=class f extends M1{static{h0(this,"InvalidClientException")}name="InvalidClientException";$fault="client";error;error_description;constructor(h){super({name:"InvalidClientException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},AZ=class f extends M1{static{h0(this,"InvalidGrantException")}name="InvalidGrantException";$fault="client";error;error_description;constructor(h){super({name:"InvalidGrantException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},zZ=class f extends M1{static{h0(this,"InvalidRequestException")}name="InvalidRequestException";$fault="client";error;error_description;constructor(h){super({name:"InvalidRequestException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},RZ=class f extends M1{static{h0(this,"InvalidScopeException")}name="InvalidScopeException";$fault="client";error;error_description;constructor(h){super({name:"InvalidScopeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},XZ=class f extends M1{static{h0(this,"SlowDownException")}name="SlowDownException";$fault="client";error;error_description;constructor(h){super({name:"SlowDownException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},SZ=class f extends M1{static{h0(this,"UnauthorizedClientException")}name="UnauthorizedClientException";$fault="client";error;error_description;constructor(h){super({name:"UnauthorizedClientException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},YZ=class f extends M1{static{h0(this,"UnsupportedGrantTypeException")}name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(h){super({name:"UnsupportedGrantTypeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype),this.error=h.error,this.error_description=h.error_description}},w6=j0(),Rf0=b0(),x=Z0(),Xf0=h0(async(f,h)=>{let w=Rf0.requestBuilder(f,h),s={"content-type":"application/json"};w.bp("/token");let $;return $=JSON.stringify(x.take(f,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:h0((E)=>x._json(E),"scope")})),w.m("POST").h(s).b($),w.build()},"se_CreateTokenCommand"),Sf0=h0(async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return Yf0(f,h);let w=x.map({$metadata:d1(f)}),s=x.expectNonNull(x.expectObject(await w6.parseJsonBody(f.body,h)),"body"),$=x.take(s,{accessToken:x.expectString,expiresIn:x.expectInt32,idToken:x.expectString,refreshToken:x.expectString,tokenType:x.expectString});return Object.assign(w,$),w},"de_CreateTokenCommand"),Yf0=h0(async(f,h)=>{let w={...f,body:await w6.parseJsonErrorBody(f.body,h)},s=w6.loadRestJsonErrorCode(f,w.body);switch(s){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Kf0(w,h);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Mf0(w,h);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Zf0(w,h);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Jf0(w,h);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Vf0(w,h);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Pf0(w,h);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Hf0(w,h);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await Nf0(w,h);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await Df0(w,h);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await qf0(w,h);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await kf0(w,h);default:let $=w.body;return Qf0({output:f,parsedBody:$,errorCode:s})}},"de_CommandError"),Qf0=x.withBaseException(M1),Kf0=h0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let E=new rZ({$metadata:d1(f),...w});return x.decorateServiceException(E,f.body)},"de_AccessDeniedExceptionRes"),Mf0=h0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let E=new CZ({$metadata:d1(f),...w});return x.decorateServiceException(E,f.body)},"de_AuthorizationPendingExceptionRes"),Zf0=h0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let E=new GZ({$metadata:d1(f),...w});return x.decorateServiceException(E,f.body)},"de_ExpiredTokenExceptionRes"),Jf0=h0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let E=new WZ({$metadata:d1(f),...w});return x.decorateServiceException(E,f.body)},"de_InternalServerExceptionRes"),Vf0=h0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let E=new BZ({$metadata:d1(f),...w});return x.decorateServiceException(E,f.body)},"de_InvalidClientExceptionRes"),Pf0=h0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let E=new AZ({$metadata:d1(f),...w});return x.decorateServiceException(E,f.body)},"de_InvalidGrantExceptionRes"),Hf0=h0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let E=new zZ({$metadata:d1(f),...w});return x.decorateServiceException(E,f.body)},"de_InvalidRequestExceptionRes"),Nf0=h0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let E=new RZ({$metadata:d1(f),...w});return x.decorateServiceException(E,f.body)},"de_InvalidScopeExceptionRes"),Df0=h0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let E=new XZ({$metadata:d1(f),...w});return x.decorateServiceException(E,f.body)},"de_SlowDownExceptionRes"),qf0=h0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let E=new SZ({$metadata:d1(f),...w});return x.decorateServiceException(E,f.body)},"de_UnauthorizedClientExceptionRes"),kf0=h0(async(f,h)=>{let w=x.map({}),s=f.body,$=x.take(s,{error:x.expectString,error_description:x.expectString});Object.assign(w,$);let E=new YZ({$metadata:d1(f),...w});return x.decorateServiceException(E,f.body)},"de_UnsupportedGrantTypeExceptionRes"),d1=h0((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),QZ=class extends FZ.Command.classBuilder().ep(rf0).m(function(f,h,w,s){return[Af0.getSerdePlugin(w,this.serialize,this.deserialize),Bf0.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(IZ,LZ).ser(Xf0).de(Sf0).build(){static{h0(this,"CreateTokenCommand")}},yf0={CreateTokenCommand:QZ},KZ=class extends TZ{static{h0(this,"SSOOIDC")}};Wf0.createAggregatedClient(yf0,KZ)});var ZZ=async(f,h={})=>{let{SSOOIDCClient:w}=await Promise.resolve().then(() => Y(s6(),1));return new w(Object.assign({},h.clientConfig??{},{region:f??h.clientConfig?.region,logger:h.clientConfig?.logger??h.parentClientConfig?.logger}))};var JZ=async(f,h,w={})=>{let{CreateTokenCommand:s}=await Promise.resolve().then(() => Y(s6(),1));return(await ZZ(h,w)).send(new s({clientId:f.clientId,clientSecret:f.clientSecret,refreshToken:f.refreshToken,grantType:"refresh_token"}))};var VZ=()=>{};var $6=(f)=>{if(f.expiration&&f.expiration.getTime()<Date.now())throw new X1(`Token is expired. ${Bs}`,!1)};var PZ=G(()=>{S0()});var yh=(f,h,w=!1)=>{if(typeof h==="undefined")throw new X1(`Value not present for '${f}' in SSO Token${w?". Cannot refresh":""}. ${Bs}`,!1)};var HZ=G(()=>{S0()});import{promises as jf0}from"node:fs";var Of0,NZ=(f,h)=>{let w=wE(f),s=JSON.stringify(h,null,2);return Of0(w,s)};var DZ=G(()=>{hf();({writeFile:Of0}=jf0)});var qZ,kZ=(f={})=>async({callerClientConfig:h}={})=>{let w={...f,parentClientConfig:{...h,...f.parentClientConfig}};w.logger?.debug("@aws-sdk/token-providers - fromSso");let s=await Zh(w),$=k1({profile:w.profile??h?.profile}),E=s[$];if(!E)throw new X1(`Profile '${$}' could not be found in shared credentials file.`,!1);else if(!E.sso_session)throw new X1(`Profile '${$}' is missing required property 'sso_session'.`);let U=E.sso_session,F=(await UE(w))[U];if(!F)throw new X1(`Sso session '${U}' could not be found in shared credentials file.`,!1);for(let K of["sso_start_url","sso_region"])if(!F[K])throw new X1(`Sso session '${U}' is missing required property '${K}'.`,!1);let{sso_start_url:r,sso_region:C}=F,I;try{I=await sE(U)}catch(K){throw new X1(`The SSO session token associated with profile=${$} was not found or is invalid. ${Bs}`,!1)}yh("accessToken",I.accessToken),yh("expiresAt",I.expiresAt);let{accessToken:L,expiresAt:B}=I,R={token:L,expiration:new Date(B)};if(R.expiration.getTime()-Date.now()>$9)return R;if(Date.now()-qZ.getTime()<30000)return $6(R),R;yh("clientId",I.clientId,!0),yh("clientSecret",I.clientSecret,!0),yh("refreshToken",I.refreshToken,!0);try{qZ.setTime(Date.now());let K=await JZ(I,C,w);yh("accessToken",K.accessToken),yh("expiresIn",K.expiresIn);let Q=new Date(Date.now()+K.expiresIn*1000);try{await NZ(U,{...I,accessToken:K.accessToken,expiresAt:Q.toISOString(),refreshToken:K.refreshToken})}catch(k){}return{token:K.accessToken,expiration:Q}}catch(K){return $6(R),R}};var yZ=G(()=>{S0();hf();VZ();PZ();HZ();DZ();qZ=new Date(0)});var jZ=G(()=>{S0()});var OZ=G(()=>{S0()});var lZ=G(()=>{yZ();jZ();OZ()});function lf0(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function GU(f){return{schemeId:"smithy.api#noAuth"}}var vZ,bZ=async(f,h,w)=>{return{operation:Yh(h).operation,region:await L1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},mZ=(f)=>{let h=[];switch(f.operation){case"GetRoleCredentials":{h.push(GU(f));break}case"ListAccountRoles":{h.push(GU(f));break}case"ListAccounts":{h.push(GU(f));break}case"Logout":{h.push(GU(f));break}default:h.push(lf0(f))}return h},dZ=(f)=>{let h=vZ.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};var E6=G(()=>{vZ=Y(j0(),1);gf()});var iZ=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"})},jh;var Ns=G(()=>{jh={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var gZ;var cZ=G(()=>{gZ={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.777.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.775.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.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 U6;var T6=G(()=>{U6={isCrtAvailable:!1}});var xZ=()=>{if(U6.isCrtAvailable)return["md/crt-avail"];return null};var _Z=G(()=>{T6()});import{platform as bf0,release as mf0}from"node:os";import{env as nZ,versions as df0}from"node:process";var Ds=({serviceId:f,clientVersion:h})=>{return async(w)=>{let s=[["aws-sdk-js",h],["ua","2.1"],[`os/${bf0()}`,mf0()],["lang/js"],["md/nodejs",`${df0.node}`]],$=xZ();if($)s.push($);if(f)s.push([`api/${f}`,h]);if(nZ.AWS_EXECUTION_ENV)s.push([`exec-env/${nZ.AWS_EXECUTION_ENV}`]);let E=await w?.userAgentAppId?.();return E?[...s,[`app/${E}`]]:[...s]}};var eZ=G(()=>{_Z();T6()});var if0="AWS_SDK_UA_APP_ID",cf0="sdk_ua_app_id",gf0="sdk-ua-app-id",qs;var aZ=G(()=>{j$();qs={environmentVariableSelector:(f)=>f[if0],configFileSelector:(f)=>f[cf0]??f[gf0],default:EF}});var WU=G(()=>{eZ();aZ()});var pZ,Vf=(f)=>{let h=pZ.fromString(f,"utf8");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var F6=G(()=>{pZ=Y(o1(),1)});var oZ=(f)=>{if(typeof f==="string")return Vf(f);if(ArrayBuffer.isView(f))return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(f)};var uZ=G(()=>{F6()});var tZ,ks=(f)=>{if(typeof f==="string")return f;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return tZ.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString("utf8")};var fJ=G(()=>{tZ=Y(o1(),1)});var ys=G(()=>{F6();uZ();fJ()});import{Buffer as xf0}from"node:buffer";import{createHash as _f0,createHmac as nf0}from"node:crypto";class rw{constructor(f,h){this.algorithmIdentifier=f,this.secret=h,this.reset()}update(f,h){this.hash.update(oZ(hJ(f,h)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?nf0(this.algorithmIdentifier,hJ(this.secret)):_f0(this.algorithmIdentifier)}}function hJ(f,h){if(xf0.isBuffer(f))return f;if(typeof f==="string")return T4.fromString(f,h);if(ArrayBuffer.isView(f))return T4.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength);return T4.fromArrayBuffer(f)}var T4;var BU=G(()=>{T4=Y(o1(),1);ys()});import{fstatSync as ef0,lstatSync as af0}from"node:fs";var js=(f)=>{if(!f)return 0;if(typeof f==="string")return Buffer.byteLength(f);else if(typeof f.byteLength==="number")return f.byteLength;else if(typeof f.size==="number")return f.size;else if(typeof f.start==="number"&&typeof f.end==="number")return f.end+1-f.start;else if(typeof f.path==="string"||Buffer.isBuffer(f.path))return af0(f.path).size;else if(typeof f.fd==="number")return ef0(f.fd).size;throw new Error(`Body Length computation failed for ${f}`)};var wJ=()=>{};var AU=G(()=>{wJ()});var sJ,pf0,Os=(f)=>{if(f.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!pf0.exec(f))throw new TypeError("Invalid base64 string.");let h=sJ.fromString(f,"base64");return new Uint8Array(h.buffer,h.byteOffset,h.byteLength)};var $J=G(()=>{sJ=Y(o1(),1),pf0=/^[A-Za-z0-9+/]*={0,2}$/});var EJ,ls=(f)=>{let h;if(typeof f==="string")h=Vf(f);else h=f;if(typeof h!=="object"||typeof h.byteOffset!=="number"||typeof h.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return EJ.fromArrayBuffer(h.buffer,h.byteOffset,h.byteLength).toString("base64")};var UJ=G(()=>{EJ=Y(o1(),1);ys()});var zU=G(()=>{$J();UJ()});var TJ,FJ,rJ,BJ,AJ,i1,CJ,zJ,IJ,LJ,GJ,WJ,of0,RJ;var XJ=G(()=>{TJ={["required"]:!1,type:"String"},FJ={["required"]:!0,default:!1,type:"Boolean"},rJ={["ref"]:"Endpoint"},BJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},AJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},i1={},CJ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},zJ={["ref"]:"PartitionResult"},IJ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[zJ,"supportsDualStack"]}]},LJ=[BJ],GJ=[AJ],WJ=[{["ref"]:"Region"}],of0={version:"1.0",parameters:{Region:TJ,UseDualStack:FJ,UseFIPS:FJ,Endpoint:TJ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[rJ]}],rules:[{conditions:LJ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:GJ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:rJ,properties:i1,headers:i1},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:WJ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:WJ,assign:"PartitionResult"}],rules:[{conditions:[BJ,AJ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,CJ]},IJ],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:i1,headers:i1},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:LJ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[CJ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[zJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:i1,headers:i1},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:i1,headers:i1},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:GJ,rules:[{conditions:[IJ],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:i1,headers:i1},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:i1,headers:i1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},RJ=of0});var uf0,SJ=(f,h={})=>{return uf0.get(f,()=>nh(RJ,{endpointParams:f,logger:h.logger}))};var YJ=G(()=>{Z$();cf();XJ();uf0=new _h({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});t1.aws=eh});var QJ,KJ,MJ=(f)=>{return{apiVersion:"2019-06-10",base64Decoder:f?.base64Decoder??Os,base64Encoder:f?.base64Encoder??ls,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??SJ,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??mZ,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new QJ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new KJ.NoAuthSigner}],logger:f?.logger??new nf,serviceId:f?.serviceId??"SSO",urlParser:f?.urlParser??j1,utf8Decoder:f?.utf8Decoder??Vf,utf8Encoder:f?.utf8Encoder??ks}};var ZJ=G(()=>{QJ=Y(j0(),1),KJ=Y(b0(),1);J();aw();zU();ys();E6();YJ()});var JJ="AWS_EXECUTION_ENV",r6="AWS_REGION",C6="AWS_DEFAULT_REGION",VJ="AWS_EC2_METADATA_DISABLED",PJ,HJ="/latest/meta-data/placement/region";var NJ=G(()=>{PJ=["in-region","cross-region","mobile","standard","legacy"]});var DJ;var qJ=G(()=>{DJ={environmentVariableSelector:(f)=>{return f.AWS_DEFAULTS_MODE},configFileSelector:(f)=>{return f.defaults_mode},default:"legacy"}});var vs=({region:f=A0(Qh),defaultsMode:h=A0(DJ)}={})=>fw(async()=>{let w=typeof h==="function"?await h():h;switch(w?.toLowerCase()){case"auto":return tf0(f);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(w?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${PJ.join(", ")}, got ${w}`)}}),tf0=async(f)=>{if(f){let h=typeof f==="function"?await f():f,w=await fh0();if(!w)return"standard";if(h===w)return"in-region";else return"cross-region"}return"standard"},fh0=async()=>{if(process.env[JJ]&&(process.env[r6]||process.env[C6]))return process.env[r6]??process.env[C6];if(!process.env[VJ])try{let{getInstanceMetadataEndpoint:f,httpRequest:h}=await Promise.resolve().then(() => (a$(),e$)),w=await f();return(await h({...w,path:HJ})).toString()}catch(f){}};var kJ=G(()=>{Kh();Jh();S0();NJ();qJ()});var RU=G(()=>{kJ()});var yJ,jJ=(f)=>{Fs(process.version);let h=vs(f),w=()=>h().then(Ts),s=MJ(f);yJ.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??js,defaultUserAgentProvider:f?.defaultUserAgentProvider??Ds({serviceId:s.serviceId,clientVersion:gZ.version}),maxAttempts:f?.maxAttempts??A0(fs,f),region:f?.region??A0(Qh,{...gw,...$}),requestHandler:Ef.create(f?.requestHandler??w),retryMode:f?.retryMode??A0({...ws,default:async()=>(await w()).retryMode||Vh},f),sha256:f?.sha256??rw.bind(null,"sha256"),streamCollector:f?.streamCollector??Ws,useDualstackEndpoint:f?.useDualstackEndpoint??A0(iw,$),useFipsEndpoint:f?.useFipsEndpoint??A0(cw,$),userAgentAppId:f?.userAgentAppId??A0(qs,$)}};var OJ=G(()=>{cZ();yJ=Y(j0(),1);WU();Kh();BU();Uw();Jh();o$();AU();wf();ZJ();J();RU();J()});var bs=(f)=>{return{setRegion(h){f.region=h},region(){return f.region}}},ms=(f)=>{return{region:f.region()}};var lJ=()=>{};var vJ=()=>{};var bJ=G(()=>{vJ()});var mJ=G(()=>{lJ();bJ()});var XU=G(()=>{mJ()});var dJ=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let E=h.findIndex((U)=>U.schemeId===$.schemeId);if(E===-1)h.push($);else h.splice(E,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},iJ=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var cJ=(f,h)=>{let w=Object.assign(bs(f),rs(f),Zw(f),dJ(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,ms(w),Cs(w),Jw(w),iJ(w))};var gJ=G(()=>{XU();r1();J()});var ds,of;var F4=G(()=>{w5();s5();$5();j$();Kh();ds=Y(b0(),1);fE();q();Uw();J();E6();Ns();OJ();gJ();of=class of extends $w{config;constructor(...[f]){let h=jJ(f||{});super(h);this.initConfig=h;let w=iZ(h),s=kw(w),$=hs(s),E=xw($),U=Vw(E),T=pw(U),F=dZ(T),r=cJ(F,f?.extensions||[]);this.config=r,this.middlewareStack.use(mw(this.config)),this.middlewareStack.use(Ls(this.config)),this.middlewareStack.use(_w(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(ds.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:bZ,identityProviderConfigProvider:async(C)=>new ds.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(ds.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var uf;var I6=G(()=>{J();uf=class uf extends $f{constructor(f){super(f);Object.setPrototypeOf(this,uf.prototype)}}});var SU,YU,QU,KU,xJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),wh0=(f)=>({...f,...f.secretAccessKey&&{secretAccessKey:T0},...f.sessionToken&&{sessionToken:T0}}),_J=(f)=>({...f,...f.roleCredentials&&{roleCredentials:wh0(f.roleCredentials)}}),nJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),eJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}}),aJ=(f)=>({...f,...f.accessToken&&{accessToken:T0}});var Cw=G(()=>{J();I6();SU=class SU extends uf{name="InvalidRequestException";$fault="client";constructor(f){super({name:"InvalidRequestException",$fault:"client",...f});Object.setPrototypeOf(this,SU.prototype)}};YU=class YU extends uf{name="ResourceNotFoundException";$fault="client";constructor(f){super({name:"ResourceNotFoundException",$fault:"client",...f});Object.setPrototypeOf(this,YU.prototype)}};QU=class QU extends uf{name="TooManyRequestsException";$fault="client";constructor(f){super({name:"TooManyRequestsException",$fault:"client",...f});Object.setPrototypeOf(this,QU.prototype)}};KU=class KU extends uf{name="UnauthorizedException";$fault="client";constructor(f){super({name:"UnauthorizedException",$fault:"client",...f});Object.setPrototypeOf(this,KU.prototype)}}});var Oh,r4,pJ=async(f,h)=>{let w=r4.requestBuilder(f,h),s=S({},x$,{[JU]:f[ZU]});w.bp("/federation/credentials");let $=S({[rh0]:[,j(f[Fh0],"roleName")],[EV]:[,j(f[$V],"accountId")]}),E;return w.m("GET").h(s).q($).b(E),w.build()},oJ=async(f,h)=>{let w=r4.requestBuilder(f,h),s=S({},x$,{[JU]:f[ZU]});w.bp("/assignment/roles");let $=S({[rV]:[,f[FV]],[TV]:[()=>f.maxResults!==void 0,()=>f[UV].toString()],[EV]:[,j(f[$V],"accountId")]}),E;return w.m("GET").h(s).q($).b(E),w.build()},uJ=async(f,h)=>{let w=r4.requestBuilder(f,h),s=S({},x$,{[JU]:f[ZU]});w.bp("/assignment/accounts");let $=S({[rV]:[,f[FV]],[TV]:[()=>f.maxResults!==void 0,()=>f[UV].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},tJ=async(f,h)=>{let w=r4.requestBuilder(f,h),s=S({},x$,{[JU]:f[ZU]});w.bp("/logout");let $;return w.m("POST").h(s).b($),w.build()},fV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return MU(f,h);let w=S({$metadata:lh(f)}),s=j(g(await Oh.parseJsonBody(f.body,h)),"body"),$=H0(s,{roleCredentials:v});return Object.assign(w,$),w},hV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return MU(f,h);let w=S({$metadata:lh(f)}),s=j(g(await Oh.parseJsonBody(f.body,h)),"body"),$=H0(s,{nextToken:W,roleList:v});return Object.assign(w,$),w},wV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return MU(f,h);let w=S({$metadata:lh(f)}),s=j(g(await Oh.parseJsonBody(f.body,h)),"body"),$=H0(s,{accountList:v,nextToken:W});return Object.assign(w,$),w},sV=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return MU(f,h);let w=S({$metadata:lh(f)});return await G1.collectBody(f.body,h),w},MU=async(f,h)=>{let w={...f,body:await Oh.parseJsonErrorBody(f.body,h)},s=Oh.loadRestJsonErrorCode(f,w.body);switch(s){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await $h0(w,h);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await Eh0(w,h);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Uh0(w,h);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Th0(w,h);default:let $=w.body;return sh0({output:f,parsedBody:$,errorCode:s})}},sh0,$h0=async(f,h)=>{let w=S({}),s=f.body,$=H0(s,{message:W});Object.assign(w,$);let E=new SU({$metadata:lh(f),...w});return l(E,f.body)},Eh0=async(f,h)=>{let w=S({}),s=f.body,$=H0(s,{message:W});Object.assign(w,$);let E=new YU({$metadata:lh(f),...w});return l(E,f.body)},Uh0=async(f,h)=>{let w=S({}),s=f.body,$=H0(s,{message:W});Object.assign(w,$);let E=new QU({$metadata:lh(f),...w});return l(E,f.body)},Th0=async(f,h)=>{let w=S({}),s=f.body,$=H0(s,{message:W});Object.assign(w,$);let E=new KU({$metadata:lh(f),...w});return l(E,f.body)},lh=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),$V="accountId",ZU="accessToken",EV="account_id",UV="maxResults",TV="max_result",FV="nextToken",rV="next_token",Fh0="roleName",rh0="role_name",JU="x-amz-sso_bearer_token";var C4=G(()=>{Oh=Y(j0(),1),r4=Y(b0(),1);J();Cw();I6();sh0=Us(uf)});var CV,I4;var L6=G(()=>{q();CV=Y(N(),1);J();Ns();Cw();C4();I4=class I4 extends A.classBuilder().ep(jh).m(function(f,h,w,s){return[CV.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(xJ,_J).ser(pJ).de(fV).build(){}});var IV,L4;var VU=G(()=>{q();IV=Y(N(),1);J();Ns();Cw();C4();L4=class L4 extends A.classBuilder().ep(jh).m(function(f,h,w,s){return[IV.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(nJ,void 0).ser(oJ).de(hV).build(){}});var LV,G4;var PU=G(()=>{q();LV=Y(N(),1);J();Ns();Cw();C4();G4=class G4 extends A.classBuilder().ep(jh).m(function(f,h,w,s){return[LV.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(eJ,void 0).ser(uJ).de(wV).build(){}});var GV,G6;var W6=G(()=>{q();GV=Y(N(),1);J();Ns();Cw();C4();G6=class G6 extends A.classBuilder().ep(jh).m(function(f,h,w,s){return[GV.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(aJ,void 0).ser(tJ).de(sV).build(){}});var Ch0,WV;var BV=G(()=>{J();L6();VU();PU();W6();F4();Ch0={GetRoleCredentialsCommand:I4,ListAccountRolesCommand:L4,ListAccountsCommand:G4,LogoutCommand:G6};WV=class WV extends of{};$s(Ch0,WV)});var AV=G(()=>{L6();VU();PU();W6()});var zV=()=>{};var RV,pX0;var XV=G(()=>{RV=Y(b0(),1);VU();F4();pX0=RV.createPaginator(of,L4,"nextToken","nextToken","maxResults")});var SV,fS0;var YV=G(()=>{SV=Y(b0(),1);PU();F4();fS0=SV.createPaginator(of,G4,"nextToken","nextToken","maxResults")});var QV=G(()=>{zV();XV();YV()});var KV=G(()=>{Cw()});var MV=G(()=>{F4();BV();AV();QV();KV()});var ZV={};Ch(ZV,{SSOClient:()=>of,GetRoleCredentialsCommand:()=>I4});var JV=G(()=>{MV()});var B6,W4=!1,A6=async({ssoStartUrl:f,ssoSession:h,ssoAccountId:w,ssoRegion:s,ssoRoleName:$,ssoClient:E,clientConfig:U,parentClientConfig:T,profile:F,logger:r})=>{let C,I="To refresh this SSO session run aws sso login with the corresponding profile.";if(h)try{let R0=await kZ({profile:F})();C={accessToken:R0.token,expiresAt:new Date(R0.expiration).toISOString()}}catch(R0){throw new a(R0.message,{tryNextLink:W4,logger:r})}else try{C=await sE(f)}catch(R0){throw new a("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:W4,logger:r})}if(new Date(C.expiresAt).getTime()-Date.now()<=0)throw new a("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:W4,logger:r});let{accessToken:L}=C,{SSOClient:B,GetRoleCredentialsCommand:R}=await Promise.resolve().then(() => (JV(),ZV)),K=E||new B(Object.assign({},U??{},{logger:U?.logger??T?.logger,region:U?.region??s})),Q;try{Q=await K.send(new R({accountId:w,roleName:$,accessToken:L}))}catch(R0){throw new a(R0,{tryNextLink:W4,logger:r})}let{roleCredentials:{accessKeyId:k,secretAccessKey:D,sessionToken:y,expiration:n,credentialScope:I0,accountId:v0}={}}=Q;if(!k||!D||!y||!n)throw new a("SSO returns an invalid temporary credential.",{tryNextLink:W4,logger:r});let $1={accessKeyId:k,secretAccessKey:D,sessionToken:y,expiration:new Date(n),...I0&&{credentialScope:I0},...v0&&{accountId:v0}};if(h)B6.setCredentialFeature($1,"CREDENTIALS_SSO","s");else B6.setCredentialFeature($1,"CREDENTIALS_SSO_LEGACY","u");return $1};var VV=G(()=>{B6=Y(C1(),1);lZ();S0();hf()});var z6=(f,h)=>{let{sso_start_url:w,sso_account_id:s,sso_region:$,sso_role_name:E}=f;if(!w||!s||!$||!E)throw new a(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(f).join(", ")}
50
- Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:h});return f};var R6=G(()=>{S0()});var Ih0=(f={})=>async({callerClientConfig:h}={})=>{f.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:w,ssoAccountId:s,ssoRegion:$,ssoRoleName:E,ssoSession:U}=f,{ssoClient:T}=f,F=k1({profile:f.profile??h?.profile});if(!w&&!s&&!$&&!E&&!U){let C=(await Zh(f))[F];if(!C)throw new a(`Profile ${F} was not found.`,{logger:f.logger});if(!w8(C))throw new a(`Profile ${F} is not configured with SSO credentials.`,{logger:f.logger});if(C?.sso_session){let k=(await UE(f))[C.sso_session],D=` configurations in profile ${F} and sso-session ${C.sso_session}`;if($&&$!==k.sso_region)throw new a("Conflicting SSO region"+D,{tryNextLink:!1,logger:f.logger});if(w&&w!==k.sso_start_url)throw new a("Conflicting SSO start_url"+D,{tryNextLink:!1,logger:f.logger});C.sso_region=k.sso_region,C.sso_start_url=k.sso_start_url}let{sso_start_url:I,sso_account_id:L,sso_region:B,sso_role_name:R,sso_session:K}=z6(C,f.logger);return A6({ssoStartUrl:I,ssoSession:K,ssoAccountId:L,ssoRegion:B,ssoRoleName:R,ssoClient:T,clientConfig:f.clientConfig,parentClientConfig:f.parentClientConfig,profile:F})}else if(!w||!s||!$||!E)throw new a('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:f.logger});else return A6({ssoStartUrl:w,ssoSession:U,ssoAccountId:s,ssoRegion:$,ssoRoleName:E,ssoClient:T,clientConfig:f.clientConfig,parentClientConfig:f.parentClientConfig,profile:F})};var PV=G(()=>{S0();hf();VV();R6()});var HV=()=>{};var X6={};Ch(X6,{validateSsoProfile:()=>z6,isSsoProfile:()=>w8,fromSSO:()=>Ih0});var S6=G(()=>{PV();HV();R6()});var NV,DV=(f,h,w)=>{let s={EcsContainer:async($)=>{let{fromHttp:E}=await Promise.resolve().then(() => (h8(),f8)),{fromContainerMetadata:U}=await Promise.resolve().then(() => (a$(),e$));return w?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>xf(E($??{}),U($))().then(Y6)},Ec2InstanceMetadata:async($)=>{w?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:E}=await Promise.resolve().then(() => (a$(),e$));return async()=>E($)().then(Y6)},Environment:async($)=>{w?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:E}=await Promise.resolve().then(() => (b3(),IY));return async()=>E($)().then(Y6)}};if(f in s)return s[f];else throw new a(`Unsupported credential source in profile ${h}. Got ${f}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:w})},Y6=(f)=>NV.setCredentialFeature(f,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var qV=G(()=>{NV=Y(C1(),1);S0()});var Q6=H((yV)=>{Object.defineProperty(yV,"__esModule",{value:!0});yV.resolveHttpAuthSchemeConfig=yV.resolveStsAuthConfig=yV.defaultSTSHttpAuthSchemeProvider=yV.defaultSTSHttpAuthSchemeParametersProvider=void 0;var Lh0=j0(),kV=Ih(),Gh0=B4(),Wh0=async(f,h,w)=>{return{operation:kV.getSmithyContext(h).operation,region:await kV.normalizeProvider(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};yV.defaultSTSHttpAuthSchemeParametersProvider=Wh0;function Bh0(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}function Ah0(f){return{schemeId:"smithy.api#noAuth"}}var zh0=(f)=>{let h=[];switch(f.operation){case"AssumeRoleWithWebIdentity":{h.push(Ah0(f));break}default:h.push(Bh0(f))}return h};yV.defaultSTSHttpAuthSchemeProvider=zh0;var Rh0=(f)=>Object.assign(f,{stsClientCtor:Gh0.STSClient});yV.resolveStsAuthConfig=Rh0;var Xh0=(f)=>{let h=yV.resolveStsAuthConfig(f),w=Lh0.resolveAwsSdkSigV4Config(h);return Object.assign(w,{})};yV.resolveHttpAuthSchemeConfig=Xh0});var A4=H((lV)=>{Object.defineProperty(lV,"__esModule",{value:!0});lV.commonParams=lV.resolveClientEndpointParameters=void 0;var Qh0=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,useGlobalEndpoint:f.useGlobalEndpoint??!1,defaultSigningName:"sts"})};lV.resolveClientEndpointParameters=Qh0;lV.commonParams={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 FP=H((UP)=>{Object.defineProperty(UP,"__esModule",{value:!0});UP.ruleSet=void 0;var pV="required",u="type",W0="fn",B0="argv",bh="ref",bV=!1,K6=!0,vh="booleanEquals",h1="stringEquals",oV="sigv4",uV="sts",tV="us-east-1",N0="endpoint",mV="https://sts.{Region}.{PartitionResult#dnsSuffix}",Pf="tree",is="error",Z6="getAttr",dV={[pV]:!1,[u]:"String"},M6={[pV]:!0,default:!1,[u]:"Boolean"},fP={[bh]:"Endpoint"},iV={[W0]:"isSet",[B0]:[{[bh]:"Region"}]},w1={[bh]:"Region"},cV={[W0]:"aws.partition",[B0]:[w1],assign:"PartitionResult"},hP={[bh]:"UseFIPS"},wP={[bh]:"UseDualStack"},U1={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:oV,signingName:uV,signingRegion:tV}]},headers:{}},Z1={},gV={conditions:[{[W0]:h1,[B0]:[w1,"aws-global"]}],[N0]:U1,[u]:N0},sP={[W0]:vh,[B0]:[hP,!0]},$P={[W0]:vh,[B0]:[wP,!0]},xV={[W0]:Z6,[B0]:[{[bh]:"PartitionResult"},"supportsFIPS"]},EP={[bh]:"PartitionResult"},_V={[W0]:vh,[B0]:[!0,{[W0]:Z6,[B0]:[EP,"supportsDualStack"]}]},nV=[{[W0]:"isSet",[B0]:[fP]}],eV=[sP],aV=[$P],Mh0={version:"1.0",parameters:{Region:dV,UseDualStack:M6,UseFIPS:M6,Endpoint:dV,UseGlobalEndpoint:M6},rules:[{conditions:[{[W0]:vh,[B0]:[{[bh]:"UseGlobalEndpoint"},K6]},{[W0]:"not",[B0]:nV},iV,cV,{[W0]:vh,[B0]:[hP,bV]},{[W0]:vh,[B0]:[wP,bV]}],rules:[{conditions:[{[W0]:h1,[B0]:[w1,"ap-northeast-1"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"ap-south-1"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"ap-southeast-1"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"ap-southeast-2"]}],endpoint:U1,[u]:N0},gV,{conditions:[{[W0]:h1,[B0]:[w1,"ca-central-1"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"eu-central-1"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"eu-north-1"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"eu-west-1"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"eu-west-2"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"eu-west-3"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"sa-east-1"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,tV]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"us-east-2"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"us-west-1"]}],endpoint:U1,[u]:N0},{conditions:[{[W0]:h1,[B0]:[w1,"us-west-2"]}],endpoint:U1,[u]:N0},{endpoint:{url:mV,properties:{authSchemes:[{name:oV,signingName:uV,signingRegion:"{Region}"}]},headers:Z1},[u]:N0}],[u]:Pf},{conditions:nV,rules:[{conditions:eV,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[u]:is},{conditions:aV,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[u]:is},{endpoint:{url:fP,properties:Z1,headers:Z1},[u]:N0}],[u]:Pf},{conditions:[iV],rules:[{conditions:[cV],rules:[{conditions:[sP,$P],rules:[{conditions:[{[W0]:vh,[B0]:[K6,xV]},_V],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z1,headers:Z1},[u]:N0}],[u]:Pf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[u]:is}],[u]:Pf},{conditions:eV,rules:[{conditions:[{[W0]:vh,[B0]:[xV,K6]}],rules:[{conditions:[{[W0]:h1,[B0]:[{[W0]:Z6,[B0]:[EP,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Z1,headers:Z1},[u]:N0},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Z1,headers:Z1},[u]:N0}],[u]:Pf},{error:"FIPS is enabled but this partition does not support FIPS",[u]:is}],[u]:Pf},{conditions:aV,rules:[{conditions:[_V],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Z1,headers:Z1},[u]:N0}],[u]:Pf},{error:"DualStack is enabled but this partition does not support DualStack",[u]:is}],[u]:Pf},gV,{endpoint:{url:mV,properties:Z1,headers:Z1},[u]:N0}],[u]:Pf}],[u]:Pf},{error:"Invalid Configuration: Missing Region",[u]:is}]};UP.ruleSet=Mh0});var IP=H((rP)=>{Object.defineProperty(rP,"__esModule",{value:!0});rP.defaultEndpointResolver=void 0;var Zh0=lE(),J6=jE(),Jh0=FP(),Vh0=new J6.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Ph0=(f,h={})=>{return Vh0.get(f,()=>J6.resolveEndpoint(Jh0.ruleSet,{endpointParams:f,logger:h.logger}))};rP.defaultEndpointResolver=Ph0;J6.customEndpointFunctions.aws=Zh0.awsEndpointFunctions});var AP=H((WP)=>{Object.defineProperty(WP,"__esModule",{value:!0});WP.getRuntimeConfig=void 0;var Hh0=j0(),Nh0=b0(),Dh0=Z0(),qh0=w4(),LP=Gh(),GP=u1(),kh0=Q6(),yh0=IP(),jh0=(f)=>{return{apiVersion:"2011-06-15",base64Decoder:f?.base64Decoder??LP.fromBase64,base64Encoder:f?.base64Encoder??LP.toBase64,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??yh0.defaultEndpointResolver,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??kh0.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new Hh0.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Nh0.NoAuthSigner}],logger:f?.logger??new Dh0.NoOpLogger,serviceId:f?.serviceId??"STS",urlParser:f?.urlParser??qh0.parseUrl,utf8Decoder:f?.utf8Decoder??GP.fromUtf8,utf8Encoder:f?.utf8Encoder??GP.toUtf8}};WP.getRuntimeConfig=jh0});var KP=H((YP)=>{Object.defineProperty(YP,"__esModule",{value:!0});YP.getRuntimeConfig=void 0;var Oh0=k5(),lh0=Oh0.__importDefault(l8()),zP=j0(),RP=b8(),HU=zs(),vh0=b0(),bh0=i8(),XP=$4(),cs=Ss(),SP=B5(),mh0=c8(),dh0=hU(),ih0=AP(),ch0=Z0(),gh0=t8(),xh0=Z0(),_h0=(f)=>{xh0.emitWarningIfUnsupportedVersion(process.version);let h=gh0.resolveDefaultsModeConfig(f),w=()=>h().then(ch0.loadConfigsForDefaultMode),s=ih0.getRuntimeConfig(f);zP.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??mh0.calculateBodyLength,defaultUserAgentProvider:f?.defaultUserAgentProvider??RP.createDefaultUserAgentProvider({serviceId:s.serviceId,clientVersion:lh0.default.version}),httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(E)=>E.getIdentityProvider("aws.auth#sigv4")||(async(U)=>await f.credentialDefaultProvider(U?.__config||{})()),signer:new zP.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(E)=>E.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new vh0.NoAuthSigner}],maxAttempts:f?.maxAttempts??cs.loadConfig(XP.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,f),region:f?.region??cs.loadConfig(HU.NODE_REGION_CONFIG_OPTIONS,{...HU.NODE_REGION_CONFIG_FILE_OPTIONS,...$}),requestHandler:SP.NodeHttpHandler.create(f?.requestHandler??w),retryMode:f?.retryMode??cs.loadConfig({...XP.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await w()).retryMode||dh0.DEFAULT_RETRY_MODE},f),sha256:f?.sha256??bh0.Hash.bind(null,"sha256"),streamCollector:f?.streamCollector??SP.streamCollector,useDualstackEndpoint:f?.useDualstackEndpoint??cs.loadConfig(HU.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,$),useFipsEndpoint:f?.useFipsEndpoint??cs.loadConfig(HU.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,$),userAgentAppId:f?.userAgentAppId??cs.loadConfig(RP.NODE_APP_ID_CONFIG_OPTIONS,$)}};YP.getRuntimeConfig=_h0});var JP=H((MP)=>{Object.defineProperty(MP,"__esModule",{value:!0});MP.resolveHttpAuthRuntimeConfig=MP.getHttpAuthExtensionConfiguration=void 0;var nh0=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let E=h.findIndex((U)=>U.schemeId===$.schemeId);if(E===-1)h.push($);else h.splice(E,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}};MP.getHttpAuthExtensionConfiguration=nh0;var eh0=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};MP.resolveHttpAuthRuntimeConfig=eh0});var kP=H((DP)=>{Object.defineProperty(DP,"__esModule",{value:!0});DP.resolveRuntimeExtensions=void 0;var VP=f6(),PP=u0(),HP=Z0(),NP=JP(),ph0=(f,h)=>{let w=Object.assign(VP.getAwsRegionExtensionConfiguration(f),HP.getDefaultExtensionConfiguration(f),PP.getHttpHandlerExtensionConfiguration(f),NP.getHttpAuthExtensionConfiguration(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,VP.resolveAwsRegionExtensionConfiguration(w),HP.resolveDefaultRuntimeConfig(w),PP.resolveHttpHandlerRuntimeConfig(w),NP.resolveHttpAuthRuntimeConfig(w))};DP.resolveRuntimeExtensions=ph0});var B4=H((P6)=>{Object.defineProperty(P6,"__esModule",{value:!0});P6.STSClient=P6.__Client=void 0;var yP=s8(),oh0=E8(),uh0=T8(),jP=mE(),th0=zs(),V6=b0(),fw0=A8(),hw0=Ys(),OP=$4(),vP=Z0();Object.defineProperty(P6,"__Client",{enumerable:!0,get:function(){return vP.Client}});var lP=Q6(),ww0=A4(),sw0=KP(),$w0=kP();class bP extends vP.Client{config;constructor(...[f]){let h=sw0.getRuntimeConfig(f||{});super(h);this.initConfig=h;let w=ww0.resolveClientEndpointParameters(h),s=jP.resolveUserAgentConfig(w),$=OP.resolveRetryConfig(s),E=th0.resolveRegionConfig($),U=yP.resolveHostHeaderConfig(E),T=hw0.resolveEndpointConfig(U),F=lP.resolveHttpAuthSchemeConfig(T),r=$w0.resolveRuntimeExtensions(F,f?.extensions||[]);this.config=r,this.middlewareStack.use(jP.getUserAgentPlugin(this.config)),this.middlewareStack.use(OP.getRetryPlugin(this.config)),this.middlewareStack.use(fw0.getContentLengthPlugin(this.config)),this.middlewareStack.use(yP.getHostHeaderPlugin(this.config)),this.middlewareStack.use(oh0.getLoggerPlugin(this.config)),this.middlewareStack.use(uh0.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(V6.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:lP.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(C)=>new V6.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(V6.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}P6.STSClient=bP});var Er=H((cS0,$r)=>{var{defineProperty:NU,getOwnPropertyDescriptor:Ew0,getOwnPropertyNames:Uw0}=Object,Tw0=Object.prototype.hasOwnProperty,e=(f,h)=>NU(f,"name",{value:h,configurable:!0}),Fw0=(f,h)=>{for(var w in h)NU(f,w,{get:h[w],enumerable:!0})},o6=(f,h,w,s)=>{if(h&&typeof h==="object"||typeof h==="function"){for(let $ of Uw0(h))if(!Tw0.call(f,$)&&$!==w)NU(f,$,{get:()=>h[$],enumerable:!(s=Ew0(h,$))||s.enumerable})}return f},rw0=(f,h,w)=>(o6(f,h,"default"),w&&o6(w,h,"default")),Cw0=(f)=>o6(NU({},"__esModule",{value:!0}),f),t6={};Fw0(t6,{AssumeRoleCommand:()=>wr,AssumeRoleResponseFilterSensitiveLog:()=>cP,AssumeRoleWithWebIdentityCommand:()=>sr,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>pP,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>oP,ClientInputEndpointParameters:()=>ws0.ClientInputEndpointParameters,CredentialsFilterSensitiveLog:()=>fr,ExpiredTokenException:()=>gP,IDPCommunicationErrorException:()=>uP,IDPRejectedClaimException:()=>eP,InvalidIdentityTokenException:()=>aP,MalformedPolicyDocumentException:()=>xP,PackedPolicyTooLargeException:()=>_P,RegionDisabledException:()=>nP,STS:()=>rH,STSServiceException:()=>fh,decorateDefaultCredentialProvider:()=>Es0,getDefaultRoleAssumer:()=>BH,getDefaultRoleAssumerWithWebIdentity:()=>AH});$r.exports=Cw0(t6);rw0(t6,B4(),$r.exports);var Iw0=Z0(),Lw0=Ys(),Gw0=N(),Ww0=Z0(),Bw0=A4(),iP=Z0(),Aw0=Z0(),fh=class f extends Aw0.ServiceException{static{e(this,"STSServiceException")}constructor(h){super(h);Object.setPrototypeOf(this,f.prototype)}},fr=e((f)=>({...f,...f.SecretAccessKey&&{SecretAccessKey:iP.SENSITIVE_STRING}}),"CredentialsFilterSensitiveLog"),cP=e((f)=>({...f,...f.Credentials&&{Credentials:fr(f.Credentials)}}),"AssumeRoleResponseFilterSensitiveLog"),gP=class f extends fh{static{e(this,"ExpiredTokenException")}name="ExpiredTokenException";$fault="client";constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},xP=class f extends fh{static{e(this,"MalformedPolicyDocumentException")}name="MalformedPolicyDocumentException";$fault="client";constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},_P=class f extends fh{static{e(this,"PackedPolicyTooLargeException")}name="PackedPolicyTooLargeException";$fault="client";constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},nP=class f extends fh{static{e(this,"RegionDisabledException")}name="RegionDisabledException";$fault="client";constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},eP=class f extends fh{static{e(this,"IDPRejectedClaimException")}name="IDPRejectedClaimException";$fault="client";constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},aP=class f extends fh{static{e(this,"InvalidIdentityTokenException")}name="InvalidIdentityTokenException";$fault="client";constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},pP=e((f)=>({...f,...f.WebIdentityToken&&{WebIdentityToken:iP.SENSITIVE_STRING}}),"AssumeRoleWithWebIdentityRequestFilterSensitiveLog"),oP=e((f)=>({...f,...f.Credentials&&{Credentials:fr(f.Credentials)}}),"AssumeRoleWithWebIdentityResponseFilterSensitiveLog"),uP=class f extends fh{static{e(this,"IDPCommunicationErrorException")}name="IDPCommunicationErrorException";$fault="client";constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});Object.setPrototypeOf(this,f.prototype)}},hr=j0(),zw0=u0(),z0=Z0(),Rw0=e(async(f,h)=>{let w=$H,s;return s=FH({...Hw0(f,h),[UH]:nw0,[TH]:EH}),sH(h,w,"/",void 0,s)},"se_AssumeRoleCommand"),Xw0=e(async(f,h)=>{let w=$H,s;return s=FH({...Nw0(f,h),[UH]:ew0,[TH]:EH}),sH(h,w,"/",void 0,s)},"se_AssumeRoleWithWebIdentityCommand"),Sw0=e(async(f,h)=>{if(f.statusCode>=300)return tP(f,h);let w=await hr.parseXmlBody(f.body,h),s={};return s=lw0(w.AssumeRoleResult,h),{$metadata:hh(f),...s}},"de_AssumeRoleCommand"),Yw0=e(async(f,h)=>{if(f.statusCode>=300)return tP(f,h);let w=await hr.parseXmlBody(f.body,h),s={};return s=vw0(w.AssumeRoleWithWebIdentityResult,h),{$metadata:hh(f),...s}},"de_AssumeRoleWithWebIdentityCommand"),tP=e(async(f,h)=>{let w={...f,body:await hr.parseXmlErrorBody(f.body,h)},s=aw0(f,w.body);switch(s){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Qw0(w,h);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Jw0(w,h);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Vw0(w,h);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Pw0(w,h);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Kw0(w,h);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Mw0(w,h);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Zw0(w,h);default:let $=w.body;return _w0({output:f,parsedBody:$.Error,errorCode:s})}},"de_CommandError"),Qw0=e(async(f,h)=>{let w=f.body,s=bw0(w.Error,h),$=new gP({$metadata:hh(f),...s});return z0.decorateServiceException($,w)},"de_ExpiredTokenExceptionRes"),Kw0=e(async(f,h)=>{let w=f.body,s=mw0(w.Error,h),$=new uP({$metadata:hh(f),...s});return z0.decorateServiceException($,w)},"de_IDPCommunicationErrorExceptionRes"),Mw0=e(async(f,h)=>{let w=f.body,s=dw0(w.Error,h),$=new eP({$metadata:hh(f),...s});return z0.decorateServiceException($,w)},"de_IDPRejectedClaimExceptionRes"),Zw0=e(async(f,h)=>{let w=f.body,s=iw0(w.Error,h),$=new aP({$metadata:hh(f),...s});return z0.decorateServiceException($,w)},"de_InvalidIdentityTokenExceptionRes"),Jw0=e(async(f,h)=>{let w=f.body,s=cw0(w.Error,h),$=new xP({$metadata:hh(f),...s});return z0.decorateServiceException($,w)},"de_MalformedPolicyDocumentExceptionRes"),Vw0=e(async(f,h)=>{let w=f.body,s=gw0(w.Error,h),$=new _P({$metadata:hh(f),...s});return z0.decorateServiceException($,w)},"de_PackedPolicyTooLargeExceptionRes"),Pw0=e(async(f,h)=>{let w=f.body,s=xw0(w.Error,h),$=new nP({$metadata:hh(f),...s});return z0.decorateServiceException($,w)},"de_RegionDisabledExceptionRes"),Hw0=e((f,h)=>{let w={};if(f[ps]!=null)w[ps]=f[ps];if(f[os]!=null)w[os]=f[os];if(f[es]!=null){let s=fH(f[es],h);if(f[es]?.length===0)w.PolicyArns=[];Object.entries(s).forEach(([$,E])=>{let U=`PolicyArns.${$}`;w[U]=E})}if(f[ns]!=null)w[ns]=f[ns];if(f[_s]!=null)w[_s]=f[_s];if(f[x6]!=null){let s=Ow0(f[x6],h);if(f[x6]?.length===0)w.Tags=[];Object.entries(s).forEach(([$,E])=>{let U=`Tags.${$}`;w[U]=E})}if(f[n6]!=null){let s=jw0(f[n6],h);if(f[n6]?.length===0)w.TransitiveTagKeys=[];Object.entries(s).forEach(([$,E])=>{let U=`TransitiveTagKeys.${$}`;w[U]=E})}if(f[j6]!=null)w[j6]=f[j6];if(f[c6]!=null)w[c6]=f[c6];if(f[_6]!=null)w[_6]=f[_6];if(f[tf]!=null)w[tf]=f[tf];if(f[v6]!=null){let s=kw0(f[v6],h);if(f[v6]?.length===0)w.ProvidedContexts=[];Object.entries(s).forEach(([$,E])=>{let U=`ProvidedContexts.${$}`;w[U]=E})}return w},"se_AssumeRoleRequest"),Nw0=e((f,h)=>{let w={};if(f[ps]!=null)w[ps]=f[ps];if(f[os]!=null)w[os]=f[os];if(f[a6]!=null)w[a6]=f[a6];if(f[b6]!=null)w[b6]=f[b6];if(f[es]!=null){let s=fH(f[es],h);if(f[es]?.length===0)w.PolicyArns=[];Object.entries(s).forEach(([$,E])=>{let U=`PolicyArns.${$}`;w[U]=E})}if(f[ns]!=null)w[ns]=f[ns];if(f[_s]!=null)w[_s]=f[_s];return w},"se_AssumeRoleWithWebIdentityRequest"),fH=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let E=Dw0($,h);Object.entries(E).forEach(([U,T])=>{w[`member.${s}.${U}`]=T}),s++}return w},"se_policyDescriptorListType"),Dw0=e((f,h)=>{let w={};if(f[p6]!=null)w[p6]=f[p6];return w},"se_PolicyDescriptorType"),qw0=e((f,h)=>{let w={};if(f[l6]!=null)w[l6]=f[l6];if(f[k6]!=null)w[k6]=f[k6];return w},"se_ProvidedContext"),kw0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let E=qw0($,h);Object.entries(E).forEach(([U,T])=>{w[`member.${s}.${U}`]=T}),s++}return w},"se_ProvidedContextsListType"),yw0=e((f,h)=>{let w={};if(f[O6]!=null)w[O6]=f[O6];if(f[e6]!=null)w[e6]=f[e6];return w},"se_Tag"),jw0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;w[`member.${s}`]=$,s++}return w},"se_tagKeyListType"),Ow0=e((f,h)=>{let w={},s=1;for(let $ of f){if($===null)continue;let E=yw0($,h);Object.entries(E).forEach(([U,T])=>{w[`member.${s}.${U}`]=T}),s++}return w},"se_tagListType"),hH=e((f,h)=>{let w={};if(f[N6]!=null)w[N6]=z0.expectString(f[N6]);if(f[D6]!=null)w[D6]=z0.expectString(f[D6]);return w},"de_AssumedRoleUser"),lw0=e((f,h)=>{let w={};if(f[xs]!=null)w[xs]=wH(f[xs],h);if(f[gs]!=null)w[gs]=hH(f[gs],h);if(f[as]!=null)w[as]=z0.strictParseInt32(f[as]);if(f[tf]!=null)w[tf]=z0.expectString(f[tf]);return w},"de_AssumeRoleResponse"),vw0=e((f,h)=>{let w={};if(f[xs]!=null)w[xs]=wH(f[xs],h);if(f[i6]!=null)w[i6]=z0.expectString(f[i6]);if(f[gs]!=null)w[gs]=hH(f[gs],h);if(f[as]!=null)w[as]=z0.strictParseInt32(f[as]);if(f[m6]!=null)w[m6]=z0.expectString(f[m6]);if(f[q6]!=null)w[q6]=z0.expectString(f[q6]);if(f[tf]!=null)w[tf]=z0.expectString(f[tf]);return w},"de_AssumeRoleWithWebIdentityResponse"),wH=e((f,h)=>{let w={};if(f[H6]!=null)w[H6]=z0.expectString(f[H6]);if(f[d6]!=null)w[d6]=z0.expectString(f[d6]);if(f[g6]!=null)w[g6]=z0.expectString(f[g6]);if(f[y6]!=null)w[y6]=z0.expectNonNull(z0.parseRfc3339DateTimeWithOffset(f[y6]));return w},"de_Credentials"),bw0=e((f,h)=>{let w={};if(f[d0]!=null)w[d0]=z0.expectString(f[d0]);return w},"de_ExpiredTokenException"),mw0=e((f,h)=>{let w={};if(f[d0]!=null)w[d0]=z0.expectString(f[d0]);return w},"de_IDPCommunicationErrorException"),dw0=e((f,h)=>{let w={};if(f[d0]!=null)w[d0]=z0.expectString(f[d0]);return w},"de_IDPRejectedClaimException"),iw0=e((f,h)=>{let w={};if(f[d0]!=null)w[d0]=z0.expectString(f[d0]);return w},"de_InvalidIdentityTokenException"),cw0=e((f,h)=>{let w={};if(f[d0]!=null)w[d0]=z0.expectString(f[d0]);return w},"de_MalformedPolicyDocumentException"),gw0=e((f,h)=>{let w={};if(f[d0]!=null)w[d0]=z0.expectString(f[d0]);return w},"de_PackedPolicyTooLargeException"),xw0=e((f,h)=>{let w={};if(f[d0]!=null)w[d0]=z0.expectString(f[d0]);return w},"de_RegionDisabledException"),hh=e((f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]}),"deserializeMetadata"),_w0=z0.withBaseException(fh),sH=e(async(f,h,w,s,$)=>{let{hostname:E,protocol:U="https",port:T,path:F}=await f.endpoint(),r={protocol:U,hostname:E,port:T,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+w:F+w,headers:h};if(s!==void 0)r.hostname=s;if($!==void 0)r.body=$;return new zw0.HttpRequest(r)},"buildHttpRpcRequest"),$H={"content-type":"application/x-www-form-urlencoded"},EH="2011-06-15",UH="Action",H6="AccessKeyId",nw0="AssumeRole",N6="AssumedRoleId",gs="AssumedRoleUser",ew0="AssumeRoleWithWebIdentity",D6="Arn",q6="Audience",xs="Credentials",k6="ContextAssertion",_s="DurationSeconds",y6="Expiration",j6="ExternalId",O6="Key",ns="Policy",es="PolicyArns",l6="ProviderArn",v6="ProvidedContexts",b6="ProviderId",as="PackedPolicySize",m6="Provider",ps="RoleArn",os="RoleSessionName",d6="SecretAccessKey",i6="SubjectFromWebIdentityToken",tf="SourceIdentity",c6="SerialNumber",g6="SessionToken",x6="Tags",_6="TokenCode",n6="TransitiveTagKeys",TH="Version",e6="Value",a6="WebIdentityToken",p6="arn",d0="message",FH=e((f)=>Object.entries(f).map(([h,w])=>z0.extendedEncodeURIComponent(h)+"="+z0.extendedEncodeURIComponent(w)).join("&"),"buildFormUrlencodedString"),aw0=e((f,h)=>{if(h.Error?.Code!==void 0)return h.Error.Code;if(f.statusCode==404)return"NotFound"},"loadQueryErrorCode"),wr=class extends Ww0.Command.classBuilder().ep(Bw0.commonParams).m(function(f,h,w,s){return[Gw0.getSerdePlugin(w,this.serialize,this.deserialize),Lw0.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,cP).ser(Rw0).de(Sw0).build(){static{e(this,"AssumeRoleCommand")}},pw0=Ys(),ow0=N(),uw0=Z0(),tw0=A4(),sr=class extends uw0.Command.classBuilder().ep(tw0.commonParams).m(function(f,h,w,s){return[ow0.getSerdePlugin(w,this.serialize,this.deserialize),pw0.getEndpointPlugin(w,f.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(pP,oP).ser(Xw0).de(Yw0).build(){static{e(this,"AssumeRoleWithWebIdentityCommand")}},fs0=B4(),hs0={AssumeRoleCommand:wr,AssumeRoleWithWebIdentityCommand:sr},rH=class extends fs0.STSClient{static{e(this,"STS")}};Iw0.createAggregatedClient(hs0,rH);var ws0=A4(),u6=C1(),dP="us-east-1",CH=e((f)=>{if(typeof f?.Arn==="string"){let h=f.Arn.split(":");if(h.length>4&&h[4]!=="")return h[4]}return},"getAccountIdFromAssumedRoleUser"),IH=e(async(f,h,w)=>{let s=typeof f==="function"?await f():f,$=typeof h==="function"?await h():h;return w?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${s} (provider)`,`${$} (parent client)`,`${dP} (STS default)`),s??$??dP},"resolveRegion"),ss0=e((f,h)=>{let w,s;return async($,E)=>{if(s=$,!w){let{logger:C=f?.parentClientConfig?.logger,region:I,requestHandler:L=f?.parentClientConfig?.requestHandler,credentialProviderLogger:B}=f,R=await IH(I,f?.parentClientConfig?.region,B),K=!LH(L);w=new h({profile:f?.parentClientConfig?.profile,credentialDefaultProvider:e(()=>async()=>s,"credentialDefaultProvider"),region:R,requestHandler:K?L:void 0,logger:C})}let{Credentials:U,AssumedRoleUser:T}=await w.send(new wr(E));if(!U||!U.AccessKeyId||!U.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${E.RoleArn}`);let F=CH(T),r={accessKeyId:U.AccessKeyId,secretAccessKey:U.SecretAccessKey,sessionToken:U.SessionToken,expiration:U.Expiration,...U.CredentialScope&&{credentialScope:U.CredentialScope},...F&&{accountId:F}};return u6.setCredentialFeature(r,"CREDENTIALS_STS_ASSUME_ROLE","i"),r}},"getDefaultRoleAssumer"),$s0=e((f,h)=>{let w;return async(s)=>{if(!w){let{logger:F=f?.parentClientConfig?.logger,region:r,requestHandler:C=f?.parentClientConfig?.requestHandler,credentialProviderLogger:I}=f,L=await IH(r,f?.parentClientConfig?.region,I),B=!LH(C);w=new h({profile:f?.parentClientConfig?.profile,region:L,requestHandler:B?C:void 0,logger:F})}let{Credentials:$,AssumedRoleUser:E}=await w.send(new sr(s));if(!$||!$.AccessKeyId||!$.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${s.RoleArn}`);let U=CH(E),T={accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.SessionToken,expiration:$.Expiration,...$.CredentialScope&&{credentialScope:$.CredentialScope},...U&&{accountId:U}};if(U)u6.setCredentialFeature(T,"RESOLVED_ACCOUNT_ID","T");return u6.setCredentialFeature(T,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),T}},"getDefaultRoleAssumerWithWebIdentity"),LH=e((f)=>{return f?.metadata?.handlerProtocol==="h2"},"isH2"),GH=B4(),WH=e((f,h)=>{if(!h)return f;else return class w extends f{static{e(this,"CustomizableSTSClient")}constructor(s){super(s);for(let $ of h)this.middlewareStack.use($)}}},"getCustomizableStsClientCtor"),BH=e((f={},h)=>ss0(f,WH(GH.STSClient,h)),"getDefaultRoleAssumer"),AH=e((f={},h)=>$s0(f,WH(GH.STSClient,h)),"getDefaultRoleAssumerWithWebIdentity"),Es0=e((f)=>(h)=>f({roleAssumer:BH(h),roleAssumerWithWebIdentity:AH(h),...h}),"decorateDefaultCredentialProvider")});var Ur,RH=(f,{profile:h="default",logger:w}={})=>{return Boolean(f)&&typeof f==="object"&&typeof f.role_arn==="string"&&["undefined","string"].indexOf(typeof f.role_session_name)>-1&&["undefined","string"].indexOf(typeof f.external_id)>-1&&["undefined","string"].indexOf(typeof f.mfa_serial)>-1&&(Us0(f,{profile:h,logger:w})||Ts0(f,{profile:h,logger:w}))},Us0=(f,{profile:h,logger:w})=>{let s=typeof f.source_profile==="string"&&typeof f.credential_source==="undefined";if(s)w?.debug?.(` ${h} isAssumeRoleWithSourceProfile source_profile=${f.source_profile}`);return s},Ts0=(f,{profile:h,logger:w})=>{let s=typeof f.credential_source==="string"&&typeof f.source_profile==="undefined";if(s)w?.debug?.(` ${h} isCredentialSourceProfile credential_source=${f.credential_source}`);return s},XH=async(f,h,w,s={})=>{w.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let $=h[f],{source_profile:E,region:U}=$;if(!w.roleAssumer){let{getDefaultRoleAssumer:F}=await Promise.resolve().then(() => Y(Er(),1));w.roleAssumer=F({...w.clientConfig,credentialProviderLogger:w.logger,parentClientConfig:{...w?.parentClientConfig,region:U??w?.parentClientConfig?.region}},w.clientPlugins)}if(E&&E in s)throw new a(`Detected a cycle attempting to resolve credentials for profile ${k1(w)}. Profiles visited: `+Object.keys(s).join(", "),{logger:w.logger});w.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${E?`source_profile=[${E}]`:`profile=[${f}]`}`);let T=E?DU(E,h,w,{...s,[E]:!0},zH(h[E]??{})):(await DV($.credential_source,f,w.logger)(w))();if(zH($))return T.then((F)=>Ur.setCredentialFeature(F,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let F={RoleArn:$.role_arn,RoleSessionName:$.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:$.external_id,DurationSeconds:parseInt($.duration_seconds||"3600",10)},{mfa_serial:r}=$;if(r){if(!w.mfaCodeProvider)throw new a(`Profile ${f} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:w.logger,tryNextLink:!1});F.SerialNumber=r,F.TokenCode=await w.mfaCodeProvider(r)}let C=await T;return w.roleAssumer(C,F).then((I)=>Ur.setCredentialFeature(I,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},zH=(f)=>{return!f.role_arn&&!!f.credential_source};var SH=G(()=>{Ur=Y(C1(),1);S0();hf();qV();Tr()});var YH,QH=(f,h,w)=>{if(h.Version!==1)throw Error(`Profile ${f} credential_process did not return Version 1.`);if(h.AccessKeyId===void 0||h.SecretAccessKey===void 0)throw Error(`Profile ${f} credential_process returned invalid credentials.`);if(h.Expiration){let E=new Date;if(new Date(h.Expiration)<E)throw Error(`Profile ${f} credential_process returned expired credentials.`)}let s=h.AccountId;if(!s&&w?.[f]?.aws_account_id)s=w[f].aws_account_id;let $={accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,...h.SessionToken&&{sessionToken:h.SessionToken},...h.Expiration&&{expiration:new Date(h.Expiration)},...h.CredentialScope&&{credentialScope:h.CredentialScope},...s&&{accountId:s}};return YH.setCredentialFeature($,"CREDENTIALS_PROCESS","w"),$};var KH=G(()=>{YH=Y(C1(),1)});import{exec as Fs0}from"node:child_process";import{promisify as rs0}from"node:util";var MH=async(f,h,w)=>{let s=h[f];if(h[f]){let $=s.credential_process;if($!==void 0){let E=rs0(Fs0);try{let{stdout:U}=await E($),T;try{T=JSON.parse(U.trim())}catch{throw Error(`Profile ${f} credential_process returned invalid JSON.`)}return QH(f,T,h)}catch(U){throw new a(U.message,{logger:w})}}else throw new a(`Profile ${f} did not contain credential_process.`,{logger:w})}else throw new a(`Profile ${f} could not be found in shared credentials file.`,{logger:w})};var ZH=G(()=>{S0();KH()});var Cs0=(f={})=>async({callerClientConfig:h}={})=>{f.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");let w=await Zh(f);return MH(k1({profile:f.profile??h?.profile}),w,f.logger)};var JH=G(()=>{hf();ZH()});var Fr={};Ch(Fr,{fromProcess:()=>Cs0});var rr=G(()=>{JH()});var VH,PH=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.credential_process==="string",HH=async(f,h)=>Promise.resolve().then(() => (rr(),Fr)).then(({fromProcess:w})=>w({...f,profile:h})().then((s)=>VH.setCredentialFeature(s,"CREDENTIALS_PROFILE_PROCESS","v")));var NH=G(()=>{VH=Y(C1(),1)});var Cr,DH=async(f,h,w={})=>{let{fromSSO:s}=await Promise.resolve().then(() => (S6(),X6));return s({profile:f,logger:w.logger,parentClientConfig:w.parentClientConfig,clientConfig:w.clientConfig})().then(($)=>{if(h.sso_session)return Cr.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO","r");else return Cr.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},qH=(f)=>f&&(typeof f.sso_start_url==="string"||typeof f.sso_account_id==="string"||typeof f.sso_session==="string"||typeof f.sso_region==="string"||typeof f.sso_role_name==="string");var kH=G(()=>{Cr=Y(C1(),1)});var yH,Ir=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.aws_access_key_id==="string"&&typeof f.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof f.aws_session_token)>-1&&["undefined","string"].indexOf(typeof f.aws_account_id)>-1,Lr=async(f,h)=>{h?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let w={accessKeyId:f.aws_access_key_id,secretAccessKey:f.aws_secret_access_key,sessionToken:f.aws_session_token,...f.aws_credential_scope&&{credentialScope:f.aws_credential_scope},...f.aws_account_id&&{accountId:f.aws_account_id}};return yH.setCredentialFeature(w,"CREDENTIALS_PROFILE","n")};var jH=G(()=>{yH=Y(C1(),1)});var Gr=(f)=>async(h)=>{f.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:w,roleSessionName:s,webIdentityToken:$,providerId:E,policyArns:U,policy:T,durationSeconds:F}=f,{roleAssumerWithWebIdentity:r}=f;if(!r){let{getDefaultRoleAssumerWithWebIdentity:C}=await Promise.resolve().then(() => Y(Er(),1));r=C({...f.clientConfig,credentialProviderLogger:f.logger,parentClientConfig:{...h?.callerClientConfig,...f.parentClientConfig}},f.clientPlugins)}return r({RoleArn:w,RoleSessionName:s??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:$,ProviderId:E,PolicyArns:U,Policy:T,DurationSeconds:F})};import{readFileSync as Is0}from"node:fs";var lH,OH="AWS_WEB_IDENTITY_TOKEN_FILE",Ls0="AWS_ROLE_ARN",Gs0="AWS_ROLE_SESSION_NAME",Ws0=(f={})=>async()=>{f.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let h=f?.webIdentityTokenFile??process.env[OH],w=f?.roleArn??process.env[Ls0],s=f?.roleSessionName??process.env[Gs0];if(!h||!w)throw new a("Web identity configuration not specified",{logger:f.logger});let $=await Gr({...f,webIdentityToken:Is0(h,{encoding:"ascii"}),roleArn:w,roleSessionName:s})();if(h===process.env[OH])lH.setCredentialFeature($,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return $};var vH=G(()=>{lH=Y(C1(),1);S0()});var Wr={};Ch(Wr,{fromWebToken:()=>Gr,fromTokenFile:()=>Ws0});var Br=G(()=>{vH()});var bH,mH=(f)=>Boolean(f)&&typeof f==="object"&&typeof f.web_identity_token_file==="string"&&typeof f.role_arn==="string"&&["undefined","string"].indexOf(typeof f.role_session_name)>-1,dH=async(f,h)=>Promise.resolve().then(() => (Br(),Wr)).then(({fromTokenFile:w})=>w({webIdentityTokenFile:f.web_identity_token_file,roleArn:f.role_arn,roleSessionName:f.role_session_name,roleAssumerWithWebIdentity:h.roleAssumerWithWebIdentity,logger:h.logger,parentClientConfig:h.parentClientConfig})().then((s)=>bH.setCredentialFeature(s,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var iH=G(()=>{bH=Y(C1(),1)});var DU=async(f,h,w,s={},$=!1)=>{let E=h[f];if(Object.keys(s).length>0&&Ir(E))return Lr(E,w);if($||RH(E,{profile:f,logger:w.logger}))return XH(f,h,w,s);if(Ir(E))return Lr(E,w);if(mH(E))return dH(E,w);if(PH(E))return HH(w,f);if(qH(E))return await DH(f,E,w);throw new a(`Could not resolve credentials using profile: [${f}] in configuration/credentials file(s).`,{logger:w.logger})};var Tr=G(()=>{S0();SH();NH();kH();jH();iH()});var Bs0=(f={})=>async({callerClientConfig:h}={})=>{let w={...f,parentClientConfig:{...h,...f.parentClientConfig}};w.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let s=await Zh(w);return DU(k1({profile:f.profile??h?.profile}),s,w)};var cH=G(()=>{hf();Tr()});var gH={};Ch(gH,{fromIni:()=>Bs0});var xH=G(()=>{cH()});w5();s5();$5();j$();Kh();var ts=Y(b0(),1);fE();q();Uw();J();var tS=Y(j0(),1);gf();var fY=async(f,h,w)=>{return{operation:Yh(h).operation,region:await L1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function Ae(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}var hY=(f)=>{let h=[];switch(f.operation){default:h.push(Ae(f))}return h},wY=(f)=>{let h=tS.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};var sY=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.useFipsEndpoint??!1,defaultSigningName:"route53"})},M={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var $Y={name:"@aws-sdk/client-route-53",description:"AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",version:"3.777.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/core":"3.775.0","@aws-sdk/credential-provider-node":"3.777.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-sdk-route53":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@aws-sdk/xml-builder":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.3",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.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 CN=Y(j0(),1);b3();S0();hf();S0();var w9="AWS_EC2_METADATA_DISABLED",s9=async(f)=>{let{ENV_CMDS_FULL_URI:h,ENV_CMDS_RELATIVE_URI:w,fromContainerMetadata:s,fromInstanceMetadata:$}=await Promise.resolve().then(() => (a$(),e$));if(process.env[w]||process.env[h]){f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:E}=await Promise.resolve().then(() => (h8(),f8));return xf(E(f),s(f))}if(process.env[w9]&&process.env[w9]!=="false")return async()=>{throw new a("EC2 Instance Metadata Service access disabled",{logger:f.logger})};return f.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),$(f)};var _H=!1,qU=(f={})=>fw(xf(async()=>{if(f.profile??process.env[ZR]){if(process.env[XE]&&process.env[SE]){if(!_H)(f.logger?.warn&&f.logger?.constructor?.name!=="NoOpLogger"?f.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
51
- Multiple credential sources detected:
52
- Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
53
- This SDK will proceed with the AWS_PROFILE value.
54
-
55
- However, a future version may change this behavior to prefer the ENV static credentials.
56
- Please ensure that your environment only sets either the AWS_PROFILE or the
57
- AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
58
- `),_H=!0}throw new a("AWS_PROFILE is set, skipping fromEnv provider.",{logger:f.logger,tryNextLink:!0})}return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),v3(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:h,ssoAccountId:w,ssoRegion:s,ssoRoleName:$,ssoSession:E}=f;if(!h&&!w&&!s&&!$&&!E)throw new a("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:f.logger});let{fromSSO:U}=await Promise.resolve().then(() => (S6(),X6));return U(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:h}=await Promise.resolve().then(() => (xH(),gH));return h(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:h}=await Promise.resolve().then(() => (rr(),Fr));return h(f)()},async()=>{f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:h}=await Promise.resolve().then(() => (Br(),Wr));return h(f)()},async()=>{return f.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await s9(f))()},async()=>{throw new a("Could not load credentials from any providers",{tryNextLink:!1,logger:f.logger})}),zs0,As0),As0=(f)=>f?.expiration!==void 0,zs0=(f)=>f?.expiration!==void 0&&f.expiration.getTime()-Date.now()<300000;WU();Kh();BU();Uw();Jh();o$();AU();wf();var FN=Y(j0(),1);J();aw();zU();ys();Z$();cf();var nH={["required"]:!1,type:"String"},eH={["required"]:!0,default:!1,type:"Boolean"},aH={["ref"]:"Endpoint"},kU={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},EN={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},s1={},pH={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},us={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},Iw={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},wh={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},oH={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},uH={["fn"]:"stringEquals",["argv"]:[us,"aws-us-gov"]},tH={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},fN={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},hN={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},wN=[kU],sN=[EN],$N=[{["ref"]:"Region"}],Rs0={version:"1.0",parameters:{Region:nH,UseDualStack:eH,UseFIPS:eH,Endpoint:nH},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[aH]}],rules:[{conditions:wN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:sN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:aH,properties:s1,headers:s1},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:$N}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:$N,assign:"PartitionResult"}],rules:[{conditions:[pH,Iw,wh],endpoint:{url:"https://route53.amazonaws.com",properties:oH,headers:s1},type:"endpoint"},{conditions:[pH,kU,wh],endpoint:{url:"https://route53-fips.amazonaws.com",properties:oH,headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[us,"aws-cn"]},Iw,wh],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:s1},type:"endpoint"},{conditions:[uH,Iw,wh],endpoint:tH,type:"endpoint"},{conditions:[uH,kU,wh],endpoint:tH,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[us,"aws-iso"]},Iw,wh],endpoint:{url:"https://route53.c2s.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-iso-east-1"}]},headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[us,"aws-iso-b"]},Iw,wh],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isob-east-1"}]},headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[us,"aws-iso-e"]},Iw,wh],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"eu-isoe-west-1"}]},headers:s1},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[us,"aws-iso-f"]},Iw,wh],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:s1},type:"endpoint"},{conditions:[kU,EN],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,fN]},hN],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s1,headers:s1},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:wN,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[fN,!0]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:s1,headers:s1},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:sN,rules:[{conditions:[hN],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:s1,headers:s1},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:s1,headers:s1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},UN=Rs0;var Xs0=new _h({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),TN=(f,h={})=>{return Xs0.get(f,()=>nh(UN,{endpointParams:f,logger:h.logger}))};t1.aws=eh;var rN=(f)=>{return{apiVersion:"2013-04-01",base64Decoder:f?.base64Decoder??Os,base64Encoder:f?.base64Encoder??ls,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??TN,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??hY,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new FN.AwsSdkSigV4Signer}],logger:f?.logger??new nf,serviceId:f?.serviceId??"Route 53",urlParser:f?.urlParser??j1,utf8Decoder:f?.utf8Decoder??Vf,utf8Encoder:f?.utf8Encoder??ks}};J();RU();J();var IN=(f)=>{Fs(process.version);let h=vs(f),w=()=>h().then(Ts),s=rN(f);CN.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??js,credentialDefaultProvider:f?.credentialDefaultProvider??qU,defaultUserAgentProvider:f?.defaultUserAgentProvider??Ds({serviceId:s.serviceId,clientVersion:$Y.version}),maxAttempts:f?.maxAttempts??A0(fs,f),region:f?.region??A0(Qh,{...gw,...$}),requestHandler:Ef.create(f?.requestHandler??w),retryMode:f?.retryMode??A0({...ws,default:async()=>(await w()).retryMode||Vh},f),sha256:f?.sha256??rw.bind(null,"sha256"),streamCollector:f?.streamCollector??Ws,useDualstackEndpoint:f?.useDualstackEndpoint??A0(iw,$),useFipsEndpoint:f?.useFipsEndpoint??A0(cw,$),userAgentAppId:f?.userAgentAppId??A0(qs,$)}};XU();r1();J();var LN=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let E=h.findIndex((U)=>U.schemeId===$.schemeId);if(E===-1)h.push($);else h.splice(E,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},GN=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var WN=(f,h)=>{let w=Object.assign(bs(f),rs(f),Zw(f),LN(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,ms(w),Cs(w),Jw(w),GN(w))};class Ar extends $w{config;constructor(...[f]){let h=IN(f||{});super(h);this.initConfig=h;let w=sY(h),s=kw(w),$=hs(s),E=xw($),U=Vw(E),T=pw(U),F=wY(T),r=WN(F,f?.extensions||[]);this.config=r,this.middlewareStack.use(mw(this.config)),this.middlewareStack.use(Ls(this.config)),this.middlewareStack.use(_w(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(ts.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:fY,identityProviderConfigProvider:async(C)=>new ts.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(ts.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();var yU=/^\/(hostedzone|change|delegationset)\//;function Ss0(){return(f)=>async(h)=>{let{ChangeBatch:w}=h.input,s=[];for(let $ of w.Changes){let{AliasTarget:E}=$.ResourceRecordSet;if(E)s.push({...$,ResourceRecordSet:{...$.ResourceRecordSet,AliasTarget:{...E,HostedZoneId:E.HostedZoneId.replace(yU,"")}}});else s.push($)}return f({...h,input:{...h.input,ChangeBatch:{...w,Changes:s}}})}}var Ys0={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},BN=(f)=>({applyToStack:(h)=>{h.add(Ss0(),Ys0)}});var Qs0=["DelegationSetId","HostedZoneId","Id"];function Ks0(){return(f)=>async(h)=>{let w={...h.input};for(let s of Qs0){let $=w[s];if($)w[s]=$.replace(yU,"")}return f({...h,input:w})}}var Ms0={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},O=(f)=>({applyToStack:(h)=>{h.add(Ks0(),Ms0)}});q();var Rk=Y(N(),1);J();var _=Y(j0(),1);function AN(f){return f.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function zN(f){return f.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 zr{value;constructor(f){this.value=f}toString(){return zN(""+this.value)}}class P{name;children;attributes={};static of(f,h,w){let s=new P(f);if(h!==void 0)s.addChildNode(new zr(h));if(w!==void 0)s.withName(w);return s}constructor(f,h=[]){this.name=f,this.children=h}withName(f){return this.name=f,this}addAttribute(f,h){return this.attributes[f]=h,this}addChildNode(f){return this.children.push(f),this}removeAttribute(f){return delete this.attributes[f],this}n(f){return this.name=f,this}c(f){return this.children.push(f),this}a(f,h){if(h!=null)this.attributes[f]=h;return this}cc(f,h,w=h){if(f[h]!=null){let s=P.of(h,f[h]).withName(w);this.c(s)}}l(f,h,w,s){if(f[h]!=null)s().map((E)=>{E.withName(w),this.c(E)})}lc(f,h,w,s){if(f[h]!=null){let $=s(),E=new P(w);$.map((U)=>{E.c(U)}),this.c(E)}}toString(){let f=Boolean(this.children.length),h=`<${this.name}`,w=this.attributes;for(let s of Object.keys(w)){let $=w[s];if($!=null)h+=` ${s}="${AN(""+$)}"`}return h+=!f?"/>":`>${this.children.map((s)=>s.toString()).join("")}</${this.name}>`}}var d=Y(b0(),1);J();J();class m extends $f{constructor(f){super(f);Object.setPrototypeOf(this,m.prototype)}}class jU extends m{name="ConcurrentModification";$fault="client";constructor(f){super({name:"ConcurrentModification",$fault:"client",...f});Object.setPrototypeOf(this,jU.prototype)}}class OU extends m{name="InvalidInput";$fault="client";constructor(f){super({name:"InvalidInput",$fault:"client",...f});Object.setPrototypeOf(this,OU.prototype)}}class lU extends m{name="InvalidKeySigningKeyStatus";$fault="client";constructor(f){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...f});Object.setPrototypeOf(this,lU.prototype)}}class vU extends m{name="InvalidKMSArn";$fault="client";constructor(f){super({name:"InvalidKMSArn",$fault:"client",...f});Object.setPrototypeOf(this,vU.prototype)}}class bU extends m{name="InvalidSigningStatus";$fault="client";constructor(f){super({name:"InvalidSigningStatus",$fault:"client",...f});Object.setPrototypeOf(this,bU.prototype)}}class mU extends m{name="NoSuchKeySigningKey";$fault="client";constructor(f){super({name:"NoSuchKeySigningKey",$fault:"client",...f});Object.setPrototypeOf(this,mU.prototype)}}class dU extends m{name="ConflictingDomainExists";$fault="client";constructor(f){super({name:"ConflictingDomainExists",$fault:"client",...f});Object.setPrototypeOf(this,dU.prototype)}}class iU extends m{name="InvalidVPCId";$fault="client";constructor(f){super({name:"InvalidVPCId",$fault:"client",...f});Object.setPrototypeOf(this,iU.prototype)}}class cU extends m{name="LimitsExceeded";$fault="client";constructor(f){super({name:"LimitsExceeded",$fault:"client",...f});Object.setPrototypeOf(this,cU.prototype)}}class gU extends m{name="NoSuchHostedZone";$fault="client";constructor(f){super({name:"NoSuchHostedZone",$fault:"client",...f});Object.setPrototypeOf(this,gU.prototype)}}class xU extends m{name="NotAuthorizedException";$fault="client";constructor(f){super({name:"NotAuthorizedException",$fault:"client",...f});Object.setPrototypeOf(this,xU.prototype)}}class _U extends m{name="PriorRequestNotComplete";$fault="client";constructor(f){super({name:"PriorRequestNotComplete",$fault:"client",...f});Object.setPrototypeOf(this,_U.prototype)}}class nU extends m{name="PublicZoneVPCAssociation";$fault="client";constructor(f){super({name:"PublicZoneVPCAssociation",$fault:"client",...f});Object.setPrototypeOf(this,nU.prototype)}}class eU extends m{name="CidrBlockInUseException";$fault="client";Message;constructor(f){super({name:"CidrBlockInUseException",$fault:"client",...f});Object.setPrototypeOf(this,eU.prototype),this.Message=f.Message}}class aU extends m{name="CidrCollectionVersionMismatchException";$fault="client";Message;constructor(f){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...f});Object.setPrototypeOf(this,aU.prototype),this.Message=f.Message}}class pU extends m{name="NoSuchCidrCollectionException";$fault="client";Message;constructor(f){super({name:"NoSuchCidrCollectionException",$fault:"client",...f});Object.setPrototypeOf(this,pU.prototype),this.Message=f.Message}}class oU extends m{name="InvalidChangeBatch";$fault="client";messages;constructor(f){super({name:"InvalidChangeBatch",$fault:"client",...f});Object.setPrototypeOf(this,oU.prototype),this.messages=f.messages}}class uU extends m{name="NoSuchHealthCheck";$fault="client";constructor(f){super({name:"NoSuchHealthCheck",$fault:"client",...f});Object.setPrototypeOf(this,uU.prototype)}}class tU extends m{name="ThrottlingException";$fault="client";constructor(f){super({name:"ThrottlingException",$fault:"client",...f});Object.setPrototypeOf(this,tU.prototype)}}class f2 extends m{name="CidrCollectionAlreadyExistsException";$fault="client";Message;constructor(f){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...f});Object.setPrototypeOf(this,f2.prototype),this.Message=f.Message}}class h2 extends m{name="HealthCheckAlreadyExists";$fault="client";constructor(f){super({name:"HealthCheckAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,h2.prototype)}}class w2 extends m{name="TooManyHealthChecks";$fault="client";constructor(f){super({name:"TooManyHealthChecks",$fault:"client",...f});Object.setPrototypeOf(this,w2.prototype)}}class s2 extends m{name="DelegationSetNotAvailable";$fault="client";constructor(f){super({name:"DelegationSetNotAvailable",$fault:"client",...f});Object.setPrototypeOf(this,s2.prototype)}}class $2 extends m{name="DelegationSetNotReusable";$fault="client";constructor(f){super({name:"DelegationSetNotReusable",$fault:"client",...f});Object.setPrototypeOf(this,$2.prototype)}}class E2 extends m{name="HostedZoneAlreadyExists";$fault="client";constructor(f){super({name:"HostedZoneAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,E2.prototype)}}class U2 extends m{name="InvalidDomainName";$fault="client";constructor(f){super({name:"InvalidDomainName",$fault:"client",...f});Object.setPrototypeOf(this,U2.prototype)}}class T2 extends m{name="NoSuchDelegationSet";$fault="client";constructor(f){super({name:"NoSuchDelegationSet",$fault:"client",...f});Object.setPrototypeOf(this,T2.prototype)}}class F2 extends m{name="TooManyHostedZones";$fault="client";constructor(f){super({name:"TooManyHostedZones",$fault:"client",...f});Object.setPrototypeOf(this,F2.prototype)}}class r2 extends m{name="InvalidArgument";$fault="client";constructor(f){super({name:"InvalidArgument",$fault:"client",...f});Object.setPrototypeOf(this,r2.prototype)}}class C2 extends m{name="InvalidKeySigningKeyName";$fault="client";constructor(f){super({name:"InvalidKeySigningKeyName",$fault:"client",...f});Object.setPrototypeOf(this,C2.prototype)}}class I2 extends m{name="KeySigningKeyAlreadyExists";$fault="client";constructor(f){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,I2.prototype)}}class L2 extends m{name="TooManyKeySigningKeys";$fault="client";constructor(f){super({name:"TooManyKeySigningKeys",$fault:"client",...f});Object.setPrototypeOf(this,L2.prototype)}}class G2 extends m{name="InsufficientCloudWatchLogsResourcePolicy";$fault="client";constructor(f){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...f});Object.setPrototypeOf(this,G2.prototype)}}class W2 extends m{name="NoSuchCloudWatchLogsLogGroup";$fault="client";constructor(f){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...f});Object.setPrototypeOf(this,W2.prototype)}}class B2 extends m{name="QueryLoggingConfigAlreadyExists";$fault="client";constructor(f){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,B2.prototype)}}class A2 extends m{name="DelegationSetAlreadyCreated";$fault="client";constructor(f){super({name:"DelegationSetAlreadyCreated",$fault:"client",...f});Object.setPrototypeOf(this,A2.prototype)}}class z2 extends m{name="DelegationSetAlreadyReusable";$fault="client";constructor(f){super({name:"DelegationSetAlreadyReusable",$fault:"client",...f});Object.setPrototypeOf(this,z2.prototype)}}class R2 extends m{name="HostedZoneNotFound";$fault="client";constructor(f){super({name:"HostedZoneNotFound",$fault:"client",...f});Object.setPrototypeOf(this,R2.prototype)}}class X2 extends m{name="InvalidTrafficPolicyDocument";$fault="client";constructor(f){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...f});Object.setPrototypeOf(this,X2.prototype)}}class S2 extends m{name="TooManyTrafficPolicies";$fault="client";constructor(f){super({name:"TooManyTrafficPolicies",$fault:"client",...f});Object.setPrototypeOf(this,S2.prototype)}}class Y2 extends m{name="TrafficPolicyAlreadyExists";$fault="client";constructor(f){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,Y2.prototype)}}class Q2 extends m{name="NoSuchTrafficPolicy";$fault="client";constructor(f){super({name:"NoSuchTrafficPolicy",$fault:"client",...f});Object.setPrototypeOf(this,Q2.prototype)}}class K2 extends m{name="TooManyTrafficPolicyInstances";$fault="client";constructor(f){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...f});Object.setPrototypeOf(this,K2.prototype)}}class M2 extends m{name="TrafficPolicyInstanceAlreadyExists";$fault="client";constructor(f){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...f});Object.setPrototypeOf(this,M2.prototype)}}class Z2 extends m{name="TooManyTrafficPolicyVersionsForCurrentPolicy";$fault="client";constructor(f){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...f});Object.setPrototypeOf(this,Z2.prototype)}}class J2 extends m{name="TooManyVPCAssociationAuthorizations";$fault="client";constructor(f){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...f});Object.setPrototypeOf(this,J2.prototype)}}class V2 extends m{name="KeySigningKeyInParentDSRecord";$fault="client";constructor(f){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...f});Object.setPrototypeOf(this,V2.prototype)}}class P2 extends m{name="KeySigningKeyInUse";$fault="client";constructor(f){super({name:"KeySigningKeyInUse",$fault:"client",...f});Object.setPrototypeOf(this,P2.prototype)}}class H2 extends m{name="CidrCollectionInUseException";$fault="client";Message;constructor(f){super({name:"CidrCollectionInUseException",$fault:"client",...f});Object.setPrototypeOf(this,H2.prototype),this.Message=f.Message}}class N2 extends m{name="HealthCheckInUse";$fault="client";constructor(f){super({name:"HealthCheckInUse",$fault:"client",...f});Object.setPrototypeOf(this,N2.prototype)}}class D2 extends m{name="HostedZoneNotEmpty";$fault="client";constructor(f){super({name:"HostedZoneNotEmpty",$fault:"client",...f});Object.setPrototypeOf(this,D2.prototype)}}class q2 extends m{name="NoSuchQueryLoggingConfig";$fault="client";constructor(f){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...f});Object.setPrototypeOf(this,q2.prototype)}}class k2 extends m{name="DelegationSetInUse";$fault="client";constructor(f){super({name:"DelegationSetInUse",$fault:"client",...f});Object.setPrototypeOf(this,k2.prototype)}}class y2 extends m{name="TrafficPolicyInUse";$fault="client";constructor(f){super({name:"TrafficPolicyInUse",$fault:"client",...f});Object.setPrototypeOf(this,y2.prototype)}}class j2 extends m{name="NoSuchTrafficPolicyInstance";$fault="client";constructor(f){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...f});Object.setPrototypeOf(this,j2.prototype)}}class O2 extends m{name="VPCAssociationAuthorizationNotFound";$fault="client";constructor(f){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...f});Object.setPrototypeOf(this,O2.prototype)}}class l2 extends m{name="DNSSECNotFound";$fault="client";constructor(f){super({name:"DNSSECNotFound",$fault:"client",...f});Object.setPrototypeOf(this,l2.prototype)}}class v2 extends m{name="LastVPCAssociation";$fault="client";constructor(f){super({name:"LastVPCAssociation",$fault:"client",...f});Object.setPrototypeOf(this,v2.prototype)}}class b2 extends m{name="VPCAssociationNotFound";$fault="client";constructor(f){super({name:"VPCAssociationNotFound",$fault:"client",...f});Object.setPrototypeOf(this,b2.prototype)}}class m2 extends m{name="HostedZonePartiallyDelegated";$fault="client";constructor(f){super({name:"HostedZonePartiallyDelegated",$fault:"client",...f});Object.setPrototypeOf(this,m2.prototype)}}class d2 extends m{name="KeySigningKeyWithActiveStatusNotFound";$fault="client";constructor(f){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...f});Object.setPrototypeOf(this,d2.prototype)}}class i2 extends m{name="NoSuchChange";$fault="client";constructor(f){super({name:"NoSuchChange",$fault:"client",...f});Object.setPrototypeOf(this,i2.prototype)}}class c2 extends m{name="NoSuchGeoLocation";$fault="client";constructor(f){super({name:"NoSuchGeoLocation",$fault:"client",...f});Object.setPrototypeOf(this,c2.prototype)}}class g2 extends m{name="IncompatibleVersion";$fault="client";constructor(f){super({name:"IncompatibleVersion",$fault:"client",...f});Object.setPrototypeOf(this,g2.prototype)}}class x2 extends m{name="HostedZoneNotPrivate";$fault="client";constructor(f){super({name:"HostedZoneNotPrivate",$fault:"client",...f});Object.setPrototypeOf(this,x2.prototype)}}class _2 extends m{name="NoSuchCidrLocationException";$fault="client";Message;constructor(f){super({name:"NoSuchCidrLocationException",$fault:"client",...f});Object.setPrototypeOf(this,_2.prototype),this.Message=f.Message}}class n2 extends m{name="InvalidPaginationToken";$fault="client";constructor(f){super({name:"InvalidPaginationToken",$fault:"client",...f});Object.setPrototypeOf(this,n2.prototype)}}class e2 extends m{name="HealthCheckVersionMismatch";$fault="client";constructor(f){super({name:"HealthCheckVersionMismatch",$fault:"client",...f});Object.setPrototypeOf(this,e2.prototype)}}class a2 extends m{name="ConflictingTypes";$fault="client";constructor(f){super({name:"ConflictingTypes",$fault:"client",...f});Object.setPrototypeOf(this,a2.prototype)}}var ZN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("POST").h(s).b($),w.build()},JN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=i0;let E=new P(U50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)E.c(P.of(E50,f[F0]).n(F0));if(f[V0]!=null)E.c(x4(f[V0],h).n(V0));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},VN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/cidrcollection/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=i0;let E=new P(C50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(f,"Changes","Changes",()=>_$0(f[Gk],h)),f[p2]!=null)E.c(P.of(p2,String(f[p2])).n(p2));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},PN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=i0;let E=new P(Q50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[u2]!=null)E.c(c$0(f[u2],h).n(u2));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},HN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1),w.p("ResourceId",()=>f.ResourceId,"{ResourceId}",!1);let $;$=i0;let E=new P(K50);return E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(f,"AddTags","AddTags",()=>U40(f[$50],h)),E.lc(f,"RemoveTagKeys","RemoveTagKeys",()=>E40(f[t50],h)),$+=E.toString(),w.m("POST").h(s).b($),w.build()},NN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/cidrcollection");let $;$=i0;let E=new P(I50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[D0]!=null)E.c(P.of(R50,f[D0]).n(D0));if(f[p]!=null)E.c(P.of(X50,f[p]).n(p));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},DN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/healthcheck");let $;$=i0;let E=new P(L50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[D0]!=null)E.c(P.of(l50,f[D0]).n(D0));if(f[Kw]!=null)E.c(u$0(f[Kw],h).n(Kw));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},qN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone");let $;$=i0;let E=new P(G50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[D0]!=null)E.c(P.of(JC,f[D0]).n(D0));if(f[fT]!=null)E.c(P.of(jf,f[fT]).n(fT));if(f[hT]!=null)E.c(t$0(f[hT],h).n(hT));if(f[p]!=null)E.c(P.of(Bf,f[p]).n(p));if(f[V0]!=null)E.c(x4(f[V0],h).n(V0));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},kN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/keysigningkey");let $;$=i0;let E=new P(W50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[D0]!=null)E.c(P.of(JC,f[D0]).n(D0));if(f[f0]!=null)E.c(P.of(jf,f[f0]).n(f0));if(f[vr]!=null)E.c(P.of(sE0,f[vr]).n(vr));if(f[p]!=null)E.c(P.of(wE0,f[p]).n(p));if(f[B1]!=null)E.c(P.of($E0,f[B1]).n(B1));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},yN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/queryloggingconfig");let $;$=i0;let E=new P(S50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.cc(f,t2),f[f0]!=null)E.c(P.of(jf,f[f0]).n(f0));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},jN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/delegationset");let $;$=i0;let E=new P(Y50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[D0]!=null)E.c(P.of(JC,f[D0]).n(D0));if(f[f0]!=null)E.c(P.of(jf,f[f0]).n(f0));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},ON=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy");let $;$=i0;let E=new P(Z50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)E.c(P.of(PC,f[F0]).n(F0));if(f[$h]!=null)E.c(P.of(Ak,f[$h]).n($h));if(f[p]!=null)E.c(P.of(rE0,f[p]).n(p));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},lN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicyinstance");let $;$=i0;let E=new P(M50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[f0]!=null)E.c(P.of(jf,f[f0]).n(f0));if(f[p]!=null)E.c(P.of(Bf,f[p]).n(p));if(f[p0]!=null)E.c(P.of(p0,String(f[p0])).n(p0));if(E.cc(f,L$),f[c1]!=null)E.c(P.of(c1,String(f[c1])).n(c1));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},vN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=i0;let E=new P(J50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)E.c(P.of(PC,f[F0]).n(F0));if(f[$h]!=null)E.c(P.of(Ak,f[$h]).n($h));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},bN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=i0;let E=new P(V50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[V0]!=null)E.c(x4(f[V0],h).n(V0));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},mN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("POST").h(s).b($),w.build()},dN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},iN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},cN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},gN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1),w.p("Name",()=>f.Name,"{Name}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},xN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},_N=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},nN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},eN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("DELETE").h(s).b($),w.build()},aN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=i0;let E=new P(H50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[V0]!=null)E.c(x4(f[V0],h).n(V0));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},pN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("POST").h(s).b($),w.build()},oN=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;$=i0;let E=new P(D50);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)E.c(P.of(N50,f[F0]).n(F0));if(f[V0]!=null)E.c(x4(f[V0],h).n(V0));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},uN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("POST").h(s).b($),w.build()},tN=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/accountlimit/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1);let $;return w.m("GET").h(s).b($),w.build()},fD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/change/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},hD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/checkeripranges");let $;return w.m("GET").h(s).b($),w.build()},wD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/dnssec"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("GET").h(s).b($),w.build()},sD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/geolocation");let $=S({[zE0]:[,f[kf]],[RE0]:[,f[yf]],[HE0]:[,f[Of]]}),E;return w.m("GET").h(s).q($).b(E),w.build()},$D=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},ED=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheckcount");let $;return w.m("GET").h(s).b($),w.build()},UD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},TD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck/{HealthCheckId}/status"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;return w.m("GET").h(s).b($),w.build()},FD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},rD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonecount");let $;return w.m("GET").h(s).b($),w.build()},CD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $;return w.m("GET").h(s).b($),w.build()},ID=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},LD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},GD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}"),w.p("Type",()=>f.Type,"{Type}",!1),w.p("DelegationSetId",()=>f.DelegationSetId,"{DelegationSetId}",!1);let $;return w.m("GET").h(s).b($),w.build()},WD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;return w.m("GET").h(s).b($),w.build()},BD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;return w.m("GET").h(s).b($),w.build()},AD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstancecount");let $;return w.m("GET").h(s).b($),w.build()},zD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),w.p("CollectionId",()=>f.CollectionId,"{CollectionId}",!1);let $=S({[lf]:[,f[T1]],[W$]:[,f[q0]],[p4]:[()=>f.MaxResults!==void 0,()=>f[e4].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},RD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection");let $=S({[W$]:[,f[q0]],[p4]:[()=>f.MaxResults!==void 0,()=>f[e4].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},XD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/cidrcollection/{CollectionId}"),w.p("CollectionId",()=>f.CollectionId,"{CollectionId}",!1);let $=S({[W$]:[,f[q0]],[p4]:[()=>f.MaxResults!==void 0,()=>f[e4].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},SD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/geolocations");let $=S({[NE0]:[,f[fE0]],[DE0]:[,f[hE0]],[qE0]:[,f[FE0]],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},YD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/healthcheck");let $=S({[HC]:[,f[g1]],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},QD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone");let $=S({[HC]:[,f[g1]],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()],[XE0]:[,f[fT]],[KE0]:[,f[m50]]}),E;return w.m("GET").h(s).q($).b(E),w.build()},KD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonesbyname");let $=S({[SE0]:[,f[Bf]],[a4]:[,f[f0]],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},MD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzonesbyvpc");let $=S({[OE0]:[,j(f[c4],"VPCId")],[vE0]:[,j(f[g4],"VPCRegion")],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()],[W$]:[,f[q0]]}),E;return w.m("GET").h(s).q($).b(E),w.build()},ZD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/queryloggingconfig");let $=S({[a4]:[,f[f0]],[W$]:[,f[q0]],[p4]:[()=>f.MaxResults!==void 0,()=>f[e4].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},JD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $=S({[ZE0]:[,f[UE0]],[kE0]:[,f[TE0]],[ME0]:[,f[EE0]],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},VD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/delegationset");let $=S({[HC]:[,f[g1]],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},PD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1),w.p("ResourceId",()=>f.ResourceId,"{ResourceId}",!1);let $;return w.m("GET").h(s).b($),w.build()},HD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/tags/{ResourceType}"),w.p("ResourceType",()=>f.ResourceType,"{ResourceType}",!1);let $;$=i0;let E=new P(i50);return E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(f,"ResourceIds","ResourceIds",()=>T40(f[_50],h)),$+=E.toString(),w.m("POST").h(s).b($),w.build()},ND=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicies");let $=S({[yE0]:[,f[rT]],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},DD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances");let $=S({[a4]:[,f[mh]],[NC]:[,f[x1]],[DC]:[,f[_1]],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},qD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances/hostedzone");let $=S({[zk]:[,j(f[f0],"HostedZoneId")],[NC]:[,f[x1]],[DC]:[,f[_1]],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},kD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");let $=S({[zk]:[,j(f[L$],"TrafficPolicyId")],[lE0]:[j(f.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>f[c1].toString()],[a4]:[,f[mh]],[NC]:[,f[x1]],[DC]:[,f[_1]],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},yD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/trafficpolicies/{Id}/versions"),w.p("Id",()=>f.Id,"{Id}",!1);let $=S({[jE0]:[,f[CT]],[e1]:[()=>f.MaxItems!==void 0,()=>f[o].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},jD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),w.p("HostedZoneId",()=>f.HostedZoneId,"{HostedZoneId}",!1);let $=S({[W$]:[,f[q0]],[p4]:[()=>f.MaxResults!==void 0,()=>f[e4].toString()]}),E;return w.m("GET").h(s).q($).b(E),w.build()},OD=async(f,h)=>{let w=d.requestBuilder(f,h),s={};w.bp("/2013-04-01/testdnsanswer");let $=S({[a4]:[,j(f[f0],"HostedZoneId")],[JE0]:[,j(f[UT],"RecordName")],[VE0]:[,j(f[TT],"RecordType")],[PE0]:[,f[x50]],[YE0]:[,f[q50]],[QE0]:[,f[k50]]}),E;return w.m("GET").h(s).q($).b(E),w.build()},lD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/healthcheck/{HealthCheckId}"),w.p("HealthCheckId",()=>f.HealthCheckId,"{HealthCheckId}",!1);let $;$=i0;let E=new P(LE0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[qf]!=null)E.c(sk(f[qf],h).n(qf));if(E.lc(f,"ChildHealthChecks","ChildHealthChecks",()=>$k(f[Lw],h)),f[rf]!=null)E.c(P.of(rf,String(f[rf])).n(rf));if(f[Cf]!=null)E.c(P.of(Cf,String(f[Cf])).n(Cf));if(f[If]!=null)E.c(P.of(If,String(f[If])).n(If));if(E.cc(f,O4),f[Bw]!=null)E.c(P.of(Bw,String(f[Bw])).n(Bw));if(f[Lf]!=null)E.c(P.of(Lf,String(f[Lf])).n(Lf));if(E.cc(f,dh),E.cc(f,b4),f[Gf]!=null)E.c(P.of(Gf,String(f[Gf])).n(Gf));if(f[Wf]!=null)E.c(P.of(Wf,String(f[Wf])).n(Wf));return E.lc(f,"Regions","Regions",()=>Ek(f[Gw],h)),E.lc(f,"ResetElements","ResetElements",()=>f40(f[g50],h)),E.cc(f,m4),E.cc(f,i4),$+=E.toString(),w.m("POST").h(s).b($),w.build()},vD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/hostedzone/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=i0;let E=new P(GE0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)E.c(P.of(VC,f[F0]).n(F0));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},bD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),w.p("Id",()=>f.Id,"{Id}",!1),w.p("Version",()=>f.Version.toString(),"{Version}",!1);let $;$=i0;let E=new P(WE0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[F0]!=null)E.c(P.of(PC,f[F0]).n(F0));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},mD=async(f,h)=>{let w=d.requestBuilder(f,h),s={"content-type":"application/xml"};w.bp("/2013-04-01/trafficpolicyinstance/{Id}"),w.p("Id",()=>f.Id,"{Id}",!1);let $;$=i0;let E=new P(BE0);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),f[p0]!=null)E.c(P.of(p0,String(f[p0])).n(p0));if(E.cc(f,L$),f[c1]!=null)E.c(P.of(c1,String(f[c1])).n(c1));return $+=E.toString(),w.m("POST").h(s).b($),w.build()},dD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);return w},iD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);return w},cD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[C0]!=null)w[C0]=W(s[C0]);return w},gD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);return w},xD=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},_D=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f),[Fh]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Zr]!=null)w[Zr]=B40(s[Zr],h);return w},nD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f),[Fh]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Af]!=null)w[Af]=WT(s[Af],h);return w},eD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f),[Fh]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);if(s[Q1]!=null)w[Q1]=_4(s[Q1],h);if(s[J1]!=null)w[J1]=BT(s[J1],h);if(s[V0]!=null)w[V0]=ZC(s[V0],h);return w},aD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f),[Fh]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);if(s[br]!=null)w[br]=rk(s[br],h);return w},pD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f),[Fh]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[ih]!=null)w[ih]=KC(s[ih],h);return w},oD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f),[Fh]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=_4(s[Q1],h);return w},uD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f),[Fh]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=n4(s[K1],h);return w},tD=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f),[Fh]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[A1]!=null)w[A1]=AT(s[A1],h);return w},fq=async(f,h)=>{if(f.statusCode!==201&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f),[Fh]:[,f.headers[lf]]}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=n4(s[K1],h);return w},hq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[f0]!=null)w[f0]=W(s[f0]);if(s[V0]!=null)w[V0]=ZC(s[V0],h);return w},wq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);return w},sq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},$q=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Eq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);return w},Uq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);return w},Tq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Fq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},rq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Cq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Iq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)});return await G1.collectBody(f.body,h),w},Lq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);return w},Gq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);return w},Wq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);return w},Bq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[sh]!=null)w[sh]=E1(s[sh]);if(s[Eh]!=null)w[Eh]=F40(s[Eh],h);return w},Aq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[s0]!=null)w[s0]=n1(s[s0],h);return w},zq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CheckerIpRanges==="")w[X4]=[];else if(s[X4]!=null&&s[X4][zf]!=null)w[X4]=I40(G0(s[X4][zf]),h);return w},Rq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.KeySigningKeys==="")w[J4]=[];else if(s[J4]!=null&&s[J4][zf]!=null)w[J4]=b40(G0(s[J4][zf]),h);if(s[B1]!=null)w[B1]=Z40(s[B1],h);return w},Xq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[l4]!=null)w[l4]=Uk(s[l4],h);return w},Sq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Af]!=null)w[Af]=WT(s[Af],h);return w},Yq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[jr]!=null)w[jr]=E1(s[jr]);return w},Qq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthCheckObservations==="")w[Hf]=[];else if(s[Hf]!=null&&s[Hf][IT]!=null)w[Hf]=Tk(G0(s[Hf][IT]),h);return w},Kq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthCheckObservations==="")w[Hf]=[];else if(s[Hf]!=null&&s[Hf][IT]!=null)w[Hf]=Tk(G0(s[Hf][IT]),h);return w},Mq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=_4(s[Q1],h);if(s[J1]!=null)w[J1]=BT(s[J1],h);if(s.VPCs==="")w[Df]=[];else if(s[Df]!=null&&s[Df][V0]!=null)w[Df]=Lk(G0(s[Df][V0]),h);return w},Zq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Or]!=null)w[Or]=E1(s[Or]);return w},Jq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[sh]!=null)w[sh]=E1(s[sh]);if(s[Eh]!=null)w[Eh]=j40(s[Eh],h);return w},Vq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[ih]!=null)w[ih]=KC(s[ih],h);return w},Pq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Q1]!=null)w[Q1]=_4(s[Q1],h);return w},Hq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[sh]!=null)w[sh]=E1(s[sh]);if(s[Eh]!=null)w[Eh]=a40(s[Eh],h);return w},Nq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=n4(s[K1],h);return w},Dq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[A1]!=null)w[A1]=AT(s[A1],h);return w},qq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[XC]!=null)w[XC]=Y0(s[XC]);return w},kq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrBlocks==="")w[z4]=[];else if(s[z4]!=null&&s[z4][zf]!=null)w[z4]=G40(G0(s[z4][zf]),h);if(s[q0]!=null)w[q0]=W(s[q0]);return w},yq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrCollections==="")w[R4]=[];else if(s[R4]!=null&&s[R4][zf]!=null)w[R4]=R40(G0(s[R4][zf]),h);if(s[q0]!=null)w[q0]=W(s[q0]);return w},jq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.CidrLocations==="")w[S4]=[];else if(s[S4]!=null&&s[S4][zf]!=null)w[S4]=m40(G0(s[S4][zf]),h);if(s[q0]!=null)w[q0]=W(s[q0]);return w},Oq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.GeoLocationDetailsList==="")w[K4]=[];else if(s[K4]!=null&&s[K4][l4]!=null)w[K4]=P40(G0(s[K4][l4]),h);if(s[r0]!=null)w[r0]=n0(s[r0]);if(s[o]!=null)w[o]=Y0(s[o]);if(s[gr]!=null)w[gr]=W(s[gr]);if(s[xr]!=null)w[xr]=W(s[xr]);if(s[or]!=null)w[or]=W(s[or]);return w},lq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HealthChecks==="")w[M4]=[];else if(s[M4]!=null&&s[M4][Af]!=null)w[M4]=k40(G0(s[M4][Af]),h);if(s[r0]!=null)w[r0]=n0(s[r0]);if(s[g1]!=null)w[g1]=W(s[g1]);if(s[o]!=null)w[o]=Y0(s[o]);if(s[Uh]!=null)w[Uh]=W(s[Uh]);return w},vq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HostedZones==="")w[Nf]=[];else if(s[Nf]!=null&&s[Nf][J1]!=null)w[Nf]=Fk(G0(s[Nf][J1]),h);if(s[r0]!=null)w[r0]=n0(s[r0]);if(s[g1]!=null)w[g1]=W(s[g1]);if(s[o]!=null)w[o]=Y0(s[o]);if(s[Uh]!=null)w[Uh]=W(s[Uh]);return w},bq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Bf]!=null)w[Bf]=W(s[Bf]);if(s[f0]!=null)w[f0]=W(s[f0]);if(s.HostedZones==="")w[Nf]=[];else if(s[Nf]!=null&&s[Nf][J1]!=null)w[Nf]=Fk(G0(s[Nf][J1]),h);if(s[r0]!=null)w[r0]=n0(s[r0]);if(s[o]!=null)w[o]=Y0(s[o]);if(s[_r]!=null)w[_r]=W(s[_r]);if(s[nr]!=null)w[nr]=W(s[nr]);return w},mq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.HostedZoneSummaries==="")w[Z4]=[];else if(s[Z4]!=null&&s[Z4][SN]!=null)w[Z4]=l40(G0(s[Z4][SN]),h);if(s[o]!=null)w[o]=Y0(s[o]);if(s[q0]!=null)w[q0]=W(s[q0]);return w},dq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[q0]!=null)w[q0]=W(s[q0]);if(s.QueryLoggingConfigs==="")w[P4]=[];else if(s[P4]!=null&&s[P4][ih]!=null)w[P4]=i40(G0(s[P4][ih]),h);return w},iq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[r0]!=null)w[r0]=n0(s[r0]);if(s[o]!=null)w[o]=Y0(s[o]);if(s[er]!=null)w[er]=W(s[er]);if(s[ar]!=null)w[ar]=W(s[ar]);if(s[pr]!=null)w[pr]=W(s[pr]);if(s.ResourceRecordSets==="")w[N4]=[];else if(s[N4]!=null&&s[N4][r$]!=null)w[N4]=n40(G0(s[N4][r$]),h);return w},cq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.DelegationSets==="")w[Y4]=[];else if(s[Y4]!=null&&s[Y4][Q1]!=null)w[Y4]=Q40(G0(s[Y4][Q1]),h);if(s[r0]!=null)w[r0]=n0(s[r0]);if(s[g1]!=null)w[g1]=W(s[g1]);if(s[o]!=null)w[o]=Y0(s[o]);if(s[Uh]!=null)w[Uh]=W(s[Uh]);return w},gq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[d4]!=null)w[d4]=Ik(s[d4],h);return w},xq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s.ResourceTagSets==="")w[D4]=[];else if(s[D4]!=null&&s[D4][d4]!=null)w[D4]=e40(G0(s[D4][d4]),h);return w},_q=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[r0]!=null)w[r0]=n0(s[r0]);if(s[o]!=null)w[o]=Y0(s[o]);if(s[rT]!=null)w[rT]=W(s[rT]);if(s.TrafficPolicySummaries==="")w[q4]=[];else if(s[q4]!=null&&s[q4][MN]!=null)w[q4]=f50(G0(s[q4][MN]),h);return w},nq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[mh]!=null)w[mh]=W(s[mh]);if(s[r0]!=null)w[r0]=n0(s[r0]);if(s[o]!=null)w[o]=Y0(s[o]);if(s[x1]!=null)w[x1]=W(s[x1]);if(s[_1]!=null)w[_1]=W(s[_1]);if(s.TrafficPolicyInstances==="")w[W1]=[];else if(s[W1]!=null&&s[W1][A1]!=null)w[W1]=MC(G0(s[W1][A1]),h);return w},eq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[r0]!=null)w[r0]=n0(s[r0]);if(s[o]!=null)w[o]=Y0(s[o]);if(s[x1]!=null)w[x1]=W(s[x1]);if(s[_1]!=null)w[_1]=W(s[_1]);if(s.TrafficPolicyInstances==="")w[W1]=[];else if(s[W1]!=null&&s[W1][A1]!=null)w[W1]=MC(G0(s[W1][A1]),h);return w},aq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[mh]!=null)w[mh]=W(s[mh]);if(s[r0]!=null)w[r0]=n0(s[r0]);if(s[o]!=null)w[o]=Y0(s[o]);if(s[x1]!=null)w[x1]=W(s[x1]);if(s[_1]!=null)w[_1]=W(s[_1]);if(s.TrafficPolicyInstances==="")w[W1]=[];else if(s[W1]!=null&&s[W1][A1]!=null)w[W1]=MC(G0(s[W1][A1]),h);return w},pq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[r0]!=null)w[r0]=n0(s[r0]);if(s[o]!=null)w[o]=Y0(s[o]);if(s.TrafficPolicies==="")w[k4]=[];else if(s[k4]!=null&&s[k4][K1]!=null)w[k4]=t40(G0(s[k4][K1]),h);if(s[CT]!=null)w[CT]=W(s[CT]);return w},oq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[f0]!=null)w[f0]=W(s[f0]);if(s[q0]!=null)w[q0]=W(s[q0]);if(s.VPCs==="")w[Df]=[];else if(s[Df]!=null&&s[Df][V0]!=null)w[Df]=Lk(G0(s[Df][V0]),h);return w},uq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[ur]!=null)w[ur]=W(s[ur]);if(s[EC]!=null)w[EC]=W(s[EC]);if(s.RecordData==="")w[H4]=[];else if(s[H4]!=null&&s[H4][QN]!=null)w[H4]=c40(G0(s[H4][QN]),h);if(s[UT]!=null)w[UT]=W(s[UT]);if(s[TT]!=null)w[TT]=W(s[TT]);if(s[UC]!=null)w[UC]=W(s[UC]);return w},tq=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[Af]!=null)w[Af]=WT(s[Af],h);return w},fk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[J1]!=null)w[J1]=BT(s[J1],h);return w},hk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[K1]!=null)w[K1]=n4(s[K1],h);return w},wk=async(f,h)=>{if(f.statusCode!==200&&f.statusCode>=300)return i(f,h);let w=S({$metadata:Z(f)}),s=j(g(await _.parseXmlBody(f.body,h)),"body");if(s[A1]!=null)w[A1]=AT(s[A1],h);return w},i=async(f,h)=>{let w={...f,body:await _.parseXmlErrorBody(f.body,h)},s=_.loadRestXmlErrorCode(f,w.body);switch(s){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await Ns0(w,h);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await us0(w,h);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await h$0(w,h);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await f$0(w,h);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await s$0(w,h);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await S$0(w,h);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await Ds0(w,h);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await E$0(w,h);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await I$0(w,h);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await X$0(w,h);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await M$0(w,h);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await Z$0(w,h);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await J$0(w,h);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await Js0(w,h);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await Hs0(w,h);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await G$0(w,h);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await ps0(w,h);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await R$0(w,h);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await P$0(w,h);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await Vs0(w,h);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await bs0(w,h);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await H$0(w,h);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await Os0(w,h);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await ls0(w,h);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await is0(w,h);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await os0(w,h);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await A$0(w,h);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await N$0(w,h);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await as0(w,h);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await ts0(w,h);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await U$0(w,h);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await D$0(w,h);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await es0(w,h);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await B$0(w,h);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await V$0(w,h);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await ks0(w,h);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await ys0(w,h);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await gs0(w,h);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await $$0(w,h);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await q$0(w,h);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await O$0(w,h);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await Q$0(w,h);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await k$0(w,h);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await l$0(w,h);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await y$0(w,h);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await j$0(w,h);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await T$0(w,h);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await F$0(w,h);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await Ps0(w,h);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await ms0(w,h);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await cs0(w,h);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await Y$0(w,h);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await js0(w,h);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await v$0(w,h);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await K$0(w,h);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await b$0(w,h);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await vs0(w,h);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await C$0(w,h);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await m$0(w,h);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await _s0(w,h);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await r$0(w,h);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await L$0(w,h);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await z$0(w,h);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await ns0(w,h);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await xs0(w,h);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await W$0(w,h);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await w$0(w,h);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await ds0(w,h);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await qs0(w,h);default:let $=w.body;return Zs0({output:f,parsedBody:$.Error,errorCode:s})}},Zs0=Us(m),Js0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[l0]!=null)w[l0]=W(s[l0]);let $=new eU({$metadata:Z(f),...w});return l($,f.body.Error)},Vs0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[l0]!=null)w[l0]=W(s[l0]);let $=new f2({$metadata:Z(f),...w});return l($,f.body.Error)},Ps0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[l0]!=null)w[l0]=W(s[l0]);let $=new H2({$metadata:Z(f),...w});return l($,f.body.Error)},Hs0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[l0]!=null)w[l0]=W(s[l0]);let $=new aU({$metadata:Z(f),...w});return l($,f.body.Error)},Ns0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new jU({$metadata:Z(f),...w});return l($,f.body.Error)},Ds0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new dU({$metadata:Z(f),...w});return l($,f.body.Error)},qs0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new a2({$metadata:Z(f),...w});return l($,f.body.Error)},ks0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new A2({$metadata:Z(f),...w});return l($,f.body.Error)},ys0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new z2({$metadata:Z(f),...w});return l($,f.body.Error)},js0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new k2({$metadata:Z(f),...w});return l($,f.body.Error)},Os0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new s2({$metadata:Z(f),...w});return l($,f.body.Error)},ls0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new $2({$metadata:Z(f),...w});return l($,f.body.Error)},vs0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new l2({$metadata:Z(f),...w});return l($,f.body.Error)},bs0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new h2({$metadata:Z(f),...w});return l($,f.body.Error)},ms0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new N2({$metadata:Z(f),...w});return l($,f.body.Error)},ds0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new e2({$metadata:Z(f),...w});return l($,f.body.Error)},is0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new E2({$metadata:Z(f),...w});return l($,f.body.Error)},cs0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new D2({$metadata:Z(f),...w});return l($,f.body.Error)},gs0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new R2({$metadata:Z(f),...w});return l($,f.body.Error)},xs0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new x2({$metadata:Z(f),...w});return l($,f.body.Error)},_s0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new m2({$metadata:Z(f),...w});return l($,f.body.Error)},ns0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new g2({$metadata:Z(f),...w});return l($,f.body.Error)},es0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new G2({$metadata:Z(f),...w});return l($,f.body.Error)},as0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new r2({$metadata:Z(f),...w});return l($,f.body.Error)},ps0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);if(s.messages==="")w[j4]=[];else if(s[j4]!=null&&s[j4][l0]!=null)w[j4]=J40(G0(s[j4][l0]),h);let $=new oU({$metadata:Z(f),...w});return l($,f.body.Error)},os0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new U2({$metadata:Z(f),...w});return l($,f.body.Error)},us0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new OU({$metadata:Z(f),...w});return l($,f.body.Error)},ts0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new C2({$metadata:Z(f),...w});return l($,f.body.Error)},f$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new lU({$metadata:Z(f),...w});return l($,f.body.Error)},h$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new vU({$metadata:Z(f),...w});return l($,f.body.Error)},w$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new n2({$metadata:Z(f),...w});return l($,f.body.Error)},s$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new bU({$metadata:Z(f),...w});return l($,f.body.Error)},$$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new X2({$metadata:Z(f),...w});return l($,f.body.Error)},E$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new iU({$metadata:Z(f),...w});return l($,f.body.Error)},U$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new I2({$metadata:Z(f),...w});return l($,f.body.Error)},T$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new V2({$metadata:Z(f),...w});return l($,f.body.Error)},F$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new P2({$metadata:Z(f),...w});return l($,f.body.Error)},r$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new d2({$metadata:Z(f),...w});return l($,f.body.Error)},C$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new v2({$metadata:Z(f),...w});return l($,f.body.Error)},I$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new cU({$metadata:Z(f),...w});return l($,f.body.Error)},L$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new i2({$metadata:Z(f),...w});return l($,f.body.Error)},G$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[l0]!=null)w[l0]=W(s[l0]);let $=new pU({$metadata:Z(f),...w});return l($,f.body.Error)},W$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[l0]!=null)w[l0]=W(s[l0]);let $=new _2({$metadata:Z(f),...w});return l($,f.body.Error)},B$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new W2({$metadata:Z(f),...w});return l($,f.body.Error)},A$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new T2({$metadata:Z(f),...w});return l($,f.body.Error)},z$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new c2({$metadata:Z(f),...w});return l($,f.body.Error)},R$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new uU({$metadata:Z(f),...w});return l($,f.body.Error)},X$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new gU({$metadata:Z(f),...w});return l($,f.body.Error)},S$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new mU({$metadata:Z(f),...w});return l($,f.body.Error)},Y$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new q2({$metadata:Z(f),...w});return l($,f.body.Error)},Q$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new Q2({$metadata:Z(f),...w});return l($,f.body.Error)},K$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new j2({$metadata:Z(f),...w});return l($,f.body.Error)},M$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new xU({$metadata:Z(f),...w});return l($,f.body.Error)},Z$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new _U({$metadata:Z(f),...w});return l($,f.body.Error)},J$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new nU({$metadata:Z(f),...w});return l($,f.body.Error)},V$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new B2({$metadata:Z(f),...w});return l($,f.body.Error)},P$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new tU({$metadata:Z(f),...w});return l($,f.body.Error)},H$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new w2({$metadata:Z(f),...w});return l($,f.body.Error)},N$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new F2({$metadata:Z(f),...w});return l($,f.body.Error)},D$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new L2({$metadata:Z(f),...w});return l($,f.body.Error)},q$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new S2({$metadata:Z(f),...w});return l($,f.body.Error)},k$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new K2({$metadata:Z(f),...w});return l($,f.body.Error)},y$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new Z2({$metadata:Z(f),...w});return l($,f.body.Error)},j$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new J2({$metadata:Z(f),...w});return l($,f.body.Error)},O$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new Y2({$metadata:Z(f),...w});return l($,f.body.Error)},l$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new M2({$metadata:Z(f),...w});return l($,f.body.Error)},v$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new y2({$metadata:Z(f),...w});return l($,f.body.Error)},b$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new O2({$metadata:Z(f),...w});return l($,f.body.Error)},m$0=async(f,h)=>{let w=S({}),s=f.body.Error;if(s[X]!=null)w[X]=W(s[X]);let $=new b2({$metadata:Z(f),...w});return l($,f.body.Error)},sk=(f,h)=>{let w=new P(qf);if(f[o0]!=null)w.c(P.of(P50,f[o0]).n(o0));if(f[p]!=null)w.c(P.of(s50,f[p]).n(p));return w},d$0=(f,h)=>{let w=new P(Rw);if(f[f0]!=null)w.c(P.of(jf,f[f0]).n(f0));if(w.cc(f,Bf),f[$$]!=null)w.c(P.of(w50,String(f[$$])).n($$));return w},i$0=(f,h)=>{let w=new P(Wk);if(f[h$]!=null)w.c(P.of(T50,f[h$]).n(h$));if(f[r$]!=null)w.c(s40(f[r$],h).n(r$));return w},c$0=(f,h)=>{let w=new P(u2);if(f[F0]!=null)w.c(P.of(VC,f[F0]).n(F0));return w.lc(f,"Changes","Changes",()=>g$0(f[Gk],h)),w},g$0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return i$0(w,h).n(Wk)})},$k=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(v4,w).n(QC)})},x$0=(f,h)=>{let w=new P(F50);if(f[T1]!=null)w.c(P.of(A50,f[T1]).n(T1));if(f[h$]!=null)w.c(P.of(r50,f[h$]).n(h$));return w.lc(f,"CidrList","CidrList",()=>n$0(f[z50],h)),w},_$0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return x$0(w,h).n(zf)})},n$0=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(RN,w).n(RN)})},e$0=(f,h)=>{let w=new P(Xw);if(f[s$]!=null)w.c(P.of(AE0,f[s$]).n(s$));if(f[T1]!=null)w.c(P.of(B50,f[T1]).n(T1));return w},a$0=(f,h)=>{let w=new P(Sw);return w.cc(f,sT),w.cc(f,$T),w},p$0=(f,h)=>{let w=new P(Yw);if(f[kf]!=null)w.c(P.of(y50,f[kf]).n(kf));if(f[yf]!=null)w.c(P.of(j50,f[yf]).n(yf));if(f[Of]!=null)w.c(P.of(O50,f[Of]).n(Of));return w},o$0=(f,h)=>{let w=new P(Qw);if(w.cc(f,o2),w.cc(f,wT),f[Sw]!=null)w.c(a$0(f[Sw],h).n(Sw));if(f[Ww]!=null)w.c(P.of(Ww,String(f[Ww])).n(Ww));return w},u$0=(f,h)=>{let w=new P(Kw);if(w.cc(f,dh),f[Wf]!=null)w.c(P.of(Wf,String(f[Wf])).n(Wf));if(f[M0]!=null)w.c(P.of(b50,f[M0]).n(M0));if(w.cc(f,m4),w.cc(f,O4),w.cc(f,i4),f[zw]!=null)w.c(P.of(zw,String(f[zw])).n(zw));if(f[If]!=null)w.c(P.of(If,String(f[If])).n(If));if(f[Aw]!=null)w.c(P.of(Aw,String(f[Aw])).n(Aw));if(f[Gf]!=null)w.c(P.of(Gf,String(f[Gf])).n(Gf));if(f[rf]!=null)w.c(P.of(rf,String(f[rf])).n(rf));if(f[Lf]!=null)w.c(P.of(Lf,String(f[Lf])).n(Lf));if(w.lc(f,"ChildHealthChecks","ChildHealthChecks",()=>$k(f[Lw],h)),f[Cf]!=null)w.c(P.of(Cf,String(f[Cf])).n(Cf));if(w.lc(f,"Regions","Regions",()=>Ek(f[Gw],h)),f[qf]!=null)w.c(sk(f[qf],h).n(qf));return w.cc(f,b4),w.cc(f,ET),w},Ek=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(v50,w).n(o0)})},t$0=(f,h)=>{let w=new P(hT);if(f[F0]!=null)w.c(P.of(VC,f[F0]).n(F0));if(f[F$]!=null)w.c(P.of(d50,String(f[F$])).n(F$));return w},f40=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(KN,w).n(KN)})},h40=(f,h)=>{let w=new P(LT);if(f[k0]!=null)w.c(P.of(c50,f[k0]).n(k0));return w},w40=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return h40(w,h).n(LT)})},s40=(f,h)=>{let w=new P(r$);if(f[p]!=null)w.c(P.of(Bf,f[p]).n(p));if(f[M0]!=null)w.c(P.of(u50,f[M0]).n(M0));if(f[C$]!=null)w.c(P.of(e50,f[C$]).n(C$));if(f[G$]!=null)w.c(P.of(o50,String(f[G$])).n(G$));if(f[o0]!=null)w.c(P.of(p50,f[o0]).n(o0));if(f[Yw]!=null)w.c(p$0(f[Yw],h).n(Yw));if(f[E$]!=null)w.c(P.of(n50,f[E$]).n(E$));if(f[T$]!=null)w.c(P.of(a50,String(f[T$])).n(T$));if(f[p0]!=null)w.c(P.of(p0,String(f[p0])).n(p0));if(w.lc(f,"ResourceRecords","ResourceRecords",()=>w40(f[f$],h)),f[Rw]!=null)w.c(d$0(f[Rw],h).n(Rw));if(w.cc(f,v4),w.cc(f,FT),f[Xw]!=null)w.c(e$0(f[Xw],h).n(Xw));if(f[Qw]!=null)w.c(o$0(f[Qw],h).n(Qw));return w},$40=(f,h)=>{let w=new P(GT);if(f[Mw]!=null)w.c(P.of(Bk,f[Mw]).n(Mw));if(f[k0]!=null)w.c(P.of(IE0,f[k0]).n(k0));return w},E40=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(Bk,w).n(Mw)})},U40=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return $40(w,h).n(GT)})},T40=(f,h)=>{return f.filter((w)=>w!=null).map((w)=>{return P.of(CE0,w).n(jf)})},x4=(f,h)=>{let w=new P(V0);return w.cc(f,g4),w.cc(f,c4),w},F40=(f,h)=>{let w={};if(f[M0]!=null)w[M0]=W(f[M0]);if(f[k0]!=null)w[k0]=E1(f[k0]);return w},r40=(f,h)=>{let w={};if(f[o0]!=null)w[o0]=W(f[o0]);if(f[p]!=null)w[p]=W(f[p]);return w},C40=(f,h)=>{let w={};if(f[f0]!=null)w[f0]=W(f[f0]);if(f[Bf]!=null)w[Bf]=W(f[Bf]);if(f[$$]!=null)w[$$]=n0(f[$$]);return w},n1=(f,h)=>{let w={};if(f[C0]!=null)w[C0]=W(f[C0]);if(f[B1]!=null)w[B1]=W(f[B1]);if(f[rC]!=null)w[rC]=j(g$(f[rC]));if(f[F0]!=null)w[F0]=W(f[F0]);return w},I40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return W(w)})},L40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return W(w)})},G40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return W40(w,h)})},W40=(f,h)=>{let w={};if(f[Rr]!=null)w[Rr]=W(f[Rr]);if(f[T1]!=null)w[T1]=W(f[T1]);return w},B40=(f,h)=>{let w={};if(f[w$]!=null)w[w$]=W(f[w$]);if(f[C0]!=null)w[C0]=W(f[C0]);if(f[p]!=null)w[p]=W(f[p]);if(f[Th]!=null)w[Th]=E1(f[Th]);return w},A40=(f,h)=>{let w={};if(f[s$]!=null)w[s$]=W(f[s$]);if(f[T1]!=null)w[T1]=W(f[T1]);return w},z40=(f,h)=>{let w={};if(f[kr]!=null)w[kr]=Y0(f[kr]);if(f[YC]!=null)w[YC]=NS(f[YC]);if(f[Qr]!=null)w[Qr]=W(f[Qr]);if(f[$C]!=null)w[$C]=Y0(f[$C]);if(f[cr]!=null)w[cr]=W(f[cr]);if(f[tr]!=null)w[tr]=W(f[tr]);if(f[AC]!=null)w[AC]=W(f[AC]);if(f.Dimensions==="")w[Q4]=[];else if(f[Q4]!=null&&f[Q4][XN]!=null)w[Q4]=M40(G0(f[Q4][XN]),h);return w},R40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return X40(w,h)})},X40=(f,h)=>{let w={};if(f[w$]!=null)w[w$]=W(f[w$]);if(f[C0]!=null)w[C0]=W(f[C0]);if(f[p]!=null)w[p]=W(f[p]);if(f[Th]!=null)w[Th]=E1(f[Th]);return w},S40=(f,h)=>{let w={};if(f[sT]!=null)w[sT]=W(f[sT]);if(f[$T]!=null)w[$T]=W(f[$T]);return w},_4=(f,h)=>{let w={};if(f[C0]!=null)w[C0]=W(f[C0]);if(f[D0]!=null)w[D0]=W(f[D0]);if(f.NameServers==="")w[V4]=[];else if(f[V4]!=null&&f[V4][YN]!=null)w[V4]=Y40(G0(f[V4][YN]),h);return w},Y40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return W(w)})},Q40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return _4(w,h)})},K40=(f,h)=>{let w={};if(f[p]!=null)w[p]=W(f[p]);if(f[k0]!=null)w[k0]=W(f[k0]);return w},M40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return K40(w,h)})},Z40=(f,h)=>{let w={};if(f[BC]!=null)w[BC]=W(f[BC]);if(f[I$]!=null)w[I$]=W(f[I$]);return w},J40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return W(w)})},V40=(f,h)=>{let w={};if(f[kf]!=null)w[kf]=W(f[kf]);if(f[yf]!=null)w[yf]=W(f[yf]);if(f[Of]!=null)w[Of]=W(f[Of]);return w},Uk=(f,h)=>{let w={};if(f[kf]!=null)w[kf]=W(f[kf]);if(f[Sr]!=null)w[Sr]=W(f[Sr]);if(f[yf]!=null)w[yf]=W(f[yf]);if(f[Yr]!=null)w[Yr]=W(f[Yr]);if(f[Of]!=null)w[Of]=W(f[Of]);if(f[LC]!=null)w[LC]=W(f[LC]);return w},P40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Uk(w,h)})},H40=(f,h)=>{let w={};if(f[o2]!=null)w[o2]=W(f[o2]);if(f[wT]!=null)w[wT]=W(f[wT]);if(f[Sw]!=null)w[Sw]=S40(f[Sw],h);if(f[Ww]!=null)w[Ww]=Y0(f[Ww]);return w},WT=(f,h)=>{let w={};if(f[C0]!=null)w[C0]=W(f[C0]);if(f[D0]!=null)w[D0]=W(f[D0]);if(f[U$]!=null)w[U$]=Ck(f[U$],h);if(f[Kw]!=null)w[Kw]=N40(f[Kw],h);if(f[Bw]!=null)w[Bw]=E1(f[Bw]);if(f[Mr]!=null)w[Mr]=z40(f[Mr],h);return w},N40=(f,h)=>{let w={};if(f[dh]!=null)w[dh]=W(f[dh]);if(f[Wf]!=null)w[Wf]=Y0(f[Wf]);if(f[M0]!=null)w[M0]=W(f[M0]);if(f[m4]!=null)w[m4]=W(f[m4]);if(f[O4]!=null)w[O4]=W(f[O4]);if(f[i4]!=null)w[i4]=W(f[i4]);if(f[zw]!=null)w[zw]=Y0(f[zw]);if(f[If]!=null)w[If]=Y0(f[If]);if(f[Aw]!=null)w[Aw]=n0(f[Aw]);if(f[Gf]!=null)w[Gf]=n0(f[Gf]);if(f[rf]!=null)w[rf]=n0(f[rf]);if(f[Lf]!=null)w[Lf]=Y0(f[Lf]);if(f.ChildHealthChecks==="")w[Lw]=[];else if(f[Lw]!=null&&f[Lw][QC]!=null)w[Lw]=L40(G0(f[Lw][QC]),h);if(f[Cf]!=null)w[Cf]=n0(f[Cf]);if(f.Regions==="")w[Gw]=[];else if(f[Gw]!=null&&f[Gw][o0]!=null)w[Gw]=q40(G0(f[Gw][o0]),h);if(f[qf]!=null)w[qf]=r40(f[qf],h);if(f[b4]!=null)w[b4]=W(f[b4]);if(f[ET]!=null)w[ET]=W(f[ET]);return w},D40=(f,h)=>{let w={};if(f[o0]!=null)w[o0]=W(f[o0]);if(f[dh]!=null)w[dh]=W(f[dh]);if(f[WC]!=null)w[WC]=p40(f[WC],h);return w},Tk=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return D40(w,h)})},q40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return W(w)})},k40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return WT(w,h)})},BT=(f,h)=>{let w={};if(f[C0]!=null)w[C0]=W(f[C0]);if(f[p]!=null)w[p]=W(f[p]);if(f[D0]!=null)w[D0]=W(f[D0]);if(f[Jr]!=null)w[Jr]=y40(f[Jr],h);if(f[TC]!=null)w[TC]=E1(f[TC]);if(f[U$]!=null)w[U$]=Ck(f[U$],h);return w},y40=(f,h)=>{let w={};if(f[F0]!=null)w[F0]=W(f[F0]);if(f[F$]!=null)w[F$]=n0(f[F$]);return w},j40=(f,h)=>{let w={};if(f[M0]!=null)w[M0]=W(f[M0]);if(f[k0]!=null)w[k0]=E1(f[k0]);return w},O40=(f,h)=>{let w={};if(f[hC]!=null)w[hC]=W(f[hC]);if(f[wC]!=null)w[wC]=W(f[wC]);return w},Fk=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return BT(w,h)})},l40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return v40(w,h)})},v40=(f,h)=>{let w={};if(f[f0]!=null)w[f0]=W(f[f0]);if(f[p]!=null)w[p]=W(f[p]);if(f[fC]!=null)w[fC]=O40(f[fC],h);return w},rk=(f,h)=>{let w={};if(f[p]!=null)w[p]=W(f[p]);if(f[lr]!=null)w[lr]=W(f[lr]);if(f[yr]!=null)w[yr]=Y0(f[yr]);if(f[CC]!=null)w[CC]=W(f[CC]);if(f[IC]!=null)w[IC]=Y0(f[IC]);if(f[Vr]!=null)w[Vr]=W(f[Vr]);if(f[Pr]!=null)w[Pr]=Y0(f[Pr]);if(f[mr]!=null)w[mr]=Y0(f[mr]);if(f[Dr]!=null)w[Dr]=W(f[Dr]);if(f[sC]!=null)w[sC]=W(f[sC]);if(f[Nr]!=null)w[Nr]=W(f[Nr]);if(f[Hr]!=null)w[Hr]=W(f[Hr]);if(f[B1]!=null)w[B1]=W(f[B1]);if(f[I$]!=null)w[I$]=W(f[I$]);if(f[Xr]!=null)w[Xr]=j(g$(f[Xr]));if(f[dr]!=null)w[dr]=j(g$(f[dr]));return w},b40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return rk(w,h)})},Ck=(f,h)=>{let w={};if(f[GC]!=null)w[GC]=W(f[GC]);if(f[qr]!=null)w[qr]=W(f[qr]);return w},m40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return d40(w,h)})},d40=(f,h)=>{let w={};if(f[T1]!=null)w[T1]=W(f[T1]);return w},KC=(f,h)=>{let w={};if(f[C0]!=null)w[C0]=W(f[C0]);if(f[f0]!=null)w[f0]=W(f[f0]);if(f[t2]!=null)w[t2]=W(f[t2]);return w},i40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return KC(w,h)})},c40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return W(w)})},g40=(f,h)=>{let w={};if(f[k0]!=null)w[k0]=W(f[k0]);return w},x40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return g40(w,h)})},_40=(f,h)=>{let w={};if(f[p]!=null)w[p]=W(f[p]);if(f[M0]!=null)w[M0]=W(f[M0]);if(f[C$]!=null)w[C$]=W(f[C$]);if(f[G$]!=null)w[G$]=E1(f[G$]);if(f[o0]!=null)w[o0]=W(f[o0]);if(f[Yw]!=null)w[Yw]=V40(f[Yw],h);if(f[E$]!=null)w[E$]=W(f[E$]);if(f[T$]!=null)w[T$]=n0(f[T$]);if(f[p0]!=null)w[p0]=E1(f[p0]);if(f.ResourceRecords==="")w[f$]=[];else if(f[f$]!=null&&f[f$][LT]!=null)w[f$]=x40(G0(f[f$][LT]),h);if(f[Rw]!=null)w[Rw]=C40(f[Rw],h);if(f[v4]!=null)w[v4]=W(f[v4]);if(f[FT]!=null)w[FT]=W(f[FT]);if(f[Xw]!=null)w[Xw]=A40(f[Xw],h);if(f[Qw]!=null)w[Qw]=H40(f[Qw],h);return w},n40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return _40(w,h)})},Ik=(f,h)=>{let w={};if(f[FC]!=null)w[FC]=W(f[FC]);if(f[jf]!=null)w[jf]=W(f[jf]);if(f.Tags==="")w[y4]=[];else if(f[y4]!=null&&f[y4][GT]!=null)w[y4]=u40(G0(f[y4][GT]),h);return w},e40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return Ik(w,h)})},a40=(f,h)=>{let w={};if(f[M0]!=null)w[M0]=W(f[M0]);if(f[k0]!=null)w[k0]=E1(f[k0]);return w},p40=(f,h)=>{let w={};if(f[B1]!=null)w[B1]=W(f[B1]);if(f[Kr]!=null)w[Kr]=j(g$(f[Kr]));return w},o40=(f,h)=>{let w={};if(f[Mw]!=null)w[Mw]=W(f[Mw]);if(f[k0]!=null)w[k0]=W(f[k0]);return w},u40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return o40(w,h)})},t40=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return n4(w,h)})},n4=(f,h)=>{let w={};if(f[C0]!=null)w[C0]=W(f[C0]);if(f[Th]!=null)w[Th]=Y0(f[Th]);if(f[p]!=null)w[p]=W(f[p]);if(f[M0]!=null)w[M0]=W(f[M0]);if(f[$h]!=null)w[$h]=W(f[$h]);if(f[F0]!=null)w[F0]=W(f[F0]);return w},AT=(f,h)=>{let w={};if(f[C0]!=null)w[C0]=W(f[C0]);if(f[f0]!=null)w[f0]=W(f[f0]);if(f[p]!=null)w[p]=W(f[p]);if(f[p0]!=null)w[p0]=E1(f[p0]);if(f[zC]!=null)w[zC]=W(f[zC]);if(f[l0]!=null)w[l0]=W(f[l0]);if(f[L$]!=null)w[L$]=W(f[L$]);if(f[c1]!=null)w[c1]=Y0(f[c1]);if(f[SC]!=null)w[SC]=W(f[SC]);return w},MC=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return AT(w,h)})},f50=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return h50(w,h)})},h50=(f,h)=>{let w={};if(f[C0]!=null)w[C0]=W(f[C0]);if(f[p]!=null)w[p]=W(f[p]);if(f[M0]!=null)w[M0]=W(f[M0]);if(f[ir]!=null)w[ir]=Y0(f[ir]);if(f[RC]!=null)w[RC]=Y0(f[RC]);return w},ZC=(f,h)=>{let w={};if(f[g4]!=null)w[g4]=W(f[g4]);if(f[c4]!=null)w[c4]=W(f[c4]);return w},Lk=(f,h)=>{return(f||[]).filter((w)=>w!=null).map((w)=>{return ZC(w,h)})},Z=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var h$="Action",w50="AliasHealthEnabled",qf="AlarmIdentifier",s50="AlarmName",$50="AddTags",Rw="AliasTarget",E50="AssociateVPCComment",U50="AssociateVPCWithHostedZoneRequest",o2="AWSRegion",w$="Arn",Ww="Bias",F0="Comment",T50="ChangeAction",u2="ChangeBatch",z4="CidrBlocks",Rr="CidrBlock",kf="ContinentCode",F50="CidrCollectionChange",r50="CidrCollectionChangeAction",C50="ChangeCidrCollectionRequest",I50="CreateCidrCollectionRequest",R4="CidrCollections",yf="CountryCode",Xr="CreatedDate",Lw="ChildHealthChecks",L50="CreateHealthCheckRequest",QC="ChildHealthCheck",G50="CreateHostedZoneRequest",s0="ChangeInfo",X4="CheckerIpRanges",s$="CollectionId",W50="CreateKeySigningKeyRequest",S4="CidrLocations",B50="CidrLocationNameDefaultAllowed",A50="CidrLocationNameDefaultNotAllowed",z50="CidrList",R50="CidrNonce",X50="CollectionName",Sr="ContinentName",Yr="CountryName",Qr="ComparisonOperator",S50="CreateQueryLoggingConfigRequest",D0="CallerReference",Xw="CidrRoutingConfig",Y50="CreateReusableDelegationSetRequest",Q50="ChangeResourceRecordSetsRequest",Kr="CheckedTime",K50="ChangeTagsForResourceRequest",M50="CreateTrafficPolicyInstanceRequest",Z50="CreateTrafficPolicyRequest",J50="CreateTrafficPolicyVersionRequest",p2="CollectionVersion",V50="CreateVPCAssociationAuthorizationRequest",Mr="CloudWatchAlarmConfiguration",t2="CloudWatchLogsLogGroupArn",P50="CloudWatchRegion",Gk="Changes",Wk="Change",RN="Cidr",Zr="Collection",Jr="Config",Sw="Coordinates",sh="Count",$h="Document",Vr="DigestAlgorithmMnemonic",Pr="DigestAlgorithmType",Hr="DNSKEYRecord",Bf="DNSName",Q1="DelegationSet",fT="DelegationSetId",Nr="DSRecord",Y4="DelegationSets",Dr="DigestValue",H50="DeleteVPCAssociationAuthorizationRequest",N50="DisassociateVPCComment",D50="DisassociateVPCFromHostedZoneRequest",qr="Description",rf="Disabled",Q4="Dimensions",XN="Dimension",q50="EDNS0ClientSubnetIP",k50="EDNS0ClientSubnetMask",kr="EvaluationPeriods",Cf="EnableSNI",$$="EvaluateTargetHealth",E$="Failover",O4="FullyQualifiedDomainName",If="FailureThreshold",yr="Flag",Yw="GeoLocation",y50="GeoLocationContinentCode",j50="GeoLocationCountryCode",l4="GeoLocationDetails",K4="GeoLocationDetailsList",O50="GeoLocationSubdivisionCode",Qw="GeoProximityLocation",Af="HealthCheck",Kw="HealthCheckConfig",jr="HealthCheckCount",v4="HealthCheckId",l50="HealthCheckNonce",Hf="HealthCheckObservations",IT="HealthCheckObservation",v50="HealthCheckRegion",b50="HealthCheckType",Bw="HealthCheckVersion",M4="HealthChecks",Lf="HealthThreshold",J1="HostedZone",hT="HostedZoneConfig",Or="HostedZoneCount",f0="HostedZoneId",mh="HostedZoneIdMarker",Z4="HostedZoneSummaries",SN="HostedZoneSummary",m50="HostedZoneType",Nf="HostedZones",Gf="Inverted",b4="InsufficientDataHealthStatus",dh="IPAddress",d50="IsPrivateZone",r0="IsTruncated",C0="Id",Mw="Key",lr="KmsArn",vr="KeyManagementServiceArn",br="KeySigningKey",J4="KeySigningKeys",mr="KeyTag",Fh="Location",dr="LastModifiedDate",T1="LocationName",U$="LinkedService",i50="ListTagsForResourcesRequest",ir="LatestVersion",wT="LocalZoneGroup",sT="Latitude",Eh="Limit",$T="Longitude",g1="Marker",o="MaxItems",Aw="MeasureLatency",cr="MetricName",e4="MaxResults",T$="MultiValueAnswer",l0="Message",p="Name",gr="NextContinentCode",xr="NextCountryCode",_r="NextDNSName",nr="NextHostedZoneId",Uh="NextMarker",er="NextRecordIdentifier",ar="NextRecordName",pr="NextRecordType",V4="NameServers",or="NextSubdivisionCode",YN="NameServer",q0="NextToken",ur="Nameserver",tr="Namespace",JC="Nonce",fC="Owner",hC="OwningAccount",wC="OwningService",Wf="Port",sC="PublicKey",F$="PrivateZone",$C="Period",EC="Protocol",ih="QueryLoggingConfig",P4="QueryLoggingConfigs",Gw="Regions",UC="ResponseCode",ET="RoutingControlArn",VC="ResourceDescription",QN="RecordDataEntry",c50="RData",H4="RecordData",g50="ResetElements",KN="ResettableElementName",jf="ResourceId",x50="ResolverIP",_50="ResourceIds",zw="RequestInterval",UT="RecordName",m4="ResourcePath",LT="ResourceRecord",N4="ResourceRecordSets",TC="ResourceRecordSetCount",n50="ResourceRecordSetFailover",e50="ResourceRecordSetIdentifier",a50="ResourceRecordSetMultiValueAnswer",p50="ResourceRecordSetRegion",o50="ResourceRecordSetWeight",r$="ResourceRecordSet",u50="RRType",f$="ResourceRecords",TT="RecordType",t50="RemoveTagKeys",d4="ResourceTagSet",D4="ResourceTagSets",FC="ResourceType",o0="Region",B1="Status",rC="SubmittedAt",CC="SigningAlgorithmMnemonic",IC="SigningAlgorithmType",Of="SubdivisionCode",fE0="StartContinentCode",hE0="StartCountryCode",C$="SetIdentifier",wE0="SigningKeyName",sE0="SigningKeyString",$E0="SigningKeyStatus",I$="StatusMessage",LC="SubdivisionName",GC="ServicePrincipal",WC="StatusReport",EE0="StartRecordIdentifier",UE0="StartRecordName",TE0="StartRecordType",i4="SearchString",FE0="StartSubdivisionCode",BC="ServeSignature",AC="Statistic",zC="State",M0="Type",Bk="TagKey",K1="TrafficPolicy",PC="TrafficPolicyComment",RC="TrafficPolicyCount",Ak="TrafficPolicyDocument",L$="TrafficPolicyId",XC="TrafficPolicyInstanceCount",FT="TrafficPolicyInstanceId",rT="TrafficPolicyIdMarker",x1="TrafficPolicyInstanceNameMarker",_1="TrafficPolicyInstanceTypeMarker",A1="TrafficPolicyInstance",W1="TrafficPolicyInstances",rE0="TrafficPolicyName",q4="TrafficPolicySummaries",MN="TrafficPolicySummary",SC="TrafficPolicyType",c1="TrafficPolicyVersion",CT="TrafficPolicyVersionMarker",k4="TrafficPolicies",CE0="TagResourceId",p0="TTL",IE0="TagValue",GT="Tag",y4="Tags",YC="Threshold",LE0="UpdateHealthCheckRequest",GE0="UpdateHostedZoneCommentRequest",WE0="UpdateTrafficPolicyCommentRequest",BE0="UpdateTrafficPolicyInstanceRequest",AE0="UUID",k0="Value",V0="VPC",c4="VPCId",g4="VPCRegion",Df="VPCs",Th="Version",G$="Weight",zE0="continentcode",RE0="countrycode",XE0="delegationsetid",SE0="dnsname",YE0="edns0clientsubnetip",QE0="edns0clientsubnetmask",KE0="hostedzonetype",a4="hostedzoneid",ME0="identifier",zk="id",lf="location",p4="maxresults",e1="maxitems",HC="marker",zf="member",X="message",j4="messages",W$="nexttoken",ZE0="name",JE0="recordname",VE0="recordtype",PE0="resolverip",HE0="subdivisioncode",NE0="startcontinentcode",DE0="startcountrycode",qE0="startsubdivisioncode",kE0="type",yE0="trafficpolicyid",NC="trafficpolicyinstancename",DC="trafficpolicyinstancetype",jE0="trafficpolicyversion",OE0="vpcid",i0='<?xml version="1.0" encoding="UTF-8"?>',lE0="version",vE0="vpcregion";class qC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Rk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(ZN).de(dD).build(){}q();var Xk=Y(N(),1);J();class kC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Xk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(JN).de(iD).build(){}q();var Sk=Y(N(),1);J();class yC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Sk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(VN).de(cD).build(){}q();var Yk=Y(N(),1);J();class jC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Yk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),BN(w),O(w)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(PN).de(gD).build(){}q();var Qk=Y(N(),1);J();class OC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Qk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(HN).de(xD).build(){}q();var Kk=Y(N(),1);J();class lC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Kk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(NN).de(_D).build(){}q();var Mk=Y(N(),1);J();class vC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Mk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(DN).de(nD).build(){}q();var Zk=Y(N(),1);J();class bC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Zk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(qN).de(eD).build(){}q();var Jk=Y(N(),1);J();class mC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Jk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(kN).de(aD).build(){}q();var Vk=Y(N(),1);J();class dC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Vk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(yN).de(pD).build(){}q();var Pk=Y(N(),1);J();class iC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Pk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(jN).de(oD).build(){}q();var Hk=Y(N(),1);J();class cC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Hk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(ON).de(uD).build(){}q();var Nk=Y(N(),1);J();class gC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Nk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(lN).de(tD).build(){}q();var Dk=Y(N(),1);J();class xC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Dk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(vN).de(fq).build(){}q();var qk=Y(N(),1);J();class _C extends A.classBuilder().ep(M).m(function(f,h,w,s){return[qk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(bN).de(hq).build(){}q();var kk=Y(N(),1);J();class nC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[kk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(mN).de(wq).build(){}q();var yk=Y(N(),1);J();class eC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[yk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(dN).de(sq).build(){}q();var jk=Y(N(),1);J();class aC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[jk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(iN).de($q).build(){}q();var Ok=Y(N(),1);J();class pC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Ok.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(cN).de(Eq).build(){}q();var lk=Y(N(),1);J();class oC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[lk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(gN).de(Uq).build(){}q();var vk=Y(N(),1);J();class uC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[vk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(xN).de(Tq).build(){}q();var bk=Y(N(),1);J();class tC extends A.classBuilder().ep(M).m(function(f,h,w,s){return[bk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(_N).de(Fq).build(){}q();var mk=Y(N(),1);J();class fI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[mk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(nN).de(rq).build(){}q();var dk=Y(N(),1);J();class hI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[dk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(eN).de(Cq).build(){}q();var ik=Y(N(),1);J();class wI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[ik.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(aN).de(Iq).build(){}q();var ck=Y(N(),1);J();class sI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[ck.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser(pN).de(Lq).build(){}q();var gk=Y(N(),1);J();class $I extends A.classBuilder().ep(M).m(function(f,h,w,s){return[gk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(oN).de(Gq).build(){}q();var xk=Y(N(),1);J();class EI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[xk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(uN).de(Wq).build(){}q();var _k=Y(N(),1);J();class UI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[_k.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(tN).de(Bq).build(){}q();var nk=Y(N(),1);J();class TI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[nk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser(fD).de(Aq).build(){}q();var ek=Y(N(),1);J();class FI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[ek.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(hD).de(zq).build(){}q();var ak=Y(N(),1);J();class rI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[ak.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser(wD).de(Rq).build(){}q();var pk=Y(N(),1);J();class CI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[pk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser(sD).de(Xq).build(){}q();var ok=Y(N(),1);J();class II extends A.classBuilder().ep(M).m(function(f,h,w,s){return[ok.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser($D).de(Sq).build(){}q();var uk=Y(N(),1);J();class LI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[uk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser(ED).de(Yq).build(){}q();var tk=Y(N(),1);J();class GI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[tk.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(UD).de(Qq).build(){}q();var fy=Y(N(),1);J();class WI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[fy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(TD).de(Kq).build(){}q();var hy=Y(N(),1);J();class BI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[hy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(FD).de(Mq).build(){}q();var wy=Y(N(),1);J();class AI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[wy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(rD).de(Zq).build(){}q();var sy=Y(N(),1);J();class zI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[sy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(CD).de(Jq).build(){}q();var $y=Y(N(),1);J();class RI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[$y.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(ID).de(Vq).build(){}q();var Ey=Y(N(),1);J();class XI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Ey.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser(LD).de(Pq).build(){}q();var Uy=Y(N(),1);J();class SI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Uy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(GD).de(Hq).build(){}q();var Ty=Y(N(),1);J();class YI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Ty.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(WD).de(Nq).build(){}q();var Fy=Y(N(),1);J();class QI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Fy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(BD).de(Dq).build(){}q();var ry=Y(N(),1);J();class KI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[ry.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(AD).de(qq).build(){}q();var Cy=Y(N(),1);J();class MI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Cy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(zD).de(kq).build(){}q();var Iy=Y(N(),1);J();class ZI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Iy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(RD).de(yq).build(){}q();var Ly=Y(N(),1);J();class JI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Ly.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(XD).de(jq).build(){}q();var Gy=Y(N(),1);J();class VI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Gy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(SD).de(Oq).build(){}q();var Wy=Y(N(),1);J();class PI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Wy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser(YD).de(lq).build(){}q();var By=Y(N(),1);J();class HI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[By.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(KD).de(bq).build(){}q();var Ay=Y(N(),1);J();class NI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Ay.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(MD).de(mq).build(){}q();var zy=Y(N(),1);J();class DI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[zy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(QD).de(vq).build(){}q();var Ry=Y(N(),1);J();class qI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Ry.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(ZD).de(dq).build(){}q();var Xy=Y(N(),1);J();class kI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Xy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(JD).de(iq).build(){}q();var Sy=Y(N(),1);J();class yI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Sy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(VD).de(cq).build(){}q();var Yy=Y(N(),1);J();class jI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Yy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(PD).de(gq).build(){}q();var Qy=Y(N(),1);J();class OI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Qy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(HD).de(xq).build(){}q();var Ky=Y(N(),1);J();class lI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Ky.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(ND).de(_q).build(){}q();var My=Y(N(),1);J();class vI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[My.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(qD).de(eq).build(){}q();var Zy=Y(N(),1);J();class bI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Zy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(kD).de(aq).build(){}q();var Jy=Y(N(),1);J();class mI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Jy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(DD).de(nq).build(){}q();var Vy=Y(N(),1);J();class dI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Vy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(yD).de(pq).build(){}q();var Py=Y(N(),1);J();class iI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Py.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(jD).de(oq).build(){}q();var Hy=Y(N(),1);J();class cI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Hy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(OD).de(uq).build(){}q();var Ny=Y(N(),1);J();class gI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Ny.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser(lD).de(tq).build(){}q();var Dy=Y(N(),1);J();class xI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[Dy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(vD).de(fk).build(){}q();var qy=Y(N(),1);J();class _I extends A.classBuilder().ep(M).m(function(f,h,w,s){return[qy.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser(bD).de(hk).build(){}q();var ky=Y(N(),1);J();class nI extends A.classBuilder().ep(M).m(function(f,h,w,s){return[ky.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions()),O(w)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(mD).de(wk).build(){}var bE0={ActivateKeySigningKeyCommand:qC,AssociateVPCWithHostedZoneCommand:kC,ChangeCidrCollectionCommand:yC,ChangeResourceRecordSetsCommand:jC,ChangeTagsForResourceCommand:OC,CreateCidrCollectionCommand:lC,CreateHealthCheckCommand:vC,CreateHostedZoneCommand:bC,CreateKeySigningKeyCommand:mC,CreateQueryLoggingConfigCommand:dC,CreateReusableDelegationSetCommand:iC,CreateTrafficPolicyCommand:cC,CreateTrafficPolicyInstanceCommand:gC,CreateTrafficPolicyVersionCommand:xC,CreateVPCAssociationAuthorizationCommand:_C,DeactivateKeySigningKeyCommand:nC,DeleteCidrCollectionCommand:eC,DeleteHealthCheckCommand:aC,DeleteHostedZoneCommand:pC,DeleteKeySigningKeyCommand:oC,DeleteQueryLoggingConfigCommand:uC,DeleteReusableDelegationSetCommand:tC,DeleteTrafficPolicyCommand:fI,DeleteTrafficPolicyInstanceCommand:hI,DeleteVPCAssociationAuthorizationCommand:wI,DisableHostedZoneDNSSECCommand:sI,DisassociateVPCFromHostedZoneCommand:$I,EnableHostedZoneDNSSECCommand:EI,GetAccountLimitCommand:UI,GetChangeCommand:TI,GetCheckerIpRangesCommand:FI,GetDNSSECCommand:rI,GetGeoLocationCommand:CI,GetHealthCheckCommand:II,GetHealthCheckCountCommand:LI,GetHealthCheckLastFailureReasonCommand:GI,GetHealthCheckStatusCommand:WI,GetHostedZoneCommand:BI,GetHostedZoneCountCommand:AI,GetHostedZoneLimitCommand:zI,GetQueryLoggingConfigCommand:RI,GetReusableDelegationSetCommand:XI,GetReusableDelegationSetLimitCommand:SI,GetTrafficPolicyCommand:YI,GetTrafficPolicyInstanceCommand:QI,GetTrafficPolicyInstanceCountCommand:KI,ListCidrBlocksCommand:MI,ListCidrCollectionsCommand:ZI,ListCidrLocationsCommand:JI,ListGeoLocationsCommand:VI,ListHealthChecksCommand:PI,ListHostedZonesCommand:DI,ListHostedZonesByNameCommand:HI,ListHostedZonesByVPCCommand:NI,ListQueryLoggingConfigsCommand:qI,ListResourceRecordSetsCommand:kI,ListReusableDelegationSetsCommand:yI,ListTagsForResourceCommand:jI,ListTagsForResourcesCommand:OI,ListTrafficPoliciesCommand:lI,ListTrafficPolicyInstancesCommand:mI,ListTrafficPolicyInstancesByHostedZoneCommand:vI,ListTrafficPolicyInstancesByPolicyCommand:bI,ListTrafficPolicyVersionsCommand:dI,ListVPCAssociationAuthorizationsCommand:iI,TestDNSAnswerCommand:cI,UpdateHealthCheckCommand:gI,UpdateHostedZoneCommentCommand:xI,UpdateTrafficPolicyCommentCommand:_I,UpdateTrafficPolicyInstanceCommand:nI};class ch extends Ar{}$s(bE0,ch);w5();s5();$5();j$();Kh();var B$=Y(b0(),1);fE();q();Uw();J();var yy=Y(j0(),1);gf();var jy=async(f,h,w)=>{return{operation:Yh(h).operation,region:await L1(f.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};function mE0(f){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:f.region},propertiesExtractor:(h,w)=>({signingProperties:{config:h,context:w}})}}var Oy=(f)=>{let h=[];switch(f.operation){default:h.push(mE0(f))}return h},ly=(f)=>{let h=yy.resolveAwsSdkSigV4Config(f);return Object.assign(h,{})};var vy=(f)=>{return Object.assign(f,{useDualstackEndpoint:f.useDualstackEndpoint??!1,useFipsEndpoint:f.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 by={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.777.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/core":"3.775.0","@aws-sdk/credential-provider-node":"3.777.0","@aws-sdk/middleware-host-header":"3.775.0","@aws-sdk/middleware-logger":"3.775.0","@aws-sdk/middleware-recursion-detection":"3.775.0","@aws-sdk/middleware-user-agent":"3.775.0","@aws-sdk/region-config-resolver":"3.775.0","@aws-sdk/types":"3.775.0","@aws-sdk/util-endpoints":"3.775.0","@aws-sdk/util-user-agent-browser":"3.775.0","@aws-sdk/util-user-agent-node":"3.775.0","@smithy/config-resolver":"^4.1.0","@smithy/core":"^3.2.0","@smithy/fetch-http-handler":"^5.0.2","@smithy/hash-node":"^4.0.2","@smithy/invalid-dependency":"^4.0.2","@smithy/middleware-content-length":"^4.0.2","@smithy/middleware-endpoint":"^4.1.0","@smithy/middleware-retry":"^4.1.0","@smithy/middleware-serde":"^4.0.3","@smithy/middleware-stack":"^4.0.2","@smithy/node-config-provider":"^4.0.2","@smithy/node-http-handler":"^4.0.4","@smithy/protocol-http":"^5.1.0","@smithy/smithy-client":"^4.2.0","@smithy/types":"^4.2.0","@smithy/url-parser":"^4.0.2","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.8","@smithy/util-defaults-mode-node":"^4.0.8","@smithy/util-endpoints":"^3.0.2","@smithy/util-middleware":"^4.0.2","@smithy/util-retry":"^4.0.2","@smithy/util-utf8":"^4.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines:{node:">=18.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 fj=Y(j0(),1);WU();Kh();BU();Uw();Jh();o$();AU();wf();var uy=Y(j0(),1);J();aw();zU();ys();Z$();cf();var my={["required"]:!1,type:"String"},dy={["required"]:!0,default:!1,type:"Boolean"},iy={["ref"]:"Endpoint"},ey={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},ay={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},vf={},cy={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},gy={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},xy=[ey],_y=[ay],ny=[{["ref"]:"Region"}],iE0={version:"1.0",parameters:{Region:my,UseDualStack:dy,UseFIPS:dy,Endpoint:my},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[iy]}],rules:[{conditions:xy,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:_y,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:iy,properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ny}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ny,assign:"PartitionResult"}],rules:[{conditions:[ey,ay],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,cy]},gy],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:xy,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[cy,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:_y,rules:[{conditions:[gy],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},py=iE0;var cE0=new _h({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),oy=(f,h={})=>{return cE0.get(f,()=>nh(py,{endpointParams:f,logger:h.logger}))};t1.aws=eh;var ty=(f)=>{return{apiVersion:"2014-05-15",base64Decoder:f?.base64Decoder??Os,base64Encoder:f?.base64Encoder??ls,disableHostPrefix:f?.disableHostPrefix??!1,endpointProvider:f?.endpointProvider??oy,extensions:f?.extensions??[],httpAuthSchemeProvider:f?.httpAuthSchemeProvider??Oy,httpAuthSchemes:f?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4"),signer:new uy.AwsSdkSigV4Signer}],logger:f?.logger??new nf,serviceId:f?.serviceId??"Route 53 Domains",urlParser:f?.urlParser??j1,utf8Decoder:f?.utf8Decoder??Vf,utf8Encoder:f?.utf8Encoder??ks}};J();RU();J();var hj=(f)=>{Fs(process.version);let h=vs(f),w=()=>h().then(Ts),s=ty(f);fj.emitWarningIfUnsupportedVersion(process.version);let $={profile:f?.profile};return{...s,...f,runtime:"node",defaultsMode:h,bodyLengthChecker:f?.bodyLengthChecker??js,credentialDefaultProvider:f?.credentialDefaultProvider??qU,defaultUserAgentProvider:f?.defaultUserAgentProvider??Ds({serviceId:s.serviceId,clientVersion:by.version}),maxAttempts:f?.maxAttempts??A0(fs,f),region:f?.region??A0(Qh,{...gw,...$}),requestHandler:Ef.create(f?.requestHandler??w),retryMode:f?.retryMode??A0({...ws,default:async()=>(await w()).retryMode||Vh},f),sha256:f?.sha256??rw.bind(null,"sha256"),streamCollector:f?.streamCollector??Ws,useDualstackEndpoint:f?.useDualstackEndpoint??A0(iw,$),useFipsEndpoint:f?.useFipsEndpoint??A0(cw,$),userAgentAppId:f?.userAgentAppId??A0(qs,$)}};XU();r1();J();var wj=(f)=>{let{httpAuthSchemes:h,httpAuthSchemeProvider:w,credentials:s}=f;return{setHttpAuthScheme($){let E=h.findIndex((U)=>U.schemeId===$.schemeId);if(E===-1)h.push($);else h.splice(E,1,$)},httpAuthSchemes(){return h},setHttpAuthSchemeProvider($){w=$},httpAuthSchemeProvider(){return w},setCredentials($){s=$},credentials(){return s}}},sj=(f)=>{return{httpAuthSchemes:f.httpAuthSchemes(),httpAuthSchemeProvider:f.httpAuthSchemeProvider(),credentials:f.credentials()}};var $j=(f,h)=>{let w=Object.assign(bs(f),rs(f),Zw(f),wj(f));return h.forEach((s)=>s.configure(w)),Object.assign(f,ms(w),Cs(w),Jw(w),sj(w))};class eI extends $w{config;constructor(...[f]){let h=hj(f||{});super(h);this.initConfig=h;let w=vy(h),s=kw(w),$=hs(s),E=xw($),U=Vw(E),T=pw(U),F=ly(T),r=$j(F,f?.extensions||[]);this.config=r,this.middlewareStack.use(mw(this.config)),this.middlewareStack.use(Ls(this.config)),this.middlewareStack.use(_w(this.config)),this.middlewareStack.use(Pw(this.config)),this.middlewareStack.use(Hw(this.config)),this.middlewareStack.use(Nw(this.config)),this.middlewareStack.use(B$.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:jy,identityProviderConfigProvider:async(C)=>new B$.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(B$.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}J();q();var HO=Y(N(),1);J();J();J();class a1 extends $f{constructor(f){super(f);Object.setPrototypeOf(this,a1.prototype)}}class zT extends a1{name="DomainLimitExceeded";$fault="client";constructor(f){super({name:"DomainLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,zT.prototype)}}class RT extends a1{name="InvalidInput";$fault="client";constructor(f){super({name:"InvalidInput",$fault:"client",...f});Object.setPrototypeOf(this,RT.prototype)}}class XT extends a1{name="OperationLimitExceeded";$fault="client";constructor(f){super({name:"OperationLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,XT.prototype)}}class ST extends a1{name="UnsupportedTLD";$fault="client";constructor(f){super({name:"UnsupportedTLD",$fault:"client",...f});Object.setPrototypeOf(this,ST.prototype)}}class YT extends a1{name="DnssecLimitExceeded";$fault="client";constructor(f){super({name:"DnssecLimitExceeded",$fault:"client",...f});Object.setPrototypeOf(this,YT.prototype)}}class QT extends a1{name="DuplicateRequest";$fault="client";requestId;constructor(f){super({name:"DuplicateRequest",$fault:"client",...f});Object.setPrototypeOf(this,QT.prototype),this.requestId=f.requestId}}class KT extends a1{name="TLDRulesViolation";$fault="client";constructor(f){super({name:"TLDRulesViolation",$fault:"client",...f});Object.setPrototypeOf(this,KT.prototype)}}var Ej=(f)=>({...f,...f.Password&&{Password:T0}}),Uj=(f)=>({...f,...f.AuthCode&&{AuthCode:T0}});var Tj=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.AbuseContactEmail&&{AbuseContactEmail:T0},...f.AbuseContactPhone&&{AbuseContactPhone:T0},...f.BillingContact&&{BillingContact:T0}}),Fj=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),rj=(f)=>({...f,...f.emailAddress&&{emailAddress:T0}}),Cj=(f)=>({...f,...f.AuthCode&&{AuthCode:T0}}),Ij=(f)=>({...f,...f.AuthCode&&{AuthCode:T0},...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),Lj=(f)=>({...f,...f.Password&&{Password:T0}}),Gj=(f)=>({...f,...f.AdminContact&&{AdminContact:T0},...f.RegistrantContact&&{RegistrantContact:T0},...f.TechContact&&{TechContact:T0},...f.BillingContact&&{BillingContact:T0}}),Wj=(f)=>({...f,...f.FIAuthKey&&{FIAuthKey:T0}});var w0=Y(j0(),1);r1();J();var Bj=async(f,h)=>{let w=U0("AcceptDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Aj=async(f,h)=>{let w=U0("AssociateDelegationSignerToDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},zj=async(f,h)=>{let w=U0("CancelDomainTransferToAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Rj=async(f,h)=>{let w=U0("CheckDomainAvailability"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Xj=async(f,h)=>{let w=U0("CheckDomainTransferability"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Sj=async(f,h)=>{let w=U0("DeleteDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Yj=async(f,h)=>{let w=U0("DeleteTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Qj=async(f,h)=>{let w=U0("DisableDomainAutoRenew"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Kj=async(f,h)=>{let w=U0("DisableDomainTransferLock"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Mj=async(f,h)=>{let w=U0("DisassociateDelegationSignerFromDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Zj=async(f,h)=>{let w=U0("EnableDomainAutoRenew"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Jj=async(f,h)=>{let w=U0("EnableDomainTransferLock"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Vj=async(f,h)=>{let w=U0("GetContactReachabilityStatus"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Pj=async(f,h)=>{let w=U0("GetDomainDetail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Hj=async(f,h)=>{let w=U0("GetDomainSuggestions"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Nj=async(f,h)=>{let w=U0("GetOperationDetail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Dj=async(f,h)=>{let w=U0("ListDomains"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},qj=async(f,h)=>{let w=U0("ListOperations"),s;return s=JSON.stringify(uE0(f,h)),E0(h,w,"/",void 0,s)},kj=async(f,h)=>{let w=U0("ListPrices"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},yj=async(f,h)=>{let w=U0("ListTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},jj=async(f,h)=>{let w=U0("PushDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},Oj=async(f,h)=>{let w=U0("RegisterDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},lj=async(f,h)=>{let w=U0("RejectDomainTransferFromAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},vj=async(f,h)=>{let w=U0("RenewDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},bj=async(f,h)=>{let w=U0("ResendContactReachabilityEmail"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},mj=async(f,h)=>{let w=U0("ResendOperationAuthorization"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},dj=async(f,h)=>{let w=U0("RetrieveDomainAuthCode"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},ij=async(f,h)=>{let w=U0("TransferDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},cj=async(f,h)=>{let w=U0("TransferDomainToAnotherAwsAccount"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},gj=async(f,h)=>{let w=U0("UpdateDomainContact"),s;return s=JSON.stringify(tE0(f,h)),E0(h,w,"/",void 0,s)},xj=async(f,h)=>{let w=U0("UpdateDomainContactPrivacy"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},_j=async(f,h)=>{let w=U0("UpdateDomainNameservers"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},nj=async(f,h)=>{let w=U0("UpdateTagsForDomain"),s;return s=JSON.stringify(v(f)),E0(h,w,"/",void 0,s)},ej=async(f,h)=>{let w=U0("ViewBilling"),s;return s=JSON.stringify(fU0(f,h)),E0(h,w,"/",void 0,s)},aj=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},pj=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},oj=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},uj=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},tj=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},fO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},hO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},wO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},sO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},$O=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},EO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},UO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},TO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},FO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=TU0(w,h),{$metadata:t(f),...s}},rO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},CO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=FU0(w,h),{$metadata:t(f),...s}},IO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=rU0(w,h),{$metadata:t(f),...s}},LO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=CU0(w,h),{$metadata:t(f),...s}},GO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=IU0(w,h),{$metadata:t(f),...s}},WO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},BO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);return await G1.collectBody(f.body,h),{$metadata:t(f)}},AO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},zO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},RO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},XO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},SO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);return await G1.collectBody(f.body,h),{$metadata:t(f)}},YO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},QO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},KO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},MO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},ZO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},JO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},VO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=v(w),{$metadata:t(f),...s}},PO=async(f,h)=>{if(f.statusCode>=300)return $0(f,h);let w=await w0.parseJsonBody(f.body,h),s={};return s=WU0(w,h),{$metadata:t(f),...s}},$0=async(f,h)=>{let w={...f,body:await w0.parseJsonErrorBody(f.body,h)},s=w0.loadRestJsonErrorCode(f,w.body);switch(s){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await xE0(w,h);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await nE0(w,h);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await eE0(w,h);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await pE0(w,h);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await gE0(w,h);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await _E0(w,h);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await aE0(w,h);default:let $=w.body;return BU0({output:f,parsedBody:$,errorCode:s})}},gE0=async(f,h)=>{let w=f.body,s=v(w),$=new YT({$metadata:t(f),...s});return l($,w)},xE0=async(f,h)=>{let w=f.body,s=v(w),$=new zT({$metadata:t(f),...s});return l($,w)},_E0=async(f,h)=>{let w=f.body,s=v(w),$=new QT({$metadata:t(f),...s});return l($,w)},nE0=async(f,h)=>{let w=f.body,s=v(w),$=new RT({$metadata:t(f),...s});return l($,w)},eE0=async(f,h)=>{let w=f.body,s=v(w),$=new XT({$metadata:t(f),...s});return l($,w)},aE0=async(f,h)=>{let w=f.body,s=v(w),$=new KT({$metadata:t(f),...s});return l($,w)},pE0=async(f,h)=>{let w=f.body,s=v(w),$=new ST({$metadata:t(f),...s});return l($,w)},oE0=(f,h)=>{return H0(f,{Currency:[],MaxPrice:aS})},uE0=(f,h)=>{return H0(f,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:v,SubmittedSince:(w)=>w.getTime()/1000,Type:v})},tE0=(f,h)=>{return H0(f,{AdminContact:v,BillingContact:v,Consent:(w)=>oE0(w,h),DomainName:[],RegistrantContact:v,TechContact:v})},fU0=(f,h)=>{return H0(f,{End:(w)=>w.getTime()/1000,Marker:[],MaxItems:[],Start:(w)=>w.getTime()/1000})},hU0=(f,h)=>{return H0(f,{BillDate:(w)=>j(Kf(S1(w))),DomainName:W,InvoiceId:W,Operation:W,Price:q3})},wU0=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return hU0(s,h)})},sU0=(f,h)=>{return H0(f,{ChangeOwnershipPrice:(w)=>o4(w,h),Name:W,RegistrationPrice:(w)=>o4(w,h),RenewalPrice:(w)=>o4(w,h),RestorationPrice:(w)=>o4(w,h),TransferPrice:(w)=>o4(w,h)})},$U0=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return sU0(s,h)})},EU0=(f,h)=>{return H0(f,{AutoRenew:Hh,DomainName:W,Expiry:(w)=>j(Kf(S1(w))),TransferLock:Hh})},UU0=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return EU0(s,h)})},TU0=(f,h)=>{return H0(f,{AbuseContactEmail:W,AbuseContactPhone:W,AdminContact:v,AdminPrivacy:Hh,AutoRenew:Hh,BillingContact:v,BillingPrivacy:Hh,CreationDate:(w)=>j(Kf(S1(w))),DnsSec:W,DnssecKeys:v,DomainName:W,ExpirationDate:(w)=>j(Kf(S1(w))),Nameservers:v,RegistrantContact:v,RegistrantPrivacy:Hh,RegistrarName:W,RegistrarUrl:W,RegistryDomainId:W,Reseller:W,StatusList:v,TechContact:v,TechPrivacy:Hh,UpdatedDate:(w)=>j(Kf(S1(w))),WhoIsServer:W})},FU0=(f,h)=>{return H0(f,{DomainName:W,LastUpdatedDate:(w)=>j(Kf(S1(w))),Message:W,OperationId:W,Status:W,StatusFlag:W,SubmittedDate:(w)=>j(Kf(S1(w))),Type:W})},rU0=(f,h)=>{return H0(f,{Domains:(w)=>UU0(w,h),NextPageMarker:W})},CU0=(f,h)=>{return H0(f,{NextPageMarker:W,Operations:(w)=>GU0(w,h)})},IU0=(f,h)=>{return H0(f,{NextPageMarker:W,Prices:(w)=>$U0(w,h)})},LU0=(f,h)=>{return H0(f,{DomainName:W,LastUpdatedDate:(w)=>j(Kf(S1(w))),Message:W,OperationId:W,Status:W,StatusFlag:W,SubmittedDate:(w)=>j(Kf(S1(w))),Type:W})},GU0=(f,h)=>{return(f||[]).filter((s)=>s!=null).map((s)=>{return LU0(s,h)})},o4=(f,h)=>{return H0(f,{Currency:W,Price:q3})},WU0=(f,h)=>{return H0(f,{BillingRecords:(w)=>wU0(w,h),NextPageMarker:W})},t=(f)=>({httpStatusCode:f.statusCode,requestId:f.headers["x-amzn-requestid"]??f.headers["x-amzn-request-id"]??f.headers["x-amz-request-id"],extendedRequestId:f.headers["x-amz-id-2"],cfId:f.headers["x-amz-cf-id"]});var BU0=Us(a1),E0=async(f,h,w,s,$)=>{let{hostname:E,protocol:U="https",port:T,path:F}=await f.endpoint(),r={protocol:U,hostname:E,port:T,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+w:F+w,headers:h};if(s!==void 0)r.hostname=s;if($!==void 0)r.body=$;return new _0(r)};function U0(f){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${f}`}}class aI extends A.classBuilder().ep(c).m(function(f,h,w,s){return[HO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(Ej,void 0).ser(Bj).de(aj).build(){}q();var NO=Y(N(),1);J();class pI extends A.classBuilder().ep(c).m(function(f,h,w,s){return[NO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser(Aj).de(pj).build(){}q();var DO=Y(N(),1);J();class oI extends A.classBuilder().ep(c).m(function(f,h,w,s){return[DO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(zj).de(oj).build(){}q();var qO=Y(N(),1);J();class uI extends A.classBuilder().ep(c).m(function(f,h,w,s){return[qO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser(Rj).de(uj).build(){}q();var kO=Y(N(),1);J();class tI extends A.classBuilder().ep(c).m(function(f,h,w,s){return[kO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(Uj,void 0).ser(Xj).de(tj).build(){}q();var yO=Y(N(),1);J();class fL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[yO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(Sj).de(fO).build(){}q();var jO=Y(N(),1);J();class hL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[jO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser(Yj).de(hO).build(){}q();var OO=Y(N(),1);J();class wL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[OO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(Qj).de(wO).build(){}q();var lO=Y(N(),1);J();class sL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[lO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(Kj).de(sO).build(){}q();var vO=Y(N(),1);J();class $L extends A.classBuilder().ep(c).m(function(f,h,w,s){return[vO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(Mj).de($O).build(){}q();var bO=Y(N(),1);J();class EL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[bO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(Zj).de(EO).build(){}q();var mO=Y(N(),1);J();class UL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[mO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(Jj).de(UO).build(){}q();var dO=Y(N(),1);J();class TL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[dO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(Vj).de(TO).build(){}q();var iO=Y(N(),1);J();class FL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[iO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,Tj).ser(Pj).de(FO).build(){}q();var cO=Y(N(),1);J();class rL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[cO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(Hj).de(rO).build(){}q();var gO=Y(N(),1);J();class CL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[gO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(Nj).de(CO).build(){}q();var xO=Y(N(),1);J();class IL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[xO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(Dj).de(IO).build(){}q();var _O=Y(N(),1);J();class LL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[_O.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(qj).de(LO).build(){}q();var nO=Y(N(),1);J();class GL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[nO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(kj).de(GO).build(){}q();var eO=Y(N(),1);J();class WL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[eO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(yj).de(WO).build(){}q();var aO=Y(N(),1);J();class BL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[aO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(jj).de(BO).build(){}q();var pO=Y(N(),1);J();class AL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[pO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(Fj,void 0).ser(Oj).de(AO).build(){}q();var oO=Y(N(),1);J();class zL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[oO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser(lj).de(zO).build(){}q();var uO=Y(N(),1);J();class RL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[uO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(vj).de(RO).build(){}q();var tO=Y(N(),1);J();class XL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[tO.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,rj).ser(bj).de(XO).build(){}q();var fl=Y(N(),1);J();class SL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[fl.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(mj).de(SO).build(){}q();var hl=Y(N(),1);J();class YL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[hl.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,Cj).ser(dj).de(YO).build(){}q();var wl=Y(N(),1);J();class QL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[wl.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(Ij,void 0).ser(ij).de(QO).build(){}q();var sl=Y(N(),1);J();class KL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[sl.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,Lj).ser(cj).de(KO).build(){}q();var $l=Y(N(),1);J();class ML extends A.classBuilder().ep(c).m(function(f,h,w,s){return[$l.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(Gj,void 0).ser(gj).de(MO).build(){}q();var El=Y(N(),1);J();class ZL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[El.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(xj).de(ZO).build(){}q();var Ul=Y(N(),1);J();class JL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[Ul.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(Wj,void 0).ser(_j).de(JO).build(){}q();var Tl=Y(N(),1);J();class VL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[Tl.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(nj).de(VO).build(){}q();var Fl=Y(N(),1);J();class PL extends A.classBuilder().ep(c).m(function(f,h,w,s){return[Fl.getSerdePlugin(w,this.serialize,this.deserialize),z(w,f.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(ej).de(PO).build(){}var AU0={AcceptDomainTransferFromAnotherAwsAccountCommand:aI,AssociateDelegationSignerToDomainCommand:pI,CancelDomainTransferToAnotherAwsAccountCommand:oI,CheckDomainAvailabilityCommand:uI,CheckDomainTransferabilityCommand:tI,DeleteDomainCommand:fL,DeleteTagsForDomainCommand:hL,DisableDomainAutoRenewCommand:wL,DisableDomainTransferLockCommand:sL,DisassociateDelegationSignerFromDomainCommand:$L,EnableDomainAutoRenewCommand:EL,EnableDomainTransferLockCommand:UL,GetContactReachabilityStatusCommand:TL,GetDomainDetailCommand:FL,GetDomainSuggestionsCommand:rL,GetOperationDetailCommand:CL,ListDomainsCommand:IL,ListOperationsCommand:LL,ListPricesCommand:GL,ListTagsForDomainCommand:WL,PushDomainCommand:BL,RegisterDomainCommand:AL,RejectDomainTransferFromAnotherAwsAccountCommand:zL,RenewDomainCommand:RL,ResendContactReachabilityEmailCommand:XL,ResendOperationAuthorizationCommand:SL,RetrieveDomainAuthCodeCommand:YL,TransferDomainCommand:QL,TransferDomainToAnotherAwsAccountCommand:KL,UpdateDomainContactCommand:ML,UpdateDomainContactPrivacyCommand:ZL,UpdateDomainNameserversCommand:JL,UpdateTagsForDomainCommand:VL,ViewBillingCommand:PL};class u4 extends eI{}$s(AU0,u4);import{runAction as zU0}from"@stacksjs/actions";import{config as Cl}from"@stacksjs/config";import{Action as RU0}from"@stacksjs/enums";import{err as rh,handleError as bf,ok as A$}from"@stacksjs/error-handling";import{log as V1}from"@stacksjs/logging";import{path as XU0}from"@stacksjs/path";import{fs as rl}from"@stacksjs/storage";async function fO0(f){let h=new ch,w=await h.listHostedZonesByName({DNSName:f});if(!w||!w.HostedZones)return rh(bf(`No hosted zones found for domain: ${f}`));let s=w.HostedZones.find((E)=>E.Name===`${f}.`);if(!s)return rh(bf(`Hosted Zone not found for domain: ${f}`));let $=await h.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return rh(bf(`No DNS records found for domain: ${f}`));for(let E of $.ResourceRecordSets)if(E.Type!=="NS"&&E.Type!=="SOA")await h.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:E}]}});return await h.deleteHostedZone({Id:s.Id}),V1.info(`Deleted Hosted Zone for domain: ${f}`),A$("success")}async function hO0(f){let h=new ch,w=await h.listHostedZonesByName({DNSName:f});if(!w||!w.HostedZones)return rh(bf(`No hosted zones found for domain: ${f}`));let s=w.HostedZones.find((E)=>E.Name===`${f}.`);if(!s)return rh(bf(`Hosted Zone not found for domain: ${f}`));let $=await h.listResourceRecordSets({HostedZoneId:s.Id});if(!$||!$.ResourceRecordSets)return rh(bf(`No DNS records found for domain: ${f}`));for(let E of $.ResourceRecordSets)if(E.Type!=="NS"&&E.Type!=="SOA")await h.changeResourceRecordSets({HostedZoneId:s.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:E}]}});return V1.info(`Deleted DNS records for domain: ${f}`),A$("success")}async function wO0(f){let h=new ch,s=(await h.listHostedZonesByName({DNSName:f})).HostedZones?.find((E)=>E.Name===`${f}.`);if(s)return A$(s);let $=await h.createHostedZone({Name:f,CallerReference:`${Date.now()}`});if(!$.HostedZone)return rh(bf("Failed to create hosted zone"));return A$($)}function SU0(f){try{let h=XU0.projectConfigPath("dns.ts"),s=rl.readFileSync(h,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${f.map(($)=>`'${$}'`).join(", ")}]`);rl.writeFileSync(h,s,"utf-8"),V1.info("Nameservers have been set.")}catch(h){console.error("Error updating nameservers:",h)}}async function sO0(f){try{let h=new ch,{HostedZones:w}=await h.listHostedZonesByName({DNSName:f});if(!w)return rh(bf(`No hosted zones found for domain ${f}`));let s=w[0];if(s&&s.Name===`${f}.`)return A$(s.Id);return A$(null)}catch(h){return rh(bf(`Failed to find hosted zone for domain ${f}`,h))}}async function YU0(f){if(V1.debug("Getting nameservers for domain:",f),!f)return[];try{return(await new u4().getDomainDetail({DomainName:f}))?.Nameservers?.map((s)=>s.Name)||[]}catch(h){bf("Error getting domain detail",h)}}async function QU0(f,h){if(!h)h=Cl.app.url;let w=await YU0(h);if(w&&f&&JSON.stringify(w.sort())!==JSON.stringify(f.sort()))return V1.info("Updating your domain nameservers to match the ones in your hosted zone..."),V1.debug("Hosted zone nameservers:",f),V1.debug("Domain nameservers:",w),await new u4().updateDomainNameservers({DomainName:h,Nameservers:f.map(($)=>({Name:$}))}),SU0(f),V1.info("Nameservers updated."),!0;V1.success("Your nameservers are up to date.")}async function $O0(f){if(V1.debug("Checking if domain has been added to cloud..."),!f)f=Cl.app.url;V1.debug("domainName:",f);let h=new ch,w=await h.listHostedZonesByName({DNSName:f});if(V1.debug("Existing hosted zones:",w),!w||!w.HostedZones)return!1;let s=w.HostedZones.find(($)=>$.Name===`${f}.`);if(s){V1.debug("Hosted zone found:",s);let E=(await h.getHostedZone({Id:s.Id})).DelegationSet?.NameServers||[];return await QU0(E,f),!0}return!1}async function EO0(f){return await zU0(RU0.DomainsAdd,f)}import{Buffer as Al}from"node:buffer";import{Buffer as jL}from"node:buffer";import kU0 from"node:dgram";import yU0 from"node:https";import jU0 from"node:net";import OU0 from"node:tls";import{URL as Ll}from"node:url";import{promises as lU0}from"node:fs";import{platform as vU0}from"node:os";var KU0=Object.create,{getPrototypeOf:MU0,defineProperty:Il,getOwnPropertyNames:ZU0}=Object,JU0=Object.prototype.hasOwnProperty,VU0=(f,h,w)=>{w=f!=null?KU0(MU0(f)):{};let s=h||!f||!f.__esModule?Il(w,"default",{value:f,enumerable:!0}):w;for(let $ of ZU0(f))if(!JU0.call(s,$))Il(s,$,{get:()=>f[$],enumerable:!0});return s},PU0=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports),HU0=PU0((f,h)=>{var w=process||{},s=w.argv||[],$=w.env||{},E=!(!!$.NO_COLOR||s.includes("--no-color"))&&(!!$.FORCE_COLOR||s.includes("--color")||w.platform==="win32"||(w.stdout||{}).isTTY&&$.TERM!=="dumb"||!!$.CI),U=(r,C,I=r)=>(L)=>{let B=""+L,R=B.indexOf(C,r.length);return~R?r+T(B,C,I,R)+C:r+B+C},T=(r,C,I,L)=>{let B="",R=0;do B+=r.substring(R,L)+I,R=L+C.length,L=r.indexOf(C,R);while(~L);return B+r.substring(R)},F=(r=E)=>{let C=r?U:()=>String;return{isColorSupported:r,reset:C("\x1B[0m","\x1B[0m"),bold:C("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:C("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:C("\x1B[3m","\x1B[23m"),underline:C("\x1B[4m","\x1B[24m"),inverse:C("\x1B[7m","\x1B[27m"),hidden:C("\x1B[8m","\x1B[28m"),strikethrough:C("\x1B[9m","\x1B[29m"),black:C("\x1B[30m","\x1B[39m"),red:C("\x1B[31m","\x1B[39m"),green:C("\x1B[32m","\x1B[39m"),yellow:C("\x1B[33m","\x1B[39m"),blue:C("\x1B[34m","\x1B[39m"),magenta:C("\x1B[35m","\x1B[39m"),cyan:C("\x1B[36m","\x1B[39m"),white:C("\x1B[37m","\x1B[39m"),gray:C("\x1B[90m","\x1B[39m"),bgBlack:C("\x1B[40m","\x1B[49m"),bgRed:C("\x1B[41m","\x1B[49m"),bgGreen:C("\x1B[42m","\x1B[49m"),bgYellow:C("\x1B[43m","\x1B[49m"),bgBlue:C("\x1B[44m","\x1B[49m"),bgMagenta:C("\x1B[45m","\x1B[49m"),bgCyan:C("\x1B[46m","\x1B[49m"),bgWhite:C("\x1B[47m","\x1B[49m"),blackBright:C("\x1B[90m","\x1B[39m"),redBright:C("\x1B[91m","\x1B[39m"),greenBright:C("\x1B[92m","\x1B[39m"),yellowBright:C("\x1B[93m","\x1B[39m"),blueBright:C("\x1B[94m","\x1B[39m"),magentaBright:C("\x1B[95m","\x1B[39m"),cyanBright:C("\x1B[96m","\x1B[39m"),whiteBright:C("\x1B[97m","\x1B[39m"),bgBlackBright:C("\x1B[100m","\x1B[49m"),bgRedBright:C("\x1B[101m","\x1B[49m"),bgGreenBright:C("\x1B[102m","\x1B[49m"),bgYellowBright:C("\x1B[103m","\x1B[49m"),bgBlueBright:C("\x1B[104m","\x1B[49m"),bgMagentaBright:C("\x1B[105m","\x1B[49m"),bgCyanBright:C("\x1B[106m","\x1B[49m"),bgWhiteBright:C("\x1B[107m","\x1B[49m")}};h.exports=F(),h.exports.createColors=F}),gh;((f)=>{f[f.A=1]="A",f[f.NS=2]="NS",f[f.CNAME=5]="CNAME",f[f.SOA=6]="SOA",f[f.PTR=12]="PTR",f[f.MX=15]="MX",f[f.TXT=16]="TXT",f[f.AAAA=28]="AAAA",f[f.SRV=33]="SRV",f[f.NAPTR=35]="NAPTR",f[f.OPT=41]="OPT",f[f.SSHFP=44]="SSHFP",f[f.TLSA=52]="TLSA",f[f.DNSKEY=48]="DNSKEY",f[f.CAA=257]="CAA"})(gh||={});var qL;((f)=>{f[f.IN=1]="IN",f[f.CH=3]="CH",f[f.HS=4]="HS"})(qL||={});var Gl;((f)=>{f.Disable="disable",f.Hide="hide",f.Show="show"})(Gl||={});var Wl;((f)=>{f[f.NoError=0]="NoError",f[f.FormErr=1]="FormErr",f[f.ServFail=2]="ServFail",f[f.NXDomain=3]="NXDomain",f[f.NotImp=4]="NotImp",f[f.Refused=5]="Refused",f[f.YXDomain=6]="YXDomain",f[f.YXRRSet=7]="YXRRSet",f[f.NXRRSet=8]="NXRRSet",f[f.NotAuth=9]="NotAuth",f[f.NotZone=10]="NotZone"})(Wl||={});var Bl;((f)=>{f.TruncatedPacket="TRUNCATED_PACKET",f.InvalidLength="INVALID_LENGTH",f.InvalidFormat="INVALID_FORMAT",f.InvalidName="INVALID_NAME",f.InvalidLabel="INVALID_LABEL",f.InvalidPointer="INVALID_POINTER",f.InvalidType="INVALID_TYPE",f.InvalidClass="INVALID_CLASS",f.NetworkError="NETWORK_ERROR"})(Bl||={});function NU0(f){if(!f)return;let h=Array.isArray(f)?f:[f],w={};for(let s of h)if(s==="aa"||s==="authoritative")w.authoritative=!0;else if(s==="ad"||s==="authentic")w.authenticData=!0;else if(s==="cd"||s==="checking-disabled")w.checkingDisabled=!0;else if(s.startsWith("bufsize="))w.udpPayloadSize=Number.parseInt(s.split("=")[1]);return w}function X0(f,h,w){if(w)console.debug(`[dnsx:${f}] ${h}`)}var DU0=12,qU0=63;class t4{response=!1;opcode=0;authoritative=!1;truncated=!1;recursionDesired=!1;recursionAvailable=!1;authenticData=!1;checkingDisabled=!1;responseCode=0;static fromBuffer(f){let h=new t4,w=f.readUInt16BE(0);return h.response=(w&32768)!==0,h.opcode=(w&30720)>>>11,h.authoritative=(w&1024)!==0,h.truncated=(w&512)!==0,h.recursionDesired=(w&256)!==0,h.recursionAvailable=(w&128)!==0,h.authenticData=(w&32)!==0,h.checkingDisabled=(w&16)!==0,h.responseCode=w&15,h}toBuffer(){let f=Al.alloc(2),h=0;if(this.response)h|=32768;if(h|=(this.opcode&15)<<11,this.authoritative)h|=1024;if(this.truncated)h|=512;if(this.recursionDesired)h|=256;if(this.recursionAvailable)h|=128;if(this.authenticData)h|=32;if(this.checkingDisabled)h|=16;return h|=this.responseCode&15,f.writeUInt16BE(h,0),f}}class kL{buffer;offset;nameOffsets;verbose;constructor(f=512,h){this.buffer=Al.alloc(f),this.offset=0,this.nameOffsets=new Map,this.verbose=h}writeHeader(f,h,w){X0("encoder",`Writing DNS header: ${JSON.stringify({id:f,flags:{response:h.response,opcode:h.opcode,recursionDesired:h.recursionDesired},counts:w})}`,this.verbose),this.writeUint16(f);let s=h.toBuffer();this.buffer.set(s,this.offset),this.offset+=2,this.writeUint16(w.qdcount),this.writeUint16(w.ancount),this.writeUint16(w.nscount),this.writeUint16(w.arcount)}writeName(f){X0("encoder",`Writing DNS name: ${f}`,this.verbose);let h=f.split(".");for(let w of h){if(w.length>qU0)throw new Error(`Label too long: ${w}`);this.buffer[this.offset++]=w.length,this.buffer.write(w,this.offset),this.offset+=w.length}this.buffer[this.offset++]=0}writeQuestion(f){this.writeName(f.name),this.writeUint16(f.type),this.writeUint16(f.class)}writeUint16(f){this.buffer.writeUInt16BE(f,this.offset),this.offset+=2}writeUint32(f){this.buffer.writeUInt32BE(f,this.offset),this.offset+=4}getBuffer(){return this.buffer.slice(0,this.offset)}}class yL{buffer;offset;constructor(f){this.buffer=f,this.offset=0}canRead(f){return this.offset+f<=this.buffer.length}readName(){let f=[],h=!1,w=this.offset;for(let s=0;s<5;s++){if(w>=this.buffer.length)throw new Error("Out of bounds access");let $=this.buffer[w];if($===0){if(!h)this.offset=w+1;break}if(($&192)===192){if(!this.canRead(2))throw new Error("Out of bounds access");if(!h)this.offset=w+2,h=!0;w=($&63)<<8|this.buffer[w+1];continue}if(w++,w+$>this.buffer.length)throw new Error("Out of bounds access");let E=this.buffer.slice(w,w+$).toString("ascii");f.push(E),w+=$}return f.join(".")}readHeader(){if(!this.canRead(DU0))throw new Error(`Invalid DNS header size: ${this.buffer.length} bytes`);let f=this.readUint16(),h=t4.fromBuffer(this.buffer.slice(this.offset,this.offset+2));this.offset+=2;let w={qdcount:this.readUint16(),ancount:this.readUint16(),nscount:this.readUint16(),arcount:this.readUint16()};return{id:f,flags:h,counts:w}}readQuestion(){let f=this.readName();if(!this.canRead(4))throw new Error("Out of bounds access");let h=this.readUint16(),w=this.readUint16();return{name:f,type:h,class:w}}readAnswer(){let f=this.readName();if(!this.canRead(10))throw new Error("Out of bounds access");let h=this.readUint16(),w=this.readUint16(),s=this.readUint32(),$=this.readUint16();if(!this.canRead($))throw new Error("Out of bounds access");let E=this.readRData(h,$);return{name:f,type:h,class:w,ttl:s,data:E}}readRData(f,h){let w=this.offset,s;switch(f){case 1:if(h!==4)throw new Error("Invalid IPv4 length");s=this.readIPv4();break;case 28:if(h!==16)throw new Error("Invalid IPv6 length");s=this.readIPv6();break;case 15:if(h<3)throw new Error("Invalid MX record length");s={preference:this.readUint16(),exchange:this.readName()};break;case 16:s=this.readString(h);break;case 5:case 2:case 12:s=this.readName();break;default:s=this.buffer.slice(this.offset,this.offset+h).toString("hex"),this.offset+=h}if(this.offset-w!==h)this.offset=w+h;return s}readUint16(){if(!this.canRead(2))throw new Error("Out of bounds access");let f=this.buffer.readUInt16BE(this.offset);return this.offset+=2,f}readUint32(){if(!this.canRead(4))throw new Error("Out of bounds access");let f=this.buffer.readUInt32BE(this.offset);return this.offset+=4,f}readIPv4(){if(!this.canRead(4))throw new Error("Out of bounds access");let f=[];for(let h=0;h<4;h++)f.push(this.buffer[this.offset++]);return f.join(".")}readIPv6(){if(!this.canRead(16))throw new Error("Out of bounds access");let f=[];for(let h=0;h<8;h++)f.push(this.buffer.readUInt16BE(this.offset).toString(16)),this.offset+=2;return f.join(":")}readString(f){if(!this.canRead(f))throw new Error("Out of bounds access");let h=this.buffer.slice(this.offset,this.offset+f).toString();return this.offset+=f,h}}function zl(f,h={}){let w=new kL(512,h.verbose),s=new t4;s.recursionDesired=!0,s.response=!1;let $=h.txid??h.id??Math.floor(Math.random()*65536);return w.writeHeader($,s,{qdcount:1,ancount:0,nscount:0,arcount:0}),w.writeQuestion({name:f.name,type:typeof f.type==="string"?gh[f.type]:f.type,class:f.class}),w.getBuffer()}function NL(f){let h=new yL(f);if((f.readUInt16BE(2)&32768)===0)throw new Error("Not a DNS response");let{id:w,flags:s,counts:$}=h.readHeader();for(let F=0;F<$.qdcount;F++)h.readQuestion();let E=[];for(let F=0;F<$.ancount;F++)E.push(h.readAnswer());let U=[];for(let F=0;F<$.nscount;F++)U.push(h.readAnswer());let T=[];for(let F=0;F<$.arcount;F++)T.push(h.readAnswer());return{id:w,flags:s,answers:E,authorities:U,additionals:T}}var Rl;((f)=>{f.UDP="udp",f.TCP="tcp",f.TLS="tls",f.HTTPS="https"})(Rl||={});class ZT{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $=kU0.createSocket("udp4"),E,U,T=ZT.DEFAULT_PORT;if(f.includes(":")){let[r,C]=f.split(":");U=r;let I=Number.parseInt(C,10);if(I>0&&I<65536)T=I}else U=f;$.on("error",(r)=>{clearTimeout(E),$.close(),s(r)}),$.on("message",(r)=>{clearTimeout(E),$.close(),w(r)}),E=setTimeout(()=>{$.close(),s(new Error("UDP query timed out"))},ZT.TIMEOUT);let F=new Uint8Array(h.buffer,h.byteOffset,h.length);$.send(F,T,U,(r)=>{if(r)clearTimeout(E),$.close(),s(r)})})}}class JT{static DEFAULT_PORT=53;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $=new jU0.Socket,E,U=new Uint8Array(0),T=-1;$.on("error",(C)=>{clearTimeout(E),$.destroy(),s(C)}),$.on("data",(C)=>{let I=new Uint8Array(U.length+C.length);if(I.set(U),I.set(new Uint8Array(C.buffer,C.byteOffset,C.length),U.length),U=I,T===-1&&U.length>=2)T=new DataView(U.buffer,U.byteOffset).getUint16(0)+2;if(T!==-1&&U.length>=T)clearTimeout(E),$.destroy(),w(jL.from(U.slice(2,T)))}),E=setTimeout(()=>{$.destroy(),s(new Error("TCP query timed out"))},JT.TIMEOUT);let[F,r=JT.DEFAULT_PORT]=f.split(":");$.connect(Number(r),F,()=>{let C=new Uint8Array(2);new DataView(C.buffer).setUint16(0,h.length);let I=new Uint8Array(h.buffer,h.byteOffset,h.length),L=new Uint8Array(C.length+I.length);L.set(C),L.set(I,C.length),$.write(L,(B)=>{if(B)clearTimeout(E),$.destroy(),s(B)})})})}}class VT{static DEFAULT_PORT=853;static TIMEOUT=5000;async query(f,h){return new Promise((w,s)=>{let $={host:f.split(":")[0],port:Number(f.split(":")[1])||VT.DEFAULT_PORT,servername:f.split(":")[0]},E,U=OU0.connect($,()=>{if(!U.authorized){U.destroy(),s(new Error("TLS authorization failed"));return}let r=new Uint8Array(2);new DataView(r.buffer).setUint16(0,h.length);let C=new Uint8Array(h.buffer,h.byteOffset,h.length),I=new Uint8Array(r.length+C.length);I.set(r),I.set(C,r.length),U.write(I,(L)=>{if(L)clearTimeout(E),U.destroy(),s(L)})}),T=new Uint8Array(0),F=-1;U.on("error",(r)=>{clearTimeout(E),U.destroy(),s(r)}),U.on("data",(r)=>{let C=new Uint8Array(T.length+r.length);if(C.set(T),C.set(new Uint8Array(r.buffer,r.byteOffset,r.length),T.length),T=C,F===-1&&T.length>=2)F=new DataView(T.buffer,T.byteOffset).getUint16(0)+2;if(F!==-1&&T.length>=F)clearTimeout(E),U.destroy(),w(jL.from(T.slice(2,F)))}),E=setTimeout(()=>{U.destroy(),s(new Error("TLS query timed out"))},VT.TIMEOUT)})}}class z${static TIMEOUT=5000;static CONTENT_TYPE="application/dns-message";async query(f,h){return new Promise((w,s)=>{let $;try{$=new Ll(f)}catch{$=new Ll(`https://${f}/dns-query`)}let E={method:"POST",headers:{"Content-Type":z$.CONTENT_TYPE,"Content-Length":h.length.toString(),Accept:z$.CONTENT_TYPE},timeout:z$.TIMEOUT},U=yU0.request($,E,(T)=>{let F=[];T.on("data",(r)=>{F.push(new Uint8Array(r.buffer,r.byteOffset,r.length))}),T.on("end",()=>{if(T.statusCode!==200){s(new Error(`HTTPS query failed with status ${T.statusCode}`));return}let r=T.headers["content-type"];if(r!==z$.CONTENT_TYPE){s(new Error(`Invalid content type: ${r}`));return}let C=F.reduce((B,R)=>B+R.length,0),I=new Uint8Array(C),L=0;for(let B of F)I.set(B,L),L+=B.length;w(jL.from(I))})});U.on("error",s),U.on("timeout",()=>{U.destroy(),s(new Error("HTTPS query timed out"))}),U.write(new Uint8Array(h.buffer,h.byteOffset,h.length)),U.end()})}}function DL(f){switch(f){case"udp":return new ZT;case"tcp":return new JT;case"tls":return new VT;case"https":return new z$}}class P1{options;static DEFAULT_NAMESERVER="1.1.1.1";static RESOLV_CONF_PATH="/etc/resolv.conf";static WINDOWS_DNS_KEY="SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Nameserver";validateDomainName(f){if(f.includes(".."))throw new Error(`Invalid domain name: ${f} (consecutive dots)`);if(f.startsWith(".")||f.endsWith("."))throw new Error(`Invalid domain name: ${f} (starts or ends with dot)`);if(f.length>253)throw new Error(`Domain name too long: ${f}`);let h=f.split(".");for(let w of h){if(w.length>63)throw new Error(`Label too long in domain: ${f}`);if(!/^[a-z0-9-]+$/i.test(w))throw new Error(`Invalid characters in domain label: ${w}`)}}validateRecordType(f){if(typeof f==="string"){if(!(f.toUpperCase()in gh))throw new Error(`Invalid record type: ${f}`)}else if(typeof f==="number"){if(!Object.values(gh).filter((h)=>typeof h==="number").includes(f))throw new Error(`Invalid record type number: ${f}`)}else throw new TypeError("Record type must be string or number")}constructor(f){this.options={transport:{type:"udp"},verbose:!1,...f},this.validateOptions()}async query(){try{let f=this.determineTransportType();X0("client",`Selected transport type: ${f}`,this.options.verbose);let h=DL(f);if(!h)throw new Error(`Failed to create transport for type: ${f}`);let w=[],s=await this.resolveNameserver();if(X0("client",`Resolved nameserver: ${s}`,this.options.verbose),!s)throw new Error("Failed to resolve nameserver");let $=this.buildQueries();X0("client",`Built ${$.length} queries`,this.options.verbose);for(let E of $){X0("client",`Processing query: ${JSON.stringify({query:E,nameserver:s,transportType:f})}`,this.options.verbose);let U=zl(E,{txid:this.options.txid,edns:this.options.edns,tweaks:this.options.tweaks,verbose:this.options.verbose});X0("client",`Built DNS request: ${JSON.stringify({hexData:U.toString("hex"),length:U.length,txid:U.readUInt16BE(0),flags:U.readUInt16BE(2).toString(16)})}`,this.options.verbose);let T=this.options.retries||3;for(let F=0;F<T;F++)try{X0("client",`Attempt ${F+1}/${T}`,this.options.verbose);let r=await h.query(s,U);if(X0("client",`Received DNS response: ${JSON.stringify({hexData:r.toString("hex"),length:r.length,txid:r.readUInt16BE(0),flags:r.readUInt16BE(2).toString(16)})}`,this.options.verbose),r.length<12)throw new Error(`Response too short: ${r.length} bytes`);if(!(r.readUInt16BE(2)&32768))throw new Error("Response flag not set in DNS message");let C=NL(r);if(X0("client",`Parsed DNS response: ${JSON.stringify({id:C.id,answerCount:C.answers.length,authorityCount:C.authorities.length,additionalCount:C.additionals.length})}`,this.options.verbose),f==="udp"&&C.flags.truncated){X0("client","Response truncated, retrying with TCP",this.options.verbose);let I=await DL("tcp").query(s,U);w.push(NL(I))}else w.push(C);break}catch(r){if(X0("client",`Attempt ${F+1} failed: ${r.message}`,this.options.verbose),F===T-1)throw X0("client","All retry attempts failed",this.options.verbose),r;let C=2**F*1000;X0("client",`Waiting ${C}ms before retry`,this.options.verbose),await new Promise((I)=>setTimeout(I,C))}}if(w.length===0)throw new Error("No responses received");return w}catch(f){let h=f instanceof Error?f.message:"Unknown error occurred";throw X0("client",`Query failed with error: ${h}`,this.options.verbose),X0("client",`Full error: ${JSON.stringify(f)}`,this.options.verbose),new Error(`DNS query failed: ${h}`)}}buildQueries(){let f=[];if(!this.options.domains?.length)throw new Error("No domains specified");let h=Array.isArray(this.options.domains)?this.options.domains:[this.options.domains],w=this.resolveTypes(),s=this.resolveClasses();for(let $ of h)for(let E of w)for(let U of s)f.push({name:$,type:E,class:U});return X0("client",`Built queries: ${JSON.stringify(f)}`,this.options.verbose),f}resolveTypes(){if(!this.options.type)return[1];return(Array.isArray(this.options.type)?this.options.type:[this.options.type]).map((f)=>{if(this.validateRecordType(f),typeof f==="number")return f;let h=f.toUpperCase();return gh[h]})}resolveClasses(){if(!this.options.class)return[1];return(Array.isArray(this.options.class)?this.options.class:[this.options.class]).map((f)=>{if(typeof f==="number")return f;let h=f.toUpperCase(),w=qL[h];if(w===void 0)throw new Error(`Invalid query class: ${f}`);return w})}validateNameserver(f){if(f.startsWith("https://"))return!0;if(f.includes("%"))return!1;if(/^(?:\d{1,3}\.){3}\d{1,3}$/.test(f))return f.split(".").every((h)=>{let w=Number.parseInt(h,10);return w>=0&&w<=255});if(f.includes(":"))return!1;return!1}async resolveNameserver(){try{if(this.options.nameserver){if(X0("client",`Checking configured nameserver: ${this.options.nameserver}`,this.options.verbose),this.validateNameserver(this.options.nameserver))return this.options.nameserver}let f=vU0();X0("client",`Resolving nameserver for platform: ${f}`,this.options.verbose);let h;if(f==="win32")h=await this.resolveWindowsNameserver();else h=await this.resolveUnixNameserver();if(this.validateNameserver(h))return h;return X0("client",`Using default nameserver: ${P1.DEFAULT_NAMESERVER}`,this.options.verbose),P1.DEFAULT_NAMESERVER}catch(f){return X0("client",`Failed to resolve nameserver: ${f.message}`,this.options.verbose),X0("client",`Using default nameserver: ${P1.DEFAULT_NAMESERVER}`,this.options.verbose),P1.DEFAULT_NAMESERVER}}async resolveUnixNameserver(){try{let f=(await lU0.readFile(P1.RESOLV_CONF_PATH,"utf-8")).split(`
59
- `),h=[];for(let s of f){let $=s.trim();if($.startsWith("nameserver")){let[,E]=$.split(/\s+/);if(E&&!E.includes("%"))h.push(E)}}let w=h.find((s)=>!s.includes(":"));if(w)return X0("client",`Using IPv4 nameserver from resolv.conf: ${w}`,this.options.verbose),w;return X0("client",`No valid nameserver found in resolv.conf, using fallback: ${P1.DEFAULT_NAMESERVER}`,this.options.verbose),P1.DEFAULT_NAMESERVER}catch(f){return X0("client",`Failed to read resolv.conf: ${f.message}`,this.options.verbose),X0("client",`Using fallback nameserver: ${P1.DEFAULT_NAMESERVER}`,this.options.verbose),P1.DEFAULT_NAMESERVER}}async resolveWindowsNameserver(){try{return X0("client",`Using default nameserver for Windows: ${P1.DEFAULT_NAMESERVER}`,this.options.verbose),P1.DEFAULT_NAMESERVER}catch(f){throw X0("client",`Failed to get Windows nameserver: ${f.message}`,this.options.verbose),new Error("Failed to get Windows nameserver")}}determineTransportType(){if(this.options.https)return"https";if(this.options.tls)return"tls";if(this.options.tcp)return"tcp";if(this.options.udp)return"udp";if(typeof this.options.transport==="object")return this.options.transport.type||"udp";return"udp"}validateOptions(){if(this.options.domains)for(let f of Array.isArray(this.options.domains)?this.options.domains:[this.options.domains])this.validateDomainName(f);if(this.options.type){let f=Array.isArray(this.options.type)?this.options.type:[this.options.type];for(let h of f)this.validateRecordType(h)}if([this.options.udp,this.options.tcp,this.options.tls,this.options.https].filter(Boolean).length>1)throw new Error("Only one transport type can be specified");if(this.options.https&&!this.options.nameserver?.startsWith("https://"))throw new Error("HTTPS transport requires an HTTPS nameserver URL");X0("client","Options validation completed successfully",this.options.verbose)}}var bU0=VU0(HU0(),1),mU0={A:"green",AAAA:"green",CNAME:"yellow",MX:"cyan",NS:"red",PTR:"red",SOA:"magenta",SRV:"cyan",TXT:"yellow",CAA:"red",TLSA:"yellow"};function dU0(f,h){if(h.json)return iU0(f,h.showDuration);return cU0(f,h)}function iU0(f,h){let w={responses:f.map((s)=>({id:s.id,answers:s.answers.map(HL),authorities:s.authorities.map(HL),additionals:s.additionals.map(HL)}))};if(h!==void 0)w.duration={ms:h};return JSON.stringify(w,null,2)}function HL(f){let h={name:f.name,type:gh[f.type]||f.type,ttl:f.ttl};switch(f.type){case 1:case 28:return{...h,address:f.data};case 5:case 12:case 2:return{...h,target:f.data};case 15:return{...h,preference:f.data.preference,exchange:f.data.exchange};case 16:return{...h,text:f.data};case 33:return{...h,priority:f.data.priority,weight:f.data.weight,port:f.data.port,target:f.data.target};case 257:return{...h,flags:f.data.flags,tag:f.data.tag,value:f.data.value};default:return{...h,data:f.data}}}function cU0(f,h){let w=[];for(let s of f){if(h.short){if(s.answers.length>0)w.push(MT(s.answers[0],h));continue}if(s.answers.length>0)for(let $ of s.answers)w.push(MT($,h));if(s.authorities.length>0){w.push(`
60
- Authority Records:`);for(let $ of s.authorities)w.push(MT($,h))}if(s.additionals.length>0){w.push(`
61
- Additional Records:`);for(let $ of s.additionals)w.push(MT($,h))}}if(h.showDuration!==void 0)w.push(`
62
- Query time: ${xU0(h.showDuration,h.rawSeconds)}`);return w.join(`
63
- `)}function MT(f,h){let w=gh[f.type]||f.type.toString(),s=mU0[w]||"white",$=h.colors.enabled?bU0.default[s](w.padEnd(6)):w.padEnd(6),E=gU0(f.ttl,h.rawSeconds).padStart(8),U;switch(f.type){case 1:case 28:U=f.data;break;case 5:case 12:case 2:U=f.data;break;case 15:U=`${f.data.preference} ${f.data.exchange}`;break;case 16:U=`"${f.data}"`;break;case 33:U=`${f.data.priority} ${f.data.weight} ${f.data.port} ${f.data.target}`;break;case 257:U=`${f.data.flags} ${f.data.tag} "${f.data.value}"`;break;default:U=JSON.stringify(f.data)}return`${$} ${E} ${f.name.padEnd(30)} ${U}`}function gU0(f,h){if(h)return f.toString();if(f<60)return`${f}s`;if(f<3600){let $=Math.floor(f/60),E=f%60;return`${$}m${E}s`}if(f<86400){let $=Math.floor(f/3600),E=Math.floor(f%3600/60);return`${$}h${E}m`}let w=Math.floor(f/86400),s=Math.floor(f%86400/3600);return`${w}d${s}h`}function xU0(f,h){if(h)return`${f}ms`;if(f<1000)return`${f}ms`;return`${(f/1000).toFixed(2)}s`}var{create:_U0,defineProperty:Yl,getOwnPropertyDescriptor:nU0,getOwnPropertyNames:eU0,getPrototypeOf:aU0}=Object,pU0=Object.prototype.hasOwnProperty,oU0=(f,h)=>()=>(h||f((h={exports:{}}).exports,h),h.exports),uU0=(f,h,w,s)=>{if(h&&typeof h=="object"||typeof h=="function")for(let $ of eU0(h))!pU0.call(f,$)&&$!==w&&Yl(f,$,{get:()=>h[$],enumerable:!(s=nU0(h,$))||s.enumerable});return f},tU0=(f,h,w)=>(w=f!=null?_U0(aU0(f)):{},uU0(h||!f||!f.__esModule?Yl(w,"default",{value:f,enumerable:!0}):w,f)),f20=oU0((f,h)=>{function w(U){if(typeof U!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(U))}function s(U,T){for(var F="",r=0,C=-1,I=0,L,B=0;B<=U.length;++B){if(B<U.length)L=U.charCodeAt(B);else{if(L===47)break;L=47}if(L===47){if(!(C===B-1||I===1))if(C!==B-1&&I===2){if(F.length<2||r!==2||F.charCodeAt(F.length-1)!==46||F.charCodeAt(F.length-2)!==46){if(F.length>2){var R=F.lastIndexOf("/");if(R!==F.length-1){R===-1?(F="",r=0):(F=F.slice(0,R),r=F.length-1-F.lastIndexOf("/")),C=B,I=0;continue}}else if(F.length===2||F.length===1){F="",r=0,C=B,I=0;continue}}T&&(F.length>0?F+="/..":F="..",r=2)}else F.length>0?F+="/"+U.slice(C+1,B):F=U.slice(C+1,B),r=B-C-1;C=B,I=0}else L===46&&I!==-1?++I:I=-1}return F}function $(U,T){var F=T.dir||T.root,r=T.base||(T.name||"")+(T.ext||"");return F?F===T.root?F+r:F+U+r:r}var E={resolve:function(){for(var U="",T=!1,F,r=arguments.length-1;r>=-1&&!T;r--){var C;r>=0?C=arguments[r]:(F===void 0&&(F=process.cwd()),C=F),w(C),C.length!==0&&(U=C+"/"+U,T=C.charCodeAt(0)===47)}return U=s(U,!T),T?U.length>0?"/"+U:"/":U.length>0?U:"."},normalize:function(U){if(w(U),U.length===0)return".";var T=U.charCodeAt(0)===47,F=U.charCodeAt(U.length-1)===47;return U=s(U,!T),U.length===0&&!T&&(U="."),U.length>0&&F&&(U+="/"),T?"/"+U:U},isAbsolute:function(U){return w(U),U.length>0&&U.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var U,T=0;T<arguments.length;++T){var F=arguments[T];w(F),F.length>0&&(U===void 0?U=F:U+="/"+F)}return U===void 0?".":E.normalize(U)},relative:function(U,T){if(w(U),w(T),U===T||(U=E.resolve(U),T=E.resolve(T),U===T))return"";for(var F=1;F<U.length&&U.charCodeAt(F)===47;++F);for(var r=U.length,C=r-F,I=1;I<T.length&&T.charCodeAt(I)===47;++I);for(var L=T.length,B=L-I,R=C<B?C:B,K=-1,Q=0;Q<=R;++Q){if(Q===R){if(B>R){if(T.charCodeAt(I+Q)===47)return T.slice(I+Q+1);if(Q===0)return T.slice(I+Q)}else C>R&&(U.charCodeAt(F+Q)===47?K=Q:Q===0&&(K=0));break}var k=U.charCodeAt(F+Q),D=T.charCodeAt(I+Q);if(k!==D)break;k===47&&(K=Q)}var y="";for(Q=F+K+1;Q<=r;++Q)(Q===r||U.charCodeAt(Q)===47)&&(y.length===0?y+="..":y+="/..");return y.length>0?y+T.slice(I+K):(I+=K,T.charCodeAt(I)===47&&++I,T.slice(I))},_makeLong:function(U){return U},dirname:function(U){if(w(U),U.length===0)return".";for(var T=U.charCodeAt(0),F=T===47,r=-1,C=!0,I=U.length-1;I>=1;--I)if(T=U.charCodeAt(I),T===47){if(!C){r=I;break}}else C=!1;return r===-1?F?"/":".":F&&r===1?"//":U.slice(0,r)},basename:function(U,T){if(T!==void 0&&typeof T!="string")throw new TypeError('"ext" argument must be a string');w(U);var F=0,r=-1,C=!0,I;if(T!==void 0&&T.length>0&&T.length<=U.length){if(T.length===U.length&&T===U)return"";var L=T.length-1,B=-1;for(I=U.length-1;I>=0;--I){var R=U.charCodeAt(I);if(R===47){if(!C){F=I+1;break}}else B===-1&&(C=!1,B=I+1),L>=0&&(R===T.charCodeAt(L)?--L===-1&&(r=I):(L=-1,r=B))}return F===r?r=B:r===-1&&(r=U.length),U.slice(F,r)}else{for(I=U.length-1;I>=0;--I)if(U.charCodeAt(I)===47){if(!C){F=I+1;break}}else r===-1&&(C=!1,r=I+1);return r===-1?"":U.slice(F,r)}},extname:function(U){w(U);for(var T=-1,F=0,r=-1,C=!0,I=0,L=U.length-1;L>=0;--L){var B=U.charCodeAt(L);if(B===47){if(!C){F=L+1;break}continue}r===-1&&(C=!1,r=L+1),B===46?T===-1?T=L:I!==1&&(I=1):T!==-1&&(I=-1)}return T===-1||r===-1||I===0||I===1&&T===r-1&&T===F+1?"":U.slice(T,r)},format:function(U){if(U===null||typeof U!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof U);return $("/",U)},parse:function(U){w(U);var T={root:"",dir:"",base:"",ext:"",name:""};if(U.length===0)return T;var F=U.charCodeAt(0),r=F===47,C;r?(T.root="/",C=1):C=0;for(var I=-1,L=0,B=-1,R=!0,K=U.length-1,Q=0;K>=C;--K){if(F=U.charCodeAt(K),F===47){if(!R){L=K+1;break}continue}B===-1&&(R=!1,B=K+1),F===46?I===-1?I=K:Q!==1&&(Q=1):I!==-1&&(Q=-1)}return I===-1||B===-1||Q===0||Q===1&&I===B-1&&I===L+1?B!==-1&&(L===0&&r?T.base=T.name=U.slice(1,B):T.base=T.name=U.slice(L,B)):(L===0&&r?(T.name=U.slice(1,I),T.base=U.slice(1,B)):(T.name=U.slice(L,I),T.base=U.slice(L,B)),T.ext=U.slice(I,B)),L>0?T.dir=U.slice(0,L-1):r&&(T.dir="/"),T},sep:"/",delimiter:":",win32:null,posix:null};E.posix=E,h.exports=E}),Ql=tU0(f20()),c0=Ql,h20=Ql,Xl=function(f){return f},Kl=function(){throw new Error("Not implemented")};c0.parse??=Kl;h20.parse??=Kl;var X$={resolve:c0.resolve.bind(c0),normalize:c0.normalize.bind(c0),isAbsolute:c0.isAbsolute.bind(c0),join:c0.join.bind(c0),relative:c0.relative.bind(c0),toNamespacedPath:Xl,dirname:c0.dirname.bind(c0),basename:c0.basename.bind(c0),extname:c0.extname.bind(c0),format:c0.format.bind(c0),parse:c0.parse.bind(c0),sep:"/",delimiter:":",win32:void 0,posix:void 0,_makeLong:Xl},Sl={sep:"\\",delimiter:";",win32:void 0,...X$,posix:X$};X$.win32=Sl.win32=Sl;X$.posix=X$;var{resolve:w20,normalize:RO0,isAbsolute:XO0,join:SO0,relative:YO0,toNamespacedPath:QO0,dirname:KO0,basename:MO0,extname:ZO0,format:JO0,parse:VO0,sep:PO0,delimiter:HO0}=X$;function PT(f,h){if(Array.isArray(h)&&!Array.isArray(f))return h;if(Array.isArray(h)&&Array.isArray(f))return h.map((s,$)=>{let E=f[$];if(R$(s)&&R$(E))return PT(E,s);return s});if(!R$(h)||!R$(f))return h;let w={...f};for(let s in h)if(Object.prototype.hasOwnProperty.call(h,s)){let $=h[s],E=w[s];if($===null||$===void 0)w[s]=$;else if(R$($)&&R$(E))w[s]=PT(E,$);else w[s]=$}return w}function R$(f){return Boolean(f&&typeof f==="object"&&!Array.isArray(f))}async function s20({name:f,cwd:h,defaultConfig:w,endpoint:s,headers:$={Accept:"application/json","Content-Type":"application/json"}}){if(typeof window==="undefined"){let E=w20(h||"../../../",`${f}.config`);try{let U=await import(E),T=U.default||U;return PT(w,T)}catch(U){return w}}if(!s)return console.warn("An API endpoint is required to load the client config."),w;try{let E=await fetch(s,{method:"GET",headers:$});if(!E.ok)throw new Error(`HTTP error! status: ${E.status}`);let U=await E.json();return PT(w,U)}catch(E){return console.error("Failed to load client config:",E),w}}var $20={verbose:!0},NO0=await s20({name:"dnsx",defaultConfig:$20});export{SU0 as writeNameserversToConfig,QU0 as updateNameservers,NL as parseResponse,NU0 as parseProtocolTweaks,$O0 as hasUserDomainBeenAddedToCloud,YU0 as getNameservers,dU0 as formatOutput,sO0 as findHostedZone,hO0 as deleteHostedZoneRecords,fO0 as deleteHostedZone,X0 as debugLog,DL as createTransport,wO0 as createHostedZone,NO0 as config,zl as buildQuery,EO0 as addDomain,Bl as WireError,Rl as TransportType,gh as RecordType,qL as QClass,Gl as EDNSMode,Wl as DnsResponseCode,t4 as DnsFlags,kL as DnsEncoder,yL as DnsDecoder,P1 as DnsClient};
2
+ import{runAction as Y}from"@stacksjs/actions";import{config as U}from"@stacksjs/config";import{Action as $}from"@stacksjs/enums";import{err as G,handleError as B,ok as J}from"@stacksjs/error-handling";import{log as y}from"@stacksjs/logging";import{path as A}from"@stacksjs/path";import{fs as S}from"@stacksjs/storage";import{Route53Client as K,Route53DomainsClient as V}from"@stacksjs/ts-cloud";function D(p){if(!p)return;return p.replace(/^https?:\/\//,"").replace(/\/$/,"")}async function W(p,w){let b=await p.listHostedZonesByName({DNSName:w});if(!b||!b.HostedZones||b.HostedZones.length===0)return G(B(`No hosted zones found for domain: ${w}`));let P=b.HostedZones.find((I)=>I.Name===`${w}.`);if(!P)return G(B(`Hosted Zone not found for domain: ${w}`));let _=await p.listResourceRecordSets({HostedZoneId:P.Id});if(!_||!_.ResourceRecordSets)return G(B(`No DNS records found for domain: ${w}`));let q=_.ResourceRecordSets.filter((I)=>I.Type!=="NS"&&I.Type!=="SOA").map((I)=>({Action:"DELETE",ResourceRecordSet:I}));if(q.length>0)try{await p.changeResourceRecordSets({HostedZoneId:P.Id,ChangeBatch:{Changes:q}})}catch(I){y.warn(`Batch delete failed (${q.length} records), falling back to individual deletion`);let L=[];for(let M of q)try{await p.changeResourceRecordSets({HostedZoneId:P.Id,ChangeBatch:{Changes:[M]}})}catch(X){L.push(`${M.ResourceRecordSet.Name} (${M.ResourceRecordSet.Type}): ${X.message}`)}if(L.length>0)return G(B(`Failed to delete ${L.length} DNS record(s):
3
+ ${L.join(`
4
+ `)}`))}return J(P)}async function c(p){let w=new K,b=await W(w,p);if(b.isErr)return G(B(`Failed to delete records for zone: ${p}`));let P=b.unwrap();return await w.deleteHostedZone({Id:P.Id}),y.info(`Deleted Hosted Zone for domain: ${p}`),J("success")}async function H(p){let w=new K;if((await W(w,p)).isErr)return G(B(`Failed to delete records for zone: ${p}`));return y.info(`Deleted DNS records for domain: ${p}`),J("success")}async function v(p){let w=new K,P=(await w.listHostedZonesByName({DNSName:p})).HostedZones?.find((q)=>q.Name===`${p}.`);if(P)return J(P);let _=await w.createHostedZone({Name:p,CallerReference:`${Date.now()}`});if(!_.HostedZone)return G(B("Failed to create hosted zone"));return J(_)}function F(p){if(!/^[a-zA-Z0-9.-]+$/.test(p))throw Error(`Invalid nameserver value: ${p}`);return p}function Q(p){try{let w=A.projectConfigPath("dns.ts"),P=S.readFileSync(w,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${p.map((_)=>`'${F(_)}'`).join(", ")}]`);S.writeFileSync(w,P,"utf-8"),y.info("Nameservers have been set.")}catch(w){y.error("Error updating nameservers:",w)}}async function u(p){try{let w=new K,{HostedZones:b}=await w.listHostedZonesByName({DNSName:p});if(!b||b.length===0)return G(B(`No hosted zones found for domain ${p}`));let P=b[0];if(P&&P.Name===`${p}.`)return J(P.Id);return J(null)}catch(w){return G(B(`Failed to find hosted zone for domain ${p}`,w))}}async function O(p){if(y.debug("Getting nameservers for domain:",p),!p)return[];try{return(await new V().getDomainDetail({DomainName:p}))?.Nameservers?.map((P)=>P.Name)||[]}catch(w){return y.debug("Domain not registered via Route53 Domains:",w),[]}}async function Z(p){y.debug("Getting hosted zone nameservers for domain:",p);try{let w=new K,P=(await w.listHostedZonesByName({DNSName:p})).HostedZones?.find((q)=>q.Name===`${p}.`);if(!P)return y.debug("No hosted zone found for domain:",p),[];return(await w.getHostedZone({Id:P.Id})).DelegationSet?.NameServers||[]}catch(w){return B("Error getting hosted zone nameservers",w),[]}}async function T(p,w){if(!w)w=U.app.url;let b=await O(w);if(!b||b.length===0)return y.debug("Domain is not registered via Route53 Domains - skipping automatic nameserver update"),Q(p),!1;if(JSON.stringify(b.sort())!==JSON.stringify(p.sort())){y.info("Updating your domain nameservers to match the ones in your hosted zone..."),y.debug("Hosted zone nameservers:",p),y.debug("Domain nameservers:",b);try{return await new V().updateDomainNameservers({DomainName:w,Nameservers:p.map((_)=>({Name:_}))}),Q(p),y.info("Nameservers updated."),!0}catch(P){return y.debug("Failed to update nameservers via Route53 Domains:",P),Q(p),!1}}return y.success("Your nameservers are up to date."),!0}async function g(p){if(y.debug("Checking if domain has been added to cloud..."),!p)p=U.app.url;if(p=D(p),!p)return!1;y.debug("domainName:",p);let w=new K,b=await w.listHostedZonesByName({DNSName:p});if(y.debug("Existing hosted zones:",b),!b||!b.HostedZones||b.HostedZones.length===0)return!1;let P=b.HostedZones.find((_)=>_.Name===`${p}.`);if(P){y.debug("Hosted zone found:",P);let q=(await w.getHostedZone({Id:P.Id})).DelegationSet?.NameServers||[];return await T(q,p),!0}return!1}async function h(p){return await Y($.DomainsAdd,p)}export*from"@stacksjs/dnsx";export{Q as writeNameserversToConfig,T as updateNameservers,g as hasUserDomainBeenAddedToCloud,O as getNameservers,Z as getHostedZoneNameservers,u as findHostedZone,H as deleteHostedZoneRecords,c as deleteHostedZone,v as createHostedZone,h as addDomain};