From c376ab681868de4efedfff0a01ac6a9aafd9ddf1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 16:14:23 +0000 Subject: [PATCH] chore: update generated content --- dist/index.js | 2 +- dist/index.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 1d60159..6a6abb8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -import './sourcemap-register.cjs';import{createRequire as e}from"module";var t={3311:function(e,t){var n=this&&this.__awaiter||function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(o.next(e))}catch(e){i(e)}}function rejected(e){try{step(o["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.ClientStreamingCall=void 0;class ClientStreamingCall{constructor(e,t,n,o,i,c,d){this.method=e;this.requestHeaders=t;this.requests=n;this.headers=o;this.response=i;this.status=c;this.trailers=d}then(e,t){return this.promiseFinished().then((t=>e?Promise.resolve(e(t)):t),(e=>t?Promise.resolve(t(e)):Promise.reject(e)))}promiseFinished(){return n(this,void 0,void 0,(function*(){let[e,t,n,o]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,response:t,status:n,trailers:o}}))}}t.ClientStreamingCall=ClientStreamingCall},9499:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.Deferred=t.DeferredState=void 0;var n;(function(e){e[e["PENDING"]=0]="PENDING";e[e["REJECTED"]=1]="REJECTED";e[e["RESOLVED"]=2]="RESOLVED"})(n=t.DeferredState||(t.DeferredState={}));class Deferred{constructor(e=true){this._state=n.PENDING;this._promise=new Promise(((e,t)=>{this._resolve=e;this._reject=t}));if(e){this._promise.catch((e=>{}))}}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==n.PENDING)throw new Error(`cannot resolve ${n[this.state].toLowerCase()}`);this._resolve(e);this._state=n.RESOLVED}reject(e){if(this.state!==n.PENDING)throw new Error(`cannot reject ${n[this.state].toLowerCase()}`);this._reject(e);this._state=n.REJECTED}resolvePending(e){if(this._state===n.PENDING)this.resolve(e)}rejectPending(e){if(this._state===n.PENDING)this.reject(e)}}t.Deferred=Deferred},800:function(e,t){var n=this&&this.__awaiter||function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(o.next(e))}catch(e){i(e)}}function rejected(e){try{step(o["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.DuplexStreamingCall=void 0;class DuplexStreamingCall{constructor(e,t,n,o,i,c,d){this.method=e;this.requestHeaders=t;this.requests=n;this.headers=o;this.responses=i;this.status=c;this.trailers=d}then(e,t){return this.promiseFinished().then((t=>e?Promise.resolve(e(t)):t),(e=>t?Promise.resolve(t(e)):Promise.reject(e)))}promiseFinished(){return n(this,void 0,void 0,(function*(){let[e,t,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,status:t,trailers:n}}))}}t.DuplexStreamingCall=DuplexStreamingCall},6762:(e,t,n)=>{var o;o={value:true};var i=n(2554);Object.defineProperty(t,"C0",{enumerable:true,get:function(){return i.ServiceType}});var c=n(3402);o={enumerable:true,get:function(){return c.readMethodOptions}};o={enumerable:true,get:function(){return c.readMethodOption}};o={enumerable:true,get:function(){return c.readServiceOption}};var d=n(422);o={enumerable:true,get:function(){return d.RpcError}};var p=n(3474);o={enumerable:true,get:function(){return p.mergeRpcOptions}};var y=n(6407);o={enumerable:true,get:function(){return y.RpcOutputStreamController}};var C=n(5435);o={enumerable:true,get:function(){return C.TestTransport}};var Q=n(9499);o={enumerable:true,get:function(){return Q.Deferred}};o={enumerable:true,get:function(){return Q.DeferredState}};var v=n(800);o={enumerable:true,get:function(){return v.DuplexStreamingCall}};var D=n(3311);o={enumerable:true,get:function(){return D.ClientStreamingCall}};var k=n(2715);o={enumerable:true,get:function(){return k.ServerStreamingCall}};var $=n(738);o={enumerable:true,get:function(){return $.UnaryCall}};var V=n(4359);o={enumerable:true,get:function(){return V.stackIntercept}};o={enumerable:true,get:function(){return V.stackDuplexStreamingInterceptors}};o={enumerable:true,get:function(){return V.stackClientStreamingInterceptors}};o={enumerable:true,get:function(){return V.stackServerStreamingInterceptors}};o={enumerable:true,get:function(){return V.stackUnaryInterceptors}};var ee=n(4626);o={enumerable:true,get:function(){return ee.ServerCallContextController}}},3402:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.readServiceOption=t.readMethodOption=t.readMethodOptions=t.normalizeMethodInfo=void 0;const o=n(8372);function normalizeMethodInfo(e,t){var n,i,c;let d=e;d.service=t;d.localName=(n=d.localName)!==null&&n!==void 0?n:o.lowerCamelCase(d.name);d.serverStreaming=!!d.serverStreaming;d.clientStreaming=!!d.clientStreaming;d.options=(i=d.options)!==null&&i!==void 0?i:{};d.idempotency=(c=d.idempotency)!==null&&c!==void 0?c:undefined;return d}t.normalizeMethodInfo=normalizeMethodInfo;function readMethodOptions(e,t,n,o){var i;const c=(i=e.methods.find(((e,n)=>e.localName===t||n===t)))===null||i===void 0?void 0:i.options;return c&&c[n]?o.fromJson(c[n]):undefined}t.readMethodOptions=readMethodOptions;function readMethodOption(e,t,n,o){var i;const c=(i=e.methods.find(((e,n)=>e.localName===t||n===t)))===null||i===void 0?void 0:i.options;if(!c){return undefined}const d=c[n];if(d===undefined){return d}return o?o.fromJson(d):d}t.readMethodOption=readMethodOption;function readServiceOption(e,t,n){const o=e.options;if(!o){return undefined}const i=o[t];if(i===undefined){return i}return n?n.fromJson(i):i}t.readServiceOption=readServiceOption},422:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.RpcError=void 0;class RpcError extends Error{constructor(e,t="UNKNOWN",n){super(e);this.name="RpcError";Object.setPrototypeOf(this,new.target.prototype);this.code=t;this.meta=n!==null&&n!==void 0?n:{}}toString(){const e=[this.name+": "+this.message];if(this.code){e.push("");e.push("Code: "+this.code)}if(this.serviceName&&this.methodName){e.push("Method: "+this.serviceName+"/"+this.methodName)}let t=Object.entries(this.meta);if(t.length){e.push("");e.push("Meta:");for(let[n,o]of t){e.push(` ${n}: ${o}`)}}return e.join("\n")}}t.RpcError=RpcError},4359:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.stackDuplexStreamingInterceptors=t.stackClientStreamingInterceptors=t.stackServerStreamingInterceptors=t.stackUnaryInterceptors=t.stackIntercept=void 0;const o=n(8372);function stackIntercept(e,t,n,i,c){var d,p,y,C;if(e=="unary"){let tail=(e,n,o)=>t.unary(e,n,o);for(const e of((d=i.interceptors)!==null&&d!==void 0?d:[]).filter((e=>e.interceptUnary)).reverse()){const t=tail;tail=(n,o,i)=>e.interceptUnary(t,n,o,i)}return tail(n,c,i)}if(e=="serverStreaming"){let tail=(e,n,o)=>t.serverStreaming(e,n,o);for(const e of((p=i.interceptors)!==null&&p!==void 0?p:[]).filter((e=>e.interceptServerStreaming)).reverse()){const t=tail;tail=(n,o,i)=>e.interceptServerStreaming(t,n,o,i)}return tail(n,c,i)}if(e=="clientStreaming"){let tail=(e,n)=>t.clientStreaming(e,n);for(const e of((y=i.interceptors)!==null&&y!==void 0?y:[]).filter((e=>e.interceptClientStreaming)).reverse()){const t=tail;tail=(n,o)=>e.interceptClientStreaming(t,n,o)}return tail(n,i)}if(e=="duplex"){let tail=(e,n)=>t.duplex(e,n);for(const e of((C=i.interceptors)!==null&&C!==void 0?C:[]).filter((e=>e.interceptDuplex)).reverse()){const t=tail;tail=(n,o)=>e.interceptDuplex(t,n,o)}return tail(n,i)}o.assertNever(e)}t.stackIntercept=stackIntercept;function stackUnaryInterceptors(e,t,n,o){return stackIntercept("unary",e,t,o,n)}t.stackUnaryInterceptors=stackUnaryInterceptors;function stackServerStreamingInterceptors(e,t,n,o){return stackIntercept("serverStreaming",e,t,o,n)}t.stackServerStreamingInterceptors=stackServerStreamingInterceptors;function stackClientStreamingInterceptors(e,t,n){return stackIntercept("clientStreaming",e,t,n)}t.stackClientStreamingInterceptors=stackClientStreamingInterceptors;function stackDuplexStreamingInterceptors(e,t,n){return stackIntercept("duplex",e,t,n)}t.stackDuplexStreamingInterceptors=stackDuplexStreamingInterceptors},3474:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.mergeRpcOptions=void 0;const o=n(8372);function mergeRpcOptions(e,t){if(!t)return e;let n={};copy(e,n);copy(t,n);for(let i of Object.keys(t)){let c=t[i];switch(i){case"jsonOptions":n.jsonOptions=o.mergeJsonOptions(e.jsonOptions,n.jsonOptions);break;case"binaryOptions":n.binaryOptions=o.mergeBinaryOptions(e.binaryOptions,n.binaryOptions);break;case"meta":n.meta={};copy(e.meta,n.meta);copy(t.meta,n.meta);break;case"interceptors":n.interceptors=e.interceptors?e.interceptors.concat(c):c.concat();break}}return n}t.mergeRpcOptions=mergeRpcOptions;function copy(e,t){if(!e)return;let n=t;for(let[t,o]of Object.entries(e)){if(o instanceof Date)n[t]=new Date(o.getTime());else if(Array.isArray(o))n[t]=o.concat();else n[t]=o}}},6407:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.RpcOutputStreamController=void 0;const o=n(9499);const i=n(8372);class RpcOutputStreamController{constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]};this._closed=false;this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,t){t.push(e);return()=>{let n=t.indexOf(e);if(n>=0)t.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==false}notifyNext(e,t,n){i.assert((e?1:0)+(t?1:0)+(n?1:0)<=1,"only one emission at a time");if(e)this.notifyMessage(e);if(t)this.notifyError(t);if(n)this.notifyComplete()}notifyMessage(e){i.assert(!this.closed,"stream is closed");this.pushIt({value:e,done:false});this._lis.msg.forEach((t=>t(e)));this._lis.nxt.forEach((t=>t(e,undefined,false)))}notifyError(e){i.assert(!this.closed,"stream is closed");this._closed=e;this.pushIt(e);this._lis.err.forEach((t=>t(e)));this._lis.nxt.forEach((t=>t(undefined,e,false)));this.clearLis()}notifyComplete(){i.assert(!this.closed,"stream is closed");this._closed=true;this.pushIt({value:null,done:true});this._lis.cmp.forEach((e=>e()));this._lis.nxt.forEach((e=>e(undefined,undefined,true)));this.clearLis()}[Symbol.asyncIterator](){if(this._closed===true)this.pushIt({value:null,done:true});else if(this._closed!==false)this.pushIt(this._closed);return{next:()=>{let e=this._itState;i.assert(e,"bad state");i.assert(!e.p,"iterator contract broken");let t=e.q.shift();if(t)return"value"in t?Promise.resolve(t):Promise.reject(t);e.p=new o.Deferred;return e.p.promise}}}pushIt(e){let t=this._itState;if(t.p){const n=t.p;i.assert(n.state==o.DeferredState.PENDING,"iterator contract broken");"value"in e?n.resolve(e):n.reject(e);delete t.p}else{t.q.push(e)}}}t.RpcOutputStreamController=RpcOutputStreamController},4626:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ServerCallContextController=void 0;class ServerCallContextController{constructor(e,t,n,o,i={code:"OK",detail:""}){this._cancelled=false;this._listeners=[];this.method=e;this.headers=t;this.deadline=n;this.trailers={};this._sendRH=o;this.status=i}notifyCancelled(){if(!this._cancelled){this._cancelled=true;for(let e of this._listeners){e()}}}sendResponseHeaders(e){this._sendRH(e)}get cancelled(){return this._cancelled}onCancel(e){const t=this._listeners;t.push(e);return()=>{let n=t.indexOf(e);if(n>=0)t.splice(n,1)}}}t.ServerCallContextController=ServerCallContextController},2715:function(e,t){var n=this&&this.__awaiter||function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(o.next(e))}catch(e){i(e)}}function rejected(e){try{step(o["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.ServerStreamingCall=void 0;class ServerStreamingCall{constructor(e,t,n,o,i,c,d){this.method=e;this.requestHeaders=t;this.request=n;this.headers=o;this.responses=i;this.status=c;this.trailers=d}then(e,t){return this.promiseFinished().then((t=>e?Promise.resolve(e(t)):t),(e=>t?Promise.resolve(t(e)):Promise.reject(e)))}promiseFinished(){return n(this,void 0,void 0,(function*(){let[e,t,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,status:t,trailers:n}}))}}t.ServerStreamingCall=ServerStreamingCall},2554:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ServiceType=void 0;const o=n(3402);class ServiceType{constructor(e,t,n){this.typeName=e;this.methods=t.map((e=>o.normalizeMethodInfo(e,this)));this.options=n!==null&&n!==void 0?n:{}}}t.ServiceType=ServiceType},5435:function(e,t,n){var o=this&&this.__awaiter||function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(o.next(e))}catch(e){i(e)}}function rejected(e){try{step(o["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.TestTransport=void 0;const i=n(422);const c=n(8372);const d=n(6407);const p=n(3474);const y=n(738);const C=n(2715);const Q=n(3311);const v=n(800);class TestTransport{constructor(e){this.suppressUncaughtRejections=true;this.headerDelay=10;this.responseDelay=50;this.betweenResponseDelay=10;this.afterResponseDelay=10;this.data=e!==null&&e!==void 0?e:{}}get sentMessages(){if(this.lastInput instanceof TestInputStream){return this.lastInput.sent}else if(typeof this.lastInput=="object"){return[this.lastInput.single]}return[]}get sendComplete(){if(this.lastInput instanceof TestInputStream){return this.lastInput.completed}else if(typeof this.lastInput=="object"){return true}return false}promiseHeaders(){var e;const t=(e=this.data.headers)!==null&&e!==void 0?e:TestTransport.defaultHeaders;return t instanceof i.RpcError?Promise.reject(t):Promise.resolve(t)}promiseSingleResponse(e){if(this.data.response instanceof i.RpcError){return Promise.reject(this.data.response)}let t;if(Array.isArray(this.data.response)){c.assert(this.data.response.length>0);t=this.data.response[0]}else if(this.data.response!==undefined){t=this.data.response}else{t=e.O.create()}c.assert(e.O.is(t));return Promise.resolve(t)}streamResponses(e,t,n){return o(this,void 0,void 0,(function*(){const o=[];if(this.data.response===undefined){o.push(e.O.create())}else if(Array.isArray(this.data.response)){for(let t of this.data.response){c.assert(e.O.is(t));o.push(t)}}else if(!(this.data.response instanceof i.RpcError)){c.assert(e.O.is(this.data.response));o.push(this.data.response)}try{yield delay(this.responseDelay,n)(undefined)}catch(e){t.notifyError(e);return}if(this.data.response instanceof i.RpcError){t.notifyError(this.data.response);return}for(let e of o){t.notifyMessage(e);try{yield delay(this.betweenResponseDelay,n)(undefined)}catch(e){t.notifyError(e);return}}if(this.data.status instanceof i.RpcError){t.notifyError(this.data.status);return}if(this.data.trailers instanceof i.RpcError){t.notifyError(this.data.trailers);return}t.notifyComplete()}))}promiseStatus(){var e;const t=(e=this.data.status)!==null&&e!==void 0?e:TestTransport.defaultStatus;return t instanceof i.RpcError?Promise.reject(t):Promise.resolve(t)}promiseTrailers(){var e;const t=(e=this.data.trailers)!==null&&e!==void 0?e:TestTransport.defaultTrailers;return t instanceof i.RpcError?Promise.reject(t):Promise.resolve(t)}maybeSuppressUncaught(...e){if(this.suppressUncaughtRejections){for(let t of e){t.catch((()=>{}))}}}mergeOptions(e){return p.mergeRpcOptions({},e)}unary(e,t,n){var o;const i=(o=n.meta)!==null&&o!==void 0?o:{},c=this.promiseHeaders().then(delay(this.headerDelay,n.abort)),d=c.catch((e=>{})).then(delay(this.responseDelay,n.abort)).then((t=>this.promiseSingleResponse(e))),p=d.catch((e=>{})).then(delay(this.afterResponseDelay,n.abort)).then((e=>this.promiseStatus())),C=d.catch((e=>{})).then(delay(this.afterResponseDelay,n.abort)).then((e=>this.promiseTrailers()));this.maybeSuppressUncaught(p,C);this.lastInput={single:t};return new y.UnaryCall(e,i,t,c,d,p,C)}serverStreaming(e,t,n){var o;const i=(o=n.meta)!==null&&o!==void 0?o:{},c=this.promiseHeaders().then(delay(this.headerDelay,n.abort)),p=new d.RpcOutputStreamController,y=c.then(delay(this.responseDelay,n.abort)).catch((()=>{})).then((()=>this.streamResponses(e,p,n.abort))).then(delay(this.afterResponseDelay,n.abort)),Q=y.then((()=>this.promiseStatus())),v=y.then((()=>this.promiseTrailers()));this.maybeSuppressUncaught(Q,v);this.lastInput={single:t};return new C.ServerStreamingCall(e,i,t,c,p,Q,v)}clientStreaming(e,t){var n;const o=(n=t.meta)!==null&&n!==void 0?n:{},i=this.promiseHeaders().then(delay(this.headerDelay,t.abort)),c=i.catch((e=>{})).then(delay(this.responseDelay,t.abort)).then((t=>this.promiseSingleResponse(e))),d=c.catch((e=>{})).then(delay(this.afterResponseDelay,t.abort)).then((e=>this.promiseStatus())),p=c.catch((e=>{})).then(delay(this.afterResponseDelay,t.abort)).then((e=>this.promiseTrailers()));this.maybeSuppressUncaught(d,p);this.lastInput=new TestInputStream(this.data,t.abort);return new Q.ClientStreamingCall(e,o,this.lastInput,i,c,d,p)}duplex(e,t){var n;const o=(n=t.meta)!==null&&n!==void 0?n:{},i=this.promiseHeaders().then(delay(this.headerDelay,t.abort)),c=new d.RpcOutputStreamController,p=i.then(delay(this.responseDelay,t.abort)).catch((()=>{})).then((()=>this.streamResponses(e,c,t.abort))).then(delay(this.afterResponseDelay,t.abort)),y=p.then((()=>this.promiseStatus())),C=p.then((()=>this.promiseTrailers()));this.maybeSuppressUncaught(y,C);this.lastInput=new TestInputStream(this.data,t.abort);return new v.DuplexStreamingCall(e,o,this.lastInput,i,c,y,C)}}t.TestTransport=TestTransport;TestTransport.defaultHeaders={responseHeader:"test"};TestTransport.defaultStatus={code:"OK",detail:"all good"};TestTransport.defaultTrailers={responseTrailer:"test"};function delay(e,t){return n=>new Promise(((o,c)=>{if(t===null||t===void 0?void 0:t.aborted){c(new i.RpcError("user cancel","CANCELLED"))}else{const d=setTimeout((()=>o(n)),e);if(t){t.addEventListener("abort",(e=>{clearTimeout(d);c(new i.RpcError("user cancel","CANCELLED"))}))}}}))}class TestInputStream{constructor(e,t){this._completed=false;this._sent=[];this.data=e;this.abort=t}get sent(){return this._sent}get completed(){return this._completed}send(e){if(this.data.inputMessage instanceof i.RpcError){return Promise.reject(this.data.inputMessage)}const t=this.data.inputMessage===undefined?10:this.data.inputMessage;return Promise.resolve(undefined).then((()=>{this._sent.push(e)})).then(delay(t,this.abort))}complete(){if(this.data.inputComplete instanceof i.RpcError){return Promise.reject(this.data.inputComplete)}const e=this.data.inputComplete===undefined?10:this.data.inputComplete;return Promise.resolve(undefined).then((()=>{this._completed=true})).then(delay(e,this.abort))}}},738:function(e,t){var n=this&&this.__awaiter||function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(o.next(e))}catch(e){i(e)}}function rejected(e){try{step(o["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.UnaryCall=void 0;class UnaryCall{constructor(e,t,n,o,i,c,d){this.method=e;this.requestHeaders=t;this.request=n;this.headers=o;this.response=i;this.status=c;this.trailers=d}then(e,t){return this.promiseFinished().then((t=>e?Promise.resolve(e(t)):t),(e=>t?Promise.resolve(t(e)):Promise.reject(e)))}promiseFinished(){return n(this,void 0,void 0,(function*(){let[e,t,n,o]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:t,status:n,trailers:o}}))}}t.UnaryCall=UnaryCall},6468:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.assertFloat32=t.assertUInt32=t.assertInt32=t.assertNever=t.assert=void 0;function assert(e,t){if(!e){throw new Error(t)}}t.assert=assert;function assertNever(e,t){throw new Error(t!==null&&t!==void 0?t:"Unexpected object: "+e)}t.assertNever=assertNever;const n=34028234663852886e22,o=-34028234663852886e22,i=4294967295,c=2147483647,d=-2147483648;function assertInt32(e){if(typeof e!=="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>c||ei||e<0)throw new Error("invalid uint 32: "+e)}t.assertUInt32=assertUInt32;function assertFloat32(e){if(typeof e!=="number")throw new Error("invalid float 32: "+typeof e);if(!Number.isFinite(e))return;if(e>n||e{Object.defineProperty(t,"__esModule",{value:true});t.base64encode=t.base64decode=void 0;let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");let o=[];for(let e=0;e>4;p=d;c=2;break;case 2:n[i++]=(p&15)<<4|(d&60)>>2;p=d;c=3;break;case 3:n[i++]=(p&3)<<6|d;c=0;break}}if(c==1)throw Error(`invalid base64 string.`);return n.subarray(0,i)}t.base64decode=base64decode;function base64encode(e){let t="",o=0,i,c=0;for(let d=0;d>2];c=(i&3)<<4;o=1;break;case 1:t+=n[c|i>>4];c=(i&15)<<2;o=2;break;case 2:t+=n[c|i>>6];t+=n[i&63];o=0;break}}if(o){t+=n[c];t+="=";if(o==1)t+="="}return t}t.base64encode=base64encode},6690:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.WireType=t.mergeBinaryOptions=t.UnknownFieldHandler=void 0;var n;(function(e){e.symbol=Symbol.for("protobuf-ts/unknown");e.onRead=(t,n,o,i,c)=>{let d=is(n)?n[e.symbol]:n[e.symbol]=[];d.push({no:o,wireType:i,data:c})};e.onWrite=(t,n,o)=>{for(let{no:t,wireType:i,data:c}of e.list(n))o.tag(t,i).raw(c)};e.list=(t,n)=>{if(is(t)){let o=t[e.symbol];return n?o.filter((e=>e.no==n)):o}return[]};e.last=(t,n)=>e.list(t,n).slice(-1)[0];const is=t=>t&&Array.isArray(t[e.symbol])})(n=t.UnknownFieldHandler||(t.UnknownFieldHandler={}));function mergeBinaryOptions(e,t){return Object.assign(Object.assign({},e),t)}t.mergeBinaryOptions=mergeBinaryOptions;var o;(function(e){e[e["Varint"]=0]="Varint";e[e["Bit64"]=1]="Bit64";e[e["LengthDelimited"]=2]="LengthDelimited";e[e["StartGroup"]=3]="StartGroup";e[e["EndGroup"]=4]="EndGroup";e[e["Bit32"]=5]="Bit32"})(o=t.WireType||(t.WireType={}))},8887:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.BinaryReader=t.binaryReadOptions=void 0;const o=n(6690);const i=n(5579);const c=n(365);const d={readUnknownField:true,readerFactory:e=>new BinaryReader(e)};function binaryReadOptions(e){return e?Object.assign(Object.assign({},d),e):d}t.binaryReadOptions=binaryReadOptions;class BinaryReader{constructor(e,t){this.varint64=c.varint64read;this.uint32=c.varint32read;this.buf=e;this.len=e.length;this.pos=0;this.view=new DataView(e.buffer,e.byteOffset,e.byteLength);this.textDecoder=t!==null&&t!==void 0?t:new TextDecoder("utf-8",{fatal:true,ignoreBOM:true})}tag(){let e=this.uint32(),t=e>>>3,n=e&7;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e){let t=this.pos;switch(e){case o.WireType.Varint:while(this.buf[this.pos++]&128){}break;case o.WireType.Bit64:this.pos+=4;case o.WireType.Bit32:this.pos+=4;break;case o.WireType.LengthDelimited:let t=this.uint32();this.pos+=t;break;case o.WireType.StartGroup:let n;while((n=this.tag()[1])!==o.WireType.EndGroup){this.skip(n)}break;default:throw new Error("cant skip wire type "+e)}this.assertBounds();return this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return new i.PbLong(...this.varint64())}uint64(){return new i.PbULong(...this.varint64())}sint64(){let[e,t]=this.varint64();let n=-(e&1);e=(e>>>1|(t&1)<<31)^n;t=t>>>1^n;return new i.PbLong(e,t)}bool(){let[e,t]=this.varint64();return e!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,true)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,true)}fixed64(){return new i.PbULong(this.sfixed32(),this.sfixed32())}sfixed64(){return new i.PbLong(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,true)}double(){return this.view.getFloat64((this.pos+=8)-8,true)}bytes(){let e=this.uint32();let t=this.pos;this.pos+=e;this.assertBounds();return this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}t.BinaryReader=BinaryReader},4839:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.BinaryWriter=t.binaryWriteOptions=void 0;const o=n(5579);const i=n(365);const c=n(6468);const d={writeUnknownFields:true,writerFactory:()=>new BinaryWriter};function binaryWriteOptions(e){return e?Object.assign(Object.assign({},d),e):d}t.binaryWriteOptions=binaryWriteOptions;class BinaryWriter{constructor(e){this.stack=[];this.textEncoder=e!==null&&e!==void 0?e:new TextEncoder;this.chunks=[];this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t>>0)}raw(e){if(this.buf.length){this.chunks.push(new Uint8Array(this.buf));this.buf=[]}this.chunks.push(e);return this}uint32(e){c.assertUInt32(e);while(e>127){this.buf.push(e&127|128);e=e>>>7}this.buf.push(e);return this}int32(e){c.assertInt32(e);i.varint32write(e,this.buf);return this}bool(e){this.buf.push(e?1:0);return this}bytes(e){this.uint32(e.byteLength);return this.raw(e)}string(e){let t=this.textEncoder.encode(e);this.uint32(t.byteLength);return this.raw(t)}float(e){c.assertFloat32(e);let t=new Uint8Array(4);new DataView(t.buffer).setFloat32(0,e,true);return this.raw(t)}double(e){let t=new Uint8Array(8);new DataView(t.buffer).setFloat64(0,e,true);return this.raw(t)}fixed32(e){c.assertUInt32(e);let t=new Uint8Array(4);new DataView(t.buffer).setUint32(0,e,true);return this.raw(t)}sfixed32(e){c.assertInt32(e);let t=new Uint8Array(4);new DataView(t.buffer).setInt32(0,e,true);return this.raw(t)}sint32(e){c.assertInt32(e);e=(e<<1^e>>31)>>>0;i.varint32write(e,this.buf);return this}sfixed64(e){let t=new Uint8Array(8);let n=new DataView(t.buffer);let i=o.PbLong.from(e);n.setInt32(0,i.lo,true);n.setInt32(4,i.hi,true);return this.raw(t)}fixed64(e){let t=new Uint8Array(8);let n=new DataView(t.buffer);let i=o.PbULong.from(e);n.setInt32(0,i.lo,true);n.setInt32(4,i.hi,true);return this.raw(t)}int64(e){let t=o.PbLong.from(e);i.varint64write(t.lo,t.hi,this.buf);return this}sint64(e){let t=o.PbLong.from(e),n=t.hi>>31,c=t.lo<<1^n,d=(t.hi<<1|t.lo>>>31)^n;i.varint64write(c,d,this.buf);return this}uint64(e){let t=o.PbULong.from(e);i.varint64write(t.lo,t.hi,this.buf);return this}}t.BinaryWriter=BinaryWriter},6959:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.listEnumNumbers=t.listEnumNames=t.listEnumValues=t.isEnumObject=void 0;function isEnumObject(e){if(typeof e!="object"||e===null){return false}if(!e.hasOwnProperty(0)){return false}for(let t of Object.keys(e)){let n=parseInt(t);if(!Number.isNaN(n)){let t=e[n];if(t===undefined)return false;if(e[t]!==n)return false}else{let n=e[t];if(n===undefined)return false;if(typeof n!=="number")return false;if(e[n]===undefined)return false}}return true}t.isEnumObject=isEnumObject;function listEnumValues(e){if(!isEnumObject(e))throw new Error("not a typescript enum object");let t=[];for(let[n,o]of Object.entries(e))if(typeof o=="number")t.push({name:n,number:o});return t}t.listEnumValues=listEnumValues;function listEnumNames(e){return listEnumValues(e).map((e=>e.name))}t.listEnumNames=listEnumNames;function listEnumNumbers(e){return listEnumValues(e).map((e=>e.number)).filter(((e,t,n)=>n.indexOf(e)==t))}t.listEnumNumbers=listEnumNumbers},365:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.varint32read=t.varint32write=t.int64toString=t.int64fromString=t.varint64write=t.varint64read=void 0;function varint64read(){let e=0;let t=0;for(let n=0;n<28;n+=7){let o=this.buf[this.pos++];e|=(o&127)<>4;if((n&128)==0){this.assertBounds();return[e,t]}for(let n=3;n<=31;n+=7){let o=this.buf[this.pos++];t|=(o&127)<>>o;const c=!(i>>>7==0&&t==0);const d=(c?i|128:i)&255;n.push(d);if(!c){return}}const o=e>>>28&15|(t&7)<<4;const i=!(t>>3==0);n.push((i?o|128:o)&255);if(!i){return}for(let e=3;e<31;e=e+7){const o=t>>>e;const i=!(o>>>7==0);const c=(i?o|128:o)&255;n.push(c);if(!i){return}}n.push(t>>>31&1)}t.varint64write=varint64write;const n=(1<<16)*(1<<16);function int64fromString(e){let t=e[0]=="-";if(t)e=e.slice(1);const o=1e6;let i=0;let c=0;function add1e6digit(t,d){const p=Number(e.slice(t,d));c*=o;i=i*o+p;if(i>=n){c=c+(i/n|0);i=i%n}}add1e6digit(-24,-18);add1e6digit(-18,-12);add1e6digit(-12,-6);add1e6digit(-6);return[t,i,c]}t.int64fromString=int64fromString;function int64toString(e,t){if(t>>>0<=2097151){return""+(n*t+(e>>>0))}let o=e&16777215;let i=(e>>>24|t<<8)>>>0&16777215;let c=t>>16&65535;let d=o+i*6777216+c*6710656;let p=i+c*8147497;let y=c*2;let C=1e7;if(d>=C){p+=Math.floor(d/C);d%=C}if(p>=C){y+=Math.floor(p/C);p%=C}function decimalFrom1e7(e,t){let n=e?String(e):"";if(t){return"0000000".slice(n.length)+n}return n}return decimalFrom1e7(y,0)+decimalFrom1e7(p,y)+decimalFrom1e7(d,1)}t.int64toString=int64toString;function varint32write(e,t){if(e>=0){while(e>127){t.push(e&127|128);e=e>>>7}t.push(e)}else{for(let n=0;n<9;n++){t.push(e&127|128);e=e>>7}t.push(1)}}t.varint32write=varint32write;function varint32read(){let e=this.buf[this.pos++];let t=e&127;if((e&128)==0){this.assertBounds();return t}e=this.buf[this.pos++];t|=(e&127)<<7;if((e&128)==0){this.assertBounds();return t}e=this.buf[this.pos++];t|=(e&127)<<14;if((e&128)==0){this.assertBounds();return t}e=this.buf[this.pos++];t|=(e&127)<<21;if((e&128)==0){this.assertBounds();return t}e=this.buf[this.pos++];t|=(e&15)<<28;for(let t=5;(e&128)!==0&&t<10;t++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");this.assertBounds();return t>>>0}t.varint32read=varint32read},8372:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});var o=n(8369);Object.defineProperty(t,"typeofJsonValue",{enumerable:true,get:function(){return o.typeofJsonValue}});Object.defineProperty(t,"isJsonObject",{enumerable:true,get:function(){return o.isJsonObject}});var i=n(6689);Object.defineProperty(t,"base64decode",{enumerable:true,get:function(){return i.base64decode}});Object.defineProperty(t,"base64encode",{enumerable:true,get:function(){return i.base64encode}});var c=n(5424);Object.defineProperty(t,"utf8read",{enumerable:true,get:function(){return c.utf8read}});var d=n(6690);Object.defineProperty(t,"WireType",{enumerable:true,get:function(){return d.WireType}});Object.defineProperty(t,"mergeBinaryOptions",{enumerable:true,get:function(){return d.mergeBinaryOptions}});Object.defineProperty(t,"UnknownFieldHandler",{enumerable:true,get:function(){return d.UnknownFieldHandler}});var p=n(8887);Object.defineProperty(t,"BinaryReader",{enumerable:true,get:function(){return p.BinaryReader}});Object.defineProperty(t,"binaryReadOptions",{enumerable:true,get:function(){return p.binaryReadOptions}});var y=n(4839);Object.defineProperty(t,"BinaryWriter",{enumerable:true,get:function(){return y.BinaryWriter}});Object.defineProperty(t,"binaryWriteOptions",{enumerable:true,get:function(){return y.binaryWriteOptions}});var C=n(5579);Object.defineProperty(t,"PbLong",{enumerable:true,get:function(){return C.PbLong}});Object.defineProperty(t,"PbULong",{enumerable:true,get:function(){return C.PbULong}});var Q=n(3389);Object.defineProperty(t,"jsonReadOptions",{enumerable:true,get:function(){return Q.jsonReadOptions}});Object.defineProperty(t,"jsonWriteOptions",{enumerable:true,get:function(){return Q.jsonWriteOptions}});Object.defineProperty(t,"mergeJsonOptions",{enumerable:true,get:function(){return Q.mergeJsonOptions}});var v=n(1371);Object.defineProperty(t,"MESSAGE_TYPE",{enumerable:true,get:function(){return v.MESSAGE_TYPE}});var D=n(4172);Object.defineProperty(t,"MessageType",{enumerable:true,get:function(){return D.MessageType}});var k=n(528);Object.defineProperty(t,"ScalarType",{enumerable:true,get:function(){return k.ScalarType}});Object.defineProperty(t,"LongType",{enumerable:true,get:function(){return k.LongType}});Object.defineProperty(t,"RepeatType",{enumerable:true,get:function(){return k.RepeatType}});Object.defineProperty(t,"normalizeFieldInfo",{enumerable:true,get:function(){return k.normalizeFieldInfo}});Object.defineProperty(t,"readFieldOptions",{enumerable:true,get:function(){return k.readFieldOptions}});Object.defineProperty(t,"readFieldOption",{enumerable:true,get:function(){return k.readFieldOption}});Object.defineProperty(t,"readMessageOption",{enumerable:true,get:function(){return k.readMessageOption}});var $=n(5649);Object.defineProperty(t,"ReflectionTypeCheck",{enumerable:true,get:function(){return $.ReflectionTypeCheck}});var V=n(868);Object.defineProperty(t,"reflectionCreate",{enumerable:true,get:function(){return V.reflectionCreate}});var ee=n(412);Object.defineProperty(t,"reflectionScalarDefault",{enumerable:true,get:function(){return ee.reflectionScalarDefault}});var te=n(8674);Object.defineProperty(t,"reflectionMergePartial",{enumerable:true,get:function(){return te.reflectionMergePartial}});var re=n(8197);Object.defineProperty(t,"reflectionEquals",{enumerable:true,get:function(){return re.reflectionEquals}});var ne=n(2161);Object.defineProperty(t,"ReflectionBinaryReader",{enumerable:true,get:function(){return ne.ReflectionBinaryReader}});var se=n(5325);Object.defineProperty(t,"ReflectionBinaryWriter",{enumerable:true,get:function(){return se.ReflectionBinaryWriter}});var oe=n(5240);Object.defineProperty(t,"ReflectionJsonReader",{enumerable:true,get:function(){return oe.ReflectionJsonReader}});var ie=n(5572);Object.defineProperty(t,"ReflectionJsonWriter",{enumerable:true,get:function(){return ie.ReflectionJsonWriter}});var ae=n(5556);Object.defineProperty(t,"containsMessageType",{enumerable:true,get:function(){return ae.containsMessageType}});var ce=n(4857);Object.defineProperty(t,"isOneofGroup",{enumerable:true,get:function(){return ce.isOneofGroup}});Object.defineProperty(t,"setOneofValue",{enumerable:true,get:function(){return ce.setOneofValue}});Object.defineProperty(t,"getOneofValue",{enumerable:true,get:function(){return ce.getOneofValue}});Object.defineProperty(t,"clearOneofValue",{enumerable:true,get:function(){return ce.clearOneofValue}});Object.defineProperty(t,"getSelectedOneofValue",{enumerable:true,get:function(){return ce.getSelectedOneofValue}});var le=n(6959);Object.defineProperty(t,"listEnumValues",{enumerable:true,get:function(){return le.listEnumValues}});Object.defineProperty(t,"listEnumNames",{enumerable:true,get:function(){return le.listEnumNames}});Object.defineProperty(t,"listEnumNumbers",{enumerable:true,get:function(){return le.listEnumNumbers}});Object.defineProperty(t,"isEnumObject",{enumerable:true,get:function(){return le.isEnumObject}});var ue=n(4959);Object.defineProperty(t,"lowerCamelCase",{enumerable:true,get:function(){return ue.lowerCamelCase}});var de=n(6468);Object.defineProperty(t,"assert",{enumerable:true,get:function(){return de.assert}});Object.defineProperty(t,"assertNever",{enumerable:true,get:function(){return de.assertNever}});Object.defineProperty(t,"assertInt32",{enumerable:true,get:function(){return de.assertInt32}});Object.defineProperty(t,"assertUInt32",{enumerable:true,get:function(){return de.assertUInt32}});Object.defineProperty(t,"assertFloat32",{enumerable:true,get:function(){return de.assertFloat32}})},3389:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.mergeJsonOptions=t.jsonWriteOptions=t.jsonReadOptions=void 0;const n={emitDefaultValues:false,enumAsInteger:false,useProtoFieldName:false,prettySpaces:0},o={ignoreUnknownFields:false};function jsonReadOptions(e){return e?Object.assign(Object.assign({},o),e):o}t.jsonReadOptions=jsonReadOptions;function jsonWriteOptions(e){return e?Object.assign(Object.assign({},n),e):n}t.jsonWriteOptions=jsonWriteOptions;function mergeJsonOptions(e,t){var n,o;let i=Object.assign(Object.assign({},e),t);i.typeRegistry=[...(n=e===null||e===void 0?void 0:e.typeRegistry)!==null&&n!==void 0?n:[],...(o=t===null||t===void 0?void 0:t.typeRegistry)!==null&&o!==void 0?o:[]];return i}t.mergeJsonOptions=mergeJsonOptions},8369:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.isJsonObject=t.typeofJsonValue=void 0;function typeofJsonValue(e){let t=typeof e;if(t=="object"){if(Array.isArray(e))return"array";if(e===null)return"null"}return t}t.typeofJsonValue=typeofJsonValue;function isJsonObject(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}t.isJsonObject=isJsonObject},4959:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.lowerCamelCase=void 0;function lowerCamelCase(e){let t=false;const n=[];for(let o=0;o{Object.defineProperty(t,"__esModule",{value:true});t.MESSAGE_TYPE=void 0;t.MESSAGE_TYPE=Symbol.for("protobuf-ts/message-type")},4172:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.MessageType=void 0;const o=n(1371);const i=n(528);const c=n(5649);const d=n(5240);const p=n(5572);const y=n(2161);const C=n(5325);const Q=n(868);const v=n(8674);const D=n(8369);const k=n(3389);const $=n(8197);const V=n(4839);const ee=n(8887);const te=Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));const re=te[o.MESSAGE_TYPE]={};class MessageType{constructor(e,t,n){this.defaultCheckDepth=16;this.typeName=e;this.fields=t.map(i.normalizeFieldInfo);this.options=n!==null&&n!==void 0?n:{};re.value=this;this.messagePrototype=Object.create(null,te);this.refTypeCheck=new c.ReflectionTypeCheck(this);this.refJsonReader=new d.ReflectionJsonReader(this);this.refJsonWriter=new p.ReflectionJsonWriter(this);this.refBinReader=new y.ReflectionBinaryReader(this);this.refBinWriter=new C.ReflectionBinaryWriter(this)}create(e){let t=Q.reflectionCreate(this);if(e!==undefined){v.reflectionMergePartial(this,t,e)}return t}clone(e){let t=this.create();v.reflectionMergePartial(this,t,e);return t}equals(e,t){return $.reflectionEquals(this,e,t)}is(e,t=this.defaultCheckDepth){return this.refTypeCheck.is(e,t,false)}isAssignable(e,t=this.defaultCheckDepth){return this.refTypeCheck.is(e,t,true)}mergePartial(e,t){v.reflectionMergePartial(this,e,t)}fromBinary(e,t){let n=ee.binaryReadOptions(t);return this.internalBinaryRead(n.readerFactory(e),e.byteLength,n)}fromJson(e,t){return this.internalJsonRead(e,k.jsonReadOptions(t))}fromJsonString(e,t){let n=JSON.parse(e);return this.fromJson(n,t)}toJson(e,t){return this.internalJsonWrite(e,k.jsonWriteOptions(t))}toJsonString(e,t){var n;let o=this.toJson(e,t);return JSON.stringify(o,null,(n=t===null||t===void 0?void 0:t.prettySpaces)!==null&&n!==void 0?n:0)}toBinary(e,t){let n=V.binaryWriteOptions(t);return this.internalBinaryWrite(e,n.writerFactory(),n).finish()}internalJsonRead(e,t,n){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){let o=n!==null&&n!==void 0?n:this.create();this.refJsonReader.read(e,o,t);return o}throw new Error(`Unable to parse message ${this.typeName} from JSON ${D.typeofJsonValue(e)}.`)}internalJsonWrite(e,t){return this.refJsonWriter.write(e,t)}internalBinaryWrite(e,t,n){this.refBinWriter.write(e,t,n);return t}internalBinaryRead(e,t,n,o){let i=o!==null&&o!==void 0?o:this.create();this.refBinReader.read(e,i,n,t);return i}}t.MessageType=MessageType},4857:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSelectedOneofValue=t.clearOneofValue=t.setUnknownOneofValue=t.setOneofValue=t.getOneofValue=t.isOneofGroup=void 0;function isOneofGroup(e){if(typeof e!="object"||e===null||!e.hasOwnProperty("oneofKind")){return false}switch(typeof e.oneofKind){case"string":if(e[e.oneofKind]===undefined)return false;return Object.keys(e).length==2;case"undefined":return Object.keys(e).length==1;default:return false}}t.isOneofGroup=isOneofGroup;function getOneofValue(e,t){return e[t]}t.getOneofValue=getOneofValue;function setOneofValue(e,t,n){if(e.oneofKind!==undefined){delete e[e.oneofKind]}e.oneofKind=t;if(n!==undefined){e[t]=n}}t.setOneofValue=setOneofValue;function setUnknownOneofValue(e,t,n){if(e.oneofKind!==undefined){delete e[e.oneofKind]}e.oneofKind=t;if(n!==undefined&&t!==undefined){e[t]=n}}t.setUnknownOneofValue=setUnknownOneofValue;function clearOneofValue(e){if(e.oneofKind!==undefined){delete e[e.oneofKind]}e.oneofKind=undefined}t.clearOneofValue=clearOneofValue;function getSelectedOneofValue(e){if(e.oneofKind===undefined){return undefined}return e[e.oneofKind]}t.getSelectedOneofValue=getSelectedOneofValue},5579:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.PbLong=t.PbULong=t.detectBi=void 0;const o=n(365);let i;function detectBi(){const e=new DataView(new ArrayBuffer(8));const t=globalThis.BigInt!==undefined&&typeof e.getBigInt64==="function"&&typeof e.getBigUint64==="function"&&typeof e.setBigInt64==="function"&&typeof e.setBigUint64==="function";i=t?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:e}:undefined}t.detectBi=detectBi;detectBi();function assertBi(e){if(!e)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}const c=/^-?[0-9]+$/;const d=4294967296;const p=2147483648;class SharedPbLong{constructor(e,t){this.lo=e|0;this.hi=t|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let e=this.hi*d+(this.lo>>>0);if(!Number.isSafeInteger(e))throw new Error("cannot convert to safe number");return e}}class PbULong extends SharedPbLong{static from(e){if(i)switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=="")throw new Error("string is no integer");e=i.C(e);case"number":if(e===0)return this.ZERO;e=i.C(e);case"bigint":if(!e)return this.ZERO;if(ei.UMAX)throw new Error("ulong too large");i.V.setBigUint64(0,e,true);return new PbULong(i.V.getInt32(0,true),i.V.getInt32(4,true))}else switch(typeof e){case"string":if(e=="0")return this.ZERO;e=e.trim();if(!c.test(e))throw new Error("string is no integer");let[t,n,i]=o.int64fromString(e);if(t)throw new Error("signed value for ulong");return new PbULong(n,i);case"number":if(e==0)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");if(e<0)throw new Error("signed value for ulong");return new PbULong(e,e/d)}throw new Error("unknown value "+typeof e)}toString(){return i?this.toBigInt().toString():o.int64toString(this.lo,this.hi)}toBigInt(){assertBi(i);i.V.setInt32(0,this.lo,true);i.V.setInt32(4,this.hi,true);return i.V.getBigUint64(0,true)}}t.PbULong=PbULong;PbULong.ZERO=new PbULong(0,0);class PbLong extends SharedPbLong{static from(e){if(i)switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=="")throw new Error("string is no integer");e=i.C(e);case"number":if(e===0)return this.ZERO;e=i.C(e);case"bigint":if(!e)return this.ZERO;if(ei.MAX)throw new Error("signed long too large");i.V.setBigInt64(0,e,true);return new PbLong(i.V.getInt32(0,true),i.V.getInt32(4,true))}else switch(typeof e){case"string":if(e=="0")return this.ZERO;e=e.trim();if(!c.test(e))throw new Error("string is no integer");let[t,n,i]=o.int64fromString(e);if(t){if(i>p||i==p&&n!=0)throw new Error("signed long too small")}else if(i>=p)throw new Error("signed long too large");let y=new PbLong(n,i);return t?y.negate():y;case"number":if(e==0)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");return e>0?new PbLong(e,e/d):new PbLong(-e,-e/d).negate()}throw new Error("unknown value "+typeof e)}isNegative(){return(this.hi&p)!==0}negate(){let e=~this.hi,t=this.lo;if(t)t=~t+1;else e+=1;return new PbLong(t,e)}toString(){if(i)return this.toBigInt().toString();if(this.isNegative()){let e=this.negate();return"-"+o.int64toString(e.lo,e.hi)}return o.int64toString(this.lo,this.hi)}toBigInt(){assertBi(i);i.V.setInt32(0,this.lo,true);i.V.setInt32(4,this.hi,true);return i.V.getBigInt64(0,true)}}t.PbLong=PbLong;PbLong.ZERO=new PbLong(0,0)},5424:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.utf8read=void 0;const fromCharCodes=e=>String.fromCharCode.apply(String,e);function utf8read(e){if(e.length<1)return"";let t=0,n=[],o=[],i=0,c;let d=e.length;while(t191&&c<224)o[i++]=(c&31)<<6|e[t++]&63;else if(c>239&&c<365){c=((c&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536;o[i++]=55296+(c>>10);o[i++]=56320+(c&1023)}else o[i++]=(c&15)<<12|(e[t++]&63)<<6|e[t++]&63;if(i>8191){n.push(fromCharCodes(o));i=0}}if(n.length){if(i)n.push(fromCharCodes(o.slice(0,i)));return n.join("")}return fromCharCodes(o.slice(0,i))}t.utf8read=utf8read},2161:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReflectionBinaryReader=void 0;const o=n(6690);const i=n(528);const c=n(2344);const d=n(412);class ReflectionBinaryReader{constructor(e){this.info=e}prepare(){var e;if(!this.fieldNoToField){const t=(e=this.info.fields)!==null&&e!==void 0?e:[];this.fieldNoToField=new Map(t.map((e=>[e.no,e])))}}read(e,t,n,c){this.prepare();const d=c===undefined?e.len:e.pos+c;while(e.pos{Object.defineProperty(t,"__esModule",{value:true});t.ReflectionBinaryWriter=void 0;const o=n(6690);const i=n(528);const c=n(6468);const d=n(5579);class ReflectionBinaryWriter{constructor(e){this.info=e}prepare(){if(!this.fields){const e=this.info.fields?this.info.fields.concat():[];this.fields=e.sort(((e,t)=>e.no-t.no))}}write(e,t,n){this.prepare();for(const o of this.fields){let d,p,y=o.repeat,C=o.localName;if(o.oneof){const t=e[o.oneof];if(t.oneofKind!==C)continue;d=t[C];p=true}else{d=e[C];p=false}switch(o.kind){case"scalar":case"enum":let e=o.kind=="enum"?i.ScalarType.INT32:o.T;if(y){c.assert(Array.isArray(d));if(y==i.RepeatType.PACKED)this.packed(t,e,o.no,d);else for(const n of d)this.scalar(t,e,o.no,n,true)}else if(d===undefined)c.assert(o.opt);else this.scalar(t,e,o.no,d,p||o.opt);break;case"message":if(y){c.assert(Array.isArray(d));for(const e of d)this.message(t,n,o.T(),o.no,e)}else{this.message(t,n,o.T(),o.no,d)}break;case"map":c.assert(typeof d=="object"&&d!==null);for(const[e,i]of Object.entries(d))this.mapEntry(t,n,o,e,i);break}}let d=n.writeUnknownFields;if(d!==false)(d===true?o.UnknownFieldHandler.onWrite:d)(this.info.typeName,e,t)}mapEntry(e,t,n,d,p){e.tag(n.no,o.WireType.LengthDelimited);e.fork();let y=d;switch(n.K){case i.ScalarType.INT32:case i.ScalarType.FIXED32:case i.ScalarType.UINT32:case i.ScalarType.SFIXED32:case i.ScalarType.SINT32:y=Number.parseInt(d);break;case i.ScalarType.BOOL:c.assert(d=="true"||d=="false");y=d=="true";break}this.scalar(e,n.K,1,y,true);switch(n.V.kind){case"scalar":this.scalar(e,n.V.T,2,p,true);break;case"enum":this.scalar(e,i.ScalarType.INT32,2,p,true);break;case"message":this.message(e,t,n.V.T(),2,p);break}e.join()}message(e,t,n,i,c){if(c===undefined)return;n.internalBinaryWrite(c,e.tag(i,o.WireType.LengthDelimited).fork(),t);e.join()}scalar(e,t,n,o,i){let[c,d,p]=this.scalarInfo(t,o);if(!p||i){e.tag(n,c);e[d](o)}}packed(e,t,n,d){if(!d.length)return;c.assert(t!==i.ScalarType.BYTES&&t!==i.ScalarType.STRING);e.tag(n,o.WireType.LengthDelimited);e.fork();let[,p]=this.scalarInfo(t);for(let t=0;t{Object.defineProperty(t,"__esModule",{value:true});t.containsMessageType=void 0;const o=n(1371);function containsMessageType(e){return e[o.MESSAGE_TYPE]!=null}t.containsMessageType=containsMessageType},868:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.reflectionCreate=void 0;const o=n(412);const i=n(1371);function reflectionCreate(e){const t=e.messagePrototype?Object.create(e.messagePrototype):Object.defineProperty({},i.MESSAGE_TYPE,{value:e});for(let n of e.fields){let e=n.localName;if(n.opt)continue;if(n.oneof)t[n.oneof]={oneofKind:undefined};else if(n.repeat)t[e]=[];else switch(n.kind){case"scalar":t[e]=o.reflectionScalarDefault(n.T,n.L);break;case"enum":t[e]=0;break;case"map":t[e]={};break}}return t}t.reflectionCreate=reflectionCreate},8197:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.reflectionEquals=void 0;const o=n(528);function reflectionEquals(e,t,n){if(t===n)return true;if(!t||!n)return false;for(let c of e.fields){let e=c.localName;let d=c.oneof?t[c.oneof][e]:t[e];let p=c.oneof?n[c.oneof][e]:n[e];switch(c.kind){case"enum":case"scalar":let e=c.kind=="enum"?o.ScalarType.INT32:c.T;if(!(c.repeat?repeatedPrimitiveEq(e,d,p):primitiveEq(e,d,p)))return false;break;case"map":if(!(c.V.kind=="message"?repeatedMsgEq(c.V.T(),i(d),i(p)):repeatedPrimitiveEq(c.V.kind=="enum"?o.ScalarType.INT32:c.V.T,i(d),i(p))))return false;break;case"message":let t=c.T();if(!(c.repeat?repeatedMsgEq(t,d,p):t.equals(d,p)))return false;break}}return true}t.reflectionEquals=reflectionEquals;const i=Object.values;function primitiveEq(e,t,n){if(t===n)return true;if(e!==o.ScalarType.BYTES)return false;let i=t;let c=n;if(i.length!==c.length)return false;for(let e=0;e{Object.defineProperty(t,"__esModule",{value:true});t.readMessageOption=t.readFieldOption=t.readFieldOptions=t.normalizeFieldInfo=t.RepeatType=t.LongType=t.ScalarType=void 0;const o=n(4959);var i;(function(e){e[e["DOUBLE"]=1]="DOUBLE";e[e["FLOAT"]=2]="FLOAT";e[e["INT64"]=3]="INT64";e[e["UINT64"]=4]="UINT64";e[e["INT32"]=5]="INT32";e[e["FIXED64"]=6]="FIXED64";e[e["FIXED32"]=7]="FIXED32";e[e["BOOL"]=8]="BOOL";e[e["STRING"]=9]="STRING";e[e["BYTES"]=12]="BYTES";e[e["UINT32"]=13]="UINT32";e[e["SFIXED32"]=15]="SFIXED32";e[e["SFIXED64"]=16]="SFIXED64";e[e["SINT32"]=17]="SINT32";e[e["SINT64"]=18]="SINT64"})(i=t.ScalarType||(t.ScalarType={}));var c;(function(e){e[e["BIGINT"]=0]="BIGINT";e[e["STRING"]=1]="STRING";e[e["NUMBER"]=2]="NUMBER"})(c=t.LongType||(t.LongType={}));var d;(function(e){e[e["NO"]=0]="NO";e[e["PACKED"]=1]="PACKED";e[e["UNPACKED"]=2]="UNPACKED"})(d=t.RepeatType||(t.RepeatType={}));function normalizeFieldInfo(e){var t,n,i,c;e.localName=(t=e.localName)!==null&&t!==void 0?t:o.lowerCamelCase(e.name);e.jsonName=(n=e.jsonName)!==null&&n!==void 0?n:o.lowerCamelCase(e.name);e.repeat=(i=e.repeat)!==null&&i!==void 0?i:d.NO;e.opt=(c=e.opt)!==null&&c!==void 0?c:e.repeat?false:e.oneof?false:e.kind=="message";return e}t.normalizeFieldInfo=normalizeFieldInfo;function readFieldOptions(e,t,n,o){var i;const c=(i=e.fields.find(((e,n)=>e.localName==t||n==t)))===null||i===void 0?void 0:i.options;return c&&c[n]?o.fromJson(c[n]):undefined}t.readFieldOptions=readFieldOptions;function readFieldOption(e,t,n,o){var i;const c=(i=e.fields.find(((e,n)=>e.localName==t||n==t)))===null||i===void 0?void 0:i.options;if(!c){return undefined}const d=c[n];if(d===undefined){return d}return o?o.fromJson(d):d}t.readFieldOption=readFieldOption;function readMessageOption(e,t,n){const o=e.options;const i=o[t];if(i===undefined){return i}return n?n.fromJson(i):i}t.readMessageOption=readMessageOption},5240:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReflectionJsonReader=void 0;const o=n(8369);const i=n(6689);const c=n(528);const d=n(5579);const p=n(6468);const y=n(2344);class ReflectionJsonReader{constructor(e){this.info=e}prepare(){var e;if(this.fMap===undefined){this.fMap={};const t=(e=this.info.fields)!==null&&e!==void 0?e:[];for(const e of t){this.fMap[e.name]=e;this.fMap[e.jsonName]=e;this.fMap[e.localName]=e}}}assert(e,t,n){if(!e){let e=o.typeofJsonValue(n);if(e=="number"||e=="boolean")e=n.toString();throw new Error(`Cannot parse JSON ${e} for ${this.info.typeName}#${t}`)}}read(e,t,n){this.prepare();const i=[];for(const[d,p]of Object.entries(e)){const e=this.fMap[d];if(!e){if(!n.ignoreUnknownFields)throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${d}`);continue}const y=e.localName;let C;if(e.oneof){if(p===null&&(e.kind!=="enum"||e.T()[0]!=="google.protobuf.NullValue")){continue}if(i.includes(e.oneof))throw new Error(`Multiple members of the oneof group "${e.oneof}" of ${this.info.typeName} are present in JSON.`);i.push(e.oneof);C=t[e.oneof]={oneofKind:y}}else{C=t}if(e.kind=="map"){if(p===null){continue}this.assert(o.isJsonObject(p),e.name,p);const t=C[y];for(const[o,i]of Object.entries(p)){this.assert(i!==null,e.name+" map value",null);let d;switch(e.V.kind){case"message":d=e.V.T().internalJsonRead(i,n);break;case"enum":d=this.enum(e.V.T(),i,e.name,n.ignoreUnknownFields);if(d===false)continue;break;case"scalar":d=this.scalar(i,e.V.T,e.V.L,e.name);break}this.assert(d!==undefined,e.name+" map value",i);let p=o;if(e.K==c.ScalarType.BOOL)p=p=="true"?true:p=="false"?false:p;p=this.scalar(p,e.K,c.LongType.STRING,e.name).toString();t[p]=d}}else if(e.repeat){if(p===null)continue;this.assert(Array.isArray(p),e.name,p);const t=C[y];for(const o of p){this.assert(o!==null,e.name,null);let i;switch(e.kind){case"message":i=e.T().internalJsonRead(o,n);break;case"enum":i=this.enum(e.T(),o,e.name,n.ignoreUnknownFields);if(i===false)continue;break;case"scalar":i=this.scalar(o,e.T,e.L,e.name);break}this.assert(i!==undefined,e.name,p);t.push(i)}}else{switch(e.kind){case"message":if(p===null&&e.T().typeName!="google.protobuf.Value"){this.assert(e.oneof===undefined,e.name+" (oneof member)",null);continue}C[y]=e.T().internalJsonRead(p,n,C[y]);break;case"enum":if(p===null)continue;let t=this.enum(e.T(),p,e.name,n.ignoreUnknownFields);if(t===false)continue;C[y]=t;break;case"scalar":if(p===null)continue;C[y]=this.scalar(p,e.T,e.L,e.name);break}}}}enum(e,t,n,o){if(e[0]=="google.protobuf.NullValue")p.assert(t===null||t==="NULL_VALUE",`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} only accepts null.`);if(t===null)return 0;switch(typeof t){case"number":p.assert(Number.isInteger(t),`Unable to parse field ${this.info.typeName}#${n}, enum can only be integral number, got ${t}.`);return t;case"string":let i=t;if(e[2]&&t.substring(0,e[2].length)===e[2])i=t.substring(e[2].length);let c=e[1][i];if(typeof c==="undefined"&&o){return false}p.assert(typeof c=="number",`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} has no value for "${t}".`);return c}p.assert(false,`Unable to parse field ${this.info.typeName}#${n}, cannot parse enum value from ${typeof t}".`)}scalar(e,t,n,o){let C;try{switch(t){case c.ScalarType.DOUBLE:case c.ScalarType.FLOAT:if(e===null)return 0;if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""){C="empty string";break}if(typeof e=="string"&&e.trim().length!==e.length){C="extra whitespace";break}if(typeof e!="string"&&typeof e!="number"){break}let o=Number(e);if(Number.isNaN(o)){C="not a number";break}if(!Number.isFinite(o)){C="too large or small";break}if(t==c.ScalarType.FLOAT)p.assertFloat32(o);return o;case c.ScalarType.INT32:case c.ScalarType.FIXED32:case c.ScalarType.SFIXED32:case c.ScalarType.SINT32:case c.ScalarType.UINT32:if(e===null)return 0;let Q;if(typeof e=="number")Q=e;else if(e==="")C="empty string";else if(typeof e=="string"){if(e.trim().length!==e.length)C="extra whitespace";else Q=Number(e)}if(Q===undefined)break;if(t==c.ScalarType.UINT32)p.assertUInt32(Q);else p.assertInt32(Q);return Q;case c.ScalarType.INT64:case c.ScalarType.SFIXED64:case c.ScalarType.SINT64:if(e===null)return y.reflectionLongConvert(d.PbLong.ZERO,n);if(typeof e!="number"&&typeof e!="string")break;return y.reflectionLongConvert(d.PbLong.from(e),n);case c.ScalarType.FIXED64:case c.ScalarType.UINT64:if(e===null)return y.reflectionLongConvert(d.PbULong.ZERO,n);if(typeof e!="number"&&typeof e!="string")break;return y.reflectionLongConvert(d.PbULong.from(e),n);case c.ScalarType.BOOL:if(e===null)return false;if(typeof e!=="boolean")break;return e;case c.ScalarType.STRING:if(e===null)return"";if(typeof e!=="string"){C="extra whitespace";break}try{encodeURIComponent(e)}catch(C){C="invalid UTF8";break}return e;case c.ScalarType.BYTES:if(e===null||e==="")return new Uint8Array(0);if(typeof e!=="string")break;return i.base64decode(e)}}catch(e){C=e.message}this.assert(false,o+(C?" - "+C:""),e)}}t.ReflectionJsonReader=ReflectionJsonReader},5572:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReflectionJsonWriter=void 0;const o=n(6689);const i=n(5579);const c=n(528);const d=n(6468);class ReflectionJsonWriter{constructor(e){var t;this.fields=(t=e.fields)!==null&&t!==void 0?t:[]}write(e,t){const n={},o=e;for(const e of this.fields){if(!e.oneof){let i=this.field(e,o[e.localName],t);if(i!==undefined)n[t.useProtoFieldName?e.name:e.jsonName]=i;continue}const i=o[e.oneof];if(i.oneofKind!==e.localName)continue;const c=e.kind=="scalar"||e.kind=="enum"?Object.assign(Object.assign({},t),{emitDefaultValues:true}):t;let p=this.field(e,i[e.localName],c);d.assert(p!==undefined);n[t.useProtoFieldName?e.name:e.jsonName]=p}return n}field(e,t,n){let o=undefined;if(e.kind=="map"){d.assert(typeof t=="object"&&t!==null);const i={};switch(e.V.kind){case"scalar":for(const[n,o]of Object.entries(t)){const t=this.scalar(e.V.T,o,e.name,false,true);d.assert(t!==undefined);i[n.toString()]=t}break;case"message":const o=e.V.T();for(const[c,p]of Object.entries(t)){const t=this.message(o,p,e.name,n);d.assert(t!==undefined);i[c.toString()]=t}break;case"enum":const c=e.V.T();for(const[o,p]of Object.entries(t)){d.assert(p===undefined||typeof p=="number");const t=this.enum(c,p,e.name,false,true,n.enumAsInteger);d.assert(t!==undefined);i[o.toString()]=t}break}if(n.emitDefaultValues||Object.keys(i).length>0)o=i}else if(e.repeat){d.assert(Array.isArray(t));const i=[];switch(e.kind){case"scalar":for(let n=0;n0||n.emitDefaultValues)o=i}else{switch(e.kind){case"scalar":o=this.scalar(e.T,t,e.name,e.opt,n.emitDefaultValues);break;case"enum":o=this.enum(e.T(),t,e.name,e.opt,n.emitDefaultValues,n.enumAsInteger);break;case"message":o=this.message(e.T(),t,e.name,n);break}}return o}enum(e,t,n,o,i,c){if(e[0]=="google.protobuf.NullValue")return!i&&!o?undefined:null;if(t===undefined){d.assert(o);return undefined}if(t===0&&!i&&!o)return undefined;d.assert(typeof t=="number");d.assert(Number.isInteger(t));if(c||!e[1].hasOwnProperty(t))return t;if(e[2])return e[2]+e[1][t];return e[1][t]}message(e,t,n,o){if(t===undefined)return o.emitDefaultValues?null:undefined;return e.internalJsonWrite(t,o)}scalar(e,t,n,p,y){if(t===undefined){d.assert(p);return undefined}const C=y||p;switch(e){case c.ScalarType.INT32:case c.ScalarType.SFIXED32:case c.ScalarType.SINT32:if(t===0)return C?0:undefined;d.assertInt32(t);return t;case c.ScalarType.FIXED32:case c.ScalarType.UINT32:if(t===0)return C?0:undefined;d.assertUInt32(t);return t;case c.ScalarType.FLOAT:d.assertFloat32(t);case c.ScalarType.DOUBLE:if(t===0)return C?0:undefined;d.assert(typeof t=="number");if(Number.isNaN(t))return"NaN";if(t===Number.POSITIVE_INFINITY)return"Infinity";if(t===Number.NEGATIVE_INFINITY)return"-Infinity";return t;case c.ScalarType.STRING:if(t==="")return C?"":undefined;d.assert(typeof t=="string");return t;case c.ScalarType.BOOL:if(t===false)return C?false:undefined;d.assert(typeof t=="boolean");return t;case c.ScalarType.UINT64:case c.ScalarType.FIXED64:d.assert(typeof t=="number"||typeof t=="string"||typeof t=="bigint");let e=i.PbULong.from(t);if(e.isZero()&&!C)return undefined;return e.toString();case c.ScalarType.INT64:case c.ScalarType.SFIXED64:case c.ScalarType.SINT64:d.assert(typeof t=="number"||typeof t=="string"||typeof t=="bigint");let n=i.PbLong.from(t);if(n.isZero()&&!C)return undefined;return n.toString();case c.ScalarType.BYTES:d.assert(t instanceof Uint8Array);if(!t.byteLength)return C?"":undefined;return o.base64encode(t)}}}t.ReflectionJsonWriter=ReflectionJsonWriter},2344:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.reflectionLongConvert=void 0;const o=n(528);function reflectionLongConvert(e,t){switch(t){case o.LongType.BIGINT:return e.toBigInt();case o.LongType.NUMBER:return e.toNumber();default:return e.toString()}}t.reflectionLongConvert=reflectionLongConvert},8674:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.reflectionMergePartial=void 0;function reflectionMergePartial(e,t,n){let o,i=n,c;for(let n of e.fields){let e=n.localName;if(n.oneof){const d=i[n.oneof];if((d===null||d===void 0?void 0:d.oneofKind)==undefined){continue}o=d[e];c=t[n.oneof];c.oneofKind=d.oneofKind;if(o==undefined){delete c[e];continue}}else{o=i[e];c=t;if(o==undefined){continue}}if(n.repeat)c[e].length=o.length;switch(n.kind){case"scalar":case"enum":if(n.repeat)for(let t=0;t{Object.defineProperty(t,"__esModule",{value:true});t.reflectionScalarDefault=void 0;const o=n(528);const i=n(2344);const c=n(5579);function reflectionScalarDefault(e,t=o.LongType.STRING){switch(e){case o.ScalarType.BOOL:return false;case o.ScalarType.UINT64:case o.ScalarType.FIXED64:return i.reflectionLongConvert(c.PbULong.ZERO,t);case o.ScalarType.INT64:case o.ScalarType.SFIXED64:case o.ScalarType.SINT64:return i.reflectionLongConvert(c.PbLong.ZERO,t);case o.ScalarType.DOUBLE:case o.ScalarType.FLOAT:return 0;case o.ScalarType.BYTES:return new Uint8Array(0);case o.ScalarType.STRING:return"";default:return 0}}t.reflectionScalarDefault=reflectionScalarDefault},5649:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReflectionTypeCheck=void 0;const o=n(528);const i=n(4857);class ReflectionTypeCheck{constructor(e){var t;this.fields=(t=e.fields)!==null&&t!==void 0?t:[]}prepare(){if(this.data)return;const e=[],t=[],n=[];for(let o of this.fields){if(o.oneof){if(!n.includes(o.oneof)){n.push(o.oneof);e.push(o.oneof);t.push(o.oneof)}}else{t.push(o.localName);switch(o.kind){case"scalar":case"enum":if(!o.opt||o.repeat)e.push(o.localName);break;case"message":if(o.repeat)e.push(o.localName);break;case"map":e.push(o.localName);break}}}this.data={req:e,known:t,oneofs:Object.values(n)}}is(e,t,n=false){if(t<0)return true;if(e===null||e===undefined||typeof e!="object")return false;this.prepare();let o=Object.keys(e),c=this.data;if(o.length!o.includes(e))))return false;if(!n){if(o.some((e=>!c.known.includes(e))))return false}if(t<1){return true}for(const o of c.oneofs){const c=e[o];if(!i.isOneofGroup(c))return false;if(c.oneofKind===undefined)continue;const d=this.fields.find((e=>e.localName===c.oneofKind));if(!d)return false;if(!this.field(c[c.oneofKind],d,n,t))return false}for(const o of this.fields){if(o.oneof!==undefined)continue;if(!this.field(e[o.localName],o,n,t))return false}return true}field(e,t,n,i){let c=t.repeat;switch(t.kind){case"scalar":if(e===undefined)return t.opt;if(c)return this.scalars(e,t.T,i,t.L);return this.scalar(e,t.T,t.L);case"enum":if(e===undefined)return t.opt;if(c)return this.scalars(e,o.ScalarType.INT32,i);return this.scalar(e,o.ScalarType.INT32);case"message":if(e===undefined)return true;if(c)return this.messages(e,t.T(),n,i);return this.message(e,t.T(),n,i);case"map":if(typeof e!="object"||e===null)return false;if(i<2)return true;if(!this.mapKeys(e,t.K,i))return false;switch(t.V.kind){case"scalar":return this.scalars(Object.values(e),t.V.T,i,t.V.L);case"enum":return this.scalars(Object.values(e),o.ScalarType.INT32,i);case"message":return this.messages(Object.values(e),t.V.T(),n,i)}break}return true}message(e,t,n,o){if(n){return t.isAssignable(e,o)}return t.is(e,o)}messages(e,t,n,o){if(!Array.isArray(e))return false;if(o<2)return true;if(n){for(let n=0;nparseInt(e))),t,n);case o.ScalarType.BOOL:return this.scalars(i.slice(0,n).map((e=>e=="true"?true:e=="false"?false:e)),t,n);default:return this.scalars(i,t,n,o.LongType.STRING)}}}t.ReflectionTypeCheck=ReflectionTypeCheck},9659:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))t[t.length]=n;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=ownKeys(e),c=0;cd(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return d(this,void 0,void 0,(function*(){return new Promise((e=>d(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=this._getUserAgentWithOrchestrationId(e);this.handlers=t||[];this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return d(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return d(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return d(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,n){return d(this,void 0,void 0,(function*(){return this.request("POST",e,t,n||{})}))}patch(e,t,n){return d(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,n||{})}))}put(e,t,n){return d(this,void 0,void 0,(function*(){return this.request("PUT",e,t,n||{})}))}head(e,t){return d(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,n,o){return d(this,void 0,void 0,(function*(){return this.request(e,t,n,o)}))}getJson(e){return d(this,arguments,void 0,(function*(e,t={}){t[k.Accept]=this._getExistingOrDefaultHeader(t,k.Accept,$.ApplicationJson);const n=yield this.get(e,t);return this._processResponse(n,this.requestOptions)}))}postJson(e,t){return d(this,arguments,void 0,(function*(e,t,n={}){const o=JSON.stringify(t,null,2);n[k.Accept]=this._getExistingOrDefaultHeader(n,k.Accept,$.ApplicationJson);n[k.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,$.ApplicationJson);const i=yield this.post(e,o,n);return this._processResponse(i,this.requestOptions)}))}putJson(e,t){return d(this,arguments,void 0,(function*(e,t,n={}){const o=JSON.stringify(t,null,2);n[k.Accept]=this._getExistingOrDefaultHeader(n,k.Accept,$.ApplicationJson);n[k.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,$.ApplicationJson);const i=yield this.put(e,o,n);return this._processResponse(i,this.requestOptions)}))}patchJson(e,t){return d(this,arguments,void 0,(function*(e,t,n={}){const o=JSON.stringify(t,null,2);n[k.Accept]=this._getExistingOrDefaultHeader(n,k.Accept,$.ApplicationJson);n[k.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,$.ApplicationJson);const i=yield this.patch(e,o,n);return this._processResponse(i,this.requestOptions)}))}request(e,t,n,o){return d(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const i=new URL(t);let c=this._prepareRequest(e,i,o);const d=this._allowRetries&&te.includes(e)?this._maxRetries+1:1;let p=0;let y;do{y=yield this.requestRaw(c,n);if(y&&y.message&&y.message.statusCode===D.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(y)){e=t;break}}if(e){return e.handleAuthentication(this,c,n)}else{return y}}let t=this._maxRedirects;while(y.message.statusCode&&V.includes(y.message.statusCode)&&this._allowRedirects&&t>0){const d=y.message.headers["location"];if(!d){break}const p=new URL(d);if(i.protocol==="https:"&&i.protocol!==p.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield y.readBody();if(p.hostname!==i.hostname){for(const e in o){if(e.toLowerCase()==="authorization"){delete o[e]}}}c=this._prepareRequest(e,p,o);y=yield this.requestRaw(c,n);t--}if(!y.message.statusCode||!ee.includes(y.message.statusCode)){return y}p+=1;if(p{function callbackForResult(e,t){if(e){o(e)}else if(!t){o(new Error("Unknown error"))}else{n(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,n){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let o=false;function handleResult(e,t){if(!o){o=true;n(e,t)}}const i=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let c;i.on("socket",(e=>{c=e}));i.setTimeout(this._socketTimeout||3*6e4,(()=>{if(c){c.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));i.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){i.end()}));t.pipe(i)}else{i.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const n=C.getProxyUrl(t);const o=n&&n.hostname;if(!o){return}return this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){const o={};o.parsedUrl=t;const i=o.parsedUrl.protocol==="https:";o.httpModule=i?y:p;const c=i?443:80;o.options={};o.options.host=o.parsedUrl.hostname;o.options.port=o.parsedUrl.port?parseInt(o.parsedUrl.port):c;o.options.path=(o.parsedUrl.pathname||"")+(o.parsedUrl.search||"");o.options.method=e;o.options.headers=this._mergeHeaders(n);if(this.userAgent!=null){o.options.headers["user-agent"]=this.userAgent}o.options.agent=this._getAgent(o.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(o.options)}}return o}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,n){let o;if(this.requestOptions&&this.requestOptions.headers){const e=lowercaseKeys(this.requestOptions.headers)[t];if(e){o=typeof e==="number"?e.toString():e}}const i=e[t];if(i!==undefined){return typeof i==="number"?i.toString():i}if(o!==undefined){return o}return n}_getExistingOrDefaultContentTypeHeader(e,t){let n;if(this.requestOptions&&this.requestOptions.headers){const e=lowercaseKeys(this.requestOptions.headers)[k.ContentType];if(e){if(typeof e==="number"){n=String(e)}else if(Array.isArray(e)){n=e.join(", ")}else{n=e}}}const o=e[k.ContentType];if(o!==undefined){if(typeof o==="number"){return String(o)}else if(Array.isArray(o)){return o.join(", ")}else{return o}}if(n!==undefined){return n}return t}_getAgent(e){let t;const n=C.getProxyUrl(e);const o=n&&n.hostname;if(this._keepAlive&&o){t=this._proxyAgent}if(!o){t=this._agent}if(t){return t}const i=e.protocol==="https:";let c=100;if(this.requestOptions){c=this.requestOptions.maxSockets||p.globalAgent.maxSockets}if(n&&n.hostname){const e={maxSockets:c,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})};let o;const d=n.protocol==="https:";if(i){o=d?Q.httpsOverHttps:Q.httpsOverHttp}else{o=d?Q.httpOverHttps:Q.httpOverHttp}t=o(e);this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:c};t=i?new y.Agent(e):new p.Agent(e);this._agent=t}if(i&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let n;if(this._keepAlive){n=this._proxyAgentDispatcher}if(n){return n}const o=e.protocol==="https:";n=new v.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`Basic ${Buffer.from(`${t.username}:${t.password}`).toString("base64")}`}));this._proxyAgentDispatcher=n;if(o&&this._ignoreSslError){n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:false})}return n}_getUserAgentWithOrchestrationId(e){const t=e||"actions/http-client";const n=process.env["ACTIONS_ORCHESTRATION_ID"];if(n){const e=n.replace(/[^a-z0-9_.-]/gi,"_");return`${t} actions_orchestration_id/${e}`}return t}_performExponentialBackoff(e){return d(this,void 0,void 0,(function*(){e=Math.min(re,e);const t=ne*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return d(this,void 0,void 0,(function*(){return new Promise(((n,o)=>d(this,void 0,void 0,(function*(){const i=e.message.statusCode||0;const c={statusCode:i,result:null,headers:{}};if(i===D.NotFound){n(c)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let d;let p;try{p=yield e.readBody();if(p&&p.length>0){if(t&&t.deserializeDates){d=JSON.parse(p,dateTimeDeserializer)}else{d=JSON.parse(p)}c.result=d}c.headers=e.message.headers}catch(e){}if(i>299){let e;if(d&&d.message){e=d.message}else if(p&&p.length>0){e=p}else{e=`Failed request: (${i})`}const t=new HttpClientError(e,i);t.result=c.result;o(t)}else{n(c)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{})},3335:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.getProxyUrl=getProxyUrl;t.checkBypass=checkBypass;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const n=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(n){try{return new DecodedURL(n)}catch(e){if(!n.startsWith("http://")&&!n.startsWith("https://"))return new DecodedURL(`http://${n}`)}}else{return undefined}}function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const n=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!n){return false}let o;if(e.port){o=Number(e.port)}else if(e.protocol==="http:"){o=80}else if(e.protocol==="https:"){o=443}const i=[e.hostname.toUpperCase()];if(typeof o==="number"){i.push(`${i[0]}:${o}`)}for(const e of n.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||i.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}class DecodedURL extends URL{constructor(e,t){super(e,t);this._decodedUsername=decodeURIComponent(super.username);this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}},3182:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.resolveHttpAuthSchemeConfig=t.defaultECRPUBLICHttpAuthSchemeProvider=t.defaultECRPUBLICHttpAuthSchemeParametersProvider=void 0;const o=n(8704);const i=n(6324);const defaultECRPUBLICHttpAuthSchemeParametersProvider=async(e,t,n)=>({operation:(0,i.getSmithyContext)(t).operation,region:await(0,i.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});t.defaultECRPUBLICHttpAuthSchemeParametersProvider=defaultECRPUBLICHttpAuthSchemeParametersProvider;function createAwsAuthSigv4HttpAuthOption(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ecr-public",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}const defaultECRPUBLICHttpAuthSchemeProvider=e=>{const t=[];switch(e.operation){default:{t.push(createAwsAuthSigv4HttpAuthOption(e))}}return t};t.defaultECRPUBLICHttpAuthSchemeProvider=defaultECRPUBLICHttpAuthSchemeProvider;const resolveHttpAuthSchemeConfig=e=>{const t=(0,o.resolveAwsSdkSigV4Config)(e);return Object.assign(t,{authSchemePreference:(0,i.normalizeProvider)(e.authSchemePreference??[])})};t.resolveHttpAuthSchemeConfig=resolveHttpAuthSchemeConfig},6072:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultEndpointResolver=void 0;const o=n(3068);const i=n(9674);const c=n(1829);const d=new i.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});const defaultEndpointResolver=(e,t={})=>d.get(e,(()=>(0,i.resolveEndpoint)(c.ruleSet,{endpointParams:e,logger:t.logger})));t.defaultEndpointResolver=defaultEndpointResolver;i.customEndpointFunctions.aws=o.awsEndpointFunctions},1829:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ruleSet=void 0;const n="required",o="fn",i="argv",c="ref";const d=true,p="isSet",y="booleanEquals",C="error",Q="endpoint",v="tree",D="PartitionResult",k="getAttr",$={[n]:false,type:"string"},V={[n]:true,default:false,type:"boolean"},ee={[c]:"Endpoint"},te={[o]:y,[i]:[{[c]:"UseFIPS"},true]},re={[o]:y,[i]:[{[c]:"UseDualStack"},true]},ne={},se={[o]:k,[i]:[{[c]:D},"supportsFIPS"]},oe={[c]:D},ie={[o]:y,[i]:[true,{[o]:k,[i]:[oe,"supportsDualStack"]}]},ae=[te],ce=[re],le=[{[c]:"Region"}];const ue={version:"1.0",parameters:{Region:$,UseDualStack:V,UseFIPS:V,Endpoint:$},rules:[{conditions:[{[o]:p,[i]:[ee]}],rules:[{conditions:ae,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:C},{conditions:ce,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:C},{endpoint:{url:ee,properties:ne,headers:ne},type:Q}],type:v},{conditions:[{[o]:p,[i]:le}],rules:[{conditions:[{[o]:"aws.partition",[i]:le,assign:D}],rules:[{conditions:[te,re],rules:[{conditions:[{[o]:y,[i]:[d,se]},ie],rules:[{endpoint:{url:"https://api.ecr-public-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ne,headers:ne},type:Q}],type:v},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:C}],type:v},{conditions:ae,rules:[{conditions:[{[o]:y,[i]:[se,d]}],rules:[{endpoint:{url:"https://api.ecr-public-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ne,headers:ne},type:Q}],type:v},{error:"FIPS is enabled but this partition does not support FIPS",type:C}],type:v},{conditions:ce,rules:[{conditions:[ie],rules:[{conditions:[{[o]:"stringEquals",[i]:["aws",{[o]:k,[i]:[oe,"name"]}]}],endpoint:{url:"https://ecr-public.{Region}.api.aws",properties:ne,headers:ne},type:Q},{endpoint:{url:"https://api.ecr-public.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ne,headers:ne},type:Q}],type:v},{error:"DualStack is enabled but this partition does not support DualStack",type:C}],type:v},{endpoint:{url:"https://api.ecr-public.{Region}.{PartitionResult#dnsSuffix}",properties:ne,headers:ne},type:Q}],type:v}],type:v},{error:"Invalid Configuration: Missing Region",type:C}]};t.ruleSet=ue},9821:(e,t,n)=>{var o=n(2590);var i=n(5242);var c=n(1568);var d=n(2959);var p=n(9316);var y=n(402);var C=n(6890);var Q=n(7212);var v=n(99);var D=n(9618);var k=n(1411);var $=n(3182);var V=n(8199);var ee=n(6463);var te=n(2356);var re=n(3917);var ne=n(977);var se=n(3303);const resolveClientEndpointParameters=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??false,useFipsEndpoint:e.useFipsEndpoint??false,defaultSigningName:"ecr-public"});const oe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};const getHttpAuthExtensionConfiguration=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider;let o=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));if(n===-1){t.push(e)}else{t.splice(n,1,e)}},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){o=e},credentials(){return o}}};const resolveHttpAuthRuntimeConfig=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});const resolveRuntimeExtensions=(e,t)=>{const n=Object.assign(ee.getAwsRegionExtensionConfiguration(e),k.getDefaultExtensionConfiguration(e),te.getHttpHandlerExtensionConfiguration(e),getHttpAuthExtensionConfiguration(e));t.forEach((e=>e.configure(n)));return Object.assign(e,ee.resolveAwsRegionExtensionConfiguration(n),k.resolveDefaultRuntimeConfig(n),te.resolveHttpHandlerRuntimeConfig(n),resolveHttpAuthRuntimeConfig(n))};class ECRPUBLICClient extends k.Client{config;constructor(...[e]){const t=V.getRuntimeConfig(e||{});super(t);this.initConfig=t;const n=resolveClientEndpointParameters(t);const k=d.resolveUserAgentConfig(n);const ee=D.resolveRetryConfig(k);const te=p.resolveRegionConfig(ee);const re=o.resolveHostHeaderConfig(te);const ne=v.resolveEndpointConfig(re);const se=$.resolveHttpAuthSchemeConfig(ne);const oe=resolveRuntimeExtensions(se,e?.extensions||[]);this.config=oe;this.middlewareStack.use(C.getSchemaSerdePlugin(this.config));this.middlewareStack.use(d.getUserAgentPlugin(this.config));this.middlewareStack.use(D.getRetryPlugin(this.config));this.middlewareStack.use(Q.getContentLengthPlugin(this.config));this.middlewareStack.use(o.getHostHeaderPlugin(this.config));this.middlewareStack.use(i.getLoggerPlugin(this.config));this.middlewareStack.use(c.getRecursionDetectionPlugin(this.config));this.middlewareStack.use(y.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:$.defaultECRPUBLICHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new y.DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})}));this.middlewareStack.use(y.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class BatchCheckLayerAvailabilityCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","BatchCheckLayerAvailability",{}).n("ECRPUBLICClient","BatchCheckLayerAvailabilityCommand").sc(re.BatchCheckLayerAvailability$).build()){}class BatchDeleteImageCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","BatchDeleteImage",{}).n("ECRPUBLICClient","BatchDeleteImageCommand").sc(re.BatchDeleteImage$).build()){}class CompleteLayerUploadCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","CompleteLayerUpload",{}).n("ECRPUBLICClient","CompleteLayerUploadCommand").sc(re.CompleteLayerUpload$).build()){}class CreateRepositoryCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","CreateRepository",{}).n("ECRPUBLICClient","CreateRepositoryCommand").sc(re.CreateRepository$).build()){}class DeleteRepositoryCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DeleteRepository",{}).n("ECRPUBLICClient","DeleteRepositoryCommand").sc(re.DeleteRepository$).build()){}class DeleteRepositoryPolicyCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DeleteRepositoryPolicy",{}).n("ECRPUBLICClient","DeleteRepositoryPolicyCommand").sc(re.DeleteRepositoryPolicy$).build()){}class DescribeImagesCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DescribeImages",{}).n("ECRPUBLICClient","DescribeImagesCommand").sc(re.DescribeImages$).build()){}class DescribeImageTagsCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DescribeImageTags",{}).n("ECRPUBLICClient","DescribeImageTagsCommand").sc(re.DescribeImageTags$).build()){}class DescribeRegistriesCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DescribeRegistries",{}).n("ECRPUBLICClient","DescribeRegistriesCommand").sc(re.DescribeRegistries$).build()){}class DescribeRepositoriesCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DescribeRepositories",{}).n("ECRPUBLICClient","DescribeRepositoriesCommand").sc(re.DescribeRepositories$).build()){}class GetAuthorizationTokenCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","GetAuthorizationToken",{}).n("ECRPUBLICClient","GetAuthorizationTokenCommand").sc(re.GetAuthorizationToken$).build()){}class GetRegistryCatalogDataCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","GetRegistryCatalogData",{}).n("ECRPUBLICClient","GetRegistryCatalogDataCommand").sc(re.GetRegistryCatalogData$).build()){}class GetRepositoryCatalogDataCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","GetRepositoryCatalogData",{}).n("ECRPUBLICClient","GetRepositoryCatalogDataCommand").sc(re.GetRepositoryCatalogData$).build()){}class GetRepositoryPolicyCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","GetRepositoryPolicy",{}).n("ECRPUBLICClient","GetRepositoryPolicyCommand").sc(re.GetRepositoryPolicy$).build()){}class InitiateLayerUploadCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","InitiateLayerUpload",{}).n("ECRPUBLICClient","InitiateLayerUploadCommand").sc(re.InitiateLayerUpload$).build()){}class ListTagsForResourceCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","ListTagsForResource",{}).n("ECRPUBLICClient","ListTagsForResourceCommand").sc(re.ListTagsForResource$).build()){}class PutImageCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","PutImage",{}).n("ECRPUBLICClient","PutImageCommand").sc(re.PutImage$).build()){}class PutRegistryCatalogDataCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","PutRegistryCatalogData",{}).n("ECRPUBLICClient","PutRegistryCatalogDataCommand").sc(re.PutRegistryCatalogData$).build()){}class PutRepositoryCatalogDataCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","PutRepositoryCatalogData",{}).n("ECRPUBLICClient","PutRepositoryCatalogDataCommand").sc(re.PutRepositoryCatalogData$).build()){}class SetRepositoryPolicyCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","SetRepositoryPolicy",{}).n("ECRPUBLICClient","SetRepositoryPolicyCommand").sc(re.SetRepositoryPolicy$).build()){}class TagResourceCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","TagResource",{}).n("ECRPUBLICClient","TagResourceCommand").sc(re.TagResource$).build()){}class UntagResourceCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","UntagResource",{}).n("ECRPUBLICClient","UntagResourceCommand").sc(re.UntagResource$).build()){}class UploadLayerPartCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","UploadLayerPart",{}).n("ECRPUBLICClient","UploadLayerPartCommand").sc(re.UploadLayerPart$).build()){}const ie=y.createPaginator(ECRPUBLICClient,DescribeImagesCommand,"nextToken","nextToken","maxResults");const ae=y.createPaginator(ECRPUBLICClient,DescribeImageTagsCommand,"nextToken","nextToken","maxResults");const ce=y.createPaginator(ECRPUBLICClient,DescribeRegistriesCommand,"nextToken","nextToken","maxResults");const le=y.createPaginator(ECRPUBLICClient,DescribeRepositoriesCommand,"nextToken","nextToken","maxResults");const ue={BatchCheckLayerAvailabilityCommand:BatchCheckLayerAvailabilityCommand,BatchDeleteImageCommand:BatchDeleteImageCommand,CompleteLayerUploadCommand:CompleteLayerUploadCommand,CreateRepositoryCommand:CreateRepositoryCommand,DeleteRepositoryCommand:DeleteRepositoryCommand,DeleteRepositoryPolicyCommand:DeleteRepositoryPolicyCommand,DescribeImagesCommand:DescribeImagesCommand,DescribeImageTagsCommand:DescribeImageTagsCommand,DescribeRegistriesCommand:DescribeRegistriesCommand,DescribeRepositoriesCommand:DescribeRepositoriesCommand,GetAuthorizationTokenCommand:GetAuthorizationTokenCommand,GetRegistryCatalogDataCommand:GetRegistryCatalogDataCommand,GetRepositoryCatalogDataCommand:GetRepositoryCatalogDataCommand,GetRepositoryPolicyCommand:GetRepositoryPolicyCommand,InitiateLayerUploadCommand:InitiateLayerUploadCommand,ListTagsForResourceCommand:ListTagsForResourceCommand,PutImageCommand:PutImageCommand,PutRegistryCatalogDataCommand:PutRegistryCatalogDataCommand,PutRepositoryCatalogDataCommand:PutRepositoryCatalogDataCommand,SetRepositoryPolicyCommand:SetRepositoryPolicyCommand,TagResourceCommand:TagResourceCommand,UntagResourceCommand:UntagResourceCommand,UploadLayerPartCommand:UploadLayerPartCommand};const de={paginateDescribeImages:ie,paginateDescribeImageTags:ae,paginateDescribeRegistries:ce,paginateDescribeRepositories:le};class ECRPUBLIC extends ECRPUBLICClient{}k.createAggregatedClient(ue,ECRPUBLIC,{paginators:de});const pe={InvalidLayerDigest:"InvalidLayerDigest",MissingLayerDigest:"MissingLayerDigest"};const Ae={AVAILABLE:"AVAILABLE",UNAVAILABLE:"UNAVAILABLE"};const me={ImageNotFound:"ImageNotFound",ImageReferencedByManifestList:"ImageReferencedByManifestList",ImageTagDoesNotMatchDigest:"ImageTagDoesNotMatchDigest",InvalidImageDigest:"InvalidImageDigest",InvalidImageTag:"InvalidImageTag",KmsError:"KmsError",MissingDigestAndTag:"MissingDigestAndTag"};const ge={ACTIVE:"ACTIVE",PENDING:"PENDING",REJECTED:"REJECTED"};t.$Command=k.Command;t.__Client=k.Client;t.ECRPUBLICServiceException=se.ECRPUBLICServiceException;t.BatchCheckLayerAvailabilityCommand=BatchCheckLayerAvailabilityCommand;t.BatchDeleteImageCommand=BatchDeleteImageCommand;t.CompleteLayerUploadCommand=CompleteLayerUploadCommand;t.CreateRepositoryCommand=CreateRepositoryCommand;t.DeleteRepositoryCommand=DeleteRepositoryCommand;t.DeleteRepositoryPolicyCommand=DeleteRepositoryPolicyCommand;t.DescribeImageTagsCommand=DescribeImageTagsCommand;t.DescribeImagesCommand=DescribeImagesCommand;t.DescribeRegistriesCommand=DescribeRegistriesCommand;t.DescribeRepositoriesCommand=DescribeRepositoriesCommand;t.ECRPUBLIC=ECRPUBLIC;t.ECRPUBLICClient=ECRPUBLICClient;t.GetAuthorizationTokenCommand=GetAuthorizationTokenCommand;t.GetRegistryCatalogDataCommand=GetRegistryCatalogDataCommand;t.GetRepositoryCatalogDataCommand=GetRepositoryCatalogDataCommand;t.GetRepositoryPolicyCommand=GetRepositoryPolicyCommand;t.ImageFailureCode=me;t.InitiateLayerUploadCommand=InitiateLayerUploadCommand;t.LayerAvailability=Ae;t.LayerFailureCode=pe;t.ListTagsForResourceCommand=ListTagsForResourceCommand;t.PutImageCommand=PutImageCommand;t.PutRegistryCatalogDataCommand=PutRegistryCatalogDataCommand;t.PutRepositoryCatalogDataCommand=PutRepositoryCatalogDataCommand;t.RegistryAliasStatus=ge;t.SetRepositoryPolicyCommand=SetRepositoryPolicyCommand;t.TagResourceCommand=TagResourceCommand;t.UntagResourceCommand=UntagResourceCommand;t.UploadLayerPartCommand=UploadLayerPartCommand;t.paginateDescribeImageTags=ae;t.paginateDescribeImages=ie;t.paginateDescribeRegistries=ce;t.paginateDescribeRepositories=le;Object.prototype.hasOwnProperty.call(re,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:re["__proto__"]});Object.keys(re).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=re[e]}));Object.prototype.hasOwnProperty.call(ne,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:ne["__proto__"]});Object.keys(ne).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=ne[e]}))},3303:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ECRPUBLICServiceException=t.__ServiceException=void 0;const o=n(1411);Object.defineProperty(t,"__ServiceException",{enumerable:true,get:function(){return o.ServiceException}});class ECRPUBLICServiceException extends o.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,ECRPUBLICServiceException.prototype)}}t.ECRPUBLICServiceException=ECRPUBLICServiceException},977:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReferencedImagesNotFoundException=t.LayersNotFoundException=t.InvalidLayerPartException=t.ImageTagAlreadyExistsException=t.ImageDigestDoesNotMatchException=t.ImageAlreadyExistsException=t.RepositoryCatalogDataNotFoundException=t.ImageNotFoundException=t.RepositoryPolicyNotFoundException=t.RepositoryNotEmptyException=t.TooManyTagsException=t.RepositoryAlreadyExistsException=t.LimitExceededException=t.InvalidTagParameterException=t.UploadNotFoundException=t.LayerPartTooSmallException=t.LayerAlreadyExistsException=t.InvalidLayerException=t.EmptyUploadException=t.UnsupportedCommandException=t.ServerException=t.RepositoryNotFoundException=t.RegistryNotFoundException=t.InvalidParameterException=void 0;const o=n(3303);class InvalidParameterException extends o.ECRPUBLICServiceException{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidParameterException.prototype)}}t.InvalidParameterException=InvalidParameterException;class RegistryNotFoundException extends o.ECRPUBLICServiceException{name="RegistryNotFoundException";$fault="client";constructor(e){super({name:"RegistryNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RegistryNotFoundException.prototype)}}t.RegistryNotFoundException=RegistryNotFoundException;class RepositoryNotFoundException extends o.ECRPUBLICServiceException{name="RepositoryNotFoundException";$fault="client";constructor(e){super({name:"RepositoryNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryNotFoundException.prototype)}}t.RepositoryNotFoundException=RepositoryNotFoundException;class ServerException extends o.ECRPUBLICServiceException{name="ServerException";$fault="server";constructor(e){super({name:"ServerException",$fault:"server",...e});Object.setPrototypeOf(this,ServerException.prototype)}}t.ServerException=ServerException;class UnsupportedCommandException extends o.ECRPUBLICServiceException{name="UnsupportedCommandException";$fault="client";constructor(e){super({name:"UnsupportedCommandException",$fault:"client",...e});Object.setPrototypeOf(this,UnsupportedCommandException.prototype)}}t.UnsupportedCommandException=UnsupportedCommandException;class EmptyUploadException extends o.ECRPUBLICServiceException{name="EmptyUploadException";$fault="client";constructor(e){super({name:"EmptyUploadException",$fault:"client",...e});Object.setPrototypeOf(this,EmptyUploadException.prototype)}}t.EmptyUploadException=EmptyUploadException;class InvalidLayerException extends o.ECRPUBLICServiceException{name="InvalidLayerException";$fault="client";constructor(e){super({name:"InvalidLayerException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidLayerException.prototype)}}t.InvalidLayerException=InvalidLayerException;class LayerAlreadyExistsException extends o.ECRPUBLICServiceException{name="LayerAlreadyExistsException";$fault="client";constructor(e){super({name:"LayerAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,LayerAlreadyExistsException.prototype)}}t.LayerAlreadyExistsException=LayerAlreadyExistsException;class LayerPartTooSmallException extends o.ECRPUBLICServiceException{name="LayerPartTooSmallException";$fault="client";constructor(e){super({name:"LayerPartTooSmallException",$fault:"client",...e});Object.setPrototypeOf(this,LayerPartTooSmallException.prototype)}}t.LayerPartTooSmallException=LayerPartTooSmallException;class UploadNotFoundException extends o.ECRPUBLICServiceException{name="UploadNotFoundException";$fault="client";constructor(e){super({name:"UploadNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,UploadNotFoundException.prototype)}}t.UploadNotFoundException=UploadNotFoundException;class InvalidTagParameterException extends o.ECRPUBLICServiceException{name="InvalidTagParameterException";$fault="client";constructor(e){super({name:"InvalidTagParameterException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidTagParameterException.prototype)}}t.InvalidTagParameterException=InvalidTagParameterException;class LimitExceededException extends o.ECRPUBLICServiceException{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e});Object.setPrototypeOf(this,LimitExceededException.prototype)}}t.LimitExceededException=LimitExceededException;class RepositoryAlreadyExistsException extends o.ECRPUBLICServiceException{name="RepositoryAlreadyExistsException";$fault="client";constructor(e){super({name:"RepositoryAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryAlreadyExistsException.prototype)}}t.RepositoryAlreadyExistsException=RepositoryAlreadyExistsException;class TooManyTagsException extends o.ECRPUBLICServiceException{name="TooManyTagsException";$fault="client";constructor(e){super({name:"TooManyTagsException",$fault:"client",...e});Object.setPrototypeOf(this,TooManyTagsException.prototype)}}t.TooManyTagsException=TooManyTagsException;class RepositoryNotEmptyException extends o.ECRPUBLICServiceException{name="RepositoryNotEmptyException";$fault="client";constructor(e){super({name:"RepositoryNotEmptyException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryNotEmptyException.prototype)}}t.RepositoryNotEmptyException=RepositoryNotEmptyException;class RepositoryPolicyNotFoundException extends o.ECRPUBLICServiceException{name="RepositoryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RepositoryPolicyNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryPolicyNotFoundException.prototype)}}t.RepositoryPolicyNotFoundException=RepositoryPolicyNotFoundException;class ImageNotFoundException extends o.ECRPUBLICServiceException{name="ImageNotFoundException";$fault="client";constructor(e){super({name:"ImageNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ImageNotFoundException.prototype)}}t.ImageNotFoundException=ImageNotFoundException;class RepositoryCatalogDataNotFoundException extends o.ECRPUBLICServiceException{name="RepositoryCatalogDataNotFoundException";$fault="client";constructor(e){super({name:"RepositoryCatalogDataNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryCatalogDataNotFoundException.prototype)}}t.RepositoryCatalogDataNotFoundException=RepositoryCatalogDataNotFoundException;class ImageAlreadyExistsException extends o.ECRPUBLICServiceException{name="ImageAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,ImageAlreadyExistsException.prototype)}}t.ImageAlreadyExistsException=ImageAlreadyExistsException;class ImageDigestDoesNotMatchException extends o.ECRPUBLICServiceException{name="ImageDigestDoesNotMatchException";$fault="client";constructor(e){super({name:"ImageDigestDoesNotMatchException",$fault:"client",...e});Object.setPrototypeOf(this,ImageDigestDoesNotMatchException.prototype)}}t.ImageDigestDoesNotMatchException=ImageDigestDoesNotMatchException;class ImageTagAlreadyExistsException extends o.ECRPUBLICServiceException{name="ImageTagAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageTagAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,ImageTagAlreadyExistsException.prototype)}}t.ImageTagAlreadyExistsException=ImageTagAlreadyExistsException;class InvalidLayerPartException extends o.ECRPUBLICServiceException{name="InvalidLayerPartException";$fault="client";registryId;repositoryName;uploadId;lastValidByteReceived;constructor(e){super({name:"InvalidLayerPartException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidLayerPartException.prototype);this.registryId=e.registryId;this.repositoryName=e.repositoryName;this.uploadId=e.uploadId;this.lastValidByteReceived=e.lastValidByteReceived}}t.InvalidLayerPartException=InvalidLayerPartException;class LayersNotFoundException extends o.ECRPUBLICServiceException{name="LayersNotFoundException";$fault="client";constructor(e){super({name:"LayersNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,LayersNotFoundException.prototype)}}t.LayersNotFoundException=LayersNotFoundException;class ReferencedImagesNotFoundException extends o.ECRPUBLICServiceException{name="ReferencedImagesNotFoundException";$fault="client";constructor(e){super({name:"ReferencedImagesNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ReferencedImagesNotFoundException.prototype)}}t.ReferencedImagesNotFoundException=ReferencedImagesNotFoundException},8199:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getRuntimeConfig=void 0;const o=n(1860);const i=o.__importDefault(n(7643));const c=n(8704);const d=n(5861);const p=n(1656);const y=n(9316);const C=n(2711);const Q=n(9618);const v=n(5704);const D=n(1279);const k=n(1411);const $=n(3638);const V=n(673);const ee=n(5518);const te=n(2180);const getRuntimeConfig=e=>{(0,k.emitWarningIfUnsupportedVersion)(process.version);const t=(0,V.resolveDefaultsModeConfig)(e);const defaultConfigProvider=()=>t().then(k.loadConfigsForDefaultMode);const n=(0,te.getRuntimeConfig)(e);(0,c.emitWarningIfUnsupportedVersion)(process.version);const o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,v.loadConfig)(c.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,o),bodyLengthChecker:e?.bodyLengthChecker??$.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??d.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,p.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:i.default.version}),maxAttempts:e?.maxAttempts??(0,v.loadConfig)(Q.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,v.loadConfig)(y.NODE_REGION_CONFIG_OPTIONS,{...y.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:D.NodeHttpHandler.create(e?.requestHandler??defaultConfigProvider),retryMode:e?.retryMode??(0,v.loadConfig)({...Q.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await defaultConfigProvider()).retryMode||ee.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??C.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??D.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,v.loadConfig)(y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,v.loadConfig)(y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,v.loadConfig)(p.NODE_APP_ID_CONFIG_OPTIONS,o)}};t.getRuntimeConfig=getRuntimeConfig},2180:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getRuntimeConfig=void 0;const o=n(8704);const i=n(7288);const c=n(1411);const d=n(4494);const p=n(8385);const y=n(1577);const C=n(3182);const Q=n(6072);const v=n(3917);const getRuntimeConfig=e=>({apiVersion:"2020-10-30",base64Decoder:e?.base64Decoder??p.fromBase64,base64Encoder:e?.base64Encoder??p.toBase64,disableHostPrefix:e?.disableHostPrefix??false,endpointProvider:e?.endpointProvider??Q.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??C.defaultECRPUBLICHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new o.AwsSdkSigV4Signer}],logger:e?.logger??new c.NoOpLogger,protocol:e?.protocol??i.AwsJson1_1Protocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ecrpublic",errorTypeRegistries:v.errorTypeRegistries,xmlNamespace:"http://ecr-public.amazonaws.com/doc/2020-12-02/",version:"2020-10-30",serviceTarget:"SpencerFrontendService"},serviceId:e?.serviceId??"ECR PUBLIC",urlParser:e?.urlParser??d.parseUrl,utf8Decoder:e?.utf8Decoder??y.fromUtf8,utf8Encoder:e?.utf8Encoder??y.toUtf8});t.getRuntimeConfig=getRuntimeConfig},3917:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.GetRegistryCatalogDataRequest$=t.GetAuthorizationTokenResponse$=t.GetAuthorizationTokenRequest$=t.DescribeRepositoriesResponse$=t.DescribeRepositoriesRequest$=t.DescribeRegistriesResponse$=t.DescribeRegistriesRequest$=t.DescribeImageTagsResponse$=t.DescribeImageTagsRequest$=t.DescribeImagesResponse$=t.DescribeImagesRequest$=t.DeleteRepositoryResponse$=t.DeleteRepositoryRequest$=t.DeleteRepositoryPolicyResponse$=t.DeleteRepositoryPolicyRequest$=t.CreateRepositoryResponse$=t.CreateRepositoryRequest$=t.CompleteLayerUploadResponse$=t.CompleteLayerUploadRequest$=t.BatchDeleteImageResponse$=t.BatchDeleteImageRequest$=t.BatchCheckLayerAvailabilityResponse$=t.BatchCheckLayerAvailabilityRequest$=t.AuthorizationData$=t.errorTypeRegistries=t.UploadNotFoundException$=t.UnsupportedCommandException$=t.TooManyTagsException$=t.ServerException$=t.RepositoryPolicyNotFoundException$=t.RepositoryNotFoundException$=t.RepositoryNotEmptyException$=t.RepositoryCatalogDataNotFoundException$=t.RepositoryAlreadyExistsException$=t.RegistryNotFoundException$=t.ReferencedImagesNotFoundException$=t.LimitExceededException$=t.LayersNotFoundException$=t.LayerPartTooSmallException$=t.LayerAlreadyExistsException$=t.InvalidTagParameterException$=t.InvalidParameterException$=t.InvalidLayerPartException$=t.InvalidLayerException$=t.ImageTagAlreadyExistsException$=t.ImageNotFoundException$=t.ImageDigestDoesNotMatchException$=t.ImageAlreadyExistsException$=t.EmptyUploadException$=t.ECRPUBLICServiceException$=void 0;t.GetRegistryCatalogData$=t.GetAuthorizationToken$=t.DescribeRepositories$=t.DescribeRegistries$=t.DescribeImageTags$=t.DescribeImages$=t.DeleteRepositoryPolicy$=t.DeleteRepository$=t.CreateRepository$=t.CompleteLayerUpload$=t.BatchDeleteImage$=t.BatchCheckLayerAvailability$=t.UploadLayerPartResponse$=t.UploadLayerPartRequest$=t.UntagResourceResponse$=t.UntagResourceRequest$=t.TagResourceResponse$=t.TagResourceRequest$=t.Tag$=t.SetRepositoryPolicyResponse$=t.SetRepositoryPolicyRequest$=t.RepositoryCatalogDataInput$=t.RepositoryCatalogData$=t.Repository$=t.RegistryCatalogData$=t.RegistryAlias$=t.Registry$=t.ReferencedImageDetail$=t.PutRepositoryCatalogDataResponse$=t.PutRepositoryCatalogDataRequest$=t.PutRegistryCatalogDataResponse$=t.PutRegistryCatalogDataRequest$=t.PutImageResponse$=t.PutImageRequest$=t.ListTagsForResourceResponse$=t.ListTagsForResourceRequest$=t.LayerFailure$=t.Layer$=t.InitiateLayerUploadResponse$=t.InitiateLayerUploadRequest$=t.ImageTagDetail$=t.ImageIdentifier$=t.ImageFailure$=t.ImageDetail$=t.Image$=t.GetRepositoryPolicyResponse$=t.GetRepositoryPolicyRequest$=t.GetRepositoryCatalogDataResponse$=t.GetRepositoryCatalogDataRequest$=t.GetRegistryCatalogDataResponse$=void 0;t.UploadLayerPart$=t.UntagResource$=t.TagResource$=t.SetRepositoryPolicy$=t.PutRepositoryCatalogData$=t.PutRegistryCatalogData$=t.PutImage$=t.ListTagsForResource$=t.InitiateLayerUpload$=t.GetRepositoryPolicy$=t.GetRepositoryCatalogData$=void 0;const o="AuthorizationData";const i="BatchCheckLayerAvailability";const c="BatchCheckLayerAvailabilityRequest";const d="BatchCheckLayerAvailabilityResponse";const p="BatchDeleteImage";const y="BatchDeleteImageRequest";const C="BatchDeleteImageResponse";const Q="CompleteLayerUpload";const v="CompleteLayerUploadRequest";const D="CompleteLayerUploadResponse";const k="CreateRepository";const $="CreateRepositoryRequest";const V="CreateRepositoryResponse";const ee="DescribeImages";const te="DescribeImagesRequest";const re="DescribeImagesResponse";const ne="DescribeImageTags";const se="DescribeImageTagsRequest";const oe="DescribeImageTagsResponse";const ie="DeleteRepository";const ae="DeleteRepositoryPolicy";const ce="DeleteRepositoryPolicyRequest";const le="DeleteRepositoryPolicyResponse";const ue="DeleteRepositoryRequest";const de="DeleteRepositoryResponse";const pe="DescribeRegistriesRequest";const Ae="DescribeRegistriesResponse";const me="DescribeRepositoriesRequest";const ge="DescribeRepositoriesResponse";const fe="DescribeRegistries";const he="DescribeRepositories";const ye="EmptyUploadException";const Ee="GetAuthorizationToken";const Ce="GetAuthorizationTokenRequest";const Ie="GetAuthorizationTokenResponse";const be="GetRegistryCatalogData";const Se="GetRegistryCatalogDataRequest";const Be="GetRegistryCatalogDataResponse";const we="GetRepositoryCatalogDataRequest";const Re="GetRepositoryCatalogDataResponse";const Ne="GetRepositoryCatalogData";const Qe="GetRepositoryPolicy";const xe="GetRepositoryPolicyRequest";const Te="GetRepositoryPolicyResponse";const ve="Image";const Pe="ImageAlreadyExistsException";const De="ImageDetail";const ke="ImageDigestDoesNotMatchException";const _e="ImageDetailList";const Le="ImageFailure";const Oe="ImageFailureList";const Fe="ImageIdentifier";const Ue="ImageIdentifierList";const Me="InvalidLayerException";const He="InvalidLayerPartException";const $e="InitiateLayerUpload";const Ge="InitiateLayerUploadRequest";const qe="InitiateLayerUploadResponse";const ze="ImageNotFoundException";const Ve="InvalidParameterException";const je="ImageTagAlreadyExistsException";const Ye="ImageTagDetail";const Je="ImageTagDetailList";const We="InvalidTagParameterException";const Ke="Key";const Xe="Layer";const Ze="LayerAlreadyExistsException";const At="LimitExceededException";const mt="LayerFailure";const ht="LayerFailureList";const yt="LayerList";const Et="LayersNotFoundException";const Ct="LayerPartTooSmallException";const It="ListTagsForResource";const bt="ListTagsForResourceRequest";const St="ListTagsForResourceResponse";const Bt="PutImage";const wt="PutImageRequest";const Rt="PutImageResponse";const Nt="PutRegistryCatalogData";const Qt="PutRegistryCatalogDataRequest";const xt="PutRegistryCatalogDataResponse";const Tt="PutRepositoryCatalogDataRequest";const vt="PutRepositoryCatalogDataResponse";const Pt="PutRepositoryCatalogData";const Dt="Registry";const kt="RegistryAlias";const _t="RepositoryAlreadyExistsException";const Lt="RegistryAliasList";const Ot="RegistryCatalogData";const Ft="RepositoryCatalogDataInput";const Ut="RepositoryCatalogDataNotFoundException";const Mt="RepositoryCatalogData";const Ht="ReferencedImageDetail";const $t="ReferencedImagesNotFoundException";const Gt="RegistryList";const qt="RepositoryList";const zt="RepositoryNotEmptyException";const Vt="RegistryNotFoundException";const jt="RepositoryNotFoundException";const Yt="RepositoryPolicyNotFoundException";const Jt="Repository";const Wt="ServerException";const Kt="SetRepositoryPolicy";const Xt="SetRepositoryPolicyRequest";const Zt="SetRepositoryPolicyResponse";const er="Tag";const tr="TagList";const rr="TooManyTagsException";const nr="TagResource";const sr="TagResourceRequest";const or="TagResourceResponse";const ir="UnsupportedCommandException";const ar="UploadLayerPart";const cr="UploadLayerPartRequest";const lr="UploadLayerPartResponse";const ur="UploadNotFoundException";const dr="UntagResource";const pr="UntagResourceRequest";const Ar="UntagResourceResponse";const mr="Value";const gr="aliases";const fr="authorizationData";const hr="artifactMediaType";const yr="authorizationToken";const Er="aboutText";const Cr="architectures";const Ir="client";const br="createdAt";const Sr="catalogData";const Br="description";const wr="displayName";const Rr="defaultRegistryAlias";const Nr="error";const Qr="expiresAt";const xr="failures";const Tr="failureCode";const vr="failureReason";const Pr="force";const Dr="image";const kr="imageDetails";const _r="imageDigest";const Lr="imageDetail";const Or="imageIds";const Fr="imageId";const Ur="imageManifest";const Mr="imageManifestMediaType";const Hr="imagePushedAt";const $r="imageSizeInBytes";const Gr="imageTags";const qr="imageTagDetails";const zr="imageTag";const Vr="layers";const jr="layerAvailability";const Yr="lastByteReceived";const Jr="layerDigests";const Wr="layerDigest";const Kr="logoImageBlob";const Xr="layerPartBlob";const Zr="layerSize";const en="logoUrl";const tn="lastValidByteReceived";const rn="message";const nn="marketplaceCertified";const sn="maxResults";const on="mediaType";const an="name";const cn="nextToken";const ln="operatingSystems";const un="partFirstByte";const dn="partLastByte";const pn="primaryRegistryAlias";const An="partSize";const mn="policyText";const gn="repository";const hn="resourceArn";const yn="registryArn";const En="repositoryArn";const Cn="registryCatalogData";const In="registryId";const bn="repositoryName";const Sn="repositoryNames";const Bn="registryUri";const wn="repositoryUri";const Rn="registries";const Nn="repositories";const Qn="smithy.ts.sdk.synthetic.com.amazonaws.ecrpublic";const xn="server";const Tn="status";const vn="tags";const Pn="tagKeys";const Dn="uploadId";const kn="usageText";const _n="verified";const Ln="com.amazonaws.ecrpublic";const On=n(6890);const Fn=n(3303);const Un=n(977);const Mn=On.TypeRegistry.for(Qn);t.ECRPUBLICServiceException$=[-3,Qn,"ECRPUBLICServiceException",0,[],[]];Mn.registerError(t.ECRPUBLICServiceException$,Fn.ECRPUBLICServiceException);const Hn=On.TypeRegistry.for(Ln);t.EmptyUploadException$=[-3,Ln,ye,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.EmptyUploadException$,Un.EmptyUploadException);t.ImageAlreadyExistsException$=[-3,Ln,Pe,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.ImageAlreadyExistsException$,Un.ImageAlreadyExistsException);t.ImageDigestDoesNotMatchException$=[-3,Ln,ke,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.ImageDigestDoesNotMatchException$,Un.ImageDigestDoesNotMatchException);t.ImageNotFoundException$=[-3,Ln,ze,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.ImageNotFoundException$,Un.ImageNotFoundException);t.ImageTagAlreadyExistsException$=[-3,Ln,je,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.ImageTagAlreadyExistsException$,Un.ImageTagAlreadyExistsException);t.InvalidLayerException$=[-3,Ln,Me,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.InvalidLayerException$,Un.InvalidLayerException);t.InvalidLayerPartException$=[-3,Ln,He,{[Nr]:Ir},[In,bn,Dn,tn,rn],[0,0,0,1,0]];Hn.registerError(t.InvalidLayerPartException$,Un.InvalidLayerPartException);t.InvalidParameterException$=[-3,Ln,Ve,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.InvalidParameterException$,Un.InvalidParameterException);t.InvalidTagParameterException$=[-3,Ln,We,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.InvalidTagParameterException$,Un.InvalidTagParameterException);t.LayerAlreadyExistsException$=[-3,Ln,Ze,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.LayerAlreadyExistsException$,Un.LayerAlreadyExistsException);t.LayerPartTooSmallException$=[-3,Ln,Ct,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.LayerPartTooSmallException$,Un.LayerPartTooSmallException);t.LayersNotFoundException$=[-3,Ln,Et,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.LayersNotFoundException$,Un.LayersNotFoundException);t.LimitExceededException$=[-3,Ln,At,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.LimitExceededException$,Un.LimitExceededException);t.ReferencedImagesNotFoundException$=[-3,Ln,$t,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.ReferencedImagesNotFoundException$,Un.ReferencedImagesNotFoundException);t.RegistryNotFoundException$=[-3,Ln,Vt,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RegistryNotFoundException$,Un.RegistryNotFoundException);t.RepositoryAlreadyExistsException$=[-3,Ln,_t,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RepositoryAlreadyExistsException$,Un.RepositoryAlreadyExistsException);t.RepositoryCatalogDataNotFoundException$=[-3,Ln,Ut,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RepositoryCatalogDataNotFoundException$,Un.RepositoryCatalogDataNotFoundException);t.RepositoryNotEmptyException$=[-3,Ln,zt,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RepositoryNotEmptyException$,Un.RepositoryNotEmptyException);t.RepositoryNotFoundException$=[-3,Ln,jt,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RepositoryNotFoundException$,Un.RepositoryNotFoundException);t.RepositoryPolicyNotFoundException$=[-3,Ln,Yt,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RepositoryPolicyNotFoundException$,Un.RepositoryPolicyNotFoundException);t.ServerException$=[-3,Ln,Wt,{[Nr]:xn},[rn],[0]];Hn.registerError(t.ServerException$,Un.ServerException);t.TooManyTagsException$=[-3,Ln,rr,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.TooManyTagsException$,Un.TooManyTagsException);t.UnsupportedCommandException$=[-3,Ln,ir,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.UnsupportedCommandException$,Un.UnsupportedCommandException);t.UploadNotFoundException$=[-3,Ln,ur,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.UploadNotFoundException$,Un.UploadNotFoundException);t.errorTypeRegistries=[Mn,Hn];t.AuthorizationData$=[3,Ln,o,0,[yr,Qr],[0,4]];t.BatchCheckLayerAvailabilityRequest$=[3,Ln,c,0,[bn,Jr,In],[0,64|0,0],2];t.BatchCheckLayerAvailabilityResponse$=[3,Ln,d,0,[Vr,xr],[()=>Kn,()=>Wn]];t.BatchDeleteImageRequest$=[3,Ln,y,0,[bn,Or,In],[0,()=>Vn,0],2];t.BatchDeleteImageResponse$=[3,Ln,C,0,[Or,xr],[()=>Vn,()=>zn]];t.CompleteLayerUploadRequest$=[3,Ln,v,0,[bn,Dn,Jr,In],[0,0,64|0,0],3];t.CompleteLayerUploadResponse$=[3,Ln,D,0,[In,bn,Dn,Wr],[0,0,0,0]];t.CreateRepositoryRequest$=[3,Ln,$,0,[bn,Sr,vn],[0,()=>t.RepositoryCatalogDataInput$,()=>ss],1];t.CreateRepositoryResponse$=[3,Ln,V,0,[gn,Sr],[()=>t.Repository$,()=>t.RepositoryCatalogData$]];t.DeleteRepositoryPolicyRequest$=[3,Ln,ce,0,[bn,In],[0,0],1];t.DeleteRepositoryPolicyResponse$=[3,Ln,le,0,[In,bn,mn],[0,0,0]];t.DeleteRepositoryRequest$=[3,Ln,ue,0,[bn,In,Pr],[0,0,2],1];t.DeleteRepositoryResponse$=[3,Ln,de,0,[gn],[()=>t.Repository$]];t.DescribeImagesRequest$=[3,Ln,te,0,[bn,In,Or,cn,sn],[0,0,()=>Vn,0,1],1];t.DescribeImagesResponse$=[3,Ln,re,0,[kr,cn],[()=>qn,0]];t.DescribeImageTagsRequest$=[3,Ln,se,0,[bn,In,cn,sn],[0,0,0,1],1];t.DescribeImageTagsResponse$=[3,Ln,oe,0,[qr,cn],[()=>jn,0]];t.DescribeRegistriesRequest$=[3,Ln,pe,0,[cn,sn],[0,1]];t.DescribeRegistriesResponse$=[3,Ln,Ae,0,[Rn,cn],[()=>es,0],1];t.DescribeRepositoriesRequest$=[3,Ln,me,0,[In,Sn,cn,sn],[0,64|0,0,1]];t.DescribeRepositoriesResponse$=[3,Ln,ge,0,[Nn,cn],[()=>ts,0]];t.GetAuthorizationTokenRequest$=[3,Ln,Ce,0,[],[]];t.GetAuthorizationTokenResponse$=[3,Ln,Ie,0,[fr],[()=>t.AuthorizationData$]];t.GetRegistryCatalogDataRequest$=[3,Ln,Se,0,[],[]];t.GetRegistryCatalogDataResponse$=[3,Ln,Be,0,[Cn],[()=>t.RegistryCatalogData$],1];t.GetRepositoryCatalogDataRequest$=[3,Ln,we,0,[bn,In],[0,0],1];t.GetRepositoryCatalogDataResponse$=[3,Ln,Re,0,[Sr],[()=>t.RepositoryCatalogData$]];t.GetRepositoryPolicyRequest$=[3,Ln,xe,0,[bn,In],[0,0],1];t.GetRepositoryPolicyResponse$=[3,Ln,Te,0,[In,bn,mn],[0,0,0]];t.Image$=[3,Ln,ve,0,[In,bn,Fr,Ur,Mr],[0,0,()=>t.ImageIdentifier$,0,0]];t.ImageDetail$=[3,Ln,De,0,[In,bn,_r,Gr,$r,Hr,Mr,hr],[0,0,0,64|0,1,4,0,0]];t.ImageFailure$=[3,Ln,Le,0,[Fr,Tr,vr],[()=>t.ImageIdentifier$,0,0]];t.ImageIdentifier$=[3,Ln,Fe,0,[_r,zr],[0,0]];t.ImageTagDetail$=[3,Ln,Ye,0,[zr,br,Lr],[0,4,()=>t.ReferencedImageDetail$]];t.InitiateLayerUploadRequest$=[3,Ln,Ge,0,[bn,In],[0,0],1];t.InitiateLayerUploadResponse$=[3,Ln,qe,0,[Dn,An],[0,1]];t.Layer$=[3,Ln,Xe,0,[Wr,jr,Zr,on],[0,0,1,0]];t.LayerFailure$=[3,Ln,mt,0,[Wr,Tr,vr],[0,0,0]];t.ListTagsForResourceRequest$=[3,Ln,bt,0,[hn],[0],1];t.ListTagsForResourceResponse$=[3,Ln,St,0,[vn],[()=>ss]];t.PutImageRequest$=[3,Ln,wt,0,[bn,Ur,In,Mr,zr,_r],[0,0,0,0,0,0],2];t.PutImageResponse$=[3,Ln,Rt,0,[Dr],[()=>t.Image$]];t.PutRegistryCatalogDataRequest$=[3,Ln,Qt,0,[wr],[0]];t.PutRegistryCatalogDataResponse$=[3,Ln,xt,0,[Cn],[()=>t.RegistryCatalogData$],1];t.PutRepositoryCatalogDataRequest$=[3,Ln,Tt,0,[bn,Sr,In],[0,()=>t.RepositoryCatalogDataInput$,0],2];t.PutRepositoryCatalogDataResponse$=[3,Ln,vt,0,[Sr],[()=>t.RepositoryCatalogData$]];t.ReferencedImageDetail$=[3,Ln,Ht,0,[_r,$r,Hr,Mr,hr],[0,1,4,0,0]];t.Registry$=[3,Ln,Dt,0,[In,yn,Bn,_n,gr],[0,0,0,2,()=>Zn],5];t.RegistryAlias$=[3,Ln,kt,0,[an,Tn,pn,Rr],[0,0,2,2],4];t.RegistryCatalogData$=[3,Ln,Ot,0,[wr],[0]];t.Repository$=[3,Ln,Jt,0,[En,In,bn,wn,br],[0,0,0,0,4]];t.RepositoryCatalogData$=[3,Ln,Mt,0,[Br,Cr,ln,en,Er,kn,nn],[0,64|0,64|0,0,0,0,2]];t.RepositoryCatalogDataInput$=[3,Ln,Ft,0,[Br,Cr,ln,Kr,Er,kn],[0,64|0,64|0,21,0,0]];t.SetRepositoryPolicyRequest$=[3,Ln,Xt,0,[bn,mn,In,Pr],[0,0,0,2],2];t.SetRepositoryPolicyResponse$=[3,Ln,Zt,0,[In,bn,mn],[0,0,0]];t.Tag$=[3,Ln,er,0,[Ke,mr],[0,0]];t.TagResourceRequest$=[3,Ln,sr,0,[hn,vn],[0,()=>ss],2];t.TagResourceResponse$=[3,Ln,or,0,[],[]];t.UntagResourceRequest$=[3,Ln,pr,0,[hn,Pn],[0,64|0],2];t.UntagResourceResponse$=[3,Ln,Ar,0,[],[]];t.UploadLayerPartRequest$=[3,Ln,cr,0,[bn,Dn,un,dn,Xr,In],[0,0,1,1,21,0],5];t.UploadLayerPartResponse$=[3,Ln,lr,0,[In,bn,Dn,Yr],[0,0,0,1]];var $n=null&&64|0;var Gn=null&&64|0;var qn=[1,Ln,_e,0,()=>t.ImageDetail$];var zn=[1,Ln,Oe,0,()=>t.ImageFailure$];var Vn=[1,Ln,Ue,0,()=>t.ImageIdentifier$];var jn=[1,Ln,Je,0,()=>t.ImageTagDetail$];var Yn=null&&64|0;var Jn=null&&64|0;var Wn=[1,Ln,ht,0,()=>t.LayerFailure$];var Kn=[1,Ln,yt,0,()=>t.Layer$];var Xn=null&&64|0;var Zn=[1,Ln,Lt,0,()=>t.RegistryAlias$];var es=[1,Ln,Gt,0,()=>t.Registry$];var ts=[1,Ln,qt,0,()=>t.Repository$];var rs=null&&64|0;var ns=null&&64|0;var ss=[1,Ln,tr,0,()=>t.Tag$];t.BatchCheckLayerAvailability$=[9,Ln,i,0,()=>t.BatchCheckLayerAvailabilityRequest$,()=>t.BatchCheckLayerAvailabilityResponse$];t.BatchDeleteImage$=[9,Ln,p,0,()=>t.BatchDeleteImageRequest$,()=>t.BatchDeleteImageResponse$];t.CompleteLayerUpload$=[9,Ln,Q,0,()=>t.CompleteLayerUploadRequest$,()=>t.CompleteLayerUploadResponse$];t.CreateRepository$=[9,Ln,k,0,()=>t.CreateRepositoryRequest$,()=>t.CreateRepositoryResponse$];t.DeleteRepository$=[9,Ln,ie,0,()=>t.DeleteRepositoryRequest$,()=>t.DeleteRepositoryResponse$];t.DeleteRepositoryPolicy$=[9,Ln,ae,0,()=>t.DeleteRepositoryPolicyRequest$,()=>t.DeleteRepositoryPolicyResponse$];t.DescribeImages$=[9,Ln,ee,0,()=>t.DescribeImagesRequest$,()=>t.DescribeImagesResponse$];t.DescribeImageTags$=[9,Ln,ne,0,()=>t.DescribeImageTagsRequest$,()=>t.DescribeImageTagsResponse$];t.DescribeRegistries$=[9,Ln,fe,0,()=>t.DescribeRegistriesRequest$,()=>t.DescribeRegistriesResponse$];t.DescribeRepositories$=[9,Ln,he,0,()=>t.DescribeRepositoriesRequest$,()=>t.DescribeRepositoriesResponse$];t.GetAuthorizationToken$=[9,Ln,Ee,0,()=>t.GetAuthorizationTokenRequest$,()=>t.GetAuthorizationTokenResponse$];t.GetRegistryCatalogData$=[9,Ln,be,0,()=>t.GetRegistryCatalogDataRequest$,()=>t.GetRegistryCatalogDataResponse$];t.GetRepositoryCatalogData$=[9,Ln,Ne,0,()=>t.GetRepositoryCatalogDataRequest$,()=>t.GetRepositoryCatalogDataResponse$];t.GetRepositoryPolicy$=[9,Ln,Qe,0,()=>t.GetRepositoryPolicyRequest$,()=>t.GetRepositoryPolicyResponse$];t.InitiateLayerUpload$=[9,Ln,$e,0,()=>t.InitiateLayerUploadRequest$,()=>t.InitiateLayerUploadResponse$];t.ListTagsForResource$=[9,Ln,It,0,()=>t.ListTagsForResourceRequest$,()=>t.ListTagsForResourceResponse$];t.PutImage$=[9,Ln,Bt,0,()=>t.PutImageRequest$,()=>t.PutImageResponse$];t.PutRegistryCatalogData$=[9,Ln,Nt,0,()=>t.PutRegistryCatalogDataRequest$,()=>t.PutRegistryCatalogDataResponse$];t.PutRepositoryCatalogData$=[9,Ln,Pt,0,()=>t.PutRepositoryCatalogDataRequest$,()=>t.PutRepositoryCatalogDataResponse$];t.SetRepositoryPolicy$=[9,Ln,Kt,0,()=>t.SetRepositoryPolicyRequest$,()=>t.SetRepositoryPolicyResponse$];t.TagResource$=[9,Ln,nr,0,()=>t.TagResourceRequest$,()=>t.TagResourceResponse$];t.UntagResource$=[9,Ln,dr,0,()=>t.UntagResourceRequest$,()=>t.UntagResourceResponse$];t.UploadLayerPart$=[9,Ln,ar,0,()=>t.UploadLayerPartRequest$,()=>t.UploadLayerPartResponse$]},3218:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.resolveHttpAuthSchemeConfig=t.defaultECRHttpAuthSchemeProvider=t.defaultECRHttpAuthSchemeParametersProvider=void 0;const o=n(8704);const i=n(6324);const defaultECRHttpAuthSchemeParametersProvider=async(e,t,n)=>({operation:(0,i.getSmithyContext)(t).operation,region:await(0,i.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});t.defaultECRHttpAuthSchemeParametersProvider=defaultECRHttpAuthSchemeParametersProvider;function createAwsAuthSigv4HttpAuthOption(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ecr",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}const defaultECRHttpAuthSchemeProvider=e=>{const t=[];switch(e.operation){default:{t.push(createAwsAuthSigv4HttpAuthOption(e))}}return t};t.defaultECRHttpAuthSchemeProvider=defaultECRHttpAuthSchemeProvider;const resolveHttpAuthSchemeConfig=e=>{const t=(0,o.resolveAwsSdkSigV4Config)(e);return Object.assign(t,{authSchemePreference:(0,i.normalizeProvider)(e.authSchemePreference??[])})};t.resolveHttpAuthSchemeConfig=resolveHttpAuthSchemeConfig},3628:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultEndpointResolver=void 0;const o=n(3068);const i=n(9674);const c=n(4193);const d=new i.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});const defaultEndpointResolver=(e,t={})=>d.get(e,(()=>(0,i.resolveEndpoint)(c.ruleSet,{endpointParams:e,logger:t.logger})));t.defaultEndpointResolver=defaultEndpointResolver;i.customEndpointFunctions.aws=o.awsEndpointFunctions},4193:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ruleSet=void 0;const n="required",o="fn",i="argv",c="ref",d="url",p="properties",y="headers";const C=true,Q="isSet",v="booleanEquals",D="error",k="endpoint",$="tree",V="PartitionResult",ee={[n]:true,default:false,type:"boolean"},te={[n]:false,type:"string"},re={[c]:"Endpoint"},ne={[o]:v,[i]:[{[c]:"UseFIPS"},true]},se={[o]:v,[i]:[{[c]:"UseDualStack"},true]},oe={},ie={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws"]},ae={[o]:v,[i]:[{[c]:"UseFIPS"},false]},ce={[o]:v,[i]:[{[c]:"UseDualStack"},false]},le={[d]:"https://api.ecr.{Region}.{PartitionResult#dnsSuffix}",[p]:{},[y]:{}},ue={[d]:"https://ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",[p]:{},[y]:{}},de={[d]:"https://api.ecr-fips.{Region}.{PartitionResult#dnsSuffix}",[p]:{},[y]:{}},pe={[d]:"https://ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[p]:{},[y]:{}},Ae={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-us-gov"]},me={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-cn"]},ge={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-iso"]},fe={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-iso-b"]},he={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-iso-e"]},ye={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-iso-f"]},Ee={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-eusc"]},Ce={[o]:"getAttr",[i]:[{[c]:V},"supportsFIPS"]},Ie={[o]:v,[i]:[true,{[o]:"getAttr",[i]:[{[c]:V},"supportsDualStack"]}]},be=[{[c]:"Region"}];const Se={version:"1.0",parameters:{UseDualStack:ee,UseFIPS:ee,Endpoint:te,Region:te},rules:[{conditions:[{[o]:Q,[i]:[re]}],rules:[{conditions:[ne],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:D},{rules:[{conditions:[se],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:D},{endpoint:{[d]:re,[p]:oe,[y]:oe},type:k}],type:$}],type:$},{rules:[{conditions:[{[o]:Q,[i]:be}],rules:[{conditions:[{[o]:"aws.partition",[i]:be,assign:V}],rules:[{conditions:[ie,ae,ce],endpoint:le,type:k},{conditions:[ie,ae,se],endpoint:ue,type:k},{conditions:[ie,ne,ce],endpoint:de,type:k},{conditions:[ie,ne,se],endpoint:pe,type:k},{conditions:[Ae,ae,ce],endpoint:le,type:k},{conditions:[Ae,ae,se],endpoint:ue,type:k},{conditions:[Ae,ne,ce],endpoint:de,type:k},{conditions:[Ae,ne,se],endpoint:pe,type:k},{conditions:[me,ae,ce],endpoint:le,type:k},{conditions:[me,ae,se],endpoint:ue,type:k},{conditions:[me,ne,ce],endpoint:de,type:k},{conditions:[me,ne,se],endpoint:pe,type:k},{conditions:[ge,ae,ce],endpoint:le,type:k},{conditions:[ge,ae,se],endpoint:ue,type:k},{conditions:[ge,ne,ce],endpoint:de,type:k},{conditions:[ge,ne,se],endpoint:pe,type:k},{conditions:[fe,ae,ce],endpoint:le,type:k},{conditions:[fe,ae,se],endpoint:ue,type:k},{conditions:[fe,ne,ce],endpoint:de,type:k},{conditions:[fe,ne,se],endpoint:pe,type:k},{conditions:[he,ae,ce],endpoint:le,type:k},{conditions:[he,ae,se],endpoint:ue,type:k},{conditions:[he,ne,ce],endpoint:de,type:k},{conditions:[he,ne,se],endpoint:pe,type:k},{conditions:[ye,ae,ce],endpoint:le,type:k},{conditions:[ye,ae,se],endpoint:ue,type:k},{conditions:[ye,ne,ce],endpoint:de,type:k},{conditions:[ye,ne,se],endpoint:pe,type:k},{conditions:[Ee,ae,ce],endpoint:le,type:k},{conditions:[Ee,ae,se],endpoint:ue,type:k},{conditions:[Ee,ne,ce],endpoint:de,type:k},{conditions:[Ee,ne,se],endpoint:pe,type:k},{conditions:[ne,se],rules:[{conditions:[{[o]:v,[i]:[C,Ce]},Ie],rules:[{endpoint:{[d]:"https://api.ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[p]:oe,[y]:oe},type:k}],type:$},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:D}],type:$},{conditions:[ne,ce],rules:[{conditions:[{[o]:v,[i]:[Ce,C]}],rules:[{endpoint:de,type:k}],type:$},{error:"FIPS is enabled but this partition does not support FIPS",type:D}],type:$},{conditions:[ae,se],rules:[{conditions:[Ie],rules:[{endpoint:{[d]:"https://api.ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",[p]:oe,[y]:oe},type:k}],type:$},{error:"DualStack is enabled but this partition does not support DualStack",type:D}],type:$},{endpoint:le,type:k}],type:$}],type:$},{error:"Invalid Configuration: Missing Region",type:D}],type:$}]};t.ruleSet=Se},8249:(e,t,n)=>{var o=n(2590);var i=n(5242);var c=n(1568);var d=n(2959);var p=n(9316);var y=n(402);var C=n(6890);var Q=n(7212);var v=n(99);var D=n(9618);var k=n(1411);var $=n(3218);var V=n(3107);var ee=n(6463);var te=n(2356);var re=n(5809);var ne=n(5290);var se=n(4901);var oe=n(5502);const resolveClientEndpointParameters=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??false,useFipsEndpoint:e.useFipsEndpoint??false,defaultSigningName:"ecr"});const ie={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};const getHttpAuthExtensionConfiguration=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider;let o=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));if(n===-1){t.push(e)}else{t.splice(n,1,e)}},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){o=e},credentials(){return o}}};const resolveHttpAuthRuntimeConfig=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});const resolveRuntimeExtensions=(e,t)=>{const n=Object.assign(ee.getAwsRegionExtensionConfiguration(e),k.getDefaultExtensionConfiguration(e),te.getHttpHandlerExtensionConfiguration(e),getHttpAuthExtensionConfiguration(e));t.forEach((e=>e.configure(n)));return Object.assign(e,ee.resolveAwsRegionExtensionConfiguration(n),k.resolveDefaultRuntimeConfig(n),te.resolveHttpHandlerRuntimeConfig(n),resolveHttpAuthRuntimeConfig(n))};class ECRClient extends k.Client{config;constructor(...[e]){const t=V.getRuntimeConfig(e||{});super(t);this.initConfig=t;const n=resolveClientEndpointParameters(t);const k=d.resolveUserAgentConfig(n);const ee=D.resolveRetryConfig(k);const te=p.resolveRegionConfig(ee);const re=o.resolveHostHeaderConfig(te);const ne=v.resolveEndpointConfig(re);const se=$.resolveHttpAuthSchemeConfig(ne);const oe=resolveRuntimeExtensions(se,e?.extensions||[]);this.config=oe;this.middlewareStack.use(C.getSchemaSerdePlugin(this.config));this.middlewareStack.use(d.getUserAgentPlugin(this.config));this.middlewareStack.use(D.getRetryPlugin(this.config));this.middlewareStack.use(Q.getContentLengthPlugin(this.config));this.middlewareStack.use(o.getHostHeaderPlugin(this.config));this.middlewareStack.use(i.getLoggerPlugin(this.config));this.middlewareStack.use(c.getRecursionDetectionPlugin(this.config));this.middlewareStack.use(y.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:$.defaultECRHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new y.DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})}));this.middlewareStack.use(y.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class BatchCheckLayerAvailabilityCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","BatchCheckLayerAvailability",{}).n("ECRClient","BatchCheckLayerAvailabilityCommand").sc(re.BatchCheckLayerAvailability$).build()){}class BatchDeleteImageCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","BatchDeleteImage",{}).n("ECRClient","BatchDeleteImageCommand").sc(re.BatchDeleteImage$).build()){}class BatchGetImageCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","BatchGetImage",{}).n("ECRClient","BatchGetImageCommand").sc(re.BatchGetImage$).build()){}class BatchGetRepositoryScanningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","BatchGetRepositoryScanningConfiguration",{}).n("ECRClient","BatchGetRepositoryScanningConfigurationCommand").sc(re.BatchGetRepositoryScanningConfiguration$).build()){}class CompleteLayerUploadCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","CompleteLayerUpload",{}).n("ECRClient","CompleteLayerUploadCommand").sc(re.CompleteLayerUpload$).build()){}class CreatePullThroughCacheRuleCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","CreatePullThroughCacheRule",{}).n("ECRClient","CreatePullThroughCacheRuleCommand").sc(re.CreatePullThroughCacheRule$).build()){}class CreateRepositoryCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","CreateRepository",{}).n("ECRClient","CreateRepositoryCommand").sc(re.CreateRepository$).build()){}class CreateRepositoryCreationTemplateCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","CreateRepositoryCreationTemplate",{}).n("ECRClient","CreateRepositoryCreationTemplateCommand").sc(re.CreateRepositoryCreationTemplate$).build()){}class DeleteLifecyclePolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteLifecyclePolicy",{}).n("ECRClient","DeleteLifecyclePolicyCommand").sc(re.DeleteLifecyclePolicy$).build()){}class DeletePullThroughCacheRuleCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeletePullThroughCacheRule",{}).n("ECRClient","DeletePullThroughCacheRuleCommand").sc(re.DeletePullThroughCacheRule$).build()){}class DeleteRegistryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteRegistryPolicy",{}).n("ECRClient","DeleteRegistryPolicyCommand").sc(re.DeleteRegistryPolicy$).build()){}class DeleteRepositoryCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteRepository",{}).n("ECRClient","DeleteRepositoryCommand").sc(re.DeleteRepository$).build()){}class DeleteRepositoryCreationTemplateCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteRepositoryCreationTemplate",{}).n("ECRClient","DeleteRepositoryCreationTemplateCommand").sc(re.DeleteRepositoryCreationTemplate$).build()){}class DeleteRepositoryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteRepositoryPolicy",{}).n("ECRClient","DeleteRepositoryPolicyCommand").sc(re.DeleteRepositoryPolicy$).build()){}class DeleteSigningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteSigningConfiguration",{}).n("ECRClient","DeleteSigningConfigurationCommand").sc(re.DeleteSigningConfiguration$).build()){}class DeregisterPullTimeUpdateExclusionCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeregisterPullTimeUpdateExclusion",{}).n("ECRClient","DeregisterPullTimeUpdateExclusionCommand").sc(re.DeregisterPullTimeUpdateExclusion$).build()){}class DescribeImageReplicationStatusCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeImageReplicationStatus",{}).n("ECRClient","DescribeImageReplicationStatusCommand").sc(re.DescribeImageReplicationStatus$).build()){}class DescribeImageScanFindingsCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeImageScanFindings",{}).n("ECRClient","DescribeImageScanFindingsCommand").sc(re.DescribeImageScanFindings$).build()){}class DescribeImagesCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeImages",{}).n("ECRClient","DescribeImagesCommand").sc(re.DescribeImages$).build()){}class DescribeImageSigningStatusCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeImageSigningStatus",{}).n("ECRClient","DescribeImageSigningStatusCommand").sc(re.DescribeImageSigningStatus$).build()){}class DescribePullThroughCacheRulesCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribePullThroughCacheRules",{}).n("ECRClient","DescribePullThroughCacheRulesCommand").sc(re.DescribePullThroughCacheRules$).build()){}class DescribeRegistryCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeRegistry",{}).n("ECRClient","DescribeRegistryCommand").sc(re.DescribeRegistry$).build()){}class DescribeRepositoriesCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeRepositories",{}).n("ECRClient","DescribeRepositoriesCommand").sc(re.DescribeRepositories$).build()){}class DescribeRepositoryCreationTemplatesCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeRepositoryCreationTemplates",{}).n("ECRClient","DescribeRepositoryCreationTemplatesCommand").sc(re.DescribeRepositoryCreationTemplates$).build()){}class GetAccountSettingCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetAccountSetting",{}).n("ECRClient","GetAccountSettingCommand").sc(re.GetAccountSetting$).build()){}class GetAuthorizationTokenCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetAuthorizationToken",{}).n("ECRClient","GetAuthorizationTokenCommand").sc(re.GetAuthorizationToken$).build()){}class GetDownloadUrlForLayerCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetDownloadUrlForLayer",{}).n("ECRClient","GetDownloadUrlForLayerCommand").sc(re.GetDownloadUrlForLayer$).build()){}class GetLifecyclePolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetLifecyclePolicy",{}).n("ECRClient","GetLifecyclePolicyCommand").sc(re.GetLifecyclePolicy$).build()){}class GetLifecyclePolicyPreviewCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetLifecyclePolicyPreview",{}).n("ECRClient","GetLifecyclePolicyPreviewCommand").sc(re.GetLifecyclePolicyPreview$).build()){}class GetRegistryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetRegistryPolicy",{}).n("ECRClient","GetRegistryPolicyCommand").sc(re.GetRegistryPolicy$).build()){}class GetRegistryScanningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetRegistryScanningConfiguration",{}).n("ECRClient","GetRegistryScanningConfigurationCommand").sc(re.GetRegistryScanningConfiguration$).build()){}class GetRepositoryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetRepositoryPolicy",{}).n("ECRClient","GetRepositoryPolicyCommand").sc(re.GetRepositoryPolicy$).build()){}class GetSigningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetSigningConfiguration",{}).n("ECRClient","GetSigningConfigurationCommand").sc(re.GetSigningConfiguration$).build()){}class InitiateLayerUploadCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","InitiateLayerUpload",{}).n("ECRClient","InitiateLayerUploadCommand").sc(re.InitiateLayerUpload$).build()){}class ListImageReferrersCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","ListImageReferrers",{}).n("ECRClient","ListImageReferrersCommand").sc(re.ListImageReferrers$).build()){}class ListImagesCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","ListImages",{}).n("ECRClient","ListImagesCommand").sc(re.ListImages$).build()){}class ListPullTimeUpdateExclusionsCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","ListPullTimeUpdateExclusions",{}).n("ECRClient","ListPullTimeUpdateExclusionsCommand").sc(re.ListPullTimeUpdateExclusions$).build()){}class ListTagsForResourceCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","ListTagsForResource",{}).n("ECRClient","ListTagsForResourceCommand").sc(re.ListTagsForResource$).build()){}class PutAccountSettingCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutAccountSetting",{}).n("ECRClient","PutAccountSettingCommand").sc(re.PutAccountSetting$).build()){}class PutImageCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutImage",{}).n("ECRClient","PutImageCommand").sc(re.PutImage$).build()){}class PutImageScanningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutImageScanningConfiguration",{}).n("ECRClient","PutImageScanningConfigurationCommand").sc(re.PutImageScanningConfiguration$).build()){}class PutImageTagMutabilityCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutImageTagMutability",{}).n("ECRClient","PutImageTagMutabilityCommand").sc(re.PutImageTagMutability$).build()){}class PutLifecyclePolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutLifecyclePolicy",{}).n("ECRClient","PutLifecyclePolicyCommand").sc(re.PutLifecyclePolicy$).build()){}class PutRegistryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutRegistryPolicy",{}).n("ECRClient","PutRegistryPolicyCommand").sc(re.PutRegistryPolicy$).build()){}class PutRegistryScanningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutRegistryScanningConfiguration",{}).n("ECRClient","PutRegistryScanningConfigurationCommand").sc(re.PutRegistryScanningConfiguration$).build()){}class PutReplicationConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutReplicationConfiguration",{}).n("ECRClient","PutReplicationConfigurationCommand").sc(re.PutReplicationConfiguration$).build()){}class PutSigningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutSigningConfiguration",{}).n("ECRClient","PutSigningConfigurationCommand").sc(re.PutSigningConfiguration$).build()){}class RegisterPullTimeUpdateExclusionCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","RegisterPullTimeUpdateExclusion",{}).n("ECRClient","RegisterPullTimeUpdateExclusionCommand").sc(re.RegisterPullTimeUpdateExclusion$).build()){}class SetRepositoryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","SetRepositoryPolicy",{}).n("ECRClient","SetRepositoryPolicyCommand").sc(re.SetRepositoryPolicy$).build()){}class StartImageScanCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","StartImageScan",{}).n("ECRClient","StartImageScanCommand").sc(re.StartImageScan$).build()){}class StartLifecyclePolicyPreviewCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","StartLifecyclePolicyPreview",{}).n("ECRClient","StartLifecyclePolicyPreviewCommand").sc(re.StartLifecyclePolicyPreview$).build()){}class TagResourceCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","TagResource",{}).n("ECRClient","TagResourceCommand").sc(re.TagResource$).build()){}class UntagResourceCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","UntagResource",{}).n("ECRClient","UntagResourceCommand").sc(re.UntagResource$).build()){}class UpdateImageStorageClassCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","UpdateImageStorageClass",{}).n("ECRClient","UpdateImageStorageClassCommand").sc(re.UpdateImageStorageClass$).build()){}class UpdatePullThroughCacheRuleCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","UpdatePullThroughCacheRule",{}).n("ECRClient","UpdatePullThroughCacheRuleCommand").sc(re.UpdatePullThroughCacheRule$).build()){}class UpdateRepositoryCreationTemplateCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","UpdateRepositoryCreationTemplate",{}).n("ECRClient","UpdateRepositoryCreationTemplateCommand").sc(re.UpdateRepositoryCreationTemplate$).build()){}class UploadLayerPartCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","UploadLayerPart",{}).n("ECRClient","UploadLayerPartCommand").sc(re.UploadLayerPart$).build()){}class ValidatePullThroughCacheRuleCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","ValidatePullThroughCacheRule",{}).n("ECRClient","ValidatePullThroughCacheRuleCommand").sc(re.ValidatePullThroughCacheRule$).build()){}const ae=y.createPaginator(ECRClient,DescribeImageScanFindingsCommand,"nextToken","nextToken","maxResults");const ce=y.createPaginator(ECRClient,DescribeImagesCommand,"nextToken","nextToken","maxResults");const le=y.createPaginator(ECRClient,DescribePullThroughCacheRulesCommand,"nextToken","nextToken","maxResults");const ue=y.createPaginator(ECRClient,DescribeRepositoriesCommand,"nextToken","nextToken","maxResults");const de=y.createPaginator(ECRClient,DescribeRepositoryCreationTemplatesCommand,"nextToken","nextToken","maxResults");const pe=y.createPaginator(ECRClient,GetLifecyclePolicyPreviewCommand,"nextToken","nextToken","maxResults");const Ae=y.createPaginator(ECRClient,ListImagesCommand,"nextToken","nextToken","maxResults");const checkState$1=async(e,t)=>{let n;try{let o=await e.send(new DescribeImageScanFindingsCommand(t));n=o;try{const returnComparator=()=>o.imageScanStatus.status;if(returnComparator()==="COMPLETE"){return{state:ne.WaiterState.SUCCESS,reason:n}}}catch(e){}try{const returnComparator=()=>o.imageScanStatus.status;if(returnComparator()==="FAILED"){return{state:ne.WaiterState.FAILURE,reason:n}}}catch(e){}}catch(e){n=e}return{state:ne.WaiterState.RETRY,reason:n}};const waitForImageScanComplete=async(e,t)=>{const n={minDelay:5,maxDelay:120};return ne.createWaiter({...n,...e},t,checkState$1)};const waitUntilImageScanComplete=async(e,t)=>{const n={minDelay:5,maxDelay:120};const o=await ne.createWaiter({...n,...e},t,checkState$1);return ne.checkExceptions(o)};const checkState=async(e,t)=>{let n;try{let o=await e.send(new GetLifecyclePolicyPreviewCommand(t));n=o;try{const returnComparator=()=>o.status;if(returnComparator()==="COMPLETE"){return{state:ne.WaiterState.SUCCESS,reason:n}}}catch(e){}try{const returnComparator=()=>o.status;if(returnComparator()==="FAILED"){return{state:ne.WaiterState.FAILURE,reason:n}}}catch(e){}}catch(e){n=e}return{state:ne.WaiterState.RETRY,reason:n}};const waitForLifecyclePolicyPreviewComplete=async(e,t)=>{const n={minDelay:5,maxDelay:120};return ne.createWaiter({...n,...e},t,checkState)};const waitUntilLifecyclePolicyPreviewComplete=async(e,t)=>{const n={minDelay:5,maxDelay:120};const o=await ne.createWaiter({...n,...e},t,checkState);return ne.checkExceptions(o)};const me={BatchCheckLayerAvailabilityCommand:BatchCheckLayerAvailabilityCommand,BatchDeleteImageCommand:BatchDeleteImageCommand,BatchGetImageCommand:BatchGetImageCommand,BatchGetRepositoryScanningConfigurationCommand:BatchGetRepositoryScanningConfigurationCommand,CompleteLayerUploadCommand:CompleteLayerUploadCommand,CreatePullThroughCacheRuleCommand:CreatePullThroughCacheRuleCommand,CreateRepositoryCommand:CreateRepositoryCommand,CreateRepositoryCreationTemplateCommand:CreateRepositoryCreationTemplateCommand,DeleteLifecyclePolicyCommand:DeleteLifecyclePolicyCommand,DeletePullThroughCacheRuleCommand:DeletePullThroughCacheRuleCommand,DeleteRegistryPolicyCommand:DeleteRegistryPolicyCommand,DeleteRepositoryCommand:DeleteRepositoryCommand,DeleteRepositoryCreationTemplateCommand:DeleteRepositoryCreationTemplateCommand,DeleteRepositoryPolicyCommand:DeleteRepositoryPolicyCommand,DeleteSigningConfigurationCommand:DeleteSigningConfigurationCommand,DeregisterPullTimeUpdateExclusionCommand:DeregisterPullTimeUpdateExclusionCommand,DescribeImageReplicationStatusCommand:DescribeImageReplicationStatusCommand,DescribeImagesCommand:DescribeImagesCommand,DescribeImageScanFindingsCommand:DescribeImageScanFindingsCommand,DescribeImageSigningStatusCommand:DescribeImageSigningStatusCommand,DescribePullThroughCacheRulesCommand:DescribePullThroughCacheRulesCommand,DescribeRegistryCommand:DescribeRegistryCommand,DescribeRepositoriesCommand:DescribeRepositoriesCommand,DescribeRepositoryCreationTemplatesCommand:DescribeRepositoryCreationTemplatesCommand,GetAccountSettingCommand:GetAccountSettingCommand,GetAuthorizationTokenCommand:GetAuthorizationTokenCommand,GetDownloadUrlForLayerCommand:GetDownloadUrlForLayerCommand,GetLifecyclePolicyCommand:GetLifecyclePolicyCommand,GetLifecyclePolicyPreviewCommand:GetLifecyclePolicyPreviewCommand,GetRegistryPolicyCommand:GetRegistryPolicyCommand,GetRegistryScanningConfigurationCommand:GetRegistryScanningConfigurationCommand,GetRepositoryPolicyCommand:GetRepositoryPolicyCommand,GetSigningConfigurationCommand:GetSigningConfigurationCommand,InitiateLayerUploadCommand:InitiateLayerUploadCommand,ListImageReferrersCommand:ListImageReferrersCommand,ListImagesCommand:ListImagesCommand,ListPullTimeUpdateExclusionsCommand:ListPullTimeUpdateExclusionsCommand,ListTagsForResourceCommand:ListTagsForResourceCommand,PutAccountSettingCommand:PutAccountSettingCommand,PutImageCommand:PutImageCommand,PutImageScanningConfigurationCommand:PutImageScanningConfigurationCommand,PutImageTagMutabilityCommand:PutImageTagMutabilityCommand,PutLifecyclePolicyCommand:PutLifecyclePolicyCommand,PutRegistryPolicyCommand:PutRegistryPolicyCommand,PutRegistryScanningConfigurationCommand:PutRegistryScanningConfigurationCommand,PutReplicationConfigurationCommand:PutReplicationConfigurationCommand,PutSigningConfigurationCommand:PutSigningConfigurationCommand,RegisterPullTimeUpdateExclusionCommand:RegisterPullTimeUpdateExclusionCommand,SetRepositoryPolicyCommand:SetRepositoryPolicyCommand,StartImageScanCommand:StartImageScanCommand,StartLifecyclePolicyPreviewCommand:StartLifecyclePolicyPreviewCommand,TagResourceCommand:TagResourceCommand,UntagResourceCommand:UntagResourceCommand,UpdateImageStorageClassCommand:UpdateImageStorageClassCommand,UpdatePullThroughCacheRuleCommand:UpdatePullThroughCacheRuleCommand,UpdateRepositoryCreationTemplateCommand:UpdateRepositoryCreationTemplateCommand,UploadLayerPartCommand:UploadLayerPartCommand,ValidatePullThroughCacheRuleCommand:ValidatePullThroughCacheRuleCommand};const ge={paginateDescribeImages:ce,paginateDescribeImageScanFindings:ae,paginateDescribePullThroughCacheRules:le,paginateDescribeRepositories:ue,paginateDescribeRepositoryCreationTemplates:de,paginateGetLifecyclePolicyPreview:pe,paginateListImages:Ae};const fe={waitUntilImageScanComplete:waitUntilImageScanComplete,waitUntilLifecyclePolicyPreviewComplete:waitUntilLifecyclePolicyPreviewComplete};class ECR extends ECRClient{}k.createAggregatedClient(me,ECR,{paginators:ge,waiters:fe});const he={InvalidLayerDigest:"InvalidLayerDigest",MissingLayerDigest:"MissingLayerDigest"};const ye={ARCHIVED:"ARCHIVED",AVAILABLE:"AVAILABLE",UNAVAILABLE:"UNAVAILABLE"};const Ee={ImageInaccessible:"ImageInaccessible",ImageNotFound:"ImageNotFound",ImageReferencedByManifestList:"ImageReferencedByManifestList",ImageTagDoesNotMatchDigest:"ImageTagDoesNotMatchDigest",InvalidImageDigest:"InvalidImageDigest",InvalidImageTag:"InvalidImageTag",KmsError:"KmsError",MissingDigestAndTag:"MissingDigestAndTag",UpstreamAccessDenied:"UpstreamAccessDenied",UpstreamTooManyRequests:"UpstreamTooManyRequests",UpstreamUnavailable:"UpstreamUnavailable"};const Ce={REPOSITORY_NOT_FOUND:"REPOSITORY_NOT_FOUND"};const Ie={WILDCARD:"WILDCARD"};const be={CONTINUOUS_SCAN:"CONTINUOUS_SCAN",MANUAL:"MANUAL",SCAN_ON_PUSH:"SCAN_ON_PUSH"};const Se={AzureContainerRegistry:"azure-container-registry",DockerHub:"docker-hub",Ecr:"ecr",EcrPublic:"ecr-public",GitHubContainerRegistry:"github-container-registry",GitLabContainerRegistry:"gitlab-container-registry",K8s:"k8s",Quay:"quay"};const Be={AES256:"AES256",KMS:"KMS",KMS_DSSE:"KMS_DSSE"};const we={IMMUTABLE:"IMMUTABLE",IMMUTABLE_WITH_EXCLUSION:"IMMUTABLE_WITH_EXCLUSION",MUTABLE:"MUTABLE",MUTABLE_WITH_EXCLUSION:"MUTABLE_WITH_EXCLUSION"};const Re={WILDCARD:"WILDCARD"};const Ne={CREATE_ON_PUSH:"CREATE_ON_PUSH",PULL_THROUGH_CACHE:"PULL_THROUGH_CACHE",REPLICATION:"REPLICATION"};const Qe={WILDCARD_MATCH:"WILDCARD_MATCH"};const xe={COMPLETE:"COMPLETE",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"};const Te={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ANY:"ANY",ARCHIVED:"ARCHIVED"};const ve={ANY:"ANY",TAGGED:"TAGGED",UNTAGGED:"UNTAGGED"};const Pe={CRITICAL:"CRITICAL",HIGH:"HIGH",INFORMATIONAL:"INFORMATIONAL",LOW:"LOW",MEDIUM:"MEDIUM",UNDEFINED:"UNDEFINED"};const De={ACTIVE:"ACTIVE",COMPLETE:"COMPLETE",FAILED:"FAILED",FINDINGS_UNAVAILABLE:"FINDINGS_UNAVAILABLE",IMAGE_ARCHIVED:"IMAGE_ARCHIVED",IN_PROGRESS:"IN_PROGRESS",LIMIT_EXCEEDED:"LIMIT_EXCEEDED",PENDING:"PENDING",SCAN_ELIGIBILITY_EXPIRED:"SCAN_ELIGIBILITY_EXPIRED",UNSUPPORTED_IMAGE:"UNSUPPORTED_IMAGE"};const ke={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ARCHIVED:"ARCHIVED"};const _e={COMPLETE:"COMPLETE",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"};const Le={PREFIX_MATCH:"PREFIX_MATCH"};const Oe={ARCHIVE:"ARCHIVE"};const Fe={EXPIRE:"EXPIRE",TRANSITION:"TRANSITION"};const Ue={ARCHIVE:"ARCHIVE",STANDARD:"STANDARD"};const Me={COMPLETE:"COMPLETE",EXPIRED:"EXPIRED",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"};const He={BASIC:"BASIC",ENHANCED:"ENHANCED"};const $e={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ANY:"ANY",ARCHIVED:"ARCHIVED"};const Ge={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ARCHIVED:"ARCHIVED"};const qe={ARCHIVE:"ARCHIVE",STANDARD:"STANDARD"};t.$Command=k.Command;t.__Client=k.Client;t.ECRServiceException=oe.ECRServiceException;t.ArtifactStatus=Ge;t.ArtifactStatusFilter=$e;t.BatchCheckLayerAvailabilityCommand=BatchCheckLayerAvailabilityCommand;t.BatchDeleteImageCommand=BatchDeleteImageCommand;t.BatchGetImageCommand=BatchGetImageCommand;t.BatchGetRepositoryScanningConfigurationCommand=BatchGetRepositoryScanningConfigurationCommand;t.CompleteLayerUploadCommand=CompleteLayerUploadCommand;t.CreatePullThroughCacheRuleCommand=CreatePullThroughCacheRuleCommand;t.CreateRepositoryCommand=CreateRepositoryCommand;t.CreateRepositoryCreationTemplateCommand=CreateRepositoryCreationTemplateCommand;t.DeleteLifecyclePolicyCommand=DeleteLifecyclePolicyCommand;t.DeletePullThroughCacheRuleCommand=DeletePullThroughCacheRuleCommand;t.DeleteRegistryPolicyCommand=DeleteRegistryPolicyCommand;t.DeleteRepositoryCommand=DeleteRepositoryCommand;t.DeleteRepositoryCreationTemplateCommand=DeleteRepositoryCreationTemplateCommand;t.DeleteRepositoryPolicyCommand=DeleteRepositoryPolicyCommand;t.DeleteSigningConfigurationCommand=DeleteSigningConfigurationCommand;t.DeregisterPullTimeUpdateExclusionCommand=DeregisterPullTimeUpdateExclusionCommand;t.DescribeImageReplicationStatusCommand=DescribeImageReplicationStatusCommand;t.DescribeImageScanFindingsCommand=DescribeImageScanFindingsCommand;t.DescribeImageSigningStatusCommand=DescribeImageSigningStatusCommand;t.DescribeImagesCommand=DescribeImagesCommand;t.DescribePullThroughCacheRulesCommand=DescribePullThroughCacheRulesCommand;t.DescribeRegistryCommand=DescribeRegistryCommand;t.DescribeRepositoriesCommand=DescribeRepositoriesCommand;t.DescribeRepositoryCreationTemplatesCommand=DescribeRepositoryCreationTemplatesCommand;t.ECR=ECR;t.ECRClient=ECRClient;t.EncryptionType=Be;t.FindingSeverity=Pe;t.GetAccountSettingCommand=GetAccountSettingCommand;t.GetAuthorizationTokenCommand=GetAuthorizationTokenCommand;t.GetDownloadUrlForLayerCommand=GetDownloadUrlForLayerCommand;t.GetLifecyclePolicyCommand=GetLifecyclePolicyCommand;t.GetLifecyclePolicyPreviewCommand=GetLifecyclePolicyPreviewCommand;t.GetRegistryPolicyCommand=GetRegistryPolicyCommand;t.GetRegistryScanningConfigurationCommand=GetRegistryScanningConfigurationCommand;t.GetRepositoryPolicyCommand=GetRepositoryPolicyCommand;t.GetSigningConfigurationCommand=GetSigningConfigurationCommand;t.ImageActionType=Fe;t.ImageFailureCode=Ee;t.ImageStatus=ke;t.ImageStatusFilter=Te;t.ImageTagMutability=we;t.ImageTagMutabilityExclusionFilterType=Re;t.InitiateLayerUploadCommand=InitiateLayerUploadCommand;t.LayerAvailability=ye;t.LayerFailureCode=he;t.LifecyclePolicyPreviewStatus=Me;t.LifecyclePolicyStorageClass=Ue;t.LifecyclePolicyTargetStorageClass=Oe;t.ListImageReferrersCommand=ListImageReferrersCommand;t.ListImagesCommand=ListImagesCommand;t.ListPullTimeUpdateExclusionsCommand=ListPullTimeUpdateExclusionsCommand;t.ListTagsForResourceCommand=ListTagsForResourceCommand;t.PutAccountSettingCommand=PutAccountSettingCommand;t.PutImageCommand=PutImageCommand;t.PutImageScanningConfigurationCommand=PutImageScanningConfigurationCommand;t.PutImageTagMutabilityCommand=PutImageTagMutabilityCommand;t.PutLifecyclePolicyCommand=PutLifecyclePolicyCommand;t.PutRegistryPolicyCommand=PutRegistryPolicyCommand;t.PutRegistryScanningConfigurationCommand=PutRegistryScanningConfigurationCommand;t.PutReplicationConfigurationCommand=PutReplicationConfigurationCommand;t.PutSigningConfigurationCommand=PutSigningConfigurationCommand;t.RCTAppliedFor=Ne;t.RegisterPullTimeUpdateExclusionCommand=RegisterPullTimeUpdateExclusionCommand;t.ReplicationStatus=xe;t.RepositoryFilterType=Le;t.ScanFrequency=be;t.ScanStatus=De;t.ScanType=He;t.ScanningConfigurationFailureCode=Ce;t.ScanningRepositoryFilterType=Ie;t.SetRepositoryPolicyCommand=SetRepositoryPolicyCommand;t.SigningRepositoryFilterType=Qe;t.SigningStatus=_e;t.StartImageScanCommand=StartImageScanCommand;t.StartLifecyclePolicyPreviewCommand=StartLifecyclePolicyPreviewCommand;t.TagResourceCommand=TagResourceCommand;t.TagStatus=ve;t.TargetStorageClass=qe;t.UntagResourceCommand=UntagResourceCommand;t.UpdateImageStorageClassCommand=UpdateImageStorageClassCommand;t.UpdatePullThroughCacheRuleCommand=UpdatePullThroughCacheRuleCommand;t.UpdateRepositoryCreationTemplateCommand=UpdateRepositoryCreationTemplateCommand;t.UploadLayerPartCommand=UploadLayerPartCommand;t.UpstreamRegistry=Se;t.ValidatePullThroughCacheRuleCommand=ValidatePullThroughCacheRuleCommand;t.paginateDescribeImageScanFindings=ae;t.paginateDescribeImages=ce;t.paginateDescribePullThroughCacheRules=le;t.paginateDescribeRepositories=ue;t.paginateDescribeRepositoryCreationTemplates=de;t.paginateGetLifecyclePolicyPreview=pe;t.paginateListImages=Ae;t.waitForImageScanComplete=waitForImageScanComplete;t.waitForLifecyclePolicyPreviewComplete=waitForLifecyclePolicyPreviewComplete;t.waitUntilImageScanComplete=waitUntilImageScanComplete;t.waitUntilLifecyclePolicyPreviewComplete=waitUntilLifecyclePolicyPreviewComplete;Object.prototype.hasOwnProperty.call(re,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:re["__proto__"]});Object.keys(re).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=re[e]}));Object.prototype.hasOwnProperty.call(se,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:se["__proto__"]});Object.keys(se).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=se[e]}))},5502:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ECRServiceException=t.__ServiceException=void 0;const o=n(1411);Object.defineProperty(t,"__ServiceException",{enumerable:true,get:function(){return o.ServiceException}});class ECRServiceException extends o.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,ECRServiceException.prototype)}}t.ECRServiceException=ECRServiceException},4901:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.InvalidLayerPartException=t.ImageStorageClassUpdateNotSupportedException=t.LifecyclePolicyPreviewInProgressException=t.UnsupportedImageTypeException=t.ImageArchivedException=t.ExclusionAlreadyExistsException=t.BlockedByOrganizationPolicyException=t.ReferencedImagesNotFoundException=t.ImageTagAlreadyExistsException=t.ImageDigestDoesNotMatchException=t.ImageAlreadyExistsException=t.LifecyclePolicyPreviewNotFoundException=t.UnableToGetUpstreamLayerException=t.LayersNotFoundException=t.LayerInaccessibleException=t.ScanNotFoundException=t.ImageNotFoundException=t.ExclusionNotFoundException=t.SigningConfigurationNotFoundException=t.RepositoryPolicyNotFoundException=t.TemplateNotFoundException=t.RepositoryNotEmptyException=t.RegistryPolicyNotFoundException=t.PullThroughCacheRuleNotFoundException=t.LifecyclePolicyNotFoundException=t.TemplateAlreadyExistsException=t.TooManyTagsException=t.RepositoryAlreadyExistsException=t.InvalidTagParameterException=t.UnsupportedUpstreamRegistryException=t.UnableToDecryptSecretValueException=t.UnableToAccessSecretException=t.SecretNotFoundException=t.PullThroughCacheRuleAlreadyExistsException=t.UploadNotFoundException=t.LayerPartTooSmallException=t.LayerAlreadyExistsException=t.KmsException=t.InvalidLayerException=t.EmptyUploadException=t.ValidationException=t.UnableToGetUpstreamImageException=t.LimitExceededException=t.ServerException=t.RepositoryNotFoundException=t.InvalidParameterException=void 0;const o=n(5502);class InvalidParameterException extends o.ECRServiceException{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidParameterException.prototype)}}t.InvalidParameterException=InvalidParameterException;class RepositoryNotFoundException extends o.ECRServiceException{name="RepositoryNotFoundException";$fault="client";constructor(e){super({name:"RepositoryNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryNotFoundException.prototype)}}t.RepositoryNotFoundException=RepositoryNotFoundException;class ServerException extends o.ECRServiceException{name="ServerException";$fault="server";constructor(e){super({name:"ServerException",$fault:"server",...e});Object.setPrototypeOf(this,ServerException.prototype)}}t.ServerException=ServerException;class LimitExceededException extends o.ECRServiceException{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e});Object.setPrototypeOf(this,LimitExceededException.prototype)}}t.LimitExceededException=LimitExceededException;class UnableToGetUpstreamImageException extends o.ECRServiceException{name="UnableToGetUpstreamImageException";$fault="client";constructor(e){super({name:"UnableToGetUpstreamImageException",$fault:"client",...e});Object.setPrototypeOf(this,UnableToGetUpstreamImageException.prototype)}}t.UnableToGetUpstreamImageException=UnableToGetUpstreamImageException;class ValidationException extends o.ECRServiceException{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e});Object.setPrototypeOf(this,ValidationException.prototype)}}t.ValidationException=ValidationException;class EmptyUploadException extends o.ECRServiceException{name="EmptyUploadException";$fault="client";constructor(e){super({name:"EmptyUploadException",$fault:"client",...e});Object.setPrototypeOf(this,EmptyUploadException.prototype)}}t.EmptyUploadException=EmptyUploadException;class InvalidLayerException extends o.ECRServiceException{name="InvalidLayerException";$fault="client";constructor(e){super({name:"InvalidLayerException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidLayerException.prototype)}}t.InvalidLayerException=InvalidLayerException;class KmsException extends o.ECRServiceException{name="KmsException";$fault="client";kmsError;constructor(e){super({name:"KmsException",$fault:"client",...e});Object.setPrototypeOf(this,KmsException.prototype);this.kmsError=e.kmsError}}t.KmsException=KmsException;class LayerAlreadyExistsException extends o.ECRServiceException{name="LayerAlreadyExistsException";$fault="client";constructor(e){super({name:"LayerAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,LayerAlreadyExistsException.prototype)}}t.LayerAlreadyExistsException=LayerAlreadyExistsException;class LayerPartTooSmallException extends o.ECRServiceException{name="LayerPartTooSmallException";$fault="client";constructor(e){super({name:"LayerPartTooSmallException",$fault:"client",...e});Object.setPrototypeOf(this,LayerPartTooSmallException.prototype)}}t.LayerPartTooSmallException=LayerPartTooSmallException;class UploadNotFoundException extends o.ECRServiceException{name="UploadNotFoundException";$fault="client";constructor(e){super({name:"UploadNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,UploadNotFoundException.prototype)}}t.UploadNotFoundException=UploadNotFoundException;class PullThroughCacheRuleAlreadyExistsException extends o.ECRServiceException{name="PullThroughCacheRuleAlreadyExistsException";$fault="client";constructor(e){super({name:"PullThroughCacheRuleAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,PullThroughCacheRuleAlreadyExistsException.prototype)}}t.PullThroughCacheRuleAlreadyExistsException=PullThroughCacheRuleAlreadyExistsException;class SecretNotFoundException extends o.ECRServiceException{name="SecretNotFoundException";$fault="client";constructor(e){super({name:"SecretNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,SecretNotFoundException.prototype)}}t.SecretNotFoundException=SecretNotFoundException;class UnableToAccessSecretException extends o.ECRServiceException{name="UnableToAccessSecretException";$fault="client";constructor(e){super({name:"UnableToAccessSecretException",$fault:"client",...e});Object.setPrototypeOf(this,UnableToAccessSecretException.prototype)}}t.UnableToAccessSecretException=UnableToAccessSecretException;class UnableToDecryptSecretValueException extends o.ECRServiceException{name="UnableToDecryptSecretValueException";$fault="client";constructor(e){super({name:"UnableToDecryptSecretValueException",$fault:"client",...e});Object.setPrototypeOf(this,UnableToDecryptSecretValueException.prototype)}}t.UnableToDecryptSecretValueException=UnableToDecryptSecretValueException;class UnsupportedUpstreamRegistryException extends o.ECRServiceException{name="UnsupportedUpstreamRegistryException";$fault="client";constructor(e){super({name:"UnsupportedUpstreamRegistryException",$fault:"client",...e});Object.setPrototypeOf(this,UnsupportedUpstreamRegistryException.prototype)}}t.UnsupportedUpstreamRegistryException=UnsupportedUpstreamRegistryException;class InvalidTagParameterException extends o.ECRServiceException{name="InvalidTagParameterException";$fault="client";constructor(e){super({name:"InvalidTagParameterException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidTagParameterException.prototype)}}t.InvalidTagParameterException=InvalidTagParameterException;class RepositoryAlreadyExistsException extends o.ECRServiceException{name="RepositoryAlreadyExistsException";$fault="client";constructor(e){super({name:"RepositoryAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryAlreadyExistsException.prototype)}}t.RepositoryAlreadyExistsException=RepositoryAlreadyExistsException;class TooManyTagsException extends o.ECRServiceException{name="TooManyTagsException";$fault="client";constructor(e){super({name:"TooManyTagsException",$fault:"client",...e});Object.setPrototypeOf(this,TooManyTagsException.prototype)}}t.TooManyTagsException=TooManyTagsException;class TemplateAlreadyExistsException extends o.ECRServiceException{name="TemplateAlreadyExistsException";$fault="client";constructor(e){super({name:"TemplateAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,TemplateAlreadyExistsException.prototype)}}t.TemplateAlreadyExistsException=TemplateAlreadyExistsException;class LifecyclePolicyNotFoundException extends o.ECRServiceException{name="LifecyclePolicyNotFoundException";$fault="client";constructor(e){super({name:"LifecyclePolicyNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,LifecyclePolicyNotFoundException.prototype)}}t.LifecyclePolicyNotFoundException=LifecyclePolicyNotFoundException;class PullThroughCacheRuleNotFoundException extends o.ECRServiceException{name="PullThroughCacheRuleNotFoundException";$fault="client";constructor(e){super({name:"PullThroughCacheRuleNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,PullThroughCacheRuleNotFoundException.prototype)}}t.PullThroughCacheRuleNotFoundException=PullThroughCacheRuleNotFoundException;class RegistryPolicyNotFoundException extends o.ECRServiceException{name="RegistryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RegistryPolicyNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RegistryPolicyNotFoundException.prototype)}}t.RegistryPolicyNotFoundException=RegistryPolicyNotFoundException;class RepositoryNotEmptyException extends o.ECRServiceException{name="RepositoryNotEmptyException";$fault="client";constructor(e){super({name:"RepositoryNotEmptyException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryNotEmptyException.prototype)}}t.RepositoryNotEmptyException=RepositoryNotEmptyException;class TemplateNotFoundException extends o.ECRServiceException{name="TemplateNotFoundException";$fault="client";constructor(e){super({name:"TemplateNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,TemplateNotFoundException.prototype)}}t.TemplateNotFoundException=TemplateNotFoundException;class RepositoryPolicyNotFoundException extends o.ECRServiceException{name="RepositoryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RepositoryPolicyNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryPolicyNotFoundException.prototype)}}t.RepositoryPolicyNotFoundException=RepositoryPolicyNotFoundException;class SigningConfigurationNotFoundException extends o.ECRServiceException{name="SigningConfigurationNotFoundException";$fault="client";constructor(e){super({name:"SigningConfigurationNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,SigningConfigurationNotFoundException.prototype)}}t.SigningConfigurationNotFoundException=SigningConfigurationNotFoundException;class ExclusionNotFoundException extends o.ECRServiceException{name="ExclusionNotFoundException";$fault="client";constructor(e){super({name:"ExclusionNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ExclusionNotFoundException.prototype)}}t.ExclusionNotFoundException=ExclusionNotFoundException;class ImageNotFoundException extends o.ECRServiceException{name="ImageNotFoundException";$fault="client";constructor(e){super({name:"ImageNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ImageNotFoundException.prototype)}}t.ImageNotFoundException=ImageNotFoundException;class ScanNotFoundException extends o.ECRServiceException{name="ScanNotFoundException";$fault="client";constructor(e){super({name:"ScanNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ScanNotFoundException.prototype)}}t.ScanNotFoundException=ScanNotFoundException;class LayerInaccessibleException extends o.ECRServiceException{name="LayerInaccessibleException";$fault="client";constructor(e){super({name:"LayerInaccessibleException",$fault:"client",...e});Object.setPrototypeOf(this,LayerInaccessibleException.prototype)}}t.LayerInaccessibleException=LayerInaccessibleException;class LayersNotFoundException extends o.ECRServiceException{name="LayersNotFoundException";$fault="client";constructor(e){super({name:"LayersNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,LayersNotFoundException.prototype)}}t.LayersNotFoundException=LayersNotFoundException;class UnableToGetUpstreamLayerException extends o.ECRServiceException{name="UnableToGetUpstreamLayerException";$fault="client";constructor(e){super({name:"UnableToGetUpstreamLayerException",$fault:"client",...e});Object.setPrototypeOf(this,UnableToGetUpstreamLayerException.prototype)}}t.UnableToGetUpstreamLayerException=UnableToGetUpstreamLayerException;class LifecyclePolicyPreviewNotFoundException extends o.ECRServiceException{name="LifecyclePolicyPreviewNotFoundException";$fault="client";constructor(e){super({name:"LifecyclePolicyPreviewNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,LifecyclePolicyPreviewNotFoundException.prototype)}}t.LifecyclePolicyPreviewNotFoundException=LifecyclePolicyPreviewNotFoundException;class ImageAlreadyExistsException extends o.ECRServiceException{name="ImageAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,ImageAlreadyExistsException.prototype)}}t.ImageAlreadyExistsException=ImageAlreadyExistsException;class ImageDigestDoesNotMatchException extends o.ECRServiceException{name="ImageDigestDoesNotMatchException";$fault="client";constructor(e){super({name:"ImageDigestDoesNotMatchException",$fault:"client",...e});Object.setPrototypeOf(this,ImageDigestDoesNotMatchException.prototype)}}t.ImageDigestDoesNotMatchException=ImageDigestDoesNotMatchException;class ImageTagAlreadyExistsException extends o.ECRServiceException{name="ImageTagAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageTagAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,ImageTagAlreadyExistsException.prototype)}}t.ImageTagAlreadyExistsException=ImageTagAlreadyExistsException;class ReferencedImagesNotFoundException extends o.ECRServiceException{name="ReferencedImagesNotFoundException";$fault="client";constructor(e){super({name:"ReferencedImagesNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ReferencedImagesNotFoundException.prototype)}}t.ReferencedImagesNotFoundException=ReferencedImagesNotFoundException;class BlockedByOrganizationPolicyException extends o.ECRServiceException{name="BlockedByOrganizationPolicyException";$fault="client";constructor(e){super({name:"BlockedByOrganizationPolicyException",$fault:"client",...e});Object.setPrototypeOf(this,BlockedByOrganizationPolicyException.prototype)}}t.BlockedByOrganizationPolicyException=BlockedByOrganizationPolicyException;class ExclusionAlreadyExistsException extends o.ECRServiceException{name="ExclusionAlreadyExistsException";$fault="client";constructor(e){super({name:"ExclusionAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,ExclusionAlreadyExistsException.prototype)}}t.ExclusionAlreadyExistsException=ExclusionAlreadyExistsException;class ImageArchivedException extends o.ECRServiceException{name="ImageArchivedException";$fault="client";constructor(e){super({name:"ImageArchivedException",$fault:"client",...e});Object.setPrototypeOf(this,ImageArchivedException.prototype)}}t.ImageArchivedException=ImageArchivedException;class UnsupportedImageTypeException extends o.ECRServiceException{name="UnsupportedImageTypeException";$fault="client";constructor(e){super({name:"UnsupportedImageTypeException",$fault:"client",...e});Object.setPrototypeOf(this,UnsupportedImageTypeException.prototype)}}t.UnsupportedImageTypeException=UnsupportedImageTypeException;class LifecyclePolicyPreviewInProgressException extends o.ECRServiceException{name="LifecyclePolicyPreviewInProgressException";$fault="client";constructor(e){super({name:"LifecyclePolicyPreviewInProgressException",$fault:"client",...e});Object.setPrototypeOf(this,LifecyclePolicyPreviewInProgressException.prototype)}}t.LifecyclePolicyPreviewInProgressException=LifecyclePolicyPreviewInProgressException;class ImageStorageClassUpdateNotSupportedException extends o.ECRServiceException{name="ImageStorageClassUpdateNotSupportedException";$fault="client";constructor(e){super({name:"ImageStorageClassUpdateNotSupportedException",$fault:"client",...e});Object.setPrototypeOf(this,ImageStorageClassUpdateNotSupportedException.prototype)}}t.ImageStorageClassUpdateNotSupportedException=ImageStorageClassUpdateNotSupportedException;class InvalidLayerPartException extends o.ECRServiceException{name="InvalidLayerPartException";$fault="client";registryId;repositoryName;uploadId;lastValidByteReceived;constructor(e){super({name:"InvalidLayerPartException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidLayerPartException.prototype);this.registryId=e.registryId;this.repositoryName=e.repositoryName;this.uploadId=e.uploadId;this.lastValidByteReceived=e.lastValidByteReceived}}t.InvalidLayerPartException=InvalidLayerPartException},3107:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getRuntimeConfig=void 0;const o=n(1860);const i=o.__importDefault(n(121));const c=n(8704);const d=n(5861);const p=n(1656);const y=n(9316);const C=n(2711);const Q=n(9618);const v=n(5704);const D=n(1279);const k=n(1411);const $=n(3638);const V=n(673);const ee=n(5518);const te=n(9344);const getRuntimeConfig=e=>{(0,k.emitWarningIfUnsupportedVersion)(process.version);const t=(0,V.resolveDefaultsModeConfig)(e);const defaultConfigProvider=()=>t().then(k.loadConfigsForDefaultMode);const n=(0,te.getRuntimeConfig)(e);(0,c.emitWarningIfUnsupportedVersion)(process.version);const o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,v.loadConfig)(c.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,o),bodyLengthChecker:e?.bodyLengthChecker??$.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??d.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,p.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:i.default.version}),maxAttempts:e?.maxAttempts??(0,v.loadConfig)(Q.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,v.loadConfig)(y.NODE_REGION_CONFIG_OPTIONS,{...y.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:D.NodeHttpHandler.create(e?.requestHandler??defaultConfigProvider),retryMode:e?.retryMode??(0,v.loadConfig)({...Q.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await defaultConfigProvider()).retryMode||ee.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??C.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??D.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,v.loadConfig)(y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,v.loadConfig)(y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,v.loadConfig)(p.NODE_APP_ID_CONFIG_OPTIONS,o)}};t.getRuntimeConfig=getRuntimeConfig},9344:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getRuntimeConfig=void 0;const o=n(8704);const i=n(7288);const c=n(1411);const d=n(4494);const p=n(8385);const y=n(1577);const C=n(3218);const Q=n(3628);const v=n(5809);const getRuntimeConfig=e=>({apiVersion:"2015-09-21",base64Decoder:e?.base64Decoder??p.fromBase64,base64Encoder:e?.base64Encoder??p.toBase64,disableHostPrefix:e?.disableHostPrefix??false,endpointProvider:e?.endpointProvider??Q.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??C.defaultECRHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new o.AwsSdkSigV4Signer}],logger:e?.logger??new c.NoOpLogger,protocol:e?.protocol??i.AwsJson1_1Protocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ecr",errorTypeRegistries:v.errorTypeRegistries,xmlNamespace:"http://ecr.amazonaws.com/doc/2015-09-21/",version:"2015-09-21",serviceTarget:"AmazonEC2ContainerRegistry_V20150921"},serviceId:e?.serviceId??"ECR",urlParser:e?.urlParser??d.parseUrl,utf8Decoder:e?.utf8Decoder??y.fromUtf8,utf8Encoder:e?.utf8Encoder??y.toUtf8});t.getRuntimeConfig=getRuntimeConfig},5809:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.AuthorizationData$=t.Attribute$=t.errorTypeRegistries=t.ValidationException$=t.UploadNotFoundException$=t.UnsupportedUpstreamRegistryException$=t.UnsupportedImageTypeException$=t.UnableToGetUpstreamLayerException$=t.UnableToGetUpstreamImageException$=t.UnableToDecryptSecretValueException$=t.UnableToAccessSecretException$=t.TooManyTagsException$=t.TemplateNotFoundException$=t.TemplateAlreadyExistsException$=t.SigningConfigurationNotFoundException$=t.ServerException$=t.SecretNotFoundException$=t.ScanNotFoundException$=t.RepositoryPolicyNotFoundException$=t.RepositoryNotFoundException$=t.RepositoryNotEmptyException$=t.RepositoryAlreadyExistsException$=t.RegistryPolicyNotFoundException$=t.ReferencedImagesNotFoundException$=t.PullThroughCacheRuleNotFoundException$=t.PullThroughCacheRuleAlreadyExistsException$=t.LimitExceededException$=t.LifecyclePolicyPreviewNotFoundException$=t.LifecyclePolicyPreviewInProgressException$=t.LifecyclePolicyNotFoundException$=t.LayersNotFoundException$=t.LayerPartTooSmallException$=t.LayerInaccessibleException$=t.LayerAlreadyExistsException$=t.KmsException$=t.InvalidTagParameterException$=t.InvalidParameterException$=t.InvalidLayerPartException$=t.InvalidLayerException$=t.ImageTagAlreadyExistsException$=t.ImageStorageClassUpdateNotSupportedException$=t.ImageNotFoundException$=t.ImageDigestDoesNotMatchException$=t.ImageArchivedException$=t.ImageAlreadyExistsException$=t.ExclusionNotFoundException$=t.ExclusionAlreadyExistsException$=t.EmptyUploadException$=t.BlockedByOrganizationPolicyException$=t.ECRServiceException$=void 0;t.DescribeRepositoriesRequest$=t.DescribeRegistryResponse$=t.DescribeRegistryRequest$=t.DescribePullThroughCacheRulesResponse$=t.DescribePullThroughCacheRulesRequest$=t.DescribeImagesResponse$=t.DescribeImagesRequest$=t.DescribeImageSigningStatusResponse$=t.DescribeImageSigningStatusRequest$=t.DescribeImagesFilter$=t.DescribeImageScanFindingsResponse$=t.DescribeImageScanFindingsRequest$=t.DescribeImageReplicationStatusResponse$=t.DescribeImageReplicationStatusRequest$=t.DeregisterPullTimeUpdateExclusionResponse$=t.DeregisterPullTimeUpdateExclusionRequest$=t.DeleteSigningConfigurationResponse$=t.DeleteSigningConfigurationRequest$=t.DeleteRepositoryResponse$=t.DeleteRepositoryRequest$=t.DeleteRepositoryPolicyResponse$=t.DeleteRepositoryPolicyRequest$=t.DeleteRepositoryCreationTemplateResponse$=t.DeleteRepositoryCreationTemplateRequest$=t.DeleteRegistryPolicyResponse$=t.DeleteRegistryPolicyRequest$=t.DeletePullThroughCacheRuleResponse$=t.DeletePullThroughCacheRuleRequest$=t.DeleteLifecyclePolicyResponse$=t.DeleteLifecyclePolicyRequest$=t.CvssScoreDetails$=t.CvssScoreAdjustment$=t.CvssScore$=t.CreateRepositoryResponse$=t.CreateRepositoryRequest$=t.CreateRepositoryCreationTemplateResponse$=t.CreateRepositoryCreationTemplateRequest$=t.CreatePullThroughCacheRuleResponse$=t.CreatePullThroughCacheRuleRequest$=t.CompleteLayerUploadResponse$=t.CompleteLayerUploadRequest$=t.BatchGetRepositoryScanningConfigurationResponse$=t.BatchGetRepositoryScanningConfigurationRequest$=t.BatchGetImageResponse$=t.BatchGetImageRequest$=t.BatchDeleteImageResponse$=t.BatchDeleteImageRequest$=t.BatchCheckLayerAvailabilityResponse$=t.BatchCheckLayerAvailabilityRequest$=t.AwsEcrContainerImageDetails$=void 0;t.ListImagesRequest$=t.ListImagesFilter$=t.ListImageReferrersResponse$=t.ListImageReferrersRequest$=t.ListImageReferrersFilter$=t.LifecyclePolicyRuleAction$=t.LifecyclePolicyPreviewSummary$=t.LifecyclePolicyPreviewResult$=t.LifecyclePolicyPreviewFilter$=t.LayerFailure$=t.Layer$=t.InitiateLayerUploadResponse$=t.InitiateLayerUploadRequest$=t.ImageTagMutabilityExclusionFilter$=t.ImageSigningStatus$=t.ImageScanStatus$=t.ImageScanningConfiguration$=t.ImageScanFindingsSummary$=t.ImageScanFindings$=t.ImageScanFinding$=t.ImageReplicationStatus$=t.ImageReferrer$=t.ImageIdentifier$=t.ImageFailure$=t.ImageDetail$=t.Image$=t.GetSigningConfigurationResponse$=t.GetSigningConfigurationRequest$=t.GetRepositoryPolicyResponse$=t.GetRepositoryPolicyRequest$=t.GetRegistryScanningConfigurationResponse$=t.GetRegistryScanningConfigurationRequest$=t.GetRegistryPolicyResponse$=t.GetRegistryPolicyRequest$=t.GetLifecyclePolicyResponse$=t.GetLifecyclePolicyRequest$=t.GetLifecyclePolicyPreviewResponse$=t.GetLifecyclePolicyPreviewRequest$=t.GetDownloadUrlForLayerResponse$=t.GetDownloadUrlForLayerRequest$=t.GetAuthorizationTokenResponse$=t.GetAuthorizationTokenRequest$=t.GetAccountSettingResponse$=t.GetAccountSettingRequest$=t.EnhancedImageScanFinding$=t.EncryptionConfigurationForRepositoryCreationTemplate$=t.EncryptionConfiguration$=t.DescribeRepositoryCreationTemplatesResponse$=t.DescribeRepositoryCreationTemplatesRequest$=t.DescribeRepositoriesResponse$=void 0;t.StartImageScanResponse$=t.StartImageScanRequest$=t.SigningRule$=t.SigningRepositoryFilter$=t.SigningConfiguration$=t.SetRepositoryPolicyResponse$=t.SetRepositoryPolicyRequest$=t.ScoreDetails$=t.ScanningRepositoryFilter$=t.ResourceDetails$=t.Resource$=t.RepositoryScanningConfigurationFailure$=t.RepositoryScanningConfiguration$=t.RepositoryFilter$=t.RepositoryCreationTemplate$=t.Repository$=t.ReplicationRule$=t.ReplicationDestination$=t.ReplicationConfiguration$=t.Remediation$=t.RegistryScanningRule$=t.RegistryScanningConfiguration$=t.RegisterPullTimeUpdateExclusionResponse$=t.RegisterPullTimeUpdateExclusionRequest$=t.Recommendation$=t.PutSigningConfigurationResponse$=t.PutSigningConfigurationRequest$=t.PutReplicationConfigurationResponse$=t.PutReplicationConfigurationRequest$=t.PutRegistryScanningConfigurationResponse$=t.PutRegistryScanningConfigurationRequest$=t.PutRegistryPolicyResponse$=t.PutRegistryPolicyRequest$=t.PutLifecyclePolicyResponse$=t.PutLifecyclePolicyRequest$=t.PutImageTagMutabilityResponse$=t.PutImageTagMutabilityRequest$=t.PutImageScanningConfigurationResponse$=t.PutImageScanningConfigurationRequest$=t.PutImageResponse$=t.PutImageRequest$=t.PutAccountSettingResponse$=t.PutAccountSettingRequest$=t.PullThroughCacheRule$=t.PackageVulnerabilityDetails$=t.ListTagsForResourceResponse$=t.ListTagsForResourceRequest$=t.ListPullTimeUpdateExclusionsResponse$=t.ListPullTimeUpdateExclusionsRequest$=t.ListImagesResponse$=void 0;t.GetRegistryPolicy$=t.GetLifecyclePolicyPreview$=t.GetLifecyclePolicy$=t.GetDownloadUrlForLayer$=t.GetAuthorizationToken$=t.GetAccountSetting$=t.DescribeRepositoryCreationTemplates$=t.DescribeRepositories$=t.DescribeRegistry$=t.DescribePullThroughCacheRules$=t.DescribeImageSigningStatus$=t.DescribeImageScanFindings$=t.DescribeImages$=t.DescribeImageReplicationStatus$=t.DeregisterPullTimeUpdateExclusion$=t.DeleteSigningConfiguration$=t.DeleteRepositoryPolicy$=t.DeleteRepositoryCreationTemplate$=t.DeleteRepository$=t.DeleteRegistryPolicy$=t.DeletePullThroughCacheRule$=t.DeleteLifecyclePolicy$=t.CreateRepositoryCreationTemplate$=t.CreateRepository$=t.CreatePullThroughCacheRule$=t.CompleteLayerUpload$=t.BatchGetRepositoryScanningConfiguration$=t.BatchGetImage$=t.BatchDeleteImage$=t.BatchCheckLayerAvailability$=t.VulnerablePackage$=t.ValidatePullThroughCacheRuleResponse$=t.ValidatePullThroughCacheRuleRequest$=t.UploadLayerPartResponse$=t.UploadLayerPartRequest$=t.UpdateRepositoryCreationTemplateResponse$=t.UpdateRepositoryCreationTemplateRequest$=t.UpdatePullThroughCacheRuleResponse$=t.UpdatePullThroughCacheRuleRequest$=t.UpdateImageStorageClassResponse$=t.UpdateImageStorageClassRequest$=t.UntagResourceResponse$=t.UntagResourceRequest$=t.TransitioningImageTotalCount$=t.TagResourceResponse$=t.TagResourceRequest$=t.Tag$=t.SubjectIdentifier$=t.StartLifecyclePolicyPreviewResponse$=t.StartLifecyclePolicyPreviewRequest$=void 0;t.ValidatePullThroughCacheRule$=t.UploadLayerPart$=t.UpdateRepositoryCreationTemplate$=t.UpdatePullThroughCacheRule$=t.UpdateImageStorageClass$=t.UntagResource$=t.TagResource$=t.StartLifecyclePolicyPreview$=t.StartImageScan$=t.SetRepositoryPolicy$=t.RegisterPullTimeUpdateExclusion$=t.PutSigningConfiguration$=t.PutReplicationConfiguration$=t.PutRegistryScanningConfiguration$=t.PutRegistryPolicy$=t.PutLifecyclePolicy$=t.PutImageTagMutability$=t.PutImageScanningConfiguration$=t.PutImage$=t.PutAccountSetting$=t.ListTagsForResource$=t.ListPullTimeUpdateExclusions$=t.ListImages$=t.ListImageReferrers$=t.InitiateLayerUpload$=t.GetSigningConfiguration$=t.GetRepositoryPolicy$=t.GetRegistryScanningConfiguration$=void 0;const o="Attribute";const i="AuthorizationData";const c="AuthorizationDataList";const d="AwsEcrContainerImageDetails";const p="AttributeList";const y="BlockedByOrganizationPolicyException";const C="BatchCheckLayerAvailability";const Q="BatchCheckLayerAvailabilityRequest";const v="BatchCheckLayerAvailabilityResponse";const D="BatchDeleteImage";const k="BatchDeleteImageRequest";const $="BatchDeleteImageResponse";const V="BatchGetImage";const ee="BatchGetImageRequest";const te="BatchGetImageResponse";const re="BatchGetRepositoryScanningConfiguration";const ne="BatchGetRepositoryScanningConfigurationRequest";const se="BatchGetRepositoryScanningConfigurationResponse";const oe="CompleteLayerUpload";const ie="CompleteLayerUploadRequest";const ae="CompleteLayerUploadResponse";const ce="CreatePullThroughCacheRule";const le="CreatePullThroughCacheRuleRequest";const ue="CreatePullThroughCacheRuleResponse";const de="CreateRepository";const pe="CreateRepositoryCreationTemplate";const Ae="CreateRepositoryCreationTemplateRequest";const me="CreateRepositoryCreationTemplateResponse";const ge="CreateRepositoryRequest";const fe="CreateRepositoryResponse";const he="CvssScore";const ye="CvssScoreAdjustment";const Ee="CvssScoreAdjustmentList";const Ce="CvssScoreDetails";const Ie="CvssScoreList";const be="DescribeImages";const Se="DescribeImagesFilter";const Be="DescribeImagesRequest";const we="DescribeImageReplicationStatus";const Re="DescribeImageReplicationStatusRequest";const Ne="DescribeImageReplicationStatusResponse";const Qe="DescribeImagesResponse";const xe="DescribeImageScanFindings";const Te="DescribeImageScanFindingsRequest";const ve="DescribeImageScanFindingsResponse";const Pe="DescribeImageSigningStatus";const De="DescribeImageSigningStatusRequest";const ke="DescribeImageSigningStatusResponse";const _e="DeleteLifecyclePolicy";const Le="DeleteLifecyclePolicyRequest";const Oe="DeleteLifecyclePolicyResponse";const Fe="DeletePullThroughCacheRule";const Ue="DeletePullThroughCacheRuleRequest";const Me="DeletePullThroughCacheRuleResponse";const He="DescribePullThroughCacheRulesRequest";const $e="DescribePullThroughCacheRulesResponse";const Ge="DescribePullThroughCacheRules";const qe="DeregisterPullTimeUpdateExclusion";const ze="DeregisterPullTimeUpdateExclusionRequest";const Ve="DeregisterPullTimeUpdateExclusionResponse";const je="DeleteRepository";const Ye="DeleteRepositoryCreationTemplate";const Je="DeleteRepositoryCreationTemplateRequest";const We="DeleteRepositoryCreationTemplateResponse";const Ke="DescribeRepositoryCreationTemplatesRequest";const Xe="DescribeRepositoryCreationTemplatesResponse";const Ze="DescribeRepositoryCreationTemplates";const At="DeleteRegistryPolicy";const mt="DeleteRegistryPolicyRequest";const ht="DeleteRegistryPolicyResponse";const yt="DeleteRepositoryPolicyRequest";const Et="DeleteRepositoryPolicyResponse";const Ct="DeleteRepositoryPolicy";const It="DeleteRepositoryRequest";const bt="DeleteRepositoryResponse";const St="DescribeRegistryRequest";const Bt="DescribeRegistryResponse";const wt="DescribeRepositoriesRequest";const Rt="DescribeRepositoriesResponse";const Nt="DescribeRegistry";const Qt="DescribeRepositories";const xt="DeleteSigningConfiguration";const Tt="DeleteSigningConfigurationRequest";const vt="DeleteSigningConfigurationResponse";const Pt="ExclusionAlreadyExistsException";const Dt="EncryptionConfiguration";const kt="EncryptionConfigurationForRepositoryCreationTemplate";const _t="EnhancedImageScanFinding";const Lt="EnhancedImageScanFindingList";const Ot="ExclusionNotFoundException";const Ft="EmptyUploadException";const Ut="GetAccountSetting";const Mt="GetAccountSettingRequest";const Ht="GetAccountSettingResponse";const $t="GetAuthorizationToken";const Gt="GetAuthorizationTokenRequest";const qt="GetAuthorizationTokenResponse";const zt="GetDownloadUrlForLayer";const Vt="GetDownloadUrlForLayerRequest";const jt="GetDownloadUrlForLayerResponse";const Yt="GetLifecyclePolicy";const Jt="GetLifecyclePolicyPreview";const Wt="GetLifecyclePolicyPreviewRequest";const Kt="GetLifecyclePolicyPreviewResponse";const Xt="GetLifecyclePolicyRequest";const Zt="GetLifecyclePolicyResponse";const er="GetRegistryPolicy";const tr="GetRegistryPolicyRequest";const rr="GetRegistryPolicyResponse";const nr="GetRepositoryPolicyRequest";const sr="GetRepositoryPolicyResponse";const or="GetRepositoryPolicy";const ir="GetRegistryScanningConfiguration";const ar="GetRegistryScanningConfigurationRequest";const cr="GetRegistryScanningConfigurationResponse";const lr="GetSigningConfiguration";const ur="GetSigningConfigurationRequest";const dr="GetSigningConfigurationResponse";const pr="Image";const Ar="ImageArchivedException";const mr="ImageAlreadyExistsException";const gr="ImageDetail";const fr="ImageDigestDoesNotMatchException";const hr="ImageDetailList";const yr="ImageFailure";const Er="ImageFailureList";const Cr="ImageIdentifier";const Ir="ImageIdentifierList";const br="ImageList";const Sr="InvalidLayerException";const Br="InvalidLayerPartException";const wr="InitiateLayerUpload";const Rr="InitiateLayerUploadRequest";const Nr="InitiateLayerUploadResponse";const Qr="ImageNotFoundException";const xr="InvalidParameterException";const Tr="ImageReferrer";const vr="ImageReferrerList";const Pr="ImageReplicationStatus";const Dr="ImageReplicationStatusList";const kr="ImageScanningConfiguration";const _r="ImageStorageClassUpdateNotSupportedException";const Lr="ImageScanFinding";const Or="ImageScanFindingList";const Fr="ImageScanFindingsSummary";const Ur="ImageScanFindings";const Mr="ImageScanStatus";const Hr="ImageSigningStatusList";const $r="ImageSigningStatus";const Gr="ImageTagAlreadyExistsException";const qr="ImageTagMutabilityExclusionFilter";const zr="ImageTagMutabilityExclusionFilters";const Vr="InvalidTagParameterException";const jr="Key";const Yr="KmsException";const Jr="Layer";const Wr="LayerAlreadyExistsException";const Kr="LimitExceededException";const Xr="LayerFailure";const Zr="LayerFailureList";const en="ListImages";const tn="LayerInaccessibleException";const rn="ListImagesFilter";const nn="ListImagesRequest";const sn="ListImageReferrersFilter";const on="ListImageReferrersRequest";const an="ListImageReferrersResponse";const cn="ListImagesResponse";const ln="ListImageReferrers";const un="LayerList";const dn="LayersNotFoundException";const pn="LifecyclePolicyNotFoundException";const An="LifecyclePolicyPreviewFilter";const mn="LifecyclePolicyPreviewInProgressException";const gn="LifecyclePolicyPreviewNotFoundException";const hn="LifecyclePolicyPreviewResult";const yn="LifecyclePolicyPreviewResultList";const En="LifecyclePolicyPreviewSummary";const Cn="LifecyclePolicyRuleAction";const In="LayerPartTooSmallException";const bn="ListPullTimeUpdateExclusions";const Sn="ListPullTimeUpdateExclusionsRequest";const Bn="ListPullTimeUpdateExclusionsResponse";const wn="ListTagsForResource";const Rn="ListTagsForResourceRequest";const Nn="ListTagsForResourceResponse";const Qn="PutAccountSetting";const xn="PutAccountSettingRequest";const Tn="PutAccountSettingResponse";const vn="PutImage";const Pn="PutImageRequest";const Dn="PutImageResponse";const kn="PutImageScanningConfiguration";const _n="PutImageScanningConfigurationRequest";const Ln="PutImageScanningConfigurationResponse";const On="PutImageTagMutability";const Fn="PutImageTagMutabilityRequest";const Un="PutImageTagMutabilityResponse";const Mn="PutLifecyclePolicy";const Hn="PutLifecyclePolicyRequest";const $n="PutLifecyclePolicyResponse";const Gn="PutReplicationConfiguration";const qn="PutReplicationConfigurationRequest";const zn="PutReplicationConfigurationResponse";const Vn="PutRegistryPolicy";const jn="PutRegistryPolicyRequest";const Yn="PutRegistryPolicyResponse";const Jn="PutRegistryScanningConfiguration";const Wn="PutRegistryScanningConfigurationRequest";const Kn="PutRegistryScanningConfigurationResponse";const Xn="PutSigningConfiguration";const Zn="PutSigningConfigurationRequest";const es="PutSigningConfigurationResponse";const ts="PullThroughCacheRule";const rs="PullThroughCacheRuleAlreadyExistsException";const ns="PullThroughCacheRuleList";const ss="PullThroughCacheRuleNotFoundException";const os="PackageVulnerabilityDetails";const as="Recommendation";const cs="RepositoryAlreadyExistsException";const ls="ReplicationConfiguration";const us="RepositoryCreationTemplate";const ds="RepositoryCreationTemplateList";const ps="ReplicationDestination";const As="ReplicationDestinationList";const ms="ResourceDetails";const gs="RepositoryFilter";const fs="RepositoryFilterList";const hs="ReferencedImagesNotFoundException";const ys="RepositoryList";const Es="ResourceList";const Cs="RepositoryNotEmptyException";const Is="RepositoryNotFoundException";const bs="RegistryPolicyNotFoundException";const Ss="RepositoryPolicyNotFoundException";const Bs="RegisterPullTimeUpdateExclusion";const ws="RegisterPullTimeUpdateExclusionRequest";const Rs="RegisterPullTimeUpdateExclusionResponse";const Ns="ReplicationRule";const Qs="ReplicationRuleList";const xs="RegistryScanningConfiguration";const Ts="RepositoryScanningConfigurationFailure";const vs="RepositoryScanningConfigurationFailureList";const Ps="RepositoryScanningConfigurationList";const Ds="RepositoryScanningConfiguration";const ks="RegistryScanningRule";const _s="RegistryScanningRuleList";const Ls="Remediation";const Os="Repository";const Fs="Resource";const Us="SigningConfiguration";const Ms="SigningConfigurationNotFoundException";const Hs="ScoreDetails";const $s="ServerException";const Gs="SubjectIdentifier";const qs="StartImageScan";const zs="StartImageScanRequest";const Vs="StartImageScanResponse";const js="StartLifecyclePolicyPreview";const Ys="StartLifecyclePolicyPreviewRequest";const Js="StartLifecyclePolicyPreviewResponse";const Ws="ScanNotFoundException";const Ks="SecretNotFoundException";const Xs="SigningRule";const Zs="ScanningRepositoryFilter";const eo="ScanningRepositoryFilterList";const to="SigningRepositoryFilterList";const ro="SigningRepositoryFilter";const no="SigningRuleList";const so="SetRepositoryPolicy";const oo="SetRepositoryPolicyRequest";const io="SetRepositoryPolicyResponse";const ao="Tag";const co="TemplateAlreadyExistsException";const lo="TransitioningImageTotalCount";const uo="TransitioningImageTotalCounts";const po="TagList";const Ao="TooManyTagsException";const mo="TemplateNotFoundException";const go="TagResource";const fo="TagResourceRequest";const ho="TagResourceResponse";const yo="UpdateImageStorageClass";const Eo="UpdateImageStorageClassRequest";const Co="UpdateImageStorageClassResponse";const Io="UnsupportedImageTypeException";const bo="UploadLayerPart";const So="UploadLayerPartRequest";const Bo="UploadLayerPartResponse";const wo="UploadNotFoundException";const Ro="UpdatePullThroughCacheRule";const No="UpdatePullThroughCacheRuleRequest";const Qo="UpdatePullThroughCacheRuleResponse";const xo="UntagResource";const To="UpdateRepositoryCreationTemplate";const vo="UpdateRepositoryCreationTemplateRequest";const Po="UpdateRepositoryCreationTemplateResponse";const Do="UntagResourceRequest";const ko="UntagResourceResponse";const _o="UnableToAccessSecretException";const Lo="UnableToDecryptSecretValueException";const Oo="UnableToGetUpstreamImageException";const Fo="UnableToGetUpstreamLayerException";const Uo="UnsupportedUpstreamRegistryException";const Mo="Value";const Ho="ValidationException";const $o="VulnerablePackage";const Go="VulnerablePackagesList";const qo="ValidatePullThroughCacheRule";const zo="ValidatePullThroughCacheRuleRequest";const Vo="ValidatePullThroughCacheRuleResponse";const jo="architecture";const Yo="awsAccountId";const Jo="authorizationData";const Wo="awsEcrContainerImage";const Ko="appliedFor";const Xo="acceptedMediaTypes";const Zo="artifactMediaType";const ei="appliedRulePriority";const ti="artifactStatus";const ri="appliedScanFilters";const ni="authorizationToken";const si="artifactType";const oi="artifactTypes";const ii="action";const ai="adjustments";const ci="annotations";const li="arch";const ui="attributes";const di="author";const pi="baseScore";const Ai="client";const mi="credentialArn";const gi="createdAt";const fi="customRoleArn";const hi="cvss";const yi="description";const Ei="downloadUrl";const Ci="destinations";const Ii="details";const bi="digest";const Si="error";const Bi="expiresAt";const wi="exploitAvailable";const Ri="encryptionConfiguration";const Ni="enhancedFindings";const Qi="expiringImageTotalCount";const xi="ecrRepositoryPrefix";const Ti="ecrRepositoryPrefixes";const vi="encryptionType";const Pi="epoch";const Di="failures";const ki="findingArn";const _i="fixAvailable";const Li="failureCode";const Oi="fixedInVersion";const Fi="firstObservedAt";const Ui="filePath";const Mi="failureReason";const Hi="findingSeverityCounts";const $i="filterType";const Gi="failure";const qi="filter";const zi="findings";const Vi="force";const ji="httpError";const Yi="images";const Ji="imageDetails";const Wi="imageDigest";const Ki="imageHash";const Xi="imageIds";const Zi="imageId";const ea="imageManifest";const ta="imageManifestMediaType";const ra="imagePushedAt";const na="imageStatus";const sa="imageScanningConfiguration";const oa="imageScanCompletedAt";const ia="imageScanFindings";const aa="imageScanFindingsSummary";const ca="imageSizeInBytes";const la="imageScanStatus";const ua="imageTags";const da="imageTotalCount";const pa="imageTagMutability";const Aa="imageTagMutabilityExclusionFilters";const ma="imageTag";const ga="inUseCount";const fa="isValid";const ha="id";const ya="image";const Ea="key";const Ca="kmsError";const Ia="kmsKey";const ba="layers";const Sa="layerAvailability";const Ba="lastArchivedAt";const wa="lastActivatedAt";const Ra="lastByteReceived";const Na="layerDigests";const Qa="layerDigest";const xa="lastEvaluatedAt";const Ta="lastInUseAt";const va="lastObservedAt";const Pa="lifecyclePolicy";const Da="layerPartBlob";const ka="lifecyclePolicyText";const _a="lastRecordedPullTime";const La="layerSize";const Oa="lastValidByteReceived";const Fa="message";const Ua="maxResults";const Ma="mediaType";const Ha="metric";const $a="name";const Ga="nextToken";const qa="platform";const za="pushedAt";const Va="principalArn";const ja="proxyEndpoint";const Ya="partFirstByte";const Ja="partLastByte";const Wa="packageManager";const Ka="previewResults";const Xa="partSize";const Za="policyText";const ec="pullThroughCacheRules";const tc="pullTimeUpdateExclusions";const rc="packageVulnerabilityDetails";const nc="prefix";const sc="prefixes";const oc="registry";const ic="resourceArn";const ac="repositoryArn";const cc="replicationConfiguration";const lc="repositoryCreationTemplate";const uc="repositoryCreationTemplates";const dc="repositoryFilters";const pc="registryId";const Ac="registryIds";const mc="repositoryName";const gc="repositoryNames";const fc="repositoryPolicy";const hc="replicationStatuses";const yc="registryScanningConfiguration";const Ec="resourceTags";const Cc="referenceUrls";const Ic="repositoryUri";const bc="relatedVulnerabilities";const Sc="repository";const Bc="reason";const wc="recommendation";const Rc="referrers";const Nc="region";const Qc="release";const xc="remediation";const Tc="repositories";const vc="resources";const Pc="rules";const Dc="smithy.ts.sdk.synthetic.com.amazonaws.ecr";const kc="scanningConfigurations";const _c="scanningConfiguration";const Lc="signingConfiguration";const Oc="storageClass";const Fc="scoreDetails";const Uc="scanFrequency";const Mc="subjectId";const Hc="sourceLayerHash";const $c="subjectManifestDigest";const Gc="scanOnPush";const qc="signingProfileArn";const zc="scoreSource";const Vc="signingStatuses";const jc="scanType";const Yc="sourceUrl";const Jc="scoringVector";const Wc="score";const Kc="server";const Xc="severity";const Zc="size";const el="source";const tl="status";const rl="summary";const nl="tags";const sl="transitioningImageTotalCounts";const ol="tagKeys";const il="tagStatus";const al="targetStorageClass";const cl="text";const ll="title";const ul="type";const dl="uri";const pl="updatedAt";const Al="uploadId";const ml="upstreamRegistry";const gl="upstreamRepositoryPrefix";const fl="upstreamRegistryUrl";const hl="url";const yl="value";const El="vendorCreatedAt";const Cl="vulnerabilityId";const Il="vulnerablePackages";const bl="vendorSeverity";const Sl="vulnerabilitySourceUpdatedAt";const Bl="vendorUpdatedAt";const wl="version";const Rl="com.amazonaws.ecr";const Nl=n(6890);const Ql=n(5502);const xl=n(4901);const Tl=Nl.TypeRegistry.for(Dc);t.ECRServiceException$=[-3,Dc,"ECRServiceException",0,[],[]];Tl.registerError(t.ECRServiceException$,Ql.ECRServiceException);const vl=Nl.TypeRegistry.for(Rl);t.BlockedByOrganizationPolicyException$=[-3,Rl,y,{[Si]:Ai},[Fa],[0]];vl.registerError(t.BlockedByOrganizationPolicyException$,xl.BlockedByOrganizationPolicyException);t.EmptyUploadException$=[-3,Rl,Ft,{[Si]:Ai},[Fa],[0]];vl.registerError(t.EmptyUploadException$,xl.EmptyUploadException);t.ExclusionAlreadyExistsException$=[-3,Rl,Pt,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ExclusionAlreadyExistsException$,xl.ExclusionAlreadyExistsException);t.ExclusionNotFoundException$=[-3,Rl,Ot,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ExclusionNotFoundException$,xl.ExclusionNotFoundException);t.ImageAlreadyExistsException$=[-3,Rl,mr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageAlreadyExistsException$,xl.ImageAlreadyExistsException);t.ImageArchivedException$=[-3,Rl,Ar,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageArchivedException$,xl.ImageArchivedException);t.ImageDigestDoesNotMatchException$=[-3,Rl,fr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageDigestDoesNotMatchException$,xl.ImageDigestDoesNotMatchException);t.ImageNotFoundException$=[-3,Rl,Qr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageNotFoundException$,xl.ImageNotFoundException);t.ImageStorageClassUpdateNotSupportedException$=[-3,Rl,_r,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageStorageClassUpdateNotSupportedException$,xl.ImageStorageClassUpdateNotSupportedException);t.ImageTagAlreadyExistsException$=[-3,Rl,Gr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageTagAlreadyExistsException$,xl.ImageTagAlreadyExistsException);t.InvalidLayerException$=[-3,Rl,Sr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.InvalidLayerException$,xl.InvalidLayerException);t.InvalidLayerPartException$=[-3,Rl,Br,{[Si]:Ai},[pc,mc,Al,Oa,Fa],[0,0,0,1,0]];vl.registerError(t.InvalidLayerPartException$,xl.InvalidLayerPartException);t.InvalidParameterException$=[-3,Rl,xr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.InvalidParameterException$,xl.InvalidParameterException);t.InvalidTagParameterException$=[-3,Rl,Vr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.InvalidTagParameterException$,xl.InvalidTagParameterException);t.KmsException$=[-3,Rl,Yr,{[Si]:Ai},[Fa,Ca],[0,0]];vl.registerError(t.KmsException$,xl.KmsException);t.LayerAlreadyExistsException$=[-3,Rl,Wr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LayerAlreadyExistsException$,xl.LayerAlreadyExistsException);t.LayerInaccessibleException$=[-3,Rl,tn,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LayerInaccessibleException$,xl.LayerInaccessibleException);t.LayerPartTooSmallException$=[-3,Rl,In,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LayerPartTooSmallException$,xl.LayerPartTooSmallException);t.LayersNotFoundException$=[-3,Rl,dn,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LayersNotFoundException$,xl.LayersNotFoundException);t.LifecyclePolicyNotFoundException$=[-3,Rl,pn,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LifecyclePolicyNotFoundException$,xl.LifecyclePolicyNotFoundException);t.LifecyclePolicyPreviewInProgressException$=[-3,Rl,mn,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LifecyclePolicyPreviewInProgressException$,xl.LifecyclePolicyPreviewInProgressException);t.LifecyclePolicyPreviewNotFoundException$=[-3,Rl,gn,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LifecyclePolicyPreviewNotFoundException$,xl.LifecyclePolicyPreviewNotFoundException);t.LimitExceededException$=[-3,Rl,Kr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LimitExceededException$,xl.LimitExceededException);t.PullThroughCacheRuleAlreadyExistsException$=[-3,Rl,rs,{[Si]:Ai},[Fa],[0]];vl.registerError(t.PullThroughCacheRuleAlreadyExistsException$,xl.PullThroughCacheRuleAlreadyExistsException);t.PullThroughCacheRuleNotFoundException$=[-3,Rl,ss,{[Si]:Ai},[Fa],[0]];vl.registerError(t.PullThroughCacheRuleNotFoundException$,xl.PullThroughCacheRuleNotFoundException);t.ReferencedImagesNotFoundException$=[-3,Rl,hs,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ReferencedImagesNotFoundException$,xl.ReferencedImagesNotFoundException);t.RegistryPolicyNotFoundException$=[-3,Rl,bs,{[Si]:Ai},[Fa],[0]];vl.registerError(t.RegistryPolicyNotFoundException$,xl.RegistryPolicyNotFoundException);t.RepositoryAlreadyExistsException$=[-3,Rl,cs,{[Si]:Ai},[Fa],[0]];vl.registerError(t.RepositoryAlreadyExistsException$,xl.RepositoryAlreadyExistsException);t.RepositoryNotEmptyException$=[-3,Rl,Cs,{[Si]:Ai},[Fa],[0]];vl.registerError(t.RepositoryNotEmptyException$,xl.RepositoryNotEmptyException);t.RepositoryNotFoundException$=[-3,Rl,Is,{[Si]:Ai},[Fa],[0]];vl.registerError(t.RepositoryNotFoundException$,xl.RepositoryNotFoundException);t.RepositoryPolicyNotFoundException$=[-3,Rl,Ss,{[Si]:Ai},[Fa],[0]];vl.registerError(t.RepositoryPolicyNotFoundException$,xl.RepositoryPolicyNotFoundException);t.ScanNotFoundException$=[-3,Rl,Ws,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ScanNotFoundException$,xl.ScanNotFoundException);t.SecretNotFoundException$=[-3,Rl,Ks,{[Si]:Ai},[Fa],[0]];vl.registerError(t.SecretNotFoundException$,xl.SecretNotFoundException);t.ServerException$=[-3,Rl,$s,{[Si]:Kc},[Fa],[0]];vl.registerError(t.ServerException$,xl.ServerException);t.SigningConfigurationNotFoundException$=[-3,Rl,Ms,{[Si]:Ai},[Fa],[0]];vl.registerError(t.SigningConfigurationNotFoundException$,xl.SigningConfigurationNotFoundException);t.TemplateAlreadyExistsException$=[-3,Rl,co,{[Si]:Ai},[Fa],[0]];vl.registerError(t.TemplateAlreadyExistsException$,xl.TemplateAlreadyExistsException);t.TemplateNotFoundException$=[-3,Rl,mo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.TemplateNotFoundException$,xl.TemplateNotFoundException);t.TooManyTagsException$=[-3,Rl,Ao,{[Si]:Ai},[Fa],[0]];vl.registerError(t.TooManyTagsException$,xl.TooManyTagsException);t.UnableToAccessSecretException$=[-3,Rl,_o,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnableToAccessSecretException$,xl.UnableToAccessSecretException);t.UnableToDecryptSecretValueException$=[-3,Rl,Lo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnableToDecryptSecretValueException$,xl.UnableToDecryptSecretValueException);t.UnableToGetUpstreamImageException$=[-3,Rl,Oo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnableToGetUpstreamImageException$,xl.UnableToGetUpstreamImageException);t.UnableToGetUpstreamLayerException$=[-3,Rl,Fo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnableToGetUpstreamLayerException$,xl.UnableToGetUpstreamLayerException);t.UnsupportedImageTypeException$=[-3,Rl,Io,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnsupportedImageTypeException$,xl.UnsupportedImageTypeException);t.UnsupportedUpstreamRegistryException$=[-3,Rl,Uo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnsupportedUpstreamRegistryException$,xl.UnsupportedUpstreamRegistryException);t.UploadNotFoundException$=[-3,Rl,wo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UploadNotFoundException$,xl.UploadNotFoundException);t.ValidationException$=[-3,Rl,Ho,{[Si]:Ai,[ji]:400},[Fa],[0]];vl.registerError(t.ValidationException$,xl.ValidationException);t.errorTypeRegistries=[Tl,vl];t.Attribute$=[3,Rl,o,0,[Ea,yl],[0,0],1];t.AuthorizationData$=[3,Rl,i,0,[ni,Bi,ja],[0,4,0]];t.AwsEcrContainerImageDetails$=[3,Rl,d,0,[jo,di,Ki,ua,qa,za,Ta,ga,oc,mc],[0,0,0,64|0,0,4,4,1,0,0]];t.BatchCheckLayerAvailabilityRequest$=[3,Rl,Q,0,[mc,Na,pc],[0,64|0,0],2];t.BatchCheckLayerAvailabilityResponse$=[3,Rl,v,0,[ba,Di],[()=>Zl,()=>Xl]];t.BatchDeleteImageRequest$=[3,Rl,k,0,[mc,Xi,pc],[0,()=>$l,0],2];t.BatchDeleteImageResponse$=[3,Rl,$,0,[Xi,Di],[()=>$l,()=>Hl]];t.BatchGetImageRequest$=[3,Rl,ee,0,[mc,Xi,pc,Xo],[0,()=>$l,0,64|0],2];t.BatchGetImageResponse$=[3,Rl,te,0,[Yi,Di],[()=>Gl,()=>Hl]];t.BatchGetRepositoryScanningConfigurationRequest$=[3,Rl,ne,0,[gc],[64|0],1];t.BatchGetRepositoryScanningConfigurationResponse$=[3,Rl,se,0,[kc,Di],[()=>hu,()=>fu]];t.CompleteLayerUploadRequest$=[3,Rl,ie,0,[mc,Al,Na,pc],[0,0,64|0,0],3];t.CompleteLayerUploadResponse$=[3,Rl,ae,0,[pc,mc,Al,Qa],[0,0,0,0]];t.CreatePullThroughCacheRuleRequest$=[3,Rl,le,0,[xi,fl,pc,ml,mi,fi,gl],[0,0,0,0,0,0,0],2];t.CreatePullThroughCacheRuleResponse$=[3,Rl,ue,0,[xi,fl,gi,pc,ml,mi,fi,gl],[0,0,4,0,0,0,0,0]];t.CreateRepositoryCreationTemplateRequest$=[3,Rl,Ae,0,[nc,Ko,yi,Ri,Ec,pa,Aa,fc,Pa,fi],[0,64|0,0,()=>t.EncryptionConfigurationForRepositoryCreationTemplate$,()=>Bu,0,()=>Jl,0,0,0],2];t.CreateRepositoryCreationTemplateResponse$=[3,Rl,me,0,[pc,lc],[0,()=>t.RepositoryCreationTemplate$]];t.CreateRepositoryRequest$=[3,Rl,ge,0,[mc,pc,nl,pa,Aa,sa,Ri],[0,0,()=>Bu,0,()=>Jl,()=>t.ImageScanningConfiguration$,()=>t.EncryptionConfiguration$],1];t.CreateRepositoryResponse$=[3,Rl,fe,0,[Sc],[()=>t.Repository$]];t.CvssScore$=[3,Rl,he,0,[pi,Jc,el,wl],[1,0,0,0]];t.CvssScoreAdjustment$=[3,Rl,ye,0,[Ha,Bc],[0,0]];t.CvssScoreDetails$=[3,Rl,Ce,0,[ai,Wc,zc,Jc,wl],[()=>Ll,1,0,0,0]];t.DeleteLifecyclePolicyRequest$=[3,Rl,Le,0,[mc,pc],[0,0],1];t.DeleteLifecyclePolicyResponse$=[3,Rl,Oe,0,[pc,mc,ka,xa],[0,0,0,4]];t.DeletePullThroughCacheRuleRequest$=[3,Rl,Ue,0,[xi,pc],[0,0],1];t.DeletePullThroughCacheRuleResponse$=[3,Rl,Me,0,[xi,fl,gi,pc,mi,fi,gl],[0,0,4,0,0,0,0]];t.DeleteRegistryPolicyRequest$=[3,Rl,mt,0,[],[]];t.DeleteRegistryPolicyResponse$=[3,Rl,ht,0,[pc,Za],[0,0]];t.DeleteRepositoryCreationTemplateRequest$=[3,Rl,Je,0,[nc],[0],1];t.DeleteRepositoryCreationTemplateResponse$=[3,Rl,We,0,[pc,lc],[0,()=>t.RepositoryCreationTemplate$]];t.DeleteRepositoryPolicyRequest$=[3,Rl,yt,0,[mc,pc],[0,0],1];t.DeleteRepositoryPolicyResponse$=[3,Rl,Et,0,[pc,mc,Za],[0,0,0]];t.DeleteRepositoryRequest$=[3,Rl,It,0,[mc,pc,Vi],[0,0,2],1];t.DeleteRepositoryResponse$=[3,Rl,bt,0,[Sc],[()=>t.Repository$]];t.DeleteSigningConfigurationRequest$=[3,Rl,Tt,0,[],[]];t.DeleteSigningConfigurationResponse$=[3,Rl,vt,0,[pc,Lc],[0,()=>t.SigningConfiguration$]];t.DeregisterPullTimeUpdateExclusionRequest$=[3,Rl,ze,0,[Va],[0],1];t.DeregisterPullTimeUpdateExclusionResponse$=[3,Rl,Ve,0,[Va],[0]];t.DescribeImageReplicationStatusRequest$=[3,Rl,Re,0,[mc,Zi,pc],[0,()=>t.ImageIdentifier$,0],2];t.DescribeImageReplicationStatusResponse$=[3,Rl,Ne,0,[mc,Zi,hc],[0,()=>t.ImageIdentifier$,()=>zl]];t.DescribeImageScanFindingsRequest$=[3,Rl,Te,0,[mc,Zi,pc,Ga,Ua],[0,()=>t.ImageIdentifier$,0,0,1],2];t.DescribeImageScanFindingsResponse$=[3,Rl,ve,0,[pc,mc,Zi,la,ia,Ga],[0,0,()=>t.ImageIdentifier$,()=>t.ImageScanStatus$,()=>t.ImageScanFindings$,0]];t.DescribeImagesFilter$=[3,Rl,Se,0,[il,na],[0,0]];t.DescribeImageSigningStatusRequest$=[3,Rl,De,0,[mc,Zi,pc],[0,()=>t.ImageIdentifier$,0],2];t.DescribeImageSigningStatusResponse$=[3,Rl,ke,0,[mc,Zi,pc,Vc],[0,()=>t.ImageIdentifier$,0,()=>jl]];t.DescribeImagesRequest$=[3,Rl,Be,0,[mc,pc,Xi,Ga,Ua,qi],[0,0,()=>$l,0,1,()=>t.DescribeImagesFilter$],1];t.DescribeImagesResponse$=[3,Rl,Qe,0,[Ji,Ga],[()=>Ml,0]];t.DescribePullThroughCacheRulesRequest$=[3,Rl,He,0,[pc,Ti,Ga,Ua],[0,64|0,0,1]];t.DescribePullThroughCacheRulesResponse$=[3,Rl,$e,0,[ec,Ga],[()=>nu,0]];t.DescribeRegistryRequest$=[3,Rl,St,0,[],[]];t.DescribeRegistryResponse$=[3,Rl,Bt,0,[pc,cc],[0,()=>t.ReplicationConfiguration$]];t.DescribeRepositoriesRequest$=[3,Rl,wt,0,[pc,gc,Ga,Ua],[0,64|0,0,1]];t.DescribeRepositoriesResponse$=[3,Rl,Rt,0,[Tc,Ga],[()=>mu,0]];t.DescribeRepositoryCreationTemplatesRequest$=[3,Rl,Ke,0,[sc,Ga,Ua],[64|0,0,1]];t.DescribeRepositoryCreationTemplatesResponse$=[3,Rl,Xe,0,[pc,uc,Ga],[0,()=>pu,0]];t.EncryptionConfiguration$=[3,Rl,Dt,0,[vi,Ia],[0,0],1];t.EncryptionConfigurationForRepositoryCreationTemplate$=[3,Rl,kt,0,[vi,Ia],[0,0],1];t.EnhancedImageScanFinding$=[3,Rl,_t,0,[Yo,yi,ki,Fi,va,rc,xc,vc,Wc,Fc,Xc,tl,ll,ul,pl,_i,wi],[0,0,0,4,4,()=>t.PackageVulnerabilityDetails$,()=>t.Remediation$,()=>yu,1,()=>t.ScoreDetails$,0,0,0,0,4,0,0]];t.GetAccountSettingRequest$=[3,Rl,Mt,0,[$a],[0],1];t.GetAccountSettingResponse$=[3,Rl,Ht,0,[$a,yl],[0,0]];t.GetAuthorizationTokenRequest$=[3,Rl,Gt,0,[Ac],[64|0]];t.GetAuthorizationTokenResponse$=[3,Rl,qt,0,[Jo],[()=>kl]];t.GetDownloadUrlForLayerRequest$=[3,Rl,Vt,0,[mc,Qa,pc],[0,0,0],2];t.GetDownloadUrlForLayerResponse$=[3,Rl,jt,0,[Ei,Qa],[0,0]];t.GetLifecyclePolicyPreviewRequest$=[3,Rl,Wt,0,[mc,pc,Xi,Ga,Ua,qi],[0,0,()=>$l,0,1,()=>t.LifecyclePolicyPreviewFilter$],1];t.GetLifecyclePolicyPreviewResponse$=[3,Rl,Kt,0,[pc,mc,ka,tl,Ga,Ka,rl],[0,0,0,0,0,()=>eu,()=>t.LifecyclePolicyPreviewSummary$]];t.GetLifecyclePolicyRequest$=[3,Rl,Xt,0,[mc,pc],[0,0],1];t.GetLifecyclePolicyResponse$=[3,Rl,Zt,0,[pc,mc,ka,xa],[0,0,0,4]];t.GetRegistryPolicyRequest$=[3,Rl,tr,0,[],[]];t.GetRegistryPolicyResponse$=[3,Rl,rr,0,[pc,Za],[0,0]];t.GetRegistryScanningConfigurationRequest$=[3,Rl,ar,0,[],[]];t.GetRegistryScanningConfigurationResponse$=[3,Rl,cr,0,[pc,_c],[0,()=>t.RegistryScanningConfiguration$]];t.GetRepositoryPolicyRequest$=[3,Rl,nr,0,[mc,pc],[0,0],1];t.GetRepositoryPolicyResponse$=[3,Rl,sr,0,[pc,mc,Za],[0,0,0]];t.GetSigningConfigurationRequest$=[3,Rl,ur,0,[],[]];t.GetSigningConfigurationResponse$=[3,Rl,dr,0,[pc,Lc],[0,()=>t.SigningConfiguration$]];t.Image$=[3,Rl,pr,0,[pc,mc,Zi,ea,ta],[0,0,()=>t.ImageIdentifier$,0,0]];t.ImageDetail$=[3,Rl,gr,0,[pc,mc,Wi,ua,ca,ra,la,aa,ta,Zo,_a,$c,na,Ba,wa],[0,0,0,64|0,1,4,()=>t.ImageScanStatus$,()=>t.ImageScanFindingsSummary$,0,0,4,0,0,4,4]];t.ImageFailure$=[3,Rl,yr,0,[Zi,Li,Mi],[()=>t.ImageIdentifier$,0,0]];t.ImageIdentifier$=[3,Rl,Cr,0,[Wi,ma],[0,0]];t.ImageReferrer$=[3,Rl,Tr,0,[bi,Ma,Zc,si,ci,ti],[0,0,1,0,128|0,0],3];t.ImageReplicationStatus$=[3,Rl,Pr,0,[Nc,pc,tl,Li],[0,0,0,0]];t.ImageScanFinding$=[3,Rl,Lr,0,[$a,yi,dl,Xc,ui],[0,0,0,0,()=>Dl]];t.ImageScanFindings$=[3,Rl,Ur,0,[oa,Sl,Hi,zi,Ni],[4,4,128|1,()=>Vl,()=>Fl]];t.ImageScanFindingsSummary$=[3,Rl,Fr,0,[oa,Sl,Hi],[4,4,128|1]];t.ImageScanningConfiguration$=[3,Rl,kr,0,[Gc],[2]];t.ImageScanStatus$=[3,Rl,Mr,0,[tl,yi],[0,0]];t.ImageSigningStatus$=[3,Rl,$r,0,[qc,Li,Mi,tl],[0,0,0,0]];t.ImageTagMutabilityExclusionFilter$=[3,Rl,qr,0,[$i,qi],[0,0],2];t.InitiateLayerUploadRequest$=[3,Rl,Rr,0,[mc,pc],[0,0],1];t.InitiateLayerUploadResponse$=[3,Rl,Nr,0,[Al,Xa],[0,1]];t.Layer$=[3,Rl,Jr,0,[Qa,Sa,La,Ma],[0,0,1,0]];t.LayerFailure$=[3,Rl,Xr,0,[Qa,Li,Mi],[0,0,0]];t.LifecyclePolicyPreviewFilter$=[3,Rl,An,0,[il],[0]];t.LifecyclePolicyPreviewResult$=[3,Rl,hn,0,[ua,Wi,ra,ii,ei,Oc],[64|0,0,4,()=>t.LifecyclePolicyRuleAction$,1,0]];t.LifecyclePolicyPreviewSummary$=[3,Rl,En,0,[Qi,sl],[1,()=>wu]];t.LifecyclePolicyRuleAction$=[3,Rl,Cn,0,[ul,al],[0,0]];t.ListImageReferrersFilter$=[3,Rl,sn,0,[oi,ti],[64|0,0]];t.ListImageReferrersRequest$=[3,Rl,on,0,[mc,Mc,pc,qi,Ga,Ua],[0,()=>t.SubjectIdentifier$,0,()=>t.ListImageReferrersFilter$,0,1],2];t.ListImageReferrersResponse$=[3,Rl,an,0,[Rc,Ga],[()=>ql,0]];t.ListImagesFilter$=[3,Rl,rn,0,[il,na],[0,0]];t.ListImagesRequest$=[3,Rl,nn,0,[mc,pc,Ga,Ua,qi],[0,0,0,1,()=>t.ListImagesFilter$],1];t.ListImagesResponse$=[3,Rl,cn,0,[Xi,Ga],[()=>$l,0]];t.ListPullTimeUpdateExclusionsRequest$=[3,Rl,Sn,0,[Ua,Ga],[1,0]];t.ListPullTimeUpdateExclusionsResponse$=[3,Rl,Bn,0,[tc,Ga],[64|0,0]];t.ListTagsForResourceRequest$=[3,Rl,Rn,0,[ic],[0],1];t.ListTagsForResourceResponse$=[3,Rl,Nn,0,[nl],[()=>Bu]];t.PackageVulnerabilityDetails$=[3,Rl,os,0,[hi,Cc,bc,el,Yc,El,bl,Bl,Cl,Il],[()=>Ol,64|0,64|0,0,0,4,0,4,0,()=>Ru]];t.PullThroughCacheRule$=[3,Rl,ts,0,[xi,fl,gi,pc,mi,fi,gl,ml,pl],[0,0,4,0,0,0,0,0,4]];t.PutAccountSettingRequest$=[3,Rl,xn,0,[$a,yl],[0,0],2];t.PutAccountSettingResponse$=[3,Rl,Tn,0,[$a,yl],[0,0]];t.PutImageRequest$=[3,Rl,Pn,0,[mc,ea,pc,ta,ma,Wi],[0,0,0,0,0,0],2];t.PutImageResponse$=[3,Rl,Dn,0,[ya],[()=>t.Image$]];t.PutImageScanningConfigurationRequest$=[3,Rl,_n,0,[mc,sa,pc],[0,()=>t.ImageScanningConfiguration$,0],2];t.PutImageScanningConfigurationResponse$=[3,Rl,Ln,0,[pc,mc,sa],[0,0,()=>t.ImageScanningConfiguration$]];t.PutImageTagMutabilityRequest$=[3,Rl,Fn,0,[mc,pa,pc,Aa],[0,0,0,()=>Jl],2];t.PutImageTagMutabilityResponse$=[3,Rl,Un,0,[pc,mc,pa,Aa],[0,0,0,()=>Jl]];t.PutLifecyclePolicyRequest$=[3,Rl,Hn,0,[mc,ka,pc],[0,0,0],2];t.PutLifecyclePolicyResponse$=[3,Rl,$n,0,[pc,mc,ka],[0,0,0]];t.PutRegistryPolicyRequest$=[3,Rl,jn,0,[Za],[0],1];t.PutRegistryPolicyResponse$=[3,Rl,Yn,0,[pc,Za],[0,0]];t.PutRegistryScanningConfigurationRequest$=[3,Rl,Wn,0,[jc,Pc],[0,()=>cu]];t.PutRegistryScanningConfigurationResponse$=[3,Rl,Kn,0,[yc],[()=>t.RegistryScanningConfiguration$]];t.PutReplicationConfigurationRequest$=[3,Rl,qn,0,[cc],[()=>t.ReplicationConfiguration$],1];t.PutReplicationConfigurationResponse$=[3,Rl,zn,0,[cc],[()=>t.ReplicationConfiguration$]];t.PutSigningConfigurationRequest$=[3,Rl,Zn,0,[Lc],[()=>t.SigningConfiguration$],1];t.PutSigningConfigurationResponse$=[3,Rl,es,0,[Lc],[()=>t.SigningConfiguration$]];t.Recommendation$=[3,Rl,as,0,[hl,cl],[0,0]];t.RegisterPullTimeUpdateExclusionRequest$=[3,Rl,ws,0,[Va],[0],1];t.RegisterPullTimeUpdateExclusionResponse$=[3,Rl,Rs,0,[Va,gi],[0,4]];t.RegistryScanningConfiguration$=[3,Rl,xs,0,[jc,Pc],[0,()=>cu]];t.RegistryScanningRule$=[3,Rl,ks,0,[Uc,dc],[0,()=>Cu],2];t.Remediation$=[3,Rl,Ls,0,[wc],[()=>t.Recommendation$]];t.ReplicationConfiguration$=[3,Rl,ls,0,[Pc],[()=>du],1];t.ReplicationDestination$=[3,Rl,ps,0,[Nc,pc],[0,0],2];t.ReplicationRule$=[3,Rl,Ns,0,[Ci,dc],[()=>uu,()=>Au],1];t.Repository$=[3,Rl,Os,0,[ac,pc,mc,Ic,gi,pa,Aa,sa,Ri],[0,0,0,0,4,0,()=>Jl,()=>t.ImageScanningConfiguration$,()=>t.EncryptionConfiguration$]];t.RepositoryCreationTemplate$=[3,Rl,us,0,[nc,yi,Ri,Ec,pa,Aa,fc,Pa,Ko,fi,gi,pl],[0,0,()=>t.EncryptionConfigurationForRepositoryCreationTemplate$,()=>Bu,0,()=>Jl,0,0,64|0,0,4,4]];t.RepositoryFilter$=[3,Rl,gs,0,[qi,$i],[0,0],2];t.RepositoryScanningConfiguration$=[3,Rl,Ds,0,[ac,mc,Gc,Uc,ri],[0,0,2,0,()=>Cu]];t.RepositoryScanningConfigurationFailure$=[3,Rl,Ts,0,[mc,Li,Mi],[0,0,0]];t.Resource$=[3,Rl,Fs,0,[Ii,ha,nl,ul],[()=>t.ResourceDetails$,0,128|0,0]];t.ResourceDetails$=[3,Rl,ms,0,[Wo],[()=>t.AwsEcrContainerImageDetails$]];t.ScanningRepositoryFilter$=[3,Rl,Zs,0,[qi,$i],[0,0],2];t.ScoreDetails$=[3,Rl,Hs,0,[hi],[()=>t.CvssScoreDetails$]];t.SetRepositoryPolicyRequest$=[3,Rl,oo,0,[mc,Za,pc,Vi],[0,0,0,2],2];t.SetRepositoryPolicyResponse$=[3,Rl,io,0,[pc,mc,Za],[0,0,0]];t.SigningConfiguration$=[3,Rl,Us,0,[Pc],[()=>bu],1];t.SigningRepositoryFilter$=[3,Rl,ro,0,[qi,$i],[0,0],2];t.SigningRule$=[3,Rl,Xs,0,[qc,dc],[0,()=>Iu],1];t.StartImageScanRequest$=[3,Rl,zs,0,[mc,Zi,pc],[0,()=>t.ImageIdentifier$,0],2];t.StartImageScanResponse$=[3,Rl,Vs,0,[pc,mc,Zi,la],[0,0,()=>t.ImageIdentifier$,()=>t.ImageScanStatus$]];t.StartLifecyclePolicyPreviewRequest$=[3,Rl,Ys,0,[mc,pc,ka],[0,0,0],1];t.StartLifecyclePolicyPreviewResponse$=[3,Rl,Js,0,[pc,mc,ka,tl],[0,0,0,0]];t.SubjectIdentifier$=[3,Rl,Gs,0,[Wi],[0],1];t.Tag$=[3,Rl,ao,0,[jr,Mo],[0,0],2];t.TagResourceRequest$=[3,Rl,fo,0,[ic,nl],[0,()=>Bu],2];t.TagResourceResponse$=[3,Rl,ho,0,[],[]];t.TransitioningImageTotalCount$=[3,Rl,lo,0,[al,da],[0,1]];t.UntagResourceRequest$=[3,Rl,Do,0,[ic,ol],[0,64|0],2];t.UntagResourceResponse$=[3,Rl,ko,0,[],[]];t.UpdateImageStorageClassRequest$=[3,Rl,Eo,0,[mc,Zi,al,pc],[0,()=>t.ImageIdentifier$,0,0],3];t.UpdateImageStorageClassResponse$=[3,Rl,Co,0,[pc,mc,Zi,na],[0,0,()=>t.ImageIdentifier$,0]];t.UpdatePullThroughCacheRuleRequest$=[3,Rl,No,0,[xi,pc,mi,fi],[0,0,0,0],1];t.UpdatePullThroughCacheRuleResponse$=[3,Rl,Qo,0,[xi,pc,pl,mi,fi,gl],[0,0,4,0,0,0]];t.UpdateRepositoryCreationTemplateRequest$=[3,Rl,vo,0,[nc,yi,Ri,Ec,pa,Aa,fc,Pa,Ko,fi],[0,0,()=>t.EncryptionConfigurationForRepositoryCreationTemplate$,()=>Bu,0,()=>Jl,0,0,64|0,0],1];t.UpdateRepositoryCreationTemplateResponse$=[3,Rl,Po,0,[pc,lc],[0,()=>t.RepositoryCreationTemplate$]];t.UploadLayerPartRequest$=[3,Rl,So,0,[mc,Al,Ya,Ja,Da,pc],[0,0,1,1,21,0],5];t.UploadLayerPartResponse$=[3,Rl,Bo,0,[pc,mc,Al,Ra],[0,0,0,1]];t.ValidatePullThroughCacheRuleRequest$=[3,Rl,zo,0,[xi,pc],[0,0],1];t.ValidatePullThroughCacheRuleResponse$=[3,Rl,Vo,0,[xi,pc,fl,mi,fi,gl,fa,Gi],[0,0,0,0,0,0,2,0]];t.VulnerablePackage$=[3,Rl,$o,0,[li,Pi,Ui,$a,Wa,Qc,Hc,wl,Oi],[0,1,0,0,0,0,0,0,0]];var Pl=null&&64|0;var Dl=[1,Rl,p,0,()=>t.Attribute$];var kl=[1,Rl,c,0,()=>t.AuthorizationData$];var _l=null&&64|0;var Ll=[1,Rl,Ee,0,()=>t.CvssScoreAdjustment$];var Ol=[1,Rl,Ie,0,()=>t.CvssScore$];var Fl=[1,Rl,Lt,0,()=>t.EnhancedImageScanFinding$];var Ul=null&&64|0;var Ml=[1,Rl,hr,0,()=>t.ImageDetail$];var Hl=[1,Rl,Er,0,()=>t.ImageFailure$];var $l=[1,Rl,Ir,0,()=>t.ImageIdentifier$];var Gl=[1,Rl,br,0,()=>t.Image$];var ql=[1,Rl,vr,0,()=>t.ImageReferrer$];var zl=[1,Rl,Dr,0,()=>t.ImageReplicationStatus$];var Vl=[1,Rl,Or,0,()=>t.ImageScanFinding$];var jl=[1,Rl,Hr,0,()=>t.ImageSigningStatus$];var Yl=null&&64|0;var Jl=[1,Rl,zr,0,()=>t.ImageTagMutabilityExclusionFilter$];var Wl=null&&64|0;var Kl=null&&64|0;var Xl=[1,Rl,Zr,0,()=>t.LayerFailure$];var Zl=[1,Rl,un,0,()=>t.Layer$];var eu=[1,Rl,yn,0,()=>t.LifecyclePolicyPreviewResult$];var tu=null&&64|0;var ru=null&&64|0;var nu=[1,Rl,ns,0,()=>t.PullThroughCacheRule$];var su=null&&64|0;var ou=null&&64|0;var iu=null&&64|0;var au=null&&64|0;var cu=[1,Rl,_s,0,()=>t.RegistryScanningRule$];var lu=null&&64|0;var uu=[1,Rl,As,0,()=>t.ReplicationDestination$];var du=[1,Rl,Qs,0,()=>t.ReplicationRule$];var pu=[1,Rl,ds,0,()=>t.RepositoryCreationTemplate$];var Au=[1,Rl,fs,0,()=>t.RepositoryFilter$];var mu=[1,Rl,ys,0,()=>t.Repository$];var gu=null&&64|0;var fu=[1,Rl,vs,0,()=>t.RepositoryScanningConfigurationFailure$];var hu=[1,Rl,Ps,0,()=>t.RepositoryScanningConfiguration$];var yu=[1,Rl,Es,0,()=>t.Resource$];var Eu=null&&64|0;var Cu=[1,Rl,eo,0,()=>t.ScanningRepositoryFilter$];var Iu=[1,Rl,to,0,()=>t.SigningRepositoryFilter$];var bu=[1,Rl,no,0,()=>t.SigningRule$];var Su=null&&64|0;var Bu=[1,Rl,po,0,()=>t.Tag$];var wu=[1,Rl,uo,0,()=>t.TransitioningImageTotalCount$];var Ru=[1,Rl,Go,0,()=>t.VulnerablePackage$];var Nu=null&&128|0;var Qu=null&&128|1;var xu=null&&128|0;t.BatchCheckLayerAvailability$=[9,Rl,C,0,()=>t.BatchCheckLayerAvailabilityRequest$,()=>t.BatchCheckLayerAvailabilityResponse$];t.BatchDeleteImage$=[9,Rl,D,0,()=>t.BatchDeleteImageRequest$,()=>t.BatchDeleteImageResponse$];t.BatchGetImage$=[9,Rl,V,0,()=>t.BatchGetImageRequest$,()=>t.BatchGetImageResponse$];t.BatchGetRepositoryScanningConfiguration$=[9,Rl,re,0,()=>t.BatchGetRepositoryScanningConfigurationRequest$,()=>t.BatchGetRepositoryScanningConfigurationResponse$];t.CompleteLayerUpload$=[9,Rl,oe,0,()=>t.CompleteLayerUploadRequest$,()=>t.CompleteLayerUploadResponse$];t.CreatePullThroughCacheRule$=[9,Rl,ce,0,()=>t.CreatePullThroughCacheRuleRequest$,()=>t.CreatePullThroughCacheRuleResponse$];t.CreateRepository$=[9,Rl,de,0,()=>t.CreateRepositoryRequest$,()=>t.CreateRepositoryResponse$];t.CreateRepositoryCreationTemplate$=[9,Rl,pe,0,()=>t.CreateRepositoryCreationTemplateRequest$,()=>t.CreateRepositoryCreationTemplateResponse$];t.DeleteLifecyclePolicy$=[9,Rl,_e,0,()=>t.DeleteLifecyclePolicyRequest$,()=>t.DeleteLifecyclePolicyResponse$];t.DeletePullThroughCacheRule$=[9,Rl,Fe,0,()=>t.DeletePullThroughCacheRuleRequest$,()=>t.DeletePullThroughCacheRuleResponse$];t.DeleteRegistryPolicy$=[9,Rl,At,0,()=>t.DeleteRegistryPolicyRequest$,()=>t.DeleteRegistryPolicyResponse$];t.DeleteRepository$=[9,Rl,je,0,()=>t.DeleteRepositoryRequest$,()=>t.DeleteRepositoryResponse$];t.DeleteRepositoryCreationTemplate$=[9,Rl,Ye,0,()=>t.DeleteRepositoryCreationTemplateRequest$,()=>t.DeleteRepositoryCreationTemplateResponse$];t.DeleteRepositoryPolicy$=[9,Rl,Ct,0,()=>t.DeleteRepositoryPolicyRequest$,()=>t.DeleteRepositoryPolicyResponse$];t.DeleteSigningConfiguration$=[9,Rl,xt,0,()=>t.DeleteSigningConfigurationRequest$,()=>t.DeleteSigningConfigurationResponse$];t.DeregisterPullTimeUpdateExclusion$=[9,Rl,qe,0,()=>t.DeregisterPullTimeUpdateExclusionRequest$,()=>t.DeregisterPullTimeUpdateExclusionResponse$];t.DescribeImageReplicationStatus$=[9,Rl,we,0,()=>t.DescribeImageReplicationStatusRequest$,()=>t.DescribeImageReplicationStatusResponse$];t.DescribeImages$=[9,Rl,be,0,()=>t.DescribeImagesRequest$,()=>t.DescribeImagesResponse$];t.DescribeImageScanFindings$=[9,Rl,xe,0,()=>t.DescribeImageScanFindingsRequest$,()=>t.DescribeImageScanFindingsResponse$];t.DescribeImageSigningStatus$=[9,Rl,Pe,0,()=>t.DescribeImageSigningStatusRequest$,()=>t.DescribeImageSigningStatusResponse$];t.DescribePullThroughCacheRules$=[9,Rl,Ge,0,()=>t.DescribePullThroughCacheRulesRequest$,()=>t.DescribePullThroughCacheRulesResponse$];t.DescribeRegistry$=[9,Rl,Nt,0,()=>t.DescribeRegistryRequest$,()=>t.DescribeRegistryResponse$];t.DescribeRepositories$=[9,Rl,Qt,0,()=>t.DescribeRepositoriesRequest$,()=>t.DescribeRepositoriesResponse$];t.DescribeRepositoryCreationTemplates$=[9,Rl,Ze,0,()=>t.DescribeRepositoryCreationTemplatesRequest$,()=>t.DescribeRepositoryCreationTemplatesResponse$];t.GetAccountSetting$=[9,Rl,Ut,0,()=>t.GetAccountSettingRequest$,()=>t.GetAccountSettingResponse$];t.GetAuthorizationToken$=[9,Rl,$t,0,()=>t.GetAuthorizationTokenRequest$,()=>t.GetAuthorizationTokenResponse$];t.GetDownloadUrlForLayer$=[9,Rl,zt,0,()=>t.GetDownloadUrlForLayerRequest$,()=>t.GetDownloadUrlForLayerResponse$];t.GetLifecyclePolicy$=[9,Rl,Yt,0,()=>t.GetLifecyclePolicyRequest$,()=>t.GetLifecyclePolicyResponse$];t.GetLifecyclePolicyPreview$=[9,Rl,Jt,0,()=>t.GetLifecyclePolicyPreviewRequest$,()=>t.GetLifecyclePolicyPreviewResponse$];t.GetRegistryPolicy$=[9,Rl,er,0,()=>t.GetRegistryPolicyRequest$,()=>t.GetRegistryPolicyResponse$];t.GetRegistryScanningConfiguration$=[9,Rl,ir,0,()=>t.GetRegistryScanningConfigurationRequest$,()=>t.GetRegistryScanningConfigurationResponse$];t.GetRepositoryPolicy$=[9,Rl,or,0,()=>t.GetRepositoryPolicyRequest$,()=>t.GetRepositoryPolicyResponse$];t.GetSigningConfiguration$=[9,Rl,lr,0,()=>t.GetSigningConfigurationRequest$,()=>t.GetSigningConfigurationResponse$];t.InitiateLayerUpload$=[9,Rl,wr,0,()=>t.InitiateLayerUploadRequest$,()=>t.InitiateLayerUploadResponse$];t.ListImageReferrers$=[9,Rl,ln,0,()=>t.ListImageReferrersRequest$,()=>t.ListImageReferrersResponse$];t.ListImages$=[9,Rl,en,0,()=>t.ListImagesRequest$,()=>t.ListImagesResponse$];t.ListPullTimeUpdateExclusions$=[9,Rl,bn,0,()=>t.ListPullTimeUpdateExclusionsRequest$,()=>t.ListPullTimeUpdateExclusionsResponse$];t.ListTagsForResource$=[9,Rl,wn,0,()=>t.ListTagsForResourceRequest$,()=>t.ListTagsForResourceResponse$];t.PutAccountSetting$=[9,Rl,Qn,0,()=>t.PutAccountSettingRequest$,()=>t.PutAccountSettingResponse$];t.PutImage$=[9,Rl,vn,0,()=>t.PutImageRequest$,()=>t.PutImageResponse$];t.PutImageScanningConfiguration$=[9,Rl,kn,0,()=>t.PutImageScanningConfigurationRequest$,()=>t.PutImageScanningConfigurationResponse$];t.PutImageTagMutability$=[9,Rl,On,0,()=>t.PutImageTagMutabilityRequest$,()=>t.PutImageTagMutabilityResponse$];t.PutLifecyclePolicy$=[9,Rl,Mn,0,()=>t.PutLifecyclePolicyRequest$,()=>t.PutLifecyclePolicyResponse$];t.PutRegistryPolicy$=[9,Rl,Vn,0,()=>t.PutRegistryPolicyRequest$,()=>t.PutRegistryPolicyResponse$];t.PutRegistryScanningConfiguration$=[9,Rl,Jn,0,()=>t.PutRegistryScanningConfigurationRequest$,()=>t.PutRegistryScanningConfigurationResponse$];t.PutReplicationConfiguration$=[9,Rl,Gn,0,()=>t.PutReplicationConfigurationRequest$,()=>t.PutReplicationConfigurationResponse$];t.PutSigningConfiguration$=[9,Rl,Xn,0,()=>t.PutSigningConfigurationRequest$,()=>t.PutSigningConfigurationResponse$];t.RegisterPullTimeUpdateExclusion$=[9,Rl,Bs,0,()=>t.RegisterPullTimeUpdateExclusionRequest$,()=>t.RegisterPullTimeUpdateExclusionResponse$];t.SetRepositoryPolicy$=[9,Rl,so,0,()=>t.SetRepositoryPolicyRequest$,()=>t.SetRepositoryPolicyResponse$];t.StartImageScan$=[9,Rl,qs,0,()=>t.StartImageScanRequest$,()=>t.StartImageScanResponse$];t.StartLifecyclePolicyPreview$=[9,Rl,js,0,()=>t.StartLifecyclePolicyPreviewRequest$,()=>t.StartLifecyclePolicyPreviewResponse$];t.TagResource$=[9,Rl,go,0,()=>t.TagResourceRequest$,()=>t.TagResourceResponse$];t.UntagResource$=[9,Rl,xo,0,()=>t.UntagResourceRequest$,()=>t.UntagResourceResponse$];t.UpdateImageStorageClass$=[9,Rl,yo,0,()=>t.UpdateImageStorageClassRequest$,()=>t.UpdateImageStorageClassResponse$];t.UpdatePullThroughCacheRule$=[9,Rl,Ro,0,()=>t.UpdatePullThroughCacheRuleRequest$,()=>t.UpdatePullThroughCacheRuleResponse$];t.UpdateRepositoryCreationTemplate$=[9,Rl,To,0,()=>t.UpdateRepositoryCreationTemplateRequest$,()=>t.UpdateRepositoryCreationTemplateResponse$];t.UploadLayerPart$=[9,Rl,bo,0,()=>t.UploadLayerPartRequest$,()=>t.UploadLayerPartResponse$];t.ValidatePullThroughCacheRule$=[9,Rl,qo,0,()=>t.ValidatePullThroughCacheRuleRequest$,()=>t.ValidatePullThroughCacheRuleResponse$]},8704:(e,t,n)=>{var o=n(2356);var i=n(402);var c=n(8857);var d=n(5152);var p=n(5118);var y=n(4645);var C=n(6890);var Q=n(1411);var v=n(3422);var D=n(2430);var k=n(8385);var $=n(1577);var V=n(4274);const ee={warningEmitted:false};const emitWarningIfUnsupportedVersion=e=>{if(e&&!ee.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<20){ee.warningEmitted=true;process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js ${e} in January 2026.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/c895JFp`)}};function setCredentialFeature(e,t,n){if(!e.$source){e.$source={}}e.$source[t]=n;return e}function setFeature(e,t,n){if(!e.__aws_sdk_context){e.__aws_sdk_context={features:{}}}else if(!e.__aws_sdk_context.features){e.__aws_sdk_context.features={}}e.__aws_sdk_context.features[t]=n}function setTokenFeature(e,t,n){if(!e.$source){e.$source={}}e.$source[t]=n;return e}const getDateHeader=e=>o.HttpResponse.isInstance(e)?e.headers?.date??e.headers?.Date:undefined;const getSkewCorrectedDate=e=>new Date(Date.now()+e);const isClockSkewed=(e,t)=>Math.abs(getSkewCorrectedDate(t).getTime()-e)>=3e5;const getUpdatedSystemClockOffset=(e,t)=>{const n=Date.parse(e);if(isClockSkewed(n,t)){return n-Date.now()}return t};const throwSigningPropertyError=(e,t)=>{if(!t){throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`)}return t};const validateSigningProperties=async e=>{const t=throwSigningPropertyError("context",e.context);const n=throwSigningPropertyError("config",e.config);const o=t.endpointV2?.properties?.authSchemes?.[0];const i=throwSigningPropertyError("signer",n.signer);const c=await i(o);const d=e?.signingRegion;const p=e?.signingRegionSet;const y=e?.signingName;return{config:n,signer:c,signingRegion:d,signingRegionSet:p,signingName:y}};class AwsSdkSigV4Signer{async sign(e,t,n){if(!o.HttpRequest.isInstance(e)){throw new Error("The request is not an instance of `HttpRequest` and cannot be signed")}const i=await validateSigningProperties(n);const{config:c,signer:d}=i;let{signingRegion:p,signingName:y}=i;const C=n.context;if(C?.authSchemes?.length??0>1){const[e,t]=C.authSchemes;if(e?.name==="sigv4a"&&t?.name==="sigv4"){p=t?.signingRegion??p;y=t?.signingName??y}}const Q=await d.sign(e,{signingDate:getSkewCorrectedDate(c.systemClockOffset),signingRegion:p,signingService:y});return Q}errorHandler(e){return t=>{const n=t.ServerTime??getDateHeader(t.$response);if(n){const o=throwSigningPropertyError("config",e.config);const i=o.systemClockOffset;o.systemClockOffset=getUpdatedSystemClockOffset(n,o.systemClockOffset);const c=o.systemClockOffset!==i;if(c&&t.$metadata){t.$metadata.clockSkewCorrected=true}}throw t}}successHandler(e,t){const n=getDateHeader(e);if(n){const e=throwSigningPropertyError("config",t.config);e.systemClockOffset=getUpdatedSystemClockOffset(n,e.systemClockOffset)}}}const te=AwsSdkSigV4Signer;class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer{async sign(e,t,n){if(!o.HttpRequest.isInstance(e)){throw new Error("The request is not an instance of `HttpRequest` and cannot be signed")}const{config:i,signer:c,signingRegion:d,signingRegionSet:p,signingName:y}=await validateSigningProperties(n);const C=await(i.sigv4aSigningRegionSet?.());const Q=(C??p??[d]).join(",");const v=await c.sign(e,{signingDate:getSkewCorrectedDate(i.systemClockOffset),signingRegion:Q,signingService:y});return v}}const getArrayForCommaSeparatedString=e=>typeof e==="string"&&e.length>0?e.split(",").map((e=>e.trim())):[];const getBearerTokenEnvKey=e=>`AWS_BEARER_TOKEN_${e.replace(/[\s-]/g,"_").toUpperCase()}`;const re="AWS_AUTH_SCHEME_PREFERENCE";const ne="auth_scheme_preference";const se={environmentVariableSelector:(e,t)=>{if(t?.signingName){const n=getBearerTokenEnvKey(t.signingName);if(n in e)return["httpBearerAuth"]}if(!(re in e))return undefined;return getArrayForCommaSeparatedString(e[re])},configFileSelector:e=>{if(!(ne in e))return undefined;return getArrayForCommaSeparatedString(e[ne])},default:[]};const resolveAwsSdkSigV4AConfig=e=>{e.sigv4aSigningRegionSet=i.normalizeProvider(e.sigv4aSigningRegionSet);return e};const oe={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET){return e.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((e=>e.trim()))}throw new c.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:true})},configFileSelector(e){if(e.sigv4a_signing_region_set){return(e.sigv4a_signing_region_set??"").split(",").map((e=>e.trim()))}throw new c.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:true})},default:undefined};const resolveAwsSdkSigV4Config=e=>{let t=e.credentials;let n=!!e.credentials;let o=undefined;Object.defineProperty(e,"credentials",{set(i){if(i&&i!==t&&i!==o){n=true}t=i;const c=normalizeCredentialProvider(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider});const p=bindCallerConfig(e,c);if(n&&!p.attributed){const e=typeof t==="object"&&t!==null;o=async t=>{const n=await p(t);const o=n;if(e&&(!o.$source||Object.keys(o.$source).length===0)){return d.setCredentialFeature(o,"CREDENTIALS_CODE","e")}return o};o.memoized=p.memoized;o.configBound=p.configBound;o.attributed=true}else{o=p}},get(){return o},enumerable:true,configurable:true});e.credentials=t;const{signingEscapePath:c=true,systemClockOffset:y=e.systemClockOffset||0,sha256:C}=e;let Q;if(e.signer){Q=i.normalizeProvider(e.signer)}else if(e.regionInfoProvider){Q=()=>i.normalizeProvider(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([t,n])=>{const{signingRegion:o,signingService:i}=t;e.signingRegion=e.signingRegion||o||n;e.signingName=e.signingName||i||e.serviceId;const d={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:C,uriEscapePath:c};const y=e.signerConstructor||p.SignatureV4;return new y(d)}))}else{Q=async t=>{t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await i.normalizeProvider(e.region)(),properties:{}},t);const n=t.signingRegion;const o=t.signingName;e.signingRegion=e.signingRegion||n;e.signingName=e.signingName||o||e.serviceId;const d={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:C,uriEscapePath:c};const y=e.signerConstructor||p.SignatureV4;return new y(d)}}const v=Object.assign(e,{systemClockOffset:y,signingEscapePath:c,signer:Q});return v};const ie=resolveAwsSdkSigV4Config;function normalizeCredentialProvider(e,{credentials:t,credentialDefaultProvider:n}){let o;if(t){if(!t?.memoized){o=i.memoizeIdentityProvider(t,i.isIdentityExpired,i.doesIdentityRequireRefresh)}else{o=t}}else{if(n){o=i.normalizeProvider(n(Object.assign({},e,{parentClientConfig:e})))}else{o=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")}}}o.memoized=true;return o}function bindCallerConfig(e,t){if(t.configBound){return t}const fn=async n=>t({...n,callerClientConfig:e});fn.memoized=t.memoized;fn.configBound=true;return fn}class ProtocolLib{queryCompat;constructor(e=false){this.queryCompat=e}resolveRestContentType(e,t){const n=t.getMemberSchemas();const o=Object.values(n).find((e=>!!e.getMergedTraits().httpPayload));if(o){const t=o.getMergedTraits().mediaType;if(t){return t}else if(o.isStringSchema()){return"text/plain"}else if(o.isBlobSchema()){return"application/octet-stream"}else{return e}}else if(!t.isUnitSchema()){const t=Object.values(n).find((e=>{const{httpQuery:t,httpQueryParams:n,httpHeader:o,httpLabel:i,httpPrefixHeaders:c}=e.getMergedTraits();const d=c===void 0;return!t&&!n&&!o&&!i&&d}));if(t){return e}}}async getErrorSchemaOrThrowBaseException(e,t,n,o,i,c){let d=t;let p=e;if(e.includes("#")){[d,p]=e.split("#")}const y={$metadata:i,$fault:n.statusCode<500?"client":"server"};const Q=C.TypeRegistry.for(d);try{const t=c?.(Q,p)??Q.getSchema(e);return{errorSchema:t,errorMetadata:y}}catch(e){o.message=o.message??o.Message??"UnknownError";const t=C.TypeRegistry.for("smithy.ts.sdk.synthetic."+d);const n=t.getBaseException();if(n){const e=t.getErrorCtor(n)??Error;throw this.decorateServiceException(Object.assign(new e({name:p}),y),o)}throw this.decorateServiceException(Object.assign(new Error(p),y),o)}}decorateServiceException(e,t={}){if(this.queryCompat){const n=e.Message??t.Message;const o=Q.decorateServiceException(e,t);if(n){o.message=n}o.Error={...o.Error,Type:o.Error?.Type,Code:o.Error?.Code,Message:o.Error?.message??o.Error?.Message??n};const i=o.$metadata.requestId;if(i){o.RequestId=i}return o}return Q.decorateServiceException(e,t)}setQueryCompatError(e,t){const n=t.headers?.["x-amzn-query-error"];if(e!==undefined&&n!=null){const[t,o]=n.split(";");const i=Object.entries(e);const c={Code:t,Type:o};Object.assign(e,c);for(const[e,t]of i){c[e==="message"?"Message":e]=t}delete c.__type;e.Error=c}}queryCompatOutput(e,t){if(e.Error){t.Error=e.Error}if(e.Type){t.Type=e.Type}if(e.Code){t.Code=e.Code}}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch(n){return e.find((e=>C.NormalizedSchema.of(e).getMergedTraits().awsQueryError?.[0]===t))}}}class AwsSmithyRpcV2CborProtocol extends y.SmithyRpcV2CborProtocol{awsQueryCompatible;mixin;constructor({defaultNamespace:e,awsQueryCompatible:t}){super({defaultNamespace:e});this.awsQueryCompatible=!!t;this.mixin=new ProtocolLib(this.awsQueryCompatible)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(this.awsQueryCompatible){o.headers["x-amzn-query-mode"]="true"}return o}async handleError(e,t,n,o,i){if(this.awsQueryCompatible){this.mixin.setQueryCompatError(o,n)}const c=(()=>{const e=n.headers["x-amzn-query-error"];if(e&&this.awsQueryCompatible){return e.split(";")[0]}return y.loadSmithyRpcV2CborErrorCode(n,o)??"Unknown"})();const{errorSchema:d,errorMetadata:p}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:undefined);const Q=C.NormalizedSchema.of(d);const v=o.message??o.Message??"Unknown";const D=C.TypeRegistry.for(d[1]).getErrorCtor(d)??Error;const k=new D(v);const $={};for(const[e,t]of Q.structIterator()){if(o[e]!=null){$[e]=this.deserializer.readValue(t,o[e])}}if(this.awsQueryCompatible){this.mixin.queryCompatOutput(o,$)}throw this.mixin.decorateServiceException(Object.assign(k,p,{$fault:Q.getMergedTraits().error,message:v},$),o)}}const _toStr=e=>{if(e==null){return e}if(typeof e==="number"||typeof e==="bigint"){const t=new Error(`Received number ${e} where a string was expected.`);t.name="Warning";console.warn(t);return String(e)}if(typeof e==="boolean"){const t=new Error(`Received boolean ${e} where a string was expected.`);t.name="Warning";console.warn(t);return String(e)}return e};const _toBool=e=>{if(e==null){return e}if(typeof e==="string"){const t=e.toLowerCase();if(e!==""&&t!=="false"&&t!=="true"){const t=new Error(`Received string "${e}" where a boolean was expected.`);t.name="Warning";console.warn(t)}return e!==""&&t!=="false"}return e};const _toNum=e=>{if(e==null){return e}if(typeof e==="string"){const t=Number(e);if(t.toString()!==e){const t=new Error(`Received string "${e}" where a number was expected.`);t.name="Warning";console.warn(t);return e}return t}return e};class SerdeContextConfig{serdeContext;setSerdeContext(e){this.serdeContext=e}}class UnionSerde{from;to;keys;constructor(e,t){this.from=e;this.to=t;this.keys=new Set(Object.keys(this.from).filter((e=>e!=="__type")))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value;const t=this.from[e];this.to.$unknown=[e,t]}}}function jsonReviver(e,t,n){if(n?.source){const e=n.source;if(typeof t==="number"){if(t>Number.MAX_SAFE_INTEGER||tQ.collectBody(e,t).then((e=>(t?.utf8Encoder??$.toUtf8)(e)));const parseJsonBody=(e,t)=>collectBodyString(e,t).then((e=>{if(e.length){try{return JSON.parse(e)}catch(t){if(t?.name==="SyntaxError"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}}return{}}));const parseJsonErrorBody=async(e,t)=>{const n=await parseJsonBody(e,t);n.message=n.message??n.Message;return n};const loadRestJsonErrorCode=(e,t)=>{const findKey=(e,t)=>Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase()));const sanitizeErrorCode=e=>{let t=e;if(typeof t==="number"){t=t.toString()}if(t.indexOf(",")>=0){t=t.split(",")[0]}if(t.indexOf(":")>=0){t=t.split(":")[0]}if(t.indexOf("#")>=0){t=t.split("#")[1]}return t};const n=findKey(e.headers,"x-amzn-errortype");if(n!==undefined){return sanitizeErrorCode(e.headers[n])}if(t&&typeof t==="object"){const e=findKey(t,"code");if(e&&t[e]!==undefined){return sanitizeErrorCode(t[e])}if(t["__type"]!==undefined){return sanitizeErrorCode(t["__type"])}}};class JsonShapeDeserializer extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}async read(e,t){return this._read(e,typeof t==="string"?JSON.parse(t,jsonReviver):await parseJsonBody(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){const n=t!==null&&typeof t==="object";const o=C.NormalizedSchema.of(e);if(n){if(o.isStructSchema()){const e=t;const n=o.isUnionSchema();const i={};let c=void 0;const{jsonName:d}=this.settings;if(d){c={}}let p;if(n){p=new UnionSerde(e,i)}for(const[t,y]of o.structIterator()){let o=t;if(d){o=y.getMergedTraits().jsonName??o;c[o]=t}if(n){p.mark(o)}if(e[o]!=null){i[t]=this._read(y,e[o])}}if(n){p.writeUnknown()}else if(typeof e.__type==="string"){for(const[t,n]of Object.entries(e)){const e=d?c[t]??t:t;if(!(e in i)){i[e]=n}}}return i}if(Array.isArray(t)&&o.isListSchema()){const e=o.getValueSchema();const n=[];const i=!!o.getMergedTraits().sparse;for(const o of t){if(i||o!=null){n.push(this._read(e,o))}}return n}if(o.isMapSchema()){const e=o.getValueSchema();const n={};const i=!!o.getMergedTraits().sparse;for(const[o,c]of Object.entries(t)){if(i||c!=null){n[o]=this._read(e,c)}}return n}}if(o.isBlobSchema()&&typeof t==="string"){return k.fromBase64(t)}const i=o.getMergedTraits().mediaType;if(o.isStringSchema()&&typeof t==="string"&&i){const e=i==="application/json"||i.endsWith("+json");if(e){return D.LazyJsonString.from(t)}return t}if(o.isTimestampSchema()&&t!=null){const e=v.determineTimestampFormat(o,this.settings);switch(e){case 5:return D.parseRfc3339DateTimeWithOffset(t);case 6:return D.parseRfc7231DateTime(t);case 7:return D.parseEpochTimestamp(t);default:console.warn("Missing timestamp format, parsing value with Date constructor:",t);return new Date(t)}}if(o.isBigIntegerSchema()&&(typeof t==="number"||typeof t==="string")){return BigInt(t)}if(o.isBigDecimalSchema()&&t!=undefined){if(t instanceof D.NumericValue){return t}const e=t;if(e.type==="bigDecimal"&&"string"in e){return new D.NumericValue(e.string,e.type)}return new D.NumericValue(String(t),"bigDecimal")}if(o.isNumericSchema()&&typeof t==="string"){switch(t){case"Infinity":return Infinity;case"-Infinity":return-Infinity;case"NaN":return NaN}return t}if(o.isDocumentSchema()){if(n){const e=Array.isArray(t)?[]:{};for(const[n,i]of Object.entries(t)){if(i instanceof D.NumericValue){e[n]=i}else{e[n]=this._read(o,i)}}return e}else{return structuredClone(t)}}return t}}const ae=String.fromCharCode(925);class JsonReplacer{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1){throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.")}if(this.stage===2){throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.")}this.stage=1;return(e,t)=>{if(t instanceof D.NumericValue){const e=`${ae+"nv"+this.counter++}_`+t.string;this.values.set(`"${e}"`,t.string);return e}if(typeof t==="bigint"){const e=t.toString();const n=`${ae+"b"+this.counter++}_`+e;this.values.set(`"${n}"`,e);return n}return t}}replaceInJson(e){if(this.stage===0){throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.")}if(this.stage===2){throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.")}this.stage=2;if(this.counter===0){return e}for(const[t,n]of this.values){e=e.replace(t,n)}return e}}class JsonShapeSerializer extends SerdeContextConfig{settings;buffer;useReplacer=false;rootSchema;constructor(e){super();this.settings=e}write(e,t){this.rootSchema=C.NormalizedSchema.of(e);this.buffer=this._write(this.rootSchema,t)}writeDiscriminatedDocument(e,t){this.write(e,t);if(typeof this.buffer==="object"){this.buffer.__type=C.NormalizedSchema.of(e).getName(true)}}flush(){const{rootSchema:e,useReplacer:t}=this;this.rootSchema=undefined;this.useReplacer=false;if(e?.isStructSchema()||e?.isDocumentSchema()){if(!t){return JSON.stringify(this.buffer)}const e=new JsonReplacer;return e.replaceInJson(JSON.stringify(this.buffer,e.createReplacer(),0))}return this.buffer}_write(e,t,n){const o=t!==null&&typeof t==="object";const i=C.NormalizedSchema.of(e);if(o){if(i.isStructSchema()){const e=t;const n={};const{jsonName:o}=this.settings;let c=void 0;if(o){c={}}for(const[t,d]of i.structIterator()){const p=this._write(d,e[t],i);if(p!==undefined){let e=t;if(o){e=d.getMergedTraits().jsonName??t;c[t]=e}n[e]=p}}if(i.isUnionSchema()&&Object.keys(n).length===0){const{$unknown:t}=e;if(Array.isArray(t)){const[e,o]=t;n[e]=this._write(15,o)}}else if(typeof e.__type==="string"){for(const[t,i]of Object.entries(e)){const e=o?c[t]??t:t;if(!(e in n)){n[e]=this._write(15,i)}}}return n}if(Array.isArray(t)&&i.isListSchema()){const e=i.getValueSchema();const n=[];const o=!!i.getMergedTraits().sparse;for(const i of t){if(o||i!=null){n.push(this._write(e,i))}}return n}if(i.isMapSchema()){const e=i.getValueSchema();const n={};const o=!!i.getMergedTraits().sparse;for(const[i,c]of Object.entries(t)){if(o||c!=null){n[i]=this._write(e,c)}}return n}if(t instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema())){if(i===this.rootSchema){return t}return(this.serdeContext?.base64Encoder??k.toBase64)(t)}if(t instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema())){const e=v.determineTimestampFormat(i,this.settings);switch(e){case 5:return t.toISOString().replace(".000Z","Z");case 6:return D.dateToUtcString(t);case 7:return t.getTime()/1e3;default:console.warn("Missing timestamp format, using epoch seconds",t);return t.getTime()/1e3}}if(t instanceof D.NumericValue){this.useReplacer=true}}if(t===null&&n?.isStructSchema()){return void 0}if(i.isStringSchema()){if(typeof t==="undefined"&&i.isIdempotencyToken()){return D.generateIdempotencyToken()}const e=i.getMergedTraits().mediaType;if(t!=null&&e){const n=e==="application/json"||e.endsWith("+json");if(n){return D.LazyJsonString.from(t)}}return t}if(typeof t==="number"&&i.isNumericSchema()){if(Math.abs(t)===Infinity||isNaN(t)){return String(t)}return t}if(typeof t==="string"&&i.isBlobSchema()){if(i===this.rootSchema){return t}return(this.serdeContext?.base64Encoder??k.toBase64)(t)}if(typeof t==="bigint"){this.useReplacer=true}if(i.isDocumentSchema()){if(o){const e=Array.isArray(t)?[]:{};for(const[n,o]of Object.entries(t)){if(o instanceof D.NumericValue){this.useReplacer=true;e[n]=o}else{e[n]=this._write(i,o)}}return e}else{return structuredClone(t)}}return t}}class JsonCodec extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}createSerializer(){const e=new JsonShapeSerializer(this.settings);e.setSerdeContext(this.serdeContext);return e}createDeserializer(){const e=new JsonShapeDeserializer(this.settings);e.setSerdeContext(this.serdeContext);return e}}class AwsJsonRpcProtocol extends v.RpcProtocol{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e});this.serviceTarget=t;this.codec=o??new JsonCodec({timestampFormat:{useTrait:true,default:7},jsonName:false});this.serializer=this.codec.createSerializer();this.deserializer=this.codec.createDeserializer();this.awsQueryCompatible=!!n;this.mixin=new ProtocolLib(this.awsQueryCompatible)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(!o.path.endsWith("/")){o.path+="/"}Object.assign(o.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`});if(this.awsQueryCompatible){o.headers["x-amzn-query-mode"]="true"}if(C.deref(e.input)==="unit"||!o.body){o.body="{}"}return o}getPayloadCodec(){return this.codec}async handleError(e,t,n,o,i){if(this.awsQueryCompatible){this.mixin.setQueryCompatError(o,n)}const c=loadRestJsonErrorCode(n,o)??"Unknown";const{errorSchema:d,errorMetadata:p}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:undefined);const y=C.NormalizedSchema.of(d);const Q=o.message??o.Message??"Unknown";const v=C.TypeRegistry.for(d[1]).getErrorCtor(d)??Error;const D=new v(Q);const k={};for(const[e,t]of y.structIterator()){if(o[e]!=null){k[e]=this.codec.createDeserializer().readObject(t,o[e])}}if(this.awsQueryCompatible){this.mixin.queryCompatOutput(o,k)}throw this.mixin.decorateServiceException(Object.assign(D,p,{$fault:y.getMergedTraits().error,message:Q},k),o)}}class AwsJson1_0Protocol extends AwsJsonRpcProtocol{constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_0"}getJsonRpcVersion(){return"1.0"}getDefaultContentType(){return"application/x-amz-json-1.0"}}class AwsJson1_1Protocol extends AwsJsonRpcProtocol{constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}class AwsRestJsonProtocol extends v.HttpBindingProtocol{serializer;deserializer;codec;mixin=new ProtocolLib;constructor({defaultNamespace:e}){super({defaultNamespace:e});const t={timestampFormat:{useTrait:true,default:7},httpBindings:true,jsonName:true};this.codec=new JsonCodec(t);this.serializer=new v.HttpInterceptingShapeSerializer(this.codec.createSerializer(),t);this.deserializer=new v.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),t)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e);super.setSerdeContext(e)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);const i=C.NormalizedSchema.of(e.input);if(!o.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);if(e){o.headers["content-type"]=e}}if(o.body==null&&o.headers["content-type"]===this.getDefaultContentType()){o.body="{}"}return o}async deserializeResponse(e,t,n){const o=await super.deserializeResponse(e,t,n);const i=C.NormalizedSchema.of(e.output);for(const[e,t]of i.structIterator()){if(t.getMemberTraits().httpPayload&&!(e in o)){o[e]=null}}return o}async handleError(e,t,n,o,i){const c=loadRestJsonErrorCode(n,o)??"Unknown";const{errorSchema:d,errorMetadata:p}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,i);const y=C.NormalizedSchema.of(d);const Q=o.message??o.Message??"Unknown";const v=C.TypeRegistry.for(d[1]).getErrorCtor(d)??Error;const D=new v(Q);await this.deserializeHttpMessage(d,t,n,o);const k={};for(const[e,t]of y.structIterator()){const n=t.getMergedTraits().jsonName??e;k[e]=this.codec.createDeserializer().readObject(t,o[n])}throw this.mixin.decorateServiceException(Object.assign(D,p,{$fault:y.getMergedTraits().error,message:Q},k),o)}getDefaultContentType(){return"application/json"}}const awsExpectUnion=e=>{if(e==null){return undefined}if(typeof e==="object"&&"__type"in e){delete e.__type}return Q.expectUnion(e)};class XmlShapeDeserializer extends SerdeContextConfig{settings;stringDeserializer;constructor(e){super();this.settings=e;this.stringDeserializer=new v.FromStringShapeDeserializer(e)}setSerdeContext(e){this.serdeContext=e;this.stringDeserializer.setSerdeContext(e)}read(e,t,n){const o=C.NormalizedSchema.of(e);const i=o.getMemberSchemas();const c=o.isStructSchema()&&o.isMemberSchema()&&!!Object.values(i).find((e=>!!e.getMemberTraits().eventPayload));if(c){const e={};const n=Object.keys(i)[0];const o=i[n];if(o.isBlobSchema()){e[n]=t}else{e[n]=this.read(i[n],t)}return e}const d=(this.serdeContext?.utf8Encoder??$.toUtf8)(t);const p=this.parseXml(d);return this.readSchema(e,n?p[n]:p)}readSchema(e,t){const n=C.NormalizedSchema.of(e);if(n.isUnitSchema()){return}const o=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(t)){return this.readSchema(n,[t])}if(t==null){return t}if(typeof t==="object"){const e=!!o.sparse;const i=!!o.xmlFlattened;if(n.isListSchema()){const o=n.getValueSchema();const c=[];const d=o.getMergedTraits().xmlName??"member";const p=i?t:(t[0]??t)[d];const y=Array.isArray(p)?p:[p];for(const t of y){if(t!=null||e){c.push(this.readSchema(o,t))}}return c}const c={};if(n.isMapSchema()){const o=n.getKeySchema();const d=n.getValueSchema();let p;if(i){p=Array.isArray(t)?t:[t]}else{p=Array.isArray(t.entry)?t.entry:[t.entry]}const y=o.getMergedTraits().xmlName??"key";const C=d.getMergedTraits().xmlName??"value";for(const t of p){const n=t[y];const o=t[C];if(o!=null||e){c[n]=this.readSchema(d,o)}}return c}if(n.isStructSchema()){const e=n.isUnionSchema();let o;if(e){o=new UnionSerde(t,c)}for(const[i,d]of n.structIterator()){const n=d.getMergedTraits();const p=!n.httpPayload?d.getMemberTraits().xmlName??i:n.xmlName??d.getName();if(e){o.mark(p)}if(t[p]!=null){c[i]=this.readSchema(d,t[p])}}if(e){o.writeUnknown()}return c}if(n.isDocumentSchema()){return t}throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(true)}`)}if(n.isListSchema()){return[]}if(n.isMapSchema()||n.isStructSchema()){return{}}return this.stringDeserializer.read(n,t)}parseXml(e){if(e.length){let t;try{t=V.parseXML(e)}catch(t){if(t&&typeof t==="object"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}const n="#text";const o=Object.keys(t)[0];const i=t[o];if(i[n]){i[o]=i[n];delete i[n]}return Q.getValueFromTextNode(i)}return{}}}class QueryShapeSerializer extends SerdeContextConfig{settings;buffer;constructor(e){super();this.settings=e}write(e,t,n=""){if(this.buffer===undefined){this.buffer=""}const o=C.NormalizedSchema.of(e);if(n&&!n.endsWith(".")){n+="."}if(o.isBlobSchema()){if(typeof t==="string"||t instanceof Uint8Array){this.writeKey(n);this.writeValue((this.serdeContext?.base64Encoder??k.toBase64)(t))}}else if(o.isBooleanSchema()||o.isNumericSchema()||o.isStringSchema()){if(t!=null){this.writeKey(n);this.writeValue(String(t))}else if(o.isIdempotencyToken()){this.writeKey(n);this.writeValue(D.generateIdempotencyToken())}}else if(o.isBigIntegerSchema()){if(t!=null){this.writeKey(n);this.writeValue(String(t))}}else if(o.isBigDecimalSchema()){if(t!=null){this.writeKey(n);this.writeValue(t instanceof D.NumericValue?t.string:String(t))}}else if(o.isTimestampSchema()){if(t instanceof Date){this.writeKey(n);const e=v.determineTimestampFormat(o,this.settings);switch(e){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(Q.dateToUtcString(t));break;case 7:this.writeValue(String(t.getTime()/1e3));break}}}else if(o.isDocumentSchema()){if(Array.isArray(t)){this.write(64|15,t,n)}else if(t instanceof Date){this.write(4,t,n)}else if(t instanceof Uint8Array){this.write(21,t,n)}else if(t&&typeof t==="object"){this.write(128|15,t,n)}else{this.writeKey(n);this.writeValue(String(t))}}else if(o.isListSchema()){if(Array.isArray(t)){if(t.length===0){if(this.settings.serializeEmptyLists){this.writeKey(n);this.writeValue("")}}else{const e=o.getValueSchema();const i=this.settings.flattenLists||o.getMergedTraits().xmlFlattened;let c=1;for(const o of t){if(o==null){continue}const t=e.getMergedTraits();const d=this.getKey("member",t.xmlName,t.ec2QueryName);const p=i?`${n}${c}`:`${n}${d}.${c}`;this.write(e,o,p);++c}}}}else if(o.isMapSchema()){if(t&&typeof t==="object"){const e=o.getKeySchema();const i=o.getValueSchema();const c=o.getMergedTraits().xmlFlattened;let d=1;for(const[o,p]of Object.entries(t)){if(p==null){continue}const t=e.getMergedTraits();const y=this.getKey("key",t.xmlName,t.ec2QueryName);const C=c?`${n}${d}.${y}`:`${n}entry.${d}.${y}`;const Q=i.getMergedTraits();const v=this.getKey("value",Q.xmlName,Q.ec2QueryName);const D=c?`${n}${d}.${v}`:`${n}entry.${d}.${v}`;this.write(e,o,C);this.write(i,p,D);++d}}}else if(o.isStructSchema()){if(t&&typeof t==="object"){let e=false;for(const[i,c]of o.structIterator()){if(t[i]==null&&!c.isIdempotencyToken()){continue}const o=c.getMergedTraits();const d=this.getKey(i,o.xmlName,o.ec2QueryName,"struct");const p=`${n}${d}`;this.write(c,t[i],p);e=true}if(!e&&o.isUnionSchema()){const{$unknown:e}=t;if(Array.isArray(e)){const[t,o]=e;const i=`${n}${t}`;this.write(15,o,i)}}}}else if(o.isUnitSchema());else{throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${o.getName(true)}`)}}flush(){if(this.buffer===undefined){throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.")}const e=this.buffer;delete this.buffer;return e}getKey(e,t,n,o){const{ec2:i,capitalizeKeys:c}=this.settings;if(i&&n){return n}const d=t??e;if(c&&o==="struct"){return d[0].toUpperCase()+d.slice(1)}return d}writeKey(e){if(e.endsWith(".")){e=e.slice(0,e.length-1)}this.buffer+=`&${v.extendedEncodeURIComponent(e)}=`}writeValue(e){this.buffer+=v.extendedEncodeURIComponent(e)}}class AwsQueryProtocol extends v.RpcProtocol{options;serializer;deserializer;mixin=new ProtocolLib;constructor(e){super({defaultNamespace:e.defaultNamespace});this.options=e;const t={timestampFormat:{useTrait:true,default:5},httpBindings:false,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:true};this.serializer=new QueryShapeSerializer(t);this.deserializer=new XmlShapeDeserializer(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e);this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(!o.path.endsWith("/")){o.path+="/"}Object.assign(o.headers,{"content-type":`application/x-www-form-urlencoded`});if(C.deref(e.input)==="unit"||!o.body){o.body=""}const i=e.name.split("#")[1]??e.name;o.body=`Action=${i}&Version=${this.options.version}`+o.body;if(o.body.endsWith("&")){o.body=o.body.slice(-1)}return o}async deserializeResponse(e,t,n){const o=this.deserializer;const i=C.NormalizedSchema.of(e.output);const c={};if(n.statusCode>=300){const i=await v.collectBody(n.body,t);if(i.byteLength>0){Object.assign(c,await o.read(15,i))}await this.handleError(e,t,n,c,this.deserializeMetadata(n))}for(const e in n.headers){const t=n.headers[e];delete n.headers[e];n.headers[e.toLowerCase()]=t}const d=e.name.split("#")[1]??e.name;const p=i.isStructSchema()&&this.useNestedResult()?d+"Result":undefined;const y=await v.collectBody(n.body,t);if(y.byteLength>0){Object.assign(c,await o.read(i,y,p))}const Q={$metadata:this.deserializeMetadata(n),...c};return Q}useNestedResult(){return true}async handleError(e,t,n,o,i){const c=this.loadQueryErrorCode(n,o)??"Unknown";const d=this.loadQueryError(o)??{};const p=this.loadQueryErrorMessage(o);d.message=p;d.Error={Type:d.Type,Code:d.Code,Message:p};const{errorSchema:y,errorMetadata:Q}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,d,i,this.mixin.findQueryCompatibleError);const v=C.NormalizedSchema.of(y);const D=C.TypeRegistry.for(y[1]).getErrorCtor(y)??Error;const k=new D(p);const $={Type:d.Error.Type,Code:d.Error.Code,Error:d.Error};for(const[e,t]of v.structIterator()){const n=t.getMergedTraits().xmlName??e;const i=d[n]??o[n];$[e]=this.deserializer.readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(k,Q,{$fault:v.getMergedTraits().error,message:p},$),o)}loadQueryErrorCode(e,t){const n=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;if(n!==undefined){return n}if(e.statusCode==404){return"NotFound"}}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}class AwsEc2QueryProtocol extends AwsQueryProtocol{options;constructor(e){super(e);this.options=e;const t={capitalizeKeys:true,flattenLists:true,serializeEmptyLists:false,ec2:true};Object.assign(this.serializer.settings,t)}useNestedResult(){return false}}const parseXmlBody=(e,t)=>collectBodyString(e,t).then((e=>{if(e.length){let t;try{t=V.parseXML(e)}catch(t){if(t&&typeof t==="object"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}const n="#text";const o=Object.keys(t)[0];const i=t[o];if(i[n]){i[o]=i[n];delete i[n]}return Q.getValueFromTextNode(i)}return{}}));const parseXmlErrorBody=async(e,t)=>{const n=await parseXmlBody(e,t);if(n.Error){n.Error.message=n.Error.message??n.Error.Message}return n};const loadRestXmlErrorCode=(e,t)=>{if(t?.Error?.Code!==undefined){return t.Error.Code}if(t?.Code!==undefined){return t.Code}if(e.statusCode==404){return"NotFound"}};class XmlShapeSerializer extends SerdeContextConfig{settings;stringBuffer;byteBuffer;buffer;constructor(e){super();this.settings=e}write(e,t){const n=C.NormalizedSchema.of(e);if(n.isStringSchema()&&typeof t==="string"){this.stringBuffer=t}else if(n.isBlobSchema()){this.byteBuffer="byteLength"in t?t:(this.serdeContext?.base64Decoder??k.fromBase64)(t)}else{this.buffer=this.writeStruct(n,t,undefined);const e=n.getMergedTraits();if(e.httpPayload&&!e.xmlName){this.buffer.withName(n.getName())}}}flush(){if(this.byteBuffer!==undefined){const e=this.byteBuffer;delete this.byteBuffer;return e}if(this.stringBuffer!==undefined){const e=this.stringBuffer;delete this.stringBuffer;return e}const e=this.buffer;if(this.settings.xmlNamespace){if(!e?.attributes?.["xmlns"]){e.addAttribute("xmlns",this.settings.xmlNamespace)}}delete this.buffer;return e.toString()}writeStruct(e,t,n){const o=e.getMergedTraits();const i=e.isMemberSchema()&&!o.httpPayload?e.getMemberTraits().xmlName??e.getMemberName():o.xmlName??e.getName();if(!i||!e.isStructSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${e.getName(true)}.`)}const c=V.XmlNode.of(i);const[d,p]=this.getXmlnsAttribute(e,n);for(const[n,o]of e.structIterator()){const e=t[n];if(e!=null||o.isIdempotencyToken()){if(o.getMergedTraits().xmlAttribute){c.addAttribute(o.getMergedTraits().xmlName??n,this.writeSimple(o,e));continue}if(o.isListSchema()){this.writeList(o,e,c,p)}else if(o.isMapSchema()){this.writeMap(o,e,c,p)}else if(o.isStructSchema()){c.addChildNode(this.writeStruct(o,e,p))}else{const t=V.XmlNode.of(o.getMergedTraits().xmlName??o.getMemberName());this.writeSimpleInto(o,e,t,p);c.addChildNode(t)}}}const{$unknown:y}=t;if(y&&e.isUnionSchema()&&Array.isArray(y)&&Object.keys(t).length===1){const[e,n]=y;const o=V.XmlNode.of(e);if(typeof n!=="string"){if(t instanceof V.XmlNode||t instanceof V.XmlText){c.addChildNode(t)}else{throw new Error(`@aws-sdk - $unknown union member in XML requires `+`value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`)}}this.writeSimpleInto(0,n,o,p);c.addChildNode(o)}if(p){c.addAttribute(d,p)}return c}writeList(e,t,n,o){if(!e.isMemberSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${e.getName(true)}`)}const i=e.getMergedTraits();const c=e.getValueSchema();const d=c.getMergedTraits();const p=!!d.sparse;const y=!!i.xmlFlattened;const[C,Q]=this.getXmlnsAttribute(e,o);const writeItem=(t,n)=>{if(c.isListSchema()){this.writeList(c,Array.isArray(n)?n:[n],t,Q)}else if(c.isMapSchema()){this.writeMap(c,n,t,Q)}else if(c.isStructSchema()){const o=this.writeStruct(c,n,Q);t.addChildNode(o.withName(y?i.xmlName??e.getMemberName():d.xmlName??"member"))}else{const o=V.XmlNode.of(y?i.xmlName??e.getMemberName():d.xmlName??"member");this.writeSimpleInto(c,n,o,Q);t.addChildNode(o)}};if(y){for(const e of t){if(p||e!=null){writeItem(n,e)}}}else{const o=V.XmlNode.of(i.xmlName??e.getMemberName());if(Q){o.addAttribute(C,Q)}for(const e of t){if(p||e!=null){writeItem(o,e)}}n.addChildNode(o)}}writeMap(e,t,n,o,i=false){if(!e.isMemberSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${e.getName(true)}`)}const c=e.getMergedTraits();const d=e.getKeySchema();const p=d.getMergedTraits();const y=p.xmlName??"key";const C=e.getValueSchema();const Q=C.getMergedTraits();const v=Q.xmlName??"value";const D=!!Q.sparse;const k=!!c.xmlFlattened;const[$,ee]=this.getXmlnsAttribute(e,o);const addKeyValue=(e,t,n)=>{const o=V.XmlNode.of(y,t);const[i,c]=this.getXmlnsAttribute(d,ee);if(c){o.addAttribute(i,c)}e.addChildNode(o);let p=V.XmlNode.of(v);if(C.isListSchema()){this.writeList(C,n,p,ee)}else if(C.isMapSchema()){this.writeMap(C,n,p,ee,true)}else if(C.isStructSchema()){p=this.writeStruct(C,n,ee)}else{this.writeSimpleInto(C,n,p,ee)}e.addChildNode(p)};if(k){for(const[o,i]of Object.entries(t)){if(D||i!=null){const t=V.XmlNode.of(c.xmlName??e.getMemberName());addKeyValue(t,o,i);n.addChildNode(t)}}}else{let o;if(!i){o=V.XmlNode.of(c.xmlName??e.getMemberName());if(ee){o.addAttribute($,ee)}n.addChildNode(o)}for(const[e,c]of Object.entries(t)){if(D||c!=null){const t=V.XmlNode.of("entry");addKeyValue(t,e,c);(i?n:o).addChildNode(t)}}}}writeSimple(e,t){if(null===t){throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.")}const n=C.NormalizedSchema.of(e);let o=null;if(t&&typeof t==="object"){if(n.isBlobSchema()){o=(this.serdeContext?.base64Encoder??k.toBase64)(t)}else if(n.isTimestampSchema()&&t instanceof Date){const e=v.determineTimestampFormat(n,this.settings);switch(e){case 5:o=t.toISOString().replace(".000Z","Z");break;case 6:o=Q.dateToUtcString(t);break;case 7:o=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",t);o=Q.dateToUtcString(t);break}}else if(n.isBigDecimalSchema()&&t){if(t instanceof D.NumericValue){return t.string}return String(t)}else if(n.isMapSchema()||n.isListSchema()){throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.")}else{throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${n.getName(true)}`)}}if(n.isBooleanSchema()||n.isNumericSchema()||n.isBigIntegerSchema()||n.isBigDecimalSchema()){o=String(t)}if(n.isStringSchema()){if(t===undefined&&n.isIdempotencyToken()){o=D.generateIdempotencyToken()}else{o=String(t)}}if(o===null){throw new Error(`Unhandled schema-value pair ${n.getName(true)}=${t}`)}return o}writeSimpleInto(e,t,n,o){const i=this.writeSimple(e,t);const c=C.NormalizedSchema.of(e);const d=new V.XmlText(i);const[p,y]=this.getXmlnsAttribute(c,o);if(y){n.addAttribute(p,y)}n.addChildNode(d)}getXmlnsAttribute(e,t){const n=e.getMergedTraits();const[o,i]=n.xmlNamespace??[];if(i&&i!==t){return[o?`xmlns:${o}`:"xmlns",i]}return[void 0,void 0]}}class XmlCodec extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}createSerializer(){const e=new XmlShapeSerializer(this.settings);e.setSerdeContext(this.serdeContext);return e}createDeserializer(){const e=new XmlShapeDeserializer(this.settings);e.setSerdeContext(this.serdeContext);return e}}class AwsRestXmlProtocol extends v.HttpBindingProtocol{codec;serializer;deserializer;mixin=new ProtocolLib;constructor(e){super(e);const t={timestampFormat:{useTrait:true,default:5},httpBindings:true,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace};this.codec=new XmlCodec(t);this.serializer=new v.HttpInterceptingShapeSerializer(this.codec.createSerializer(),t);this.deserializer=new v.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),t)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);const i=C.NormalizedSchema.of(e.input);if(!o.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);if(e){o.headers["content-type"]=e}}if(typeof o.body==="string"&&o.headers["content-type"]===this.getDefaultContentType()&&!o.body.startsWith("'+o.body}return o}async deserializeResponse(e,t,n){return super.deserializeResponse(e,t,n)}async handleError(e,t,n,o,i){const c=loadRestXmlErrorCode(n,o)??"Unknown";if(o.Error&&typeof o.Error==="object"){for(const e of Object.keys(o.Error)){o[e]=o.Error[e];if(e.toLowerCase()==="message"){o.message=o.Error[e]}}}if(o.RequestId&&!i.requestId){i.requestId=o.RequestId}const{errorSchema:d,errorMetadata:p}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,i);const y=C.NormalizedSchema.of(d);const Q=o.Error?.message??o.Error?.Message??o.message??o.Message??"Unknown";const v=C.TypeRegistry.for(d[1]).getErrorCtor(d)??Error;const D=new v(Q);await this.deserializeHttpMessage(d,t,n,o);const k={};for(const[e,t]of y.structIterator()){const n=t.getMergedTraits().xmlName??e;const i=o.Error?.[n]??o[n];k[e]=this.codec.createDeserializer().readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(D,p,{$fault:y.getMergedTraits().error,message:Q},k),o)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(e){for(const[,t]of e.structIterator()){if(t.getMergedTraits().httpPayload){return!(t.isStructSchema()||t.isMapSchema()||t.isListSchema())}}return false}}t.AWSSDKSigV4Signer=te;t.AwsEc2QueryProtocol=AwsEc2QueryProtocol;t.AwsJson1_0Protocol=AwsJson1_0Protocol;t.AwsJson1_1Protocol=AwsJson1_1Protocol;t.AwsJsonRpcProtocol=AwsJsonRpcProtocol;t.AwsQueryProtocol=AwsQueryProtocol;t.AwsRestJsonProtocol=AwsRestJsonProtocol;t.AwsRestXmlProtocol=AwsRestXmlProtocol;t.AwsSdkSigV4ASigner=AwsSdkSigV4ASigner;t.AwsSdkSigV4Signer=AwsSdkSigV4Signer;t.AwsSmithyRpcV2CborProtocol=AwsSmithyRpcV2CborProtocol;t.JsonCodec=JsonCodec;t.JsonShapeDeserializer=JsonShapeDeserializer;t.JsonShapeSerializer=JsonShapeSerializer;t.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS=se;t.NODE_SIGV4A_CONFIG_OPTIONS=oe;t.XmlCodec=XmlCodec;t.XmlShapeDeserializer=XmlShapeDeserializer;t.XmlShapeSerializer=XmlShapeSerializer;t._toBool=_toBool;t._toNum=_toNum;t._toStr=_toStr;t.awsExpectUnion=awsExpectUnion;t.emitWarningIfUnsupportedVersion=emitWarningIfUnsupportedVersion;t.getBearerTokenEnvKey=getBearerTokenEnvKey;t.loadRestJsonErrorCode=loadRestJsonErrorCode;t.loadRestXmlErrorCode=loadRestXmlErrorCode;t.parseJsonBody=parseJsonBody;t.parseJsonErrorBody=parseJsonErrorBody;t.parseXmlBody=parseXmlBody;t.parseXmlErrorBody=parseXmlErrorBody;t.resolveAWSSDKSigV4Config=ie;t.resolveAwsSdkSigV4AConfig=resolveAwsSdkSigV4AConfig;t.resolveAwsSdkSigV4Config=resolveAwsSdkSigV4Config;t.setCredentialFeature=setCredentialFeature;t.setFeature=setFeature;t.setTokenFeature=setTokenFeature;t.state=ee;t.validateSigningProperties=validateSigningProperties},5152:(e,t)=>{const n={warningEmitted:false};const emitWarningIfUnsupportedVersion=e=>{if(e&&!n.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<20){n.warningEmitted=true;process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js ${e} in January 2026.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/c895JFp`)}};function setCredentialFeature(e,t,n){if(!e.$source){e.$source={}}e.$source[t]=n;return e}function setFeature(e,t,n){if(!e.__aws_sdk_context){e.__aws_sdk_context={features:{}}}else if(!e.__aws_sdk_context.features){e.__aws_sdk_context.features={}}e.__aws_sdk_context.features[t]=n}function setTokenFeature(e,t,n){if(!e.$source){e.$source={}}e.$source[t]=n;return e}t.emitWarningIfUnsupportedVersion=emitWarningIfUnsupportedVersion;t.setCredentialFeature=setCredentialFeature;t.setFeature=setFeature;t.setTokenFeature=setTokenFeature;t.state=n},7288:(e,t,n)=>{var o=n(4645);var i=n(6890);var c=n(1411);var d=n(3422);var p=n(2430);var y=n(8385);var C=n(1577);var Q=n(4274);class ProtocolLib{queryCompat;constructor(e=false){this.queryCompat=e}resolveRestContentType(e,t){const n=t.getMemberSchemas();const o=Object.values(n).find((e=>!!e.getMergedTraits().httpPayload));if(o){const t=o.getMergedTraits().mediaType;if(t){return t}else if(o.isStringSchema()){return"text/plain"}else if(o.isBlobSchema()){return"application/octet-stream"}else{return e}}else if(!t.isUnitSchema()){const t=Object.values(n).find((e=>{const{httpQuery:t,httpQueryParams:n,httpHeader:o,httpLabel:i,httpPrefixHeaders:c}=e.getMergedTraits();const d=c===void 0;return!t&&!n&&!o&&!i&&d}));if(t){return e}}}async getErrorSchemaOrThrowBaseException(e,t,n,o,c,d){let p=t;let y=e;if(e.includes("#")){[p,y]=e.split("#")}const C={$metadata:c,$fault:n.statusCode<500?"client":"server"};const Q=i.TypeRegistry.for(p);try{const t=d?.(Q,y)??Q.getSchema(e);return{errorSchema:t,errorMetadata:C}}catch(e){o.message=o.message??o.Message??"UnknownError";const t=i.TypeRegistry.for("smithy.ts.sdk.synthetic."+p);const n=t.getBaseException();if(n){const e=t.getErrorCtor(n)??Error;throw this.decorateServiceException(Object.assign(new e({name:y}),C),o)}throw this.decorateServiceException(Object.assign(new Error(y),C),o)}}decorateServiceException(e,t={}){if(this.queryCompat){const n=e.Message??t.Message;const o=c.decorateServiceException(e,t);if(n){o.message=n}o.Error={...o.Error,Type:o.Error?.Type,Code:o.Error?.Code,Message:o.Error?.message??o.Error?.Message??n};const i=o.$metadata.requestId;if(i){o.RequestId=i}return o}return c.decorateServiceException(e,t)}setQueryCompatError(e,t){const n=t.headers?.["x-amzn-query-error"];if(e!==undefined&&n!=null){const[t,o]=n.split(";");const i=Object.entries(e);const c={Code:t,Type:o};Object.assign(e,c);for(const[e,t]of i){c[e==="message"?"Message":e]=t}delete c.__type;e.Error=c}}queryCompatOutput(e,t){if(e.Error){t.Error=e.Error}if(e.Type){t.Type=e.Type}if(e.Code){t.Code=e.Code}}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch(n){return e.find((e=>i.NormalizedSchema.of(e).getMergedTraits().awsQueryError?.[0]===t))}}}class AwsSmithyRpcV2CborProtocol extends o.SmithyRpcV2CborProtocol{awsQueryCompatible;mixin;constructor({defaultNamespace:e,awsQueryCompatible:t}){super({defaultNamespace:e});this.awsQueryCompatible=!!t;this.mixin=new ProtocolLib(this.awsQueryCompatible)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(this.awsQueryCompatible){o.headers["x-amzn-query-mode"]="true"}return o}async handleError(e,t,n,c,d){if(this.awsQueryCompatible){this.mixin.setQueryCompatError(c,n)}const p=(()=>{const e=n.headers["x-amzn-query-error"];if(e&&this.awsQueryCompatible){return e.split(";")[0]}return o.loadSmithyRpcV2CborErrorCode(n,c)??"Unknown"})();const{errorSchema:y,errorMetadata:C}=await this.mixin.getErrorSchemaOrThrowBaseException(p,this.options.defaultNamespace,n,c,d,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:undefined);const Q=i.NormalizedSchema.of(y);const v=c.message??c.Message??"Unknown";const D=i.TypeRegistry.for(y[1]).getErrorCtor(y)??Error;const k=new D(v);const $={};for(const[e,t]of Q.structIterator()){if(c[e]!=null){$[e]=this.deserializer.readValue(t,c[e])}}if(this.awsQueryCompatible){this.mixin.queryCompatOutput(c,$)}throw this.mixin.decorateServiceException(Object.assign(k,C,{$fault:Q.getMergedTraits().error,message:v},$),c)}}const _toStr=e=>{if(e==null){return e}if(typeof e==="number"||typeof e==="bigint"){const t=new Error(`Received number ${e} where a string was expected.`);t.name="Warning";console.warn(t);return String(e)}if(typeof e==="boolean"){const t=new Error(`Received boolean ${e} where a string was expected.`);t.name="Warning";console.warn(t);return String(e)}return e};const _toBool=e=>{if(e==null){return e}if(typeof e==="string"){const t=e.toLowerCase();if(e!==""&&t!=="false"&&t!=="true"){const t=new Error(`Received string "${e}" where a boolean was expected.`);t.name="Warning";console.warn(t)}return e!==""&&t!=="false"}return e};const _toNum=e=>{if(e==null){return e}if(typeof e==="string"){const t=Number(e);if(t.toString()!==e){const t=new Error(`Received string "${e}" where a number was expected.`);t.name="Warning";console.warn(t);return e}return t}return e};class SerdeContextConfig{serdeContext;setSerdeContext(e){this.serdeContext=e}}class UnionSerde{from;to;keys;constructor(e,t){this.from=e;this.to=t;this.keys=new Set(Object.keys(this.from).filter((e=>e!=="__type")))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value;const t=this.from[e];this.to.$unknown=[e,t]}}}function jsonReviver(e,t,n){if(n?.source){const e=n.source;if(typeof t==="number"){if(t>Number.MAX_SAFE_INTEGER||tc.collectBody(e,t).then((e=>(t?.utf8Encoder??C.toUtf8)(e)));const parseJsonBody=(e,t)=>collectBodyString(e,t).then((e=>{if(e.length){try{return JSON.parse(e)}catch(t){if(t?.name==="SyntaxError"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}}return{}}));const parseJsonErrorBody=async(e,t)=>{const n=await parseJsonBody(e,t);n.message=n.message??n.Message;return n};const loadRestJsonErrorCode=(e,t)=>{const findKey=(e,t)=>Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase()));const sanitizeErrorCode=e=>{let t=e;if(typeof t==="number"){t=t.toString()}if(t.indexOf(",")>=0){t=t.split(",")[0]}if(t.indexOf(":")>=0){t=t.split(":")[0]}if(t.indexOf("#")>=0){t=t.split("#")[1]}return t};const n=findKey(e.headers,"x-amzn-errortype");if(n!==undefined){return sanitizeErrorCode(e.headers[n])}if(t&&typeof t==="object"){const e=findKey(t,"code");if(e&&t[e]!==undefined){return sanitizeErrorCode(t[e])}if(t["__type"]!==undefined){return sanitizeErrorCode(t["__type"])}}};class JsonShapeDeserializer extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}async read(e,t){return this._read(e,typeof t==="string"?JSON.parse(t,jsonReviver):await parseJsonBody(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){const n=t!==null&&typeof t==="object";const o=i.NormalizedSchema.of(e);if(n){if(o.isStructSchema()){const e=t;const n=o.isUnionSchema();const i={};let c=void 0;const{jsonName:d}=this.settings;if(d){c={}}let p;if(n){p=new UnionSerde(e,i)}for(const[t,y]of o.structIterator()){let o=t;if(d){o=y.getMergedTraits().jsonName??o;c[o]=t}if(n){p.mark(o)}if(e[o]!=null){i[t]=this._read(y,e[o])}}if(n){p.writeUnknown()}else if(typeof e.__type==="string"){for(const[t,n]of Object.entries(e)){const e=d?c[t]??t:t;if(!(e in i)){i[e]=n}}}return i}if(Array.isArray(t)&&o.isListSchema()){const e=o.getValueSchema();const n=[];const i=!!o.getMergedTraits().sparse;for(const o of t){if(i||o!=null){n.push(this._read(e,o))}}return n}if(o.isMapSchema()){const e=o.getValueSchema();const n={};const i=!!o.getMergedTraits().sparse;for(const[o,c]of Object.entries(t)){if(i||c!=null){n[o]=this._read(e,c)}}return n}}if(o.isBlobSchema()&&typeof t==="string"){return y.fromBase64(t)}const c=o.getMergedTraits().mediaType;if(o.isStringSchema()&&typeof t==="string"&&c){const e=c==="application/json"||c.endsWith("+json");if(e){return p.LazyJsonString.from(t)}return t}if(o.isTimestampSchema()&&t!=null){const e=d.determineTimestampFormat(o,this.settings);switch(e){case 5:return p.parseRfc3339DateTimeWithOffset(t);case 6:return p.parseRfc7231DateTime(t);case 7:return p.parseEpochTimestamp(t);default:console.warn("Missing timestamp format, parsing value with Date constructor:",t);return new Date(t)}}if(o.isBigIntegerSchema()&&(typeof t==="number"||typeof t==="string")){return BigInt(t)}if(o.isBigDecimalSchema()&&t!=undefined){if(t instanceof p.NumericValue){return t}const e=t;if(e.type==="bigDecimal"&&"string"in e){return new p.NumericValue(e.string,e.type)}return new p.NumericValue(String(t),"bigDecimal")}if(o.isNumericSchema()&&typeof t==="string"){switch(t){case"Infinity":return Infinity;case"-Infinity":return-Infinity;case"NaN":return NaN}return t}if(o.isDocumentSchema()){if(n){const e=Array.isArray(t)?[]:{};for(const[n,i]of Object.entries(t)){if(i instanceof p.NumericValue){e[n]=i}else{e[n]=this._read(o,i)}}return e}else{return structuredClone(t)}}return t}}const v=String.fromCharCode(925);class JsonReplacer{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1){throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.")}if(this.stage===2){throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.")}this.stage=1;return(e,t)=>{if(t instanceof p.NumericValue){const e=`${v+"nv"+this.counter++}_`+t.string;this.values.set(`"${e}"`,t.string);return e}if(typeof t==="bigint"){const e=t.toString();const n=`${v+"b"+this.counter++}_`+e;this.values.set(`"${n}"`,e);return n}return t}}replaceInJson(e){if(this.stage===0){throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.")}if(this.stage===2){throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.")}this.stage=2;if(this.counter===0){return e}for(const[t,n]of this.values){e=e.replace(t,n)}return e}}class JsonShapeSerializer extends SerdeContextConfig{settings;buffer;useReplacer=false;rootSchema;constructor(e){super();this.settings=e}write(e,t){this.rootSchema=i.NormalizedSchema.of(e);this.buffer=this._write(this.rootSchema,t)}writeDiscriminatedDocument(e,t){this.write(e,t);if(typeof this.buffer==="object"){this.buffer.__type=i.NormalizedSchema.of(e).getName(true)}}flush(){const{rootSchema:e,useReplacer:t}=this;this.rootSchema=undefined;this.useReplacer=false;if(e?.isStructSchema()||e?.isDocumentSchema()){if(!t){return JSON.stringify(this.buffer)}const e=new JsonReplacer;return e.replaceInJson(JSON.stringify(this.buffer,e.createReplacer(),0))}return this.buffer}_write(e,t,n){const o=t!==null&&typeof t==="object";const c=i.NormalizedSchema.of(e);if(o){if(c.isStructSchema()){const e=t;const n={};const{jsonName:o}=this.settings;let i=void 0;if(o){i={}}for(const[t,d]of c.structIterator()){const p=this._write(d,e[t],c);if(p!==undefined){let e=t;if(o){e=d.getMergedTraits().jsonName??t;i[t]=e}n[e]=p}}if(c.isUnionSchema()&&Object.keys(n).length===0){const{$unknown:t}=e;if(Array.isArray(t)){const[e,o]=t;n[e]=this._write(15,o)}}else if(typeof e.__type==="string"){for(const[t,c]of Object.entries(e)){const e=o?i[t]??t:t;if(!(e in n)){n[e]=this._write(15,c)}}}return n}if(Array.isArray(t)&&c.isListSchema()){const e=c.getValueSchema();const n=[];const o=!!c.getMergedTraits().sparse;for(const i of t){if(o||i!=null){n.push(this._write(e,i))}}return n}if(c.isMapSchema()){const e=c.getValueSchema();const n={};const o=!!c.getMergedTraits().sparse;for(const[i,c]of Object.entries(t)){if(o||c!=null){n[i]=this._write(e,c)}}return n}if(t instanceof Uint8Array&&(c.isBlobSchema()||c.isDocumentSchema())){if(c===this.rootSchema){return t}return(this.serdeContext?.base64Encoder??y.toBase64)(t)}if(t instanceof Date&&(c.isTimestampSchema()||c.isDocumentSchema())){const e=d.determineTimestampFormat(c,this.settings);switch(e){case 5:return t.toISOString().replace(".000Z","Z");case 6:return p.dateToUtcString(t);case 7:return t.getTime()/1e3;default:console.warn("Missing timestamp format, using epoch seconds",t);return t.getTime()/1e3}}if(t instanceof p.NumericValue){this.useReplacer=true}}if(t===null&&n?.isStructSchema()){return void 0}if(c.isStringSchema()){if(typeof t==="undefined"&&c.isIdempotencyToken()){return p.generateIdempotencyToken()}const e=c.getMergedTraits().mediaType;if(t!=null&&e){const n=e==="application/json"||e.endsWith("+json");if(n){return p.LazyJsonString.from(t)}}return t}if(typeof t==="number"&&c.isNumericSchema()){if(Math.abs(t)===Infinity||isNaN(t)){return String(t)}return t}if(typeof t==="string"&&c.isBlobSchema()){if(c===this.rootSchema){return t}return(this.serdeContext?.base64Encoder??y.toBase64)(t)}if(typeof t==="bigint"){this.useReplacer=true}if(c.isDocumentSchema()){if(o){const e=Array.isArray(t)?[]:{};for(const[n,o]of Object.entries(t)){if(o instanceof p.NumericValue){this.useReplacer=true;e[n]=o}else{e[n]=this._write(c,o)}}return e}else{return structuredClone(t)}}return t}}class JsonCodec extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}createSerializer(){const e=new JsonShapeSerializer(this.settings);e.setSerdeContext(this.serdeContext);return e}createDeserializer(){const e=new JsonShapeDeserializer(this.settings);e.setSerdeContext(this.serdeContext);return e}}class AwsJsonRpcProtocol extends d.RpcProtocol{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e});this.serviceTarget=t;this.codec=o??new JsonCodec({timestampFormat:{useTrait:true,default:7},jsonName:false});this.serializer=this.codec.createSerializer();this.deserializer=this.codec.createDeserializer();this.awsQueryCompatible=!!n;this.mixin=new ProtocolLib(this.awsQueryCompatible)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(!o.path.endsWith("/")){o.path+="/"}Object.assign(o.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`});if(this.awsQueryCompatible){o.headers["x-amzn-query-mode"]="true"}if(i.deref(e.input)==="unit"||!o.body){o.body="{}"}return o}getPayloadCodec(){return this.codec}async handleError(e,t,n,o,c){if(this.awsQueryCompatible){this.mixin.setQueryCompatError(o,n)}const d=loadRestJsonErrorCode(n,o)??"Unknown";const{errorSchema:p,errorMetadata:y}=await this.mixin.getErrorSchemaOrThrowBaseException(d,this.options.defaultNamespace,n,o,c,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:undefined);const C=i.NormalizedSchema.of(p);const Q=o.message??o.Message??"Unknown";const v=i.TypeRegistry.for(p[1]).getErrorCtor(p)??Error;const D=new v(Q);const k={};for(const[e,t]of C.structIterator()){if(o[e]!=null){k[e]=this.codec.createDeserializer().readObject(t,o[e])}}if(this.awsQueryCompatible){this.mixin.queryCompatOutput(o,k)}throw this.mixin.decorateServiceException(Object.assign(D,y,{$fault:C.getMergedTraits().error,message:Q},k),o)}}class AwsJson1_0Protocol extends AwsJsonRpcProtocol{constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_0"}getJsonRpcVersion(){return"1.0"}getDefaultContentType(){return"application/x-amz-json-1.0"}}class AwsJson1_1Protocol extends AwsJsonRpcProtocol{constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}class AwsRestJsonProtocol extends d.HttpBindingProtocol{serializer;deserializer;codec;mixin=new ProtocolLib;constructor({defaultNamespace:e}){super({defaultNamespace:e});const t={timestampFormat:{useTrait:true,default:7},httpBindings:true,jsonName:true};this.codec=new JsonCodec(t);this.serializer=new d.HttpInterceptingShapeSerializer(this.codec.createSerializer(),t);this.deserializer=new d.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),t)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e);super.setSerdeContext(e)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);const c=i.NormalizedSchema.of(e.input);if(!o.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),c);if(e){o.headers["content-type"]=e}}if(o.body==null&&o.headers["content-type"]===this.getDefaultContentType()){o.body="{}"}return o}async deserializeResponse(e,t,n){const o=await super.deserializeResponse(e,t,n);const c=i.NormalizedSchema.of(e.output);for(const[e,t]of c.structIterator()){if(t.getMemberTraits().httpPayload&&!(e in o)){o[e]=null}}return o}async handleError(e,t,n,o,c){const d=loadRestJsonErrorCode(n,o)??"Unknown";const{errorSchema:p,errorMetadata:y}=await this.mixin.getErrorSchemaOrThrowBaseException(d,this.options.defaultNamespace,n,o,c);const C=i.NormalizedSchema.of(p);const Q=o.message??o.Message??"Unknown";const v=i.TypeRegistry.for(p[1]).getErrorCtor(p)??Error;const D=new v(Q);await this.deserializeHttpMessage(p,t,n,o);const k={};for(const[e,t]of C.structIterator()){const n=t.getMergedTraits().jsonName??e;k[e]=this.codec.createDeserializer().readObject(t,o[n])}throw this.mixin.decorateServiceException(Object.assign(D,y,{$fault:C.getMergedTraits().error,message:Q},k),o)}getDefaultContentType(){return"application/json"}}const awsExpectUnion=e=>{if(e==null){return undefined}if(typeof e==="object"&&"__type"in e){delete e.__type}return c.expectUnion(e)};class XmlShapeDeserializer extends SerdeContextConfig{settings;stringDeserializer;constructor(e){super();this.settings=e;this.stringDeserializer=new d.FromStringShapeDeserializer(e)}setSerdeContext(e){this.serdeContext=e;this.stringDeserializer.setSerdeContext(e)}read(e,t,n){const o=i.NormalizedSchema.of(e);const c=o.getMemberSchemas();const d=o.isStructSchema()&&o.isMemberSchema()&&!!Object.values(c).find((e=>!!e.getMemberTraits().eventPayload));if(d){const e={};const n=Object.keys(c)[0];const o=c[n];if(o.isBlobSchema()){e[n]=t}else{e[n]=this.read(c[n],t)}return e}const p=(this.serdeContext?.utf8Encoder??C.toUtf8)(t);const y=this.parseXml(p);return this.readSchema(e,n?y[n]:y)}readSchema(e,t){const n=i.NormalizedSchema.of(e);if(n.isUnitSchema()){return}const o=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(t)){return this.readSchema(n,[t])}if(t==null){return t}if(typeof t==="object"){const e=!!o.sparse;const i=!!o.xmlFlattened;if(n.isListSchema()){const o=n.getValueSchema();const c=[];const d=o.getMergedTraits().xmlName??"member";const p=i?t:(t[0]??t)[d];const y=Array.isArray(p)?p:[p];for(const t of y){if(t!=null||e){c.push(this.readSchema(o,t))}}return c}const c={};if(n.isMapSchema()){const o=n.getKeySchema();const d=n.getValueSchema();let p;if(i){p=Array.isArray(t)?t:[t]}else{p=Array.isArray(t.entry)?t.entry:[t.entry]}const y=o.getMergedTraits().xmlName??"key";const C=d.getMergedTraits().xmlName??"value";for(const t of p){const n=t[y];const o=t[C];if(o!=null||e){c[n]=this.readSchema(d,o)}}return c}if(n.isStructSchema()){const e=n.isUnionSchema();let o;if(e){o=new UnionSerde(t,c)}for(const[i,d]of n.structIterator()){const n=d.getMergedTraits();const p=!n.httpPayload?d.getMemberTraits().xmlName??i:n.xmlName??d.getName();if(e){o.mark(p)}if(t[p]!=null){c[i]=this.readSchema(d,t[p])}}if(e){o.writeUnknown()}return c}if(n.isDocumentSchema()){return t}throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(true)}`)}if(n.isListSchema()){return[]}if(n.isMapSchema()||n.isStructSchema()){return{}}return this.stringDeserializer.read(n,t)}parseXml(e){if(e.length){let t;try{t=Q.parseXML(e)}catch(t){if(t&&typeof t==="object"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}const n="#text";const o=Object.keys(t)[0];const i=t[o];if(i[n]){i[o]=i[n];delete i[n]}return c.getValueFromTextNode(i)}return{}}}class QueryShapeSerializer extends SerdeContextConfig{settings;buffer;constructor(e){super();this.settings=e}write(e,t,n=""){if(this.buffer===undefined){this.buffer=""}const o=i.NormalizedSchema.of(e);if(n&&!n.endsWith(".")){n+="."}if(o.isBlobSchema()){if(typeof t==="string"||t instanceof Uint8Array){this.writeKey(n);this.writeValue((this.serdeContext?.base64Encoder??y.toBase64)(t))}}else if(o.isBooleanSchema()||o.isNumericSchema()||o.isStringSchema()){if(t!=null){this.writeKey(n);this.writeValue(String(t))}else if(o.isIdempotencyToken()){this.writeKey(n);this.writeValue(p.generateIdempotencyToken())}}else if(o.isBigIntegerSchema()){if(t!=null){this.writeKey(n);this.writeValue(String(t))}}else if(o.isBigDecimalSchema()){if(t!=null){this.writeKey(n);this.writeValue(t instanceof p.NumericValue?t.string:String(t))}}else if(o.isTimestampSchema()){if(t instanceof Date){this.writeKey(n);const e=d.determineTimestampFormat(o,this.settings);switch(e){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(c.dateToUtcString(t));break;case 7:this.writeValue(String(t.getTime()/1e3));break}}}else if(o.isDocumentSchema()){if(Array.isArray(t)){this.write(64|15,t,n)}else if(t instanceof Date){this.write(4,t,n)}else if(t instanceof Uint8Array){this.write(21,t,n)}else if(t&&typeof t==="object"){this.write(128|15,t,n)}else{this.writeKey(n);this.writeValue(String(t))}}else if(o.isListSchema()){if(Array.isArray(t)){if(t.length===0){if(this.settings.serializeEmptyLists){this.writeKey(n);this.writeValue("")}}else{const e=o.getValueSchema();const i=this.settings.flattenLists||o.getMergedTraits().xmlFlattened;let c=1;for(const o of t){if(o==null){continue}const t=e.getMergedTraits();const d=this.getKey("member",t.xmlName,t.ec2QueryName);const p=i?`${n}${c}`:`${n}${d}.${c}`;this.write(e,o,p);++c}}}}else if(o.isMapSchema()){if(t&&typeof t==="object"){const e=o.getKeySchema();const i=o.getValueSchema();const c=o.getMergedTraits().xmlFlattened;let d=1;for(const[o,p]of Object.entries(t)){if(p==null){continue}const t=e.getMergedTraits();const y=this.getKey("key",t.xmlName,t.ec2QueryName);const C=c?`${n}${d}.${y}`:`${n}entry.${d}.${y}`;const Q=i.getMergedTraits();const v=this.getKey("value",Q.xmlName,Q.ec2QueryName);const D=c?`${n}${d}.${v}`:`${n}entry.${d}.${v}`;this.write(e,o,C);this.write(i,p,D);++d}}}else if(o.isStructSchema()){if(t&&typeof t==="object"){let e=false;for(const[i,c]of o.structIterator()){if(t[i]==null&&!c.isIdempotencyToken()){continue}const o=c.getMergedTraits();const d=this.getKey(i,o.xmlName,o.ec2QueryName,"struct");const p=`${n}${d}`;this.write(c,t[i],p);e=true}if(!e&&o.isUnionSchema()){const{$unknown:e}=t;if(Array.isArray(e)){const[t,o]=e;const i=`${n}${t}`;this.write(15,o,i)}}}}else if(o.isUnitSchema());else{throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${o.getName(true)}`)}}flush(){if(this.buffer===undefined){throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.")}const e=this.buffer;delete this.buffer;return e}getKey(e,t,n,o){const{ec2:i,capitalizeKeys:c}=this.settings;if(i&&n){return n}const d=t??e;if(c&&o==="struct"){return d[0].toUpperCase()+d.slice(1)}return d}writeKey(e){if(e.endsWith(".")){e=e.slice(0,e.length-1)}this.buffer+=`&${d.extendedEncodeURIComponent(e)}=`}writeValue(e){this.buffer+=d.extendedEncodeURIComponent(e)}}class AwsQueryProtocol extends d.RpcProtocol{options;serializer;deserializer;mixin=new ProtocolLib;constructor(e){super({defaultNamespace:e.defaultNamespace});this.options=e;const t={timestampFormat:{useTrait:true,default:5},httpBindings:false,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:true};this.serializer=new QueryShapeSerializer(t);this.deserializer=new XmlShapeDeserializer(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e);this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(!o.path.endsWith("/")){o.path+="/"}Object.assign(o.headers,{"content-type":`application/x-www-form-urlencoded`});if(i.deref(e.input)==="unit"||!o.body){o.body=""}const c=e.name.split("#")[1]??e.name;o.body=`Action=${c}&Version=${this.options.version}`+o.body;if(o.body.endsWith("&")){o.body=o.body.slice(-1)}return o}async deserializeResponse(e,t,n){const o=this.deserializer;const c=i.NormalizedSchema.of(e.output);const p={};if(n.statusCode>=300){const i=await d.collectBody(n.body,t);if(i.byteLength>0){Object.assign(p,await o.read(15,i))}await this.handleError(e,t,n,p,this.deserializeMetadata(n))}for(const e in n.headers){const t=n.headers[e];delete n.headers[e];n.headers[e.toLowerCase()]=t}const y=e.name.split("#")[1]??e.name;const C=c.isStructSchema()&&this.useNestedResult()?y+"Result":undefined;const Q=await d.collectBody(n.body,t);if(Q.byteLength>0){Object.assign(p,await o.read(c,Q,C))}const v={$metadata:this.deserializeMetadata(n),...p};return v}useNestedResult(){return true}async handleError(e,t,n,o,c){const d=this.loadQueryErrorCode(n,o)??"Unknown";const p=this.loadQueryError(o)??{};const y=this.loadQueryErrorMessage(o);p.message=y;p.Error={Type:p.Type,Code:p.Code,Message:y};const{errorSchema:C,errorMetadata:Q}=await this.mixin.getErrorSchemaOrThrowBaseException(d,this.options.defaultNamespace,n,p,c,this.mixin.findQueryCompatibleError);const v=i.NormalizedSchema.of(C);const D=i.TypeRegistry.for(C[1]).getErrorCtor(C)??Error;const k=new D(y);const $={Type:p.Error.Type,Code:p.Error.Code,Error:p.Error};for(const[e,t]of v.structIterator()){const n=t.getMergedTraits().xmlName??e;const i=p[n]??o[n];$[e]=this.deserializer.readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(k,Q,{$fault:v.getMergedTraits().error,message:y},$),o)}loadQueryErrorCode(e,t){const n=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;if(n!==undefined){return n}if(e.statusCode==404){return"NotFound"}}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}class AwsEc2QueryProtocol extends AwsQueryProtocol{options;constructor(e){super(e);this.options=e;const t={capitalizeKeys:true,flattenLists:true,serializeEmptyLists:false,ec2:true};Object.assign(this.serializer.settings,t)}useNestedResult(){return false}}const parseXmlBody=(e,t)=>collectBodyString(e,t).then((e=>{if(e.length){let t;try{t=Q.parseXML(e)}catch(t){if(t&&typeof t==="object"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}const n="#text";const o=Object.keys(t)[0];const i=t[o];if(i[n]){i[o]=i[n];delete i[n]}return c.getValueFromTextNode(i)}return{}}));const parseXmlErrorBody=async(e,t)=>{const n=await parseXmlBody(e,t);if(n.Error){n.Error.message=n.Error.message??n.Error.Message}return n};const loadRestXmlErrorCode=(e,t)=>{if(t?.Error?.Code!==undefined){return t.Error.Code}if(t?.Code!==undefined){return t.Code}if(e.statusCode==404){return"NotFound"}};class XmlShapeSerializer extends SerdeContextConfig{settings;stringBuffer;byteBuffer;buffer;constructor(e){super();this.settings=e}write(e,t){const n=i.NormalizedSchema.of(e);if(n.isStringSchema()&&typeof t==="string"){this.stringBuffer=t}else if(n.isBlobSchema()){this.byteBuffer="byteLength"in t?t:(this.serdeContext?.base64Decoder??y.fromBase64)(t)}else{this.buffer=this.writeStruct(n,t,undefined);const e=n.getMergedTraits();if(e.httpPayload&&!e.xmlName){this.buffer.withName(n.getName())}}}flush(){if(this.byteBuffer!==undefined){const e=this.byteBuffer;delete this.byteBuffer;return e}if(this.stringBuffer!==undefined){const e=this.stringBuffer;delete this.stringBuffer;return e}const e=this.buffer;if(this.settings.xmlNamespace){if(!e?.attributes?.["xmlns"]){e.addAttribute("xmlns",this.settings.xmlNamespace)}}delete this.buffer;return e.toString()}writeStruct(e,t,n){const o=e.getMergedTraits();const i=e.isMemberSchema()&&!o.httpPayload?e.getMemberTraits().xmlName??e.getMemberName():o.xmlName??e.getName();if(!i||!e.isStructSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${e.getName(true)}.`)}const c=Q.XmlNode.of(i);const[d,p]=this.getXmlnsAttribute(e,n);for(const[n,o]of e.structIterator()){const e=t[n];if(e!=null||o.isIdempotencyToken()){if(o.getMergedTraits().xmlAttribute){c.addAttribute(o.getMergedTraits().xmlName??n,this.writeSimple(o,e));continue}if(o.isListSchema()){this.writeList(o,e,c,p)}else if(o.isMapSchema()){this.writeMap(o,e,c,p)}else if(o.isStructSchema()){c.addChildNode(this.writeStruct(o,e,p))}else{const t=Q.XmlNode.of(o.getMergedTraits().xmlName??o.getMemberName());this.writeSimpleInto(o,e,t,p);c.addChildNode(t)}}}const{$unknown:y}=t;if(y&&e.isUnionSchema()&&Array.isArray(y)&&Object.keys(t).length===1){const[e,n]=y;const o=Q.XmlNode.of(e);if(typeof n!=="string"){if(t instanceof Q.XmlNode||t instanceof Q.XmlText){c.addChildNode(t)}else{throw new Error(`@aws-sdk - $unknown union member in XML requires `+`value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`)}}this.writeSimpleInto(0,n,o,p);c.addChildNode(o)}if(p){c.addAttribute(d,p)}return c}writeList(e,t,n,o){if(!e.isMemberSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${e.getName(true)}`)}const i=e.getMergedTraits();const c=e.getValueSchema();const d=c.getMergedTraits();const p=!!d.sparse;const y=!!i.xmlFlattened;const[C,v]=this.getXmlnsAttribute(e,o);const writeItem=(t,n)=>{if(c.isListSchema()){this.writeList(c,Array.isArray(n)?n:[n],t,v)}else if(c.isMapSchema()){this.writeMap(c,n,t,v)}else if(c.isStructSchema()){const o=this.writeStruct(c,n,v);t.addChildNode(o.withName(y?i.xmlName??e.getMemberName():d.xmlName??"member"))}else{const o=Q.XmlNode.of(y?i.xmlName??e.getMemberName():d.xmlName??"member");this.writeSimpleInto(c,n,o,v);t.addChildNode(o)}};if(y){for(const e of t){if(p||e!=null){writeItem(n,e)}}}else{const o=Q.XmlNode.of(i.xmlName??e.getMemberName());if(v){o.addAttribute(C,v)}for(const e of t){if(p||e!=null){writeItem(o,e)}}n.addChildNode(o)}}writeMap(e,t,n,o,i=false){if(!e.isMemberSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${e.getName(true)}`)}const c=e.getMergedTraits();const d=e.getKeySchema();const p=d.getMergedTraits();const y=p.xmlName??"key";const C=e.getValueSchema();const v=C.getMergedTraits();const D=v.xmlName??"value";const k=!!v.sparse;const $=!!c.xmlFlattened;const[V,ee]=this.getXmlnsAttribute(e,o);const addKeyValue=(e,t,n)=>{const o=Q.XmlNode.of(y,t);const[i,c]=this.getXmlnsAttribute(d,ee);if(c){o.addAttribute(i,c)}e.addChildNode(o);let p=Q.XmlNode.of(D);if(C.isListSchema()){this.writeList(C,n,p,ee)}else if(C.isMapSchema()){this.writeMap(C,n,p,ee,true)}else if(C.isStructSchema()){p=this.writeStruct(C,n,ee)}else{this.writeSimpleInto(C,n,p,ee)}e.addChildNode(p)};if($){for(const[o,i]of Object.entries(t)){if(k||i!=null){const t=Q.XmlNode.of(c.xmlName??e.getMemberName());addKeyValue(t,o,i);n.addChildNode(t)}}}else{let o;if(!i){o=Q.XmlNode.of(c.xmlName??e.getMemberName());if(ee){o.addAttribute(V,ee)}n.addChildNode(o)}for(const[e,c]of Object.entries(t)){if(k||c!=null){const t=Q.XmlNode.of("entry");addKeyValue(t,e,c);(i?n:o).addChildNode(t)}}}}writeSimple(e,t){if(null===t){throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.")}const n=i.NormalizedSchema.of(e);let o=null;if(t&&typeof t==="object"){if(n.isBlobSchema()){o=(this.serdeContext?.base64Encoder??y.toBase64)(t)}else if(n.isTimestampSchema()&&t instanceof Date){const e=d.determineTimestampFormat(n,this.settings);switch(e){case 5:o=t.toISOString().replace(".000Z","Z");break;case 6:o=c.dateToUtcString(t);break;case 7:o=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",t);o=c.dateToUtcString(t);break}}else if(n.isBigDecimalSchema()&&t){if(t instanceof p.NumericValue){return t.string}return String(t)}else if(n.isMapSchema()||n.isListSchema()){throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.")}else{throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${n.getName(true)}`)}}if(n.isBooleanSchema()||n.isNumericSchema()||n.isBigIntegerSchema()||n.isBigDecimalSchema()){o=String(t)}if(n.isStringSchema()){if(t===undefined&&n.isIdempotencyToken()){o=p.generateIdempotencyToken()}else{o=String(t)}}if(o===null){throw new Error(`Unhandled schema-value pair ${n.getName(true)}=${t}`)}return o}writeSimpleInto(e,t,n,o){const c=this.writeSimple(e,t);const d=i.NormalizedSchema.of(e);const p=new Q.XmlText(c);const[y,C]=this.getXmlnsAttribute(d,o);if(C){n.addAttribute(y,C)}n.addChildNode(p)}getXmlnsAttribute(e,t){const n=e.getMergedTraits();const[o,i]=n.xmlNamespace??[];if(i&&i!==t){return[o?`xmlns:${o}`:"xmlns",i]}return[void 0,void 0]}}class XmlCodec extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}createSerializer(){const e=new XmlShapeSerializer(this.settings);e.setSerdeContext(this.serdeContext);return e}createDeserializer(){const e=new XmlShapeDeserializer(this.settings);e.setSerdeContext(this.serdeContext);return e}}class AwsRestXmlProtocol extends d.HttpBindingProtocol{codec;serializer;deserializer;mixin=new ProtocolLib;constructor(e){super(e);const t={timestampFormat:{useTrait:true,default:5},httpBindings:true,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace};this.codec=new XmlCodec(t);this.serializer=new d.HttpInterceptingShapeSerializer(this.codec.createSerializer(),t);this.deserializer=new d.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),t)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);const c=i.NormalizedSchema.of(e.input);if(!o.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),c);if(e){o.headers["content-type"]=e}}if(typeof o.body==="string"&&o.headers["content-type"]===this.getDefaultContentType()&&!o.body.startsWith("'+o.body}return o}async deserializeResponse(e,t,n){return super.deserializeResponse(e,t,n)}async handleError(e,t,n,o,c){const d=loadRestXmlErrorCode(n,o)??"Unknown";if(o.Error&&typeof o.Error==="object"){for(const e of Object.keys(o.Error)){o[e]=o.Error[e];if(e.toLowerCase()==="message"){o.message=o.Error[e]}}}if(o.RequestId&&!c.requestId){c.requestId=o.RequestId}const{errorSchema:p,errorMetadata:y}=await this.mixin.getErrorSchemaOrThrowBaseException(d,this.options.defaultNamespace,n,o,c);const C=i.NormalizedSchema.of(p);const Q=o.Error?.message??o.Error?.Message??o.message??o.Message??"Unknown";const v=i.TypeRegistry.for(p[1]).getErrorCtor(p)??Error;const D=new v(Q);await this.deserializeHttpMessage(p,t,n,o);const k={};for(const[e,t]of C.structIterator()){const n=t.getMergedTraits().xmlName??e;const i=o.Error?.[n]??o[n];k[e]=this.codec.createDeserializer().readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(D,y,{$fault:C.getMergedTraits().error,message:Q},k),o)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(e){for(const[,t]of e.structIterator()){if(t.getMergedTraits().httpPayload){return!(t.isStructSchema()||t.isMapSchema()||t.isListSchema())}}return false}}t.AwsEc2QueryProtocol=AwsEc2QueryProtocol;t.AwsJson1_0Protocol=AwsJson1_0Protocol;t.AwsJson1_1Protocol=AwsJson1_1Protocol;t.AwsJsonRpcProtocol=AwsJsonRpcProtocol;t.AwsQueryProtocol=AwsQueryProtocol;t.AwsRestJsonProtocol=AwsRestJsonProtocol;t.AwsRestXmlProtocol=AwsRestXmlProtocol;t.AwsSmithyRpcV2CborProtocol=AwsSmithyRpcV2CborProtocol;t.JsonCodec=JsonCodec;t.JsonShapeDeserializer=JsonShapeDeserializer;t.JsonShapeSerializer=JsonShapeSerializer;t.XmlCodec=XmlCodec;t.XmlShapeDeserializer=XmlShapeDeserializer;t.XmlShapeSerializer=XmlShapeSerializer;t._toBool=_toBool;t._toNum=_toNum;t._toStr=_toStr;t.awsExpectUnion=awsExpectUnion;t.loadRestJsonErrorCode=loadRestJsonErrorCode;t.loadRestXmlErrorCode=loadRestXmlErrorCode;t.parseJsonBody=parseJsonBody;t.parseJsonErrorBody=parseJsonErrorBody;t.parseXmlBody=parseXmlBody;t.parseXmlErrorBody=parseXmlErrorBody},5606:(e,t,n)=>{var o=n(5152);var i=n(8857);const c="AWS_ACCESS_KEY_ID";const d="AWS_SECRET_ACCESS_KEY";const p="AWS_SESSION_TOKEN";const y="AWS_CREDENTIAL_EXPIRATION";const C="AWS_CREDENTIAL_SCOPE";const Q="AWS_ACCOUNT_ID";const fromEnv=e=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const t=process.env[c];const n=process.env[d];const v=process.env[p];const D=process.env[y];const k=process.env[C];const $=process.env[Q];if(t&&n){const e={accessKeyId:t,secretAccessKey:n,...v&&{sessionToken:v},...D&&{expiration:new Date(D)},...k&&{credentialScope:k},...$&&{accountId:$}};o.setCredentialFeature(e,"CREDENTIALS_ENV_VARS","g");return e}throw new i.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};t.ENV_ACCOUNT_ID=Q;t.ENV_CREDENTIAL_SCOPE=C;t.ENV_EXPIRATION=y;t.ENV_KEY=c;t.ENV_SECRET=d;t.ENV_SESSION=p;t.fromEnv=fromEnv},5861:(e,t,n)=>{var o=n(5606);var i=n(8857);var c=n(4964);const d="AWS_EC2_METADATA_DISABLED";const remoteProvider=async e=>{const{ENV_CMDS_FULL_URI:t,ENV_CMDS_RELATIVE_URI:o,fromContainerMetadata:c,fromInstanceMetadata:p}=await n.e(566).then(n.t.bind(n,566,19));if(process.env[o]||process.env[t]){e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:t}=await n.e(605).then(n.bind(n,8605));return i.chain(t(e),c(e))}if(process.env[d]&&process.env[d]!=="false"){return async()=>{throw new i.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:e.logger})}}e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata");return p(e)};function memoizeChain(e,t){const n=internalCreateChain(e);let o;let i;let c;const provider=async e=>{if(e?.forceRefresh){return await n(e)}if(c?.expiration){if(c?.expiration?.getTime(){c=e})).finally((()=>{i=undefined}))}}else{o=n(e).then((e=>{c=e})).finally((()=>{o=undefined}));return provider(e)}}return c};return provider}const internalCreateChain=e=>async t=>{let n;for(const o of e){try{return await o(t)}catch(e){n=e;if(e?.tryNextLink){continue}throw e}}throw n};let p=false;const defaultProvider=(e={})=>memoizeChain([async()=>{const t=e.profile??process.env[c.ENV_PROFILE];if(t){const t=process.env[o.ENV_KEY]&&process.env[o.ENV_SECRET];if(t){if(!p){const t=e.logger?.warn&&e.logger?.constructor?.name!=="NoOpLogger"?e.logger.warn.bind(e.logger):console.warn;t(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:\n Multiple credential sources detected: \n Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.\n This SDK will proceed with the AWS_PROFILE value.\n \n However, a future version may change this behavior to prefer the ENV static credentials.\n Please ensure that your environment only sets either the AWS_PROFILE or the\n AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.\n`);p=true}}throw new i.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:e.logger,tryNextLink:true})}e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");return o.fromEnv(e)()},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:o,ssoAccountId:c,ssoRegion:d,ssoRoleName:p,ssoSession:y}=e;if(!o&&!c&&!d&&!p&&!y){throw new i.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:e.logger})}const{fromSSO:C}=await n.e(998).then(n.t.bind(n,998,19));return C(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:o}=await n.e(869).then(n.t.bind(n,5869,19));return o(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:o}=await n.e(360).then(n.t.bind(n,5360,19));return o(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:o}=await Promise.all([n.e(136),n.e(956)]).then(n.t.bind(n,9956,23));return o(e)(t)},async()=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider");return(await remoteProvider(e))()},async()=>{throw new i.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:false,logger:e.logger})}],credentialsTreatedAsExpired);const credentialsWillNeedRefresh=e=>e?.expiration!==undefined;const credentialsTreatedAsExpired=e=>e?.expiration!==undefined&&e.expiration.getTime()-Date.now()<3e5;t.credentialsTreatedAsExpired=credentialsTreatedAsExpired;t.credentialsWillNeedRefresh=credentialsWillNeedRefresh;t.defaultProvider=defaultProvider},2590:(e,t,n)=>{var o=n(2356);function resolveHostHeaderConfig(e){return e}const hostHeaderMiddleware=e=>t=>async n=>{if(!o.HttpRequest.isInstance(n.request))return t(n);const{request:i}=n;const{handlerProtocol:c=""}=e.requestHandler.metadata||{};if(c.indexOf("h2")>=0&&!i.headers[":authority"]){delete i.headers["host"];i.headers[":authority"]=i.hostname+(i.port?":"+i.port:"")}else if(!i.headers["host"]){let e=i.hostname;if(i.port!=null)e+=`:${i.port}`;i.headers["host"]=e}return t(n)};const i={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:true};const getHostHeaderPlugin=e=>({applyToStack:t=>{t.add(hostHeaderMiddleware(e),i)}});t.getHostHeaderPlugin=getHostHeaderPlugin;t.hostHeaderMiddleware=hostHeaderMiddleware;t.hostHeaderMiddlewareOptions=i;t.resolveHostHeaderConfig=resolveHostHeaderConfig},5242:(e,t)=>{const loggerMiddleware=()=>(e,t)=>async n=>{try{const o=await e(n);const{clientName:i,commandName:c,logger:d,dynamoDbDocumentClientOptions:p={}}=t;const{overrideInputFilterSensitiveLog:y,overrideOutputFilterSensitiveLog:C}=p;const Q=y??t.inputFilterSensitiveLog;const v=C??t.outputFilterSensitiveLog;const{$metadata:D,...k}=o.output;d?.info?.({clientName:i,commandName:c,input:Q(n.input),output:v(k),metadata:D});return o}catch(e){const{clientName:o,commandName:i,logger:c,dynamoDbDocumentClientOptions:d={}}=t;const{overrideInputFilterSensitiveLog:p}=d;const y=p??t.inputFilterSensitiveLog;c?.error?.({clientName:o,commandName:i,input:y(n.input),error:e,metadata:e.$metadata});throw e}};const n={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:true};const getLoggerPlugin=e=>({applyToStack:e=>{e.add(loggerMiddleware(),n)}});t.getLoggerPlugin=getLoggerPlugin;t.loggerMiddleware=loggerMiddleware;t.loggerMiddlewareOptions=n},1568:(e,t,n)=>{var o=n(2521);const i={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:true,priority:"low"};const getRecursionDetectionPlugin=e=>({applyToStack:e=>{e.add(o.recursionDetectionMiddleware(),i)}});t.getRecursionDetectionPlugin=getRecursionDetectionPlugin;Object.prototype.hasOwnProperty.call(o,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:o["__proto__"]});Object.keys(o).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=o[e]}))},2521:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.recursionDetectionMiddleware=void 0;const o=n(9320);const i=n(2356);const c="X-Amzn-Trace-Id";const d="AWS_LAMBDA_FUNCTION_NAME";const p="_X_AMZN_TRACE_ID";const recursionDetectionMiddleware=()=>e=>async t=>{const{request:n}=t;if(!i.HttpRequest.isInstance(n)){return e(t)}const y=Object.keys(n.headers??{}).find((e=>e.toLowerCase()===c.toLowerCase()))??c;if(n.headers.hasOwnProperty(y)){return e(t)}const C=process.env[d];const Q=process.env[p];const v=await o.InvokeStore.getInstanceAsync();const D=v?.getXRayTraceId();const k=D??Q;const nonEmptyString=e=>typeof e==="string"&&e.length>0;if(nonEmptyString(C)&&nonEmptyString(k)){n.headers[c]=k}return e({...t,request:n})};t.recursionDetectionMiddleware=recursionDetectionMiddleware},2959:(e,t,n)=>{var o=n(402);var i=n(3068);var c=n(2356);var d=n(8704);const p=undefined;function isValidUserAgentAppId(e){if(e===undefined){return true}return typeof e==="string"&&e.length<=50}function resolveUserAgentConfig(e){const t=o.normalizeProvider(e.userAgentAppId??p);const{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:typeof n==="string"?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!isValidUserAgentAppId(n)){const t=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;if(typeof n!=="string"){t?.warn("userAgentAppId must be a string or undefined.")}else if(n.length>50){t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}}return n}})}const y=/\d{12}\.ddb/;async function checkFeatures(e,t,n){const o=n.request;if(o?.headers?.["smithy-protocol"]==="rpc-v2-cbor"){d.setFeature(e,"PROTOCOL_RPC_V2_CBOR","M")}if(typeof t.retryStrategy==="function"){const n=await t.retryStrategy();if(typeof n.acquireInitialRetryToken==="function"){if(n.constructor?.name?.includes("Adaptive")){d.setFeature(e,"RETRY_MODE_ADAPTIVE","F")}else{d.setFeature(e,"RETRY_MODE_STANDARD","E")}}else{d.setFeature(e,"RETRY_MODE_LEGACY","D")}}if(typeof t.accountIdEndpointMode==="function"){const n=e.endpointV2;if(String(n?.url?.hostname).match(y)){d.setFeature(e,"ACCOUNT_ID_ENDPOINT","O")}switch(await(t.accountIdEndpointMode?.())){case"disabled":d.setFeature(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":d.setFeature(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":d.setFeature(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;if(t.accountId){d.setFeature(e,"RESOLVED_ACCOUNT_ID","T")}for(const[n,o]of Object.entries(t.$source??{})){d.setFeature(e,n,o)}}}const C="user-agent";const Q="x-amz-user-agent";const v=" ";const D="/";const k=/[^!$%&'*+\-.^_`|~\w]/g;const $=/[^!$%&'*+\-.^_`|~\w#]/g;const V="-";const ee=1024;function encodeFeatures(e){let t="";for(const n in e){const o=e[n];if(t.length+o.length+1<=ee){if(t.length){t+=","+o}else{t+=o}continue}break}return t}const userAgentMiddleware=e=>(t,n)=>async o=>{const{request:d}=o;if(!c.HttpRequest.isInstance(d)){return t(o)}const{headers:p}=d;const y=n?.userAgent?.map(escapeUserAgent)||[];const D=(await e.defaultUserAgentProvider()).map(escapeUserAgent);await checkFeatures(n,e,o);const k=n;D.push(`m/${encodeFeatures(Object.assign({},n.__smithy_context?.features,k.__aws_sdk_context?.features))}`);const $=e?.customUserAgent?.map(escapeUserAgent)||[];const V=await e.userAgentAppId();if(V){D.push(escapeUserAgent([`app`,`${V}`]))}const ee=i.getUserAgentPrefix();const te=(ee?[ee]:[]).concat([...D,...y,...$]).join(v);const re=[...D.filter((e=>e.startsWith("aws-sdk-"))),...$].join(v);if(e.runtime!=="browser"){if(re){p[Q]=p[Q]?`${p[C]} ${re}`:re}p[C]=te}else{p[Q]=te}return t({...o,request:d})};const escapeUserAgent=e=>{const t=e[0].split(D).map((e=>e.replace(k,V))).join(D);const n=e[1]?.replace($,V);const o=t.indexOf(D);const i=t.substring(0,o);let c=t.substring(o+1);if(i==="api"){c=c.toLowerCase()}return[i,c,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")};const te={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:true};const getUserAgentPlugin=e=>({applyToStack:t=>{t.add(userAgentMiddleware(e),te)}});t.DEFAULT_UA_APP_ID=p;t.getUserAgentMiddlewareOptions=te;t.getUserAgentPlugin=getUserAgentPlugin;t.resolveUserAgentConfig=resolveUserAgentConfig;t.userAgentMiddleware=userAgentMiddleware},6463:(e,t,n)=>{var o=n(5779);var i=n(9316);const getAwsRegionExtensionConfiguration=e=>({setRegion(t){e.region=t},region(){return e.region}});const resolveAwsRegionExtensionConfiguration=e=>({region:e.region()});t.NODE_REGION_CONFIG_FILE_OPTIONS=i.NODE_REGION_CONFIG_FILE_OPTIONS;t.NODE_REGION_CONFIG_OPTIONS=i.NODE_REGION_CONFIG_OPTIONS;t.REGION_ENV_NAME=i.REGION_ENV_NAME;t.REGION_INI_NAME=i.REGION_INI_NAME;t.resolveRegionConfig=i.resolveRegionConfig;t.getAwsRegionExtensionConfiguration=getAwsRegionExtensionConfiguration;t.resolveAwsRegionExtensionConfiguration=resolveAwsRegionExtensionConfiguration;Object.prototype.hasOwnProperty.call(o,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:o["__proto__"]});Object.keys(o).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=o[e]}))},5779:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.warning=void 0;t.stsRegionDefaultResolver=stsRegionDefaultResolver;const o=n(9316);const i=n(5704);function stsRegionDefaultResolver(e={}){return(0,i.loadConfig)({...o.NODE_REGION_CONFIG_OPTIONS,async default(){if(!t.warning.silence){console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.")}return"us-east-1"}},{...o.NODE_REGION_CONFIG_FILE_OPTIONS,...e})}t.warning={silence:false}},3068:(e,t,n)=>{var o=n(9674);var i=n(4494);const isVirtualHostableS3Bucket=(e,t=false)=>{if(t){for(const t of e.split(".")){if(!isVirtualHostableS3Bucket(t)){return false}}return true}if(!o.isValidHostLabel(e)){return false}if(e.length<3||e.length>63){return false}if(e!==e.toLowerCase()){return false}if(o.isIpAddress(e)){return false}return true};const c=":";const d="/";const parseArn=e=>{const t=e.split(c);if(t.length<6)return null;const[n,o,i,p,y,...C]=t;if(n!=="arn"||o===""||i===""||C.join(c)==="")return null;const Q=C.map((e=>e.split(d))).flat();return{partition:o,service:i,region:p,accountId:y,resourceId:Q}};var p=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:true,supportsFIPS:true},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-east-2":{description:"Asia Pacific (Taipei)"},"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-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws 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:true,supportsFIPS:true},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:true,supportsFIPS:true},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:true,supportsFIPS:true},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:true,supportsFIPS:true},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:true,supportsFIPS:true},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:true,supportsFIPS:true},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:true,supportsFIPS:true},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}];var y="1.1";var C={partitions:p,version:y};let Q=C;let v="";const partition=e=>{const{partitions:t}=Q;for(const n of t){const{regions:t,outputs:o}=n;for(const[n,i]of Object.entries(t)){if(n===e){return{...o,...i}}}}for(const n of t){const{regionRegex:t,outputs:o}=n;if(new RegExp(t).test(e)){return{...o}}}const n=t.find((e=>e.id==="aws"));if(!n){throw new Error("Provided region was not found in the partition array or regex,"+" and default partition with id 'aws' doesn't exist.")}return{...n.outputs}};const setPartitionInfo=(e,t="")=>{Q=e;v=t};const useDefaultPartitionInfo=()=>{setPartitionInfo(C,"")};const getUserAgentPrefix=()=>v;const D={isVirtualHostableS3Bucket:isVirtualHostableS3Bucket,parseArn:parseArn,partition:partition};o.customEndpointFunctions.aws=D;const resolveDefaultAwsRegionalEndpointsConfig=e=>{if(typeof e.endpointProvider!=="function"){throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.")}const{endpoint:t}=e;if(t===undefined){e.endpoint=async()=>toEndpointV1(e.endpointProvider({Region:typeof e.region==="function"?await e.region():e.region,UseDualStack:typeof e.useDualstackEndpoint==="function"?await e.useDualstackEndpoint():e.useDualstackEndpoint,UseFIPS:typeof e.useFipsEndpoint==="function"?await e.useFipsEndpoint():e.useFipsEndpoint,Endpoint:undefined},{logger:e.logger}))}return e};const toEndpointV1=e=>i.parseUrl(e.url);t.EndpointError=o.EndpointError;t.isIpAddress=o.isIpAddress;t.resolveEndpoint=o.resolveEndpoint;t.awsEndpointFunctions=D;t.getUserAgentPrefix=getUserAgentPrefix;t.partition=partition;t.resolveDefaultAwsRegionalEndpointsConfig=resolveDefaultAwsRegionalEndpointsConfig;t.setPartitionInfo=setPartitionInfo;t.toEndpointV1=toEndpointV1;t.useDefaultPartitionInfo=useDefaultPartitionInfo},1656:(e,t,n)=>{var o=n(8161);var i=n(1708);var c=n(1455);var d=n(6760);var p=n(2959);const getRuntimeUserAgentPair=()=>{const e=["deno","bun","llrt"];for(const t of e){if(i.versions[t]){return[`md/${t}`,i.versions[t]]}}return["md/nodejs",i.versions.node]};const getTypeScriptPackageJsonPath=(e="")=>{let t;const n=d.normalize(e);const o=n.split(d.sep);const i=o.indexOf("node_modules");if(i!==-1){t=o.slice(0,i).join(d.sep)}else{t=e}return d.join(t,"node_modules","typescript","package.json")};let y;const getTypeScriptUserAgentPair=async()=>{if(y===null){return undefined}else if(typeof y==="string"){return["md/tsc",y]}try{const e=await c.readFile(getTypeScriptPackageJsonPath(__dirname),"utf-8");const{version:t}=JSON.parse(e);if(typeof t!=="string"){y=null;return undefined}y=t;return["md/tsc",y]}catch{y=null}};const C={isCrtAvailable:false};const isCrtAvailable=()=>{if(C.isCrtAvailable){return["md/crt-avail"]}return null};const createDefaultUserAgentProvider=({serviceId:e,clientVersion:t})=>{const n=getRuntimeUserAgentPair();return async c=>{const d=[["aws-sdk-js",t],["ua","2.1"],[`os/${o.platform()}`,o.release()],["lang/js"],n];const p=await getTypeScriptUserAgentPair();if(p){d.push(p)}const y=isCrtAvailable();if(y){d.push(y)}if(e){d.push([`api/${e}`,t])}if(i.env.AWS_EXECUTION_ENV){d.push([`exec-env/${i.env.AWS_EXECUTION_ENV}`])}const C=await(c?.userAgentAppId?.());const Q=C?[...d,[`app/${C}`]]:[...d];return Q}};const Q=createDefaultUserAgentProvider;const v="AWS_SDK_UA_APP_ID";const D="sdk_ua_app_id";const k="sdk-ua-app-id";const $={environmentVariableSelector:e=>e[v],configFileSelector:e=>e[D]??e[k],default:p.DEFAULT_UA_APP_ID};t.NODE_APP_ID_CONFIG_OPTIONS=$;t.UA_APP_ID_ENV_NAME=v;t.UA_APP_ID_INI_NAME=D;t.createDefaultUserAgentProvider=createDefaultUserAgentProvider;t.crtAvailability=C;t.defaultUserAgent=Q},4274:(e,t,n)=>{var o=n(3343);function escapeAttribute(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function escapeElement(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}class XmlText{value;constructor(e){this.value=e}toString(){return escapeElement(""+this.value)}}class XmlNode{name;children;attributes={};static of(e,t,n){const o=new XmlNode(e);if(t!==undefined){o.addChildNode(new XmlText(t))}if(n!==undefined){o.withName(n)}return o}constructor(e,t=[]){this.name=e;this.children=t}withName(e){this.name=e;return this}addAttribute(e,t){this.attributes[e]=t;return this}addChildNode(e){this.children.push(e);return this}removeAttribute(e){delete this.attributes[e];return this}n(e){this.name=e;return this}c(e){this.children.push(e);return this}a(e,t){if(t!=null){this.attributes[e]=t}return this}cc(e,t,n=t){if(e[t]!=null){const o=XmlNode.of(t,e[t]).withName(n);this.c(o)}}l(e,t,n,o){if(e[t]!=null){const e=o();e.map((e=>{e.withName(n);this.c(e)}))}}lc(e,t,n,o){if(e[t]!=null){const e=o();const t=new XmlNode(n);e.map((e=>{t.c(e)}));this.c(t)}}toString(){const e=Boolean(this.children.length);let t=`<${this.name}`;const n=this.attributes;for(const e of Object.keys(n)){const o=n[e];if(o!=null){t+=` ${e}="${escapeAttribute(""+o)}"`}}return t+=!e?"/>":`>${this.children.map((e=>e.toString())).join("")}`}}t.parseXML=o.parseXML;t.XmlNode=XmlNode;t.XmlText=XmlText},3343:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseXML=parseXML;const o=n(591);const i=new o.XMLParser({attributeNamePrefix:"",htmlEntities:true,ignoreAttributes:false,ignoreDeclaration:true,parseTagValue:false,trimValues:false,tagValueProcessor:(e,t)=>t.trim()===""&&t.includes("\n")?"":undefined});i.addEntity("#xD","\r");i.addEntity("#10","\n");function parseXML(e){return i.parse(e,true)}},9320:(e,t,n)=>{const o={REQUEST_ID:Symbol.for("_AWS_LAMBDA_REQUEST_ID"),X_RAY_TRACE_ID:Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),TENANT_ID:Symbol.for("_AWS_LAMBDA_TENANT_ID")};const i=["true","1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA??"");if(!i){globalThis.awslambda=globalThis.awslambda||{}}class InvokeStoreBase{static PROTECTED_KEYS=o;isProtectedKey(e){return Object.values(o).includes(e)}getRequestId(){return this.get(o.REQUEST_ID)??"-"}getXRayTraceId(){return this.get(o.X_RAY_TRACE_ID)}getTenantId(){return this.get(o.TENANT_ID)}}class InvokeStoreSingle extends InvokeStoreBase{currentContext;getContext(){return this.currentContext}hasContext(){return this.currentContext!==undefined}get(e){return this.currentContext?.[e]}set(e,t){if(this.isProtectedKey(e)){throw new Error(`Cannot modify protected Lambda context field: ${String(e)}`)}this.currentContext=this.currentContext||{};this.currentContext[e]=t}run(e,t){this.currentContext=e;return t()}}class InvokeStoreMulti extends InvokeStoreBase{als;static async create(){const e=new InvokeStoreMulti;const t=await Promise.resolve().then(n.t.bind(n,6698,23));e.als=new t.AsyncLocalStorage;return e}getContext(){return this.als.getStore()}hasContext(){return this.als.getStore()!==undefined}get(e){return this.als.getStore()?.[e]}set(e,t){if(this.isProtectedKey(e)){throw new Error(`Cannot modify protected Lambda context field: ${String(e)}`)}const n=this.als.getStore();if(!n){throw new Error("No context available")}n[e]=t}run(e,t){return this.als.run(e,t)}}t.InvokeStore=void 0;(function(e){let t=null;async function getInstanceAsync(){if(!t){t=(async()=>{const e="AWS_LAMBDA_MAX_CONCURRENCY"in process.env;const t=e?await InvokeStoreMulti.create():new InvokeStoreSingle;if(!i&&globalThis.awslambda?.InvokeStore){return globalThis.awslambda.InvokeStore}else if(!i&&globalThis.awslambda){globalThis.awslambda.InvokeStore=t;return t}else{return t}})()}return t}e.getInstanceAsync=getInstanceAsync;e._testing=process.env.AWS_LAMBDA_BENCHMARK_MODE==="1"?{reset:()=>{t=null;if(globalThis.awslambda?.InvokeStore){delete globalThis.awslambda.InvokeStore}globalThis.awslambda={InvokeStore:undefined}}}:undefined})(t.InvokeStore||(t.InvokeStore={}));t.InvokeStoreBase=InvokeStoreBase},5862:(e,t,n)=>{var o;o={value:true};var i=n(5004);var c=n(1391);var d=n(7132);const p=i.createClientLogger("core-lro");const y=2e3;const C=["succeeded","canceled","failed"];function deserializeState(e){try{return JSON.parse(e).state}catch(t){throw new Error(`Unable to deserialize input state: ${e}`)}}function setStateError(e){const{state:t,stateProxy:n,isOperationError:o}=e;return e=>{if(o(e)){n.setError(t,e);n.setFailed(t)}throw e}}function appendReadableErrorMessage(e,t){let n=e;if(n.slice(-1)!=="."){n=n+"."}return n+" "+t}function simplifyError(e){let t=e.message;let n=e.code;let o=e;while(o.innererror){o=o.innererror;n=o.code;t=appendReadableErrorMessage(t,o.message)}return{code:n,message:t}}function processOperationStatus(e){const{state:t,stateProxy:n,status:o,isDone:i,processResult:c,getError:d,response:y,setErrorAsResult:C}=e;switch(o){case"succeeded":{n.setSucceeded(t);break}case"failed":{const e=d===null||d===void 0?void 0:d(y);let o="";if(e){const{code:t,message:n}=simplifyError(e);o=`. ${t}. ${n}`}const i=`The long-running operation has failed${o}`;n.setError(t,new Error(i));n.setFailed(t);p.warning(i);break}case"canceled":{n.setCanceled(t);break}}if((i===null||i===void 0?void 0:i(y,t))||i===undefined&&["succeeded","canceled"].concat(C?[]:["failed"]).includes(o)){n.setResult(t,buildResult({response:y,state:t,processResult:c}))}}function buildResult(e){const{processResult:t,response:n,state:o}=e;return t?t(n,o):n}async function initOperation(e){const{init:t,stateProxy:n,processResult:o,getOperationStatus:i,withOperationLocation:c,setErrorAsResult:d}=e;const{operationLocation:y,resourceLocation:C,metadata:Q,response:v}=await t();if(y)c===null||c===void 0?void 0:c(y,false);const D={metadata:Q,operationLocation:y,resourceLocation:C};p.verbose(`LRO: Operation description:`,D);const k=n.initState(D);const $=i({response:v,state:k,operationLocation:y});processOperationStatus({state:k,status:$,stateProxy:n,response:v,setErrorAsResult:d,processResult:o});return k}async function pollOperationHelper(e){const{poll:t,state:n,stateProxy:o,operationLocation:i,getOperationStatus:c,getResourceLocation:d,isOperationError:y,options:Q}=e;const v=await t(i,Q).catch(setStateError({state:n,stateProxy:o,isOperationError:y}));const D=c(v,n);p.verbose(`LRO: Status:\n\tPolling from: ${n.config.operationLocation}\n\tOperation status: ${D}\n\tPolling status: ${C.includes(D)?"Stopped":"Running"}`);if(D==="succeeded"){const e=d(v,n);if(e!==undefined){return{response:await t(e).catch(setStateError({state:n,stateProxy:o,isOperationError:y})),status:D}}}return{response:v,status:D}}async function pollOperation(e){const{poll:t,state:n,stateProxy:o,options:i,getOperationStatus:c,getResourceLocation:d,getOperationLocation:p,isOperationError:y,withOperationLocation:Q,getPollingInterval:v,processResult:D,getError:k,updateState:$,setDelay:V,isDone:ee,setErrorAsResult:te}=e;const{operationLocation:re}=n.config;if(re!==undefined){const{response:e,status:ne}=await pollOperationHelper({poll:t,getOperationStatus:c,state:n,stateProxy:o,operationLocation:re,getResourceLocation:d,isOperationError:y,options:i});processOperationStatus({status:ne,response:e,state:n,stateProxy:o,isDone:ee,processResult:D,getError:k,setErrorAsResult:te});if(!C.includes(ne)){const t=v===null||v===void 0?void 0:v(e);if(t)V(t);const o=p===null||p===void 0?void 0:p(e,n);if(o!==undefined){const e=re!==o;n.config.operationLocation=o;Q===null||Q===void 0?void 0:Q(o,e)}else Q===null||Q===void 0?void 0:Q(re,false)}$===null||$===void 0?void 0:$(n,e)}}function getOperationLocationPollingUrl(e){const{azureAsyncOperation:t,operationLocation:n}=e;return n!==null&&n!==void 0?n:t}function getLocationHeader(e){return e.headers["location"]}function getOperationLocationHeader(e){return e.headers["operation-location"]}function getAzureAsyncOperationHeader(e){return e.headers["azure-asyncoperation"]}function findResourceLocation(e){const{location:t,requestMethod:n,requestPath:o,resourceLocationConfig:i}=e;switch(n){case"PUT":{return o}case"DELETE":{return undefined}default:{switch(i){case"azure-async-operation":{return undefined}case"original-uri":{return o}case"location":default:{return t}}}}}function inferLroMode(e){const{rawResponse:t,requestMethod:n,requestPath:o,resourceLocationConfig:i}=e;const c=getOperationLocationHeader(t);const d=getAzureAsyncOperationHeader(t);const p=getOperationLocationPollingUrl({operationLocation:c,azureAsyncOperation:d});const y=getLocationHeader(t);const C=n===null||n===void 0?void 0:n.toLocaleUpperCase();if(p!==undefined){return{mode:"OperationLocation",operationLocation:p,resourceLocation:findResourceLocation({requestMethod:C,location:y,requestPath:o,resourceLocationConfig:i})}}else if(y!==undefined){return{mode:"ResourceLocation",operationLocation:y}}else if(C==="PUT"&&o){return{mode:"Body",operationLocation:o}}else{return undefined}}function transformStatus(e){const{status:t,statusCode:n}=e;if(typeof t!=="string"&&t!==undefined){throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${t}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`)}switch(t===null||t===void 0?void 0:t.toLocaleLowerCase()){case undefined:return toOperationStatus(n);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:{p.verbose(`LRO: unrecognized operation status: ${t}`);return t}}}function getStatus(e){var t;const{status:n}=(t=e.body)!==null&&t!==void 0?t:{};return transformStatus({status:n,statusCode:e.statusCode})}function getProvisioningState(e){var t,n;const{properties:o,provisioningState:i}=(t=e.body)!==null&&t!==void 0?t:{};const c=(n=o===null||o===void 0?void 0:o.provisioningState)!==null&&n!==void 0?n:i;return transformStatus({status:c,statusCode:e.statusCode})}function toOperationStatus(e){if(e===202){return"running"}else if(e<300){return"succeeded"}else{return"failed"}}function parseRetryAfter({rawResponse:e}){const t=e.headers["retry-after"];if(t!==undefined){const e=parseInt(t);return isNaN(e)?calculatePollingIntervalFromDate(new Date(t)):e*1e3}return undefined}function getErrorFromResponse(e){const t=e.flatResponse.error;if(!t){p.warning(`The long-running operation failed but there is no error property in the response's body`);return}if(!t.code||!t.message){p.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`);return}return t}function calculatePollingIntervalFromDate(e){const t=Math.floor((new Date).getTime());const n=e.getTime();if(t{const e=await i.sendInitialRequest();const t=inferLroMode({rawResponse:e.rawResponse,requestPath:i.requestPath,requestMethod:i.requestMethod,resourceLocationConfig:n});return Object.assign({response:e,operationLocation:t===null||t===void 0?void 0:t.operationLocation,resourceLocation:t===null||t===void 0?void 0:t.resourceLocation},(t===null||t===void 0?void 0:t.mode)?{metadata:{mode:t.mode}}:{})},stateProxy:t,processResult:o?({flatResponse:e},t)=>o(e,t):({flatResponse:e})=>e,getOperationStatus:getStatusFromInitialResponse,setErrorAsResult:c})}function getOperationLocation({rawResponse:e},t){var n;const o=(n=t.config.metadata)===null||n===void 0?void 0:n["mode"];switch(o){case"OperationLocation":{return getOperationLocationPollingUrl({operationLocation:getOperationLocationHeader(e),azureAsyncOperation:getAzureAsyncOperationHeader(e)})}case"ResourceLocation":{return getLocationHeader(e)}case"Body":default:{return undefined}}}function getOperationStatus({rawResponse:e},t){var n;const o=(n=t.config.metadata)===null||n===void 0?void 0:n["mode"];switch(o){case"OperationLocation":{return getStatus(e)}case"ResourceLocation":{return toOperationStatus(e.statusCode)}case"Body":{return getProvisioningState(e)}default:throw new Error(`Internal error: Unexpected operation mode: ${o}`)}}function getResourceLocation({flatResponse:e},t){if(typeof e==="object"){const n=e.resourceLocation;if(n!==undefined){t.config.resourceLocation=n}}return t.config.resourceLocation}function isOperationError(e){return e.name==="RestError"}async function pollHttpOperation(e){const{lro:t,stateProxy:n,options:o,processResult:i,updateState:c,setDelay:d,state:p,setErrorAsResult:y}=e;return pollOperation({state:p,stateProxy:n,setDelay:d,processResult:i?({flatResponse:e},t)=>i(e,t):({flatResponse:e})=>e,getError:getErrorFromResponse,updateState:c,getPollingInterval:parseRetryAfter,getOperationLocation:getOperationLocation,getOperationStatus:getOperationStatus,isOperationError:isOperationError,getResourceLocation:getResourceLocation,options:o,poll:async(e,n)=>t.sendPollRequest(e,n),setErrorAsResult:y})}const createStateProxy$1=()=>({initState:e=>({status:"running",config:e}),setCanceled:e=>e.status="canceled",setError:(e,t)=>e.error=t,setResult:(e,t)=>e.result=t,setRunning:e=>e.status="running",setSucceeded:e=>e.status="succeeded",setFailed:e=>e.status="failed",getError:e=>e.error,getResult:e=>e.result,isCanceled:e=>e.status==="canceled",isFailed:e=>e.status==="failed",isRunning:e=>e.status==="running",isSucceeded:e=>e.status==="succeeded"});function buildCreatePoller(e){const{getOperationLocation:t,getStatusFromInitialResponse:n,getStatusFromPollResponse:o,isOperationError:i,getResourceLocation:p,getPollingInterval:C,getError:Q,resolveOnUnsuccessful:v}=e;return async({init:e,poll:D},k)=>{const{processResult:$,updateState:V,withOperationLocation:ee,intervalInMs:te=y,restoreFrom:re}=k||{};const ne=createStateProxy$1();const se=ee?(()=>{let e=false;return(t,n)=>{if(n)ee(t);else if(!e)ee(t);e=true}})():undefined;const oe=re?deserializeState(re):await initOperation({init:e,stateProxy:ne,processResult:$,getOperationStatus:n,withOperationLocation:se,setErrorAsResult:!v});let ie;const ae=new c.AbortController;const ce=new Map;const handleProgressEvents=async()=>ce.forEach((e=>e(oe)));const le="Operation was canceled";let ue=te;const de={getOperationState:()=>oe,getResult:()=>oe.result,isDone:()=>["succeeded","failed","canceled"].includes(oe.status),isStopped:()=>ie===undefined,stopPolling:()=>{ae.abort()},toString:()=>JSON.stringify({state:oe}),onProgress:e=>{const t=Symbol();ce.set(t,e);return()=>ce.delete(t)},pollUntilDone:e=>ie!==null&&ie!==void 0?ie:ie=(async()=>{const{abortSignal:t}=e||{};const{signal:n}=t?new c.AbortController([t,ae.signal]):ae;if(!de.isDone()){await de.poll({abortSignal:n});while(!de.isDone()){await d.delay(ue,{abortSignal:n});await de.poll({abortSignal:n})}}if(v){return de.getResult()}else{switch(oe.status){case"succeeded":return de.getResult();case"canceled":throw new Error(le);case"failed":throw oe.error;case"notStarted":case"running":throw new Error(`Polling completed without succeeding or failing`)}}})().finally((()=>{ie=undefined})),async poll(e){if(v){if(de.isDone())return}else{switch(oe.status){case"succeeded":return;case"canceled":throw new Error(le);case"failed":throw oe.error}}await pollOperation({poll:D,state:oe,stateProxy:ne,getOperationLocation:t,isOperationError:i,withOperationLocation:se,getPollingInterval:C,getOperationStatus:o,getResourceLocation:p,processResult:$,getError:Q,updateState:V,options:e,setDelay:e=>{ue=e},setErrorAsResult:!v});await handleProgressEvents();if(!v){switch(oe.status){case"canceled":throw new Error(le);case"failed":throw oe.error}}}};return de}}async function createHttpPoller(e,t){const{resourceLocationConfig:n,intervalInMs:o,processResult:i,restoreFrom:c,updateState:d,withOperationLocation:p,resolveOnUnsuccessful:y=false}=t||{};return buildCreatePoller({getStatusFromInitialResponse:getStatusFromInitialResponse,getStatusFromPollResponse:getOperationStatus,isOperationError:isOperationError,getOperationLocation:getOperationLocation,getResourceLocation:getResourceLocation,getPollingInterval:parseRetryAfter,getError:getErrorFromResponse,resolveOnUnsuccessful:y})({init:async()=>{const t=await e.sendInitialRequest();const o=inferLroMode({rawResponse:t.rawResponse,requestPath:e.requestPath,requestMethod:e.requestMethod,resourceLocationConfig:n});return Object.assign({response:t,operationLocation:o===null||o===void 0?void 0:o.operationLocation,resourceLocation:o===null||o===void 0?void 0:o.resourceLocation},(o===null||o===void 0?void 0:o.mode)?{metadata:{mode:o.mode}}:{})},poll:e.sendPollRequest},{intervalInMs:o,withOperationLocation:p,restoreFrom:c,updateState:d,processResult:i?({flatResponse:e},t)=>i(e,t):({flatResponse:e})=>e})}const createStateProxy=()=>({initState:e=>({config:e,isStarted:true}),setCanceled:e=>e.isCancelled=true,setError:(e,t)=>e.error=t,setResult:(e,t)=>e.result=t,setRunning:e=>e.isStarted=true,setSucceeded:e=>e.isCompleted=true,setFailed:()=>{},getError:e=>e.error,getResult:e=>e.result,isCanceled:e=>!!e.isCancelled,isFailed:e=>!!e.error,isRunning:e=>!!e.isStarted,isSucceeded:e=>Boolean(e.isCompleted&&!e.isCancelled&&!e.error)});class GenericPollOperation{constructor(e,t,n,o,i,c,d){this.state=e;this.lro=t;this.setErrorAsResult=n;this.lroResourceLocationConfig=o;this.processResult=i;this.updateState=c;this.isDone=d}setPollerConfig(e){this.pollerConfig=e}async update(e){var t;const n=createStateProxy();if(!this.state.isStarted){this.state=Object.assign(Object.assign({},this.state),await initHttpOperation({lro:this.lro,stateProxy:n,resourceLocationConfig:this.lroResourceLocationConfig,processResult:this.processResult,setErrorAsResult:this.setErrorAsResult}))}const o=this.updateState;const i=this.isDone;if(!this.state.isCompleted&&this.state.error===undefined){await pollHttpOperation({lro:this.lro,state:this.state,stateProxy:n,processResult:this.processResult,updateState:o?(e,{rawResponse:t})=>o(e,t):undefined,isDone:i?({flatResponse:e},t)=>i(e,t):undefined,options:e,setDelay:e=>{this.pollerConfig.intervalInMs=e},setErrorAsResult:this.setErrorAsResult})}(t=e===null||e===void 0?void 0:e.fireProgress)===null||t===void 0?void 0:t.call(e,this.state);return this}async cancel(){p.error("`cancelOperation` is deprecated because it wasn't implemented");return this}toString(){return JSON.stringify({state:this.state})}}class PollerStoppedError extends Error{constructor(e){super(e);this.name="PollerStoppedError";Object.setPrototypeOf(this,PollerStoppedError.prototype)}}class PollerCancelledError extends Error{constructor(e){super(e);this.name="PollerCancelledError";Object.setPrototypeOf(this,PollerCancelledError.prototype)}}class Poller{constructor(e){this.resolveOnUnsuccessful=false;this.stopped=true;this.pollProgressCallbacks=[];this.operation=e;this.promise=new Promise(((e,t)=>{this.resolve=e;this.reject=t}));this.promise.catch((()=>{}))}async startPolling(e={}){if(this.stopped){this.stopped=false}while(!this.isStopped()&&!this.isDone()){await this.poll(e);await this.delay()}}async pollOnce(e={}){if(!this.isDone()){this.operation=await this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})}this.processUpdatedState()}fireProgress(e){for(const t of this.pollProgressCallbacks){t(e)}}async cancelOnce(e={}){this.operation=await this.operation.cancel(e)}poll(e={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);const clearPollOncePromise=()=>{this.pollOncePromise=undefined};this.pollOncePromise.then(clearPollOncePromise,clearPollOncePromise).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error){this.stopped=true;if(!this.resolveOnUnsuccessful){this.reject(this.operation.state.error);throw this.operation.state.error}}if(this.operation.state.isCancelled){this.stopped=true;if(!this.resolveOnUnsuccessful){const e=new PollerCancelledError("Operation was canceled");this.reject(e);throw e}}if(this.isDone()&&this.resolve){this.resolve(this.getResult())}}async pollUntilDone(e={}){if(this.stopped){this.startPolling(e).catch(this.reject)}this.processUpdatedState();return this.promise}onProgress(e){this.pollProgressCallbacks.push(e);return()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter((t=>t!==e))}}isDone(){const e=this.operation.state;return Boolean(e.isCompleted||e.isCancelled||e.error)}stopPolling(){if(!this.stopped){this.stopped=true;if(this.reject){this.reject(new PollerStoppedError("This poller is already stopped"))}}}isStopped(){return this.stopped}cancelOperation(e={}){if(!this.cancelPromise){this.cancelPromise=this.cancelOnce(e)}else if(e.abortSignal){throw new Error("A cancel request is currently pending")}return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){const e=this.operation.state;return e.result}toString(){return this.operation.toString()}}class LroEngine extends Poller{constructor(e,t){const{intervalInMs:n=y,resumeFrom:o,resolveOnUnsuccessful:i=false,isDone:c,lroResourceLocationConfig:d,processResult:p,updateState:C}=t||{};const Q=o?deserializeState(o):{};const v=new GenericPollOperation(Q,e,!i,d,p,C,c);super(v);this.resolveOnUnsuccessful=i;this.config={intervalInMs:n};v.setPollerConfig(this.config)}delay(){return new Promise((e=>setTimeout((()=>e()),this.config.intervalInMs)))}}o=LroEngine;t.vu=Poller;o=PollerCancelledError;o=PollerStoppedError;o=createHttpPoller},1391:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});const n=new WeakMap;const o=new WeakMap;class AbortSignal{constructor(){this.onabort=null;n.set(this,[]);o.set(this,false)}get aborted(){if(!o.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}return o.get(this)}static get none(){return new AbortSignal}addEventListener(e,t){if(!n.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const o=n.get(this);o.push(t)}removeEventListener(e,t){if(!n.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const o=n.get(this);const i=o.indexOf(t);if(i>-1){o.splice(i,1)}}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function abortSignal(e){if(e.aborted){return}if(e.onabort){e.onabort.call(e)}const t=n.get(e);if(t){t.slice().forEach((t=>{t.call(e,{type:"abort"})}))}o.set(e,true)}class AbortError extends Error{constructor(e){super(e);this.name="AbortError"}}class AbortController{constructor(e){this._signal=new AbortSignal;if(!e){return}if(!Array.isArray(e)){e=arguments}for(const t of e){if(t.aborted){this.abort()}else{t.addEventListener("abort",(()=>{this.abort()}))}}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(e){const t=new AbortSignal;const n=setTimeout(abortSignal,e,t);if(typeof n.unref==="function"){n.unref()}return t}}t.AbortController=AbortController;t.AbortError=AbortError;t.AbortSignal=AbortSignal},7132:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});var o=n(1391);var i=n(6982);var c;const d=typeof process!=="undefined"&&Boolean(process.version)&&Boolean((c=process.versions)===null||c===void 0?void 0:c.node);function createAbortablePromise(e,t){const{cleanupBeforeAbort:n,abortSignal:i,abortErrorMsg:c}=t!==null&&t!==void 0?t:{};return new Promise(((t,d)=>{function rejectOnAbort(){d(new o.AbortError(c!==null&&c!==void 0?c:"The operation was aborted."))}function removeListeners(){i===null||i===void 0?void 0:i.removeEventListener("abort",onAbort)}function onAbort(){n===null||n===void 0?void 0:n();removeListeners();rejectOnAbort()}if(i===null||i===void 0?void 0:i.aborted){return rejectOnAbort()}try{e((e=>{removeListeners();t(e)}),(e=>{removeListeners();d(e)}))}catch(e){d(e)}i===null||i===void 0?void 0:i.addEventListener("abort",onAbort)}))}const p="The delay was aborted.";function delay(e,t){let n;const{abortSignal:o,abortErrorMsg:i}=t!==null&&t!==void 0?t:{};return createAbortablePromise((t=>{n=setTimeout(t,e)}),{cleanupBeforeAbort:()=>clearTimeout(n),abortSignal:o,abortErrorMsg:i!==null&&i!==void 0?i:p})}function getRandomIntegerInclusive(e,t){e=Math.ceil(e);t=Math.floor(t);const n=Math.floor(Math.random()*(t-e+1));return n+e}function isObject(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function isError(e){if(isObject(e)){const t=typeof e.name==="string";const n=typeof e.message==="string";return t&&n}return false}function getErrorMessage(e){if(isError(e)){return e.message}else{let t;try{if(typeof e==="object"&&e){t=JSON.stringify(e)}else{t=String(e)}}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}async function computeSha256Hmac(e,t,n){const o=Buffer.from(e,"base64");return i.createHmac("sha256",o).update(t).digest(n)}async function computeSha256Hash(e,t){return i.createHash("sha256").update(e).digest(t)}function isDefined(e){return typeof e!=="undefined"&&e!==null}function isObjectWithProperties(e,t){if(!isDefined(e)||typeof e!=="object"){return false}for(const n of t){if(!objectHasProperty(e,n)){return false}}return true}function objectHasProperty(e,t){return isDefined(e)&&typeof e==="object"&&t in e}function generateUUID(){let e="";for(let t=0;t<32;t++){const n=Math.floor(Math.random()*16);if(t===12){e+="4"}else if(t===16){e+=n&3|8}else{e+=n.toString(16)}if(t===7||t===11||t===15||t===19){e+="-"}}return e}var y;let C=typeof((y=globalThis===null||globalThis===void 0?void 0:globalThis.crypto)===null||y===void 0?void 0:y.randomUUID)==="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):i.randomUUID;if(!C){C=generateUUID}function randomUUID(){return C()}t.computeSha256Hash=computeSha256Hash;t.computeSha256Hmac=computeSha256Hmac;t.createAbortablePromise=createAbortablePromise;t.delay=delay;t.getErrorMessage=getErrorMessage;t.getRandomIntegerInclusive=getRandomIntegerInclusive;t.isDefined=isDefined;t.isError=isError;t.isNode=d;t.isObject=isObject;t.isObjectWithProperties=isObjectWithProperties;t.objectHasProperty=objectHasProperty;t.randomUUID=randomUUID},5004:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});var o=n(857);var i=n(9023);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var c=_interopDefaultLegacy(i);function log(e,...t){process.stderr.write(`${c["default"].format(e,...t)}${o.EOL}`)}const d=typeof process!=="undefined"&&process.env&&process.env.DEBUG||undefined;let p;let y=[];let C=[];const Q=[];if(d){enable(d)}const v=Object.assign((e=>createDebugger(e)),{enable:enable,enabled:enabled,disable:disable,log:log});function enable(e){p=e;y=[];C=[];const t=/\*/g;const n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n){if(e.startsWith("-")){C.push(new RegExp(`^${e.substr(1)}$`))}else{y.push(new RegExp(`^${e}$`))}}for(const e of Q){e.enabled=enabled(e.namespace)}}function enabled(e){if(e.endsWith("*")){return true}for(const t of C){if(t.test(e)){return false}}for(const t of y){if(t.test(e)){return true}}return false}function disable(){const e=p||"";enable("");return e}function createDebugger(e){const t=Object.assign(debug,{enabled:enabled(e),destroy:destroy,log:v.log,namespace:e,extend:extend});function debug(...n){if(!t.enabled){return}if(n.length>0){n[0]=`${e} ${n[0]}`}t.log(...n)}Q.push(t);return t}function destroy(){const e=Q.indexOf(this);if(e>=0){Q.splice(e,1);return true}return false}function extend(e){const t=createDebugger(`${this.namespace}:${e}`);t.log=this.log;return t}var D=v;const k=new Set;const $=typeof process!=="undefined"&&process.env&&process.env.AZURE_LOG_LEVEL||undefined;let V;const ee=D("azure");ee.log=(...e)=>{D.log(...e)};const te=["verbose","info","warning","error"];if($){if(isAzureLogLevel($)){setLogLevel($)}else{console.error(`AZURE_LOG_LEVEL set to unknown log level '${$}'; logging is not enabled. Acceptable values: ${te.join(", ")}.`)}}function setLogLevel(e){if(e&&!isAzureLogLevel(e)){throw new Error(`Unknown log level '${e}'. Acceptable values: ${te.join(",")}`)}V=e;const t=[];for(const e of k){if(shouldEnable(e)){t.push(e.namespace)}}D.enable(t.join(","))}function getLogLevel(){return V}const re={verbose:400,info:300,warning:200,error:100};function createClientLogger(e){const t=ee.extend(e);patchLogMethod(ee,t);return{error:createLogger(t,"error"),warning:createLogger(t,"warning"),info:createLogger(t,"info"),verbose:createLogger(t,"verbose")}}function patchLogMethod(e,t){t.log=(...t)=>{e.log(...t)}}function createLogger(e,t){const n=Object.assign(e.extend(t),{level:t});patchLogMethod(e,n);if(shouldEnable(n)){const e=D.disable();D.enable(e+","+n.namespace)}k.add(n);return n}function shouldEnable(e){return Boolean(V&&re[e.level]<=re[V])}function isAzureLogLevel(e){return te.includes(e)}t.AzureLogger=ee;t.createClientLogger=createClientLogger;t.getLogLevel=getLogLevel;t.setLogLevel=setLogLevel},1046:(e,t,n)=>{const o=Symbol("SemVer ANY");class Comparator{static get ANY(){return o}constructor(e,t){t=i(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}e=e.trim().split(/\s+/).join(" ");y("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===o){this.value=""}else{this.value=this.operator+this.semver.version}y("comp",this)}parse(e){const t=this.options.loose?c[d.COMPARATORLOOSE]:c[d.COMPARATOR];const n=e.match(t);if(!n){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=n[1]!==undefined?n[1]:"";if(this.operator==="="){this.operator=""}if(!n[2]){this.semver=o}else{this.semver=new C(n[2],this.options.loose)}}toString(){return this.value}test(e){y("Comparator.test",e,this.options.loose);if(this.semver===o||e===o){return true}if(typeof e==="string"){try{e=new C(e,this.options)}catch(e){return false}}return p(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new Q(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new Q(this.value,t).test(e.semver)}t=i(t);if(t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")){return false}if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&e.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&e.operator.startsWith("<")){return true}if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")){return true}if(p(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")){return true}if(p(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")){return true}return false}}e.exports=Comparator;const i=n(7766);const{safeRe:c,t:d}=n(4836);const p=n(7721);const y=n(2814);const C=n(5186);const Q=n(3177)},3177:(e,t,n)=>{const o=/\s+/g;class Range{constructor(e,t){t=d(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof p){this.raw=e.value;this.set=[[e]];this.formatted=undefined;return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e.trim().replace(o," ");this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0){this.set=[e]}else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.formatted=undefined}get range(){if(this.formatted===undefined){this.formatted="";for(let e=0;e0){this.formatted+="||"}const t=this.set[e];for(let e=0;e0){this.formatted+=" "}this.formatted+=t[e].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=(this.options.includePrerelease&&V)|(this.options.loose&&ee);const n=t+":"+e;const o=c.get(n);if(o){return o}const i=this.options.loose;const d=i?Q[v.HYPHENRANGELOOSE]:Q[v.HYPHENRANGE];e=e.replace(d,hyphenReplace(this.options.includePrerelease));y("hyphen replace",e);e=e.replace(Q[v.COMPARATORTRIM],D);y("comparator trim",e);e=e.replace(Q[v.TILDETRIM],k);y("tilde trim",e);e=e.replace(Q[v.CARETTRIM],$);y("caret trim",e);let C=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));if(i){C=C.filter((e=>{y("loose invalid filter",e,this.options);return!!e.match(Q[v.COMPARATORLOOSE])}))}y("range list",C);const te=new Map;const re=C.map((e=>new p(e,this.options)));for(const e of re){if(isNullSet(e)){return[e]}te.set(e.value,e)}if(te.size>1&&te.has("")){te.delete("")}const ne=[...te.values()];c.set(n,ne);return ne}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((n=>isSatisfiable(n,t)&&e.set.some((e=>isSatisfiable(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new C(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let n=true;const o=e.slice();let i=o.pop();while(n&&o.length){n=o.every((e=>i.intersects(e,t)));i=o.pop()}return n};const parseComparator=(e,t)=>{e=e.replace(Q[v.BUILD],"");y("comp",e,t);e=replaceCarets(e,t);y("caret",e);e=replaceTildes(e,t);y("tildes",e);e=replaceXRanges(e,t);y("xrange",e);e=replaceStars(e,t);y("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const n=t.loose?Q[v.TILDELOOSE]:Q[v.TILDE];return e.replace(n,((t,n,o,i,c)=>{y("tilde",e,t,n,o,i,c);let d;if(isX(n)){d=""}else if(isX(o)){d=`>=${n}.0.0 <${+n+1}.0.0-0`}else if(isX(i)){d=`>=${n}.${o}.0 <${n}.${+o+1}.0-0`}else if(c){y("replaceTilde pr",c);d=`>=${n}.${o}.${i}-${c} <${n}.${+o+1}.0-0`}else{d=`>=${n}.${o}.${i} <${n}.${+o+1}.0-0`}y("tilde return",d);return d}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{y("caret",e,t);const n=t.loose?Q[v.CARETLOOSE]:Q[v.CARET];const o=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,c,d)=>{y("caret",e,t,n,i,c,d);let p;if(isX(n)){p=""}else if(isX(i)){p=`>=${n}.0.0${o} <${+n+1}.0.0-0`}else if(isX(c)){if(n==="0"){p=`>=${n}.${i}.0${o} <${n}.${+i+1}.0-0`}else{p=`>=${n}.${i}.0${o} <${+n+1}.0.0-0`}}else if(d){y("replaceCaret pr",d);if(n==="0"){if(i==="0"){p=`>=${n}.${i}.${c}-${d} <${n}.${i}.${+c+1}-0`}else{p=`>=${n}.${i}.${c}-${d} <${n}.${+i+1}.0-0`}}else{p=`>=${n}.${i}.${c}-${d} <${+n+1}.0.0-0`}}else{y("no pr");if(n==="0"){if(i==="0"){p=`>=${n}.${i}.${c}${o} <${n}.${i}.${+c+1}-0`}else{p=`>=${n}.${i}.${c}${o} <${n}.${+i+1}.0-0`}}else{p=`>=${n}.${i}.${c} <${+n+1}.0.0-0`}}y("caret return",p);return p}))};const replaceXRanges=(e,t)=>{y("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const n=t.loose?Q[v.XRANGELOOSE]:Q[v.XRANGE];return e.replace(n,((n,o,i,c,d,p)=>{y("xRange",e,n,o,i,c,d,p);const C=isX(i);const Q=C||isX(c);const v=Q||isX(d);const D=v;if(o==="="&&D){o=""}p=t.includePrerelease?"-0":"";if(C){if(o===">"||o==="<"){n="<0.0.0-0"}else{n="*"}}else if(o&&D){if(Q){c=0}d=0;if(o===">"){o=">=";if(Q){i=+i+1;c=0;d=0}else{c=+c+1;d=0}}else if(o==="<="){o="<";if(Q){i=+i+1}else{c=+c+1}}if(o==="<"){p="-0"}n=`${o+i}.${c}.${d}${p}`}else if(Q){n=`>=${i}.0.0${p} <${+i+1}.0.0-0`}else if(v){n=`>=${i}.${c}.0${p} <${i}.${+c+1}.0-0`}y("xRange return",n);return n}))};const replaceStars=(e,t)=>{y("replaceStars",e,t);return e.trim().replace(Q[v.STAR],"")};const replaceGTE0=(e,t)=>{y("replaceGTE0",e,t);return e.trim().replace(Q[t.includePrerelease?v.GTE0PRE:v.GTE0],"")};const hyphenReplace=e=>(t,n,o,i,c,d,p,y,C,Q,v,D)=>{if(isX(o)){n=""}else if(isX(i)){n=`>=${o}.0.0${e?"-0":""}`}else if(isX(c)){n=`>=${o}.${i}.0${e?"-0":""}`}else if(d){n=`>=${n}`}else{n=`>=${n}${e?"-0":""}`}if(isX(C)){y=""}else if(isX(Q)){y=`<${+C+1}.0.0-0`}else if(isX(v)){y=`<${C}.${+Q+1}.0-0`}else if(D){y=`<=${C}.${Q}.${v}-${D}`}else if(e){y=`<${C}.${Q}.${+v+1}-0`}else{y=`<=${y}`}return`${n} ${y}`.trim()};const testSet=(e,t,n)=>{for(let n=0;n0){const o=e[n].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch){return true}}}return false}return true}},5186:(e,t,n)=>{const o=n(2814);const{MAX_LENGTH:i,MAX_SAFE_INTEGER:c}=n(8504);const{safeRe:d,t:p}=n(4836);const y=n(7766);const{compareIdentifiers:C}=n(7865);class SemVer{constructor(e,t){t=y(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`)}if(e.length>i){throw new TypeError(`version is longer than ${i} characters`)}o("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?d[p.LOOSE]:d[p.FULL]);if(!n){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>c||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>c||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>c||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&te.major){return 1}if(this.minore.minor){return 1}if(this.patche.patch){return 1}return 0}comparePre(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}if(this.prerelease.length&&!e.prerelease.length){return-1}else if(!this.prerelease.length&&e.prerelease.length){return 1}else if(!this.prerelease.length&&!e.prerelease.length){return 0}let t=0;do{const n=this.prerelease[t];const i=e.prerelease[t];o("prerelease compare",t,n,i);if(n===undefined&&i===undefined){return 0}else if(i===undefined){return 1}else if(n===undefined){return-1}else if(n===i){continue}else{return C(n,i)}}while(++t)}compareBuild(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}let t=0;do{const n=this.build[t];const i=e.build[t];o("build compare",t,n,i);if(n===undefined&&i===undefined){return 0}else if(i===undefined){return 1}else if(n===undefined){return-1}else if(n===i){continue}else{return C(n,i)}}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&n===false){throw new Error("invalid increment argument: identifier is empty")}if(t){const e=`-${t}`.match(this.options.loose?d[p.PRERELEASELOOSE]:d[p.PRERELEASE]);if(!e||e[1]!==t){throw new Error(`invalid identifier: ${t}`)}}}switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0;this.inc("patch",t,n);this.inc("pre",t,n);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",t,n)}this.inc("pre",t,n);break;case"release":if(this.prerelease.length===0){throw new Error(`version ${this.raw} is not a prerelease`)}this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(this.prerelease.length===0){this.prerelease=[e]}else{let o=this.prerelease.length;while(--o>=0){if(typeof this.prerelease[o]==="number"){this.prerelease[o]++;o=-2}}if(o===-1){if(t===this.prerelease.join(".")&&n===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(e)}}if(t){let o=[t,e];if(n===false){o=[t]}if(C(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1])){this.prerelease=o}}else{this.prerelease=o}}break}default:throw new Error(`invalid increment argument: ${e}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}e.exports=SemVer},5436:(e,t,n)=>{const o=n(7526);const clean=(e,t)=>{const n=o(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};e.exports=clean},7721:(e,t,n)=>{const o=n(4107);const i=n(7705);const c=n(7962);const d=n(5603);const p=n(525);const y=n(3966);const cmp=(e,t,n,C)=>{switch(t){case"===":if(typeof e==="object"){e=e.version}if(typeof n==="object"){n=n.version}return e===n;case"!==":if(typeof e==="object"){e=e.version}if(typeof n==="object"){n=n.version}return e!==n;case"":case"=":case"==":return o(e,n,C);case"!=":return i(e,n,C);case">":return c(e,n,C);case">=":return d(e,n,C);case"<":return p(e,n,C);case"<=":return y(e,n,C);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},6356:(e,t,n)=>{const o=n(5186);const i=n(7526);const{safeRe:c,t:d}=n(4836);const coerce=(e,t)=>{if(e instanceof o){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let n=null;if(!t.rtl){n=e.match(t.includePrerelease?c[d.COERCEFULL]:c[d.COERCE])}else{const o=t.includePrerelease?c[d.COERCERTLFULL]:c[d.COERCERTL];let i;while((i=o.exec(e))&&(!n||n.index+n[0].length!==e.length)){if(!n||i.index+i[0].length!==n.index+n[0].length){n=i}o.lastIndex=i.index+i[1].length+i[2].length}o.lastIndex=-1}if(n===null){return null}const p=n[2];const y=n[3]||"0";const C=n[4]||"0";const Q=t.includePrerelease&&n[5]?`-${n[5]}`:"";const v=t.includePrerelease&&n[6]?`+${n[6]}`:"";return i(`${p}.${y}.${C}${Q}${v}`,t)};e.exports=coerce},2147:(e,t,n)=>{const o=n(5186);const compareBuild=(e,t,n)=>{const i=new o(e,n);const c=new o(t,n);return i.compare(c)||i.compareBuild(c)};e.exports=compareBuild},8545:(e,t,n)=>{const o=n(18);const compareLoose=(e,t)=>o(e,t,true);e.exports=compareLoose},18:(e,t,n)=>{const o=n(5186);const compare=(e,t,n)=>new o(e,n).compare(new o(t,n));e.exports=compare},7290:(e,t,n)=>{const o=n(7526);const diff=(e,t)=>{const n=o(e,null,true);const i=o(t,null,true);const c=n.compare(i);if(c===0){return null}const d=c>0;const p=d?n:i;const y=d?i:n;const C=!!p.prerelease.length;const Q=!!y.prerelease.length;if(Q&&!C){if(!y.patch&&!y.minor){return"major"}if(y.compareMain(p)===0){if(y.minor&&!y.patch){return"minor"}return"patch"}}const v=C?"pre":"";if(n.major!==i.major){return v+"major"}if(n.minor!==i.minor){return v+"minor"}if(n.patch!==i.patch){return v+"patch"}return"prerelease"};e.exports=diff},4107:(e,t,n)=>{const o=n(18);const eq=(e,t,n)=>o(e,t,n)===0;e.exports=eq},7962:(e,t,n)=>{const o=n(18);const gt=(e,t,n)=>o(e,t,n)>0;e.exports=gt},5603:(e,t,n)=>{const o=n(18);const gte=(e,t,n)=>o(e,t,n)>=0;e.exports=gte},2317:(e,t,n)=>{const o=n(5186);const inc=(e,t,n,i,c)=>{if(typeof n==="string"){c=i;i=n;n=undefined}try{return new o(e instanceof o?e.version:e,n).inc(t,i,c).version}catch(e){return null}};e.exports=inc},525:(e,t,n)=>{const o=n(18);const lt=(e,t,n)=>o(e,t,n)<0;e.exports=lt},3966:(e,t,n)=>{const o=n(18);const lte=(e,t,n)=>o(e,t,n)<=0;e.exports=lte},4716:(e,t,n)=>{const o=n(5186);const major=(e,t)=>new o(e,t).major;e.exports=major},7968:(e,t,n)=>{const o=n(5186);const minor=(e,t)=>new o(e,t).minor;e.exports=minor},7705:(e,t,n)=>{const o=n(18);const neq=(e,t,n)=>o(e,t,n)!==0;e.exports=neq},7526:(e,t,n)=>{const o=n(5186);const parse=(e,t,n=false)=>{if(e instanceof o){return e}try{return new o(e,t)}catch(e){if(!n){return null}throw e}};e.exports=parse},4807:(e,t,n)=>{const o=n(5186);const patch=(e,t)=>new o(e,t).patch;e.exports=patch},5039:(e,t,n)=>{const o=n(7526);const prerelease=(e,t)=>{const n=o(e,t);return n&&n.prerelease.length?n.prerelease:null};e.exports=prerelease},5236:(e,t,n)=>{const o=n(18);const rcompare=(e,t,n)=>o(t,e,n);e.exports=rcompare},9547:(e,t,n)=>{const o=n(2147);const rsort=(e,t)=>e.sort(((e,n)=>o(n,e,t)));e.exports=rsort},6076:(e,t,n)=>{const o=n(3177);const satisfies=(e,t,n)=>{try{t=new o(t,n)}catch(e){return false}return t.test(e)};e.exports=satisfies},6293:(e,t,n)=>{const o=n(2147);const sort=(e,t)=>e.sort(((e,n)=>o(e,n,t)));e.exports=sort},2475:(e,t,n)=>{const o=n(7526);const valid=(e,t)=>{const n=o(e,t);return n?n.version:null};e.exports=valid},1955:(e,t,n)=>{const o=n(4836);const i=n(8504);const c=n(5186);const d=n(7865);const p=n(7526);const y=n(2475);const C=n(5436);const Q=n(2317);const v=n(7290);const D=n(4716);const k=n(7968);const $=n(4807);const V=n(5039);const ee=n(18);const te=n(5236);const re=n(8545);const ne=n(2147);const se=n(6293);const oe=n(9547);const ie=n(7962);const ae=n(525);const ce=n(4107);const le=n(7705);const ue=n(5603);const de=n(3966);const pe=n(7721);const Ae=n(6356);const me=n(1046);const ge=n(3177);const fe=n(6076);const he=n(8465);const ye=n(1550);const Ee=n(9820);const Ce=n(2271);const Ie=n(8816);const be=n(6317);const Se=n(5133);const Be=n(8548);const we=n(9118);const Re=n(3139);const Ne=n(1093);e.exports={parse:p,valid:y,clean:C,inc:Q,diff:v,major:D,minor:k,patch:$,prerelease:V,compare:ee,rcompare:te,compareLoose:re,compareBuild:ne,sort:se,rsort:oe,gt:ie,lt:ae,eq:ce,neq:le,gte:ue,lte:de,cmp:pe,coerce:Ae,Comparator:me,Range:ge,satisfies:fe,toComparators:he,maxSatisfying:ye,minSatisfying:Ee,minVersion:Ce,validRange:Ie,outside:be,gtr:Se,ltr:Be,intersects:we,simplifyRange:Re,subset:Ne,SemVer:c,re:o.re,src:o.src,tokens:o.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:d.compareIdentifiers,rcompareIdentifiers:d.rcompareIdentifiers}},8504:e=>{const t="2.0.0";const n=256;const o=Number.MAX_SAFE_INTEGER||9007199254740991;const i=16;const c=n-6;const d=["major","premajor","minor","preminor","patch","prepatch","prerelease"];e.exports={MAX_LENGTH:n,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:o,RELEASE_TYPES:d,SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},2814:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},7865:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,n)=>{if(typeof e==="number"&&typeof n==="number"){return e===n?0:ecompareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},7515:e=>{class LRUCache{constructor(){this.max=1e3;this.map=new Map}get(e){const t=this.map.get(e);if(t===undefined){return undefined}else{this.map.delete(e);this.map.set(e,t);return t}}delete(e){return this.map.delete(e)}set(e,t){const n=this.delete(e);if(!n&&t!==undefined){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}e.exports=LRUCache},7766:e=>{const t=Object.freeze({loose:true});const n=Object.freeze({});const parseOptions=e=>{if(!e){return n}if(typeof e!=="object"){return t}return e};e.exports=parseOptions},4836:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:o,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:c}=n(8504);const d=n(2814);t=e.exports={};const p=t.re=[];const y=t.safeRe=[];const C=t.src=[];const Q=t.safeSrc=[];const v=t.t={};let D=0;const k="[a-zA-Z0-9-]";const $=[["\\s",1],["\\d",c],[k,i]];const makeSafeRegex=e=>{for(const[t,n]of $){e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`)}return e};const createToken=(e,t,n)=>{const o=makeSafeRegex(t);const i=D++;d(e,i,t);v[e]=i;C[i]=t;Q[i]=o;p[i]=new RegExp(t,n?"g":undefined);y[i]=new RegExp(o,n?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${k}*`);createToken("MAINVERSION",`(${C[v.NUMERICIDENTIFIER]})\\.`+`(${C[v.NUMERICIDENTIFIER]})\\.`+`(${C[v.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${C[v.NUMERICIDENTIFIERLOOSE]})\\.`+`(${C[v.NUMERICIDENTIFIERLOOSE]})\\.`+`(${C[v.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${C[v.NONNUMERICIDENTIFIER]}|${C[v.NUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${C[v.NONNUMERICIDENTIFIER]}|${C[v.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASE",`(?:-(${C[v.PRERELEASEIDENTIFIER]}(?:\\.${C[v.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${C[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[v.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${k}+`);createToken("BUILD",`(?:\\+(${C[v.BUILDIDENTIFIER]}(?:\\.${C[v.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${C[v.MAINVERSION]}${C[v.PRERELEASE]}?${C[v.BUILD]}?`);createToken("FULL",`^${C[v.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${C[v.MAINVERSIONLOOSE]}${C[v.PRERELEASELOOSE]}?${C[v.BUILD]}?`);createToken("LOOSE",`^${C[v.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${C[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${C[v.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${C[v.XRANGEIDENTIFIER]})`+`(?:\\.(${C[v.XRANGEIDENTIFIER]})`+`(?:\\.(${C[v.XRANGEIDENTIFIER]})`+`(?:${C[v.PRERELEASE]})?${C[v.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:${C[v.PRERELEASELOOSE]})?${C[v.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${C[v.GTLT]}\\s*${C[v.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${C[v.GTLT]}\\s*${C[v.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`${"(^|[^\\d])"+"(\\d{1,"}${o}})`+`(?:\\.(\\d{1,${o}}))?`+`(?:\\.(\\d{1,${o}}))?`);createToken("COERCE",`${C[v.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",C[v.COERCEPLAIN]+`(?:${C[v.PRERELEASE]})?`+`(?:${C[v.BUILD]})?`+`(?:$|[^\\d])`);createToken("COERCERTL",C[v.COERCE],true);createToken("COERCERTLFULL",C[v.COERCEFULL],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${C[v.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${C[v.LONETILDE]}${C[v.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${C[v.LONETILDE]}${C[v.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${C[v.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${C[v.LONECARET]}${C[v.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${C[v.LONECARET]}${C[v.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${C[v.GTLT]}\\s*(${C[v.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${C[v.GTLT]}\\s*(${C[v.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${C[v.GTLT]}\\s*(${C[v.LOOSEPLAIN]}|${C[v.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${C[v.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${C[v.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${C[v.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${C[v.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},5133:(e,t,n)=>{const o=n(6317);const gtr=(e,t,n)=>o(e,t,">",n);e.exports=gtr},9118:(e,t,n)=>{const o=n(3177);const intersects=(e,t,n)=>{e=new o(e,n);t=new o(t,n);return e.intersects(t,n)};e.exports=intersects},8548:(e,t,n)=>{const o=n(6317);const ltr=(e,t,n)=>o(e,t,"<",n);e.exports=ltr},1550:(e,t,n)=>{const o=n(5186);const i=n(3177);const maxSatisfying=(e,t,n)=>{let c=null;let d=null;let p=null;try{p=new i(t,n)}catch(e){return null}e.forEach((e=>{if(p.test(e)){if(!c||d.compare(e)===-1){c=e;d=new o(c,n)}}}));return c};e.exports=maxSatisfying},9820:(e,t,n)=>{const o=n(5186);const i=n(3177);const minSatisfying=(e,t,n)=>{let c=null;let d=null;let p=null;try{p=new i(t,n)}catch(e){return null}e.forEach((e=>{if(p.test(e)){if(!c||d.compare(e)===1){c=e;d=new o(c,n)}}}));return c};e.exports=minSatisfying},2271:(e,t,n)=>{const o=n(5186);const i=n(3177);const c=n(7962);const minVersion=(e,t)=>{e=new i(e,t);let n=new o("0.0.0");if(e.test(n)){return n}n=new o("0.0.0-0");if(e.test(n)){return n}n=null;for(let t=0;t{const t=new o(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!d||c(t,d)){d=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(d&&(!n||c(n,d))){n=d}}if(n&&e.test(n)){return n}return null};e.exports=minVersion},6317:(e,t,n)=>{const o=n(5186);const i=n(1046);const{ANY:c}=i;const d=n(3177);const p=n(6076);const y=n(7962);const C=n(525);const Q=n(3966);const v=n(5603);const outside=(e,t,n,D)=>{e=new o(e,D);t=new d(t,D);let k,$,V,ee,te;switch(n){case">":k=y;$=Q;V=C;ee=">";te=">=";break;case"<":k=C;$=v;V=y;ee="<";te="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(p(e,t,D)){return false}for(let n=0;n{if(e.semver===c){e=new i(">=0.0.0")}d=d||e;p=p||e;if(k(e.semver,d.semver,D)){d=e}else if(V(e.semver,p.semver,D)){p=e}}));if(d.operator===ee||d.operator===te){return false}if((!p.operator||p.operator===ee)&&$(e,p.semver)){return false}else if(p.operator===te&&V(e,p.semver)){return false}}return true};e.exports=outside},3139:(e,t,n)=>{const o=n(6076);const i=n(18);e.exports=(e,t,n)=>{const c=[];let d=null;let p=null;const y=e.sort(((e,t)=>i(e,t,n)));for(const e of y){const i=o(e,t,n);if(i){p=e;if(!d){d=e}}else{if(p){c.push([d,p])}p=null;d=null}}if(d){c.push([d,null])}const C=[];for(const[e,t]of c){if(e===t){C.push(e)}else if(!t&&e===y[0]){C.push("*")}else if(!t){C.push(`>=${e}`)}else if(e===y[0]){C.push(`<=${t}`)}else{C.push(`${e} - ${t}`)}}const Q=C.join(" || ");const v=typeof t.raw==="string"?t.raw:String(t);return Q.length{const o=n(3177);const i=n(1046);const{ANY:c}=i;const d=n(6076);const p=n(18);const subset=(e,t,n={})=>{if(e===t){return true}e=new o(e,n);t=new o(t,n);let i=false;e:for(const o of e.set){for(const e of t.set){const t=simpleSubset(o,e,n);i=i||t!==null;if(t){continue e}}if(i){return false}}return true};const y=[new i(">=0.0.0-0")];const C=[new i(">=0.0.0")];const simpleSubset=(e,t,n)=>{if(e===t){return true}if(e.length===1&&e[0].semver===c){if(t.length===1&&t[0].semver===c){return true}else if(n.includePrerelease){e=y}else{e=C}}if(t.length===1&&t[0].semver===c){if(n.includePrerelease){return true}else{t=C}}const o=new Set;let i,Q;for(const t of e){if(t.operator===">"||t.operator===">="){i=higherGT(i,t,n)}else if(t.operator==="<"||t.operator==="<="){Q=lowerLT(Q,t,n)}else{o.add(t.semver)}}if(o.size>1){return null}let v;if(i&&Q){v=p(i.semver,Q.semver,n);if(v>0){return null}else if(v===0&&(i.operator!==">="||Q.operator!=="<=")){return null}}for(const e of o){if(i&&!d(e,String(i),n)){return null}if(Q&&!d(e,String(Q),n)){return null}for(const o of t){if(!d(e,String(o),n)){return false}}return true}let D,k;let $,V;let ee=Q&&!n.includePrerelease&&Q.semver.prerelease.length?Q.semver:false;let te=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:false;if(ee&&ee.prerelease.length===1&&Q.operator==="<"&&ee.prerelease[0]===0){ee=false}for(const e of t){V=V||e.operator===">"||e.operator===">=";$=$||e.operator==="<"||e.operator==="<=";if(i){if(te){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===te.major&&e.semver.minor===te.minor&&e.semver.patch===te.patch){te=false}}if(e.operator===">"||e.operator===">="){D=higherGT(i,e,n);if(D===e&&D!==i){return false}}else if(i.operator===">="&&!d(i.semver,String(e),n)){return false}}if(Q){if(ee){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===ee.major&&e.semver.minor===ee.minor&&e.semver.patch===ee.patch){ee=false}}if(e.operator==="<"||e.operator==="<="){k=lowerLT(Q,e,n);if(k===e&&k!==Q){return false}}else if(Q.operator==="<="&&!d(Q.semver,String(e),n)){return false}}if(!e.operator&&(Q||i)&&v!==0){return false}}if(i&&$&&!Q&&v!==0){return false}if(Q&&V&&!i&&v!==0){return false}if(te||ee){return false}return true};const higherGT=(e,t,n)=>{if(!e){return t}const o=p(e.semver,t.semver,n);return o>0?e:o<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,n)=>{if(!e){return t}const o=p(e.semver,t.semver,n);return o<0?e:o>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},8465:(e,t,n)=>{const o=n(3177);const toComparators=(e,t)=>new o(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},8816:(e,t,n)=>{const o=n(3177);const validRange=(e,t)=>{try{return new o(e,t).range||"*"}catch(e){return null}};e.exports=validRange},9316:(e,t,n)=>{var o=n(6716);var i=n(6324);var c=n(9674);const d="AWS_USE_DUALSTACK_ENDPOINT";const p="use_dualstack_endpoint";const y=false;const C={environmentVariableSelector:e=>o.booleanSelector(e,d,o.SelectorType.ENV),configFileSelector:e=>o.booleanSelector(e,p,o.SelectorType.CONFIG),default:false};const Q="AWS_USE_FIPS_ENDPOINT";const v="use_fips_endpoint";const D=false;const k={environmentVariableSelector:e=>o.booleanSelector(e,Q,o.SelectorType.ENV),configFileSelector:e=>o.booleanSelector(e,v,o.SelectorType.CONFIG),default:false};const resolveCustomEndpointsConfig=e=>{const{tls:t,endpoint:n,urlParser:o,useDualstackEndpoint:c}=e;return Object.assign(e,{tls:t??true,endpoint:i.normalizeProvider(typeof n==="string"?o(n):n),isCustomEndpoint:true,useDualstackEndpoint:i.normalizeProvider(c??false)})};const getEndpointFromRegion=async e=>{const{tls:t=true}=e;const n=await e.region();const o=new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);if(!o.test(n)){throw new Error("Invalid region in client config")}const i=await e.useDualstackEndpoint();const c=await e.useFipsEndpoint();const{hostname:d}=await e.regionInfoProvider(n,{useDualstackEndpoint:i,useFipsEndpoint:c})??{};if(!d){throw new Error("Cannot resolve hostname from client config")}return e.urlParser(`${t?"https:":"http:"}//${d}`)};const resolveEndpointsConfig=e=>{const t=i.normalizeProvider(e.useDualstackEndpoint??false);const{endpoint:n,useFipsEndpoint:o,urlParser:c,tls:d}=e;return Object.assign(e,{tls:d??true,endpoint:n?i.normalizeProvider(typeof n==="string"?c(n):n):()=>getEndpointFromRegion({...e,useDualstackEndpoint:t,useFipsEndpoint:o}),isCustomEndpoint:!!n,useDualstackEndpoint:t})};const $="AWS_REGION";const V="region";const ee={environmentVariableSelector:e=>e[$],configFileSelector:e=>e[V],default:()=>{throw new Error("Region is missing")}};const te={preferredFile:"credentials"};const re=new Set;const checkRegion=(e,t=c.isValidHostLabel)=>{if(!re.has(e)&&!t(e)){if(e==="*"){console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`)}else{throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`)}}else{re.add(e)}};const isFipsRegion=e=>typeof e==="string"&&(e.startsWith("fips-")||e.endsWith("-fips"));const getRealRegion=e=>isFipsRegion(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const resolveRegionConfig=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t){throw new Error("Region is missing")}return Object.assign(e,{region:async()=>{const e=typeof t==="function"?await t():t;const n=getRealRegion(e);checkRegion(n);return n},useFipsEndpoint:async()=>{const e=typeof t==="string"?t:await t();if(isFipsRegion(e)){return true}return typeof n!=="function"?Promise.resolve(!!n):n()}})};const getHostnameFromVariants=(e=[],{useFipsEndpoint:t,useDualstackEndpoint:n})=>e.find((({tags:e})=>t===e.includes("fips")&&n===e.includes("dualstack")))?.hostname;const getResolvedHostname=(e,{regionHostname:t,partitionHostname:n})=>t?t:n?n.replace("{region}",e):undefined;const getResolvedPartition=(e,{partitionHash:t})=>Object.keys(t||{}).find((n=>t[n].regions.includes(e)))??"aws";const getResolvedSigningRegion=(e,{signingRegion:t,regionRegex:n,useFipsEndpoint:o})=>{if(t){return t}else if(o){const t=n.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\.");const o=e.match(t);if(o){return o[0].slice(1,-1)}}};const getRegionInfo=(e,{useFipsEndpoint:t=false,useDualstackEndpoint:n=false,signingService:o,regionHash:i,partitionHash:c})=>{const d=getResolvedPartition(e,{partitionHash:c});const p=e in i?e:c[d]?.endpoint??e;const y={useFipsEndpoint:t,useDualstackEndpoint:n};const C=getHostnameFromVariants(i[p]?.variants,y);const Q=getHostnameFromVariants(c[d]?.variants,y);const v=getResolvedHostname(p,{regionHostname:C,partitionHostname:Q});if(v===undefined){throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:p,useFipsEndpoint:t,useDualstackEndpoint:n}}`)}const D=getResolvedSigningRegion(v,{signingRegion:i[p]?.signingRegion,regionRegex:c[d].regionRegex,useFipsEndpoint:t});return{partition:d,signingService:o,hostname:v,...D&&{signingRegion:D},...i[p]?.signingService&&{signingService:i[p].signingService}}};t.CONFIG_USE_DUALSTACK_ENDPOINT=p;t.CONFIG_USE_FIPS_ENDPOINT=v;t.DEFAULT_USE_DUALSTACK_ENDPOINT=y;t.DEFAULT_USE_FIPS_ENDPOINT=D;t.ENV_USE_DUALSTACK_ENDPOINT=d;t.ENV_USE_FIPS_ENDPOINT=Q;t.NODE_REGION_CONFIG_FILE_OPTIONS=te;t.NODE_REGION_CONFIG_OPTIONS=ee;t.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS=C;t.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS=k;t.REGION_ENV_NAME=$;t.REGION_INI_NAME=V;t.getRegionInfo=getRegionInfo;t.resolveCustomEndpointsConfig=resolveCustomEndpointsConfig;t.resolveEndpointsConfig=resolveEndpointsConfig;t.resolveRegionConfig=resolveRegionConfig},402:(e,t,n)=>{var o=n(690);var i=n(6324);var c=n(3255);var d=n(2356);var p=n(3422);const getSmithyContext=e=>e[o.SMITHY_CONTEXT_KEY]||(e[o.SMITHY_CONTEXT_KEY]={});const resolveAuthOptions=(e,t)=>{if(!t||t.length===0){return e}const n=[];for(const o of t){for(const t of e){const e=t.schemeId.split("#")[1];if(e===o){n.push(t)}}}for(const t of e){if(!n.find((({schemeId:e})=>e===t.schemeId))){n.push(t)}}return n};function convertHttpAuthSchemesToMap(e){const t=new Map;for(const n of e){t.set(n.schemeId,n)}return t}const httpAuthSchemeMiddleware=(e,t)=>(n,o)=>async c=>{const d=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,o,c.input));const p=e.authSchemePreference?await e.authSchemePreference():[];const y=resolveAuthOptions(d,p);const C=convertHttpAuthSchemesToMap(e.httpAuthSchemes);const Q=i.getSmithyContext(o);const v=[];for(const n of y){const i=C.get(n.schemeId);if(!i){v.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const c=i.identityProvider(await t.identityProviderConfigProvider(e));if(!c){v.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:d={},signingProperties:p={}}=n.propertiesExtractor?.(e,o)||{};n.identityProperties=Object.assign(n.identityProperties||{},d);n.signingProperties=Object.assign(n.signingProperties||{},p);Q.selectedHttpAuthScheme={httpAuthOption:n,identity:await c(n.identityProperties),signer:i.signer};break}if(!Q.selectedHttpAuthScheme){throw new Error(v.join("\n"))}return n(c)};const y={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:true,relation:"before",toMiddleware:"endpointV2Middleware"};const getHttpAuthSchemeEndpointRuleSetPlugin=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:o=>{o.addRelativeTo(httpAuthSchemeMiddleware(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),y)}});const C={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:true,relation:"before",toMiddleware:c.serializerMiddlewareOption.name};const getHttpAuthSchemePlugin=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:o=>{o.addRelativeTo(httpAuthSchemeMiddleware(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),C)}});const defaultErrorHandler=e=>e=>{throw e};const defaultSuccessHandler=(e,t)=>{};const httpSigningMiddleware=e=>(e,t)=>async n=>{if(!d.HttpRequest.isInstance(n.request)){return e(n)}const o=i.getSmithyContext(t);const c=o.selectedHttpAuthScheme;if(!c){throw new Error(`No HttpAuthScheme was selected: unable to sign request`)}const{httpAuthOption:{signingProperties:p={}},identity:y,signer:C}=c;const Q=await e({...n,request:await C.sign(n.request,y,p)}).catch((C.errorHandler||defaultErrorHandler)(p));(C.successHandler||defaultSuccessHandler)(Q.response,p);return Q};const Q={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:true,relation:"after",toMiddleware:"retryMiddleware"};const getHttpSigningPlugin=e=>({applyToStack:e=>{e.addRelativeTo(httpSigningMiddleware(),Q)}});const normalizeProvider=e=>{if(typeof e==="function")return e;const t=Promise.resolve(e);return()=>t};const makePagedClientRequest=async(e,t,n,o=e=>e,...i)=>{let c=new e(n);c=o(c)??c;return await t.send(c,...i)};function createPaginator(e,t,n,o,i){return async function*paginateOperation(c,d,...p){const y=d;let C=c.startingToken??y[n];let Q=true;let v;while(Q){y[n]=C;if(i){y[i]=y[i]??c.pageSize}if(c.client instanceof e){v=await makePagedClientRequest(t,c.client,d,c.withCommand,...p)}else{throw new Error(`Invalid client, expected instance of ${e.name}`)}yield v;const D=C;C=get(v,o);Q=!!(C&&(!c.stopOnSameToken||C!==D))}return undefined}}const get=(e,t)=>{let n=e;const o=t.split(".");for(const e of o){if(!n||typeof n!=="object"){return undefined}n=n[e]}return n};function setFeature(e,t,n){if(!e.__smithy_context){e.__smithy_context={features:{}}}else if(!e.__smithy_context.features){e.__smithy_context.features={}}e.__smithy_context.features[t]=n}class DefaultIdentityProviderConfig{authSchemes=new Map;constructor(e){for(const[t,n]of Object.entries(e)){if(n!==undefined){this.authSchemes.set(t,n)}}}getIdentityProvider(e){return this.authSchemes.get(e)}}class HttpApiKeyAuthSigner{async sign(e,t,n){if(!n){throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing")}if(!n.name){throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing")}if(!n.in){throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing")}if(!t.apiKey){throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined")}const i=d.HttpRequest.clone(e);if(n.in===o.HttpApiKeyAuthLocation.QUERY){i.query[n.name]=t.apiKey}else if(n.in===o.HttpApiKeyAuthLocation.HEADER){i.headers[n.name]=n.scheme?`${n.scheme} ${t.apiKey}`:t.apiKey}else{throw new Error("request can only be signed with `apiKey` locations `query` or `header`, "+"but found: `"+n.in+"`")}return i}}class HttpBearerAuthSigner{async sign(e,t,n){const o=d.HttpRequest.clone(e);if(!t.token){throw new Error("request could not be signed with `token` since the `token` is not defined")}o.headers["Authorization"]=`Bearer ${t.token}`;return o}}class NoAuthSigner{async sign(e,t,n){return e}}const createIsIdentityExpiredFunction=e=>function isIdentityExpired(t){return doesIdentityRequireRefresh(t)&&t.expiration.getTime()-Date.now()e.expiration!==undefined;const memoizeIdentityProvider=(e,t,n)=>{if(e===undefined){return undefined}const o=typeof e!=="function"?async()=>Promise.resolve(e):e;let i;let c;let d;let p=false;const coalesceProvider=async e=>{if(!c){c=o(e)}try{i=await c;d=true;p=false}finally{c=undefined}return i};if(t===undefined){return async e=>{if(!d||e?.forceRefresh){i=await coalesceProvider(e)}return i}}return async e=>{if(!d||e?.forceRefresh){i=await coalesceProvider(e)}if(p){return i}if(!n(i)){p=true;return i}if(t(i)){await coalesceProvider(e);return i}return i}};t.requestBuilder=p.requestBuilder;t.DefaultIdentityProviderConfig=DefaultIdentityProviderConfig;t.EXPIRATION_MS=v;t.HttpApiKeyAuthSigner=HttpApiKeyAuthSigner;t.HttpBearerAuthSigner=HttpBearerAuthSigner;t.NoAuthSigner=NoAuthSigner;t.createIsIdentityExpiredFunction=createIsIdentityExpiredFunction;t.createPaginator=createPaginator;t.doesIdentityRequireRefresh=doesIdentityRequireRefresh;t.getHttpAuthSchemeEndpointRuleSetPlugin=getHttpAuthSchemeEndpointRuleSetPlugin;t.getHttpAuthSchemePlugin=getHttpAuthSchemePlugin;t.getHttpSigningPlugin=getHttpSigningPlugin;t.getSmithyContext=getSmithyContext;t.httpAuthSchemeEndpointRuleSetMiddlewareOptions=y;t.httpAuthSchemeMiddleware=httpAuthSchemeMiddleware;t.httpAuthSchemeMiddlewareOptions=C;t.httpSigningMiddleware=httpSigningMiddleware;t.httpSigningMiddlewareOptions=Q;t.isIdentityExpired=D;t.memoizeIdentityProvider=memoizeIdentityProvider;t.normalizeProvider=normalizeProvider;t.setFeature=setFeature},4645:(e,t,n)=>{var o=n(2430);var i=n(1577);var c=n(3422);var d=n(2356);var p=n(2098);var y=n(6890);var C=n(6324);var Q=n(8385);const v=0;const D=1;const k=2;const $=3;const V=4;const ee=5;const te=6;const re=7;const ne=20;const se=21;const oe=22;const ie=23;const ae=24;const ce=25;const le=26;const ue=27;const de=31;function alloc(e){return typeof Buffer!=="undefined"?Buffer.alloc(e):new Uint8Array(e)}const pe=Symbol("@smithy/core/cbor::tagSymbol");function tag(e){e[pe]=true;return e}const Ae=typeof TextDecoder!=="undefined";const me=typeof Buffer!=="undefined";let ge=alloc(0);let fe=new DataView(ge.buffer,ge.byteOffset,ge.byteLength);const he=Ae?new TextDecoder:null;let ye=0;function setPayload(e){ge=e;fe=new DataView(ge.buffer,ge.byteOffset,ge.byteLength)}function decode(e,t){if(e>=t){throw new Error("unexpected end of (decode) payload.")}const n=(ge[e]&224)>>5;const i=ge[e]&31;switch(n){case v:case D:case te:let c;let d;if(i<24){c=i;d=1}else{switch(i){case ae:case ce:case le:case ue:const n=Ee[i];const o=n+1;d=o;if(t-e>7;const o=(e&124)>>2;const i=(e&3)<<8|t;const c=n===0?1:-1;let d;let p;if(o===0){if(i===0){return 0}else{d=Math.pow(2,1-15);p=0}}else if(o===31){if(i===0){return c*Infinity}else{return NaN}}else{d=Math.pow(2,o-15);p=1}p+=i/1024;return c*(d*p)}function decodeCount(e,t){const n=ge[e]&31;if(n<24){ye=1;return n}if(n===ae||n===ce||n===le||n===ue){const o=Ee[n];ye=o+1;if(t-e>5;const c=ge[e]&31;if(i!==$){throw new Error(`unexpected major type ${i} in indefinite string.`)}if(c===de){throw new Error("nested indefinite string.")}const d=decodeUnstructuredByteString(e,t);const p=ye;e+=p;for(let e=0;e>5;const c=ge[e]&31;if(i!==k){throw new Error(`unexpected major type ${i} in indefinite string.`)}if(c===de){throw new Error("nested indefinite string.")}const d=decodeUnstructuredByteString(e,t);const p=ye;e+=p;for(let e=0;e=t){throw new Error("unexpected end of map payload.")}const n=(ge[e]&224)>>5;if(n!==$){throw new Error(`unexpected major type ${n} for map key at index ${e}.`)}const o=decode(e,t);e+=ye;const i=decode(e,t);e+=ye;c[o]=i}ye=o+(e-i);return c}function decodeMapIndefinite(e,t){e+=1;const n=e;const o={};for(;e=t){throw new Error("unexpected end of map payload.")}if(ge[e]===255){ye=e-n+2;return o}const i=(ge[e]&224)>>5;if(i!==$){throw new Error(`unexpected major type ${i} for map key.`)}const c=decode(e,t);e+=ye;const d=decode(e,t);e+=ye;o[c]=d}throw new Error("expected break marker.")}function decodeSpecial(e,t){const n=ge[e]&31;switch(n){case se:case ne:ye=1;return n===se;case oe:ye=1;return null;case ie:ye=1;return null;case ce:if(t-e<3){throw new Error("incomplete float16 at end of buf.")}ye=3;return bytesToFloat16(ge[e+1],ge[e+2]);case le:if(t-e<5){throw new Error("incomplete float32 at end of buf.")}ye=5;return fe.getFloat32(e+1);case ue:if(t-e<9){throw new Error("incomplete float64 at end of buf.")}ye=9;return fe.getFloat64(e+1);default:throw new Error(`unexpected minor value ${n}.`)}}function castBigInt(e){if(typeof e==="number"){return e}const t=Number(e);if(Number.MIN_SAFE_INTEGER<=t&&t<=Number.MAX_SAFE_INTEGER){return t}return e}const Ce=typeof Buffer!=="undefined";const Ie=2048;let be=alloc(Ie);let Se=new DataView(be.buffer,be.byteOffset,be.byteLength);let Be=0;function ensureSpace(e){const t=be.byteLength-Be;if(t=0;const n=t?v:D;const o=t?e:-e-1;if(o<24){be[Be++]=n<<5|o}else if(o<256){be[Be++]=n<<5|24;be[Be++]=o}else if(o<65536){be[Be++]=n<<5|ce;be[Be++]=o>>8;be[Be++]=o}else if(o<4294967296){be[Be++]=n<<5|le;Se.setUint32(Be,o);Be+=4}else{be[Be++]=n<<5|ue;Se.setBigUint64(Be,BigInt(o));Be+=8}continue}be[Be++]=re<<5|ue;Se.setFloat64(Be,e);Be+=8;continue}else if(typeof e==="bigint"){const t=e>=0;const n=t?v:D;const o=t?e:-e-BigInt(1);const i=Number(o);if(i<24){be[Be++]=n<<5|i}else if(i<256){be[Be++]=n<<5|24;be[Be++]=i}else if(i<65536){be[Be++]=n<<5|ce;be[Be++]=i>>8;be[Be++]=i&255}else if(i<4294967296){be[Be++]=n<<5|le;Se.setUint32(Be,i);Be+=4}else if(o=0){n[n.byteLength-c]=Number(i&BigInt(255));i>>=BigInt(8)}ensureSpace(n.byteLength*2);be[Be++]=t?194:195;if(Ce){encodeHeader(k,Buffer.byteLength(n))}else{encodeHeader(k,n.byteLength)}be.set(n,Be);Be+=n.byteLength}continue}else if(e===null){be[Be++]=re<<5|oe;continue}else if(typeof e==="boolean"){be[Be++]=re<<5|(e?se:ne);continue}else if(typeof e==="undefined"){throw new Error("@smithy/core/cbor: client may not serialize undefined value.")}else if(Array.isArray(e)){for(let n=e.length-1;n>=0;--n){t.push(e[n])}encodeHeader(V,e.length);continue}else if(typeof e.byteLength==="number"){ensureSpace(e.length*2);encodeHeader(k,e.length);be.set(e,Be);Be+=e.byteLength;continue}else if(typeof e==="object"){if(e instanceof o.NumericValue){const n=e.string.indexOf(".");const o=n===-1?0:n-e.string.length+1;const i=BigInt(e.string.replace(".",""));be[Be++]=196;t.push(i);t.push(o);encodeHeader(V,2);continue}if(e[pe]){if("tag"in e&&"value"in e){t.push(e.value);encodeHeader(te,e.tag);continue}else{throw new Error("tag encountered with missing fields, need 'tag' and 'value', found: "+JSON.stringify(e))}}const n=Object.keys(e);for(let o=n.length-1;o>=0;--o){const i=n[o];t.push(e[i]);t.push(i)}encodeHeader(ee,n.length);continue}throw new Error(`data type ${e?.constructor?.name??typeof e} not compatible for encoding.`)}}const we={deserialize(e){setPayload(e);return decode(0,e.length)},serialize(e){try{encode(e);return toUint8Array()}catch(e){toUint8Array();throw e}},resizeEncodingBuffer(e){resize(e)}};const parseCborBody=(e,t)=>c.collectBody(e,t).then((async e=>{if(e.length){try{return we.deserialize(e)}catch(n){Object.defineProperty(n,"$responseBodyText",{value:t.utf8Encoder(e)});throw n}}return{}}));const dateToTag=e=>tag({tag:1,value:e.getTime()/1e3});const parseCborErrorBody=async(e,t)=>{const n=await parseCborBody(e,t);n.message=n.message??n.Message;return n};const loadSmithyRpcV2CborErrorCode=(e,t)=>{const sanitizeErrorCode=e=>{let t=e;if(typeof t==="number"){t=t.toString()}if(t.indexOf(",")>=0){t=t.split(",")[0]}if(t.indexOf(":")>=0){t=t.split(":")[0]}if(t.indexOf("#")>=0){t=t.split("#")[1]}return t};if(t["__type"]!==undefined){return sanitizeErrorCode(t["__type"])}const n=Object.keys(t).find((e=>e.toLowerCase()==="code"));if(n&&t[n]!==undefined){return sanitizeErrorCode(t[n])}};const checkCborResponse=e=>{if(String(e.headers["smithy-protocol"]).toLowerCase()!=="rpc-v2-cbor"){throw new Error("Malformed RPCv2 CBOR response, status: "+e.statusCode)}};const buildHttpRpcRequest=async(e,t,n,o,i)=>{const{hostname:c,protocol:y="https",port:C,path:Q}=await e.endpoint();const v={protocol:y,hostname:c,port:C,method:"POST",path:Q.endsWith("/")?Q.slice(0,-1)+n:Q+n,headers:{...t}};if(o!==undefined){v.hostname=o}if(i!==undefined){v.body=i;try{v.headers["content-length"]=String(p.calculateBodyLength(i))}catch(e){}}return new d.HttpRequest(v)};class CborCodec extends c.SerdeContext{createSerializer(){const e=new CborShapeSerializer;e.setSerdeContext(this.serdeContext);return e}createDeserializer(){const e=new CborShapeDeserializer;e.setSerdeContext(this.serdeContext);return e}}class CborShapeSerializer extends c.SerdeContext{value;write(e,t){this.value=this.serialize(e,t)}serialize(e,t){const n=y.NormalizedSchema.of(e);if(t==null){if(n.isIdempotencyToken()){return o.generateIdempotencyToken()}return t}if(n.isBlobSchema()){if(typeof t==="string"){return(this.serdeContext?.base64Decoder??Q.fromBase64)(t)}return t}if(n.isTimestampSchema()){if(typeof t==="number"||typeof t==="bigint"){return dateToTag(new Date(Number(t)/1e3|0))}return dateToTag(t)}if(typeof t==="function"||typeof t==="object"){const e=t;if(n.isListSchema()&&Array.isArray(e)){const t=!!n.getMergedTraits().sparse;const o=[];let i=0;for(const c of e){const e=this.serialize(n.getValueSchema(),c);if(e!=null||t){o[i++]=e}}return o}if(e instanceof Date){return dateToTag(e)}const o={};if(n.isMapSchema()){const t=!!n.getMergedTraits().sparse;for(const i of Object.keys(e)){const c=this.serialize(n.getValueSchema(),e[i]);if(c!=null||t){o[i]=c}}}else if(n.isStructSchema()){for(const[t,i]of n.structIterator()){const n=this.serialize(i,e[t]);if(n!=null){o[t]=n}}const t=n.isUnionSchema();if(t&&Array.isArray(e.$unknown)){const[t,n]=e.$unknown;o[t]=n}else if(typeof e.__type==="string"){for(const[t,n]of Object.entries(e)){if(!(t in o)){o[t]=this.serialize(15,n)}}}}else if(n.isDocumentSchema()){for(const t of Object.keys(e)){o[t]=this.serialize(n.getValueSchema(),e[t])}}else if(n.isBigDecimalSchema()){return e}return o}return t}flush(){const e=we.serialize(this.value);this.value=undefined;return e}}class CborShapeDeserializer extends c.SerdeContext{read(e,t){const n=we.deserialize(t);return this.readValue(e,n)}readValue(e,t){const n=y.NormalizedSchema.of(e);if(n.isTimestampSchema()){if(typeof t==="number"){return o._parseEpochTimestamp(t)}if(typeof t==="object"){if(t.tag===1&&"value"in t){return o._parseEpochTimestamp(t.value)}}}if(n.isBlobSchema()){if(typeof t==="string"){return(this.serdeContext?.base64Decoder??Q.fromBase64)(t)}return t}if(typeof t==="undefined"||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="bigint"||typeof t==="symbol"){return t}else if(typeof t==="object"){if(t===null){return null}if("byteLength"in t){return t}if(t instanceof Date){return t}if(n.isDocumentSchema()){return t}if(n.isListSchema()){const e=[];const o=n.getValueSchema();const i=!!n.getMergedTraits().sparse;for(const n of t){const t=this.readValue(o,n);if(t!=null||i){e.push(t)}}return e}const e={};if(n.isMapSchema()){const o=!!n.getMergedTraits().sparse;const i=n.getValueSchema();for(const n of Object.keys(t)){const c=this.readValue(i,t[n]);if(c!=null||o){e[n]=c}}}else if(n.isStructSchema()){const o=n.isUnionSchema();let i;if(o){i=new Set(Object.keys(t).filter((e=>e!=="__type")))}for(const[c,d]of n.structIterator()){if(o){i.delete(c)}if(t[c]!=null){e[c]=this.readValue(d,t[c])}}if(o&&i?.size===1&&Object.keys(e).length===0){const n=i.values().next().value;e.$unknown=[n,t[n]]}else if(typeof t.__type==="string"){for(const[n,o]of Object.entries(t)){if(!(n in e)){e[n]=o}}}}else if(t instanceof o.NumericValue){return t}return e}else{return t}}}class SmithyRpcV2CborProtocol extends c.RpcProtocol{codec=new CborCodec;serializer=this.codec.createSerializer();deserializer=this.codec.createDeserializer();constructor({defaultNamespace:e,errorTypeRegistries:t}){super({defaultNamespace:e,errorTypeRegistries:t})}getShapeId(){return"smithy.protocols#rpcv2Cbor"}getPayloadCodec(){return this.codec}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);Object.assign(o.headers,{"content-type":this.getDefaultContentType(),"smithy-protocol":"rpc-v2-cbor",accept:this.getDefaultContentType()});if(y.deref(e.input)==="unit"){delete o.body;delete o.headers["content-type"]}else{if(!o.body){this.serializer.write(15,{});o.body=this.serializer.flush()}try{o.headers["content-length"]=String(o.body.byteLength)}catch(e){}}const{service:i,operation:c}=C.getSmithyContext(n);const d=`/service/${i}/operation/${c}`;if(o.path.endsWith("/")){o.path+=d.slice(1)}else{o.path+=d}return o}async deserializeResponse(e,t,n){return super.deserializeResponse(e,t,n)}async handleError(e,t,n,o,i){const c=loadSmithyRpcV2CborErrorCode(n,o)??"Unknown";const d={$metadata:i,$fault:n.statusCode<=500?"client":"server"};let p=this.options.defaultNamespace;if(c.includes("#")){[p]=c.split("#")}const C=this.compositeErrorRegistry;const Q=y.TypeRegistry.for(p);C.copyFrom(Q);let v;try{v=C.getSchema(c)}catch(e){if(o.Message){o.message=o.Message}const t=y.TypeRegistry.for("smithy.ts.sdk.synthetic."+p);C.copyFrom(t);const n=C.getBaseException();if(n){const e=C.getErrorCtor(n);throw Object.assign(new e({name:c}),d,o)}throw Object.assign(new Error(c),d,o)}const D=y.NormalizedSchema.of(v);const k=C.getErrorCtor(v);const $=o.message??o.Message??"Unknown";const V=new k($);const ee={};for(const[e,t]of D.structIterator()){ee[e]=this.deserializer.readValue(t,o[e])}throw Object.assign(V,d,{$fault:D.getMergedTraits().error,message:$},ee)}getDefaultContentType(){return"application/cbor"}}t.CborCodec=CborCodec;t.CborShapeDeserializer=CborShapeDeserializer;t.CborShapeSerializer=CborShapeSerializer;t.SmithyRpcV2CborProtocol=SmithyRpcV2CborProtocol;t.buildHttpRpcRequest=buildHttpRpcRequest;t.cbor=we;t.checkCborResponse=checkCborResponse;t.dateToTag=dateToTag;t.loadSmithyRpcV2CborErrorCode=loadSmithyRpcV2CborErrorCode;t.parseCborBody=parseCborBody;t.parseCborErrorBody=parseCborErrorBody;t.tag=tag;t.tagSymbol=pe},3422:(e,t,n)=>{var o=n(4252);var i=n(6890);var c=n(2430);var d=n(2356);var p=n(8385);var y=n(1577);const collectBody=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array){return o.Uint8ArrayBlobAdapter.mutate(e)}if(!e){return o.Uint8ArrayBlobAdapter.mutate(new Uint8Array)}const n=t.streamCollector(e);return o.Uint8ArrayBlobAdapter.mutate(await n)};function extendedEncodeURIComponent(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}class SerdeContext{serdeContext;setSerdeContext(e){this.serdeContext=e}}class HttpProtocol extends SerdeContext{options;compositeErrorRegistry;constructor(e){super();this.options=e;this.compositeErrorRegistry=i.TypeRegistry.for(e.defaultNamespace);for(const t of e.errorTypeRegistries??[]){this.compositeErrorRegistry.copyFrom(t)}}getRequestType(){return d.HttpRequest}getResponseType(){return d.HttpResponse}setSerdeContext(e){this.serdeContext=e;this.serializer.setSerdeContext(e);this.deserializer.setSerdeContext(e);if(this.getPayloadCodec()){this.getPayloadCodec().setSerdeContext(e)}}updateServiceEndpoint(e,t){if("url"in t){e.protocol=t.url.protocol;e.hostname=t.url.hostname;e.port=t.url.port?Number(t.url.port):undefined;e.path=t.url.pathname;e.fragment=t.url.hash||void 0;e.username=t.url.username||void 0;e.password=t.url.password||void 0;if(!e.query){e.query={}}for(const[n,o]of t.url.searchParams.entries()){e.query[n]=o}return e}else{e.protocol=t.protocol;e.hostname=t.hostname;e.port=t.port?Number(t.port):undefined;e.path=t.path;e.query={...t.query};return e}}setHostPrefix(e,t,n){if(this.serdeContext?.disableHostPrefix){return}const o=i.NormalizedSchema.of(t.input);const c=i.translateTraits(t.traits??{});if(c.endpoint){let t=c.endpoint?.[0];if(typeof t==="string"){const i=[...o.structIterator()].filter((([,e])=>e.getMergedTraits().hostLabel));for(const[e]of i){const o=n[e];if(typeof o!=="string"){throw new Error(`@smithy/core/schema - ${e} in input must be a string as hostLabel.`)}t=t.replace(`{${e}}`,o)}e.hostname=t+e.hostname}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){const o=await this.loadEventStreamCapability();return o.serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n}){const o=await this.loadEventStreamCapability();return o.deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await n.e(579).then(n.t.bind(n,6579,19));return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,n,o,i){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller){throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.")}return e.eventStreamMarshaller}}class HttpBindingProtocol extends HttpProtocol{async serializeRequest(e,t,n){const o={...t??{}};const c=this.serializer;const p={};const y={};const C=await n.endpoint();const Q=i.NormalizedSchema.of(e?.input);const v=[];const D=[];let k=false;let $;const V=new d.HttpRequest({protocol:"",hostname:"",port:undefined,path:"",fragment:undefined,query:p,headers:y,body:undefined});if(C){this.updateServiceEndpoint(V,C);this.setHostPrefix(V,e,o);const t=i.translateTraits(e.traits);if(t.http){V.method=t.http[0];const[e,n]=t.http[1].split("?");if(V.path=="/"){V.path=e}else{V.path+=e}const o=new URLSearchParams(n??"");Object.assign(p,Object.fromEntries(o))}}for(const[e,t]of Q.structIterator()){const n=t.getMergedTraits()??{};const i=o[e];if(i==null&&!t.isIdempotencyToken()){if(n.httpLabel){if(V.path.includes(`{${e}+}`)||V.path.includes(`{${e}}`)){throw new Error(`No value provided for input HTTP label: ${e}.`)}}continue}if(n.httpPayload){const n=t.isStreaming();if(n){const n=t.isStructSchema();if(n){if(o[e]){$=await this.serializeEventStream({eventStream:o[e],requestSchema:Q})}}else{$=i}}else{c.write(t,i);$=c.flush()}delete o[e]}else if(n.httpLabel){c.write(t,i);const n=c.flush();if(V.path.includes(`{${e}+}`)){V.path=V.path.replace(`{${e}+}`,n.split("/").map(extendedEncodeURIComponent).join("/"))}else if(V.path.includes(`{${e}}`)){V.path=V.path.replace(`{${e}}`,extendedEncodeURIComponent(n))}delete o[e]}else if(n.httpHeader){c.write(t,i);y[n.httpHeader.toLowerCase()]=String(c.flush());delete o[e]}else if(typeof n.httpPrefixHeaders==="string"){for(const[e,o]of Object.entries(i)){const i=n.httpPrefixHeaders+e;c.write([t.getValueSchema(),{httpHeader:i}],o);y[i.toLowerCase()]=c.flush()}delete o[e]}else if(n.httpQuery||n.httpQueryParams){this.serializeQuery(t,i,p);delete o[e]}else{k=true;v.push(e);D.push(t)}}if(k&&o){const[e,t]=(Q.getName(true)??"#Unknown").split("#");const n=Q.getSchema()[6];const i=[3,e,t,Q.getMergedTraits(),v,D,undefined];if(n){i[6]=n}else{i.pop()}c.write(i,o);$=c.flush()}V.headers=y;V.query=p;V.body=$;return V}serializeQuery(e,t,n){const o=this.serializer;const i=e.getMergedTraits();if(i.httpQueryParams){for(const[o,c]of Object.entries(t)){if(!(o in n)){const t=e.getValueSchema();Object.assign(t.getMergedTraits(),{...i,httpQuery:o,httpQueryParams:undefined});this.serializeQuery(t,c,n)}}return}if(e.isListSchema()){const c=!!e.getMergedTraits().sparse;const d=[];for(const n of t){o.write([e.getValueSchema(),i],n);const t=o.flush();if(c||t!==undefined){d.push(t)}}n[i.httpQuery]=d}else{o.write([e,i],t);n[i.httpQuery]=o.flush()}}async deserializeResponse(e,t,n){const o=this.deserializer;const c=i.NormalizedSchema.of(e.output);const d={};if(n.statusCode>=300){const i=await collectBody(n.body,t);if(i.byteLength>0){Object.assign(d,await o.read(15,i))}await this.handleError(e,t,n,d,this.deserializeMetadata(n));throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const e in n.headers){const t=n.headers[e];delete n.headers[e];n.headers[e.toLowerCase()]=t}const p=await this.deserializeHttpMessage(c,t,n,d);if(p.length){const e=await collectBody(n.body,t);if(e.byteLength>0){const t=await o.read(c,e);for(const e of p){if(t[e]!=null){d[e]=t[e]}}}}else if(p.discardResponseBody){await collectBody(n.body,t)}d.$metadata=this.deserializeMetadata(n);return d}async deserializeHttpMessage(e,t,n,d,p){let y;if(d instanceof Set){y=p}else{y=d}let C=true;const Q=this.deserializer;const v=i.NormalizedSchema.of(e);const D=[];for(const[e,i]of v.structIterator()){const d=i.getMemberTraits();if(d.httpPayload){C=false;const c=i.isStreaming();if(c){const t=i.isStructSchema();if(t){y[e]=await this.deserializeEventStream({response:n,responseSchema:v})}else{y[e]=o.sdkStreamMixin(n.body)}}else if(n.body){const o=await collectBody(n.body,t);if(o.byteLength>0){y[e]=await Q.read(i,o)}}}else if(d.httpHeader){const t=String(d.httpHeader).toLowerCase();const o=n.headers[t];if(null!=o){if(i.isListSchema()){const n=i.getValueSchema();n.getMergedTraits().httpHeader=t;let d;if(n.isTimestampSchema()&&n.getSchema()===4){d=c.splitEvery(o,",",2)}else{d=c.splitHeader(o)}const p=[];for(const e of d){p.push(await Q.read(n,e.trim()))}y[e]=p}else{y[e]=await Q.read(i,o)}}}else if(d.httpPrefixHeaders!==undefined){y[e]={};for(const[t,o]of Object.entries(n.headers)){if(t.startsWith(d.httpPrefixHeaders)){const n=i.getValueSchema();n.getMergedTraits().httpHeader=t;y[e][t.slice(d.httpPrefixHeaders.length)]=await Q.read(n,o)}}}else if(d.httpResponseCode){y[e]=n.statusCode}else{D.push(e)}}D.discardResponseBody=C;return D}}class RpcProtocol extends HttpProtocol{async serializeRequest(e,t,n){const o=this.serializer;const c={};const p={};const y=await n.endpoint();const C=i.NormalizedSchema.of(e?.input);const Q=C.getSchema();let v;const D=new d.HttpRequest({protocol:"",hostname:"",port:undefined,path:"/",fragment:undefined,query:c,headers:p,body:undefined});if(y){this.updateServiceEndpoint(D,y);this.setHostPrefix(D,e,t)}const k={...t};if(t){const e=C.getEventStreamMember();if(e){if(k[e]){const t={};for(const[n,i]of C.structIterator()){if(n!==e&&k[n]){o.write(i,k[n]);t[n]=o.flush()}}v=await this.serializeEventStream({eventStream:k[e],requestSchema:C,initialRequest:t})}}else{o.write(Q,k);v=o.flush()}}D.headers=p;D.query=c;D.body=v;D.method="POST";return D}async deserializeResponse(e,t,n){const o=this.deserializer;const c=i.NormalizedSchema.of(e.output);const d={};if(n.statusCode>=300){const i=await collectBody(n.body,t);if(i.byteLength>0){Object.assign(d,await o.read(15,i))}await this.handleError(e,t,n,d,this.deserializeMetadata(n));throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const e in n.headers){const t=n.headers[e];delete n.headers[e];n.headers[e.toLowerCase()]=t}const p=c.getEventStreamMember();if(p){d[p]=await this.deserializeEventStream({response:n,responseSchema:c,initialResponseContainer:d})}else{const e=await collectBody(n.body,t);if(e.byteLength>0){Object.assign(d,await o.read(c,e))}}d.$metadata=this.deserializeMetadata(n);return d}}const resolvedPath=(e,t,n,o,i,c)=>{if(t!=null&&t[n]!==undefined){const t=o();if(t==null||t.length<=0){throw new Error("Empty value provided for input HTTP label: "+n+".")}e=e.replace(i,c?t.split("/").map((e=>extendedEncodeURIComponent(e))).join("/"):extendedEncodeURIComponent(t))}else{throw new Error("No value provided for input HTTP label: "+n+".")}return e};function requestBuilder(e,t){return new RequestBuilder(e,t)}class RequestBuilder{input;context;query={};method="";headers={};path="";body=null;hostname="";resolvePathStack=[];constructor(e,t){this.input=e;this.context=t}async build(){const{hostname:e,protocol:t="https",port:n,path:o}=await this.context.endpoint();this.path=o;for(const e of this.resolvePathStack){e(this.path)}return new d.HttpRequest({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){this.hostname=e;return this}bp(e){this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}));return this}p(e,t,n,o){this.resolvePathStack.push((i=>{this.path=resolvedPath(i,this.input,e,t,n,o)}));return this}h(e){this.headers=e;return this}q(e){this.query=e;return this}b(e){this.body=e;return this}m(e){this.method=e;return this}}function determineTimestampFormat(e,t){if(t.timestampFormat.useTrait){if(e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7)){return e.getSchema()}}const{httpLabel:n,httpPrefixHeaders:o,httpHeader:i,httpQuery:c}=e.getMergedTraits();const d=t.httpBindings?typeof o==="string"||Boolean(i)?6:Boolean(c)||Boolean(n)?5:undefined:undefined;return d??t.timestampFormat.default}class FromStringShapeDeserializer extends SerdeContext{settings;constructor(e){super();this.settings=e}read(e,t){const n=i.NormalizedSchema.of(e);if(n.isListSchema()){return c.splitHeader(t).map((e=>this.read(n.getValueSchema(),e)))}if(n.isBlobSchema()){return(this.serdeContext?.base64Decoder??p.fromBase64)(t)}if(n.isTimestampSchema()){const e=determineTimestampFormat(n,this.settings);switch(e){case 5:return c._parseRfc3339DateTimeWithOffset(t);case 6:return c._parseRfc7231DateTime(t);case 7:return c._parseEpochTimestamp(t);default:console.warn("Missing timestamp format, parsing value with Date constructor:",t);return new Date(t)}}if(n.isStringSchema()){const e=n.getMergedTraits().mediaType;let o=t;if(e){if(n.getMergedTraits().httpHeader){o=this.base64ToUtf8(o)}const t=e==="application/json"||e.endsWith("+json");if(t){o=c.LazyJsonString.from(o)}return o}}if(n.isNumericSchema()){return Number(t)}if(n.isBigIntegerSchema()){return BigInt(t)}if(n.isBigDecimalSchema()){return new c.NumericValue(t,"bigDecimal")}if(n.isBooleanSchema()){return String(t).toLowerCase()==="true"}return t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??y.toUtf8)((this.serdeContext?.base64Decoder??p.fromBase64)(e))}}class HttpInterceptingShapeDeserializer extends SerdeContext{codecDeserializer;stringDeserializer;constructor(e,t){super();this.codecDeserializer=e;this.stringDeserializer=new FromStringShapeDeserializer(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e);this.codecDeserializer.setSerdeContext(e);this.serdeContext=e}read(e,t){const n=i.NormalizedSchema.of(e);const o=n.getMergedTraits();const c=this.serdeContext?.utf8Encoder??y.toUtf8;if(o.httpHeader||o.httpResponseCode){return this.stringDeserializer.read(n,c(t))}if(o.httpPayload){if(n.isBlobSchema()){const e=this.serdeContext?.utf8Decoder??y.fromUtf8;if(typeof t==="string"){return e(t)}return t}else if(n.isStringSchema()){if("byteLength"in t){return c(t)}return t}}return this.codecDeserializer.read(n,t)}}class ToStringShapeSerializer extends SerdeContext{settings;stringBuffer="";constructor(e){super();this.settings=e}write(e,t){const n=i.NormalizedSchema.of(e);switch(typeof t){case"object":if(t===null){this.stringBuffer="null";return}if(n.isTimestampSchema()){if(!(t instanceof Date)){throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${n.getName(true)}`)}const e=determineTimestampFormat(n,this.settings);switch(e){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=c.dateToUtcString(t);break;case 7:this.stringBuffer=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",t);this.stringBuffer=String(t.getTime()/1e3)}return}if(n.isBlobSchema()&&"byteLength"in t){this.stringBuffer=(this.serdeContext?.base64Encoder??p.toBase64)(t);return}if(n.isListSchema()&&Array.isArray(t)){let e="";for(const o of t){this.write([n.getValueSchema(),n.getMergedTraits()],o);const t=this.flush();const i=n.getValueSchema().isTimestampSchema()?t:c.quoteHeader(t);if(e!==""){e+=", "}e+=i}this.stringBuffer=e;return}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":const e=n.getMergedTraits().mediaType;let o=t;if(e){const t=e==="application/json"||e.endsWith("+json");if(t){o=c.LazyJsonString.from(o)}if(n.getMergedTraits().httpHeader){this.stringBuffer=(this.serdeContext?.base64Encoder??p.toBase64)(o.toString());return}}this.stringBuffer=t;break;default:if(n.isIdempotencyToken()){this.stringBuffer=c.generateIdempotencyToken()}else{this.stringBuffer=String(t)}}}flush(){const e=this.stringBuffer;this.stringBuffer="";return e}}class HttpInterceptingShapeSerializer{codecSerializer;stringSerializer;buffer;constructor(e,t,n=new ToStringShapeSerializer(t)){this.codecSerializer=e;this.stringSerializer=n}setSerdeContext(e){this.codecSerializer.setSerdeContext(e);this.stringSerializer.setSerdeContext(e)}write(e,t){const n=i.NormalizedSchema.of(e);const o=n.getMergedTraits();if(o.httpHeader||o.httpLabel||o.httpQuery){this.stringSerializer.write(n,t);this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(n,t)}flush(){if(this.buffer!==undefined){const e=this.buffer;this.buffer=undefined;return e}return this.codecSerializer.flush()}}t.FromStringShapeDeserializer=FromStringShapeDeserializer;t.HttpBindingProtocol=HttpBindingProtocol;t.HttpInterceptingShapeDeserializer=HttpInterceptingShapeDeserializer;t.HttpInterceptingShapeSerializer=HttpInterceptingShapeSerializer;t.HttpProtocol=HttpProtocol;t.RequestBuilder=RequestBuilder;t.RpcProtocol=RpcProtocol;t.SerdeContext=SerdeContext;t.ToStringShapeSerializer=ToStringShapeSerializer;t.collectBody=collectBody;t.determineTimestampFormat=determineTimestampFormat;t.extendedEncodeURIComponent=extendedEncodeURIComponent;t.requestBuilder=requestBuilder;t.resolvedPath=resolvedPath},6890:(e,t,n)=>{var o=n(2356);var i=n(6324);const deref=e=>{if(typeof e==="function"){return e()}return e};const operation=(e,t,n,o,i)=>({name:t,namespace:e,traits:n,input:o,output:i});const schemaDeserializationMiddleware=e=>(t,n)=>async c=>{const{response:d}=await t(c);const{operationSchema:p}=i.getSmithyContext(n);const[,y,C,Q,v,D]=p??[];try{const t=await e.protocol.deserializeResponse(operation(y,C,Q,v,D),{...e,...n},d);return{response:d,output:t}}catch(e){Object.defineProperty(e,"$response",{value:d,enumerable:false,writable:false,configurable:false});if(!("$metadata"in e)){const t=`Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;try{e.message+="\n "+t}catch(e){if(!n.logger||n.logger?.constructor?.name==="NoOpLogger"){console.warn(t)}else{n.logger?.warn?.(t)}}if(typeof e.$responseBodyText!=="undefined"){if(e.$response){e.$response.body=e.$responseBodyText}}try{if(o.HttpResponse.isInstance(d)){const{headers:t={}}=d;const n=Object.entries(t);e.$metadata={httpStatusCode:d.statusCode,requestId:findHeader(/^x-[\w-]+-request-?id$/,n),extendedRequestId:findHeader(/^x-[\w-]+-id-2$/,n),cfId:findHeader(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}};const findHeader=(e,t)=>(t.find((([t])=>t.match(e)))||[void 0,void 0])[1];const schemaSerializationMiddleware=e=>(t,n)=>async o=>{const{operationSchema:c}=i.getSmithyContext(n);const[,d,p,y,C,Q]=c??[];const v=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint;const D=await e.protocol.serializeRequest(operation(d,p,y,C,Q),o.input,{...e,...n,endpoint:v});return t({...o,request:D})};const c={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:true};const d={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:true};function getSchemaSerdePlugin(e){return{applyToStack:t=>{t.add(schemaSerializationMiddleware(e),d);t.add(schemaDeserializationMiddleware(e),c);e.protocol.setSerdeContext(e)}}}class Schema{name;namespace;traits;static assign(e,t){const n=Object.assign(e,t);return n}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);if(!t&&typeof e==="object"&&e!==null){const t=e;return t.symbol===this.symbol}return t}getName(){return this.namespace+"#"+this.name}}class ListSchema extends Schema{static symbol=Symbol.for("@smithy/lis");name;traits;valueSchema;symbol=ListSchema.symbol}const list=(e,t,n,o)=>Schema.assign(new ListSchema,{name:t,namespace:e,traits:n,valueSchema:o});class MapSchema extends Schema{static symbol=Symbol.for("@smithy/map");name;traits;keySchema;valueSchema;symbol=MapSchema.symbol}const map=(e,t,n,o,i)=>Schema.assign(new MapSchema,{name:t,namespace:e,traits:n,keySchema:o,valueSchema:i});class OperationSchema extends Schema{static symbol=Symbol.for("@smithy/ope");name;traits;input;output;symbol=OperationSchema.symbol}const op=(e,t,n,o,i)=>Schema.assign(new OperationSchema,{name:t,namespace:e,traits:n,input:o,output:i});class StructureSchema extends Schema{static symbol=Symbol.for("@smithy/str");name;traits;memberNames;memberList;symbol=StructureSchema.symbol}const struct=(e,t,n,o,i)=>Schema.assign(new StructureSchema,{name:t,namespace:e,traits:n,memberNames:o,memberList:i});class ErrorSchema extends StructureSchema{static symbol=Symbol.for("@smithy/err");ctor;symbol=ErrorSchema.symbol}const error=(e,t,n,o,i,c)=>Schema.assign(new ErrorSchema,{name:t,namespace:e,traits:n,memberNames:o,memberList:i,ctor:null});function translateTraits(e){if(typeof e==="object"){return e}e=e|0;const t={};let n=0;for(const o of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"]){if((e>>n++&1)===1){t[o]=1}}return t}const p={it:Symbol.for("@smithy/nor-struct-it")};class NormalizedSchema{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=NormalizedSchema.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e;this.memberName=t;const n=[];let o=e;let i=e;this._isMemberSchema=false;while(isMemberSchema(o)){n.push(o[1]);o=o[0];i=deref(o);this._isMemberSchema=true}if(n.length>0){this.memberTraits={};for(let e=n.length-1;e>=0;--e){const t=n[e];Object.assign(this.memberTraits,translateTraits(t))}}else{this.memberTraits=0}if(i instanceof NormalizedSchema){const e=this.memberTraits;Object.assign(this,i);this.memberTraits=Object.assign({},e,i.getMemberTraits(),this.getMemberTraits());this.normalizedTraits=void 0;this.memberName=t??i.memberName;return}this.schema=deref(i);if(isStaticSchema(this.schema)){this.name=`${this.schema[1]}#${this.schema[2]}`;this.traits=this.schema[3]}else{this.name=this.memberName??String(i);this.traits=0}if(this._isMemberSchema&&!t){throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`)}}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);if(!t&&typeof e==="object"&&e!==null){const t=e;return t.symbol===this.symbol}return t}static of(e){const t=deref(e);if(t instanceof NormalizedSchema){return t}if(isMemberSchema(t)){const[n,o]=t;if(n instanceof NormalizedSchema){Object.assign(n.getMergedTraits(),translateTraits(o));return n}throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new NormalizedSchema(t)}getSchema(){const e=this.schema;if(Array.isArray(e)&&e[0]===0){return e[4]}return e}getName(e=false){const{name:t}=this;const n=!e&&t&&t.includes("#");return n?t.split("#")[1]:t||undefined}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return typeof e==="number"?e>=64&&e<128:e[0]===1}isMapSchema(){const e=this.getSchema();return typeof e==="number"?e>=128&&e<=255:e[0]===2}isStructSchema(){const e=this.getSchema();if(typeof e!=="object"){return false}const t=e[0];return t===3||t===-3||t===4}isUnionSchema(){const e=this.getSchema();if(typeof e!=="object"){return false}return e[0]===4}isBlobSchema(){const e=this.getSchema();return e===21||e===42}isTimestampSchema(){const e=this.getSchema();return typeof e==="number"&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return translateTraits(this.memberTraits)}getOwnTraits(){return translateTraits(this.traits)}getKeySchema(){const[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t){throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`)}const n=this.getSchema();const o=e?15:n[4]??0;return member([o,0],"key")}getValueSchema(){const e=this.getSchema();const[t,n,o]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()];const i=typeof e==="number"?63&e:e&&typeof e==="object"&&(n||o)?e[3+e[0]]:t?15:void 0;if(i!=null){return member([i,0],n?"value":"member")}throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`)}getMemberSchema(e){const t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){const n=t[4].indexOf(e);const o=t[5][n];return member(isMemberSchema(o)?o:[o,0],e)}if(this.isDocumentSchema()){return member([15,0],e)}throw new Error(`@smithy/core/schema - ${this.getName(true)} has no no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[t,n]of this.structIterator()){e[t]=n}}catch(e){}return e}getEventStreamMember(){if(this.isStructSchema()){for(const[e,t]of this.structIterator()){if(t.isStreaming()&&t.isStructSchema()){return e}}}return""}*structIterator(){if(this.isUnitSchema()){return}if(!this.isStructSchema()){throw new Error("@smithy/core/schema - cannot iterate non-struct schema.")}const e=this.getSchema();const t=e[4].length;let n=e[p.it];if(n&&t===n.length){yield*n;return}n=Array(t);for(let o=0;oArray.isArray(e)&&e.length===2;const isStaticSchema=e=>Array.isArray(e)&&e.length>=5;class SimpleSchema extends Schema{static symbol=Symbol.for("@smithy/sim");name;schemaRef;traits;symbol=SimpleSchema.symbol}const sim=(e,t,n,o)=>Schema.assign(new SimpleSchema,{name:t,namespace:e,traits:o,schemaRef:n});const simAdapter=(e,t,n,o)=>Schema.assign(new SimpleSchema,{name:t,namespace:e,traits:n,schemaRef:o});const y={BLOB:21,STREAMING_BLOB:42,BOOLEAN:2,STRING:0,NUMERIC:1,BIG_INTEGER:17,BIG_DECIMAL:19,DOCUMENT:15,TIMESTAMP_DEFAULT:4,TIMESTAMP_DATE_TIME:5,TIMESTAMP_HTTP_DATE:6,TIMESTAMP_EPOCH_SECONDS:7,LIST_MODIFIER:64,MAP_MODIFIER:128};class TypeRegistry{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,n=new Map){this.namespace=e;this.schemas=t;this.exceptions=n}static for(e){if(!TypeRegistry.registries.has(e)){TypeRegistry.registries.set(e,new TypeRegistry(e))}return TypeRegistry.registries.get(e)}copyFrom(e){const{schemas:t,exceptions:n}=this;for(const[n,o]of e.schemas){if(!t.has(n)){t.set(n,o)}}for(const[t,o]of e.exceptions){if(!n.has(t)){n.set(t,o)}}}register(e,t){const n=this.normalizeShapeId(e);for(const e of[this,TypeRegistry.for(n.split("#")[0])]){e.schemas.set(n,t)}}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t)){throw new Error(`@smithy/core/schema - schema not found for ${t}`)}return this.schemas.get(t)}registerError(e,t){const n=e;const o=n[1];for(const e of[this,TypeRegistry.for(o)]){e.schemas.set(o+"#"+n[2],n);e.exceptions.set(n,t)}}getErrorCtor(e){const t=e;if(this.exceptions.has(t)){return this.exceptions.get(t)}const n=TypeRegistry.for(t[1]);return n.exceptions.get(t)}getBaseException(){for(const e of this.exceptions.keys()){if(Array.isArray(e)){const[,t,n]=e;const o=t+"#"+n;if(o.startsWith("smithy.ts.sdk.synthetic.")&&o.endsWith("ServiceException")){return e}}}return undefined}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear();this.exceptions.clear()}normalizeShapeId(e){if(e.includes("#")){return e}return this.namespace+"#"+e}}t.ErrorSchema=ErrorSchema;t.ListSchema=ListSchema;t.MapSchema=MapSchema;t.NormalizedSchema=NormalizedSchema;t.OperationSchema=OperationSchema;t.SCHEMA=y;t.Schema=Schema;t.SimpleSchema=SimpleSchema;t.StructureSchema=StructureSchema;t.TypeRegistry=TypeRegistry;t.deref=deref;t.deserializerMiddlewareOption=c;t.error=error;t.getSchemaSerdePlugin=getSchemaSerdePlugin;t.isStaticSchema=isStaticSchema;t.list=list;t.map=map;t.op=op;t.operation=operation;t.serializerMiddlewareOption=d;t.sim=sim;t.simAdapter=simAdapter;t.struct=struct;t.translateTraits=translateTraits},2430:(e,t,n)=>{var o=n(266);const copyDocumentWithTransform=(e,t,n=e=>e)=>e;const parseBoolean=e=>{switch(e){case"true":return true;case"false":return false;default:throw new Error(`Unable to parse boolean value "${e}"`)}};const expectBoolean=e=>{if(e===null||e===undefined){return undefined}if(typeof e==="number"){if(e===0||e===1){v.warn(stackTraceWarning(`Expected boolean, got ${typeof e}: ${e}`))}if(e===0){return false}if(e===1){return true}}if(typeof e==="string"){const t=e.toLowerCase();if(t==="false"||t==="true"){v.warn(stackTraceWarning(`Expected boolean, got ${typeof e}: ${e}`))}if(t==="false"){return false}if(t==="true"){return true}}if(typeof e==="boolean"){return e}throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`)};const expectNumber=e=>{if(e===null||e===undefined){return undefined}if(typeof e==="string"){const t=parseFloat(e);if(!Number.isNaN(t)){if(String(t)!==String(e)){v.warn(stackTraceWarning(`Expected number but observed string: ${e}`))}return t}}if(typeof e==="number"){return e}throw new TypeError(`Expected number, got ${typeof e}: ${e}`)};const i=Math.ceil(2**127*(2-2**-23));const expectFloat32=e=>{const t=expectNumber(e);if(t!==undefined&&!Number.isNaN(t)&&t!==Infinity&&t!==-Infinity){if(Math.abs(t)>i){throw new TypeError(`Expected 32-bit float, got ${e}`)}}return t};const expectLong=e=>{if(e===null||e===undefined){return undefined}if(Number.isInteger(e)&&!Number.isNaN(e)){return e}throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)};const c=expectLong;const expectInt32=e=>expectSizedInt(e,32);const expectShort=e=>expectSizedInt(e,16);const expectByte=e=>expectSizedInt(e,8);const expectSizedInt=(e,t)=>{const n=expectLong(e);if(n!==undefined&&castInt(n,t)!==n){throw new TypeError(`Expected ${t}-bit integer, got ${e}`)}return n};const castInt=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}};const expectNonNull=(e,t)=>{if(e===null||e===undefined){if(t){throw new TypeError(`Expected a non-null value for ${t}`)}throw new TypeError("Expected a non-null value")}return e};const expectObject=e=>{if(e===null||e===undefined){return undefined}if(typeof e==="object"&&!Array.isArray(e)){return e}const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)};const expectString=e=>{if(e===null||e===undefined){return undefined}if(typeof e==="string"){return e}if(["boolean","number","bigint"].includes(typeof e)){v.warn(stackTraceWarning(`Expected string, got ${typeof e}: ${e}`));return String(e)}throw new TypeError(`Expected string, got ${typeof e}: ${e}`)};const expectUnion=e=>{if(e===null||e===undefined){return undefined}const t=expectObject(e);const n=Object.entries(t).filter((([,e])=>e!=null)).map((([e])=>e));if(n.length===0){throw new TypeError(`Unions must have exactly one non-null member. None were found.`)}if(n.length>1){throw new TypeError(`Unions must have exactly one non-null member. Keys ${n} were not null.`)}return t};const strictParseDouble=e=>{if(typeof e=="string"){return expectNumber(parseNumber(e))}return expectNumber(e)};const d=strictParseDouble;const strictParseFloat32=e=>{if(typeof e=="string"){return expectFloat32(parseNumber(e))}return expectFloat32(e)};const p=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;const parseNumber=e=>{const t=e.match(p);if(t===null||t[0].length!==e.length){throw new TypeError(`Expected real number, got implicit NaN`)}return parseFloat(e)};const limitedParseDouble=e=>{if(typeof e=="string"){return parseFloatString(e)}return expectNumber(e)};const y=limitedParseDouble;const C=limitedParseDouble;const limitedParseFloat32=e=>{if(typeof e=="string"){return parseFloatString(e)}return expectFloat32(e)};const parseFloatString=e=>{switch(e){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return-Infinity;default:throw new Error(`Unable to parse float value: ${e}`)}};const strictParseLong=e=>{if(typeof e==="string"){return expectLong(parseNumber(e))}return expectLong(e)};const Q=strictParseLong;const strictParseInt32=e=>{if(typeof e==="string"){return expectInt32(parseNumber(e))}return expectInt32(e)};const strictParseShort=e=>{if(typeof e==="string"){return expectShort(parseNumber(e))}return expectShort(e)};const strictParseByte=e=>{if(typeof e==="string"){return expectByte(parseNumber(e))}return expectByte(e)};const stackTraceWarning=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n");const v={warn:console.warn};const D=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];const k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dateToUtcString(e){const t=e.getUTCFullYear();const n=e.getUTCMonth();const o=e.getUTCDay();const i=e.getUTCDate();const c=e.getUTCHours();const d=e.getUTCMinutes();const p=e.getUTCSeconds();const y=i<10?`0${i}`:`${i}`;const C=c<10?`0${c}`:`${c}`;const Q=d<10?`0${d}`:`${d}`;const v=p<10?`0${p}`:`${p}`;return`${D[o]}, ${y} ${k[n]} ${t} ${C}:${Q}:${v} GMT`}const $=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);const parseRfc3339DateTime=e=>{if(e===null||e===undefined){return undefined}if(typeof e!=="string"){throw new TypeError("RFC-3339 date-times must be expressed as strings")}const t=$.exec(e);if(!t){throw new TypeError("Invalid RFC-3339 date-time value")}const[n,o,i,c,d,p,y,C]=t;const Q=strictParseShort(stripLeadingZeroes(o));const v=parseDateValue(i,"month",1,12);const D=parseDateValue(c,"day",1,31);return buildDate(Q,v,D,{hours:d,minutes:p,seconds:y,fractionalMilliseconds:C})};const V=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/);const parseRfc3339DateTimeWithOffset=e=>{if(e===null||e===undefined){return undefined}if(typeof e!=="string"){throw new TypeError("RFC-3339 date-times must be expressed as strings")}const t=V.exec(e);if(!t){throw new TypeError("Invalid RFC-3339 date-time value")}const[n,o,i,c,d,p,y,C,Q]=t;const v=strictParseShort(stripLeadingZeroes(o));const D=parseDateValue(i,"month",1,12);const k=parseDateValue(c,"day",1,31);const $=buildDate(v,D,k,{hours:d,minutes:p,seconds:y,fractionalMilliseconds:C});if(Q.toUpperCase()!="Z"){$.setTime($.getTime()-parseOffsetToMilliseconds(Q))}return $};const ee=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$/);const te=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$/);const re=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})$/);const parseRfc7231DateTime=e=>{if(e===null||e===undefined){return undefined}if(typeof e!=="string"){throw new TypeError("RFC-7231 date-times must be expressed as strings")}let t=ee.exec(e);if(t){const[e,n,o,i,c,d,p,y]=t;return buildDate(strictParseShort(stripLeadingZeroes(i)),parseMonthByShortName(o),parseDateValue(n,"day",1,31),{hours:c,minutes:d,seconds:p,fractionalMilliseconds:y})}t=te.exec(e);if(t){const[e,n,o,i,c,d,p,y]=t;return adjustRfc850Year(buildDate(parseTwoDigitYear(i),parseMonthByShortName(o),parseDateValue(n,"day",1,31),{hours:c,minutes:d,seconds:p,fractionalMilliseconds:y}))}t=re.exec(e);if(t){const[e,n,o,i,c,d,p,y]=t;return buildDate(strictParseShort(stripLeadingZeroes(y)),parseMonthByShortName(n),parseDateValue(o.trimLeft(),"day",1,31),{hours:i,minutes:c,seconds:d,fractionalMilliseconds:p})}throw new TypeError("Invalid RFC-7231 date-time value")};const parseEpochTimestamp=e=>{if(e===null||e===undefined){return undefined}let t;if(typeof e==="number"){t=e}else if(typeof e==="string"){t=strictParseDouble(e)}else if(typeof e==="object"&&e.tag===1){t=e.value}else{throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation")}if(Number.isNaN(t)||t===Infinity||t===-Infinity){throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics")}return new Date(Math.round(t*1e3))};const buildDate=(e,t,n,o)=>{const i=t-1;validateDayOfMonth(e,i,n);return new Date(Date.UTC(e,i,n,parseDateValue(o.hours,"hour",0,23),parseDateValue(o.minutes,"minute",0,59),parseDateValue(o.seconds,"seconds",0,60),parseMilliseconds(o.fractionalMilliseconds)))};const parseTwoDigitYear=e=>{const t=(new Date).getUTCFullYear();const n=Math.floor(t/100)*100+strictParseShort(stripLeadingZeroes(e));if(n{if(e.getTime()-(new Date).getTime()>ne){return new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()))}return e};const parseMonthByShortName=e=>{const t=k.indexOf(e);if(t<0){throw new TypeError(`Invalid month: ${e}`)}return t+1};const se=[31,28,31,30,31,30,31,31,30,31,30,31];const validateDayOfMonth=(e,t,n)=>{let o=se[t];if(t===1&&isLeapYear(e)){o=29}if(n>o){throw new TypeError(`Invalid day for ${k[t]} in ${e}: ${n}`)}};const isLeapYear=e=>e%4===0&&(e%100!==0||e%400===0);const parseDateValue=(e,t,n,o)=>{const i=strictParseByte(stripLeadingZeroes(e));if(io){throw new TypeError(`${t} must be between ${n} and ${o}, inclusive`)}return i};const parseMilliseconds=e=>{if(e===null||e===undefined){return 0}return strictParseFloat32("0."+e)*1e3};const parseOffsetToMilliseconds=e=>{const t=e[0];let n=1;if(t=="+"){n=1}else if(t=="-"){n=-1}else{throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`)}const o=Number(e.substring(1,3));const i=Number(e.substring(4,6));return n*(o*60+i)*60*1e3};const stripLeadingZeroes=e=>{let t=0;while(t{if(e&&typeof e==="object"&&(e instanceof oe||"deserializeJSON"in e)){return e}else if(typeof e==="string"||Object.getPrototypeOf(e)===String.prototype){return oe(String(e))}return oe(JSON.stringify(e))};oe.fromObject=oe.from;function quoteHeader(e){if(e.includes(",")||e.includes('"')){e=`"${e.replace(/"/g,'\\"')}"`}return e}const ie=`(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;const ae=`(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;const ce=`(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;const le=`(\\d?\\d)`;const ue=`(\\d{4})`;const de=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);const pe=new RegExp(`^${ie}, ${le} ${ae} ${ue} ${ce} GMT$`);const Ae=new RegExp(`^${ie}, ${le}-${ae}-(\\d\\d) ${ce} GMT$`);const me=new RegExp(`^${ie} ${ae} ( [1-9]|\\d\\d) ${ce} ${ue}$`);const ge=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];const _parseEpochTimestamp=e=>{if(e==null){return void 0}let t=NaN;if(typeof e==="number"){t=e}else if(typeof e==="string"){if(!/^-?\d*\.?\d+$/.test(e)){throw new TypeError(`parseEpochTimestamp - numeric string invalid.`)}t=Number.parseFloat(e)}else if(typeof e==="object"&&e.tag===1){t=e.value}if(isNaN(t)||Math.abs(t)===Infinity){throw new TypeError("Epoch timestamps must be valid finite numbers.")}return new Date(Math.round(t*1e3))};const _parseRfc3339DateTimeWithOffset=e=>{if(e==null){return void 0}if(typeof e!=="string"){throw new TypeError("RFC3339 timestamps must be strings")}const t=de.exec(e);if(!t){throw new TypeError(`Invalid RFC3339 timestamp format ${e}`)}const[,n,o,i,c,d,p,,y,C]=t;range(o,1,12);range(i,1,31);range(c,0,23);range(d,0,59);range(p,0,60);const Q=new Date(Date.UTC(Number(n),Number(o)-1,Number(i),Number(c),Number(d),Number(p),Number(y)?Math.round(parseFloat(`0.${y}`)*1e3):0));Q.setUTCFullYear(Number(n));if(C.toUpperCase()!="Z"){const[,e,t,n]=/([+-])(\d\d):(\d\d)/.exec(C)||[void 0,"+",0,0];const o=e==="-"?1:-1;Q.setTime(Q.getTime()+o*(Number(t)*60*60*1e3+Number(n)*60*1e3))}return Q};const _parseRfc7231DateTime=e=>{if(e==null){return void 0}if(typeof e!=="string"){throw new TypeError("RFC7231 timestamps must be strings.")}let t;let n;let o;let i;let c;let d;let p;let y;if(y=pe.exec(e)){[,t,n,o,i,c,d,p]=y}else if(y=Ae.exec(e)){[,t,n,o,i,c,d,p]=y;o=(Number(o)+1900).toString()}else if(y=me.exec(e)){[,n,t,i,c,d,p,o]=y}if(o&&d){const e=Date.UTC(Number(o),ge.indexOf(n),Number(t),Number(i),Number(c),Number(d),p?Math.round(parseFloat(`0.${p}`)*1e3):0);range(t,1,31);range(i,0,23);range(c,0,59);range(d,0,60);const y=new Date(e);y.setUTCFullYear(Number(o));return y}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function range(e,t,n){const o=Number(e);if(on){throw new Error(`Value ${o} out of range [${t}, ${n}]`)}}function splitEvery(e,t,n){if(n<=0||!Number.isInteger(n)){throw new Error("Invalid number of delimiters ("+n+") for splitEvery.")}const o=e.split(t);if(n===1){return o}const i=[];let c="";for(let e=0;e{const t=e.length;const n=[];let o=false;let i=undefined;let c=0;for(let d=0;d{e=e.trim();const t=e.length;if(t<2){return e}if(e[0]===`"`&&e[t-1]===`"`){e=e.slice(1,t-1)}return e.replace(/\\"/g,'"')}))};const fe=/^-?\d*(\.\d+)?$/;class NumericValue{string;type;constructor(e,t){this.string=e;this.type=t;if(!fe.test(e)){throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`)}}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||typeof e!=="object"){return false}const t=e;return NumericValue.prototype.isPrototypeOf(e)||t.type==="bigDecimal"&&fe.test(t.string)}}function nv(e){return new NumericValue(String(e),"bigDecimal")}t.generateIdempotencyToken=o.v4;t.LazyJsonString=oe;t.NumericValue=NumericValue;t._parseEpochTimestamp=_parseEpochTimestamp;t._parseRfc3339DateTimeWithOffset=_parseRfc3339DateTimeWithOffset;t._parseRfc7231DateTime=_parseRfc7231DateTime;t.copyDocumentWithTransform=copyDocumentWithTransform;t.dateToUtcString=dateToUtcString;t.expectBoolean=expectBoolean;t.expectByte=expectByte;t.expectFloat32=expectFloat32;t.expectInt=c;t.expectInt32=expectInt32;t.expectLong=expectLong;t.expectNonNull=expectNonNull;t.expectNumber=expectNumber;t.expectObject=expectObject;t.expectShort=expectShort;t.expectString=expectString;t.expectUnion=expectUnion;t.handleFloat=y;t.limitedParseDouble=limitedParseDouble;t.limitedParseFloat=C;t.limitedParseFloat32=limitedParseFloat32;t.logger=v;t.nv=nv;t.parseBoolean=parseBoolean;t.parseEpochTimestamp=parseEpochTimestamp;t.parseRfc3339DateTime=parseRfc3339DateTime;t.parseRfc3339DateTimeWithOffset=parseRfc3339DateTimeWithOffset;t.parseRfc7231DateTime=parseRfc7231DateTime;t.quoteHeader=quoteHeader;t.splitEvery=splitEvery;t.splitHeader=splitHeader;t.strictParseByte=strictParseByte;t.strictParseDouble=strictParseDouble;t.strictParseFloat=d;t.strictParseFloat32=strictParseFloat32;t.strictParseInt=Q;t.strictParseInt32=strictParseInt32;t.strictParseLong=strictParseLong;t.strictParseShort=strictParseShort},7809:(e,t,n)=>{var o=n(2356);var i=n(8256);var c=n(8385);function createRequest(e,t){return new Request(e,t)}function requestTimeout(e=0){return new Promise(((t,n)=>{if(e){setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError";n(t)}),e)}}))}const d={supported:undefined};class FetchHttpHandler{config;configProvider;static create(e){if(typeof e?.handle==="function"){return e}return new FetchHttpHandler(e)}constructor(e){if(typeof e==="function"){this.configProvider=e().then((e=>e||{}))}else{this.config=e??{};this.configProvider=Promise.resolve(this.config)}if(d.supported===undefined){d.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in createRequest("https://[::1]"))}}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){if(!this.config){this.config=await this.configProvider}const c=n??this.config.requestTimeout;const p=this.config.keepAlive===true;const y=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");e.name="AbortError";return Promise.reject(e)}let C=e.path;const Q=i.buildQueryString(e.query||{});if(Q){C+=`?${Q}`}if(e.fragment){C+=`#${e.fragment}`}let v="";if(e.username!=null||e.password!=null){const t=e.username??"";const n=e.password??"";v=`${t}:${n}@`}const{port:D,method:k}=e;const $=`${e.protocol}//${v}${e.hostname}${D?`:${D}`:""}${C}`;const V=k==="GET"||k==="HEAD"?undefined:e.body;const ee={body:V,headers:new Headers(e.headers),method:k,credentials:y};if(this.config?.cache){ee.cache=this.config.cache}if(V){ee.duplex="half"}if(typeof AbortController!=="undefined"){ee.signal=t}if(d.supported){ee.keepalive=p}if(typeof this.config.requestInit==="function"){Object.assign(ee,this.config.requestInit(e))}let removeSignalEventListener=()=>{};const te=createRequest($,ee);const re=[fetch(te).then((e=>{const t=e.headers;const n={};for(const e of t.entries()){n[e[0]]=e[1]}const i=e.body!=undefined;if(!i){return e.blob().then((t=>({response:new o.HttpResponse({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))}return{response:new o.HttpResponse({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}})),requestTimeout(c)];if(t){re.push(new Promise(((e,n)=>{const onAbort=()=>{const e=new Error("Request aborted");e.name="AbortError";n(e)};if(typeof t.addEventListener==="function"){const e=t;e.addEventListener("abort",onAbort,{once:true});removeSignalEventListener=()=>e.removeEventListener("abort",onAbort)}else{t.onabort=onAbort}})))}return Promise.race(re).finally(removeSignalEventListener)}updateHttpClientConfig(e,t){this.config=undefined;this.configProvider=this.configProvider.then((n=>{n[e]=t;return n}))}httpHandlerConfigs(){return this.config??{}}}const streamCollector=async e=>{if(typeof Blob==="function"&&e instanceof Blob||e.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==undefined){return new Uint8Array(await e.arrayBuffer())}return collectBlob(e)}return collectStream(e)};async function collectBlob(e){const t=await readToBase64(e);const n=c.fromBase64(t);return new Uint8Array(n)}async function collectStream(e){const t=[];const n=e.getReader();let o=false;let i=0;while(!o){const{done:e,value:c}=await n.read();if(c){t.push(c);i+=c.length}o=e}const c=new Uint8Array(i);let d=0;for(const e of t){c.set(e,d);d+=e.length}return c}function readToBase64(e){return new Promise(((t,n)=>{const o=new FileReader;o.onloadend=()=>{if(o.readyState!==2){return n(new Error("Reader aborted too early"))}const e=o.result??"";const i=e.indexOf(",");const c=i>-1?i+1:e.length;t(e.substring(c))};o.onabort=()=>n(new Error("Read aborted"));o.onerror=()=>n(o.error);o.readAsDataURL(e)}))}t.FetchHttpHandler=FetchHttpHandler;t.keepAliveSupport=d;t.streamCollector=streamCollector},2711:(e,t,n)=>{var o=n(4151);var i=n(1577);var c=n(181);var d=n(6982);class Hash{algorithmIdentifier;secret;hash;constructor(e,t){this.algorithmIdentifier=e;this.secret=t;this.reset()}update(e,t){this.hash.update(i.toUint8Array(castSourceData(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?d.createHmac(this.algorithmIdentifier,castSourceData(this.secret)):d.createHash(this.algorithmIdentifier)}}function castSourceData(e,t){if(c.Buffer.isBuffer(e)){return e}if(typeof e==="string"){return o.fromString(e,t)}if(ArrayBuffer.isView(e)){return o.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength)}return o.fromArrayBuffer(e)}t.Hash=Hash},6130:(e,t)=>{const isArrayBuffer=e=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";t.isArrayBuffer=isArrayBuffer},7212:(e,t,n)=>{var o=n(2356);const i="content-length";function contentLengthMiddleware(e){return t=>async n=>{const c=n.request;if(o.HttpRequest.isInstance(c)){const{body:t,headers:n}=c;if(t&&Object.keys(n).map((e=>e.toLowerCase())).indexOf(i)===-1){try{const n=e(t);c.headers={...c.headers,[i]:String(n)}}catch(e){}}}return t({...n,request:c})}}const c={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:true};const getContentLengthPlugin=e=>({applyToStack:t=>{t.add(contentLengthMiddleware(e.bodyLengthChecker),c)}});t.contentLengthMiddleware=contentLengthMiddleware;t.contentLengthMiddlewareOptions=c;t.getContentLengthPlugin=getContentLengthPlugin},6041:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getEndpointFromConfig=void 0;const o=n(5704);const i=n(8008);const getEndpointFromConfig=async e=>(0,o.loadConfig)((0,i.getEndpointUrlConfig)(e??""))();t.getEndpointFromConfig=getEndpointFromConfig},8008:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getEndpointUrlConfig=void 0;const o=n(4964);const i="AWS_ENDPOINT_URL";const c="endpoint_url";const getEndpointUrlConfig=e=>({environmentVariableSelector:t=>{const n=e.split(" ").map((e=>e.toUpperCase()));const o=t[[i,...n].join("_")];if(o)return o;const c=t[i];if(c)return c;return undefined},configFileSelector:(t,n)=>{if(n&&t.services){const i=n[["services",t.services].join(o.CONFIG_PREFIX_SEPARATOR)];if(i){const t=e.split(" ").map((e=>e.toLowerCase()));const n=i[[t.join("_"),c].join(o.CONFIG_PREFIX_SEPARATOR)];if(n)return n}}const i=t[c];if(i)return i;return undefined},default:undefined});t.getEndpointUrlConfig=getEndpointUrlConfig},99:(e,t,n)=>{var o=n(6041);var i=n(4494);var c=n(402);var d=n(6324);var p=n(3255);const resolveParamsForS3=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket==="string"){e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))}if(isArnBucketName(t)){if(e.ForcePathStyle===true){throw new Error("Path-style addressing cannot be used with ARN buckets")}}else if(!isDnsCompatibleBucketName(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3){e.ForcePathStyle=true}if(e.DisableMultiRegionAccessPoints){e.disableMultiRegionAccessPoints=true;e.DisableMRAP=true}return e};const y=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;const C=/(\d+\.){3}\d+/;const Q=/\.\./;const isDnsCompatibleBucketName=e=>y.test(e)&&!C.test(e)&&!Q.test(e);const isArnBucketName=e=>{const[t,n,o,,,i]=e.split(":");const c=t==="arn"&&e.split(":").length>=6;const d=Boolean(c&&n&&o&&i);if(c&&!d){throw new Error(`Invalid ARN: ${e} was an invalid ARN.`)}return d};const createConfigValueProvider=(e,t,n,o=false)=>{const configProvider=async()=>{let i;if(o){const o=n.clientContextParams;const c=o?.[e];i=c??n[e]??n[t]}else{i=n[e]??n[t]}if(typeof i==="function"){return i()}return i};if(e==="credentialScope"||t==="CredentialScope"){return async()=>{const e=typeof n.credentials==="function"?await n.credentials():n.credentials;const t=e?.credentialScope??e?.CredentialScope;return t}}if(e==="accountId"||t==="AccountId"){return async()=>{const e=typeof n.credentials==="function"?await n.credentials():n.credentials;const t=e?.accountId??e?.AccountId;return t}}if(e==="endpoint"||t==="endpoint"){return async()=>{if(n.isCustomEndpoint===false){return undefined}const e=await configProvider();if(e&&typeof e==="object"){if("url"in e){return e.url.href}if("hostname"in e){const{protocol:t,hostname:n,port:o,path:i}=e;return`${t}//${n}${o?":"+o:""}${i}`}}return e}}return configProvider};const toEndpointV1=e=>{if(typeof e==="object"){if("url"in e){return i.parseUrl(e.url)}return e}return i.parseUrl(e)};const getEndpointFromInstructions=async(e,t,n,i)=>{if(!n.isCustomEndpoint){let e;if(n.serviceConfiguredEndpoint){e=await n.serviceConfiguredEndpoint()}else{e=await o.getEndpointFromConfig(n.serviceId)}if(e){n.endpoint=()=>Promise.resolve(toEndpointV1(e));n.isCustomEndpoint=true}}const c=await resolveParams(e,t,n);if(typeof n.endpointProvider!=="function"){throw new Error("config.endpointProvider is not set.")}const d=n.endpointProvider(c,i);return d};const resolveParams=async(e,t,n)=>{const o={};const i=t?.getEndpointParameterInstructions?.()||{};for(const[t,c]of Object.entries(i)){switch(c.type){case"staticContextParams":o[t]=c.value;break;case"contextParams":o[t]=e[c.name];break;case"clientContextParams":case"builtInParams":o[t]=await createConfigValueProvider(c.name,t,n,c.type!=="builtInParams")();break;case"operationContextParams":o[t]=c.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(c))}}if(Object.keys(i).length===0){Object.assign(o,n)}if(String(n.serviceId).toLowerCase()==="s3"){await resolveParamsForS3(o)}return o};const endpointMiddleware=({config:e,instructions:t})=>(n,o)=>async i=>{if(e.isCustomEndpoint){c.setFeature(o,"ENDPOINT_OVERRIDE","N")}const p=await getEndpointFromInstructions(i.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=p;o.authSchemes=p.properties?.authSchemes;const y=o.authSchemes?.[0];if(y){o["signing_region"]=y.signingRegion;o["signing_service"]=y.signingName;const e=d.getSmithyContext(o);const t=e?.selectedHttpAuthScheme?.httpAuthOption;if(t){t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:y.signingRegion,signingRegion:y.signingRegion,signing_service:y.signingName,signingName:y.signingName,signingRegionSet:y.signingRegionSet},y.properties)}}return n({...i})};const v={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:true,relation:"before",toMiddleware:p.serializerMiddlewareOption.name};const getEndpointPlugin=(e,t)=>({applyToStack:n=>{n.addRelativeTo(endpointMiddleware({config:e,instructions:t}),v)}});const resolveEndpointConfig=e=>{const t=e.tls??true;const{endpoint:n,useDualstackEndpoint:i,useFipsEndpoint:c}=e;const p=n!=null?async()=>toEndpointV1(await d.normalizeProvider(n)()):undefined;const y=!!n;const C=Object.assign(e,{endpoint:p,tls:t,isCustomEndpoint:y,useDualstackEndpoint:d.normalizeProvider(i??false),useFipsEndpoint:d.normalizeProvider(c??false)});let Q=undefined;C.serviceConfiguredEndpoint=async()=>{if(e.serviceId&&!Q){Q=o.getEndpointFromConfig(e.serviceId)}return Q};return C};const resolveEndpointRequiredConfig=e=>{const{endpoint:t}=e;if(t===undefined){e.endpoint=async()=>{throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.")}}return e};t.endpointMiddleware=endpointMiddleware;t.endpointMiddlewareOptions=v;t.getEndpointFromInstructions=getEndpointFromInstructions;t.getEndpointPlugin=getEndpointPlugin;t.resolveEndpointConfig=resolveEndpointConfig;t.resolveEndpointRequiredConfig=resolveEndpointRequiredConfig;t.resolveParams=resolveParams;t.toEndpointV1=toEndpointV1},9618:(e,t,n)=>{var o=n(5518);var i=n(2356);var c=n(2058);var d=n(266);var p=n(6324);var y=n(1411);var C=n(9831);const getDefaultRetryQuota=(e,t)=>{const n=e;const i=o.NO_RETRY_INCREMENT;const c=o.RETRY_COST;const d=o.TIMEOUT_RETRY_COST;let p=e;const getCapacityAmount=e=>e.name==="TimeoutError"?d:c;const hasRetryTokens=e=>getCapacityAmount(e)<=p;const retrieveRetryTokens=e=>{if(!hasRetryTokens(e)){throw new Error("No retry token available")}const t=getCapacityAmount(e);p-=t;return t};const releaseRetryTokens=e=>{p+=e??i;p=Math.min(p,n)};return Object.freeze({hasRetryTokens:hasRetryTokens,retrieveRetryTokens:retrieveRetryTokens,releaseRetryTokens:releaseRetryTokens})};const defaultDelayDecider=(e,t)=>Math.floor(Math.min(o.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e));const defaultRetryDecider=e=>{if(!e){return false}return c.isRetryableByTrait(e)||c.isClockSkewError(e)||c.isThrottlingError(e)||c.isTransientError(e)};const asSdkError=e=>{if(e instanceof Error)return e;if(e instanceof Object)return Object.assign(new Error,e);if(typeof e==="string")return new Error(e);return new Error(`AWS SDK error wrapper for ${e}`)};class StandardRetryStrategy{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=o.RETRY_MODES.STANDARD;constructor(e,t){this.maxAttemptsProvider=e;this.retryDecider=t?.retryDecider??defaultRetryDecider;this.delayDecider=t?.delayDecider??defaultDelayDecider;this.retryQuota=t?.retryQuota??getDefaultRetryQuota(o.INITIAL_RETRY_TOKENS)}shouldRetry(e,t,n){return tsetTimeout(e,i)));continue}if(!t.$metadata){t.$metadata={}}t.$metadata.attempts=y;t.$metadata.totalRetryDelay=C;throw t}}}}const getDelayFromRetryAfterHeader=e=>{if(!i.HttpResponse.isInstance(e))return;const t=Object.keys(e.headers).find((e=>e.toLowerCase()==="retry-after"));if(!t)return;const n=e.headers[t];const o=Number(n);if(!Number.isNaN(o))return o*1e3;const c=new Date(n);return c.getTime()-Date.now()};class AdaptiveRetryStrategy extends StandardRetryStrategy{rateLimiter;constructor(e,t){const{rateLimiter:n,...i}=t??{};super(e,i);this.rateLimiter=n??new o.DefaultRateLimiter;this.mode=o.RETRY_MODES.ADAPTIVE}async retry(e,t){return super.retry(e,t,{beforeRequest:async()=>this.rateLimiter.getSendToken(),afterRequest:e=>{this.rateLimiter.updateClientSendingRate(e)}})}}const Q="AWS_MAX_ATTEMPTS";const v="max_attempts";const D={environmentVariableSelector:e=>{const t=e[Q];if(!t)return undefined;const n=parseInt(t);if(Number.isNaN(n)){throw new Error(`Environment variable ${Q} mast be a number, got "${t}"`)}return n},configFileSelector:e=>{const t=e[v];if(!t)return undefined;const n=parseInt(t);if(Number.isNaN(n)){throw new Error(`Shared config file entry ${v} mast be a number, got "${t}"`)}return n},default:o.DEFAULT_MAX_ATTEMPTS};const resolveRetryConfig=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:i}=e;const c=p.normalizeProvider(i??o.DEFAULT_MAX_ATTEMPTS);return Object.assign(e,{maxAttempts:c,retryStrategy:async()=>{if(t){return t}const e=await p.normalizeProvider(n)();if(e===o.RETRY_MODES.ADAPTIVE){return new o.AdaptiveRetryStrategy(c)}return new o.StandardRetryStrategy(c)}})};const k="AWS_RETRY_MODE";const $="retry_mode";const V={environmentVariableSelector:e=>e[k],configFileSelector:e=>e[$],default:o.DEFAULT_RETRY_MODE};const omitRetryHeadersMiddleware=()=>e=>async t=>{const{request:n}=t;if(i.HttpRequest.isInstance(n)){delete n.headers[o.INVOCATION_ID_HEADER];delete n.headers[o.REQUEST_HEADER]}return e(t)};const ee={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:true};const getOmitRetryHeadersPlugin=e=>({applyToStack:e=>{e.addRelativeTo(omitRetryHeadersMiddleware(),ee)}});const retryMiddleware=e=>(t,n)=>async c=>{let p=await e.retryStrategy();const Q=await e.maxAttempts();if(isRetryStrategyV2(p)){p=p;let e=await p.acquireInitialRetryToken(n["partition_id"]);let v=new Error;let D=0;let k=0;const{request:$}=c;const V=i.HttpRequest.isInstance($);if(V){$.headers[o.INVOCATION_ID_HEADER]=d.v4()}while(true){try{if(V){$.headers[o.REQUEST_HEADER]=`attempt=${D+1}; max=${Q}`}const{response:n,output:i}=await t(c);p.recordSuccess(e);i.$metadata.attempts=D+1;i.$metadata.totalRetryDelay=k;return{response:n,output:i}}catch(t){const o=getRetryErrorInfo(t);v=asSdkError(t);if(V&&C.isStreamingPayload($)){(n.logger instanceof y.NoOpLogger?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request.");throw v}try{e=await p.refreshRetryTokenForRetry(e,o)}catch(e){if(!v.$metadata){v.$metadata={}}v.$metadata.attempts=D+1;v.$metadata.totalRetryDelay=k;throw v}D=e.getRetryCount();const i=e.getRetryDelay();k+=i;await new Promise((e=>setTimeout(e,i)))}}}else{p=p;if(p?.mode)n.userAgent=[...n.userAgent||[],["cfg/retry-mode",p.mode]];return p.retry(t,c)}};const isRetryStrategyV2=e=>typeof e.acquireInitialRetryToken!=="undefined"&&typeof e.refreshRetryTokenForRetry!=="undefined"&&typeof e.recordSuccess!=="undefined";const getRetryErrorInfo=e=>{const t={error:e,errorType:getRetryErrorType(e)};const n=getRetryAfterHint(e.$response);if(n){t.retryAfterHint=n}return t};const getRetryErrorType=e=>{if(c.isThrottlingError(e))return"THROTTLING";if(c.isTransientError(e))return"TRANSIENT";if(c.isServerError(e))return"SERVER_ERROR";return"CLIENT_ERROR"};const te={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:true};const getRetryPlugin=e=>({applyToStack:t=>{t.add(retryMiddleware(e),te)}});const getRetryAfterHint=e=>{if(!i.HttpResponse.isInstance(e))return;const t=Object.keys(e.headers).find((e=>e.toLowerCase()==="retry-after"));if(!t)return;const n=e.headers[t];const o=Number(n);if(!Number.isNaN(o))return new Date(o*1e3);const c=new Date(n);return c};t.AdaptiveRetryStrategy=AdaptiveRetryStrategy;t.CONFIG_MAX_ATTEMPTS=v;t.CONFIG_RETRY_MODE=$;t.ENV_MAX_ATTEMPTS=Q;t.ENV_RETRY_MODE=k;t.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=D;t.NODE_RETRY_MODE_CONFIG_OPTIONS=V;t.StandardRetryStrategy=StandardRetryStrategy;t.defaultDelayDecider=defaultDelayDecider;t.defaultRetryDecider=defaultRetryDecider;t.getOmitRetryHeadersPlugin=getOmitRetryHeadersPlugin;t.getRetryAfterHint=getRetryAfterHint;t.getRetryPlugin=getRetryPlugin;t.omitRetryHeadersMiddleware=omitRetryHeadersMiddleware;t.omitRetryHeadersMiddlewareOptions=ee;t.resolveRetryConfig=resolveRetryConfig;t.retryMiddleware=retryMiddleware;t.retryMiddlewareOptions=te},9831:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.isStreamingPayload=void 0;const o=n(2203);const isStreamingPayload=e=>e?.body instanceof o.Readable||typeof ReadableStream!=="undefined"&&e?.body instanceof ReadableStream;t.isStreamingPayload=isStreamingPayload},3255:(e,t,n)=>{var o=n(2356);const deserializerMiddleware=(e,t)=>(n,i)=>async c=>{const{response:d}=await n(c);try{const n=await t(d,e);return{response:d,output:n}}catch(e){Object.defineProperty(e,"$response",{value:d,enumerable:false,writable:false,configurable:false});if(!("$metadata"in e)){const t=`Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;try{e.message+="\n "+t}catch(e){if(!i.logger||i.logger?.constructor?.name==="NoOpLogger"){console.warn(t)}else{i.logger?.warn?.(t)}}if(typeof e.$responseBodyText!=="undefined"){if(e.$response){e.$response.body=e.$responseBodyText}}try{if(o.HttpResponse.isInstance(d)){const{headers:t={}}=d;const n=Object.entries(t);e.$metadata={httpStatusCode:d.statusCode,requestId:findHeader(/^x-[\w-]+-request-?id$/,n),extendedRequestId:findHeader(/^x-[\w-]+-id-2$/,n),cfId:findHeader(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}};const findHeader=(e,t)=>(t.find((([t])=>t.match(e)))||[void 0,void 0])[1];const serializerMiddleware=(e,t)=>(n,o)=>async i=>{const c=e;const d=o.endpointV2?.url&&c.urlParser?async()=>c.urlParser(o.endpointV2.url):c.endpoint;if(!d){throw new Error("No valid endpoint provider available.")}const p=await t(i.input,{...e,endpoint:d});return n({...i,request:p})};const i={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:true};const c={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:true};function getSerdePlugin(e,t,n){return{applyToStack:o=>{o.add(deserializerMiddleware(e,n),i);o.add(serializerMiddleware(e,t),c)}}}t.deserializerMiddleware=deserializerMiddleware;t.deserializerMiddlewareOption=i;t.getSerdePlugin=getSerdePlugin;t.serializerMiddleware=serializerMiddleware;t.serializerMiddlewareOption=c},9208:(e,t)=>{const getAllAliases=(e,t)=>{const n=[];if(e){n.push(e)}if(t){for(const e of t){n.push(e)}}return n};const getMiddlewareNameWithAliases=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`;const constructStack=()=>{let e=[];let t=[];let i=false;const c=new Set;const sort=e=>e.sort(((e,t)=>n[t.step]-n[e.step]||o[t.priority||"normal"]-o[e.priority||"normal"]));const removeByName=n=>{let o=false;const filterCb=e=>{const t=getAllAliases(e.name,e.aliases);if(t.includes(n)){o=true;for(const e of t){c.delete(e)}return false}return true};e=e.filter(filterCb);t=t.filter(filterCb);return o};const removeByReference=n=>{let o=false;const filterCb=e=>{if(e.middleware===n){o=true;for(const t of getAllAliases(e.name,e.aliases)){c.delete(t)}return false}return true};e=e.filter(filterCb);t=t.filter(filterCb);return o};const cloneTo=n=>{e.forEach((e=>{n.add(e.middleware,{...e})}));t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})}));n.identifyOnResolve?.(d.identifyOnResolve());return n};const expandRelativeMiddlewareList=e=>{const t=[];e.before.forEach((e=>{if(e.before.length===0&&e.after.length===0){t.push(e)}else{t.push(...expandRelativeMiddlewareList(e))}}));t.push(e);e.after.reverse().forEach((e=>{if(e.before.length===0&&e.after.length===0){t.push(e)}else{t.push(...expandRelativeMiddlewareList(e))}}));return t};const getMiddlewareList=(n=false)=>{const o=[];const i=[];const c={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of getAllAliases(t.name,t.aliases)){c[e]=t}o.push(t)}));t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of getAllAliases(t.name,t.aliases)){c[e]=t}i.push(t)}));i.forEach((e=>{if(e.toMiddleware){const t=c[e.toMiddleware];if(t===undefined){if(n){return}throw new Error(`${e.toMiddleware} is not found when adding `+`${getMiddlewareNameWithAliases(e.name,e.aliases)} `+`middleware ${e.relation} ${e.toMiddleware}`)}if(e.relation==="after"){t.after.push(e)}if(e.relation==="before"){t.before.push(e)}}}));const d=sort(o).map(expandRelativeMiddlewareList).reduce(((e,t)=>{e.push(...t);return e}),[]);return d};const d={add:(t,n={})=>{const{name:o,override:i,aliases:d}=n;const p={step:"initialize",priority:"normal",middleware:t,...n};const y=getAllAliases(o,d);if(y.length>0){if(y.some((e=>c.has(e)))){if(!i)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(o,d)}'`);for(const t of y){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(n===-1){continue}const i=e[n];if(i.step!==p.step||p.priority!==i.priority){throw new Error(`"${getMiddlewareNameWithAliases(i.name,i.aliases)}" middleware with `+`${i.priority} priority in ${i.step} step cannot `+`be overridden by "${getMiddlewareNameWithAliases(o,d)}" middleware with `+`${p.priority} priority in ${p.step} step.`)}e.splice(n,1)}}for(const e of y){c.add(e)}}e.push(p)},addRelativeTo:(e,n)=>{const{name:o,override:i,aliases:d}=n;const p={middleware:e,...n};const y=getAllAliases(o,d);if(y.length>0){if(y.some((e=>c.has(e)))){if(!i)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(o,d)}'`);for(const e of y){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(n===-1){continue}const i=t[n];if(i.toMiddleware!==p.toMiddleware||i.relation!==p.relation){throw new Error(`"${getMiddlewareNameWithAliases(i.name,i.aliases)}" middleware `+`${i.relation} "${i.toMiddleware}" middleware cannot be overridden `+`by "${getMiddlewareNameWithAliases(o,d)}" middleware ${p.relation} `+`"${p.toMiddleware}" middleware.`)}t.splice(n,1)}}for(const e of y){c.add(e)}}t.push(p)},clone:()=>cloneTo(constructStack()),use:e=>{e.applyToStack(d)},remove:e=>{if(typeof e==="string")return removeByName(e);else return removeByReference(e)},removeByTag:n=>{let o=false;const filterCb=e=>{const{tags:t,name:i,aliases:d}=e;if(t&&t.includes(n)){const e=getAllAliases(i,d);for(const t of e){c.delete(t)}o=true;return false}return true};e=e.filter(filterCb);t=t.filter(filterCb);return o},concat:e=>{const t=cloneTo(constructStack());t.use(e);t.identifyOnResolve(i||t.identifyOnResolve()||(e.identifyOnResolve?.()??false));return t},applyToStack:cloneTo,identify:()=>getMiddlewareList(true).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return getMiddlewareNameWithAliases(e.name,e.aliases)+" - "+t})),identifyOnResolve(e){if(typeof e==="boolean")i=e;return i},resolve:(e,t)=>{for(const n of getMiddlewareList().map((e=>e.middleware)).reverse()){e=n(e,t)}if(i){console.log(d.identify())}return e}};return d};const n={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1};const o={high:3,normal:2,low:1};t.constructStack=constructStack},5704:(e,t,n)=>{var o=n(8857);var i=n(4964);function getSelectorName(e){try{const t=new Set(Array.from(e.match(/([A-Z_]){3,}/g)??[]));t.delete("CONFIG");t.delete("CONFIG_PREFIX_SEPARATOR");t.delete("ENV");return[...t].join(", ")}catch(t){return e}}const fromEnv=(e,t)=>async()=>{try{const n=e(process.env,t);if(n===undefined){throw new Error}return n}catch(n){throw new o.CredentialsProviderError(n.message||`Not found in ENV: ${getSelectorName(e.toString())}`,{logger:t?.logger})}};const fromSharedConfigFiles=(e,{preferredFile:t="config",...n}={})=>async()=>{const c=i.getProfileName(n);const{configFile:d,credentialsFile:p}=await i.loadSharedConfigFiles(n);const y=p[c]||{};const C=d[c]||{};const Q=t==="config"?{...y,...C}:{...C,...y};try{const n=t==="config"?d:p;const o=e(Q,n);if(o===undefined){throw new Error}return o}catch(t){throw new o.CredentialsProviderError(t.message||`Not found in config files w/ profile [${c}]: ${getSelectorName(e.toString())}`,{logger:n.logger})}};const isFunction=e=>typeof e==="function";const fromStatic=e=>isFunction(e)?async()=>await e():o.fromStatic(e);const loadConfig=({environmentVariableSelector:e,configFileSelector:t,default:n},i={})=>{const{signingName:c,logger:d}=i;const p={signingName:c,logger:d};return o.memoize(o.chain(fromEnv(e,p),fromSharedConfigFiles(t,i),fromStatic(n)))};t.loadConfig=loadConfig},1279:(e,t,n)=>{var o=n(2356);var i=n(8256);var c=n(8611);var d=n(5692);var p=n(2203);var y=n(5675);const C=["ECONNRESET","EPIPE","ETIMEDOUT"];const getTransformedHeaders=e=>{const t={};for(const n of Object.keys(e)){const o=e[n];t[n]=Array.isArray(o)?o.join(","):o}return t};const Q={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)};const v=1e3;const setConnectionTimeout=(e,t,n=0)=>{if(!n){return-1}const registerTimeout=o=>{const i=Q.setTimeout((()=>{e.destroy();t(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${n} ms.`),{name:"TimeoutError"}))}),n-o);const doWithSocket=e=>{if(e?.connecting){e.on("connect",(()=>{Q.clearTimeout(i)}))}else{Q.clearTimeout(i)}};if(e.socket){doWithSocket(e.socket)}else{e.on("socket",doWithSocket)}};if(n<2e3){registerTimeout(0);return 0}return Q.setTimeout(registerTimeout.bind(null,v),v)};const setRequestTimeout=(e,t,n=0,o,i)=>{if(n){return Q.setTimeout((()=>{let c=`@smithy/node-http-handler - [${o?"ERROR":"WARN"}] a request has exceeded the configured ${n} ms requestTimeout.`;if(o){const n=Object.assign(new Error(c),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(n);t(n)}else{c+=` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;i?.warn?.(c)}}),n)}return-1};const D=3e3;const setSocketKeepAlive=(e,{keepAlive:t,keepAliveMsecs:n},o=D)=>{if(t!==true){return-1}const registerListener=()=>{if(e.socket){e.socket.setKeepAlive(t,n||0)}else{e.on("socket",(e=>{e.setKeepAlive(t,n||0)}))}};if(o===0){registerListener();return 0}return Q.setTimeout(registerListener,o)};const k=3e3;const setSocketTimeout=(e,t,n=0)=>{const registerTimeout=o=>{const i=n-o;const onTimeout=()=>{e.destroy();t(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${n} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};if(e.socket){e.socket.setTimeout(i,onTimeout);e.on("close",(()=>e.socket?.removeListener("timeout",onTimeout)))}else{e.setTimeout(i,onTimeout)}};if(0{d=Number(Q.setTimeout((()=>e(true)),Math.max($,n)))})),new Promise((t=>{e.on("continue",(()=>{Q.clearTimeout(d);t(true)}));e.on("response",(()=>{Q.clearTimeout(d);t(false)}));e.on("error",(()=>{Q.clearTimeout(d);t(false)}))}))])}if(p){writeBody(e,t.body)}}function writeBody(e,t){if(t instanceof p.Readable){t.pipe(e);return}if(t){const n=Buffer.isBuffer(t);const o=typeof t==="string";if(n||o){if(n&&t.byteLength===0){e.end()}else{e.end(t)}return}const i=t;if(typeof i==="object"&&i.buffer&&typeof i.byteOffset==="number"&&typeof i.byteLength==="number"){e.end(Buffer.from(i.buffer,i.byteOffset,i.byteLength));return}e.end(Buffer.from(t));return}e.end()}const V=0;class NodeHttpHandler{config;configProvider;socketWarningTimestamp=0;externalAgent=false;metadata={handlerProtocol:"http/1.1"};static create(e){if(typeof e?.handle==="function"){return e}return new NodeHttpHandler(e)}static checkSocketUsage(e,t,n=console){const{sockets:o,requests:i,maxSockets:c}=e;if(typeof c!=="number"||c===Infinity){return t}const d=15e3;if(Date.now()-d=c&&d>=2*c){n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${t} and ${d} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);return Date.now()}}}return t}constructor(e){this.configProvider=new Promise(((t,n)=>{if(typeof e==="function"){e().then((e=>{t(this.resolveDefaultConfig(e))})).catch(n)}else{t(this.resolveDefaultConfig(e))}}))}resolveDefaultConfig(e){const{requestTimeout:t,connectionTimeout:n,socketTimeout:o,socketAcquisitionWarningTimeout:i,httpAgent:p,httpsAgent:y,throwOnRequestTimeout:C,logger:Q}=e||{};const v=true;const D=50;return{connectionTimeout:n,requestTimeout:t,socketTimeout:o,socketAcquisitionWarningTimeout:i,throwOnRequestTimeout:C,httpAgent:(()=>{if(p instanceof c.Agent||typeof p?.destroy==="function"){this.externalAgent=true;return p}return new c.Agent({keepAlive:v,maxSockets:D,...p})})(),httpsAgent:(()=>{if(y instanceof d.Agent||typeof y?.destroy==="function"){this.externalAgent=true;return y}return new d.Agent({keepAlive:v,maxSockets:D,...y})})(),logger:Q}}destroy(){this.config?.httpAgent?.destroy();this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t,requestTimeout:n}={}){if(!this.config){this.config=await this.configProvider}return new Promise(((p,y)=>{const v=this.config;let D=undefined;const k=[];const resolve=async e=>{await D;k.forEach(Q.clearTimeout);p(e)};const reject=async e=>{await D;k.forEach(Q.clearTimeout);y(e)};if(t?.aborted){const e=new Error("Request aborted");e.name="AbortError";reject(e);return}const $=e.protocol==="https:";const V=e.headers??{};const ee=(V.Expect??V.expect)==="100-continue";let te=$?v.httpsAgent:v.httpAgent;if(ee&&!this.externalAgent){te=new($?d.Agent:c.Agent)({keepAlive:false,maxSockets:Infinity})}k.push(Q.setTimeout((()=>{this.socketWarningTimestamp=NodeHttpHandler.checkSocketUsage(te,this.socketWarningTimestamp,v.logger)}),v.socketAcquisitionWarningTimeout??(v.requestTimeout??2e3)+(v.connectionTimeout??1e3)));const re=i.buildQueryString(e.query||{});let ne=undefined;if(e.username!=null||e.password!=null){const t=e.username??"";const n=e.password??"";ne=`${t}:${n}`}let se=e.path;if(re){se+=`?${re}`}if(e.fragment){se+=`#${e.fragment}`}let oe=e.hostname??"";if(oe[0]==="["&&oe.endsWith("]")){oe=e.hostname.slice(1,-1)}else{oe=e.hostname}const ie={headers:e.headers,host:oe,method:e.method,path:se,port:e.port,agent:te,auth:ne};const ae=$?d.request:c.request;const ce=ae(ie,(e=>{const t=new o.HttpResponse({statusCode:e.statusCode||-1,reason:e.statusMessage,headers:getTransformedHeaders(e.headers),body:e});resolve({response:t})}));ce.on("error",(e=>{if(C.includes(e.code)){reject(Object.assign(e,{name:"TimeoutError"}))}else{reject(e)}}));if(t){const onAbort=()=>{ce.destroy();const e=new Error("Request aborted");e.name="AbortError";reject(e)};if(typeof t.addEventListener==="function"){const e=t;e.addEventListener("abort",onAbort,{once:true});ce.once("close",(()=>e.removeEventListener("abort",onAbort)))}else{t.onabort=onAbort}}const le=n??v.requestTimeout;k.push(setConnectionTimeout(ce,reject,v.connectionTimeout));k.push(setRequestTimeout(ce,reject,le,v.throwOnRequestTimeout,v.logger??console));k.push(setSocketTimeout(ce,reject,v.socketTimeout));const ue=ie.agent;if(typeof ue==="object"&&"keepAlive"in ue){k.push(setSocketKeepAlive(ce,{keepAlive:ue.keepAlive,keepAliveMsecs:ue.keepAliveMsecs}))}D=writeRequestBody(ce,e,le,this.externalAgent).catch((e=>{k.forEach(Q.clearTimeout);return y(e)}))}))}updateHttpClientConfig(e,t){this.config=undefined;this.configProvider=this.configProvider.then((n=>({...n,[e]:t})))}httpHandlerConfigs(){return this.config??{}}}class NodeHttp2ConnectionPool{sessions=[];constructor(e){this.sessions=e??[]}poll(){if(this.sessions.length>0){return this.sessions.shift()}}offerLast(e){this.sessions.push(e)}contains(e){return this.sessions.includes(e)}remove(e){this.sessions=this.sessions.filter((t=>t!==e))}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(e){for(const t of this.sessions){if(t===e){if(!t.destroyed){t.destroy()}}}}}class NodeHttp2ConnectionManager{constructor(e){this.config=e;if(this.config.maxConcurrency&&this.config.maxConcurrency<=0){throw new RangeError("maxConcurrency must be greater than zero.")}}config;sessionCache=new Map;lease(e,t){const n=this.getUrlString(e);const o=this.sessionCache.get(n);if(o){const e=o.poll();if(e&&!this.config.disableConcurrency){return e}}const i=y.connect(n);if(this.config.maxConcurrency){i.settings({maxConcurrentStreams:this.config.maxConcurrency},(t=>{if(t){throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())}}))}i.unref();const destroySessionCb=()=>{i.destroy();this.deleteSession(n,i)};i.on("goaway",destroySessionCb);i.on("error",destroySessionCb);i.on("frameError",destroySessionCb);i.on("close",(()=>this.deleteSession(n,i)));if(t.requestTimeout){i.setTimeout(t.requestTimeout,destroySessionCb)}const c=this.sessionCache.get(n)||new NodeHttp2ConnectionPool;c.offerLast(i);this.sessionCache.set(n,c);return i}deleteSession(e,t){const n=this.sessionCache.get(e);if(!n){return}if(!n.contains(t)){return}n.remove(t);this.sessionCache.set(e,n)}release(e,t){const n=this.getUrlString(e);this.sessionCache.get(n)?.offerLast(t)}destroy(){for(const[e,t]of this.sessionCache){for(const e of t){if(!e.destroyed){e.destroy()}t.remove(e)}this.sessionCache.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0){throw new RangeError("maxConcurrentStreams must be greater than zero.")}this.config.maxConcurrency=e}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}getUrlString(e){return e.destination.toString()}}class NodeHttp2Handler{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new NodeHttp2ConnectionManager({});static create(e){if(typeof e?.handle==="function"){return e}return new NodeHttp2Handler(e)}constructor(e){this.configProvider=new Promise(((t,n)=>{if(typeof e==="function"){e().then((e=>{t(e||{})})).catch(n)}else{t(e||{})}}))}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:n}={}){if(!this.config){this.config=await this.configProvider;this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||false);if(this.config.maxConcurrentStreams){this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}}const{requestTimeout:c,disableConcurrentStreams:d}=this.config;const p=n??c;return new Promise(((n,c)=>{let C=false;let Q=undefined;const resolve=async e=>{await Q;n(e)};const reject=async e=>{await Q;c(e)};if(t?.aborted){C=true;const e=new Error("Request aborted");e.name="AbortError";reject(e);return}const{hostname:v,method:D,port:k,protocol:$,query:V}=e;let ee="";if(e.username!=null||e.password!=null){const t=e.username??"";const n=e.password??"";ee=`${t}:${n}@`}const te=`${$}//${ee}${v}${k?`:${k}`:""}`;const re={destination:new URL(te)};const ne=this.connectionManager.lease(re,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:d||false});const rejectWithDestroy=e=>{if(d){this.destroySession(ne)}C=true;reject(e)};const se=i.buildQueryString(V||{});let oe=e.path;if(se){oe+=`?${se}`}if(e.fragment){oe+=`#${e.fragment}`}const ie=ne.request({...e.headers,[y.constants.HTTP2_HEADER_PATH]:oe,[y.constants.HTTP2_HEADER_METHOD]:D});ne.ref();ie.on("response",(e=>{const t=new o.HttpResponse({statusCode:e[":status"]||-1,headers:getTransformedHeaders(e),body:ie});C=true;resolve({response:t});if(d){ne.close();this.connectionManager.deleteSession(te,ne)}}));if(p){ie.setTimeout(p,(()=>{ie.close();const e=new Error(`Stream timed out because of no activity for ${p} ms`);e.name="TimeoutError";rejectWithDestroy(e)}))}if(t){const onAbort=()=>{ie.close();const e=new Error("Request aborted");e.name="AbortError";rejectWithDestroy(e)};if(typeof t.addEventListener==="function"){const e=t;e.addEventListener("abort",onAbort,{once:true});ie.once("close",(()=>e.removeEventListener("abort",onAbort)))}else{t.onabort=onAbort}}ie.on("frameError",((e,t,n)=>{rejectWithDestroy(new Error(`Frame type id ${e} in stream id ${n} has failed with code ${t}.`))}));ie.on("error",rejectWithDestroy);ie.on("aborted",(()=>{rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${ie.rstCode}.`))}));ie.on("close",(()=>{ne.unref();if(d){ne.destroy()}if(!C){rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"))}}));Q=writeRequestBody(ie,e,p)}))}updateHttpClientConfig(e,t){this.config=undefined;this.configProvider=this.configProvider.then((n=>({...n,[e]:t})))}httpHandlerConfigs(){return this.config??{}}destroySession(e){if(!e.destroyed){e.destroy()}}}class Collector extends p.Writable{bufferedBytes=[];_write(e,t,n){this.bufferedBytes.push(e);n()}}const streamCollector=e=>{if(isReadableStreamInstance(e)){return collectReadableStream(e)}return new Promise(((t,n)=>{const o=new Collector;e.pipe(o);e.on("error",(e=>{o.end();n(e)}));o.on("error",n);o.on("finish",(function(){const e=new Uint8Array(Buffer.concat(this.bufferedBytes));t(e)}))}))};const isReadableStreamInstance=e=>typeof ReadableStream==="function"&&e instanceof ReadableStream;async function collectReadableStream(e){const t=[];const n=e.getReader();let o=false;let i=0;while(!o){const{done:e,value:c}=await n.read();if(c){t.push(c);i+=c.length}o=e}const c=new Uint8Array(i);let d=0;for(const e of t){c.set(e,d);d+=e.length}return c}t.DEFAULT_REQUEST_TIMEOUT=V;t.NodeHttp2Handler=NodeHttp2Handler;t.NodeHttpHandler=NodeHttpHandler;t.streamCollector=streamCollector},8857:(e,t)=>{class ProviderError extends Error{name="ProviderError";tryNextLink;constructor(e,t=true){let n;let o=true;if(typeof t==="boolean"){n=undefined;o=t}else if(t!=null&&typeof t==="object"){n=t.logger;o=t.tryNextLink??true}super(e);this.tryNextLink=o;Object.setPrototypeOf(this,ProviderError.prototype);n?.debug?.(`@smithy/property-provider ${o?"->":"(!)"} ${e}`)}static from(e,t=true){return Object.assign(new this(e.message,t),e)}}class CredentialsProviderError extends ProviderError{name="CredentialsProviderError";constructor(e,t=true){super(e,t);Object.setPrototypeOf(this,CredentialsProviderError.prototype)}}class TokenProviderError extends ProviderError{name="TokenProviderError";constructor(e,t=true){super(e,t);Object.setPrototypeOf(this,TokenProviderError.prototype)}}const chain=(...e)=>async()=>{if(e.length===0){throw new ProviderError("No providers in chain")}let t;for(const n of e){try{const e=await n();return e}catch(e){t=e;if(e?.tryNextLink){continue}throw e}}throw t};const fromStatic=e=>()=>Promise.resolve(e);const memoize=(e,t,n)=>{let o;let i;let c;let d=false;const coalesceProvider=async()=>{if(!i){i=e()}try{o=await i;c=true;d=false}finally{i=undefined}return o};if(t===undefined){return async e=>{if(!c||e?.forceRefresh){o=await coalesceProvider()}return o}}return async e=>{if(!c||e?.forceRefresh){o=await coalesceProvider()}if(d){return o}if(n&&!n(o)){d=true;return o}if(t(o)){await coalesceProvider();return o}return o}};t.CredentialsProviderError=CredentialsProviderError;t.ProviderError=ProviderError;t.TokenProviderError=TokenProviderError;t.chain=chain;t.fromStatic=fromStatic;t.memoize=memoize},2356:(e,t,n)=>{var o=n(690);const getHttpHandlerExtensionConfiguration=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}});const resolveHttpHandlerRuntimeConfig=e=>({httpHandler:e.httpHandler()});class Field{name;kind;values;constructor({name:e,kind:t=o.FieldPosition.HEADER,values:n=[]}){this.name=e;this.kind=t;this.values=n}add(e){this.values.push(e)}set(e){this.values=e}remove(e){this.values=this.values.filter((t=>t!==e))}toString(){return this.values.map((e=>e.includes(",")||e.includes(" ")?`"${e}"`:e)).join(", ")}get(){return this.values}}class Fields{entries={};encoding;constructor({fields:e=[],encoding:t="utf-8"}){e.forEach(this.setField.bind(this));this.encoding=t}setField(e){this.entries[e.name.toLowerCase()]=e}getField(e){return this.entries[e.toLowerCase()]}removeField(e){delete this.entries[e.toLowerCase()]}getByType(e){return Object.values(this.entries).filter((t=>t.kind===e))}}class HttpRequest{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET";this.hostname=e.hostname||"localhost";this.port=e.port;this.query=e.query||{};this.headers=e.headers||{};this.body=e.body;this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:";this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/";this.username=e.username;this.password=e.password;this.fragment=e.fragment}static clone(e){const t=new HttpRequest({...e,headers:{...e.headers}});if(t.query){t.query=cloneQuery(t.query)}return t}static isInstance(e){if(!e){return false}const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t["query"]==="object"&&typeof t["headers"]==="object"}clone(){return HttpRequest.clone(this)}}function cloneQuery(e){return Object.keys(e).reduce(((t,n)=>{const o=e[n];return{...t,[n]:Array.isArray(o)?[...o]:o}}),{})}class HttpResponse{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode;this.reason=e.reason;this.headers=e.headers||{};this.body=e.body}static isInstance(e){if(!e)return false;const t=e;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}function isValidHostname(e){const t=/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;return t.test(e)}t.Field=Field;t.Fields=Fields;t.HttpRequest=HttpRequest;t.HttpResponse=HttpResponse;t.getHttpHandlerExtensionConfiguration=getHttpHandlerExtensionConfiguration;t.isValidHostname=isValidHostname;t.resolveHttpHandlerRuntimeConfig=resolveHttpHandlerRuntimeConfig},8256:(e,t,n)=>{var o=n(146);function buildQueryString(e){const t=[];for(let n of Object.keys(e).sort()){const i=e[n];n=o.escapeUri(n);if(Array.isArray(i)){for(let e=0,c=i.length;e{function parseQueryString(e){const t={};e=e.replace(/^\?/,"");if(e){for(const n of e.split("&")){let[e,o=null]=n.split("=");e=decodeURIComponent(e);if(o){o=decodeURIComponent(o)}if(!(e in t)){t[e]=o}else if(Array.isArray(t[e])){t[e].push(o)}else{t[e]=[t[e],o]}}}return t}t.parseQueryString=parseQueryString},2058:(e,t)=>{const n=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"];const o=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"];const i=["TimeoutError","RequestTimeout","RequestTimeoutException"];const c=[500,502,503,504];const d=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];const p=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"];const isRetryableByTrait=e=>e?.$retryable!==undefined;const isClockSkewError=e=>n.includes(e.name);const isClockSkewCorrectedError=e=>e.$metadata?.clockSkewCorrected;const isBrowserNetworkError=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);const n=e&&e instanceof TypeError;if(!n){return false}return t.has(e.message)};const isThrottlingError=e=>e.$metadata?.httpStatusCode===429||o.includes(e.name)||e.$retryable?.throttling==true;const isTransientError=(e,t=0)=>isRetryableByTrait(e)||isClockSkewCorrectedError(e)||i.includes(e.name)||d.includes(e?.code||"")||p.includes(e?.code||"")||c.includes(e.$metadata?.httpStatusCode||0)||isBrowserNetworkError(e)||e.cause!==undefined&&t<=10&&isTransientError(e.cause,t+1);const isServerError=e=>{if(e.$metadata?.httpStatusCode!==undefined){const t=e.$metadata.httpStatusCode;if(500<=t&&t<=599&&!isTransientError(e)){return true}return false}return false};t.isBrowserNetworkError=isBrowserNetworkError;t.isClockSkewCorrectedError=isClockSkewCorrectedError;t.isClockSkewError=isClockSkewError;t.isRetryableByTrait=isRetryableByTrait;t.isServerError=isServerError;t.isThrottlingError=isThrottlingError;t.isTransientError=isTransientError},1791:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getHomeDir=void 0;const o=n(857);const i=n(6928);const c={};const getHomeDirCacheKey=()=>{if(process&&process.geteuid){return`${process.geteuid()}`}return"DEFAULT"};const getHomeDir=()=>{const{HOME:e,USERPROFILE:t,HOMEPATH:n,HOMEDRIVE:d=`C:${i.sep}`}=process.env;if(e)return e;if(t)return t;if(n)return`${d}${n}`;const p=getHomeDirCacheKey();if(!c[p])c[p]=(0,o.homedir)();return c[p]};t.getHomeDir=getHomeDir},269:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSSOTokenFilepath=void 0;const o=n(6982);const i=n(6928);const c=n(1791);const getSSOTokenFilepath=e=>{const t=(0,o.createHash)("sha1");const n=t.update(e).digest("hex");return(0,i.join)((0,c.getHomeDir)(),".aws","sso","cache",`${n}.json`)};t.getSSOTokenFilepath=getSSOTokenFilepath},1326:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSSOTokenFromFile=t.tokenIntercept=void 0;const o=n(1943);const i=n(269);t.tokenIntercept={};const getSSOTokenFromFile=async e=>{if(t.tokenIntercept[e]){return t.tokenIntercept[e]}const n=(0,i.getSSOTokenFilepath)(e);const c=await(0,o.readFile)(n,"utf8");return JSON.parse(c)};t.getSSOTokenFromFile=getSSOTokenFromFile},4964:(e,t,n)=>{var o=n(1791);var i=n(269);var c=n(1326);var d=n(6928);var p=n(690);var y=n(6684);const C="AWS_PROFILE";const Q="default";const getProfileName=e=>e.profile||process.env[C]||Q;const v=".";const getConfigData=e=>Object.entries(e).filter((([e])=>{const t=e.indexOf(v);if(t===-1){return false}return Object.values(p.IniSectionType).includes(e.substring(0,t))})).reduce(((e,[t,n])=>{const o=t.indexOf(v);const i=t.substring(0,o)===p.IniSectionType.PROFILE?t.substring(o+1):t;e[i]=n;return e}),{...e.default&&{default:e.default}});const D="AWS_CONFIG_FILE";const getConfigFilepath=()=>process.env[D]||d.join(o.getHomeDir(),".aws","config");const k="AWS_SHARED_CREDENTIALS_FILE";const getCredentialsFilepath=()=>process.env[k]||d.join(o.getHomeDir(),".aws","credentials");const $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;const V=["__proto__","profile __proto__"];const parseIni=e=>{const t={};let n;let o;for(const i of e.split(/\r?\n/)){const e=i.split(/(^|\s)[;#]/)[0].trim();const c=e[0]==="["&&e[e.length-1]==="]";if(c){n=undefined;o=undefined;const t=e.substring(1,e.length-1);const i=$.exec(t);if(i){const[,e,,t]=i;if(Object.values(p.IniSectionType).includes(e)){n=[e,t].join(v)}}else{n=t}if(V.includes(t)){throw new Error(`Found invalid profile name "${t}"`)}}else if(n){const c=e.indexOf("=");if(![0,-1].includes(c)){const[d,p]=[e.substring(0,c).trim(),e.substring(c+1).trim()];if(p===""){o=d}else{if(o&&i.trimStart()===i){o=undefined}t[n]=t[n]||{};const e=o?[o,d].join(v):d;t[n][e]=p}}}}return t};const swallowError$1=()=>({});const loadSharedConfigFiles=async(e={})=>{const{filepath:t=getCredentialsFilepath(),configFilepath:n=getConfigFilepath()}=e;const i=o.getHomeDir();const c="~/";let p=t;if(t.startsWith(c)){p=d.join(i,t.slice(2))}let C=n;if(n.startsWith(c)){C=d.join(i,n.slice(2))}const Q=await Promise.all([y.readFile(C,{ignoreCache:e.ignoreCache}).then(parseIni).then(getConfigData).catch(swallowError$1),y.readFile(p,{ignoreCache:e.ignoreCache}).then(parseIni).catch(swallowError$1)]);return{configFile:Q[0],credentialsFile:Q[1]}};const getSsoSessionData=e=>Object.entries(e).filter((([e])=>e.startsWith(p.IniSectionType.SSO_SESSION+v))).reduce(((e,[t,n])=>({...e,[t.substring(t.indexOf(v)+1)]:n})),{});const swallowError=()=>({});const loadSsoSessionData=async(e={})=>y.readFile(e.configFilepath??getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError);const mergeConfigFiles=(...e)=>{const t={};for(const n of e){for(const[e,o]of Object.entries(n)){if(t[e]!==undefined){Object.assign(t[e],o)}else{t[e]=o}}}return t};const parseKnownFiles=async e=>{const t=await loadSharedConfigFiles(e);return mergeConfigFiles(t.configFile,t.credentialsFile)};const ee={getFileRecord(){return y.fileIntercept},interceptFile(e,t){y.fileIntercept[e]=Promise.resolve(t)},getTokenRecord(){return c.tokenIntercept},interceptToken(e,t){c.tokenIntercept[e]=t}};t.getSSOTokenFromFile=c.getSSOTokenFromFile;t.readFile=y.readFile;t.CONFIG_PREFIX_SEPARATOR=v;t.DEFAULT_PROFILE=Q;t.ENV_PROFILE=C;t.externalDataInterceptor=ee;t.getProfileName=getProfileName;t.loadSharedConfigFiles=loadSharedConfigFiles;t.loadSsoSessionData=loadSsoSessionData;t.parseKnownFiles=parseKnownFiles;Object.prototype.hasOwnProperty.call(o,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:o["__proto__"]});Object.keys(o).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=o[e]}));Object.prototype.hasOwnProperty.call(i,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:i["__proto__"]});Object.keys(i).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=i[e]}))},6684:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.readFile=t.fileIntercept=t.filePromises=void 0;const o=n(1455);t.filePromises={};t.fileIntercept={};const readFile=(e,n)=>{if(t.fileIntercept[e]!==undefined){return t.fileIntercept[e]}if(!t.filePromises[e]||n?.ignoreCache){t.filePromises[e]=(0,o.readFile)(e,"utf8")}return t.filePromises[e]};t.readFile=readFile},5118:(e,t,n)=>{var o=n(6435);var i=n(1577);var c=n(6130);var d=n(2356);var p=n(6324);var y=n(146);const C="X-Amz-Algorithm";const Q="X-Amz-Credential";const v="X-Amz-Date";const D="X-Amz-SignedHeaders";const k="X-Amz-Expires";const $="X-Amz-Signature";const V="X-Amz-Security-Token";const ee="X-Amz-Region-Set";const te="authorization";const re=v.toLowerCase();const ne="date";const se=[te,re,ne];const oe=$.toLowerCase();const ie="x-amz-content-sha256";const ae=V.toLowerCase();const ce="host";const le={authorization:true,"cache-control":true,connection:true,expect:true,from:true,"keep-alive":true,"max-forwards":true,pragma:true,referer:true,te:true,trailer:true,"transfer-encoding":true,upgrade:true,"user-agent":true,"x-amzn-trace-id":true};const ue=/^proxy-/;const de=/^sec-/;const pe=[/^proxy-/i,/^sec-/i];const Ae="AWS4-HMAC-SHA256";const me="AWS4-ECDSA-P256-SHA256";const ge="AWS4-HMAC-SHA256-PAYLOAD";const fe="UNSIGNED-PAYLOAD";const he=50;const ye="aws4_request";const Ee=60*60*24*7;const Ce={};const Ie=[];const createScope=(e,t,n)=>`${e}/${t}/${n}/${ye}`;const getSigningKey=async(e,t,n,i,c)=>{const d=await hmac(e,t.secretAccessKey,t.accessKeyId);const p=`${n}:${i}:${c}:${o.toHex(d)}:${t.sessionToken}`;if(p in Ce){return Ce[p]}Ie.push(p);while(Ie.length>he){delete Ce[Ie.shift()]}let y=`AWS4${t.secretAccessKey}`;for(const t of[n,i,c,ye]){y=await hmac(e,y,t)}return Ce[p]=y};const clearCredentialCache=()=>{Ie.length=0;Object.keys(Ce).forEach((e=>{delete Ce[e]}))};const hmac=(e,t,n)=>{const o=new e(t);o.update(i.toUint8Array(n));return o.digest()};const getCanonicalHeaders=({headers:e},t,n)=>{const o={};for(const i of Object.keys(e).sort()){if(e[i]==undefined){continue}const c=i.toLowerCase();if(c in le||t?.has(c)||ue.test(c)||de.test(c)){if(!n||n&&!n.has(c)){continue}}o[c]=e[i].trim().replace(/\s+/g," ")}return o};const getPayloadHash=async({headers:e,body:t},n)=>{for(const t of Object.keys(e)){if(t.toLowerCase()===ie){return e[t]}}if(t==undefined){return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}else if(typeof t==="string"||ArrayBuffer.isView(t)||c.isArrayBuffer(t)){const e=new n;e.update(i.toUint8Array(t));return o.toHex(await e.digest())}return fe};class HeaderFormatter{format(e){const t=[];for(const n of Object.keys(e)){const o=i.fromUtf8(n);t.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let o=0;for(const e of t){n.set(e,o);o+=e.byteLength}return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));t.setUint8(0,3);t.setInt16(1,e.value,false);return new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));n.setUint8(0,4);n.setInt32(1,e.value,false);return new Uint8Array(n.buffer);case"long":const c=new Uint8Array(9);c[0]=5;c.set(e.value.bytes,1);return c;case"binary":const d=new DataView(new ArrayBuffer(3+e.value.byteLength));d.setUint8(0,6);d.setUint16(1,e.value.byteLength,false);const p=new Uint8Array(d.buffer);p.set(e.value,3);return p;case"string":const y=i.fromUtf8(e.value);const C=new DataView(new ArrayBuffer(3+y.byteLength));C.setUint8(0,7);C.setUint16(1,y.byteLength,false);const Q=new Uint8Array(C.buffer);Q.set(y,3);return Q;case"timestamp":const v=new Uint8Array(9);v[0]=8;v.set(Int64.fromNumber(e.value.valueOf()).bytes,1);return v;case"uuid":if(!be.test(e.value)){throw new Error(`Invalid UUID received: ${e.value}`)}const D=new Uint8Array(17);D[0]=9;D.set(o.fromHex(e.value.replace(/\-/g,"")),1);return D}}}const be=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Int64{bytes;constructor(e){this.bytes=e;if(e.byteLength!==8){throw new Error("Int64 buffers must be exactly 8 bytes")}}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000){throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`)}const t=new Uint8Array(8);for(let n=7,o=Math.abs(Math.round(e));n>-1&&o>0;n--,o/=256){t[n]=o}if(e<0){negate(t)}return new Int64(t)}valueOf(){const e=this.bytes.slice(0);const t=e[0]&128;if(t){negate(e)}return parseInt(o.toHex(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function negate(e){for(let t=0;t<8;t++){e[t]^=255}for(let t=7;t>-1;t--){e[t]++;if(e[t]!==0)break}}const hasHeader=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t)){if(e===n.toLowerCase()){return true}}return false};const moveHeadersToQuery=(e,t={})=>{const{headers:n,query:o={}}=d.HttpRequest.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();if(i.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i)){o[e]=n[e];delete n[e]}}return{...e,headers:n,query:o}};const prepareRequest=e=>{e=d.HttpRequest.clone(e);for(const t of Object.keys(e.headers)){if(se.indexOf(t.toLowerCase())>-1){delete e.headers[t]}}return e};const getCanonicalQuery=({query:e={}})=>{const t=[];const n={};for(const o of Object.keys(e)){if(o.toLowerCase()===oe){continue}const i=y.escapeUri(o);t.push(i);const c=e[o];if(typeof c==="string"){n[i]=`${i}=${y.escapeUri(c)}`}else if(Array.isArray(c)){n[i]=c.slice(0).reduce(((e,t)=>e.concat([`${i}=${y.escapeUri(t)}`])),[]).sort().join("&")}}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")};const iso8601=e=>toDate(e).toISOString().replace(/\.\d{3}Z$/,"Z");const toDate=e=>{if(typeof e==="number"){return new Date(e*1e3)}if(typeof e==="string"){if(Number(e)){return new Date(Number(e)*1e3)}return new Date(e)}return e};class SignatureV4Base{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:t,region:n,service:o,sha256:i,uriEscapePath:c=true}){this.service=o;this.sha256=i;this.uriEscapePath=c;this.applyChecksum=typeof e==="boolean"?e:true;this.regionProvider=p.normalizeProvider(n);this.credentialProvider=p.normalizeProvider(t)}createCanonicalRequest(e,t,n){const o=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${getCanonicalQuery(e)}\n${o.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${o.join(";")}\n${n}`}async createStringToSign(e,t,n,c){const d=new this.sha256;d.update(i.toUint8Array(n));const p=await d.digest();return`${c}\n${e}\n${t}\n${o.toHex(p)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/")){if(n?.length===0)continue;if(n===".")continue;if(n===".."){t.pop()}else{t.push(n)}}const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;const o=y.escapeUri(n);return o.replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!=="object"||typeof e.accessKeyId!=="string"||typeof e.secretAccessKey!=="string"){throw new Error("Resolved credential object is not valid")}}formatDate(e){const t=iso8601(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class SignatureV4 extends SignatureV4Base{headerFormatter=new HeaderFormatter;constructor({applyChecksum:e,credentials:t,region:n,service:o,sha256:i,uriEscapePath:c=true}){super({applyChecksum:e,credentials:t,region:n,service:o,sha256:i,uriEscapePath:c})}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:o=3600,unsignableHeaders:i,unhoistableHeaders:c,signableHeaders:d,hoistableHeaders:p,signingRegion:y,signingService:ee}=t;const te=await this.credentialProvider();this.validateResolvedCredentials(te);const re=y??await this.regionProvider();const{longDate:ne,shortDate:se}=this.formatDate(n);if(o>Ee){return Promise.reject("Signature version 4 presigned URLs"+" must have an expiration date less than one week in"+" the future")}const oe=createScope(se,re,ee??this.service);const ie=moveHeadersToQuery(prepareRequest(e),{unhoistableHeaders:c,hoistableHeaders:p});if(te.sessionToken){ie.query[V]=te.sessionToken}ie.query[C]=Ae;ie.query[Q]=`${te.accessKeyId}/${oe}`;ie.query[v]=ne;ie.query[k]=o.toString(10);const ae=getCanonicalHeaders(ie,i,d);ie.query[D]=this.getCanonicalHeaderList(ae);ie.query[$]=await this.getSignature(ne,oe,this.getSigningKey(te,re,se,ee),this.createCanonicalRequest(ie,ae,await getPayloadHash(e,this.sha256)));return ie}async sign(e,t){if(typeof e==="string"){return this.signString(e,t)}else if(e.headers&&e.payload){return this.signEvent(e,t)}else if(e.message){return this.signMessage(e,t)}else{return this.signRequest(e,t)}}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:i,signingRegion:c,signingService:d}){const p=c??await this.regionProvider();const{shortDate:y,longDate:C}=this.formatDate(n);const Q=createScope(y,p,d??this.service);const v=await getPayloadHash({headers:{},body:t},this.sha256);const D=new this.sha256;D.update(e);const k=o.toHex(await D.digest());const $=[ge,C,Q,i,k,v].join("\n");return this.signString($,{signingDate:n,signingRegion:p,signingService:d})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:o}){const i=this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:o,priorSignature:e.priorSignature});return i.then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:c}={}){const d=await this.credentialProvider();this.validateResolvedCredentials(d);const p=n??await this.regionProvider();const{shortDate:y}=this.formatDate(t);const C=new this.sha256(await this.getSigningKey(d,p,y,c));C.update(i.toUint8Array(e));return o.toHex(await C.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:o,signingRegion:i,signingService:c}={}){const d=await this.credentialProvider();this.validateResolvedCredentials(d);const p=i??await this.regionProvider();const y=prepareRequest(e);const{longDate:C,shortDate:Q}=this.formatDate(t);const v=createScope(Q,p,c??this.service);y.headers[re]=C;if(d.sessionToken){y.headers[ae]=d.sessionToken}const D=await getPayloadHash(y,this.sha256);if(!hasHeader(ie,y.headers)&&this.applyChecksum){y.headers[ie]=D}const k=getCanonicalHeaders(y,o,n);const $=await this.getSignature(C,v,this.getSigningKey(d,p,Q,c),this.createCanonicalRequest(y,k,D));y.headers[te]=`${Ae} `+`Credential=${d.accessKeyId}/${v}, `+`SignedHeaders=${this.getCanonicalHeaderList(k)}, `+`Signature=${$}`;return y}async getSignature(e,t,n,c){const d=await this.createStringToSign(e,t,c,Ae);const p=new this.sha256(await n);p.update(i.toUint8Array(d));return o.toHex(await p.digest())}getSigningKey(e,t,n,o){return getSigningKey(this.sha256,e,n,t,o||this.service)}}const Se={SignatureV4a:null};t.ALGORITHM_IDENTIFIER=Ae;t.ALGORITHM_IDENTIFIER_V4A=me;t.ALGORITHM_QUERY_PARAM=C;t.ALWAYS_UNSIGNABLE_HEADERS=le;t.AMZ_DATE_HEADER=re;t.AMZ_DATE_QUERY_PARAM=v;t.AUTH_HEADER=te;t.CREDENTIAL_QUERY_PARAM=Q;t.DATE_HEADER=ne;t.EVENT_ALGORITHM_IDENTIFIER=ge;t.EXPIRES_QUERY_PARAM=k;t.GENERATED_HEADERS=se;t.HOST_HEADER=ce;t.KEY_TYPE_IDENTIFIER=ye;t.MAX_CACHE_SIZE=he;t.MAX_PRESIGNED_TTL=Ee;t.PROXY_HEADER_PATTERN=ue;t.REGION_SET_PARAM=ee;t.SEC_HEADER_PATTERN=de;t.SHA256_HEADER=ie;t.SIGNATURE_HEADER=oe;t.SIGNATURE_QUERY_PARAM=$;t.SIGNED_HEADERS_QUERY_PARAM=D;t.SignatureV4=SignatureV4;t.SignatureV4Base=SignatureV4Base;t.TOKEN_HEADER=ae;t.TOKEN_QUERY_PARAM=V;t.UNSIGNABLE_PATTERNS=pe;t.UNSIGNED_PAYLOAD=fe;t.clearCredentialCache=clearCredentialCache;t.createScope=createScope;t.getCanonicalHeaders=getCanonicalHeaders;t.getCanonicalQuery=getCanonicalQuery;t.getPayloadHash=getPayloadHash;t.getSigningKey=getSigningKey;t.hasHeader=hasHeader;t.moveHeadersToQuery=moveHeadersToQuery;t.prepareRequest=prepareRequest;t.signatureV4aContainer=Se},1411:(e,t,n)=>{var o=n(9208);var i=n(3422);var c=n(690);var d=n(6890);var p=n(2430);class Client{config;middlewareStack=o.constructStack();initConfig;handlers;constructor(e){this.config=e;const{protocol:t,protocolSettings:n}=e;if(n){if(typeof t==="function"){e.protocol=new t(n)}}}send(e,t,n){const o=typeof t!=="function"?t:undefined;const i=typeof t==="function"?t:n;const c=o===undefined&&this.config.cacheMiddleware===true;let d;if(c){if(!this.handlers){this.handlers=new WeakMap}const t=this.handlers;if(t.has(e.constructor)){d=t.get(e.constructor)}else{d=e.resolveMiddleware(this.middlewareStack,this.config,o);t.set(e.constructor,d)}}else{delete this.handlers;d=e.resolveMiddleware(this.middlewareStack,this.config,o)}if(i){d(e).then((e=>i(null,e.output)),(e=>i(e))).catch((()=>{}))}else{return d(e).then((e=>e.output))}}destroy(){this.config?.requestHandler?.destroy?.();delete this.handlers}}const y="***SensitiveInformation***";function schemaLogFilter(e,t){if(t==null){return t}const n=d.NormalizedSchema.of(e);if(n.getMergedTraits().sensitive){return y}if(n.isListSchema()){const e=!!n.getValueSchema().getMergedTraits().sensitive;if(e){return y}}else if(n.isMapSchema()){const e=!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive;if(e){return y}}else if(n.isStructSchema()&&typeof t==="object"){const e=t;const o={};for(const[t,i]of n.structIterator()){if(e[t]!=null){o[t]=schemaLogFilter(i,e[t])}}return o}return t}class Command{middlewareStack=o.constructStack();schema;static classBuilder(){return new ClassBuilder}resolveMiddlewareWithContext(e,t,n,{middlewareFn:o,clientName:i,commandName:d,inputFilterSensitiveLog:p,outputFilterSensitiveLog:y,smithyContext:C,additionalContext:Q,CommandCtor:v}){for(const i of o.bind(this)(v,e,t,n)){this.middlewareStack.use(i)}const D=e.concat(this.middlewareStack);const{logger:k}=t;const $={logger:k,clientName:i,commandName:d,inputFilterSensitiveLog:p,outputFilterSensitiveLog:y,[c.SMITHY_CONTEXT_KEY]:{commandInstance:this,...C},...Q};const{requestHandler:V}=t;return D.resolve((e=>V.handle(e.request,n||{})),$)}}class ClassBuilder{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=undefined;_outputFilterSensitiveLog=undefined;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){this._ep=e;return this}m(e){this._middlewareFn=e;return this}s(e,t,n={}){this._smithyContext={service:e,operation:t,...n};return this}c(e={}){this._additionalContext=e;return this}n(e,t){this._clientName=e;this._commandName=t;return this}f(e=e=>e,t=e=>e){this._inputFilterSensitiveLog=e;this._outputFilterSensitiveLog=t;return this}ser(e){this._serializer=e;return this}de(e){this._deserializer=e;return this}sc(e){this._operationSchema=e;this._smithyContext.operationSchema=e;return this}build(){const e=this;let t;return t=class extends Command{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super();this.input=t??{};e._init(this);this.schema=e._operationSchema}resolveMiddleware(n,o,i){const c=e._operationSchema;const d=c?.[4]??c?.input;const p=c?.[5]??c?.output;return this.resolveMiddlewareWithContext(n,o,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(c?schemaLogFilter.bind(null,d):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(c?schemaLogFilter.bind(null,p):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}const C="***SensitiveInformation***";const createAggregatedClient=(e,t,n)=>{for(const[n,o]of Object.entries(e)){const methodImpl=async function(e,t,n){const i=new o(e);if(typeof t==="function"){this.send(i,t)}else if(typeof n==="function"){if(typeof t!=="object")throw new Error(`Expected http options but got ${typeof t}`);this.send(i,t||{},n)}else{return this.send(i,t)}};const e=(n[0].toLowerCase()+n.slice(1)).replace(/Command$/,"");t.prototype[e]=methodImpl}const{paginators:o={},waiters:i={}}=n??{};for(const[e,n]of Object.entries(o)){if(t.prototype[e]===void 0){t.prototype[e]=function(e={},t,...o){return n({...t,client:this},e,...o)}}}for(const[e,n]of Object.entries(i)){if(t.prototype[e]===void 0){t.prototype[e]=async function(e={},t,...o){let i=t;if(typeof t==="number"){i={maxWaitTime:t}}return n({...i,client:this},e,...o)}}}};class ServiceException extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype);this.name=e.name;this.$fault=e.$fault;this.$metadata=e.$metadata}static isInstance(e){if(!e)return false;const t=e;return ServiceException.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&(t.$fault==="client"||t.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return false;const t=e;if(this===ServiceException){return ServiceException.isInstance(e)}if(ServiceException.isInstance(e)){if(t.name&&this.name){return this.prototype.isPrototypeOf(e)||t.name===this.name}return this.prototype.isPrototypeOf(e)}return false}}const decorateServiceException=(e,t={})=>{Object.entries(t).filter((([,e])=>e!==undefined)).forEach((([t,n])=>{if(e[t]==undefined||e[t]===""){e[t]=n}}));const n=e.message||e.Message||"UnknownError";e.message=n;delete e.Message;return e};const throwDefaultError=({output:e,parsedBody:t,exceptionCtor:n,errorCode:o})=>{const i=deserializeMetadata(e);const c=i.httpStatusCode?i.httpStatusCode+"":undefined;const d=new n({name:t?.code||t?.Code||o||c||"UnknownError",$fault:"client",$metadata:i});throw decorateServiceException(d,t)};const withBaseException=e=>({output:t,parsedBody:n,errorCode:o})=>{throwDefaultError({output:t,parsedBody:n,exceptionCtor:e,errorCode:o})};const deserializeMetadata=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});const loadConfigsForDefaultMode=e=>{switch(e){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:3e4};default:return{}}};let Q=false;const emitWarningIfUnsupportedVersion=e=>{if(e&&!Q&&parseInt(e.substring(1,e.indexOf(".")))<16){Q=true}};const v=Object.values(c.AlgorithmId);const getChecksumConfiguration=e=>{const t=[];for(const n in c.AlgorithmId){const o=c.AlgorithmId[n];if(e[o]===undefined){continue}t.push({algorithmId:()=>o,checksumConstructor:()=>e[o]})}for(const[n,o]of Object.entries(e.checksumAlgorithms??{})){t.push({algorithmId:()=>n,checksumConstructor:()=>o})}return{addChecksumAlgorithm(n){e.checksumAlgorithms=e.checksumAlgorithms??{};const o=n.algorithmId();const i=n.checksumConstructor();if(v.includes(o)){e.checksumAlgorithms[o.toUpperCase()]=i}else{e.checksumAlgorithms[o]=i}t.push(n)},checksumAlgorithms(){return t}}};const resolveChecksumRuntimeConfig=e=>{const t={};e.checksumAlgorithms().forEach((e=>{const n=e.algorithmId();if(v.includes(n)){t[n]=e.checksumConstructor()}}));return t};const getRetryConfiguration=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}});const resolveRetryRuntimeConfig=e=>{const t={};t.retryStrategy=e.retryStrategy();return t};const getDefaultExtensionConfiguration=e=>Object.assign(getChecksumConfiguration(e),getRetryConfiguration(e));const D=getDefaultExtensionConfiguration;const resolveDefaultRuntimeConfig=e=>Object.assign(resolveChecksumRuntimeConfig(e),resolveRetryRuntimeConfig(e));const getArrayIfSingleItem=e=>Array.isArray(e)?e:[e];const getValueFromTextNode=e=>{const t="#text";for(const n in e){if(e.hasOwnProperty(n)&&e[n][t]!==undefined){e[n]=e[n][t]}else if(typeof e[n]==="object"&&e[n]!==null){e[n]=getValueFromTextNode(e[n])}}return e};const isSerializableHeaderValue=e=>e!=null;class NoOpLogger{trace(){}debug(){}info(){}warn(){}error(){}}function map(e,t,n){let o;let i;let c;if(typeof t==="undefined"&&typeof n==="undefined"){o={};c=e}else{o=e;if(typeof t==="function"){i=t;c=n;return mapWithFilter(o,i,c)}else{c=t}}for(const e of Object.keys(c)){if(!Array.isArray(c[e])){o[e]=c[e];continue}applyInstruction(o,null,c,e)}return o}const convertMap=e=>{const t={};for(const[n,o]of Object.entries(e||{})){t[n]=[,o]}return t};const take=(e,t)=>{const n={};for(const o in t){applyInstruction(n,e,t,o)}return n};const mapWithFilter=(e,t,n)=>map(e,Object.entries(n).reduce(((e,[n,o])=>{if(Array.isArray(o)){e[n]=o}else{if(typeof o==="function"){e[n]=[t,o()]}else{e[n]=[t,o]}}return e}),{}));const applyInstruction=(e,t,n,o)=>{if(t!==null){let i=n[o];if(typeof i==="function"){i=[,i]}const[c=nonNullish,d=pass,p=o]=i;if(typeof c==="function"&&c(t[p])||typeof c!=="function"&&!!c){e[o]=d(t[p])}return}let[i,c]=n[o];if(typeof c==="function"){let t;const n=i===undefined&&(t=c())!=null;const d=typeof i==="function"&&!!i(void 0)||typeof i!=="function"&&!!i;if(n){e[o]=t}else if(d){e[o]=c()}}else{const t=i===undefined&&c!=null;const n=typeof i==="function"&&!!i(c)||typeof i!=="function"&&!!i;if(t||n){e[o]=c}}};const nonNullish=e=>e!=null;const pass=e=>e;const serializeFloat=e=>{if(e!==e){return"NaN"}switch(e){case Infinity:return"Infinity";case-Infinity:return"-Infinity";default:return e}};const serializeDateTime=e=>e.toISOString().replace(".000Z","Z");const _json=e=>{if(e==null){return{}}if(Array.isArray(e)){return e.filter((e=>e!=null)).map(_json)}if(typeof e==="object"){const t={};for(const n of Object.keys(e)){if(e[n]==null){continue}t[n]=_json(e[n])}return t}return e};t.collectBody=i.collectBody;t.extendedEncodeURIComponent=i.extendedEncodeURIComponent;t.resolvedPath=i.resolvedPath;t.Client=Client;t.Command=Command;t.NoOpLogger=NoOpLogger;t.SENSITIVE_STRING=C;t.ServiceException=ServiceException;t._json=_json;t.convertMap=convertMap;t.createAggregatedClient=createAggregatedClient;t.decorateServiceException=decorateServiceException;t.emitWarningIfUnsupportedVersion=emitWarningIfUnsupportedVersion;t.getArrayIfSingleItem=getArrayIfSingleItem;t.getDefaultClientConfiguration=D;t.getDefaultExtensionConfiguration=getDefaultExtensionConfiguration;t.getValueFromTextNode=getValueFromTextNode;t.isSerializableHeaderValue=isSerializableHeaderValue;t.loadConfigsForDefaultMode=loadConfigsForDefaultMode;t.map=map;t.resolveDefaultRuntimeConfig=resolveDefaultRuntimeConfig;t.serializeDateTime=serializeDateTime;t.serializeFloat=serializeFloat;t.take=take;t.throwDefaultError=throwDefaultError;t.withBaseException=withBaseException;Object.prototype.hasOwnProperty.call(p,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:p["__proto__"]});Object.keys(p).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=p[e]}))},690:(e,t)=>{t.HttpAuthLocation=void 0;(function(e){e["HEADER"]="header";e["QUERY"]="query"})(t.HttpAuthLocation||(t.HttpAuthLocation={}));t.HttpApiKeyAuthLocation=void 0;(function(e){e["HEADER"]="header";e["QUERY"]="query"})(t.HttpApiKeyAuthLocation||(t.HttpApiKeyAuthLocation={}));t.EndpointURLScheme=void 0;(function(e){e["HTTP"]="http";e["HTTPS"]="https"})(t.EndpointURLScheme||(t.EndpointURLScheme={}));t.AlgorithmId=void 0;(function(e){e["MD5"]="md5";e["CRC32"]="crc32";e["CRC32C"]="crc32c";e["SHA1"]="sha1";e["SHA256"]="sha256"})(t.AlgorithmId||(t.AlgorithmId={}));const getChecksumConfiguration=e=>{const n=[];if(e.sha256!==undefined){n.push({algorithmId:()=>t.AlgorithmId.SHA256,checksumConstructor:()=>e.sha256})}if(e.md5!=undefined){n.push({algorithmId:()=>t.AlgorithmId.MD5,checksumConstructor:()=>e.md5})}return{addChecksumAlgorithm(e){n.push(e)},checksumAlgorithms(){return n}}};const resolveChecksumRuntimeConfig=e=>{const t={};e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()}));return t};const getDefaultClientConfiguration=e=>getChecksumConfiguration(e);const resolveDefaultRuntimeConfig=e=>resolveChecksumRuntimeConfig(e);t.FieldPosition=void 0;(function(e){e[e["HEADER"]=0]="HEADER";e[e["TRAILER"]=1]="TRAILER"})(t.FieldPosition||(t.FieldPosition={}));const n="__smithy_context";t.IniSectionType=void 0;(function(e){e["PROFILE"]="profile";e["SSO_SESSION"]="sso-session";e["SERVICES"]="services"})(t.IniSectionType||(t.IniSectionType={}));t.RequestHandlerProtocol=void 0;(function(e){e["HTTP_0_9"]="http/0.9";e["HTTP_1_0"]="http/1.0";e["TDS_8_0"]="tds/8.0"})(t.RequestHandlerProtocol||(t.RequestHandlerProtocol={}));t.SMITHY_CONTEXT_KEY=n;t.getDefaultClientConfiguration=getDefaultClientConfiguration;t.resolveDefaultRuntimeConfig=resolveDefaultRuntimeConfig},4494:(e,t,n)=>{var o=n(8822);const parseUrl=e=>{if(typeof e==="string"){return parseUrl(new URL(e))}const{hostname:t,pathname:n,port:i,protocol:c,search:d}=e;let p;if(d){p=o.parseQueryString(d)}return{hostname:t,port:i?parseInt(i):undefined,protocol:c,path:n,query:p}};t.parseUrl=parseUrl},2674:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.fromBase64=void 0;const o=n(4151);const i=/^[A-Za-z0-9+/]*={0,2}$/;const fromBase64=e=>{if(e.length*3%4!==0){throw new TypeError(`Incorrect padding on base64 string.`)}if(!i.exec(e)){throw new TypeError(`Invalid base64 string.`)}const t=(0,o.fromString)(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};t.fromBase64=fromBase64},8385:(e,t,n)=>{var o=n(2674);var i=n(4871);Object.prototype.hasOwnProperty.call(o,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:o["__proto__"]});Object.keys(o).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=o[e]}));Object.prototype.hasOwnProperty.call(i,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:i["__proto__"]});Object.keys(i).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=i[e]}))},4871:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.toBase64=void 0;const o=n(4151);const i=n(1577);const toBase64=e=>{let t;if(typeof e==="string"){t=(0,i.fromUtf8)(e)}else{t=e}if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number"){throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.")}return(0,o.fromArrayBuffer)(t.buffer,t.byteOffset,t.byteLength).toString("base64")};t.toBase64=toBase64},2098:(e,t)=>{const n=typeof TextEncoder=="function"?new TextEncoder:null;const calculateBodyLength=e=>{if(typeof e==="string"){if(n){return n.encode(e).byteLength}let t=e.length;for(let n=t-1;n>=0;n--){const o=e.charCodeAt(n);if(o>127&&o<=2047)t++;else if(o>2047&&o<=65535)t+=2;if(o>=56320&&o<=57343)n--}return t}else if(typeof e.byteLength==="number"){return e.byteLength}else if(typeof e.size==="number"){return e.size}throw new Error(`Body Length computation failed for ${e}`)};t.calculateBodyLength=calculateBodyLength},3638:(e,t,n)=>{var o=n(3024);const calculateBodyLength=e=>{if(!e){return 0}if(typeof e==="string"){return Buffer.byteLength(e)}else if(typeof e.byteLength==="number"){return e.byteLength}else if(typeof e.size==="number"){return e.size}else if(typeof e.start==="number"&&typeof e.end==="number"){return e.end+1-e.start}else if(e instanceof o.ReadStream){if(e.path!=null){return o.lstatSync(e.path).size}else if(typeof e.fd==="number"){return o.fstatSync(e.fd).size}}throw new Error(`Body Length computation failed for ${e}`)};t.calculateBodyLength=calculateBodyLength},4151:(e,t,n)=>{var o=n(6130);var i=n(181);const fromArrayBuffer=(e,t=0,n=e.byteLength-t)=>{if(!o.isArrayBuffer(e)){throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`)}return i.Buffer.from(e,t,n)};const fromString=(e,t)=>{if(typeof e!=="string"){throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`)}return t?i.Buffer.from(e,t):i.Buffer.from(e)};t.fromArrayBuffer=fromArrayBuffer;t.fromString=fromString},6716:(e,t)=>{const booleanSelector=(e,t,n)=>{if(!(t in e))return undefined;if(e[t]==="true")return true;if(e[t]==="false")return false;throw new Error(`Cannot load ${n} "${t}". Expected "true" or "false", got ${e[t]}.`)};const numberSelector=(e,t,n)=>{if(!(t in e))return undefined;const o=parseInt(e[t],10);if(Number.isNaN(o)){throw new TypeError(`Cannot load ${n} '${t}'. Expected number, got '${e[t]}'.`)}return o};t.SelectorType=void 0;(function(e){e["ENV"]="env";e["CONFIG"]="shared config entry"})(t.SelectorType||(t.SelectorType={}));t.booleanSelector=booleanSelector;t.numberSelector=numberSelector},673:(e,t,n)=>{var o=n(9316);var i=n(5704);var c=n(8857);const d="AWS_EXECUTION_ENV";const p="AWS_REGION";const y="AWS_DEFAULT_REGION";const C="AWS_EC2_METADATA_DISABLED";const Q=["in-region","cross-region","mobile","standard","legacy"];const v="/latest/meta-data/placement/region";const D="AWS_DEFAULTS_MODE";const k="defaults_mode";const $={environmentVariableSelector:e=>e[D],configFileSelector:e=>e[k],default:"legacy"};const resolveDefaultsModeConfig=({region:e=i.loadConfig(o.NODE_REGION_CONFIG_OPTIONS),defaultsMode:t=i.loadConfig($)}={})=>c.memoize((async()=>{const n=typeof t==="function"?await t():t;switch(n?.toLowerCase()){case"auto":return resolveNodeDefaultsModeAuto(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(n?.toLocaleLowerCase());case undefined:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Q.join(", ")}, got ${n}`)}}));const resolveNodeDefaultsModeAuto=async e=>{if(e){const t=typeof e==="function"?await e():e;const n=await inferPhysicalRegion();if(!n){return"standard"}if(t===n){return"in-region"}else{return"cross-region"}}return"standard"};const inferPhysicalRegion=async()=>{if(process.env[d]&&(process.env[p]||process.env[y])){return process.env[p]??process.env[y]}if(!process.env[C]){try{const{getInstanceMetadataEndpoint:e,httpRequest:t}=await n.e(566).then(n.t.bind(n,566,19));const o=await e();return(await t({...o,path:v})).toString()}catch(e){}}};t.resolveDefaultsModeConfig=resolveDefaultsModeConfig},9674:(e,t,n)=>{var o=n(690);class EndpointCache{capacity;data=new Map;parameters=[];constructor({size:e,params:t}){this.capacity=e??50;if(t){this.parameters=t}}get(e,t){const n=this.hash(e);if(n===false){return t()}if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;while(true){const{value:n,done:o}=e.next();this.data.delete(n);if(o||++t>10){break}}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(n.length===0){return false}for(const o of n){const n=String(e[o]??"");if(n.includes("|;")){return false}t+=n+"|;"}return t}}const i=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}$`);const isIpAddress=e=>i.test(e)||e.startsWith("[")&&e.endsWith("]");const c=new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);const isValidHostLabel=(e,t=false)=>{if(!t){return c.test(e)}const n=e.split(".");for(const e of n){if(!isValidHostLabel(e)){return false}}return true};const d={};const p="endpoints";function toDebugString(e){if(typeof e!=="object"||e==null){return e}if("ref"in e){return`$${toDebugString(e.ref)}`}if("fn"in e){return`${e.fn}(${(e.argv||[]).map(toDebugString).join(", ")})`}return JSON.stringify(e,null,2)}class EndpointError extends Error{constructor(e){super(e);this.name="EndpointError"}}const booleanEquals=(e,t)=>e===t;const getAttrPathList=e=>{const t=e.split(".");const n=[];for(const o of t){const t=o.indexOf("[");if(t!==-1){if(o.indexOf("]")!==o.length-1){throw new EndpointError(`Path: '${e}' does not end with ']'`)}const i=o.slice(t+1,-1);if(Number.isNaN(parseInt(i))){throw new EndpointError(`Invalid array index: '${i}' in path: '${e}'`)}if(t!==0){n.push(o.slice(0,t))}n.push(i)}else{n.push(o)}}return n};const getAttr=(e,t)=>getAttrPathList(t).reduce(((n,o)=>{if(typeof n!=="object"){throw new EndpointError(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`)}else if(Array.isArray(n)){return n[parseInt(o)]}return n[o]}),e);const isSet=e=>e!=null;const not=e=>!e;const y={[o.EndpointURLScheme.HTTP]:80,[o.EndpointURLScheme.HTTPS]:443};const parseURL=e=>{const t=(()=>{try{if(e instanceof URL){return e}if(typeof e==="object"&&"hostname"in e){const{hostname:t,port:n,protocol:o="",path:i="",query:c={}}=e;const d=new URL(`${o}//${t}${n?`:${n}`:""}${i}`);d.search=Object.entries(c).map((([e,t])=>`${e}=${t}`)).join("&");return d}return new URL(e)}catch(e){return null}})();if(!t){console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`);return null}const n=t.href;const{host:i,hostname:c,pathname:d,protocol:p,search:C}=t;if(C){return null}const Q=p.slice(0,-1);if(!Object.values(o.EndpointURLScheme).includes(Q)){return null}const v=isIpAddress(c);const D=n.includes(`${i}:${y[Q]}`)||typeof e==="string"&&e.includes(`${i}:${y[Q]}`);const k=`${i}${D?`:${y[Q]}`:``}`;return{scheme:Q,authority:k,path:d,normalizedPath:d.endsWith("/")?d:`${d}/`,isIp:v}};const stringEquals=(e,t)=>e===t;const substring=(e,t,n,o)=>{if(t>=n||e.lengthencodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`));const C={booleanEquals:booleanEquals,getAttr:getAttr,isSet:isSet,isValidHostLabel:isValidHostLabel,not:not,parseURL:parseURL,stringEquals:stringEquals,substring:substring,uriEncode:uriEncode};const evaluateTemplate=(e,t)=>{const n=[];const o={...t.endpointParams,...t.referenceRecord};let i=0;while(i{const n={...t.endpointParams,...t.referenceRecord};return n[e]};const evaluateExpression=(e,t,n)=>{if(typeof e==="string"){return evaluateTemplate(e,n)}else if(e["fn"]){return Q.callFunction(e,n)}else if(e["ref"]){return getReferenceValue(e,n)}throw new EndpointError(`'${t}': ${String(e)} is not a string, function or reference.`)};const callFunction=({fn:e,argv:t},n)=>{const o=t.map((e=>["boolean","number"].includes(typeof e)?e:Q.evaluateExpression(e,"arg",n)));const i=e.split(".");if(i[0]in d&&i[1]!=null){return d[i[0]][i[1]](...o)}return C[e](...o)};const Q={evaluateExpression:evaluateExpression,callFunction:callFunction};const evaluateCondition=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord){throw new EndpointError(`'${e}' is already defined in Reference Record.`)}const o=callFunction(t,n);n.logger?.debug?.(`${p} evaluateCondition: ${toDebugString(t)} = ${toDebugString(o)}`);return{result:o===""?true:!!o,...e!=null&&{toAssign:{name:e,value:o}}}};const evaluateConditions=(e=[],t)=>{const n={};for(const o of e){const{result:e,toAssign:i}=evaluateCondition(o,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e){return{result:e}}if(i){n[i.name]=i.value;t.logger?.debug?.(`${p} assign: ${i.name} := ${toDebugString(i.value)}`)}}return{result:true,referenceRecord:n}};const getEndpointHeaders=(e,t)=>Object.entries(e).reduce(((e,[n,o])=>({...e,[n]:o.map((e=>{const o=evaluateExpression(e,"Header value entry",t);if(typeof o!=="string"){throw new EndpointError(`Header '${n}' value '${o}' is not a string`)}return o}))})),{});const getEndpointProperties=(e,t)=>Object.entries(e).reduce(((e,[n,o])=>({...e,[n]:v.getEndpointProperty(o,t)})),{});const getEndpointProperty=(e,t)=>{if(Array.isArray(e)){return e.map((e=>getEndpointProperty(e,t)))}switch(typeof e){case"string":return evaluateTemplate(e,t);case"object":if(e===null){throw new EndpointError(`Unexpected endpoint property: ${e}`)}return v.getEndpointProperties(e,t);case"boolean":return e;default:throw new EndpointError(`Unexpected endpoint property type: ${typeof e}`)}};const v={getEndpointProperty:getEndpointProperty,getEndpointProperties:getEndpointProperties};const getEndpointUrl=(e,t)=>{const n=evaluateExpression(e,"Endpoint URL",t);if(typeof n==="string"){try{return new URL(n)}catch(e){console.error(`Failed to construct URL with ${n}`,e);throw e}}throw new EndpointError(`Endpoint URL must be a string, got ${typeof n}`)};const evaluateEndpointRule=(e,t)=>{const{conditions:n,endpoint:o}=e;const{result:i,referenceRecord:c}=evaluateConditions(n,t);if(!i){return}const d={...t,referenceRecord:{...t.referenceRecord,...c}};const{url:y,properties:C,headers:Q}=o;t.logger?.debug?.(`${p} Resolving endpoint from template: ${toDebugString(o)}`);return{...Q!=undefined&&{headers:getEndpointHeaders(Q,d)},...C!=undefined&&{properties:getEndpointProperties(C,d)},url:getEndpointUrl(y,d)}};const evaluateErrorRule=(e,t)=>{const{conditions:n,error:o}=e;const{result:i,referenceRecord:c}=evaluateConditions(n,t);if(!i){return}throw new EndpointError(evaluateExpression(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...c}}))};const evaluateRules=(e,t)=>{for(const n of e){if(n.type==="endpoint"){const e=evaluateEndpointRule(n,t);if(e){return e}}else if(n.type==="error"){evaluateErrorRule(n,t)}else if(n.type==="tree"){const e=D.evaluateTreeRule(n,t);if(e){return e}}else{throw new EndpointError(`Unknown endpoint rule: ${n}`)}}throw new EndpointError(`Rules evaluation failed`)};const evaluateTreeRule=(e,t)=>{const{conditions:n,rules:o}=e;const{result:i,referenceRecord:c}=evaluateConditions(n,t);if(!i){return}return D.evaluateRules(o,{...t,referenceRecord:{...t.referenceRecord,...c}})};const D={evaluateRules:evaluateRules,evaluateTreeRule:evaluateTreeRule};const resolveEndpoint=(e,t)=>{const{endpointParams:n,logger:o}=t;const{parameters:i,rules:c}=e;t.logger?.debug?.(`${p} Initial EndpointParams: ${toDebugString(n)}`);const d=Object.entries(i).filter((([,e])=>e.default!=null)).map((([e,t])=>[e,t.default]));if(d.length>0){for(const[e,t]of d){n[e]=n[e]??t}}const y=Object.entries(i).filter((([,e])=>e.required)).map((([e])=>e));for(const e of y){if(n[e]==null){throw new EndpointError(`Missing required parameter: '${e}'`)}}const C=evaluateRules(c,{endpointParams:n,logger:o,referenceRecord:{}});t.logger?.debug?.(`${p} Resolved endpoint: ${toDebugString(C)}`);return C};t.EndpointCache=EndpointCache;t.EndpointError=EndpointError;t.customEndpointFunctions=d;t.isIpAddress=isIpAddress;t.isValidHostLabel=isValidHostLabel;t.resolveEndpoint=resolveEndpoint},6435:(e,t)=>{const n={};const o={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();if(t.length===1){t=`0${t}`}n[e]=t;o[t]=e}function fromHex(e){if(e.length%2!==0){throw new Error("Hex encoded strings must have an even number length")}const t=new Uint8Array(e.length/2);for(let n=0;n{var o=n(690);const getSmithyContext=e=>e[o.SMITHY_CONTEXT_KEY]||(e[o.SMITHY_CONTEXT_KEY]={});const normalizeProvider=e=>{if(typeof e==="function")return e;const t=Promise.resolve(e);return()=>t};t.getSmithyContext=getSmithyContext;t.normalizeProvider=normalizeProvider},5518:(e,t,n)=>{var o=n(2058);t.RETRY_MODES=void 0;(function(e){e["STANDARD"]="standard";e["ADAPTIVE"]="adaptive"})(t.RETRY_MODES||(t.RETRY_MODES={}));const i=3;const c=t.RETRY_MODES.STANDARD;class DefaultRateLimiter{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=false;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7;this.minCapacity=e?.minCapacity??1;this.minFillRate=e?.minFillRate??.5;this.scaleConstant=e?.scaleConstant??.4;this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t;this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds());this.fillRate=this.minFillRate;this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(!this.enabled){return}this.refillTokenBucket();if(e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>DefaultRateLimiter.setTimeoutFn(e,t)))}this.currentCapacity=this.currentCapacity-e}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t);this.lastTimestamp=e}updateClientSendingRate(e){let t;this.updateMeasuredRate();if(o.isThrottlingError(e)){const e=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=e;this.calculateTimeWindow();this.lastThrottleTime=this.getCurrentTimeInSeconds();t=this.cubicThrottle(e);this.enableTokenBucket()}else{this.calculateTimeWindow();t=this.cubicSuccess(this.getCurrentTimeInSeconds())}const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=true}updateTokenBucketRate(e){this.refillTokenBucket();this.fillRate=Math.max(e,this.minFillRate);this.maxCapacity=Math.max(e,this.minCapacity);this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds();const t=Math.floor(e*2)/2;this.requestCount++;if(t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth));this.requestCount=0;this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const d=100;const p=20*1e3;const y=500;const C=500;const Q=5;const v=10;const D=1;const k="amz-sdk-invocation-id";const $="amz-sdk-request";const getDefaultRetryBackoffStrategy=()=>{let e=d;const computeNextBackoffDelay=t=>Math.floor(Math.min(p,Math.random()*2**t*e));const setDelayBase=t=>{e=t};return{computeNextBackoffDelay:computeNextBackoffDelay,setDelayBase:setDelayBase}};const createDefaultRetryToken=({retryDelay:e,retryCount:t,retryCost:n})=>{const getRetryCount=()=>t;const getRetryDelay=()=>Math.min(p,e);const getRetryCost=()=>n;return{getRetryCount:getRetryCount,getRetryDelay:getRetryDelay,getRetryCost:getRetryCost}};class StandardRetryStrategy{maxAttempts;mode=t.RETRY_MODES.STANDARD;capacity=C;retryBackoffStrategy=getDefaultRetryBackoffStrategy();maxAttemptsProvider;constructor(e){this.maxAttempts=e;this.maxAttemptsProvider=typeof e==="function"?e:async()=>e}async acquireInitialRetryToken(e){return createDefaultRetryToken({retryDelay:d,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase(n==="THROTTLING"?y:d);const o=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount());const i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,o):o;const c=this.getCapacityCost(n);this.capacity-=c;return createDefaultRetryToken({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:c})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(C,this.capacity+(e.getRetryCost()??D))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){console.warn(`Max attempts provider could not resolve. Using default of ${i}`);return i}}shouldRetry(e,t,n){const o=e.getRetryCount()+1;return o=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e==="TRANSIENT"?v:Q}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class AdaptiveRetryStrategy{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=t.RETRY_MODES.ADAPTIVE;constructor(e,t){this.maxAttemptsProvider=e;const{rateLimiter:n}=t??{};this.rateLimiter=n??new DefaultRateLimiter;this.standardRetryStrategy=new StandardRetryStrategy(e)}async acquireInitialRetryToken(e){await this.rateLimiter.getSendToken();return this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){this.rateLimiter.updateClientSendingRate(t);return this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({});this.standardRetryStrategy.recordSuccess(e)}}class ConfiguredRetryStrategy extends StandardRetryStrategy{computeNextBackoffDelay;constructor(e,t=d){super(typeof e==="function"?e:async()=>e);if(typeof t==="number"){this.computeNextBackoffDelay=()=>t}else{this.computeNextBackoffDelay=t}}async refreshRetryTokenForRetry(e,t){const n=await super.refreshRetryTokenForRetry(e,t);n.getRetryDelay=()=>this.computeNextBackoffDelay(n.getRetryCount());return n}}t.AdaptiveRetryStrategy=AdaptiveRetryStrategy;t.ConfiguredRetryStrategy=ConfiguredRetryStrategy;t.DEFAULT_MAX_ATTEMPTS=i;t.DEFAULT_RETRY_DELAY_BASE=d;t.DEFAULT_RETRY_MODE=c;t.DefaultRateLimiter=DefaultRateLimiter;t.INITIAL_RETRY_TOKENS=C;t.INVOCATION_ID_HEADER=k;t.MAXIMUM_RETRY_DELAY=p;t.NO_RETRY_INCREMENT=D;t.REQUEST_HEADER=$;t.RETRY_COST=Q;t.StandardRetryStrategy=StandardRetryStrategy;t.THROTTLING_RETRY_DELAY_BASE=y;t.TIMEOUT_RETRY_COST=v},1732:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ByteArrayCollector=void 0;class ByteArrayCollector{allocByteArray;byteLength=0;byteArrays=[];constructor(e){this.allocByteArray=e}push(e){this.byteArrays.push(e);this.byteLength+=e.byteLength}flush(){if(this.byteArrays.length===1){const e=this.byteArrays[0];this.reset();return e}const e=this.allocByteArray(this.byteLength);let t=0;for(let n=0;n{Object.defineProperty(t,"__esModule",{value:true});t.ChecksumStream=void 0;const n=typeof ReadableStream==="function"?ReadableStream:function(){};class ChecksumStream extends n{}t.ChecksumStream=ChecksumStream},1775:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ChecksumStream=void 0;const o=n(8385);const i=n(2203);class ChecksumStream extends i.Duplex{expectedChecksum;checksumSourceLocation;checksum;source;base64Encoder;pendingCallback=null;constructor({expectedChecksum:e,checksum:t,source:n,checksumSourceLocation:i,base64Encoder:c}){super();if(typeof n.pipe==="function"){this.source=n}else{throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name??n} in ChecksumStream.`)}this.base64Encoder=c??o.toBase64;this.expectedChecksum=e;this.checksum=t;this.checksumSourceLocation=i;this.source.pipe(this)}_read(e){if(this.pendingCallback){const e=this.pendingCallback;this.pendingCallback=null;e()}}_write(e,t,n){try{this.checksum.update(e);const t=this.push(e);if(!t){this.pendingCallback=n;return}}catch(e){return n(e)}return n()}async _final(e){try{const t=await this.checksum.digest();const n=this.base64Encoder(t);if(this.expectedChecksum!==n){return e(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${n}"`+` in response header "${this.checksumSourceLocation}".`))}}catch(t){return e(t)}this.push(null);return e()}}t.ChecksumStream=ChecksumStream},4129:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.createChecksumStream=void 0;const o=n(8385);const i=n(4414);const c=n(7753);const createChecksumStream=({expectedChecksum:e,checksum:t,source:n,checksumSourceLocation:d,base64Encoder:p})=>{if(!(0,i.isReadableStream)(n)){throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name??n} in ChecksumStream.`)}const y=p??o.toBase64;if(typeof TransformStream!=="function"){throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.")}const C=new TransformStream({start(){},async transform(e,n){t.update(e);n.enqueue(e)},async flush(n){const o=await t.digest();const i=y(o);if(e!==i){const t=new Error(`Checksum mismatch: expected "${e}" but received "${i}"`+` in response header "${d}".`);n.error(t)}else{n.terminate()}}});n.pipeThrough(C);const Q=C.readable;Object.setPrototypeOf(Q,c.ChecksumStream.prototype);return Q};t.createChecksumStream=createChecksumStream},5639:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.createChecksumStream=createChecksumStream;const o=n(4414);const i=n(1775);const c=n(4129);function createChecksumStream(e){if(typeof ReadableStream==="function"&&(0,o.isReadableStream)(e.source)){return(0,c.createChecksumStream)(e)}return new i.ChecksumStream(e)}},2005:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.createBufferedReadable=createBufferedReadable;const o=n(7075);const i=n(1732);const c=n(8213);const d=n(4414);function createBufferedReadable(e,t,n){if((0,d.isReadableStream)(e)){return(0,c.createBufferedReadableStream)(e,t,n)}const p=new o.Readable({read(){}});let y=false;let C=0;const Q=["",new i.ByteArrayCollector((e=>new Uint8Array(e))),new i.ByteArrayCollector((e=>Buffer.from(new Uint8Array(e))))];let v=-1;e.on("data",(e=>{const o=(0,c.modeOf)(e,true);if(v!==o){if(v>=0){p.push((0,c.flush)(Q,v))}v=o}if(v===-1){p.push(e);return}const i=(0,c.sizeOf)(e);C+=i;const d=(0,c.sizeOf)(Q[v]);if(i>=t&&d===0){p.push(e)}else{const o=(0,c.merge)(Q,v,e);if(!y&&C>t*2){y=true;n?.warn(`@smithy/util-stream - stream chunk size ${i} is below threshold of ${t}, automatically buffering.`)}if(o>=t){p.push((0,c.flush)(Q,v))}}}));e.on("end",(()=>{if(v!==-1){const e=(0,c.flush)(Q,v);if((0,c.sizeOf)(e)>0){p.push(e)}}p.push(null)}));return p}},8213:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.createBufferedReadable=void 0;t.createBufferedReadableStream=createBufferedReadableStream;t.merge=merge;t.flush=flush;t.sizeOf=sizeOf;t.modeOf=modeOf;const o=n(1732);function createBufferedReadableStream(e,t,n){const i=e.getReader();let c=false;let d=0;const p=["",new o.ByteArrayCollector((e=>new Uint8Array(e)))];let y=-1;const pull=async e=>{const{value:o,done:C}=await i.read();const Q=o;if(C){if(y!==-1){const t=flush(p,y);if(sizeOf(t)>0){e.enqueue(t)}}e.close()}else{const o=modeOf(Q,false);if(y!==o){if(y>=0){e.enqueue(flush(p,y))}y=o}if(y===-1){e.enqueue(Q);return}const i=sizeOf(Q);d+=i;const C=sizeOf(p[y]);if(i>=t&&C===0){e.enqueue(Q)}else{const o=merge(p,y,Q);if(!c&&d>t*2){c=true;n?.warn(`@smithy/util-stream - stream chunk size ${i} is below threshold of ${t}, automatically buffering.`)}if(o>=t){e.enqueue(flush(p,y))}else{await pull(e)}}}};return new ReadableStream({pull:pull})}t.createBufferedReadable=createBufferedReadableStream;function merge(e,t,n){switch(t){case 0:e[0]+=n;return sizeOf(e[0]);case 1:case 2:e[t].push(n);return sizeOf(e[t])}}function flush(e,t){switch(t){case 0:const n=e[0];e[0]="";return n;case 1:case 2:return e[t].flush()}throw new Error(`@smithy/util-stream - invalid index ${t} given to flush()`)}function sizeOf(e){return e?.byteLength??e?.length??0}function modeOf(e,t=true){if(t&&typeof Buffer!=="undefined"&&e instanceof Buffer){return 2}if(e instanceof Uint8Array){return 1}if(typeof e==="string"){return 0}return-1}},3492:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.getAwsChunkedEncodingStream=void 0;const getAwsChunkedEncodingStream=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:o,checksumAlgorithmFn:i,checksumLocationName:c,streamHasher:d}=t;const p=n!==undefined&&o!==undefined&&i!==undefined&&c!==undefined&&d!==undefined;const y=p?d(i,e):undefined;const C=e.getReader();return new ReadableStream({async pull(e){const{value:t,done:i}=await C.read();if(i){e.enqueue(`0\r\n`);if(p){const t=n(await y);e.enqueue(`${c}:${t}\r\n`);e.enqueue(`\r\n`)}e.close()}else{e.enqueue(`${(o(t)||0).toString(16)}\r\n${t}\r\n`)}}})};t.getAwsChunkedEncodingStream=getAwsChunkedEncodingStream},6522:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getAwsChunkedEncodingStream=getAwsChunkedEncodingStream;const o=n(7075);const i=n(3492);const c=n(4414);function getAwsChunkedEncodingStream(e,t){const n=e;const d=e;if((0,c.isReadableStream)(d)){return(0,i.getAwsChunkedEncodingStream)(d,t)}const{base64Encoder:p,bodyLengthChecker:y,checksumAlgorithmFn:C,checksumLocationName:Q,streamHasher:v}=t;const D=p!==undefined&&C!==undefined&&Q!==undefined&&v!==undefined;const k=D?v(C,n):undefined;const $=new o.Readable({read:()=>{}});n.on("data",(e=>{const t=y(e)||0;if(t===0){return}$.push(`${t.toString(16)}\r\n`);$.push(e);$.push("\r\n")}));n.on("end",(async()=>{$.push(`0\r\n`);if(D){const e=p(await k);$.push(`${Q}:${e}\r\n`);$.push(`\r\n`)}$.push(null)}));return $}},66:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.headStream=headStream;async function headStream(e,t){let n=0;const o=[];const i=e.getReader();let c=false;while(!c){const{done:e,value:d}=await i.read();if(d){o.push(d);n+=d?.byteLength??0}if(n>=t){break}c=e}i.releaseLock();const d=new Uint8Array(Math.min(t,n));let p=0;for(const e of o){if(e.byteLength>d.byteLength-p){d.set(e.subarray(0,d.byteLength-p),p);break}else{d.set(e,p)}p+=e.length}return d}},8412:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.headStream=void 0;const o=n(2203);const i=n(66);const c=n(4414);const headStream=(e,t)=>{if((0,c.isReadableStream)(e)){return(0,i.headStream)(e,t)}return new Promise(((n,o)=>{const i=new Collector;i.limit=t;e.pipe(i);e.on("error",(e=>{i.end();o(e)}));i.on("error",o);i.on("finish",(function(){const e=new Uint8Array(Buffer.concat(this.buffers));n(e)}))}))};t.headStream=headStream;class Collector extends o.Writable{buffers=[];limit=Infinity;bytesBuffered=0;_write(e,t,n){this.buffers.push(e);this.bytesBuffered+=e.byteLength??0;if(this.bytesBuffered>=this.limit){const e=this.bytesBuffered-this.limit;const t=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=t.subarray(0,t.byteLength-e);this.emit("finish")}n()}}},4252:(e,t,n)=>{var o=n(8385);var i=n(1577);var c=n(1775);var d=n(5639);var p=n(2005);var y=n(6522);var C=n(8412);var Q=n(7201);var v=n(2108);var D=n(4414);class Uint8ArrayBlobAdapter extends Uint8Array{static fromString(e,t="utf-8"){if(typeof e==="string"){if(t==="base64"){return Uint8ArrayBlobAdapter.mutate(o.fromBase64(e))}return Uint8ArrayBlobAdapter.mutate(i.fromUtf8(e))}throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){Object.setPrototypeOf(e,Uint8ArrayBlobAdapter.prototype);return e}transformToString(e="utf-8"){if(e==="base64"){return o.toBase64(this)}return i.toUtf8(this)}}t.isBlob=D.isBlob;t.isReadableStream=D.isReadableStream;t.Uint8ArrayBlobAdapter=Uint8ArrayBlobAdapter;Object.prototype.hasOwnProperty.call(c,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:c["__proto__"]});Object.keys(c).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=c[e]}));Object.prototype.hasOwnProperty.call(d,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:d["__proto__"]});Object.keys(d).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=d[e]}));Object.prototype.hasOwnProperty.call(p,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:p["__proto__"]});Object.keys(p).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=p[e]}));Object.prototype.hasOwnProperty.call(y,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:y["__proto__"]});Object.keys(y).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=y[e]}));Object.prototype.hasOwnProperty.call(C,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:C["__proto__"]});Object.keys(C).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=C[e]}));Object.prototype.hasOwnProperty.call(Q,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:Q["__proto__"]});Object.keys(Q).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=Q[e]}));Object.prototype.hasOwnProperty.call(v,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:v["__proto__"]});Object.keys(v).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=v[e]}))},2207:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.sdkStreamMixin=void 0;const o=n(7809);const i=n(8385);const c=n(6435);const d=n(1577);const p=n(4414);const y="The stream has already been transformed.";const sdkStreamMixin=e=>{if(!isBlobInstance(e)&&!(0,p.isReadableStream)(e)){const t=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${t}`)}let t=false;const transformToByteArray=async()=>{if(t){throw new Error(y)}t=true;return await(0,o.streamCollector)(e)};const blobToWebStream=e=>{if(typeof e.stream!=="function"){throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\n"+"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 e.stream()};return Object.assign(e,{transformToByteArray:transformToByteArray,transformToString:async e=>{const t=await transformToByteArray();if(e==="base64"){return(0,i.toBase64)(t)}else if(e==="hex"){return(0,c.toHex)(t)}else if(e===undefined||e==="utf8"||e==="utf-8"){return(0,d.toUtf8)(t)}else if(typeof TextDecoder==="function"){return new TextDecoder(e).decode(t)}else{throw new Error("TextDecoder is not available, please make sure polyfill is provided.")}},transformToWebStream:()=>{if(t){throw new Error(y)}t=true;if(isBlobInstance(e)){return blobToWebStream(e)}else if((0,p.isReadableStream)(e)){return e}else{throw new Error(`Cannot transform payload to web stream, got ${e}`)}}})};t.sdkStreamMixin=sdkStreamMixin;const isBlobInstance=e=>typeof Blob==="function"&&e instanceof Blob},7201:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.sdkStreamMixin=void 0;const o=n(1279);const i=n(4151);const c=n(2203);const d=n(2207);const p="The stream has already been transformed.";const sdkStreamMixin=e=>{if(!(e instanceof c.Readable)){try{return(0,d.sdkStreamMixin)(e)}catch(t){const n=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${n}`)}}let t=false;const transformToByteArray=async()=>{if(t){throw new Error(p)}t=true;return await(0,o.streamCollector)(e)};return Object.assign(e,{transformToByteArray:transformToByteArray,transformToString:async e=>{const t=await transformToByteArray();if(e===undefined||Buffer.isEncoding(e)){return(0,i.fromArrayBuffer)(t.buffer,t.byteOffset,t.byteLength).toString(e)}else{const n=new TextDecoder(e);return n.decode(t)}},transformToWebStream:()=>{if(t){throw new Error(p)}if(e.readableFlowing!==null){throw new Error("The stream has been consumed by other callbacks.")}if(typeof c.Readable.toWeb!=="function"){throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.")}t=true;return c.Readable.toWeb(e)}})};t.sdkStreamMixin=sdkStreamMixin},7570:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.splitStream=splitStream;async function splitStream(e){if(typeof e.stream==="function"){e=e.stream()}const t=e;return t.tee()}},2108:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.splitStream=splitStream;const o=n(2203);const i=n(7570);const c=n(4414);async function splitStream(e){if((0,c.isReadableStream)(e)||(0,c.isBlob)(e)){return(0,i.splitStream)(e)}const t=new o.PassThrough;const n=new o.PassThrough;e.pipe(t);e.pipe(n);return[t,n]}},4414:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.isBlob=t.isReadableStream=void 0;const isReadableStream=e=>typeof ReadableStream==="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream);t.isReadableStream=isReadableStream;const isBlob=e=>typeof Blob==="function"&&(e?.constructor?.name===Blob.name||e instanceof Blob);t.isBlob=isBlob},146:(e,t)=>{const escapeUri=e=>encodeURIComponent(e).replace(/[!'()*]/g,hexEncode);const hexEncode=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;const escapeUriPath=e=>e.split("/").map(escapeUri).join("/");t.escapeUri=escapeUri;t.escapeUriPath=escapeUriPath},1577:(e,t,n)=>{var o=n(4151);const fromUtf8=e=>{const t=o.fromString(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};const toUint8Array=e=>{if(typeof e==="string"){return fromUtf8(e)}if(ArrayBuffer.isView(e)){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)}return new Uint8Array(e)};const toUtf8=e=>{if(typeof e==="string"){return e}if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number"){throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.")}return o.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength).toString("utf8")};t.fromUtf8=fromUtf8;t.toUint8Array=toUint8Array;t.toUtf8=toUtf8},5290:(e,t)=>{const getCircularReplacer=()=>{const e=new WeakSet;return(t,n)=>{if(typeof n==="object"&&n!==null){if(e.has(n)){return"[Circular]"}e.add(n)}return n}};const sleep=e=>new Promise((t=>setTimeout(t,e*1e3)));const n={minDelay:2,maxDelay:120};t.WaiterState=void 0;(function(e){e["ABORTED"]="ABORTED";e["FAILURE"]="FAILURE";e["SUCCESS"]="SUCCESS";e["RETRY"]="RETRY";e["TIMEOUT"]="TIMEOUT"})(t.WaiterState||(t.WaiterState={}));const checkExceptions=e=>{if(e.state===t.WaiterState.ABORTED){const t=new Error(`${JSON.stringify({...e,reason:"Request was aborted"},getCircularReplacer())}`);t.name="AbortError";throw t}else if(e.state===t.WaiterState.TIMEOUT){const t=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"},getCircularReplacer())}`);t.name="TimeoutError";throw t}else if(e.state!==t.WaiterState.SUCCESS){throw new Error(`${JSON.stringify(e,getCircularReplacer())}`)}return e};const exponentialBackoffWithJitter=(e,t,n,o)=>{if(o>n)return t;const i=e*2**(o-1);return randomInRange(e,i)};const randomInRange=(e,t)=>e+Math.random()*(t-e);const runPolling=async({minDelay:e,maxDelay:n,maxWaitTime:o,abortController:i,client:c,abortSignal:d},p,y)=>{const C={};const{state:Q,reason:v}=await y(c,p);if(v){const e=createMessageFromResponse(v);C[e]|=0;C[e]+=1}if(Q!==t.WaiterState.RETRY){return{state:Q,reason:v,observedResponses:C}}let D=1;const k=Date.now()+o*1e3;const $=Math.log(n/e)/Math.log(2)+1;while(true){if(i?.signal?.aborted||d?.aborted){const e="AbortController signal aborted.";C[e]|=0;C[e]+=1;return{state:t.WaiterState.ABORTED,observedResponses:C}}const o=exponentialBackoffWithJitter(e,n,$,D);if(Date.now()+o*1e3>k){return{state:t.WaiterState.TIMEOUT,observedResponses:C}}await sleep(o);const{state:Q,reason:v}=await y(c,p);if(v){const e=createMessageFromResponse(v);C[e]|=0;C[e]+=1}if(Q!==t.WaiterState.RETRY){return{state:Q,reason:v,observedResponses:C}}D+=1}};const createMessageFromResponse=e=>{if(e?.$responseBodyText){return`Deserialization error for body: ${e.$responseBodyText}`}if(e?.$metadata?.httpStatusCode){if(e.$response||e.message){return`${e.$response.statusCode??e.$metadata.httpStatusCode??"Unknown"}: ${e.message}`}return`${e.$metadata.httpStatusCode}: OK`}return String(e?.message??JSON.stringify(e,getCircularReplacer())??"Unknown")};const validateWaiterOptions=e=>{if(e.maxWaitTime<=0){throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`)}else if(e.minDelay<=0){throw new Error(`WaiterConfiguration.minDelay must be greater than 0`)}else if(e.maxDelay<=0){throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`)}else if(e.maxWaitTime<=e.minDelay){throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`)}else if(e.maxDelay{let n;const o=new Promise((o=>{n=()=>o({state:t.WaiterState.ABORTED});if(typeof e.addEventListener==="function"){e.addEventListener("abort",n)}else{e.onabort=n}}));return{clearListener(){if(typeof e.removeEventListener==="function"){e.removeEventListener("abort",n)}},aborted:o}};const createWaiter=async(e,t,o)=>{const i={...n,...e};validateWaiterOptions(i);const c=[runPolling(i,t,o)];const d=[];if(e.abortSignal){const{aborted:t,clearListener:n}=abortTimeout(e.abortSignal);d.push(n);c.push(t)}if(e.abortController?.signal){const{aborted:t,clearListener:n}=abortTimeout(e.abortController.signal);d.push(n);c.push(t)}return Promise.race(c).then((e=>{for(const e of d){e()}return e}))};t.checkExceptions=checkExceptions;t.createWaiter=createWaiter;t.waiterServiceDefaults=n},266:(e,t,n)=>{var o=n(8492);const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const v4=()=>{if(o.randomUUID){return o.randomUUID()}const e=new Uint8Array(16);crypto.getRandomValues(e);e[6]=e[6]&15|64;e[8]=e[8]&63|128;return i[e[0]]+i[e[1]]+i[e[2]]+i[e[3]]+"-"+i[e[4]]+i[e[5]]+"-"+i[e[6]]+i[e[7]]+"-"+i[e[8]]+i[e[9]]+"-"+i[e[10]]+i[e[11]]+i[e[12]]+i[e[13]]+i[e[14]]+i[e[15]]};t.v4=v4},8492:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.randomUUID=void 0;const o=n(1860);const i=o.__importDefault(n(6982));t.randomUUID=i.default.randomUUID.bind(i.default)},5183:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))o(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.req=t.json=t.toBuffer=void 0;const d=c(n(8611));const p=c(n(5692));async function toBuffer(e){let t=0;const n=[];for await(const o of e){t+=o.length;n.push(o)}return Buffer.concat(n,t)}t.toBuffer=toBuffer;async function json(e){const t=await toBuffer(e);const n=t.toString("utf8");try{return JSON.parse(n)}catch(e){const t=e;t.message+=` (input: ${n})`;throw t}}t.json=json;function req(e,t={}){const n=typeof e==="string"?e:e.href;const o=(n.startsWith("https:")?p:d).request(e,t);const i=new Promise(((e,t)=>{o.once("response",e).once("error",t).end()}));o.then=i.then.bind(i);return o}t.req=req},8894:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))o(t,e,n);i(t,e);return t};var d=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))o(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});t.Agent=void 0;const p=c(n(8611));d(n(5183),t);const y=Symbol("AgentBaseInternalState");class Agent extends p.Agent{constructor(e){super(e);this[y]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==="boolean"){return e.secureEndpoint}if(typeof e.protocol==="string"){return e.protocol==="https:"}}const{stack:t}=new Error;if(typeof t!=="string")return false;return t.split("\n").some((e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1))}createSocket(e,t,n){const o={...t,secureEndpoint:this.isSecureEndpoint(t)};Promise.resolve().then((()=>this.connect(e,o))).then((i=>{if(i instanceof p.Agent){return i.addRequest(e,o)}this[y].currentSocket=i;super.createSocket(e,t,n)}),n)}createConnection(){const e=this[y].currentSocket;this[y].currentSocket=undefined;if(!e){throw new Error("No socket was returned in the `connect()` function")}return e}get defaultPort(){return this[y].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){if(this[y]){this[y].defaultPort=e}}get protocol(){return this[y].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){if(this[y]){this[y].protocol=e}}}t.Agent=Agent},9380:e=>{e.exports=balanced;function balanced(e,t,n){if(e instanceof RegExp)e=maybeMatch(e,n);if(t instanceof RegExp)t=maybeMatch(t,n);var o=range(e,t,n);return o&&{start:o[0],end:o[1],pre:n.slice(0,o[0]),body:n.slice(o[0]+e.length,o[1]),post:n.slice(o[1]+t.length)}}function maybeMatch(e,t){var n=t.match(e);return n?n[0]:null}balanced.range=range;function range(e,t,n){var o,i,c,d,p;var y=n.indexOf(e);var C=n.indexOf(t,y+1);var Q=y;if(y>=0&&C>0){if(e===t){return[y,C]}o=[];c=n.length;while(Q>=0&&!p){if(Q==y){o.push(Q);y=n.indexOf(e,Q+1)}else if(o.length==1){p=[o.pop(),C]}else{i=o.pop();if(i=0?y:C}if(o.length){p=[c,d]}}return p}},7087:e=>{e.exports=function(e,n){var o=[];for(var i=0;i{t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let o=0;let i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}o++;if(e==="%c"){i=o}}));t.splice(i,0,n)}t.log=console.debug||console.log||(()=>{});function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=n(897)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},897:(e,t,n)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=n(744);createDebug.destroy=destroy;Object.keys(e).forEach((t=>{createDebug[t]=e[t]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let n=0;n{if(t==="%%"){return"%"}c++;const i=createDebug.formatters[o];if(typeof i==="function"){const o=e[c];t=i.call(n,o);e.splice(c,1);c--}return t}));createDebug.formatArgs.call(n,e);const d=n.log||createDebug.log;d.apply(n,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(n!==null){return n}if(o!==createDebug.namespaces){o=createDebug.namespaces;i=createDebug.enabled(e)}return i},set:e=>{n=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,t){const n=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);n.log=this.log;return n}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];let t;const n=(typeof e==="string"?e:"").split(/[\s,]+/);const o=n.length;for(t=0;t"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let t;let n;for(t=0,n=createDebug.skips.length;t{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=n(6110)}else{e.exports=n(5108)}},5108:(e,t,n)=>{const o=n(2018);const i=n(9023);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");t.colors=[6,2,3,4,5,1];try{const e=n(1450);if(e&&(e.stderr||e).level>=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let o=process.env[t];if(/^(yes|on|true|enabled)$/i.test(o)){o=true}else if(/^(no|off|false|disabled)$/i.test(o)){o=false}else if(o==="null"){o=null}else{o=Number(o)}e[n]=o;return e}),{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):o.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:n,useColors:o}=this;if(o){const o=this.color;const i="[3"+(o<8?o:"8;5;"+o);const c=` ${i};1m${n} `;t[0]=c+t[0].split("\n").join("\n"+c);t.push(i+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+n+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let o=0;oe.trim())).join(" ")};c.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},3813:e=>{e.exports=(e,t=process.argv)=>{const n=e.startsWith("-")?"":e.length===1?"-":"--";const o=t.indexOf(n+e);const i=t.indexOf("--");return o!==-1&&(i===-1||o0){k("Patching connection write() output buffer with updated header");n=e.outputData[0].data;o=n.indexOf("\r\n\r\n")+4;e.outputData[0].data=e._header+n.substring(o);k("Output buffer: %o",e.outputData[0].data)}let i;if(this.proxy.protocol==="https:"){k("Creating `tls.Socket`: %o",this.connectOpts);i=y.connect(this.connectOpts)}else{k("Creating `net.Socket`: %o",this.connectOpts);i=p.connect(this.connectOpts)}await(0,Q.once)(i,"connect");return i}}HttpProxyAgent.protocols=["http","https"];t.HttpProxyAgent=HttpProxyAgent;function omit(e,...t){const n={};let o;for(o in e){if(!t.includes(o)){n[o]=e[o]}}return n}},3669:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))o(t,e,n);i(t,e);return t};var d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.HttpsProxyAgent=void 0;const p=c(n(9278));const y=c(n(4756));const C=d(n(2613));const Q=d(n(2830));const v=n(3333);const D=n(7016);const k=n(7943);const $=(0,Q.default)("https-proxy-agent");const setServernameFromNonIpHost=e=>{if(e.servername===undefined&&e.host&&!p.isIP(e.host)){return{...e,servername:e.host}}return e};class HttpsProxyAgent extends v.Agent{constructor(e,t){super(t);this.options={path:undefined};this.proxy=typeof e==="string"?new D.URL(e):e;this.proxyHeaders=t?.headers??{};$("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,"");const o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?omit(t,"headers"):null,host:n,port:o}}async connect(e,t){const{proxy:n}=this;if(!t.host){throw new TypeError('No "host" provided')}let o;if(n.protocol==="https:"){$("Creating `tls.Socket`: %o",this.connectOpts);o=y.connect(setServernameFromNonIpHost(this.connectOpts))}else{$("Creating `net.Socket`: %o",this.connectOpts);o=p.connect(this.connectOpts)}const i=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders};const c=p.isIPv6(t.host)?`[${t.host}]`:t.host;let d=`CONNECT ${c}:${t.port} HTTP/1.1\r\n`;if(n.username||n.password){const e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(e).toString("base64")}`}i.Host=`${c}:${t.port}`;if(!i["Proxy-Connection"]){i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close"}for(const e of Object.keys(i)){d+=`${e}: ${i[e]}\r\n`}const Q=(0,k.parseProxyResponse)(o);o.write(`${d}\r\n`);const{connect:v,buffered:D}=await Q;e.emit("proxyConnect",v);this.emit("proxyConnect",v,e);if(v.statusCode===200){e.once("socket",resume);if(t.secureEndpoint){$("Upgrading socket connection to TLS");return y.connect({...omit(setServernameFromNonIpHost(t),"host","path","port"),socket:o})}return o}o.destroy();const V=new p.Socket({writable:false});V.readable=true;e.once("socket",(e=>{$("Replaying proxy buffer for failed request");(0,C.default)(e.listenerCount("data")>0);e.push(D);e.push(null)}));return V}}HttpsProxyAgent.protocols=["http","https"];t.HttpsProxyAgent=HttpsProxyAgent;function resume(e){e.resume()}function omit(e,...t){const n={};let o;for(o in e){if(!t.includes(o)){n[o]=e[o]}}return n}},7943:function(e,t,n){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.parseProxyResponse=void 0;const i=o(n(2830));const c=(0,i.default)("https-proxy-agent:parse-proxy-response");function parseProxyResponse(e){return new Promise(((t,n)=>{let o=0;const i=[];function read(){const t=e.read();if(t)ondata(t);else e.once("readable",read)}function cleanup(){e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("readable",read)}function onend(){cleanup();c("onend");n(new Error("Proxy connection ended before receiving CONNECT response"))}function onerror(e){cleanup();c("onerror %o",e);n(e)}function ondata(d){i.push(d);o+=d.length;const p=Buffer.concat(i,o);const y=p.indexOf("\r\n\r\n");if(y===-1){c("have not received end of HTTP headers yet...");read();return}const C=p.slice(0,y).toString("ascii").split("\r\n");const Q=C.shift();if(!Q){e.destroy();return n(new Error("No header received from proxy CONNECT response"))}const v=Q.split(" ");const D=+v[1];const k=v.slice(2).join(" ");const $={};for(const t of C){if(!t)continue;const o=t.indexOf(":");if(o===-1){e.destroy();return n(new Error(`Invalid header from proxy CONNECT response: "${t}"`))}const i=t.slice(0,o).toLowerCase();const c=t.slice(o+1).trimStart();const d=$[i];if(typeof d==="string"){$[i]=[d,c]}else if(Array.isArray(d)){d.push(c)}else{$[i]=c}}c("got proxy server response: %o %o",Q,$);cleanup();t({connect:{statusCode:D,statusText:k,headers:$},buffered:p})}e.on("error",onerror);e.on("end",onend);read()}))}t.parseProxyResponse=parseProxyResponse},8515:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))o(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.req=t.json=t.toBuffer=void 0;const d=c(n(8611));const p=c(n(5692));async function toBuffer(e){let t=0;const n=[];for await(const o of e){t+=o.length;n.push(o)}return Buffer.concat(n,t)}t.toBuffer=toBuffer;async function json(e){const t=await toBuffer(e);const n=t.toString("utf8");try{return JSON.parse(n)}catch(e){const t=e;t.message+=` (input: ${n})`;throw t}}t.json=json;function req(e,t={}){const n=typeof e==="string"?e:e.href;const o=(n.startsWith("https:")?p:d).request(e,t);const i=new Promise(((e,t)=>{o.once("response",e).once("error",t).end()}));o.then=i.then.bind(i);return o}t.req=req},3333:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))o(t,e,n);i(t,e);return t};var d=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))o(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});t.Agent=void 0;const p=c(n(9278));const y=c(n(8611));const C=n(5692);d(n(8515),t);const Q=Symbol("AgentBaseInternalState");class Agent extends y.Agent{constructor(e){super(e);this[Q]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==="boolean"){return e.secureEndpoint}if(typeof e.protocol==="string"){return e.protocol==="https:"}}const{stack:t}=new Error;if(typeof t!=="string")return false;return t.split("\n").some((e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1))}incrementSockets(e){if(this.maxSockets===Infinity&&this.maxTotalSockets===Infinity){return null}if(!this.sockets[e]){this.sockets[e]=[]}const t=new p.Socket({writable:false});this.sockets[e].push(t);this.totalSocketCount++;return t}decrementSockets(e,t){if(!this.sockets[e]||t===null){return}const n=this.sockets[e];const o=n.indexOf(t);if(o!==-1){n.splice(o,1);this.totalSocketCount--;if(n.length===0){delete this.sockets[e]}}}getName(e){const t=typeof e.secureEndpoint==="boolean"?e.secureEndpoint:this.isSecureEndpoint(e);if(t){return C.Agent.prototype.getName.call(this,e)}return super.getName(e)}createSocket(e,t,n){const o={...t,secureEndpoint:this.isSecureEndpoint(t)};const i=this.getName(o);const c=this.incrementSockets(i);Promise.resolve().then((()=>this.connect(e,o))).then((d=>{this.decrementSockets(i,c);if(d instanceof y.Agent){try{return d.addRequest(e,o)}catch(e){return n(e)}}this[Q].currentSocket=d;super.createSocket(e,t,n)}),(e=>{this.decrementSockets(i,c);n(e)}))}createConnection(){const e=this[Q].currentSocket;this[Q].currentSocket=undefined;if(!e){throw new Error("No socket was returned in the `connect()` function")}return e}get defaultPort(){return this[Q].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){if(this[Q]){this[Q].defaultPort=e}}get protocol(){return this[Q].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){if(this[Q]){this[Q].protocol=e}}}t.Agent=Agent},3772:(e,t,n)=>{e.exports=minimatch;minimatch.Minimatch=Minimatch;var o=function(){try{return n(6928)}catch(e){}}()||{sep:"/"};minimatch.sep=o.sep;var i=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var c=n(3783);var d={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var p="[^/]";var y=p+"*?";var C="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var Q="(?:(?!(?:\\/|^)\\.).)*?";var v=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce((function(e,t){e[t]=true;return e}),{})}var D=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(n,o,i){return minimatch(n,e,t)}}function ext(e,t){t=t||{};var n={};Object.keys(e).forEach((function(t){n[t]=e[t]}));Object.keys(t).forEach((function(e){n[e]=t[e]}));return n}minimatch.defaults=function(e){if(!e||typeof e!=="object"||!Object.keys(e).length){return minimatch}var t=minimatch;var n=function minimatch(n,o,i){return t(n,o,ext(e,i))};n.Minimatch=function Minimatch(n,o){return new t.Minimatch(n,ext(e,o))};n.Minimatch.defaults=function defaults(n){return t.defaults(ext(e,n)).Minimatch};n.filter=function filter(n,o){return t.filter(n,ext(e,o))};n.defaults=function defaults(n){return t.defaults(ext(e,n))};n.makeRe=function makeRe(n,o){return t.makeRe(n,ext(e,o))};n.braceExpand=function braceExpand(n,o){return t.braceExpand(n,ext(e,o))};n.match=function(n,o,i){return t.match(n,o,ext(e,i))};return n};Minimatch.defaults=function(e){return minimatch.defaults(e).Minimatch};function minimatch(e,t,n){assertValidPattern(t);if(!n)n={};if(!n.nocomment&&t.charAt(0)==="#"){return false}return new Minimatch(t,n).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}assertValidPattern(e);if(!t)t={};e=e.trim();if(!t.allowWindowsEscape&&o.sep!=="/"){e=e.split(o.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!t.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var n=this.globSet=this.braceExpand();if(t.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,n);n=this.globParts=n.map((function(e){return e.split(D)}));this.debug(this.pattern,n);n=n.map((function(e,t,n){return e.map(this.parse,this)}),this);this.debug(this.pattern,n);n=n.filter((function(e){return e.indexOf(false)===-1}));this.debug(this.pattern,n);this.set=n}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var n=this.options;var o=0;if(n.nonegate)return;for(var i=0,c=e.length;ik){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var $={};function parse(e,t){assertValidPattern(e);var n=this.options;if(e==="**"){if(!n.noglobstar)return i;else e="*"}if(e==="")return"";var o="";var c=!!n.nocase;var C=false;var Q=[];var D=[];var k;var V=false;var ee=-1;var te=-1;var re=e.charAt(0)==="."?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var ne=this;function clearStateChar(){if(k){switch(k){case"*":o+=y;c=true;break;case"?":o+=p;c=true;break;default:o+="\\"+k;break}ne.debug("clearStateChar %j %j",k,o);k=false}}for(var se=0,oe=e.length,ie;se-1;Ae--){var me=D[Ae];var ge=o.slice(0,me.reStart);var fe=o.slice(me.reStart,me.reEnd-8);var he=o.slice(me.reEnd-8,me.reEnd);var ye=o.slice(me.reEnd);he+=ye;var Ee=ge.split("(").length-1;var Ce=ye;for(se=0;se=0;d--){c=e[d];if(c)break}for(d=0;d>> no match, partial?",e,v,t,D);if(v===p)return true}return false}var $;if(typeof C==="string"){$=Q===C;this.debug("string match",C,Q,$)}else{$=Q.match(C);this.debug("pattern match",C,Q,$)}if(!$)return false}if(c===p&&d===y){return true}else if(c===p){return n}else if(d===y){return c===p-1&&e[c]===""}throw new Error("wtf?")};function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},3783:(e,t,n)=>{var o=n(7087);var i=n(9380);e.exports=expandTop;var c="\0SLASH"+Math.random()+"\0";var d="\0OPEN"+Math.random()+"\0";var p="\0CLOSE"+Math.random()+"\0";var y="\0COMMA"+Math.random()+"\0";var C="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(c).split("\\{").join(d).split("\\}").join(p).split("\\,").join(y).split("\\.").join(C)}function unescapeBraces(e){return e.split(c).join("\\").split(d).join("{").split(p).join("}").split(y).join(",").split(C).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var n=i("{","}",e);if(!n)return e.split(",");var o=n.pre;var c=n.body;var d=n.post;var p=o.split(",");p[p.length-1]+="{"+c+"}";var y=parseCommaParts(d);if(d.length){p[p.length-1]+=y.shift();p.push.apply(p,y)}t.push.apply(t,p);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var n=[];var c=i("{","}",e);if(!c||/\$$/.test(c.pre))return[e];var d=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(c.body);var y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(c.body);var C=d||y;var Q=c.body.indexOf(",")>=0;if(!C&&!Q){if(c.post.match(/,(?!,).*\}/)){e=c.pre+"{"+c.body+p+c.post;return expand(e)}return[e]}var v;if(C){v=c.body.split(/\.\./)}else{v=parseCommaParts(c.body);if(v.length===1){v=expand(v[0],false).map(embrace);if(v.length===1){var D=c.post.length?expand(c.post,false):[""];return D.map((function(e){return c.pre+v[0]+e}))}}}var k=c.pre;var D=c.post.length?expand(c.post,false):[""];var $;if(C){var V=numeric(v[0]);var ee=numeric(v[1]);var te=Math.max(v[0].length,v[1].length);var re=v.length==3?Math.abs(numeric(v[2])):1;var ne=lte;var se=ee0){var le=new Array(ce+1).join("0");if(ie<0)ae="-"+le+ae.slice(1);else ae=le+ae}}}$.push(ae)}}else{$=o(v,(function(e){return expand(e,false)}))}for(var ue=0;ue<$.length;ue++){for(var de=0;de{var t=1e3;var n=t*60;var o=n*60;var i=o*24;var c=i*7;var d=i*365.25;e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0){return parse(e)}else if(n==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!p){return}var y=parseFloat(p[1]);var C=(p[2]||"ms").toLowerCase();switch(C){case"years":case"year":case"yrs":case"yr":case"y":return y*d;case"weeks":case"week":case"w":return y*c;case"days":case"day":case"d":return y*i;case"hours":case"hour":case"hrs":case"hr":case"h":return y*o;case"minutes":case"minute":case"mins":case"min":case"m":return y*n;case"seconds":case"second":case"secs":case"sec":case"s":return y*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return y;default:return undefined}}function fmtShort(e){var c=Math.abs(e);if(c>=i){return Math.round(e/i)+"d"}if(c>=o){return Math.round(e/o)+"h"}if(c>=n){return Math.round(e/n)+"m"}if(c>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var c=Math.abs(e);if(c>=i){return plural(e,c,i,"day")}if(c>=o){return plural(e,c,o,"hour")}if(c>=n){return plural(e,c,n,"minute")}if(c>=t){return plural(e,c,t,"second")}return e+" ms"}function plural(e,t,n,o){var i=t>=n*1.5;return Math.round(e/n)+" "+o+(i?"s":"")}},9379:(e,t,n)=>{const o=Symbol("SemVer ANY");class Comparator{static get ANY(){return o}constructor(e,t){t=i(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}e=e.trim().split(/\s+/).join(" ");y("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===o){this.value=""}else{this.value=this.operator+this.semver.version}y("comp",this)}parse(e){const t=this.options.loose?c[d.COMPARATORLOOSE]:c[d.COMPARATOR];const n=e.match(t);if(!n){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=n[1]!==undefined?n[1]:"";if(this.operator==="="){this.operator=""}if(!n[2]){this.semver=o}else{this.semver=new C(n[2],this.options.loose)}}toString(){return this.value}test(e){y("Comparator.test",e,this.options.loose);if(this.semver===o||e===o){return true}if(typeof e==="string"){try{e=new C(e,this.options)}catch(e){return false}}return p(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new Q(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new Q(this.value,t).test(e.semver)}t=i(t);if(t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")){return false}if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&e.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&e.operator.startsWith("<")){return true}if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")){return true}if(p(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")){return true}if(p(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")){return true}return false}}e.exports=Comparator;const i=n(356);const{safeRe:c,t:d}=n(5471);const p=n(8646);const y=n(1159);const C=n(7163);const Q=n(6782)},6782:(e,t,n)=>{const o=/\s+/g;class Range{constructor(e,t){t=d(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof p){this.raw=e.value;this.set=[[e]];this.formatted=undefined;return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e.trim().replace(o," ");this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0){this.set=[e]}else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.formatted=undefined}get range(){if(this.formatted===undefined){this.formatted="";for(let e=0;e0){this.formatted+="||"}const t=this.set[e];for(let e=0;e0){this.formatted+=" "}this.formatted+=t[e].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=(this.options.includePrerelease&&V)|(this.options.loose&&ee);const n=t+":"+e;const o=c.get(n);if(o){return o}const i=this.options.loose;const d=i?Q[v.HYPHENRANGELOOSE]:Q[v.HYPHENRANGE];e=e.replace(d,hyphenReplace(this.options.includePrerelease));y("hyphen replace",e);e=e.replace(Q[v.COMPARATORTRIM],D);y("comparator trim",e);e=e.replace(Q[v.TILDETRIM],k);y("tilde trim",e);e=e.replace(Q[v.CARETTRIM],$);y("caret trim",e);let C=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));if(i){C=C.filter((e=>{y("loose invalid filter",e,this.options);return!!e.match(Q[v.COMPARATORLOOSE])}))}y("range list",C);const te=new Map;const re=C.map((e=>new p(e,this.options)));for(const e of re){if(isNullSet(e)){return[e]}te.set(e.value,e)}if(te.size>1&&te.has("")){te.delete("")}const ne=[...te.values()];c.set(n,ne);return ne}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((n=>isSatisfiable(n,t)&&e.set.some((e=>isSatisfiable(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new C(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let n=true;const o=e.slice();let i=o.pop();while(n&&o.length){n=o.every((e=>i.intersects(e,t)));i=o.pop()}return n};const parseComparator=(e,t)=>{e=e.replace(Q[v.BUILD],"");y("comp",e,t);e=replaceCarets(e,t);y("caret",e);e=replaceTildes(e,t);y("tildes",e);e=replaceXRanges(e,t);y("xrange",e);e=replaceStars(e,t);y("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const n=t.loose?Q[v.TILDELOOSE]:Q[v.TILDE];return e.replace(n,((t,n,o,i,c)=>{y("tilde",e,t,n,o,i,c);let d;if(isX(n)){d=""}else if(isX(o)){d=`>=${n}.0.0 <${+n+1}.0.0-0`}else if(isX(i)){d=`>=${n}.${o}.0 <${n}.${+o+1}.0-0`}else if(c){y("replaceTilde pr",c);d=`>=${n}.${o}.${i}-${c} <${n}.${+o+1}.0-0`}else{d=`>=${n}.${o}.${i} <${n}.${+o+1}.0-0`}y("tilde return",d);return d}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{y("caret",e,t);const n=t.loose?Q[v.CARETLOOSE]:Q[v.CARET];const o=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,c,d)=>{y("caret",e,t,n,i,c,d);let p;if(isX(n)){p=""}else if(isX(i)){p=`>=${n}.0.0${o} <${+n+1}.0.0-0`}else if(isX(c)){if(n==="0"){p=`>=${n}.${i}.0${o} <${n}.${+i+1}.0-0`}else{p=`>=${n}.${i}.0${o} <${+n+1}.0.0-0`}}else if(d){y("replaceCaret pr",d);if(n==="0"){if(i==="0"){p=`>=${n}.${i}.${c}-${d} <${n}.${i}.${+c+1}-0`}else{p=`>=${n}.${i}.${c}-${d} <${n}.${+i+1}.0-0`}}else{p=`>=${n}.${i}.${c}-${d} <${+n+1}.0.0-0`}}else{y("no pr");if(n==="0"){if(i==="0"){p=`>=${n}.${i}.${c}${o} <${n}.${i}.${+c+1}-0`}else{p=`>=${n}.${i}.${c}${o} <${n}.${+i+1}.0-0`}}else{p=`>=${n}.${i}.${c} <${+n+1}.0.0-0`}}y("caret return",p);return p}))};const replaceXRanges=(e,t)=>{y("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const n=t.loose?Q[v.XRANGELOOSE]:Q[v.XRANGE];return e.replace(n,((n,o,i,c,d,p)=>{y("xRange",e,n,o,i,c,d,p);const C=isX(i);const Q=C||isX(c);const v=Q||isX(d);const D=v;if(o==="="&&D){o=""}p=t.includePrerelease?"-0":"";if(C){if(o===">"||o==="<"){n="<0.0.0-0"}else{n="*"}}else if(o&&D){if(Q){c=0}d=0;if(o===">"){o=">=";if(Q){i=+i+1;c=0;d=0}else{c=+c+1;d=0}}else if(o==="<="){o="<";if(Q){i=+i+1}else{c=+c+1}}if(o==="<"){p="-0"}n=`${o+i}.${c}.${d}${p}`}else if(Q){n=`>=${i}.0.0${p} <${+i+1}.0.0-0`}else if(v){n=`>=${i}.${c}.0${p} <${i}.${+c+1}.0-0`}y("xRange return",n);return n}))};const replaceStars=(e,t)=>{y("replaceStars",e,t);return e.trim().replace(Q[v.STAR],"")};const replaceGTE0=(e,t)=>{y("replaceGTE0",e,t);return e.trim().replace(Q[t.includePrerelease?v.GTE0PRE:v.GTE0],"")};const hyphenReplace=e=>(t,n,o,i,c,d,p,y,C,Q,v,D)=>{if(isX(o)){n=""}else if(isX(i)){n=`>=${o}.0.0${e?"-0":""}`}else if(isX(c)){n=`>=${o}.${i}.0${e?"-0":""}`}else if(d){n=`>=${n}`}else{n=`>=${n}${e?"-0":""}`}if(isX(C)){y=""}else if(isX(Q)){y=`<${+C+1}.0.0-0`}else if(isX(v)){y=`<${C}.${+Q+1}.0-0`}else if(D){y=`<=${C}.${Q}.${v}-${D}`}else if(e){y=`<${C}.${Q}.${+v+1}-0`}else{y=`<=${y}`}return`${n} ${y}`.trim()};const testSet=(e,t,n)=>{for(let n=0;n0){const o=e[n].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch){return true}}}return false}return true}},7163:(e,t,n)=>{const o=n(1159);const{MAX_LENGTH:i,MAX_SAFE_INTEGER:c}=n(5101);const{safeRe:d,t:p}=n(5471);const y=n(356);const{compareIdentifiers:C}=n(3348);class SemVer{constructor(e,t){t=y(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`)}if(e.length>i){throw new TypeError(`version is longer than ${i} characters`)}o("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?d[p.LOOSE]:d[p.FULL]);if(!n){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>c||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>c||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>c||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&te.major){return 1}if(this.minore.minor){return 1}if(this.patche.patch){return 1}return 0}comparePre(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}if(this.prerelease.length&&!e.prerelease.length){return-1}else if(!this.prerelease.length&&e.prerelease.length){return 1}else if(!this.prerelease.length&&!e.prerelease.length){return 0}let t=0;do{const n=this.prerelease[t];const i=e.prerelease[t];o("prerelease compare",t,n,i);if(n===undefined&&i===undefined){return 0}else if(i===undefined){return 1}else if(n===undefined){return-1}else if(n===i){continue}else{return C(n,i)}}while(++t)}compareBuild(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}let t=0;do{const n=this.build[t];const i=e.build[t];o("build compare",t,n,i);if(n===undefined&&i===undefined){return 0}else if(i===undefined){return 1}else if(n===undefined){return-1}else if(n===i){continue}else{return C(n,i)}}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&n===false){throw new Error("invalid increment argument: identifier is empty")}if(t){const e=`-${t}`.match(this.options.loose?d[p.PRERELEASELOOSE]:d[p.PRERELEASE]);if(!e||e[1]!==t){throw new Error(`invalid identifier: ${t}`)}}}switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0;this.inc("patch",t,n);this.inc("pre",t,n);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",t,n)}this.inc("pre",t,n);break;case"release":if(this.prerelease.length===0){throw new Error(`version ${this.raw} is not a prerelease`)}this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(this.prerelease.length===0){this.prerelease=[e]}else{let o=this.prerelease.length;while(--o>=0){if(typeof this.prerelease[o]==="number"){this.prerelease[o]++;o=-2}}if(o===-1){if(t===this.prerelease.join(".")&&n===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(e)}}if(t){let o=[t,e];if(n===false){o=[t]}if(C(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1])){this.prerelease=o}}else{this.prerelease=o}}break}default:throw new Error(`invalid increment argument: ${e}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}e.exports=SemVer},1799:(e,t,n)=>{const o=n(6353);const clean=(e,t)=>{const n=o(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};e.exports=clean},8646:(e,t,n)=>{const o=n(5082);const i=n(4974);const c=n(6599);const d=n(1236);const p=n(3872);const y=n(6717);const cmp=(e,t,n,C)=>{switch(t){case"===":if(typeof e==="object"){e=e.version}if(typeof n==="object"){n=n.version}return e===n;case"!==":if(typeof e==="object"){e=e.version}if(typeof n==="object"){n=n.version}return e!==n;case"":case"=":case"==":return o(e,n,C);case"!=":return i(e,n,C);case">":return c(e,n,C);case">=":return d(e,n,C);case"<":return p(e,n,C);case"<=":return y(e,n,C);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},5385:(e,t,n)=>{const o=n(7163);const i=n(6353);const{safeRe:c,t:d}=n(5471);const coerce=(e,t)=>{if(e instanceof o){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let n=null;if(!t.rtl){n=e.match(t.includePrerelease?c[d.COERCEFULL]:c[d.COERCE])}else{const o=t.includePrerelease?c[d.COERCERTLFULL]:c[d.COERCERTL];let i;while((i=o.exec(e))&&(!n||n.index+n[0].length!==e.length)){if(!n||i.index+i[0].length!==n.index+n[0].length){n=i}o.lastIndex=i.index+i[1].length+i[2].length}o.lastIndex=-1}if(n===null){return null}const p=n[2];const y=n[3]||"0";const C=n[4]||"0";const Q=t.includePrerelease&&n[5]?`-${n[5]}`:"";const v=t.includePrerelease&&n[6]?`+${n[6]}`:"";return i(`${p}.${y}.${C}${Q}${v}`,t)};e.exports=coerce},7648:(e,t,n)=>{const o=n(7163);const compareBuild=(e,t,n)=>{const i=new o(e,n);const c=new o(t,n);return i.compare(c)||i.compareBuild(c)};e.exports=compareBuild},6874:(e,t,n)=>{const o=n(8469);const compareLoose=(e,t)=>o(e,t,true);e.exports=compareLoose},8469:(e,t,n)=>{const o=n(7163);const compare=(e,t,n)=>new o(e,n).compare(new o(t,n));e.exports=compare},711:(e,t,n)=>{const o=n(6353);const diff=(e,t)=>{const n=o(e,null,true);const i=o(t,null,true);const c=n.compare(i);if(c===0){return null}const d=c>0;const p=d?n:i;const y=d?i:n;const C=!!p.prerelease.length;const Q=!!y.prerelease.length;if(Q&&!C){if(!y.patch&&!y.minor){return"major"}if(y.compareMain(p)===0){if(y.minor&&!y.patch){return"minor"}return"patch"}}const v=C?"pre":"";if(n.major!==i.major){return v+"major"}if(n.minor!==i.minor){return v+"minor"}if(n.patch!==i.patch){return v+"patch"}return"prerelease"};e.exports=diff},5082:(e,t,n)=>{const o=n(8469);const eq=(e,t,n)=>o(e,t,n)===0;e.exports=eq},6599:(e,t,n)=>{const o=n(8469);const gt=(e,t,n)=>o(e,t,n)>0;e.exports=gt},1236:(e,t,n)=>{const o=n(8469);const gte=(e,t,n)=>o(e,t,n)>=0;e.exports=gte},2338:(e,t,n)=>{const o=n(7163);const inc=(e,t,n,i,c)=>{if(typeof n==="string"){c=i;i=n;n=undefined}try{return new o(e instanceof o?e.version:e,n).inc(t,i,c).version}catch(e){return null}};e.exports=inc},3872:(e,t,n)=>{const o=n(8469);const lt=(e,t,n)=>o(e,t,n)<0;e.exports=lt},6717:(e,t,n)=>{const o=n(8469);const lte=(e,t,n)=>o(e,t,n)<=0;e.exports=lte},8511:(e,t,n)=>{const o=n(7163);const major=(e,t)=>new o(e,t).major;e.exports=major},2603:(e,t,n)=>{const o=n(7163);const minor=(e,t)=>new o(e,t).minor;e.exports=minor},4974:(e,t,n)=>{const o=n(8469);const neq=(e,t,n)=>o(e,t,n)!==0;e.exports=neq},6353:(e,t,n)=>{const o=n(7163);const parse=(e,t,n=false)=>{if(e instanceof o){return e}try{return new o(e,t)}catch(e){if(!n){return null}throw e}};e.exports=parse},8756:(e,t,n)=>{const o=n(7163);const patch=(e,t)=>new o(e,t).patch;e.exports=patch},5714:(e,t,n)=>{const o=n(6353);const prerelease=(e,t)=>{const n=o(e,t);return n&&n.prerelease.length?n.prerelease:null};e.exports=prerelease},2173:(e,t,n)=>{const o=n(8469);const rcompare=(e,t,n)=>o(t,e,n);e.exports=rcompare},7192:(e,t,n)=>{const o=n(7648);const rsort=(e,t)=>e.sort(((e,n)=>o(n,e,t)));e.exports=rsort},8011:(e,t,n)=>{const o=n(6782);const satisfies=(e,t,n)=>{try{t=new o(t,n)}catch(e){return false}return t.test(e)};e.exports=satisfies},9872:(e,t,n)=>{const o=n(7648);const sort=(e,t)=>e.sort(((e,n)=>o(e,n,t)));e.exports=sort},8780:(e,t,n)=>{const o=n(6353);const valid=(e,t)=>{const n=o(e,t);return n?n.version:null};e.exports=valid},2088:(e,t,n)=>{const o=n(5471);const i=n(5101);const c=n(7163);const d=n(3348);const p=n(6353);const y=n(8780);const C=n(1799);const Q=n(2338);const v=n(711);const D=n(8511);const k=n(2603);const $=n(8756);const V=n(5714);const ee=n(8469);const te=n(2173);const re=n(6874);const ne=n(7648);const se=n(9872);const oe=n(7192);const ie=n(6599);const ae=n(3872);const ce=n(5082);const le=n(4974);const ue=n(1236);const de=n(6717);const pe=n(8646);const Ae=n(5385);const me=n(9379);const ge=n(6782);const fe=n(8011);const he=n(4750);const ye=n(5574);const Ee=n(8595);const Ce=n(1866);const Ie=n(4737);const be=n(280);const Se=n(2276);const Be=n(5213);const we=n(3465);const Re=n(2028);const Ne=n(1489);e.exports={parse:p,valid:y,clean:C,inc:Q,diff:v,major:D,minor:k,patch:$,prerelease:V,compare:ee,rcompare:te,compareLoose:re,compareBuild:ne,sort:se,rsort:oe,gt:ie,lt:ae,eq:ce,neq:le,gte:ue,lte:de,cmp:pe,coerce:Ae,Comparator:me,Range:ge,satisfies:fe,toComparators:he,maxSatisfying:ye,minSatisfying:Ee,minVersion:Ce,validRange:Ie,outside:be,gtr:Se,ltr:Be,intersects:we,simplifyRange:Re,subset:Ne,SemVer:c,re:o.re,src:o.src,tokens:o.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:d.compareIdentifiers,rcompareIdentifiers:d.rcompareIdentifiers}},5101:e=>{const t="2.0.0";const n=256;const o=Number.MAX_SAFE_INTEGER||9007199254740991;const i=16;const c=n-6;const d=["major","premajor","minor","preminor","patch","prepatch","prerelease"];e.exports={MAX_LENGTH:n,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:o,RELEASE_TYPES:d,SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},1159:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},3348:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,n)=>{if(typeof e==="number"&&typeof n==="number"){return e===n?0:ecompareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},1383:e=>{class LRUCache{constructor(){this.max=1e3;this.map=new Map}get(e){const t=this.map.get(e);if(t===undefined){return undefined}else{this.map.delete(e);this.map.set(e,t);return t}}delete(e){return this.map.delete(e)}set(e,t){const n=this.delete(e);if(!n&&t!==undefined){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}e.exports=LRUCache},356:e=>{const t=Object.freeze({loose:true});const n=Object.freeze({});const parseOptions=e=>{if(!e){return n}if(typeof e!=="object"){return t}return e};e.exports=parseOptions},5471:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:o,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:c}=n(5101);const d=n(1159);t=e.exports={};const p=t.re=[];const y=t.safeRe=[];const C=t.src=[];const Q=t.safeSrc=[];const v=t.t={};let D=0;const k="[a-zA-Z0-9-]";const $=[["\\s",1],["\\d",c],[k,i]];const makeSafeRegex=e=>{for(const[t,n]of $){e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`)}return e};const createToken=(e,t,n)=>{const o=makeSafeRegex(t);const i=D++;d(e,i,t);v[e]=i;C[i]=t;Q[i]=o;p[i]=new RegExp(t,n?"g":undefined);y[i]=new RegExp(o,n?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${k}*`);createToken("MAINVERSION",`(${C[v.NUMERICIDENTIFIER]})\\.`+`(${C[v.NUMERICIDENTIFIER]})\\.`+`(${C[v.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${C[v.NUMERICIDENTIFIERLOOSE]})\\.`+`(${C[v.NUMERICIDENTIFIERLOOSE]})\\.`+`(${C[v.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${C[v.NONNUMERICIDENTIFIER]}|${C[v.NUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${C[v.NONNUMERICIDENTIFIER]}|${C[v.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASE",`(?:-(${C[v.PRERELEASEIDENTIFIER]}(?:\\.${C[v.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${C[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[v.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${k}+`);createToken("BUILD",`(?:\\+(${C[v.BUILDIDENTIFIER]}(?:\\.${C[v.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${C[v.MAINVERSION]}${C[v.PRERELEASE]}?${C[v.BUILD]}?`);createToken("FULL",`^${C[v.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${C[v.MAINVERSIONLOOSE]}${C[v.PRERELEASELOOSE]}?${C[v.BUILD]}?`);createToken("LOOSE",`^${C[v.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${C[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${C[v.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${C[v.XRANGEIDENTIFIER]})`+`(?:\\.(${C[v.XRANGEIDENTIFIER]})`+`(?:\\.(${C[v.XRANGEIDENTIFIER]})`+`(?:${C[v.PRERELEASE]})?${C[v.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:${C[v.PRERELEASELOOSE]})?${C[v.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${C[v.GTLT]}\\s*${C[v.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${C[v.GTLT]}\\s*${C[v.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`${"(^|[^\\d])"+"(\\d{1,"}${o}})`+`(?:\\.(\\d{1,${o}}))?`+`(?:\\.(\\d{1,${o}}))?`);createToken("COERCE",`${C[v.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",C[v.COERCEPLAIN]+`(?:${C[v.PRERELEASE]})?`+`(?:${C[v.BUILD]})?`+`(?:$|[^\\d])`);createToken("COERCERTL",C[v.COERCE],true);createToken("COERCERTLFULL",C[v.COERCEFULL],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${C[v.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${C[v.LONETILDE]}${C[v.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${C[v.LONETILDE]}${C[v.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${C[v.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${C[v.LONECARET]}${C[v.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${C[v.LONECARET]}${C[v.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${C[v.GTLT]}\\s*(${C[v.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${C[v.GTLT]}\\s*(${C[v.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${C[v.GTLT]}\\s*(${C[v.LOOSEPLAIN]}|${C[v.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${C[v.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${C[v.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${C[v.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${C[v.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},2276:(e,t,n)=>{const o=n(280);const gtr=(e,t,n)=>o(e,t,">",n);e.exports=gtr},3465:(e,t,n)=>{const o=n(6782);const intersects=(e,t,n)=>{e=new o(e,n);t=new o(t,n);return e.intersects(t,n)};e.exports=intersects},5213:(e,t,n)=>{const o=n(280);const ltr=(e,t,n)=>o(e,t,"<",n);e.exports=ltr},5574:(e,t,n)=>{const o=n(7163);const i=n(6782);const maxSatisfying=(e,t,n)=>{let c=null;let d=null;let p=null;try{p=new i(t,n)}catch(e){return null}e.forEach((e=>{if(p.test(e)){if(!c||d.compare(e)===-1){c=e;d=new o(c,n)}}}));return c};e.exports=maxSatisfying},8595:(e,t,n)=>{const o=n(7163);const i=n(6782);const minSatisfying=(e,t,n)=>{let c=null;let d=null;let p=null;try{p=new i(t,n)}catch(e){return null}e.forEach((e=>{if(p.test(e)){if(!c||d.compare(e)===1){c=e;d=new o(c,n)}}}));return c};e.exports=minSatisfying},1866:(e,t,n)=>{const o=n(7163);const i=n(6782);const c=n(6599);const minVersion=(e,t)=>{e=new i(e,t);let n=new o("0.0.0");if(e.test(n)){return n}n=new o("0.0.0-0");if(e.test(n)){return n}n=null;for(let t=0;t{const t=new o(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!d||c(t,d)){d=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(d&&(!n||c(n,d))){n=d}}if(n&&e.test(n)){return n}return null};e.exports=minVersion},280:(e,t,n)=>{const o=n(7163);const i=n(9379);const{ANY:c}=i;const d=n(6782);const p=n(8011);const y=n(6599);const C=n(3872);const Q=n(6717);const v=n(1236);const outside=(e,t,n,D)=>{e=new o(e,D);t=new d(t,D);let k,$,V,ee,te;switch(n){case">":k=y;$=Q;V=C;ee=">";te=">=";break;case"<":k=C;$=v;V=y;ee="<";te="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(p(e,t,D)){return false}for(let n=0;n{if(e.semver===c){e=new i(">=0.0.0")}d=d||e;p=p||e;if(k(e.semver,d.semver,D)){d=e}else if(V(e.semver,p.semver,D)){p=e}}));if(d.operator===ee||d.operator===te){return false}if((!p.operator||p.operator===ee)&&$(e,p.semver)){return false}else if(p.operator===te&&V(e,p.semver)){return false}}return true};e.exports=outside},2028:(e,t,n)=>{const o=n(8011);const i=n(8469);e.exports=(e,t,n)=>{const c=[];let d=null;let p=null;const y=e.sort(((e,t)=>i(e,t,n)));for(const e of y){const i=o(e,t,n);if(i){p=e;if(!d){d=e}}else{if(p){c.push([d,p])}p=null;d=null}}if(d){c.push([d,null])}const C=[];for(const[e,t]of c){if(e===t){C.push(e)}else if(!t&&e===y[0]){C.push("*")}else if(!t){C.push(`>=${e}`)}else if(e===y[0]){C.push(`<=${t}`)}else{C.push(`${e} - ${t}`)}}const Q=C.join(" || ");const v=typeof t.raw==="string"?t.raw:String(t);return Q.length{const o=n(6782);const i=n(9379);const{ANY:c}=i;const d=n(8011);const p=n(8469);const subset=(e,t,n={})=>{if(e===t){return true}e=new o(e,n);t=new o(t,n);let i=false;e:for(const o of e.set){for(const e of t.set){const t=simpleSubset(o,e,n);i=i||t!==null;if(t){continue e}}if(i){return false}}return true};const y=[new i(">=0.0.0-0")];const C=[new i(">=0.0.0")];const simpleSubset=(e,t,n)=>{if(e===t){return true}if(e.length===1&&e[0].semver===c){if(t.length===1&&t[0].semver===c){return true}else if(n.includePrerelease){e=y}else{e=C}}if(t.length===1&&t[0].semver===c){if(n.includePrerelease){return true}else{t=C}}const o=new Set;let i,Q;for(const t of e){if(t.operator===">"||t.operator===">="){i=higherGT(i,t,n)}else if(t.operator==="<"||t.operator==="<="){Q=lowerLT(Q,t,n)}else{o.add(t.semver)}}if(o.size>1){return null}let v;if(i&&Q){v=p(i.semver,Q.semver,n);if(v>0){return null}else if(v===0&&(i.operator!==">="||Q.operator!=="<=")){return null}}for(const e of o){if(i&&!d(e,String(i),n)){return null}if(Q&&!d(e,String(Q),n)){return null}for(const o of t){if(!d(e,String(o),n)){return false}}return true}let D,k;let $,V;let ee=Q&&!n.includePrerelease&&Q.semver.prerelease.length?Q.semver:false;let te=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:false;if(ee&&ee.prerelease.length===1&&Q.operator==="<"&&ee.prerelease[0]===0){ee=false}for(const e of t){V=V||e.operator===">"||e.operator===">=";$=$||e.operator==="<"||e.operator==="<=";if(i){if(te){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===te.major&&e.semver.minor===te.minor&&e.semver.patch===te.patch){te=false}}if(e.operator===">"||e.operator===">="){D=higherGT(i,e,n);if(D===e&&D!==i){return false}}else if(i.operator===">="&&!d(i.semver,String(e),n)){return false}}if(Q){if(ee){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===ee.major&&e.semver.minor===ee.minor&&e.semver.patch===ee.patch){ee=false}}if(e.operator==="<"||e.operator==="<="){k=lowerLT(Q,e,n);if(k===e&&k!==Q){return false}}else if(Q.operator==="<="&&!d(Q.semver,String(e),n)){return false}}if(!e.operator&&(Q||i)&&v!==0){return false}}if(i&&$&&!Q&&v!==0){return false}if(Q&&V&&!i&&v!==0){return false}if(te||ee){return false}return true};const higherGT=(e,t,n)=>{if(!e){return t}const o=p(e.semver,t.semver,n);return o>0?e:o<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,n)=>{if(!e){return t}const o=p(e.semver,t.semver,n);return o<0?e:o>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},4750:(e,t,n)=>{const o=n(6782);const toComparators=(e,t)=>new o(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},4737:(e,t,n)=>{const o=n(6782);const validRange=(e,t)=>{try{return new o(e,t).range||"*"}catch(e){return null}};e.exports=validRange},1450:(e,t,n)=>{const o=n(857);const i=n(2018);const c=n(3813);const{env:d}=process;let p;if(c("no-color")||c("no-colors")||c("color=false")||c("color=never")){p=0}else if(c("color")||c("colors")||c("color=true")||c("color=always")){p=1}if("FORCE_COLOR"in d){if(d.FORCE_COLOR==="true"){p=1}else if(d.FORCE_COLOR==="false"){p=0}else{p=d.FORCE_COLOR.length===0?1:Math.min(parseInt(d.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e,t){if(p===0){return 0}if(c("color=16m")||c("color=full")||c("color=truecolor")){return 3}if(c("color=256")){return 2}if(e&&!t&&p===undefined){return 0}const n=p||0;if(d.TERM==="dumb"){return n}if(process.platform==="win32"){const e=o.release().split(".");if(Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in d){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in d))||d.CI_NAME==="codeship"){return 1}return n}if("TEAMCITY_VERSION"in d){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(d.TEAMCITY_VERSION)?1:0}if(d.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in d){const e=parseInt((d.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(d.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(d.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(d.TERM)){return 1}if("COLORTERM"in d){return 1}return n}function getSupportLevel(e){const t=supportsColor(e,e&&e.isTTY);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,i.isatty(1))),stderr:translateLevel(supportsColor(true,i.isatty(2)))}},1288:(e,t,n)=>{var o; +import './sourcemap-register.cjs';import{createRequire as e}from"module";var t={3311:function(e,t){var n=this&&this.__awaiter||function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(o.next(e))}catch(e){i(e)}}function rejected(e){try{step(o["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.ClientStreamingCall=void 0;class ClientStreamingCall{constructor(e,t,n,o,i,c,d){this.method=e;this.requestHeaders=t;this.requests=n;this.headers=o;this.response=i;this.status=c;this.trailers=d}then(e,t){return this.promiseFinished().then((t=>e?Promise.resolve(e(t)):t),(e=>t?Promise.resolve(t(e)):Promise.reject(e)))}promiseFinished(){return n(this,void 0,void 0,(function*(){let[e,t,n,o]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,response:t,status:n,trailers:o}}))}}t.ClientStreamingCall=ClientStreamingCall},9499:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.Deferred=t.DeferredState=void 0;var n;(function(e){e[e["PENDING"]=0]="PENDING";e[e["REJECTED"]=1]="REJECTED";e[e["RESOLVED"]=2]="RESOLVED"})(n=t.DeferredState||(t.DeferredState={}));class Deferred{constructor(e=true){this._state=n.PENDING;this._promise=new Promise(((e,t)=>{this._resolve=e;this._reject=t}));if(e){this._promise.catch((e=>{}))}}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==n.PENDING)throw new Error(`cannot resolve ${n[this.state].toLowerCase()}`);this._resolve(e);this._state=n.RESOLVED}reject(e){if(this.state!==n.PENDING)throw new Error(`cannot reject ${n[this.state].toLowerCase()}`);this._reject(e);this._state=n.REJECTED}resolvePending(e){if(this._state===n.PENDING)this.resolve(e)}rejectPending(e){if(this._state===n.PENDING)this.reject(e)}}t.Deferred=Deferred},800:function(e,t){var n=this&&this.__awaiter||function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(o.next(e))}catch(e){i(e)}}function rejected(e){try{step(o["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.DuplexStreamingCall=void 0;class DuplexStreamingCall{constructor(e,t,n,o,i,c,d){this.method=e;this.requestHeaders=t;this.requests=n;this.headers=o;this.responses=i;this.status=c;this.trailers=d}then(e,t){return this.promiseFinished().then((t=>e?Promise.resolve(e(t)):t),(e=>t?Promise.resolve(t(e)):Promise.reject(e)))}promiseFinished(){return n(this,void 0,void 0,(function*(){let[e,t,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,headers:e,status:t,trailers:n}}))}}t.DuplexStreamingCall=DuplexStreamingCall},6762:(e,t,n)=>{var o;o={value:true};var i=n(2554);Object.defineProperty(t,"C0",{enumerable:true,get:function(){return i.ServiceType}});var c=n(3402);o={enumerable:true,get:function(){return c.readMethodOptions}};o={enumerable:true,get:function(){return c.readMethodOption}};o={enumerable:true,get:function(){return c.readServiceOption}};var d=n(422);o={enumerable:true,get:function(){return d.RpcError}};var p=n(3474);o={enumerable:true,get:function(){return p.mergeRpcOptions}};var y=n(6407);o={enumerable:true,get:function(){return y.RpcOutputStreamController}};var C=n(5435);o={enumerable:true,get:function(){return C.TestTransport}};var Q=n(9499);o={enumerable:true,get:function(){return Q.Deferred}};o={enumerable:true,get:function(){return Q.DeferredState}};var v=n(800);o={enumerable:true,get:function(){return v.DuplexStreamingCall}};var D=n(3311);o={enumerable:true,get:function(){return D.ClientStreamingCall}};var k=n(2715);o={enumerable:true,get:function(){return k.ServerStreamingCall}};var $=n(738);o={enumerable:true,get:function(){return $.UnaryCall}};var V=n(4359);o={enumerable:true,get:function(){return V.stackIntercept}};o={enumerable:true,get:function(){return V.stackDuplexStreamingInterceptors}};o={enumerable:true,get:function(){return V.stackClientStreamingInterceptors}};o={enumerable:true,get:function(){return V.stackServerStreamingInterceptors}};o={enumerable:true,get:function(){return V.stackUnaryInterceptors}};var ee=n(4626);o={enumerable:true,get:function(){return ee.ServerCallContextController}}},3402:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.readServiceOption=t.readMethodOption=t.readMethodOptions=t.normalizeMethodInfo=void 0;const o=n(8372);function normalizeMethodInfo(e,t){var n,i,c;let d=e;d.service=t;d.localName=(n=d.localName)!==null&&n!==void 0?n:o.lowerCamelCase(d.name);d.serverStreaming=!!d.serverStreaming;d.clientStreaming=!!d.clientStreaming;d.options=(i=d.options)!==null&&i!==void 0?i:{};d.idempotency=(c=d.idempotency)!==null&&c!==void 0?c:undefined;return d}t.normalizeMethodInfo=normalizeMethodInfo;function readMethodOptions(e,t,n,o){var i;const c=(i=e.methods.find(((e,n)=>e.localName===t||n===t)))===null||i===void 0?void 0:i.options;return c&&c[n]?o.fromJson(c[n]):undefined}t.readMethodOptions=readMethodOptions;function readMethodOption(e,t,n,o){var i;const c=(i=e.methods.find(((e,n)=>e.localName===t||n===t)))===null||i===void 0?void 0:i.options;if(!c){return undefined}const d=c[n];if(d===undefined){return d}return o?o.fromJson(d):d}t.readMethodOption=readMethodOption;function readServiceOption(e,t,n){const o=e.options;if(!o){return undefined}const i=o[t];if(i===undefined){return i}return n?n.fromJson(i):i}t.readServiceOption=readServiceOption},422:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.RpcError=void 0;class RpcError extends Error{constructor(e,t="UNKNOWN",n){super(e);this.name="RpcError";Object.setPrototypeOf(this,new.target.prototype);this.code=t;this.meta=n!==null&&n!==void 0?n:{}}toString(){const e=[this.name+": "+this.message];if(this.code){e.push("");e.push("Code: "+this.code)}if(this.serviceName&&this.methodName){e.push("Method: "+this.serviceName+"/"+this.methodName)}let t=Object.entries(this.meta);if(t.length){e.push("");e.push("Meta:");for(let[n,o]of t){e.push(` ${n}: ${o}`)}}return e.join("\n")}}t.RpcError=RpcError},4359:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.stackDuplexStreamingInterceptors=t.stackClientStreamingInterceptors=t.stackServerStreamingInterceptors=t.stackUnaryInterceptors=t.stackIntercept=void 0;const o=n(8372);function stackIntercept(e,t,n,i,c){var d,p,y,C;if(e=="unary"){let tail=(e,n,o)=>t.unary(e,n,o);for(const e of((d=i.interceptors)!==null&&d!==void 0?d:[]).filter((e=>e.interceptUnary)).reverse()){const t=tail;tail=(n,o,i)=>e.interceptUnary(t,n,o,i)}return tail(n,c,i)}if(e=="serverStreaming"){let tail=(e,n,o)=>t.serverStreaming(e,n,o);for(const e of((p=i.interceptors)!==null&&p!==void 0?p:[]).filter((e=>e.interceptServerStreaming)).reverse()){const t=tail;tail=(n,o,i)=>e.interceptServerStreaming(t,n,o,i)}return tail(n,c,i)}if(e=="clientStreaming"){let tail=(e,n)=>t.clientStreaming(e,n);for(const e of((y=i.interceptors)!==null&&y!==void 0?y:[]).filter((e=>e.interceptClientStreaming)).reverse()){const t=tail;tail=(n,o)=>e.interceptClientStreaming(t,n,o)}return tail(n,i)}if(e=="duplex"){let tail=(e,n)=>t.duplex(e,n);for(const e of((C=i.interceptors)!==null&&C!==void 0?C:[]).filter((e=>e.interceptDuplex)).reverse()){const t=tail;tail=(n,o)=>e.interceptDuplex(t,n,o)}return tail(n,i)}o.assertNever(e)}t.stackIntercept=stackIntercept;function stackUnaryInterceptors(e,t,n,o){return stackIntercept("unary",e,t,o,n)}t.stackUnaryInterceptors=stackUnaryInterceptors;function stackServerStreamingInterceptors(e,t,n,o){return stackIntercept("serverStreaming",e,t,o,n)}t.stackServerStreamingInterceptors=stackServerStreamingInterceptors;function stackClientStreamingInterceptors(e,t,n){return stackIntercept("clientStreaming",e,t,n)}t.stackClientStreamingInterceptors=stackClientStreamingInterceptors;function stackDuplexStreamingInterceptors(e,t,n){return stackIntercept("duplex",e,t,n)}t.stackDuplexStreamingInterceptors=stackDuplexStreamingInterceptors},3474:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.mergeRpcOptions=void 0;const o=n(8372);function mergeRpcOptions(e,t){if(!t)return e;let n={};copy(e,n);copy(t,n);for(let i of Object.keys(t)){let c=t[i];switch(i){case"jsonOptions":n.jsonOptions=o.mergeJsonOptions(e.jsonOptions,n.jsonOptions);break;case"binaryOptions":n.binaryOptions=o.mergeBinaryOptions(e.binaryOptions,n.binaryOptions);break;case"meta":n.meta={};copy(e.meta,n.meta);copy(t.meta,n.meta);break;case"interceptors":n.interceptors=e.interceptors?e.interceptors.concat(c):c.concat();break}}return n}t.mergeRpcOptions=mergeRpcOptions;function copy(e,t){if(!e)return;let n=t;for(let[t,o]of Object.entries(e)){if(o instanceof Date)n[t]=new Date(o.getTime());else if(Array.isArray(o))n[t]=o.concat();else n[t]=o}}},6407:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.RpcOutputStreamController=void 0;const o=n(9499);const i=n(8372);class RpcOutputStreamController{constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]};this._closed=false;this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,t){t.push(e);return()=>{let n=t.indexOf(e);if(n>=0)t.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==false}notifyNext(e,t,n){i.assert((e?1:0)+(t?1:0)+(n?1:0)<=1,"only one emission at a time");if(e)this.notifyMessage(e);if(t)this.notifyError(t);if(n)this.notifyComplete()}notifyMessage(e){i.assert(!this.closed,"stream is closed");this.pushIt({value:e,done:false});this._lis.msg.forEach((t=>t(e)));this._lis.nxt.forEach((t=>t(e,undefined,false)))}notifyError(e){i.assert(!this.closed,"stream is closed");this._closed=e;this.pushIt(e);this._lis.err.forEach((t=>t(e)));this._lis.nxt.forEach((t=>t(undefined,e,false)));this.clearLis()}notifyComplete(){i.assert(!this.closed,"stream is closed");this._closed=true;this.pushIt({value:null,done:true});this._lis.cmp.forEach((e=>e()));this._lis.nxt.forEach((e=>e(undefined,undefined,true)));this.clearLis()}[Symbol.asyncIterator](){if(this._closed===true)this.pushIt({value:null,done:true});else if(this._closed!==false)this.pushIt(this._closed);return{next:()=>{let e=this._itState;i.assert(e,"bad state");i.assert(!e.p,"iterator contract broken");let t=e.q.shift();if(t)return"value"in t?Promise.resolve(t):Promise.reject(t);e.p=new o.Deferred;return e.p.promise}}}pushIt(e){let t=this._itState;if(t.p){const n=t.p;i.assert(n.state==o.DeferredState.PENDING,"iterator contract broken");"value"in e?n.resolve(e):n.reject(e);delete t.p}else{t.q.push(e)}}}t.RpcOutputStreamController=RpcOutputStreamController},4626:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ServerCallContextController=void 0;class ServerCallContextController{constructor(e,t,n,o,i={code:"OK",detail:""}){this._cancelled=false;this._listeners=[];this.method=e;this.headers=t;this.deadline=n;this.trailers={};this._sendRH=o;this.status=i}notifyCancelled(){if(!this._cancelled){this._cancelled=true;for(let e of this._listeners){e()}}}sendResponseHeaders(e){this._sendRH(e)}get cancelled(){return this._cancelled}onCancel(e){const t=this._listeners;t.push(e);return()=>{let n=t.indexOf(e);if(n>=0)t.splice(n,1)}}}t.ServerCallContextController=ServerCallContextController},2715:function(e,t){var n=this&&this.__awaiter||function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(o.next(e))}catch(e){i(e)}}function rejected(e){try{step(o["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.ServerStreamingCall=void 0;class ServerStreamingCall{constructor(e,t,n,o,i,c,d){this.method=e;this.requestHeaders=t;this.request=n;this.headers=o;this.responses=i;this.status=c;this.trailers=d}then(e,t){return this.promiseFinished().then((t=>e?Promise.resolve(e(t)):t),(e=>t?Promise.resolve(t(e)):Promise.reject(e)))}promiseFinished(){return n(this,void 0,void 0,(function*(){let[e,t,n]=yield Promise.all([this.headers,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,status:t,trailers:n}}))}}t.ServerStreamingCall=ServerStreamingCall},2554:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ServiceType=void 0;const o=n(3402);class ServiceType{constructor(e,t,n){this.typeName=e;this.methods=t.map((e=>o.normalizeMethodInfo(e,this)));this.options=n!==null&&n!==void 0?n:{}}}t.ServiceType=ServiceType},5435:function(e,t,n){var o=this&&this.__awaiter||function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(o.next(e))}catch(e){i(e)}}function rejected(e){try{step(o["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.TestTransport=void 0;const i=n(422);const c=n(8372);const d=n(6407);const p=n(3474);const y=n(738);const C=n(2715);const Q=n(3311);const v=n(800);class TestTransport{constructor(e){this.suppressUncaughtRejections=true;this.headerDelay=10;this.responseDelay=50;this.betweenResponseDelay=10;this.afterResponseDelay=10;this.data=e!==null&&e!==void 0?e:{}}get sentMessages(){if(this.lastInput instanceof TestInputStream){return this.lastInput.sent}else if(typeof this.lastInput=="object"){return[this.lastInput.single]}return[]}get sendComplete(){if(this.lastInput instanceof TestInputStream){return this.lastInput.completed}else if(typeof this.lastInput=="object"){return true}return false}promiseHeaders(){var e;const t=(e=this.data.headers)!==null&&e!==void 0?e:TestTransport.defaultHeaders;return t instanceof i.RpcError?Promise.reject(t):Promise.resolve(t)}promiseSingleResponse(e){if(this.data.response instanceof i.RpcError){return Promise.reject(this.data.response)}let t;if(Array.isArray(this.data.response)){c.assert(this.data.response.length>0);t=this.data.response[0]}else if(this.data.response!==undefined){t=this.data.response}else{t=e.O.create()}c.assert(e.O.is(t));return Promise.resolve(t)}streamResponses(e,t,n){return o(this,void 0,void 0,(function*(){const o=[];if(this.data.response===undefined){o.push(e.O.create())}else if(Array.isArray(this.data.response)){for(let t of this.data.response){c.assert(e.O.is(t));o.push(t)}}else if(!(this.data.response instanceof i.RpcError)){c.assert(e.O.is(this.data.response));o.push(this.data.response)}try{yield delay(this.responseDelay,n)(undefined)}catch(e){t.notifyError(e);return}if(this.data.response instanceof i.RpcError){t.notifyError(this.data.response);return}for(let e of o){t.notifyMessage(e);try{yield delay(this.betweenResponseDelay,n)(undefined)}catch(e){t.notifyError(e);return}}if(this.data.status instanceof i.RpcError){t.notifyError(this.data.status);return}if(this.data.trailers instanceof i.RpcError){t.notifyError(this.data.trailers);return}t.notifyComplete()}))}promiseStatus(){var e;const t=(e=this.data.status)!==null&&e!==void 0?e:TestTransport.defaultStatus;return t instanceof i.RpcError?Promise.reject(t):Promise.resolve(t)}promiseTrailers(){var e;const t=(e=this.data.trailers)!==null&&e!==void 0?e:TestTransport.defaultTrailers;return t instanceof i.RpcError?Promise.reject(t):Promise.resolve(t)}maybeSuppressUncaught(...e){if(this.suppressUncaughtRejections){for(let t of e){t.catch((()=>{}))}}}mergeOptions(e){return p.mergeRpcOptions({},e)}unary(e,t,n){var o;const i=(o=n.meta)!==null&&o!==void 0?o:{},c=this.promiseHeaders().then(delay(this.headerDelay,n.abort)),d=c.catch((e=>{})).then(delay(this.responseDelay,n.abort)).then((t=>this.promiseSingleResponse(e))),p=d.catch((e=>{})).then(delay(this.afterResponseDelay,n.abort)).then((e=>this.promiseStatus())),C=d.catch((e=>{})).then(delay(this.afterResponseDelay,n.abort)).then((e=>this.promiseTrailers()));this.maybeSuppressUncaught(p,C);this.lastInput={single:t};return new y.UnaryCall(e,i,t,c,d,p,C)}serverStreaming(e,t,n){var o;const i=(o=n.meta)!==null&&o!==void 0?o:{},c=this.promiseHeaders().then(delay(this.headerDelay,n.abort)),p=new d.RpcOutputStreamController,y=c.then(delay(this.responseDelay,n.abort)).catch((()=>{})).then((()=>this.streamResponses(e,p,n.abort))).then(delay(this.afterResponseDelay,n.abort)),Q=y.then((()=>this.promiseStatus())),v=y.then((()=>this.promiseTrailers()));this.maybeSuppressUncaught(Q,v);this.lastInput={single:t};return new C.ServerStreamingCall(e,i,t,c,p,Q,v)}clientStreaming(e,t){var n;const o=(n=t.meta)!==null&&n!==void 0?n:{},i=this.promiseHeaders().then(delay(this.headerDelay,t.abort)),c=i.catch((e=>{})).then(delay(this.responseDelay,t.abort)).then((t=>this.promiseSingleResponse(e))),d=c.catch((e=>{})).then(delay(this.afterResponseDelay,t.abort)).then((e=>this.promiseStatus())),p=c.catch((e=>{})).then(delay(this.afterResponseDelay,t.abort)).then((e=>this.promiseTrailers()));this.maybeSuppressUncaught(d,p);this.lastInput=new TestInputStream(this.data,t.abort);return new Q.ClientStreamingCall(e,o,this.lastInput,i,c,d,p)}duplex(e,t){var n;const o=(n=t.meta)!==null&&n!==void 0?n:{},i=this.promiseHeaders().then(delay(this.headerDelay,t.abort)),c=new d.RpcOutputStreamController,p=i.then(delay(this.responseDelay,t.abort)).catch((()=>{})).then((()=>this.streamResponses(e,c,t.abort))).then(delay(this.afterResponseDelay,t.abort)),y=p.then((()=>this.promiseStatus())),C=p.then((()=>this.promiseTrailers()));this.maybeSuppressUncaught(y,C);this.lastInput=new TestInputStream(this.data,t.abort);return new v.DuplexStreamingCall(e,o,this.lastInput,i,c,y,C)}}t.TestTransport=TestTransport;TestTransport.defaultHeaders={responseHeader:"test"};TestTransport.defaultStatus={code:"OK",detail:"all good"};TestTransport.defaultTrailers={responseTrailer:"test"};function delay(e,t){return n=>new Promise(((o,c)=>{if(t===null||t===void 0?void 0:t.aborted){c(new i.RpcError("user cancel","CANCELLED"))}else{const d=setTimeout((()=>o(n)),e);if(t){t.addEventListener("abort",(e=>{clearTimeout(d);c(new i.RpcError("user cancel","CANCELLED"))}))}}}))}class TestInputStream{constructor(e,t){this._completed=false;this._sent=[];this.data=e;this.abort=t}get sent(){return this._sent}get completed(){return this._completed}send(e){if(this.data.inputMessage instanceof i.RpcError){return Promise.reject(this.data.inputMessage)}const t=this.data.inputMessage===undefined?10:this.data.inputMessage;return Promise.resolve(undefined).then((()=>{this._sent.push(e)})).then(delay(t,this.abort))}complete(){if(this.data.inputComplete instanceof i.RpcError){return Promise.reject(this.data.inputComplete)}const e=this.data.inputComplete===undefined?10:this.data.inputComplete;return Promise.resolve(undefined).then((()=>{this._completed=true})).then(delay(e,this.abort))}}},738:function(e,t){var n=this&&this.__awaiter||function(e,t,n,o){function adopt(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function fulfilled(e){try{step(o.next(e))}catch(e){i(e)}}function rejected(e){try{step(o["throw"](e))}catch(e){i(e)}}function step(e){e.done?n(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.UnaryCall=void 0;class UnaryCall{constructor(e,t,n,o,i,c,d){this.method=e;this.requestHeaders=t;this.request=n;this.headers=o;this.response=i;this.status=c;this.trailers=d}then(e,t){return this.promiseFinished().then((t=>e?Promise.resolve(e(t)):t),(e=>t?Promise.resolve(t(e)):Promise.reject(e)))}promiseFinished(){return n(this,void 0,void 0,(function*(){let[e,t,n,o]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:t,status:n,trailers:o}}))}}t.UnaryCall=UnaryCall},6468:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.assertFloat32=t.assertUInt32=t.assertInt32=t.assertNever=t.assert=void 0;function assert(e,t){if(!e){throw new Error(t)}}t.assert=assert;function assertNever(e,t){throw new Error(t!==null&&t!==void 0?t:"Unexpected object: "+e)}t.assertNever=assertNever;const n=34028234663852886e22,o=-34028234663852886e22,i=4294967295,c=2147483647,d=-2147483648;function assertInt32(e){if(typeof e!=="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>c||ei||e<0)throw new Error("invalid uint 32: "+e)}t.assertUInt32=assertUInt32;function assertFloat32(e){if(typeof e!=="number")throw new Error("invalid float 32: "+typeof e);if(!Number.isFinite(e))return;if(e>n||e{Object.defineProperty(t,"__esModule",{value:true});t.base64encode=t.base64decode=void 0;let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");let o=[];for(let e=0;e>4;p=d;c=2;break;case 2:n[i++]=(p&15)<<4|(d&60)>>2;p=d;c=3;break;case 3:n[i++]=(p&3)<<6|d;c=0;break}}if(c==1)throw Error(`invalid base64 string.`);return n.subarray(0,i)}t.base64decode=base64decode;function base64encode(e){let t="",o=0,i,c=0;for(let d=0;d>2];c=(i&3)<<4;o=1;break;case 1:t+=n[c|i>>4];c=(i&15)<<2;o=2;break;case 2:t+=n[c|i>>6];t+=n[i&63];o=0;break}}if(o){t+=n[c];t+="=";if(o==1)t+="="}return t}t.base64encode=base64encode},6690:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.WireType=t.mergeBinaryOptions=t.UnknownFieldHandler=void 0;var n;(function(e){e.symbol=Symbol.for("protobuf-ts/unknown");e.onRead=(t,n,o,i,c)=>{let d=is(n)?n[e.symbol]:n[e.symbol]=[];d.push({no:o,wireType:i,data:c})};e.onWrite=(t,n,o)=>{for(let{no:t,wireType:i,data:c}of e.list(n))o.tag(t,i).raw(c)};e.list=(t,n)=>{if(is(t)){let o=t[e.symbol];return n?o.filter((e=>e.no==n)):o}return[]};e.last=(t,n)=>e.list(t,n).slice(-1)[0];const is=t=>t&&Array.isArray(t[e.symbol])})(n=t.UnknownFieldHandler||(t.UnknownFieldHandler={}));function mergeBinaryOptions(e,t){return Object.assign(Object.assign({},e),t)}t.mergeBinaryOptions=mergeBinaryOptions;var o;(function(e){e[e["Varint"]=0]="Varint";e[e["Bit64"]=1]="Bit64";e[e["LengthDelimited"]=2]="LengthDelimited";e[e["StartGroup"]=3]="StartGroup";e[e["EndGroup"]=4]="EndGroup";e[e["Bit32"]=5]="Bit32"})(o=t.WireType||(t.WireType={}))},8887:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.BinaryReader=t.binaryReadOptions=void 0;const o=n(6690);const i=n(5579);const c=n(365);const d={readUnknownField:true,readerFactory:e=>new BinaryReader(e)};function binaryReadOptions(e){return e?Object.assign(Object.assign({},d),e):d}t.binaryReadOptions=binaryReadOptions;class BinaryReader{constructor(e,t){this.varint64=c.varint64read;this.uint32=c.varint32read;this.buf=e;this.len=e.length;this.pos=0;this.view=new DataView(e.buffer,e.byteOffset,e.byteLength);this.textDecoder=t!==null&&t!==void 0?t:new TextDecoder("utf-8",{fatal:true,ignoreBOM:true})}tag(){let e=this.uint32(),t=e>>>3,n=e&7;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e){let t=this.pos;switch(e){case o.WireType.Varint:while(this.buf[this.pos++]&128){}break;case o.WireType.Bit64:this.pos+=4;case o.WireType.Bit32:this.pos+=4;break;case o.WireType.LengthDelimited:let t=this.uint32();this.pos+=t;break;case o.WireType.StartGroup:let n;while((n=this.tag()[1])!==o.WireType.EndGroup){this.skip(n)}break;default:throw new Error("cant skip wire type "+e)}this.assertBounds();return this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return new i.PbLong(...this.varint64())}uint64(){return new i.PbULong(...this.varint64())}sint64(){let[e,t]=this.varint64();let n=-(e&1);e=(e>>>1|(t&1)<<31)^n;t=t>>>1^n;return new i.PbLong(e,t)}bool(){let[e,t]=this.varint64();return e!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,true)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,true)}fixed64(){return new i.PbULong(this.sfixed32(),this.sfixed32())}sfixed64(){return new i.PbLong(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,true)}double(){return this.view.getFloat64((this.pos+=8)-8,true)}bytes(){let e=this.uint32();let t=this.pos;this.pos+=e;this.assertBounds();return this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}}t.BinaryReader=BinaryReader},4839:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.BinaryWriter=t.binaryWriteOptions=void 0;const o=n(5579);const i=n(365);const c=n(6468);const d={writeUnknownFields:true,writerFactory:()=>new BinaryWriter};function binaryWriteOptions(e){return e?Object.assign(Object.assign({},d),e):d}t.binaryWriteOptions=binaryWriteOptions;class BinaryWriter{constructor(e){this.stack=[];this.textEncoder=e!==null&&e!==void 0?e:new TextEncoder;this.chunks=[];this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t>>0)}raw(e){if(this.buf.length){this.chunks.push(new Uint8Array(this.buf));this.buf=[]}this.chunks.push(e);return this}uint32(e){c.assertUInt32(e);while(e>127){this.buf.push(e&127|128);e=e>>>7}this.buf.push(e);return this}int32(e){c.assertInt32(e);i.varint32write(e,this.buf);return this}bool(e){this.buf.push(e?1:0);return this}bytes(e){this.uint32(e.byteLength);return this.raw(e)}string(e){let t=this.textEncoder.encode(e);this.uint32(t.byteLength);return this.raw(t)}float(e){c.assertFloat32(e);let t=new Uint8Array(4);new DataView(t.buffer).setFloat32(0,e,true);return this.raw(t)}double(e){let t=new Uint8Array(8);new DataView(t.buffer).setFloat64(0,e,true);return this.raw(t)}fixed32(e){c.assertUInt32(e);let t=new Uint8Array(4);new DataView(t.buffer).setUint32(0,e,true);return this.raw(t)}sfixed32(e){c.assertInt32(e);let t=new Uint8Array(4);new DataView(t.buffer).setInt32(0,e,true);return this.raw(t)}sint32(e){c.assertInt32(e);e=(e<<1^e>>31)>>>0;i.varint32write(e,this.buf);return this}sfixed64(e){let t=new Uint8Array(8);let n=new DataView(t.buffer);let i=o.PbLong.from(e);n.setInt32(0,i.lo,true);n.setInt32(4,i.hi,true);return this.raw(t)}fixed64(e){let t=new Uint8Array(8);let n=new DataView(t.buffer);let i=o.PbULong.from(e);n.setInt32(0,i.lo,true);n.setInt32(4,i.hi,true);return this.raw(t)}int64(e){let t=o.PbLong.from(e);i.varint64write(t.lo,t.hi,this.buf);return this}sint64(e){let t=o.PbLong.from(e),n=t.hi>>31,c=t.lo<<1^n,d=(t.hi<<1|t.lo>>>31)^n;i.varint64write(c,d,this.buf);return this}uint64(e){let t=o.PbULong.from(e);i.varint64write(t.lo,t.hi,this.buf);return this}}t.BinaryWriter=BinaryWriter},6959:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.listEnumNumbers=t.listEnumNames=t.listEnumValues=t.isEnumObject=void 0;function isEnumObject(e){if(typeof e!="object"||e===null){return false}if(!e.hasOwnProperty(0)){return false}for(let t of Object.keys(e)){let n=parseInt(t);if(!Number.isNaN(n)){let t=e[n];if(t===undefined)return false;if(e[t]!==n)return false}else{let n=e[t];if(n===undefined)return false;if(typeof n!=="number")return false;if(e[n]===undefined)return false}}return true}t.isEnumObject=isEnumObject;function listEnumValues(e){if(!isEnumObject(e))throw new Error("not a typescript enum object");let t=[];for(let[n,o]of Object.entries(e))if(typeof o=="number")t.push({name:n,number:o});return t}t.listEnumValues=listEnumValues;function listEnumNames(e){return listEnumValues(e).map((e=>e.name))}t.listEnumNames=listEnumNames;function listEnumNumbers(e){return listEnumValues(e).map((e=>e.number)).filter(((e,t,n)=>n.indexOf(e)==t))}t.listEnumNumbers=listEnumNumbers},365:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.varint32read=t.varint32write=t.int64toString=t.int64fromString=t.varint64write=t.varint64read=void 0;function varint64read(){let e=0;let t=0;for(let n=0;n<28;n+=7){let o=this.buf[this.pos++];e|=(o&127)<>4;if((n&128)==0){this.assertBounds();return[e,t]}for(let n=3;n<=31;n+=7){let o=this.buf[this.pos++];t|=(o&127)<>>o;const c=!(i>>>7==0&&t==0);const d=(c?i|128:i)&255;n.push(d);if(!c){return}}const o=e>>>28&15|(t&7)<<4;const i=!(t>>3==0);n.push((i?o|128:o)&255);if(!i){return}for(let e=3;e<31;e=e+7){const o=t>>>e;const i=!(o>>>7==0);const c=(i?o|128:o)&255;n.push(c);if(!i){return}}n.push(t>>>31&1)}t.varint64write=varint64write;const n=(1<<16)*(1<<16);function int64fromString(e){let t=e[0]=="-";if(t)e=e.slice(1);const o=1e6;let i=0;let c=0;function add1e6digit(t,d){const p=Number(e.slice(t,d));c*=o;i=i*o+p;if(i>=n){c=c+(i/n|0);i=i%n}}add1e6digit(-24,-18);add1e6digit(-18,-12);add1e6digit(-12,-6);add1e6digit(-6);return[t,i,c]}t.int64fromString=int64fromString;function int64toString(e,t){if(t>>>0<=2097151){return""+(n*t+(e>>>0))}let o=e&16777215;let i=(e>>>24|t<<8)>>>0&16777215;let c=t>>16&65535;let d=o+i*6777216+c*6710656;let p=i+c*8147497;let y=c*2;let C=1e7;if(d>=C){p+=Math.floor(d/C);d%=C}if(p>=C){y+=Math.floor(p/C);p%=C}function decimalFrom1e7(e,t){let n=e?String(e):"";if(t){return"0000000".slice(n.length)+n}return n}return decimalFrom1e7(y,0)+decimalFrom1e7(p,y)+decimalFrom1e7(d,1)}t.int64toString=int64toString;function varint32write(e,t){if(e>=0){while(e>127){t.push(e&127|128);e=e>>>7}t.push(e)}else{for(let n=0;n<9;n++){t.push(e&127|128);e=e>>7}t.push(1)}}t.varint32write=varint32write;function varint32read(){let e=this.buf[this.pos++];let t=e&127;if((e&128)==0){this.assertBounds();return t}e=this.buf[this.pos++];t|=(e&127)<<7;if((e&128)==0){this.assertBounds();return t}e=this.buf[this.pos++];t|=(e&127)<<14;if((e&128)==0){this.assertBounds();return t}e=this.buf[this.pos++];t|=(e&127)<<21;if((e&128)==0){this.assertBounds();return t}e=this.buf[this.pos++];t|=(e&15)<<28;for(let t=5;(e&128)!==0&&t<10;t++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");this.assertBounds();return t>>>0}t.varint32read=varint32read},8372:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});var o=n(8369);Object.defineProperty(t,"typeofJsonValue",{enumerable:true,get:function(){return o.typeofJsonValue}});Object.defineProperty(t,"isJsonObject",{enumerable:true,get:function(){return o.isJsonObject}});var i=n(6689);Object.defineProperty(t,"base64decode",{enumerable:true,get:function(){return i.base64decode}});Object.defineProperty(t,"base64encode",{enumerable:true,get:function(){return i.base64encode}});var c=n(5424);Object.defineProperty(t,"utf8read",{enumerable:true,get:function(){return c.utf8read}});var d=n(6690);Object.defineProperty(t,"WireType",{enumerable:true,get:function(){return d.WireType}});Object.defineProperty(t,"mergeBinaryOptions",{enumerable:true,get:function(){return d.mergeBinaryOptions}});Object.defineProperty(t,"UnknownFieldHandler",{enumerable:true,get:function(){return d.UnknownFieldHandler}});var p=n(8887);Object.defineProperty(t,"BinaryReader",{enumerable:true,get:function(){return p.BinaryReader}});Object.defineProperty(t,"binaryReadOptions",{enumerable:true,get:function(){return p.binaryReadOptions}});var y=n(4839);Object.defineProperty(t,"BinaryWriter",{enumerable:true,get:function(){return y.BinaryWriter}});Object.defineProperty(t,"binaryWriteOptions",{enumerable:true,get:function(){return y.binaryWriteOptions}});var C=n(5579);Object.defineProperty(t,"PbLong",{enumerable:true,get:function(){return C.PbLong}});Object.defineProperty(t,"PbULong",{enumerable:true,get:function(){return C.PbULong}});var Q=n(3389);Object.defineProperty(t,"jsonReadOptions",{enumerable:true,get:function(){return Q.jsonReadOptions}});Object.defineProperty(t,"jsonWriteOptions",{enumerable:true,get:function(){return Q.jsonWriteOptions}});Object.defineProperty(t,"mergeJsonOptions",{enumerable:true,get:function(){return Q.mergeJsonOptions}});var v=n(1371);Object.defineProperty(t,"MESSAGE_TYPE",{enumerable:true,get:function(){return v.MESSAGE_TYPE}});var D=n(4172);Object.defineProperty(t,"MessageType",{enumerable:true,get:function(){return D.MessageType}});var k=n(528);Object.defineProperty(t,"ScalarType",{enumerable:true,get:function(){return k.ScalarType}});Object.defineProperty(t,"LongType",{enumerable:true,get:function(){return k.LongType}});Object.defineProperty(t,"RepeatType",{enumerable:true,get:function(){return k.RepeatType}});Object.defineProperty(t,"normalizeFieldInfo",{enumerable:true,get:function(){return k.normalizeFieldInfo}});Object.defineProperty(t,"readFieldOptions",{enumerable:true,get:function(){return k.readFieldOptions}});Object.defineProperty(t,"readFieldOption",{enumerable:true,get:function(){return k.readFieldOption}});Object.defineProperty(t,"readMessageOption",{enumerable:true,get:function(){return k.readMessageOption}});var $=n(5649);Object.defineProperty(t,"ReflectionTypeCheck",{enumerable:true,get:function(){return $.ReflectionTypeCheck}});var V=n(868);Object.defineProperty(t,"reflectionCreate",{enumerable:true,get:function(){return V.reflectionCreate}});var ee=n(412);Object.defineProperty(t,"reflectionScalarDefault",{enumerable:true,get:function(){return ee.reflectionScalarDefault}});var te=n(8674);Object.defineProperty(t,"reflectionMergePartial",{enumerable:true,get:function(){return te.reflectionMergePartial}});var re=n(8197);Object.defineProperty(t,"reflectionEquals",{enumerable:true,get:function(){return re.reflectionEquals}});var ne=n(2161);Object.defineProperty(t,"ReflectionBinaryReader",{enumerable:true,get:function(){return ne.ReflectionBinaryReader}});var se=n(5325);Object.defineProperty(t,"ReflectionBinaryWriter",{enumerable:true,get:function(){return se.ReflectionBinaryWriter}});var oe=n(5240);Object.defineProperty(t,"ReflectionJsonReader",{enumerable:true,get:function(){return oe.ReflectionJsonReader}});var ie=n(5572);Object.defineProperty(t,"ReflectionJsonWriter",{enumerable:true,get:function(){return ie.ReflectionJsonWriter}});var ae=n(5556);Object.defineProperty(t,"containsMessageType",{enumerable:true,get:function(){return ae.containsMessageType}});var ce=n(4857);Object.defineProperty(t,"isOneofGroup",{enumerable:true,get:function(){return ce.isOneofGroup}});Object.defineProperty(t,"setOneofValue",{enumerable:true,get:function(){return ce.setOneofValue}});Object.defineProperty(t,"getOneofValue",{enumerable:true,get:function(){return ce.getOneofValue}});Object.defineProperty(t,"clearOneofValue",{enumerable:true,get:function(){return ce.clearOneofValue}});Object.defineProperty(t,"getSelectedOneofValue",{enumerable:true,get:function(){return ce.getSelectedOneofValue}});var le=n(6959);Object.defineProperty(t,"listEnumValues",{enumerable:true,get:function(){return le.listEnumValues}});Object.defineProperty(t,"listEnumNames",{enumerable:true,get:function(){return le.listEnumNames}});Object.defineProperty(t,"listEnumNumbers",{enumerable:true,get:function(){return le.listEnumNumbers}});Object.defineProperty(t,"isEnumObject",{enumerable:true,get:function(){return le.isEnumObject}});var ue=n(4959);Object.defineProperty(t,"lowerCamelCase",{enumerable:true,get:function(){return ue.lowerCamelCase}});var de=n(6468);Object.defineProperty(t,"assert",{enumerable:true,get:function(){return de.assert}});Object.defineProperty(t,"assertNever",{enumerable:true,get:function(){return de.assertNever}});Object.defineProperty(t,"assertInt32",{enumerable:true,get:function(){return de.assertInt32}});Object.defineProperty(t,"assertUInt32",{enumerable:true,get:function(){return de.assertUInt32}});Object.defineProperty(t,"assertFloat32",{enumerable:true,get:function(){return de.assertFloat32}})},3389:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.mergeJsonOptions=t.jsonWriteOptions=t.jsonReadOptions=void 0;const n={emitDefaultValues:false,enumAsInteger:false,useProtoFieldName:false,prettySpaces:0},o={ignoreUnknownFields:false};function jsonReadOptions(e){return e?Object.assign(Object.assign({},o),e):o}t.jsonReadOptions=jsonReadOptions;function jsonWriteOptions(e){return e?Object.assign(Object.assign({},n),e):n}t.jsonWriteOptions=jsonWriteOptions;function mergeJsonOptions(e,t){var n,o;let i=Object.assign(Object.assign({},e),t);i.typeRegistry=[...(n=e===null||e===void 0?void 0:e.typeRegistry)!==null&&n!==void 0?n:[],...(o=t===null||t===void 0?void 0:t.typeRegistry)!==null&&o!==void 0?o:[]];return i}t.mergeJsonOptions=mergeJsonOptions},8369:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.isJsonObject=t.typeofJsonValue=void 0;function typeofJsonValue(e){let t=typeof e;if(t=="object"){if(Array.isArray(e))return"array";if(e===null)return"null"}return t}t.typeofJsonValue=typeofJsonValue;function isJsonObject(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}t.isJsonObject=isJsonObject},4959:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.lowerCamelCase=void 0;function lowerCamelCase(e){let t=false;const n=[];for(let o=0;o{Object.defineProperty(t,"__esModule",{value:true});t.MESSAGE_TYPE=void 0;t.MESSAGE_TYPE=Symbol.for("protobuf-ts/message-type")},4172:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.MessageType=void 0;const o=n(1371);const i=n(528);const c=n(5649);const d=n(5240);const p=n(5572);const y=n(2161);const C=n(5325);const Q=n(868);const v=n(8674);const D=n(8369);const k=n(3389);const $=n(8197);const V=n(4839);const ee=n(8887);const te=Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));const re=te[o.MESSAGE_TYPE]={};class MessageType{constructor(e,t,n){this.defaultCheckDepth=16;this.typeName=e;this.fields=t.map(i.normalizeFieldInfo);this.options=n!==null&&n!==void 0?n:{};re.value=this;this.messagePrototype=Object.create(null,te);this.refTypeCheck=new c.ReflectionTypeCheck(this);this.refJsonReader=new d.ReflectionJsonReader(this);this.refJsonWriter=new p.ReflectionJsonWriter(this);this.refBinReader=new y.ReflectionBinaryReader(this);this.refBinWriter=new C.ReflectionBinaryWriter(this)}create(e){let t=Q.reflectionCreate(this);if(e!==undefined){v.reflectionMergePartial(this,t,e)}return t}clone(e){let t=this.create();v.reflectionMergePartial(this,t,e);return t}equals(e,t){return $.reflectionEquals(this,e,t)}is(e,t=this.defaultCheckDepth){return this.refTypeCheck.is(e,t,false)}isAssignable(e,t=this.defaultCheckDepth){return this.refTypeCheck.is(e,t,true)}mergePartial(e,t){v.reflectionMergePartial(this,e,t)}fromBinary(e,t){let n=ee.binaryReadOptions(t);return this.internalBinaryRead(n.readerFactory(e),e.byteLength,n)}fromJson(e,t){return this.internalJsonRead(e,k.jsonReadOptions(t))}fromJsonString(e,t){let n=JSON.parse(e);return this.fromJson(n,t)}toJson(e,t){return this.internalJsonWrite(e,k.jsonWriteOptions(t))}toJsonString(e,t){var n;let o=this.toJson(e,t);return JSON.stringify(o,null,(n=t===null||t===void 0?void 0:t.prettySpaces)!==null&&n!==void 0?n:0)}toBinary(e,t){let n=V.binaryWriteOptions(t);return this.internalBinaryWrite(e,n.writerFactory(),n).finish()}internalJsonRead(e,t,n){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){let o=n!==null&&n!==void 0?n:this.create();this.refJsonReader.read(e,o,t);return o}throw new Error(`Unable to parse message ${this.typeName} from JSON ${D.typeofJsonValue(e)}.`)}internalJsonWrite(e,t){return this.refJsonWriter.write(e,t)}internalBinaryWrite(e,t,n){this.refBinWriter.write(e,t,n);return t}internalBinaryRead(e,t,n,o){let i=o!==null&&o!==void 0?o:this.create();this.refBinReader.read(e,i,n,t);return i}}t.MessageType=MessageType},4857:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSelectedOneofValue=t.clearOneofValue=t.setUnknownOneofValue=t.setOneofValue=t.getOneofValue=t.isOneofGroup=void 0;function isOneofGroup(e){if(typeof e!="object"||e===null||!e.hasOwnProperty("oneofKind")){return false}switch(typeof e.oneofKind){case"string":if(e[e.oneofKind]===undefined)return false;return Object.keys(e).length==2;case"undefined":return Object.keys(e).length==1;default:return false}}t.isOneofGroup=isOneofGroup;function getOneofValue(e,t){return e[t]}t.getOneofValue=getOneofValue;function setOneofValue(e,t,n){if(e.oneofKind!==undefined){delete e[e.oneofKind]}e.oneofKind=t;if(n!==undefined){e[t]=n}}t.setOneofValue=setOneofValue;function setUnknownOneofValue(e,t,n){if(e.oneofKind!==undefined){delete e[e.oneofKind]}e.oneofKind=t;if(n!==undefined&&t!==undefined){e[t]=n}}t.setUnknownOneofValue=setUnknownOneofValue;function clearOneofValue(e){if(e.oneofKind!==undefined){delete e[e.oneofKind]}e.oneofKind=undefined}t.clearOneofValue=clearOneofValue;function getSelectedOneofValue(e){if(e.oneofKind===undefined){return undefined}return e[e.oneofKind]}t.getSelectedOneofValue=getSelectedOneofValue},5579:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.PbLong=t.PbULong=t.detectBi=void 0;const o=n(365);let i;function detectBi(){const e=new DataView(new ArrayBuffer(8));const t=globalThis.BigInt!==undefined&&typeof e.getBigInt64==="function"&&typeof e.getBigUint64==="function"&&typeof e.setBigInt64==="function"&&typeof e.setBigUint64==="function";i=t?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:e}:undefined}t.detectBi=detectBi;detectBi();function assertBi(e){if(!e)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}const c=/^-?[0-9]+$/;const d=4294967296;const p=2147483648;class SharedPbLong{constructor(e,t){this.lo=e|0;this.hi=t|0}isZero(){return this.lo==0&&this.hi==0}toNumber(){let e=this.hi*d+(this.lo>>>0);if(!Number.isSafeInteger(e))throw new Error("cannot convert to safe number");return e}}class PbULong extends SharedPbLong{static from(e){if(i)switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=="")throw new Error("string is no integer");e=i.C(e);case"number":if(e===0)return this.ZERO;e=i.C(e);case"bigint":if(!e)return this.ZERO;if(ei.UMAX)throw new Error("ulong too large");i.V.setBigUint64(0,e,true);return new PbULong(i.V.getInt32(0,true),i.V.getInt32(4,true))}else switch(typeof e){case"string":if(e=="0")return this.ZERO;e=e.trim();if(!c.test(e))throw new Error("string is no integer");let[t,n,i]=o.int64fromString(e);if(t)throw new Error("signed value for ulong");return new PbULong(n,i);case"number":if(e==0)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");if(e<0)throw new Error("signed value for ulong");return new PbULong(e,e/d)}throw new Error("unknown value "+typeof e)}toString(){return i?this.toBigInt().toString():o.int64toString(this.lo,this.hi)}toBigInt(){assertBi(i);i.V.setInt32(0,this.lo,true);i.V.setInt32(4,this.hi,true);return i.V.getBigUint64(0,true)}}t.PbULong=PbULong;PbULong.ZERO=new PbULong(0,0);class PbLong extends SharedPbLong{static from(e){if(i)switch(typeof e){case"string":if(e=="0")return this.ZERO;if(e=="")throw new Error("string is no integer");e=i.C(e);case"number":if(e===0)return this.ZERO;e=i.C(e);case"bigint":if(!e)return this.ZERO;if(ei.MAX)throw new Error("signed long too large");i.V.setBigInt64(0,e,true);return new PbLong(i.V.getInt32(0,true),i.V.getInt32(4,true))}else switch(typeof e){case"string":if(e=="0")return this.ZERO;e=e.trim();if(!c.test(e))throw new Error("string is no integer");let[t,n,i]=o.int64fromString(e);if(t){if(i>p||i==p&&n!=0)throw new Error("signed long too small")}else if(i>=p)throw new Error("signed long too large");let y=new PbLong(n,i);return t?y.negate():y;case"number":if(e==0)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");return e>0?new PbLong(e,e/d):new PbLong(-e,-e/d).negate()}throw new Error("unknown value "+typeof e)}isNegative(){return(this.hi&p)!==0}negate(){let e=~this.hi,t=this.lo;if(t)t=~t+1;else e+=1;return new PbLong(t,e)}toString(){if(i)return this.toBigInt().toString();if(this.isNegative()){let e=this.negate();return"-"+o.int64toString(e.lo,e.hi)}return o.int64toString(this.lo,this.hi)}toBigInt(){assertBi(i);i.V.setInt32(0,this.lo,true);i.V.setInt32(4,this.hi,true);return i.V.getBigInt64(0,true)}}t.PbLong=PbLong;PbLong.ZERO=new PbLong(0,0)},5424:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.utf8read=void 0;const fromCharCodes=e=>String.fromCharCode.apply(String,e);function utf8read(e){if(e.length<1)return"";let t=0,n=[],o=[],i=0,c;let d=e.length;while(t191&&c<224)o[i++]=(c&31)<<6|e[t++]&63;else if(c>239&&c<365){c=((c&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536;o[i++]=55296+(c>>10);o[i++]=56320+(c&1023)}else o[i++]=(c&15)<<12|(e[t++]&63)<<6|e[t++]&63;if(i>8191){n.push(fromCharCodes(o));i=0}}if(n.length){if(i)n.push(fromCharCodes(o.slice(0,i)));return n.join("")}return fromCharCodes(o.slice(0,i))}t.utf8read=utf8read},2161:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReflectionBinaryReader=void 0;const o=n(6690);const i=n(528);const c=n(2344);const d=n(412);class ReflectionBinaryReader{constructor(e){this.info=e}prepare(){var e;if(!this.fieldNoToField){const t=(e=this.info.fields)!==null&&e!==void 0?e:[];this.fieldNoToField=new Map(t.map((e=>[e.no,e])))}}read(e,t,n,c){this.prepare();const d=c===undefined?e.len:e.pos+c;while(e.pos{Object.defineProperty(t,"__esModule",{value:true});t.ReflectionBinaryWriter=void 0;const o=n(6690);const i=n(528);const c=n(6468);const d=n(5579);class ReflectionBinaryWriter{constructor(e){this.info=e}prepare(){if(!this.fields){const e=this.info.fields?this.info.fields.concat():[];this.fields=e.sort(((e,t)=>e.no-t.no))}}write(e,t,n){this.prepare();for(const o of this.fields){let d,p,y=o.repeat,C=o.localName;if(o.oneof){const t=e[o.oneof];if(t.oneofKind!==C)continue;d=t[C];p=true}else{d=e[C];p=false}switch(o.kind){case"scalar":case"enum":let e=o.kind=="enum"?i.ScalarType.INT32:o.T;if(y){c.assert(Array.isArray(d));if(y==i.RepeatType.PACKED)this.packed(t,e,o.no,d);else for(const n of d)this.scalar(t,e,o.no,n,true)}else if(d===undefined)c.assert(o.opt);else this.scalar(t,e,o.no,d,p||o.opt);break;case"message":if(y){c.assert(Array.isArray(d));for(const e of d)this.message(t,n,o.T(),o.no,e)}else{this.message(t,n,o.T(),o.no,d)}break;case"map":c.assert(typeof d=="object"&&d!==null);for(const[e,i]of Object.entries(d))this.mapEntry(t,n,o,e,i);break}}let d=n.writeUnknownFields;if(d!==false)(d===true?o.UnknownFieldHandler.onWrite:d)(this.info.typeName,e,t)}mapEntry(e,t,n,d,p){e.tag(n.no,o.WireType.LengthDelimited);e.fork();let y=d;switch(n.K){case i.ScalarType.INT32:case i.ScalarType.FIXED32:case i.ScalarType.UINT32:case i.ScalarType.SFIXED32:case i.ScalarType.SINT32:y=Number.parseInt(d);break;case i.ScalarType.BOOL:c.assert(d=="true"||d=="false");y=d=="true";break}this.scalar(e,n.K,1,y,true);switch(n.V.kind){case"scalar":this.scalar(e,n.V.T,2,p,true);break;case"enum":this.scalar(e,i.ScalarType.INT32,2,p,true);break;case"message":this.message(e,t,n.V.T(),2,p);break}e.join()}message(e,t,n,i,c){if(c===undefined)return;n.internalBinaryWrite(c,e.tag(i,o.WireType.LengthDelimited).fork(),t);e.join()}scalar(e,t,n,o,i){let[c,d,p]=this.scalarInfo(t,o);if(!p||i){e.tag(n,c);e[d](o)}}packed(e,t,n,d){if(!d.length)return;c.assert(t!==i.ScalarType.BYTES&&t!==i.ScalarType.STRING);e.tag(n,o.WireType.LengthDelimited);e.fork();let[,p]=this.scalarInfo(t);for(let t=0;t{Object.defineProperty(t,"__esModule",{value:true});t.containsMessageType=void 0;const o=n(1371);function containsMessageType(e){return e[o.MESSAGE_TYPE]!=null}t.containsMessageType=containsMessageType},868:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.reflectionCreate=void 0;const o=n(412);const i=n(1371);function reflectionCreate(e){const t=e.messagePrototype?Object.create(e.messagePrototype):Object.defineProperty({},i.MESSAGE_TYPE,{value:e});for(let n of e.fields){let e=n.localName;if(n.opt)continue;if(n.oneof)t[n.oneof]={oneofKind:undefined};else if(n.repeat)t[e]=[];else switch(n.kind){case"scalar":t[e]=o.reflectionScalarDefault(n.T,n.L);break;case"enum":t[e]=0;break;case"map":t[e]={};break}}return t}t.reflectionCreate=reflectionCreate},8197:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.reflectionEquals=void 0;const o=n(528);function reflectionEquals(e,t,n){if(t===n)return true;if(!t||!n)return false;for(let c of e.fields){let e=c.localName;let d=c.oneof?t[c.oneof][e]:t[e];let p=c.oneof?n[c.oneof][e]:n[e];switch(c.kind){case"enum":case"scalar":let e=c.kind=="enum"?o.ScalarType.INT32:c.T;if(!(c.repeat?repeatedPrimitiveEq(e,d,p):primitiveEq(e,d,p)))return false;break;case"map":if(!(c.V.kind=="message"?repeatedMsgEq(c.V.T(),i(d),i(p)):repeatedPrimitiveEq(c.V.kind=="enum"?o.ScalarType.INT32:c.V.T,i(d),i(p))))return false;break;case"message":let t=c.T();if(!(c.repeat?repeatedMsgEq(t,d,p):t.equals(d,p)))return false;break}}return true}t.reflectionEquals=reflectionEquals;const i=Object.values;function primitiveEq(e,t,n){if(t===n)return true;if(e!==o.ScalarType.BYTES)return false;let i=t;let c=n;if(i.length!==c.length)return false;for(let e=0;e{Object.defineProperty(t,"__esModule",{value:true});t.readMessageOption=t.readFieldOption=t.readFieldOptions=t.normalizeFieldInfo=t.RepeatType=t.LongType=t.ScalarType=void 0;const o=n(4959);var i;(function(e){e[e["DOUBLE"]=1]="DOUBLE";e[e["FLOAT"]=2]="FLOAT";e[e["INT64"]=3]="INT64";e[e["UINT64"]=4]="UINT64";e[e["INT32"]=5]="INT32";e[e["FIXED64"]=6]="FIXED64";e[e["FIXED32"]=7]="FIXED32";e[e["BOOL"]=8]="BOOL";e[e["STRING"]=9]="STRING";e[e["BYTES"]=12]="BYTES";e[e["UINT32"]=13]="UINT32";e[e["SFIXED32"]=15]="SFIXED32";e[e["SFIXED64"]=16]="SFIXED64";e[e["SINT32"]=17]="SINT32";e[e["SINT64"]=18]="SINT64"})(i=t.ScalarType||(t.ScalarType={}));var c;(function(e){e[e["BIGINT"]=0]="BIGINT";e[e["STRING"]=1]="STRING";e[e["NUMBER"]=2]="NUMBER"})(c=t.LongType||(t.LongType={}));var d;(function(e){e[e["NO"]=0]="NO";e[e["PACKED"]=1]="PACKED";e[e["UNPACKED"]=2]="UNPACKED"})(d=t.RepeatType||(t.RepeatType={}));function normalizeFieldInfo(e){var t,n,i,c;e.localName=(t=e.localName)!==null&&t!==void 0?t:o.lowerCamelCase(e.name);e.jsonName=(n=e.jsonName)!==null&&n!==void 0?n:o.lowerCamelCase(e.name);e.repeat=(i=e.repeat)!==null&&i!==void 0?i:d.NO;e.opt=(c=e.opt)!==null&&c!==void 0?c:e.repeat?false:e.oneof?false:e.kind=="message";return e}t.normalizeFieldInfo=normalizeFieldInfo;function readFieldOptions(e,t,n,o){var i;const c=(i=e.fields.find(((e,n)=>e.localName==t||n==t)))===null||i===void 0?void 0:i.options;return c&&c[n]?o.fromJson(c[n]):undefined}t.readFieldOptions=readFieldOptions;function readFieldOption(e,t,n,o){var i;const c=(i=e.fields.find(((e,n)=>e.localName==t||n==t)))===null||i===void 0?void 0:i.options;if(!c){return undefined}const d=c[n];if(d===undefined){return d}return o?o.fromJson(d):d}t.readFieldOption=readFieldOption;function readMessageOption(e,t,n){const o=e.options;const i=o[t];if(i===undefined){return i}return n?n.fromJson(i):i}t.readMessageOption=readMessageOption},5240:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReflectionJsonReader=void 0;const o=n(8369);const i=n(6689);const c=n(528);const d=n(5579);const p=n(6468);const y=n(2344);class ReflectionJsonReader{constructor(e){this.info=e}prepare(){var e;if(this.fMap===undefined){this.fMap={};const t=(e=this.info.fields)!==null&&e!==void 0?e:[];for(const e of t){this.fMap[e.name]=e;this.fMap[e.jsonName]=e;this.fMap[e.localName]=e}}}assert(e,t,n){if(!e){let e=o.typeofJsonValue(n);if(e=="number"||e=="boolean")e=n.toString();throw new Error(`Cannot parse JSON ${e} for ${this.info.typeName}#${t}`)}}read(e,t,n){this.prepare();const i=[];for(const[d,p]of Object.entries(e)){const e=this.fMap[d];if(!e){if(!n.ignoreUnknownFields)throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${d}`);continue}const y=e.localName;let C;if(e.oneof){if(p===null&&(e.kind!=="enum"||e.T()[0]!=="google.protobuf.NullValue")){continue}if(i.includes(e.oneof))throw new Error(`Multiple members of the oneof group "${e.oneof}" of ${this.info.typeName} are present in JSON.`);i.push(e.oneof);C=t[e.oneof]={oneofKind:y}}else{C=t}if(e.kind=="map"){if(p===null){continue}this.assert(o.isJsonObject(p),e.name,p);const t=C[y];for(const[o,i]of Object.entries(p)){this.assert(i!==null,e.name+" map value",null);let d;switch(e.V.kind){case"message":d=e.V.T().internalJsonRead(i,n);break;case"enum":d=this.enum(e.V.T(),i,e.name,n.ignoreUnknownFields);if(d===false)continue;break;case"scalar":d=this.scalar(i,e.V.T,e.V.L,e.name);break}this.assert(d!==undefined,e.name+" map value",i);let p=o;if(e.K==c.ScalarType.BOOL)p=p=="true"?true:p=="false"?false:p;p=this.scalar(p,e.K,c.LongType.STRING,e.name).toString();t[p]=d}}else if(e.repeat){if(p===null)continue;this.assert(Array.isArray(p),e.name,p);const t=C[y];for(const o of p){this.assert(o!==null,e.name,null);let i;switch(e.kind){case"message":i=e.T().internalJsonRead(o,n);break;case"enum":i=this.enum(e.T(),o,e.name,n.ignoreUnknownFields);if(i===false)continue;break;case"scalar":i=this.scalar(o,e.T,e.L,e.name);break}this.assert(i!==undefined,e.name,p);t.push(i)}}else{switch(e.kind){case"message":if(p===null&&e.T().typeName!="google.protobuf.Value"){this.assert(e.oneof===undefined,e.name+" (oneof member)",null);continue}C[y]=e.T().internalJsonRead(p,n,C[y]);break;case"enum":if(p===null)continue;let t=this.enum(e.T(),p,e.name,n.ignoreUnknownFields);if(t===false)continue;C[y]=t;break;case"scalar":if(p===null)continue;C[y]=this.scalar(p,e.T,e.L,e.name);break}}}}enum(e,t,n,o){if(e[0]=="google.protobuf.NullValue")p.assert(t===null||t==="NULL_VALUE",`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} only accepts null.`);if(t===null)return 0;switch(typeof t){case"number":p.assert(Number.isInteger(t),`Unable to parse field ${this.info.typeName}#${n}, enum can only be integral number, got ${t}.`);return t;case"string":let i=t;if(e[2]&&t.substring(0,e[2].length)===e[2])i=t.substring(e[2].length);let c=e[1][i];if(typeof c==="undefined"&&o){return false}p.assert(typeof c=="number",`Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} has no value for "${t}".`);return c}p.assert(false,`Unable to parse field ${this.info.typeName}#${n}, cannot parse enum value from ${typeof t}".`)}scalar(e,t,n,o){let C;try{switch(t){case c.ScalarType.DOUBLE:case c.ScalarType.FLOAT:if(e===null)return 0;if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""){C="empty string";break}if(typeof e=="string"&&e.trim().length!==e.length){C="extra whitespace";break}if(typeof e!="string"&&typeof e!="number"){break}let o=Number(e);if(Number.isNaN(o)){C="not a number";break}if(!Number.isFinite(o)){C="too large or small";break}if(t==c.ScalarType.FLOAT)p.assertFloat32(o);return o;case c.ScalarType.INT32:case c.ScalarType.FIXED32:case c.ScalarType.SFIXED32:case c.ScalarType.SINT32:case c.ScalarType.UINT32:if(e===null)return 0;let Q;if(typeof e=="number")Q=e;else if(e==="")C="empty string";else if(typeof e=="string"){if(e.trim().length!==e.length)C="extra whitespace";else Q=Number(e)}if(Q===undefined)break;if(t==c.ScalarType.UINT32)p.assertUInt32(Q);else p.assertInt32(Q);return Q;case c.ScalarType.INT64:case c.ScalarType.SFIXED64:case c.ScalarType.SINT64:if(e===null)return y.reflectionLongConvert(d.PbLong.ZERO,n);if(typeof e!="number"&&typeof e!="string")break;return y.reflectionLongConvert(d.PbLong.from(e),n);case c.ScalarType.FIXED64:case c.ScalarType.UINT64:if(e===null)return y.reflectionLongConvert(d.PbULong.ZERO,n);if(typeof e!="number"&&typeof e!="string")break;return y.reflectionLongConvert(d.PbULong.from(e),n);case c.ScalarType.BOOL:if(e===null)return false;if(typeof e!=="boolean")break;return e;case c.ScalarType.STRING:if(e===null)return"";if(typeof e!=="string"){C="extra whitespace";break}try{encodeURIComponent(e)}catch(C){C="invalid UTF8";break}return e;case c.ScalarType.BYTES:if(e===null||e==="")return new Uint8Array(0);if(typeof e!=="string")break;return i.base64decode(e)}}catch(e){C=e.message}this.assert(false,o+(C?" - "+C:""),e)}}t.ReflectionJsonReader=ReflectionJsonReader},5572:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReflectionJsonWriter=void 0;const o=n(6689);const i=n(5579);const c=n(528);const d=n(6468);class ReflectionJsonWriter{constructor(e){var t;this.fields=(t=e.fields)!==null&&t!==void 0?t:[]}write(e,t){const n={},o=e;for(const e of this.fields){if(!e.oneof){let i=this.field(e,o[e.localName],t);if(i!==undefined)n[t.useProtoFieldName?e.name:e.jsonName]=i;continue}const i=o[e.oneof];if(i.oneofKind!==e.localName)continue;const c=e.kind=="scalar"||e.kind=="enum"?Object.assign(Object.assign({},t),{emitDefaultValues:true}):t;let p=this.field(e,i[e.localName],c);d.assert(p!==undefined);n[t.useProtoFieldName?e.name:e.jsonName]=p}return n}field(e,t,n){let o=undefined;if(e.kind=="map"){d.assert(typeof t=="object"&&t!==null);const i={};switch(e.V.kind){case"scalar":for(const[n,o]of Object.entries(t)){const t=this.scalar(e.V.T,o,e.name,false,true);d.assert(t!==undefined);i[n.toString()]=t}break;case"message":const o=e.V.T();for(const[c,p]of Object.entries(t)){const t=this.message(o,p,e.name,n);d.assert(t!==undefined);i[c.toString()]=t}break;case"enum":const c=e.V.T();for(const[o,p]of Object.entries(t)){d.assert(p===undefined||typeof p=="number");const t=this.enum(c,p,e.name,false,true,n.enumAsInteger);d.assert(t!==undefined);i[o.toString()]=t}break}if(n.emitDefaultValues||Object.keys(i).length>0)o=i}else if(e.repeat){d.assert(Array.isArray(t));const i=[];switch(e.kind){case"scalar":for(let n=0;n0||n.emitDefaultValues)o=i}else{switch(e.kind){case"scalar":o=this.scalar(e.T,t,e.name,e.opt,n.emitDefaultValues);break;case"enum":o=this.enum(e.T(),t,e.name,e.opt,n.emitDefaultValues,n.enumAsInteger);break;case"message":o=this.message(e.T(),t,e.name,n);break}}return o}enum(e,t,n,o,i,c){if(e[0]=="google.protobuf.NullValue")return!i&&!o?undefined:null;if(t===undefined){d.assert(o);return undefined}if(t===0&&!i&&!o)return undefined;d.assert(typeof t=="number");d.assert(Number.isInteger(t));if(c||!e[1].hasOwnProperty(t))return t;if(e[2])return e[2]+e[1][t];return e[1][t]}message(e,t,n,o){if(t===undefined)return o.emitDefaultValues?null:undefined;return e.internalJsonWrite(t,o)}scalar(e,t,n,p,y){if(t===undefined){d.assert(p);return undefined}const C=y||p;switch(e){case c.ScalarType.INT32:case c.ScalarType.SFIXED32:case c.ScalarType.SINT32:if(t===0)return C?0:undefined;d.assertInt32(t);return t;case c.ScalarType.FIXED32:case c.ScalarType.UINT32:if(t===0)return C?0:undefined;d.assertUInt32(t);return t;case c.ScalarType.FLOAT:d.assertFloat32(t);case c.ScalarType.DOUBLE:if(t===0)return C?0:undefined;d.assert(typeof t=="number");if(Number.isNaN(t))return"NaN";if(t===Number.POSITIVE_INFINITY)return"Infinity";if(t===Number.NEGATIVE_INFINITY)return"-Infinity";return t;case c.ScalarType.STRING:if(t==="")return C?"":undefined;d.assert(typeof t=="string");return t;case c.ScalarType.BOOL:if(t===false)return C?false:undefined;d.assert(typeof t=="boolean");return t;case c.ScalarType.UINT64:case c.ScalarType.FIXED64:d.assert(typeof t=="number"||typeof t=="string"||typeof t=="bigint");let e=i.PbULong.from(t);if(e.isZero()&&!C)return undefined;return e.toString();case c.ScalarType.INT64:case c.ScalarType.SFIXED64:case c.ScalarType.SINT64:d.assert(typeof t=="number"||typeof t=="string"||typeof t=="bigint");let n=i.PbLong.from(t);if(n.isZero()&&!C)return undefined;return n.toString();case c.ScalarType.BYTES:d.assert(t instanceof Uint8Array);if(!t.byteLength)return C?"":undefined;return o.base64encode(t)}}}t.ReflectionJsonWriter=ReflectionJsonWriter},2344:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.reflectionLongConvert=void 0;const o=n(528);function reflectionLongConvert(e,t){switch(t){case o.LongType.BIGINT:return e.toBigInt();case o.LongType.NUMBER:return e.toNumber();default:return e.toString()}}t.reflectionLongConvert=reflectionLongConvert},8674:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.reflectionMergePartial=void 0;function reflectionMergePartial(e,t,n){let o,i=n,c;for(let n of e.fields){let e=n.localName;if(n.oneof){const d=i[n.oneof];if((d===null||d===void 0?void 0:d.oneofKind)==undefined){continue}o=d[e];c=t[n.oneof];c.oneofKind=d.oneofKind;if(o==undefined){delete c[e];continue}}else{o=i[e];c=t;if(o==undefined){continue}}if(n.repeat)c[e].length=o.length;switch(n.kind){case"scalar":case"enum":if(n.repeat)for(let t=0;t{Object.defineProperty(t,"__esModule",{value:true});t.reflectionScalarDefault=void 0;const o=n(528);const i=n(2344);const c=n(5579);function reflectionScalarDefault(e,t=o.LongType.STRING){switch(e){case o.ScalarType.BOOL:return false;case o.ScalarType.UINT64:case o.ScalarType.FIXED64:return i.reflectionLongConvert(c.PbULong.ZERO,t);case o.ScalarType.INT64:case o.ScalarType.SFIXED64:case o.ScalarType.SINT64:return i.reflectionLongConvert(c.PbLong.ZERO,t);case o.ScalarType.DOUBLE:case o.ScalarType.FLOAT:return 0;case o.ScalarType.BYTES:return new Uint8Array(0);case o.ScalarType.STRING:return"";default:return 0}}t.reflectionScalarDefault=reflectionScalarDefault},5649:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReflectionTypeCheck=void 0;const o=n(528);const i=n(4857);class ReflectionTypeCheck{constructor(e){var t;this.fields=(t=e.fields)!==null&&t!==void 0?t:[]}prepare(){if(this.data)return;const e=[],t=[],n=[];for(let o of this.fields){if(o.oneof){if(!n.includes(o.oneof)){n.push(o.oneof);e.push(o.oneof);t.push(o.oneof)}}else{t.push(o.localName);switch(o.kind){case"scalar":case"enum":if(!o.opt||o.repeat)e.push(o.localName);break;case"message":if(o.repeat)e.push(o.localName);break;case"map":e.push(o.localName);break}}}this.data={req:e,known:t,oneofs:Object.values(n)}}is(e,t,n=false){if(t<0)return true;if(e===null||e===undefined||typeof e!="object")return false;this.prepare();let o=Object.keys(e),c=this.data;if(o.length!o.includes(e))))return false;if(!n){if(o.some((e=>!c.known.includes(e))))return false}if(t<1){return true}for(const o of c.oneofs){const c=e[o];if(!i.isOneofGroup(c))return false;if(c.oneofKind===undefined)continue;const d=this.fields.find((e=>e.localName===c.oneofKind));if(!d)return false;if(!this.field(c[c.oneofKind],d,n,t))return false}for(const o of this.fields){if(o.oneof!==undefined)continue;if(!this.field(e[o.localName],o,n,t))return false}return true}field(e,t,n,i){let c=t.repeat;switch(t.kind){case"scalar":if(e===undefined)return t.opt;if(c)return this.scalars(e,t.T,i,t.L);return this.scalar(e,t.T,t.L);case"enum":if(e===undefined)return t.opt;if(c)return this.scalars(e,o.ScalarType.INT32,i);return this.scalar(e,o.ScalarType.INT32);case"message":if(e===undefined)return true;if(c)return this.messages(e,t.T(),n,i);return this.message(e,t.T(),n,i);case"map":if(typeof e!="object"||e===null)return false;if(i<2)return true;if(!this.mapKeys(e,t.K,i))return false;switch(t.V.kind){case"scalar":return this.scalars(Object.values(e),t.V.T,i,t.V.L);case"enum":return this.scalars(Object.values(e),o.ScalarType.INT32,i);case"message":return this.messages(Object.values(e),t.V.T(),n,i)}break}return true}message(e,t,n,o){if(n){return t.isAssignable(e,o)}return t.is(e,o)}messages(e,t,n,o){if(!Array.isArray(e))return false;if(o<2)return true;if(n){for(let n=0;nparseInt(e))),t,n);case o.ScalarType.BOOL:return this.scalars(i.slice(0,n).map((e=>e=="true"?true:e=="false"?false:e)),t,n);default:return this.scalars(i,t,n,o.LongType.STRING)}}}t.ReflectionTypeCheck=ReflectionTypeCheck},9659:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))t[t.length]=n;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n=ownKeys(e),c=0;cd(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return d(this,void 0,void 0,(function*(){return new Promise((e=>d(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=this._getUserAgentWithOrchestrationId(e);this.handlers=t||[];this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return d(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return d(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return d(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,n){return d(this,void 0,void 0,(function*(){return this.request("POST",e,t,n||{})}))}patch(e,t,n){return d(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,n||{})}))}put(e,t,n){return d(this,void 0,void 0,(function*(){return this.request("PUT",e,t,n||{})}))}head(e,t){return d(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,n,o){return d(this,void 0,void 0,(function*(){return this.request(e,t,n,o)}))}getJson(e){return d(this,arguments,void 0,(function*(e,t={}){t[k.Accept]=this._getExistingOrDefaultHeader(t,k.Accept,$.ApplicationJson);const n=yield this.get(e,t);return this._processResponse(n,this.requestOptions)}))}postJson(e,t){return d(this,arguments,void 0,(function*(e,t,n={}){const o=JSON.stringify(t,null,2);n[k.Accept]=this._getExistingOrDefaultHeader(n,k.Accept,$.ApplicationJson);n[k.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,$.ApplicationJson);const i=yield this.post(e,o,n);return this._processResponse(i,this.requestOptions)}))}putJson(e,t){return d(this,arguments,void 0,(function*(e,t,n={}){const o=JSON.stringify(t,null,2);n[k.Accept]=this._getExistingOrDefaultHeader(n,k.Accept,$.ApplicationJson);n[k.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,$.ApplicationJson);const i=yield this.put(e,o,n);return this._processResponse(i,this.requestOptions)}))}patchJson(e,t){return d(this,arguments,void 0,(function*(e,t,n={}){const o=JSON.stringify(t,null,2);n[k.Accept]=this._getExistingOrDefaultHeader(n,k.Accept,$.ApplicationJson);n[k.ContentType]=this._getExistingOrDefaultContentTypeHeader(n,$.ApplicationJson);const i=yield this.patch(e,o,n);return this._processResponse(i,this.requestOptions)}))}request(e,t,n,o){return d(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const i=new URL(t);let c=this._prepareRequest(e,i,o);const d=this._allowRetries&&te.includes(e)?this._maxRetries+1:1;let p=0;let y;do{y=yield this.requestRaw(c,n);if(y&&y.message&&y.message.statusCode===D.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(y)){e=t;break}}if(e){return e.handleAuthentication(this,c,n)}else{return y}}let t=this._maxRedirects;while(y.message.statusCode&&V.includes(y.message.statusCode)&&this._allowRedirects&&t>0){const d=y.message.headers["location"];if(!d){break}const p=new URL(d);if(i.protocol==="https:"&&i.protocol!==p.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield y.readBody();if(p.hostname!==i.hostname){for(const e in o){if(e.toLowerCase()==="authorization"){delete o[e]}}}c=this._prepareRequest(e,p,o);y=yield this.requestRaw(c,n);t--}if(!y.message.statusCode||!ee.includes(y.message.statusCode)){return y}p+=1;if(p{function callbackForResult(e,t){if(e){o(e)}else if(!t){o(new Error("Unknown error"))}else{n(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,n){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let o=false;function handleResult(e,t){if(!o){o=true;n(e,t)}}const i=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let c;i.on("socket",(e=>{c=e}));i.setTimeout(this._socketTimeout||3*6e4,(()=>{if(c){c.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));i.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){i.end()}));t.pipe(i)}else{i.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const n=C.getProxyUrl(t);const o=n&&n.hostname;if(!o){return}return this._getProxyAgentDispatcher(t,n)}_prepareRequest(e,t,n){const o={};o.parsedUrl=t;const i=o.parsedUrl.protocol==="https:";o.httpModule=i?y:p;const c=i?443:80;o.options={};o.options.host=o.parsedUrl.hostname;o.options.port=o.parsedUrl.port?parseInt(o.parsedUrl.port):c;o.options.path=(o.parsedUrl.pathname||"")+(o.parsedUrl.search||"");o.options.method=e;o.options.headers=this._mergeHeaders(n);if(this.userAgent!=null){o.options.headers["user-agent"]=this.userAgent}o.options.agent=this._getAgent(o.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(o.options)}}return o}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,n){let o;if(this.requestOptions&&this.requestOptions.headers){const e=lowercaseKeys(this.requestOptions.headers)[t];if(e){o=typeof e==="number"?e.toString():e}}const i=e[t];if(i!==undefined){return typeof i==="number"?i.toString():i}if(o!==undefined){return o}return n}_getExistingOrDefaultContentTypeHeader(e,t){let n;if(this.requestOptions&&this.requestOptions.headers){const e=lowercaseKeys(this.requestOptions.headers)[k.ContentType];if(e){if(typeof e==="number"){n=String(e)}else if(Array.isArray(e)){n=e.join(", ")}else{n=e}}}const o=e[k.ContentType];if(o!==undefined){if(typeof o==="number"){return String(o)}else if(Array.isArray(o)){return o.join(", ")}else{return o}}if(n!==undefined){return n}return t}_getAgent(e){let t;const n=C.getProxyUrl(e);const o=n&&n.hostname;if(this._keepAlive&&o){t=this._proxyAgent}if(!o){t=this._agent}if(t){return t}const i=e.protocol==="https:";let c=100;if(this.requestOptions){c=this.requestOptions.maxSockets||p.globalAgent.maxSockets}if(n&&n.hostname){const e={maxSockets:c,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(n.username||n.password)&&{proxyAuth:`${n.username}:${n.password}`}),{host:n.hostname,port:n.port})};let o;const d=n.protocol==="https:";if(i){o=d?Q.httpsOverHttps:Q.httpsOverHttp}else{o=d?Q.httpOverHttps:Q.httpOverHttp}t=o(e);this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:c};t=i?new y.Agent(e):new p.Agent(e);this._agent=t}if(i&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let n;if(this._keepAlive){n=this._proxyAgentDispatcher}if(n){return n}const o=e.protocol==="https:";n=new v.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`Basic ${Buffer.from(`${t.username}:${t.password}`).toString("base64")}`}));this._proxyAgentDispatcher=n;if(o&&this._ignoreSslError){n.options=Object.assign(n.options.requestTls||{},{rejectUnauthorized:false})}return n}_getUserAgentWithOrchestrationId(e){const t=e||"actions/http-client";const n=process.env["ACTIONS_ORCHESTRATION_ID"];if(n){const e=n.replace(/[^a-z0-9_.-]/gi,"_");return`${t} actions_orchestration_id/${e}`}return t}_performExponentialBackoff(e){return d(this,void 0,void 0,(function*(){e=Math.min(re,e);const t=ne*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return d(this,void 0,void 0,(function*(){return new Promise(((n,o)=>d(this,void 0,void 0,(function*(){const i=e.message.statusCode||0;const c={statusCode:i,result:null,headers:{}};if(i===D.NotFound){n(c)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let d;let p;try{p=yield e.readBody();if(p&&p.length>0){if(t&&t.deserializeDates){d=JSON.parse(p,dateTimeDeserializer)}else{d=JSON.parse(p)}c.result=d}c.headers=e.message.headers}catch(e){}if(i>299){let e;if(d&&d.message){e=d.message}else if(p&&p.length>0){e=p}else{e=`Failed request: (${i})`}const t=new HttpClientError(e,i);t.result=c.result;o(t)}else{n(c)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,n)=>(t[n.toLowerCase()]=e[n],t)),{})},3335:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.getProxyUrl=getProxyUrl;t.checkBypass=checkBypass;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const n=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(n){try{return new DecodedURL(n)}catch(e){if(!n.startsWith("http://")&&!n.startsWith("https://"))return new DecodedURL(`http://${n}`)}}else{return undefined}}function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const n=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!n){return false}let o;if(e.port){o=Number(e.port)}else if(e.protocol==="http:"){o=80}else if(e.protocol==="https:"){o=443}const i=[e.hostname.toUpperCase()];if(typeof o==="number"){i.push(`${i[0]}:${o}`)}for(const e of n.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||i.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}class DecodedURL extends URL{constructor(e,t){super(e,t);this._decodedUsername=decodeURIComponent(super.username);this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}},3182:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.resolveHttpAuthSchemeConfig=t.defaultECRPUBLICHttpAuthSchemeProvider=t.defaultECRPUBLICHttpAuthSchemeParametersProvider=void 0;const o=n(8704);const i=n(6324);const defaultECRPUBLICHttpAuthSchemeParametersProvider=async(e,t,n)=>({operation:(0,i.getSmithyContext)(t).operation,region:await(0,i.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});t.defaultECRPUBLICHttpAuthSchemeParametersProvider=defaultECRPUBLICHttpAuthSchemeParametersProvider;function createAwsAuthSigv4HttpAuthOption(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ecr-public",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}const defaultECRPUBLICHttpAuthSchemeProvider=e=>{const t=[];switch(e.operation){default:{t.push(createAwsAuthSigv4HttpAuthOption(e))}}return t};t.defaultECRPUBLICHttpAuthSchemeProvider=defaultECRPUBLICHttpAuthSchemeProvider;const resolveHttpAuthSchemeConfig=e=>{const t=(0,o.resolveAwsSdkSigV4Config)(e);return Object.assign(t,{authSchemePreference:(0,i.normalizeProvider)(e.authSchemePreference??[])})};t.resolveHttpAuthSchemeConfig=resolveHttpAuthSchemeConfig},6072:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultEndpointResolver=void 0;const o=n(3068);const i=n(9674);const c=n(1829);const d=new i.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});const defaultEndpointResolver=(e,t={})=>d.get(e,(()=>(0,i.resolveEndpoint)(c.ruleSet,{endpointParams:e,logger:t.logger})));t.defaultEndpointResolver=defaultEndpointResolver;i.customEndpointFunctions.aws=o.awsEndpointFunctions},1829:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ruleSet=void 0;const n="required",o="fn",i="argv",c="ref";const d=true,p="isSet",y="booleanEquals",C="error",Q="endpoint",v="tree",D="PartitionResult",k="getAttr",$={[n]:false,type:"string"},V={[n]:true,default:false,type:"boolean"},ee={[c]:"Endpoint"},te={[o]:y,[i]:[{[c]:"UseFIPS"},true]},re={[o]:y,[i]:[{[c]:"UseDualStack"},true]},ne={},se={[o]:k,[i]:[{[c]:D},"supportsFIPS"]},oe={[c]:D},ie={[o]:y,[i]:[true,{[o]:k,[i]:[oe,"supportsDualStack"]}]},ae=[te],ce=[re],le=[{[c]:"Region"}];const ue={version:"1.0",parameters:{Region:$,UseDualStack:V,UseFIPS:V,Endpoint:$},rules:[{conditions:[{[o]:p,[i]:[ee]}],rules:[{conditions:ae,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:C},{conditions:ce,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:C},{endpoint:{url:ee,properties:ne,headers:ne},type:Q}],type:v},{conditions:[{[o]:p,[i]:le}],rules:[{conditions:[{[o]:"aws.partition",[i]:le,assign:D}],rules:[{conditions:[te,re],rules:[{conditions:[{[o]:y,[i]:[d,se]},ie],rules:[{endpoint:{url:"https://api.ecr-public-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ne,headers:ne},type:Q}],type:v},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:C}],type:v},{conditions:ae,rules:[{conditions:[{[o]:y,[i]:[se,d]}],rules:[{endpoint:{url:"https://api.ecr-public-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ne,headers:ne},type:Q}],type:v},{error:"FIPS is enabled but this partition does not support FIPS",type:C}],type:v},{conditions:ce,rules:[{conditions:[ie],rules:[{conditions:[{[o]:"stringEquals",[i]:["aws",{[o]:k,[i]:[oe,"name"]}]}],endpoint:{url:"https://ecr-public.{Region}.api.aws",properties:ne,headers:ne},type:Q},{endpoint:{url:"https://api.ecr-public.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ne,headers:ne},type:Q}],type:v},{error:"DualStack is enabled but this partition does not support DualStack",type:C}],type:v},{endpoint:{url:"https://api.ecr-public.{Region}.{PartitionResult#dnsSuffix}",properties:ne,headers:ne},type:Q}],type:v}],type:v},{error:"Invalid Configuration: Missing Region",type:C}]};t.ruleSet=ue},9821:(e,t,n)=>{var o=n(2590);var i=n(5242);var c=n(1568);var d=n(2959);var p=n(9316);var y=n(402);var C=n(6890);var Q=n(7212);var v=n(99);var D=n(9618);var k=n(1411);var $=n(3182);var V=n(8199);var ee=n(6463);var te=n(2356);var re=n(3917);var ne=n(977);var se=n(3303);const resolveClientEndpointParameters=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??false,useFipsEndpoint:e.useFipsEndpoint??false,defaultSigningName:"ecr-public"});const oe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};const getHttpAuthExtensionConfiguration=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider;let o=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));if(n===-1){t.push(e)}else{t.splice(n,1,e)}},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){o=e},credentials(){return o}}};const resolveHttpAuthRuntimeConfig=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});const resolveRuntimeExtensions=(e,t)=>{const n=Object.assign(ee.getAwsRegionExtensionConfiguration(e),k.getDefaultExtensionConfiguration(e),te.getHttpHandlerExtensionConfiguration(e),getHttpAuthExtensionConfiguration(e));t.forEach((e=>e.configure(n)));return Object.assign(e,ee.resolveAwsRegionExtensionConfiguration(n),k.resolveDefaultRuntimeConfig(n),te.resolveHttpHandlerRuntimeConfig(n),resolveHttpAuthRuntimeConfig(n))};class ECRPUBLICClient extends k.Client{config;constructor(...[e]){const t=V.getRuntimeConfig(e||{});super(t);this.initConfig=t;const n=resolveClientEndpointParameters(t);const k=d.resolveUserAgentConfig(n);const ee=D.resolveRetryConfig(k);const te=p.resolveRegionConfig(ee);const re=o.resolveHostHeaderConfig(te);const ne=v.resolveEndpointConfig(re);const se=$.resolveHttpAuthSchemeConfig(ne);const oe=resolveRuntimeExtensions(se,e?.extensions||[]);this.config=oe;this.middlewareStack.use(C.getSchemaSerdePlugin(this.config));this.middlewareStack.use(d.getUserAgentPlugin(this.config));this.middlewareStack.use(D.getRetryPlugin(this.config));this.middlewareStack.use(Q.getContentLengthPlugin(this.config));this.middlewareStack.use(o.getHostHeaderPlugin(this.config));this.middlewareStack.use(i.getLoggerPlugin(this.config));this.middlewareStack.use(c.getRecursionDetectionPlugin(this.config));this.middlewareStack.use(y.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:$.defaultECRPUBLICHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new y.DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})}));this.middlewareStack.use(y.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class BatchCheckLayerAvailabilityCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","BatchCheckLayerAvailability",{}).n("ECRPUBLICClient","BatchCheckLayerAvailabilityCommand").sc(re.BatchCheckLayerAvailability$).build()){}class BatchDeleteImageCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","BatchDeleteImage",{}).n("ECRPUBLICClient","BatchDeleteImageCommand").sc(re.BatchDeleteImage$).build()){}class CompleteLayerUploadCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","CompleteLayerUpload",{}).n("ECRPUBLICClient","CompleteLayerUploadCommand").sc(re.CompleteLayerUpload$).build()){}class CreateRepositoryCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","CreateRepository",{}).n("ECRPUBLICClient","CreateRepositoryCommand").sc(re.CreateRepository$).build()){}class DeleteRepositoryCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DeleteRepository",{}).n("ECRPUBLICClient","DeleteRepositoryCommand").sc(re.DeleteRepository$).build()){}class DeleteRepositoryPolicyCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DeleteRepositoryPolicy",{}).n("ECRPUBLICClient","DeleteRepositoryPolicyCommand").sc(re.DeleteRepositoryPolicy$).build()){}class DescribeImagesCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DescribeImages",{}).n("ECRPUBLICClient","DescribeImagesCommand").sc(re.DescribeImages$).build()){}class DescribeImageTagsCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DescribeImageTags",{}).n("ECRPUBLICClient","DescribeImageTagsCommand").sc(re.DescribeImageTags$).build()){}class DescribeRegistriesCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DescribeRegistries",{}).n("ECRPUBLICClient","DescribeRegistriesCommand").sc(re.DescribeRegistries$).build()){}class DescribeRepositoriesCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","DescribeRepositories",{}).n("ECRPUBLICClient","DescribeRepositoriesCommand").sc(re.DescribeRepositories$).build()){}class GetAuthorizationTokenCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","GetAuthorizationToken",{}).n("ECRPUBLICClient","GetAuthorizationTokenCommand").sc(re.GetAuthorizationToken$).build()){}class GetRegistryCatalogDataCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","GetRegistryCatalogData",{}).n("ECRPUBLICClient","GetRegistryCatalogDataCommand").sc(re.GetRegistryCatalogData$).build()){}class GetRepositoryCatalogDataCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","GetRepositoryCatalogData",{}).n("ECRPUBLICClient","GetRepositoryCatalogDataCommand").sc(re.GetRepositoryCatalogData$).build()){}class GetRepositoryPolicyCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","GetRepositoryPolicy",{}).n("ECRPUBLICClient","GetRepositoryPolicyCommand").sc(re.GetRepositoryPolicy$).build()){}class InitiateLayerUploadCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","InitiateLayerUpload",{}).n("ECRPUBLICClient","InitiateLayerUploadCommand").sc(re.InitiateLayerUpload$).build()){}class ListTagsForResourceCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","ListTagsForResource",{}).n("ECRPUBLICClient","ListTagsForResourceCommand").sc(re.ListTagsForResource$).build()){}class PutImageCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","PutImage",{}).n("ECRPUBLICClient","PutImageCommand").sc(re.PutImage$).build()){}class PutRegistryCatalogDataCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","PutRegistryCatalogData",{}).n("ECRPUBLICClient","PutRegistryCatalogDataCommand").sc(re.PutRegistryCatalogData$).build()){}class PutRepositoryCatalogDataCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","PutRepositoryCatalogData",{}).n("ECRPUBLICClient","PutRepositoryCatalogDataCommand").sc(re.PutRepositoryCatalogData$).build()){}class SetRepositoryPolicyCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","SetRepositoryPolicy",{}).n("ECRPUBLICClient","SetRepositoryPolicyCommand").sc(re.SetRepositoryPolicy$).build()){}class TagResourceCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","TagResource",{}).n("ECRPUBLICClient","TagResourceCommand").sc(re.TagResource$).build()){}class UntagResourceCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","UntagResource",{}).n("ECRPUBLICClient","UntagResourceCommand").sc(re.UntagResource$).build()){}class UploadLayerPartCommand extends(k.Command.classBuilder().ep(oe).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("SpencerFrontendService","UploadLayerPart",{}).n("ECRPUBLICClient","UploadLayerPartCommand").sc(re.UploadLayerPart$).build()){}const ie=y.createPaginator(ECRPUBLICClient,DescribeImagesCommand,"nextToken","nextToken","maxResults");const ae=y.createPaginator(ECRPUBLICClient,DescribeImageTagsCommand,"nextToken","nextToken","maxResults");const ce=y.createPaginator(ECRPUBLICClient,DescribeRegistriesCommand,"nextToken","nextToken","maxResults");const le=y.createPaginator(ECRPUBLICClient,DescribeRepositoriesCommand,"nextToken","nextToken","maxResults");const ue={BatchCheckLayerAvailabilityCommand:BatchCheckLayerAvailabilityCommand,BatchDeleteImageCommand:BatchDeleteImageCommand,CompleteLayerUploadCommand:CompleteLayerUploadCommand,CreateRepositoryCommand:CreateRepositoryCommand,DeleteRepositoryCommand:DeleteRepositoryCommand,DeleteRepositoryPolicyCommand:DeleteRepositoryPolicyCommand,DescribeImagesCommand:DescribeImagesCommand,DescribeImageTagsCommand:DescribeImageTagsCommand,DescribeRegistriesCommand:DescribeRegistriesCommand,DescribeRepositoriesCommand:DescribeRepositoriesCommand,GetAuthorizationTokenCommand:GetAuthorizationTokenCommand,GetRegistryCatalogDataCommand:GetRegistryCatalogDataCommand,GetRepositoryCatalogDataCommand:GetRepositoryCatalogDataCommand,GetRepositoryPolicyCommand:GetRepositoryPolicyCommand,InitiateLayerUploadCommand:InitiateLayerUploadCommand,ListTagsForResourceCommand:ListTagsForResourceCommand,PutImageCommand:PutImageCommand,PutRegistryCatalogDataCommand:PutRegistryCatalogDataCommand,PutRepositoryCatalogDataCommand:PutRepositoryCatalogDataCommand,SetRepositoryPolicyCommand:SetRepositoryPolicyCommand,TagResourceCommand:TagResourceCommand,UntagResourceCommand:UntagResourceCommand,UploadLayerPartCommand:UploadLayerPartCommand};const de={paginateDescribeImages:ie,paginateDescribeImageTags:ae,paginateDescribeRegistries:ce,paginateDescribeRepositories:le};class ECRPUBLIC extends ECRPUBLICClient{}k.createAggregatedClient(ue,ECRPUBLIC,{paginators:de});const pe={InvalidLayerDigest:"InvalidLayerDigest",MissingLayerDigest:"MissingLayerDigest"};const Ae={AVAILABLE:"AVAILABLE",UNAVAILABLE:"UNAVAILABLE"};const me={ImageNotFound:"ImageNotFound",ImageReferencedByManifestList:"ImageReferencedByManifestList",ImageTagDoesNotMatchDigest:"ImageTagDoesNotMatchDigest",InvalidImageDigest:"InvalidImageDigest",InvalidImageTag:"InvalidImageTag",KmsError:"KmsError",MissingDigestAndTag:"MissingDigestAndTag"};const ge={ACTIVE:"ACTIVE",PENDING:"PENDING",REJECTED:"REJECTED"};t.$Command=k.Command;t.__Client=k.Client;t.ECRPUBLICServiceException=se.ECRPUBLICServiceException;t.BatchCheckLayerAvailabilityCommand=BatchCheckLayerAvailabilityCommand;t.BatchDeleteImageCommand=BatchDeleteImageCommand;t.CompleteLayerUploadCommand=CompleteLayerUploadCommand;t.CreateRepositoryCommand=CreateRepositoryCommand;t.DeleteRepositoryCommand=DeleteRepositoryCommand;t.DeleteRepositoryPolicyCommand=DeleteRepositoryPolicyCommand;t.DescribeImageTagsCommand=DescribeImageTagsCommand;t.DescribeImagesCommand=DescribeImagesCommand;t.DescribeRegistriesCommand=DescribeRegistriesCommand;t.DescribeRepositoriesCommand=DescribeRepositoriesCommand;t.ECRPUBLIC=ECRPUBLIC;t.ECRPUBLICClient=ECRPUBLICClient;t.GetAuthorizationTokenCommand=GetAuthorizationTokenCommand;t.GetRegistryCatalogDataCommand=GetRegistryCatalogDataCommand;t.GetRepositoryCatalogDataCommand=GetRepositoryCatalogDataCommand;t.GetRepositoryPolicyCommand=GetRepositoryPolicyCommand;t.ImageFailureCode=me;t.InitiateLayerUploadCommand=InitiateLayerUploadCommand;t.LayerAvailability=Ae;t.LayerFailureCode=pe;t.ListTagsForResourceCommand=ListTagsForResourceCommand;t.PutImageCommand=PutImageCommand;t.PutRegistryCatalogDataCommand=PutRegistryCatalogDataCommand;t.PutRepositoryCatalogDataCommand=PutRepositoryCatalogDataCommand;t.RegistryAliasStatus=ge;t.SetRepositoryPolicyCommand=SetRepositoryPolicyCommand;t.TagResourceCommand=TagResourceCommand;t.UntagResourceCommand=UntagResourceCommand;t.UploadLayerPartCommand=UploadLayerPartCommand;t.paginateDescribeImageTags=ae;t.paginateDescribeImages=ie;t.paginateDescribeRegistries=ce;t.paginateDescribeRepositories=le;Object.prototype.hasOwnProperty.call(re,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:re["__proto__"]});Object.keys(re).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=re[e]}));Object.prototype.hasOwnProperty.call(ne,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:ne["__proto__"]});Object.keys(ne).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=ne[e]}))},3303:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ECRPUBLICServiceException=t.__ServiceException=void 0;const o=n(1411);Object.defineProperty(t,"__ServiceException",{enumerable:true,get:function(){return o.ServiceException}});class ECRPUBLICServiceException extends o.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,ECRPUBLICServiceException.prototype)}}t.ECRPUBLICServiceException=ECRPUBLICServiceException},977:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReferencedImagesNotFoundException=t.LayersNotFoundException=t.InvalidLayerPartException=t.ImageTagAlreadyExistsException=t.ImageDigestDoesNotMatchException=t.ImageAlreadyExistsException=t.RepositoryCatalogDataNotFoundException=t.ImageNotFoundException=t.RepositoryPolicyNotFoundException=t.RepositoryNotEmptyException=t.TooManyTagsException=t.RepositoryAlreadyExistsException=t.LimitExceededException=t.InvalidTagParameterException=t.UploadNotFoundException=t.LayerPartTooSmallException=t.LayerAlreadyExistsException=t.InvalidLayerException=t.EmptyUploadException=t.UnsupportedCommandException=t.ServerException=t.RepositoryNotFoundException=t.RegistryNotFoundException=t.InvalidParameterException=void 0;const o=n(3303);class InvalidParameterException extends o.ECRPUBLICServiceException{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidParameterException.prototype)}}t.InvalidParameterException=InvalidParameterException;class RegistryNotFoundException extends o.ECRPUBLICServiceException{name="RegistryNotFoundException";$fault="client";constructor(e){super({name:"RegistryNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RegistryNotFoundException.prototype)}}t.RegistryNotFoundException=RegistryNotFoundException;class RepositoryNotFoundException extends o.ECRPUBLICServiceException{name="RepositoryNotFoundException";$fault="client";constructor(e){super({name:"RepositoryNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryNotFoundException.prototype)}}t.RepositoryNotFoundException=RepositoryNotFoundException;class ServerException extends o.ECRPUBLICServiceException{name="ServerException";$fault="server";constructor(e){super({name:"ServerException",$fault:"server",...e});Object.setPrototypeOf(this,ServerException.prototype)}}t.ServerException=ServerException;class UnsupportedCommandException extends o.ECRPUBLICServiceException{name="UnsupportedCommandException";$fault="client";constructor(e){super({name:"UnsupportedCommandException",$fault:"client",...e});Object.setPrototypeOf(this,UnsupportedCommandException.prototype)}}t.UnsupportedCommandException=UnsupportedCommandException;class EmptyUploadException extends o.ECRPUBLICServiceException{name="EmptyUploadException";$fault="client";constructor(e){super({name:"EmptyUploadException",$fault:"client",...e});Object.setPrototypeOf(this,EmptyUploadException.prototype)}}t.EmptyUploadException=EmptyUploadException;class InvalidLayerException extends o.ECRPUBLICServiceException{name="InvalidLayerException";$fault="client";constructor(e){super({name:"InvalidLayerException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidLayerException.prototype)}}t.InvalidLayerException=InvalidLayerException;class LayerAlreadyExistsException extends o.ECRPUBLICServiceException{name="LayerAlreadyExistsException";$fault="client";constructor(e){super({name:"LayerAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,LayerAlreadyExistsException.prototype)}}t.LayerAlreadyExistsException=LayerAlreadyExistsException;class LayerPartTooSmallException extends o.ECRPUBLICServiceException{name="LayerPartTooSmallException";$fault="client";constructor(e){super({name:"LayerPartTooSmallException",$fault:"client",...e});Object.setPrototypeOf(this,LayerPartTooSmallException.prototype)}}t.LayerPartTooSmallException=LayerPartTooSmallException;class UploadNotFoundException extends o.ECRPUBLICServiceException{name="UploadNotFoundException";$fault="client";constructor(e){super({name:"UploadNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,UploadNotFoundException.prototype)}}t.UploadNotFoundException=UploadNotFoundException;class InvalidTagParameterException extends o.ECRPUBLICServiceException{name="InvalidTagParameterException";$fault="client";constructor(e){super({name:"InvalidTagParameterException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidTagParameterException.prototype)}}t.InvalidTagParameterException=InvalidTagParameterException;class LimitExceededException extends o.ECRPUBLICServiceException{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e});Object.setPrototypeOf(this,LimitExceededException.prototype)}}t.LimitExceededException=LimitExceededException;class RepositoryAlreadyExistsException extends o.ECRPUBLICServiceException{name="RepositoryAlreadyExistsException";$fault="client";constructor(e){super({name:"RepositoryAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryAlreadyExistsException.prototype)}}t.RepositoryAlreadyExistsException=RepositoryAlreadyExistsException;class TooManyTagsException extends o.ECRPUBLICServiceException{name="TooManyTagsException";$fault="client";constructor(e){super({name:"TooManyTagsException",$fault:"client",...e});Object.setPrototypeOf(this,TooManyTagsException.prototype)}}t.TooManyTagsException=TooManyTagsException;class RepositoryNotEmptyException extends o.ECRPUBLICServiceException{name="RepositoryNotEmptyException";$fault="client";constructor(e){super({name:"RepositoryNotEmptyException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryNotEmptyException.prototype)}}t.RepositoryNotEmptyException=RepositoryNotEmptyException;class RepositoryPolicyNotFoundException extends o.ECRPUBLICServiceException{name="RepositoryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RepositoryPolicyNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryPolicyNotFoundException.prototype)}}t.RepositoryPolicyNotFoundException=RepositoryPolicyNotFoundException;class ImageNotFoundException extends o.ECRPUBLICServiceException{name="ImageNotFoundException";$fault="client";constructor(e){super({name:"ImageNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ImageNotFoundException.prototype)}}t.ImageNotFoundException=ImageNotFoundException;class RepositoryCatalogDataNotFoundException extends o.ECRPUBLICServiceException{name="RepositoryCatalogDataNotFoundException";$fault="client";constructor(e){super({name:"RepositoryCatalogDataNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryCatalogDataNotFoundException.prototype)}}t.RepositoryCatalogDataNotFoundException=RepositoryCatalogDataNotFoundException;class ImageAlreadyExistsException extends o.ECRPUBLICServiceException{name="ImageAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,ImageAlreadyExistsException.prototype)}}t.ImageAlreadyExistsException=ImageAlreadyExistsException;class ImageDigestDoesNotMatchException extends o.ECRPUBLICServiceException{name="ImageDigestDoesNotMatchException";$fault="client";constructor(e){super({name:"ImageDigestDoesNotMatchException",$fault:"client",...e});Object.setPrototypeOf(this,ImageDigestDoesNotMatchException.prototype)}}t.ImageDigestDoesNotMatchException=ImageDigestDoesNotMatchException;class ImageTagAlreadyExistsException extends o.ECRPUBLICServiceException{name="ImageTagAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageTagAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,ImageTagAlreadyExistsException.prototype)}}t.ImageTagAlreadyExistsException=ImageTagAlreadyExistsException;class InvalidLayerPartException extends o.ECRPUBLICServiceException{name="InvalidLayerPartException";$fault="client";registryId;repositoryName;uploadId;lastValidByteReceived;constructor(e){super({name:"InvalidLayerPartException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidLayerPartException.prototype);this.registryId=e.registryId;this.repositoryName=e.repositoryName;this.uploadId=e.uploadId;this.lastValidByteReceived=e.lastValidByteReceived}}t.InvalidLayerPartException=InvalidLayerPartException;class LayersNotFoundException extends o.ECRPUBLICServiceException{name="LayersNotFoundException";$fault="client";constructor(e){super({name:"LayersNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,LayersNotFoundException.prototype)}}t.LayersNotFoundException=LayersNotFoundException;class ReferencedImagesNotFoundException extends o.ECRPUBLICServiceException{name="ReferencedImagesNotFoundException";$fault="client";constructor(e){super({name:"ReferencedImagesNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ReferencedImagesNotFoundException.prototype)}}t.ReferencedImagesNotFoundException=ReferencedImagesNotFoundException},8199:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getRuntimeConfig=void 0;const o=n(1860);const i=o.__importDefault(n(7643));const c=n(8704);const d=n(5861);const p=n(1656);const y=n(9316);const C=n(2711);const Q=n(9618);const v=n(5704);const D=n(1279);const k=n(1411);const $=n(3638);const V=n(673);const ee=n(5518);const te=n(2180);const getRuntimeConfig=e=>{(0,k.emitWarningIfUnsupportedVersion)(process.version);const t=(0,V.resolveDefaultsModeConfig)(e);const defaultConfigProvider=()=>t().then(k.loadConfigsForDefaultMode);const n=(0,te.getRuntimeConfig)(e);(0,c.emitWarningIfUnsupportedVersion)(process.version);const o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,v.loadConfig)(c.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,o),bodyLengthChecker:e?.bodyLengthChecker??$.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??d.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,p.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:i.default.version}),maxAttempts:e?.maxAttempts??(0,v.loadConfig)(Q.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,v.loadConfig)(y.NODE_REGION_CONFIG_OPTIONS,{...y.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:D.NodeHttpHandler.create(e?.requestHandler??defaultConfigProvider),retryMode:e?.retryMode??(0,v.loadConfig)({...Q.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await defaultConfigProvider()).retryMode||ee.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??C.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??D.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,v.loadConfig)(y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,v.loadConfig)(y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,v.loadConfig)(p.NODE_APP_ID_CONFIG_OPTIONS,o)}};t.getRuntimeConfig=getRuntimeConfig},2180:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getRuntimeConfig=void 0;const o=n(8704);const i=n(7288);const c=n(1411);const d=n(4494);const p=n(8385);const y=n(1577);const C=n(3182);const Q=n(6072);const v=n(3917);const getRuntimeConfig=e=>({apiVersion:"2020-10-30",base64Decoder:e?.base64Decoder??p.fromBase64,base64Encoder:e?.base64Encoder??p.toBase64,disableHostPrefix:e?.disableHostPrefix??false,endpointProvider:e?.endpointProvider??Q.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??C.defaultECRPUBLICHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new o.AwsSdkSigV4Signer}],logger:e?.logger??new c.NoOpLogger,protocol:e?.protocol??i.AwsJson1_1Protocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ecrpublic",errorTypeRegistries:v.errorTypeRegistries,xmlNamespace:"http://ecr-public.amazonaws.com/doc/2020-12-02/",version:"2020-10-30",serviceTarget:"SpencerFrontendService"},serviceId:e?.serviceId??"ECR PUBLIC",urlParser:e?.urlParser??d.parseUrl,utf8Decoder:e?.utf8Decoder??y.fromUtf8,utf8Encoder:e?.utf8Encoder??y.toUtf8});t.getRuntimeConfig=getRuntimeConfig},3917:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.GetRegistryCatalogDataRequest$=t.GetAuthorizationTokenResponse$=t.GetAuthorizationTokenRequest$=t.DescribeRepositoriesResponse$=t.DescribeRepositoriesRequest$=t.DescribeRegistriesResponse$=t.DescribeRegistriesRequest$=t.DescribeImageTagsResponse$=t.DescribeImageTagsRequest$=t.DescribeImagesResponse$=t.DescribeImagesRequest$=t.DeleteRepositoryResponse$=t.DeleteRepositoryRequest$=t.DeleteRepositoryPolicyResponse$=t.DeleteRepositoryPolicyRequest$=t.CreateRepositoryResponse$=t.CreateRepositoryRequest$=t.CompleteLayerUploadResponse$=t.CompleteLayerUploadRequest$=t.BatchDeleteImageResponse$=t.BatchDeleteImageRequest$=t.BatchCheckLayerAvailabilityResponse$=t.BatchCheckLayerAvailabilityRequest$=t.AuthorizationData$=t.errorTypeRegistries=t.UploadNotFoundException$=t.UnsupportedCommandException$=t.TooManyTagsException$=t.ServerException$=t.RepositoryPolicyNotFoundException$=t.RepositoryNotFoundException$=t.RepositoryNotEmptyException$=t.RepositoryCatalogDataNotFoundException$=t.RepositoryAlreadyExistsException$=t.RegistryNotFoundException$=t.ReferencedImagesNotFoundException$=t.LimitExceededException$=t.LayersNotFoundException$=t.LayerPartTooSmallException$=t.LayerAlreadyExistsException$=t.InvalidTagParameterException$=t.InvalidParameterException$=t.InvalidLayerPartException$=t.InvalidLayerException$=t.ImageTagAlreadyExistsException$=t.ImageNotFoundException$=t.ImageDigestDoesNotMatchException$=t.ImageAlreadyExistsException$=t.EmptyUploadException$=t.ECRPUBLICServiceException$=void 0;t.GetRegistryCatalogData$=t.GetAuthorizationToken$=t.DescribeRepositories$=t.DescribeRegistries$=t.DescribeImageTags$=t.DescribeImages$=t.DeleteRepositoryPolicy$=t.DeleteRepository$=t.CreateRepository$=t.CompleteLayerUpload$=t.BatchDeleteImage$=t.BatchCheckLayerAvailability$=t.UploadLayerPartResponse$=t.UploadLayerPartRequest$=t.UntagResourceResponse$=t.UntagResourceRequest$=t.TagResourceResponse$=t.TagResourceRequest$=t.Tag$=t.SetRepositoryPolicyResponse$=t.SetRepositoryPolicyRequest$=t.RepositoryCatalogDataInput$=t.RepositoryCatalogData$=t.Repository$=t.RegistryCatalogData$=t.RegistryAlias$=t.Registry$=t.ReferencedImageDetail$=t.PutRepositoryCatalogDataResponse$=t.PutRepositoryCatalogDataRequest$=t.PutRegistryCatalogDataResponse$=t.PutRegistryCatalogDataRequest$=t.PutImageResponse$=t.PutImageRequest$=t.ListTagsForResourceResponse$=t.ListTagsForResourceRequest$=t.LayerFailure$=t.Layer$=t.InitiateLayerUploadResponse$=t.InitiateLayerUploadRequest$=t.ImageTagDetail$=t.ImageIdentifier$=t.ImageFailure$=t.ImageDetail$=t.Image$=t.GetRepositoryPolicyResponse$=t.GetRepositoryPolicyRequest$=t.GetRepositoryCatalogDataResponse$=t.GetRepositoryCatalogDataRequest$=t.GetRegistryCatalogDataResponse$=void 0;t.UploadLayerPart$=t.UntagResource$=t.TagResource$=t.SetRepositoryPolicy$=t.PutRepositoryCatalogData$=t.PutRegistryCatalogData$=t.PutImage$=t.ListTagsForResource$=t.InitiateLayerUpload$=t.GetRepositoryPolicy$=t.GetRepositoryCatalogData$=void 0;const o="AuthorizationData";const i="BatchCheckLayerAvailability";const c="BatchCheckLayerAvailabilityRequest";const d="BatchCheckLayerAvailabilityResponse";const p="BatchDeleteImage";const y="BatchDeleteImageRequest";const C="BatchDeleteImageResponse";const Q="CompleteLayerUpload";const v="CompleteLayerUploadRequest";const D="CompleteLayerUploadResponse";const k="CreateRepository";const $="CreateRepositoryRequest";const V="CreateRepositoryResponse";const ee="DescribeImages";const te="DescribeImagesRequest";const re="DescribeImagesResponse";const ne="DescribeImageTags";const se="DescribeImageTagsRequest";const oe="DescribeImageTagsResponse";const ie="DeleteRepository";const ae="DeleteRepositoryPolicy";const ce="DeleteRepositoryPolicyRequest";const le="DeleteRepositoryPolicyResponse";const ue="DeleteRepositoryRequest";const de="DeleteRepositoryResponse";const pe="DescribeRegistriesRequest";const Ae="DescribeRegistriesResponse";const me="DescribeRepositoriesRequest";const ge="DescribeRepositoriesResponse";const fe="DescribeRegistries";const he="DescribeRepositories";const ye="EmptyUploadException";const Ee="GetAuthorizationToken";const Ce="GetAuthorizationTokenRequest";const Ie="GetAuthorizationTokenResponse";const be="GetRegistryCatalogData";const Se="GetRegistryCatalogDataRequest";const Be="GetRegistryCatalogDataResponse";const we="GetRepositoryCatalogDataRequest";const Re="GetRepositoryCatalogDataResponse";const Ne="GetRepositoryCatalogData";const Qe="GetRepositoryPolicy";const xe="GetRepositoryPolicyRequest";const Te="GetRepositoryPolicyResponse";const ve="Image";const Pe="ImageAlreadyExistsException";const De="ImageDetail";const ke="ImageDigestDoesNotMatchException";const _e="ImageDetailList";const Le="ImageFailure";const Oe="ImageFailureList";const Fe="ImageIdentifier";const Ue="ImageIdentifierList";const Me="InvalidLayerException";const He="InvalidLayerPartException";const $e="InitiateLayerUpload";const Ge="InitiateLayerUploadRequest";const qe="InitiateLayerUploadResponse";const ze="ImageNotFoundException";const Ve="InvalidParameterException";const je="ImageTagAlreadyExistsException";const Ye="ImageTagDetail";const Je="ImageTagDetailList";const We="InvalidTagParameterException";const Ke="Key";const Xe="Layer";const Ze="LayerAlreadyExistsException";const At="LimitExceededException";const mt="LayerFailure";const ht="LayerFailureList";const yt="LayerList";const Et="LayersNotFoundException";const Ct="LayerPartTooSmallException";const It="ListTagsForResource";const bt="ListTagsForResourceRequest";const St="ListTagsForResourceResponse";const Bt="PutImage";const wt="PutImageRequest";const Rt="PutImageResponse";const Nt="PutRegistryCatalogData";const Qt="PutRegistryCatalogDataRequest";const xt="PutRegistryCatalogDataResponse";const Tt="PutRepositoryCatalogDataRequest";const vt="PutRepositoryCatalogDataResponse";const Pt="PutRepositoryCatalogData";const Dt="Registry";const kt="RegistryAlias";const _t="RepositoryAlreadyExistsException";const Lt="RegistryAliasList";const Ot="RegistryCatalogData";const Ft="RepositoryCatalogDataInput";const Ut="RepositoryCatalogDataNotFoundException";const Mt="RepositoryCatalogData";const Ht="ReferencedImageDetail";const $t="ReferencedImagesNotFoundException";const Gt="RegistryList";const qt="RepositoryList";const zt="RepositoryNotEmptyException";const Vt="RegistryNotFoundException";const jt="RepositoryNotFoundException";const Yt="RepositoryPolicyNotFoundException";const Jt="Repository";const Wt="ServerException";const Kt="SetRepositoryPolicy";const Xt="SetRepositoryPolicyRequest";const Zt="SetRepositoryPolicyResponse";const er="Tag";const tr="TagList";const rr="TooManyTagsException";const nr="TagResource";const sr="TagResourceRequest";const or="TagResourceResponse";const ir="UnsupportedCommandException";const ar="UploadLayerPart";const cr="UploadLayerPartRequest";const lr="UploadLayerPartResponse";const ur="UploadNotFoundException";const dr="UntagResource";const pr="UntagResourceRequest";const Ar="UntagResourceResponse";const mr="Value";const gr="aliases";const fr="authorizationData";const hr="artifactMediaType";const yr="authorizationToken";const Er="aboutText";const Cr="architectures";const Ir="client";const br="createdAt";const Sr="catalogData";const Br="description";const wr="displayName";const Rr="defaultRegistryAlias";const Nr="error";const Qr="expiresAt";const xr="failures";const Tr="failureCode";const vr="failureReason";const Pr="force";const Dr="image";const kr="imageDetails";const _r="imageDigest";const Lr="imageDetail";const Or="imageIds";const Fr="imageId";const Ur="imageManifest";const Mr="imageManifestMediaType";const Hr="imagePushedAt";const $r="imageSizeInBytes";const Gr="imageTags";const qr="imageTagDetails";const zr="imageTag";const Vr="layers";const jr="layerAvailability";const Yr="lastByteReceived";const Jr="layerDigests";const Wr="layerDigest";const Kr="logoImageBlob";const Xr="layerPartBlob";const Zr="layerSize";const en="logoUrl";const tn="lastValidByteReceived";const rn="message";const nn="marketplaceCertified";const sn="maxResults";const on="mediaType";const an="name";const cn="nextToken";const ln="operatingSystems";const un="partFirstByte";const dn="partLastByte";const pn="primaryRegistryAlias";const An="partSize";const mn="policyText";const gn="repository";const hn="resourceArn";const yn="registryArn";const En="repositoryArn";const Cn="registryCatalogData";const In="registryId";const bn="repositoryName";const Sn="repositoryNames";const Bn="registryUri";const wn="repositoryUri";const Rn="registries";const Nn="repositories";const Qn="smithy.ts.sdk.synthetic.com.amazonaws.ecrpublic";const xn="server";const Tn="status";const vn="tags";const Pn="tagKeys";const Dn="uploadId";const kn="usageText";const _n="verified";const Ln="com.amazonaws.ecrpublic";const On=n(6890);const Fn=n(3303);const Un=n(977);const Mn=On.TypeRegistry.for(Qn);t.ECRPUBLICServiceException$=[-3,Qn,"ECRPUBLICServiceException",0,[],[]];Mn.registerError(t.ECRPUBLICServiceException$,Fn.ECRPUBLICServiceException);const Hn=On.TypeRegistry.for(Ln);t.EmptyUploadException$=[-3,Ln,ye,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.EmptyUploadException$,Un.EmptyUploadException);t.ImageAlreadyExistsException$=[-3,Ln,Pe,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.ImageAlreadyExistsException$,Un.ImageAlreadyExistsException);t.ImageDigestDoesNotMatchException$=[-3,Ln,ke,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.ImageDigestDoesNotMatchException$,Un.ImageDigestDoesNotMatchException);t.ImageNotFoundException$=[-3,Ln,ze,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.ImageNotFoundException$,Un.ImageNotFoundException);t.ImageTagAlreadyExistsException$=[-3,Ln,je,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.ImageTagAlreadyExistsException$,Un.ImageTagAlreadyExistsException);t.InvalidLayerException$=[-3,Ln,Me,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.InvalidLayerException$,Un.InvalidLayerException);t.InvalidLayerPartException$=[-3,Ln,He,{[Nr]:Ir},[In,bn,Dn,tn,rn],[0,0,0,1,0]];Hn.registerError(t.InvalidLayerPartException$,Un.InvalidLayerPartException);t.InvalidParameterException$=[-3,Ln,Ve,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.InvalidParameterException$,Un.InvalidParameterException);t.InvalidTagParameterException$=[-3,Ln,We,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.InvalidTagParameterException$,Un.InvalidTagParameterException);t.LayerAlreadyExistsException$=[-3,Ln,Ze,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.LayerAlreadyExistsException$,Un.LayerAlreadyExistsException);t.LayerPartTooSmallException$=[-3,Ln,Ct,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.LayerPartTooSmallException$,Un.LayerPartTooSmallException);t.LayersNotFoundException$=[-3,Ln,Et,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.LayersNotFoundException$,Un.LayersNotFoundException);t.LimitExceededException$=[-3,Ln,At,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.LimitExceededException$,Un.LimitExceededException);t.ReferencedImagesNotFoundException$=[-3,Ln,$t,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.ReferencedImagesNotFoundException$,Un.ReferencedImagesNotFoundException);t.RegistryNotFoundException$=[-3,Ln,Vt,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RegistryNotFoundException$,Un.RegistryNotFoundException);t.RepositoryAlreadyExistsException$=[-3,Ln,_t,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RepositoryAlreadyExistsException$,Un.RepositoryAlreadyExistsException);t.RepositoryCatalogDataNotFoundException$=[-3,Ln,Ut,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RepositoryCatalogDataNotFoundException$,Un.RepositoryCatalogDataNotFoundException);t.RepositoryNotEmptyException$=[-3,Ln,zt,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RepositoryNotEmptyException$,Un.RepositoryNotEmptyException);t.RepositoryNotFoundException$=[-3,Ln,jt,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RepositoryNotFoundException$,Un.RepositoryNotFoundException);t.RepositoryPolicyNotFoundException$=[-3,Ln,Yt,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.RepositoryPolicyNotFoundException$,Un.RepositoryPolicyNotFoundException);t.ServerException$=[-3,Ln,Wt,{[Nr]:xn},[rn],[0]];Hn.registerError(t.ServerException$,Un.ServerException);t.TooManyTagsException$=[-3,Ln,rr,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.TooManyTagsException$,Un.TooManyTagsException);t.UnsupportedCommandException$=[-3,Ln,ir,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.UnsupportedCommandException$,Un.UnsupportedCommandException);t.UploadNotFoundException$=[-3,Ln,ur,{[Nr]:Ir},[rn],[0]];Hn.registerError(t.UploadNotFoundException$,Un.UploadNotFoundException);t.errorTypeRegistries=[Mn,Hn];t.AuthorizationData$=[3,Ln,o,0,[yr,Qr],[0,4]];t.BatchCheckLayerAvailabilityRequest$=[3,Ln,c,0,[bn,Jr,In],[0,64|0,0],2];t.BatchCheckLayerAvailabilityResponse$=[3,Ln,d,0,[Vr,xr],[()=>Kn,()=>Wn]];t.BatchDeleteImageRequest$=[3,Ln,y,0,[bn,Or,In],[0,()=>Vn,0],2];t.BatchDeleteImageResponse$=[3,Ln,C,0,[Or,xr],[()=>Vn,()=>zn]];t.CompleteLayerUploadRequest$=[3,Ln,v,0,[bn,Dn,Jr,In],[0,0,64|0,0],3];t.CompleteLayerUploadResponse$=[3,Ln,D,0,[In,bn,Dn,Wr],[0,0,0,0]];t.CreateRepositoryRequest$=[3,Ln,$,0,[bn,Sr,vn],[0,()=>t.RepositoryCatalogDataInput$,()=>ss],1];t.CreateRepositoryResponse$=[3,Ln,V,0,[gn,Sr],[()=>t.Repository$,()=>t.RepositoryCatalogData$]];t.DeleteRepositoryPolicyRequest$=[3,Ln,ce,0,[bn,In],[0,0],1];t.DeleteRepositoryPolicyResponse$=[3,Ln,le,0,[In,bn,mn],[0,0,0]];t.DeleteRepositoryRequest$=[3,Ln,ue,0,[bn,In,Pr],[0,0,2],1];t.DeleteRepositoryResponse$=[3,Ln,de,0,[gn],[()=>t.Repository$]];t.DescribeImagesRequest$=[3,Ln,te,0,[bn,In,Or,cn,sn],[0,0,()=>Vn,0,1],1];t.DescribeImagesResponse$=[3,Ln,re,0,[kr,cn],[()=>qn,0]];t.DescribeImageTagsRequest$=[3,Ln,se,0,[bn,In,cn,sn],[0,0,0,1],1];t.DescribeImageTagsResponse$=[3,Ln,oe,0,[qr,cn],[()=>jn,0]];t.DescribeRegistriesRequest$=[3,Ln,pe,0,[cn,sn],[0,1]];t.DescribeRegistriesResponse$=[3,Ln,Ae,0,[Rn,cn],[()=>es,0],1];t.DescribeRepositoriesRequest$=[3,Ln,me,0,[In,Sn,cn,sn],[0,64|0,0,1]];t.DescribeRepositoriesResponse$=[3,Ln,ge,0,[Nn,cn],[()=>ts,0]];t.GetAuthorizationTokenRequest$=[3,Ln,Ce,0,[],[]];t.GetAuthorizationTokenResponse$=[3,Ln,Ie,0,[fr],[()=>t.AuthorizationData$]];t.GetRegistryCatalogDataRequest$=[3,Ln,Se,0,[],[]];t.GetRegistryCatalogDataResponse$=[3,Ln,Be,0,[Cn],[()=>t.RegistryCatalogData$],1];t.GetRepositoryCatalogDataRequest$=[3,Ln,we,0,[bn,In],[0,0],1];t.GetRepositoryCatalogDataResponse$=[3,Ln,Re,0,[Sr],[()=>t.RepositoryCatalogData$]];t.GetRepositoryPolicyRequest$=[3,Ln,xe,0,[bn,In],[0,0],1];t.GetRepositoryPolicyResponse$=[3,Ln,Te,0,[In,bn,mn],[0,0,0]];t.Image$=[3,Ln,ve,0,[In,bn,Fr,Ur,Mr],[0,0,()=>t.ImageIdentifier$,0,0]];t.ImageDetail$=[3,Ln,De,0,[In,bn,_r,Gr,$r,Hr,Mr,hr],[0,0,0,64|0,1,4,0,0]];t.ImageFailure$=[3,Ln,Le,0,[Fr,Tr,vr],[()=>t.ImageIdentifier$,0,0]];t.ImageIdentifier$=[3,Ln,Fe,0,[_r,zr],[0,0]];t.ImageTagDetail$=[3,Ln,Ye,0,[zr,br,Lr],[0,4,()=>t.ReferencedImageDetail$]];t.InitiateLayerUploadRequest$=[3,Ln,Ge,0,[bn,In],[0,0],1];t.InitiateLayerUploadResponse$=[3,Ln,qe,0,[Dn,An],[0,1]];t.Layer$=[3,Ln,Xe,0,[Wr,jr,Zr,on],[0,0,1,0]];t.LayerFailure$=[3,Ln,mt,0,[Wr,Tr,vr],[0,0,0]];t.ListTagsForResourceRequest$=[3,Ln,bt,0,[hn],[0],1];t.ListTagsForResourceResponse$=[3,Ln,St,0,[vn],[()=>ss]];t.PutImageRequest$=[3,Ln,wt,0,[bn,Ur,In,Mr,zr,_r],[0,0,0,0,0,0],2];t.PutImageResponse$=[3,Ln,Rt,0,[Dr],[()=>t.Image$]];t.PutRegistryCatalogDataRequest$=[3,Ln,Qt,0,[wr],[0]];t.PutRegistryCatalogDataResponse$=[3,Ln,xt,0,[Cn],[()=>t.RegistryCatalogData$],1];t.PutRepositoryCatalogDataRequest$=[3,Ln,Tt,0,[bn,Sr,In],[0,()=>t.RepositoryCatalogDataInput$,0],2];t.PutRepositoryCatalogDataResponse$=[3,Ln,vt,0,[Sr],[()=>t.RepositoryCatalogData$]];t.ReferencedImageDetail$=[3,Ln,Ht,0,[_r,$r,Hr,Mr,hr],[0,1,4,0,0]];t.Registry$=[3,Ln,Dt,0,[In,yn,Bn,_n,gr],[0,0,0,2,()=>Zn],5];t.RegistryAlias$=[3,Ln,kt,0,[an,Tn,pn,Rr],[0,0,2,2],4];t.RegistryCatalogData$=[3,Ln,Ot,0,[wr],[0]];t.Repository$=[3,Ln,Jt,0,[En,In,bn,wn,br],[0,0,0,0,4]];t.RepositoryCatalogData$=[3,Ln,Mt,0,[Br,Cr,ln,en,Er,kn,nn],[0,64|0,64|0,0,0,0,2]];t.RepositoryCatalogDataInput$=[3,Ln,Ft,0,[Br,Cr,ln,Kr,Er,kn],[0,64|0,64|0,21,0,0]];t.SetRepositoryPolicyRequest$=[3,Ln,Xt,0,[bn,mn,In,Pr],[0,0,0,2],2];t.SetRepositoryPolicyResponse$=[3,Ln,Zt,0,[In,bn,mn],[0,0,0]];t.Tag$=[3,Ln,er,0,[Ke,mr],[0,0]];t.TagResourceRequest$=[3,Ln,sr,0,[hn,vn],[0,()=>ss],2];t.TagResourceResponse$=[3,Ln,or,0,[],[]];t.UntagResourceRequest$=[3,Ln,pr,0,[hn,Pn],[0,64|0],2];t.UntagResourceResponse$=[3,Ln,Ar,0,[],[]];t.UploadLayerPartRequest$=[3,Ln,cr,0,[bn,Dn,un,dn,Xr,In],[0,0,1,1,21,0],5];t.UploadLayerPartResponse$=[3,Ln,lr,0,[In,bn,Dn,Yr],[0,0,0,1]];var $n=null&&64|0;var Gn=null&&64|0;var qn=[1,Ln,_e,0,()=>t.ImageDetail$];var zn=[1,Ln,Oe,0,()=>t.ImageFailure$];var Vn=[1,Ln,Ue,0,()=>t.ImageIdentifier$];var jn=[1,Ln,Je,0,()=>t.ImageTagDetail$];var Yn=null&&64|0;var Jn=null&&64|0;var Wn=[1,Ln,ht,0,()=>t.LayerFailure$];var Kn=[1,Ln,yt,0,()=>t.Layer$];var Xn=null&&64|0;var Zn=[1,Ln,Lt,0,()=>t.RegistryAlias$];var es=[1,Ln,Gt,0,()=>t.Registry$];var ts=[1,Ln,qt,0,()=>t.Repository$];var rs=null&&64|0;var ns=null&&64|0;var ss=[1,Ln,tr,0,()=>t.Tag$];t.BatchCheckLayerAvailability$=[9,Ln,i,0,()=>t.BatchCheckLayerAvailabilityRequest$,()=>t.BatchCheckLayerAvailabilityResponse$];t.BatchDeleteImage$=[9,Ln,p,0,()=>t.BatchDeleteImageRequest$,()=>t.BatchDeleteImageResponse$];t.CompleteLayerUpload$=[9,Ln,Q,0,()=>t.CompleteLayerUploadRequest$,()=>t.CompleteLayerUploadResponse$];t.CreateRepository$=[9,Ln,k,0,()=>t.CreateRepositoryRequest$,()=>t.CreateRepositoryResponse$];t.DeleteRepository$=[9,Ln,ie,0,()=>t.DeleteRepositoryRequest$,()=>t.DeleteRepositoryResponse$];t.DeleteRepositoryPolicy$=[9,Ln,ae,0,()=>t.DeleteRepositoryPolicyRequest$,()=>t.DeleteRepositoryPolicyResponse$];t.DescribeImages$=[9,Ln,ee,0,()=>t.DescribeImagesRequest$,()=>t.DescribeImagesResponse$];t.DescribeImageTags$=[9,Ln,ne,0,()=>t.DescribeImageTagsRequest$,()=>t.DescribeImageTagsResponse$];t.DescribeRegistries$=[9,Ln,fe,0,()=>t.DescribeRegistriesRequest$,()=>t.DescribeRegistriesResponse$];t.DescribeRepositories$=[9,Ln,he,0,()=>t.DescribeRepositoriesRequest$,()=>t.DescribeRepositoriesResponse$];t.GetAuthorizationToken$=[9,Ln,Ee,0,()=>t.GetAuthorizationTokenRequest$,()=>t.GetAuthorizationTokenResponse$];t.GetRegistryCatalogData$=[9,Ln,be,0,()=>t.GetRegistryCatalogDataRequest$,()=>t.GetRegistryCatalogDataResponse$];t.GetRepositoryCatalogData$=[9,Ln,Ne,0,()=>t.GetRepositoryCatalogDataRequest$,()=>t.GetRepositoryCatalogDataResponse$];t.GetRepositoryPolicy$=[9,Ln,Qe,0,()=>t.GetRepositoryPolicyRequest$,()=>t.GetRepositoryPolicyResponse$];t.InitiateLayerUpload$=[9,Ln,$e,0,()=>t.InitiateLayerUploadRequest$,()=>t.InitiateLayerUploadResponse$];t.ListTagsForResource$=[9,Ln,It,0,()=>t.ListTagsForResourceRequest$,()=>t.ListTagsForResourceResponse$];t.PutImage$=[9,Ln,Bt,0,()=>t.PutImageRequest$,()=>t.PutImageResponse$];t.PutRegistryCatalogData$=[9,Ln,Nt,0,()=>t.PutRegistryCatalogDataRequest$,()=>t.PutRegistryCatalogDataResponse$];t.PutRepositoryCatalogData$=[9,Ln,Pt,0,()=>t.PutRepositoryCatalogDataRequest$,()=>t.PutRepositoryCatalogDataResponse$];t.SetRepositoryPolicy$=[9,Ln,Kt,0,()=>t.SetRepositoryPolicyRequest$,()=>t.SetRepositoryPolicyResponse$];t.TagResource$=[9,Ln,nr,0,()=>t.TagResourceRequest$,()=>t.TagResourceResponse$];t.UntagResource$=[9,Ln,dr,0,()=>t.UntagResourceRequest$,()=>t.UntagResourceResponse$];t.UploadLayerPart$=[9,Ln,ar,0,()=>t.UploadLayerPartRequest$,()=>t.UploadLayerPartResponse$]},3218:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.resolveHttpAuthSchemeConfig=t.defaultECRHttpAuthSchemeProvider=t.defaultECRHttpAuthSchemeParametersProvider=void 0;const o=n(8704);const i=n(6324);const defaultECRHttpAuthSchemeParametersProvider=async(e,t,n)=>({operation:(0,i.getSmithyContext)(t).operation,region:await(0,i.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});t.defaultECRHttpAuthSchemeParametersProvider=defaultECRHttpAuthSchemeParametersProvider;function createAwsAuthSigv4HttpAuthOption(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ecr",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}const defaultECRHttpAuthSchemeProvider=e=>{const t=[];switch(e.operation){default:{t.push(createAwsAuthSigv4HttpAuthOption(e))}}return t};t.defaultECRHttpAuthSchemeProvider=defaultECRHttpAuthSchemeProvider;const resolveHttpAuthSchemeConfig=e=>{const t=(0,o.resolveAwsSdkSigV4Config)(e);return Object.assign(t,{authSchemePreference:(0,i.normalizeProvider)(e.authSchemePreference??[])})};t.resolveHttpAuthSchemeConfig=resolveHttpAuthSchemeConfig},3628:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.defaultEndpointResolver=void 0;const o=n(3068);const i=n(9674);const c=n(4193);const d=new i.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});const defaultEndpointResolver=(e,t={})=>d.get(e,(()=>(0,i.resolveEndpoint)(c.ruleSet,{endpointParams:e,logger:t.logger})));t.defaultEndpointResolver=defaultEndpointResolver;i.customEndpointFunctions.aws=o.awsEndpointFunctions},4193:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ruleSet=void 0;const n="required",o="fn",i="argv",c="ref",d="url",p="properties",y="headers";const C=true,Q="isSet",v="booleanEquals",D="error",k="endpoint",$="tree",V="PartitionResult",ee={[n]:true,default:false,type:"boolean"},te={[n]:false,type:"string"},re={[c]:"Endpoint"},ne={[o]:v,[i]:[{[c]:"UseFIPS"},true]},se={[o]:v,[i]:[{[c]:"UseDualStack"},true]},oe={},ie={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws"]},ae={[o]:v,[i]:[{[c]:"UseFIPS"},false]},ce={[o]:v,[i]:[{[c]:"UseDualStack"},false]},le={[d]:"https://api.ecr.{Region}.{PartitionResult#dnsSuffix}",[p]:{},[y]:{}},ue={[d]:"https://ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",[p]:{},[y]:{}},de={[d]:"https://api.ecr-fips.{Region}.{PartitionResult#dnsSuffix}",[p]:{},[y]:{}},pe={[d]:"https://ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[p]:{},[y]:{}},Ae={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-us-gov"]},me={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-cn"]},ge={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-iso"]},fe={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-iso-b"]},he={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-iso-e"]},ye={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-iso-f"]},Ee={[o]:"stringEquals",[i]:[{[o]:"getAttr",[i]:[{[c]:V},"name"]},"aws-eusc"]},Ce={[o]:"getAttr",[i]:[{[c]:V},"supportsFIPS"]},Ie={[o]:v,[i]:[true,{[o]:"getAttr",[i]:[{[c]:V},"supportsDualStack"]}]},be=[{[c]:"Region"}];const Se={version:"1.0",parameters:{UseDualStack:ee,UseFIPS:ee,Endpoint:te,Region:te},rules:[{conditions:[{[o]:Q,[i]:[re]}],rules:[{conditions:[ne],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:D},{rules:[{conditions:[se],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:D},{endpoint:{[d]:re,[p]:oe,[y]:oe},type:k}],type:$}],type:$},{rules:[{conditions:[{[o]:Q,[i]:be}],rules:[{conditions:[{[o]:"aws.partition",[i]:be,assign:V}],rules:[{conditions:[ie,ae,ce],endpoint:le,type:k},{conditions:[ie,ae,se],endpoint:ue,type:k},{conditions:[ie,ne,ce],endpoint:de,type:k},{conditions:[ie,ne,se],endpoint:pe,type:k},{conditions:[Ae,ae,ce],endpoint:le,type:k},{conditions:[Ae,ae,se],endpoint:ue,type:k},{conditions:[Ae,ne,ce],endpoint:de,type:k},{conditions:[Ae,ne,se],endpoint:pe,type:k},{conditions:[me,ae,ce],endpoint:le,type:k},{conditions:[me,ae,se],endpoint:ue,type:k},{conditions:[me,ne,ce],endpoint:de,type:k},{conditions:[me,ne,se],endpoint:pe,type:k},{conditions:[ge,ae,ce],endpoint:le,type:k},{conditions:[ge,ae,se],endpoint:ue,type:k},{conditions:[ge,ne,ce],endpoint:de,type:k},{conditions:[ge,ne,se],endpoint:pe,type:k},{conditions:[fe,ae,ce],endpoint:le,type:k},{conditions:[fe,ae,se],endpoint:ue,type:k},{conditions:[fe,ne,ce],endpoint:de,type:k},{conditions:[fe,ne,se],endpoint:pe,type:k},{conditions:[he,ae,ce],endpoint:le,type:k},{conditions:[he,ae,se],endpoint:ue,type:k},{conditions:[he,ne,ce],endpoint:de,type:k},{conditions:[he,ne,se],endpoint:pe,type:k},{conditions:[ye,ae,ce],endpoint:le,type:k},{conditions:[ye,ae,se],endpoint:ue,type:k},{conditions:[ye,ne,ce],endpoint:de,type:k},{conditions:[ye,ne,se],endpoint:pe,type:k},{conditions:[Ee,ae,ce],endpoint:le,type:k},{conditions:[Ee,ae,se],endpoint:ue,type:k},{conditions:[Ee,ne,ce],endpoint:de,type:k},{conditions:[Ee,ne,se],endpoint:pe,type:k},{conditions:[ne,se],rules:[{conditions:[{[o]:v,[i]:[C,Ce]},Ie],rules:[{endpoint:{[d]:"https://api.ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[p]:oe,[y]:oe},type:k}],type:$},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:D}],type:$},{conditions:[ne,ce],rules:[{conditions:[{[o]:v,[i]:[Ce,C]}],rules:[{endpoint:de,type:k}],type:$},{error:"FIPS is enabled but this partition does not support FIPS",type:D}],type:$},{conditions:[ae,se],rules:[{conditions:[Ie],rules:[{endpoint:{[d]:"https://api.ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",[p]:oe,[y]:oe},type:k}],type:$},{error:"DualStack is enabled but this partition does not support DualStack",type:D}],type:$},{endpoint:le,type:k}],type:$}],type:$},{error:"Invalid Configuration: Missing Region",type:D}],type:$}]};t.ruleSet=Se},8249:(e,t,n)=>{var o=n(2590);var i=n(5242);var c=n(1568);var d=n(2959);var p=n(9316);var y=n(402);var C=n(6890);var Q=n(7212);var v=n(99);var D=n(9618);var k=n(1411);var $=n(3218);var V=n(3107);var ee=n(6463);var te=n(2356);var re=n(5809);var ne=n(5290);var se=n(4901);var oe=n(5502);const resolveClientEndpointParameters=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??false,useFipsEndpoint:e.useFipsEndpoint??false,defaultSigningName:"ecr"});const ie={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};const getHttpAuthExtensionConfiguration=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider;let o=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));if(n===-1){t.push(e)}else{t.splice(n,1,e)}},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){o=e},credentials(){return o}}};const resolveHttpAuthRuntimeConfig=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});const resolveRuntimeExtensions=(e,t)=>{const n=Object.assign(ee.getAwsRegionExtensionConfiguration(e),k.getDefaultExtensionConfiguration(e),te.getHttpHandlerExtensionConfiguration(e),getHttpAuthExtensionConfiguration(e));t.forEach((e=>e.configure(n)));return Object.assign(e,ee.resolveAwsRegionExtensionConfiguration(n),k.resolveDefaultRuntimeConfig(n),te.resolveHttpHandlerRuntimeConfig(n),resolveHttpAuthRuntimeConfig(n))};class ECRClient extends k.Client{config;constructor(...[e]){const t=V.getRuntimeConfig(e||{});super(t);this.initConfig=t;const n=resolveClientEndpointParameters(t);const k=d.resolveUserAgentConfig(n);const ee=D.resolveRetryConfig(k);const te=p.resolveRegionConfig(ee);const re=o.resolveHostHeaderConfig(te);const ne=v.resolveEndpointConfig(re);const se=$.resolveHttpAuthSchemeConfig(ne);const oe=resolveRuntimeExtensions(se,e?.extensions||[]);this.config=oe;this.middlewareStack.use(C.getSchemaSerdePlugin(this.config));this.middlewareStack.use(d.getUserAgentPlugin(this.config));this.middlewareStack.use(D.getRetryPlugin(this.config));this.middlewareStack.use(Q.getContentLengthPlugin(this.config));this.middlewareStack.use(o.getHostHeaderPlugin(this.config));this.middlewareStack.use(i.getLoggerPlugin(this.config));this.middlewareStack.use(c.getRecursionDetectionPlugin(this.config));this.middlewareStack.use(y.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:$.defaultECRHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async e=>new y.DefaultIdentityProviderConfig({"aws.auth#sigv4":e.credentials})}));this.middlewareStack.use(y.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class BatchCheckLayerAvailabilityCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","BatchCheckLayerAvailability",{}).n("ECRClient","BatchCheckLayerAvailabilityCommand").sc(re.BatchCheckLayerAvailability$).build()){}class BatchDeleteImageCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","BatchDeleteImage",{}).n("ECRClient","BatchDeleteImageCommand").sc(re.BatchDeleteImage$).build()){}class BatchGetImageCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","BatchGetImage",{}).n("ECRClient","BatchGetImageCommand").sc(re.BatchGetImage$).build()){}class BatchGetRepositoryScanningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","BatchGetRepositoryScanningConfiguration",{}).n("ECRClient","BatchGetRepositoryScanningConfigurationCommand").sc(re.BatchGetRepositoryScanningConfiguration$).build()){}class CompleteLayerUploadCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","CompleteLayerUpload",{}).n("ECRClient","CompleteLayerUploadCommand").sc(re.CompleteLayerUpload$).build()){}class CreatePullThroughCacheRuleCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","CreatePullThroughCacheRule",{}).n("ECRClient","CreatePullThroughCacheRuleCommand").sc(re.CreatePullThroughCacheRule$).build()){}class CreateRepositoryCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","CreateRepository",{}).n("ECRClient","CreateRepositoryCommand").sc(re.CreateRepository$).build()){}class CreateRepositoryCreationTemplateCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","CreateRepositoryCreationTemplate",{}).n("ECRClient","CreateRepositoryCreationTemplateCommand").sc(re.CreateRepositoryCreationTemplate$).build()){}class DeleteLifecyclePolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteLifecyclePolicy",{}).n("ECRClient","DeleteLifecyclePolicyCommand").sc(re.DeleteLifecyclePolicy$).build()){}class DeletePullThroughCacheRuleCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeletePullThroughCacheRule",{}).n("ECRClient","DeletePullThroughCacheRuleCommand").sc(re.DeletePullThroughCacheRule$).build()){}class DeleteRegistryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteRegistryPolicy",{}).n("ECRClient","DeleteRegistryPolicyCommand").sc(re.DeleteRegistryPolicy$).build()){}class DeleteRepositoryCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteRepository",{}).n("ECRClient","DeleteRepositoryCommand").sc(re.DeleteRepository$).build()){}class DeleteRepositoryCreationTemplateCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteRepositoryCreationTemplate",{}).n("ECRClient","DeleteRepositoryCreationTemplateCommand").sc(re.DeleteRepositoryCreationTemplate$).build()){}class DeleteRepositoryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteRepositoryPolicy",{}).n("ECRClient","DeleteRepositoryPolicyCommand").sc(re.DeleteRepositoryPolicy$).build()){}class DeleteSigningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeleteSigningConfiguration",{}).n("ECRClient","DeleteSigningConfigurationCommand").sc(re.DeleteSigningConfiguration$).build()){}class DeregisterPullTimeUpdateExclusionCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DeregisterPullTimeUpdateExclusion",{}).n("ECRClient","DeregisterPullTimeUpdateExclusionCommand").sc(re.DeregisterPullTimeUpdateExclusion$).build()){}class DescribeImageReplicationStatusCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeImageReplicationStatus",{}).n("ECRClient","DescribeImageReplicationStatusCommand").sc(re.DescribeImageReplicationStatus$).build()){}class DescribeImageScanFindingsCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeImageScanFindings",{}).n("ECRClient","DescribeImageScanFindingsCommand").sc(re.DescribeImageScanFindings$).build()){}class DescribeImagesCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeImages",{}).n("ECRClient","DescribeImagesCommand").sc(re.DescribeImages$).build()){}class DescribeImageSigningStatusCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeImageSigningStatus",{}).n("ECRClient","DescribeImageSigningStatusCommand").sc(re.DescribeImageSigningStatus$).build()){}class DescribePullThroughCacheRulesCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribePullThroughCacheRules",{}).n("ECRClient","DescribePullThroughCacheRulesCommand").sc(re.DescribePullThroughCacheRules$).build()){}class DescribeRegistryCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeRegistry",{}).n("ECRClient","DescribeRegistryCommand").sc(re.DescribeRegistry$).build()){}class DescribeRepositoriesCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeRepositories",{}).n("ECRClient","DescribeRepositoriesCommand").sc(re.DescribeRepositories$).build()){}class DescribeRepositoryCreationTemplatesCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","DescribeRepositoryCreationTemplates",{}).n("ECRClient","DescribeRepositoryCreationTemplatesCommand").sc(re.DescribeRepositoryCreationTemplates$).build()){}class GetAccountSettingCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetAccountSetting",{}).n("ECRClient","GetAccountSettingCommand").sc(re.GetAccountSetting$).build()){}class GetAuthorizationTokenCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetAuthorizationToken",{}).n("ECRClient","GetAuthorizationTokenCommand").sc(re.GetAuthorizationToken$).build()){}class GetDownloadUrlForLayerCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetDownloadUrlForLayer",{}).n("ECRClient","GetDownloadUrlForLayerCommand").sc(re.GetDownloadUrlForLayer$).build()){}class GetLifecyclePolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetLifecyclePolicy",{}).n("ECRClient","GetLifecyclePolicyCommand").sc(re.GetLifecyclePolicy$).build()){}class GetLifecyclePolicyPreviewCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetLifecyclePolicyPreview",{}).n("ECRClient","GetLifecyclePolicyPreviewCommand").sc(re.GetLifecyclePolicyPreview$).build()){}class GetRegistryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetRegistryPolicy",{}).n("ECRClient","GetRegistryPolicyCommand").sc(re.GetRegistryPolicy$).build()){}class GetRegistryScanningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetRegistryScanningConfiguration",{}).n("ECRClient","GetRegistryScanningConfigurationCommand").sc(re.GetRegistryScanningConfiguration$).build()){}class GetRepositoryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetRepositoryPolicy",{}).n("ECRClient","GetRepositoryPolicyCommand").sc(re.GetRepositoryPolicy$).build()){}class GetSigningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","GetSigningConfiguration",{}).n("ECRClient","GetSigningConfigurationCommand").sc(re.GetSigningConfiguration$).build()){}class InitiateLayerUploadCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","InitiateLayerUpload",{}).n("ECRClient","InitiateLayerUploadCommand").sc(re.InitiateLayerUpload$).build()){}class ListImageReferrersCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","ListImageReferrers",{}).n("ECRClient","ListImageReferrersCommand").sc(re.ListImageReferrers$).build()){}class ListImagesCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","ListImages",{}).n("ECRClient","ListImagesCommand").sc(re.ListImages$).build()){}class ListPullTimeUpdateExclusionsCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","ListPullTimeUpdateExclusions",{}).n("ECRClient","ListPullTimeUpdateExclusionsCommand").sc(re.ListPullTimeUpdateExclusions$).build()){}class ListTagsForResourceCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","ListTagsForResource",{}).n("ECRClient","ListTagsForResourceCommand").sc(re.ListTagsForResource$).build()){}class PutAccountSettingCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutAccountSetting",{}).n("ECRClient","PutAccountSettingCommand").sc(re.PutAccountSetting$).build()){}class PutImageCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutImage",{}).n("ECRClient","PutImageCommand").sc(re.PutImage$).build()){}class PutImageScanningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutImageScanningConfiguration",{}).n("ECRClient","PutImageScanningConfigurationCommand").sc(re.PutImageScanningConfiguration$).build()){}class PutImageTagMutabilityCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutImageTagMutability",{}).n("ECRClient","PutImageTagMutabilityCommand").sc(re.PutImageTagMutability$).build()){}class PutLifecyclePolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutLifecyclePolicy",{}).n("ECRClient","PutLifecyclePolicyCommand").sc(re.PutLifecyclePolicy$).build()){}class PutRegistryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutRegistryPolicy",{}).n("ECRClient","PutRegistryPolicyCommand").sc(re.PutRegistryPolicy$).build()){}class PutRegistryScanningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutRegistryScanningConfiguration",{}).n("ECRClient","PutRegistryScanningConfigurationCommand").sc(re.PutRegistryScanningConfiguration$).build()){}class PutReplicationConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutReplicationConfiguration",{}).n("ECRClient","PutReplicationConfigurationCommand").sc(re.PutReplicationConfiguration$).build()){}class PutSigningConfigurationCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","PutSigningConfiguration",{}).n("ECRClient","PutSigningConfigurationCommand").sc(re.PutSigningConfiguration$).build()){}class RegisterPullTimeUpdateExclusionCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","RegisterPullTimeUpdateExclusion",{}).n("ECRClient","RegisterPullTimeUpdateExclusionCommand").sc(re.RegisterPullTimeUpdateExclusion$).build()){}class SetRepositoryPolicyCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","SetRepositoryPolicy",{}).n("ECRClient","SetRepositoryPolicyCommand").sc(re.SetRepositoryPolicy$).build()){}class StartImageScanCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","StartImageScan",{}).n("ECRClient","StartImageScanCommand").sc(re.StartImageScan$).build()){}class StartLifecyclePolicyPreviewCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","StartLifecyclePolicyPreview",{}).n("ECRClient","StartLifecyclePolicyPreviewCommand").sc(re.StartLifecyclePolicyPreview$).build()){}class TagResourceCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","TagResource",{}).n("ECRClient","TagResourceCommand").sc(re.TagResource$).build()){}class UntagResourceCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","UntagResource",{}).n("ECRClient","UntagResourceCommand").sc(re.UntagResource$).build()){}class UpdateImageStorageClassCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","UpdateImageStorageClass",{}).n("ECRClient","UpdateImageStorageClassCommand").sc(re.UpdateImageStorageClass$).build()){}class UpdatePullThroughCacheRuleCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","UpdatePullThroughCacheRule",{}).n("ECRClient","UpdatePullThroughCacheRuleCommand").sc(re.UpdatePullThroughCacheRule$).build()){}class UpdateRepositoryCreationTemplateCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","UpdateRepositoryCreationTemplate",{}).n("ECRClient","UpdateRepositoryCreationTemplateCommand").sc(re.UpdateRepositoryCreationTemplate$).build()){}class UploadLayerPartCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","UploadLayerPart",{}).n("ECRClient","UploadLayerPartCommand").sc(re.UploadLayerPart$).build()){}class ValidatePullThroughCacheRuleCommand extends(k.Command.classBuilder().ep(ie).m((function(e,t,n,o){return[v.getEndpointPlugin(n,e.getEndpointParameterInstructions())]})).s("AmazonEC2ContainerRegistry_V20150921","ValidatePullThroughCacheRule",{}).n("ECRClient","ValidatePullThroughCacheRuleCommand").sc(re.ValidatePullThroughCacheRule$).build()){}const ae=y.createPaginator(ECRClient,DescribeImageScanFindingsCommand,"nextToken","nextToken","maxResults");const ce=y.createPaginator(ECRClient,DescribeImagesCommand,"nextToken","nextToken","maxResults");const le=y.createPaginator(ECRClient,DescribePullThroughCacheRulesCommand,"nextToken","nextToken","maxResults");const ue=y.createPaginator(ECRClient,DescribeRepositoriesCommand,"nextToken","nextToken","maxResults");const de=y.createPaginator(ECRClient,DescribeRepositoryCreationTemplatesCommand,"nextToken","nextToken","maxResults");const pe=y.createPaginator(ECRClient,GetLifecyclePolicyPreviewCommand,"nextToken","nextToken","maxResults");const Ae=y.createPaginator(ECRClient,ListImagesCommand,"nextToken","nextToken","maxResults");const checkState$1=async(e,t)=>{let n;try{let o=await e.send(new DescribeImageScanFindingsCommand(t));n=o;try{const returnComparator=()=>o.imageScanStatus.status;if(returnComparator()==="COMPLETE"){return{state:ne.WaiterState.SUCCESS,reason:n}}}catch(e){}try{const returnComparator=()=>o.imageScanStatus.status;if(returnComparator()==="FAILED"){return{state:ne.WaiterState.FAILURE,reason:n}}}catch(e){}}catch(e){n=e}return{state:ne.WaiterState.RETRY,reason:n}};const waitForImageScanComplete=async(e,t)=>{const n={minDelay:5,maxDelay:120};return ne.createWaiter({...n,...e},t,checkState$1)};const waitUntilImageScanComplete=async(e,t)=>{const n={minDelay:5,maxDelay:120};const o=await ne.createWaiter({...n,...e},t,checkState$1);return ne.checkExceptions(o)};const checkState=async(e,t)=>{let n;try{let o=await e.send(new GetLifecyclePolicyPreviewCommand(t));n=o;try{const returnComparator=()=>o.status;if(returnComparator()==="COMPLETE"){return{state:ne.WaiterState.SUCCESS,reason:n}}}catch(e){}try{const returnComparator=()=>o.status;if(returnComparator()==="FAILED"){return{state:ne.WaiterState.FAILURE,reason:n}}}catch(e){}}catch(e){n=e}return{state:ne.WaiterState.RETRY,reason:n}};const waitForLifecyclePolicyPreviewComplete=async(e,t)=>{const n={minDelay:5,maxDelay:120};return ne.createWaiter({...n,...e},t,checkState)};const waitUntilLifecyclePolicyPreviewComplete=async(e,t)=>{const n={minDelay:5,maxDelay:120};const o=await ne.createWaiter({...n,...e},t,checkState);return ne.checkExceptions(o)};const me={BatchCheckLayerAvailabilityCommand:BatchCheckLayerAvailabilityCommand,BatchDeleteImageCommand:BatchDeleteImageCommand,BatchGetImageCommand:BatchGetImageCommand,BatchGetRepositoryScanningConfigurationCommand:BatchGetRepositoryScanningConfigurationCommand,CompleteLayerUploadCommand:CompleteLayerUploadCommand,CreatePullThroughCacheRuleCommand:CreatePullThroughCacheRuleCommand,CreateRepositoryCommand:CreateRepositoryCommand,CreateRepositoryCreationTemplateCommand:CreateRepositoryCreationTemplateCommand,DeleteLifecyclePolicyCommand:DeleteLifecyclePolicyCommand,DeletePullThroughCacheRuleCommand:DeletePullThroughCacheRuleCommand,DeleteRegistryPolicyCommand:DeleteRegistryPolicyCommand,DeleteRepositoryCommand:DeleteRepositoryCommand,DeleteRepositoryCreationTemplateCommand:DeleteRepositoryCreationTemplateCommand,DeleteRepositoryPolicyCommand:DeleteRepositoryPolicyCommand,DeleteSigningConfigurationCommand:DeleteSigningConfigurationCommand,DeregisterPullTimeUpdateExclusionCommand:DeregisterPullTimeUpdateExclusionCommand,DescribeImageReplicationStatusCommand:DescribeImageReplicationStatusCommand,DescribeImagesCommand:DescribeImagesCommand,DescribeImageScanFindingsCommand:DescribeImageScanFindingsCommand,DescribeImageSigningStatusCommand:DescribeImageSigningStatusCommand,DescribePullThroughCacheRulesCommand:DescribePullThroughCacheRulesCommand,DescribeRegistryCommand:DescribeRegistryCommand,DescribeRepositoriesCommand:DescribeRepositoriesCommand,DescribeRepositoryCreationTemplatesCommand:DescribeRepositoryCreationTemplatesCommand,GetAccountSettingCommand:GetAccountSettingCommand,GetAuthorizationTokenCommand:GetAuthorizationTokenCommand,GetDownloadUrlForLayerCommand:GetDownloadUrlForLayerCommand,GetLifecyclePolicyCommand:GetLifecyclePolicyCommand,GetLifecyclePolicyPreviewCommand:GetLifecyclePolicyPreviewCommand,GetRegistryPolicyCommand:GetRegistryPolicyCommand,GetRegistryScanningConfigurationCommand:GetRegistryScanningConfigurationCommand,GetRepositoryPolicyCommand:GetRepositoryPolicyCommand,GetSigningConfigurationCommand:GetSigningConfigurationCommand,InitiateLayerUploadCommand:InitiateLayerUploadCommand,ListImageReferrersCommand:ListImageReferrersCommand,ListImagesCommand:ListImagesCommand,ListPullTimeUpdateExclusionsCommand:ListPullTimeUpdateExclusionsCommand,ListTagsForResourceCommand:ListTagsForResourceCommand,PutAccountSettingCommand:PutAccountSettingCommand,PutImageCommand:PutImageCommand,PutImageScanningConfigurationCommand:PutImageScanningConfigurationCommand,PutImageTagMutabilityCommand:PutImageTagMutabilityCommand,PutLifecyclePolicyCommand:PutLifecyclePolicyCommand,PutRegistryPolicyCommand:PutRegistryPolicyCommand,PutRegistryScanningConfigurationCommand:PutRegistryScanningConfigurationCommand,PutReplicationConfigurationCommand:PutReplicationConfigurationCommand,PutSigningConfigurationCommand:PutSigningConfigurationCommand,RegisterPullTimeUpdateExclusionCommand:RegisterPullTimeUpdateExclusionCommand,SetRepositoryPolicyCommand:SetRepositoryPolicyCommand,StartImageScanCommand:StartImageScanCommand,StartLifecyclePolicyPreviewCommand:StartLifecyclePolicyPreviewCommand,TagResourceCommand:TagResourceCommand,UntagResourceCommand:UntagResourceCommand,UpdateImageStorageClassCommand:UpdateImageStorageClassCommand,UpdatePullThroughCacheRuleCommand:UpdatePullThroughCacheRuleCommand,UpdateRepositoryCreationTemplateCommand:UpdateRepositoryCreationTemplateCommand,UploadLayerPartCommand:UploadLayerPartCommand,ValidatePullThroughCacheRuleCommand:ValidatePullThroughCacheRuleCommand};const ge={paginateDescribeImages:ce,paginateDescribeImageScanFindings:ae,paginateDescribePullThroughCacheRules:le,paginateDescribeRepositories:ue,paginateDescribeRepositoryCreationTemplates:de,paginateGetLifecyclePolicyPreview:pe,paginateListImages:Ae};const fe={waitUntilImageScanComplete:waitUntilImageScanComplete,waitUntilLifecyclePolicyPreviewComplete:waitUntilLifecyclePolicyPreviewComplete};class ECR extends ECRClient{}k.createAggregatedClient(me,ECR,{paginators:ge,waiters:fe});const he={InvalidLayerDigest:"InvalidLayerDigest",MissingLayerDigest:"MissingLayerDigest"};const ye={ARCHIVED:"ARCHIVED",AVAILABLE:"AVAILABLE",UNAVAILABLE:"UNAVAILABLE"};const Ee={ImageInaccessible:"ImageInaccessible",ImageNotFound:"ImageNotFound",ImageReferencedByManifestList:"ImageReferencedByManifestList",ImageTagDoesNotMatchDigest:"ImageTagDoesNotMatchDigest",InvalidImageDigest:"InvalidImageDigest",InvalidImageTag:"InvalidImageTag",KmsError:"KmsError",MissingDigestAndTag:"MissingDigestAndTag",UpstreamAccessDenied:"UpstreamAccessDenied",UpstreamTooManyRequests:"UpstreamTooManyRequests",UpstreamUnavailable:"UpstreamUnavailable"};const Ce={REPOSITORY_NOT_FOUND:"REPOSITORY_NOT_FOUND"};const Ie={WILDCARD:"WILDCARD"};const be={CONTINUOUS_SCAN:"CONTINUOUS_SCAN",MANUAL:"MANUAL",SCAN_ON_PUSH:"SCAN_ON_PUSH"};const Se={AzureContainerRegistry:"azure-container-registry",DockerHub:"docker-hub",Ecr:"ecr",EcrPublic:"ecr-public",GitHubContainerRegistry:"github-container-registry",GitLabContainerRegistry:"gitlab-container-registry",K8s:"k8s",Quay:"quay"};const Be={AES256:"AES256",KMS:"KMS",KMS_DSSE:"KMS_DSSE"};const we={IMMUTABLE:"IMMUTABLE",IMMUTABLE_WITH_EXCLUSION:"IMMUTABLE_WITH_EXCLUSION",MUTABLE:"MUTABLE",MUTABLE_WITH_EXCLUSION:"MUTABLE_WITH_EXCLUSION"};const Re={WILDCARD:"WILDCARD"};const Ne={CREATE_ON_PUSH:"CREATE_ON_PUSH",PULL_THROUGH_CACHE:"PULL_THROUGH_CACHE",REPLICATION:"REPLICATION"};const Qe={WILDCARD_MATCH:"WILDCARD_MATCH"};const xe={COMPLETE:"COMPLETE",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"};const Te={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ANY:"ANY",ARCHIVED:"ARCHIVED"};const ve={ANY:"ANY",TAGGED:"TAGGED",UNTAGGED:"UNTAGGED"};const Pe={CRITICAL:"CRITICAL",HIGH:"HIGH",INFORMATIONAL:"INFORMATIONAL",LOW:"LOW",MEDIUM:"MEDIUM",UNDEFINED:"UNDEFINED"};const De={ACTIVE:"ACTIVE",COMPLETE:"COMPLETE",FAILED:"FAILED",FINDINGS_UNAVAILABLE:"FINDINGS_UNAVAILABLE",IMAGE_ARCHIVED:"IMAGE_ARCHIVED",IN_PROGRESS:"IN_PROGRESS",LIMIT_EXCEEDED:"LIMIT_EXCEEDED",PENDING:"PENDING",SCAN_ELIGIBILITY_EXPIRED:"SCAN_ELIGIBILITY_EXPIRED",UNSUPPORTED_IMAGE:"UNSUPPORTED_IMAGE"};const ke={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ARCHIVED:"ARCHIVED"};const _e={COMPLETE:"COMPLETE",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"};const Le={PREFIX_MATCH:"PREFIX_MATCH"};const Oe={ARCHIVE:"ARCHIVE"};const Fe={EXPIRE:"EXPIRE",TRANSITION:"TRANSITION"};const Ue={ARCHIVE:"ARCHIVE",STANDARD:"STANDARD"};const Me={COMPLETE:"COMPLETE",EXPIRED:"EXPIRED",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"};const He={BASIC:"BASIC",ENHANCED:"ENHANCED"};const $e={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ANY:"ANY",ARCHIVED:"ARCHIVED"};const Ge={ACTIVATING:"ACTIVATING",ACTIVE:"ACTIVE",ARCHIVED:"ARCHIVED"};const qe={ARCHIVE:"ARCHIVE",STANDARD:"STANDARD"};t.$Command=k.Command;t.__Client=k.Client;t.ECRServiceException=oe.ECRServiceException;t.ArtifactStatus=Ge;t.ArtifactStatusFilter=$e;t.BatchCheckLayerAvailabilityCommand=BatchCheckLayerAvailabilityCommand;t.BatchDeleteImageCommand=BatchDeleteImageCommand;t.BatchGetImageCommand=BatchGetImageCommand;t.BatchGetRepositoryScanningConfigurationCommand=BatchGetRepositoryScanningConfigurationCommand;t.CompleteLayerUploadCommand=CompleteLayerUploadCommand;t.CreatePullThroughCacheRuleCommand=CreatePullThroughCacheRuleCommand;t.CreateRepositoryCommand=CreateRepositoryCommand;t.CreateRepositoryCreationTemplateCommand=CreateRepositoryCreationTemplateCommand;t.DeleteLifecyclePolicyCommand=DeleteLifecyclePolicyCommand;t.DeletePullThroughCacheRuleCommand=DeletePullThroughCacheRuleCommand;t.DeleteRegistryPolicyCommand=DeleteRegistryPolicyCommand;t.DeleteRepositoryCommand=DeleteRepositoryCommand;t.DeleteRepositoryCreationTemplateCommand=DeleteRepositoryCreationTemplateCommand;t.DeleteRepositoryPolicyCommand=DeleteRepositoryPolicyCommand;t.DeleteSigningConfigurationCommand=DeleteSigningConfigurationCommand;t.DeregisterPullTimeUpdateExclusionCommand=DeregisterPullTimeUpdateExclusionCommand;t.DescribeImageReplicationStatusCommand=DescribeImageReplicationStatusCommand;t.DescribeImageScanFindingsCommand=DescribeImageScanFindingsCommand;t.DescribeImageSigningStatusCommand=DescribeImageSigningStatusCommand;t.DescribeImagesCommand=DescribeImagesCommand;t.DescribePullThroughCacheRulesCommand=DescribePullThroughCacheRulesCommand;t.DescribeRegistryCommand=DescribeRegistryCommand;t.DescribeRepositoriesCommand=DescribeRepositoriesCommand;t.DescribeRepositoryCreationTemplatesCommand=DescribeRepositoryCreationTemplatesCommand;t.ECR=ECR;t.ECRClient=ECRClient;t.EncryptionType=Be;t.FindingSeverity=Pe;t.GetAccountSettingCommand=GetAccountSettingCommand;t.GetAuthorizationTokenCommand=GetAuthorizationTokenCommand;t.GetDownloadUrlForLayerCommand=GetDownloadUrlForLayerCommand;t.GetLifecyclePolicyCommand=GetLifecyclePolicyCommand;t.GetLifecyclePolicyPreviewCommand=GetLifecyclePolicyPreviewCommand;t.GetRegistryPolicyCommand=GetRegistryPolicyCommand;t.GetRegistryScanningConfigurationCommand=GetRegistryScanningConfigurationCommand;t.GetRepositoryPolicyCommand=GetRepositoryPolicyCommand;t.GetSigningConfigurationCommand=GetSigningConfigurationCommand;t.ImageActionType=Fe;t.ImageFailureCode=Ee;t.ImageStatus=ke;t.ImageStatusFilter=Te;t.ImageTagMutability=we;t.ImageTagMutabilityExclusionFilterType=Re;t.InitiateLayerUploadCommand=InitiateLayerUploadCommand;t.LayerAvailability=ye;t.LayerFailureCode=he;t.LifecyclePolicyPreviewStatus=Me;t.LifecyclePolicyStorageClass=Ue;t.LifecyclePolicyTargetStorageClass=Oe;t.ListImageReferrersCommand=ListImageReferrersCommand;t.ListImagesCommand=ListImagesCommand;t.ListPullTimeUpdateExclusionsCommand=ListPullTimeUpdateExclusionsCommand;t.ListTagsForResourceCommand=ListTagsForResourceCommand;t.PutAccountSettingCommand=PutAccountSettingCommand;t.PutImageCommand=PutImageCommand;t.PutImageScanningConfigurationCommand=PutImageScanningConfigurationCommand;t.PutImageTagMutabilityCommand=PutImageTagMutabilityCommand;t.PutLifecyclePolicyCommand=PutLifecyclePolicyCommand;t.PutRegistryPolicyCommand=PutRegistryPolicyCommand;t.PutRegistryScanningConfigurationCommand=PutRegistryScanningConfigurationCommand;t.PutReplicationConfigurationCommand=PutReplicationConfigurationCommand;t.PutSigningConfigurationCommand=PutSigningConfigurationCommand;t.RCTAppliedFor=Ne;t.RegisterPullTimeUpdateExclusionCommand=RegisterPullTimeUpdateExclusionCommand;t.ReplicationStatus=xe;t.RepositoryFilterType=Le;t.ScanFrequency=be;t.ScanStatus=De;t.ScanType=He;t.ScanningConfigurationFailureCode=Ce;t.ScanningRepositoryFilterType=Ie;t.SetRepositoryPolicyCommand=SetRepositoryPolicyCommand;t.SigningRepositoryFilterType=Qe;t.SigningStatus=_e;t.StartImageScanCommand=StartImageScanCommand;t.StartLifecyclePolicyPreviewCommand=StartLifecyclePolicyPreviewCommand;t.TagResourceCommand=TagResourceCommand;t.TagStatus=ve;t.TargetStorageClass=qe;t.UntagResourceCommand=UntagResourceCommand;t.UpdateImageStorageClassCommand=UpdateImageStorageClassCommand;t.UpdatePullThroughCacheRuleCommand=UpdatePullThroughCacheRuleCommand;t.UpdateRepositoryCreationTemplateCommand=UpdateRepositoryCreationTemplateCommand;t.UploadLayerPartCommand=UploadLayerPartCommand;t.UpstreamRegistry=Se;t.ValidatePullThroughCacheRuleCommand=ValidatePullThroughCacheRuleCommand;t.paginateDescribeImageScanFindings=ae;t.paginateDescribeImages=ce;t.paginateDescribePullThroughCacheRules=le;t.paginateDescribeRepositories=ue;t.paginateDescribeRepositoryCreationTemplates=de;t.paginateGetLifecyclePolicyPreview=pe;t.paginateListImages=Ae;t.waitForImageScanComplete=waitForImageScanComplete;t.waitForLifecyclePolicyPreviewComplete=waitForLifecyclePolicyPreviewComplete;t.waitUntilImageScanComplete=waitUntilImageScanComplete;t.waitUntilLifecyclePolicyPreviewComplete=waitUntilLifecyclePolicyPreviewComplete;Object.prototype.hasOwnProperty.call(re,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:re["__proto__"]});Object.keys(re).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=re[e]}));Object.prototype.hasOwnProperty.call(se,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:se["__proto__"]});Object.keys(se).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=se[e]}))},5502:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ECRServiceException=t.__ServiceException=void 0;const o=n(1411);Object.defineProperty(t,"__ServiceException",{enumerable:true,get:function(){return o.ServiceException}});class ECRServiceException extends o.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,ECRServiceException.prototype)}}t.ECRServiceException=ECRServiceException},4901:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.InvalidLayerPartException=t.ImageStorageClassUpdateNotSupportedException=t.LifecyclePolicyPreviewInProgressException=t.UnsupportedImageTypeException=t.ImageArchivedException=t.ExclusionAlreadyExistsException=t.BlockedByOrganizationPolicyException=t.ReferencedImagesNotFoundException=t.ImageTagAlreadyExistsException=t.ImageDigestDoesNotMatchException=t.ImageAlreadyExistsException=t.LifecyclePolicyPreviewNotFoundException=t.UnableToGetUpstreamLayerException=t.LayersNotFoundException=t.LayerInaccessibleException=t.ScanNotFoundException=t.ImageNotFoundException=t.ExclusionNotFoundException=t.SigningConfigurationNotFoundException=t.RepositoryPolicyNotFoundException=t.TemplateNotFoundException=t.RepositoryNotEmptyException=t.RegistryPolicyNotFoundException=t.PullThroughCacheRuleNotFoundException=t.LifecyclePolicyNotFoundException=t.TemplateAlreadyExistsException=t.TooManyTagsException=t.RepositoryAlreadyExistsException=t.InvalidTagParameterException=t.UnsupportedUpstreamRegistryException=t.UnableToDecryptSecretValueException=t.UnableToAccessSecretException=t.SecretNotFoundException=t.PullThroughCacheRuleAlreadyExistsException=t.UploadNotFoundException=t.LayerPartTooSmallException=t.LayerAlreadyExistsException=t.KmsException=t.InvalidLayerException=t.EmptyUploadException=t.ValidationException=t.UnableToGetUpstreamImageException=t.LimitExceededException=t.ServerException=t.RepositoryNotFoundException=t.InvalidParameterException=void 0;const o=n(5502);class InvalidParameterException extends o.ECRServiceException{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidParameterException.prototype)}}t.InvalidParameterException=InvalidParameterException;class RepositoryNotFoundException extends o.ECRServiceException{name="RepositoryNotFoundException";$fault="client";constructor(e){super({name:"RepositoryNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryNotFoundException.prototype)}}t.RepositoryNotFoundException=RepositoryNotFoundException;class ServerException extends o.ECRServiceException{name="ServerException";$fault="server";constructor(e){super({name:"ServerException",$fault:"server",...e});Object.setPrototypeOf(this,ServerException.prototype)}}t.ServerException=ServerException;class LimitExceededException extends o.ECRServiceException{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e});Object.setPrototypeOf(this,LimitExceededException.prototype)}}t.LimitExceededException=LimitExceededException;class UnableToGetUpstreamImageException extends o.ECRServiceException{name="UnableToGetUpstreamImageException";$fault="client";constructor(e){super({name:"UnableToGetUpstreamImageException",$fault:"client",...e});Object.setPrototypeOf(this,UnableToGetUpstreamImageException.prototype)}}t.UnableToGetUpstreamImageException=UnableToGetUpstreamImageException;class ValidationException extends o.ECRServiceException{name="ValidationException";$fault="client";constructor(e){super({name:"ValidationException",$fault:"client",...e});Object.setPrototypeOf(this,ValidationException.prototype)}}t.ValidationException=ValidationException;class EmptyUploadException extends o.ECRServiceException{name="EmptyUploadException";$fault="client";constructor(e){super({name:"EmptyUploadException",$fault:"client",...e});Object.setPrototypeOf(this,EmptyUploadException.prototype)}}t.EmptyUploadException=EmptyUploadException;class InvalidLayerException extends o.ECRServiceException{name="InvalidLayerException";$fault="client";constructor(e){super({name:"InvalidLayerException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidLayerException.prototype)}}t.InvalidLayerException=InvalidLayerException;class KmsException extends o.ECRServiceException{name="KmsException";$fault="client";kmsError;constructor(e){super({name:"KmsException",$fault:"client",...e});Object.setPrototypeOf(this,KmsException.prototype);this.kmsError=e.kmsError}}t.KmsException=KmsException;class LayerAlreadyExistsException extends o.ECRServiceException{name="LayerAlreadyExistsException";$fault="client";constructor(e){super({name:"LayerAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,LayerAlreadyExistsException.prototype)}}t.LayerAlreadyExistsException=LayerAlreadyExistsException;class LayerPartTooSmallException extends o.ECRServiceException{name="LayerPartTooSmallException";$fault="client";constructor(e){super({name:"LayerPartTooSmallException",$fault:"client",...e});Object.setPrototypeOf(this,LayerPartTooSmallException.prototype)}}t.LayerPartTooSmallException=LayerPartTooSmallException;class UploadNotFoundException extends o.ECRServiceException{name="UploadNotFoundException";$fault="client";constructor(e){super({name:"UploadNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,UploadNotFoundException.prototype)}}t.UploadNotFoundException=UploadNotFoundException;class PullThroughCacheRuleAlreadyExistsException extends o.ECRServiceException{name="PullThroughCacheRuleAlreadyExistsException";$fault="client";constructor(e){super({name:"PullThroughCacheRuleAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,PullThroughCacheRuleAlreadyExistsException.prototype)}}t.PullThroughCacheRuleAlreadyExistsException=PullThroughCacheRuleAlreadyExistsException;class SecretNotFoundException extends o.ECRServiceException{name="SecretNotFoundException";$fault="client";constructor(e){super({name:"SecretNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,SecretNotFoundException.prototype)}}t.SecretNotFoundException=SecretNotFoundException;class UnableToAccessSecretException extends o.ECRServiceException{name="UnableToAccessSecretException";$fault="client";constructor(e){super({name:"UnableToAccessSecretException",$fault:"client",...e});Object.setPrototypeOf(this,UnableToAccessSecretException.prototype)}}t.UnableToAccessSecretException=UnableToAccessSecretException;class UnableToDecryptSecretValueException extends o.ECRServiceException{name="UnableToDecryptSecretValueException";$fault="client";constructor(e){super({name:"UnableToDecryptSecretValueException",$fault:"client",...e});Object.setPrototypeOf(this,UnableToDecryptSecretValueException.prototype)}}t.UnableToDecryptSecretValueException=UnableToDecryptSecretValueException;class UnsupportedUpstreamRegistryException extends o.ECRServiceException{name="UnsupportedUpstreamRegistryException";$fault="client";constructor(e){super({name:"UnsupportedUpstreamRegistryException",$fault:"client",...e});Object.setPrototypeOf(this,UnsupportedUpstreamRegistryException.prototype)}}t.UnsupportedUpstreamRegistryException=UnsupportedUpstreamRegistryException;class InvalidTagParameterException extends o.ECRServiceException{name="InvalidTagParameterException";$fault="client";constructor(e){super({name:"InvalidTagParameterException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidTagParameterException.prototype)}}t.InvalidTagParameterException=InvalidTagParameterException;class RepositoryAlreadyExistsException extends o.ECRServiceException{name="RepositoryAlreadyExistsException";$fault="client";constructor(e){super({name:"RepositoryAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryAlreadyExistsException.prototype)}}t.RepositoryAlreadyExistsException=RepositoryAlreadyExistsException;class TooManyTagsException extends o.ECRServiceException{name="TooManyTagsException";$fault="client";constructor(e){super({name:"TooManyTagsException",$fault:"client",...e});Object.setPrototypeOf(this,TooManyTagsException.prototype)}}t.TooManyTagsException=TooManyTagsException;class TemplateAlreadyExistsException extends o.ECRServiceException{name="TemplateAlreadyExistsException";$fault="client";constructor(e){super({name:"TemplateAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,TemplateAlreadyExistsException.prototype)}}t.TemplateAlreadyExistsException=TemplateAlreadyExistsException;class LifecyclePolicyNotFoundException extends o.ECRServiceException{name="LifecyclePolicyNotFoundException";$fault="client";constructor(e){super({name:"LifecyclePolicyNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,LifecyclePolicyNotFoundException.prototype)}}t.LifecyclePolicyNotFoundException=LifecyclePolicyNotFoundException;class PullThroughCacheRuleNotFoundException extends o.ECRServiceException{name="PullThroughCacheRuleNotFoundException";$fault="client";constructor(e){super({name:"PullThroughCacheRuleNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,PullThroughCacheRuleNotFoundException.prototype)}}t.PullThroughCacheRuleNotFoundException=PullThroughCacheRuleNotFoundException;class RegistryPolicyNotFoundException extends o.ECRServiceException{name="RegistryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RegistryPolicyNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RegistryPolicyNotFoundException.prototype)}}t.RegistryPolicyNotFoundException=RegistryPolicyNotFoundException;class RepositoryNotEmptyException extends o.ECRServiceException{name="RepositoryNotEmptyException";$fault="client";constructor(e){super({name:"RepositoryNotEmptyException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryNotEmptyException.prototype)}}t.RepositoryNotEmptyException=RepositoryNotEmptyException;class TemplateNotFoundException extends o.ECRServiceException{name="TemplateNotFoundException";$fault="client";constructor(e){super({name:"TemplateNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,TemplateNotFoundException.prototype)}}t.TemplateNotFoundException=TemplateNotFoundException;class RepositoryPolicyNotFoundException extends o.ECRServiceException{name="RepositoryPolicyNotFoundException";$fault="client";constructor(e){super({name:"RepositoryPolicyNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,RepositoryPolicyNotFoundException.prototype)}}t.RepositoryPolicyNotFoundException=RepositoryPolicyNotFoundException;class SigningConfigurationNotFoundException extends o.ECRServiceException{name="SigningConfigurationNotFoundException";$fault="client";constructor(e){super({name:"SigningConfigurationNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,SigningConfigurationNotFoundException.prototype)}}t.SigningConfigurationNotFoundException=SigningConfigurationNotFoundException;class ExclusionNotFoundException extends o.ECRServiceException{name="ExclusionNotFoundException";$fault="client";constructor(e){super({name:"ExclusionNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ExclusionNotFoundException.prototype)}}t.ExclusionNotFoundException=ExclusionNotFoundException;class ImageNotFoundException extends o.ECRServiceException{name="ImageNotFoundException";$fault="client";constructor(e){super({name:"ImageNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ImageNotFoundException.prototype)}}t.ImageNotFoundException=ImageNotFoundException;class ScanNotFoundException extends o.ECRServiceException{name="ScanNotFoundException";$fault="client";constructor(e){super({name:"ScanNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ScanNotFoundException.prototype)}}t.ScanNotFoundException=ScanNotFoundException;class LayerInaccessibleException extends o.ECRServiceException{name="LayerInaccessibleException";$fault="client";constructor(e){super({name:"LayerInaccessibleException",$fault:"client",...e});Object.setPrototypeOf(this,LayerInaccessibleException.prototype)}}t.LayerInaccessibleException=LayerInaccessibleException;class LayersNotFoundException extends o.ECRServiceException{name="LayersNotFoundException";$fault="client";constructor(e){super({name:"LayersNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,LayersNotFoundException.prototype)}}t.LayersNotFoundException=LayersNotFoundException;class UnableToGetUpstreamLayerException extends o.ECRServiceException{name="UnableToGetUpstreamLayerException";$fault="client";constructor(e){super({name:"UnableToGetUpstreamLayerException",$fault:"client",...e});Object.setPrototypeOf(this,UnableToGetUpstreamLayerException.prototype)}}t.UnableToGetUpstreamLayerException=UnableToGetUpstreamLayerException;class LifecyclePolicyPreviewNotFoundException extends o.ECRServiceException{name="LifecyclePolicyPreviewNotFoundException";$fault="client";constructor(e){super({name:"LifecyclePolicyPreviewNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,LifecyclePolicyPreviewNotFoundException.prototype)}}t.LifecyclePolicyPreviewNotFoundException=LifecyclePolicyPreviewNotFoundException;class ImageAlreadyExistsException extends o.ECRServiceException{name="ImageAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,ImageAlreadyExistsException.prototype)}}t.ImageAlreadyExistsException=ImageAlreadyExistsException;class ImageDigestDoesNotMatchException extends o.ECRServiceException{name="ImageDigestDoesNotMatchException";$fault="client";constructor(e){super({name:"ImageDigestDoesNotMatchException",$fault:"client",...e});Object.setPrototypeOf(this,ImageDigestDoesNotMatchException.prototype)}}t.ImageDigestDoesNotMatchException=ImageDigestDoesNotMatchException;class ImageTagAlreadyExistsException extends o.ECRServiceException{name="ImageTagAlreadyExistsException";$fault="client";constructor(e){super({name:"ImageTagAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,ImageTagAlreadyExistsException.prototype)}}t.ImageTagAlreadyExistsException=ImageTagAlreadyExistsException;class ReferencedImagesNotFoundException extends o.ECRServiceException{name="ReferencedImagesNotFoundException";$fault="client";constructor(e){super({name:"ReferencedImagesNotFoundException",$fault:"client",...e});Object.setPrototypeOf(this,ReferencedImagesNotFoundException.prototype)}}t.ReferencedImagesNotFoundException=ReferencedImagesNotFoundException;class BlockedByOrganizationPolicyException extends o.ECRServiceException{name="BlockedByOrganizationPolicyException";$fault="client";constructor(e){super({name:"BlockedByOrganizationPolicyException",$fault:"client",...e});Object.setPrototypeOf(this,BlockedByOrganizationPolicyException.prototype)}}t.BlockedByOrganizationPolicyException=BlockedByOrganizationPolicyException;class ExclusionAlreadyExistsException extends o.ECRServiceException{name="ExclusionAlreadyExistsException";$fault="client";constructor(e){super({name:"ExclusionAlreadyExistsException",$fault:"client",...e});Object.setPrototypeOf(this,ExclusionAlreadyExistsException.prototype)}}t.ExclusionAlreadyExistsException=ExclusionAlreadyExistsException;class ImageArchivedException extends o.ECRServiceException{name="ImageArchivedException";$fault="client";constructor(e){super({name:"ImageArchivedException",$fault:"client",...e});Object.setPrototypeOf(this,ImageArchivedException.prototype)}}t.ImageArchivedException=ImageArchivedException;class UnsupportedImageTypeException extends o.ECRServiceException{name="UnsupportedImageTypeException";$fault="client";constructor(e){super({name:"UnsupportedImageTypeException",$fault:"client",...e});Object.setPrototypeOf(this,UnsupportedImageTypeException.prototype)}}t.UnsupportedImageTypeException=UnsupportedImageTypeException;class LifecyclePolicyPreviewInProgressException extends o.ECRServiceException{name="LifecyclePolicyPreviewInProgressException";$fault="client";constructor(e){super({name:"LifecyclePolicyPreviewInProgressException",$fault:"client",...e});Object.setPrototypeOf(this,LifecyclePolicyPreviewInProgressException.prototype)}}t.LifecyclePolicyPreviewInProgressException=LifecyclePolicyPreviewInProgressException;class ImageStorageClassUpdateNotSupportedException extends o.ECRServiceException{name="ImageStorageClassUpdateNotSupportedException";$fault="client";constructor(e){super({name:"ImageStorageClassUpdateNotSupportedException",$fault:"client",...e});Object.setPrototypeOf(this,ImageStorageClassUpdateNotSupportedException.prototype)}}t.ImageStorageClassUpdateNotSupportedException=ImageStorageClassUpdateNotSupportedException;class InvalidLayerPartException extends o.ECRServiceException{name="InvalidLayerPartException";$fault="client";registryId;repositoryName;uploadId;lastValidByteReceived;constructor(e){super({name:"InvalidLayerPartException",$fault:"client",...e});Object.setPrototypeOf(this,InvalidLayerPartException.prototype);this.registryId=e.registryId;this.repositoryName=e.repositoryName;this.uploadId=e.uploadId;this.lastValidByteReceived=e.lastValidByteReceived}}t.InvalidLayerPartException=InvalidLayerPartException},3107:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getRuntimeConfig=void 0;const o=n(1860);const i=o.__importDefault(n(121));const c=n(8704);const d=n(5861);const p=n(1656);const y=n(9316);const C=n(2711);const Q=n(9618);const v=n(5704);const D=n(1279);const k=n(1411);const $=n(3638);const V=n(673);const ee=n(5518);const te=n(9344);const getRuntimeConfig=e=>{(0,k.emitWarningIfUnsupportedVersion)(process.version);const t=(0,V.resolveDefaultsModeConfig)(e);const defaultConfigProvider=()=>t().then(k.loadConfigsForDefaultMode);const n=(0,te.getRuntimeConfig)(e);(0,c.emitWarningIfUnsupportedVersion)(process.version);const o={profile:e?.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,v.loadConfig)(c.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,o),bodyLengthChecker:e?.bodyLengthChecker??$.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??d.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,p.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:i.default.version}),maxAttempts:e?.maxAttempts??(0,v.loadConfig)(Q.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,v.loadConfig)(y.NODE_REGION_CONFIG_OPTIONS,{...y.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:D.NodeHttpHandler.create(e?.requestHandler??defaultConfigProvider),retryMode:e?.retryMode??(0,v.loadConfig)({...Q.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await defaultConfigProvider()).retryMode||ee.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??C.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??D.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,v.loadConfig)(y.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:e?.useFipsEndpoint??(0,v.loadConfig)(y.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:e?.userAgentAppId??(0,v.loadConfig)(p.NODE_APP_ID_CONFIG_OPTIONS,o)}};t.getRuntimeConfig=getRuntimeConfig},9344:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getRuntimeConfig=void 0;const o=n(8704);const i=n(7288);const c=n(1411);const d=n(4494);const p=n(8385);const y=n(1577);const C=n(3218);const Q=n(3628);const v=n(5809);const getRuntimeConfig=e=>({apiVersion:"2015-09-21",base64Decoder:e?.base64Decoder??p.fromBase64,base64Encoder:e?.base64Encoder??p.toBase64,disableHostPrefix:e?.disableHostPrefix??false,endpointProvider:e?.endpointProvider??Q.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??C.defaultECRHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new o.AwsSdkSigV4Signer}],logger:e?.logger??new c.NoOpLogger,protocol:e?.protocol??i.AwsJson1_1Protocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.ecr",errorTypeRegistries:v.errorTypeRegistries,xmlNamespace:"http://ecr.amazonaws.com/doc/2015-09-21/",version:"2015-09-21",serviceTarget:"AmazonEC2ContainerRegistry_V20150921"},serviceId:e?.serviceId??"ECR",urlParser:e?.urlParser??d.parseUrl,utf8Decoder:e?.utf8Decoder??y.fromUtf8,utf8Encoder:e?.utf8Encoder??y.toUtf8});t.getRuntimeConfig=getRuntimeConfig},5809:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.AuthorizationData$=t.Attribute$=t.errorTypeRegistries=t.ValidationException$=t.UploadNotFoundException$=t.UnsupportedUpstreamRegistryException$=t.UnsupportedImageTypeException$=t.UnableToGetUpstreamLayerException$=t.UnableToGetUpstreamImageException$=t.UnableToDecryptSecretValueException$=t.UnableToAccessSecretException$=t.TooManyTagsException$=t.TemplateNotFoundException$=t.TemplateAlreadyExistsException$=t.SigningConfigurationNotFoundException$=t.ServerException$=t.SecretNotFoundException$=t.ScanNotFoundException$=t.RepositoryPolicyNotFoundException$=t.RepositoryNotFoundException$=t.RepositoryNotEmptyException$=t.RepositoryAlreadyExistsException$=t.RegistryPolicyNotFoundException$=t.ReferencedImagesNotFoundException$=t.PullThroughCacheRuleNotFoundException$=t.PullThroughCacheRuleAlreadyExistsException$=t.LimitExceededException$=t.LifecyclePolicyPreviewNotFoundException$=t.LifecyclePolicyPreviewInProgressException$=t.LifecyclePolicyNotFoundException$=t.LayersNotFoundException$=t.LayerPartTooSmallException$=t.LayerInaccessibleException$=t.LayerAlreadyExistsException$=t.KmsException$=t.InvalidTagParameterException$=t.InvalidParameterException$=t.InvalidLayerPartException$=t.InvalidLayerException$=t.ImageTagAlreadyExistsException$=t.ImageStorageClassUpdateNotSupportedException$=t.ImageNotFoundException$=t.ImageDigestDoesNotMatchException$=t.ImageArchivedException$=t.ImageAlreadyExistsException$=t.ExclusionNotFoundException$=t.ExclusionAlreadyExistsException$=t.EmptyUploadException$=t.BlockedByOrganizationPolicyException$=t.ECRServiceException$=void 0;t.DescribeRepositoriesRequest$=t.DescribeRegistryResponse$=t.DescribeRegistryRequest$=t.DescribePullThroughCacheRulesResponse$=t.DescribePullThroughCacheRulesRequest$=t.DescribeImagesResponse$=t.DescribeImagesRequest$=t.DescribeImageSigningStatusResponse$=t.DescribeImageSigningStatusRequest$=t.DescribeImagesFilter$=t.DescribeImageScanFindingsResponse$=t.DescribeImageScanFindingsRequest$=t.DescribeImageReplicationStatusResponse$=t.DescribeImageReplicationStatusRequest$=t.DeregisterPullTimeUpdateExclusionResponse$=t.DeregisterPullTimeUpdateExclusionRequest$=t.DeleteSigningConfigurationResponse$=t.DeleteSigningConfigurationRequest$=t.DeleteRepositoryResponse$=t.DeleteRepositoryRequest$=t.DeleteRepositoryPolicyResponse$=t.DeleteRepositoryPolicyRequest$=t.DeleteRepositoryCreationTemplateResponse$=t.DeleteRepositoryCreationTemplateRequest$=t.DeleteRegistryPolicyResponse$=t.DeleteRegistryPolicyRequest$=t.DeletePullThroughCacheRuleResponse$=t.DeletePullThroughCacheRuleRequest$=t.DeleteLifecyclePolicyResponse$=t.DeleteLifecyclePolicyRequest$=t.CvssScoreDetails$=t.CvssScoreAdjustment$=t.CvssScore$=t.CreateRepositoryResponse$=t.CreateRepositoryRequest$=t.CreateRepositoryCreationTemplateResponse$=t.CreateRepositoryCreationTemplateRequest$=t.CreatePullThroughCacheRuleResponse$=t.CreatePullThroughCacheRuleRequest$=t.CompleteLayerUploadResponse$=t.CompleteLayerUploadRequest$=t.BatchGetRepositoryScanningConfigurationResponse$=t.BatchGetRepositoryScanningConfigurationRequest$=t.BatchGetImageResponse$=t.BatchGetImageRequest$=t.BatchDeleteImageResponse$=t.BatchDeleteImageRequest$=t.BatchCheckLayerAvailabilityResponse$=t.BatchCheckLayerAvailabilityRequest$=t.AwsEcrContainerImageDetails$=void 0;t.ListImagesRequest$=t.ListImagesFilter$=t.ListImageReferrersResponse$=t.ListImageReferrersRequest$=t.ListImageReferrersFilter$=t.LifecyclePolicyRuleAction$=t.LifecyclePolicyPreviewSummary$=t.LifecyclePolicyPreviewResult$=t.LifecyclePolicyPreviewFilter$=t.LayerFailure$=t.Layer$=t.InitiateLayerUploadResponse$=t.InitiateLayerUploadRequest$=t.ImageTagMutabilityExclusionFilter$=t.ImageSigningStatus$=t.ImageScanStatus$=t.ImageScanningConfiguration$=t.ImageScanFindingsSummary$=t.ImageScanFindings$=t.ImageScanFinding$=t.ImageReplicationStatus$=t.ImageReferrer$=t.ImageIdentifier$=t.ImageFailure$=t.ImageDetail$=t.Image$=t.GetSigningConfigurationResponse$=t.GetSigningConfigurationRequest$=t.GetRepositoryPolicyResponse$=t.GetRepositoryPolicyRequest$=t.GetRegistryScanningConfigurationResponse$=t.GetRegistryScanningConfigurationRequest$=t.GetRegistryPolicyResponse$=t.GetRegistryPolicyRequest$=t.GetLifecyclePolicyResponse$=t.GetLifecyclePolicyRequest$=t.GetLifecyclePolicyPreviewResponse$=t.GetLifecyclePolicyPreviewRequest$=t.GetDownloadUrlForLayerResponse$=t.GetDownloadUrlForLayerRequest$=t.GetAuthorizationTokenResponse$=t.GetAuthorizationTokenRequest$=t.GetAccountSettingResponse$=t.GetAccountSettingRequest$=t.EnhancedImageScanFinding$=t.EncryptionConfigurationForRepositoryCreationTemplate$=t.EncryptionConfiguration$=t.DescribeRepositoryCreationTemplatesResponse$=t.DescribeRepositoryCreationTemplatesRequest$=t.DescribeRepositoriesResponse$=void 0;t.StartImageScanResponse$=t.StartImageScanRequest$=t.SigningRule$=t.SigningRepositoryFilter$=t.SigningConfiguration$=t.SetRepositoryPolicyResponse$=t.SetRepositoryPolicyRequest$=t.ScoreDetails$=t.ScanningRepositoryFilter$=t.ResourceDetails$=t.Resource$=t.RepositoryScanningConfigurationFailure$=t.RepositoryScanningConfiguration$=t.RepositoryFilter$=t.RepositoryCreationTemplate$=t.Repository$=t.ReplicationRule$=t.ReplicationDestination$=t.ReplicationConfiguration$=t.Remediation$=t.RegistryScanningRule$=t.RegistryScanningConfiguration$=t.RegisterPullTimeUpdateExclusionResponse$=t.RegisterPullTimeUpdateExclusionRequest$=t.Recommendation$=t.PutSigningConfigurationResponse$=t.PutSigningConfigurationRequest$=t.PutReplicationConfigurationResponse$=t.PutReplicationConfigurationRequest$=t.PutRegistryScanningConfigurationResponse$=t.PutRegistryScanningConfigurationRequest$=t.PutRegistryPolicyResponse$=t.PutRegistryPolicyRequest$=t.PutLifecyclePolicyResponse$=t.PutLifecyclePolicyRequest$=t.PutImageTagMutabilityResponse$=t.PutImageTagMutabilityRequest$=t.PutImageScanningConfigurationResponse$=t.PutImageScanningConfigurationRequest$=t.PutImageResponse$=t.PutImageRequest$=t.PutAccountSettingResponse$=t.PutAccountSettingRequest$=t.PullThroughCacheRule$=t.PackageVulnerabilityDetails$=t.ListTagsForResourceResponse$=t.ListTagsForResourceRequest$=t.ListPullTimeUpdateExclusionsResponse$=t.ListPullTimeUpdateExclusionsRequest$=t.ListImagesResponse$=void 0;t.GetRegistryPolicy$=t.GetLifecyclePolicyPreview$=t.GetLifecyclePolicy$=t.GetDownloadUrlForLayer$=t.GetAuthorizationToken$=t.GetAccountSetting$=t.DescribeRepositoryCreationTemplates$=t.DescribeRepositories$=t.DescribeRegistry$=t.DescribePullThroughCacheRules$=t.DescribeImageSigningStatus$=t.DescribeImageScanFindings$=t.DescribeImages$=t.DescribeImageReplicationStatus$=t.DeregisterPullTimeUpdateExclusion$=t.DeleteSigningConfiguration$=t.DeleteRepositoryPolicy$=t.DeleteRepositoryCreationTemplate$=t.DeleteRepository$=t.DeleteRegistryPolicy$=t.DeletePullThroughCacheRule$=t.DeleteLifecyclePolicy$=t.CreateRepositoryCreationTemplate$=t.CreateRepository$=t.CreatePullThroughCacheRule$=t.CompleteLayerUpload$=t.BatchGetRepositoryScanningConfiguration$=t.BatchGetImage$=t.BatchDeleteImage$=t.BatchCheckLayerAvailability$=t.VulnerablePackage$=t.ValidatePullThroughCacheRuleResponse$=t.ValidatePullThroughCacheRuleRequest$=t.UploadLayerPartResponse$=t.UploadLayerPartRequest$=t.UpdateRepositoryCreationTemplateResponse$=t.UpdateRepositoryCreationTemplateRequest$=t.UpdatePullThroughCacheRuleResponse$=t.UpdatePullThroughCacheRuleRequest$=t.UpdateImageStorageClassResponse$=t.UpdateImageStorageClassRequest$=t.UntagResourceResponse$=t.UntagResourceRequest$=t.TransitioningImageTotalCount$=t.TagResourceResponse$=t.TagResourceRequest$=t.Tag$=t.SubjectIdentifier$=t.StartLifecyclePolicyPreviewResponse$=t.StartLifecyclePolicyPreviewRequest$=void 0;t.ValidatePullThroughCacheRule$=t.UploadLayerPart$=t.UpdateRepositoryCreationTemplate$=t.UpdatePullThroughCacheRule$=t.UpdateImageStorageClass$=t.UntagResource$=t.TagResource$=t.StartLifecyclePolicyPreview$=t.StartImageScan$=t.SetRepositoryPolicy$=t.RegisterPullTimeUpdateExclusion$=t.PutSigningConfiguration$=t.PutReplicationConfiguration$=t.PutRegistryScanningConfiguration$=t.PutRegistryPolicy$=t.PutLifecyclePolicy$=t.PutImageTagMutability$=t.PutImageScanningConfiguration$=t.PutImage$=t.PutAccountSetting$=t.ListTagsForResource$=t.ListPullTimeUpdateExclusions$=t.ListImages$=t.ListImageReferrers$=t.InitiateLayerUpload$=t.GetSigningConfiguration$=t.GetRepositoryPolicy$=t.GetRegistryScanningConfiguration$=void 0;const o="Attribute";const i="AuthorizationData";const c="AuthorizationDataList";const d="AwsEcrContainerImageDetails";const p="AttributeList";const y="BlockedByOrganizationPolicyException";const C="BatchCheckLayerAvailability";const Q="BatchCheckLayerAvailabilityRequest";const v="BatchCheckLayerAvailabilityResponse";const D="BatchDeleteImage";const k="BatchDeleteImageRequest";const $="BatchDeleteImageResponse";const V="BatchGetImage";const ee="BatchGetImageRequest";const te="BatchGetImageResponse";const re="BatchGetRepositoryScanningConfiguration";const ne="BatchGetRepositoryScanningConfigurationRequest";const se="BatchGetRepositoryScanningConfigurationResponse";const oe="CompleteLayerUpload";const ie="CompleteLayerUploadRequest";const ae="CompleteLayerUploadResponse";const ce="CreatePullThroughCacheRule";const le="CreatePullThroughCacheRuleRequest";const ue="CreatePullThroughCacheRuleResponse";const de="CreateRepository";const pe="CreateRepositoryCreationTemplate";const Ae="CreateRepositoryCreationTemplateRequest";const me="CreateRepositoryCreationTemplateResponse";const ge="CreateRepositoryRequest";const fe="CreateRepositoryResponse";const he="CvssScore";const ye="CvssScoreAdjustment";const Ee="CvssScoreAdjustmentList";const Ce="CvssScoreDetails";const Ie="CvssScoreList";const be="DescribeImages";const Se="DescribeImagesFilter";const Be="DescribeImagesRequest";const we="DescribeImageReplicationStatus";const Re="DescribeImageReplicationStatusRequest";const Ne="DescribeImageReplicationStatusResponse";const Qe="DescribeImagesResponse";const xe="DescribeImageScanFindings";const Te="DescribeImageScanFindingsRequest";const ve="DescribeImageScanFindingsResponse";const Pe="DescribeImageSigningStatus";const De="DescribeImageSigningStatusRequest";const ke="DescribeImageSigningStatusResponse";const _e="DeleteLifecyclePolicy";const Le="DeleteLifecyclePolicyRequest";const Oe="DeleteLifecyclePolicyResponse";const Fe="DeletePullThroughCacheRule";const Ue="DeletePullThroughCacheRuleRequest";const Me="DeletePullThroughCacheRuleResponse";const He="DescribePullThroughCacheRulesRequest";const $e="DescribePullThroughCacheRulesResponse";const Ge="DescribePullThroughCacheRules";const qe="DeregisterPullTimeUpdateExclusion";const ze="DeregisterPullTimeUpdateExclusionRequest";const Ve="DeregisterPullTimeUpdateExclusionResponse";const je="DeleteRepository";const Ye="DeleteRepositoryCreationTemplate";const Je="DeleteRepositoryCreationTemplateRequest";const We="DeleteRepositoryCreationTemplateResponse";const Ke="DescribeRepositoryCreationTemplatesRequest";const Xe="DescribeRepositoryCreationTemplatesResponse";const Ze="DescribeRepositoryCreationTemplates";const At="DeleteRegistryPolicy";const mt="DeleteRegistryPolicyRequest";const ht="DeleteRegistryPolicyResponse";const yt="DeleteRepositoryPolicyRequest";const Et="DeleteRepositoryPolicyResponse";const Ct="DeleteRepositoryPolicy";const It="DeleteRepositoryRequest";const bt="DeleteRepositoryResponse";const St="DescribeRegistryRequest";const Bt="DescribeRegistryResponse";const wt="DescribeRepositoriesRequest";const Rt="DescribeRepositoriesResponse";const Nt="DescribeRegistry";const Qt="DescribeRepositories";const xt="DeleteSigningConfiguration";const Tt="DeleteSigningConfigurationRequest";const vt="DeleteSigningConfigurationResponse";const Pt="ExclusionAlreadyExistsException";const Dt="EncryptionConfiguration";const kt="EncryptionConfigurationForRepositoryCreationTemplate";const _t="EnhancedImageScanFinding";const Lt="EnhancedImageScanFindingList";const Ot="ExclusionNotFoundException";const Ft="EmptyUploadException";const Ut="GetAccountSetting";const Mt="GetAccountSettingRequest";const Ht="GetAccountSettingResponse";const $t="GetAuthorizationToken";const Gt="GetAuthorizationTokenRequest";const qt="GetAuthorizationTokenResponse";const zt="GetDownloadUrlForLayer";const Vt="GetDownloadUrlForLayerRequest";const jt="GetDownloadUrlForLayerResponse";const Yt="GetLifecyclePolicy";const Jt="GetLifecyclePolicyPreview";const Wt="GetLifecyclePolicyPreviewRequest";const Kt="GetLifecyclePolicyPreviewResponse";const Xt="GetLifecyclePolicyRequest";const Zt="GetLifecyclePolicyResponse";const er="GetRegistryPolicy";const tr="GetRegistryPolicyRequest";const rr="GetRegistryPolicyResponse";const nr="GetRepositoryPolicyRequest";const sr="GetRepositoryPolicyResponse";const or="GetRepositoryPolicy";const ir="GetRegistryScanningConfiguration";const ar="GetRegistryScanningConfigurationRequest";const cr="GetRegistryScanningConfigurationResponse";const lr="GetSigningConfiguration";const ur="GetSigningConfigurationRequest";const dr="GetSigningConfigurationResponse";const pr="Image";const Ar="ImageArchivedException";const mr="ImageAlreadyExistsException";const gr="ImageDetail";const fr="ImageDigestDoesNotMatchException";const hr="ImageDetailList";const yr="ImageFailure";const Er="ImageFailureList";const Cr="ImageIdentifier";const Ir="ImageIdentifierList";const br="ImageList";const Sr="InvalidLayerException";const Br="InvalidLayerPartException";const wr="InitiateLayerUpload";const Rr="InitiateLayerUploadRequest";const Nr="InitiateLayerUploadResponse";const Qr="ImageNotFoundException";const xr="InvalidParameterException";const Tr="ImageReferrer";const vr="ImageReferrerList";const Pr="ImageReplicationStatus";const Dr="ImageReplicationStatusList";const kr="ImageScanningConfiguration";const _r="ImageStorageClassUpdateNotSupportedException";const Lr="ImageScanFinding";const Or="ImageScanFindingList";const Fr="ImageScanFindingsSummary";const Ur="ImageScanFindings";const Mr="ImageScanStatus";const Hr="ImageSigningStatusList";const $r="ImageSigningStatus";const Gr="ImageTagAlreadyExistsException";const qr="ImageTagMutabilityExclusionFilter";const zr="ImageTagMutabilityExclusionFilters";const Vr="InvalidTagParameterException";const jr="Key";const Yr="KmsException";const Jr="Layer";const Wr="LayerAlreadyExistsException";const Kr="LimitExceededException";const Xr="LayerFailure";const Zr="LayerFailureList";const en="ListImages";const tn="LayerInaccessibleException";const rn="ListImagesFilter";const nn="ListImagesRequest";const sn="ListImageReferrersFilter";const on="ListImageReferrersRequest";const an="ListImageReferrersResponse";const cn="ListImagesResponse";const ln="ListImageReferrers";const un="LayerList";const dn="LayersNotFoundException";const pn="LifecyclePolicyNotFoundException";const An="LifecyclePolicyPreviewFilter";const mn="LifecyclePolicyPreviewInProgressException";const gn="LifecyclePolicyPreviewNotFoundException";const hn="LifecyclePolicyPreviewResult";const yn="LifecyclePolicyPreviewResultList";const En="LifecyclePolicyPreviewSummary";const Cn="LifecyclePolicyRuleAction";const In="LayerPartTooSmallException";const bn="ListPullTimeUpdateExclusions";const Sn="ListPullTimeUpdateExclusionsRequest";const Bn="ListPullTimeUpdateExclusionsResponse";const wn="ListTagsForResource";const Rn="ListTagsForResourceRequest";const Nn="ListTagsForResourceResponse";const Qn="PutAccountSetting";const xn="PutAccountSettingRequest";const Tn="PutAccountSettingResponse";const vn="PutImage";const Pn="PutImageRequest";const Dn="PutImageResponse";const kn="PutImageScanningConfiguration";const _n="PutImageScanningConfigurationRequest";const Ln="PutImageScanningConfigurationResponse";const On="PutImageTagMutability";const Fn="PutImageTagMutabilityRequest";const Un="PutImageTagMutabilityResponse";const Mn="PutLifecyclePolicy";const Hn="PutLifecyclePolicyRequest";const $n="PutLifecyclePolicyResponse";const Gn="PutReplicationConfiguration";const qn="PutReplicationConfigurationRequest";const zn="PutReplicationConfigurationResponse";const Vn="PutRegistryPolicy";const jn="PutRegistryPolicyRequest";const Yn="PutRegistryPolicyResponse";const Jn="PutRegistryScanningConfiguration";const Wn="PutRegistryScanningConfigurationRequest";const Kn="PutRegistryScanningConfigurationResponse";const Xn="PutSigningConfiguration";const Zn="PutSigningConfigurationRequest";const es="PutSigningConfigurationResponse";const ts="PullThroughCacheRule";const rs="PullThroughCacheRuleAlreadyExistsException";const ns="PullThroughCacheRuleList";const ss="PullThroughCacheRuleNotFoundException";const os="PackageVulnerabilityDetails";const as="Recommendation";const cs="RepositoryAlreadyExistsException";const ls="ReplicationConfiguration";const us="RepositoryCreationTemplate";const ds="RepositoryCreationTemplateList";const ps="ReplicationDestination";const As="ReplicationDestinationList";const ms="ResourceDetails";const gs="RepositoryFilter";const fs="RepositoryFilterList";const hs="ReferencedImagesNotFoundException";const ys="RepositoryList";const Es="ResourceList";const Cs="RepositoryNotEmptyException";const Is="RepositoryNotFoundException";const bs="RegistryPolicyNotFoundException";const Ss="RepositoryPolicyNotFoundException";const Bs="RegisterPullTimeUpdateExclusion";const ws="RegisterPullTimeUpdateExclusionRequest";const Rs="RegisterPullTimeUpdateExclusionResponse";const Ns="ReplicationRule";const Qs="ReplicationRuleList";const xs="RegistryScanningConfiguration";const Ts="RepositoryScanningConfigurationFailure";const vs="RepositoryScanningConfigurationFailureList";const Ps="RepositoryScanningConfigurationList";const Ds="RepositoryScanningConfiguration";const ks="RegistryScanningRule";const _s="RegistryScanningRuleList";const Ls="Remediation";const Os="Repository";const Fs="Resource";const Us="SigningConfiguration";const Ms="SigningConfigurationNotFoundException";const Hs="ScoreDetails";const $s="ServerException";const Gs="SubjectIdentifier";const qs="StartImageScan";const zs="StartImageScanRequest";const Vs="StartImageScanResponse";const js="StartLifecyclePolicyPreview";const Ys="StartLifecyclePolicyPreviewRequest";const Js="StartLifecyclePolicyPreviewResponse";const Ws="ScanNotFoundException";const Ks="SecretNotFoundException";const Xs="SigningRule";const Zs="ScanningRepositoryFilter";const eo="ScanningRepositoryFilterList";const to="SigningRepositoryFilterList";const ro="SigningRepositoryFilter";const no="SigningRuleList";const so="SetRepositoryPolicy";const oo="SetRepositoryPolicyRequest";const io="SetRepositoryPolicyResponse";const ao="Tag";const co="TemplateAlreadyExistsException";const lo="TransitioningImageTotalCount";const uo="TransitioningImageTotalCounts";const po="TagList";const Ao="TooManyTagsException";const mo="TemplateNotFoundException";const go="TagResource";const fo="TagResourceRequest";const ho="TagResourceResponse";const yo="UpdateImageStorageClass";const Eo="UpdateImageStorageClassRequest";const Co="UpdateImageStorageClassResponse";const Io="UnsupportedImageTypeException";const bo="UploadLayerPart";const So="UploadLayerPartRequest";const Bo="UploadLayerPartResponse";const wo="UploadNotFoundException";const Ro="UpdatePullThroughCacheRule";const No="UpdatePullThroughCacheRuleRequest";const Qo="UpdatePullThroughCacheRuleResponse";const xo="UntagResource";const To="UpdateRepositoryCreationTemplate";const vo="UpdateRepositoryCreationTemplateRequest";const Po="UpdateRepositoryCreationTemplateResponse";const Do="UntagResourceRequest";const ko="UntagResourceResponse";const _o="UnableToAccessSecretException";const Lo="UnableToDecryptSecretValueException";const Oo="UnableToGetUpstreamImageException";const Fo="UnableToGetUpstreamLayerException";const Uo="UnsupportedUpstreamRegistryException";const Mo="Value";const Ho="ValidationException";const $o="VulnerablePackage";const Go="VulnerablePackagesList";const qo="ValidatePullThroughCacheRule";const zo="ValidatePullThroughCacheRuleRequest";const Vo="ValidatePullThroughCacheRuleResponse";const jo="architecture";const Yo="awsAccountId";const Jo="authorizationData";const Wo="awsEcrContainerImage";const Ko="appliedFor";const Xo="acceptedMediaTypes";const Zo="artifactMediaType";const ei="appliedRulePriority";const ti="artifactStatus";const ri="appliedScanFilters";const ni="authorizationToken";const si="artifactType";const oi="artifactTypes";const ii="action";const ai="adjustments";const ci="annotations";const li="arch";const ui="attributes";const di="author";const pi="baseScore";const Ai="client";const mi="credentialArn";const gi="createdAt";const fi="customRoleArn";const hi="cvss";const yi="description";const Ei="downloadUrl";const Ci="destinations";const Ii="details";const bi="digest";const Si="error";const Bi="expiresAt";const wi="exploitAvailable";const Ri="encryptionConfiguration";const Ni="enhancedFindings";const Qi="expiringImageTotalCount";const xi="ecrRepositoryPrefix";const Ti="ecrRepositoryPrefixes";const vi="encryptionType";const Pi="epoch";const Di="failures";const ki="findingArn";const _i="fixAvailable";const Li="failureCode";const Oi="fixedInVersion";const Fi="firstObservedAt";const Ui="filePath";const Mi="failureReason";const Hi="findingSeverityCounts";const $i="filterType";const Gi="failure";const qi="filter";const zi="findings";const Vi="force";const ji="httpError";const Yi="images";const Ji="imageDetails";const Wi="imageDigest";const Ki="imageHash";const Xi="imageIds";const Zi="imageId";const ea="imageManifest";const ta="imageManifestMediaType";const ra="imagePushedAt";const na="imageStatus";const sa="imageScanningConfiguration";const oa="imageScanCompletedAt";const ia="imageScanFindings";const aa="imageScanFindingsSummary";const ca="imageSizeInBytes";const la="imageScanStatus";const ua="imageTags";const da="imageTotalCount";const pa="imageTagMutability";const Aa="imageTagMutabilityExclusionFilters";const ma="imageTag";const ga="inUseCount";const fa="isValid";const ha="id";const ya="image";const Ea="key";const Ca="kmsError";const Ia="kmsKey";const ba="layers";const Sa="layerAvailability";const Ba="lastArchivedAt";const wa="lastActivatedAt";const Ra="lastByteReceived";const Na="layerDigests";const Qa="layerDigest";const xa="lastEvaluatedAt";const Ta="lastInUseAt";const va="lastObservedAt";const Pa="lifecyclePolicy";const Da="layerPartBlob";const ka="lifecyclePolicyText";const _a="lastRecordedPullTime";const La="layerSize";const Oa="lastValidByteReceived";const Fa="message";const Ua="maxResults";const Ma="mediaType";const Ha="metric";const $a="name";const Ga="nextToken";const qa="platform";const za="pushedAt";const Va="principalArn";const ja="proxyEndpoint";const Ya="partFirstByte";const Ja="partLastByte";const Wa="packageManager";const Ka="previewResults";const Xa="partSize";const Za="policyText";const ec="pullThroughCacheRules";const tc="pullTimeUpdateExclusions";const rc="packageVulnerabilityDetails";const nc="prefix";const sc="prefixes";const oc="registry";const ic="resourceArn";const ac="repositoryArn";const cc="replicationConfiguration";const lc="repositoryCreationTemplate";const uc="repositoryCreationTemplates";const dc="repositoryFilters";const pc="registryId";const Ac="registryIds";const mc="repositoryName";const gc="repositoryNames";const fc="repositoryPolicy";const hc="replicationStatuses";const yc="registryScanningConfiguration";const Ec="resourceTags";const Cc="referenceUrls";const Ic="repositoryUri";const bc="relatedVulnerabilities";const Sc="repository";const Bc="reason";const wc="recommendation";const Rc="referrers";const Nc="region";const Qc="release";const xc="remediation";const Tc="repositories";const vc="resources";const Pc="rules";const Dc="smithy.ts.sdk.synthetic.com.amazonaws.ecr";const kc="scanningConfigurations";const _c="scanningConfiguration";const Lc="signingConfiguration";const Oc="storageClass";const Fc="scoreDetails";const Uc="scanFrequency";const Mc="subjectId";const Hc="sourceLayerHash";const $c="subjectManifestDigest";const Gc="scanOnPush";const qc="signingProfileArn";const zc="scoreSource";const Vc="signingStatuses";const jc="scanType";const Yc="sourceUrl";const Jc="scoringVector";const Wc="score";const Kc="server";const Xc="severity";const Zc="size";const el="source";const tl="status";const rl="summary";const nl="tags";const sl="transitioningImageTotalCounts";const ol="tagKeys";const il="tagStatus";const al="targetStorageClass";const cl="text";const ll="title";const ul="type";const dl="uri";const pl="updatedAt";const Al="uploadId";const ml="upstreamRegistry";const gl="upstreamRepositoryPrefix";const fl="upstreamRegistryUrl";const hl="url";const yl="value";const El="vendorCreatedAt";const Cl="vulnerabilityId";const Il="vulnerablePackages";const bl="vendorSeverity";const Sl="vulnerabilitySourceUpdatedAt";const Bl="vendorUpdatedAt";const wl="version";const Rl="com.amazonaws.ecr";const Nl=n(6890);const Ql=n(5502);const xl=n(4901);const Tl=Nl.TypeRegistry.for(Dc);t.ECRServiceException$=[-3,Dc,"ECRServiceException",0,[],[]];Tl.registerError(t.ECRServiceException$,Ql.ECRServiceException);const vl=Nl.TypeRegistry.for(Rl);t.BlockedByOrganizationPolicyException$=[-3,Rl,y,{[Si]:Ai},[Fa],[0]];vl.registerError(t.BlockedByOrganizationPolicyException$,xl.BlockedByOrganizationPolicyException);t.EmptyUploadException$=[-3,Rl,Ft,{[Si]:Ai},[Fa],[0]];vl.registerError(t.EmptyUploadException$,xl.EmptyUploadException);t.ExclusionAlreadyExistsException$=[-3,Rl,Pt,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ExclusionAlreadyExistsException$,xl.ExclusionAlreadyExistsException);t.ExclusionNotFoundException$=[-3,Rl,Ot,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ExclusionNotFoundException$,xl.ExclusionNotFoundException);t.ImageAlreadyExistsException$=[-3,Rl,mr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageAlreadyExistsException$,xl.ImageAlreadyExistsException);t.ImageArchivedException$=[-3,Rl,Ar,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageArchivedException$,xl.ImageArchivedException);t.ImageDigestDoesNotMatchException$=[-3,Rl,fr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageDigestDoesNotMatchException$,xl.ImageDigestDoesNotMatchException);t.ImageNotFoundException$=[-3,Rl,Qr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageNotFoundException$,xl.ImageNotFoundException);t.ImageStorageClassUpdateNotSupportedException$=[-3,Rl,_r,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageStorageClassUpdateNotSupportedException$,xl.ImageStorageClassUpdateNotSupportedException);t.ImageTagAlreadyExistsException$=[-3,Rl,Gr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ImageTagAlreadyExistsException$,xl.ImageTagAlreadyExistsException);t.InvalidLayerException$=[-3,Rl,Sr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.InvalidLayerException$,xl.InvalidLayerException);t.InvalidLayerPartException$=[-3,Rl,Br,{[Si]:Ai},[pc,mc,Al,Oa,Fa],[0,0,0,1,0]];vl.registerError(t.InvalidLayerPartException$,xl.InvalidLayerPartException);t.InvalidParameterException$=[-3,Rl,xr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.InvalidParameterException$,xl.InvalidParameterException);t.InvalidTagParameterException$=[-3,Rl,Vr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.InvalidTagParameterException$,xl.InvalidTagParameterException);t.KmsException$=[-3,Rl,Yr,{[Si]:Ai},[Fa,Ca],[0,0]];vl.registerError(t.KmsException$,xl.KmsException);t.LayerAlreadyExistsException$=[-3,Rl,Wr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LayerAlreadyExistsException$,xl.LayerAlreadyExistsException);t.LayerInaccessibleException$=[-3,Rl,tn,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LayerInaccessibleException$,xl.LayerInaccessibleException);t.LayerPartTooSmallException$=[-3,Rl,In,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LayerPartTooSmallException$,xl.LayerPartTooSmallException);t.LayersNotFoundException$=[-3,Rl,dn,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LayersNotFoundException$,xl.LayersNotFoundException);t.LifecyclePolicyNotFoundException$=[-3,Rl,pn,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LifecyclePolicyNotFoundException$,xl.LifecyclePolicyNotFoundException);t.LifecyclePolicyPreviewInProgressException$=[-3,Rl,mn,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LifecyclePolicyPreviewInProgressException$,xl.LifecyclePolicyPreviewInProgressException);t.LifecyclePolicyPreviewNotFoundException$=[-3,Rl,gn,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LifecyclePolicyPreviewNotFoundException$,xl.LifecyclePolicyPreviewNotFoundException);t.LimitExceededException$=[-3,Rl,Kr,{[Si]:Ai},[Fa],[0]];vl.registerError(t.LimitExceededException$,xl.LimitExceededException);t.PullThroughCacheRuleAlreadyExistsException$=[-3,Rl,rs,{[Si]:Ai},[Fa],[0]];vl.registerError(t.PullThroughCacheRuleAlreadyExistsException$,xl.PullThroughCacheRuleAlreadyExistsException);t.PullThroughCacheRuleNotFoundException$=[-3,Rl,ss,{[Si]:Ai},[Fa],[0]];vl.registerError(t.PullThroughCacheRuleNotFoundException$,xl.PullThroughCacheRuleNotFoundException);t.ReferencedImagesNotFoundException$=[-3,Rl,hs,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ReferencedImagesNotFoundException$,xl.ReferencedImagesNotFoundException);t.RegistryPolicyNotFoundException$=[-3,Rl,bs,{[Si]:Ai},[Fa],[0]];vl.registerError(t.RegistryPolicyNotFoundException$,xl.RegistryPolicyNotFoundException);t.RepositoryAlreadyExistsException$=[-3,Rl,cs,{[Si]:Ai},[Fa],[0]];vl.registerError(t.RepositoryAlreadyExistsException$,xl.RepositoryAlreadyExistsException);t.RepositoryNotEmptyException$=[-3,Rl,Cs,{[Si]:Ai},[Fa],[0]];vl.registerError(t.RepositoryNotEmptyException$,xl.RepositoryNotEmptyException);t.RepositoryNotFoundException$=[-3,Rl,Is,{[Si]:Ai},[Fa],[0]];vl.registerError(t.RepositoryNotFoundException$,xl.RepositoryNotFoundException);t.RepositoryPolicyNotFoundException$=[-3,Rl,Ss,{[Si]:Ai},[Fa],[0]];vl.registerError(t.RepositoryPolicyNotFoundException$,xl.RepositoryPolicyNotFoundException);t.ScanNotFoundException$=[-3,Rl,Ws,{[Si]:Ai},[Fa],[0]];vl.registerError(t.ScanNotFoundException$,xl.ScanNotFoundException);t.SecretNotFoundException$=[-3,Rl,Ks,{[Si]:Ai},[Fa],[0]];vl.registerError(t.SecretNotFoundException$,xl.SecretNotFoundException);t.ServerException$=[-3,Rl,$s,{[Si]:Kc},[Fa],[0]];vl.registerError(t.ServerException$,xl.ServerException);t.SigningConfigurationNotFoundException$=[-3,Rl,Ms,{[Si]:Ai},[Fa],[0]];vl.registerError(t.SigningConfigurationNotFoundException$,xl.SigningConfigurationNotFoundException);t.TemplateAlreadyExistsException$=[-3,Rl,co,{[Si]:Ai},[Fa],[0]];vl.registerError(t.TemplateAlreadyExistsException$,xl.TemplateAlreadyExistsException);t.TemplateNotFoundException$=[-3,Rl,mo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.TemplateNotFoundException$,xl.TemplateNotFoundException);t.TooManyTagsException$=[-3,Rl,Ao,{[Si]:Ai},[Fa],[0]];vl.registerError(t.TooManyTagsException$,xl.TooManyTagsException);t.UnableToAccessSecretException$=[-3,Rl,_o,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnableToAccessSecretException$,xl.UnableToAccessSecretException);t.UnableToDecryptSecretValueException$=[-3,Rl,Lo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnableToDecryptSecretValueException$,xl.UnableToDecryptSecretValueException);t.UnableToGetUpstreamImageException$=[-3,Rl,Oo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnableToGetUpstreamImageException$,xl.UnableToGetUpstreamImageException);t.UnableToGetUpstreamLayerException$=[-3,Rl,Fo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnableToGetUpstreamLayerException$,xl.UnableToGetUpstreamLayerException);t.UnsupportedImageTypeException$=[-3,Rl,Io,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnsupportedImageTypeException$,xl.UnsupportedImageTypeException);t.UnsupportedUpstreamRegistryException$=[-3,Rl,Uo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UnsupportedUpstreamRegistryException$,xl.UnsupportedUpstreamRegistryException);t.UploadNotFoundException$=[-3,Rl,wo,{[Si]:Ai},[Fa],[0]];vl.registerError(t.UploadNotFoundException$,xl.UploadNotFoundException);t.ValidationException$=[-3,Rl,Ho,{[Si]:Ai,[ji]:400},[Fa],[0]];vl.registerError(t.ValidationException$,xl.ValidationException);t.errorTypeRegistries=[Tl,vl];t.Attribute$=[3,Rl,o,0,[Ea,yl],[0,0],1];t.AuthorizationData$=[3,Rl,i,0,[ni,Bi,ja],[0,4,0]];t.AwsEcrContainerImageDetails$=[3,Rl,d,0,[jo,di,Ki,ua,qa,za,Ta,ga,oc,mc],[0,0,0,64|0,0,4,4,1,0,0]];t.BatchCheckLayerAvailabilityRequest$=[3,Rl,Q,0,[mc,Na,pc],[0,64|0,0],2];t.BatchCheckLayerAvailabilityResponse$=[3,Rl,v,0,[ba,Di],[()=>Zl,()=>Xl]];t.BatchDeleteImageRequest$=[3,Rl,k,0,[mc,Xi,pc],[0,()=>$l,0],2];t.BatchDeleteImageResponse$=[3,Rl,$,0,[Xi,Di],[()=>$l,()=>Hl]];t.BatchGetImageRequest$=[3,Rl,ee,0,[mc,Xi,pc,Xo],[0,()=>$l,0,64|0],2];t.BatchGetImageResponse$=[3,Rl,te,0,[Yi,Di],[()=>Gl,()=>Hl]];t.BatchGetRepositoryScanningConfigurationRequest$=[3,Rl,ne,0,[gc],[64|0],1];t.BatchGetRepositoryScanningConfigurationResponse$=[3,Rl,se,0,[kc,Di],[()=>hu,()=>fu]];t.CompleteLayerUploadRequest$=[3,Rl,ie,0,[mc,Al,Na,pc],[0,0,64|0,0],3];t.CompleteLayerUploadResponse$=[3,Rl,ae,0,[pc,mc,Al,Qa],[0,0,0,0]];t.CreatePullThroughCacheRuleRequest$=[3,Rl,le,0,[xi,fl,pc,ml,mi,fi,gl],[0,0,0,0,0,0,0],2];t.CreatePullThroughCacheRuleResponse$=[3,Rl,ue,0,[xi,fl,gi,pc,ml,mi,fi,gl],[0,0,4,0,0,0,0,0]];t.CreateRepositoryCreationTemplateRequest$=[3,Rl,Ae,0,[nc,Ko,yi,Ri,Ec,pa,Aa,fc,Pa,fi],[0,64|0,0,()=>t.EncryptionConfigurationForRepositoryCreationTemplate$,()=>Bu,0,()=>Jl,0,0,0],2];t.CreateRepositoryCreationTemplateResponse$=[3,Rl,me,0,[pc,lc],[0,()=>t.RepositoryCreationTemplate$]];t.CreateRepositoryRequest$=[3,Rl,ge,0,[mc,pc,nl,pa,Aa,sa,Ri],[0,0,()=>Bu,0,()=>Jl,()=>t.ImageScanningConfiguration$,()=>t.EncryptionConfiguration$],1];t.CreateRepositoryResponse$=[3,Rl,fe,0,[Sc],[()=>t.Repository$]];t.CvssScore$=[3,Rl,he,0,[pi,Jc,el,wl],[1,0,0,0]];t.CvssScoreAdjustment$=[3,Rl,ye,0,[Ha,Bc],[0,0]];t.CvssScoreDetails$=[3,Rl,Ce,0,[ai,Wc,zc,Jc,wl],[()=>Ll,1,0,0,0]];t.DeleteLifecyclePolicyRequest$=[3,Rl,Le,0,[mc,pc],[0,0],1];t.DeleteLifecyclePolicyResponse$=[3,Rl,Oe,0,[pc,mc,ka,xa],[0,0,0,4]];t.DeletePullThroughCacheRuleRequest$=[3,Rl,Ue,0,[xi,pc],[0,0],1];t.DeletePullThroughCacheRuleResponse$=[3,Rl,Me,0,[xi,fl,gi,pc,mi,fi,gl],[0,0,4,0,0,0,0]];t.DeleteRegistryPolicyRequest$=[3,Rl,mt,0,[],[]];t.DeleteRegistryPolicyResponse$=[3,Rl,ht,0,[pc,Za],[0,0]];t.DeleteRepositoryCreationTemplateRequest$=[3,Rl,Je,0,[nc],[0],1];t.DeleteRepositoryCreationTemplateResponse$=[3,Rl,We,0,[pc,lc],[0,()=>t.RepositoryCreationTemplate$]];t.DeleteRepositoryPolicyRequest$=[3,Rl,yt,0,[mc,pc],[0,0],1];t.DeleteRepositoryPolicyResponse$=[3,Rl,Et,0,[pc,mc,Za],[0,0,0]];t.DeleteRepositoryRequest$=[3,Rl,It,0,[mc,pc,Vi],[0,0,2],1];t.DeleteRepositoryResponse$=[3,Rl,bt,0,[Sc],[()=>t.Repository$]];t.DeleteSigningConfigurationRequest$=[3,Rl,Tt,0,[],[]];t.DeleteSigningConfigurationResponse$=[3,Rl,vt,0,[pc,Lc],[0,()=>t.SigningConfiguration$]];t.DeregisterPullTimeUpdateExclusionRequest$=[3,Rl,ze,0,[Va],[0],1];t.DeregisterPullTimeUpdateExclusionResponse$=[3,Rl,Ve,0,[Va],[0]];t.DescribeImageReplicationStatusRequest$=[3,Rl,Re,0,[mc,Zi,pc],[0,()=>t.ImageIdentifier$,0],2];t.DescribeImageReplicationStatusResponse$=[3,Rl,Ne,0,[mc,Zi,hc],[0,()=>t.ImageIdentifier$,()=>zl]];t.DescribeImageScanFindingsRequest$=[3,Rl,Te,0,[mc,Zi,pc,Ga,Ua],[0,()=>t.ImageIdentifier$,0,0,1],2];t.DescribeImageScanFindingsResponse$=[3,Rl,ve,0,[pc,mc,Zi,la,ia,Ga],[0,0,()=>t.ImageIdentifier$,()=>t.ImageScanStatus$,()=>t.ImageScanFindings$,0]];t.DescribeImagesFilter$=[3,Rl,Se,0,[il,na],[0,0]];t.DescribeImageSigningStatusRequest$=[3,Rl,De,0,[mc,Zi,pc],[0,()=>t.ImageIdentifier$,0],2];t.DescribeImageSigningStatusResponse$=[3,Rl,ke,0,[mc,Zi,pc,Vc],[0,()=>t.ImageIdentifier$,0,()=>jl]];t.DescribeImagesRequest$=[3,Rl,Be,0,[mc,pc,Xi,Ga,Ua,qi],[0,0,()=>$l,0,1,()=>t.DescribeImagesFilter$],1];t.DescribeImagesResponse$=[3,Rl,Qe,0,[Ji,Ga],[()=>Ml,0]];t.DescribePullThroughCacheRulesRequest$=[3,Rl,He,0,[pc,Ti,Ga,Ua],[0,64|0,0,1]];t.DescribePullThroughCacheRulesResponse$=[3,Rl,$e,0,[ec,Ga],[()=>nu,0]];t.DescribeRegistryRequest$=[3,Rl,St,0,[],[]];t.DescribeRegistryResponse$=[3,Rl,Bt,0,[pc,cc],[0,()=>t.ReplicationConfiguration$]];t.DescribeRepositoriesRequest$=[3,Rl,wt,0,[pc,gc,Ga,Ua],[0,64|0,0,1]];t.DescribeRepositoriesResponse$=[3,Rl,Rt,0,[Tc,Ga],[()=>mu,0]];t.DescribeRepositoryCreationTemplatesRequest$=[3,Rl,Ke,0,[sc,Ga,Ua],[64|0,0,1]];t.DescribeRepositoryCreationTemplatesResponse$=[3,Rl,Xe,0,[pc,uc,Ga],[0,()=>pu,0]];t.EncryptionConfiguration$=[3,Rl,Dt,0,[vi,Ia],[0,0],1];t.EncryptionConfigurationForRepositoryCreationTemplate$=[3,Rl,kt,0,[vi,Ia],[0,0],1];t.EnhancedImageScanFinding$=[3,Rl,_t,0,[Yo,yi,ki,Fi,va,rc,xc,vc,Wc,Fc,Xc,tl,ll,ul,pl,_i,wi],[0,0,0,4,4,()=>t.PackageVulnerabilityDetails$,()=>t.Remediation$,()=>yu,1,()=>t.ScoreDetails$,0,0,0,0,4,0,0]];t.GetAccountSettingRequest$=[3,Rl,Mt,0,[$a],[0],1];t.GetAccountSettingResponse$=[3,Rl,Ht,0,[$a,yl],[0,0]];t.GetAuthorizationTokenRequest$=[3,Rl,Gt,0,[Ac],[64|0]];t.GetAuthorizationTokenResponse$=[3,Rl,qt,0,[Jo],[()=>kl]];t.GetDownloadUrlForLayerRequest$=[3,Rl,Vt,0,[mc,Qa,pc],[0,0,0],2];t.GetDownloadUrlForLayerResponse$=[3,Rl,jt,0,[Ei,Qa],[0,0]];t.GetLifecyclePolicyPreviewRequest$=[3,Rl,Wt,0,[mc,pc,Xi,Ga,Ua,qi],[0,0,()=>$l,0,1,()=>t.LifecyclePolicyPreviewFilter$],1];t.GetLifecyclePolicyPreviewResponse$=[3,Rl,Kt,0,[pc,mc,ka,tl,Ga,Ka,rl],[0,0,0,0,0,()=>eu,()=>t.LifecyclePolicyPreviewSummary$]];t.GetLifecyclePolicyRequest$=[3,Rl,Xt,0,[mc,pc],[0,0],1];t.GetLifecyclePolicyResponse$=[3,Rl,Zt,0,[pc,mc,ka,xa],[0,0,0,4]];t.GetRegistryPolicyRequest$=[3,Rl,tr,0,[],[]];t.GetRegistryPolicyResponse$=[3,Rl,rr,0,[pc,Za],[0,0]];t.GetRegistryScanningConfigurationRequest$=[3,Rl,ar,0,[],[]];t.GetRegistryScanningConfigurationResponse$=[3,Rl,cr,0,[pc,_c],[0,()=>t.RegistryScanningConfiguration$]];t.GetRepositoryPolicyRequest$=[3,Rl,nr,0,[mc,pc],[0,0],1];t.GetRepositoryPolicyResponse$=[3,Rl,sr,0,[pc,mc,Za],[0,0,0]];t.GetSigningConfigurationRequest$=[3,Rl,ur,0,[],[]];t.GetSigningConfigurationResponse$=[3,Rl,dr,0,[pc,Lc],[0,()=>t.SigningConfiguration$]];t.Image$=[3,Rl,pr,0,[pc,mc,Zi,ea,ta],[0,0,()=>t.ImageIdentifier$,0,0]];t.ImageDetail$=[3,Rl,gr,0,[pc,mc,Wi,ua,ca,ra,la,aa,ta,Zo,_a,$c,na,Ba,wa],[0,0,0,64|0,1,4,()=>t.ImageScanStatus$,()=>t.ImageScanFindingsSummary$,0,0,4,0,0,4,4]];t.ImageFailure$=[3,Rl,yr,0,[Zi,Li,Mi],[()=>t.ImageIdentifier$,0,0]];t.ImageIdentifier$=[3,Rl,Cr,0,[Wi,ma],[0,0]];t.ImageReferrer$=[3,Rl,Tr,0,[bi,Ma,Zc,si,ci,ti],[0,0,1,0,128|0,0],3];t.ImageReplicationStatus$=[3,Rl,Pr,0,[Nc,pc,tl,Li],[0,0,0,0]];t.ImageScanFinding$=[3,Rl,Lr,0,[$a,yi,dl,Xc,ui],[0,0,0,0,()=>Dl]];t.ImageScanFindings$=[3,Rl,Ur,0,[oa,Sl,Hi,zi,Ni],[4,4,128|1,()=>Vl,()=>Fl]];t.ImageScanFindingsSummary$=[3,Rl,Fr,0,[oa,Sl,Hi],[4,4,128|1]];t.ImageScanningConfiguration$=[3,Rl,kr,0,[Gc],[2]];t.ImageScanStatus$=[3,Rl,Mr,0,[tl,yi],[0,0]];t.ImageSigningStatus$=[3,Rl,$r,0,[qc,Li,Mi,tl],[0,0,0,0]];t.ImageTagMutabilityExclusionFilter$=[3,Rl,qr,0,[$i,qi],[0,0],2];t.InitiateLayerUploadRequest$=[3,Rl,Rr,0,[mc,pc],[0,0],1];t.InitiateLayerUploadResponse$=[3,Rl,Nr,0,[Al,Xa],[0,1]];t.Layer$=[3,Rl,Jr,0,[Qa,Sa,La,Ma],[0,0,1,0]];t.LayerFailure$=[3,Rl,Xr,0,[Qa,Li,Mi],[0,0,0]];t.LifecyclePolicyPreviewFilter$=[3,Rl,An,0,[il],[0]];t.LifecyclePolicyPreviewResult$=[3,Rl,hn,0,[ua,Wi,ra,ii,ei,Oc],[64|0,0,4,()=>t.LifecyclePolicyRuleAction$,1,0]];t.LifecyclePolicyPreviewSummary$=[3,Rl,En,0,[Qi,sl],[1,()=>wu]];t.LifecyclePolicyRuleAction$=[3,Rl,Cn,0,[ul,al],[0,0]];t.ListImageReferrersFilter$=[3,Rl,sn,0,[oi,ti],[64|0,0]];t.ListImageReferrersRequest$=[3,Rl,on,0,[mc,Mc,pc,qi,Ga,Ua],[0,()=>t.SubjectIdentifier$,0,()=>t.ListImageReferrersFilter$,0,1],2];t.ListImageReferrersResponse$=[3,Rl,an,0,[Rc,Ga],[()=>ql,0]];t.ListImagesFilter$=[3,Rl,rn,0,[il,na],[0,0]];t.ListImagesRequest$=[3,Rl,nn,0,[mc,pc,Ga,Ua,qi],[0,0,0,1,()=>t.ListImagesFilter$],1];t.ListImagesResponse$=[3,Rl,cn,0,[Xi,Ga],[()=>$l,0]];t.ListPullTimeUpdateExclusionsRequest$=[3,Rl,Sn,0,[Ua,Ga],[1,0]];t.ListPullTimeUpdateExclusionsResponse$=[3,Rl,Bn,0,[tc,Ga],[64|0,0]];t.ListTagsForResourceRequest$=[3,Rl,Rn,0,[ic],[0],1];t.ListTagsForResourceResponse$=[3,Rl,Nn,0,[nl],[()=>Bu]];t.PackageVulnerabilityDetails$=[3,Rl,os,0,[hi,Cc,bc,el,Yc,El,bl,Bl,Cl,Il],[()=>Ol,64|0,64|0,0,0,4,0,4,0,()=>Ru]];t.PullThroughCacheRule$=[3,Rl,ts,0,[xi,fl,gi,pc,mi,fi,gl,ml,pl],[0,0,4,0,0,0,0,0,4]];t.PutAccountSettingRequest$=[3,Rl,xn,0,[$a,yl],[0,0],2];t.PutAccountSettingResponse$=[3,Rl,Tn,0,[$a,yl],[0,0]];t.PutImageRequest$=[3,Rl,Pn,0,[mc,ea,pc,ta,ma,Wi],[0,0,0,0,0,0],2];t.PutImageResponse$=[3,Rl,Dn,0,[ya],[()=>t.Image$]];t.PutImageScanningConfigurationRequest$=[3,Rl,_n,0,[mc,sa,pc],[0,()=>t.ImageScanningConfiguration$,0],2];t.PutImageScanningConfigurationResponse$=[3,Rl,Ln,0,[pc,mc,sa],[0,0,()=>t.ImageScanningConfiguration$]];t.PutImageTagMutabilityRequest$=[3,Rl,Fn,0,[mc,pa,pc,Aa],[0,0,0,()=>Jl],2];t.PutImageTagMutabilityResponse$=[3,Rl,Un,0,[pc,mc,pa,Aa],[0,0,0,()=>Jl]];t.PutLifecyclePolicyRequest$=[3,Rl,Hn,0,[mc,ka,pc],[0,0,0],2];t.PutLifecyclePolicyResponse$=[3,Rl,$n,0,[pc,mc,ka],[0,0,0]];t.PutRegistryPolicyRequest$=[3,Rl,jn,0,[Za],[0],1];t.PutRegistryPolicyResponse$=[3,Rl,Yn,0,[pc,Za],[0,0]];t.PutRegistryScanningConfigurationRequest$=[3,Rl,Wn,0,[jc,Pc],[0,()=>cu]];t.PutRegistryScanningConfigurationResponse$=[3,Rl,Kn,0,[yc],[()=>t.RegistryScanningConfiguration$]];t.PutReplicationConfigurationRequest$=[3,Rl,qn,0,[cc],[()=>t.ReplicationConfiguration$],1];t.PutReplicationConfigurationResponse$=[3,Rl,zn,0,[cc],[()=>t.ReplicationConfiguration$]];t.PutSigningConfigurationRequest$=[3,Rl,Zn,0,[Lc],[()=>t.SigningConfiguration$],1];t.PutSigningConfigurationResponse$=[3,Rl,es,0,[Lc],[()=>t.SigningConfiguration$]];t.Recommendation$=[3,Rl,as,0,[hl,cl],[0,0]];t.RegisterPullTimeUpdateExclusionRequest$=[3,Rl,ws,0,[Va],[0],1];t.RegisterPullTimeUpdateExclusionResponse$=[3,Rl,Rs,0,[Va,gi],[0,4]];t.RegistryScanningConfiguration$=[3,Rl,xs,0,[jc,Pc],[0,()=>cu]];t.RegistryScanningRule$=[3,Rl,ks,0,[Uc,dc],[0,()=>Cu],2];t.Remediation$=[3,Rl,Ls,0,[wc],[()=>t.Recommendation$]];t.ReplicationConfiguration$=[3,Rl,ls,0,[Pc],[()=>du],1];t.ReplicationDestination$=[3,Rl,ps,0,[Nc,pc],[0,0],2];t.ReplicationRule$=[3,Rl,Ns,0,[Ci,dc],[()=>uu,()=>Au],1];t.Repository$=[3,Rl,Os,0,[ac,pc,mc,Ic,gi,pa,Aa,sa,Ri],[0,0,0,0,4,0,()=>Jl,()=>t.ImageScanningConfiguration$,()=>t.EncryptionConfiguration$]];t.RepositoryCreationTemplate$=[3,Rl,us,0,[nc,yi,Ri,Ec,pa,Aa,fc,Pa,Ko,fi,gi,pl],[0,0,()=>t.EncryptionConfigurationForRepositoryCreationTemplate$,()=>Bu,0,()=>Jl,0,0,64|0,0,4,4]];t.RepositoryFilter$=[3,Rl,gs,0,[qi,$i],[0,0],2];t.RepositoryScanningConfiguration$=[3,Rl,Ds,0,[ac,mc,Gc,Uc,ri],[0,0,2,0,()=>Cu]];t.RepositoryScanningConfigurationFailure$=[3,Rl,Ts,0,[mc,Li,Mi],[0,0,0]];t.Resource$=[3,Rl,Fs,0,[Ii,ha,nl,ul],[()=>t.ResourceDetails$,0,128|0,0]];t.ResourceDetails$=[3,Rl,ms,0,[Wo],[()=>t.AwsEcrContainerImageDetails$]];t.ScanningRepositoryFilter$=[3,Rl,Zs,0,[qi,$i],[0,0],2];t.ScoreDetails$=[3,Rl,Hs,0,[hi],[()=>t.CvssScoreDetails$]];t.SetRepositoryPolicyRequest$=[3,Rl,oo,0,[mc,Za,pc,Vi],[0,0,0,2],2];t.SetRepositoryPolicyResponse$=[3,Rl,io,0,[pc,mc,Za],[0,0,0]];t.SigningConfiguration$=[3,Rl,Us,0,[Pc],[()=>bu],1];t.SigningRepositoryFilter$=[3,Rl,ro,0,[qi,$i],[0,0],2];t.SigningRule$=[3,Rl,Xs,0,[qc,dc],[0,()=>Iu],1];t.StartImageScanRequest$=[3,Rl,zs,0,[mc,Zi,pc],[0,()=>t.ImageIdentifier$,0],2];t.StartImageScanResponse$=[3,Rl,Vs,0,[pc,mc,Zi,la],[0,0,()=>t.ImageIdentifier$,()=>t.ImageScanStatus$]];t.StartLifecyclePolicyPreviewRequest$=[3,Rl,Ys,0,[mc,pc,ka],[0,0,0],1];t.StartLifecyclePolicyPreviewResponse$=[3,Rl,Js,0,[pc,mc,ka,tl],[0,0,0,0]];t.SubjectIdentifier$=[3,Rl,Gs,0,[Wi],[0],1];t.Tag$=[3,Rl,ao,0,[jr,Mo],[0,0],2];t.TagResourceRequest$=[3,Rl,fo,0,[ic,nl],[0,()=>Bu],2];t.TagResourceResponse$=[3,Rl,ho,0,[],[]];t.TransitioningImageTotalCount$=[3,Rl,lo,0,[al,da],[0,1]];t.UntagResourceRequest$=[3,Rl,Do,0,[ic,ol],[0,64|0],2];t.UntagResourceResponse$=[3,Rl,ko,0,[],[]];t.UpdateImageStorageClassRequest$=[3,Rl,Eo,0,[mc,Zi,al,pc],[0,()=>t.ImageIdentifier$,0,0],3];t.UpdateImageStorageClassResponse$=[3,Rl,Co,0,[pc,mc,Zi,na],[0,0,()=>t.ImageIdentifier$,0]];t.UpdatePullThroughCacheRuleRequest$=[3,Rl,No,0,[xi,pc,mi,fi],[0,0,0,0],1];t.UpdatePullThroughCacheRuleResponse$=[3,Rl,Qo,0,[xi,pc,pl,mi,fi,gl],[0,0,4,0,0,0]];t.UpdateRepositoryCreationTemplateRequest$=[3,Rl,vo,0,[nc,yi,Ri,Ec,pa,Aa,fc,Pa,Ko,fi],[0,0,()=>t.EncryptionConfigurationForRepositoryCreationTemplate$,()=>Bu,0,()=>Jl,0,0,64|0,0],1];t.UpdateRepositoryCreationTemplateResponse$=[3,Rl,Po,0,[pc,lc],[0,()=>t.RepositoryCreationTemplate$]];t.UploadLayerPartRequest$=[3,Rl,So,0,[mc,Al,Ya,Ja,Da,pc],[0,0,1,1,21,0],5];t.UploadLayerPartResponse$=[3,Rl,Bo,0,[pc,mc,Al,Ra],[0,0,0,1]];t.ValidatePullThroughCacheRuleRequest$=[3,Rl,zo,0,[xi,pc],[0,0],1];t.ValidatePullThroughCacheRuleResponse$=[3,Rl,Vo,0,[xi,pc,fl,mi,fi,gl,fa,Gi],[0,0,0,0,0,0,2,0]];t.VulnerablePackage$=[3,Rl,$o,0,[li,Pi,Ui,$a,Wa,Qc,Hc,wl,Oi],[0,1,0,0,0,0,0,0,0]];var Pl=null&&64|0;var Dl=[1,Rl,p,0,()=>t.Attribute$];var kl=[1,Rl,c,0,()=>t.AuthorizationData$];var _l=null&&64|0;var Ll=[1,Rl,Ee,0,()=>t.CvssScoreAdjustment$];var Ol=[1,Rl,Ie,0,()=>t.CvssScore$];var Fl=[1,Rl,Lt,0,()=>t.EnhancedImageScanFinding$];var Ul=null&&64|0;var Ml=[1,Rl,hr,0,()=>t.ImageDetail$];var Hl=[1,Rl,Er,0,()=>t.ImageFailure$];var $l=[1,Rl,Ir,0,()=>t.ImageIdentifier$];var Gl=[1,Rl,br,0,()=>t.Image$];var ql=[1,Rl,vr,0,()=>t.ImageReferrer$];var zl=[1,Rl,Dr,0,()=>t.ImageReplicationStatus$];var Vl=[1,Rl,Or,0,()=>t.ImageScanFinding$];var jl=[1,Rl,Hr,0,()=>t.ImageSigningStatus$];var Yl=null&&64|0;var Jl=[1,Rl,zr,0,()=>t.ImageTagMutabilityExclusionFilter$];var Wl=null&&64|0;var Kl=null&&64|0;var Xl=[1,Rl,Zr,0,()=>t.LayerFailure$];var Zl=[1,Rl,un,0,()=>t.Layer$];var eu=[1,Rl,yn,0,()=>t.LifecyclePolicyPreviewResult$];var tu=null&&64|0;var ru=null&&64|0;var nu=[1,Rl,ns,0,()=>t.PullThroughCacheRule$];var su=null&&64|0;var ou=null&&64|0;var iu=null&&64|0;var au=null&&64|0;var cu=[1,Rl,_s,0,()=>t.RegistryScanningRule$];var lu=null&&64|0;var uu=[1,Rl,As,0,()=>t.ReplicationDestination$];var du=[1,Rl,Qs,0,()=>t.ReplicationRule$];var pu=[1,Rl,ds,0,()=>t.RepositoryCreationTemplate$];var Au=[1,Rl,fs,0,()=>t.RepositoryFilter$];var mu=[1,Rl,ys,0,()=>t.Repository$];var gu=null&&64|0;var fu=[1,Rl,vs,0,()=>t.RepositoryScanningConfigurationFailure$];var hu=[1,Rl,Ps,0,()=>t.RepositoryScanningConfiguration$];var yu=[1,Rl,Es,0,()=>t.Resource$];var Eu=null&&64|0;var Cu=[1,Rl,eo,0,()=>t.ScanningRepositoryFilter$];var Iu=[1,Rl,to,0,()=>t.SigningRepositoryFilter$];var bu=[1,Rl,no,0,()=>t.SigningRule$];var Su=null&&64|0;var Bu=[1,Rl,po,0,()=>t.Tag$];var wu=[1,Rl,uo,0,()=>t.TransitioningImageTotalCount$];var Ru=[1,Rl,Go,0,()=>t.VulnerablePackage$];var Nu=null&&128|0;var Qu=null&&128|1;var xu=null&&128|0;t.BatchCheckLayerAvailability$=[9,Rl,C,0,()=>t.BatchCheckLayerAvailabilityRequest$,()=>t.BatchCheckLayerAvailabilityResponse$];t.BatchDeleteImage$=[9,Rl,D,0,()=>t.BatchDeleteImageRequest$,()=>t.BatchDeleteImageResponse$];t.BatchGetImage$=[9,Rl,V,0,()=>t.BatchGetImageRequest$,()=>t.BatchGetImageResponse$];t.BatchGetRepositoryScanningConfiguration$=[9,Rl,re,0,()=>t.BatchGetRepositoryScanningConfigurationRequest$,()=>t.BatchGetRepositoryScanningConfigurationResponse$];t.CompleteLayerUpload$=[9,Rl,oe,0,()=>t.CompleteLayerUploadRequest$,()=>t.CompleteLayerUploadResponse$];t.CreatePullThroughCacheRule$=[9,Rl,ce,0,()=>t.CreatePullThroughCacheRuleRequest$,()=>t.CreatePullThroughCacheRuleResponse$];t.CreateRepository$=[9,Rl,de,0,()=>t.CreateRepositoryRequest$,()=>t.CreateRepositoryResponse$];t.CreateRepositoryCreationTemplate$=[9,Rl,pe,0,()=>t.CreateRepositoryCreationTemplateRequest$,()=>t.CreateRepositoryCreationTemplateResponse$];t.DeleteLifecyclePolicy$=[9,Rl,_e,0,()=>t.DeleteLifecyclePolicyRequest$,()=>t.DeleteLifecyclePolicyResponse$];t.DeletePullThroughCacheRule$=[9,Rl,Fe,0,()=>t.DeletePullThroughCacheRuleRequest$,()=>t.DeletePullThroughCacheRuleResponse$];t.DeleteRegistryPolicy$=[9,Rl,At,0,()=>t.DeleteRegistryPolicyRequest$,()=>t.DeleteRegistryPolicyResponse$];t.DeleteRepository$=[9,Rl,je,0,()=>t.DeleteRepositoryRequest$,()=>t.DeleteRepositoryResponse$];t.DeleteRepositoryCreationTemplate$=[9,Rl,Ye,0,()=>t.DeleteRepositoryCreationTemplateRequest$,()=>t.DeleteRepositoryCreationTemplateResponse$];t.DeleteRepositoryPolicy$=[9,Rl,Ct,0,()=>t.DeleteRepositoryPolicyRequest$,()=>t.DeleteRepositoryPolicyResponse$];t.DeleteSigningConfiguration$=[9,Rl,xt,0,()=>t.DeleteSigningConfigurationRequest$,()=>t.DeleteSigningConfigurationResponse$];t.DeregisterPullTimeUpdateExclusion$=[9,Rl,qe,0,()=>t.DeregisterPullTimeUpdateExclusionRequest$,()=>t.DeregisterPullTimeUpdateExclusionResponse$];t.DescribeImageReplicationStatus$=[9,Rl,we,0,()=>t.DescribeImageReplicationStatusRequest$,()=>t.DescribeImageReplicationStatusResponse$];t.DescribeImages$=[9,Rl,be,0,()=>t.DescribeImagesRequest$,()=>t.DescribeImagesResponse$];t.DescribeImageScanFindings$=[9,Rl,xe,0,()=>t.DescribeImageScanFindingsRequest$,()=>t.DescribeImageScanFindingsResponse$];t.DescribeImageSigningStatus$=[9,Rl,Pe,0,()=>t.DescribeImageSigningStatusRequest$,()=>t.DescribeImageSigningStatusResponse$];t.DescribePullThroughCacheRules$=[9,Rl,Ge,0,()=>t.DescribePullThroughCacheRulesRequest$,()=>t.DescribePullThroughCacheRulesResponse$];t.DescribeRegistry$=[9,Rl,Nt,0,()=>t.DescribeRegistryRequest$,()=>t.DescribeRegistryResponse$];t.DescribeRepositories$=[9,Rl,Qt,0,()=>t.DescribeRepositoriesRequest$,()=>t.DescribeRepositoriesResponse$];t.DescribeRepositoryCreationTemplates$=[9,Rl,Ze,0,()=>t.DescribeRepositoryCreationTemplatesRequest$,()=>t.DescribeRepositoryCreationTemplatesResponse$];t.GetAccountSetting$=[9,Rl,Ut,0,()=>t.GetAccountSettingRequest$,()=>t.GetAccountSettingResponse$];t.GetAuthorizationToken$=[9,Rl,$t,0,()=>t.GetAuthorizationTokenRequest$,()=>t.GetAuthorizationTokenResponse$];t.GetDownloadUrlForLayer$=[9,Rl,zt,0,()=>t.GetDownloadUrlForLayerRequest$,()=>t.GetDownloadUrlForLayerResponse$];t.GetLifecyclePolicy$=[9,Rl,Yt,0,()=>t.GetLifecyclePolicyRequest$,()=>t.GetLifecyclePolicyResponse$];t.GetLifecyclePolicyPreview$=[9,Rl,Jt,0,()=>t.GetLifecyclePolicyPreviewRequest$,()=>t.GetLifecyclePolicyPreviewResponse$];t.GetRegistryPolicy$=[9,Rl,er,0,()=>t.GetRegistryPolicyRequest$,()=>t.GetRegistryPolicyResponse$];t.GetRegistryScanningConfiguration$=[9,Rl,ir,0,()=>t.GetRegistryScanningConfigurationRequest$,()=>t.GetRegistryScanningConfigurationResponse$];t.GetRepositoryPolicy$=[9,Rl,or,0,()=>t.GetRepositoryPolicyRequest$,()=>t.GetRepositoryPolicyResponse$];t.GetSigningConfiguration$=[9,Rl,lr,0,()=>t.GetSigningConfigurationRequest$,()=>t.GetSigningConfigurationResponse$];t.InitiateLayerUpload$=[9,Rl,wr,0,()=>t.InitiateLayerUploadRequest$,()=>t.InitiateLayerUploadResponse$];t.ListImageReferrers$=[9,Rl,ln,0,()=>t.ListImageReferrersRequest$,()=>t.ListImageReferrersResponse$];t.ListImages$=[9,Rl,en,0,()=>t.ListImagesRequest$,()=>t.ListImagesResponse$];t.ListPullTimeUpdateExclusions$=[9,Rl,bn,0,()=>t.ListPullTimeUpdateExclusionsRequest$,()=>t.ListPullTimeUpdateExclusionsResponse$];t.ListTagsForResource$=[9,Rl,wn,0,()=>t.ListTagsForResourceRequest$,()=>t.ListTagsForResourceResponse$];t.PutAccountSetting$=[9,Rl,Qn,0,()=>t.PutAccountSettingRequest$,()=>t.PutAccountSettingResponse$];t.PutImage$=[9,Rl,vn,0,()=>t.PutImageRequest$,()=>t.PutImageResponse$];t.PutImageScanningConfiguration$=[9,Rl,kn,0,()=>t.PutImageScanningConfigurationRequest$,()=>t.PutImageScanningConfigurationResponse$];t.PutImageTagMutability$=[9,Rl,On,0,()=>t.PutImageTagMutabilityRequest$,()=>t.PutImageTagMutabilityResponse$];t.PutLifecyclePolicy$=[9,Rl,Mn,0,()=>t.PutLifecyclePolicyRequest$,()=>t.PutLifecyclePolicyResponse$];t.PutRegistryPolicy$=[9,Rl,Vn,0,()=>t.PutRegistryPolicyRequest$,()=>t.PutRegistryPolicyResponse$];t.PutRegistryScanningConfiguration$=[9,Rl,Jn,0,()=>t.PutRegistryScanningConfigurationRequest$,()=>t.PutRegistryScanningConfigurationResponse$];t.PutReplicationConfiguration$=[9,Rl,Gn,0,()=>t.PutReplicationConfigurationRequest$,()=>t.PutReplicationConfigurationResponse$];t.PutSigningConfiguration$=[9,Rl,Xn,0,()=>t.PutSigningConfigurationRequest$,()=>t.PutSigningConfigurationResponse$];t.RegisterPullTimeUpdateExclusion$=[9,Rl,Bs,0,()=>t.RegisterPullTimeUpdateExclusionRequest$,()=>t.RegisterPullTimeUpdateExclusionResponse$];t.SetRepositoryPolicy$=[9,Rl,so,0,()=>t.SetRepositoryPolicyRequest$,()=>t.SetRepositoryPolicyResponse$];t.StartImageScan$=[9,Rl,qs,0,()=>t.StartImageScanRequest$,()=>t.StartImageScanResponse$];t.StartLifecyclePolicyPreview$=[9,Rl,js,0,()=>t.StartLifecyclePolicyPreviewRequest$,()=>t.StartLifecyclePolicyPreviewResponse$];t.TagResource$=[9,Rl,go,0,()=>t.TagResourceRequest$,()=>t.TagResourceResponse$];t.UntagResource$=[9,Rl,xo,0,()=>t.UntagResourceRequest$,()=>t.UntagResourceResponse$];t.UpdateImageStorageClass$=[9,Rl,yo,0,()=>t.UpdateImageStorageClassRequest$,()=>t.UpdateImageStorageClassResponse$];t.UpdatePullThroughCacheRule$=[9,Rl,Ro,0,()=>t.UpdatePullThroughCacheRuleRequest$,()=>t.UpdatePullThroughCacheRuleResponse$];t.UpdateRepositoryCreationTemplate$=[9,Rl,To,0,()=>t.UpdateRepositoryCreationTemplateRequest$,()=>t.UpdateRepositoryCreationTemplateResponse$];t.UploadLayerPart$=[9,Rl,bo,0,()=>t.UploadLayerPartRequest$,()=>t.UploadLayerPartResponse$];t.ValidatePullThroughCacheRule$=[9,Rl,qo,0,()=>t.ValidatePullThroughCacheRuleRequest$,()=>t.ValidatePullThroughCacheRuleResponse$]},8704:(e,t,n)=>{var o=n(2356);var i=n(402);var c=n(8857);var d=n(5152);var p=n(5118);var y=n(4645);var C=n(6890);var Q=n(1411);var v=n(3422);var D=n(2430);var k=n(8385);var $=n(1577);var V=n(4274);const ee={warningEmitted:false};const emitWarningIfUnsupportedVersion=e=>{if(e&&!ee.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<20){ee.warningEmitted=true;process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js ${e} in January 2026.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/c895JFp`)}};function setCredentialFeature(e,t,n){if(!e.$source){e.$source={}}e.$source[t]=n;return e}function setFeature(e,t,n){if(!e.__aws_sdk_context){e.__aws_sdk_context={features:{}}}else if(!e.__aws_sdk_context.features){e.__aws_sdk_context.features={}}e.__aws_sdk_context.features[t]=n}function setTokenFeature(e,t,n){if(!e.$source){e.$source={}}e.$source[t]=n;return e}const getDateHeader=e=>o.HttpResponse.isInstance(e)?e.headers?.date??e.headers?.Date:undefined;const getSkewCorrectedDate=e=>new Date(Date.now()+e);const isClockSkewed=(e,t)=>Math.abs(getSkewCorrectedDate(t).getTime()-e)>=3e5;const getUpdatedSystemClockOffset=(e,t)=>{const n=Date.parse(e);if(isClockSkewed(n,t)){return n-Date.now()}return t};const throwSigningPropertyError=(e,t)=>{if(!t){throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`)}return t};const validateSigningProperties=async e=>{const t=throwSigningPropertyError("context",e.context);const n=throwSigningPropertyError("config",e.config);const o=t.endpointV2?.properties?.authSchemes?.[0];const i=throwSigningPropertyError("signer",n.signer);const c=await i(o);const d=e?.signingRegion;const p=e?.signingRegionSet;const y=e?.signingName;return{config:n,signer:c,signingRegion:d,signingRegionSet:p,signingName:y}};class AwsSdkSigV4Signer{async sign(e,t,n){if(!o.HttpRequest.isInstance(e)){throw new Error("The request is not an instance of `HttpRequest` and cannot be signed")}const i=await validateSigningProperties(n);const{config:c,signer:d}=i;let{signingRegion:p,signingName:y}=i;const C=n.context;if(C?.authSchemes?.length??0>1){const[e,t]=C.authSchemes;if(e?.name==="sigv4a"&&t?.name==="sigv4"){p=t?.signingRegion??p;y=t?.signingName??y}}const Q=await d.sign(e,{signingDate:getSkewCorrectedDate(c.systemClockOffset),signingRegion:p,signingService:y});return Q}errorHandler(e){return t=>{const n=t.ServerTime??getDateHeader(t.$response);if(n){const o=throwSigningPropertyError("config",e.config);const i=o.systemClockOffset;o.systemClockOffset=getUpdatedSystemClockOffset(n,o.systemClockOffset);const c=o.systemClockOffset!==i;if(c&&t.$metadata){t.$metadata.clockSkewCorrected=true}}throw t}}successHandler(e,t){const n=getDateHeader(e);if(n){const e=throwSigningPropertyError("config",t.config);e.systemClockOffset=getUpdatedSystemClockOffset(n,e.systemClockOffset)}}}const te=AwsSdkSigV4Signer;class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer{async sign(e,t,n){if(!o.HttpRequest.isInstance(e)){throw new Error("The request is not an instance of `HttpRequest` and cannot be signed")}const{config:i,signer:c,signingRegion:d,signingRegionSet:p,signingName:y}=await validateSigningProperties(n);const C=await(i.sigv4aSigningRegionSet?.());const Q=(C??p??[d]).join(",");const v=await c.sign(e,{signingDate:getSkewCorrectedDate(i.systemClockOffset),signingRegion:Q,signingService:y});return v}}const getArrayForCommaSeparatedString=e=>typeof e==="string"&&e.length>0?e.split(",").map((e=>e.trim())):[];const getBearerTokenEnvKey=e=>`AWS_BEARER_TOKEN_${e.replace(/[\s-]/g,"_").toUpperCase()}`;const re="AWS_AUTH_SCHEME_PREFERENCE";const ne="auth_scheme_preference";const se={environmentVariableSelector:(e,t)=>{if(t?.signingName){const n=getBearerTokenEnvKey(t.signingName);if(n in e)return["httpBearerAuth"]}if(!(re in e))return undefined;return getArrayForCommaSeparatedString(e[re])},configFileSelector:e=>{if(!(ne in e))return undefined;return getArrayForCommaSeparatedString(e[ne])},default:[]};const resolveAwsSdkSigV4AConfig=e=>{e.sigv4aSigningRegionSet=i.normalizeProvider(e.sigv4aSigningRegionSet);return e};const oe={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET){return e.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((e=>e.trim()))}throw new c.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:true})},configFileSelector(e){if(e.sigv4a_signing_region_set){return(e.sigv4a_signing_region_set??"").split(",").map((e=>e.trim()))}throw new c.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:true})},default:undefined};const resolveAwsSdkSigV4Config=e=>{let t=e.credentials;let n=!!e.credentials;let o=undefined;Object.defineProperty(e,"credentials",{set(i){if(i&&i!==t&&i!==o){n=true}t=i;const c=normalizeCredentialProvider(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider});const p=bindCallerConfig(e,c);if(n&&!p.attributed){const e=typeof t==="object"&&t!==null;o=async t=>{const n=await p(t);const o=n;if(e&&(!o.$source||Object.keys(o.$source).length===0)){return d.setCredentialFeature(o,"CREDENTIALS_CODE","e")}return o};o.memoized=p.memoized;o.configBound=p.configBound;o.attributed=true}else{o=p}},get(){return o},enumerable:true,configurable:true});e.credentials=t;const{signingEscapePath:c=true,systemClockOffset:y=e.systemClockOffset||0,sha256:C}=e;let Q;if(e.signer){Q=i.normalizeProvider(e.signer)}else if(e.regionInfoProvider){Q=()=>i.normalizeProvider(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([t,n])=>{const{signingRegion:o,signingService:i}=t;e.signingRegion=e.signingRegion||o||n;e.signingName=e.signingName||i||e.serviceId;const d={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:C,uriEscapePath:c};const y=e.signerConstructor||p.SignatureV4;return new y(d)}))}else{Q=async t=>{t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await i.normalizeProvider(e.region)(),properties:{}},t);const n=t.signingRegion;const o=t.signingName;e.signingRegion=e.signingRegion||n;e.signingName=e.signingName||o||e.serviceId;const d={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:C,uriEscapePath:c};const y=e.signerConstructor||p.SignatureV4;return new y(d)}}const v=Object.assign(e,{systemClockOffset:y,signingEscapePath:c,signer:Q});return v};const ie=resolveAwsSdkSigV4Config;function normalizeCredentialProvider(e,{credentials:t,credentialDefaultProvider:n}){let o;if(t){if(!t?.memoized){o=i.memoizeIdentityProvider(t,i.isIdentityExpired,i.doesIdentityRequireRefresh)}else{o=t}}else{if(n){o=i.normalizeProvider(n(Object.assign({},e,{parentClientConfig:e})))}else{o=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")}}}o.memoized=true;return o}function bindCallerConfig(e,t){if(t.configBound){return t}const fn=async n=>t({...n,callerClientConfig:e});fn.memoized=t.memoized;fn.configBound=true;return fn}class ProtocolLib{queryCompat;constructor(e=false){this.queryCompat=e}resolveRestContentType(e,t){const n=t.getMemberSchemas();const o=Object.values(n).find((e=>!!e.getMergedTraits().httpPayload));if(o){const t=o.getMergedTraits().mediaType;if(t){return t}else if(o.isStringSchema()){return"text/plain"}else if(o.isBlobSchema()){return"application/octet-stream"}else{return e}}else if(!t.isUnitSchema()){const t=Object.values(n).find((e=>{const{httpQuery:t,httpQueryParams:n,httpHeader:o,httpLabel:i,httpPrefixHeaders:c}=e.getMergedTraits();const d=c===void 0;return!t&&!n&&!o&&!i&&d}));if(t){return e}}}async getErrorSchemaOrThrowBaseException(e,t,n,o,i,c){let d=t;let p=e;if(e.includes("#")){[d,p]=e.split("#")}const y={$metadata:i,$fault:n.statusCode<500?"client":"server"};const Q=C.TypeRegistry.for(d);try{const t=c?.(Q,p)??Q.getSchema(e);return{errorSchema:t,errorMetadata:y}}catch(e){o.message=o.message??o.Message??"UnknownError";const t=C.TypeRegistry.for("smithy.ts.sdk.synthetic."+d);const n=t.getBaseException();if(n){const e=t.getErrorCtor(n)??Error;throw this.decorateServiceException(Object.assign(new e({name:p}),y),o)}throw this.decorateServiceException(Object.assign(new Error(p),y),o)}}decorateServiceException(e,t={}){if(this.queryCompat){const n=e.Message??t.Message;const o=Q.decorateServiceException(e,t);if(n){o.message=n}o.Error={...o.Error,Type:o.Error?.Type,Code:o.Error?.Code,Message:o.Error?.message??o.Error?.Message??n};const i=o.$metadata.requestId;if(i){o.RequestId=i}return o}return Q.decorateServiceException(e,t)}setQueryCompatError(e,t){const n=t.headers?.["x-amzn-query-error"];if(e!==undefined&&n!=null){const[t,o]=n.split(";");const i=Object.entries(e);const c={Code:t,Type:o};Object.assign(e,c);for(const[e,t]of i){c[e==="message"?"Message":e]=t}delete c.__type;e.Error=c}}queryCompatOutput(e,t){if(e.Error){t.Error=e.Error}if(e.Type){t.Type=e.Type}if(e.Code){t.Code=e.Code}}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch(n){return e.find((e=>C.NormalizedSchema.of(e).getMergedTraits().awsQueryError?.[0]===t))}}}class AwsSmithyRpcV2CborProtocol extends y.SmithyRpcV2CborProtocol{awsQueryCompatible;mixin;constructor({defaultNamespace:e,awsQueryCompatible:t}){super({defaultNamespace:e});this.awsQueryCompatible=!!t;this.mixin=new ProtocolLib(this.awsQueryCompatible)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(this.awsQueryCompatible){o.headers["x-amzn-query-mode"]="true"}return o}async handleError(e,t,n,o,i){if(this.awsQueryCompatible){this.mixin.setQueryCompatError(o,n)}const c=(()=>{const e=n.headers["x-amzn-query-error"];if(e&&this.awsQueryCompatible){return e.split(";")[0]}return y.loadSmithyRpcV2CborErrorCode(n,o)??"Unknown"})();const{errorSchema:d,errorMetadata:p}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:undefined);const Q=C.NormalizedSchema.of(d);const v=o.message??o.Message??"Unknown";const D=C.TypeRegistry.for(d[1]).getErrorCtor(d)??Error;const k=new D(v);const $={};for(const[e,t]of Q.structIterator()){if(o[e]!=null){$[e]=this.deserializer.readValue(t,o[e])}}if(this.awsQueryCompatible){this.mixin.queryCompatOutput(o,$)}throw this.mixin.decorateServiceException(Object.assign(k,p,{$fault:Q.getMergedTraits().error,message:v},$),o)}}const _toStr=e=>{if(e==null){return e}if(typeof e==="number"||typeof e==="bigint"){const t=new Error(`Received number ${e} where a string was expected.`);t.name="Warning";console.warn(t);return String(e)}if(typeof e==="boolean"){const t=new Error(`Received boolean ${e} where a string was expected.`);t.name="Warning";console.warn(t);return String(e)}return e};const _toBool=e=>{if(e==null){return e}if(typeof e==="string"){const t=e.toLowerCase();if(e!==""&&t!=="false"&&t!=="true"){const t=new Error(`Received string "${e}" where a boolean was expected.`);t.name="Warning";console.warn(t)}return e!==""&&t!=="false"}return e};const _toNum=e=>{if(e==null){return e}if(typeof e==="string"){const t=Number(e);if(t.toString()!==e){const t=new Error(`Received string "${e}" where a number was expected.`);t.name="Warning";console.warn(t);return e}return t}return e};class SerdeContextConfig{serdeContext;setSerdeContext(e){this.serdeContext=e}}class UnionSerde{from;to;keys;constructor(e,t){this.from=e;this.to=t;this.keys=new Set(Object.keys(this.from).filter((e=>e!=="__type")))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value;const t=this.from[e];this.to.$unknown=[e,t]}}}function jsonReviver(e,t,n){if(n?.source){const e=n.source;if(typeof t==="number"){if(t>Number.MAX_SAFE_INTEGER||tQ.collectBody(e,t).then((e=>(t?.utf8Encoder??$.toUtf8)(e)));const parseJsonBody=(e,t)=>collectBodyString(e,t).then((e=>{if(e.length){try{return JSON.parse(e)}catch(t){if(t?.name==="SyntaxError"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}}return{}}));const parseJsonErrorBody=async(e,t)=>{const n=await parseJsonBody(e,t);n.message=n.message??n.Message;return n};const loadRestJsonErrorCode=(e,t)=>{const findKey=(e,t)=>Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase()));const sanitizeErrorCode=e=>{let t=e;if(typeof t==="number"){t=t.toString()}if(t.indexOf(",")>=0){t=t.split(",")[0]}if(t.indexOf(":")>=0){t=t.split(":")[0]}if(t.indexOf("#")>=0){t=t.split("#")[1]}return t};const n=findKey(e.headers,"x-amzn-errortype");if(n!==undefined){return sanitizeErrorCode(e.headers[n])}if(t&&typeof t==="object"){const e=findKey(t,"code");if(e&&t[e]!==undefined){return sanitizeErrorCode(t[e])}if(t["__type"]!==undefined){return sanitizeErrorCode(t["__type"])}}};class JsonShapeDeserializer extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}async read(e,t){return this._read(e,typeof t==="string"?JSON.parse(t,jsonReviver):await parseJsonBody(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){const n=t!==null&&typeof t==="object";const o=C.NormalizedSchema.of(e);if(n){if(o.isStructSchema()){const e=t;const n=o.isUnionSchema();const i={};let c=void 0;const{jsonName:d}=this.settings;if(d){c={}}let p;if(n){p=new UnionSerde(e,i)}for(const[t,y]of o.structIterator()){let o=t;if(d){o=y.getMergedTraits().jsonName??o;c[o]=t}if(n){p.mark(o)}if(e[o]!=null){i[t]=this._read(y,e[o])}}if(n){p.writeUnknown()}else if(typeof e.__type==="string"){for(const[t,n]of Object.entries(e)){const e=d?c[t]??t:t;if(!(e in i)){i[e]=n}}}return i}if(Array.isArray(t)&&o.isListSchema()){const e=o.getValueSchema();const n=[];const i=!!o.getMergedTraits().sparse;for(const o of t){if(i||o!=null){n.push(this._read(e,o))}}return n}if(o.isMapSchema()){const e=o.getValueSchema();const n={};const i=!!o.getMergedTraits().sparse;for(const[o,c]of Object.entries(t)){if(i||c!=null){n[o]=this._read(e,c)}}return n}}if(o.isBlobSchema()&&typeof t==="string"){return k.fromBase64(t)}const i=o.getMergedTraits().mediaType;if(o.isStringSchema()&&typeof t==="string"&&i){const e=i==="application/json"||i.endsWith("+json");if(e){return D.LazyJsonString.from(t)}return t}if(o.isTimestampSchema()&&t!=null){const e=v.determineTimestampFormat(o,this.settings);switch(e){case 5:return D.parseRfc3339DateTimeWithOffset(t);case 6:return D.parseRfc7231DateTime(t);case 7:return D.parseEpochTimestamp(t);default:console.warn("Missing timestamp format, parsing value with Date constructor:",t);return new Date(t)}}if(o.isBigIntegerSchema()&&(typeof t==="number"||typeof t==="string")){return BigInt(t)}if(o.isBigDecimalSchema()&&t!=undefined){if(t instanceof D.NumericValue){return t}const e=t;if(e.type==="bigDecimal"&&"string"in e){return new D.NumericValue(e.string,e.type)}return new D.NumericValue(String(t),"bigDecimal")}if(o.isNumericSchema()&&typeof t==="string"){switch(t){case"Infinity":return Infinity;case"-Infinity":return-Infinity;case"NaN":return NaN}return t}if(o.isDocumentSchema()){if(n){const e=Array.isArray(t)?[]:{};for(const[n,i]of Object.entries(t)){if(i instanceof D.NumericValue){e[n]=i}else{e[n]=this._read(o,i)}}return e}else{return structuredClone(t)}}return t}}const ae=String.fromCharCode(925);class JsonReplacer{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1){throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.")}if(this.stage===2){throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.")}this.stage=1;return(e,t)=>{if(t instanceof D.NumericValue){const e=`${ae+"nv"+this.counter++}_`+t.string;this.values.set(`"${e}"`,t.string);return e}if(typeof t==="bigint"){const e=t.toString();const n=`${ae+"b"+this.counter++}_`+e;this.values.set(`"${n}"`,e);return n}return t}}replaceInJson(e){if(this.stage===0){throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.")}if(this.stage===2){throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.")}this.stage=2;if(this.counter===0){return e}for(const[t,n]of this.values){e=e.replace(t,n)}return e}}class JsonShapeSerializer extends SerdeContextConfig{settings;buffer;useReplacer=false;rootSchema;constructor(e){super();this.settings=e}write(e,t){this.rootSchema=C.NormalizedSchema.of(e);this.buffer=this._write(this.rootSchema,t)}writeDiscriminatedDocument(e,t){this.write(e,t);if(typeof this.buffer==="object"){this.buffer.__type=C.NormalizedSchema.of(e).getName(true)}}flush(){const{rootSchema:e,useReplacer:t}=this;this.rootSchema=undefined;this.useReplacer=false;if(e?.isStructSchema()||e?.isDocumentSchema()){if(!t){return JSON.stringify(this.buffer)}const e=new JsonReplacer;return e.replaceInJson(JSON.stringify(this.buffer,e.createReplacer(),0))}return this.buffer}_write(e,t,n){const o=t!==null&&typeof t==="object";const i=C.NormalizedSchema.of(e);if(o){if(i.isStructSchema()){const e=t;const n={};const{jsonName:o}=this.settings;let c=void 0;if(o){c={}}for(const[t,d]of i.structIterator()){const p=this._write(d,e[t],i);if(p!==undefined){let e=t;if(o){e=d.getMergedTraits().jsonName??t;c[t]=e}n[e]=p}}if(i.isUnionSchema()&&Object.keys(n).length===0){const{$unknown:t}=e;if(Array.isArray(t)){const[e,o]=t;n[e]=this._write(15,o)}}else if(typeof e.__type==="string"){for(const[t,i]of Object.entries(e)){const e=o?c[t]??t:t;if(!(e in n)){n[e]=this._write(15,i)}}}return n}if(Array.isArray(t)&&i.isListSchema()){const e=i.getValueSchema();const n=[];const o=!!i.getMergedTraits().sparse;for(const i of t){if(o||i!=null){n.push(this._write(e,i))}}return n}if(i.isMapSchema()){const e=i.getValueSchema();const n={};const o=!!i.getMergedTraits().sparse;for(const[i,c]of Object.entries(t)){if(o||c!=null){n[i]=this._write(e,c)}}return n}if(t instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema())){if(i===this.rootSchema){return t}return(this.serdeContext?.base64Encoder??k.toBase64)(t)}if(t instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema())){const e=v.determineTimestampFormat(i,this.settings);switch(e){case 5:return t.toISOString().replace(".000Z","Z");case 6:return D.dateToUtcString(t);case 7:return t.getTime()/1e3;default:console.warn("Missing timestamp format, using epoch seconds",t);return t.getTime()/1e3}}if(t instanceof D.NumericValue){this.useReplacer=true}}if(t===null&&n?.isStructSchema()){return void 0}if(i.isStringSchema()){if(typeof t==="undefined"&&i.isIdempotencyToken()){return D.generateIdempotencyToken()}const e=i.getMergedTraits().mediaType;if(t!=null&&e){const n=e==="application/json"||e.endsWith("+json");if(n){return D.LazyJsonString.from(t)}}return t}if(typeof t==="number"&&i.isNumericSchema()){if(Math.abs(t)===Infinity||isNaN(t)){return String(t)}return t}if(typeof t==="string"&&i.isBlobSchema()){if(i===this.rootSchema){return t}return(this.serdeContext?.base64Encoder??k.toBase64)(t)}if(typeof t==="bigint"){this.useReplacer=true}if(i.isDocumentSchema()){if(o){const e=Array.isArray(t)?[]:{};for(const[n,o]of Object.entries(t)){if(o instanceof D.NumericValue){this.useReplacer=true;e[n]=o}else{e[n]=this._write(i,o)}}return e}else{return structuredClone(t)}}return t}}class JsonCodec extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}createSerializer(){const e=new JsonShapeSerializer(this.settings);e.setSerdeContext(this.serdeContext);return e}createDeserializer(){const e=new JsonShapeDeserializer(this.settings);e.setSerdeContext(this.serdeContext);return e}}class AwsJsonRpcProtocol extends v.RpcProtocol{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e});this.serviceTarget=t;this.codec=o??new JsonCodec({timestampFormat:{useTrait:true,default:7},jsonName:false});this.serializer=this.codec.createSerializer();this.deserializer=this.codec.createDeserializer();this.awsQueryCompatible=!!n;this.mixin=new ProtocolLib(this.awsQueryCompatible)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(!o.path.endsWith("/")){o.path+="/"}Object.assign(o.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`});if(this.awsQueryCompatible){o.headers["x-amzn-query-mode"]="true"}if(C.deref(e.input)==="unit"||!o.body){o.body="{}"}return o}getPayloadCodec(){return this.codec}async handleError(e,t,n,o,i){if(this.awsQueryCompatible){this.mixin.setQueryCompatError(o,n)}const c=loadRestJsonErrorCode(n,o)??"Unknown";const{errorSchema:d,errorMetadata:p}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:undefined);const y=C.NormalizedSchema.of(d);const Q=o.message??o.Message??"Unknown";const v=C.TypeRegistry.for(d[1]).getErrorCtor(d)??Error;const D=new v(Q);const k={};for(const[e,t]of y.structIterator()){if(o[e]!=null){k[e]=this.codec.createDeserializer().readObject(t,o[e])}}if(this.awsQueryCompatible){this.mixin.queryCompatOutput(o,k)}throw this.mixin.decorateServiceException(Object.assign(D,p,{$fault:y.getMergedTraits().error,message:Q},k),o)}}class AwsJson1_0Protocol extends AwsJsonRpcProtocol{constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_0"}getJsonRpcVersion(){return"1.0"}getDefaultContentType(){return"application/x-amz-json-1.0"}}class AwsJson1_1Protocol extends AwsJsonRpcProtocol{constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}class AwsRestJsonProtocol extends v.HttpBindingProtocol{serializer;deserializer;codec;mixin=new ProtocolLib;constructor({defaultNamespace:e}){super({defaultNamespace:e});const t={timestampFormat:{useTrait:true,default:7},httpBindings:true,jsonName:true};this.codec=new JsonCodec(t);this.serializer=new v.HttpInterceptingShapeSerializer(this.codec.createSerializer(),t);this.deserializer=new v.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),t)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e);super.setSerdeContext(e)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);const i=C.NormalizedSchema.of(e.input);if(!o.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);if(e){o.headers["content-type"]=e}}if(o.body==null&&o.headers["content-type"]===this.getDefaultContentType()){o.body="{}"}return o}async deserializeResponse(e,t,n){const o=await super.deserializeResponse(e,t,n);const i=C.NormalizedSchema.of(e.output);for(const[e,t]of i.structIterator()){if(t.getMemberTraits().httpPayload&&!(e in o)){o[e]=null}}return o}async handleError(e,t,n,o,i){const c=loadRestJsonErrorCode(n,o)??"Unknown";const{errorSchema:d,errorMetadata:p}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,i);const y=C.NormalizedSchema.of(d);const Q=o.message??o.Message??"Unknown";const v=C.TypeRegistry.for(d[1]).getErrorCtor(d)??Error;const D=new v(Q);await this.deserializeHttpMessage(d,t,n,o);const k={};for(const[e,t]of y.structIterator()){const n=t.getMergedTraits().jsonName??e;k[e]=this.codec.createDeserializer().readObject(t,o[n])}throw this.mixin.decorateServiceException(Object.assign(D,p,{$fault:y.getMergedTraits().error,message:Q},k),o)}getDefaultContentType(){return"application/json"}}const awsExpectUnion=e=>{if(e==null){return undefined}if(typeof e==="object"&&"__type"in e){delete e.__type}return Q.expectUnion(e)};class XmlShapeDeserializer extends SerdeContextConfig{settings;stringDeserializer;constructor(e){super();this.settings=e;this.stringDeserializer=new v.FromStringShapeDeserializer(e)}setSerdeContext(e){this.serdeContext=e;this.stringDeserializer.setSerdeContext(e)}read(e,t,n){const o=C.NormalizedSchema.of(e);const i=o.getMemberSchemas();const c=o.isStructSchema()&&o.isMemberSchema()&&!!Object.values(i).find((e=>!!e.getMemberTraits().eventPayload));if(c){const e={};const n=Object.keys(i)[0];const o=i[n];if(o.isBlobSchema()){e[n]=t}else{e[n]=this.read(i[n],t)}return e}const d=(this.serdeContext?.utf8Encoder??$.toUtf8)(t);const p=this.parseXml(d);return this.readSchema(e,n?p[n]:p)}readSchema(e,t){const n=C.NormalizedSchema.of(e);if(n.isUnitSchema()){return}const o=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(t)){return this.readSchema(n,[t])}if(t==null){return t}if(typeof t==="object"){const e=!!o.sparse;const i=!!o.xmlFlattened;if(n.isListSchema()){const o=n.getValueSchema();const c=[];const d=o.getMergedTraits().xmlName??"member";const p=i?t:(t[0]??t)[d];const y=Array.isArray(p)?p:[p];for(const t of y){if(t!=null||e){c.push(this.readSchema(o,t))}}return c}const c={};if(n.isMapSchema()){const o=n.getKeySchema();const d=n.getValueSchema();let p;if(i){p=Array.isArray(t)?t:[t]}else{p=Array.isArray(t.entry)?t.entry:[t.entry]}const y=o.getMergedTraits().xmlName??"key";const C=d.getMergedTraits().xmlName??"value";for(const t of p){const n=t[y];const o=t[C];if(o!=null||e){c[n]=this.readSchema(d,o)}}return c}if(n.isStructSchema()){const e=n.isUnionSchema();let o;if(e){o=new UnionSerde(t,c)}for(const[i,d]of n.structIterator()){const n=d.getMergedTraits();const p=!n.httpPayload?d.getMemberTraits().xmlName??i:n.xmlName??d.getName();if(e){o.mark(p)}if(t[p]!=null){c[i]=this.readSchema(d,t[p])}}if(e){o.writeUnknown()}return c}if(n.isDocumentSchema()){return t}throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(true)}`)}if(n.isListSchema()){return[]}if(n.isMapSchema()||n.isStructSchema()){return{}}return this.stringDeserializer.read(n,t)}parseXml(e){if(e.length){let t;try{t=V.parseXML(e)}catch(t){if(t&&typeof t==="object"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}const n="#text";const o=Object.keys(t)[0];const i=t[o];if(i[n]){i[o]=i[n];delete i[n]}return Q.getValueFromTextNode(i)}return{}}}class QueryShapeSerializer extends SerdeContextConfig{settings;buffer;constructor(e){super();this.settings=e}write(e,t,n=""){if(this.buffer===undefined){this.buffer=""}const o=C.NormalizedSchema.of(e);if(n&&!n.endsWith(".")){n+="."}if(o.isBlobSchema()){if(typeof t==="string"||t instanceof Uint8Array){this.writeKey(n);this.writeValue((this.serdeContext?.base64Encoder??k.toBase64)(t))}}else if(o.isBooleanSchema()||o.isNumericSchema()||o.isStringSchema()){if(t!=null){this.writeKey(n);this.writeValue(String(t))}else if(o.isIdempotencyToken()){this.writeKey(n);this.writeValue(D.generateIdempotencyToken())}}else if(o.isBigIntegerSchema()){if(t!=null){this.writeKey(n);this.writeValue(String(t))}}else if(o.isBigDecimalSchema()){if(t!=null){this.writeKey(n);this.writeValue(t instanceof D.NumericValue?t.string:String(t))}}else if(o.isTimestampSchema()){if(t instanceof Date){this.writeKey(n);const e=v.determineTimestampFormat(o,this.settings);switch(e){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(Q.dateToUtcString(t));break;case 7:this.writeValue(String(t.getTime()/1e3));break}}}else if(o.isDocumentSchema()){if(Array.isArray(t)){this.write(64|15,t,n)}else if(t instanceof Date){this.write(4,t,n)}else if(t instanceof Uint8Array){this.write(21,t,n)}else if(t&&typeof t==="object"){this.write(128|15,t,n)}else{this.writeKey(n);this.writeValue(String(t))}}else if(o.isListSchema()){if(Array.isArray(t)){if(t.length===0){if(this.settings.serializeEmptyLists){this.writeKey(n);this.writeValue("")}}else{const e=o.getValueSchema();const i=this.settings.flattenLists||o.getMergedTraits().xmlFlattened;let c=1;for(const o of t){if(o==null){continue}const t=e.getMergedTraits();const d=this.getKey("member",t.xmlName,t.ec2QueryName);const p=i?`${n}${c}`:`${n}${d}.${c}`;this.write(e,o,p);++c}}}}else if(o.isMapSchema()){if(t&&typeof t==="object"){const e=o.getKeySchema();const i=o.getValueSchema();const c=o.getMergedTraits().xmlFlattened;let d=1;for(const[o,p]of Object.entries(t)){if(p==null){continue}const t=e.getMergedTraits();const y=this.getKey("key",t.xmlName,t.ec2QueryName);const C=c?`${n}${d}.${y}`:`${n}entry.${d}.${y}`;const Q=i.getMergedTraits();const v=this.getKey("value",Q.xmlName,Q.ec2QueryName);const D=c?`${n}${d}.${v}`:`${n}entry.${d}.${v}`;this.write(e,o,C);this.write(i,p,D);++d}}}else if(o.isStructSchema()){if(t&&typeof t==="object"){let e=false;for(const[i,c]of o.structIterator()){if(t[i]==null&&!c.isIdempotencyToken()){continue}const o=c.getMergedTraits();const d=this.getKey(i,o.xmlName,o.ec2QueryName,"struct");const p=`${n}${d}`;this.write(c,t[i],p);e=true}if(!e&&o.isUnionSchema()){const{$unknown:e}=t;if(Array.isArray(e)){const[t,o]=e;const i=`${n}${t}`;this.write(15,o,i)}}}}else if(o.isUnitSchema());else{throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${o.getName(true)}`)}}flush(){if(this.buffer===undefined){throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.")}const e=this.buffer;delete this.buffer;return e}getKey(e,t,n,o){const{ec2:i,capitalizeKeys:c}=this.settings;if(i&&n){return n}const d=t??e;if(c&&o==="struct"){return d[0].toUpperCase()+d.slice(1)}return d}writeKey(e){if(e.endsWith(".")){e=e.slice(0,e.length-1)}this.buffer+=`&${v.extendedEncodeURIComponent(e)}=`}writeValue(e){this.buffer+=v.extendedEncodeURIComponent(e)}}class AwsQueryProtocol extends v.RpcProtocol{options;serializer;deserializer;mixin=new ProtocolLib;constructor(e){super({defaultNamespace:e.defaultNamespace});this.options=e;const t={timestampFormat:{useTrait:true,default:5},httpBindings:false,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:true};this.serializer=new QueryShapeSerializer(t);this.deserializer=new XmlShapeDeserializer(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e);this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(!o.path.endsWith("/")){o.path+="/"}Object.assign(o.headers,{"content-type":`application/x-www-form-urlencoded`});if(C.deref(e.input)==="unit"||!o.body){o.body=""}const i=e.name.split("#")[1]??e.name;o.body=`Action=${i}&Version=${this.options.version}`+o.body;if(o.body.endsWith("&")){o.body=o.body.slice(-1)}return o}async deserializeResponse(e,t,n){const o=this.deserializer;const i=C.NormalizedSchema.of(e.output);const c={};if(n.statusCode>=300){const i=await v.collectBody(n.body,t);if(i.byteLength>0){Object.assign(c,await o.read(15,i))}await this.handleError(e,t,n,c,this.deserializeMetadata(n))}for(const e in n.headers){const t=n.headers[e];delete n.headers[e];n.headers[e.toLowerCase()]=t}const d=e.name.split("#")[1]??e.name;const p=i.isStructSchema()&&this.useNestedResult()?d+"Result":undefined;const y=await v.collectBody(n.body,t);if(y.byteLength>0){Object.assign(c,await o.read(i,y,p))}const Q={$metadata:this.deserializeMetadata(n),...c};return Q}useNestedResult(){return true}async handleError(e,t,n,o,i){const c=this.loadQueryErrorCode(n,o)??"Unknown";const d=this.loadQueryError(o)??{};const p=this.loadQueryErrorMessage(o);d.message=p;d.Error={Type:d.Type,Code:d.Code,Message:p};const{errorSchema:y,errorMetadata:Q}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,d,i,this.mixin.findQueryCompatibleError);const v=C.NormalizedSchema.of(y);const D=C.TypeRegistry.for(y[1]).getErrorCtor(y)??Error;const k=new D(p);const $={Type:d.Error.Type,Code:d.Error.Code,Error:d.Error};for(const[e,t]of v.structIterator()){const n=t.getMergedTraits().xmlName??e;const i=d[n]??o[n];$[e]=this.deserializer.readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(k,Q,{$fault:v.getMergedTraits().error,message:p},$),o)}loadQueryErrorCode(e,t){const n=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;if(n!==undefined){return n}if(e.statusCode==404){return"NotFound"}}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}class AwsEc2QueryProtocol extends AwsQueryProtocol{options;constructor(e){super(e);this.options=e;const t={capitalizeKeys:true,flattenLists:true,serializeEmptyLists:false,ec2:true};Object.assign(this.serializer.settings,t)}useNestedResult(){return false}}const parseXmlBody=(e,t)=>collectBodyString(e,t).then((e=>{if(e.length){let t;try{t=V.parseXML(e)}catch(t){if(t&&typeof t==="object"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}const n="#text";const o=Object.keys(t)[0];const i=t[o];if(i[n]){i[o]=i[n];delete i[n]}return Q.getValueFromTextNode(i)}return{}}));const parseXmlErrorBody=async(e,t)=>{const n=await parseXmlBody(e,t);if(n.Error){n.Error.message=n.Error.message??n.Error.Message}return n};const loadRestXmlErrorCode=(e,t)=>{if(t?.Error?.Code!==undefined){return t.Error.Code}if(t?.Code!==undefined){return t.Code}if(e.statusCode==404){return"NotFound"}};class XmlShapeSerializer extends SerdeContextConfig{settings;stringBuffer;byteBuffer;buffer;constructor(e){super();this.settings=e}write(e,t){const n=C.NormalizedSchema.of(e);if(n.isStringSchema()&&typeof t==="string"){this.stringBuffer=t}else if(n.isBlobSchema()){this.byteBuffer="byteLength"in t?t:(this.serdeContext?.base64Decoder??k.fromBase64)(t)}else{this.buffer=this.writeStruct(n,t,undefined);const e=n.getMergedTraits();if(e.httpPayload&&!e.xmlName){this.buffer.withName(n.getName())}}}flush(){if(this.byteBuffer!==undefined){const e=this.byteBuffer;delete this.byteBuffer;return e}if(this.stringBuffer!==undefined){const e=this.stringBuffer;delete this.stringBuffer;return e}const e=this.buffer;if(this.settings.xmlNamespace){if(!e?.attributes?.["xmlns"]){e.addAttribute("xmlns",this.settings.xmlNamespace)}}delete this.buffer;return e.toString()}writeStruct(e,t,n){const o=e.getMergedTraits();const i=e.isMemberSchema()&&!o.httpPayload?e.getMemberTraits().xmlName??e.getMemberName():o.xmlName??e.getName();if(!i||!e.isStructSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${e.getName(true)}.`)}const c=V.XmlNode.of(i);const[d,p]=this.getXmlnsAttribute(e,n);for(const[n,o]of e.structIterator()){const e=t[n];if(e!=null||o.isIdempotencyToken()){if(o.getMergedTraits().xmlAttribute){c.addAttribute(o.getMergedTraits().xmlName??n,this.writeSimple(o,e));continue}if(o.isListSchema()){this.writeList(o,e,c,p)}else if(o.isMapSchema()){this.writeMap(o,e,c,p)}else if(o.isStructSchema()){c.addChildNode(this.writeStruct(o,e,p))}else{const t=V.XmlNode.of(o.getMergedTraits().xmlName??o.getMemberName());this.writeSimpleInto(o,e,t,p);c.addChildNode(t)}}}const{$unknown:y}=t;if(y&&e.isUnionSchema()&&Array.isArray(y)&&Object.keys(t).length===1){const[e,n]=y;const o=V.XmlNode.of(e);if(typeof n!=="string"){if(t instanceof V.XmlNode||t instanceof V.XmlText){c.addChildNode(t)}else{throw new Error(`@aws-sdk - $unknown union member in XML requires `+`value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`)}}this.writeSimpleInto(0,n,o,p);c.addChildNode(o)}if(p){c.addAttribute(d,p)}return c}writeList(e,t,n,o){if(!e.isMemberSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${e.getName(true)}`)}const i=e.getMergedTraits();const c=e.getValueSchema();const d=c.getMergedTraits();const p=!!d.sparse;const y=!!i.xmlFlattened;const[C,Q]=this.getXmlnsAttribute(e,o);const writeItem=(t,n)=>{if(c.isListSchema()){this.writeList(c,Array.isArray(n)?n:[n],t,Q)}else if(c.isMapSchema()){this.writeMap(c,n,t,Q)}else if(c.isStructSchema()){const o=this.writeStruct(c,n,Q);t.addChildNode(o.withName(y?i.xmlName??e.getMemberName():d.xmlName??"member"))}else{const o=V.XmlNode.of(y?i.xmlName??e.getMemberName():d.xmlName??"member");this.writeSimpleInto(c,n,o,Q);t.addChildNode(o)}};if(y){for(const e of t){if(p||e!=null){writeItem(n,e)}}}else{const o=V.XmlNode.of(i.xmlName??e.getMemberName());if(Q){o.addAttribute(C,Q)}for(const e of t){if(p||e!=null){writeItem(o,e)}}n.addChildNode(o)}}writeMap(e,t,n,o,i=false){if(!e.isMemberSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${e.getName(true)}`)}const c=e.getMergedTraits();const d=e.getKeySchema();const p=d.getMergedTraits();const y=p.xmlName??"key";const C=e.getValueSchema();const Q=C.getMergedTraits();const v=Q.xmlName??"value";const D=!!Q.sparse;const k=!!c.xmlFlattened;const[$,ee]=this.getXmlnsAttribute(e,o);const addKeyValue=(e,t,n)=>{const o=V.XmlNode.of(y,t);const[i,c]=this.getXmlnsAttribute(d,ee);if(c){o.addAttribute(i,c)}e.addChildNode(o);let p=V.XmlNode.of(v);if(C.isListSchema()){this.writeList(C,n,p,ee)}else if(C.isMapSchema()){this.writeMap(C,n,p,ee,true)}else if(C.isStructSchema()){p=this.writeStruct(C,n,ee)}else{this.writeSimpleInto(C,n,p,ee)}e.addChildNode(p)};if(k){for(const[o,i]of Object.entries(t)){if(D||i!=null){const t=V.XmlNode.of(c.xmlName??e.getMemberName());addKeyValue(t,o,i);n.addChildNode(t)}}}else{let o;if(!i){o=V.XmlNode.of(c.xmlName??e.getMemberName());if(ee){o.addAttribute($,ee)}n.addChildNode(o)}for(const[e,c]of Object.entries(t)){if(D||c!=null){const t=V.XmlNode.of("entry");addKeyValue(t,e,c);(i?n:o).addChildNode(t)}}}}writeSimple(e,t){if(null===t){throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.")}const n=C.NormalizedSchema.of(e);let o=null;if(t&&typeof t==="object"){if(n.isBlobSchema()){o=(this.serdeContext?.base64Encoder??k.toBase64)(t)}else if(n.isTimestampSchema()&&t instanceof Date){const e=v.determineTimestampFormat(n,this.settings);switch(e){case 5:o=t.toISOString().replace(".000Z","Z");break;case 6:o=Q.dateToUtcString(t);break;case 7:o=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",t);o=Q.dateToUtcString(t);break}}else if(n.isBigDecimalSchema()&&t){if(t instanceof D.NumericValue){return t.string}return String(t)}else if(n.isMapSchema()||n.isListSchema()){throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.")}else{throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${n.getName(true)}`)}}if(n.isBooleanSchema()||n.isNumericSchema()||n.isBigIntegerSchema()||n.isBigDecimalSchema()){o=String(t)}if(n.isStringSchema()){if(t===undefined&&n.isIdempotencyToken()){o=D.generateIdempotencyToken()}else{o=String(t)}}if(o===null){throw new Error(`Unhandled schema-value pair ${n.getName(true)}=${t}`)}return o}writeSimpleInto(e,t,n,o){const i=this.writeSimple(e,t);const c=C.NormalizedSchema.of(e);const d=new V.XmlText(i);const[p,y]=this.getXmlnsAttribute(c,o);if(y){n.addAttribute(p,y)}n.addChildNode(d)}getXmlnsAttribute(e,t){const n=e.getMergedTraits();const[o,i]=n.xmlNamespace??[];if(i&&i!==t){return[o?`xmlns:${o}`:"xmlns",i]}return[void 0,void 0]}}class XmlCodec extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}createSerializer(){const e=new XmlShapeSerializer(this.settings);e.setSerdeContext(this.serdeContext);return e}createDeserializer(){const e=new XmlShapeDeserializer(this.settings);e.setSerdeContext(this.serdeContext);return e}}class AwsRestXmlProtocol extends v.HttpBindingProtocol{codec;serializer;deserializer;mixin=new ProtocolLib;constructor(e){super(e);const t={timestampFormat:{useTrait:true,default:5},httpBindings:true,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace};this.codec=new XmlCodec(t);this.serializer=new v.HttpInterceptingShapeSerializer(this.codec.createSerializer(),t);this.deserializer=new v.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),t)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);const i=C.NormalizedSchema.of(e.input);if(!o.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);if(e){o.headers["content-type"]=e}}if(typeof o.body==="string"&&o.headers["content-type"]===this.getDefaultContentType()&&!o.body.startsWith("'+o.body}return o}async deserializeResponse(e,t,n){return super.deserializeResponse(e,t,n)}async handleError(e,t,n,o,i){const c=loadRestXmlErrorCode(n,o)??"Unknown";if(o.Error&&typeof o.Error==="object"){for(const e of Object.keys(o.Error)){o[e]=o.Error[e];if(e.toLowerCase()==="message"){o.message=o.Error[e]}}}if(o.RequestId&&!i.requestId){i.requestId=o.RequestId}const{errorSchema:d,errorMetadata:p}=await this.mixin.getErrorSchemaOrThrowBaseException(c,this.options.defaultNamespace,n,o,i);const y=C.NormalizedSchema.of(d);const Q=o.Error?.message??o.Error?.Message??o.message??o.Message??"Unknown";const v=C.TypeRegistry.for(d[1]).getErrorCtor(d)??Error;const D=new v(Q);await this.deserializeHttpMessage(d,t,n,o);const k={};for(const[e,t]of y.structIterator()){const n=t.getMergedTraits().xmlName??e;const i=o.Error?.[n]??o[n];k[e]=this.codec.createDeserializer().readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(D,p,{$fault:y.getMergedTraits().error,message:Q},k),o)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(e){for(const[,t]of e.structIterator()){if(t.getMergedTraits().httpPayload){return!(t.isStructSchema()||t.isMapSchema()||t.isListSchema())}}return false}}t.AWSSDKSigV4Signer=te;t.AwsEc2QueryProtocol=AwsEc2QueryProtocol;t.AwsJson1_0Protocol=AwsJson1_0Protocol;t.AwsJson1_1Protocol=AwsJson1_1Protocol;t.AwsJsonRpcProtocol=AwsJsonRpcProtocol;t.AwsQueryProtocol=AwsQueryProtocol;t.AwsRestJsonProtocol=AwsRestJsonProtocol;t.AwsRestXmlProtocol=AwsRestXmlProtocol;t.AwsSdkSigV4ASigner=AwsSdkSigV4ASigner;t.AwsSdkSigV4Signer=AwsSdkSigV4Signer;t.AwsSmithyRpcV2CborProtocol=AwsSmithyRpcV2CborProtocol;t.JsonCodec=JsonCodec;t.JsonShapeDeserializer=JsonShapeDeserializer;t.JsonShapeSerializer=JsonShapeSerializer;t.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS=se;t.NODE_SIGV4A_CONFIG_OPTIONS=oe;t.XmlCodec=XmlCodec;t.XmlShapeDeserializer=XmlShapeDeserializer;t.XmlShapeSerializer=XmlShapeSerializer;t._toBool=_toBool;t._toNum=_toNum;t._toStr=_toStr;t.awsExpectUnion=awsExpectUnion;t.emitWarningIfUnsupportedVersion=emitWarningIfUnsupportedVersion;t.getBearerTokenEnvKey=getBearerTokenEnvKey;t.loadRestJsonErrorCode=loadRestJsonErrorCode;t.loadRestXmlErrorCode=loadRestXmlErrorCode;t.parseJsonBody=parseJsonBody;t.parseJsonErrorBody=parseJsonErrorBody;t.parseXmlBody=parseXmlBody;t.parseXmlErrorBody=parseXmlErrorBody;t.resolveAWSSDKSigV4Config=ie;t.resolveAwsSdkSigV4AConfig=resolveAwsSdkSigV4AConfig;t.resolveAwsSdkSigV4Config=resolveAwsSdkSigV4Config;t.setCredentialFeature=setCredentialFeature;t.setFeature=setFeature;t.setTokenFeature=setTokenFeature;t.state=ee;t.validateSigningProperties=validateSigningProperties},5152:(e,t)=>{const n={warningEmitted:false};const emitWarningIfUnsupportedVersion=e=>{if(e&&!n.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<20){n.warningEmitted=true;process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js ${e} in January 2026.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/c895JFp`)}};function setCredentialFeature(e,t,n){if(!e.$source){e.$source={}}e.$source[t]=n;return e}function setFeature(e,t,n){if(!e.__aws_sdk_context){e.__aws_sdk_context={features:{}}}else if(!e.__aws_sdk_context.features){e.__aws_sdk_context.features={}}e.__aws_sdk_context.features[t]=n}function setTokenFeature(e,t,n){if(!e.$source){e.$source={}}e.$source[t]=n;return e}t.emitWarningIfUnsupportedVersion=emitWarningIfUnsupportedVersion;t.setCredentialFeature=setCredentialFeature;t.setFeature=setFeature;t.setTokenFeature=setTokenFeature;t.state=n},7288:(e,t,n)=>{var o=n(4645);var i=n(6890);var c=n(1411);var d=n(3422);var p=n(2430);var y=n(8385);var C=n(1577);var Q=n(4274);class ProtocolLib{queryCompat;constructor(e=false){this.queryCompat=e}resolveRestContentType(e,t){const n=t.getMemberSchemas();const o=Object.values(n).find((e=>!!e.getMergedTraits().httpPayload));if(o){const t=o.getMergedTraits().mediaType;if(t){return t}else if(o.isStringSchema()){return"text/plain"}else if(o.isBlobSchema()){return"application/octet-stream"}else{return e}}else if(!t.isUnitSchema()){const t=Object.values(n).find((e=>{const{httpQuery:t,httpQueryParams:n,httpHeader:o,httpLabel:i,httpPrefixHeaders:c}=e.getMergedTraits();const d=c===void 0;return!t&&!n&&!o&&!i&&d}));if(t){return e}}}async getErrorSchemaOrThrowBaseException(e,t,n,o,c,d){let p=t;let y=e;if(e.includes("#")){[p,y]=e.split("#")}const C={$metadata:c,$fault:n.statusCode<500?"client":"server"};const Q=i.TypeRegistry.for(p);try{const t=d?.(Q,y)??Q.getSchema(e);return{errorSchema:t,errorMetadata:C}}catch(e){o.message=o.message??o.Message??"UnknownError";const t=i.TypeRegistry.for("smithy.ts.sdk.synthetic."+p);const n=t.getBaseException();if(n){const e=t.getErrorCtor(n)??Error;throw this.decorateServiceException(Object.assign(new e({name:y}),C),o)}throw this.decorateServiceException(Object.assign(new Error(y),C),o)}}decorateServiceException(e,t={}){if(this.queryCompat){const n=e.Message??t.Message;const o=c.decorateServiceException(e,t);if(n){o.message=n}o.Error={...o.Error,Type:o.Error?.Type,Code:o.Error?.Code,Message:o.Error?.message??o.Error?.Message??n};const i=o.$metadata.requestId;if(i){o.RequestId=i}return o}return c.decorateServiceException(e,t)}setQueryCompatError(e,t){const n=t.headers?.["x-amzn-query-error"];if(e!==undefined&&n!=null){const[t,o]=n.split(";");const i=Object.entries(e);const c={Code:t,Type:o};Object.assign(e,c);for(const[e,t]of i){c[e==="message"?"Message":e]=t}delete c.__type;e.Error=c}}queryCompatOutput(e,t){if(e.Error){t.Error=e.Error}if(e.Type){t.Type=e.Type}if(e.Code){t.Code=e.Code}}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch(n){return e.find((e=>i.NormalizedSchema.of(e).getMergedTraits().awsQueryError?.[0]===t))}}}class AwsSmithyRpcV2CborProtocol extends o.SmithyRpcV2CborProtocol{awsQueryCompatible;mixin;constructor({defaultNamespace:e,awsQueryCompatible:t}){super({defaultNamespace:e});this.awsQueryCompatible=!!t;this.mixin=new ProtocolLib(this.awsQueryCompatible)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(this.awsQueryCompatible){o.headers["x-amzn-query-mode"]="true"}return o}async handleError(e,t,n,c,d){if(this.awsQueryCompatible){this.mixin.setQueryCompatError(c,n)}const p=(()=>{const e=n.headers["x-amzn-query-error"];if(e&&this.awsQueryCompatible){return e.split(";")[0]}return o.loadSmithyRpcV2CborErrorCode(n,c)??"Unknown"})();const{errorSchema:y,errorMetadata:C}=await this.mixin.getErrorSchemaOrThrowBaseException(p,this.options.defaultNamespace,n,c,d,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:undefined);const Q=i.NormalizedSchema.of(y);const v=c.message??c.Message??"Unknown";const D=i.TypeRegistry.for(y[1]).getErrorCtor(y)??Error;const k=new D(v);const $={};for(const[e,t]of Q.structIterator()){if(c[e]!=null){$[e]=this.deserializer.readValue(t,c[e])}}if(this.awsQueryCompatible){this.mixin.queryCompatOutput(c,$)}throw this.mixin.decorateServiceException(Object.assign(k,C,{$fault:Q.getMergedTraits().error,message:v},$),c)}}const _toStr=e=>{if(e==null){return e}if(typeof e==="number"||typeof e==="bigint"){const t=new Error(`Received number ${e} where a string was expected.`);t.name="Warning";console.warn(t);return String(e)}if(typeof e==="boolean"){const t=new Error(`Received boolean ${e} where a string was expected.`);t.name="Warning";console.warn(t);return String(e)}return e};const _toBool=e=>{if(e==null){return e}if(typeof e==="string"){const t=e.toLowerCase();if(e!==""&&t!=="false"&&t!=="true"){const t=new Error(`Received string "${e}" where a boolean was expected.`);t.name="Warning";console.warn(t)}return e!==""&&t!=="false"}return e};const _toNum=e=>{if(e==null){return e}if(typeof e==="string"){const t=Number(e);if(t.toString()!==e){const t=new Error(`Received string "${e}" where a number was expected.`);t.name="Warning";console.warn(t);return e}return t}return e};class SerdeContextConfig{serdeContext;setSerdeContext(e){this.serdeContext=e}}class UnionSerde{from;to;keys;constructor(e,t){this.from=e;this.to=t;this.keys=new Set(Object.keys(this.from).filter((e=>e!=="__type")))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value;const t=this.from[e];this.to.$unknown=[e,t]}}}function jsonReviver(e,t,n){if(n?.source){const e=n.source;if(typeof t==="number"){if(t>Number.MAX_SAFE_INTEGER||tc.collectBody(e,t).then((e=>(t?.utf8Encoder??C.toUtf8)(e)));const parseJsonBody=(e,t)=>collectBodyString(e,t).then((e=>{if(e.length){try{return JSON.parse(e)}catch(t){if(t?.name==="SyntaxError"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}}return{}}));const parseJsonErrorBody=async(e,t)=>{const n=await parseJsonBody(e,t);n.message=n.message??n.Message;return n};const loadRestJsonErrorCode=(e,t)=>{const findKey=(e,t)=>Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase()));const sanitizeErrorCode=e=>{let t=e;if(typeof t==="number"){t=t.toString()}if(t.indexOf(",")>=0){t=t.split(",")[0]}if(t.indexOf(":")>=0){t=t.split(":")[0]}if(t.indexOf("#")>=0){t=t.split("#")[1]}return t};const n=findKey(e.headers,"x-amzn-errortype");if(n!==undefined){return sanitizeErrorCode(e.headers[n])}if(t&&typeof t==="object"){const e=findKey(t,"code");if(e&&t[e]!==undefined){return sanitizeErrorCode(t[e])}if(t["__type"]!==undefined){return sanitizeErrorCode(t["__type"])}}};class JsonShapeDeserializer extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}async read(e,t){return this._read(e,typeof t==="string"?JSON.parse(t,jsonReviver):await parseJsonBody(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){const n=t!==null&&typeof t==="object";const o=i.NormalizedSchema.of(e);if(n){if(o.isStructSchema()){const e=t;const n=o.isUnionSchema();const i={};let c=void 0;const{jsonName:d}=this.settings;if(d){c={}}let p;if(n){p=new UnionSerde(e,i)}for(const[t,y]of o.structIterator()){let o=t;if(d){o=y.getMergedTraits().jsonName??o;c[o]=t}if(n){p.mark(o)}if(e[o]!=null){i[t]=this._read(y,e[o])}}if(n){p.writeUnknown()}else if(typeof e.__type==="string"){for(const[t,n]of Object.entries(e)){const e=d?c[t]??t:t;if(!(e in i)){i[e]=n}}}return i}if(Array.isArray(t)&&o.isListSchema()){const e=o.getValueSchema();const n=[];const i=!!o.getMergedTraits().sparse;for(const o of t){if(i||o!=null){n.push(this._read(e,o))}}return n}if(o.isMapSchema()){const e=o.getValueSchema();const n={};const i=!!o.getMergedTraits().sparse;for(const[o,c]of Object.entries(t)){if(i||c!=null){n[o]=this._read(e,c)}}return n}}if(o.isBlobSchema()&&typeof t==="string"){return y.fromBase64(t)}const c=o.getMergedTraits().mediaType;if(o.isStringSchema()&&typeof t==="string"&&c){const e=c==="application/json"||c.endsWith("+json");if(e){return p.LazyJsonString.from(t)}return t}if(o.isTimestampSchema()&&t!=null){const e=d.determineTimestampFormat(o,this.settings);switch(e){case 5:return p.parseRfc3339DateTimeWithOffset(t);case 6:return p.parseRfc7231DateTime(t);case 7:return p.parseEpochTimestamp(t);default:console.warn("Missing timestamp format, parsing value with Date constructor:",t);return new Date(t)}}if(o.isBigIntegerSchema()&&(typeof t==="number"||typeof t==="string")){return BigInt(t)}if(o.isBigDecimalSchema()&&t!=undefined){if(t instanceof p.NumericValue){return t}const e=t;if(e.type==="bigDecimal"&&"string"in e){return new p.NumericValue(e.string,e.type)}return new p.NumericValue(String(t),"bigDecimal")}if(o.isNumericSchema()&&typeof t==="string"){switch(t){case"Infinity":return Infinity;case"-Infinity":return-Infinity;case"NaN":return NaN}return t}if(o.isDocumentSchema()){if(n){const e=Array.isArray(t)?[]:{};for(const[n,i]of Object.entries(t)){if(i instanceof p.NumericValue){e[n]=i}else{e[n]=this._read(o,i)}}return e}else{return structuredClone(t)}}return t}}const v=String.fromCharCode(925);class JsonReplacer{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1){throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.")}if(this.stage===2){throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.")}this.stage=1;return(e,t)=>{if(t instanceof p.NumericValue){const e=`${v+"nv"+this.counter++}_`+t.string;this.values.set(`"${e}"`,t.string);return e}if(typeof t==="bigint"){const e=t.toString();const n=`${v+"b"+this.counter++}_`+e;this.values.set(`"${n}"`,e);return n}return t}}replaceInJson(e){if(this.stage===0){throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.")}if(this.stage===2){throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.")}this.stage=2;if(this.counter===0){return e}for(const[t,n]of this.values){e=e.replace(t,n)}return e}}class JsonShapeSerializer extends SerdeContextConfig{settings;buffer;useReplacer=false;rootSchema;constructor(e){super();this.settings=e}write(e,t){this.rootSchema=i.NormalizedSchema.of(e);this.buffer=this._write(this.rootSchema,t)}writeDiscriminatedDocument(e,t){this.write(e,t);if(typeof this.buffer==="object"){this.buffer.__type=i.NormalizedSchema.of(e).getName(true)}}flush(){const{rootSchema:e,useReplacer:t}=this;this.rootSchema=undefined;this.useReplacer=false;if(e?.isStructSchema()||e?.isDocumentSchema()){if(!t){return JSON.stringify(this.buffer)}const e=new JsonReplacer;return e.replaceInJson(JSON.stringify(this.buffer,e.createReplacer(),0))}return this.buffer}_write(e,t,n){const o=t!==null&&typeof t==="object";const c=i.NormalizedSchema.of(e);if(o){if(c.isStructSchema()){const e=t;const n={};const{jsonName:o}=this.settings;let i=void 0;if(o){i={}}for(const[t,d]of c.structIterator()){const p=this._write(d,e[t],c);if(p!==undefined){let e=t;if(o){e=d.getMergedTraits().jsonName??t;i[t]=e}n[e]=p}}if(c.isUnionSchema()&&Object.keys(n).length===0){const{$unknown:t}=e;if(Array.isArray(t)){const[e,o]=t;n[e]=this._write(15,o)}}else if(typeof e.__type==="string"){for(const[t,c]of Object.entries(e)){const e=o?i[t]??t:t;if(!(e in n)){n[e]=this._write(15,c)}}}return n}if(Array.isArray(t)&&c.isListSchema()){const e=c.getValueSchema();const n=[];const o=!!c.getMergedTraits().sparse;for(const i of t){if(o||i!=null){n.push(this._write(e,i))}}return n}if(c.isMapSchema()){const e=c.getValueSchema();const n={};const o=!!c.getMergedTraits().sparse;for(const[i,c]of Object.entries(t)){if(o||c!=null){n[i]=this._write(e,c)}}return n}if(t instanceof Uint8Array&&(c.isBlobSchema()||c.isDocumentSchema())){if(c===this.rootSchema){return t}return(this.serdeContext?.base64Encoder??y.toBase64)(t)}if(t instanceof Date&&(c.isTimestampSchema()||c.isDocumentSchema())){const e=d.determineTimestampFormat(c,this.settings);switch(e){case 5:return t.toISOString().replace(".000Z","Z");case 6:return p.dateToUtcString(t);case 7:return t.getTime()/1e3;default:console.warn("Missing timestamp format, using epoch seconds",t);return t.getTime()/1e3}}if(t instanceof p.NumericValue){this.useReplacer=true}}if(t===null&&n?.isStructSchema()){return void 0}if(c.isStringSchema()){if(typeof t==="undefined"&&c.isIdempotencyToken()){return p.generateIdempotencyToken()}const e=c.getMergedTraits().mediaType;if(t!=null&&e){const n=e==="application/json"||e.endsWith("+json");if(n){return p.LazyJsonString.from(t)}}return t}if(typeof t==="number"&&c.isNumericSchema()){if(Math.abs(t)===Infinity||isNaN(t)){return String(t)}return t}if(typeof t==="string"&&c.isBlobSchema()){if(c===this.rootSchema){return t}return(this.serdeContext?.base64Encoder??y.toBase64)(t)}if(typeof t==="bigint"){this.useReplacer=true}if(c.isDocumentSchema()){if(o){const e=Array.isArray(t)?[]:{};for(const[n,o]of Object.entries(t)){if(o instanceof p.NumericValue){this.useReplacer=true;e[n]=o}else{e[n]=this._write(c,o)}}return e}else{return structuredClone(t)}}return t}}class JsonCodec extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}createSerializer(){const e=new JsonShapeSerializer(this.settings);e.setSerdeContext(this.serdeContext);return e}createDeserializer(){const e=new JsonShapeDeserializer(this.settings);e.setSerdeContext(this.serdeContext);return e}}class AwsJsonRpcProtocol extends d.RpcProtocol{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e});this.serviceTarget=t;this.codec=o??new JsonCodec({timestampFormat:{useTrait:true,default:7},jsonName:false});this.serializer=this.codec.createSerializer();this.deserializer=this.codec.createDeserializer();this.awsQueryCompatible=!!n;this.mixin=new ProtocolLib(this.awsQueryCompatible)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(!o.path.endsWith("/")){o.path+="/"}Object.assign(o.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`});if(this.awsQueryCompatible){o.headers["x-amzn-query-mode"]="true"}if(i.deref(e.input)==="unit"||!o.body){o.body="{}"}return o}getPayloadCodec(){return this.codec}async handleError(e,t,n,o,c){if(this.awsQueryCompatible){this.mixin.setQueryCompatError(o,n)}const d=loadRestJsonErrorCode(n,o)??"Unknown";const{errorSchema:p,errorMetadata:y}=await this.mixin.getErrorSchemaOrThrowBaseException(d,this.options.defaultNamespace,n,o,c,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:undefined);const C=i.NormalizedSchema.of(p);const Q=o.message??o.Message??"Unknown";const v=i.TypeRegistry.for(p[1]).getErrorCtor(p)??Error;const D=new v(Q);const k={};for(const[e,t]of C.structIterator()){if(o[e]!=null){k[e]=this.codec.createDeserializer().readObject(t,o[e])}}if(this.awsQueryCompatible){this.mixin.queryCompatOutput(o,k)}throw this.mixin.decorateServiceException(Object.assign(D,y,{$fault:C.getMergedTraits().error,message:Q},k),o)}}class AwsJson1_0Protocol extends AwsJsonRpcProtocol{constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_0"}getJsonRpcVersion(){return"1.0"}getDefaultContentType(){return"application/x-amz-json-1.0"}}class AwsJson1_1Protocol extends AwsJsonRpcProtocol{constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o}){super({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:o})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}class AwsRestJsonProtocol extends d.HttpBindingProtocol{serializer;deserializer;codec;mixin=new ProtocolLib;constructor({defaultNamespace:e}){super({defaultNamespace:e});const t={timestampFormat:{useTrait:true,default:7},httpBindings:true,jsonName:true};this.codec=new JsonCodec(t);this.serializer=new d.HttpInterceptingShapeSerializer(this.codec.createSerializer(),t);this.deserializer=new d.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),t)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e);super.setSerdeContext(e)}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);const c=i.NormalizedSchema.of(e.input);if(!o.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),c);if(e){o.headers["content-type"]=e}}if(o.body==null&&o.headers["content-type"]===this.getDefaultContentType()){o.body="{}"}return o}async deserializeResponse(e,t,n){const o=await super.deserializeResponse(e,t,n);const c=i.NormalizedSchema.of(e.output);for(const[e,t]of c.structIterator()){if(t.getMemberTraits().httpPayload&&!(e in o)){o[e]=null}}return o}async handleError(e,t,n,o,c){const d=loadRestJsonErrorCode(n,o)??"Unknown";const{errorSchema:p,errorMetadata:y}=await this.mixin.getErrorSchemaOrThrowBaseException(d,this.options.defaultNamespace,n,o,c);const C=i.NormalizedSchema.of(p);const Q=o.message??o.Message??"Unknown";const v=i.TypeRegistry.for(p[1]).getErrorCtor(p)??Error;const D=new v(Q);await this.deserializeHttpMessage(p,t,n,o);const k={};for(const[e,t]of C.structIterator()){const n=t.getMergedTraits().jsonName??e;k[e]=this.codec.createDeserializer().readObject(t,o[n])}throw this.mixin.decorateServiceException(Object.assign(D,y,{$fault:C.getMergedTraits().error,message:Q},k),o)}getDefaultContentType(){return"application/json"}}const awsExpectUnion=e=>{if(e==null){return undefined}if(typeof e==="object"&&"__type"in e){delete e.__type}return c.expectUnion(e)};class XmlShapeDeserializer extends SerdeContextConfig{settings;stringDeserializer;constructor(e){super();this.settings=e;this.stringDeserializer=new d.FromStringShapeDeserializer(e)}setSerdeContext(e){this.serdeContext=e;this.stringDeserializer.setSerdeContext(e)}read(e,t,n){const o=i.NormalizedSchema.of(e);const c=o.getMemberSchemas();const d=o.isStructSchema()&&o.isMemberSchema()&&!!Object.values(c).find((e=>!!e.getMemberTraits().eventPayload));if(d){const e={};const n=Object.keys(c)[0];const o=c[n];if(o.isBlobSchema()){e[n]=t}else{e[n]=this.read(c[n],t)}return e}const p=(this.serdeContext?.utf8Encoder??C.toUtf8)(t);const y=this.parseXml(p);return this.readSchema(e,n?y[n]:y)}readSchema(e,t){const n=i.NormalizedSchema.of(e);if(n.isUnitSchema()){return}const o=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(t)){return this.readSchema(n,[t])}if(t==null){return t}if(typeof t==="object"){const e=!!o.sparse;const i=!!o.xmlFlattened;if(n.isListSchema()){const o=n.getValueSchema();const c=[];const d=o.getMergedTraits().xmlName??"member";const p=i?t:(t[0]??t)[d];const y=Array.isArray(p)?p:[p];for(const t of y){if(t!=null||e){c.push(this.readSchema(o,t))}}return c}const c={};if(n.isMapSchema()){const o=n.getKeySchema();const d=n.getValueSchema();let p;if(i){p=Array.isArray(t)?t:[t]}else{p=Array.isArray(t.entry)?t.entry:[t.entry]}const y=o.getMergedTraits().xmlName??"key";const C=d.getMergedTraits().xmlName??"value";for(const t of p){const n=t[y];const o=t[C];if(o!=null||e){c[n]=this.readSchema(d,o)}}return c}if(n.isStructSchema()){const e=n.isUnionSchema();let o;if(e){o=new UnionSerde(t,c)}for(const[i,d]of n.structIterator()){const n=d.getMergedTraits();const p=!n.httpPayload?d.getMemberTraits().xmlName??i:n.xmlName??d.getName();if(e){o.mark(p)}if(t[p]!=null){c[i]=this.readSchema(d,t[p])}}if(e){o.writeUnknown()}return c}if(n.isDocumentSchema()){return t}throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(true)}`)}if(n.isListSchema()){return[]}if(n.isMapSchema()||n.isStructSchema()){return{}}return this.stringDeserializer.read(n,t)}parseXml(e){if(e.length){let t;try{t=Q.parseXML(e)}catch(t){if(t&&typeof t==="object"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}const n="#text";const o=Object.keys(t)[0];const i=t[o];if(i[n]){i[o]=i[n];delete i[n]}return c.getValueFromTextNode(i)}return{}}}class QueryShapeSerializer extends SerdeContextConfig{settings;buffer;constructor(e){super();this.settings=e}write(e,t,n=""){if(this.buffer===undefined){this.buffer=""}const o=i.NormalizedSchema.of(e);if(n&&!n.endsWith(".")){n+="."}if(o.isBlobSchema()){if(typeof t==="string"||t instanceof Uint8Array){this.writeKey(n);this.writeValue((this.serdeContext?.base64Encoder??y.toBase64)(t))}}else if(o.isBooleanSchema()||o.isNumericSchema()||o.isStringSchema()){if(t!=null){this.writeKey(n);this.writeValue(String(t))}else if(o.isIdempotencyToken()){this.writeKey(n);this.writeValue(p.generateIdempotencyToken())}}else if(o.isBigIntegerSchema()){if(t!=null){this.writeKey(n);this.writeValue(String(t))}}else if(o.isBigDecimalSchema()){if(t!=null){this.writeKey(n);this.writeValue(t instanceof p.NumericValue?t.string:String(t))}}else if(o.isTimestampSchema()){if(t instanceof Date){this.writeKey(n);const e=d.determineTimestampFormat(o,this.settings);switch(e){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(c.dateToUtcString(t));break;case 7:this.writeValue(String(t.getTime()/1e3));break}}}else if(o.isDocumentSchema()){if(Array.isArray(t)){this.write(64|15,t,n)}else if(t instanceof Date){this.write(4,t,n)}else if(t instanceof Uint8Array){this.write(21,t,n)}else if(t&&typeof t==="object"){this.write(128|15,t,n)}else{this.writeKey(n);this.writeValue(String(t))}}else if(o.isListSchema()){if(Array.isArray(t)){if(t.length===0){if(this.settings.serializeEmptyLists){this.writeKey(n);this.writeValue("")}}else{const e=o.getValueSchema();const i=this.settings.flattenLists||o.getMergedTraits().xmlFlattened;let c=1;for(const o of t){if(o==null){continue}const t=e.getMergedTraits();const d=this.getKey("member",t.xmlName,t.ec2QueryName);const p=i?`${n}${c}`:`${n}${d}.${c}`;this.write(e,o,p);++c}}}}else if(o.isMapSchema()){if(t&&typeof t==="object"){const e=o.getKeySchema();const i=o.getValueSchema();const c=o.getMergedTraits().xmlFlattened;let d=1;for(const[o,p]of Object.entries(t)){if(p==null){continue}const t=e.getMergedTraits();const y=this.getKey("key",t.xmlName,t.ec2QueryName);const C=c?`${n}${d}.${y}`:`${n}entry.${d}.${y}`;const Q=i.getMergedTraits();const v=this.getKey("value",Q.xmlName,Q.ec2QueryName);const D=c?`${n}${d}.${v}`:`${n}entry.${d}.${v}`;this.write(e,o,C);this.write(i,p,D);++d}}}else if(o.isStructSchema()){if(t&&typeof t==="object"){let e=false;for(const[i,c]of o.structIterator()){if(t[i]==null&&!c.isIdempotencyToken()){continue}const o=c.getMergedTraits();const d=this.getKey(i,o.xmlName,o.ec2QueryName,"struct");const p=`${n}${d}`;this.write(c,t[i],p);e=true}if(!e&&o.isUnionSchema()){const{$unknown:e}=t;if(Array.isArray(e)){const[t,o]=e;const i=`${n}${t}`;this.write(15,o,i)}}}}else if(o.isUnitSchema());else{throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${o.getName(true)}`)}}flush(){if(this.buffer===undefined){throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.")}const e=this.buffer;delete this.buffer;return e}getKey(e,t,n,o){const{ec2:i,capitalizeKeys:c}=this.settings;if(i&&n){return n}const d=t??e;if(c&&o==="struct"){return d[0].toUpperCase()+d.slice(1)}return d}writeKey(e){if(e.endsWith(".")){e=e.slice(0,e.length-1)}this.buffer+=`&${d.extendedEncodeURIComponent(e)}=`}writeValue(e){this.buffer+=d.extendedEncodeURIComponent(e)}}class AwsQueryProtocol extends d.RpcProtocol{options;serializer;deserializer;mixin=new ProtocolLib;constructor(e){super({defaultNamespace:e.defaultNamespace});this.options=e;const t={timestampFormat:{useTrait:true,default:5},httpBindings:false,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:true};this.serializer=new QueryShapeSerializer(t);this.deserializer=new XmlShapeDeserializer(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e);this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);if(!o.path.endsWith("/")){o.path+="/"}Object.assign(o.headers,{"content-type":`application/x-www-form-urlencoded`});if(i.deref(e.input)==="unit"||!o.body){o.body=""}const c=e.name.split("#")[1]??e.name;o.body=`Action=${c}&Version=${this.options.version}`+o.body;if(o.body.endsWith("&")){o.body=o.body.slice(-1)}return o}async deserializeResponse(e,t,n){const o=this.deserializer;const c=i.NormalizedSchema.of(e.output);const p={};if(n.statusCode>=300){const i=await d.collectBody(n.body,t);if(i.byteLength>0){Object.assign(p,await o.read(15,i))}await this.handleError(e,t,n,p,this.deserializeMetadata(n))}for(const e in n.headers){const t=n.headers[e];delete n.headers[e];n.headers[e.toLowerCase()]=t}const y=e.name.split("#")[1]??e.name;const C=c.isStructSchema()&&this.useNestedResult()?y+"Result":undefined;const Q=await d.collectBody(n.body,t);if(Q.byteLength>0){Object.assign(p,await o.read(c,Q,C))}const v={$metadata:this.deserializeMetadata(n),...p};return v}useNestedResult(){return true}async handleError(e,t,n,o,c){const d=this.loadQueryErrorCode(n,o)??"Unknown";const p=this.loadQueryError(o)??{};const y=this.loadQueryErrorMessage(o);p.message=y;p.Error={Type:p.Type,Code:p.Code,Message:y};const{errorSchema:C,errorMetadata:Q}=await this.mixin.getErrorSchemaOrThrowBaseException(d,this.options.defaultNamespace,n,p,c,this.mixin.findQueryCompatibleError);const v=i.NormalizedSchema.of(C);const D=i.TypeRegistry.for(C[1]).getErrorCtor(C)??Error;const k=new D(y);const $={Type:p.Error.Type,Code:p.Error.Code,Error:p.Error};for(const[e,t]of v.structIterator()){const n=t.getMergedTraits().xmlName??e;const i=p[n]??o[n];$[e]=this.deserializer.readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(k,Q,{$fault:v.getMergedTraits().error,message:y},$),o)}loadQueryErrorCode(e,t){const n=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;if(n!==undefined){return n}if(e.statusCode==404){return"NotFound"}}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}class AwsEc2QueryProtocol extends AwsQueryProtocol{options;constructor(e){super(e);this.options=e;const t={capitalizeKeys:true,flattenLists:true,serializeEmptyLists:false,ec2:true};Object.assign(this.serializer.settings,t)}useNestedResult(){return false}}const parseXmlBody=(e,t)=>collectBodyString(e,t).then((e=>{if(e.length){let t;try{t=Q.parseXML(e)}catch(t){if(t&&typeof t==="object"){Object.defineProperty(t,"$responseBodyText",{value:e})}throw t}const n="#text";const o=Object.keys(t)[0];const i=t[o];if(i[n]){i[o]=i[n];delete i[n]}return c.getValueFromTextNode(i)}return{}}));const parseXmlErrorBody=async(e,t)=>{const n=await parseXmlBody(e,t);if(n.Error){n.Error.message=n.Error.message??n.Error.Message}return n};const loadRestXmlErrorCode=(e,t)=>{if(t?.Error?.Code!==undefined){return t.Error.Code}if(t?.Code!==undefined){return t.Code}if(e.statusCode==404){return"NotFound"}};class XmlShapeSerializer extends SerdeContextConfig{settings;stringBuffer;byteBuffer;buffer;constructor(e){super();this.settings=e}write(e,t){const n=i.NormalizedSchema.of(e);if(n.isStringSchema()&&typeof t==="string"){this.stringBuffer=t}else if(n.isBlobSchema()){this.byteBuffer="byteLength"in t?t:(this.serdeContext?.base64Decoder??y.fromBase64)(t)}else{this.buffer=this.writeStruct(n,t,undefined);const e=n.getMergedTraits();if(e.httpPayload&&!e.xmlName){this.buffer.withName(n.getName())}}}flush(){if(this.byteBuffer!==undefined){const e=this.byteBuffer;delete this.byteBuffer;return e}if(this.stringBuffer!==undefined){const e=this.stringBuffer;delete this.stringBuffer;return e}const e=this.buffer;if(this.settings.xmlNamespace){if(!e?.attributes?.["xmlns"]){e.addAttribute("xmlns",this.settings.xmlNamespace)}}delete this.buffer;return e.toString()}writeStruct(e,t,n){const o=e.getMergedTraits();const i=e.isMemberSchema()&&!o.httpPayload?e.getMemberTraits().xmlName??e.getMemberName():o.xmlName??e.getName();if(!i||!e.isStructSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${e.getName(true)}.`)}const c=Q.XmlNode.of(i);const[d,p]=this.getXmlnsAttribute(e,n);for(const[n,o]of e.structIterator()){const e=t[n];if(e!=null||o.isIdempotencyToken()){if(o.getMergedTraits().xmlAttribute){c.addAttribute(o.getMergedTraits().xmlName??n,this.writeSimple(o,e));continue}if(o.isListSchema()){this.writeList(o,e,c,p)}else if(o.isMapSchema()){this.writeMap(o,e,c,p)}else if(o.isStructSchema()){c.addChildNode(this.writeStruct(o,e,p))}else{const t=Q.XmlNode.of(o.getMergedTraits().xmlName??o.getMemberName());this.writeSimpleInto(o,e,t,p);c.addChildNode(t)}}}const{$unknown:y}=t;if(y&&e.isUnionSchema()&&Array.isArray(y)&&Object.keys(t).length===1){const[e,n]=y;const o=Q.XmlNode.of(e);if(typeof n!=="string"){if(t instanceof Q.XmlNode||t instanceof Q.XmlText){c.addChildNode(t)}else{throw new Error(`@aws-sdk - $unknown union member in XML requires `+`value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`)}}this.writeSimpleInto(0,n,o,p);c.addChildNode(o)}if(p){c.addAttribute(d,p)}return c}writeList(e,t,n,o){if(!e.isMemberSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${e.getName(true)}`)}const i=e.getMergedTraits();const c=e.getValueSchema();const d=c.getMergedTraits();const p=!!d.sparse;const y=!!i.xmlFlattened;const[C,v]=this.getXmlnsAttribute(e,o);const writeItem=(t,n)=>{if(c.isListSchema()){this.writeList(c,Array.isArray(n)?n:[n],t,v)}else if(c.isMapSchema()){this.writeMap(c,n,t,v)}else if(c.isStructSchema()){const o=this.writeStruct(c,n,v);t.addChildNode(o.withName(y?i.xmlName??e.getMemberName():d.xmlName??"member"))}else{const o=Q.XmlNode.of(y?i.xmlName??e.getMemberName():d.xmlName??"member");this.writeSimpleInto(c,n,o,v);t.addChildNode(o)}};if(y){for(const e of t){if(p||e!=null){writeItem(n,e)}}}else{const o=Q.XmlNode.of(i.xmlName??e.getMemberName());if(v){o.addAttribute(C,v)}for(const e of t){if(p||e!=null){writeItem(o,e)}}n.addChildNode(o)}}writeMap(e,t,n,o,i=false){if(!e.isMemberSchema()){throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${e.getName(true)}`)}const c=e.getMergedTraits();const d=e.getKeySchema();const p=d.getMergedTraits();const y=p.xmlName??"key";const C=e.getValueSchema();const v=C.getMergedTraits();const D=v.xmlName??"value";const k=!!v.sparse;const $=!!c.xmlFlattened;const[V,ee]=this.getXmlnsAttribute(e,o);const addKeyValue=(e,t,n)=>{const o=Q.XmlNode.of(y,t);const[i,c]=this.getXmlnsAttribute(d,ee);if(c){o.addAttribute(i,c)}e.addChildNode(o);let p=Q.XmlNode.of(D);if(C.isListSchema()){this.writeList(C,n,p,ee)}else if(C.isMapSchema()){this.writeMap(C,n,p,ee,true)}else if(C.isStructSchema()){p=this.writeStruct(C,n,ee)}else{this.writeSimpleInto(C,n,p,ee)}e.addChildNode(p)};if($){for(const[o,i]of Object.entries(t)){if(k||i!=null){const t=Q.XmlNode.of(c.xmlName??e.getMemberName());addKeyValue(t,o,i);n.addChildNode(t)}}}else{let o;if(!i){o=Q.XmlNode.of(c.xmlName??e.getMemberName());if(ee){o.addAttribute(V,ee)}n.addChildNode(o)}for(const[e,c]of Object.entries(t)){if(k||c!=null){const t=Q.XmlNode.of("entry");addKeyValue(t,e,c);(i?n:o).addChildNode(t)}}}}writeSimple(e,t){if(null===t){throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.")}const n=i.NormalizedSchema.of(e);let o=null;if(t&&typeof t==="object"){if(n.isBlobSchema()){o=(this.serdeContext?.base64Encoder??y.toBase64)(t)}else if(n.isTimestampSchema()&&t instanceof Date){const e=d.determineTimestampFormat(n,this.settings);switch(e){case 5:o=t.toISOString().replace(".000Z","Z");break;case 6:o=c.dateToUtcString(t);break;case 7:o=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",t);o=c.dateToUtcString(t);break}}else if(n.isBigDecimalSchema()&&t){if(t instanceof p.NumericValue){return t.string}return String(t)}else if(n.isMapSchema()||n.isListSchema()){throw new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.")}else{throw new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${n.getName(true)}`)}}if(n.isBooleanSchema()||n.isNumericSchema()||n.isBigIntegerSchema()||n.isBigDecimalSchema()){o=String(t)}if(n.isStringSchema()){if(t===undefined&&n.isIdempotencyToken()){o=p.generateIdempotencyToken()}else{o=String(t)}}if(o===null){throw new Error(`Unhandled schema-value pair ${n.getName(true)}=${t}`)}return o}writeSimpleInto(e,t,n,o){const c=this.writeSimple(e,t);const d=i.NormalizedSchema.of(e);const p=new Q.XmlText(c);const[y,C]=this.getXmlnsAttribute(d,o);if(C){n.addAttribute(y,C)}n.addChildNode(p)}getXmlnsAttribute(e,t){const n=e.getMergedTraits();const[o,i]=n.xmlNamespace??[];if(i&&i!==t){return[o?`xmlns:${o}`:"xmlns",i]}return[void 0,void 0]}}class XmlCodec extends SerdeContextConfig{settings;constructor(e){super();this.settings=e}createSerializer(){const e=new XmlShapeSerializer(this.settings);e.setSerdeContext(this.serdeContext);return e}createDeserializer(){const e=new XmlShapeDeserializer(this.settings);e.setSerdeContext(this.serdeContext);return e}}class AwsRestXmlProtocol extends d.HttpBindingProtocol{codec;serializer;deserializer;mixin=new ProtocolLib;constructor(e){super(e);const t={timestampFormat:{useTrait:true,default:5},httpBindings:true,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace};this.codec=new XmlCodec(t);this.serializer=new d.HttpInterceptingShapeSerializer(this.codec.createSerializer(),t);this.deserializer=new d.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),t)}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);const c=i.NormalizedSchema.of(e.input);if(!o.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),c);if(e){o.headers["content-type"]=e}}if(typeof o.body==="string"&&o.headers["content-type"]===this.getDefaultContentType()&&!o.body.startsWith("'+o.body}return o}async deserializeResponse(e,t,n){return super.deserializeResponse(e,t,n)}async handleError(e,t,n,o,c){const d=loadRestXmlErrorCode(n,o)??"Unknown";if(o.Error&&typeof o.Error==="object"){for(const e of Object.keys(o.Error)){o[e]=o.Error[e];if(e.toLowerCase()==="message"){o.message=o.Error[e]}}}if(o.RequestId&&!c.requestId){c.requestId=o.RequestId}const{errorSchema:p,errorMetadata:y}=await this.mixin.getErrorSchemaOrThrowBaseException(d,this.options.defaultNamespace,n,o,c);const C=i.NormalizedSchema.of(p);const Q=o.Error?.message??o.Error?.Message??o.message??o.Message??"Unknown";const v=i.TypeRegistry.for(p[1]).getErrorCtor(p)??Error;const D=new v(Q);await this.deserializeHttpMessage(p,t,n,o);const k={};for(const[e,t]of C.structIterator()){const n=t.getMergedTraits().xmlName??e;const i=o.Error?.[n]??o[n];k[e]=this.codec.createDeserializer().readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(D,y,{$fault:C.getMergedTraits().error,message:Q},k),o)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(e){for(const[,t]of e.structIterator()){if(t.getMergedTraits().httpPayload){return!(t.isStructSchema()||t.isMapSchema()||t.isListSchema())}}return false}}t.AwsEc2QueryProtocol=AwsEc2QueryProtocol;t.AwsJson1_0Protocol=AwsJson1_0Protocol;t.AwsJson1_1Protocol=AwsJson1_1Protocol;t.AwsJsonRpcProtocol=AwsJsonRpcProtocol;t.AwsQueryProtocol=AwsQueryProtocol;t.AwsRestJsonProtocol=AwsRestJsonProtocol;t.AwsRestXmlProtocol=AwsRestXmlProtocol;t.AwsSmithyRpcV2CborProtocol=AwsSmithyRpcV2CborProtocol;t.JsonCodec=JsonCodec;t.JsonShapeDeserializer=JsonShapeDeserializer;t.JsonShapeSerializer=JsonShapeSerializer;t.XmlCodec=XmlCodec;t.XmlShapeDeserializer=XmlShapeDeserializer;t.XmlShapeSerializer=XmlShapeSerializer;t._toBool=_toBool;t._toNum=_toNum;t._toStr=_toStr;t.awsExpectUnion=awsExpectUnion;t.loadRestJsonErrorCode=loadRestJsonErrorCode;t.loadRestXmlErrorCode=loadRestXmlErrorCode;t.parseJsonBody=parseJsonBody;t.parseJsonErrorBody=parseJsonErrorBody;t.parseXmlBody=parseXmlBody;t.parseXmlErrorBody=parseXmlErrorBody},5606:(e,t,n)=>{var o=n(5152);var i=n(8857);const c="AWS_ACCESS_KEY_ID";const d="AWS_SECRET_ACCESS_KEY";const p="AWS_SESSION_TOKEN";const y="AWS_CREDENTIAL_EXPIRATION";const C="AWS_CREDENTIAL_SCOPE";const Q="AWS_ACCOUNT_ID";const fromEnv=e=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const t=process.env[c];const n=process.env[d];const v=process.env[p];const D=process.env[y];const k=process.env[C];const $=process.env[Q];if(t&&n){const e={accessKeyId:t,secretAccessKey:n,...v&&{sessionToken:v},...D&&{expiration:new Date(D)},...k&&{credentialScope:k},...$&&{accountId:$}};o.setCredentialFeature(e,"CREDENTIALS_ENV_VARS","g");return e}throw new i.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};t.ENV_ACCOUNT_ID=Q;t.ENV_CREDENTIAL_SCOPE=C;t.ENV_EXPIRATION=y;t.ENV_KEY=c;t.ENV_SECRET=d;t.ENV_SESSION=p;t.fromEnv=fromEnv},5861:(e,t,n)=>{var o=n(5606);var i=n(8857);var c=n(4964);const d="AWS_EC2_METADATA_DISABLED";const remoteProvider=async e=>{const{ENV_CMDS_FULL_URI:t,ENV_CMDS_RELATIVE_URI:o,fromContainerMetadata:c,fromInstanceMetadata:p}=await n.e(566).then(n.t.bind(n,566,19));if(process.env[o]||process.env[t]){e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:t}=await n.e(605).then(n.bind(n,8605));return i.chain(t(e),c(e))}if(process.env[d]&&process.env[d]!=="false"){return async()=>{throw new i.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:e.logger})}}e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata");return p(e)};function memoizeChain(e,t){const n=internalCreateChain(e);let o;let i;let c;const provider=async e=>{if(e?.forceRefresh){return await n(e)}if(c?.expiration){if(c?.expiration?.getTime(){c=e})).finally((()=>{i=undefined}))}}else{o=n(e).then((e=>{c=e})).finally((()=>{o=undefined}));return provider(e)}}return c};return provider}const internalCreateChain=e=>async t=>{let n;for(const o of e){try{return await o(t)}catch(e){n=e;if(e?.tryNextLink){continue}throw e}}throw n};let p=false;const defaultProvider=(e={})=>memoizeChain([async()=>{const t=e.profile??process.env[c.ENV_PROFILE];if(t){const t=process.env[o.ENV_KEY]&&process.env[o.ENV_SECRET];if(t){if(!p){const t=e.logger?.warn&&e.logger?.constructor?.name!=="NoOpLogger"?e.logger.warn.bind(e.logger):console.warn;t(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:\n Multiple credential sources detected: \n Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.\n This SDK will proceed with the AWS_PROFILE value.\n \n However, a future version may change this behavior to prefer the ENV static credentials.\n Please ensure that your environment only sets either the AWS_PROFILE or the\n AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.\n`);p=true}}throw new i.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:e.logger,tryNextLink:true})}e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv");return o.fromEnv(e)()},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:o,ssoAccountId:c,ssoRegion:d,ssoRoleName:p,ssoSession:y}=e;if(!o&&!c&&!d&&!p&&!y){throw new i.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:e.logger})}const{fromSSO:C}=await n.e(998).then(n.t.bind(n,998,19));return C(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:o}=await n.e(869).then(n.t.bind(n,5869,19));return o(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:o}=await n.e(360).then(n.t.bind(n,5360,19));return o(e)(t)},async t=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:o}=await Promise.all([n.e(136),n.e(956)]).then(n.t.bind(n,9956,23));return o(e)(t)},async()=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider");return(await remoteProvider(e))()},async()=>{throw new i.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:false,logger:e.logger})}],credentialsTreatedAsExpired);const credentialsWillNeedRefresh=e=>e?.expiration!==undefined;const credentialsTreatedAsExpired=e=>e?.expiration!==undefined&&e.expiration.getTime()-Date.now()<3e5;t.credentialsTreatedAsExpired=credentialsTreatedAsExpired;t.credentialsWillNeedRefresh=credentialsWillNeedRefresh;t.defaultProvider=defaultProvider},2590:(e,t,n)=>{var o=n(2356);function resolveHostHeaderConfig(e){return e}const hostHeaderMiddleware=e=>t=>async n=>{if(!o.HttpRequest.isInstance(n.request))return t(n);const{request:i}=n;const{handlerProtocol:c=""}=e.requestHandler.metadata||{};if(c.indexOf("h2")>=0&&!i.headers[":authority"]){delete i.headers["host"];i.headers[":authority"]=i.hostname+(i.port?":"+i.port:"")}else if(!i.headers["host"]){let e=i.hostname;if(i.port!=null)e+=`:${i.port}`;i.headers["host"]=e}return t(n)};const i={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:true};const getHostHeaderPlugin=e=>({applyToStack:t=>{t.add(hostHeaderMiddleware(e),i)}});t.getHostHeaderPlugin=getHostHeaderPlugin;t.hostHeaderMiddleware=hostHeaderMiddleware;t.hostHeaderMiddlewareOptions=i;t.resolveHostHeaderConfig=resolveHostHeaderConfig},5242:(e,t)=>{const loggerMiddleware=()=>(e,t)=>async n=>{try{const o=await e(n);const{clientName:i,commandName:c,logger:d,dynamoDbDocumentClientOptions:p={}}=t;const{overrideInputFilterSensitiveLog:y,overrideOutputFilterSensitiveLog:C}=p;const Q=y??t.inputFilterSensitiveLog;const v=C??t.outputFilterSensitiveLog;const{$metadata:D,...k}=o.output;d?.info?.({clientName:i,commandName:c,input:Q(n.input),output:v(k),metadata:D});return o}catch(e){const{clientName:o,commandName:i,logger:c,dynamoDbDocumentClientOptions:d={}}=t;const{overrideInputFilterSensitiveLog:p}=d;const y=p??t.inputFilterSensitiveLog;c?.error?.({clientName:o,commandName:i,input:y(n.input),error:e,metadata:e.$metadata});throw e}};const n={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:true};const getLoggerPlugin=e=>({applyToStack:e=>{e.add(loggerMiddleware(),n)}});t.getLoggerPlugin=getLoggerPlugin;t.loggerMiddleware=loggerMiddleware;t.loggerMiddlewareOptions=n},1568:(e,t,n)=>{var o=n(2521);const i={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:true,priority:"low"};const getRecursionDetectionPlugin=e=>({applyToStack:e=>{e.add(o.recursionDetectionMiddleware(),i)}});t.getRecursionDetectionPlugin=getRecursionDetectionPlugin;Object.prototype.hasOwnProperty.call(o,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:o["__proto__"]});Object.keys(o).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=o[e]}))},2521:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.recursionDetectionMiddleware=void 0;const o=n(9320);const i=n(2356);const c="X-Amzn-Trace-Id";const d="AWS_LAMBDA_FUNCTION_NAME";const p="_X_AMZN_TRACE_ID";const recursionDetectionMiddleware=()=>e=>async t=>{const{request:n}=t;if(!i.HttpRequest.isInstance(n)){return e(t)}const y=Object.keys(n.headers??{}).find((e=>e.toLowerCase()===c.toLowerCase()))??c;if(n.headers.hasOwnProperty(y)){return e(t)}const C=process.env[d];const Q=process.env[p];const v=await o.InvokeStore.getInstanceAsync();const D=v?.getXRayTraceId();const k=D??Q;const nonEmptyString=e=>typeof e==="string"&&e.length>0;if(nonEmptyString(C)&&nonEmptyString(k)){n.headers[c]=k}return e({...t,request:n})};t.recursionDetectionMiddleware=recursionDetectionMiddleware},2959:(e,t,n)=>{var o=n(402);var i=n(3068);var c=n(2356);var d=n(8704);const p=undefined;function isValidUserAgentAppId(e){if(e===undefined){return true}return typeof e==="string"&&e.length<=50}function resolveUserAgentConfig(e){const t=o.normalizeProvider(e.userAgentAppId??p);const{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:typeof n==="string"?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!isValidUserAgentAppId(n)){const t=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;if(typeof n!=="string"){t?.warn("userAgentAppId must be a string or undefined.")}else if(n.length>50){t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}}return n}})}const y=/\d{12}\.ddb/;async function checkFeatures(e,t,n){const o=n.request;if(o?.headers?.["smithy-protocol"]==="rpc-v2-cbor"){d.setFeature(e,"PROTOCOL_RPC_V2_CBOR","M")}if(typeof t.retryStrategy==="function"){const n=await t.retryStrategy();if(typeof n.acquireInitialRetryToken==="function"){if(n.constructor?.name?.includes("Adaptive")){d.setFeature(e,"RETRY_MODE_ADAPTIVE","F")}else{d.setFeature(e,"RETRY_MODE_STANDARD","E")}}else{d.setFeature(e,"RETRY_MODE_LEGACY","D")}}if(typeof t.accountIdEndpointMode==="function"){const n=e.endpointV2;if(String(n?.url?.hostname).match(y)){d.setFeature(e,"ACCOUNT_ID_ENDPOINT","O")}switch(await(t.accountIdEndpointMode?.())){case"disabled":d.setFeature(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":d.setFeature(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":d.setFeature(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;if(t.accountId){d.setFeature(e,"RESOLVED_ACCOUNT_ID","T")}for(const[n,o]of Object.entries(t.$source??{})){d.setFeature(e,n,o)}}}const C="user-agent";const Q="x-amz-user-agent";const v=" ";const D="/";const k=/[^!$%&'*+\-.^_`|~\w]/g;const $=/[^!$%&'*+\-.^_`|~\w#]/g;const V="-";const ee=1024;function encodeFeatures(e){let t="";for(const n in e){const o=e[n];if(t.length+o.length+1<=ee){if(t.length){t+=","+o}else{t+=o}continue}break}return t}const userAgentMiddleware=e=>(t,n)=>async o=>{const{request:d}=o;if(!c.HttpRequest.isInstance(d)){return t(o)}const{headers:p}=d;const y=n?.userAgent?.map(escapeUserAgent)||[];const D=(await e.defaultUserAgentProvider()).map(escapeUserAgent);await checkFeatures(n,e,o);const k=n;D.push(`m/${encodeFeatures(Object.assign({},n.__smithy_context?.features,k.__aws_sdk_context?.features))}`);const $=e?.customUserAgent?.map(escapeUserAgent)||[];const V=await e.userAgentAppId();if(V){D.push(escapeUserAgent([`app`,`${V}`]))}const ee=i.getUserAgentPrefix();const te=(ee?[ee]:[]).concat([...D,...y,...$]).join(v);const re=[...D.filter((e=>e.startsWith("aws-sdk-"))),...$].join(v);if(e.runtime!=="browser"){if(re){p[Q]=p[Q]?`${p[C]} ${re}`:re}p[C]=te}else{p[Q]=te}return t({...o,request:d})};const escapeUserAgent=e=>{const t=e[0].split(D).map((e=>e.replace(k,V))).join(D);const n=e[1]?.replace($,V);const o=t.indexOf(D);const i=t.substring(0,o);let c=t.substring(o+1);if(i==="api"){c=c.toLowerCase()}return[i,c,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")};const te={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:true};const getUserAgentPlugin=e=>({applyToStack:t=>{t.add(userAgentMiddleware(e),te)}});t.DEFAULT_UA_APP_ID=p;t.getUserAgentMiddlewareOptions=te;t.getUserAgentPlugin=getUserAgentPlugin;t.resolveUserAgentConfig=resolveUserAgentConfig;t.userAgentMiddleware=userAgentMiddleware},6463:(e,t,n)=>{var o=n(5779);var i=n(9316);const getAwsRegionExtensionConfiguration=e=>({setRegion(t){e.region=t},region(){return e.region}});const resolveAwsRegionExtensionConfiguration=e=>({region:e.region()});t.NODE_REGION_CONFIG_FILE_OPTIONS=i.NODE_REGION_CONFIG_FILE_OPTIONS;t.NODE_REGION_CONFIG_OPTIONS=i.NODE_REGION_CONFIG_OPTIONS;t.REGION_ENV_NAME=i.REGION_ENV_NAME;t.REGION_INI_NAME=i.REGION_INI_NAME;t.resolveRegionConfig=i.resolveRegionConfig;t.getAwsRegionExtensionConfiguration=getAwsRegionExtensionConfiguration;t.resolveAwsRegionExtensionConfiguration=resolveAwsRegionExtensionConfiguration;Object.prototype.hasOwnProperty.call(o,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:o["__proto__"]});Object.keys(o).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=o[e]}))},5779:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.warning=void 0;t.stsRegionDefaultResolver=stsRegionDefaultResolver;const o=n(9316);const i=n(5704);function stsRegionDefaultResolver(e={}){return(0,i.loadConfig)({...o.NODE_REGION_CONFIG_OPTIONS,async default(){if(!t.warning.silence){console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.")}return"us-east-1"}},{...o.NODE_REGION_CONFIG_FILE_OPTIONS,...e})}t.warning={silence:false}},3068:(e,t,n)=>{var o=n(9674);var i=n(4494);const isVirtualHostableS3Bucket=(e,t=false)=>{if(t){for(const t of e.split(".")){if(!isVirtualHostableS3Bucket(t)){return false}}return true}if(!o.isValidHostLabel(e)){return false}if(e.length<3||e.length>63){return false}if(e!==e.toLowerCase()){return false}if(o.isIpAddress(e)){return false}return true};const c=":";const d="/";const parseArn=e=>{const t=e.split(c);if(t.length<6)return null;const[n,o,i,p,y,...C]=t;if(n!=="arn"||o===""||i===""||C.join(c)==="")return null;const Q=C.map((e=>e.split(d))).flat();return{partition:o,service:i,region:p,accountId:y,resourceId:Q}};var p=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:true,supportsFIPS:true},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-east-2":{description:"Asia Pacific (Taipei)"},"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-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws 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:true,supportsFIPS:true},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:true,supportsFIPS:true},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:true,supportsFIPS:true},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso 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:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:true,supportsFIPS:true},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:true,supportsFIPS:true},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:true,supportsFIPS:true},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:true,supportsFIPS:true},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}];var y="1.1";var C={partitions:p,version:y};let Q=C;let v="";const partition=e=>{const{partitions:t}=Q;for(const n of t){const{regions:t,outputs:o}=n;for(const[n,i]of Object.entries(t)){if(n===e){return{...o,...i}}}}for(const n of t){const{regionRegex:t,outputs:o}=n;if(new RegExp(t).test(e)){return{...o}}}const n=t.find((e=>e.id==="aws"));if(!n){throw new Error("Provided region was not found in the partition array or regex,"+" and default partition with id 'aws' doesn't exist.")}return{...n.outputs}};const setPartitionInfo=(e,t="")=>{Q=e;v=t};const useDefaultPartitionInfo=()=>{setPartitionInfo(C,"")};const getUserAgentPrefix=()=>v;const D={isVirtualHostableS3Bucket:isVirtualHostableS3Bucket,parseArn:parseArn,partition:partition};o.customEndpointFunctions.aws=D;const resolveDefaultAwsRegionalEndpointsConfig=e=>{if(typeof e.endpointProvider!=="function"){throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.")}const{endpoint:t}=e;if(t===undefined){e.endpoint=async()=>toEndpointV1(e.endpointProvider({Region:typeof e.region==="function"?await e.region():e.region,UseDualStack:typeof e.useDualstackEndpoint==="function"?await e.useDualstackEndpoint():e.useDualstackEndpoint,UseFIPS:typeof e.useFipsEndpoint==="function"?await e.useFipsEndpoint():e.useFipsEndpoint,Endpoint:undefined},{logger:e.logger}))}return e};const toEndpointV1=e=>i.parseUrl(e.url);t.EndpointError=o.EndpointError;t.isIpAddress=o.isIpAddress;t.resolveEndpoint=o.resolveEndpoint;t.awsEndpointFunctions=D;t.getUserAgentPrefix=getUserAgentPrefix;t.partition=partition;t.resolveDefaultAwsRegionalEndpointsConfig=resolveDefaultAwsRegionalEndpointsConfig;t.setPartitionInfo=setPartitionInfo;t.toEndpointV1=toEndpointV1;t.useDefaultPartitionInfo=useDefaultPartitionInfo},1656:(e,t,n)=>{var o=n(8161);var i=n(1708);var c=n(1455);var d=n(6760);var p=n(2959);const getRuntimeUserAgentPair=()=>{const e=["deno","bun","llrt"];for(const t of e){if(i.versions[t]){return[`md/${t}`,i.versions[t]]}}return["md/nodejs",i.versions.node]};const getTypeScriptPackageJsonPath=(e="")=>{let t;const n=d.normalize(e);const o=n.split(d.sep);const i=o.indexOf("node_modules");if(i!==-1){t=o.slice(0,i).join(d.sep)}else{t=e}return d.join(t,"node_modules","typescript","package.json")};let y;const getTypeScriptUserAgentPair=async()=>{if(y===null){return undefined}else if(typeof y==="string"){return["md/tsc",y]}try{const e=await c.readFile(getTypeScriptPackageJsonPath(__dirname),"utf-8");const{version:t}=JSON.parse(e);if(typeof t!=="string"){y=null;return undefined}y=t;return["md/tsc",y]}catch{y=null}};const C={isCrtAvailable:false};const isCrtAvailable=()=>{if(C.isCrtAvailable){return["md/crt-avail"]}return null};const createDefaultUserAgentProvider=({serviceId:e,clientVersion:t})=>{const n=getRuntimeUserAgentPair();return async c=>{const d=[["aws-sdk-js",t],["ua","2.1"],[`os/${o.platform()}`,o.release()],["lang/js"],n];const p=await getTypeScriptUserAgentPair();if(p){d.push(p)}const y=isCrtAvailable();if(y){d.push(y)}if(e){d.push([`api/${e}`,t])}if(i.env.AWS_EXECUTION_ENV){d.push([`exec-env/${i.env.AWS_EXECUTION_ENV}`])}const C=await(c?.userAgentAppId?.());const Q=C?[...d,[`app/${C}`]]:[...d];return Q}};const Q=createDefaultUserAgentProvider;const v="AWS_SDK_UA_APP_ID";const D="sdk_ua_app_id";const k="sdk-ua-app-id";const $={environmentVariableSelector:e=>e[v],configFileSelector:e=>e[D]??e[k],default:p.DEFAULT_UA_APP_ID};t.NODE_APP_ID_CONFIG_OPTIONS=$;t.UA_APP_ID_ENV_NAME=v;t.UA_APP_ID_INI_NAME=D;t.createDefaultUserAgentProvider=createDefaultUserAgentProvider;t.crtAvailability=C;t.defaultUserAgent=Q},4274:(e,t,n)=>{var o=n(3343);function escapeAttribute(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function escapeElement(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\r/g," ").replace(/\n/g," ").replace(/\u0085/g,"…").replace(/\u2028/,"
")}class XmlText{value;constructor(e){this.value=e}toString(){return escapeElement(""+this.value)}}class XmlNode{name;children;attributes={};static of(e,t,n){const o=new XmlNode(e);if(t!==undefined){o.addChildNode(new XmlText(t))}if(n!==undefined){o.withName(n)}return o}constructor(e,t=[]){this.name=e;this.children=t}withName(e){this.name=e;return this}addAttribute(e,t){this.attributes[e]=t;return this}addChildNode(e){this.children.push(e);return this}removeAttribute(e){delete this.attributes[e];return this}n(e){this.name=e;return this}c(e){this.children.push(e);return this}a(e,t){if(t!=null){this.attributes[e]=t}return this}cc(e,t,n=t){if(e[t]!=null){const o=XmlNode.of(t,e[t]).withName(n);this.c(o)}}l(e,t,n,o){if(e[t]!=null){const e=o();e.map((e=>{e.withName(n);this.c(e)}))}}lc(e,t,n,o){if(e[t]!=null){const e=o();const t=new XmlNode(n);e.map((e=>{t.c(e)}));this.c(t)}}toString(){const e=Boolean(this.children.length);let t=`<${this.name}`;const n=this.attributes;for(const e of Object.keys(n)){const o=n[e];if(o!=null){t+=` ${e}="${escapeAttribute(""+o)}"`}}return t+=!e?"/>":`>${this.children.map((e=>e.toString())).join("")}`}}t.parseXML=o.parseXML;t.XmlNode=XmlNode;t.XmlText=XmlText},3343:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseXML=parseXML;const o=n(591);const i=new o.XMLParser({attributeNamePrefix:"",htmlEntities:true,ignoreAttributes:false,ignoreDeclaration:true,parseTagValue:false,trimValues:false,tagValueProcessor:(e,t)=>t.trim()===""&&t.includes("\n")?"":undefined});i.addEntity("#xD","\r");i.addEntity("#10","\n");function parseXML(e){return i.parse(e,true)}},9320:(e,t,n)=>{const o={REQUEST_ID:Symbol.for("_AWS_LAMBDA_REQUEST_ID"),X_RAY_TRACE_ID:Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),TENANT_ID:Symbol.for("_AWS_LAMBDA_TENANT_ID")};const i=["true","1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA??"");if(!i){globalThis.awslambda=globalThis.awslambda||{}}class InvokeStoreBase{static PROTECTED_KEYS=o;isProtectedKey(e){return Object.values(o).includes(e)}getRequestId(){return this.get(o.REQUEST_ID)??"-"}getXRayTraceId(){return this.get(o.X_RAY_TRACE_ID)}getTenantId(){return this.get(o.TENANT_ID)}}class InvokeStoreSingle extends InvokeStoreBase{currentContext;getContext(){return this.currentContext}hasContext(){return this.currentContext!==undefined}get(e){return this.currentContext?.[e]}set(e,t){if(this.isProtectedKey(e)){throw new Error(`Cannot modify protected Lambda context field: ${String(e)}`)}this.currentContext=this.currentContext||{};this.currentContext[e]=t}run(e,t){this.currentContext=e;return t()}}class InvokeStoreMulti extends InvokeStoreBase{als;static async create(){const e=new InvokeStoreMulti;const t=await Promise.resolve().then(n.t.bind(n,6698,23));e.als=new t.AsyncLocalStorage;return e}getContext(){return this.als.getStore()}hasContext(){return this.als.getStore()!==undefined}get(e){return this.als.getStore()?.[e]}set(e,t){if(this.isProtectedKey(e)){throw new Error(`Cannot modify protected Lambda context field: ${String(e)}`)}const n=this.als.getStore();if(!n){throw new Error("No context available")}n[e]=t}run(e,t){return this.als.run(e,t)}}t.InvokeStore=void 0;(function(e){let t=null;async function getInstanceAsync(){if(!t){t=(async()=>{const e="AWS_LAMBDA_MAX_CONCURRENCY"in process.env;const t=e?await InvokeStoreMulti.create():new InvokeStoreSingle;if(!i&&globalThis.awslambda?.InvokeStore){return globalThis.awslambda.InvokeStore}else if(!i&&globalThis.awslambda){globalThis.awslambda.InvokeStore=t;return t}else{return t}})()}return t}e.getInstanceAsync=getInstanceAsync;e._testing=process.env.AWS_LAMBDA_BENCHMARK_MODE==="1"?{reset:()=>{t=null;if(globalThis.awslambda?.InvokeStore){delete globalThis.awslambda.InvokeStore}globalThis.awslambda={InvokeStore:undefined}}}:undefined})(t.InvokeStore||(t.InvokeStore={}));t.InvokeStoreBase=InvokeStoreBase},5862:(e,t,n)=>{var o;o={value:true};var i=n(5004);var c=n(1391);var d=n(7132);const p=i.createClientLogger("core-lro");const y=2e3;const C=["succeeded","canceled","failed"];function deserializeState(e){try{return JSON.parse(e).state}catch(t){throw new Error(`Unable to deserialize input state: ${e}`)}}function setStateError(e){const{state:t,stateProxy:n,isOperationError:o}=e;return e=>{if(o(e)){n.setError(t,e);n.setFailed(t)}throw e}}function appendReadableErrorMessage(e,t){let n=e;if(n.slice(-1)!=="."){n=n+"."}return n+" "+t}function simplifyError(e){let t=e.message;let n=e.code;let o=e;while(o.innererror){o=o.innererror;n=o.code;t=appendReadableErrorMessage(t,o.message)}return{code:n,message:t}}function processOperationStatus(e){const{state:t,stateProxy:n,status:o,isDone:i,processResult:c,getError:d,response:y,setErrorAsResult:C}=e;switch(o){case"succeeded":{n.setSucceeded(t);break}case"failed":{const e=d===null||d===void 0?void 0:d(y);let o="";if(e){const{code:t,message:n}=simplifyError(e);o=`. ${t}. ${n}`}const i=`The long-running operation has failed${o}`;n.setError(t,new Error(i));n.setFailed(t);p.warning(i);break}case"canceled":{n.setCanceled(t);break}}if((i===null||i===void 0?void 0:i(y,t))||i===undefined&&["succeeded","canceled"].concat(C?[]:["failed"]).includes(o)){n.setResult(t,buildResult({response:y,state:t,processResult:c}))}}function buildResult(e){const{processResult:t,response:n,state:o}=e;return t?t(n,o):n}async function initOperation(e){const{init:t,stateProxy:n,processResult:o,getOperationStatus:i,withOperationLocation:c,setErrorAsResult:d}=e;const{operationLocation:y,resourceLocation:C,metadata:Q,response:v}=await t();if(y)c===null||c===void 0?void 0:c(y,false);const D={metadata:Q,operationLocation:y,resourceLocation:C};p.verbose(`LRO: Operation description:`,D);const k=n.initState(D);const $=i({response:v,state:k,operationLocation:y});processOperationStatus({state:k,status:$,stateProxy:n,response:v,setErrorAsResult:d,processResult:o});return k}async function pollOperationHelper(e){const{poll:t,state:n,stateProxy:o,operationLocation:i,getOperationStatus:c,getResourceLocation:d,isOperationError:y,options:Q}=e;const v=await t(i,Q).catch(setStateError({state:n,stateProxy:o,isOperationError:y}));const D=c(v,n);p.verbose(`LRO: Status:\n\tPolling from: ${n.config.operationLocation}\n\tOperation status: ${D}\n\tPolling status: ${C.includes(D)?"Stopped":"Running"}`);if(D==="succeeded"){const e=d(v,n);if(e!==undefined){return{response:await t(e).catch(setStateError({state:n,stateProxy:o,isOperationError:y})),status:D}}}return{response:v,status:D}}async function pollOperation(e){const{poll:t,state:n,stateProxy:o,options:i,getOperationStatus:c,getResourceLocation:d,getOperationLocation:p,isOperationError:y,withOperationLocation:Q,getPollingInterval:v,processResult:D,getError:k,updateState:$,setDelay:V,isDone:ee,setErrorAsResult:te}=e;const{operationLocation:re}=n.config;if(re!==undefined){const{response:e,status:ne}=await pollOperationHelper({poll:t,getOperationStatus:c,state:n,stateProxy:o,operationLocation:re,getResourceLocation:d,isOperationError:y,options:i});processOperationStatus({status:ne,response:e,state:n,stateProxy:o,isDone:ee,processResult:D,getError:k,setErrorAsResult:te});if(!C.includes(ne)){const t=v===null||v===void 0?void 0:v(e);if(t)V(t);const o=p===null||p===void 0?void 0:p(e,n);if(o!==undefined){const e=re!==o;n.config.operationLocation=o;Q===null||Q===void 0?void 0:Q(o,e)}else Q===null||Q===void 0?void 0:Q(re,false)}$===null||$===void 0?void 0:$(n,e)}}function getOperationLocationPollingUrl(e){const{azureAsyncOperation:t,operationLocation:n}=e;return n!==null&&n!==void 0?n:t}function getLocationHeader(e){return e.headers["location"]}function getOperationLocationHeader(e){return e.headers["operation-location"]}function getAzureAsyncOperationHeader(e){return e.headers["azure-asyncoperation"]}function findResourceLocation(e){const{location:t,requestMethod:n,requestPath:o,resourceLocationConfig:i}=e;switch(n){case"PUT":{return o}case"DELETE":{return undefined}default:{switch(i){case"azure-async-operation":{return undefined}case"original-uri":{return o}case"location":default:{return t}}}}}function inferLroMode(e){const{rawResponse:t,requestMethod:n,requestPath:o,resourceLocationConfig:i}=e;const c=getOperationLocationHeader(t);const d=getAzureAsyncOperationHeader(t);const p=getOperationLocationPollingUrl({operationLocation:c,azureAsyncOperation:d});const y=getLocationHeader(t);const C=n===null||n===void 0?void 0:n.toLocaleUpperCase();if(p!==undefined){return{mode:"OperationLocation",operationLocation:p,resourceLocation:findResourceLocation({requestMethod:C,location:y,requestPath:o,resourceLocationConfig:i})}}else if(y!==undefined){return{mode:"ResourceLocation",operationLocation:y}}else if(C==="PUT"&&o){return{mode:"Body",operationLocation:o}}else{return undefined}}function transformStatus(e){const{status:t,statusCode:n}=e;if(typeof t!=="string"&&t!==undefined){throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${t}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`)}switch(t===null||t===void 0?void 0:t.toLocaleLowerCase()){case undefined:return toOperationStatus(n);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:{p.verbose(`LRO: unrecognized operation status: ${t}`);return t}}}function getStatus(e){var t;const{status:n}=(t=e.body)!==null&&t!==void 0?t:{};return transformStatus({status:n,statusCode:e.statusCode})}function getProvisioningState(e){var t,n;const{properties:o,provisioningState:i}=(t=e.body)!==null&&t!==void 0?t:{};const c=(n=o===null||o===void 0?void 0:o.provisioningState)!==null&&n!==void 0?n:i;return transformStatus({status:c,statusCode:e.statusCode})}function toOperationStatus(e){if(e===202){return"running"}else if(e<300){return"succeeded"}else{return"failed"}}function parseRetryAfter({rawResponse:e}){const t=e.headers["retry-after"];if(t!==undefined){const e=parseInt(t);return isNaN(e)?calculatePollingIntervalFromDate(new Date(t)):e*1e3}return undefined}function getErrorFromResponse(e){const t=e.flatResponse.error;if(!t){p.warning(`The long-running operation failed but there is no error property in the response's body`);return}if(!t.code||!t.message){p.warning(`The long-running operation failed but the error property in the response's body doesn't contain code or message`);return}return t}function calculatePollingIntervalFromDate(e){const t=Math.floor((new Date).getTime());const n=e.getTime();if(t{const e=await i.sendInitialRequest();const t=inferLroMode({rawResponse:e.rawResponse,requestPath:i.requestPath,requestMethod:i.requestMethod,resourceLocationConfig:n});return Object.assign({response:e,operationLocation:t===null||t===void 0?void 0:t.operationLocation,resourceLocation:t===null||t===void 0?void 0:t.resourceLocation},(t===null||t===void 0?void 0:t.mode)?{metadata:{mode:t.mode}}:{})},stateProxy:t,processResult:o?({flatResponse:e},t)=>o(e,t):({flatResponse:e})=>e,getOperationStatus:getStatusFromInitialResponse,setErrorAsResult:c})}function getOperationLocation({rawResponse:e},t){var n;const o=(n=t.config.metadata)===null||n===void 0?void 0:n["mode"];switch(o){case"OperationLocation":{return getOperationLocationPollingUrl({operationLocation:getOperationLocationHeader(e),azureAsyncOperation:getAzureAsyncOperationHeader(e)})}case"ResourceLocation":{return getLocationHeader(e)}case"Body":default:{return undefined}}}function getOperationStatus({rawResponse:e},t){var n;const o=(n=t.config.metadata)===null||n===void 0?void 0:n["mode"];switch(o){case"OperationLocation":{return getStatus(e)}case"ResourceLocation":{return toOperationStatus(e.statusCode)}case"Body":{return getProvisioningState(e)}default:throw new Error(`Internal error: Unexpected operation mode: ${o}`)}}function getResourceLocation({flatResponse:e},t){if(typeof e==="object"){const n=e.resourceLocation;if(n!==undefined){t.config.resourceLocation=n}}return t.config.resourceLocation}function isOperationError(e){return e.name==="RestError"}async function pollHttpOperation(e){const{lro:t,stateProxy:n,options:o,processResult:i,updateState:c,setDelay:d,state:p,setErrorAsResult:y}=e;return pollOperation({state:p,stateProxy:n,setDelay:d,processResult:i?({flatResponse:e},t)=>i(e,t):({flatResponse:e})=>e,getError:getErrorFromResponse,updateState:c,getPollingInterval:parseRetryAfter,getOperationLocation:getOperationLocation,getOperationStatus:getOperationStatus,isOperationError:isOperationError,getResourceLocation:getResourceLocation,options:o,poll:async(e,n)=>t.sendPollRequest(e,n),setErrorAsResult:y})}const createStateProxy$1=()=>({initState:e=>({status:"running",config:e}),setCanceled:e=>e.status="canceled",setError:(e,t)=>e.error=t,setResult:(e,t)=>e.result=t,setRunning:e=>e.status="running",setSucceeded:e=>e.status="succeeded",setFailed:e=>e.status="failed",getError:e=>e.error,getResult:e=>e.result,isCanceled:e=>e.status==="canceled",isFailed:e=>e.status==="failed",isRunning:e=>e.status==="running",isSucceeded:e=>e.status==="succeeded"});function buildCreatePoller(e){const{getOperationLocation:t,getStatusFromInitialResponse:n,getStatusFromPollResponse:o,isOperationError:i,getResourceLocation:p,getPollingInterval:C,getError:Q,resolveOnUnsuccessful:v}=e;return async({init:e,poll:D},k)=>{const{processResult:$,updateState:V,withOperationLocation:ee,intervalInMs:te=y,restoreFrom:re}=k||{};const ne=createStateProxy$1();const se=ee?(()=>{let e=false;return(t,n)=>{if(n)ee(t);else if(!e)ee(t);e=true}})():undefined;const oe=re?deserializeState(re):await initOperation({init:e,stateProxy:ne,processResult:$,getOperationStatus:n,withOperationLocation:se,setErrorAsResult:!v});let ie;const ae=new c.AbortController;const ce=new Map;const handleProgressEvents=async()=>ce.forEach((e=>e(oe)));const le="Operation was canceled";let ue=te;const de={getOperationState:()=>oe,getResult:()=>oe.result,isDone:()=>["succeeded","failed","canceled"].includes(oe.status),isStopped:()=>ie===undefined,stopPolling:()=>{ae.abort()},toString:()=>JSON.stringify({state:oe}),onProgress:e=>{const t=Symbol();ce.set(t,e);return()=>ce.delete(t)},pollUntilDone:e=>ie!==null&&ie!==void 0?ie:ie=(async()=>{const{abortSignal:t}=e||{};const{signal:n}=t?new c.AbortController([t,ae.signal]):ae;if(!de.isDone()){await de.poll({abortSignal:n});while(!de.isDone()){await d.delay(ue,{abortSignal:n});await de.poll({abortSignal:n})}}if(v){return de.getResult()}else{switch(oe.status){case"succeeded":return de.getResult();case"canceled":throw new Error(le);case"failed":throw oe.error;case"notStarted":case"running":throw new Error(`Polling completed without succeeding or failing`)}}})().finally((()=>{ie=undefined})),async poll(e){if(v){if(de.isDone())return}else{switch(oe.status){case"succeeded":return;case"canceled":throw new Error(le);case"failed":throw oe.error}}await pollOperation({poll:D,state:oe,stateProxy:ne,getOperationLocation:t,isOperationError:i,withOperationLocation:se,getPollingInterval:C,getOperationStatus:o,getResourceLocation:p,processResult:$,getError:Q,updateState:V,options:e,setDelay:e=>{ue=e},setErrorAsResult:!v});await handleProgressEvents();if(!v){switch(oe.status){case"canceled":throw new Error(le);case"failed":throw oe.error}}}};return de}}async function createHttpPoller(e,t){const{resourceLocationConfig:n,intervalInMs:o,processResult:i,restoreFrom:c,updateState:d,withOperationLocation:p,resolveOnUnsuccessful:y=false}=t||{};return buildCreatePoller({getStatusFromInitialResponse:getStatusFromInitialResponse,getStatusFromPollResponse:getOperationStatus,isOperationError:isOperationError,getOperationLocation:getOperationLocation,getResourceLocation:getResourceLocation,getPollingInterval:parseRetryAfter,getError:getErrorFromResponse,resolveOnUnsuccessful:y})({init:async()=>{const t=await e.sendInitialRequest();const o=inferLroMode({rawResponse:t.rawResponse,requestPath:e.requestPath,requestMethod:e.requestMethod,resourceLocationConfig:n});return Object.assign({response:t,operationLocation:o===null||o===void 0?void 0:o.operationLocation,resourceLocation:o===null||o===void 0?void 0:o.resourceLocation},(o===null||o===void 0?void 0:o.mode)?{metadata:{mode:o.mode}}:{})},poll:e.sendPollRequest},{intervalInMs:o,withOperationLocation:p,restoreFrom:c,updateState:d,processResult:i?({flatResponse:e},t)=>i(e,t):({flatResponse:e})=>e})}const createStateProxy=()=>({initState:e=>({config:e,isStarted:true}),setCanceled:e=>e.isCancelled=true,setError:(e,t)=>e.error=t,setResult:(e,t)=>e.result=t,setRunning:e=>e.isStarted=true,setSucceeded:e=>e.isCompleted=true,setFailed:()=>{},getError:e=>e.error,getResult:e=>e.result,isCanceled:e=>!!e.isCancelled,isFailed:e=>!!e.error,isRunning:e=>!!e.isStarted,isSucceeded:e=>Boolean(e.isCompleted&&!e.isCancelled&&!e.error)});class GenericPollOperation{constructor(e,t,n,o,i,c,d){this.state=e;this.lro=t;this.setErrorAsResult=n;this.lroResourceLocationConfig=o;this.processResult=i;this.updateState=c;this.isDone=d}setPollerConfig(e){this.pollerConfig=e}async update(e){var t;const n=createStateProxy();if(!this.state.isStarted){this.state=Object.assign(Object.assign({},this.state),await initHttpOperation({lro:this.lro,stateProxy:n,resourceLocationConfig:this.lroResourceLocationConfig,processResult:this.processResult,setErrorAsResult:this.setErrorAsResult}))}const o=this.updateState;const i=this.isDone;if(!this.state.isCompleted&&this.state.error===undefined){await pollHttpOperation({lro:this.lro,state:this.state,stateProxy:n,processResult:this.processResult,updateState:o?(e,{rawResponse:t})=>o(e,t):undefined,isDone:i?({flatResponse:e},t)=>i(e,t):undefined,options:e,setDelay:e=>{this.pollerConfig.intervalInMs=e},setErrorAsResult:this.setErrorAsResult})}(t=e===null||e===void 0?void 0:e.fireProgress)===null||t===void 0?void 0:t.call(e,this.state);return this}async cancel(){p.error("`cancelOperation` is deprecated because it wasn't implemented");return this}toString(){return JSON.stringify({state:this.state})}}class PollerStoppedError extends Error{constructor(e){super(e);this.name="PollerStoppedError";Object.setPrototypeOf(this,PollerStoppedError.prototype)}}class PollerCancelledError extends Error{constructor(e){super(e);this.name="PollerCancelledError";Object.setPrototypeOf(this,PollerCancelledError.prototype)}}class Poller{constructor(e){this.resolveOnUnsuccessful=false;this.stopped=true;this.pollProgressCallbacks=[];this.operation=e;this.promise=new Promise(((e,t)=>{this.resolve=e;this.reject=t}));this.promise.catch((()=>{}))}async startPolling(e={}){if(this.stopped){this.stopped=false}while(!this.isStopped()&&!this.isDone()){await this.poll(e);await this.delay()}}async pollOnce(e={}){if(!this.isDone()){this.operation=await this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})}this.processUpdatedState()}fireProgress(e){for(const t of this.pollProgressCallbacks){t(e)}}async cancelOnce(e={}){this.operation=await this.operation.cancel(e)}poll(e={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);const clearPollOncePromise=()=>{this.pollOncePromise=undefined};this.pollOncePromise.then(clearPollOncePromise,clearPollOncePromise).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error){this.stopped=true;if(!this.resolveOnUnsuccessful){this.reject(this.operation.state.error);throw this.operation.state.error}}if(this.operation.state.isCancelled){this.stopped=true;if(!this.resolveOnUnsuccessful){const e=new PollerCancelledError("Operation was canceled");this.reject(e);throw e}}if(this.isDone()&&this.resolve){this.resolve(this.getResult())}}async pollUntilDone(e={}){if(this.stopped){this.startPolling(e).catch(this.reject)}this.processUpdatedState();return this.promise}onProgress(e){this.pollProgressCallbacks.push(e);return()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter((t=>t!==e))}}isDone(){const e=this.operation.state;return Boolean(e.isCompleted||e.isCancelled||e.error)}stopPolling(){if(!this.stopped){this.stopped=true;if(this.reject){this.reject(new PollerStoppedError("This poller is already stopped"))}}}isStopped(){return this.stopped}cancelOperation(e={}){if(!this.cancelPromise){this.cancelPromise=this.cancelOnce(e)}else if(e.abortSignal){throw new Error("A cancel request is currently pending")}return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){const e=this.operation.state;return e.result}toString(){return this.operation.toString()}}class LroEngine extends Poller{constructor(e,t){const{intervalInMs:n=y,resumeFrom:o,resolveOnUnsuccessful:i=false,isDone:c,lroResourceLocationConfig:d,processResult:p,updateState:C}=t||{};const Q=o?deserializeState(o):{};const v=new GenericPollOperation(Q,e,!i,d,p,C,c);super(v);this.resolveOnUnsuccessful=i;this.config={intervalInMs:n};v.setPollerConfig(this.config)}delay(){return new Promise((e=>setTimeout((()=>e()),this.config.intervalInMs)))}}o=LroEngine;t.vu=Poller;o=PollerCancelledError;o=PollerStoppedError;o=createHttpPoller},1391:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});const n=new WeakMap;const o=new WeakMap;class AbortSignal{constructor(){this.onabort=null;n.set(this,[]);o.set(this,false)}get aborted(){if(!o.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}return o.get(this)}static get none(){return new AbortSignal}addEventListener(e,t){if(!n.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const o=n.get(this);o.push(t)}removeEventListener(e,t){if(!n.has(this)){throw new TypeError("Expected `this` to be an instance of AbortSignal.")}const o=n.get(this);const i=o.indexOf(t);if(i>-1){o.splice(i,1)}}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function abortSignal(e){if(e.aborted){return}if(e.onabort){e.onabort.call(e)}const t=n.get(e);if(t){t.slice().forEach((t=>{t.call(e,{type:"abort"})}))}o.set(e,true)}class AbortError extends Error{constructor(e){super(e);this.name="AbortError"}}class AbortController{constructor(e){this._signal=new AbortSignal;if(!e){return}if(!Array.isArray(e)){e=arguments}for(const t of e){if(t.aborted){this.abort()}else{t.addEventListener("abort",(()=>{this.abort()}))}}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(e){const t=new AbortSignal;const n=setTimeout(abortSignal,e,t);if(typeof n.unref==="function"){n.unref()}return t}}t.AbortController=AbortController;t.AbortError=AbortError;t.AbortSignal=AbortSignal},7132:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});var o=n(1391);var i=n(6982);var c;const d=typeof process!=="undefined"&&Boolean(process.version)&&Boolean((c=process.versions)===null||c===void 0?void 0:c.node);function createAbortablePromise(e,t){const{cleanupBeforeAbort:n,abortSignal:i,abortErrorMsg:c}=t!==null&&t!==void 0?t:{};return new Promise(((t,d)=>{function rejectOnAbort(){d(new o.AbortError(c!==null&&c!==void 0?c:"The operation was aborted."))}function removeListeners(){i===null||i===void 0?void 0:i.removeEventListener("abort",onAbort)}function onAbort(){n===null||n===void 0?void 0:n();removeListeners();rejectOnAbort()}if(i===null||i===void 0?void 0:i.aborted){return rejectOnAbort()}try{e((e=>{removeListeners();t(e)}),(e=>{removeListeners();d(e)}))}catch(e){d(e)}i===null||i===void 0?void 0:i.addEventListener("abort",onAbort)}))}const p="The delay was aborted.";function delay(e,t){let n;const{abortSignal:o,abortErrorMsg:i}=t!==null&&t!==void 0?t:{};return createAbortablePromise((t=>{n=setTimeout(t,e)}),{cleanupBeforeAbort:()=>clearTimeout(n),abortSignal:o,abortErrorMsg:i!==null&&i!==void 0?i:p})}function getRandomIntegerInclusive(e,t){e=Math.ceil(e);t=Math.floor(t);const n=Math.floor(Math.random()*(t-e+1));return n+e}function isObject(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function isError(e){if(isObject(e)){const t=typeof e.name==="string";const n=typeof e.message==="string";return t&&n}return false}function getErrorMessage(e){if(isError(e)){return e.message}else{let t;try{if(typeof e==="object"&&e){t=JSON.stringify(e)}else{t=String(e)}}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}async function computeSha256Hmac(e,t,n){const o=Buffer.from(e,"base64");return i.createHmac("sha256",o).update(t).digest(n)}async function computeSha256Hash(e,t){return i.createHash("sha256").update(e).digest(t)}function isDefined(e){return typeof e!=="undefined"&&e!==null}function isObjectWithProperties(e,t){if(!isDefined(e)||typeof e!=="object"){return false}for(const n of t){if(!objectHasProperty(e,n)){return false}}return true}function objectHasProperty(e,t){return isDefined(e)&&typeof e==="object"&&t in e}function generateUUID(){let e="";for(let t=0;t<32;t++){const n=Math.floor(Math.random()*16);if(t===12){e+="4"}else if(t===16){e+=n&3|8}else{e+=n.toString(16)}if(t===7||t===11||t===15||t===19){e+="-"}}return e}var y;let C=typeof((y=globalThis===null||globalThis===void 0?void 0:globalThis.crypto)===null||y===void 0?void 0:y.randomUUID)==="function"?globalThis.crypto.randomUUID.bind(globalThis.crypto):i.randomUUID;if(!C){C=generateUUID}function randomUUID(){return C()}t.computeSha256Hash=computeSha256Hash;t.computeSha256Hmac=computeSha256Hmac;t.createAbortablePromise=createAbortablePromise;t.delay=delay;t.getErrorMessage=getErrorMessage;t.getRandomIntegerInclusive=getRandomIntegerInclusive;t.isDefined=isDefined;t.isError=isError;t.isNode=d;t.isObject=isObject;t.isObjectWithProperties=isObjectWithProperties;t.objectHasProperty=objectHasProperty;t.randomUUID=randomUUID},5004:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});var o=n(857);var i=n(9023);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var c=_interopDefaultLegacy(i);function log(e,...t){process.stderr.write(`${c["default"].format(e,...t)}${o.EOL}`)}const d=typeof process!=="undefined"&&process.env&&process.env.DEBUG||undefined;let p;let y=[];let C=[];const Q=[];if(d){enable(d)}const v=Object.assign((e=>createDebugger(e)),{enable:enable,enabled:enabled,disable:disable,log:log});function enable(e){p=e;y=[];C=[];const t=/\*/g;const n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n){if(e.startsWith("-")){C.push(new RegExp(`^${e.substr(1)}$`))}else{y.push(new RegExp(`^${e}$`))}}for(const e of Q){e.enabled=enabled(e.namespace)}}function enabled(e){if(e.endsWith("*")){return true}for(const t of C){if(t.test(e)){return false}}for(const t of y){if(t.test(e)){return true}}return false}function disable(){const e=p||"";enable("");return e}function createDebugger(e){const t=Object.assign(debug,{enabled:enabled(e),destroy:destroy,log:v.log,namespace:e,extend:extend});function debug(...n){if(!t.enabled){return}if(n.length>0){n[0]=`${e} ${n[0]}`}t.log(...n)}Q.push(t);return t}function destroy(){const e=Q.indexOf(this);if(e>=0){Q.splice(e,1);return true}return false}function extend(e){const t=createDebugger(`${this.namespace}:${e}`);t.log=this.log;return t}var D=v;const k=new Set;const $=typeof process!=="undefined"&&process.env&&process.env.AZURE_LOG_LEVEL||undefined;let V;const ee=D("azure");ee.log=(...e)=>{D.log(...e)};const te=["verbose","info","warning","error"];if($){if(isAzureLogLevel($)){setLogLevel($)}else{console.error(`AZURE_LOG_LEVEL set to unknown log level '${$}'; logging is not enabled. Acceptable values: ${te.join(", ")}.`)}}function setLogLevel(e){if(e&&!isAzureLogLevel(e)){throw new Error(`Unknown log level '${e}'. Acceptable values: ${te.join(",")}`)}V=e;const t=[];for(const e of k){if(shouldEnable(e)){t.push(e.namespace)}}D.enable(t.join(","))}function getLogLevel(){return V}const re={verbose:400,info:300,warning:200,error:100};function createClientLogger(e){const t=ee.extend(e);patchLogMethod(ee,t);return{error:createLogger(t,"error"),warning:createLogger(t,"warning"),info:createLogger(t,"info"),verbose:createLogger(t,"verbose")}}function patchLogMethod(e,t){t.log=(...t)=>{e.log(...t)}}function createLogger(e,t){const n=Object.assign(e.extend(t),{level:t});patchLogMethod(e,n);if(shouldEnable(n)){const e=D.disable();D.enable(e+","+n.namespace)}k.add(n);return n}function shouldEnable(e){return Boolean(V&&re[e.level]<=re[V])}function isAzureLogLevel(e){return te.includes(e)}t.AzureLogger=ee;t.createClientLogger=createClientLogger;t.getLogLevel=getLogLevel;t.setLogLevel=setLogLevel},1046:(e,t,n)=>{const o=Symbol("SemVer ANY");class Comparator{static get ANY(){return o}constructor(e,t){t=i(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}e=e.trim().split(/\s+/).join(" ");y("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===o){this.value=""}else{this.value=this.operator+this.semver.version}y("comp",this)}parse(e){const t=this.options.loose?c[d.COMPARATORLOOSE]:c[d.COMPARATOR];const n=e.match(t);if(!n){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=n[1]!==undefined?n[1]:"";if(this.operator==="="){this.operator=""}if(!n[2]){this.semver=o}else{this.semver=new C(n[2],this.options.loose)}}toString(){return this.value}test(e){y("Comparator.test",e,this.options.loose);if(this.semver===o||e===o){return true}if(typeof e==="string"){try{e=new C(e,this.options)}catch(e){return false}}return p(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new Q(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new Q(this.value,t).test(e.semver)}t=i(t);if(t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")){return false}if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&e.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&e.operator.startsWith("<")){return true}if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")){return true}if(p(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")){return true}if(p(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")){return true}return false}}e.exports=Comparator;const i=n(7766);const{safeRe:c,t:d}=n(4836);const p=n(7721);const y=n(2814);const C=n(5186);const Q=n(3177)},3177:(e,t,n)=>{const o=/\s+/g;class Range{constructor(e,t){t=d(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof p){this.raw=e.value;this.set=[[e]];this.formatted=undefined;return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e.trim().replace(o," ");this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0){this.set=[e]}else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.formatted=undefined}get range(){if(this.formatted===undefined){this.formatted="";for(let e=0;e0){this.formatted+="||"}const t=this.set[e];for(let e=0;e0){this.formatted+=" "}this.formatted+=t[e].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=(this.options.includePrerelease&&V)|(this.options.loose&&ee);const n=t+":"+e;const o=c.get(n);if(o){return o}const i=this.options.loose;const d=i?Q[v.HYPHENRANGELOOSE]:Q[v.HYPHENRANGE];e=e.replace(d,hyphenReplace(this.options.includePrerelease));y("hyphen replace",e);e=e.replace(Q[v.COMPARATORTRIM],D);y("comparator trim",e);e=e.replace(Q[v.TILDETRIM],k);y("tilde trim",e);e=e.replace(Q[v.CARETTRIM],$);y("caret trim",e);let C=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));if(i){C=C.filter((e=>{y("loose invalid filter",e,this.options);return!!e.match(Q[v.COMPARATORLOOSE])}))}y("range list",C);const te=new Map;const re=C.map((e=>new p(e,this.options)));for(const e of re){if(isNullSet(e)){return[e]}te.set(e.value,e)}if(te.size>1&&te.has("")){te.delete("")}const ne=[...te.values()];c.set(n,ne);return ne}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((n=>isSatisfiable(n,t)&&e.set.some((e=>isSatisfiable(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new C(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let n=true;const o=e.slice();let i=o.pop();while(n&&o.length){n=o.every((e=>i.intersects(e,t)));i=o.pop()}return n};const parseComparator=(e,t)=>{e=e.replace(Q[v.BUILD],"");y("comp",e,t);e=replaceCarets(e,t);y("caret",e);e=replaceTildes(e,t);y("tildes",e);e=replaceXRanges(e,t);y("xrange",e);e=replaceStars(e,t);y("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const n=t.loose?Q[v.TILDELOOSE]:Q[v.TILDE];return e.replace(n,((t,n,o,i,c)=>{y("tilde",e,t,n,o,i,c);let d;if(isX(n)){d=""}else if(isX(o)){d=`>=${n}.0.0 <${+n+1}.0.0-0`}else if(isX(i)){d=`>=${n}.${o}.0 <${n}.${+o+1}.0-0`}else if(c){y("replaceTilde pr",c);d=`>=${n}.${o}.${i}-${c} <${n}.${+o+1}.0-0`}else{d=`>=${n}.${o}.${i} <${n}.${+o+1}.0-0`}y("tilde return",d);return d}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{y("caret",e,t);const n=t.loose?Q[v.CARETLOOSE]:Q[v.CARET];const o=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,c,d)=>{y("caret",e,t,n,i,c,d);let p;if(isX(n)){p=""}else if(isX(i)){p=`>=${n}.0.0${o} <${+n+1}.0.0-0`}else if(isX(c)){if(n==="0"){p=`>=${n}.${i}.0${o} <${n}.${+i+1}.0-0`}else{p=`>=${n}.${i}.0${o} <${+n+1}.0.0-0`}}else if(d){y("replaceCaret pr",d);if(n==="0"){if(i==="0"){p=`>=${n}.${i}.${c}-${d} <${n}.${i}.${+c+1}-0`}else{p=`>=${n}.${i}.${c}-${d} <${n}.${+i+1}.0-0`}}else{p=`>=${n}.${i}.${c}-${d} <${+n+1}.0.0-0`}}else{y("no pr");if(n==="0"){if(i==="0"){p=`>=${n}.${i}.${c}${o} <${n}.${i}.${+c+1}-0`}else{p=`>=${n}.${i}.${c}${o} <${n}.${+i+1}.0-0`}}else{p=`>=${n}.${i}.${c} <${+n+1}.0.0-0`}}y("caret return",p);return p}))};const replaceXRanges=(e,t)=>{y("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const n=t.loose?Q[v.XRANGELOOSE]:Q[v.XRANGE];return e.replace(n,((n,o,i,c,d,p)=>{y("xRange",e,n,o,i,c,d,p);const C=isX(i);const Q=C||isX(c);const v=Q||isX(d);const D=v;if(o==="="&&D){o=""}p=t.includePrerelease?"-0":"";if(C){if(o===">"||o==="<"){n="<0.0.0-0"}else{n="*"}}else if(o&&D){if(Q){c=0}d=0;if(o===">"){o=">=";if(Q){i=+i+1;c=0;d=0}else{c=+c+1;d=0}}else if(o==="<="){o="<";if(Q){i=+i+1}else{c=+c+1}}if(o==="<"){p="-0"}n=`${o+i}.${c}.${d}${p}`}else if(Q){n=`>=${i}.0.0${p} <${+i+1}.0.0-0`}else if(v){n=`>=${i}.${c}.0${p} <${i}.${+c+1}.0-0`}y("xRange return",n);return n}))};const replaceStars=(e,t)=>{y("replaceStars",e,t);return e.trim().replace(Q[v.STAR],"")};const replaceGTE0=(e,t)=>{y("replaceGTE0",e,t);return e.trim().replace(Q[t.includePrerelease?v.GTE0PRE:v.GTE0],"")};const hyphenReplace=e=>(t,n,o,i,c,d,p,y,C,Q,v,D)=>{if(isX(o)){n=""}else if(isX(i)){n=`>=${o}.0.0${e?"-0":""}`}else if(isX(c)){n=`>=${o}.${i}.0${e?"-0":""}`}else if(d){n=`>=${n}`}else{n=`>=${n}${e?"-0":""}`}if(isX(C)){y=""}else if(isX(Q)){y=`<${+C+1}.0.0-0`}else if(isX(v)){y=`<${C}.${+Q+1}.0-0`}else if(D){y=`<=${C}.${Q}.${v}-${D}`}else if(e){y=`<${C}.${Q}.${+v+1}-0`}else{y=`<=${y}`}return`${n} ${y}`.trim()};const testSet=(e,t,n)=>{for(let n=0;n0){const o=e[n].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch){return true}}}return false}return true}},5186:(e,t,n)=>{const o=n(2814);const{MAX_LENGTH:i,MAX_SAFE_INTEGER:c}=n(8504);const{safeRe:d,t:p}=n(4836);const y=n(7766);const{compareIdentifiers:C}=n(7865);class SemVer{constructor(e,t){t=y(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`)}if(e.length>i){throw new TypeError(`version is longer than ${i} characters`)}o("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?d[p.LOOSE]:d[p.FULL]);if(!n){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>c||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>c||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>c||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&te.major){return 1}if(this.minore.minor){return 1}if(this.patche.patch){return 1}return 0}comparePre(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}if(this.prerelease.length&&!e.prerelease.length){return-1}else if(!this.prerelease.length&&e.prerelease.length){return 1}else if(!this.prerelease.length&&!e.prerelease.length){return 0}let t=0;do{const n=this.prerelease[t];const i=e.prerelease[t];o("prerelease compare",t,n,i);if(n===undefined&&i===undefined){return 0}else if(i===undefined){return 1}else if(n===undefined){return-1}else if(n===i){continue}else{return C(n,i)}}while(++t)}compareBuild(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}let t=0;do{const n=this.build[t];const i=e.build[t];o("build compare",t,n,i);if(n===undefined&&i===undefined){return 0}else if(i===undefined){return 1}else if(n===undefined){return-1}else if(n===i){continue}else{return C(n,i)}}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&n===false){throw new Error("invalid increment argument: identifier is empty")}if(t){const e=`-${t}`.match(this.options.loose?d[p.PRERELEASELOOSE]:d[p.PRERELEASE]);if(!e||e[1]!==t){throw new Error(`invalid identifier: ${t}`)}}}switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0;this.inc("patch",t,n);this.inc("pre",t,n);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",t,n)}this.inc("pre",t,n);break;case"release":if(this.prerelease.length===0){throw new Error(`version ${this.raw} is not a prerelease`)}this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(this.prerelease.length===0){this.prerelease=[e]}else{let o=this.prerelease.length;while(--o>=0){if(typeof this.prerelease[o]==="number"){this.prerelease[o]++;o=-2}}if(o===-1){if(t===this.prerelease.join(".")&&n===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(e)}}if(t){let o=[t,e];if(n===false){o=[t]}if(C(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1])){this.prerelease=o}}else{this.prerelease=o}}break}default:throw new Error(`invalid increment argument: ${e}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}e.exports=SemVer},5436:(e,t,n)=>{const o=n(7526);const clean=(e,t)=>{const n=o(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};e.exports=clean},7721:(e,t,n)=>{const o=n(4107);const i=n(7705);const c=n(7962);const d=n(5603);const p=n(525);const y=n(3966);const cmp=(e,t,n,C)=>{switch(t){case"===":if(typeof e==="object"){e=e.version}if(typeof n==="object"){n=n.version}return e===n;case"!==":if(typeof e==="object"){e=e.version}if(typeof n==="object"){n=n.version}return e!==n;case"":case"=":case"==":return o(e,n,C);case"!=":return i(e,n,C);case">":return c(e,n,C);case">=":return d(e,n,C);case"<":return p(e,n,C);case"<=":return y(e,n,C);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},6356:(e,t,n)=>{const o=n(5186);const i=n(7526);const{safeRe:c,t:d}=n(4836);const coerce=(e,t)=>{if(e instanceof o){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let n=null;if(!t.rtl){n=e.match(t.includePrerelease?c[d.COERCEFULL]:c[d.COERCE])}else{const o=t.includePrerelease?c[d.COERCERTLFULL]:c[d.COERCERTL];let i;while((i=o.exec(e))&&(!n||n.index+n[0].length!==e.length)){if(!n||i.index+i[0].length!==n.index+n[0].length){n=i}o.lastIndex=i.index+i[1].length+i[2].length}o.lastIndex=-1}if(n===null){return null}const p=n[2];const y=n[3]||"0";const C=n[4]||"0";const Q=t.includePrerelease&&n[5]?`-${n[5]}`:"";const v=t.includePrerelease&&n[6]?`+${n[6]}`:"";return i(`${p}.${y}.${C}${Q}${v}`,t)};e.exports=coerce},2147:(e,t,n)=>{const o=n(5186);const compareBuild=(e,t,n)=>{const i=new o(e,n);const c=new o(t,n);return i.compare(c)||i.compareBuild(c)};e.exports=compareBuild},8545:(e,t,n)=>{const o=n(18);const compareLoose=(e,t)=>o(e,t,true);e.exports=compareLoose},18:(e,t,n)=>{const o=n(5186);const compare=(e,t,n)=>new o(e,n).compare(new o(t,n));e.exports=compare},7290:(e,t,n)=>{const o=n(7526);const diff=(e,t)=>{const n=o(e,null,true);const i=o(t,null,true);const c=n.compare(i);if(c===0){return null}const d=c>0;const p=d?n:i;const y=d?i:n;const C=!!p.prerelease.length;const Q=!!y.prerelease.length;if(Q&&!C){if(!y.patch&&!y.minor){return"major"}if(y.compareMain(p)===0){if(y.minor&&!y.patch){return"minor"}return"patch"}}const v=C?"pre":"";if(n.major!==i.major){return v+"major"}if(n.minor!==i.minor){return v+"minor"}if(n.patch!==i.patch){return v+"patch"}return"prerelease"};e.exports=diff},4107:(e,t,n)=>{const o=n(18);const eq=(e,t,n)=>o(e,t,n)===0;e.exports=eq},7962:(e,t,n)=>{const o=n(18);const gt=(e,t,n)=>o(e,t,n)>0;e.exports=gt},5603:(e,t,n)=>{const o=n(18);const gte=(e,t,n)=>o(e,t,n)>=0;e.exports=gte},2317:(e,t,n)=>{const o=n(5186);const inc=(e,t,n,i,c)=>{if(typeof n==="string"){c=i;i=n;n=undefined}try{return new o(e instanceof o?e.version:e,n).inc(t,i,c).version}catch(e){return null}};e.exports=inc},525:(e,t,n)=>{const o=n(18);const lt=(e,t,n)=>o(e,t,n)<0;e.exports=lt},3966:(e,t,n)=>{const o=n(18);const lte=(e,t,n)=>o(e,t,n)<=0;e.exports=lte},4716:(e,t,n)=>{const o=n(5186);const major=(e,t)=>new o(e,t).major;e.exports=major},7968:(e,t,n)=>{const o=n(5186);const minor=(e,t)=>new o(e,t).minor;e.exports=minor},7705:(e,t,n)=>{const o=n(18);const neq=(e,t,n)=>o(e,t,n)!==0;e.exports=neq},7526:(e,t,n)=>{const o=n(5186);const parse=(e,t,n=false)=>{if(e instanceof o){return e}try{return new o(e,t)}catch(e){if(!n){return null}throw e}};e.exports=parse},4807:(e,t,n)=>{const o=n(5186);const patch=(e,t)=>new o(e,t).patch;e.exports=patch},5039:(e,t,n)=>{const o=n(7526);const prerelease=(e,t)=>{const n=o(e,t);return n&&n.prerelease.length?n.prerelease:null};e.exports=prerelease},5236:(e,t,n)=>{const o=n(18);const rcompare=(e,t,n)=>o(t,e,n);e.exports=rcompare},9547:(e,t,n)=>{const o=n(2147);const rsort=(e,t)=>e.sort(((e,n)=>o(n,e,t)));e.exports=rsort},6076:(e,t,n)=>{const o=n(3177);const satisfies=(e,t,n)=>{try{t=new o(t,n)}catch(e){return false}return t.test(e)};e.exports=satisfies},6293:(e,t,n)=>{const o=n(2147);const sort=(e,t)=>e.sort(((e,n)=>o(e,n,t)));e.exports=sort},2475:(e,t,n)=>{const o=n(7526);const valid=(e,t)=>{const n=o(e,t);return n?n.version:null};e.exports=valid},1955:(e,t,n)=>{const o=n(4836);const i=n(8504);const c=n(5186);const d=n(7865);const p=n(7526);const y=n(2475);const C=n(5436);const Q=n(2317);const v=n(7290);const D=n(4716);const k=n(7968);const $=n(4807);const V=n(5039);const ee=n(18);const te=n(5236);const re=n(8545);const ne=n(2147);const se=n(6293);const oe=n(9547);const ie=n(7962);const ae=n(525);const ce=n(4107);const le=n(7705);const ue=n(5603);const de=n(3966);const pe=n(7721);const Ae=n(6356);const me=n(1046);const ge=n(3177);const fe=n(6076);const he=n(8465);const ye=n(1550);const Ee=n(9820);const Ce=n(2271);const Ie=n(8816);const be=n(6317);const Se=n(5133);const Be=n(8548);const we=n(9118);const Re=n(3139);const Ne=n(1093);e.exports={parse:p,valid:y,clean:C,inc:Q,diff:v,major:D,minor:k,patch:$,prerelease:V,compare:ee,rcompare:te,compareLoose:re,compareBuild:ne,sort:se,rsort:oe,gt:ie,lt:ae,eq:ce,neq:le,gte:ue,lte:de,cmp:pe,coerce:Ae,Comparator:me,Range:ge,satisfies:fe,toComparators:he,maxSatisfying:ye,minSatisfying:Ee,minVersion:Ce,validRange:Ie,outside:be,gtr:Se,ltr:Be,intersects:we,simplifyRange:Re,subset:Ne,SemVer:c,re:o.re,src:o.src,tokens:o.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:d.compareIdentifiers,rcompareIdentifiers:d.rcompareIdentifiers}},8504:e=>{const t="2.0.0";const n=256;const o=Number.MAX_SAFE_INTEGER||9007199254740991;const i=16;const c=n-6;const d=["major","premajor","minor","preminor","patch","prepatch","prerelease"];e.exports={MAX_LENGTH:n,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:o,RELEASE_TYPES:d,SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},2814:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},7865:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,n)=>{if(typeof e==="number"&&typeof n==="number"){return e===n?0:ecompareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},7515:e=>{class LRUCache{constructor(){this.max=1e3;this.map=new Map}get(e){const t=this.map.get(e);if(t===undefined){return undefined}else{this.map.delete(e);this.map.set(e,t);return t}}delete(e){return this.map.delete(e)}set(e,t){const n=this.delete(e);if(!n&&t!==undefined){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}e.exports=LRUCache},7766:e=>{const t=Object.freeze({loose:true});const n=Object.freeze({});const parseOptions=e=>{if(!e){return n}if(typeof e!=="object"){return t}return e};e.exports=parseOptions},4836:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:o,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:c}=n(8504);const d=n(2814);t=e.exports={};const p=t.re=[];const y=t.safeRe=[];const C=t.src=[];const Q=t.safeSrc=[];const v=t.t={};let D=0;const k="[a-zA-Z0-9-]";const $=[["\\s",1],["\\d",c],[k,i]];const makeSafeRegex=e=>{for(const[t,n]of $){e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`)}return e};const createToken=(e,t,n)=>{const o=makeSafeRegex(t);const i=D++;d(e,i,t);v[e]=i;C[i]=t;Q[i]=o;p[i]=new RegExp(t,n?"g":undefined);y[i]=new RegExp(o,n?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${k}*`);createToken("MAINVERSION",`(${C[v.NUMERICIDENTIFIER]})\\.`+`(${C[v.NUMERICIDENTIFIER]})\\.`+`(${C[v.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${C[v.NUMERICIDENTIFIERLOOSE]})\\.`+`(${C[v.NUMERICIDENTIFIERLOOSE]})\\.`+`(${C[v.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${C[v.NONNUMERICIDENTIFIER]}|${C[v.NUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${C[v.NONNUMERICIDENTIFIER]}|${C[v.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASE",`(?:-(${C[v.PRERELEASEIDENTIFIER]}(?:\\.${C[v.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${C[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[v.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${k}+`);createToken("BUILD",`(?:\\+(${C[v.BUILDIDENTIFIER]}(?:\\.${C[v.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${C[v.MAINVERSION]}${C[v.PRERELEASE]}?${C[v.BUILD]}?`);createToken("FULL",`^${C[v.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${C[v.MAINVERSIONLOOSE]}${C[v.PRERELEASELOOSE]}?${C[v.BUILD]}?`);createToken("LOOSE",`^${C[v.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${C[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${C[v.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${C[v.XRANGEIDENTIFIER]})`+`(?:\\.(${C[v.XRANGEIDENTIFIER]})`+`(?:\\.(${C[v.XRANGEIDENTIFIER]})`+`(?:${C[v.PRERELEASE]})?${C[v.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:${C[v.PRERELEASELOOSE]})?${C[v.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${C[v.GTLT]}\\s*${C[v.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${C[v.GTLT]}\\s*${C[v.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`${"(^|[^\\d])"+"(\\d{1,"}${o}})`+`(?:\\.(\\d{1,${o}}))?`+`(?:\\.(\\d{1,${o}}))?`);createToken("COERCE",`${C[v.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",C[v.COERCEPLAIN]+`(?:${C[v.PRERELEASE]})?`+`(?:${C[v.BUILD]})?`+`(?:$|[^\\d])`);createToken("COERCERTL",C[v.COERCE],true);createToken("COERCERTLFULL",C[v.COERCEFULL],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${C[v.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${C[v.LONETILDE]}${C[v.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${C[v.LONETILDE]}${C[v.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${C[v.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${C[v.LONECARET]}${C[v.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${C[v.LONECARET]}${C[v.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${C[v.GTLT]}\\s*(${C[v.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${C[v.GTLT]}\\s*(${C[v.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${C[v.GTLT]}\\s*(${C[v.LOOSEPLAIN]}|${C[v.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${C[v.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${C[v.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${C[v.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${C[v.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},5133:(e,t,n)=>{const o=n(6317);const gtr=(e,t,n)=>o(e,t,">",n);e.exports=gtr},9118:(e,t,n)=>{const o=n(3177);const intersects=(e,t,n)=>{e=new o(e,n);t=new o(t,n);return e.intersects(t,n)};e.exports=intersects},8548:(e,t,n)=>{const o=n(6317);const ltr=(e,t,n)=>o(e,t,"<",n);e.exports=ltr},1550:(e,t,n)=>{const o=n(5186);const i=n(3177);const maxSatisfying=(e,t,n)=>{let c=null;let d=null;let p=null;try{p=new i(t,n)}catch(e){return null}e.forEach((e=>{if(p.test(e)){if(!c||d.compare(e)===-1){c=e;d=new o(c,n)}}}));return c};e.exports=maxSatisfying},9820:(e,t,n)=>{const o=n(5186);const i=n(3177);const minSatisfying=(e,t,n)=>{let c=null;let d=null;let p=null;try{p=new i(t,n)}catch(e){return null}e.forEach((e=>{if(p.test(e)){if(!c||d.compare(e)===1){c=e;d=new o(c,n)}}}));return c};e.exports=minSatisfying},2271:(e,t,n)=>{const o=n(5186);const i=n(3177);const c=n(7962);const minVersion=(e,t)=>{e=new i(e,t);let n=new o("0.0.0");if(e.test(n)){return n}n=new o("0.0.0-0");if(e.test(n)){return n}n=null;for(let t=0;t{const t=new o(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!d||c(t,d)){d=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(d&&(!n||c(n,d))){n=d}}if(n&&e.test(n)){return n}return null};e.exports=minVersion},6317:(e,t,n)=>{const o=n(5186);const i=n(1046);const{ANY:c}=i;const d=n(3177);const p=n(6076);const y=n(7962);const C=n(525);const Q=n(3966);const v=n(5603);const outside=(e,t,n,D)=>{e=new o(e,D);t=new d(t,D);let k,$,V,ee,te;switch(n){case">":k=y;$=Q;V=C;ee=">";te=">=";break;case"<":k=C;$=v;V=y;ee="<";te="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(p(e,t,D)){return false}for(let n=0;n{if(e.semver===c){e=new i(">=0.0.0")}d=d||e;p=p||e;if(k(e.semver,d.semver,D)){d=e}else if(V(e.semver,p.semver,D)){p=e}}));if(d.operator===ee||d.operator===te){return false}if((!p.operator||p.operator===ee)&&$(e,p.semver)){return false}else if(p.operator===te&&V(e,p.semver)){return false}}return true};e.exports=outside},3139:(e,t,n)=>{const o=n(6076);const i=n(18);e.exports=(e,t,n)=>{const c=[];let d=null;let p=null;const y=e.sort(((e,t)=>i(e,t,n)));for(const e of y){const i=o(e,t,n);if(i){p=e;if(!d){d=e}}else{if(p){c.push([d,p])}p=null;d=null}}if(d){c.push([d,null])}const C=[];for(const[e,t]of c){if(e===t){C.push(e)}else if(!t&&e===y[0]){C.push("*")}else if(!t){C.push(`>=${e}`)}else if(e===y[0]){C.push(`<=${t}`)}else{C.push(`${e} - ${t}`)}}const Q=C.join(" || ");const v=typeof t.raw==="string"?t.raw:String(t);return Q.length{const o=n(3177);const i=n(1046);const{ANY:c}=i;const d=n(6076);const p=n(18);const subset=(e,t,n={})=>{if(e===t){return true}e=new o(e,n);t=new o(t,n);let i=false;e:for(const o of e.set){for(const e of t.set){const t=simpleSubset(o,e,n);i=i||t!==null;if(t){continue e}}if(i){return false}}return true};const y=[new i(">=0.0.0-0")];const C=[new i(">=0.0.0")];const simpleSubset=(e,t,n)=>{if(e===t){return true}if(e.length===1&&e[0].semver===c){if(t.length===1&&t[0].semver===c){return true}else if(n.includePrerelease){e=y}else{e=C}}if(t.length===1&&t[0].semver===c){if(n.includePrerelease){return true}else{t=C}}const o=new Set;let i,Q;for(const t of e){if(t.operator===">"||t.operator===">="){i=higherGT(i,t,n)}else if(t.operator==="<"||t.operator==="<="){Q=lowerLT(Q,t,n)}else{o.add(t.semver)}}if(o.size>1){return null}let v;if(i&&Q){v=p(i.semver,Q.semver,n);if(v>0){return null}else if(v===0&&(i.operator!==">="||Q.operator!=="<=")){return null}}for(const e of o){if(i&&!d(e,String(i),n)){return null}if(Q&&!d(e,String(Q),n)){return null}for(const o of t){if(!d(e,String(o),n)){return false}}return true}let D,k;let $,V;let ee=Q&&!n.includePrerelease&&Q.semver.prerelease.length?Q.semver:false;let te=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:false;if(ee&&ee.prerelease.length===1&&Q.operator==="<"&&ee.prerelease[0]===0){ee=false}for(const e of t){V=V||e.operator===">"||e.operator===">=";$=$||e.operator==="<"||e.operator==="<=";if(i){if(te){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===te.major&&e.semver.minor===te.minor&&e.semver.patch===te.patch){te=false}}if(e.operator===">"||e.operator===">="){D=higherGT(i,e,n);if(D===e&&D!==i){return false}}else if(i.operator===">="&&!d(i.semver,String(e),n)){return false}}if(Q){if(ee){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===ee.major&&e.semver.minor===ee.minor&&e.semver.patch===ee.patch){ee=false}}if(e.operator==="<"||e.operator==="<="){k=lowerLT(Q,e,n);if(k===e&&k!==Q){return false}}else if(Q.operator==="<="&&!d(Q.semver,String(e),n)){return false}}if(!e.operator&&(Q||i)&&v!==0){return false}}if(i&&$&&!Q&&v!==0){return false}if(Q&&V&&!i&&v!==0){return false}if(te||ee){return false}return true};const higherGT=(e,t,n)=>{if(!e){return t}const o=p(e.semver,t.semver,n);return o>0?e:o<0?t:t.operator===">"&&e.operator===">="?t:e};const lowerLT=(e,t,n)=>{if(!e){return t}const o=p(e.semver,t.semver,n);return o<0?e:o>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=subset},8465:(e,t,n)=>{const o=n(3177);const toComparators=(e,t)=>new o(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));e.exports=toComparators},8816:(e,t,n)=>{const o=n(3177);const validRange=(e,t)=>{try{return new o(e,t).range||"*"}catch(e){return null}};e.exports=validRange},9316:(e,t,n)=>{var o=n(6716);var i=n(6324);var c=n(9674);const d="AWS_USE_DUALSTACK_ENDPOINT";const p="use_dualstack_endpoint";const y=false;const C={environmentVariableSelector:e=>o.booleanSelector(e,d,o.SelectorType.ENV),configFileSelector:e=>o.booleanSelector(e,p,o.SelectorType.CONFIG),default:false};const Q="AWS_USE_FIPS_ENDPOINT";const v="use_fips_endpoint";const D=false;const k={environmentVariableSelector:e=>o.booleanSelector(e,Q,o.SelectorType.ENV),configFileSelector:e=>o.booleanSelector(e,v,o.SelectorType.CONFIG),default:false};const resolveCustomEndpointsConfig=e=>{const{tls:t,endpoint:n,urlParser:o,useDualstackEndpoint:c}=e;return Object.assign(e,{tls:t??true,endpoint:i.normalizeProvider(typeof n==="string"?o(n):n),isCustomEndpoint:true,useDualstackEndpoint:i.normalizeProvider(c??false)})};const getEndpointFromRegion=async e=>{const{tls:t=true}=e;const n=await e.region();const o=new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);if(!o.test(n)){throw new Error("Invalid region in client config")}const i=await e.useDualstackEndpoint();const c=await e.useFipsEndpoint();const{hostname:d}=await e.regionInfoProvider(n,{useDualstackEndpoint:i,useFipsEndpoint:c})??{};if(!d){throw new Error("Cannot resolve hostname from client config")}return e.urlParser(`${t?"https:":"http:"}//${d}`)};const resolveEndpointsConfig=e=>{const t=i.normalizeProvider(e.useDualstackEndpoint??false);const{endpoint:n,useFipsEndpoint:o,urlParser:c,tls:d}=e;return Object.assign(e,{tls:d??true,endpoint:n?i.normalizeProvider(typeof n==="string"?c(n):n):()=>getEndpointFromRegion({...e,useDualstackEndpoint:t,useFipsEndpoint:o}),isCustomEndpoint:!!n,useDualstackEndpoint:t})};const $="AWS_REGION";const V="region";const ee={environmentVariableSelector:e=>e[$],configFileSelector:e=>e[V],default:()=>{throw new Error("Region is missing")}};const te={preferredFile:"credentials"};const re=new Set;const checkRegion=(e,t=c.isValidHostLabel)=>{if(!re.has(e)&&!t(e)){if(e==="*"){console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`)}else{throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`)}}else{re.add(e)}};const isFipsRegion=e=>typeof e==="string"&&(e.startsWith("fips-")||e.endsWith("-fips"));const getRealRegion=e=>isFipsRegion(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;const resolveRegionConfig=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t){throw new Error("Region is missing")}return Object.assign(e,{region:async()=>{const e=typeof t==="function"?await t():t;const n=getRealRegion(e);checkRegion(n);return n},useFipsEndpoint:async()=>{const e=typeof t==="string"?t:await t();if(isFipsRegion(e)){return true}return typeof n!=="function"?Promise.resolve(!!n):n()}})};const getHostnameFromVariants=(e=[],{useFipsEndpoint:t,useDualstackEndpoint:n})=>e.find((({tags:e})=>t===e.includes("fips")&&n===e.includes("dualstack")))?.hostname;const getResolvedHostname=(e,{regionHostname:t,partitionHostname:n})=>t?t:n?n.replace("{region}",e):undefined;const getResolvedPartition=(e,{partitionHash:t})=>Object.keys(t||{}).find((n=>t[n].regions.includes(e)))??"aws";const getResolvedSigningRegion=(e,{signingRegion:t,regionRegex:n,useFipsEndpoint:o})=>{if(t){return t}else if(o){const t=n.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\.");const o=e.match(t);if(o){return o[0].slice(1,-1)}}};const getRegionInfo=(e,{useFipsEndpoint:t=false,useDualstackEndpoint:n=false,signingService:o,regionHash:i,partitionHash:c})=>{const d=getResolvedPartition(e,{partitionHash:c});const p=e in i?e:c[d]?.endpoint??e;const y={useFipsEndpoint:t,useDualstackEndpoint:n};const C=getHostnameFromVariants(i[p]?.variants,y);const Q=getHostnameFromVariants(c[d]?.variants,y);const v=getResolvedHostname(p,{regionHostname:C,partitionHostname:Q});if(v===undefined){throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:p,useFipsEndpoint:t,useDualstackEndpoint:n}}`)}const D=getResolvedSigningRegion(v,{signingRegion:i[p]?.signingRegion,regionRegex:c[d].regionRegex,useFipsEndpoint:t});return{partition:d,signingService:o,hostname:v,...D&&{signingRegion:D},...i[p]?.signingService&&{signingService:i[p].signingService}}};t.CONFIG_USE_DUALSTACK_ENDPOINT=p;t.CONFIG_USE_FIPS_ENDPOINT=v;t.DEFAULT_USE_DUALSTACK_ENDPOINT=y;t.DEFAULT_USE_FIPS_ENDPOINT=D;t.ENV_USE_DUALSTACK_ENDPOINT=d;t.ENV_USE_FIPS_ENDPOINT=Q;t.NODE_REGION_CONFIG_FILE_OPTIONS=te;t.NODE_REGION_CONFIG_OPTIONS=ee;t.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS=C;t.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS=k;t.REGION_ENV_NAME=$;t.REGION_INI_NAME=V;t.getRegionInfo=getRegionInfo;t.resolveCustomEndpointsConfig=resolveCustomEndpointsConfig;t.resolveEndpointsConfig=resolveEndpointsConfig;t.resolveRegionConfig=resolveRegionConfig},402:(e,t,n)=>{var o=n(690);var i=n(6324);var c=n(3255);var d=n(2356);var p=n(3422);const getSmithyContext=e=>e[o.SMITHY_CONTEXT_KEY]||(e[o.SMITHY_CONTEXT_KEY]={});const resolveAuthOptions=(e,t)=>{if(!t||t.length===0){return e}const n=[];for(const o of t){for(const t of e){const e=t.schemeId.split("#")[1];if(e===o){n.push(t)}}}for(const t of e){if(!n.find((({schemeId:e})=>e===t.schemeId))){n.push(t)}}return n};function convertHttpAuthSchemesToMap(e){const t=new Map;for(const n of e){t.set(n.schemeId,n)}return t}const httpAuthSchemeMiddleware=(e,t)=>(n,o)=>async c=>{const d=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,o,c.input));const p=e.authSchemePreference?await e.authSchemePreference():[];const y=resolveAuthOptions(d,p);const C=convertHttpAuthSchemesToMap(e.httpAuthSchemes);const Q=i.getSmithyContext(o);const v=[];for(const n of y){const i=C.get(n.schemeId);if(!i){v.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const c=i.identityProvider(await t.identityProviderConfigProvider(e));if(!c){v.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:d={},signingProperties:p={}}=n.propertiesExtractor?.(e,o)||{};n.identityProperties=Object.assign(n.identityProperties||{},d);n.signingProperties=Object.assign(n.signingProperties||{},p);Q.selectedHttpAuthScheme={httpAuthOption:n,identity:await c(n.identityProperties),signer:i.signer};break}if(!Q.selectedHttpAuthScheme){throw new Error(v.join("\n"))}return n(c)};const y={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:true,relation:"before",toMiddleware:"endpointV2Middleware"};const getHttpAuthSchemeEndpointRuleSetPlugin=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:o=>{o.addRelativeTo(httpAuthSchemeMiddleware(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),y)}});const C={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:true,relation:"before",toMiddleware:c.serializerMiddlewareOption.name};const getHttpAuthSchemePlugin=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:o=>{o.addRelativeTo(httpAuthSchemeMiddleware(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),C)}});const defaultErrorHandler=e=>e=>{throw e};const defaultSuccessHandler=(e,t)=>{};const httpSigningMiddleware=e=>(e,t)=>async n=>{if(!d.HttpRequest.isInstance(n.request)){return e(n)}const o=i.getSmithyContext(t);const c=o.selectedHttpAuthScheme;if(!c){throw new Error(`No HttpAuthScheme was selected: unable to sign request`)}const{httpAuthOption:{signingProperties:p={}},identity:y,signer:C}=c;const Q=await e({...n,request:await C.sign(n.request,y,p)}).catch((C.errorHandler||defaultErrorHandler)(p));(C.successHandler||defaultSuccessHandler)(Q.response,p);return Q};const Q={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:true,relation:"after",toMiddleware:"retryMiddleware"};const getHttpSigningPlugin=e=>({applyToStack:e=>{e.addRelativeTo(httpSigningMiddleware(),Q)}});const normalizeProvider=e=>{if(typeof e==="function")return e;const t=Promise.resolve(e);return()=>t};const makePagedClientRequest=async(e,t,n,o=e=>e,...i)=>{let c=new e(n);c=o(c)??c;return await t.send(c,...i)};function createPaginator(e,t,n,o,i){return async function*paginateOperation(c,d,...p){const y=d;let C=c.startingToken??y[n];let Q=true;let v;while(Q){y[n]=C;if(i){y[i]=y[i]??c.pageSize}if(c.client instanceof e){v=await makePagedClientRequest(t,c.client,d,c.withCommand,...p)}else{throw new Error(`Invalid client, expected instance of ${e.name}`)}yield v;const D=C;C=get(v,o);Q=!!(C&&(!c.stopOnSameToken||C!==D))}return undefined}}const get=(e,t)=>{let n=e;const o=t.split(".");for(const e of o){if(!n||typeof n!=="object"){return undefined}n=n[e]}return n};function setFeature(e,t,n){if(!e.__smithy_context){e.__smithy_context={features:{}}}else if(!e.__smithy_context.features){e.__smithy_context.features={}}e.__smithy_context.features[t]=n}class DefaultIdentityProviderConfig{authSchemes=new Map;constructor(e){for(const[t,n]of Object.entries(e)){if(n!==undefined){this.authSchemes.set(t,n)}}}getIdentityProvider(e){return this.authSchemes.get(e)}}class HttpApiKeyAuthSigner{async sign(e,t,n){if(!n){throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing")}if(!n.name){throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing")}if(!n.in){throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing")}if(!t.apiKey){throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined")}const i=d.HttpRequest.clone(e);if(n.in===o.HttpApiKeyAuthLocation.QUERY){i.query[n.name]=t.apiKey}else if(n.in===o.HttpApiKeyAuthLocation.HEADER){i.headers[n.name]=n.scheme?`${n.scheme} ${t.apiKey}`:t.apiKey}else{throw new Error("request can only be signed with `apiKey` locations `query` or `header`, "+"but found: `"+n.in+"`")}return i}}class HttpBearerAuthSigner{async sign(e,t,n){const o=d.HttpRequest.clone(e);if(!t.token){throw new Error("request could not be signed with `token` since the `token` is not defined")}o.headers["Authorization"]=`Bearer ${t.token}`;return o}}class NoAuthSigner{async sign(e,t,n){return e}}const createIsIdentityExpiredFunction=e=>function isIdentityExpired(t){return doesIdentityRequireRefresh(t)&&t.expiration.getTime()-Date.now()e.expiration!==undefined;const memoizeIdentityProvider=(e,t,n)=>{if(e===undefined){return undefined}const o=typeof e!=="function"?async()=>Promise.resolve(e):e;let i;let c;let d;let p=false;const coalesceProvider=async e=>{if(!c){c=o(e)}try{i=await c;d=true;p=false}finally{c=undefined}return i};if(t===undefined){return async e=>{if(!d||e?.forceRefresh){i=await coalesceProvider(e)}return i}}return async e=>{if(!d||e?.forceRefresh){i=await coalesceProvider(e)}if(p){return i}if(!n(i)){p=true;return i}if(t(i)){await coalesceProvider(e);return i}return i}};t.requestBuilder=p.requestBuilder;t.DefaultIdentityProviderConfig=DefaultIdentityProviderConfig;t.EXPIRATION_MS=v;t.HttpApiKeyAuthSigner=HttpApiKeyAuthSigner;t.HttpBearerAuthSigner=HttpBearerAuthSigner;t.NoAuthSigner=NoAuthSigner;t.createIsIdentityExpiredFunction=createIsIdentityExpiredFunction;t.createPaginator=createPaginator;t.doesIdentityRequireRefresh=doesIdentityRequireRefresh;t.getHttpAuthSchemeEndpointRuleSetPlugin=getHttpAuthSchemeEndpointRuleSetPlugin;t.getHttpAuthSchemePlugin=getHttpAuthSchemePlugin;t.getHttpSigningPlugin=getHttpSigningPlugin;t.getSmithyContext=getSmithyContext;t.httpAuthSchemeEndpointRuleSetMiddlewareOptions=y;t.httpAuthSchemeMiddleware=httpAuthSchemeMiddleware;t.httpAuthSchemeMiddlewareOptions=C;t.httpSigningMiddleware=httpSigningMiddleware;t.httpSigningMiddlewareOptions=Q;t.isIdentityExpired=D;t.memoizeIdentityProvider=memoizeIdentityProvider;t.normalizeProvider=normalizeProvider;t.setFeature=setFeature},4645:(e,t,n)=>{var o=n(2430);var i=n(1577);var c=n(3422);var d=n(2356);var p=n(2098);var y=n(6890);var C=n(6324);var Q=n(8385);const v=0;const D=1;const k=2;const $=3;const V=4;const ee=5;const te=6;const re=7;const ne=20;const se=21;const oe=22;const ie=23;const ae=24;const ce=25;const le=26;const ue=27;const de=31;function alloc(e){return typeof Buffer!=="undefined"?Buffer.alloc(e):new Uint8Array(e)}const pe=Symbol("@smithy/core/cbor::tagSymbol");function tag(e){e[pe]=true;return e}const Ae=typeof TextDecoder!=="undefined";const me=typeof Buffer!=="undefined";let ge=alloc(0);let fe=new DataView(ge.buffer,ge.byteOffset,ge.byteLength);const he=Ae?new TextDecoder:null;let ye=0;function setPayload(e){ge=e;fe=new DataView(ge.buffer,ge.byteOffset,ge.byteLength)}function decode(e,t){if(e>=t){throw new Error("unexpected end of (decode) payload.")}const n=(ge[e]&224)>>5;const i=ge[e]&31;switch(n){case v:case D:case te:let c;let d;if(i<24){c=i;d=1}else{switch(i){case ae:case ce:case le:case ue:const n=Ee[i];const o=n+1;d=o;if(t-e>7;const o=(e&124)>>2;const i=(e&3)<<8|t;const c=n===0?1:-1;let d;let p;if(o===0){if(i===0){return 0}else{d=Math.pow(2,1-15);p=0}}else if(o===31){if(i===0){return c*Infinity}else{return NaN}}else{d=Math.pow(2,o-15);p=1}p+=i/1024;return c*(d*p)}function decodeCount(e,t){const n=ge[e]&31;if(n<24){ye=1;return n}if(n===ae||n===ce||n===le||n===ue){const o=Ee[n];ye=o+1;if(t-e>5;const c=ge[e]&31;if(i!==$){throw new Error(`unexpected major type ${i} in indefinite string.`)}if(c===de){throw new Error("nested indefinite string.")}const d=decodeUnstructuredByteString(e,t);const p=ye;e+=p;for(let e=0;e>5;const c=ge[e]&31;if(i!==k){throw new Error(`unexpected major type ${i} in indefinite string.`)}if(c===de){throw new Error("nested indefinite string.")}const d=decodeUnstructuredByteString(e,t);const p=ye;e+=p;for(let e=0;e=t){throw new Error("unexpected end of map payload.")}const n=(ge[e]&224)>>5;if(n!==$){throw new Error(`unexpected major type ${n} for map key at index ${e}.`)}const o=decode(e,t);e+=ye;const i=decode(e,t);e+=ye;c[o]=i}ye=o+(e-i);return c}function decodeMapIndefinite(e,t){e+=1;const n=e;const o={};for(;e=t){throw new Error("unexpected end of map payload.")}if(ge[e]===255){ye=e-n+2;return o}const i=(ge[e]&224)>>5;if(i!==$){throw new Error(`unexpected major type ${i} for map key.`)}const c=decode(e,t);e+=ye;const d=decode(e,t);e+=ye;o[c]=d}throw new Error("expected break marker.")}function decodeSpecial(e,t){const n=ge[e]&31;switch(n){case se:case ne:ye=1;return n===se;case oe:ye=1;return null;case ie:ye=1;return null;case ce:if(t-e<3){throw new Error("incomplete float16 at end of buf.")}ye=3;return bytesToFloat16(ge[e+1],ge[e+2]);case le:if(t-e<5){throw new Error("incomplete float32 at end of buf.")}ye=5;return fe.getFloat32(e+1);case ue:if(t-e<9){throw new Error("incomplete float64 at end of buf.")}ye=9;return fe.getFloat64(e+1);default:throw new Error(`unexpected minor value ${n}.`)}}function castBigInt(e){if(typeof e==="number"){return e}const t=Number(e);if(Number.MIN_SAFE_INTEGER<=t&&t<=Number.MAX_SAFE_INTEGER){return t}return e}const Ce=typeof Buffer!=="undefined";const Ie=2048;let be=alloc(Ie);let Se=new DataView(be.buffer,be.byteOffset,be.byteLength);let Be=0;function ensureSpace(e){const t=be.byteLength-Be;if(t=0;const n=t?v:D;const o=t?e:-e-1;if(o<24){be[Be++]=n<<5|o}else if(o<256){be[Be++]=n<<5|24;be[Be++]=o}else if(o<65536){be[Be++]=n<<5|ce;be[Be++]=o>>8;be[Be++]=o}else if(o<4294967296){be[Be++]=n<<5|le;Se.setUint32(Be,o);Be+=4}else{be[Be++]=n<<5|ue;Se.setBigUint64(Be,BigInt(o));Be+=8}continue}be[Be++]=re<<5|ue;Se.setFloat64(Be,e);Be+=8;continue}else if(typeof e==="bigint"){const t=e>=0;const n=t?v:D;const o=t?e:-e-BigInt(1);const i=Number(o);if(i<24){be[Be++]=n<<5|i}else if(i<256){be[Be++]=n<<5|24;be[Be++]=i}else if(i<65536){be[Be++]=n<<5|ce;be[Be++]=i>>8;be[Be++]=i&255}else if(i<4294967296){be[Be++]=n<<5|le;Se.setUint32(Be,i);Be+=4}else if(o=0){n[n.byteLength-c]=Number(i&BigInt(255));i>>=BigInt(8)}ensureSpace(n.byteLength*2);be[Be++]=t?194:195;if(Ce){encodeHeader(k,Buffer.byteLength(n))}else{encodeHeader(k,n.byteLength)}be.set(n,Be);Be+=n.byteLength}continue}else if(e===null){be[Be++]=re<<5|oe;continue}else if(typeof e==="boolean"){be[Be++]=re<<5|(e?se:ne);continue}else if(typeof e==="undefined"){throw new Error("@smithy/core/cbor: client may not serialize undefined value.")}else if(Array.isArray(e)){for(let n=e.length-1;n>=0;--n){t.push(e[n])}encodeHeader(V,e.length);continue}else if(typeof e.byteLength==="number"){ensureSpace(e.length*2);encodeHeader(k,e.length);be.set(e,Be);Be+=e.byteLength;continue}else if(typeof e==="object"){if(e instanceof o.NumericValue){const n=e.string.indexOf(".");const o=n===-1?0:n-e.string.length+1;const i=BigInt(e.string.replace(".",""));be[Be++]=196;t.push(i);t.push(o);encodeHeader(V,2);continue}if(e[pe]){if("tag"in e&&"value"in e){t.push(e.value);encodeHeader(te,e.tag);continue}else{throw new Error("tag encountered with missing fields, need 'tag' and 'value', found: "+JSON.stringify(e))}}const n=Object.keys(e);for(let o=n.length-1;o>=0;--o){const i=n[o];t.push(e[i]);t.push(i)}encodeHeader(ee,n.length);continue}throw new Error(`data type ${e?.constructor?.name??typeof e} not compatible for encoding.`)}}const we={deserialize(e){setPayload(e);return decode(0,e.length)},serialize(e){try{encode(e);return toUint8Array()}catch(e){toUint8Array();throw e}},resizeEncodingBuffer(e){resize(e)}};const parseCborBody=(e,t)=>c.collectBody(e,t).then((async e=>{if(e.length){try{return we.deserialize(e)}catch(n){Object.defineProperty(n,"$responseBodyText",{value:t.utf8Encoder(e)});throw n}}return{}}));const dateToTag=e=>tag({tag:1,value:e.getTime()/1e3});const parseCborErrorBody=async(e,t)=>{const n=await parseCborBody(e,t);n.message=n.message??n.Message;return n};const loadSmithyRpcV2CborErrorCode=(e,t)=>{const sanitizeErrorCode=e=>{let t=e;if(typeof t==="number"){t=t.toString()}if(t.indexOf(",")>=0){t=t.split(",")[0]}if(t.indexOf(":")>=0){t=t.split(":")[0]}if(t.indexOf("#")>=0){t=t.split("#")[1]}return t};if(t["__type"]!==undefined){return sanitizeErrorCode(t["__type"])}const n=Object.keys(t).find((e=>e.toLowerCase()==="code"));if(n&&t[n]!==undefined){return sanitizeErrorCode(t[n])}};const checkCborResponse=e=>{if(String(e.headers["smithy-protocol"]).toLowerCase()!=="rpc-v2-cbor"){throw new Error("Malformed RPCv2 CBOR response, status: "+e.statusCode)}};const buildHttpRpcRequest=async(e,t,n,o,i)=>{const{hostname:c,protocol:y="https",port:C,path:Q}=await e.endpoint();const v={protocol:y,hostname:c,port:C,method:"POST",path:Q.endsWith("/")?Q.slice(0,-1)+n:Q+n,headers:{...t}};if(o!==undefined){v.hostname=o}if(i!==undefined){v.body=i;try{v.headers["content-length"]=String(p.calculateBodyLength(i))}catch(e){}}return new d.HttpRequest(v)};class CborCodec extends c.SerdeContext{createSerializer(){const e=new CborShapeSerializer;e.setSerdeContext(this.serdeContext);return e}createDeserializer(){const e=new CborShapeDeserializer;e.setSerdeContext(this.serdeContext);return e}}class CborShapeSerializer extends c.SerdeContext{value;write(e,t){this.value=this.serialize(e,t)}serialize(e,t){const n=y.NormalizedSchema.of(e);if(t==null){if(n.isIdempotencyToken()){return o.generateIdempotencyToken()}return t}if(n.isBlobSchema()){if(typeof t==="string"){return(this.serdeContext?.base64Decoder??Q.fromBase64)(t)}return t}if(n.isTimestampSchema()){if(typeof t==="number"||typeof t==="bigint"){return dateToTag(new Date(Number(t)/1e3|0))}return dateToTag(t)}if(typeof t==="function"||typeof t==="object"){const e=t;if(n.isListSchema()&&Array.isArray(e)){const t=!!n.getMergedTraits().sparse;const o=[];let i=0;for(const c of e){const e=this.serialize(n.getValueSchema(),c);if(e!=null||t){o[i++]=e}}return o}if(e instanceof Date){return dateToTag(e)}const o={};if(n.isMapSchema()){const t=!!n.getMergedTraits().sparse;for(const i of Object.keys(e)){const c=this.serialize(n.getValueSchema(),e[i]);if(c!=null||t){o[i]=c}}}else if(n.isStructSchema()){for(const[t,i]of n.structIterator()){const n=this.serialize(i,e[t]);if(n!=null){o[t]=n}}const t=n.isUnionSchema();if(t&&Array.isArray(e.$unknown)){const[t,n]=e.$unknown;o[t]=n}else if(typeof e.__type==="string"){for(const[t,n]of Object.entries(e)){if(!(t in o)){o[t]=this.serialize(15,n)}}}}else if(n.isDocumentSchema()){for(const t of Object.keys(e)){o[t]=this.serialize(n.getValueSchema(),e[t])}}else if(n.isBigDecimalSchema()){return e}return o}return t}flush(){const e=we.serialize(this.value);this.value=undefined;return e}}class CborShapeDeserializer extends c.SerdeContext{read(e,t){const n=we.deserialize(t);return this.readValue(e,n)}readValue(e,t){const n=y.NormalizedSchema.of(e);if(n.isTimestampSchema()){if(typeof t==="number"){return o._parseEpochTimestamp(t)}if(typeof t==="object"){if(t.tag===1&&"value"in t){return o._parseEpochTimestamp(t.value)}}}if(n.isBlobSchema()){if(typeof t==="string"){return(this.serdeContext?.base64Decoder??Q.fromBase64)(t)}return t}if(typeof t==="undefined"||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="bigint"||typeof t==="symbol"){return t}else if(typeof t==="object"){if(t===null){return null}if("byteLength"in t){return t}if(t instanceof Date){return t}if(n.isDocumentSchema()){return t}if(n.isListSchema()){const e=[];const o=n.getValueSchema();const i=!!n.getMergedTraits().sparse;for(const n of t){const t=this.readValue(o,n);if(t!=null||i){e.push(t)}}return e}const e={};if(n.isMapSchema()){const o=!!n.getMergedTraits().sparse;const i=n.getValueSchema();for(const n of Object.keys(t)){const c=this.readValue(i,t[n]);if(c!=null||o){e[n]=c}}}else if(n.isStructSchema()){const o=n.isUnionSchema();let i;if(o){i=new Set(Object.keys(t).filter((e=>e!=="__type")))}for(const[c,d]of n.structIterator()){if(o){i.delete(c)}if(t[c]!=null){e[c]=this.readValue(d,t[c])}}if(o&&i?.size===1&&Object.keys(e).length===0){const n=i.values().next().value;e.$unknown=[n,t[n]]}else if(typeof t.__type==="string"){for(const[n,o]of Object.entries(t)){if(!(n in e)){e[n]=o}}}}else if(t instanceof o.NumericValue){return t}return e}else{return t}}}class SmithyRpcV2CborProtocol extends c.RpcProtocol{codec=new CborCodec;serializer=this.codec.createSerializer();deserializer=this.codec.createDeserializer();constructor({defaultNamespace:e,errorTypeRegistries:t}){super({defaultNamespace:e,errorTypeRegistries:t})}getShapeId(){return"smithy.protocols#rpcv2Cbor"}getPayloadCodec(){return this.codec}async serializeRequest(e,t,n){const o=await super.serializeRequest(e,t,n);Object.assign(o.headers,{"content-type":this.getDefaultContentType(),"smithy-protocol":"rpc-v2-cbor",accept:this.getDefaultContentType()});if(y.deref(e.input)==="unit"){delete o.body;delete o.headers["content-type"]}else{if(!o.body){this.serializer.write(15,{});o.body=this.serializer.flush()}try{o.headers["content-length"]=String(o.body.byteLength)}catch(e){}}const{service:i,operation:c}=C.getSmithyContext(n);const d=`/service/${i}/operation/${c}`;if(o.path.endsWith("/")){o.path+=d.slice(1)}else{o.path+=d}return o}async deserializeResponse(e,t,n){return super.deserializeResponse(e,t,n)}async handleError(e,t,n,o,i){const c=loadSmithyRpcV2CborErrorCode(n,o)??"Unknown";const d={$metadata:i,$fault:n.statusCode<=500?"client":"server"};let p=this.options.defaultNamespace;if(c.includes("#")){[p]=c.split("#")}const C=this.compositeErrorRegistry;const Q=y.TypeRegistry.for(p);C.copyFrom(Q);let v;try{v=C.getSchema(c)}catch(e){if(o.Message){o.message=o.Message}const t=y.TypeRegistry.for("smithy.ts.sdk.synthetic."+p);C.copyFrom(t);const n=C.getBaseException();if(n){const e=C.getErrorCtor(n);throw Object.assign(new e({name:c}),d,o)}throw Object.assign(new Error(c),d,o)}const D=y.NormalizedSchema.of(v);const k=C.getErrorCtor(v);const $=o.message??o.Message??"Unknown";const V=new k($);const ee={};for(const[e,t]of D.structIterator()){ee[e]=this.deserializer.readValue(t,o[e])}throw Object.assign(V,d,{$fault:D.getMergedTraits().error,message:$},ee)}getDefaultContentType(){return"application/cbor"}}t.CborCodec=CborCodec;t.CborShapeDeserializer=CborShapeDeserializer;t.CborShapeSerializer=CborShapeSerializer;t.SmithyRpcV2CborProtocol=SmithyRpcV2CborProtocol;t.buildHttpRpcRequest=buildHttpRpcRequest;t.cbor=we;t.checkCborResponse=checkCborResponse;t.dateToTag=dateToTag;t.loadSmithyRpcV2CborErrorCode=loadSmithyRpcV2CborErrorCode;t.parseCborBody=parseCborBody;t.parseCborErrorBody=parseCborErrorBody;t.tag=tag;t.tagSymbol=pe},3422:(e,t,n)=>{var o=n(4252);var i=n(6890);var c=n(2430);var d=n(2356);var p=n(8385);var y=n(1577);const collectBody=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array){return o.Uint8ArrayBlobAdapter.mutate(e)}if(!e){return o.Uint8ArrayBlobAdapter.mutate(new Uint8Array)}const n=t.streamCollector(e);return o.Uint8ArrayBlobAdapter.mutate(await n)};function extendedEncodeURIComponent(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}class SerdeContext{serdeContext;setSerdeContext(e){this.serdeContext=e}}class HttpProtocol extends SerdeContext{options;compositeErrorRegistry;constructor(e){super();this.options=e;this.compositeErrorRegistry=i.TypeRegistry.for(e.defaultNamespace);for(const t of e.errorTypeRegistries??[]){this.compositeErrorRegistry.copyFrom(t)}}getRequestType(){return d.HttpRequest}getResponseType(){return d.HttpResponse}setSerdeContext(e){this.serdeContext=e;this.serializer.setSerdeContext(e);this.deserializer.setSerdeContext(e);if(this.getPayloadCodec()){this.getPayloadCodec().setSerdeContext(e)}}updateServiceEndpoint(e,t){if("url"in t){e.protocol=t.url.protocol;e.hostname=t.url.hostname;e.port=t.url.port?Number(t.url.port):undefined;e.path=t.url.pathname;e.fragment=t.url.hash||void 0;e.username=t.url.username||void 0;e.password=t.url.password||void 0;if(!e.query){e.query={}}for(const[n,o]of t.url.searchParams.entries()){e.query[n]=o}return e}else{e.protocol=t.protocol;e.hostname=t.hostname;e.port=t.port?Number(t.port):undefined;e.path=t.path;e.query={...t.query};return e}}setHostPrefix(e,t,n){if(this.serdeContext?.disableHostPrefix){return}const o=i.NormalizedSchema.of(t.input);const c=i.translateTraits(t.traits??{});if(c.endpoint){let t=c.endpoint?.[0];if(typeof t==="string"){const i=[...o.structIterator()].filter((([,e])=>e.getMergedTraits().hostLabel));for(const[e]of i){const o=n[e];if(typeof o!=="string"){throw new Error(`@smithy/core/schema - ${e} in input must be a string as hostLabel.`)}t=t.replace(`{${e}}`,o)}e.hostname=t+e.hostname}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){const o=await this.loadEventStreamCapability();return o.serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n}){const o=await this.loadEventStreamCapability();return o.deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await n.e(579).then(n.t.bind(n,6579,19));return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,n,o,i){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller){throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.")}return e.eventStreamMarshaller}}class HttpBindingProtocol extends HttpProtocol{async serializeRequest(e,t,n){const o={...t??{}};const c=this.serializer;const p={};const y={};const C=await n.endpoint();const Q=i.NormalizedSchema.of(e?.input);const v=[];const D=[];let k=false;let $;const V=new d.HttpRequest({protocol:"",hostname:"",port:undefined,path:"",fragment:undefined,query:p,headers:y,body:undefined});if(C){this.updateServiceEndpoint(V,C);this.setHostPrefix(V,e,o);const t=i.translateTraits(e.traits);if(t.http){V.method=t.http[0];const[e,n]=t.http[1].split("?");if(V.path=="/"){V.path=e}else{V.path+=e}const o=new URLSearchParams(n??"");Object.assign(p,Object.fromEntries(o))}}for(const[e,t]of Q.structIterator()){const n=t.getMergedTraits()??{};const i=o[e];if(i==null&&!t.isIdempotencyToken()){if(n.httpLabel){if(V.path.includes(`{${e}+}`)||V.path.includes(`{${e}}`)){throw new Error(`No value provided for input HTTP label: ${e}.`)}}continue}if(n.httpPayload){const n=t.isStreaming();if(n){const n=t.isStructSchema();if(n){if(o[e]){$=await this.serializeEventStream({eventStream:o[e],requestSchema:Q})}}else{$=i}}else{c.write(t,i);$=c.flush()}delete o[e]}else if(n.httpLabel){c.write(t,i);const n=c.flush();if(V.path.includes(`{${e}+}`)){V.path=V.path.replace(`{${e}+}`,n.split("/").map(extendedEncodeURIComponent).join("/"))}else if(V.path.includes(`{${e}}`)){V.path=V.path.replace(`{${e}}`,extendedEncodeURIComponent(n))}delete o[e]}else if(n.httpHeader){c.write(t,i);y[n.httpHeader.toLowerCase()]=String(c.flush());delete o[e]}else if(typeof n.httpPrefixHeaders==="string"){for(const[e,o]of Object.entries(i)){const i=n.httpPrefixHeaders+e;c.write([t.getValueSchema(),{httpHeader:i}],o);y[i.toLowerCase()]=c.flush()}delete o[e]}else if(n.httpQuery||n.httpQueryParams){this.serializeQuery(t,i,p);delete o[e]}else{k=true;v.push(e);D.push(t)}}if(k&&o){const[e,t]=(Q.getName(true)??"#Unknown").split("#");const n=Q.getSchema()[6];const i=[3,e,t,Q.getMergedTraits(),v,D,undefined];if(n){i[6]=n}else{i.pop()}c.write(i,o);$=c.flush()}V.headers=y;V.query=p;V.body=$;return V}serializeQuery(e,t,n){const o=this.serializer;const i=e.getMergedTraits();if(i.httpQueryParams){for(const[o,c]of Object.entries(t)){if(!(o in n)){const t=e.getValueSchema();Object.assign(t.getMergedTraits(),{...i,httpQuery:o,httpQueryParams:undefined});this.serializeQuery(t,c,n)}}return}if(e.isListSchema()){const c=!!e.getMergedTraits().sparse;const d=[];for(const n of t){o.write([e.getValueSchema(),i],n);const t=o.flush();if(c||t!==undefined){d.push(t)}}n[i.httpQuery]=d}else{o.write([e,i],t);n[i.httpQuery]=o.flush()}}async deserializeResponse(e,t,n){const o=this.deserializer;const c=i.NormalizedSchema.of(e.output);const d={};if(n.statusCode>=300){const i=await collectBody(n.body,t);if(i.byteLength>0){Object.assign(d,await o.read(15,i))}await this.handleError(e,t,n,d,this.deserializeMetadata(n));throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const e in n.headers){const t=n.headers[e];delete n.headers[e];n.headers[e.toLowerCase()]=t}const p=await this.deserializeHttpMessage(c,t,n,d);if(p.length){const e=await collectBody(n.body,t);if(e.byteLength>0){const t=await o.read(c,e);for(const e of p){if(t[e]!=null){d[e]=t[e]}}}}else if(p.discardResponseBody){await collectBody(n.body,t)}d.$metadata=this.deserializeMetadata(n);return d}async deserializeHttpMessage(e,t,n,d,p){let y;if(d instanceof Set){y=p}else{y=d}let C=true;const Q=this.deserializer;const v=i.NormalizedSchema.of(e);const D=[];for(const[e,i]of v.structIterator()){const d=i.getMemberTraits();if(d.httpPayload){C=false;const c=i.isStreaming();if(c){const t=i.isStructSchema();if(t){y[e]=await this.deserializeEventStream({response:n,responseSchema:v})}else{y[e]=o.sdkStreamMixin(n.body)}}else if(n.body){const o=await collectBody(n.body,t);if(o.byteLength>0){y[e]=await Q.read(i,o)}}}else if(d.httpHeader){const t=String(d.httpHeader).toLowerCase();const o=n.headers[t];if(null!=o){if(i.isListSchema()){const n=i.getValueSchema();n.getMergedTraits().httpHeader=t;let d;if(n.isTimestampSchema()&&n.getSchema()===4){d=c.splitEvery(o,",",2)}else{d=c.splitHeader(o)}const p=[];for(const e of d){p.push(await Q.read(n,e.trim()))}y[e]=p}else{y[e]=await Q.read(i,o)}}}else if(d.httpPrefixHeaders!==undefined){y[e]={};for(const[t,o]of Object.entries(n.headers)){if(t.startsWith(d.httpPrefixHeaders)){const n=i.getValueSchema();n.getMergedTraits().httpHeader=t;y[e][t.slice(d.httpPrefixHeaders.length)]=await Q.read(n,o)}}}else if(d.httpResponseCode){y[e]=n.statusCode}else{D.push(e)}}D.discardResponseBody=C;return D}}class RpcProtocol extends HttpProtocol{async serializeRequest(e,t,n){const o=this.serializer;const c={};const p={};const y=await n.endpoint();const C=i.NormalizedSchema.of(e?.input);const Q=C.getSchema();let v;const D=new d.HttpRequest({protocol:"",hostname:"",port:undefined,path:"/",fragment:undefined,query:c,headers:p,body:undefined});if(y){this.updateServiceEndpoint(D,y);this.setHostPrefix(D,e,t)}const k={...t};if(t){const e=C.getEventStreamMember();if(e){if(k[e]){const t={};for(const[n,i]of C.structIterator()){if(n!==e&&k[n]){o.write(i,k[n]);t[n]=o.flush()}}v=await this.serializeEventStream({eventStream:k[e],requestSchema:C,initialRequest:t})}}else{o.write(Q,k);v=o.flush()}}D.headers=p;D.query=c;D.body=v;D.method="POST";return D}async deserializeResponse(e,t,n){const o=this.deserializer;const c=i.NormalizedSchema.of(e.output);const d={};if(n.statusCode>=300){const i=await collectBody(n.body,t);if(i.byteLength>0){Object.assign(d,await o.read(15,i))}await this.handleError(e,t,n,d,this.deserializeMetadata(n));throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const e in n.headers){const t=n.headers[e];delete n.headers[e];n.headers[e.toLowerCase()]=t}const p=c.getEventStreamMember();if(p){d[p]=await this.deserializeEventStream({response:n,responseSchema:c,initialResponseContainer:d})}else{const e=await collectBody(n.body,t);if(e.byteLength>0){Object.assign(d,await o.read(c,e))}}d.$metadata=this.deserializeMetadata(n);return d}}const resolvedPath=(e,t,n,o,i,c)=>{if(t!=null&&t[n]!==undefined){const t=o();if(t==null||t.length<=0){throw new Error("Empty value provided for input HTTP label: "+n+".")}e=e.replace(i,c?t.split("/").map((e=>extendedEncodeURIComponent(e))).join("/"):extendedEncodeURIComponent(t))}else{throw new Error("No value provided for input HTTP label: "+n+".")}return e};function requestBuilder(e,t){return new RequestBuilder(e,t)}class RequestBuilder{input;context;query={};method="";headers={};path="";body=null;hostname="";resolvePathStack=[];constructor(e,t){this.input=e;this.context=t}async build(){const{hostname:e,protocol:t="https",port:n,path:o}=await this.context.endpoint();this.path=o;for(const e of this.resolvePathStack){e(this.path)}return new d.HttpRequest({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){this.hostname=e;return this}bp(e){this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e}));return this}p(e,t,n,o){this.resolvePathStack.push((i=>{this.path=resolvedPath(i,this.input,e,t,n,o)}));return this}h(e){this.headers=e;return this}q(e){this.query=e;return this}b(e){this.body=e;return this}m(e){this.method=e;return this}}function determineTimestampFormat(e,t){if(t.timestampFormat.useTrait){if(e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7)){return e.getSchema()}}const{httpLabel:n,httpPrefixHeaders:o,httpHeader:i,httpQuery:c}=e.getMergedTraits();const d=t.httpBindings?typeof o==="string"||Boolean(i)?6:Boolean(c)||Boolean(n)?5:undefined:undefined;return d??t.timestampFormat.default}class FromStringShapeDeserializer extends SerdeContext{settings;constructor(e){super();this.settings=e}read(e,t){const n=i.NormalizedSchema.of(e);if(n.isListSchema()){return c.splitHeader(t).map((e=>this.read(n.getValueSchema(),e)))}if(n.isBlobSchema()){return(this.serdeContext?.base64Decoder??p.fromBase64)(t)}if(n.isTimestampSchema()){const e=determineTimestampFormat(n,this.settings);switch(e){case 5:return c._parseRfc3339DateTimeWithOffset(t);case 6:return c._parseRfc7231DateTime(t);case 7:return c._parseEpochTimestamp(t);default:console.warn("Missing timestamp format, parsing value with Date constructor:",t);return new Date(t)}}if(n.isStringSchema()){const e=n.getMergedTraits().mediaType;let o=t;if(e){if(n.getMergedTraits().httpHeader){o=this.base64ToUtf8(o)}const t=e==="application/json"||e.endsWith("+json");if(t){o=c.LazyJsonString.from(o)}return o}}if(n.isNumericSchema()){return Number(t)}if(n.isBigIntegerSchema()){return BigInt(t)}if(n.isBigDecimalSchema()){return new c.NumericValue(t,"bigDecimal")}if(n.isBooleanSchema()){return String(t).toLowerCase()==="true"}return t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??y.toUtf8)((this.serdeContext?.base64Decoder??p.fromBase64)(e))}}class HttpInterceptingShapeDeserializer extends SerdeContext{codecDeserializer;stringDeserializer;constructor(e,t){super();this.codecDeserializer=e;this.stringDeserializer=new FromStringShapeDeserializer(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e);this.codecDeserializer.setSerdeContext(e);this.serdeContext=e}read(e,t){const n=i.NormalizedSchema.of(e);const o=n.getMergedTraits();const c=this.serdeContext?.utf8Encoder??y.toUtf8;if(o.httpHeader||o.httpResponseCode){return this.stringDeserializer.read(n,c(t))}if(o.httpPayload){if(n.isBlobSchema()){const e=this.serdeContext?.utf8Decoder??y.fromUtf8;if(typeof t==="string"){return e(t)}return t}else if(n.isStringSchema()){if("byteLength"in t){return c(t)}return t}}return this.codecDeserializer.read(n,t)}}class ToStringShapeSerializer extends SerdeContext{settings;stringBuffer="";constructor(e){super();this.settings=e}write(e,t){const n=i.NormalizedSchema.of(e);switch(typeof t){case"object":if(t===null){this.stringBuffer="null";return}if(n.isTimestampSchema()){if(!(t instanceof Date)){throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${n.getName(true)}`)}const e=determineTimestampFormat(n,this.settings);switch(e){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=c.dateToUtcString(t);break;case 7:this.stringBuffer=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",t);this.stringBuffer=String(t.getTime()/1e3)}return}if(n.isBlobSchema()&&"byteLength"in t){this.stringBuffer=(this.serdeContext?.base64Encoder??p.toBase64)(t);return}if(n.isListSchema()&&Array.isArray(t)){let e="";for(const o of t){this.write([n.getValueSchema(),n.getMergedTraits()],o);const t=this.flush();const i=n.getValueSchema().isTimestampSchema()?t:c.quoteHeader(t);if(e!==""){e+=", "}e+=i}this.stringBuffer=e;return}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":const e=n.getMergedTraits().mediaType;let o=t;if(e){const t=e==="application/json"||e.endsWith("+json");if(t){o=c.LazyJsonString.from(o)}if(n.getMergedTraits().httpHeader){this.stringBuffer=(this.serdeContext?.base64Encoder??p.toBase64)(o.toString());return}}this.stringBuffer=t;break;default:if(n.isIdempotencyToken()){this.stringBuffer=c.generateIdempotencyToken()}else{this.stringBuffer=String(t)}}}flush(){const e=this.stringBuffer;this.stringBuffer="";return e}}class HttpInterceptingShapeSerializer{codecSerializer;stringSerializer;buffer;constructor(e,t,n=new ToStringShapeSerializer(t)){this.codecSerializer=e;this.stringSerializer=n}setSerdeContext(e){this.codecSerializer.setSerdeContext(e);this.stringSerializer.setSerdeContext(e)}write(e,t){const n=i.NormalizedSchema.of(e);const o=n.getMergedTraits();if(o.httpHeader||o.httpLabel||o.httpQuery){this.stringSerializer.write(n,t);this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(n,t)}flush(){if(this.buffer!==undefined){const e=this.buffer;this.buffer=undefined;return e}return this.codecSerializer.flush()}}t.FromStringShapeDeserializer=FromStringShapeDeserializer;t.HttpBindingProtocol=HttpBindingProtocol;t.HttpInterceptingShapeDeserializer=HttpInterceptingShapeDeserializer;t.HttpInterceptingShapeSerializer=HttpInterceptingShapeSerializer;t.HttpProtocol=HttpProtocol;t.RequestBuilder=RequestBuilder;t.RpcProtocol=RpcProtocol;t.SerdeContext=SerdeContext;t.ToStringShapeSerializer=ToStringShapeSerializer;t.collectBody=collectBody;t.determineTimestampFormat=determineTimestampFormat;t.extendedEncodeURIComponent=extendedEncodeURIComponent;t.requestBuilder=requestBuilder;t.resolvedPath=resolvedPath},6890:(e,t,n)=>{var o=n(2356);var i=n(6324);const deref=e=>{if(typeof e==="function"){return e()}return e};const operation=(e,t,n,o,i)=>({name:t,namespace:e,traits:n,input:o,output:i});const schemaDeserializationMiddleware=e=>(t,n)=>async c=>{const{response:d}=await t(c);const{operationSchema:p}=i.getSmithyContext(n);const[,y,C,Q,v,D]=p??[];try{const t=await e.protocol.deserializeResponse(operation(y,C,Q,v,D),{...e,...n},d);return{response:d,output:t}}catch(e){Object.defineProperty(e,"$response",{value:d,enumerable:false,writable:false,configurable:false});if(!("$metadata"in e)){const t=`Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;try{e.message+="\n "+t}catch(e){if(!n.logger||n.logger?.constructor?.name==="NoOpLogger"){console.warn(t)}else{n.logger?.warn?.(t)}}if(typeof e.$responseBodyText!=="undefined"){if(e.$response){e.$response.body=e.$responseBodyText}}try{if(o.HttpResponse.isInstance(d)){const{headers:t={}}=d;const n=Object.entries(t);e.$metadata={httpStatusCode:d.statusCode,requestId:findHeader(/^x-[\w-]+-request-?id$/,n),extendedRequestId:findHeader(/^x-[\w-]+-id-2$/,n),cfId:findHeader(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}};const findHeader=(e,t)=>(t.find((([t])=>t.match(e)))||[void 0,void 0])[1];const schemaSerializationMiddleware=e=>(t,n)=>async o=>{const{operationSchema:c}=i.getSmithyContext(n);const[,d,p,y,C,Q]=c??[];const v=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint;const D=await e.protocol.serializeRequest(operation(d,p,y,C,Q),o.input,{...e,...n,endpoint:v});return t({...o,request:D})};const c={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:true};const d={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:true};function getSchemaSerdePlugin(e){return{applyToStack:t=>{t.add(schemaSerializationMiddleware(e),d);t.add(schemaDeserializationMiddleware(e),c);e.protocol.setSerdeContext(e)}}}class Schema{name;namespace;traits;static assign(e,t){const n=Object.assign(e,t);return n}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);if(!t&&typeof e==="object"&&e!==null){const t=e;return t.symbol===this.symbol}return t}getName(){return this.namespace+"#"+this.name}}class ListSchema extends Schema{static symbol=Symbol.for("@smithy/lis");name;traits;valueSchema;symbol=ListSchema.symbol}const list=(e,t,n,o)=>Schema.assign(new ListSchema,{name:t,namespace:e,traits:n,valueSchema:o});class MapSchema extends Schema{static symbol=Symbol.for("@smithy/map");name;traits;keySchema;valueSchema;symbol=MapSchema.symbol}const map=(e,t,n,o,i)=>Schema.assign(new MapSchema,{name:t,namespace:e,traits:n,keySchema:o,valueSchema:i});class OperationSchema extends Schema{static symbol=Symbol.for("@smithy/ope");name;traits;input;output;symbol=OperationSchema.symbol}const op=(e,t,n,o,i)=>Schema.assign(new OperationSchema,{name:t,namespace:e,traits:n,input:o,output:i});class StructureSchema extends Schema{static symbol=Symbol.for("@smithy/str");name;traits;memberNames;memberList;symbol=StructureSchema.symbol}const struct=(e,t,n,o,i)=>Schema.assign(new StructureSchema,{name:t,namespace:e,traits:n,memberNames:o,memberList:i});class ErrorSchema extends StructureSchema{static symbol=Symbol.for("@smithy/err");ctor;symbol=ErrorSchema.symbol}const error=(e,t,n,o,i,c)=>Schema.assign(new ErrorSchema,{name:t,namespace:e,traits:n,memberNames:o,memberList:i,ctor:null});function translateTraits(e){if(typeof e==="object"){return e}e=e|0;const t={};let n=0;for(const o of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"]){if((e>>n++&1)===1){t[o]=1}}return t}const p={it:Symbol.for("@smithy/nor-struct-it")};class NormalizedSchema{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=NormalizedSchema.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e;this.memberName=t;const n=[];let o=e;let i=e;this._isMemberSchema=false;while(isMemberSchema(o)){n.push(o[1]);o=o[0];i=deref(o);this._isMemberSchema=true}if(n.length>0){this.memberTraits={};for(let e=n.length-1;e>=0;--e){const t=n[e];Object.assign(this.memberTraits,translateTraits(t))}}else{this.memberTraits=0}if(i instanceof NormalizedSchema){const e=this.memberTraits;Object.assign(this,i);this.memberTraits=Object.assign({},e,i.getMemberTraits(),this.getMemberTraits());this.normalizedTraits=void 0;this.memberName=t??i.memberName;return}this.schema=deref(i);if(isStaticSchema(this.schema)){this.name=`${this.schema[1]}#${this.schema[2]}`;this.traits=this.schema[3]}else{this.name=this.memberName??String(i);this.traits=0}if(this._isMemberSchema&&!t){throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`)}}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);if(!t&&typeof e==="object"&&e!==null){const t=e;return t.symbol===this.symbol}return t}static of(e){const t=deref(e);if(t instanceof NormalizedSchema){return t}if(isMemberSchema(t)){const[n,o]=t;if(n instanceof NormalizedSchema){Object.assign(n.getMergedTraits(),translateTraits(o));return n}throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new NormalizedSchema(t)}getSchema(){const e=this.schema;if(Array.isArray(e)&&e[0]===0){return e[4]}return e}getName(e=false){const{name:t}=this;const n=!e&&t&&t.includes("#");return n?t.split("#")[1]:t||undefined}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return typeof e==="number"?e>=64&&e<128:e[0]===1}isMapSchema(){const e=this.getSchema();return typeof e==="number"?e>=128&&e<=255:e[0]===2}isStructSchema(){const e=this.getSchema();if(typeof e!=="object"){return false}const t=e[0];return t===3||t===-3||t===4}isUnionSchema(){const e=this.getSchema();if(typeof e!=="object"){return false}return e[0]===4}isBlobSchema(){const e=this.getSchema();return e===21||e===42}isTimestampSchema(){const e=this.getSchema();return typeof e==="number"&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return translateTraits(this.memberTraits)}getOwnTraits(){return translateTraits(this.traits)}getKeySchema(){const[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t){throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`)}const n=this.getSchema();const o=e?15:n[4]??0;return member([o,0],"key")}getValueSchema(){const e=this.getSchema();const[t,n,o]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()];const i=typeof e==="number"?63&e:e&&typeof e==="object"&&(n||o)?e[3+e[0]]:t?15:void 0;if(i!=null){return member([i,0],n?"value":"member")}throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`)}getMemberSchema(e){const t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){const n=t[4].indexOf(e);const o=t[5][n];return member(isMemberSchema(o)?o:[o,0],e)}if(this.isDocumentSchema()){return member([15,0],e)}throw new Error(`@smithy/core/schema - ${this.getName(true)} has no no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[t,n]of this.structIterator()){e[t]=n}}catch(e){}return e}getEventStreamMember(){if(this.isStructSchema()){for(const[e,t]of this.structIterator()){if(t.isStreaming()&&t.isStructSchema()){return e}}}return""}*structIterator(){if(this.isUnitSchema()){return}if(!this.isStructSchema()){throw new Error("@smithy/core/schema - cannot iterate non-struct schema.")}const e=this.getSchema();const t=e[4].length;let n=e[p.it];if(n&&t===n.length){yield*n;return}n=Array(t);for(let o=0;oArray.isArray(e)&&e.length===2;const isStaticSchema=e=>Array.isArray(e)&&e.length>=5;class SimpleSchema extends Schema{static symbol=Symbol.for("@smithy/sim");name;schemaRef;traits;symbol=SimpleSchema.symbol}const sim=(e,t,n,o)=>Schema.assign(new SimpleSchema,{name:t,namespace:e,traits:o,schemaRef:n});const simAdapter=(e,t,n,o)=>Schema.assign(new SimpleSchema,{name:t,namespace:e,traits:n,schemaRef:o});const y={BLOB:21,STREAMING_BLOB:42,BOOLEAN:2,STRING:0,NUMERIC:1,BIG_INTEGER:17,BIG_DECIMAL:19,DOCUMENT:15,TIMESTAMP_DEFAULT:4,TIMESTAMP_DATE_TIME:5,TIMESTAMP_HTTP_DATE:6,TIMESTAMP_EPOCH_SECONDS:7,LIST_MODIFIER:64,MAP_MODIFIER:128};class TypeRegistry{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,n=new Map){this.namespace=e;this.schemas=t;this.exceptions=n}static for(e){if(!TypeRegistry.registries.has(e)){TypeRegistry.registries.set(e,new TypeRegistry(e))}return TypeRegistry.registries.get(e)}copyFrom(e){const{schemas:t,exceptions:n}=this;for(const[n,o]of e.schemas){if(!t.has(n)){t.set(n,o)}}for(const[t,o]of e.exceptions){if(!n.has(t)){n.set(t,o)}}}register(e,t){const n=this.normalizeShapeId(e);for(const e of[this,TypeRegistry.for(n.split("#")[0])]){e.schemas.set(n,t)}}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t)){throw new Error(`@smithy/core/schema - schema not found for ${t}`)}return this.schemas.get(t)}registerError(e,t){const n=e;const o=n[1];for(const e of[this,TypeRegistry.for(o)]){e.schemas.set(o+"#"+n[2],n);e.exceptions.set(n,t)}}getErrorCtor(e){const t=e;if(this.exceptions.has(t)){return this.exceptions.get(t)}const n=TypeRegistry.for(t[1]);return n.exceptions.get(t)}getBaseException(){for(const e of this.exceptions.keys()){if(Array.isArray(e)){const[,t,n]=e;const o=t+"#"+n;if(o.startsWith("smithy.ts.sdk.synthetic.")&&o.endsWith("ServiceException")){return e}}}return undefined}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear();this.exceptions.clear()}normalizeShapeId(e){if(e.includes("#")){return e}return this.namespace+"#"+e}}t.ErrorSchema=ErrorSchema;t.ListSchema=ListSchema;t.MapSchema=MapSchema;t.NormalizedSchema=NormalizedSchema;t.OperationSchema=OperationSchema;t.SCHEMA=y;t.Schema=Schema;t.SimpleSchema=SimpleSchema;t.StructureSchema=StructureSchema;t.TypeRegistry=TypeRegistry;t.deref=deref;t.deserializerMiddlewareOption=c;t.error=error;t.getSchemaSerdePlugin=getSchemaSerdePlugin;t.isStaticSchema=isStaticSchema;t.list=list;t.map=map;t.op=op;t.operation=operation;t.serializerMiddlewareOption=d;t.sim=sim;t.simAdapter=simAdapter;t.struct=struct;t.translateTraits=translateTraits},2430:(e,t,n)=>{var o=n(266);const copyDocumentWithTransform=(e,t,n=e=>e)=>e;const parseBoolean=e=>{switch(e){case"true":return true;case"false":return false;default:throw new Error(`Unable to parse boolean value "${e}"`)}};const expectBoolean=e=>{if(e===null||e===undefined){return undefined}if(typeof e==="number"){if(e===0||e===1){v.warn(stackTraceWarning(`Expected boolean, got ${typeof e}: ${e}`))}if(e===0){return false}if(e===1){return true}}if(typeof e==="string"){const t=e.toLowerCase();if(t==="false"||t==="true"){v.warn(stackTraceWarning(`Expected boolean, got ${typeof e}: ${e}`))}if(t==="false"){return false}if(t==="true"){return true}}if(typeof e==="boolean"){return e}throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`)};const expectNumber=e=>{if(e===null||e===undefined){return undefined}if(typeof e==="string"){const t=parseFloat(e);if(!Number.isNaN(t)){if(String(t)!==String(e)){v.warn(stackTraceWarning(`Expected number but observed string: ${e}`))}return t}}if(typeof e==="number"){return e}throw new TypeError(`Expected number, got ${typeof e}: ${e}`)};const i=Math.ceil(2**127*(2-2**-23));const expectFloat32=e=>{const t=expectNumber(e);if(t!==undefined&&!Number.isNaN(t)&&t!==Infinity&&t!==-Infinity){if(Math.abs(t)>i){throw new TypeError(`Expected 32-bit float, got ${e}`)}}return t};const expectLong=e=>{if(e===null||e===undefined){return undefined}if(Number.isInteger(e)&&!Number.isNaN(e)){return e}throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)};const c=expectLong;const expectInt32=e=>expectSizedInt(e,32);const expectShort=e=>expectSizedInt(e,16);const expectByte=e=>expectSizedInt(e,8);const expectSizedInt=(e,t)=>{const n=expectLong(e);if(n!==undefined&&castInt(n,t)!==n){throw new TypeError(`Expected ${t}-bit integer, got ${e}`)}return n};const castInt=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}};const expectNonNull=(e,t)=>{if(e===null||e===undefined){if(t){throw new TypeError(`Expected a non-null value for ${t}`)}throw new TypeError("Expected a non-null value")}return e};const expectObject=e=>{if(e===null||e===undefined){return undefined}if(typeof e==="object"&&!Array.isArray(e)){return e}const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)};const expectString=e=>{if(e===null||e===undefined){return undefined}if(typeof e==="string"){return e}if(["boolean","number","bigint"].includes(typeof e)){v.warn(stackTraceWarning(`Expected string, got ${typeof e}: ${e}`));return String(e)}throw new TypeError(`Expected string, got ${typeof e}: ${e}`)};const expectUnion=e=>{if(e===null||e===undefined){return undefined}const t=expectObject(e);const n=Object.entries(t).filter((([,e])=>e!=null)).map((([e])=>e));if(n.length===0){throw new TypeError(`Unions must have exactly one non-null member. None were found.`)}if(n.length>1){throw new TypeError(`Unions must have exactly one non-null member. Keys ${n} were not null.`)}return t};const strictParseDouble=e=>{if(typeof e=="string"){return expectNumber(parseNumber(e))}return expectNumber(e)};const d=strictParseDouble;const strictParseFloat32=e=>{if(typeof e=="string"){return expectFloat32(parseNumber(e))}return expectFloat32(e)};const p=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;const parseNumber=e=>{const t=e.match(p);if(t===null||t[0].length!==e.length){throw new TypeError(`Expected real number, got implicit NaN`)}return parseFloat(e)};const limitedParseDouble=e=>{if(typeof e=="string"){return parseFloatString(e)}return expectNumber(e)};const y=limitedParseDouble;const C=limitedParseDouble;const limitedParseFloat32=e=>{if(typeof e=="string"){return parseFloatString(e)}return expectFloat32(e)};const parseFloatString=e=>{switch(e){case"NaN":return NaN;case"Infinity":return Infinity;case"-Infinity":return-Infinity;default:throw new Error(`Unable to parse float value: ${e}`)}};const strictParseLong=e=>{if(typeof e==="string"){return expectLong(parseNumber(e))}return expectLong(e)};const Q=strictParseLong;const strictParseInt32=e=>{if(typeof e==="string"){return expectInt32(parseNumber(e))}return expectInt32(e)};const strictParseShort=e=>{if(typeof e==="string"){return expectShort(parseNumber(e))}return expectShort(e)};const strictParseByte=e=>{if(typeof e==="string"){return expectByte(parseNumber(e))}return expectByte(e)};const stackTraceWarning=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n");const v={warn:console.warn};const D=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];const k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dateToUtcString(e){const t=e.getUTCFullYear();const n=e.getUTCMonth();const o=e.getUTCDay();const i=e.getUTCDate();const c=e.getUTCHours();const d=e.getUTCMinutes();const p=e.getUTCSeconds();const y=i<10?`0${i}`:`${i}`;const C=c<10?`0${c}`:`${c}`;const Q=d<10?`0${d}`:`${d}`;const v=p<10?`0${p}`:`${p}`;return`${D[o]}, ${y} ${k[n]} ${t} ${C}:${Q}:${v} GMT`}const $=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);const parseRfc3339DateTime=e=>{if(e===null||e===undefined){return undefined}if(typeof e!=="string"){throw new TypeError("RFC-3339 date-times must be expressed as strings")}const t=$.exec(e);if(!t){throw new TypeError("Invalid RFC-3339 date-time value")}const[n,o,i,c,d,p,y,C]=t;const Q=strictParseShort(stripLeadingZeroes(o));const v=parseDateValue(i,"month",1,12);const D=parseDateValue(c,"day",1,31);return buildDate(Q,v,D,{hours:d,minutes:p,seconds:y,fractionalMilliseconds:C})};const V=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/);const parseRfc3339DateTimeWithOffset=e=>{if(e===null||e===undefined){return undefined}if(typeof e!=="string"){throw new TypeError("RFC-3339 date-times must be expressed as strings")}const t=V.exec(e);if(!t){throw new TypeError("Invalid RFC-3339 date-time value")}const[n,o,i,c,d,p,y,C,Q]=t;const v=strictParseShort(stripLeadingZeroes(o));const D=parseDateValue(i,"month",1,12);const k=parseDateValue(c,"day",1,31);const $=buildDate(v,D,k,{hours:d,minutes:p,seconds:y,fractionalMilliseconds:C});if(Q.toUpperCase()!="Z"){$.setTime($.getTime()-parseOffsetToMilliseconds(Q))}return $};const ee=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$/);const te=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$/);const re=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})$/);const parseRfc7231DateTime=e=>{if(e===null||e===undefined){return undefined}if(typeof e!=="string"){throw new TypeError("RFC-7231 date-times must be expressed as strings")}let t=ee.exec(e);if(t){const[e,n,o,i,c,d,p,y]=t;return buildDate(strictParseShort(stripLeadingZeroes(i)),parseMonthByShortName(o),parseDateValue(n,"day",1,31),{hours:c,minutes:d,seconds:p,fractionalMilliseconds:y})}t=te.exec(e);if(t){const[e,n,o,i,c,d,p,y]=t;return adjustRfc850Year(buildDate(parseTwoDigitYear(i),parseMonthByShortName(o),parseDateValue(n,"day",1,31),{hours:c,minutes:d,seconds:p,fractionalMilliseconds:y}))}t=re.exec(e);if(t){const[e,n,o,i,c,d,p,y]=t;return buildDate(strictParseShort(stripLeadingZeroes(y)),parseMonthByShortName(n),parseDateValue(o.trimLeft(),"day",1,31),{hours:i,minutes:c,seconds:d,fractionalMilliseconds:p})}throw new TypeError("Invalid RFC-7231 date-time value")};const parseEpochTimestamp=e=>{if(e===null||e===undefined){return undefined}let t;if(typeof e==="number"){t=e}else if(typeof e==="string"){t=strictParseDouble(e)}else if(typeof e==="object"&&e.tag===1){t=e.value}else{throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation")}if(Number.isNaN(t)||t===Infinity||t===-Infinity){throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics")}return new Date(Math.round(t*1e3))};const buildDate=(e,t,n,o)=>{const i=t-1;validateDayOfMonth(e,i,n);return new Date(Date.UTC(e,i,n,parseDateValue(o.hours,"hour",0,23),parseDateValue(o.minutes,"minute",0,59),parseDateValue(o.seconds,"seconds",0,60),parseMilliseconds(o.fractionalMilliseconds)))};const parseTwoDigitYear=e=>{const t=(new Date).getUTCFullYear();const n=Math.floor(t/100)*100+strictParseShort(stripLeadingZeroes(e));if(n{if(e.getTime()-(new Date).getTime()>ne){return new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()))}return e};const parseMonthByShortName=e=>{const t=k.indexOf(e);if(t<0){throw new TypeError(`Invalid month: ${e}`)}return t+1};const se=[31,28,31,30,31,30,31,31,30,31,30,31];const validateDayOfMonth=(e,t,n)=>{let o=se[t];if(t===1&&isLeapYear(e)){o=29}if(n>o){throw new TypeError(`Invalid day for ${k[t]} in ${e}: ${n}`)}};const isLeapYear=e=>e%4===0&&(e%100!==0||e%400===0);const parseDateValue=(e,t,n,o)=>{const i=strictParseByte(stripLeadingZeroes(e));if(io){throw new TypeError(`${t} must be between ${n} and ${o}, inclusive`)}return i};const parseMilliseconds=e=>{if(e===null||e===undefined){return 0}return strictParseFloat32("0."+e)*1e3};const parseOffsetToMilliseconds=e=>{const t=e[0];let n=1;if(t=="+"){n=1}else if(t=="-"){n=-1}else{throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`)}const o=Number(e.substring(1,3));const i=Number(e.substring(4,6));return n*(o*60+i)*60*1e3};const stripLeadingZeroes=e=>{let t=0;while(t{if(e&&typeof e==="object"&&(e instanceof oe||"deserializeJSON"in e)){return e}else if(typeof e==="string"||Object.getPrototypeOf(e)===String.prototype){return oe(String(e))}return oe(JSON.stringify(e))};oe.fromObject=oe.from;function quoteHeader(e){if(e.includes(",")||e.includes('"')){e=`"${e.replace(/"/g,'\\"')}"`}return e}const ie=`(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?`;const ae=`(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)`;const ce=`(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?`;const le=`(\\d?\\d)`;const ue=`(\\d{4})`;const de=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/);const pe=new RegExp(`^${ie}, ${le} ${ae} ${ue} ${ce} GMT$`);const Ae=new RegExp(`^${ie}, ${le}-${ae}-(\\d\\d) ${ce} GMT$`);const me=new RegExp(`^${ie} ${ae} ( [1-9]|\\d\\d) ${ce} ${ue}$`);const ge=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];const _parseEpochTimestamp=e=>{if(e==null){return void 0}let t=NaN;if(typeof e==="number"){t=e}else if(typeof e==="string"){if(!/^-?\d*\.?\d+$/.test(e)){throw new TypeError(`parseEpochTimestamp - numeric string invalid.`)}t=Number.parseFloat(e)}else if(typeof e==="object"&&e.tag===1){t=e.value}if(isNaN(t)||Math.abs(t)===Infinity){throw new TypeError("Epoch timestamps must be valid finite numbers.")}return new Date(Math.round(t*1e3))};const _parseRfc3339DateTimeWithOffset=e=>{if(e==null){return void 0}if(typeof e!=="string"){throw new TypeError("RFC3339 timestamps must be strings")}const t=de.exec(e);if(!t){throw new TypeError(`Invalid RFC3339 timestamp format ${e}`)}const[,n,o,i,c,d,p,,y,C]=t;range(o,1,12);range(i,1,31);range(c,0,23);range(d,0,59);range(p,0,60);const Q=new Date(Date.UTC(Number(n),Number(o)-1,Number(i),Number(c),Number(d),Number(p),Number(y)?Math.round(parseFloat(`0.${y}`)*1e3):0));Q.setUTCFullYear(Number(n));if(C.toUpperCase()!="Z"){const[,e,t,n]=/([+-])(\d\d):(\d\d)/.exec(C)||[void 0,"+",0,0];const o=e==="-"?1:-1;Q.setTime(Q.getTime()+o*(Number(t)*60*60*1e3+Number(n)*60*1e3))}return Q};const _parseRfc7231DateTime=e=>{if(e==null){return void 0}if(typeof e!=="string"){throw new TypeError("RFC7231 timestamps must be strings.")}let t;let n;let o;let i;let c;let d;let p;let y;if(y=pe.exec(e)){[,t,n,o,i,c,d,p]=y}else if(y=Ae.exec(e)){[,t,n,o,i,c,d,p]=y;o=(Number(o)+1900).toString()}else if(y=me.exec(e)){[,n,t,i,c,d,p,o]=y}if(o&&d){const e=Date.UTC(Number(o),ge.indexOf(n),Number(t),Number(i),Number(c),Number(d),p?Math.round(parseFloat(`0.${p}`)*1e3):0);range(t,1,31);range(i,0,23);range(c,0,59);range(d,0,60);const y=new Date(e);y.setUTCFullYear(Number(o));return y}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)};function range(e,t,n){const o=Number(e);if(on){throw new Error(`Value ${o} out of range [${t}, ${n}]`)}}function splitEvery(e,t,n){if(n<=0||!Number.isInteger(n)){throw new Error("Invalid number of delimiters ("+n+") for splitEvery.")}const o=e.split(t);if(n===1){return o}const i=[];let c="";for(let e=0;e{const t=e.length;const n=[];let o=false;let i=undefined;let c=0;for(let d=0;d{e=e.trim();const t=e.length;if(t<2){return e}if(e[0]===`"`&&e[t-1]===`"`){e=e.slice(1,t-1)}return e.replace(/\\"/g,'"')}))};const fe=/^-?\d*(\.\d+)?$/;class NumericValue{string;type;constructor(e,t){this.string=e;this.type=t;if(!fe.test(e)){throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`)}}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||typeof e!=="object"){return false}const t=e;return NumericValue.prototype.isPrototypeOf(e)||t.type==="bigDecimal"&&fe.test(t.string)}}function nv(e){return new NumericValue(String(e),"bigDecimal")}t.generateIdempotencyToken=o.v4;t.LazyJsonString=oe;t.NumericValue=NumericValue;t._parseEpochTimestamp=_parseEpochTimestamp;t._parseRfc3339DateTimeWithOffset=_parseRfc3339DateTimeWithOffset;t._parseRfc7231DateTime=_parseRfc7231DateTime;t.copyDocumentWithTransform=copyDocumentWithTransform;t.dateToUtcString=dateToUtcString;t.expectBoolean=expectBoolean;t.expectByte=expectByte;t.expectFloat32=expectFloat32;t.expectInt=c;t.expectInt32=expectInt32;t.expectLong=expectLong;t.expectNonNull=expectNonNull;t.expectNumber=expectNumber;t.expectObject=expectObject;t.expectShort=expectShort;t.expectString=expectString;t.expectUnion=expectUnion;t.handleFloat=y;t.limitedParseDouble=limitedParseDouble;t.limitedParseFloat=C;t.limitedParseFloat32=limitedParseFloat32;t.logger=v;t.nv=nv;t.parseBoolean=parseBoolean;t.parseEpochTimestamp=parseEpochTimestamp;t.parseRfc3339DateTime=parseRfc3339DateTime;t.parseRfc3339DateTimeWithOffset=parseRfc3339DateTimeWithOffset;t.parseRfc7231DateTime=parseRfc7231DateTime;t.quoteHeader=quoteHeader;t.splitEvery=splitEvery;t.splitHeader=splitHeader;t.strictParseByte=strictParseByte;t.strictParseDouble=strictParseDouble;t.strictParseFloat=d;t.strictParseFloat32=strictParseFloat32;t.strictParseInt=Q;t.strictParseInt32=strictParseInt32;t.strictParseLong=strictParseLong;t.strictParseShort=strictParseShort},7809:(e,t,n)=>{var o=n(2356);var i=n(8256);var c=n(8385);function createRequest(e,t){return new Request(e,t)}function requestTimeout(e=0){return new Promise(((t,n)=>{if(e){setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError";n(t)}),e)}}))}const d={supported:undefined};class FetchHttpHandler{config;configProvider;static create(e){if(typeof e?.handle==="function"){return e}return new FetchHttpHandler(e)}constructor(e){if(typeof e==="function"){this.configProvider=e().then((e=>e||{}))}else{this.config=e??{};this.configProvider=Promise.resolve(this.config)}if(d.supported===undefined){d.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in createRequest("https://[::1]"))}}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){if(!this.config){this.config=await this.configProvider}const c=n??this.config.requestTimeout;const p=this.config.keepAlive===true;const y=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");e.name="AbortError";return Promise.reject(e)}let C=e.path;const Q=i.buildQueryString(e.query||{});if(Q){C+=`?${Q}`}if(e.fragment){C+=`#${e.fragment}`}let v="";if(e.username!=null||e.password!=null){const t=e.username??"";const n=e.password??"";v=`${t}:${n}@`}const{port:D,method:k}=e;const $=`${e.protocol}//${v}${e.hostname}${D?`:${D}`:""}${C}`;const V=k==="GET"||k==="HEAD"?undefined:e.body;const ee={body:V,headers:new Headers(e.headers),method:k,credentials:y};if(this.config?.cache){ee.cache=this.config.cache}if(V){ee.duplex="half"}if(typeof AbortController!=="undefined"){ee.signal=t}if(d.supported){ee.keepalive=p}if(typeof this.config.requestInit==="function"){Object.assign(ee,this.config.requestInit(e))}let removeSignalEventListener=()=>{};const te=createRequest($,ee);const re=[fetch(te).then((e=>{const t=e.headers;const n={};for(const e of t.entries()){n[e[0]]=e[1]}const i=e.body!=undefined;if(!i){return e.blob().then((t=>({response:new o.HttpResponse({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))}return{response:new o.HttpResponse({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}})),requestTimeout(c)];if(t){re.push(new Promise(((e,n)=>{const onAbort=()=>{const e=new Error("Request aborted");e.name="AbortError";n(e)};if(typeof t.addEventListener==="function"){const e=t;e.addEventListener("abort",onAbort,{once:true});removeSignalEventListener=()=>e.removeEventListener("abort",onAbort)}else{t.onabort=onAbort}})))}return Promise.race(re).finally(removeSignalEventListener)}updateHttpClientConfig(e,t){this.config=undefined;this.configProvider=this.configProvider.then((n=>{n[e]=t;return n}))}httpHandlerConfigs(){return this.config??{}}}const streamCollector=async e=>{if(typeof Blob==="function"&&e instanceof Blob||e.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==undefined){return new Uint8Array(await e.arrayBuffer())}return collectBlob(e)}return collectStream(e)};async function collectBlob(e){const t=await readToBase64(e);const n=c.fromBase64(t);return new Uint8Array(n)}async function collectStream(e){const t=[];const n=e.getReader();let o=false;let i=0;while(!o){const{done:e,value:c}=await n.read();if(c){t.push(c);i+=c.length}o=e}const c=new Uint8Array(i);let d=0;for(const e of t){c.set(e,d);d+=e.length}return c}function readToBase64(e){return new Promise(((t,n)=>{const o=new FileReader;o.onloadend=()=>{if(o.readyState!==2){return n(new Error("Reader aborted too early"))}const e=o.result??"";const i=e.indexOf(",");const c=i>-1?i+1:e.length;t(e.substring(c))};o.onabort=()=>n(new Error("Read aborted"));o.onerror=()=>n(o.error);o.readAsDataURL(e)}))}t.FetchHttpHandler=FetchHttpHandler;t.keepAliveSupport=d;t.streamCollector=streamCollector},2711:(e,t,n)=>{var o=n(4151);var i=n(1577);var c=n(181);var d=n(6982);class Hash{algorithmIdentifier;secret;hash;constructor(e,t){this.algorithmIdentifier=e;this.secret=t;this.reset()}update(e,t){this.hash.update(i.toUint8Array(castSourceData(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?d.createHmac(this.algorithmIdentifier,castSourceData(this.secret)):d.createHash(this.algorithmIdentifier)}}function castSourceData(e,t){if(c.Buffer.isBuffer(e)){return e}if(typeof e==="string"){return o.fromString(e,t)}if(ArrayBuffer.isView(e)){return o.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength)}return o.fromArrayBuffer(e)}t.Hash=Hash},6130:(e,t)=>{const isArrayBuffer=e=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";t.isArrayBuffer=isArrayBuffer},7212:(e,t,n)=>{var o=n(2356);const i="content-length";function contentLengthMiddleware(e){return t=>async n=>{const c=n.request;if(o.HttpRequest.isInstance(c)){const{body:t,headers:n}=c;if(t&&Object.keys(n).map((e=>e.toLowerCase())).indexOf(i)===-1){try{const n=e(t);c.headers={...c.headers,[i]:String(n)}}catch(e){}}}return t({...n,request:c})}}const c={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:true};const getContentLengthPlugin=e=>({applyToStack:t=>{t.add(contentLengthMiddleware(e.bodyLengthChecker),c)}});t.contentLengthMiddleware=contentLengthMiddleware;t.contentLengthMiddlewareOptions=c;t.getContentLengthPlugin=getContentLengthPlugin},6041:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getEndpointFromConfig=void 0;const o=n(5704);const i=n(8008);const getEndpointFromConfig=async e=>(0,o.loadConfig)((0,i.getEndpointUrlConfig)(e??""))();t.getEndpointFromConfig=getEndpointFromConfig},8008:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getEndpointUrlConfig=void 0;const o=n(4964);const i="AWS_ENDPOINT_URL";const c="endpoint_url";const getEndpointUrlConfig=e=>({environmentVariableSelector:t=>{const n=e.split(" ").map((e=>e.toUpperCase()));const o=t[[i,...n].join("_")];if(o)return o;const c=t[i];if(c)return c;return undefined},configFileSelector:(t,n)=>{if(n&&t.services){const i=n[["services",t.services].join(o.CONFIG_PREFIX_SEPARATOR)];if(i){const t=e.split(" ").map((e=>e.toLowerCase()));const n=i[[t.join("_"),c].join(o.CONFIG_PREFIX_SEPARATOR)];if(n)return n}}const i=t[c];if(i)return i;return undefined},default:undefined});t.getEndpointUrlConfig=getEndpointUrlConfig},99:(e,t,n)=>{var o=n(6041);var i=n(4494);var c=n(402);var d=n(6324);var p=n(3255);const resolveParamsForS3=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket==="string"){e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))}if(isArnBucketName(t)){if(e.ForcePathStyle===true){throw new Error("Path-style addressing cannot be used with ARN buckets")}}else if(!isDnsCompatibleBucketName(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3){e.ForcePathStyle=true}if(e.DisableMultiRegionAccessPoints){e.disableMultiRegionAccessPoints=true;e.DisableMRAP=true}return e};const y=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;const C=/(\d+\.){3}\d+/;const Q=/\.\./;const isDnsCompatibleBucketName=e=>y.test(e)&&!C.test(e)&&!Q.test(e);const isArnBucketName=e=>{const[t,n,o,,,i]=e.split(":");const c=t==="arn"&&e.split(":").length>=6;const d=Boolean(c&&n&&o&&i);if(c&&!d){throw new Error(`Invalid ARN: ${e} was an invalid ARN.`)}return d};const createConfigValueProvider=(e,t,n,o=false)=>{const configProvider=async()=>{let i;if(o){const o=n.clientContextParams;const c=o?.[e];i=c??n[e]??n[t]}else{i=n[e]??n[t]}if(typeof i==="function"){return i()}return i};if(e==="credentialScope"||t==="CredentialScope"){return async()=>{const e=typeof n.credentials==="function"?await n.credentials():n.credentials;const t=e?.credentialScope??e?.CredentialScope;return t}}if(e==="accountId"||t==="AccountId"){return async()=>{const e=typeof n.credentials==="function"?await n.credentials():n.credentials;const t=e?.accountId??e?.AccountId;return t}}if(e==="endpoint"||t==="endpoint"){return async()=>{if(n.isCustomEndpoint===false){return undefined}const e=await configProvider();if(e&&typeof e==="object"){if("url"in e){return e.url.href}if("hostname"in e){const{protocol:t,hostname:n,port:o,path:i}=e;return`${t}//${n}${o?":"+o:""}${i}`}}return e}}return configProvider};const toEndpointV1=e=>{if(typeof e==="object"){if("url"in e){return i.parseUrl(e.url)}return e}return i.parseUrl(e)};const getEndpointFromInstructions=async(e,t,n,i)=>{if(!n.isCustomEndpoint){let e;if(n.serviceConfiguredEndpoint){e=await n.serviceConfiguredEndpoint()}else{e=await o.getEndpointFromConfig(n.serviceId)}if(e){n.endpoint=()=>Promise.resolve(toEndpointV1(e));n.isCustomEndpoint=true}}const c=await resolveParams(e,t,n);if(typeof n.endpointProvider!=="function"){throw new Error("config.endpointProvider is not set.")}const d=n.endpointProvider(c,i);return d};const resolveParams=async(e,t,n)=>{const o={};const i=t?.getEndpointParameterInstructions?.()||{};for(const[t,c]of Object.entries(i)){switch(c.type){case"staticContextParams":o[t]=c.value;break;case"contextParams":o[t]=e[c.name];break;case"clientContextParams":case"builtInParams":o[t]=await createConfigValueProvider(c.name,t,n,c.type!=="builtInParams")();break;case"operationContextParams":o[t]=c.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(c))}}if(Object.keys(i).length===0){Object.assign(o,n)}if(String(n.serviceId).toLowerCase()==="s3"){await resolveParamsForS3(o)}return o};const endpointMiddleware=({config:e,instructions:t})=>(n,o)=>async i=>{if(e.isCustomEndpoint){c.setFeature(o,"ENDPOINT_OVERRIDE","N")}const p=await getEndpointFromInstructions(i.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=p;o.authSchemes=p.properties?.authSchemes;const y=o.authSchemes?.[0];if(y){o["signing_region"]=y.signingRegion;o["signing_service"]=y.signingName;const e=d.getSmithyContext(o);const t=e?.selectedHttpAuthScheme?.httpAuthOption;if(t){t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:y.signingRegion,signingRegion:y.signingRegion,signing_service:y.signingName,signingName:y.signingName,signingRegionSet:y.signingRegionSet},y.properties)}}return n({...i})};const v={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:true,relation:"before",toMiddleware:p.serializerMiddlewareOption.name};const getEndpointPlugin=(e,t)=>({applyToStack:n=>{n.addRelativeTo(endpointMiddleware({config:e,instructions:t}),v)}});const resolveEndpointConfig=e=>{const t=e.tls??true;const{endpoint:n,useDualstackEndpoint:i,useFipsEndpoint:c}=e;const p=n!=null?async()=>toEndpointV1(await d.normalizeProvider(n)()):undefined;const y=!!n;const C=Object.assign(e,{endpoint:p,tls:t,isCustomEndpoint:y,useDualstackEndpoint:d.normalizeProvider(i??false),useFipsEndpoint:d.normalizeProvider(c??false)});let Q=undefined;C.serviceConfiguredEndpoint=async()=>{if(e.serviceId&&!Q){Q=o.getEndpointFromConfig(e.serviceId)}return Q};return C};const resolveEndpointRequiredConfig=e=>{const{endpoint:t}=e;if(t===undefined){e.endpoint=async()=>{throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.")}}return e};t.endpointMiddleware=endpointMiddleware;t.endpointMiddlewareOptions=v;t.getEndpointFromInstructions=getEndpointFromInstructions;t.getEndpointPlugin=getEndpointPlugin;t.resolveEndpointConfig=resolveEndpointConfig;t.resolveEndpointRequiredConfig=resolveEndpointRequiredConfig;t.resolveParams=resolveParams;t.toEndpointV1=toEndpointV1},9618:(e,t,n)=>{var o=n(5518);var i=n(2356);var c=n(2058);var d=n(266);var p=n(6324);var y=n(1411);var C=n(9831);const getDefaultRetryQuota=(e,t)=>{const n=e;const i=o.NO_RETRY_INCREMENT;const c=o.RETRY_COST;const d=o.TIMEOUT_RETRY_COST;let p=e;const getCapacityAmount=e=>e.name==="TimeoutError"?d:c;const hasRetryTokens=e=>getCapacityAmount(e)<=p;const retrieveRetryTokens=e=>{if(!hasRetryTokens(e)){throw new Error("No retry token available")}const t=getCapacityAmount(e);p-=t;return t};const releaseRetryTokens=e=>{p+=e??i;p=Math.min(p,n)};return Object.freeze({hasRetryTokens:hasRetryTokens,retrieveRetryTokens:retrieveRetryTokens,releaseRetryTokens:releaseRetryTokens})};const defaultDelayDecider=(e,t)=>Math.floor(Math.min(o.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e));const defaultRetryDecider=e=>{if(!e){return false}return c.isRetryableByTrait(e)||c.isClockSkewError(e)||c.isThrottlingError(e)||c.isTransientError(e)};const asSdkError=e=>{if(e instanceof Error)return e;if(e instanceof Object)return Object.assign(new Error,e);if(typeof e==="string")return new Error(e);return new Error(`AWS SDK error wrapper for ${e}`)};class StandardRetryStrategy{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=o.RETRY_MODES.STANDARD;constructor(e,t){this.maxAttemptsProvider=e;this.retryDecider=t?.retryDecider??defaultRetryDecider;this.delayDecider=t?.delayDecider??defaultDelayDecider;this.retryQuota=t?.retryQuota??getDefaultRetryQuota(o.INITIAL_RETRY_TOKENS)}shouldRetry(e,t,n){return tsetTimeout(e,i)));continue}if(!t.$metadata){t.$metadata={}}t.$metadata.attempts=y;t.$metadata.totalRetryDelay=C;throw t}}}}const getDelayFromRetryAfterHeader=e=>{if(!i.HttpResponse.isInstance(e))return;const t=Object.keys(e.headers).find((e=>e.toLowerCase()==="retry-after"));if(!t)return;const n=e.headers[t];const o=Number(n);if(!Number.isNaN(o))return o*1e3;const c=new Date(n);return c.getTime()-Date.now()};class AdaptiveRetryStrategy extends StandardRetryStrategy{rateLimiter;constructor(e,t){const{rateLimiter:n,...i}=t??{};super(e,i);this.rateLimiter=n??new o.DefaultRateLimiter;this.mode=o.RETRY_MODES.ADAPTIVE}async retry(e,t){return super.retry(e,t,{beforeRequest:async()=>this.rateLimiter.getSendToken(),afterRequest:e=>{this.rateLimiter.updateClientSendingRate(e)}})}}const Q="AWS_MAX_ATTEMPTS";const v="max_attempts";const D={environmentVariableSelector:e=>{const t=e[Q];if(!t)return undefined;const n=parseInt(t);if(Number.isNaN(n)){throw new Error(`Environment variable ${Q} mast be a number, got "${t}"`)}return n},configFileSelector:e=>{const t=e[v];if(!t)return undefined;const n=parseInt(t);if(Number.isNaN(n)){throw new Error(`Shared config file entry ${v} mast be a number, got "${t}"`)}return n},default:o.DEFAULT_MAX_ATTEMPTS};const resolveRetryConfig=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:i}=e;const c=p.normalizeProvider(i??o.DEFAULT_MAX_ATTEMPTS);return Object.assign(e,{maxAttempts:c,retryStrategy:async()=>{if(t){return t}const e=await p.normalizeProvider(n)();if(e===o.RETRY_MODES.ADAPTIVE){return new o.AdaptiveRetryStrategy(c)}return new o.StandardRetryStrategy(c)}})};const k="AWS_RETRY_MODE";const $="retry_mode";const V={environmentVariableSelector:e=>e[k],configFileSelector:e=>e[$],default:o.DEFAULT_RETRY_MODE};const omitRetryHeadersMiddleware=()=>e=>async t=>{const{request:n}=t;if(i.HttpRequest.isInstance(n)){delete n.headers[o.INVOCATION_ID_HEADER];delete n.headers[o.REQUEST_HEADER]}return e(t)};const ee={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:true};const getOmitRetryHeadersPlugin=e=>({applyToStack:e=>{e.addRelativeTo(omitRetryHeadersMiddleware(),ee)}});const retryMiddleware=e=>(t,n)=>async c=>{let p=await e.retryStrategy();const Q=await e.maxAttempts();if(isRetryStrategyV2(p)){p=p;let e=await p.acquireInitialRetryToken(n["partition_id"]);let v=new Error;let D=0;let k=0;const{request:$}=c;const V=i.HttpRequest.isInstance($);if(V){$.headers[o.INVOCATION_ID_HEADER]=d.v4()}while(true){try{if(V){$.headers[o.REQUEST_HEADER]=`attempt=${D+1}; max=${Q}`}const{response:n,output:i}=await t(c);p.recordSuccess(e);i.$metadata.attempts=D+1;i.$metadata.totalRetryDelay=k;return{response:n,output:i}}catch(t){const o=getRetryErrorInfo(t);v=asSdkError(t);if(V&&C.isStreamingPayload($)){(n.logger instanceof y.NoOpLogger?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request.");throw v}try{e=await p.refreshRetryTokenForRetry(e,o)}catch(e){if(!v.$metadata){v.$metadata={}}v.$metadata.attempts=D+1;v.$metadata.totalRetryDelay=k;throw v}D=e.getRetryCount();const i=e.getRetryDelay();k+=i;await new Promise((e=>setTimeout(e,i)))}}}else{p=p;if(p?.mode)n.userAgent=[...n.userAgent||[],["cfg/retry-mode",p.mode]];return p.retry(t,c)}};const isRetryStrategyV2=e=>typeof e.acquireInitialRetryToken!=="undefined"&&typeof e.refreshRetryTokenForRetry!=="undefined"&&typeof e.recordSuccess!=="undefined";const getRetryErrorInfo=e=>{const t={error:e,errorType:getRetryErrorType(e)};const n=getRetryAfterHint(e.$response);if(n){t.retryAfterHint=n}return t};const getRetryErrorType=e=>{if(c.isThrottlingError(e))return"THROTTLING";if(c.isTransientError(e))return"TRANSIENT";if(c.isServerError(e))return"SERVER_ERROR";return"CLIENT_ERROR"};const te={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:true};const getRetryPlugin=e=>({applyToStack:t=>{t.add(retryMiddleware(e),te)}});const getRetryAfterHint=e=>{if(!i.HttpResponse.isInstance(e))return;const t=Object.keys(e.headers).find((e=>e.toLowerCase()==="retry-after"));if(!t)return;const n=e.headers[t];const o=Number(n);if(!Number.isNaN(o))return new Date(o*1e3);const c=new Date(n);return c};t.AdaptiveRetryStrategy=AdaptiveRetryStrategy;t.CONFIG_MAX_ATTEMPTS=v;t.CONFIG_RETRY_MODE=$;t.ENV_MAX_ATTEMPTS=Q;t.ENV_RETRY_MODE=k;t.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=D;t.NODE_RETRY_MODE_CONFIG_OPTIONS=V;t.StandardRetryStrategy=StandardRetryStrategy;t.defaultDelayDecider=defaultDelayDecider;t.defaultRetryDecider=defaultRetryDecider;t.getOmitRetryHeadersPlugin=getOmitRetryHeadersPlugin;t.getRetryAfterHint=getRetryAfterHint;t.getRetryPlugin=getRetryPlugin;t.omitRetryHeadersMiddleware=omitRetryHeadersMiddleware;t.omitRetryHeadersMiddlewareOptions=ee;t.resolveRetryConfig=resolveRetryConfig;t.retryMiddleware=retryMiddleware;t.retryMiddlewareOptions=te},9831:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.isStreamingPayload=void 0;const o=n(2203);const isStreamingPayload=e=>e?.body instanceof o.Readable||typeof ReadableStream!=="undefined"&&e?.body instanceof ReadableStream;t.isStreamingPayload=isStreamingPayload},3255:(e,t,n)=>{var o=n(2356);const deserializerMiddleware=(e,t)=>(n,i)=>async c=>{const{response:d}=await n(c);try{const n=await t(d,e);return{response:d,output:n}}catch(e){Object.defineProperty(e,"$response",{value:d,enumerable:false,writable:false,configurable:false});if(!("$metadata"in e)){const t=`Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;try{e.message+="\n "+t}catch(e){if(!i.logger||i.logger?.constructor?.name==="NoOpLogger"){console.warn(t)}else{i.logger?.warn?.(t)}}if(typeof e.$responseBodyText!=="undefined"){if(e.$response){e.$response.body=e.$responseBodyText}}try{if(o.HttpResponse.isInstance(d)){const{headers:t={}}=d;const n=Object.entries(t);e.$metadata={httpStatusCode:d.statusCode,requestId:findHeader(/^x-[\w-]+-request-?id$/,n),extendedRequestId:findHeader(/^x-[\w-]+-id-2$/,n),cfId:findHeader(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}};const findHeader=(e,t)=>(t.find((([t])=>t.match(e)))||[void 0,void 0])[1];const serializerMiddleware=(e,t)=>(n,o)=>async i=>{const c=e;const d=o.endpointV2?.url&&c.urlParser?async()=>c.urlParser(o.endpointV2.url):c.endpoint;if(!d){throw new Error("No valid endpoint provider available.")}const p=await t(i.input,{...e,endpoint:d});return n({...i,request:p})};const i={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:true};const c={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:true};function getSerdePlugin(e,t,n){return{applyToStack:o=>{o.add(deserializerMiddleware(e,n),i);o.add(serializerMiddleware(e,t),c)}}}t.deserializerMiddleware=deserializerMiddleware;t.deserializerMiddlewareOption=i;t.getSerdePlugin=getSerdePlugin;t.serializerMiddleware=serializerMiddleware;t.serializerMiddlewareOption=c},9208:(e,t)=>{const getAllAliases=(e,t)=>{const n=[];if(e){n.push(e)}if(t){for(const e of t){n.push(e)}}return n};const getMiddlewareNameWithAliases=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`;const constructStack=()=>{let e=[];let t=[];let i=false;const c=new Set;const sort=e=>e.sort(((e,t)=>n[t.step]-n[e.step]||o[t.priority||"normal"]-o[e.priority||"normal"]));const removeByName=n=>{let o=false;const filterCb=e=>{const t=getAllAliases(e.name,e.aliases);if(t.includes(n)){o=true;for(const e of t){c.delete(e)}return false}return true};e=e.filter(filterCb);t=t.filter(filterCb);return o};const removeByReference=n=>{let o=false;const filterCb=e=>{if(e.middleware===n){o=true;for(const t of getAllAliases(e.name,e.aliases)){c.delete(t)}return false}return true};e=e.filter(filterCb);t=t.filter(filterCb);return o};const cloneTo=n=>{e.forEach((e=>{n.add(e.middleware,{...e})}));t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})}));n.identifyOnResolve?.(d.identifyOnResolve());return n};const expandRelativeMiddlewareList=e=>{const t=[];e.before.forEach((e=>{if(e.before.length===0&&e.after.length===0){t.push(e)}else{t.push(...expandRelativeMiddlewareList(e))}}));t.push(e);e.after.reverse().forEach((e=>{if(e.before.length===0&&e.after.length===0){t.push(e)}else{t.push(...expandRelativeMiddlewareList(e))}}));return t};const getMiddlewareList=(n=false)=>{const o=[];const i=[];const c={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of getAllAliases(t.name,t.aliases)){c[e]=t}o.push(t)}));t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of getAllAliases(t.name,t.aliases)){c[e]=t}i.push(t)}));i.forEach((e=>{if(e.toMiddleware){const t=c[e.toMiddleware];if(t===undefined){if(n){return}throw new Error(`${e.toMiddleware} is not found when adding `+`${getMiddlewareNameWithAliases(e.name,e.aliases)} `+`middleware ${e.relation} ${e.toMiddleware}`)}if(e.relation==="after"){t.after.push(e)}if(e.relation==="before"){t.before.push(e)}}}));const d=sort(o).map(expandRelativeMiddlewareList).reduce(((e,t)=>{e.push(...t);return e}),[]);return d};const d={add:(t,n={})=>{const{name:o,override:i,aliases:d}=n;const p={step:"initialize",priority:"normal",middleware:t,...n};const y=getAllAliases(o,d);if(y.length>0){if(y.some((e=>c.has(e)))){if(!i)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(o,d)}'`);for(const t of y){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(n===-1){continue}const i=e[n];if(i.step!==p.step||p.priority!==i.priority){throw new Error(`"${getMiddlewareNameWithAliases(i.name,i.aliases)}" middleware with `+`${i.priority} priority in ${i.step} step cannot `+`be overridden by "${getMiddlewareNameWithAliases(o,d)}" middleware with `+`${p.priority} priority in ${p.step} step.`)}e.splice(n,1)}}for(const e of y){c.add(e)}}e.push(p)},addRelativeTo:(e,n)=>{const{name:o,override:i,aliases:d}=n;const p={middleware:e,...n};const y=getAllAliases(o,d);if(y.length>0){if(y.some((e=>c.has(e)))){if(!i)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(o,d)}'`);for(const e of y){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(n===-1){continue}const i=t[n];if(i.toMiddleware!==p.toMiddleware||i.relation!==p.relation){throw new Error(`"${getMiddlewareNameWithAliases(i.name,i.aliases)}" middleware `+`${i.relation} "${i.toMiddleware}" middleware cannot be overridden `+`by "${getMiddlewareNameWithAliases(o,d)}" middleware ${p.relation} `+`"${p.toMiddleware}" middleware.`)}t.splice(n,1)}}for(const e of y){c.add(e)}}t.push(p)},clone:()=>cloneTo(constructStack()),use:e=>{e.applyToStack(d)},remove:e=>{if(typeof e==="string")return removeByName(e);else return removeByReference(e)},removeByTag:n=>{let o=false;const filterCb=e=>{const{tags:t,name:i,aliases:d}=e;if(t&&t.includes(n)){const e=getAllAliases(i,d);for(const t of e){c.delete(t)}o=true;return false}return true};e=e.filter(filterCb);t=t.filter(filterCb);return o},concat:e=>{const t=cloneTo(constructStack());t.use(e);t.identifyOnResolve(i||t.identifyOnResolve()||(e.identifyOnResolve?.()??false));return t},applyToStack:cloneTo,identify:()=>getMiddlewareList(true).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return getMiddlewareNameWithAliases(e.name,e.aliases)+" - "+t})),identifyOnResolve(e){if(typeof e==="boolean")i=e;return i},resolve:(e,t)=>{for(const n of getMiddlewareList().map((e=>e.middleware)).reverse()){e=n(e,t)}if(i){console.log(d.identify())}return e}};return d};const n={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1};const o={high:3,normal:2,low:1};t.constructStack=constructStack},5704:(e,t,n)=>{var o=n(8857);var i=n(4964);function getSelectorName(e){try{const t=new Set(Array.from(e.match(/([A-Z_]){3,}/g)??[]));t.delete("CONFIG");t.delete("CONFIG_PREFIX_SEPARATOR");t.delete("ENV");return[...t].join(", ")}catch(t){return e}}const fromEnv=(e,t)=>async()=>{try{const n=e(process.env,t);if(n===undefined){throw new Error}return n}catch(n){throw new o.CredentialsProviderError(n.message||`Not found in ENV: ${getSelectorName(e.toString())}`,{logger:t?.logger})}};const fromSharedConfigFiles=(e,{preferredFile:t="config",...n}={})=>async()=>{const c=i.getProfileName(n);const{configFile:d,credentialsFile:p}=await i.loadSharedConfigFiles(n);const y=p[c]||{};const C=d[c]||{};const Q=t==="config"?{...y,...C}:{...C,...y};try{const n=t==="config"?d:p;const o=e(Q,n);if(o===undefined){throw new Error}return o}catch(t){throw new o.CredentialsProviderError(t.message||`Not found in config files w/ profile [${c}]: ${getSelectorName(e.toString())}`,{logger:n.logger})}};const isFunction=e=>typeof e==="function";const fromStatic=e=>isFunction(e)?async()=>await e():o.fromStatic(e);const loadConfig=({environmentVariableSelector:e,configFileSelector:t,default:n},i={})=>{const{signingName:c,logger:d}=i;const p={signingName:c,logger:d};return o.memoize(o.chain(fromEnv(e,p),fromSharedConfigFiles(t,i),fromStatic(n)))};t.loadConfig=loadConfig},1279:(e,t,n)=>{var o=n(2356);var i=n(8256);var c=n(8611);var d=n(5692);var p=n(2203);var y=n(5675);const C=["ECONNRESET","EPIPE","ETIMEDOUT"];const getTransformedHeaders=e=>{const t={};for(const n of Object.keys(e)){const o=e[n];t[n]=Array.isArray(o)?o.join(","):o}return t};const Q={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)};const v=1e3;const setConnectionTimeout=(e,t,n=0)=>{if(!n){return-1}const registerTimeout=o=>{const i=Q.setTimeout((()=>{e.destroy();t(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${n} ms.`),{name:"TimeoutError"}))}),n-o);const doWithSocket=e=>{if(e?.connecting){e.on("connect",(()=>{Q.clearTimeout(i)}))}else{Q.clearTimeout(i)}};if(e.socket){doWithSocket(e.socket)}else{e.on("socket",doWithSocket)}};if(n<2e3){registerTimeout(0);return 0}return Q.setTimeout(registerTimeout.bind(null,v),v)};const setRequestTimeout=(e,t,n=0,o,i)=>{if(n){return Q.setTimeout((()=>{let c=`@smithy/node-http-handler - [${o?"ERROR":"WARN"}] a request has exceeded the configured ${n} ms requestTimeout.`;if(o){const n=Object.assign(new Error(c),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(n);t(n)}else{c+=` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;i?.warn?.(c)}}),n)}return-1};const D=3e3;const setSocketKeepAlive=(e,{keepAlive:t,keepAliveMsecs:n},o=D)=>{if(t!==true){return-1}const registerListener=()=>{if(e.socket){e.socket.setKeepAlive(t,n||0)}else{e.on("socket",(e=>{e.setKeepAlive(t,n||0)}))}};if(o===0){registerListener();return 0}return Q.setTimeout(registerListener,o)};const k=3e3;const setSocketTimeout=(e,t,n=0)=>{const registerTimeout=o=>{const i=n-o;const onTimeout=()=>{e.destroy();t(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${n} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};if(e.socket){e.socket.setTimeout(i,onTimeout);e.on("close",(()=>e.socket?.removeListener("timeout",onTimeout)))}else{e.setTimeout(i,onTimeout)}};if(0{d=Number(Q.setTimeout((()=>e(true)),Math.max($,n)))})),new Promise((t=>{e.on("continue",(()=>{Q.clearTimeout(d);t(true)}));e.on("response",(()=>{Q.clearTimeout(d);t(false)}));e.on("error",(()=>{Q.clearTimeout(d);t(false)}))}))])}if(p){writeBody(e,t.body)}}function writeBody(e,t){if(t instanceof p.Readable){t.pipe(e);return}if(t){const n=Buffer.isBuffer(t);const o=typeof t==="string";if(n||o){if(n&&t.byteLength===0){e.end()}else{e.end(t)}return}const i=t;if(typeof i==="object"&&i.buffer&&typeof i.byteOffset==="number"&&typeof i.byteLength==="number"){e.end(Buffer.from(i.buffer,i.byteOffset,i.byteLength));return}e.end(Buffer.from(t));return}e.end()}const V=0;class NodeHttpHandler{config;configProvider;socketWarningTimestamp=0;externalAgent=false;metadata={handlerProtocol:"http/1.1"};static create(e){if(typeof e?.handle==="function"){return e}return new NodeHttpHandler(e)}static checkSocketUsage(e,t,n=console){const{sockets:o,requests:i,maxSockets:c}=e;if(typeof c!=="number"||c===Infinity){return t}const d=15e3;if(Date.now()-d=c&&d>=2*c){n?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${t} and ${d} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);return Date.now()}}}return t}constructor(e){this.configProvider=new Promise(((t,n)=>{if(typeof e==="function"){e().then((e=>{t(this.resolveDefaultConfig(e))})).catch(n)}else{t(this.resolveDefaultConfig(e))}}))}resolveDefaultConfig(e){const{requestTimeout:t,connectionTimeout:n,socketTimeout:o,socketAcquisitionWarningTimeout:i,httpAgent:p,httpsAgent:y,throwOnRequestTimeout:C,logger:Q}=e||{};const v=true;const D=50;return{connectionTimeout:n,requestTimeout:t,socketTimeout:o,socketAcquisitionWarningTimeout:i,throwOnRequestTimeout:C,httpAgent:(()=>{if(p instanceof c.Agent||typeof p?.destroy==="function"){this.externalAgent=true;return p}return new c.Agent({keepAlive:v,maxSockets:D,...p})})(),httpsAgent:(()=>{if(y instanceof d.Agent||typeof y?.destroy==="function"){this.externalAgent=true;return y}return new d.Agent({keepAlive:v,maxSockets:D,...y})})(),logger:Q}}destroy(){this.config?.httpAgent?.destroy();this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t,requestTimeout:n}={}){if(!this.config){this.config=await this.configProvider}return new Promise(((p,y)=>{const v=this.config;let D=undefined;const k=[];const resolve=async e=>{await D;k.forEach(Q.clearTimeout);p(e)};const reject=async e=>{await D;k.forEach(Q.clearTimeout);y(e)};if(t?.aborted){const e=new Error("Request aborted");e.name="AbortError";reject(e);return}const $=e.protocol==="https:";const V=e.headers??{};const ee=(V.Expect??V.expect)==="100-continue";let te=$?v.httpsAgent:v.httpAgent;if(ee&&!this.externalAgent){te=new($?d.Agent:c.Agent)({keepAlive:false,maxSockets:Infinity})}k.push(Q.setTimeout((()=>{this.socketWarningTimestamp=NodeHttpHandler.checkSocketUsage(te,this.socketWarningTimestamp,v.logger)}),v.socketAcquisitionWarningTimeout??(v.requestTimeout??2e3)+(v.connectionTimeout??1e3)));const re=i.buildQueryString(e.query||{});let ne=undefined;if(e.username!=null||e.password!=null){const t=e.username??"";const n=e.password??"";ne=`${t}:${n}`}let se=e.path;if(re){se+=`?${re}`}if(e.fragment){se+=`#${e.fragment}`}let oe=e.hostname??"";if(oe[0]==="["&&oe.endsWith("]")){oe=e.hostname.slice(1,-1)}else{oe=e.hostname}const ie={headers:e.headers,host:oe,method:e.method,path:se,port:e.port,agent:te,auth:ne};const ae=$?d.request:c.request;const ce=ae(ie,(e=>{const t=new o.HttpResponse({statusCode:e.statusCode||-1,reason:e.statusMessage,headers:getTransformedHeaders(e.headers),body:e});resolve({response:t})}));ce.on("error",(e=>{if(C.includes(e.code)){reject(Object.assign(e,{name:"TimeoutError"}))}else{reject(e)}}));if(t){const onAbort=()=>{ce.destroy();const e=new Error("Request aborted");e.name="AbortError";reject(e)};if(typeof t.addEventListener==="function"){const e=t;e.addEventListener("abort",onAbort,{once:true});ce.once("close",(()=>e.removeEventListener("abort",onAbort)))}else{t.onabort=onAbort}}const le=n??v.requestTimeout;k.push(setConnectionTimeout(ce,reject,v.connectionTimeout));k.push(setRequestTimeout(ce,reject,le,v.throwOnRequestTimeout,v.logger??console));k.push(setSocketTimeout(ce,reject,v.socketTimeout));const ue=ie.agent;if(typeof ue==="object"&&"keepAlive"in ue){k.push(setSocketKeepAlive(ce,{keepAlive:ue.keepAlive,keepAliveMsecs:ue.keepAliveMsecs}))}D=writeRequestBody(ce,e,le,this.externalAgent).catch((e=>{k.forEach(Q.clearTimeout);return y(e)}))}))}updateHttpClientConfig(e,t){this.config=undefined;this.configProvider=this.configProvider.then((n=>({...n,[e]:t})))}httpHandlerConfigs(){return this.config??{}}}class NodeHttp2ConnectionPool{sessions=[];constructor(e){this.sessions=e??[]}poll(){if(this.sessions.length>0){return this.sessions.shift()}}offerLast(e){this.sessions.push(e)}contains(e){return this.sessions.includes(e)}remove(e){this.sessions=this.sessions.filter((t=>t!==e))}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(e){for(const t of this.sessions){if(t===e){if(!t.destroyed){t.destroy()}}}}}class NodeHttp2ConnectionManager{constructor(e){this.config=e;if(this.config.maxConcurrency&&this.config.maxConcurrency<=0){throw new RangeError("maxConcurrency must be greater than zero.")}}config;sessionCache=new Map;lease(e,t){const n=this.getUrlString(e);const o=this.sessionCache.get(n);if(o){const e=o.poll();if(e&&!this.config.disableConcurrency){return e}}const i=y.connect(n);if(this.config.maxConcurrency){i.settings({maxConcurrentStreams:this.config.maxConcurrency},(t=>{if(t){throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())}}))}i.unref();const destroySessionCb=()=>{i.destroy();this.deleteSession(n,i)};i.on("goaway",destroySessionCb);i.on("error",destroySessionCb);i.on("frameError",destroySessionCb);i.on("close",(()=>this.deleteSession(n,i)));if(t.requestTimeout){i.setTimeout(t.requestTimeout,destroySessionCb)}const c=this.sessionCache.get(n)||new NodeHttp2ConnectionPool;c.offerLast(i);this.sessionCache.set(n,c);return i}deleteSession(e,t){const n=this.sessionCache.get(e);if(!n){return}if(!n.contains(t)){return}n.remove(t);this.sessionCache.set(e,n)}release(e,t){const n=this.getUrlString(e);this.sessionCache.get(n)?.offerLast(t)}destroy(){for(const[e,t]of this.sessionCache){for(const e of t){if(!e.destroyed){e.destroy()}t.remove(e)}this.sessionCache.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0){throw new RangeError("maxConcurrentStreams must be greater than zero.")}this.config.maxConcurrency=e}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}getUrlString(e){return e.destination.toString()}}class NodeHttp2Handler{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new NodeHttp2ConnectionManager({});static create(e){if(typeof e?.handle==="function"){return e}return new NodeHttp2Handler(e)}constructor(e){this.configProvider=new Promise(((t,n)=>{if(typeof e==="function"){e().then((e=>{t(e||{})})).catch(n)}else{t(e||{})}}))}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:t,requestTimeout:n}={}){if(!this.config){this.config=await this.configProvider;this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||false);if(this.config.maxConcurrentStreams){this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}}const{requestTimeout:c,disableConcurrentStreams:d}=this.config;const p=n??c;return new Promise(((n,c)=>{let C=false;let Q=undefined;const resolve=async e=>{await Q;n(e)};const reject=async e=>{await Q;c(e)};if(t?.aborted){C=true;const e=new Error("Request aborted");e.name="AbortError";reject(e);return}const{hostname:v,method:D,port:k,protocol:$,query:V}=e;let ee="";if(e.username!=null||e.password!=null){const t=e.username??"";const n=e.password??"";ee=`${t}:${n}@`}const te=`${$}//${ee}${v}${k?`:${k}`:""}`;const re={destination:new URL(te)};const ne=this.connectionManager.lease(re,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:d||false});const rejectWithDestroy=e=>{if(d){this.destroySession(ne)}C=true;reject(e)};const se=i.buildQueryString(V||{});let oe=e.path;if(se){oe+=`?${se}`}if(e.fragment){oe+=`#${e.fragment}`}const ie=ne.request({...e.headers,[y.constants.HTTP2_HEADER_PATH]:oe,[y.constants.HTTP2_HEADER_METHOD]:D});ne.ref();ie.on("response",(e=>{const t=new o.HttpResponse({statusCode:e[":status"]||-1,headers:getTransformedHeaders(e),body:ie});C=true;resolve({response:t});if(d){ne.close();this.connectionManager.deleteSession(te,ne)}}));if(p){ie.setTimeout(p,(()=>{ie.close();const e=new Error(`Stream timed out because of no activity for ${p} ms`);e.name="TimeoutError";rejectWithDestroy(e)}))}if(t){const onAbort=()=>{ie.close();const e=new Error("Request aborted");e.name="AbortError";rejectWithDestroy(e)};if(typeof t.addEventListener==="function"){const e=t;e.addEventListener("abort",onAbort,{once:true});ie.once("close",(()=>e.removeEventListener("abort",onAbort)))}else{t.onabort=onAbort}}ie.on("frameError",((e,t,n)=>{rejectWithDestroy(new Error(`Frame type id ${e} in stream id ${n} has failed with code ${t}.`))}));ie.on("error",rejectWithDestroy);ie.on("aborted",(()=>{rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${ie.rstCode}.`))}));ie.on("close",(()=>{ne.unref();if(d){ne.destroy()}if(!C){rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"))}}));Q=writeRequestBody(ie,e,p)}))}updateHttpClientConfig(e,t){this.config=undefined;this.configProvider=this.configProvider.then((n=>({...n,[e]:t})))}httpHandlerConfigs(){return this.config??{}}destroySession(e){if(!e.destroyed){e.destroy()}}}class Collector extends p.Writable{bufferedBytes=[];_write(e,t,n){this.bufferedBytes.push(e);n()}}const streamCollector=e=>{if(isReadableStreamInstance(e)){return collectReadableStream(e)}return new Promise(((t,n)=>{const o=new Collector;e.pipe(o);e.on("error",(e=>{o.end();n(e)}));o.on("error",n);o.on("finish",(function(){const e=new Uint8Array(Buffer.concat(this.bufferedBytes));t(e)}))}))};const isReadableStreamInstance=e=>typeof ReadableStream==="function"&&e instanceof ReadableStream;async function collectReadableStream(e){const t=[];const n=e.getReader();let o=false;let i=0;while(!o){const{done:e,value:c}=await n.read();if(c){t.push(c);i+=c.length}o=e}const c=new Uint8Array(i);let d=0;for(const e of t){c.set(e,d);d+=e.length}return c}t.DEFAULT_REQUEST_TIMEOUT=V;t.NodeHttp2Handler=NodeHttp2Handler;t.NodeHttpHandler=NodeHttpHandler;t.streamCollector=streamCollector},8857:(e,t)=>{class ProviderError extends Error{name="ProviderError";tryNextLink;constructor(e,t=true){let n;let o=true;if(typeof t==="boolean"){n=undefined;o=t}else if(t!=null&&typeof t==="object"){n=t.logger;o=t.tryNextLink??true}super(e);this.tryNextLink=o;Object.setPrototypeOf(this,ProviderError.prototype);n?.debug?.(`@smithy/property-provider ${o?"->":"(!)"} ${e}`)}static from(e,t=true){return Object.assign(new this(e.message,t),e)}}class CredentialsProviderError extends ProviderError{name="CredentialsProviderError";constructor(e,t=true){super(e,t);Object.setPrototypeOf(this,CredentialsProviderError.prototype)}}class TokenProviderError extends ProviderError{name="TokenProviderError";constructor(e,t=true){super(e,t);Object.setPrototypeOf(this,TokenProviderError.prototype)}}const chain=(...e)=>async()=>{if(e.length===0){throw new ProviderError("No providers in chain")}let t;for(const n of e){try{const e=await n();return e}catch(e){t=e;if(e?.tryNextLink){continue}throw e}}throw t};const fromStatic=e=>()=>Promise.resolve(e);const memoize=(e,t,n)=>{let o;let i;let c;let d=false;const coalesceProvider=async()=>{if(!i){i=e()}try{o=await i;c=true;d=false}finally{i=undefined}return o};if(t===undefined){return async e=>{if(!c||e?.forceRefresh){o=await coalesceProvider()}return o}}return async e=>{if(!c||e?.forceRefresh){o=await coalesceProvider()}if(d){return o}if(n&&!n(o)){d=true;return o}if(t(o)){await coalesceProvider();return o}return o}};t.CredentialsProviderError=CredentialsProviderError;t.ProviderError=ProviderError;t.TokenProviderError=TokenProviderError;t.chain=chain;t.fromStatic=fromStatic;t.memoize=memoize},2356:(e,t,n)=>{var o=n(690);const getHttpHandlerExtensionConfiguration=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}});const resolveHttpHandlerRuntimeConfig=e=>({httpHandler:e.httpHandler()});class Field{name;kind;values;constructor({name:e,kind:t=o.FieldPosition.HEADER,values:n=[]}){this.name=e;this.kind=t;this.values=n}add(e){this.values.push(e)}set(e){this.values=e}remove(e){this.values=this.values.filter((t=>t!==e))}toString(){return this.values.map((e=>e.includes(",")||e.includes(" ")?`"${e}"`:e)).join(", ")}get(){return this.values}}class Fields{entries={};encoding;constructor({fields:e=[],encoding:t="utf-8"}){e.forEach(this.setField.bind(this));this.encoding=t}setField(e){this.entries[e.name.toLowerCase()]=e}getField(e){return this.entries[e.toLowerCase()]}removeField(e){delete this.entries[e.toLowerCase()]}getByType(e){return Object.values(this.entries).filter((t=>t.kind===e))}}class HttpRequest{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET";this.hostname=e.hostname||"localhost";this.port=e.port;this.query=e.query||{};this.headers=e.headers||{};this.body=e.body;this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:";this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/";this.username=e.username;this.password=e.password;this.fragment=e.fragment}static clone(e){const t=new HttpRequest({...e,headers:{...e.headers}});if(t.query){t.query=cloneQuery(t.query)}return t}static isInstance(e){if(!e){return false}const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t["query"]==="object"&&typeof t["headers"]==="object"}clone(){return HttpRequest.clone(this)}}function cloneQuery(e){return Object.keys(e).reduce(((t,n)=>{const o=e[n];return{...t,[n]:Array.isArray(o)?[...o]:o}}),{})}class HttpResponse{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode;this.reason=e.reason;this.headers=e.headers||{};this.body=e.body}static isInstance(e){if(!e)return false;const t=e;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}function isValidHostname(e){const t=/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/;return t.test(e)}t.Field=Field;t.Fields=Fields;t.HttpRequest=HttpRequest;t.HttpResponse=HttpResponse;t.getHttpHandlerExtensionConfiguration=getHttpHandlerExtensionConfiguration;t.isValidHostname=isValidHostname;t.resolveHttpHandlerRuntimeConfig=resolveHttpHandlerRuntimeConfig},8256:(e,t,n)=>{var o=n(146);function buildQueryString(e){const t=[];for(let n of Object.keys(e).sort()){const i=e[n];n=o.escapeUri(n);if(Array.isArray(i)){for(let e=0,c=i.length;e{function parseQueryString(e){const t={};e=e.replace(/^\?/,"");if(e){for(const n of e.split("&")){let[e,o=null]=n.split("=");e=decodeURIComponent(e);if(o){o=decodeURIComponent(o)}if(!(e in t)){t[e]=o}else if(Array.isArray(t[e])){t[e].push(o)}else{t[e]=[t[e],o]}}}return t}t.parseQueryString=parseQueryString},2058:(e,t)=>{const n=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"];const o=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"];const i=["TimeoutError","RequestTimeout","RequestTimeoutException"];const c=[500,502,503,504];const d=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];const p=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"];const isRetryableByTrait=e=>e?.$retryable!==undefined;const isClockSkewError=e=>n.includes(e.name);const isClockSkewCorrectedError=e=>e.$metadata?.clockSkewCorrected;const isBrowserNetworkError=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);const n=e&&e instanceof TypeError;if(!n){return false}return t.has(e.message)};const isThrottlingError=e=>e.$metadata?.httpStatusCode===429||o.includes(e.name)||e.$retryable?.throttling==true;const isTransientError=(e,t=0)=>isRetryableByTrait(e)||isClockSkewCorrectedError(e)||i.includes(e.name)||d.includes(e?.code||"")||p.includes(e?.code||"")||c.includes(e.$metadata?.httpStatusCode||0)||isBrowserNetworkError(e)||e.cause!==undefined&&t<=10&&isTransientError(e.cause,t+1);const isServerError=e=>{if(e.$metadata?.httpStatusCode!==undefined){const t=e.$metadata.httpStatusCode;if(500<=t&&t<=599&&!isTransientError(e)){return true}return false}return false};t.isBrowserNetworkError=isBrowserNetworkError;t.isClockSkewCorrectedError=isClockSkewCorrectedError;t.isClockSkewError=isClockSkewError;t.isRetryableByTrait=isRetryableByTrait;t.isServerError=isServerError;t.isThrottlingError=isThrottlingError;t.isTransientError=isTransientError},1791:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getHomeDir=void 0;const o=n(857);const i=n(6928);const c={};const getHomeDirCacheKey=()=>{if(process&&process.geteuid){return`${process.geteuid()}`}return"DEFAULT"};const getHomeDir=()=>{const{HOME:e,USERPROFILE:t,HOMEPATH:n,HOMEDRIVE:d=`C:${i.sep}`}=process.env;if(e)return e;if(t)return t;if(n)return`${d}${n}`;const p=getHomeDirCacheKey();if(!c[p])c[p]=(0,o.homedir)();return c[p]};t.getHomeDir=getHomeDir},269:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSSOTokenFilepath=void 0;const o=n(6982);const i=n(6928);const c=n(1791);const getSSOTokenFilepath=e=>{const t=(0,o.createHash)("sha1");const n=t.update(e).digest("hex");return(0,i.join)((0,c.getHomeDir)(),".aws","sso","cache",`${n}.json`)};t.getSSOTokenFilepath=getSSOTokenFilepath},1326:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getSSOTokenFromFile=t.tokenIntercept=void 0;const o=n(1943);const i=n(269);t.tokenIntercept={};const getSSOTokenFromFile=async e=>{if(t.tokenIntercept[e]){return t.tokenIntercept[e]}const n=(0,i.getSSOTokenFilepath)(e);const c=await(0,o.readFile)(n,"utf8");return JSON.parse(c)};t.getSSOTokenFromFile=getSSOTokenFromFile},4964:(e,t,n)=>{var o=n(1791);var i=n(269);var c=n(1326);var d=n(6928);var p=n(690);var y=n(6684);const C="AWS_PROFILE";const Q="default";const getProfileName=e=>e.profile||process.env[C]||Q;const v=".";const getConfigData=e=>Object.entries(e).filter((([e])=>{const t=e.indexOf(v);if(t===-1){return false}return Object.values(p.IniSectionType).includes(e.substring(0,t))})).reduce(((e,[t,n])=>{const o=t.indexOf(v);const i=t.substring(0,o)===p.IniSectionType.PROFILE?t.substring(o+1):t;e[i]=n;return e}),{...e.default&&{default:e.default}});const D="AWS_CONFIG_FILE";const getConfigFilepath=()=>process.env[D]||d.join(o.getHomeDir(),".aws","config");const k="AWS_SHARED_CREDENTIALS_FILE";const getCredentialsFilepath=()=>process.env[k]||d.join(o.getHomeDir(),".aws","credentials");const $=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;const V=["__proto__","profile __proto__"];const parseIni=e=>{const t={};let n;let o;for(const i of e.split(/\r?\n/)){const e=i.split(/(^|\s)[;#]/)[0].trim();const c=e[0]==="["&&e[e.length-1]==="]";if(c){n=undefined;o=undefined;const t=e.substring(1,e.length-1);const i=$.exec(t);if(i){const[,e,,t]=i;if(Object.values(p.IniSectionType).includes(e)){n=[e,t].join(v)}}else{n=t}if(V.includes(t)){throw new Error(`Found invalid profile name "${t}"`)}}else if(n){const c=e.indexOf("=");if(![0,-1].includes(c)){const[d,p]=[e.substring(0,c).trim(),e.substring(c+1).trim()];if(p===""){o=d}else{if(o&&i.trimStart()===i){o=undefined}t[n]=t[n]||{};const e=o?[o,d].join(v):d;t[n][e]=p}}}}return t};const swallowError$1=()=>({});const loadSharedConfigFiles=async(e={})=>{const{filepath:t=getCredentialsFilepath(),configFilepath:n=getConfigFilepath()}=e;const i=o.getHomeDir();const c="~/";let p=t;if(t.startsWith(c)){p=d.join(i,t.slice(2))}let C=n;if(n.startsWith(c)){C=d.join(i,n.slice(2))}const Q=await Promise.all([y.readFile(C,{ignoreCache:e.ignoreCache}).then(parseIni).then(getConfigData).catch(swallowError$1),y.readFile(p,{ignoreCache:e.ignoreCache}).then(parseIni).catch(swallowError$1)]);return{configFile:Q[0],credentialsFile:Q[1]}};const getSsoSessionData=e=>Object.entries(e).filter((([e])=>e.startsWith(p.IniSectionType.SSO_SESSION+v))).reduce(((e,[t,n])=>({...e,[t.substring(t.indexOf(v)+1)]:n})),{});const swallowError=()=>({});const loadSsoSessionData=async(e={})=>y.readFile(e.configFilepath??getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError);const mergeConfigFiles=(...e)=>{const t={};for(const n of e){for(const[e,o]of Object.entries(n)){if(t[e]!==undefined){Object.assign(t[e],o)}else{t[e]=o}}}return t};const parseKnownFiles=async e=>{const t=await loadSharedConfigFiles(e);return mergeConfigFiles(t.configFile,t.credentialsFile)};const ee={getFileRecord(){return y.fileIntercept},interceptFile(e,t){y.fileIntercept[e]=Promise.resolve(t)},getTokenRecord(){return c.tokenIntercept},interceptToken(e,t){c.tokenIntercept[e]=t}};t.getSSOTokenFromFile=c.getSSOTokenFromFile;t.readFile=y.readFile;t.CONFIG_PREFIX_SEPARATOR=v;t.DEFAULT_PROFILE=Q;t.ENV_PROFILE=C;t.externalDataInterceptor=ee;t.getProfileName=getProfileName;t.loadSharedConfigFiles=loadSharedConfigFiles;t.loadSsoSessionData=loadSsoSessionData;t.parseKnownFiles=parseKnownFiles;Object.prototype.hasOwnProperty.call(o,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:o["__proto__"]});Object.keys(o).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=o[e]}));Object.prototype.hasOwnProperty.call(i,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:i["__proto__"]});Object.keys(i).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=i[e]}))},6684:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.readFile=t.fileIntercept=t.filePromises=void 0;const o=n(1455);t.filePromises={};t.fileIntercept={};const readFile=(e,n)=>{if(t.fileIntercept[e]!==undefined){return t.fileIntercept[e]}if(!t.filePromises[e]||n?.ignoreCache){t.filePromises[e]=(0,o.readFile)(e,"utf8")}return t.filePromises[e]};t.readFile=readFile},5118:(e,t,n)=>{var o=n(6435);var i=n(1577);var c=n(6130);var d=n(2356);var p=n(6324);var y=n(146);const C="X-Amz-Algorithm";const Q="X-Amz-Credential";const v="X-Amz-Date";const D="X-Amz-SignedHeaders";const k="X-Amz-Expires";const $="X-Amz-Signature";const V="X-Amz-Security-Token";const ee="X-Amz-Region-Set";const te="authorization";const re=v.toLowerCase();const ne="date";const se=[te,re,ne];const oe=$.toLowerCase();const ie="x-amz-content-sha256";const ae=V.toLowerCase();const ce="host";const le={authorization:true,"cache-control":true,connection:true,expect:true,from:true,"keep-alive":true,"max-forwards":true,pragma:true,referer:true,te:true,trailer:true,"transfer-encoding":true,upgrade:true,"user-agent":true,"x-amzn-trace-id":true};const ue=/^proxy-/;const de=/^sec-/;const pe=[/^proxy-/i,/^sec-/i];const Ae="AWS4-HMAC-SHA256";const me="AWS4-ECDSA-P256-SHA256";const ge="AWS4-HMAC-SHA256-PAYLOAD";const fe="UNSIGNED-PAYLOAD";const he=50;const ye="aws4_request";const Ee=60*60*24*7;const Ce={};const Ie=[];const createScope=(e,t,n)=>`${e}/${t}/${n}/${ye}`;const getSigningKey=async(e,t,n,i,c)=>{const d=await hmac(e,t.secretAccessKey,t.accessKeyId);const p=`${n}:${i}:${c}:${o.toHex(d)}:${t.sessionToken}`;if(p in Ce){return Ce[p]}Ie.push(p);while(Ie.length>he){delete Ce[Ie.shift()]}let y=`AWS4${t.secretAccessKey}`;for(const t of[n,i,c,ye]){y=await hmac(e,y,t)}return Ce[p]=y};const clearCredentialCache=()=>{Ie.length=0;Object.keys(Ce).forEach((e=>{delete Ce[e]}))};const hmac=(e,t,n)=>{const o=new e(t);o.update(i.toUint8Array(n));return o.digest()};const getCanonicalHeaders=({headers:e},t,n)=>{const o={};for(const i of Object.keys(e).sort()){if(e[i]==undefined){continue}const c=i.toLowerCase();if(c in le||t?.has(c)||ue.test(c)||de.test(c)){if(!n||n&&!n.has(c)){continue}}o[c]=e[i].trim().replace(/\s+/g," ")}return o};const getPayloadHash=async({headers:e,body:t},n)=>{for(const t of Object.keys(e)){if(t.toLowerCase()===ie){return e[t]}}if(t==undefined){return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}else if(typeof t==="string"||ArrayBuffer.isView(t)||c.isArrayBuffer(t)){const e=new n;e.update(i.toUint8Array(t));return o.toHex(await e.digest())}return fe};class HeaderFormatter{format(e){const t=[];for(const n of Object.keys(e)){const o=i.fromUtf8(n);t.push(Uint8Array.from([o.byteLength]),o,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let o=0;for(const e of t){n.set(e,o);o+=e.byteLength}return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));t.setUint8(0,3);t.setInt16(1,e.value,false);return new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));n.setUint8(0,4);n.setInt32(1,e.value,false);return new Uint8Array(n.buffer);case"long":const c=new Uint8Array(9);c[0]=5;c.set(e.value.bytes,1);return c;case"binary":const d=new DataView(new ArrayBuffer(3+e.value.byteLength));d.setUint8(0,6);d.setUint16(1,e.value.byteLength,false);const p=new Uint8Array(d.buffer);p.set(e.value,3);return p;case"string":const y=i.fromUtf8(e.value);const C=new DataView(new ArrayBuffer(3+y.byteLength));C.setUint8(0,7);C.setUint16(1,y.byteLength,false);const Q=new Uint8Array(C.buffer);Q.set(y,3);return Q;case"timestamp":const v=new Uint8Array(9);v[0]=8;v.set(Int64.fromNumber(e.value.valueOf()).bytes,1);return v;case"uuid":if(!be.test(e.value)){throw new Error(`Invalid UUID received: ${e.value}`)}const D=new Uint8Array(17);D[0]=9;D.set(o.fromHex(e.value.replace(/\-/g,"")),1);return D}}}const be=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Int64{bytes;constructor(e){this.bytes=e;if(e.byteLength!==8){throw new Error("Int64 buffers must be exactly 8 bytes")}}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000){throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`)}const t=new Uint8Array(8);for(let n=7,o=Math.abs(Math.round(e));n>-1&&o>0;n--,o/=256){t[n]=o}if(e<0){negate(t)}return new Int64(t)}valueOf(){const e=this.bytes.slice(0);const t=e[0]&128;if(t){negate(e)}return parseInt(o.toHex(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function negate(e){for(let t=0;t<8;t++){e[t]^=255}for(let t=7;t>-1;t--){e[t]++;if(e[t]!==0)break}}const hasHeader=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t)){if(e===n.toLowerCase()){return true}}return false};const moveHeadersToQuery=(e,t={})=>{const{headers:n,query:o={}}=d.HttpRequest.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();if(i.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i)){o[e]=n[e];delete n[e]}}return{...e,headers:n,query:o}};const prepareRequest=e=>{e=d.HttpRequest.clone(e);for(const t of Object.keys(e.headers)){if(se.indexOf(t.toLowerCase())>-1){delete e.headers[t]}}return e};const getCanonicalQuery=({query:e={}})=>{const t=[];const n={};for(const o of Object.keys(e)){if(o.toLowerCase()===oe){continue}const i=y.escapeUri(o);t.push(i);const c=e[o];if(typeof c==="string"){n[i]=`${i}=${y.escapeUri(c)}`}else if(Array.isArray(c)){n[i]=c.slice(0).reduce(((e,t)=>e.concat([`${i}=${y.escapeUri(t)}`])),[]).sort().join("&")}}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")};const iso8601=e=>toDate(e).toISOString().replace(/\.\d{3}Z$/,"Z");const toDate=e=>{if(typeof e==="number"){return new Date(e*1e3)}if(typeof e==="string"){if(Number(e)){return new Date(Number(e)*1e3)}return new Date(e)}return e};class SignatureV4Base{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:t,region:n,service:o,sha256:i,uriEscapePath:c=true}){this.service=o;this.sha256=i;this.uriEscapePath=c;this.applyChecksum=typeof e==="boolean"?e:true;this.regionProvider=p.normalizeProvider(n);this.credentialProvider=p.normalizeProvider(t)}createCanonicalRequest(e,t,n){const o=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${getCanonicalQuery(e)}\n${o.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${o.join(";")}\n${n}`}async createStringToSign(e,t,n,c){const d=new this.sha256;d.update(i.toUint8Array(n));const p=await d.digest();return`${c}\n${e}\n${t}\n${o.toHex(p)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/")){if(n?.length===0)continue;if(n===".")continue;if(n===".."){t.pop()}else{t.push(n)}}const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;const o=y.escapeUri(n);return o.replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!=="object"||typeof e.accessKeyId!=="string"||typeof e.secretAccessKey!=="string"){throw new Error("Resolved credential object is not valid")}}formatDate(e){const t=iso8601(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class SignatureV4 extends SignatureV4Base{headerFormatter=new HeaderFormatter;constructor({applyChecksum:e,credentials:t,region:n,service:o,sha256:i,uriEscapePath:c=true}){super({applyChecksum:e,credentials:t,region:n,service:o,sha256:i,uriEscapePath:c})}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:o=3600,unsignableHeaders:i,unhoistableHeaders:c,signableHeaders:d,hoistableHeaders:p,signingRegion:y,signingService:ee}=t;const te=await this.credentialProvider();this.validateResolvedCredentials(te);const re=y??await this.regionProvider();const{longDate:ne,shortDate:se}=this.formatDate(n);if(o>Ee){return Promise.reject("Signature version 4 presigned URLs"+" must have an expiration date less than one week in"+" the future")}const oe=createScope(se,re,ee??this.service);const ie=moveHeadersToQuery(prepareRequest(e),{unhoistableHeaders:c,hoistableHeaders:p});if(te.sessionToken){ie.query[V]=te.sessionToken}ie.query[C]=Ae;ie.query[Q]=`${te.accessKeyId}/${oe}`;ie.query[v]=ne;ie.query[k]=o.toString(10);const ae=getCanonicalHeaders(ie,i,d);ie.query[D]=this.getCanonicalHeaderList(ae);ie.query[$]=await this.getSignature(ne,oe,this.getSigningKey(te,re,se,ee),this.createCanonicalRequest(ie,ae,await getPayloadHash(e,this.sha256)));return ie}async sign(e,t){if(typeof e==="string"){return this.signString(e,t)}else if(e.headers&&e.payload){return this.signEvent(e,t)}else if(e.message){return this.signMessage(e,t)}else{return this.signRequest(e,t)}}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:i,signingRegion:c,signingService:d}){const p=c??await this.regionProvider();const{shortDate:y,longDate:C}=this.formatDate(n);const Q=createScope(y,p,d??this.service);const v=await getPayloadHash({headers:{},body:t},this.sha256);const D=new this.sha256;D.update(e);const k=o.toHex(await D.digest());const $=[ge,C,Q,i,k,v].join("\n");return this.signString($,{signingDate:n,signingRegion:p,signingService:d})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:o}){const i=this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:o,priorSignature:e.priorSignature});return i.then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:c}={}){const d=await this.credentialProvider();this.validateResolvedCredentials(d);const p=n??await this.regionProvider();const{shortDate:y}=this.formatDate(t);const C=new this.sha256(await this.getSigningKey(d,p,y,c));C.update(i.toUint8Array(e));return o.toHex(await C.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:o,signingRegion:i,signingService:c}={}){const d=await this.credentialProvider();this.validateResolvedCredentials(d);const p=i??await this.regionProvider();const y=prepareRequest(e);const{longDate:C,shortDate:Q}=this.formatDate(t);const v=createScope(Q,p,c??this.service);y.headers[re]=C;if(d.sessionToken){y.headers[ae]=d.sessionToken}const D=await getPayloadHash(y,this.sha256);if(!hasHeader(ie,y.headers)&&this.applyChecksum){y.headers[ie]=D}const k=getCanonicalHeaders(y,o,n);const $=await this.getSignature(C,v,this.getSigningKey(d,p,Q,c),this.createCanonicalRequest(y,k,D));y.headers[te]=`${Ae} `+`Credential=${d.accessKeyId}/${v}, `+`SignedHeaders=${this.getCanonicalHeaderList(k)}, `+`Signature=${$}`;return y}async getSignature(e,t,n,c){const d=await this.createStringToSign(e,t,c,Ae);const p=new this.sha256(await n);p.update(i.toUint8Array(d));return o.toHex(await p.digest())}getSigningKey(e,t,n,o){return getSigningKey(this.sha256,e,n,t,o||this.service)}}const Se={SignatureV4a:null};t.ALGORITHM_IDENTIFIER=Ae;t.ALGORITHM_IDENTIFIER_V4A=me;t.ALGORITHM_QUERY_PARAM=C;t.ALWAYS_UNSIGNABLE_HEADERS=le;t.AMZ_DATE_HEADER=re;t.AMZ_DATE_QUERY_PARAM=v;t.AUTH_HEADER=te;t.CREDENTIAL_QUERY_PARAM=Q;t.DATE_HEADER=ne;t.EVENT_ALGORITHM_IDENTIFIER=ge;t.EXPIRES_QUERY_PARAM=k;t.GENERATED_HEADERS=se;t.HOST_HEADER=ce;t.KEY_TYPE_IDENTIFIER=ye;t.MAX_CACHE_SIZE=he;t.MAX_PRESIGNED_TTL=Ee;t.PROXY_HEADER_PATTERN=ue;t.REGION_SET_PARAM=ee;t.SEC_HEADER_PATTERN=de;t.SHA256_HEADER=ie;t.SIGNATURE_HEADER=oe;t.SIGNATURE_QUERY_PARAM=$;t.SIGNED_HEADERS_QUERY_PARAM=D;t.SignatureV4=SignatureV4;t.SignatureV4Base=SignatureV4Base;t.TOKEN_HEADER=ae;t.TOKEN_QUERY_PARAM=V;t.UNSIGNABLE_PATTERNS=pe;t.UNSIGNED_PAYLOAD=fe;t.clearCredentialCache=clearCredentialCache;t.createScope=createScope;t.getCanonicalHeaders=getCanonicalHeaders;t.getCanonicalQuery=getCanonicalQuery;t.getPayloadHash=getPayloadHash;t.getSigningKey=getSigningKey;t.hasHeader=hasHeader;t.moveHeadersToQuery=moveHeadersToQuery;t.prepareRequest=prepareRequest;t.signatureV4aContainer=Se},1411:(e,t,n)=>{var o=n(9208);var i=n(3422);var c=n(690);var d=n(6890);var p=n(2430);class Client{config;middlewareStack=o.constructStack();initConfig;handlers;constructor(e){this.config=e;const{protocol:t,protocolSettings:n}=e;if(n){if(typeof t==="function"){e.protocol=new t(n)}}}send(e,t,n){const o=typeof t!=="function"?t:undefined;const i=typeof t==="function"?t:n;const c=o===undefined&&this.config.cacheMiddleware===true;let d;if(c){if(!this.handlers){this.handlers=new WeakMap}const t=this.handlers;if(t.has(e.constructor)){d=t.get(e.constructor)}else{d=e.resolveMiddleware(this.middlewareStack,this.config,o);t.set(e.constructor,d)}}else{delete this.handlers;d=e.resolveMiddleware(this.middlewareStack,this.config,o)}if(i){d(e).then((e=>i(null,e.output)),(e=>i(e))).catch((()=>{}))}else{return d(e).then((e=>e.output))}}destroy(){this.config?.requestHandler?.destroy?.();delete this.handlers}}const y="***SensitiveInformation***";function schemaLogFilter(e,t){if(t==null){return t}const n=d.NormalizedSchema.of(e);if(n.getMergedTraits().sensitive){return y}if(n.isListSchema()){const e=!!n.getValueSchema().getMergedTraits().sensitive;if(e){return y}}else if(n.isMapSchema()){const e=!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive;if(e){return y}}else if(n.isStructSchema()&&typeof t==="object"){const e=t;const o={};for(const[t,i]of n.structIterator()){if(e[t]!=null){o[t]=schemaLogFilter(i,e[t])}}return o}return t}class Command{middlewareStack=o.constructStack();schema;static classBuilder(){return new ClassBuilder}resolveMiddlewareWithContext(e,t,n,{middlewareFn:o,clientName:i,commandName:d,inputFilterSensitiveLog:p,outputFilterSensitiveLog:y,smithyContext:C,additionalContext:Q,CommandCtor:v}){for(const i of o.bind(this)(v,e,t,n)){this.middlewareStack.use(i)}const D=e.concat(this.middlewareStack);const{logger:k}=t;const $={logger:k,clientName:i,commandName:d,inputFilterSensitiveLog:p,outputFilterSensitiveLog:y,[c.SMITHY_CONTEXT_KEY]:{commandInstance:this,...C},...Q};const{requestHandler:V}=t;return D.resolve((e=>V.handle(e.request,n||{})),$)}}class ClassBuilder{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=undefined;_outputFilterSensitiveLog=undefined;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){this._ep=e;return this}m(e){this._middlewareFn=e;return this}s(e,t,n={}){this._smithyContext={service:e,operation:t,...n};return this}c(e={}){this._additionalContext=e;return this}n(e,t){this._clientName=e;this._commandName=t;return this}f(e=e=>e,t=e=>e){this._inputFilterSensitiveLog=e;this._outputFilterSensitiveLog=t;return this}ser(e){this._serializer=e;return this}de(e){this._deserializer=e;return this}sc(e){this._operationSchema=e;this._smithyContext.operationSchema=e;return this}build(){const e=this;let t;return t=class extends Command{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super();this.input=t??{};e._init(this);this.schema=e._operationSchema}resolveMiddleware(n,o,i){const c=e._operationSchema;const d=c?.[4]??c?.input;const p=c?.[5]??c?.output;return this.resolveMiddlewareWithContext(n,o,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(c?schemaLogFilter.bind(null,d):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(c?schemaLogFilter.bind(null,p):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}const C="***SensitiveInformation***";const createAggregatedClient=(e,t,n)=>{for(const[n,o]of Object.entries(e)){const methodImpl=async function(e,t,n){const i=new o(e);if(typeof t==="function"){this.send(i,t)}else if(typeof n==="function"){if(typeof t!=="object")throw new Error(`Expected http options but got ${typeof t}`);this.send(i,t||{},n)}else{return this.send(i,t)}};const e=(n[0].toLowerCase()+n.slice(1)).replace(/Command$/,"");t.prototype[e]=methodImpl}const{paginators:o={},waiters:i={}}=n??{};for(const[e,n]of Object.entries(o)){if(t.prototype[e]===void 0){t.prototype[e]=function(e={},t,...o){return n({...t,client:this},e,...o)}}}for(const[e,n]of Object.entries(i)){if(t.prototype[e]===void 0){t.prototype[e]=async function(e={},t,...o){let i=t;if(typeof t==="number"){i={maxWaitTime:t}}return n({...i,client:this},e,...o)}}}};class ServiceException extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype);this.name=e.name;this.$fault=e.$fault;this.$metadata=e.$metadata}static isInstance(e){if(!e)return false;const t=e;return ServiceException.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&(t.$fault==="client"||t.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return false;const t=e;if(this===ServiceException){return ServiceException.isInstance(e)}if(ServiceException.isInstance(e)){if(t.name&&this.name){return this.prototype.isPrototypeOf(e)||t.name===this.name}return this.prototype.isPrototypeOf(e)}return false}}const decorateServiceException=(e,t={})=>{Object.entries(t).filter((([,e])=>e!==undefined)).forEach((([t,n])=>{if(e[t]==undefined||e[t]===""){e[t]=n}}));const n=e.message||e.Message||"UnknownError";e.message=n;delete e.Message;return e};const throwDefaultError=({output:e,parsedBody:t,exceptionCtor:n,errorCode:o})=>{const i=deserializeMetadata(e);const c=i.httpStatusCode?i.httpStatusCode+"":undefined;const d=new n({name:t?.code||t?.Code||o||c||"UnknownError",$fault:"client",$metadata:i});throw decorateServiceException(d,t)};const withBaseException=e=>({output:t,parsedBody:n,errorCode:o})=>{throwDefaultError({output:t,parsedBody:n,exceptionCtor:e,errorCode:o})};const deserializeMetadata=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});const loadConfigsForDefaultMode=e=>{switch(e){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:3e4};default:return{}}};let Q=false;const emitWarningIfUnsupportedVersion=e=>{if(e&&!Q&&parseInt(e.substring(1,e.indexOf(".")))<16){Q=true}};const v=Object.values(c.AlgorithmId);const getChecksumConfiguration=e=>{const t=[];for(const n in c.AlgorithmId){const o=c.AlgorithmId[n];if(e[o]===undefined){continue}t.push({algorithmId:()=>o,checksumConstructor:()=>e[o]})}for(const[n,o]of Object.entries(e.checksumAlgorithms??{})){t.push({algorithmId:()=>n,checksumConstructor:()=>o})}return{addChecksumAlgorithm(n){e.checksumAlgorithms=e.checksumAlgorithms??{};const o=n.algorithmId();const i=n.checksumConstructor();if(v.includes(o)){e.checksumAlgorithms[o.toUpperCase()]=i}else{e.checksumAlgorithms[o]=i}t.push(n)},checksumAlgorithms(){return t}}};const resolveChecksumRuntimeConfig=e=>{const t={};e.checksumAlgorithms().forEach((e=>{const n=e.algorithmId();if(v.includes(n)){t[n]=e.checksumConstructor()}}));return t};const getRetryConfiguration=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}});const resolveRetryRuntimeConfig=e=>{const t={};t.retryStrategy=e.retryStrategy();return t};const getDefaultExtensionConfiguration=e=>Object.assign(getChecksumConfiguration(e),getRetryConfiguration(e));const D=getDefaultExtensionConfiguration;const resolveDefaultRuntimeConfig=e=>Object.assign(resolveChecksumRuntimeConfig(e),resolveRetryRuntimeConfig(e));const getArrayIfSingleItem=e=>Array.isArray(e)?e:[e];const getValueFromTextNode=e=>{const t="#text";for(const n in e){if(e.hasOwnProperty(n)&&e[n][t]!==undefined){e[n]=e[n][t]}else if(typeof e[n]==="object"&&e[n]!==null){e[n]=getValueFromTextNode(e[n])}}return e};const isSerializableHeaderValue=e=>e!=null;class NoOpLogger{trace(){}debug(){}info(){}warn(){}error(){}}function map(e,t,n){let o;let i;let c;if(typeof t==="undefined"&&typeof n==="undefined"){o={};c=e}else{o=e;if(typeof t==="function"){i=t;c=n;return mapWithFilter(o,i,c)}else{c=t}}for(const e of Object.keys(c)){if(!Array.isArray(c[e])){o[e]=c[e];continue}applyInstruction(o,null,c,e)}return o}const convertMap=e=>{const t={};for(const[n,o]of Object.entries(e||{})){t[n]=[,o]}return t};const take=(e,t)=>{const n={};for(const o in t){applyInstruction(n,e,t,o)}return n};const mapWithFilter=(e,t,n)=>map(e,Object.entries(n).reduce(((e,[n,o])=>{if(Array.isArray(o)){e[n]=o}else{if(typeof o==="function"){e[n]=[t,o()]}else{e[n]=[t,o]}}return e}),{}));const applyInstruction=(e,t,n,o)=>{if(t!==null){let i=n[o];if(typeof i==="function"){i=[,i]}const[c=nonNullish,d=pass,p=o]=i;if(typeof c==="function"&&c(t[p])||typeof c!=="function"&&!!c){e[o]=d(t[p])}return}let[i,c]=n[o];if(typeof c==="function"){let t;const n=i===undefined&&(t=c())!=null;const d=typeof i==="function"&&!!i(void 0)||typeof i!=="function"&&!!i;if(n){e[o]=t}else if(d){e[o]=c()}}else{const t=i===undefined&&c!=null;const n=typeof i==="function"&&!!i(c)||typeof i!=="function"&&!!i;if(t||n){e[o]=c}}};const nonNullish=e=>e!=null;const pass=e=>e;const serializeFloat=e=>{if(e!==e){return"NaN"}switch(e){case Infinity:return"Infinity";case-Infinity:return"-Infinity";default:return e}};const serializeDateTime=e=>e.toISOString().replace(".000Z","Z");const _json=e=>{if(e==null){return{}}if(Array.isArray(e)){return e.filter((e=>e!=null)).map(_json)}if(typeof e==="object"){const t={};for(const n of Object.keys(e)){if(e[n]==null){continue}t[n]=_json(e[n])}return t}return e};t.collectBody=i.collectBody;t.extendedEncodeURIComponent=i.extendedEncodeURIComponent;t.resolvedPath=i.resolvedPath;t.Client=Client;t.Command=Command;t.NoOpLogger=NoOpLogger;t.SENSITIVE_STRING=C;t.ServiceException=ServiceException;t._json=_json;t.convertMap=convertMap;t.createAggregatedClient=createAggregatedClient;t.decorateServiceException=decorateServiceException;t.emitWarningIfUnsupportedVersion=emitWarningIfUnsupportedVersion;t.getArrayIfSingleItem=getArrayIfSingleItem;t.getDefaultClientConfiguration=D;t.getDefaultExtensionConfiguration=getDefaultExtensionConfiguration;t.getValueFromTextNode=getValueFromTextNode;t.isSerializableHeaderValue=isSerializableHeaderValue;t.loadConfigsForDefaultMode=loadConfigsForDefaultMode;t.map=map;t.resolveDefaultRuntimeConfig=resolveDefaultRuntimeConfig;t.serializeDateTime=serializeDateTime;t.serializeFloat=serializeFloat;t.take=take;t.throwDefaultError=throwDefaultError;t.withBaseException=withBaseException;Object.prototype.hasOwnProperty.call(p,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:p["__proto__"]});Object.keys(p).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=p[e]}))},690:(e,t)=>{t.HttpAuthLocation=void 0;(function(e){e["HEADER"]="header";e["QUERY"]="query"})(t.HttpAuthLocation||(t.HttpAuthLocation={}));t.HttpApiKeyAuthLocation=void 0;(function(e){e["HEADER"]="header";e["QUERY"]="query"})(t.HttpApiKeyAuthLocation||(t.HttpApiKeyAuthLocation={}));t.EndpointURLScheme=void 0;(function(e){e["HTTP"]="http";e["HTTPS"]="https"})(t.EndpointURLScheme||(t.EndpointURLScheme={}));t.AlgorithmId=void 0;(function(e){e["MD5"]="md5";e["CRC32"]="crc32";e["CRC32C"]="crc32c";e["SHA1"]="sha1";e["SHA256"]="sha256"})(t.AlgorithmId||(t.AlgorithmId={}));const getChecksumConfiguration=e=>{const n=[];if(e.sha256!==undefined){n.push({algorithmId:()=>t.AlgorithmId.SHA256,checksumConstructor:()=>e.sha256})}if(e.md5!=undefined){n.push({algorithmId:()=>t.AlgorithmId.MD5,checksumConstructor:()=>e.md5})}return{addChecksumAlgorithm(e){n.push(e)},checksumAlgorithms(){return n}}};const resolveChecksumRuntimeConfig=e=>{const t={};e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()}));return t};const getDefaultClientConfiguration=e=>getChecksumConfiguration(e);const resolveDefaultRuntimeConfig=e=>resolveChecksumRuntimeConfig(e);t.FieldPosition=void 0;(function(e){e[e["HEADER"]=0]="HEADER";e[e["TRAILER"]=1]="TRAILER"})(t.FieldPosition||(t.FieldPosition={}));const n="__smithy_context";t.IniSectionType=void 0;(function(e){e["PROFILE"]="profile";e["SSO_SESSION"]="sso-session";e["SERVICES"]="services"})(t.IniSectionType||(t.IniSectionType={}));t.RequestHandlerProtocol=void 0;(function(e){e["HTTP_0_9"]="http/0.9";e["HTTP_1_0"]="http/1.0";e["TDS_8_0"]="tds/8.0"})(t.RequestHandlerProtocol||(t.RequestHandlerProtocol={}));t.SMITHY_CONTEXT_KEY=n;t.getDefaultClientConfiguration=getDefaultClientConfiguration;t.resolveDefaultRuntimeConfig=resolveDefaultRuntimeConfig},4494:(e,t,n)=>{var o=n(8822);const parseUrl=e=>{if(typeof e==="string"){return parseUrl(new URL(e))}const{hostname:t,pathname:n,port:i,protocol:c,search:d}=e;let p;if(d){p=o.parseQueryString(d)}return{hostname:t,port:i?parseInt(i):undefined,protocol:c,path:n,query:p}};t.parseUrl=parseUrl},2674:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.fromBase64=void 0;const o=n(4151);const i=/^[A-Za-z0-9+/]*={0,2}$/;const fromBase64=e=>{if(e.length*3%4!==0){throw new TypeError(`Incorrect padding on base64 string.`)}if(!i.exec(e)){throw new TypeError(`Invalid base64 string.`)}const t=(0,o.fromString)(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};t.fromBase64=fromBase64},8385:(e,t,n)=>{var o=n(2674);var i=n(4871);Object.prototype.hasOwnProperty.call(o,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:o["__proto__"]});Object.keys(o).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=o[e]}));Object.prototype.hasOwnProperty.call(i,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:i["__proto__"]});Object.keys(i).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=i[e]}))},4871:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.toBase64=void 0;const o=n(4151);const i=n(1577);const toBase64=e=>{let t;if(typeof e==="string"){t=(0,i.fromUtf8)(e)}else{t=e}if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number"){throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.")}return(0,o.fromArrayBuffer)(t.buffer,t.byteOffset,t.byteLength).toString("base64")};t.toBase64=toBase64},2098:(e,t)=>{const n=typeof TextEncoder=="function"?new TextEncoder:null;const calculateBodyLength=e=>{if(typeof e==="string"){if(n){return n.encode(e).byteLength}let t=e.length;for(let n=t-1;n>=0;n--){const o=e.charCodeAt(n);if(o>127&&o<=2047)t++;else if(o>2047&&o<=65535)t+=2;if(o>=56320&&o<=57343)n--}return t}else if(typeof e.byteLength==="number"){return e.byteLength}else if(typeof e.size==="number"){return e.size}throw new Error(`Body Length computation failed for ${e}`)};t.calculateBodyLength=calculateBodyLength},3638:(e,t,n)=>{var o=n(3024);const calculateBodyLength=e=>{if(!e){return 0}if(typeof e==="string"){return Buffer.byteLength(e)}else if(typeof e.byteLength==="number"){return e.byteLength}else if(typeof e.size==="number"){return e.size}else if(typeof e.start==="number"&&typeof e.end==="number"){return e.end+1-e.start}else if(e instanceof o.ReadStream){if(e.path!=null){return o.lstatSync(e.path).size}else if(typeof e.fd==="number"){return o.fstatSync(e.fd).size}}throw new Error(`Body Length computation failed for ${e}`)};t.calculateBodyLength=calculateBodyLength},4151:(e,t,n)=>{var o=n(6130);var i=n(181);const fromArrayBuffer=(e,t=0,n=e.byteLength-t)=>{if(!o.isArrayBuffer(e)){throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`)}return i.Buffer.from(e,t,n)};const fromString=(e,t)=>{if(typeof e!=="string"){throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`)}return t?i.Buffer.from(e,t):i.Buffer.from(e)};t.fromArrayBuffer=fromArrayBuffer;t.fromString=fromString},6716:(e,t)=>{const booleanSelector=(e,t,n)=>{if(!(t in e))return undefined;if(e[t]==="true")return true;if(e[t]==="false")return false;throw new Error(`Cannot load ${n} "${t}". Expected "true" or "false", got ${e[t]}.`)};const numberSelector=(e,t,n)=>{if(!(t in e))return undefined;const o=parseInt(e[t],10);if(Number.isNaN(o)){throw new TypeError(`Cannot load ${n} '${t}'. Expected number, got '${e[t]}'.`)}return o};t.SelectorType=void 0;(function(e){e["ENV"]="env";e["CONFIG"]="shared config entry"})(t.SelectorType||(t.SelectorType={}));t.booleanSelector=booleanSelector;t.numberSelector=numberSelector},673:(e,t,n)=>{var o=n(9316);var i=n(5704);var c=n(8857);const d="AWS_EXECUTION_ENV";const p="AWS_REGION";const y="AWS_DEFAULT_REGION";const C="AWS_EC2_METADATA_DISABLED";const Q=["in-region","cross-region","mobile","standard","legacy"];const v="/latest/meta-data/placement/region";const D="AWS_DEFAULTS_MODE";const k="defaults_mode";const $={environmentVariableSelector:e=>e[D],configFileSelector:e=>e[k],default:"legacy"};const resolveDefaultsModeConfig=({region:e=i.loadConfig(o.NODE_REGION_CONFIG_OPTIONS),defaultsMode:t=i.loadConfig($)}={})=>c.memoize((async()=>{const n=typeof t==="function"?await t():t;switch(n?.toLowerCase()){case"auto":return resolveNodeDefaultsModeAuto(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(n?.toLocaleLowerCase());case undefined:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Q.join(", ")}, got ${n}`)}}));const resolveNodeDefaultsModeAuto=async e=>{if(e){const t=typeof e==="function"?await e():e;const n=await inferPhysicalRegion();if(!n){return"standard"}if(t===n){return"in-region"}else{return"cross-region"}}return"standard"};const inferPhysicalRegion=async()=>{if(process.env[d]&&(process.env[p]||process.env[y])){return process.env[p]??process.env[y]}if(!process.env[C]){try{const{getInstanceMetadataEndpoint:e,httpRequest:t}=await n.e(566).then(n.t.bind(n,566,19));const o=await e();return(await t({...o,path:v})).toString()}catch(e){}}};t.resolveDefaultsModeConfig=resolveDefaultsModeConfig},9674:(e,t,n)=>{var o=n(690);class EndpointCache{capacity;data=new Map;parameters=[];constructor({size:e,params:t}){this.capacity=e??50;if(t){this.parameters=t}}get(e,t){const n=this.hash(e);if(n===false){return t()}if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;while(true){const{value:n,done:o}=e.next();this.data.delete(n);if(o||++t>10){break}}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(n.length===0){return false}for(const o of n){const n=String(e[o]??"");if(n.includes("|;")){return false}t+=n+"|;"}return t}}const i=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}$`);const isIpAddress=e=>i.test(e)||e.startsWith("[")&&e.endsWith("]");const c=new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);const isValidHostLabel=(e,t=false)=>{if(!t){return c.test(e)}const n=e.split(".");for(const e of n){if(!isValidHostLabel(e)){return false}}return true};const d={};const p="endpoints";function toDebugString(e){if(typeof e!=="object"||e==null){return e}if("ref"in e){return`$${toDebugString(e.ref)}`}if("fn"in e){return`${e.fn}(${(e.argv||[]).map(toDebugString).join(", ")})`}return JSON.stringify(e,null,2)}class EndpointError extends Error{constructor(e){super(e);this.name="EndpointError"}}const booleanEquals=(e,t)=>e===t;const getAttrPathList=e=>{const t=e.split(".");const n=[];for(const o of t){const t=o.indexOf("[");if(t!==-1){if(o.indexOf("]")!==o.length-1){throw new EndpointError(`Path: '${e}' does not end with ']'`)}const i=o.slice(t+1,-1);if(Number.isNaN(parseInt(i))){throw new EndpointError(`Invalid array index: '${i}' in path: '${e}'`)}if(t!==0){n.push(o.slice(0,t))}n.push(i)}else{n.push(o)}}return n};const getAttr=(e,t)=>getAttrPathList(t).reduce(((n,o)=>{if(typeof n!=="object"){throw new EndpointError(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`)}else if(Array.isArray(n)){return n[parseInt(o)]}return n[o]}),e);const isSet=e=>e!=null;const not=e=>!e;const y={[o.EndpointURLScheme.HTTP]:80,[o.EndpointURLScheme.HTTPS]:443};const parseURL=e=>{const t=(()=>{try{if(e instanceof URL){return e}if(typeof e==="object"&&"hostname"in e){const{hostname:t,port:n,protocol:o="",path:i="",query:c={}}=e;const d=new URL(`${o}//${t}${n?`:${n}`:""}${i}`);d.search=Object.entries(c).map((([e,t])=>`${e}=${t}`)).join("&");return d}return new URL(e)}catch(e){return null}})();if(!t){console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`);return null}const n=t.href;const{host:i,hostname:c,pathname:d,protocol:p,search:C}=t;if(C){return null}const Q=p.slice(0,-1);if(!Object.values(o.EndpointURLScheme).includes(Q)){return null}const v=isIpAddress(c);const D=n.includes(`${i}:${y[Q]}`)||typeof e==="string"&&e.includes(`${i}:${y[Q]}`);const k=`${i}${D?`:${y[Q]}`:``}`;return{scheme:Q,authority:k,path:d,normalizedPath:d.endsWith("/")?d:`${d}/`,isIp:v}};const stringEquals=(e,t)=>e===t;const substring=(e,t,n,o)=>{if(t>=n||e.lengthencodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`));const C={booleanEquals:booleanEquals,getAttr:getAttr,isSet:isSet,isValidHostLabel:isValidHostLabel,not:not,parseURL:parseURL,stringEquals:stringEquals,substring:substring,uriEncode:uriEncode};const evaluateTemplate=(e,t)=>{const n=[];const o={...t.endpointParams,...t.referenceRecord};let i=0;while(i{const n={...t.endpointParams,...t.referenceRecord};return n[e]};const evaluateExpression=(e,t,n)=>{if(typeof e==="string"){return evaluateTemplate(e,n)}else if(e["fn"]){return Q.callFunction(e,n)}else if(e["ref"]){return getReferenceValue(e,n)}throw new EndpointError(`'${t}': ${String(e)} is not a string, function or reference.`)};const callFunction=({fn:e,argv:t},n)=>{const o=t.map((e=>["boolean","number"].includes(typeof e)?e:Q.evaluateExpression(e,"arg",n)));const i=e.split(".");if(i[0]in d&&i[1]!=null){return d[i[0]][i[1]](...o)}return C[e](...o)};const Q={evaluateExpression:evaluateExpression,callFunction:callFunction};const evaluateCondition=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord){throw new EndpointError(`'${e}' is already defined in Reference Record.`)}const o=callFunction(t,n);n.logger?.debug?.(`${p} evaluateCondition: ${toDebugString(t)} = ${toDebugString(o)}`);return{result:o===""?true:!!o,...e!=null&&{toAssign:{name:e,value:o}}}};const evaluateConditions=(e=[],t)=>{const n={};for(const o of e){const{result:e,toAssign:i}=evaluateCondition(o,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e){return{result:e}}if(i){n[i.name]=i.value;t.logger?.debug?.(`${p} assign: ${i.name} := ${toDebugString(i.value)}`)}}return{result:true,referenceRecord:n}};const getEndpointHeaders=(e,t)=>Object.entries(e).reduce(((e,[n,o])=>({...e,[n]:o.map((e=>{const o=evaluateExpression(e,"Header value entry",t);if(typeof o!=="string"){throw new EndpointError(`Header '${n}' value '${o}' is not a string`)}return o}))})),{});const getEndpointProperties=(e,t)=>Object.entries(e).reduce(((e,[n,o])=>({...e,[n]:v.getEndpointProperty(o,t)})),{});const getEndpointProperty=(e,t)=>{if(Array.isArray(e)){return e.map((e=>getEndpointProperty(e,t)))}switch(typeof e){case"string":return evaluateTemplate(e,t);case"object":if(e===null){throw new EndpointError(`Unexpected endpoint property: ${e}`)}return v.getEndpointProperties(e,t);case"boolean":return e;default:throw new EndpointError(`Unexpected endpoint property type: ${typeof e}`)}};const v={getEndpointProperty:getEndpointProperty,getEndpointProperties:getEndpointProperties};const getEndpointUrl=(e,t)=>{const n=evaluateExpression(e,"Endpoint URL",t);if(typeof n==="string"){try{return new URL(n)}catch(e){console.error(`Failed to construct URL with ${n}`,e);throw e}}throw new EndpointError(`Endpoint URL must be a string, got ${typeof n}`)};const evaluateEndpointRule=(e,t)=>{const{conditions:n,endpoint:o}=e;const{result:i,referenceRecord:c}=evaluateConditions(n,t);if(!i){return}const d={...t,referenceRecord:{...t.referenceRecord,...c}};const{url:y,properties:C,headers:Q}=o;t.logger?.debug?.(`${p} Resolving endpoint from template: ${toDebugString(o)}`);return{...Q!=undefined&&{headers:getEndpointHeaders(Q,d)},...C!=undefined&&{properties:getEndpointProperties(C,d)},url:getEndpointUrl(y,d)}};const evaluateErrorRule=(e,t)=>{const{conditions:n,error:o}=e;const{result:i,referenceRecord:c}=evaluateConditions(n,t);if(!i){return}throw new EndpointError(evaluateExpression(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...c}}))};const evaluateRules=(e,t)=>{for(const n of e){if(n.type==="endpoint"){const e=evaluateEndpointRule(n,t);if(e){return e}}else if(n.type==="error"){evaluateErrorRule(n,t)}else if(n.type==="tree"){const e=D.evaluateTreeRule(n,t);if(e){return e}}else{throw new EndpointError(`Unknown endpoint rule: ${n}`)}}throw new EndpointError(`Rules evaluation failed`)};const evaluateTreeRule=(e,t)=>{const{conditions:n,rules:o}=e;const{result:i,referenceRecord:c}=evaluateConditions(n,t);if(!i){return}return D.evaluateRules(o,{...t,referenceRecord:{...t.referenceRecord,...c}})};const D={evaluateRules:evaluateRules,evaluateTreeRule:evaluateTreeRule};const resolveEndpoint=(e,t)=>{const{endpointParams:n,logger:o}=t;const{parameters:i,rules:c}=e;t.logger?.debug?.(`${p} Initial EndpointParams: ${toDebugString(n)}`);const d=Object.entries(i).filter((([,e])=>e.default!=null)).map((([e,t])=>[e,t.default]));if(d.length>0){for(const[e,t]of d){n[e]=n[e]??t}}const y=Object.entries(i).filter((([,e])=>e.required)).map((([e])=>e));for(const e of y){if(n[e]==null){throw new EndpointError(`Missing required parameter: '${e}'`)}}const C=evaluateRules(c,{endpointParams:n,logger:o,referenceRecord:{}});t.logger?.debug?.(`${p} Resolved endpoint: ${toDebugString(C)}`);return C};t.EndpointCache=EndpointCache;t.EndpointError=EndpointError;t.customEndpointFunctions=d;t.isIpAddress=isIpAddress;t.isValidHostLabel=isValidHostLabel;t.resolveEndpoint=resolveEndpoint},6435:(e,t)=>{const n={};const o={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();if(t.length===1){t=`0${t}`}n[e]=t;o[t]=e}function fromHex(e){if(e.length%2!==0){throw new Error("Hex encoded strings must have an even number length")}const t=new Uint8Array(e.length/2);for(let n=0;n{var o=n(690);const getSmithyContext=e=>e[o.SMITHY_CONTEXT_KEY]||(e[o.SMITHY_CONTEXT_KEY]={});const normalizeProvider=e=>{if(typeof e==="function")return e;const t=Promise.resolve(e);return()=>t};t.getSmithyContext=getSmithyContext;t.normalizeProvider=normalizeProvider},5518:(e,t,n)=>{var o=n(2058);t.RETRY_MODES=void 0;(function(e){e["STANDARD"]="standard";e["ADAPTIVE"]="adaptive"})(t.RETRY_MODES||(t.RETRY_MODES={}));const i=3;const c=t.RETRY_MODES.STANDARD;class DefaultRateLimiter{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=false;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7;this.minCapacity=e?.minCapacity??1;this.minFillRate=e?.minFillRate??.5;this.scaleConstant=e?.scaleConstant??.4;this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t;this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds());this.fillRate=this.minFillRate;this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(!this.enabled){return}this.refillTokenBucket();if(e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>DefaultRateLimiter.setTimeoutFn(e,t)))}this.currentCapacity=this.currentCapacity-e}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t);this.lastTimestamp=e}updateClientSendingRate(e){let t;this.updateMeasuredRate();if(o.isThrottlingError(e)){const e=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=e;this.calculateTimeWindow();this.lastThrottleTime=this.getCurrentTimeInSeconds();t=this.cubicThrottle(e);this.enableTokenBucket()}else{this.calculateTimeWindow();t=this.cubicSuccess(this.getCurrentTimeInSeconds())}const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=true}updateTokenBucketRate(e){this.refillTokenBucket();this.fillRate=Math.max(e,this.minFillRate);this.maxCapacity=Math.max(e,this.minCapacity);this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds();const t=Math.floor(e*2)/2;this.requestCount++;if(t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth));this.requestCount=0;this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const d=100;const p=20*1e3;const y=500;const C=500;const Q=5;const v=10;const D=1;const k="amz-sdk-invocation-id";const $="amz-sdk-request";const getDefaultRetryBackoffStrategy=()=>{let e=d;const computeNextBackoffDelay=t=>Math.floor(Math.min(p,Math.random()*2**t*e));const setDelayBase=t=>{e=t};return{computeNextBackoffDelay:computeNextBackoffDelay,setDelayBase:setDelayBase}};const createDefaultRetryToken=({retryDelay:e,retryCount:t,retryCost:n})=>{const getRetryCount=()=>t;const getRetryDelay=()=>Math.min(p,e);const getRetryCost=()=>n;return{getRetryCount:getRetryCount,getRetryDelay:getRetryDelay,getRetryCost:getRetryCost}};class StandardRetryStrategy{maxAttempts;mode=t.RETRY_MODES.STANDARD;capacity=C;retryBackoffStrategy=getDefaultRetryBackoffStrategy();maxAttemptsProvider;constructor(e){this.maxAttempts=e;this.maxAttemptsProvider=typeof e==="function"?e:async()=>e}async acquireInitialRetryToken(e){return createDefaultRetryToken({retryDelay:d,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase(n==="THROTTLING"?y:d);const o=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount());const i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,o):o;const c=this.getCapacityCost(n);this.capacity-=c;return createDefaultRetryToken({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:c})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(C,this.capacity+(e.getRetryCost()??D))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){console.warn(`Max attempts provider could not resolve. Using default of ${i}`);return i}}shouldRetry(e,t,n){const o=e.getRetryCount()+1;return o=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e==="TRANSIENT"?v:Q}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class AdaptiveRetryStrategy{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=t.RETRY_MODES.ADAPTIVE;constructor(e,t){this.maxAttemptsProvider=e;const{rateLimiter:n}=t??{};this.rateLimiter=n??new DefaultRateLimiter;this.standardRetryStrategy=new StandardRetryStrategy(e)}async acquireInitialRetryToken(e){await this.rateLimiter.getSendToken();return this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){this.rateLimiter.updateClientSendingRate(t);return this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({});this.standardRetryStrategy.recordSuccess(e)}}class ConfiguredRetryStrategy extends StandardRetryStrategy{computeNextBackoffDelay;constructor(e,t=d){super(typeof e==="function"?e:async()=>e);if(typeof t==="number"){this.computeNextBackoffDelay=()=>t}else{this.computeNextBackoffDelay=t}}async refreshRetryTokenForRetry(e,t){const n=await super.refreshRetryTokenForRetry(e,t);n.getRetryDelay=()=>this.computeNextBackoffDelay(n.getRetryCount());return n}}t.AdaptiveRetryStrategy=AdaptiveRetryStrategy;t.ConfiguredRetryStrategy=ConfiguredRetryStrategy;t.DEFAULT_MAX_ATTEMPTS=i;t.DEFAULT_RETRY_DELAY_BASE=d;t.DEFAULT_RETRY_MODE=c;t.DefaultRateLimiter=DefaultRateLimiter;t.INITIAL_RETRY_TOKENS=C;t.INVOCATION_ID_HEADER=k;t.MAXIMUM_RETRY_DELAY=p;t.NO_RETRY_INCREMENT=D;t.REQUEST_HEADER=$;t.RETRY_COST=Q;t.StandardRetryStrategy=StandardRetryStrategy;t.THROTTLING_RETRY_DELAY_BASE=y;t.TIMEOUT_RETRY_COST=v},1732:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ByteArrayCollector=void 0;class ByteArrayCollector{allocByteArray;byteLength=0;byteArrays=[];constructor(e){this.allocByteArray=e}push(e){this.byteArrays.push(e);this.byteLength+=e.byteLength}flush(){if(this.byteArrays.length===1){const e=this.byteArrays[0];this.reset();return e}const e=this.allocByteArray(this.byteLength);let t=0;for(let n=0;n{Object.defineProperty(t,"__esModule",{value:true});t.ChecksumStream=void 0;const n=typeof ReadableStream==="function"?ReadableStream:function(){};class ChecksumStream extends n{}t.ChecksumStream=ChecksumStream},1775:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.ChecksumStream=void 0;const o=n(8385);const i=n(2203);class ChecksumStream extends i.Duplex{expectedChecksum;checksumSourceLocation;checksum;source;base64Encoder;pendingCallback=null;constructor({expectedChecksum:e,checksum:t,source:n,checksumSourceLocation:i,base64Encoder:c}){super();if(typeof n.pipe==="function"){this.source=n}else{throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name??n} in ChecksumStream.`)}this.base64Encoder=c??o.toBase64;this.expectedChecksum=e;this.checksum=t;this.checksumSourceLocation=i;this.source.pipe(this)}_read(e){if(this.pendingCallback){const e=this.pendingCallback;this.pendingCallback=null;e()}}_write(e,t,n){try{this.checksum.update(e);const t=this.push(e);if(!t){this.pendingCallback=n;return}}catch(e){return n(e)}return n()}async _final(e){try{const t=await this.checksum.digest();const n=this.base64Encoder(t);if(this.expectedChecksum!==n){return e(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${n}"`+` in response header "${this.checksumSourceLocation}".`))}}catch(t){return e(t)}this.push(null);return e()}}t.ChecksumStream=ChecksumStream},4129:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.createChecksumStream=void 0;const o=n(8385);const i=n(4414);const c=n(7753);const createChecksumStream=({expectedChecksum:e,checksum:t,source:n,checksumSourceLocation:d,base64Encoder:p})=>{if(!(0,i.isReadableStream)(n)){throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name??n} in ChecksumStream.`)}const y=p??o.toBase64;if(typeof TransformStream!=="function"){throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.")}const C=new TransformStream({start(){},async transform(e,n){t.update(e);n.enqueue(e)},async flush(n){const o=await t.digest();const i=y(o);if(e!==i){const t=new Error(`Checksum mismatch: expected "${e}" but received "${i}"`+` in response header "${d}".`);n.error(t)}else{n.terminate()}}});n.pipeThrough(C);const Q=C.readable;Object.setPrototypeOf(Q,c.ChecksumStream.prototype);return Q};t.createChecksumStream=createChecksumStream},5639:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.createChecksumStream=createChecksumStream;const o=n(4414);const i=n(1775);const c=n(4129);function createChecksumStream(e){if(typeof ReadableStream==="function"&&(0,o.isReadableStream)(e.source)){return(0,c.createChecksumStream)(e)}return new i.ChecksumStream(e)}},2005:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.createBufferedReadable=createBufferedReadable;const o=n(7075);const i=n(1732);const c=n(8213);const d=n(4414);function createBufferedReadable(e,t,n){if((0,d.isReadableStream)(e)){return(0,c.createBufferedReadableStream)(e,t,n)}const p=new o.Readable({read(){}});let y=false;let C=0;const Q=["",new i.ByteArrayCollector((e=>new Uint8Array(e))),new i.ByteArrayCollector((e=>Buffer.from(new Uint8Array(e))))];let v=-1;e.on("data",(e=>{const o=(0,c.modeOf)(e,true);if(v!==o){if(v>=0){p.push((0,c.flush)(Q,v))}v=o}if(v===-1){p.push(e);return}const i=(0,c.sizeOf)(e);C+=i;const d=(0,c.sizeOf)(Q[v]);if(i>=t&&d===0){p.push(e)}else{const o=(0,c.merge)(Q,v,e);if(!y&&C>t*2){y=true;n?.warn(`@smithy/util-stream - stream chunk size ${i} is below threshold of ${t}, automatically buffering.`)}if(o>=t){p.push((0,c.flush)(Q,v))}}}));e.on("end",(()=>{if(v!==-1){const e=(0,c.flush)(Q,v);if((0,c.sizeOf)(e)>0){p.push(e)}}p.push(null)}));return p}},8213:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.createBufferedReadable=void 0;t.createBufferedReadableStream=createBufferedReadableStream;t.merge=merge;t.flush=flush;t.sizeOf=sizeOf;t.modeOf=modeOf;const o=n(1732);function createBufferedReadableStream(e,t,n){const i=e.getReader();let c=false;let d=0;const p=["",new o.ByteArrayCollector((e=>new Uint8Array(e)))];let y=-1;const pull=async e=>{const{value:o,done:C}=await i.read();const Q=o;if(C){if(y!==-1){const t=flush(p,y);if(sizeOf(t)>0){e.enqueue(t)}}e.close()}else{const o=modeOf(Q,false);if(y!==o){if(y>=0){e.enqueue(flush(p,y))}y=o}if(y===-1){e.enqueue(Q);return}const i=sizeOf(Q);d+=i;const C=sizeOf(p[y]);if(i>=t&&C===0){e.enqueue(Q)}else{const o=merge(p,y,Q);if(!c&&d>t*2){c=true;n?.warn(`@smithy/util-stream - stream chunk size ${i} is below threshold of ${t}, automatically buffering.`)}if(o>=t){e.enqueue(flush(p,y))}else{await pull(e)}}}};return new ReadableStream({pull:pull})}t.createBufferedReadable=createBufferedReadableStream;function merge(e,t,n){switch(t){case 0:e[0]+=n;return sizeOf(e[0]);case 1:case 2:e[t].push(n);return sizeOf(e[t])}}function flush(e,t){switch(t){case 0:const n=e[0];e[0]="";return n;case 1:case 2:return e[t].flush()}throw new Error(`@smithy/util-stream - invalid index ${t} given to flush()`)}function sizeOf(e){return e?.byteLength??e?.length??0}function modeOf(e,t=true){if(t&&typeof Buffer!=="undefined"&&e instanceof Buffer){return 2}if(e instanceof Uint8Array){return 1}if(typeof e==="string"){return 0}return-1}},3492:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.getAwsChunkedEncodingStream=void 0;const getAwsChunkedEncodingStream=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:o,checksumAlgorithmFn:i,checksumLocationName:c,streamHasher:d}=t;const p=n!==undefined&&o!==undefined&&i!==undefined&&c!==undefined&&d!==undefined;const y=p?d(i,e):undefined;const C=e.getReader();return new ReadableStream({async pull(e){const{value:t,done:i}=await C.read();if(i){e.enqueue(`0\r\n`);if(p){const t=n(await y);e.enqueue(`${c}:${t}\r\n`);e.enqueue(`\r\n`)}e.close()}else{e.enqueue(`${(o(t)||0).toString(16)}\r\n${t}\r\n`)}}})};t.getAwsChunkedEncodingStream=getAwsChunkedEncodingStream},6522:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.getAwsChunkedEncodingStream=getAwsChunkedEncodingStream;const o=n(7075);const i=n(3492);const c=n(4414);function getAwsChunkedEncodingStream(e,t){const n=e;const d=e;if((0,c.isReadableStream)(d)){return(0,i.getAwsChunkedEncodingStream)(d,t)}const{base64Encoder:p,bodyLengthChecker:y,checksumAlgorithmFn:C,checksumLocationName:Q,streamHasher:v}=t;const D=p!==undefined&&C!==undefined&&Q!==undefined&&v!==undefined;const k=D?v(C,n):undefined;const $=new o.Readable({read:()=>{}});n.on("data",(e=>{const t=y(e)||0;if(t===0){return}$.push(`${t.toString(16)}\r\n`);$.push(e);$.push("\r\n")}));n.on("end",(async()=>{$.push(`0\r\n`);if(D){const e=p(await k);$.push(`${Q}:${e}\r\n`);$.push(`\r\n`)}$.push(null)}));return $}},66:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.headStream=headStream;async function headStream(e,t){let n=0;const o=[];const i=e.getReader();let c=false;while(!c){const{done:e,value:d}=await i.read();if(d){o.push(d);n+=d?.byteLength??0}if(n>=t){break}c=e}i.releaseLock();const d=new Uint8Array(Math.min(t,n));let p=0;for(const e of o){if(e.byteLength>d.byteLength-p){d.set(e.subarray(0,d.byteLength-p),p);break}else{d.set(e,p)}p+=e.length}return d}},8412:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.headStream=void 0;const o=n(2203);const i=n(66);const c=n(4414);const headStream=(e,t)=>{if((0,c.isReadableStream)(e)){return(0,i.headStream)(e,t)}return new Promise(((n,o)=>{const i=new Collector;i.limit=t;e.pipe(i);e.on("error",(e=>{i.end();o(e)}));i.on("error",o);i.on("finish",(function(){const e=new Uint8Array(Buffer.concat(this.buffers));n(e)}))}))};t.headStream=headStream;class Collector extends o.Writable{buffers=[];limit=Infinity;bytesBuffered=0;_write(e,t,n){this.buffers.push(e);this.bytesBuffered+=e.byteLength??0;if(this.bytesBuffered>=this.limit){const e=this.bytesBuffered-this.limit;const t=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=t.subarray(0,t.byteLength-e);this.emit("finish")}n()}}},4252:(e,t,n)=>{var o=n(8385);var i=n(1577);var c=n(1775);var d=n(5639);var p=n(2005);var y=n(6522);var C=n(8412);var Q=n(7201);var v=n(2108);var D=n(4414);class Uint8ArrayBlobAdapter extends Uint8Array{static fromString(e,t="utf-8"){if(typeof e==="string"){if(t==="base64"){return Uint8ArrayBlobAdapter.mutate(o.fromBase64(e))}return Uint8ArrayBlobAdapter.mutate(i.fromUtf8(e))}throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){Object.setPrototypeOf(e,Uint8ArrayBlobAdapter.prototype);return e}transformToString(e="utf-8"){if(e==="base64"){return o.toBase64(this)}return i.toUtf8(this)}}t.isBlob=D.isBlob;t.isReadableStream=D.isReadableStream;t.Uint8ArrayBlobAdapter=Uint8ArrayBlobAdapter;Object.prototype.hasOwnProperty.call(c,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:c["__proto__"]});Object.keys(c).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=c[e]}));Object.prototype.hasOwnProperty.call(d,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:d["__proto__"]});Object.keys(d).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=d[e]}));Object.prototype.hasOwnProperty.call(p,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:p["__proto__"]});Object.keys(p).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=p[e]}));Object.prototype.hasOwnProperty.call(y,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:y["__proto__"]});Object.keys(y).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=y[e]}));Object.prototype.hasOwnProperty.call(C,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:C["__proto__"]});Object.keys(C).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=C[e]}));Object.prototype.hasOwnProperty.call(Q,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:Q["__proto__"]});Object.keys(Q).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=Q[e]}));Object.prototype.hasOwnProperty.call(v,"__proto__")&&!Object.prototype.hasOwnProperty.call(t,"__proto__")&&Object.defineProperty(t,"__proto__",{enumerable:true,value:v["__proto__"]});Object.keys(v).forEach((function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e))t[e]=v[e]}))},2207:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.sdkStreamMixin=void 0;const o=n(7809);const i=n(8385);const c=n(6435);const d=n(1577);const p=n(4414);const y="The stream has already been transformed.";const sdkStreamMixin=e=>{if(!isBlobInstance(e)&&!(0,p.isReadableStream)(e)){const t=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${t}`)}let t=false;const transformToByteArray=async()=>{if(t){throw new Error(y)}t=true;return await(0,o.streamCollector)(e)};const blobToWebStream=e=>{if(typeof e.stream!=="function"){throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\n"+"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 e.stream()};return Object.assign(e,{transformToByteArray:transformToByteArray,transformToString:async e=>{const t=await transformToByteArray();if(e==="base64"){return(0,i.toBase64)(t)}else if(e==="hex"){return(0,c.toHex)(t)}else if(e===undefined||e==="utf8"||e==="utf-8"){return(0,d.toUtf8)(t)}else if(typeof TextDecoder==="function"){return new TextDecoder(e).decode(t)}else{throw new Error("TextDecoder is not available, please make sure polyfill is provided.")}},transformToWebStream:()=>{if(t){throw new Error(y)}t=true;if(isBlobInstance(e)){return blobToWebStream(e)}else if((0,p.isReadableStream)(e)){return e}else{throw new Error(`Cannot transform payload to web stream, got ${e}`)}}})};t.sdkStreamMixin=sdkStreamMixin;const isBlobInstance=e=>typeof Blob==="function"&&e instanceof Blob},7201:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.sdkStreamMixin=void 0;const o=n(1279);const i=n(4151);const c=n(2203);const d=n(2207);const p="The stream has already been transformed.";const sdkStreamMixin=e=>{if(!(e instanceof c.Readable)){try{return(0,d.sdkStreamMixin)(e)}catch(t){const n=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${n}`)}}let t=false;const transformToByteArray=async()=>{if(t){throw new Error(p)}t=true;return await(0,o.streamCollector)(e)};return Object.assign(e,{transformToByteArray:transformToByteArray,transformToString:async e=>{const t=await transformToByteArray();if(e===undefined||Buffer.isEncoding(e)){return(0,i.fromArrayBuffer)(t.buffer,t.byteOffset,t.byteLength).toString(e)}else{const n=new TextDecoder(e);return n.decode(t)}},transformToWebStream:()=>{if(t){throw new Error(p)}if(e.readableFlowing!==null){throw new Error("The stream has been consumed by other callbacks.")}if(typeof c.Readable.toWeb!=="function"){throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.")}t=true;return c.Readable.toWeb(e)}})};t.sdkStreamMixin=sdkStreamMixin},7570:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.splitStream=splitStream;async function splitStream(e){if(typeof e.stream==="function"){e=e.stream()}const t=e;return t.tee()}},2108:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.splitStream=splitStream;const o=n(2203);const i=n(7570);const c=n(4414);async function splitStream(e){if((0,c.isReadableStream)(e)||(0,c.isBlob)(e)){return(0,i.splitStream)(e)}const t=new o.PassThrough;const n=new o.PassThrough;e.pipe(t);e.pipe(n);return[t,n]}},4414:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.isBlob=t.isReadableStream=void 0;const isReadableStream=e=>typeof ReadableStream==="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream);t.isReadableStream=isReadableStream;const isBlob=e=>typeof Blob==="function"&&(e?.constructor?.name===Blob.name||e instanceof Blob);t.isBlob=isBlob},146:(e,t)=>{const escapeUri=e=>encodeURIComponent(e).replace(/[!'()*]/g,hexEncode);const hexEncode=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;const escapeUriPath=e=>e.split("/").map(escapeUri).join("/");t.escapeUri=escapeUri;t.escapeUriPath=escapeUriPath},1577:(e,t,n)=>{var o=n(4151);const fromUtf8=e=>{const t=o.fromString(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};const toUint8Array=e=>{if(typeof e==="string"){return fromUtf8(e)}if(ArrayBuffer.isView(e)){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)}return new Uint8Array(e)};const toUtf8=e=>{if(typeof e==="string"){return e}if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number"){throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.")}return o.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength).toString("utf8")};t.fromUtf8=fromUtf8;t.toUint8Array=toUint8Array;t.toUtf8=toUtf8},5290:(e,t)=>{const getCircularReplacer=()=>{const e=new WeakSet;return(t,n)=>{if(typeof n==="object"&&n!==null){if(e.has(n)){return"[Circular]"}e.add(n)}return n}};const sleep=e=>new Promise((t=>setTimeout(t,e*1e3)));const n={minDelay:2,maxDelay:120};t.WaiterState=void 0;(function(e){e["ABORTED"]="ABORTED";e["FAILURE"]="FAILURE";e["SUCCESS"]="SUCCESS";e["RETRY"]="RETRY";e["TIMEOUT"]="TIMEOUT"})(t.WaiterState||(t.WaiterState={}));const checkExceptions=e=>{if(e.state===t.WaiterState.ABORTED){const t=new Error(`${JSON.stringify({...e,reason:"Request was aborted"},getCircularReplacer())}`);t.name="AbortError";throw t}else if(e.state===t.WaiterState.TIMEOUT){const t=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"},getCircularReplacer())}`);t.name="TimeoutError";throw t}else if(e.state!==t.WaiterState.SUCCESS){throw new Error(`${JSON.stringify(e,getCircularReplacer())}`)}return e};const exponentialBackoffWithJitter=(e,t,n,o)=>{if(o>n)return t;const i=e*2**(o-1);return randomInRange(e,i)};const randomInRange=(e,t)=>e+Math.random()*(t-e);const runPolling=async({minDelay:e,maxDelay:n,maxWaitTime:o,abortController:i,client:c,abortSignal:d},p,y)=>{const C={};const{state:Q,reason:v}=await y(c,p);if(v){const e=createMessageFromResponse(v);C[e]|=0;C[e]+=1}if(Q!==t.WaiterState.RETRY){return{state:Q,reason:v,observedResponses:C}}let D=1;const k=Date.now()+o*1e3;const $=Math.log(n/e)/Math.log(2)+1;while(true){if(i?.signal?.aborted||d?.aborted){const e="AbortController signal aborted.";C[e]|=0;C[e]+=1;return{state:t.WaiterState.ABORTED,observedResponses:C}}const o=exponentialBackoffWithJitter(e,n,$,D);if(Date.now()+o*1e3>k){return{state:t.WaiterState.TIMEOUT,observedResponses:C}}await sleep(o);const{state:Q,reason:v}=await y(c,p);if(v){const e=createMessageFromResponse(v);C[e]|=0;C[e]+=1}if(Q!==t.WaiterState.RETRY){return{state:Q,reason:v,observedResponses:C}}D+=1}};const createMessageFromResponse=e=>{if(e?.$responseBodyText){return`Deserialization error for body: ${e.$responseBodyText}`}if(e?.$metadata?.httpStatusCode){if(e.$response||e.message){return`${e.$response.statusCode??e.$metadata.httpStatusCode??"Unknown"}: ${e.message}`}return`${e.$metadata.httpStatusCode}: OK`}return String(e?.message??JSON.stringify(e,getCircularReplacer())??"Unknown")};const validateWaiterOptions=e=>{if(e.maxWaitTime<=0){throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`)}else if(e.minDelay<=0){throw new Error(`WaiterConfiguration.minDelay must be greater than 0`)}else if(e.maxDelay<=0){throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`)}else if(e.maxWaitTime<=e.minDelay){throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`)}else if(e.maxDelay{let n;const o=new Promise((o=>{n=()=>o({state:t.WaiterState.ABORTED});if(typeof e.addEventListener==="function"){e.addEventListener("abort",n)}else{e.onabort=n}}));return{clearListener(){if(typeof e.removeEventListener==="function"){e.removeEventListener("abort",n)}},aborted:o}};const createWaiter=async(e,t,o)=>{const i={...n,...e};validateWaiterOptions(i);const c=[runPolling(i,t,o)];const d=[];if(e.abortSignal){const{aborted:t,clearListener:n}=abortTimeout(e.abortSignal);d.push(n);c.push(t)}if(e.abortController?.signal){const{aborted:t,clearListener:n}=abortTimeout(e.abortController.signal);d.push(n);c.push(t)}return Promise.race(c).then((e=>{for(const e of d){e()}return e}))};t.checkExceptions=checkExceptions;t.createWaiter=createWaiter;t.waiterServiceDefaults=n},266:(e,t,n)=>{var o=n(8492);const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const v4=()=>{if(o.randomUUID){return o.randomUUID()}const e=new Uint8Array(16);crypto.getRandomValues(e);e[6]=e[6]&15|64;e[8]=e[8]&63|128;return i[e[0]]+i[e[1]]+i[e[2]]+i[e[3]]+"-"+i[e[4]]+i[e[5]]+"-"+i[e[6]]+i[e[7]]+"-"+i[e[8]]+i[e[9]]+"-"+i[e[10]]+i[e[11]]+i[e[12]]+i[e[13]]+i[e[14]]+i[e[15]]};t.v4=v4},8492:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});t.randomUUID=void 0;const o=n(1860);const i=o.__importDefault(n(6982));t.randomUUID=i.default.randomUUID.bind(i.default)},5183:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))o(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.req=t.json=t.toBuffer=void 0;const d=c(n(8611));const p=c(n(5692));async function toBuffer(e){let t=0;const n=[];for await(const o of e){t+=o.length;n.push(o)}return Buffer.concat(n,t)}t.toBuffer=toBuffer;async function json(e){const t=await toBuffer(e);const n=t.toString("utf8");try{return JSON.parse(n)}catch(e){const t=e;t.message+=` (input: ${n})`;throw t}}t.json=json;function req(e,t={}){const n=typeof e==="string"?e:e.href;const o=(n.startsWith("https:")?p:d).request(e,t);const i=new Promise(((e,t)=>{o.once("response",e).once("error",t).end()}));o.then=i.then.bind(i);return o}t.req=req},8894:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))o(t,e,n);i(t,e);return t};var d=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))o(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});t.Agent=void 0;const p=c(n(8611));d(n(5183),t);const y=Symbol("AgentBaseInternalState");class Agent extends p.Agent{constructor(e){super(e);this[y]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==="boolean"){return e.secureEndpoint}if(typeof e.protocol==="string"){return e.protocol==="https:"}}const{stack:t}=new Error;if(typeof t!=="string")return false;return t.split("\n").some((e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1))}createSocket(e,t,n){const o={...t,secureEndpoint:this.isSecureEndpoint(t)};Promise.resolve().then((()=>this.connect(e,o))).then((i=>{if(i instanceof p.Agent){return i.addRequest(e,o)}this[y].currentSocket=i;super.createSocket(e,t,n)}),n)}createConnection(){const e=this[y].currentSocket;this[y].currentSocket=undefined;if(!e){throw new Error("No socket was returned in the `connect()` function")}return e}get defaultPort(){return this[y].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){if(this[y]){this[y].defaultPort=e}}get protocol(){return this[y].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){if(this[y]){this[y].protocol=e}}}t.Agent=Agent},9380:e=>{e.exports=balanced;function balanced(e,t,n){if(e instanceof RegExp)e=maybeMatch(e,n);if(t instanceof RegExp)t=maybeMatch(t,n);var o=range(e,t,n);return o&&{start:o[0],end:o[1],pre:n.slice(0,o[0]),body:n.slice(o[0]+e.length,o[1]),post:n.slice(o[1]+t.length)}}function maybeMatch(e,t){var n=t.match(e);return n?n[0]:null}balanced.range=range;function range(e,t,n){var o,i,c,d,p;var y=n.indexOf(e);var C=n.indexOf(t,y+1);var Q=y;if(y>=0&&C>0){if(e===t){return[y,C]}o=[];c=n.length;while(Q>=0&&!p){if(Q==y){o.push(Q);y=n.indexOf(e,Q+1)}else if(o.length==1){p=[o.pop(),C]}else{i=o.pop();if(i=0?y:C}if(o.length){p=[c,d]}}return p}},7087:e=>{e.exports=function(e,n){var o=[];for(var i=0;i{t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let o=0;let i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}o++;if(e==="%c"){i=o}}));t.splice(i,0,n)}t.log=console.debug||console.log||(()=>{});function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=n(897)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},897:(e,t,n)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=n(744);createDebug.destroy=destroy;Object.keys(e).forEach((t=>{createDebug[t]=e[t]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let n=0;n{if(t==="%%"){return"%"}c++;const i=createDebug.formatters[o];if(typeof i==="function"){const o=e[c];t=i.call(n,o);e.splice(c,1);c--}return t}));createDebug.formatArgs.call(n,e);const d=n.log||createDebug.log;d.apply(n,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(n!==null){return n}if(o!==createDebug.namespaces){o=createDebug.namespaces;i=createDebug.enabled(e)}return i},set:e=>{n=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,t){const n=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);n.log=this.log;return n}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];let t;const n=(typeof e==="string"?e:"").split(/[\s,]+/);const o=n.length;for(t=0;t"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let t;let n;for(t=0,n=createDebug.skips.length;t{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=n(6110)}else{e.exports=n(5108)}},5108:(e,t,n)=>{const o=n(2018);const i=n(9023);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");t.colors=[6,2,3,4,5,1];try{const e=n(1450);if(e&&(e.stderr||e).level>=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let o=process.env[t];if(/^(yes|on|true|enabled)$/i.test(o)){o=true}else if(/^(no|off|false|disabled)$/i.test(o)){o=false}else if(o==="null"){o=null}else{o=Number(o)}e[n]=o;return e}),{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):o.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:n,useColors:o}=this;if(o){const o=this.color;const i="[3"+(o<8?o:"8;5;"+o);const c=` ${i};1m${n} `;t[0]=c+t[0].split("\n").join("\n"+c);t.push(i+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+n+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let o=0;oe.trim())).join(" ")};c.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},3813:e=>{e.exports=(e,t=process.argv)=>{const n=e.startsWith("-")?"":e.length===1?"-":"--";const o=t.indexOf(n+e);const i=t.indexOf("--");return o!==-1&&(i===-1||o0){k("Patching connection write() output buffer with updated header");n=e.outputData[0].data;o=n.indexOf("\r\n\r\n")+4;e.outputData[0].data=e._header+n.substring(o);k("Output buffer: %o",e.outputData[0].data)}let i;if(this.proxy.protocol==="https:"){k("Creating `tls.Socket`: %o",this.connectOpts);i=y.connect(this.connectOpts)}else{k("Creating `net.Socket`: %o",this.connectOpts);i=p.connect(this.connectOpts)}await(0,Q.once)(i,"connect");return i}}HttpProxyAgent.protocols=["http","https"];t.HttpProxyAgent=HttpProxyAgent;function omit(e,...t){const n={};let o;for(o in e){if(!t.includes(o)){n[o]=e[o]}}return n}},3669:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))o(t,e,n);i(t,e);return t};var d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.HttpsProxyAgent=void 0;const p=c(n(9278));const y=c(n(4756));const C=d(n(2613));const Q=d(n(2830));const v=n(3333);const D=n(7016);const k=n(7943);const $=(0,Q.default)("https-proxy-agent");const setServernameFromNonIpHost=e=>{if(e.servername===undefined&&e.host&&!p.isIP(e.host)){return{...e,servername:e.host}}return e};class HttpsProxyAgent extends v.Agent{constructor(e,t){super(t);this.options={path:undefined};this.proxy=typeof e==="string"?new D.URL(e):e;this.proxyHeaders=t?.headers??{};$("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,"");const o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...t?omit(t,"headers"):null,host:n,port:o}}async connect(e,t){const{proxy:n}=this;if(!t.host){throw new TypeError('No "host" provided')}let o;if(n.protocol==="https:"){$("Creating `tls.Socket`: %o",this.connectOpts);o=y.connect(setServernameFromNonIpHost(this.connectOpts))}else{$("Creating `net.Socket`: %o",this.connectOpts);o=p.connect(this.connectOpts)}const i=typeof this.proxyHeaders==="function"?this.proxyHeaders():{...this.proxyHeaders};const c=p.isIPv6(t.host)?`[${t.host}]`:t.host;let d=`CONNECT ${c}:${t.port} HTTP/1.1\r\n`;if(n.username||n.password){const e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(e).toString("base64")}`}i.Host=`${c}:${t.port}`;if(!i["Proxy-Connection"]){i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close"}for(const e of Object.keys(i)){d+=`${e}: ${i[e]}\r\n`}const Q=(0,k.parseProxyResponse)(o);o.write(`${d}\r\n`);const{connect:v,buffered:D}=await Q;e.emit("proxyConnect",v);this.emit("proxyConnect",v,e);if(v.statusCode===200){e.once("socket",resume);if(t.secureEndpoint){$("Upgrading socket connection to TLS");return y.connect({...omit(setServernameFromNonIpHost(t),"host","path","port"),socket:o})}return o}o.destroy();const V=new p.Socket({writable:false});V.readable=true;e.once("socket",(e=>{$("Replaying proxy buffer for failed request");(0,C.default)(e.listenerCount("data")>0);e.push(D);e.push(null)}));return V}}HttpsProxyAgent.protocols=["http","https"];t.HttpsProxyAgent=HttpsProxyAgent;function resume(e){e.resume()}function omit(e,...t){const n={};let o;for(o in e){if(!t.includes(o)){n[o]=e[o]}}return n}},7943:function(e,t,n){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.parseProxyResponse=void 0;const i=o(n(2830));const c=(0,i.default)("https-proxy-agent:parse-proxy-response");function parseProxyResponse(e){return new Promise(((t,n)=>{let o=0;const i=[];function read(){const t=e.read();if(t)ondata(t);else e.once("readable",read)}function cleanup(){e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("readable",read)}function onend(){cleanup();c("onend");n(new Error("Proxy connection ended before receiving CONNECT response"))}function onerror(e){cleanup();c("onerror %o",e);n(e)}function ondata(d){i.push(d);o+=d.length;const p=Buffer.concat(i,o);const y=p.indexOf("\r\n\r\n");if(y===-1){c("have not received end of HTTP headers yet...");read();return}const C=p.slice(0,y).toString("ascii").split("\r\n");const Q=C.shift();if(!Q){e.destroy();return n(new Error("No header received from proxy CONNECT response"))}const v=Q.split(" ");const D=+v[1];const k=v.slice(2).join(" ");const $={};for(const t of C){if(!t)continue;const o=t.indexOf(":");if(o===-1){e.destroy();return n(new Error(`Invalid header from proxy CONNECT response: "${t}"`))}const i=t.slice(0,o).toLowerCase();const c=t.slice(o+1).trimStart();const d=$[i];if(typeof d==="string"){$[i]=[d,c]}else if(Array.isArray(d)){d.push(c)}else{$[i]=c}}c("got proxy server response: %o %o",Q,$);cleanup();t({connect:{statusCode:D,statusText:k,headers:$},buffered:p})}e.on("error",onerror);e.on("end",onend);read()}))}t.parseProxyResponse=parseProxyResponse},8515:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))o(t,e,n);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.req=t.json=t.toBuffer=void 0;const d=c(n(8611));const p=c(n(5692));async function toBuffer(e){let t=0;const n=[];for await(const o of e){t+=o.length;n.push(o)}return Buffer.concat(n,t)}t.toBuffer=toBuffer;async function json(e){const t=await toBuffer(e);const n=t.toString("utf8");try{return JSON.parse(n)}catch(e){const t=e;t.message+=` (input: ${n})`;throw t}}t.json=json;function req(e,t={}){const n=typeof e==="string"?e:e.href;const o=(n.startsWith("https:")?p:d).request(e,t);const i=new Promise(((e,t)=>{o.once("response",e).once("error",t).end()}));o.then=i.then.bind(i);return o}t.req=req},3333:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){if(o===undefined)o=n;var i=Object.getOwnPropertyDescriptor(t,n);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[n]}}}Object.defineProperty(e,o,i)}:function(e,t,n,o){if(o===undefined)o=n;e[o]=t[n]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n))o(t,e,n);i(t,e);return t};var d=this&&this.__exportStar||function(e,t){for(var n in e)if(n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n))o(t,e,n)};Object.defineProperty(t,"__esModule",{value:true});t.Agent=void 0;const p=c(n(9278));const y=c(n(8611));const C=n(5692);d(n(8515),t);const Q=Symbol("AgentBaseInternalState");class Agent extends y.Agent{constructor(e){super(e);this[Q]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==="boolean"){return e.secureEndpoint}if(typeof e.protocol==="string"){return e.protocol==="https:"}}const{stack:t}=new Error;if(typeof t!=="string")return false;return t.split("\n").some((e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1))}incrementSockets(e){if(this.maxSockets===Infinity&&this.maxTotalSockets===Infinity){return null}if(!this.sockets[e]){this.sockets[e]=[]}const t=new p.Socket({writable:false});this.sockets[e].push(t);this.totalSocketCount++;return t}decrementSockets(e,t){if(!this.sockets[e]||t===null){return}const n=this.sockets[e];const o=n.indexOf(t);if(o!==-1){n.splice(o,1);this.totalSocketCount--;if(n.length===0){delete this.sockets[e]}}}getName(e){const t=typeof e.secureEndpoint==="boolean"?e.secureEndpoint:this.isSecureEndpoint(e);if(t){return C.Agent.prototype.getName.call(this,e)}return super.getName(e)}createSocket(e,t,n){const o={...t,secureEndpoint:this.isSecureEndpoint(t)};const i=this.getName(o);const c=this.incrementSockets(i);Promise.resolve().then((()=>this.connect(e,o))).then((d=>{this.decrementSockets(i,c);if(d instanceof y.Agent){try{return d.addRequest(e,o)}catch(e){return n(e)}}this[Q].currentSocket=d;super.createSocket(e,t,n)}),(e=>{this.decrementSockets(i,c);n(e)}))}createConnection(){const e=this[Q].currentSocket;this[Q].currentSocket=undefined;if(!e){throw new Error("No socket was returned in the `connect()` function")}return e}get defaultPort(){return this[Q].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){if(this[Q]){this[Q].defaultPort=e}}get protocol(){return this[Q].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){if(this[Q]){this[Q].protocol=e}}}t.Agent=Agent},3772:(e,t,n)=>{e.exports=minimatch;minimatch.Minimatch=Minimatch;var o=function(){try{return n(6928)}catch(e){}}()||{sep:"/"};minimatch.sep=o.sep;var i=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var c=n(3783);var d={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var p="[^/]";var y=p+"*?";var C="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var Q="(?:(?!(?:\\/|^)\\.).)*?";var v=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce((function(e,t){e[t]=true;return e}),{})}var D=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(n,o,i){return minimatch(n,e,t)}}function ext(e,t){t=t||{};var n={};Object.keys(e).forEach((function(t){n[t]=e[t]}));Object.keys(t).forEach((function(e){n[e]=t[e]}));return n}minimatch.defaults=function(e){if(!e||typeof e!=="object"||!Object.keys(e).length){return minimatch}var t=minimatch;var n=function minimatch(n,o,i){return t(n,o,ext(e,i))};n.Minimatch=function Minimatch(n,o){return new t.Minimatch(n,ext(e,o))};n.Minimatch.defaults=function defaults(n){return t.defaults(ext(e,n)).Minimatch};n.filter=function filter(n,o){return t.filter(n,ext(e,o))};n.defaults=function defaults(n){return t.defaults(ext(e,n))};n.makeRe=function makeRe(n,o){return t.makeRe(n,ext(e,o))};n.braceExpand=function braceExpand(n,o){return t.braceExpand(n,ext(e,o))};n.match=function(n,o,i){return t.match(n,o,ext(e,i))};return n};Minimatch.defaults=function(e){return minimatch.defaults(e).Minimatch};function minimatch(e,t,n){assertValidPattern(t);if(!n)n={};if(!n.nocomment&&t.charAt(0)==="#"){return false}return new Minimatch(t,n).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}assertValidPattern(e);if(!t)t={};e=e.trim();if(!t.allowWindowsEscape&&o.sep!=="/"){e=e.split(o.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!t.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var n=this.globSet=this.braceExpand();if(t.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,n);n=this.globParts=n.map((function(e){return e.split(D)}));this.debug(this.pattern,n);n=n.map((function(e,t,n){return e.map(this.parse,this)}),this);this.debug(this.pattern,n);n=n.filter((function(e){return e.indexOf(false)===-1}));this.debug(this.pattern,n);this.set=n}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var n=this.options;var o=0;if(n.nonegate)return;for(var i=0,c=e.length;ik){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var $={};function parse(e,t){assertValidPattern(e);var n=this.options;if(e==="**"){if(!n.noglobstar)return i;else e="*"}if(e==="")return"";var o="";var c=!!n.nocase;var C=false;var Q=[];var D=[];var k;var V=false;var ee=-1;var te=-1;var re=e.charAt(0)==="."?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var ne=this;function clearStateChar(){if(k){switch(k){case"*":o+=y;c=true;break;case"?":o+=p;c=true;break;default:o+="\\"+k;break}ne.debug("clearStateChar %j %j",k,o);k=false}}for(var se=0,oe=e.length,ie;se-1;Ae--){var me=D[Ae];var ge=o.slice(0,me.reStart);var fe=o.slice(me.reStart,me.reEnd-8);var he=o.slice(me.reEnd-8,me.reEnd);var ye=o.slice(me.reEnd);he+=ye;var Ee=ge.split("(").length-1;var Ce=ye;for(se=0;se=0;d--){c=e[d];if(c)break}for(d=0;d>> no match, partial?",e,v,t,D);if(v===p)return true}return false}var $;if(typeof C==="string"){$=Q===C;this.debug("string match",C,Q,$)}else{$=Q.match(C);this.debug("pattern match",C,Q,$)}if(!$)return false}if(c===p&&d===y){return true}else if(c===p){return n}else if(d===y){return c===p-1&&e[c]===""}throw new Error("wtf?")};function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},3783:(e,t,n)=>{var o=n(7087);var i=n(9380);e.exports=expandTop;var c="\0SLASH"+Math.random()+"\0";var d="\0OPEN"+Math.random()+"\0";var p="\0CLOSE"+Math.random()+"\0";var y="\0COMMA"+Math.random()+"\0";var C="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(c).split("\\{").join(d).split("\\}").join(p).split("\\,").join(y).split("\\.").join(C)}function unescapeBraces(e){return e.split(c).join("\\").split(d).join("{").split(p).join("}").split(y).join(",").split(C).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var n=i("{","}",e);if(!n)return e.split(",");var o=n.pre;var c=n.body;var d=n.post;var p=o.split(",");p[p.length-1]+="{"+c+"}";var y=parseCommaParts(d);if(d.length){p[p.length-1]+=y.shift();p.push.apply(p,y)}t.push.apply(t,p);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var n=[];var c=i("{","}",e);if(!c||/\$$/.test(c.pre))return[e];var d=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(c.body);var y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(c.body);var C=d||y;var Q=c.body.indexOf(",")>=0;if(!C&&!Q){if(c.post.match(/,(?!,).*\}/)){e=c.pre+"{"+c.body+p+c.post;return expand(e)}return[e]}var v;if(C){v=c.body.split(/\.\./)}else{v=parseCommaParts(c.body);if(v.length===1){v=expand(v[0],false).map(embrace);if(v.length===1){var D=c.post.length?expand(c.post,false):[""];return D.map((function(e){return c.pre+v[0]+e}))}}}var k=c.pre;var D=c.post.length?expand(c.post,false):[""];var $;if(C){var V=numeric(v[0]);var ee=numeric(v[1]);var te=Math.max(v[0].length,v[1].length);var re=v.length==3?Math.max(Math.abs(numeric(v[2])),1):1;var ne=lte;var se=ee0){var le=new Array(ce+1).join("0");if(ie<0)ae="-"+le+ae.slice(1);else ae=le+ae}}}$.push(ae)}}else{$=o(v,(function(e){return expand(e,false)}))}for(var ue=0;ue<$.length;ue++){for(var de=0;de{var t=1e3;var n=t*60;var o=n*60;var i=o*24;var c=i*7;var d=i*365.25;e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0){return parse(e)}else if(n==="number"&&isFinite(e)){return t.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var p=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!p){return}var y=parseFloat(p[1]);var C=(p[2]||"ms").toLowerCase();switch(C){case"years":case"year":case"yrs":case"yr":case"y":return y*d;case"weeks":case"week":case"w":return y*c;case"days":case"day":case"d":return y*i;case"hours":case"hour":case"hrs":case"hr":case"h":return y*o;case"minutes":case"minute":case"mins":case"min":case"m":return y*n;case"seconds":case"second":case"secs":case"sec":case"s":return y*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return y;default:return undefined}}function fmtShort(e){var c=Math.abs(e);if(c>=i){return Math.round(e/i)+"d"}if(c>=o){return Math.round(e/o)+"h"}if(c>=n){return Math.round(e/n)+"m"}if(c>=t){return Math.round(e/t)+"s"}return e+"ms"}function fmtLong(e){var c=Math.abs(e);if(c>=i){return plural(e,c,i,"day")}if(c>=o){return plural(e,c,o,"hour")}if(c>=n){return plural(e,c,n,"minute")}if(c>=t){return plural(e,c,t,"second")}return e+" ms"}function plural(e,t,n,o){var i=t>=n*1.5;return Math.round(e/n)+" "+o+(i?"s":"")}},9379:(e,t,n)=>{const o=Symbol("SemVer ANY");class Comparator{static get ANY(){return o}constructor(e,t){t=i(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}e=e.trim().split(/\s+/).join(" ");y("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===o){this.value=""}else{this.value=this.operator+this.semver.version}y("comp",this)}parse(e){const t=this.options.loose?c[d.COMPARATORLOOSE]:c[d.COMPARATOR];const n=e.match(t);if(!n){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=n[1]!==undefined?n[1]:"";if(this.operator==="="){this.operator=""}if(!n[2]){this.semver=o}else{this.semver=new C(n[2],this.options.loose)}}toString(){return this.value}test(e){y("Comparator.test",e,this.options.loose);if(this.semver===o||e===o){return true}if(typeof e==="string"){try{e=new C(e,this.options)}catch(e){return false}}return p(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new Q(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new Q(this.value,t).test(e.semver)}t=i(t);if(t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")){return false}if(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&e.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&e.operator.startsWith("<")){return true}if(this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")){return true}if(p(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")){return true}if(p(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")){return true}return false}}e.exports=Comparator;const i=n(356);const{safeRe:c,t:d}=n(5471);const p=n(8646);const y=n(1159);const C=n(7163);const Q=n(6782)},6782:(e,t,n)=>{const o=/\s+/g;class Range{constructor(e,t){t=d(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof p){this.raw=e.value;this.set=[[e]];this.formatted=undefined;return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e.trim().replace(o," ");this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter((e=>!isNullSet(e[0])));if(this.set.length===0){this.set=[e]}else if(this.set.length>1){for(const e of this.set){if(e.length===1&&isAny(e[0])){this.set=[e];break}}}}this.formatted=undefined}get range(){if(this.formatted===undefined){this.formatted="";for(let e=0;e0){this.formatted+="||"}const t=this.set[e];for(let e=0;e0){this.formatted+=" "}this.formatted+=t[e].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=(this.options.includePrerelease&&V)|(this.options.loose&&ee);const n=t+":"+e;const o=c.get(n);if(o){return o}const i=this.options.loose;const d=i?Q[v.HYPHENRANGELOOSE]:Q[v.HYPHENRANGE];e=e.replace(d,hyphenReplace(this.options.includePrerelease));y("hyphen replace",e);e=e.replace(Q[v.COMPARATORTRIM],D);y("comparator trim",e);e=e.replace(Q[v.TILDETRIM],k);y("tilde trim",e);e=e.replace(Q[v.CARETTRIM],$);y("caret trim",e);let C=e.split(" ").map((e=>parseComparator(e,this.options))).join(" ").split(/\s+/).map((e=>replaceGTE0(e,this.options)));if(i){C=C.filter((e=>{y("loose invalid filter",e,this.options);return!!e.match(Q[v.COMPARATORLOOSE])}))}y("range list",C);const te=new Map;const re=C.map((e=>new p(e,this.options)));for(const e of re){if(isNullSet(e)){return[e]}te.set(e.value,e)}if(te.size>1&&te.has("")){te.delete("")}const ne=[...te.values()];c.set(n,ne);return ne}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((n=>isSatisfiable(n,t)&&e.set.some((e=>isSatisfiable(e,t)&&n.every((n=>e.every((e=>n.intersects(e,t)))))))))}test(e){if(!e){return false}if(typeof e==="string"){try{e=new C(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const isAny=e=>e.value==="";const isSatisfiable=(e,t)=>{let n=true;const o=e.slice();let i=o.pop();while(n&&o.length){n=o.every((e=>i.intersects(e,t)));i=o.pop()}return n};const parseComparator=(e,t)=>{e=e.replace(Q[v.BUILD],"");y("comp",e,t);e=replaceCarets(e,t);y("caret",e);e=replaceTildes(e,t);y("tildes",e);e=replaceXRanges(e,t);y("xrange",e);e=replaceStars(e,t);y("stars",e);return e};const isX=e=>!e||e.toLowerCase()==="x"||e==="*";const replaceTildes=(e,t)=>e.trim().split(/\s+/).map((e=>replaceTilde(e,t))).join(" ");const replaceTilde=(e,t)=>{const n=t.loose?Q[v.TILDELOOSE]:Q[v.TILDE];return e.replace(n,((t,n,o,i,c)=>{y("tilde",e,t,n,o,i,c);let d;if(isX(n)){d=""}else if(isX(o)){d=`>=${n}.0.0 <${+n+1}.0.0-0`}else if(isX(i)){d=`>=${n}.${o}.0 <${n}.${+o+1}.0-0`}else if(c){y("replaceTilde pr",c);d=`>=${n}.${o}.${i}-${c} <${n}.${+o+1}.0-0`}else{d=`>=${n}.${o}.${i} <${n}.${+o+1}.0-0`}y("tilde return",d);return d}))};const replaceCarets=(e,t)=>e.trim().split(/\s+/).map((e=>replaceCaret(e,t))).join(" ");const replaceCaret=(e,t)=>{y("caret",e,t);const n=t.loose?Q[v.CARETLOOSE]:Q[v.CARET];const o=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,c,d)=>{y("caret",e,t,n,i,c,d);let p;if(isX(n)){p=""}else if(isX(i)){p=`>=${n}.0.0${o} <${+n+1}.0.0-0`}else if(isX(c)){if(n==="0"){p=`>=${n}.${i}.0${o} <${n}.${+i+1}.0-0`}else{p=`>=${n}.${i}.0${o} <${+n+1}.0.0-0`}}else if(d){y("replaceCaret pr",d);if(n==="0"){if(i==="0"){p=`>=${n}.${i}.${c}-${d} <${n}.${i}.${+c+1}-0`}else{p=`>=${n}.${i}.${c}-${d} <${n}.${+i+1}.0-0`}}else{p=`>=${n}.${i}.${c}-${d} <${+n+1}.0.0-0`}}else{y("no pr");if(n==="0"){if(i==="0"){p=`>=${n}.${i}.${c}${o} <${n}.${i}.${+c+1}-0`}else{p=`>=${n}.${i}.${c}${o} <${n}.${+i+1}.0-0`}}else{p=`>=${n}.${i}.${c} <${+n+1}.0.0-0`}}y("caret return",p);return p}))};const replaceXRanges=(e,t)=>{y("replaceXRanges",e,t);return e.split(/\s+/).map((e=>replaceXRange(e,t))).join(" ")};const replaceXRange=(e,t)=>{e=e.trim();const n=t.loose?Q[v.XRANGELOOSE]:Q[v.XRANGE];return e.replace(n,((n,o,i,c,d,p)=>{y("xRange",e,n,o,i,c,d,p);const C=isX(i);const Q=C||isX(c);const v=Q||isX(d);const D=v;if(o==="="&&D){o=""}p=t.includePrerelease?"-0":"";if(C){if(o===">"||o==="<"){n="<0.0.0-0"}else{n="*"}}else if(o&&D){if(Q){c=0}d=0;if(o===">"){o=">=";if(Q){i=+i+1;c=0;d=0}else{c=+c+1;d=0}}else if(o==="<="){o="<";if(Q){i=+i+1}else{c=+c+1}}if(o==="<"){p="-0"}n=`${o+i}.${c}.${d}${p}`}else if(Q){n=`>=${i}.0.0${p} <${+i+1}.0.0-0`}else if(v){n=`>=${i}.${c}.0${p} <${i}.${+c+1}.0-0`}y("xRange return",n);return n}))};const replaceStars=(e,t)=>{y("replaceStars",e,t);return e.trim().replace(Q[v.STAR],"")};const replaceGTE0=(e,t)=>{y("replaceGTE0",e,t);return e.trim().replace(Q[t.includePrerelease?v.GTE0PRE:v.GTE0],"")};const hyphenReplace=e=>(t,n,o,i,c,d,p,y,C,Q,v,D)=>{if(isX(o)){n=""}else if(isX(i)){n=`>=${o}.0.0${e?"-0":""}`}else if(isX(c)){n=`>=${o}.${i}.0${e?"-0":""}`}else if(d){n=`>=${n}`}else{n=`>=${n}${e?"-0":""}`}if(isX(C)){y=""}else if(isX(Q)){y=`<${+C+1}.0.0-0`}else if(isX(v)){y=`<${C}.${+Q+1}.0-0`}else if(D){y=`<=${C}.${Q}.${v}-${D}`}else if(e){y=`<${C}.${Q}.${+v+1}-0`}else{y=`<=${y}`}return`${n} ${y}`.trim()};const testSet=(e,t,n)=>{for(let n=0;n0){const o=e[n].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch){return true}}}return false}return true}},7163:(e,t,n)=>{const o=n(1159);const{MAX_LENGTH:i,MAX_SAFE_INTEGER:c}=n(5101);const{safeRe:d,t:p}=n(5471);const y=n(356);const{compareIdentifiers:C}=n(3348);class SemVer{constructor(e,t){t=y(t);if(e instanceof SemVer){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`)}if(e.length>i){throw new TypeError(`version is longer than ${i} characters`)}o("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?d[p.LOOSE]:d[p.FULL]);if(!n){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>c||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>c||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>c||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&te.major){return 1}if(this.minore.minor){return 1}if(this.patche.patch){return 1}return 0}comparePre(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}if(this.prerelease.length&&!e.prerelease.length){return-1}else if(!this.prerelease.length&&e.prerelease.length){return 1}else if(!this.prerelease.length&&!e.prerelease.length){return 0}let t=0;do{const n=this.prerelease[t];const i=e.prerelease[t];o("prerelease compare",t,n,i);if(n===undefined&&i===undefined){return 0}else if(i===undefined){return 1}else if(n===undefined){return-1}else if(n===i){continue}else{return C(n,i)}}while(++t)}compareBuild(e){if(!(e instanceof SemVer)){e=new SemVer(e,this.options)}let t=0;do{const n=this.build[t];const i=e.build[t];o("build compare",t,n,i);if(n===undefined&&i===undefined){return 0}else if(i===undefined){return 1}else if(n===undefined){return-1}else if(n===i){continue}else{return C(n,i)}}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&n===false){throw new Error("invalid increment argument: identifier is empty")}if(t){const e=`-${t}`.match(this.options.loose?d[p.PRERELEASELOOSE]:d[p.PRERELEASE]);if(!e||e[1]!==t){throw new Error(`invalid identifier: ${t}`)}}}switch(e){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0;this.inc("patch",t,n);this.inc("pre",t,n);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",t,n)}this.inc("pre",t,n);break;case"release":if(this.prerelease.length===0){throw new Error(`version ${this.raw} is not a prerelease`)}this.prerelease.length=0;break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(this.prerelease.length===0){this.prerelease=[e]}else{let o=this.prerelease.length;while(--o>=0){if(typeof this.prerelease[o]==="number"){this.prerelease[o]++;o=-2}}if(o===-1){if(t===this.prerelease.join(".")&&n===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(e)}}if(t){let o=[t,e];if(n===false){o=[t]}if(C(this.prerelease[0],t)===0){if(isNaN(this.prerelease[1])){this.prerelease=o}}else{this.prerelease=o}}break}default:throw new Error(`invalid increment argument: ${e}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}e.exports=SemVer},1799:(e,t,n)=>{const o=n(6353);const clean=(e,t)=>{const n=o(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};e.exports=clean},8646:(e,t,n)=>{const o=n(5082);const i=n(4974);const c=n(6599);const d=n(1236);const p=n(3872);const y=n(6717);const cmp=(e,t,n,C)=>{switch(t){case"===":if(typeof e==="object"){e=e.version}if(typeof n==="object"){n=n.version}return e===n;case"!==":if(typeof e==="object"){e=e.version}if(typeof n==="object"){n=n.version}return e!==n;case"":case"=":case"==":return o(e,n,C);case"!=":return i(e,n,C);case">":return c(e,n,C);case">=":return d(e,n,C);case"<":return p(e,n,C);case"<=":return y(e,n,C);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=cmp},5385:(e,t,n)=>{const o=n(7163);const i=n(6353);const{safeRe:c,t:d}=n(5471);const coerce=(e,t)=>{if(e instanceof o){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let n=null;if(!t.rtl){n=e.match(t.includePrerelease?c[d.COERCEFULL]:c[d.COERCE])}else{const o=t.includePrerelease?c[d.COERCERTLFULL]:c[d.COERCERTL];let i;while((i=o.exec(e))&&(!n||n.index+n[0].length!==e.length)){if(!n||i.index+i[0].length!==n.index+n[0].length){n=i}o.lastIndex=i.index+i[1].length+i[2].length}o.lastIndex=-1}if(n===null){return null}const p=n[2];const y=n[3]||"0";const C=n[4]||"0";const Q=t.includePrerelease&&n[5]?`-${n[5]}`:"";const v=t.includePrerelease&&n[6]?`+${n[6]}`:"";return i(`${p}.${y}.${C}${Q}${v}`,t)};e.exports=coerce},7648:(e,t,n)=>{const o=n(7163);const compareBuild=(e,t,n)=>{const i=new o(e,n);const c=new o(t,n);return i.compare(c)||i.compareBuild(c)};e.exports=compareBuild},6874:(e,t,n)=>{const o=n(8469);const compareLoose=(e,t)=>o(e,t,true);e.exports=compareLoose},8469:(e,t,n)=>{const o=n(7163);const compare=(e,t,n)=>new o(e,n).compare(new o(t,n));e.exports=compare},711:(e,t,n)=>{const o=n(6353);const diff=(e,t)=>{const n=o(e,null,true);const i=o(t,null,true);const c=n.compare(i);if(c===0){return null}const d=c>0;const p=d?n:i;const y=d?i:n;const C=!!p.prerelease.length;const Q=!!y.prerelease.length;if(Q&&!C){if(!y.patch&&!y.minor){return"major"}if(y.compareMain(p)===0){if(y.minor&&!y.patch){return"minor"}return"patch"}}const v=C?"pre":"";if(n.major!==i.major){return v+"major"}if(n.minor!==i.minor){return v+"minor"}if(n.patch!==i.patch){return v+"patch"}return"prerelease"};e.exports=diff},5082:(e,t,n)=>{const o=n(8469);const eq=(e,t,n)=>o(e,t,n)===0;e.exports=eq},6599:(e,t,n)=>{const o=n(8469);const gt=(e,t,n)=>o(e,t,n)>0;e.exports=gt},1236:(e,t,n)=>{const o=n(8469);const gte=(e,t,n)=>o(e,t,n)>=0;e.exports=gte},2338:(e,t,n)=>{const o=n(7163);const inc=(e,t,n,i,c)=>{if(typeof n==="string"){c=i;i=n;n=undefined}try{return new o(e instanceof o?e.version:e,n).inc(t,i,c).version}catch(e){return null}};e.exports=inc},3872:(e,t,n)=>{const o=n(8469);const lt=(e,t,n)=>o(e,t,n)<0;e.exports=lt},6717:(e,t,n)=>{const o=n(8469);const lte=(e,t,n)=>o(e,t,n)<=0;e.exports=lte},8511:(e,t,n)=>{const o=n(7163);const major=(e,t)=>new o(e,t).major;e.exports=major},2603:(e,t,n)=>{const o=n(7163);const minor=(e,t)=>new o(e,t).minor;e.exports=minor},4974:(e,t,n)=>{const o=n(8469);const neq=(e,t,n)=>o(e,t,n)!==0;e.exports=neq},6353:(e,t,n)=>{const o=n(7163);const parse=(e,t,n=false)=>{if(e instanceof o){return e}try{return new o(e,t)}catch(e){if(!n){return null}throw e}};e.exports=parse},8756:(e,t,n)=>{const o=n(7163);const patch=(e,t)=>new o(e,t).patch;e.exports=patch},5714:(e,t,n)=>{const o=n(6353);const prerelease=(e,t)=>{const n=o(e,t);return n&&n.prerelease.length?n.prerelease:null};e.exports=prerelease},2173:(e,t,n)=>{const o=n(8469);const rcompare=(e,t,n)=>o(t,e,n);e.exports=rcompare},7192:(e,t,n)=>{const o=n(7648);const rsort=(e,t)=>e.sort(((e,n)=>o(n,e,t)));e.exports=rsort},8011:(e,t,n)=>{const o=n(6782);const satisfies=(e,t,n)=>{try{t=new o(t,n)}catch(e){return false}return t.test(e)};e.exports=satisfies},9872:(e,t,n)=>{const o=n(7648);const sort=(e,t)=>e.sort(((e,n)=>o(e,n,t)));e.exports=sort},8780:(e,t,n)=>{const o=n(6353);const valid=(e,t)=>{const n=o(e,t);return n?n.version:null};e.exports=valid},2088:(e,t,n)=>{const o=n(5471);const i=n(5101);const c=n(7163);const d=n(3348);const p=n(6353);const y=n(8780);const C=n(1799);const Q=n(2338);const v=n(711);const D=n(8511);const k=n(2603);const $=n(8756);const V=n(5714);const ee=n(8469);const te=n(2173);const re=n(6874);const ne=n(7648);const se=n(9872);const oe=n(7192);const ie=n(6599);const ae=n(3872);const ce=n(5082);const le=n(4974);const ue=n(1236);const de=n(6717);const pe=n(8646);const Ae=n(5385);const me=n(9379);const ge=n(6782);const fe=n(8011);const he=n(4750);const ye=n(5574);const Ee=n(8595);const Ce=n(1866);const Ie=n(4737);const be=n(280);const Se=n(2276);const Be=n(5213);const we=n(3465);const Re=n(2028);const Ne=n(1489);e.exports={parse:p,valid:y,clean:C,inc:Q,diff:v,major:D,minor:k,patch:$,prerelease:V,compare:ee,rcompare:te,compareLoose:re,compareBuild:ne,sort:se,rsort:oe,gt:ie,lt:ae,eq:ce,neq:le,gte:ue,lte:de,cmp:pe,coerce:Ae,Comparator:me,Range:ge,satisfies:fe,toComparators:he,maxSatisfying:ye,minSatisfying:Ee,minVersion:Ce,validRange:Ie,outside:be,gtr:Se,ltr:Be,intersects:we,simplifyRange:Re,subset:Ne,SemVer:c,re:o.re,src:o.src,tokens:o.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:d.compareIdentifiers,rcompareIdentifiers:d.rcompareIdentifiers}},5101:e=>{const t="2.0.0";const n=256;const o=Number.MAX_SAFE_INTEGER||9007199254740991;const i=16;const c=n-6;const d=["major","premajor","minor","preminor","patch","prepatch","prerelease"];e.exports={MAX_LENGTH:n,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:c,MAX_SAFE_INTEGER:o,RELEASE_TYPES:d,SEMVER_SPEC_VERSION:t,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},1159:e=>{const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},3348:e=>{const t=/^[0-9]+$/;const compareIdentifiers=(e,n)=>{if(typeof e==="number"&&typeof n==="number"){return e===n?0:ecompareIdentifiers(t,e);e.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},1383:e=>{class LRUCache{constructor(){this.max=1e3;this.map=new Map}get(e){const t=this.map.get(e);if(t===undefined){return undefined}else{this.map.delete(e);this.map.set(e,t);return t}}delete(e){return this.map.delete(e)}set(e,t){const n=this.delete(e);if(!n&&t!==undefined){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}e.exports=LRUCache},356:e=>{const t=Object.freeze({loose:true});const n=Object.freeze({});const parseOptions=e=>{if(!e){return n}if(typeof e!=="object"){return t}return e};e.exports=parseOptions},5471:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:o,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:c}=n(5101);const d=n(1159);t=e.exports={};const p=t.re=[];const y=t.safeRe=[];const C=t.src=[];const Q=t.safeSrc=[];const v=t.t={};let D=0;const k="[a-zA-Z0-9-]";const $=[["\\s",1],["\\d",c],[k,i]];const makeSafeRegex=e=>{for(const[t,n]of $){e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`)}return e};const createToken=(e,t,n)=>{const o=makeSafeRegex(t);const i=D++;d(e,i,t);v[e]=i;C[i]=t;Q[i]=o;p[i]=new RegExp(t,n?"g":undefined);y[i]=new RegExp(o,n?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${k}*`);createToken("MAINVERSION",`(${C[v.NUMERICIDENTIFIER]})\\.`+`(${C[v.NUMERICIDENTIFIER]})\\.`+`(${C[v.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${C[v.NUMERICIDENTIFIERLOOSE]})\\.`+`(${C[v.NUMERICIDENTIFIERLOOSE]})\\.`+`(${C[v.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${C[v.NONNUMERICIDENTIFIER]}|${C[v.NUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${C[v.NONNUMERICIDENTIFIER]}|${C[v.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASE",`(?:-(${C[v.PRERELEASEIDENTIFIER]}(?:\\.${C[v.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${C[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${C[v.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${k}+`);createToken("BUILD",`(?:\\+(${C[v.BUILDIDENTIFIER]}(?:\\.${C[v.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${C[v.MAINVERSION]}${C[v.PRERELEASE]}?${C[v.BUILD]}?`);createToken("FULL",`^${C[v.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${C[v.MAINVERSIONLOOSE]}${C[v.PRERELEASELOOSE]}?${C[v.BUILD]}?`);createToken("LOOSE",`^${C[v.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${C[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${C[v.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${C[v.XRANGEIDENTIFIER]})`+`(?:\\.(${C[v.XRANGEIDENTIFIER]})`+`(?:\\.(${C[v.XRANGEIDENTIFIER]})`+`(?:${C[v.PRERELEASE]})?${C[v.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${C[v.XRANGEIDENTIFIERLOOSE]})`+`(?:${C[v.PRERELEASELOOSE]})?${C[v.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${C[v.GTLT]}\\s*${C[v.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${C[v.GTLT]}\\s*${C[v.XRANGEPLAINLOOSE]}$`);createToken("COERCEPLAIN",`${"(^|[^\\d])"+"(\\d{1,"}${o}})`+`(?:\\.(\\d{1,${o}}))?`+`(?:\\.(\\d{1,${o}}))?`);createToken("COERCE",`${C[v.COERCEPLAIN]}(?:$|[^\\d])`);createToken("COERCEFULL",C[v.COERCEPLAIN]+`(?:${C[v.PRERELEASE]})?`+`(?:${C[v.BUILD]})?`+`(?:$|[^\\d])`);createToken("COERCERTL",C[v.COERCE],true);createToken("COERCERTLFULL",C[v.COERCEFULL],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${C[v.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";createToken("TILDE",`^${C[v.LONETILDE]}${C[v.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${C[v.LONETILDE]}${C[v.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${C[v.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";createToken("CARET",`^${C[v.LONECARET]}${C[v.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${C[v.LONECARET]}${C[v.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${C[v.GTLT]}\\s*(${C[v.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${C[v.GTLT]}\\s*(${C[v.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${C[v.GTLT]}\\s*(${C[v.LOOSEPLAIN]}|${C[v.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${C[v.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${C[v.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${C[v.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${C[v.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},2276:(e,t,n)=>{const o=n(280);const gtr=(e,t,n)=>o(e,t,">",n);e.exports=gtr},3465:(e,t,n)=>{const o=n(6782);const intersects=(e,t,n)=>{e=new o(e,n);t=new o(t,n);return e.intersects(t,n)};e.exports=intersects},5213:(e,t,n)=>{const o=n(280);const ltr=(e,t,n)=>o(e,t,"<",n);e.exports=ltr},5574:(e,t,n)=>{const o=n(7163);const i=n(6782);const maxSatisfying=(e,t,n)=>{let c=null;let d=null;let p=null;try{p=new i(t,n)}catch(e){return null}e.forEach((e=>{if(p.test(e)){if(!c||d.compare(e)===-1){c=e;d=new o(c,n)}}}));return c};e.exports=maxSatisfying},8595:(e,t,n)=>{const o=n(7163);const i=n(6782);const minSatisfying=(e,t,n)=>{let c=null;let d=null;let p=null;try{p=new i(t,n)}catch(e){return null}e.forEach((e=>{if(p.test(e)){if(!c||d.compare(e)===1){c=e;d=new o(c,n)}}}));return c};e.exports=minSatisfying},1866:(e,t,n)=>{const o=n(7163);const i=n(6782);const c=n(6599);const minVersion=(e,t)=>{e=new i(e,t);let n=new o("0.0.0");if(e.test(n)){return n}n=new o("0.0.0-0");if(e.test(n)){return n}n=null;for(let t=0;t{const t=new o(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!d||c(t,d)){d=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}));if(d&&(!n||c(n,d))){n=d}}if(n&&e.test(n)){return n}return null};e.exports=minVersion},280:(e,t,n)=>{const o=n(7163);const i=n(9379);const{ANY:c}=i;const d=n(6782);const p=n(8011);const y=n(6599);const C=n(3872);const Q=n(6717);const v=n(1236);const outside=(e,t,n,D)=>{e=new o(e,D);t=new d(t,D);let k,$,V,ee,te;switch(n){case">":k=y;$=Q;V=C;ee=">";te=">=";break;case"<":k=C;$=v;V=y;ee="<";te="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(p(e,t,D)){return false}for(let n=0;n{if(e.semver===c){e=new i(">=0.0.0")}d=d||e;p=p||e;if(k(e.semver,d.semver,D)){d=e}else if(V(e.semver,p.semver,D)){p=e}}));if(d.operator===ee||d.operator===te){return false}if((!p.operator||p.operator===ee)&&$(e,p.semver)){return false}else if(p.operator===te&&V(e,p.semver)){return false}}return true};e.exports=outside},2028:(e,t,n)=>{const o=n(8011);const i=n(8469);e.exports=(e,t,n)=>{const c=[];let d=null;let p=null;const y=e.sort(((e,t)=>i(e,t,n)));for(const e of y){const i=o(e,t,n);if(i){p=e;if(!d){d=e}}else{if(p){c.push([d,p])}p=null;d=null}}if(d){c.push([d,null])}const C=[];for(const[e,t]of c){if(e===t){C.push(e)}else if(!t&&e===y[0]){C.push("*")}else if(!t){C.push(`>=${e}`)}else if(e===y[0]){C.push(`<=${t}`)}else{C.push(`${e} - ${t}`)}}const Q=C.join(" || ");const v=typeof t.raw==="string"?t.raw:String(t);return Q.length{const o=n(6782);const i=n(9379);const{ANY:c}=i;const d=n(8011);const p=n(8469);const subset=(e,t,n={})=>{if(e===t){return true}e=new o(e,n);t=new o(t,n);let i=false;e:for(const o of e.set){for(const e of t.set){const t=simpleSubset(o,e,n);i=i||t!==null;if(t){continue e}}if(i){return false}}return true};const y=[new i(">=0.0.0-0")];const C=[new i(">=0.0.0")];const simpleSubset=(e,t,n)=>{if(e===t){return true}if(e.length===1&&e[0].semver===c){if(t.length===1&&t[0].semver===c){return true}else if(n.includePrerelease){e=y}else{e=C}}if(t.length===1&&t[0].semver===c){if(n.includePrerelease){return true}else{t=C}}const o=new Set;let i,Q;for(const t of e){if(t.operator===">"||t.operator===">="){i=higherGT(i,t,n)}else if(t.operator==="<"||t.operator==="<="){Q=lowerLT(Q,t,n)}else{o.add(t.semver)}}if(o.size>1){return null}let v;if(i&&Q){v=p(i.semver,Q.semver,n);if(v>0){return null}else if(v===0&&(i.operator!==">="||Q.operator!=="<=")){return null}}for(const e of o){if(i&&!d(e,String(i),n)){return null}if(Q&&!d(e,String(Q),n)){return null}for(const o of t){if(!d(e,String(o),n)){return false}}return true}let D,k;let $,V;let ee=Q&&!n.includePrerelease&&Q.semver.prerelease.length?Q.semver:false;let te=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:false;if(ee&&ee.prerelease.length===1&&Q.operator==="<"&&ee.prerelease[0]===0){ee=false}for(const e of t){V=V||e.operator===">"||e.operator===">=";$=$||e.operator==="<"||e.operator==="<=";if(i){if(te){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===te.major&&e.semver.minor===te.minor&&e.semver.patch===te.patch){te=false}}if(e.operator===">"||e.operator===">="){D=higherGT(i,e,n);if(D===e&&D!==i){return false}}else if(i.operator===">="&&!d(i.semver,String(e),n)){return false}}if(Q){if(ee){if(e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===ee.major&&e.semver.minor===ee.minor&&e.semver.patch===ee.patch){ee=false}}if(e.operator==="<"||e.operator==="<="){k=lowerLT(Q,e,n);if(k===e&&k!==Q){return false}}else if(Q.operator==="<