@pwrdrvr/microapps-cdk 1.2.0-beta.5 → 1.2.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,104 +1,121 @@
1
- "use strict";var HV=Object.create;var Zs=Object.defineProperty;var hE=Object.getOwnPropertyDescriptor;var VV=Object.getOwnPropertyNames;var zV=Object.getPrototypeOf,WV=Object.prototype.hasOwnProperty;var at=(e,t)=>()=>(e&&(t=e(e=0)),t);var y=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ea=(e,t)=>{for(var r in t)Zs(e,r,{get:t[r],enumerable:!0})},yE=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of VV(t))!WV.call(e,i)&&i!==r&&Zs(e,i,{get:()=>t[i],enumerable:!(n=hE(t,i))||n.enumerable});return e};var It=(e,t,r)=>(r=e!=null?HV(zV(e)):{},yE(t||!e||!e.__esModule?Zs(r,"default",{value:e,enumerable:!0}):r,e)),_e=e=>yE(Zs({},"__esModule",{value:!0}),e),wr=(e,t,r,n)=>{for(var i=n>1?void 0:n?hE(t,r):t,o=e.length-1,s;o>=0;o--)(s=e[o])&&(i=(n?s(t,r,i):s(i))||i);return n&&i&&Zs(t,r,i),i};var vE=y(Sm=>{var _E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Sm.encode=function(e){if(0<=e&&e<_E.length)return _E[e];throw new TypeError("Must be between 0 and 63: "+e)};Sm.decode=function(e){var t=65,r=90,n=97,i=122,o=48,s=57,a=43,c=47,u=26,d=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+u:o<=e&&e<=s?e-o+d:e==a?62:e==c?63:-1}});var wm=y(Cm=>{var gE=vE(),bm=5,EE=1<<bm,SE=EE-1,bE=EE;function KV(e){return e<0?(-e<<1)+1:(e<<1)+0}function JV(e){var t=(e&1)===1,r=e>>1;return t?-r:r}Cm.encode=function(t){var r="",n,i=KV(t);do n=i&SE,i>>>=bm,i>0&&(n|=bE),r+=gE.encode(n);while(i>0);return r};Cm.decode=function(t,r,n){var i=t.length,o=0,s=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=gE.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&bE),c&=SE,o=o+(c<<s),s+=bm}while(a);n.value=JV(o),n.rest=r}});var wo=y(Et=>{function YV(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}Et.getArg=YV;var CE=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,XV=/^data:.+\,.+$/;function ta(e){var t=e.match(CE);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}Et.urlParse=ta;function bo(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}Et.urlGenerate=bo;function xm(e){var t=e,r=ta(e);if(r){if(!r.path)return e;t=r.path}for(var n=Et.isAbsolute(t),i=t.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return t=i.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,bo(r)):t}Et.normalize=xm;function wE(e,t){e===""&&(e="."),t===""&&(t=".");var r=ta(t),n=ta(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),bo(r);if(r||t.match(XV))return t;if(n&&!n.host&&!n.path)return n.host=t,bo(n);var i=t.charAt(0)==="/"?t:xm(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,bo(n)):i}Et.join=wE;Et.isAbsolute=function(e){return e.charAt(0)==="/"||CE.test(e)};function QV(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}Et.relative=QV;var xE=(function(){var e=Object.create(null);return!("__proto__"in e)})();function AE(e){return e}function ZV(e){return TE(e)?"$"+e:e}Et.toSetString=xE?AE:ZV;function ez(e){return TE(e)?e.slice(1):e}Et.fromSetString=xE?AE:ez;function TE(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function tz(e,t,r){var n=Co(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:Co(e.name,t.name)}Et.compareByOriginalPositions=tz;function rz(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=Co(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:Co(e.name,t.name)}Et.compareByGeneratedPositionsDeflated=rz;function Co(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function nz(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=Co(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Co(e.name,t.name)}Et.compareByGeneratedPositionsInflated=nz;function iz(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}Et.parseSourceMapInput=iz;function oz(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=ta(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}t=wE(bo(n),t)}return xm(t)}Et.computeSourceURL=oz});var Pm=y(PE=>{var Am=wo(),Tm=Object.prototype.hasOwnProperty,Fi=typeof Map<"u";function un(){this._array=[],this._set=Fi?new Map:Object.create(null)}un.fromArray=function(t,r){for(var n=new un,i=0,o=t.length;i<o;i++)n.add(t[i],r);return n};un.prototype.size=function(){return Fi?this._set.size:Object.getOwnPropertyNames(this._set).length};un.prototype.add=function(t,r){var n=Fi?t:Am.toSetString(t),i=Fi?this.has(t):Tm.call(this._set,n),o=this._array.length;(!i||r)&&this._array.push(t),i||(Fi?this._set.set(t,o):this._set[n]=o)};un.prototype.has=function(t){if(Fi)return this._set.has(t);var r=Am.toSetString(t);return Tm.call(this._set,r)};un.prototype.indexOf=function(t){if(Fi){var r=this._set.get(t);if(r>=0)return r}else{var n=Am.toSetString(t);if(Tm.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};un.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};un.prototype.toArray=function(){return this._array.slice()};PE.ArraySet=un});var RE=y(OE=>{var IE=wo();function sz(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return n>r||n==r&&o>=i||IE.compareByGeneratedPositionsInflated(e,t)<=0}function eu(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}eu.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};eu.prototype.add=function(t){sz(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};eu.prototype.toArray=function(){return this._sorted||(this._array.sort(IE.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};OE.MappingList=eu});var Im=y(DE=>{var ra=wm(),Xe=wo(),tu=Pm().ArraySet,az=RE().MappingList;function or(e){e||(e={}),this._file=Xe.getArg(e,"file",null),this._sourceRoot=Xe.getArg(e,"sourceRoot",null),this._skipValidation=Xe.getArg(e,"skipValidation",!1),this._sources=new tu,this._names=new tu,this._mappings=new az,this._sourcesContents=null}or.prototype._version=3;or.fromSourceMap=function(t){var r=t.sourceRoot,n=new or({file:t.file,sourceRoot:r});return t.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,r!=null&&(o.source=Xe.relative(r,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),t.sources.forEach(function(i){var o=i;r!==null&&(o=Xe.relative(r,i)),n._sources.has(o)||n._sources.add(o);var s=t.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};or.prototype.addMapping=function(t){var r=Xe.getArg(t,"generated"),n=Xe.getArg(t,"original",null),i=Xe.getArg(t,"source",null),o=Xe.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})};or.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=Xe.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Xe.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Xe.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};or.prototype.applySourceMap=function(t,r,n){var i=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=t.file}var o=this._sourceRoot;o!=null&&(i=Xe.relative(o,i));var s=new tu,a=new tu;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var u=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=Xe.join(n,c.source)),o!=null&&(c.source=Xe.relative(o,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var d=c.source;d!=null&&!s.has(d)&&s.add(d);var p=c.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=s,this._names=a,t.sources.forEach(function(c){var u=t.sourceContentFor(c);u!=null&&(n!=null&&(c=Xe.join(n,c)),o!=null&&(c=Xe.relative(o,c)),this.setSourceContent(c,u))},this)};or.prototype._validateMapping=function(t,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i}))}};or.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,i=0,o=0,s=0,a="",c,u,d,p,m=this._mappings.toArray(),h=0,v=m.length;h<v;h++){if(u=m[h],c="",u.generatedLine!==r)for(t=0;u.generatedLine!==r;)c+=";",r++;else if(h>0){if(!Xe.compareByGeneratedPositionsInflated(u,m[h-1]))continue;c+=","}c+=ra.encode(u.generatedColumn-t),t=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),c+=ra.encode(p-s),s=p,c+=ra.encode(u.originalLine-1-i),i=u.originalLine-1,c+=ra.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(d=this._names.indexOf(u.name),c+=ra.encode(d-o),o=d)),a+=c}return a};or.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Xe.relative(r,n));var i=Xe.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};or.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};or.prototype.toString=function(){return JSON.stringify(this.toJSON())};DE.SourceMapGenerator=or});var NE=y(Bi=>{Bi.GREATEST_LOWER_BOUND=1;Bi.LEAST_UPPER_BOUND=2;function Om(e,t,r,n,i,o){var s=Math.floor((t-e)/2)+e,a=i(r,n[s],!0);return a===0?s:a>0?t-s>1?Om(s,t,r,n,i,o):o==Bi.LEAST_UPPER_BOUND?t<n.length?t:-1:s:s-e>1?Om(e,s,r,n,i,o):o==Bi.LEAST_UPPER_BOUND?s:e<0?-1:e}Bi.search=function(t,r,n,i){if(r.length===0)return-1;var o=Om(-1,r.length,t,r,n,i||Bi.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(r[o],r[o-1],!0)===0;)--o;return o}});var LE=y(ME=>{function Rm(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function cz(e,t){return Math.round(e+Math.random()*(t-e))}function Dm(e,t,r,n){if(r<n){var i=cz(r,n),o=r-1;Rm(e,i,n);for(var s=e[n],a=r;a<n;a++)t(e[a],s)<=0&&(o+=1,Rm(e,o,a));Rm(e,o+1,a);var c=o+1;Dm(e,t,r,c-1),Dm(e,t,c+1,n)}}ME.quickSort=function(e,t){Dm(e,t,0,e.length-1)}});var FE=y(ru=>{var U=wo(),Nm=NE(),xo=Pm().ArraySet,uz=wm(),na=LE().quickSort;function Le(e,t){var r=e;return typeof e=="string"&&(r=U.parseSourceMapInput(e)),r.sections!=null?new xr(r,t):new dt(r,t)}Le.fromSourceMap=function(e,t){return dt.fromSourceMap(e,t)};Le.prototype._version=3;Le.prototype.__generatedMappings=null;Object.defineProperty(Le.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});Le.prototype.__originalMappings=null;Object.defineProperty(Le.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});Le.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};Le.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};Le.GENERATED_ORDER=1;Le.ORIGINAL_ORDER=2;Le.GREATEST_LOWER_BOUND=1;Le.LEAST_UPPER_BOUND=2;Le.prototype.eachMapping=function(t,r,n){var i=r||null,o=n||Le.GENERATED_ORDER,s;switch(o){case Le.GENERATED_ORDER:s=this._generatedMappings;break;case Le.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(c){var u=c.source===null?null:this._sources.at(c.source);return u=U.computeSourceURL(a,u,this._sourceMapURL),{source:u,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,i)};Le.prototype.allGeneratedPositionsFor=function(t){var r=U.getArg(t,"line"),n={source:U.getArg(t,"source"),originalLine:r,originalColumn:U.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",U.compareByOriginalPositions,Nm.LEAST_UPPER_BOUND);if(o>=0){var s=this._originalMappings[o];if(t.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)i.push({line:U.getArg(s,"generatedLine",null),column:U.getArg(s,"generatedColumn",null),lastColumn:U.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)i.push({line:U.getArg(s,"generatedLine",null),column:U.getArg(s,"generatedColumn",null),lastColumn:U.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++o]}return i};ru.SourceMapConsumer=Le;function dt(e,t){var r=e;typeof e=="string"&&(r=U.parseSourceMapInput(e));var n=U.getArg(r,"version"),i=U.getArg(r,"sources"),o=U.getArg(r,"names",[]),s=U.getArg(r,"sourceRoot",null),a=U.getArg(r,"sourcesContent",null),c=U.getArg(r,"mappings"),u=U.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=U.normalize(s)),i=i.map(String).map(U.normalize).map(function(d){return s&&U.isAbsolute(s)&&U.isAbsolute(d)?U.relative(s,d):d}),this._names=xo.fromArray(o.map(String),!0),this._sources=xo.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(d){return U.computeSourceURL(s,d,t)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=u}dt.prototype=Object.create(Le.prototype);dt.prototype.consumer=Le;dt.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=U.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};dt.fromSourceMap=function(t,r){var n=Object.create(dt.prototype),i=n._names=xo.fromArray(t._names.toArray(),!0),o=n._sources=xo.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(h){return U.computeSourceURL(n.sourceRoot,h,r)});for(var s=t._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,d=s.length;u<d;u++){var p=s[u],m=new kE;m.generatedLine=p.generatedLine,m.generatedColumn=p.generatedColumn,p.source&&(m.source=o.indexOf(p.source),m.originalLine=p.originalLine,m.originalColumn=p.originalColumn,p.name&&(m.name=i.indexOf(p.name)),c.push(m)),a.push(m)}return na(n.__originalMappings,U.compareByOriginalPositions),n};dt.prototype._version=3;Object.defineProperty(dt.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function kE(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}dt.prototype._parseMappings=function(t,r){for(var n=1,i=0,o=0,s=0,a=0,c=0,u=t.length,d=0,p={},m={},h=[],v=[],_,g,x,S,M;d<u;)if(t.charAt(d)===";")n++,d++,i=0;else if(t.charAt(d)===",")d++;else{for(_=new kE,_.generatedLine=n,S=d;S<u&&!this._charIsMappingSeparator(t,S);S++);if(g=t.slice(d,S),x=p[g],x)d+=g.length;else{for(x=[];d<S;)uz.decode(t,d,m),M=m.value,d=m.rest,x.push(M);if(x.length===2)throw new Error("Found a source, but no line and column");if(x.length===3)throw new Error("Found a source and line, but no column");p[g]=x}_.generatedColumn=i+x[0],i=_.generatedColumn,x.length>1&&(_.source=a+x[1],a+=x[1],_.originalLine=o+x[2],o=_.originalLine,_.originalLine+=1,_.originalColumn=s+x[3],s=_.originalColumn,x.length>4&&(_.name=c+x[4],c+=x[4])),v.push(_),typeof _.originalLine=="number"&&h.push(_)}na(v,U.compareByGeneratedPositionsDeflated),this.__generatedMappings=v,na(h,U.compareByOriginalPositions),this.__originalMappings=h};dt.prototype._findMapping=function(t,r,n,i,o,s){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return Nm.search(t,r,o,s)};dt.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};dt.prototype.originalPositionFor=function(t){var r={generatedLine:U.getArg(t,"line"),generatedColumn:U.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",U.compareByGeneratedPositionsDeflated,U.getArg(t,"bias",Le.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var o=U.getArg(i,"source",null);o!==null&&(o=this._sources.at(o),o=U.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=U.getArg(i,"name",null);return s!==null&&(s=this._names.at(s)),{source:o,line:U.getArg(i,"originalLine",null),column:U.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};dt.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};dt.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;this.sourceRoot!=null&&(i=U.relative(this.sourceRoot,i));var o;if(this.sourceRoot!=null&&(o=U.urlParse(this.sourceRoot))){var s=i.replace(/^file:\/\//,"");if(o.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!o.path||o.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};dt.prototype.generatedPositionFor=function(t){var r=U.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:U.getArg(t,"line"),originalColumn:U.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",U.compareByOriginalPositions,U.getArg(t,"bias",Le.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===n.source)return{line:U.getArg(o,"generatedLine",null),column:U.getArg(o,"generatedColumn",null),lastColumn:U.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};ru.BasicSourceMapConsumer=dt;function xr(e,t){var r=e;typeof e=="string"&&(r=U.parseSourceMapInput(e));var n=U.getArg(r,"version"),i=U.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new xo,this._names=new xo;var o={line:-1,column:0};this._sections=i.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=U.getArg(s,"offset"),c=U.getArg(a,"line"),u=U.getArg(a,"column");if(c<o.line||c===o.line&&u<o.column)throw new Error("Section offsets must be ordered and non-overlapping.");return o=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new Le(U.getArg(s,"map"),t)}})}xr.prototype=Object.create(Le.prototype);xr.prototype.constructor=Le;xr.prototype._version=3;Object.defineProperty(xr.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});xr.prototype.originalPositionFor=function(t){var r={generatedLine:U.getArg(t,"line"),generatedColumn:U.getArg(t,"column")},n=Nm.search(r,this._sections,function(o,s){var a=o.generatedLine-s.generatedOffset.generatedLine;return a||o.generatedColumn-s.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};xr.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};xr.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],o=i.consumer.sourceContentFor(t,!0);if(o)return o}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};xr.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(U.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);if(i){var o={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}};xr.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var a=o[s],c=i.consumer._sources.at(a.source);c=U.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var d={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(d),typeof d.originalLine=="number"&&this.__originalMappings.push(d)}na(this.__generatedMappings,U.compareByGeneratedPositionsDeflated),na(this.__originalMappings,U.compareByOriginalPositions)};ru.IndexedSourceMapConsumer=xr});var jE=y(BE=>{var lz=Im().SourceMapGenerator,nu=wo(),dz=/(\r?\n)/,pz=10,Ao="$$$isSourceNode$$$";function Jt(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[Ao]=!0,n!=null&&this.add(n)}Jt.fromStringWithSourceMap=function(t,r,n){var i=new Jt,o=t.split(dz),s=0,a=function(){var m=v(),h=v()||"";return m+h;function v(){return s<o.length?o[s++]:void 0}},c=1,u=0,d=null;return r.eachMapping(function(m){if(d!==null)if(c<m.generatedLine)p(d,a()),c++,u=0;else{var h=o[s]||"",v=h.substr(0,m.generatedColumn-u);o[s]=h.substr(m.generatedColumn-u),u=m.generatedColumn,p(d,v),d=m;return}for(;c<m.generatedLine;)i.add(a()),c++;if(u<m.generatedColumn){var h=o[s]||"";i.add(h.substr(0,m.generatedColumn)),o[s]=h.substr(m.generatedColumn),u=m.generatedColumn}d=m},this),s<o.length&&(d&&p(d,a()),i.add(o.splice(s).join(""))),r.sources.forEach(function(m){var h=r.sourceContentFor(m);h!=null&&(n!=null&&(m=nu.join(n,m)),i.setSourceContent(m,h))}),i;function p(m,h){if(m===null||m.source===void 0)i.add(h);else{var v=n?nu.join(n,m.source):m.source;i.add(new Jt(m.originalLine,m.originalColumn,v,h,m.name))}}};Jt.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[Ao]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};Jt.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[Ao]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};Jt.prototype.walk=function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Ao]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Jt.prototype.join=function(t){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this};Jt.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[Ao]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};Jt.prototype.setSourceContent=function(t,r){this.sourceContents[nu.toSetString(t)]=r};Jt.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Ao]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(nu.fromSetString(i[r]),this.sourceContents[i[r]])};Jt.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};Jt.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new lz(t),i=!1,o=null,s=null,a=null,c=null;return this.walk(function(u,d){r.code+=u,d.source!==null&&d.line!==null&&d.column!==null?((o!==d.source||s!==d.line||a!==d.column||c!==d.name)&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name}),o=d.source,s=d.line,a=d.column,c=d.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),o=null,i=!1);for(var p=0,m=u.length;p<m;p++)u.charCodeAt(p)===pz?(r.line++,r.column=0,p+1===m?(o=null,i=!1):i&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name})):r.column++}),this.walkSourceContents(function(u,d){n.setSourceContent(u,d)}),{code:r.code,map:n}};BE.SourceNode=Jt});var qE=y(iu=>{iu.SourceMapGenerator=Im().SourceMapGenerator;iu.SourceMapConsumer=FE().SourceMapConsumer;iu.SourceNode=jE().SourceNode});var GE=y((DTe,UE)=>{var fz=Object.prototype.toString,Mm=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function mz(e){return fz.call(e).slice(8,-1)==="ArrayBuffer"}function hz(e,t,r){t>>>=0;var n=e.byteLength-t;if(n<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=n;else if(r>>>=0,r>n)throw new RangeError("'length' is out of bounds");return Mm?Buffer.from(e.slice(t,t+r)):new Buffer(new Uint8Array(e.slice(t,t+r)))}function yz(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return Mm?Buffer.from(e,t):new Buffer(e,t)}function _z(e,t,r){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return mz(e)?hz(e,t,r):typeof e=="string"?yz(e,t):Mm?Buffer.from(e):new Buffer(e)}UE.exports=_z});var YE=y((qi,Bm)=>{var vz=qE().SourceMapConsumer,Lm=require("path"),jr;try{jr=require("fs"),(!jr.existsSync||!jr.readFileSync)&&(jr=null)}catch{}var gz=GE();function $E(e,t){return e.require(t)}var HE=!1,VE=!1,km=!1,ia="auto",ji={},oa={},Ez=/^data:application\/json[^,]+base64,/,Un=[],Gn=[];function jm(){return ia==="browser"?!0:ia==="node"?!1:typeof window<"u"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function Sz(){return typeof process=="object"&&process!==null&&typeof process.on=="function"}function bz(){return typeof process=="object"&&process!==null?process.version:""}function Cz(){if(typeof process=="object"&&process!==null)return process.stderr}function wz(e){if(typeof process=="object"&&process!==null&&typeof process.exit=="function")return process.exit(e)}function ou(e){return function(t){for(var r=0;r<e.length;r++){var n=e[r](t);if(n)return n}return null}}var qm=ou(Un);Un.push(function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,function(n,i){return i?"":"/"})),e in ji)return ji[e];var t="";try{if(jr)jr.existsSync(e)&&(t=jr.readFileSync(e,"utf8"));else{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),r.readyState===4&&r.status===200&&(t=r.responseText)}}catch{}return ji[e]=t});function Fm(e,t){if(!e)return t;var r=Lm.dirname(e),n=/^\w+:\/\/[^\/]*/.exec(r),i=n?n[0]:"",o=r.slice(i.length);return i&&/^\/\w\:/.test(o)?(i+="/",i+Lm.resolve(r.slice(i.length),t).replace(/\\/g,"/")):i+Lm.resolve(r.slice(i.length),t)}function xz(e){var t;if(jm())try{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),t=r.readyState===4?r.responseText:null;var n=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(n)return n}catch{}t=qm(e);for(var i=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,o,s;s=i.exec(t);)o=s;return o?o[1]:null}var Um=ou(Gn);Gn.push(function(e){var t=xz(e);if(!t)return null;var r;if(Ez.test(t)){var n=t.slice(t.indexOf(",")+1);r=gz(n,"base64").toString(),t=e}else t=Fm(e,t),r=qm(t);return r?{url:t,map:r}:null});function Gm(e){var t=oa[e.source];if(!t){var r=Um(e.source);r?(t=oa[e.source]={url:r.url,map:new vz(r.map)},t.map.sourcesContent&&t.map.sources.forEach(function(i,o){var s=t.map.sourcesContent[o];if(s){var a=Fm(t.url,i);ji[a]=s}})):t=oa[e.source]={url:null,map:null}}if(t&&t.map&&typeof t.map.originalPositionFor=="function"){var n=t.map.originalPositionFor(e);if(n.source!==null)return n.source=Fm(t.url,n.source),n}return e}function WE(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var r=Gm({source:t[2],line:+t[3],column:t[4]-1});return"eval at "+t[1]+" ("+r.source+":"+r.line+":"+(r.column+1)+")"}return t=/^eval at ([^(]+) \((.+)\)$/.exec(e),t?"eval at "+t[1]+" ("+WE(t[2])+")":e}function Az(){var e,t="";if(this.isNative())t="native";else{e=this.getScriptNameOrSourceURL(),!e&&this.isEval()&&(t=this.getEvalOrigin(),t+=", "),e?t+=e:t+="<anonymous>";var r=this.getLineNumber();if(r!=null){t+=":"+r;var n=this.getColumnNumber();n&&(t+=":"+n)}}var i="",o=this.getFunctionName(),s=!0,a=this.isConstructor(),c=!(this.isToplevel()||a);if(c){var u=this.getTypeName();u==="[object Object]"&&(u="null");var d=this.getMethodName();o?(u&&o.indexOf(u)!=0&&(i+=u+"."),i+=o,d&&o.indexOf("."+d)!=o.length-d.length-1&&(i+=" [as "+d+"]")):i+=u+"."+(d||"<anonymous>")}else a?i+="new "+(o||"<anonymous>"):o?i+=o:(i+=t,s=!1);return s&&(i+=" ("+t+")"),i}function zE(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(r){t[r]=/^(?:is|get)/.test(r)?function(){return e[r].call(e)}:e[r]}),t.toString=Az,t}function KE(e,t){if(t===void 0&&(t={nextPosition:null,curPosition:null}),e.isNative())return t.curPosition=null,e;var r=e.getFileName()||e.getScriptNameOrSourceURL();if(r){var n=e.getLineNumber(),i=e.getColumnNumber()-1,o=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,s=o.test(bz())?0:62;n===1&&i>s&&!jm()&&!e.isEval()&&(i-=s);var a=Gm({source:r,line:n,column:i});t.curPosition=a,e=zE(e);var c=e.getFunctionName;return e.getFunctionName=function(){return t.nextPosition==null?c():t.nextPosition.name||c()},e.getFileName=function(){return a.source},e.getLineNumber=function(){return a.line},e.getColumnNumber=function(){return a.column+1},e.getScriptNameOrSourceURL=function(){return a.source},e}var u=e.isEval()&&e.getEvalOrigin();return u&&(u=WE(u),e=zE(e),e.getEvalOrigin=function(){return u}),e}function Tz(e,t){km&&(ji={},oa={});for(var r=e.name||"Error",n=e.message||"",i=r+": "+n,o={nextPosition:null,curPosition:null},s=[],a=t.length-1;a>=0;a--)s.push(`
2
- at `+KE(t[a],o)),o.nextPosition=o.curPosition;return o.curPosition=o.nextPosition=null,i+s.reverse().join("")}function JE(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var r=t[1],n=+t[2],i=+t[3],o=ji[r];if(!o&&jr&&jr.existsSync(r))try{o=jr.readFileSync(r,"utf8")}catch{o=""}if(o){var s=o.split(/(?:\r\n|\r|\n)/)[n-1];if(s)return r+":"+n+`
1
+ "use strict";var eY=Object.create;var Mu=Object.defineProperty;var tR=Object.getOwnPropertyDescriptor;var tY=Object.getOwnPropertyNames;var rY=Object.getPrototypeOf,nY=Object.prototype.hasOwnProperty;var D=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nt=(e,t)=>{for(var r in t)Mu(e,r,{get:t[r],enumerable:!0})},rR=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of tY(t))!nY.call(e,o)&&o!==r&&Mu(e,o,{get:()=>t[o],enumerable:!(n=tR(t,o))||n.enumerable});return e};var C=(e,t,r)=>(r=e!=null?eY(rY(e)):{},rR(t||!e||!e.__esModule?Mu(r,"default",{value:e,enumerable:!0}):r,e)),ie=e=>rR(Mu({},"__esModule",{value:!0}),e),Cn=(e,t,r,n)=>{for(var o=n>1?void 0:n?tR(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&Mu(t,r,o),o};var oR=b(OS=>{var nR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");OS.encode=function(e){if(0<=e&&e<nR.length)return nR[e];throw new TypeError("Must be between 0 and 63: "+e)};OS.decode=function(e){var t=65,r=90,n=97,o=122,i=48,s=57,a=43,c=47,l=26,d=52;return t<=e&&e<=r?e-t:n<=e&&e<=o?e-n+l:i<=e&&e<=s?e-i+d:e==a?62:e==c?63:-1}});var MS=b($S=>{var iR=oR(),NS=5,sR=1<<NS,aR=sR-1,cR=sR;function oY(e){return e<0?(-e<<1)+1:(e<<1)+0}function iY(e){var t=(e&1)===1,r=e>>1;return t?-r:r}$S.encode=function(t){var r="",n,o=oY(t);do n=o&aR,o>>>=NS,o>0&&(n|=cR),r+=iR.encode(n);while(o>0);return r};$S.decode=function(t,r,n){var o=t.length,i=0,s=0,a,c;do{if(r>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(c=iR.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&cR),c&=aR,i=i+(c<<s),s+=NS}while(a);n.value=iY(i),n.rest=r}});var La=b(or=>{function sY(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}or.getArg=sY;var uR=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,aY=/^data:.+\,.+$/;function Lu(e){var t=e.match(uR);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}or.urlParse=Lu;function $a(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}or.urlGenerate=$a;function LS(e){var t=e,r=Lu(e);if(r){if(!r.path)return e;t=r.path}for(var n=or.isAbsolute(t),o=t.split(/\/+/),i,s=0,a=o.length-1;a>=0;a--)i=o[a],i==="."?o.splice(a,1):i===".."?s++:s>0&&(i===""?(o.splice(a+1,s),s=0):(o.splice(a,2),s--));return t=o.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,$a(r)):t}or.normalize=LS;function lR(e,t){e===""&&(e="."),t===""&&(t=".");var r=Lu(t),n=Lu(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),$a(r);if(r||t.match(aY))return t;if(n&&!n.host&&!n.path)return n.host=t,$a(n);var o=t.charAt(0)==="/"?t:LS(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,$a(n)):o}or.join=lR;or.isAbsolute=function(e){return e.charAt(0)==="/"||uR.test(e)};function cY(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}or.relative=cY;var dR=(function(){var e=Object.create(null);return!("__proto__"in e)})();function fR(e){return e}function uY(e){return pR(e)?"$"+e:e}or.toSetString=dR?fR:uY;function lY(e){return pR(e)?e.slice(1):e}or.fromSetString=dR?fR:lY;function pR(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function dY(e,t,r){var n=Ma(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:Ma(e.name,t.name)}or.compareByOriginalPositions=dY;function fY(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=Ma(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:Ma(e.name,t.name)}or.compareByGeneratedPositionsDeflated=fY;function Ma(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function pY(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=Ma(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Ma(e.name,t.name)}or.compareByGeneratedPositionsInflated=pY;function mY(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}or.parseSourceMapInput=mY;function hY(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=Lu(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}t=lR($a(n),t)}return LS(t)}or.computeSourceURL=hY});var BS=b(mR=>{var kS=La(),FS=Object.prototype.hasOwnProperty,ks=typeof Map<"u";function Lo(){this._array=[],this._set=ks?new Map:Object.create(null)}Lo.fromArray=function(t,r){for(var n=new Lo,o=0,i=t.length;o<i;o++)n.add(t[o],r);return n};Lo.prototype.size=function(){return ks?this._set.size:Object.getOwnPropertyNames(this._set).length};Lo.prototype.add=function(t,r){var n=ks?t:kS.toSetString(t),o=ks?this.has(t):FS.call(this._set,n),i=this._array.length;(!o||r)&&this._array.push(t),o||(ks?this._set.set(t,i):this._set[n]=i)};Lo.prototype.has=function(t){if(ks)return this._set.has(t);var r=kS.toSetString(t);return FS.call(this._set,r)};Lo.prototype.indexOf=function(t){if(ks){var r=this._set.get(t);if(r>=0)return r}else{var n=kS.toSetString(t);if(FS.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};Lo.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};Lo.prototype.toArray=function(){return this._array.slice()};mR.ArraySet=Lo});var gR=b(yR=>{var hR=La();function yY(e,t){var r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,i=t.generatedColumn;return n>r||n==r&&i>=o||hR.compareByGeneratedPositionsInflated(e,t)<=0}function qf(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}qf.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};qf.prototype.add=function(t){yY(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};qf.prototype.toArray=function(){return this._sorted||(this._array.sort(hR.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};yR.MappingList=qf});var US=b(_R=>{var ku=MS(),$t=La(),Gf=BS().ArraySet,gY=gR().MappingList;function cn(e){e||(e={}),this._file=$t.getArg(e,"file",null),this._sourceRoot=$t.getArg(e,"sourceRoot",null),this._skipValidation=$t.getArg(e,"skipValidation",!1),this._sources=new Gf,this._names=new Gf,this._mappings=new gY,this._sourcesContents=null}cn.prototype._version=3;cn.fromSourceMap=function(t){var r=t.sourceRoot,n=new cn({file:t.file,sourceRoot:r});return t.eachMapping(function(o){var i={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(i.source=o.source,r!=null&&(i.source=$t.relative(r,i.source)),i.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(i.name=o.name)),n.addMapping(i)}),t.sources.forEach(function(o){var i=o;r!==null&&(i=$t.relative(r,o)),n._sources.has(i)||n._sources.add(i);var s=t.sourceContentFor(o);s!=null&&n.setSourceContent(o,s)}),n};cn.prototype.addMapping=function(t){var r=$t.getArg(t,"generated"),n=$t.getArg(t,"original",null),o=$t.getArg(t,"source",null),i=$t.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,o,i),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:i})};cn.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=$t.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[$t.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[$t.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};cn.prototype.applySourceMap=function(t,r,n){var o=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=t.file}var i=this._sourceRoot;i!=null&&(o=$t.relative(i,o));var s=new Gf,a=new Gf;this._mappings.unsortedForEach(function(c){if(c.source===o&&c.originalLine!=null){var l=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});l.source!=null&&(c.source=l.source,n!=null&&(c.source=$t.join(n,c.source)),i!=null&&(c.source=$t.relative(i,c.source)),c.originalLine=l.line,c.originalColumn=l.column,l.name!=null&&(c.name=l.name))}var d=c.source;d!=null&&!s.has(d)&&s.add(d);var f=c.name;f!=null&&!a.has(f)&&a.add(f)},this),this._sources=s,this._names=a,t.sources.forEach(function(c){var l=t.sourceContentFor(c);l!=null&&(n!=null&&(c=$t.join(n,c)),i!=null&&(c=$t.relative(i,c)),this.setSourceContent(c,l))},this)};cn.prototype._validateMapping=function(t,r,n,o){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!o)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:o}))}};cn.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,o=0,i=0,s=0,a="",c,l,d,f,m=this._mappings.toArray(),h=0,_=m.length;h<_;h++){if(l=m[h],c="",l.generatedLine!==r)for(t=0;l.generatedLine!==r;)c+=";",r++;else if(h>0){if(!$t.compareByGeneratedPositionsInflated(l,m[h-1]))continue;c+=","}c+=ku.encode(l.generatedColumn-t),t=l.generatedColumn,l.source!=null&&(f=this._sources.indexOf(l.source),c+=ku.encode(f-s),s=f,c+=ku.encode(l.originalLine-1-o),o=l.originalLine-1,c+=ku.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(d=this._names.indexOf(l.name),c+=ku.encode(d-i),i=d)),a+=c}return a};cn.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=$t.relative(r,n));var o=$t.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};cn.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};cn.prototype.toString=function(){return JSON.stringify(this.toJSON())};_R.SourceMapGenerator=cn});var ER=b(Fs=>{Fs.GREATEST_LOWER_BOUND=1;Fs.LEAST_UPPER_BOUND=2;function jS(e,t,r,n,o,i){var s=Math.floor((t-e)/2)+e,a=o(r,n[s],!0);return a===0?s:a>0?t-s>1?jS(s,t,r,n,o,i):i==Fs.LEAST_UPPER_BOUND?t<n.length?t:-1:s:s-e>1?jS(e,s,r,n,o,i):i==Fs.LEAST_UPPER_BOUND?s:e<0?-1:e}Fs.search=function(t,r,n,o){if(r.length===0)return-1;var i=jS(-1,r.length,t,r,n,o||Fs.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&n(r[i],r[i-1],!0)===0;)--i;return i}});var bR=b(SR=>{function qS(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function _Y(e,t){return Math.round(e+Math.random()*(t-e))}function GS(e,t,r,n){if(r<n){var o=_Y(r,n),i=r-1;qS(e,o,n);for(var s=e[n],a=r;a<n;a++)t(e[a],s)<=0&&(i+=1,qS(e,i,a));qS(e,i+1,a);var c=i+1;GS(e,t,r,c-1),GS(e,t,c+1,n)}}SR.quickSort=function(e,t){GS(e,t,0,e.length-1)}});var vR=b(Hf=>{var re=La(),HS=ER(),ka=BS().ArraySet,EY=MS(),Fu=bR().quickSort;function ht(e,t){var r=e;return typeof e=="string"&&(r=re.parseSourceMapInput(e)),r.sections!=null?new Dn(r,t):new Zt(r,t)}ht.fromSourceMap=function(e,t){return Zt.fromSourceMap(e,t)};ht.prototype._version=3;ht.prototype.__generatedMappings=null;Object.defineProperty(ht.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ht.prototype.__originalMappings=null;Object.defineProperty(ht.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ht.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};ht.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};ht.GENERATED_ORDER=1;ht.ORIGINAL_ORDER=2;ht.GREATEST_LOWER_BOUND=1;ht.LEAST_UPPER_BOUND=2;ht.prototype.eachMapping=function(t,r,n){var o=r||null,i=n||ht.GENERATED_ORDER,s;switch(i){case ht.GENERATED_ORDER:s=this._generatedMappings;break;case ht.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(c){var l=c.source===null?null:this._sources.at(c.source);return l=re.computeSourceURL(a,l,this._sourceMapURL),{source:l,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,o)};ht.prototype.allGeneratedPositionsFor=function(t){var r=re.getArg(t,"line"),n={source:re.getArg(t,"source"),originalLine:r,originalColumn:re.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var o=[],i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",re.compareByOriginalPositions,HS.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(t.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)o.push({line:re.getArg(s,"generatedLine",null),column:re.getArg(s,"generatedColumn",null),lastColumn:re.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)o.push({line:re.getArg(s,"generatedLine",null),column:re.getArg(s,"generatedColumn",null),lastColumn:re.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return o};Hf.SourceMapConsumer=ht;function Zt(e,t){var r=e;typeof e=="string"&&(r=re.parseSourceMapInput(e));var n=re.getArg(r,"version"),o=re.getArg(r,"sources"),i=re.getArg(r,"names",[]),s=re.getArg(r,"sourceRoot",null),a=re.getArg(r,"sourcesContent",null),c=re.getArg(r,"mappings"),l=re.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=re.normalize(s)),o=o.map(String).map(re.normalize).map(function(d){return s&&re.isAbsolute(s)&&re.isAbsolute(d)?re.relative(s,d):d}),this._names=ka.fromArray(i.map(String),!0),this._sources=ka.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(d){return re.computeSourceURL(s,d,t)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=l}Zt.prototype=Object.create(ht.prototype);Zt.prototype.consumer=ht;Zt.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=re.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};Zt.fromSourceMap=function(t,r){var n=Object.create(Zt.prototype),o=n._names=ka.fromArray(t._names.toArray(),!0),i=n._sources=ka.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(h){return re.computeSourceURL(n.sourceRoot,h,r)});for(var s=t._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],l=0,d=s.length;l<d;l++){var f=s[l],m=new xR;m.generatedLine=f.generatedLine,m.generatedColumn=f.generatedColumn,f.source&&(m.source=i.indexOf(f.source),m.originalLine=f.originalLine,m.originalColumn=f.originalColumn,f.name&&(m.name=o.indexOf(f.name)),c.push(m)),a.push(m)}return Fu(n.__originalMappings,re.compareByOriginalPositions),n};Zt.prototype._version=3;Object.defineProperty(Zt.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function xR(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}Zt.prototype._parseMappings=function(t,r){for(var n=1,o=0,i=0,s=0,a=0,c=0,l=t.length,d=0,f={},m={},h=[],_=[],E,T,I,A,O;d<l;)if(t.charAt(d)===";")n++,d++,o=0;else if(t.charAt(d)===",")d++;else{for(E=new xR,E.generatedLine=n,A=d;A<l&&!this._charIsMappingSeparator(t,A);A++);if(T=t.slice(d,A),I=f[T],I)d+=T.length;else{for(I=[];d<A;)EY.decode(t,d,m),O=m.value,d=m.rest,I.push(O);if(I.length===2)throw new Error("Found a source, but no line and column");if(I.length===3)throw new Error("Found a source and line, but no column");f[T]=I}E.generatedColumn=o+I[0],o=E.generatedColumn,I.length>1&&(E.source=a+I[1],a+=I[1],E.originalLine=i+I[2],i=E.originalLine,E.originalLine+=1,E.originalColumn=s+I[3],s=E.originalColumn,I.length>4&&(E.name=c+I[4],c+=I[4])),_.push(E),typeof E.originalLine=="number"&&h.push(E)}Fu(_,re.compareByGeneratedPositionsDeflated),this.__generatedMappings=_,Fu(h,re.compareByOriginalPositions),this.__originalMappings=h};Zt.prototype._findMapping=function(t,r,n,o,i,s){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[o]);return HS.search(t,r,i,s)};Zt.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};Zt.prototype.originalPositionFor=function(t){var r={generatedLine:re.getArg(t,"line"),generatedColumn:re.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",re.compareByGeneratedPositionsDeflated,re.getArg(t,"bias",ht.GREATEST_LOWER_BOUND));if(n>=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var i=re.getArg(o,"source",null);i!==null&&(i=this._sources.at(i),i=re.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=re.getArg(o,"name",null);return s!==null&&(s=this._names.at(s)),{source:i,line:re.getArg(o,"originalLine",null),column:re.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};Zt.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};Zt.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var o=t;this.sourceRoot!=null&&(o=re.relative(this.sourceRoot,o));var i;if(this.sourceRoot!=null&&(i=re.urlParse(this.sourceRoot))){var s=o.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!i.path||i.path=="/")&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(r)return null;throw new Error('"'+o+'" is not in the SourceMap.')};Zt.prototype.generatedPositionFor=function(t){var r=re.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:re.getArg(t,"line"),originalColumn:re.getArg(t,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",re.compareByOriginalPositions,re.getArg(t,"bias",ht.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:re.getArg(i,"generatedLine",null),column:re.getArg(i,"generatedColumn",null),lastColumn:re.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};Hf.BasicSourceMapConsumer=Zt;function Dn(e,t){var r=e;typeof e=="string"&&(r=re.parseSourceMapInput(e));var n=re.getArg(r,"version"),o=re.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new ka,this._names=new ka;var i={line:-1,column:0};this._sections=o.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=re.getArg(s,"offset"),c=re.getArg(a,"line"),l=re.getArg(a,"column");if(c<i.line||c===i.line&&l<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=a,{generatedOffset:{generatedLine:c+1,generatedColumn:l+1},consumer:new ht(re.getArg(s,"map"),t)}})}Dn.prototype=Object.create(ht.prototype);Dn.prototype.constructor=ht;Dn.prototype._version=3;Object.defineProperty(Dn.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});Dn.prototype.originalPositionFor=function(t){var r={generatedLine:re.getArg(t,"line"),generatedColumn:re.getArg(t,"column")},n=HS.search(r,this._sections,function(i,s){var a=i.generatedLine-s.generatedOffset.generatedLine;return a||i.generatedColumn-s.generatedOffset.generatedColumn}),o=this._sections[n];return o?o.consumer.originalPositionFor({line:r.generatedLine-(o.generatedOffset.generatedLine-1),column:r.generatedColumn-(o.generatedOffset.generatedLine===r.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};Dn.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};Dn.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var o=this._sections[n],i=o.consumer.sourceContentFor(t,!0);if(i)return i}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};Dn.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(re.getArg(t,"source"))!==-1){var o=n.consumer.generatedPositionFor(t);if(o){var i={line:o.line+(n.generatedOffset.generatedLine-1),column:o.column+(n.generatedOffset.generatedLine===o.line?n.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};Dn.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var o=this._sections[n],i=o.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[s],c=o.consumer._sources.at(a.source);c=re.computeSourceURL(o.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var l=null;a.name&&(l=o.consumer._names.at(a.name),this._names.add(l),l=this._names.indexOf(l));var d={source:c,generatedLine:a.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(o.generatedOffset.generatedLine===a.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:l};this.__generatedMappings.push(d),typeof d.originalLine=="number"&&this.__originalMappings.push(d)}Fu(this.__generatedMappings,re.compareByGeneratedPositionsDeflated),Fu(this.__originalMappings,re.compareByOriginalPositions)};Hf.IndexedSourceMapConsumer=Dn});var wR=b(TR=>{var SY=US().SourceMapGenerator,Vf=La(),bY=/(\r?\n)/,xY=10,Fa="$$$isSourceNode$$$";function Kr(e,t,r,n,o){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=o??null,this[Fa]=!0,n!=null&&this.add(n)}Kr.fromStringWithSourceMap=function(t,r,n){var o=new Kr,i=t.split(bY),s=0,a=function(){var m=_(),h=_()||"";return m+h;function _(){return s<i.length?i[s++]:void 0}},c=1,l=0,d=null;return r.eachMapping(function(m){if(d!==null)if(c<m.generatedLine)f(d,a()),c++,l=0;else{var h=i[s]||"",_=h.substr(0,m.generatedColumn-l);i[s]=h.substr(m.generatedColumn-l),l=m.generatedColumn,f(d,_),d=m;return}for(;c<m.generatedLine;)o.add(a()),c++;if(l<m.generatedColumn){var h=i[s]||"";o.add(h.substr(0,m.generatedColumn)),i[s]=h.substr(m.generatedColumn),l=m.generatedColumn}d=m},this),s<i.length&&(d&&f(d,a()),o.add(i.splice(s).join(""))),r.sources.forEach(function(m){var h=r.sourceContentFor(m);h!=null&&(n!=null&&(m=Vf.join(n,m)),o.setSourceContent(m,h))}),o;function f(m,h){if(m===null||m.source===void 0)o.add(h);else{var _=n?Vf.join(n,m.source):m.source;o.add(new Kr(m.originalLine,m.originalColumn,_,h,m.name))}}};Kr.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[Fa]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};Kr.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[Fa]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};Kr.prototype.walk=function(t){for(var r,n=0,o=this.children.length;n<o;n++)r=this.children[n],r[Fa]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Kr.prototype.join=function(t){var r,n,o=this.children.length;if(o>0){for(r=[],n=0;n<o-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this};Kr.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[Fa]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};Kr.prototype.setSourceContent=function(t,r){this.sourceContents[Vf.toSetString(t)]=r};Kr.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Fa]&&this.children[r].walkSourceContents(t);for(var o=Object.keys(this.sourceContents),r=0,n=o.length;r<n;r++)t(Vf.fromSetString(o[r]),this.sourceContents[o[r]])};Kr.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};Kr.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new SY(t),o=!1,i=null,s=null,a=null,c=null;return this.walk(function(l,d){r.code+=l,d.source!==null&&d.line!==null&&d.column!==null?((i!==d.source||s!==d.line||a!==d.column||c!==d.name)&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name}),i=d.source,s=d.line,a=d.column,c=d.name,o=!0):o&&(n.addMapping({generated:{line:r.line,column:r.column}}),i=null,o=!1);for(var f=0,m=l.length;f<m;f++)l.charCodeAt(f)===xY?(r.line++,r.column=0,f+1===m?(i=null,o=!1):o&&n.addMapping({source:d.source,original:{line:d.line,column:d.column},generated:{line:r.line,column:r.column},name:d.name})):r.column++}),this.walkSourceContents(function(l,d){n.setSourceContent(l,d)}),{code:r.code,map:n}};TR.SourceNode=Kr});var AR=b(Wf=>{Wf.SourceMapGenerator=US().SourceMapGenerator;Wf.SourceMapConsumer=vR().SourceMapConsumer;Wf.SourceNode=wR().SourceNode});var CR=b((lRe,IR)=>{var vY=Object.prototype.toString,VS=typeof Buffer<"u"&&typeof Buffer.alloc=="function"&&typeof Buffer.allocUnsafe=="function"&&typeof Buffer.from=="function";function TY(e){return vY.call(e).slice(8,-1)==="ArrayBuffer"}function wY(e,t,r){t>>>=0;var n=e.byteLength-t;if(n<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=n;else if(r>>>=0,r>n)throw new RangeError("'length' is out of bounds");return VS?Buffer.from(e.slice(t,t+r)):new Buffer(new Uint8Array(e.slice(t,t+r)))}function AY(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Buffer.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return VS?Buffer.from(e,t):new Buffer(e,t)}function IY(e,t,r){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return TY(e)?wY(e,t,r):typeof e=="string"?AY(e,t):VS?Buffer.from(e):new Buffer(e)}IR.exports=IY});var LR=b((Us,YS)=>{var CY=AR().SourceMapConsumer,WS=require("path"),eo;try{eo=require("fs"),(!eo.existsSync||!eo.readFileSync)&&(eo=null)}catch{}var DY=CR();function DR(e,t){return e.require(t)}var RR=!1,PR=!1,zS=!1,Bu="auto",Bs={},Uu={},RY=/^data:application\/json[^,]+base64,/,Ii=[],Ci=[];function QS(){return Bu==="browser"?!0:Bu==="node"?!1:typeof window<"u"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function PY(){return typeof process=="object"&&process!==null&&typeof process.on=="function"}function OY(){return typeof process=="object"&&process!==null?process.version:""}function NY(){if(typeof process=="object"&&process!==null)return process.stderr}function $Y(e){if(typeof process=="object"&&process!==null&&typeof process.exit=="function")return process.exit(e)}function zf(e){return function(t){for(var r=0;r<e.length;r++){var n=e[r](t);if(n)return n}return null}}var XS=zf(Ii);Ii.push(function(e){if(e=e.trim(),/^file:/.test(e)&&(e=e.replace(/file:\/\/\/(\w:)?/,function(n,o){return o?"":"/"})),e in Bs)return Bs[e];var t="";try{if(eo)eo.existsSync(e)&&(t=eo.readFileSync(e,"utf8"));else{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),r.readyState===4&&r.status===200&&(t=r.responseText)}}catch{}return Bs[e]=t});function KS(e,t){if(!e)return t;var r=WS.dirname(e),n=/^\w+:\/\/[^\/]*/.exec(r),o=n?n[0]:"",i=r.slice(o.length);return o&&/^\/\w\:/.test(i)?(o+="/",o+WS.resolve(r.slice(o.length),t).replace(/\\/g,"/")):o+WS.resolve(r.slice(o.length),t)}function MY(e){var t;if(QS())try{var r=new XMLHttpRequest;r.open("GET",e,!1),r.send(null),t=r.readyState===4?r.responseText:null;var n=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(n)return n}catch{}t=XS(e);for(var o=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,i,s;s=o.exec(t);)i=s;return i?i[1]:null}var JS=zf(Ci);Ci.push(function(e){var t=MY(e);if(!t)return null;var r;if(RY.test(t)){var n=t.slice(t.indexOf(",")+1);r=DY(n,"base64").toString(),t=e}else t=KS(e,t),r=XS(t);return r?{url:t,map:r}:null});function ZS(e){var t=Uu[e.source];if(!t){var r=JS(e.source);r?(t=Uu[e.source]={url:r.url,map:new CY(r.map)},t.map.sourcesContent&&t.map.sources.forEach(function(o,i){var s=t.map.sourcesContent[i];if(s){var a=KS(t.url,o);Bs[a]=s}})):t=Uu[e.source]={url:null,map:null}}if(t&&t.map&&typeof t.map.originalPositionFor=="function"){var n=t.map.originalPositionFor(e);if(n.source!==null)return n.source=KS(t.url,n.source),n}return e}function NR(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var r=ZS({source:t[2],line:+t[3],column:t[4]-1});return"eval at "+t[1]+" ("+r.source+":"+r.line+":"+(r.column+1)+")"}return t=/^eval at ([^(]+) \((.+)\)$/.exec(e),t?"eval at "+t[1]+" ("+NR(t[2])+")":e}function LY(){var e,t="";if(this.isNative())t="native";else{e=this.getScriptNameOrSourceURL(),!e&&this.isEval()&&(t=this.getEvalOrigin(),t+=", "),e?t+=e:t+="<anonymous>";var r=this.getLineNumber();if(r!=null){t+=":"+r;var n=this.getColumnNumber();n&&(t+=":"+n)}}var o="",i=this.getFunctionName(),s=!0,a=this.isConstructor(),c=!(this.isToplevel()||a);if(c){var l=this.getTypeName();l==="[object Object]"&&(l="null");var d=this.getMethodName();i?(l&&i.indexOf(l)!=0&&(o+=l+"."),o+=i,d&&i.indexOf("."+d)!=i.length-d.length-1&&(o+=" [as "+d+"]")):o+=l+"."+(d||"<anonymous>")}else a?o+="new "+(i||"<anonymous>"):i?o+=i:(o+=t,s=!1);return s&&(o+=" ("+t+")"),o}function OR(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(function(r){t[r]=/^(?:is|get)/.test(r)?function(){return e[r].call(e)}:e[r]}),t.toString=LY,t}function $R(e,t){if(t===void 0&&(t={nextPosition:null,curPosition:null}),e.isNative())return t.curPosition=null,e;var r=e.getFileName()||e.getScriptNameOrSourceURL();if(r){var n=e.getLineNumber(),o=e.getColumnNumber()-1,i=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,s=i.test(OY())?0:62;n===1&&o>s&&!QS()&&!e.isEval()&&(o-=s);var a=ZS({source:r,line:n,column:o});t.curPosition=a,e=OR(e);var c=e.getFunctionName;return e.getFunctionName=function(){return t.nextPosition==null?c():t.nextPosition.name||c()},e.getFileName=function(){return a.source},e.getLineNumber=function(){return a.line},e.getColumnNumber=function(){return a.column+1},e.getScriptNameOrSourceURL=function(){return a.source},e}var l=e.isEval()&&e.getEvalOrigin();return l&&(l=NR(l),e=OR(e),e.getEvalOrigin=function(){return l}),e}function kY(e,t){zS&&(Bs={},Uu={});for(var r=e.name||"Error",n=e.message||"",o=r+": "+n,i={nextPosition:null,curPosition:null},s=[],a=t.length-1;a>=0;a--)s.push(`
2
+ at `+$R(t[a],i)),i.nextPosition=i.curPosition;return i.curPosition=i.nextPosition=null,o+s.reverse().join("")}function MR(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var r=t[1],n=+t[2],o=+t[3],i=Bs[r];if(!i&&eo&&eo.existsSync(r))try{i=eo.readFileSync(r,"utf8")}catch{i=""}if(i){var s=i.split(/(?:\r\n|\r|\n)/)[n-1];if(s)return r+":"+n+`
3
3
  `+s+`
4
- `+new Array(i).join(" ")+"^"}}return null}function Pz(e){var t=JE(e),r=Cz();r&&r._handle&&r._handle.setBlocking&&r._handle.setBlocking(!0),t&&(console.error(),console.error(t)),console.error(e.stack),wz(1)}function Iz(){var e=process.emit;process.emit=function(t){if(t==="uncaughtException"){var r=arguments[1]&&arguments[1].stack,n=this.listeners(t).length>0;if(r&&!n)return Pz(arguments[1])}return e.apply(this,arguments)}}var Oz=Un.slice(0),Rz=Gn.slice(0);qi.wrapCallSite=KE;qi.getErrorSource=JE;qi.mapSourcePosition=Gm;qi.retrieveSourceMap=Um;qi.install=function(e){if(e=e||{},e.environment&&(ia=e.environment,["node","browser","auto"].indexOf(ia)===-1))throw new Error("environment "+ia+" was unknown. Available options are {auto, browser, node}");if(e.retrieveFile&&(e.overrideRetrieveFile&&(Un.length=0),Un.unshift(e.retrieveFile)),e.retrieveSourceMap&&(e.overrideRetrieveSourceMap&&(Gn.length=0),Gn.unshift(e.retrieveSourceMap)),e.hookRequire&&!jm()){var t=$E(Bm,"module"),r=t.prototype._compile;r.__sourceMapSupport||(t.prototype._compile=function(o,s){return ji[s]=o,oa[s]=void 0,r.call(this,o,s)},t.prototype._compile.__sourceMapSupport=!0)}if(km||(km="emptyCacheBetweenOperations"in e?e.emptyCacheBetweenOperations:!1),HE||(HE=!0,Error.prepareStackTrace=Tz),!VE){var n="handleUncaughtExceptions"in e?e.handleUncaughtExceptions:!0;try{var i=$E(Bm,"worker_threads");i.isMainThread===!1&&(n=!1)}catch{}n&&Sz()&&(VE=!0,Iz())}};qi.resetRetrieveHandlers=function(){Un.length=0,Gn.length=0,Un=Oz.slice(0),Gn=Rz.slice(0),Um=ou(Gn),qm=ou(Un)}});var sr=y((NTe,sS)=>{var su=Object.defineProperty,Dz=Object.getOwnPropertyDescriptor,Nz=Object.getOwnPropertyNames,Mz=Object.prototype.hasOwnProperty,au=(e,t)=>su(e,"name",{value:t,configurable:!0}),Lz=(e,t)=>{for(var r in t)su(e,r,{get:t[r],enumerable:!0})},kz=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Nz(t))!Mz.call(e,i)&&i!==r&&su(e,i,{get:()=>t[i],enumerable:!(n=Dz(t,i))||n.enumerable});return e},Fz=e=>kz(su({},"__esModule",{value:!0}),e),QE={};Lz(QE,{AlgorithmId:()=>rS,EndpointURLScheme:()=>tS,FieldPosition:()=>nS,HttpApiKeyAuthLocation:()=>eS,HttpAuthLocation:()=>ZE,IniSectionType:()=>iS,RequestHandlerProtocol:()=>oS,SMITHY_CONTEXT_KEY:()=>Gz,getDefaultClientConfiguration:()=>qz,resolveDefaultRuntimeConfig:()=>Uz});sS.exports=Fz(QE);var ZE=(e=>(e.HEADER="header",e.QUERY="query",e))(ZE||{}),eS=(e=>(e.HEADER="header",e.QUERY="query",e))(eS||{}),tS=(e=>(e.HTTP="http",e.HTTPS="https",e))(tS||{}),rS=(e=>(e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256",e))(rS||{}),Bz=au(e=>{let t=[];return e.sha256!==void 0&&t.push({algorithmId:()=>"sha256",checksumConstructor:()=>e.sha256}),e.md5!=null&&t.push({algorithmId:()=>"md5",checksumConstructor:()=>e.md5}),{_checksumAlgorithms:t,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),jz=au(e=>{let t={};return e.checksumAlgorithms().forEach(r=>{t[r.algorithmId()]=r.checksumConstructor()}),t},"resolveChecksumRuntimeConfig"),qz=au(e=>({...Bz(e)}),"getDefaultClientConfiguration"),Uz=au(e=>({...jz(e)}),"resolveDefaultRuntimeConfig"),nS=(e=>(e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER",e))(nS||{}),Gz="__smithy_context",iS=(e=>(e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services",e))(iS||{}),oS=(e=>(e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0",e))(oS||{})});var St=y((FTe,hS)=>{var cu=Object.defineProperty,$z=Object.getOwnPropertyDescriptor,Hz=Object.getOwnPropertyNames,Vz=Object.prototype.hasOwnProperty,$n=(e,t)=>cu(e,"name",{value:t,configurable:!0}),zz=(e,t)=>{for(var r in t)cu(e,r,{get:t[r],enumerable:!0})},Wz=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Hz(t))!Vz.call(e,i)&&i!==r&&cu(e,i,{get:()=>t[i],enumerable:!(n=$z(t,i))||n.enumerable});return e},Kz=e=>Wz(cu({},"__esModule",{value:!0}),e),aS={};zz(aS,{Field:()=>Qz,Fields:()=>Zz,HttpRequest:()=>e8,HttpResponse:()=>t8,getHttpHandlerExtensionConfiguration:()=>Jz,isValidHostname:()=>mS,resolveHttpHandlerRuntimeConfig:()=>Yz});hS.exports=Kz(aS);var Jz=$n(e=>{let t=e.httpHandler;return{setHttpHandler(r){t=r},httpHandler(){return t},updateHttpClientConfig(r,n){t.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Yz=$n(e=>({httpHandler:e.httpHandler()}),"resolveHttpHandlerRuntimeConfig"),Xz=sr(),cS=class{constructor({name:t,kind:r=Xz.FieldPosition.HEADER,values:n=[]}){this.name=t,this.kind=r,this.values=n}add(t){this.values.push(t)}set(t){this.values=t}remove(t){this.values=this.values.filter(r=>r!==t)}toString(){return this.values.map(t=>t.includes(",")||t.includes(" ")?`"${t}"`:t).join(", ")}get(){return this.values}};$n(cS,"Field");var Qz=cS,uS=class{constructor({fields:t=[],encoding:r="utf-8"}){this.entries={},t.forEach(this.setField.bind(this)),this.encoding=r}setField(t){this.entries[t.name.toLowerCase()]=t}getField(t){return this.entries[t.toLowerCase()]}removeField(t){delete this.entries[t.toLowerCase()]}getByType(t){return Object.values(this.entries).filter(r=>r.kind===t)}};$n(uS,"Fields");var Zz=uS,lS=class dS{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static isInstance(t){if(!t)return!1;let r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){let t=new dS({...this,headers:{...this.headers}});return t.query&&(t.query=pS(t.query)),t}};$n(lS,"HttpRequest");var e8=lS;function pS(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}$n(pS,"cloneQuery");var fS=class{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;let r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}};$n(fS,"HttpResponse");var t8=fS;function mS(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}$n(mS,"isValidHostname")});var _S=y((BTe,yS)=>{function ln(e){Object.defineProperty(this,"_next",{writable:!1,enumerable:!1,value:e}),this.done=!1}ln.prototype.next=function(){if(this.done)return{done:!0};var e=this._next();return e.done&&(this.done=!0),e};typeof Symbol<"u"&&(ln.prototype[Symbol.iterator]=function(){return this});ln.of=function(){var e=arguments,t=e.length,r=0;return new ln(function(){return r>=t?{done:!0}:{done:!1,value:e[r++]}})};ln.empty=function(){var e=new ln(null);return e.done=!0,e};ln.is=function(e){return e instanceof ln?!0:typeof e=="object"&&e!==null&&typeof e.next=="function"};yS.exports=ln});var $m=y((jTe,SS)=>{var vS=typeof ArrayBuffer<"u",gS=typeof Symbol<"u";function ES(e,t){var r,n,i,o,s;if(!e)throw new Error("obliterator/forEach: invalid iterable.");if(typeof t!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(e)||vS&&ArrayBuffer.isView(e)||typeof e=="string"||e.toString()==="[object Arguments]"){for(i=0,o=e.length;i<o;i++)t(e[i],i);return}if(typeof e.forEach=="function"){e.forEach(t);return}if(gS&&Symbol.iterator in e&&typeof e.next!="function"&&(e=e[Symbol.iterator]()),typeof e.next=="function"){for(r=e,i=0;s=r.next(),s.done!==!0;)t(s.value,i),i++;return}for(n in e)e.hasOwnProperty(n)&&t(e[n],n)}ES.forEachWithNullKeys=function(e,t){var r,n,i,o,s;if(!e)throw new Error("obliterator/forEachWithNullKeys: invalid iterable.");if(typeof t!="function")throw new Error("obliterator/forEachWithNullKeys: expecting a callback.");if(Array.isArray(e)||vS&&ArrayBuffer.isView(e)||typeof e=="string"||e.toString()==="[object Arguments]"){for(i=0,o=e.length;i<o;i++)t(e[i],null);return}if(e instanceof Set){e.forEach(function(a){t(a,null)});return}if(typeof e.forEach=="function"){e.forEach(t);return}if(gS&&Symbol.iterator in e&&typeof e.next!="function"&&(e=e[Symbol.iterator]()),typeof e.next=="function"){for(r=e,i=0;s=r.next(),s.done!==!0;)t(s.value,null),i++;return}for(n in e)e.hasOwnProperty(n)&&t(e[n],n)};SS.exports=ES});var Hm=y(qr=>{var r8=Math.pow(2,8)-1,n8=Math.pow(2,16)-1,i8=Math.pow(2,32)-1,o8=Math.pow(2,7)-1,s8=Math.pow(2,15)-1,a8=Math.pow(2,31)-1;qr.getPointerArray=function(e){var t=e-1;return t<=r8?Uint8Array:t<=n8?Uint16Array:t<=i8?Uint32Array:Float64Array};qr.getSignedPointerArray=function(e){var t=e-1;return t<=o8?Int8Array:t<=s8?Int16Array:t<=a8?Int32Array:Float64Array};qr.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var c8={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};qr.getMinimalRepresentation=function(e,t){var r=null,n=0,i,o,s,a,c;for(a=0,c=e.length;a<c;a++)s=t?t(e[a]):e[a],o=qr.getNumberType(s),i=c8[o.name],i>n&&(n=i,r=o);return r};qr.isTypedArray=function(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(e)};qr.concat=function(){var e=0,t,r,n;for(t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=new arguments[0].constructor(e);for(t=0,r=0;t<n;t++)i.set(arguments[t],r),r+=arguments[t].length;return i};qr.indices=function(e){for(var t=qr.getPointerArray(e),r=new t(e),n=0;n<e;n++)r[n]=n;return r}});var wS=y(sa=>{var bS=$m(),CS=Hm();function u8(e){return Array.isArray(e)||CS.isTypedArray(e)}function Vm(e){if(typeof e.length=="number")return e.length;if(typeof e.size=="number")return e.size}function l8(e){var t=Vm(e),r=typeof t=="number"?new Array(t):[],n=0;return bS(e,function(i){r[n++]=i}),r}function d8(e){var t=Vm(e),r=typeof t=="number"?CS.getPointerArray(t):Array,n=typeof t=="number"?new Array(t):[],i=typeof t=="number"?new r(t):[],o=0;return bS(e,function(s){n[o]=s,i[o]=o++}),[n,i]}sa.isArrayLike=u8;sa.guessLength=Vm;sa.toArray=l8;sa.toArrayWithIndices=d8});var AS=y((GTe,xS)=>{var zm=_S(),p8=$m(),f8=Hm(),m8=wS();function Qe(e,t,r){if(arguments.length<2&&(r=e,e=null,t=null),this.capacity=r,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-cache: capacity should be positive number.");var n=f8.getPointerArray(r);this.forward=new n(r),this.backward=new n(r),this.K=typeof e=="function"?new e(r):new Array(r),this.V=typeof t=="function"?new t(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items={}}Qe.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}};Qe.prototype.splayOnTop=function(e){var t=this.head;if(this.head===e)return this;var r=this.backward[e],n=this.forward[e];return this.tail===e?this.tail=r:this.backward[n]=r,this.forward[r]=n,this.backward[t]=e,this.head=e,this.forward[e]=t,this};Qe.prototype.set=function(e,t){var r=this.items[e];if(typeof r<"u"){this.splayOnTop(r),this.V[r]=t;return}this.size<this.capacity?r=this.size++:(r=this.tail,this.tail=this.backward[r],delete this.items[this.K[r]]),this.items[e]=r,this.K[r]=e,this.V[r]=t,this.forward[r]=this.head,this.backward[this.head]=r,this.head=r};Qe.prototype.setpop=function(e,t){var r=null,n=null,i=this.items[e];return typeof i<"u"?(this.splayOnTop(i),r=this.V[i],this.V[i]=t,{evicted:!1,key:e,value:r}):(this.size<this.capacity?i=this.size++:(i=this.tail,this.tail=this.backward[i],r=this.V[i],n=this.K[i],delete this.items[this.K[i]]),this.items[e]=i,this.K[i]=e,this.V[i]=t,this.forward[i]=this.head,this.backward[this.head]=i,this.head=i,n?{evicted:!0,key:n,value:r}:null)};Qe.prototype.has=function(e){return e in this.items};Qe.prototype.get=function(e){var t=this.items[e];if(!(typeof t>"u"))return this.splayOnTop(t),this.V[t]};Qe.prototype.peek=function(e){var t=this.items[e];if(!(typeof t>"u"))return this.V[t]};Qe.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var r=0,n=this.size,i=this.head,o=this.K,s=this.V,a=this.forward;r<n;)e.call(t,s[i],o[i],this),i=a[i],r++};Qe.prototype.keys=function(){var e=0,t=this.size,r=this.head,n=this.K,i=this.forward;return new zm(function(){if(e>=t)return{done:!0};var o=n[r];return e++,e<t&&(r=i[r]),{done:!1,value:o}})};Qe.prototype.values=function(){var e=0,t=this.size,r=this.head,n=this.V,i=this.forward;return new zm(function(){if(e>=t)return{done:!0};var o=n[r];return e++,e<t&&(r=i[r]),{done:!1,value:o}})};Qe.prototype.entries=function(){var e=0,t=this.size,r=this.head,n=this.K,i=this.V,o=this.forward;return new zm(function(){if(e>=t)return{done:!0};var s=n[r],a=i[r];return e++,e<t&&(r=o[r]),{done:!1,value:[s,a]}})};typeof Symbol<"u"&&(Qe.prototype[Symbol.iterator]=Qe.prototype.entries);Qe.prototype.inspect=function(){for(var e=new Map,t=this.entries(),r;r=t.next(),!r.done;)e.set(r.value[0],r.value[1]);return Object.defineProperty(e,"constructor",{value:Qe,enumerable:!1}),e};typeof Symbol<"u"&&(Qe.prototype[Symbol.for("nodejs.util.inspect.custom")]=Qe.prototype.inspect);Qe.from=function(e,t,r,n){if(arguments.length<2){if(n=m8.guessLength(e),typeof n!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(n=t,t=null,r=null);var i=new Qe(t,r,n);return p8(e,function(o,s){i.set(s,o)}),i};xS.exports=Qe});var RS=y((HTe,OS)=>{var h8=Object.create,aa=Object.defineProperty,y8=Object.getOwnPropertyDescriptor,_8=Object.getOwnPropertyNames,v8=Object.getPrototypeOf,g8=Object.prototype.hasOwnProperty,E8=(e,t)=>aa(e,"name",{value:t,configurable:!0}),S8=(e,t)=>{for(var r in t)aa(e,r,{get:t[r],enumerable:!0})},TS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _8(t))!g8.call(e,i)&&i!==r&&aa(e,i,{get:()=>t[i],enumerable:!(n=y8(t,i))||n.enumerable});return e},b8=(e,t,r)=>(r=e!=null?h8(v8(e)):{},TS(t||!e||!e.__esModule?aa(r,"default",{value:e,enumerable:!0}):r,e)),C8=e=>TS(aa({},"__esModule",{value:!0}),e),PS={};S8(PS,{EndpointCache:()=>x8});OS.exports=C8(PS);var w8=b8(AS()),IS=class{constructor(t){this.cache=new w8.default(t)}getEndpoint(t){let r=this.get(t);if(!r||r.length===0)return;let n=r.map(i=>i.Address);return n[Math.floor(Math.random()*n.length)]}get(t){if(!this.has(t))return;let r=this.cache.get(t);if(!r)return;let n=Date.now(),i=r.filter(o=>n<o.Expires);if(i.length===0){this.delete(t);return}return i}set(t,r){let n=Date.now();this.cache.set(t,r.map(({Address:i,CachePeriodInMinutes:o})=>({Address:i,Expires:n+o*60*1e3})))}delete(t){this.cache.set(t,[])}has(t){if(!this.cache.has(t))return!1;let r=this.cache.peek(t);return r?r.length>0:!1}clear(){this.cache.clear()}};E8(IS,"EndpointCache");var x8=IS});var Jm=y((VTe,kS)=>{var uu=Object.defineProperty,A8=Object.getOwnPropertyDescriptor,T8=Object.getOwnPropertyNames,P8=Object.prototype.hasOwnProperty,Hn=(e,t)=>uu(e,"name",{value:t,configurable:!0}),I8=(e,t)=>{for(var r in t)uu(e,r,{get:t[r],enumerable:!0})},O8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of T8(t))!P8.call(e,i)&&i!==r&&uu(e,i,{get:()=>t[i],enumerable:!(n=A8(t,i))||n.enumerable});return e},R8=e=>O8(uu({},"__esModule",{value:!0}),e),LS={};I8(LS,{NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS:()=>D8,endpointDiscoveryMiddlewareOptions:()=>lu,getEndpointDiscoveryOptionalPlugin:()=>F8,getEndpointDiscoveryPlugin:()=>L8,getEndpointDiscoveryRequiredPlugin:()=>k8,resolveEndpointDiscoveryConfig:()=>j8});kS.exports=R8(LS);var DS=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"],Wm="endpoint_discovery_enabled",NS=Hn(e=>["false","0"].indexOf(e)>=0,"isFalsy"),D8={environmentVariableSelector:e=>{for(let t=0;t<DS.length;t++){let r=DS[t];if(r in e){let n=e[r];if(n==="")throw Error(`Environment variable ${r} can't be empty of undefined, got "${n}"`);return!NS(n)}}},configFileSelector:e=>{if(Wm in e){let t=e[Wm];if(t===void 0)throw Error(`Shared config entry ${Wm} can't be undefined, got "${t}"`);return!NS(t)}},default:void 0},N8=St(),M8=Hn(async(e,t,r)=>{let{accessKeyId:n}=await t.credentials(),{identifiers:i}=r;return JSON.stringify({...n&&{accessKeyId:n},...i&&{commandName:e,identifiers:Object.entries(i).sort().reduce((o,[s,a])=>({...o,[s]:a}),{})}})},"getCacheKey"),dn={},MS=Hn(async(e,t)=>new Promise((r,n)=>{let{endpointCache:i}=e,{cacheKey:o,commandName:s,identifiers:a}=t,c=i.get(o);if(c&&c.length===1&&c[0].Address==="")t.isDiscoveredEndpointRequired?(dn[o]||(dn[o]=[]),dn[o].push({resolve:r,reject:n})):r();else if(c&&c.length>0)r();else{let u=[{Address:"",CachePeriodInMinutes:1}];i.set(o,u);let d=new t.endpointDiscoveryCommandCtor({Operation:s.slice(0,-7),Identifiers:a});d.resolveMiddleware(t.clientStack,e,t.options)(d).then(m=>{i.set(o,m.output.Endpoints),dn[o]&&(dn[o].forEach(({resolve:h})=>{h()}),delete dn[o]),r()}).catch(m=>{i.delete(o);let h=Object.assign(new Error("The operation to discover endpoint failed. Please retry, or provide a custom endpoint and disable endpoint discovery to proceed."),{reason:m});dn[o]&&(dn[o].forEach(({reject:v})=>{v(h)}),delete dn[o]),t.isDiscoveredEndpointRequired?n(h):(i.set(o,u),r())})}}),"updateDiscoveredEndpointInCache"),Km=Hn((e,t)=>(r,n)=>async i=>{if(e.isCustomEndpoint){if(e.isClientEndpointDiscoveryEnabled)throw new Error("Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.");return r(i)}let{endpointDiscoveryCommandCtor:o}=e,{isDiscoveredEndpointRequired:s,identifiers:a}=t,c=n.clientName,u=n.commandName,d=await e.endpointDiscoveryEnabled(),p=await M8(u,e,{identifiers:a});if(s){if(d===!1)throw new Error(`Endpoint Discovery is disabled but ${u} on ${c} requires it. Please check your configurations.`);await MS(e,{...t,commandName:u,cacheKey:p,endpointDiscoveryCommandCtor:o})}else d&&MS(e,{...t,commandName:u,cacheKey:p,endpointDiscoveryCommandCtor:o});let{request:m}=i;if(p&&N8.HttpRequest.isInstance(m)){let h=e.endpointCache.getEndpoint(p);h&&(m.hostname=h)}return r(i)},"endpointDiscoveryMiddleware"),lu={name:"endpointDiscoveryMiddleware",step:"build",tags:["ENDPOINT_DISCOVERY"],override:!0},L8=Hn((e,t)=>({applyToStack:r=>{r.add(Km(e,t),lu)}}),"getEndpointDiscoveryPlugin"),k8=Hn((e,t)=>({applyToStack:r=>{r.add(Km(e,{...t,isDiscoveredEndpointRequired:!0}),lu)}}),"getEndpointDiscoveryRequiredPlugin"),F8=Hn((e,t)=>({applyToStack:r=>{r.add(Km(e,{...t,isDiscoveredEndpointRequired:!1}),lu)}}),"getEndpointDiscoveryOptionalPlugin"),B8=RS(),j8=Hn((e,{endpointDiscoveryCommandCtor:t})=>({...e,endpointDiscoveryCommandCtor:t,endpointCache:new B8.EndpointCache(e.endpointCacheSize??1e3),endpointDiscoveryEnabled:e.endpointDiscoveryEnabled!==void 0?()=>Promise.resolve(e.endpointDiscoveryEnabled):e.endpointDiscoveryEnabledProvider,isClientEndpointDiscoveryEnabled:e.endpointDiscoveryEnabled!==void 0}),"resolveEndpointDiscoveryConfig")});var ca=y((zTe,US)=>{var du=Object.defineProperty,q8=Object.getOwnPropertyDescriptor,U8=Object.getOwnPropertyNames,G8=Object.prototype.hasOwnProperty,Ym=(e,t)=>du(e,"name",{value:t,configurable:!0}),$8=(e,t)=>{for(var r in t)du(e,r,{get:t[r],enumerable:!0})},H8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of U8(t))!G8.call(e,i)&&i!==r&&du(e,i,{get:()=>t[i],enumerable:!(n=q8(t,i))||n.enumerable});return e},V8=e=>H8(du({},"__esModule",{value:!0}),e),FS={};$8(FS,{getHostHeaderPlugin:()=>W8,hostHeaderMiddleware:()=>jS,hostHeaderMiddlewareOptions:()=>qS,resolveHostHeaderConfig:()=>BS});US.exports=V8(FS);var z8=St();function BS(e){return e}Ym(BS,"resolveHostHeaderConfig");var jS=Ym(e=>t=>async r=>{if(!z8.HttpRequest.isInstance(r.request))return t(r);let{request:n}=r,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let o=n.hostname;n.port!=null&&(o+=`:${n.port}`),n.headers.host=o}return t(r)},"hostHeaderMiddleware"),qS={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},W8=Ym(e=>({applyToStack:t=>{t.add(jS(e),qS)}}),"getHostHeaderPlugin")});var ua=y((WTe,zS)=>{var pu=Object.defineProperty,K8=Object.getOwnPropertyDescriptor,J8=Object.getOwnPropertyNames,Y8=Object.prototype.hasOwnProperty,GS=(e,t)=>pu(e,"name",{value:t,configurable:!0}),X8=(e,t)=>{for(var r in t)pu(e,r,{get:t[r],enumerable:!0})},Q8=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of J8(t))!Y8.call(e,i)&&i!==r&&pu(e,i,{get:()=>t[i],enumerable:!(n=K8(t,i))||n.enumerable});return e},Z8=e=>Q8(pu({},"__esModule",{value:!0}),e),$S={};X8($S,{getLoggerPlugin:()=>e4,loggerMiddleware:()=>HS,loggerMiddlewareOptions:()=>VS});zS.exports=Z8($S);var HS=GS(()=>(e,t)=>async r=>{var n,i;try{let o=await e(r),{clientName:s,commandName:a,logger:c,dynamoDbDocumentClientOptions:u={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:p}=u,m=d??t.inputFilterSensitiveLog,h=p??t.outputFilterSensitiveLog,{$metadata:v,..._}=o.output;return(n=c==null?void 0:c.info)==null||n.call(c,{clientName:s,commandName:a,input:m(r.input),output:h(_),metadata:v}),o}catch(o){let{clientName:s,commandName:a,logger:c,dynamoDbDocumentClientOptions:u={}}=t,{overrideInputFilterSensitiveLog:d}=u,p=d??t.inputFilterSensitiveLog;throw(i=c==null?void 0:c.error)==null||i.call(c,{clientName:s,commandName:a,input:p(r.input),error:o,metadata:o.$metadata}),o}},"loggerMiddleware"),VS={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},e4=GS(e=>({applyToStack:t=>{t.add(HS(),VS)}}),"getLoggerPlugin")});var la=y((KTe,XS)=>{var fu=Object.defineProperty,t4=Object.getOwnPropertyDescriptor,r4=Object.getOwnPropertyNames,n4=Object.prototype.hasOwnProperty,Xm=(e,t)=>fu(e,"name",{value:t,configurable:!0}),i4=(e,t)=>{for(var r in t)fu(e,r,{get:t[r],enumerable:!0})},o4=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of r4(t))!n4.call(e,i)&&i!==r&&fu(e,i,{get:()=>t[i],enumerable:!(n=t4(t,i))||n.enumerable});return e},s4=e=>o4(fu({},"__esModule",{value:!0}),e),KS={};i4(KS,{addRecursionDetectionMiddlewareOptions:()=>YS,getRecursionDetectionPlugin:()=>l4,recursionDetectionMiddleware:()=>JS});XS.exports=s4(KS);var a4=St(),WS="X-Amzn-Trace-Id",c4="AWS_LAMBDA_FUNCTION_NAME",u4="_X_AMZN_TRACE_ID",JS=Xm(e=>t=>async r=>{let{request:n}=r;if(!a4.HttpRequest.isInstance(n)||e.runtime!=="node"||n.headers.hasOwnProperty(WS))return t(r);let i=process.env[c4],o=process.env[u4],s=Xm(a=>typeof a=="string"&&a.length>0,"nonEmptyString");return s(i)&&s(o)&&(n.headers[WS]=o),t({...r,request:n})},"recursionDetectionMiddleware"),YS={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},l4=Xm(e=>({applyToStack:t=>{t.add(JS(e),YS)}}),"getRecursionDetectionPlugin")});var To=y((YTe,ab)=>{var mu=Object.defineProperty,d4=Object.getOwnPropertyDescriptor,p4=Object.getOwnPropertyNames,f4=Object.prototype.hasOwnProperty,xe=(e,t)=>mu(e,"name",{value:t,configurable:!0}),m4=(e,t)=>{for(var r in t)mu(e,r,{get:t[r],enumerable:!0})},h4=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of p4(t))!f4.call(e,i)&&i!==r&&mu(e,i,{get:()=>t[i],enumerable:!(n=d4(t,i))||n.enumerable});return e},y4=e=>h4(mu({},"__esModule",{value:!0}),e),QS={};m4(QS,{EndpointError:()=>kt,customEndpointFunctions:()=>Zm,isIpAddress:()=>ZS,isValidHostLabel:()=>th,resolveEndpoint:()=>L4});ab.exports=y4(QS);var _4=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}$"),ZS=xe(e=>_4.test(e)||e.startsWith("[")&&e.endsWith("]"),"isIpAddress"),v4=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),th=xe((e,t=!1)=>{if(!t)return v4.test(e);let r=e.split(".");for(let n of r)if(!th(n))return!1;return!0},"isValidHostLabel"),Zm={},da="endpoints";function pn(e){return typeof e!="object"||e==null?e:"ref"in e?`$${pn(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(pn).join(", ")})`:JSON.stringify(e,null,2)}xe(pn,"toDebugString");var eb=class extends Error{constructor(t){super(t),this.name="EndpointError"}};xe(eb,"EndpointError");var kt=eb,g4=xe((e,t)=>e===t,"booleanEquals"),E4=xe(e=>{let t=e.split("."),r=[];for(let n of t){let i=n.indexOf("[");if(i!==-1){if(n.indexOf("]")!==n.length-1)throw new kt(`Path: '${e}' does not end with ']'`);let o=n.slice(i+1,-1);if(Number.isNaN(parseInt(o)))throw new kt(`Invalid array index: '${o}' in path: '${e}'`);i!==0&&r.push(n.slice(0,i)),r.push(o)}else r.push(n)}return r},"getAttrPathList"),tb=xe((e,t)=>E4(t).reduce((r,n)=>{if(typeof r!="object")throw new kt(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]},e),"getAttr"),S4=xe(e=>e!=null,"isSet"),b4=xe(e=>!e,"not"),eh=sr(),Qm={[eh.EndpointURLScheme.HTTP]:80,[eh.EndpointURLScheme.HTTPS]:443},C4=xe(e=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){let{hostname:m,port:h,protocol:v="",path:_="",query:g={}}=e,x=new URL(`${v}//${m}${h?`:${h}`:""}${_}`);return x.search=Object.entries(g).map(([S,M])=>`${S}=${M}`).join("&"),x}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=t.href,{host:n,hostname:i,pathname:o,protocol:s,search:a}=t;if(a)return null;let c=s.slice(0,-1);if(!Object.values(eh.EndpointURLScheme).includes(c))return null;let u=ZS(i),d=r.includes(`${n}:${Qm[c]}`)||typeof e=="string"&&e.includes(`${n}:${Qm[c]}`),p=`${n}${d?`:${Qm[c]}`:""}`;return{scheme:c,authority:p,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}},"parseURL"),w4=xe((e,t)=>e===t,"stringEquals"),x4=xe((e,t,r,n)=>t>=r||e.length<r?null:n?e.substring(e.length-r,e.length-t):e.substring(t,r),"substring"),A4=xe(e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode"),T4={booleanEquals:g4,getAttr:tb,isSet:S4,isValidHostLabel:th,not:b4,parseURL:C4,stringEquals:w4,substring:x4,uriEncode:A4},rb=xe((e,t)=>{let r=[],n={...t.endpointParams,...t.referenceRecord},i=0;for(;i<e.length;){let o=e.indexOf("{",i);if(o===-1){r.push(e.slice(i));break}r.push(e.slice(i,o));let s=e.indexOf("}",o);if(s===-1){r.push(e.slice(o));break}e[o+1]==="{"&&e[s+1]==="}"&&(r.push(e.slice(o+1,s)),i=s+2);let a=e.substring(o+1,s);if(a.includes("#")){let[c,u]=a.split("#");r.push(tb(n[c],u))}else r.push(n[a]);i=s+1}return r.join("")},"evaluateTemplate"),P4=xe(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord})[e],"getReferenceValue"),hu=xe((e,t,r)=>{if(typeof e=="string")return rb(e,r);if(e.fn)return nb(e,r);if(e.ref)return P4(e,r);throw new kt(`'${t}': ${String(e)} is not a string, function or reference.`)},"evaluateExpression"),nb=xe(({fn:e,argv:t},r)=>{let n=t.map(o=>["boolean","number"].includes(typeof o)?o:hu(o,"arg",r)),i=e.split(".");return i[0]in Zm&&i[1]!=null?Zm[i[0]][i[1]](...n):T4[e](...n)},"callFunction"),I4=xe(({assign:e,...t},r)=>{var n,i;if(e&&e in r.referenceRecord)throw new kt(`'${e}' is already defined in Reference Record.`);let o=nb(t,r);return(i=(n=r.logger)==null?void 0:n.debug)==null||i.call(n,da,`evaluateCondition: ${pn(t)} = ${pn(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}},"evaluateCondition"),rh=xe((e=[],t)=>{var r,n;let i={};for(let o of e){let{result:s,toAssign:a}=I4(o,{...t,referenceRecord:{...t.referenceRecord,...i}});if(!s)return{result:s};a&&(i[a.name]=a.value,(n=(r=t.logger)==null?void 0:r.debug)==null||n.call(r,da,`assign: ${a.name} := ${pn(a.value)}`))}return{result:!0,referenceRecord:i}},"evaluateConditions"),O4=xe((e,t)=>Object.entries(e).reduce((r,[n,i])=>({...r,[n]:i.map(o=>{let s=hu(o,"Header value entry",t);if(typeof s!="string")throw new kt(`Header '${n}' value '${s}' is not a string`);return s})}),{}),"getEndpointHeaders"),ib=xe((e,t)=>{if(Array.isArray(e))return e.map(r=>ib(r,t));switch(typeof e){case"string":return rb(e,t);case"object":if(e===null)throw new kt(`Unexpected endpoint property: ${e}`);return ob(e,t);case"boolean":return e;default:throw new kt(`Unexpected endpoint property type: ${typeof e}`)}},"getEndpointProperty"),ob=xe((e,t)=>Object.entries(e).reduce((r,[n,i])=>({...r,[n]:ib(i,t)}),{}),"getEndpointProperties"),R4=xe((e,t)=>{let r=hu(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new kt(`Endpoint URL must be a string, got ${typeof r}`)},"getEndpointUrl"),D4=xe((e,t)=>{var r,n;let{conditions:i,endpoint:o}=e,{result:s,referenceRecord:a}=rh(i,t);if(!s)return;let c={...t,referenceRecord:{...t.referenceRecord,...a}},{url:u,properties:d,headers:p}=o;return(n=(r=t.logger)==null?void 0:r.debug)==null||n.call(r,da,`Resolving endpoint from template: ${pn(o)}`),{...p!=null&&{headers:O4(p,c)},...d!=null&&{properties:ob(d,c)},url:R4(u,c)}},"evaluateEndpointRule"),N4=xe((e,t)=>{let{conditions:r,error:n}=e,{result:i,referenceRecord:o}=rh(r,t);if(i)throw new kt(hu(n,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},"evaluateErrorRule"),M4=xe((e,t)=>{let{conditions:r,rules:n}=e,{result:i,referenceRecord:o}=rh(r,t);if(i)return sb(n,{...t,referenceRecord:{...t.referenceRecord,...o}})},"evaluateTreeRule"),sb=xe((e,t)=>{for(let r of e)if(r.type==="endpoint"){let n=D4(r,t);if(n)return n}else if(r.type==="error")N4(r,t);else if(r.type==="tree"){let n=M4(r,t);if(n)return n}else throw new kt(`Unknown endpoint rule: ${r}`);throw new kt("Rules evaluation failed")},"evaluateRules"),L4=xe((e,t)=>{var r,n,i,o,s;let{endpointParams:a,logger:c}=t,{parameters:u,rules:d}=e;(n=(r=t.logger)==null?void 0:r.debug)==null||n.call(r,`${da} Initial EndpointParams: ${pn(a)}`);let p=Object.entries(u).filter(([,v])=>v.default!=null).map(([v,_])=>[v,_.default]);if(p.length>0)for(let[v,_]of p)a[v]=a[v]??_;let m=Object.entries(u).filter(([,v])=>v.required).map(([v])=>v);for(let v of m)if(a[v]==null)throw new kt(`Missing required parameter: '${v}'`);let h=sb(d,{endpointParams:a,logger:c,referenceRecord:{}});if((i=t.endpointParams)!=null&&i.Endpoint)try{let v=new URL(t.endpointParams.Endpoint),{protocol:_,port:g}=v;h.url.protocol=_,h.url.port=g}catch{}return(s=(o=t.logger)==null?void 0:o.debug)==null||s.call(o,`${da} Resolved endpoint: ${pn(h)}`),h},"resolveEndpoint")});var Io=y((XTe,yb)=>{var yu=Object.defineProperty,k4=Object.getOwnPropertyDescriptor,F4=Object.getOwnPropertyNames,B4=Object.prototype.hasOwnProperty,Po=(e,t)=>yu(e,"name",{value:t,configurable:!0}),j4=(e,t)=>{for(var r in t)yu(e,r,{get:t[r],enumerable:!0})},q4=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of F4(t))!B4.call(e,i)&&i!==r&&yu(e,i,{get:()=>t[i],enumerable:!(n=k4(t,i))||n.enumerable});return e},U4=e=>q4(yu({},"__esModule",{value:!0}),e),cb={};j4(cb,{ConditionObject:()=>Re.ConditionObject,DeprecatedObject:()=>Re.DeprecatedObject,EndpointError:()=>Re.EndpointError,EndpointObject:()=>Re.EndpointObject,EndpointObjectHeaders:()=>Re.EndpointObjectHeaders,EndpointObjectProperties:()=>Re.EndpointObjectProperties,EndpointParams:()=>Re.EndpointParams,EndpointResolverOptions:()=>Re.EndpointResolverOptions,EndpointRuleObject:()=>Re.EndpointRuleObject,ErrorRuleObject:()=>Re.ErrorRuleObject,EvaluateOptions:()=>Re.EvaluateOptions,Expression:()=>Re.Expression,FunctionArgv:()=>Re.FunctionArgv,FunctionObject:()=>Re.FunctionObject,FunctionReturn:()=>Re.FunctionReturn,ParameterObject:()=>Re.ParameterObject,ReferenceObject:()=>Re.ReferenceObject,ReferenceRecord:()=>Re.ReferenceRecord,RuleSetObject:()=>Re.RuleSetObject,RuleSetRules:()=>Re.RuleSetRules,TreeRuleObject:()=>Re.TreeRuleObject,awsEndpointFunctions:()=>hb,getUserAgentPrefix:()=>H4,isIpAddress:()=>Re.isIpAddress,partition:()=>fb,resolveEndpoint:()=>Re.resolveEndpoint,setPartitionInfo:()=>mb,useDefaultPartitionInfo:()=>$4});yb.exports=U4(cb);var Re=To(),ub=Po((e,t=!1)=>{if(t){for(let r of e.split("."))if(!ub(r))return!1;return!0}return!(!(0,Re.isValidHostLabel)(e)||e.length<3||e.length>63||e!==e.toLowerCase()||(0,Re.isIpAddress)(e))},"isVirtualHostableS3Bucket"),G4=Po(e=>{let t=e.split(":");if(t.length<6)return null;let[r,n,i,o,s,...a]=t;return r!=="arn"||n===""||i===""||a[0]===""?null:{partition:n,service:i,region:o,accountId:s,resourceId:a[0].includes("/")?a[0].split("/"):a}},"parseArn"),lb={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"},db=lb,pb="",fb=Po(e=>{let{partitions:t}=db;for(let n of t){let{regions:i,outputs:o}=n;for(let[s,a]of Object.entries(i))if(s===e)return{...o,...a}}for(let n of t){let{regionRegex:i,outputs:o}=n;if(new RegExp(i).test(e))return{...o}}let r=t.find(n=>n.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},"partition"),mb=Po((e,t="")=>{db=e,pb=t},"setPartitionInfo"),$4=Po(()=>{mb(lb,"")},"useDefaultPartitionInfo"),H4=Po(()=>pb,"getUserAgentPrefix"),hb={isVirtualHostableS3Bucket:ub,parseArn:G4,partition:fb};Re.customEndpointFunctions.aws=hb});var pa=y((QTe,wb)=>{var _u=Object.defineProperty,V4=Object.getOwnPropertyDescriptor,z4=Object.getOwnPropertyNames,W4=Object.prototype.hasOwnProperty,vu=(e,t)=>_u(e,"name",{value:t,configurable:!0}),K4=(e,t)=>{for(var r in t)_u(e,r,{get:t[r],enumerable:!0})},J4=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of z4(t))!W4.call(e,i)&&i!==r&&_u(e,i,{get:()=>t[i],enumerable:!(n=V4(t,i))||n.enumerable});return e},Y4=e=>J4(_u({},"__esModule",{value:!0}),e),Eb={};K4(Eb,{getUserAgentMiddlewareOptions:()=>Cb,getUserAgentPlugin:()=>tW,resolveUserAgentConfig:()=>Sb,userAgentMiddleware:()=>bb});wb.exports=Y4(Eb);function Sb(e){return{...e,customUserAgent:typeof e.customUserAgent=="string"?[[e.customUserAgent]]:e.customUserAgent}}vu(Sb,"resolveUserAgentConfig");var X4=Io(),Q4=St(),_b="user-agent",nh="x-amz-user-agent",vb=" ",ih="/",Z4=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,eW=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,gb="-",bb=vu(e=>(t,r)=>async n=>{var i,o;let{request:s}=n;if(!Q4.HttpRequest.isInstance(s))return t(n);let{headers:a}=s,c=((i=r==null?void 0:r.userAgent)==null?void 0:i.map(oh))||[],u=(await e.defaultUserAgentProvider()).map(oh),d=((o=e==null?void 0:e.customUserAgent)==null?void 0:o.map(oh))||[],p=(0,X4.getUserAgentPrefix)(),m=(p?[p]:[]).concat([...u,...c,...d]).join(vb),h=[...u.filter(v=>v.startsWith("aws-sdk-")),...d].join(vb);return e.runtime!=="browser"?(h&&(a[nh]=a[nh]?`${a[_b]} ${h}`:h),a[_b]=m):a[nh]=m,t({...n,request:s})},"userAgentMiddleware"),oh=vu(e=>{var t;let r=e[0].split(ih).map(a=>a.replace(Z4,gb)).join(ih),n=(t=e[1])==null?void 0:t.replace(eW,gb),i=r.indexOf(ih),o=r.substring(0,i),s=r.substring(i+1);return o==="api"&&(s=s.toLowerCase()),[o,s,n].filter(a=>a&&a.length>0).reduce((a,c,u)=>{switch(u){case 0:return c;case 1:return`${a}/${c}`;default:return`${a}#${c}`}},"")},"escapeUserAgent"),Cb={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},tW=vu(e=>({applyToStack:t=>{t.add(bb(e),Cb)}}),"getUserAgentPlugin")});var Ib=y((ZTe,Pb)=>{var gu=Object.defineProperty,rW=Object.getOwnPropertyDescriptor,nW=Object.getOwnPropertyNames,iW=Object.prototype.hasOwnProperty,xb=(e,t)=>gu(e,"name",{value:t,configurable:!0}),oW=(e,t)=>{for(var r in t)gu(e,r,{get:t[r],enumerable:!0})},sW=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of nW(t))!iW.call(e,i)&&i!==r&&gu(e,i,{get:()=>t[i],enumerable:!(n=rW(t,i))||n.enumerable});return e},aW=e=>sW(gu({},"__esModule",{value:!0}),e),Ab={};oW(Ab,{SelectorType:()=>Tb,booleanSelector:()=>cW,numberSelector:()=>uW});Pb.exports=aW(Ab);var cW=xb((e,t,r)=>{if(t in e){if(e[t]==="true")return!0;if(e[t]==="false")return!1;throw new Error(`Cannot load ${r} "${t}". Expected "true" or "false", got ${e[t]}.`)}},"booleanSelector"),uW=xb((e,t,r)=>{if(!(t in e))return;let n=parseInt(e[t],10);if(Number.isNaN(n))throw new TypeError(`Cannot load ${r} '${t}'. Expected number, got '${e[t]}'.`);return n},"numberSelector"),Tb=(e=>(e.ENV="env",e.CONFIG="shared config entry",e))(Tb||{})});var Ur=y((ePe,Nb)=>{var Eu=Object.defineProperty,lW=Object.getOwnPropertyDescriptor,dW=Object.getOwnPropertyNames,pW=Object.prototype.hasOwnProperty,Rb=(e,t)=>Eu(e,"name",{value:t,configurable:!0}),fW=(e,t)=>{for(var r in t)Eu(e,r,{get:t[r],enumerable:!0})},mW=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of dW(t))!pW.call(e,i)&&i!==r&&Eu(e,i,{get:()=>t[i],enumerable:!(n=lW(t,i))||n.enumerable});return e},hW=e=>mW(Eu({},"__esModule",{value:!0}),e),Db={};fW(Db,{getSmithyContext:()=>yW,normalizeProvider:()=>_W});Nb.exports=hW(Db);var Ob=sr(),yW=Rb(e=>e[Ob.SMITHY_CONTEXT_KEY]||(e[Ob.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),_W=Rb(e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t},"normalizeProvider")});var Gr=y((tPe,Hb)=>{var bu=Object.defineProperty,vW=Object.getOwnPropertyDescriptor,gW=Object.getOwnPropertyNames,EW=Object.prototype.hasOwnProperty,Ar=(e,t)=>bu(e,"name",{value:t,configurable:!0}),SW=(e,t)=>{for(var r in t)bu(e,r,{get:t[r],enumerable:!0})},bW=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of gW(t))!EW.call(e,i)&&i!==r&&bu(e,i,{get:()=>t[i],enumerable:!(n=vW(t,i))||n.enumerable});return e},CW=e=>bW(bu({},"__esModule",{value:!0}),e),kb={};SW(kb,{CONFIG_USE_DUALSTACK_ENDPOINT:()=>Bb,CONFIG_USE_FIPS_ENDPOINT:()=>qb,DEFAULT_USE_DUALSTACK_ENDPOINT:()=>wW,DEFAULT_USE_FIPS_ENDPOINT:()=>AW,ENV_USE_DUALSTACK_ENDPOINT:()=>Fb,ENV_USE_FIPS_ENDPOINT:()=>jb,NODE_REGION_CONFIG_FILE_OPTIONS:()=>DW,NODE_REGION_CONFIG_OPTIONS:()=>RW,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:()=>xW,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:()=>TW,REGION_ENV_NAME:()=>Ub,REGION_INI_NAME:()=>Gb,getRegionInfo:()=>FW,resolveCustomEndpointsConfig:()=>PW,resolveEndpointsConfig:()=>OW,resolveRegionConfig:()=>NW});Hb.exports=CW(kb);var Vn=Ib(),Fb="AWS_USE_DUALSTACK_ENDPOINT",Bb="use_dualstack_endpoint",wW=!1,xW={environmentVariableSelector:e=>(0,Vn.booleanSelector)(e,Fb,Vn.SelectorType.ENV),configFileSelector:e=>(0,Vn.booleanSelector)(e,Bb,Vn.SelectorType.CONFIG),default:!1},jb="AWS_USE_FIPS_ENDPOINT",qb="use_fips_endpoint",AW=!1,TW={environmentVariableSelector:e=>(0,Vn.booleanSelector)(e,jb,Vn.SelectorType.ENV),configFileSelector:e=>(0,Vn.booleanSelector)(e,qb,Vn.SelectorType.CONFIG),default:!1},Su=Ur(),PW=Ar(e=>{let{endpoint:t,urlParser:r}=e;return{...e,tls:e.tls??!0,endpoint:(0,Su.normalizeProvider)(typeof t=="string"?r(t):t),isCustomEndpoint:!0,useDualstackEndpoint:(0,Su.normalizeProvider)(e.useDualstackEndpoint??!1)}},"resolveCustomEndpointsConfig"),IW=Ar(async e=>{let{tls:t=!0}=e,r=await e.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");let i=await e.useDualstackEndpoint(),o=await e.useFipsEndpoint(),{hostname:s}=await e.regionInfoProvider(r,{useDualstackEndpoint:i,useFipsEndpoint:o})??{};if(!s)throw new Error("Cannot resolve hostname from client config");return e.urlParser(`${t?"https:":"http:"}//${s}`)},"getEndpointFromRegion"),OW=Ar(e=>{let t=(0,Su.normalizeProvider)(e.useDualstackEndpoint??!1),{endpoint:r,useFipsEndpoint:n,urlParser:i}=e;return{...e,tls:e.tls??!0,endpoint:r?(0,Su.normalizeProvider)(typeof r=="string"?i(r):r):()=>IW({...e,useDualstackEndpoint:t,useFipsEndpoint:n}),isCustomEndpoint:!!r,useDualstackEndpoint:t}},"resolveEndpointsConfig"),Ub="AWS_REGION",Gb="region",RW={environmentVariableSelector:e=>e[Ub],configFileSelector:e=>e[Gb],default:()=>{throw new Error("Region is missing")}},DW={preferredFile:"credentials"},$b=Ar(e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),"isFipsRegion"),Mb=Ar(e=>$b(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,"getRealRegion"),NW=Ar(e=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if(typeof t=="string")return Mb(t);let n=await t();return Mb(n)},useFipsEndpoint:async()=>{let n=typeof t=="string"?t:await t();return $b(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}}},"resolveRegionConfig"),Lb=Ar((e=[],{useFipsEndpoint:t,useDualstackEndpoint:r})=>{var n;return(n=e.find(({tags:i})=>t===i.includes("fips")&&r===i.includes("dualstack")))==null?void 0:n.hostname},"getHostnameFromVariants"),MW=Ar((e,{regionHostname:t,partitionHostname:r})=>t||(r?r.replace("{region}",e):void 0),"getResolvedHostname"),LW=Ar((e,{partitionHash:t})=>Object.keys(t||{}).find(r=>t[r].regions.includes(e))??"aws","getResolvedPartition"),kW=Ar((e,{signingRegion:t,regionRegex:r,useFipsEndpoint:n})=>{if(t)return t;if(n){let i=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),o=e.match(i);if(o)return o[0].slice(1,-1)}},"getResolvedSigningRegion"),FW=Ar((e,{useFipsEndpoint:t=!1,useDualstackEndpoint:r=!1,signingService:n,regionHash:i,partitionHash:o})=>{var s,a,c,u,d;let p=LW(e,{partitionHash:o}),m=e in i?e:((s=o[p])==null?void 0:s.endpoint)??e,h={useFipsEndpoint:t,useDualstackEndpoint:r},v=Lb((a=i[m])==null?void 0:a.variants,h),_=Lb((c=o[p])==null?void 0:c.variants,h),g=MW(m,{regionHostname:v,partitionHostname:_});if(g===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:m,useFipsEndpoint:t,useDualstackEndpoint:r}}`);let x=kW(g,{signingRegion:(u=i[m])==null?void 0:u.signingRegion,regionRegex:o[p].regionRegex,useFipsEndpoint:t});return{partition:p,signingService:n,hostname:g,...x&&{signingRegion:x},...((d=i[m])==null?void 0:d.signingService)&&{signingService:i[m].signingService}}},"getRegionInfo")});var Ft=y((rPe,Qb)=>{var Cu=Object.defineProperty,BW=Object.getOwnPropertyDescriptor,jW=Object.getOwnPropertyNames,qW=Object.prototype.hasOwnProperty,Ui=(e,t)=>Cu(e,"name",{value:t,configurable:!0}),UW=(e,t)=>{for(var r in t)Cu(e,r,{get:t[r],enumerable:!0})},GW=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jW(t))!qW.call(e,i)&&i!==r&&Cu(e,i,{get:()=>t[i],enumerable:!(n=BW(t,i))||n.enumerable});return e},$W=e=>GW(Cu({},"__esModule",{value:!0}),e),Vb={};UW(Vb,{CredentialsProviderError:()=>HW,ProviderError:()=>wu,TokenProviderError:()=>VW,chain:()=>zW,fromStatic:()=>WW,memoize:()=>KW});Qb.exports=$W(Vb);var zb=class Wb extends Error{constructor(t,r=!0){super(t),this.tryNextLink=r,this.name="ProviderError",Object.setPrototypeOf(this,Wb.prototype)}static from(t,r=!0){return Object.assign(new this(t.message,r),t)}};Ui(zb,"ProviderError");var wu=zb,Kb=class Jb extends wu{constructor(t,r=!0){super(t,r),this.tryNextLink=r,this.name="CredentialsProviderError",Object.setPrototypeOf(this,Jb.prototype)}};Ui(Kb,"CredentialsProviderError");var HW=Kb,Yb=class Xb extends wu{constructor(t,r=!0){super(t,r),this.tryNextLink=r,this.name="TokenProviderError",Object.setPrototypeOf(this,Xb.prototype)}};Ui(Yb,"TokenProviderError");var VW=Yb,zW=Ui((...e)=>async()=>{if(e.length===0)throw new wu("No providers in chain");let t;for(let r of e)try{return await r()}catch(n){if(t=n,n!=null&&n.tryNextLink)continue;throw n}throw t},"chain"),WW=Ui(e=>()=>Promise.resolve(e),"fromStatic"),KW=Ui((e,t,r)=>{let n,i,o,s=!1,a=Ui(async()=>{i||(i=e());try{n=await i,o=!0,s=!1}finally{i=void 0}return n},"coalesceProvider");return t===void 0?async c=>((!o||c!=null&&c.forceRefresh)&&(n=await a()),n):async c=>((!o||c!=null&&c.forceRefresh)&&(n=await a()),s?n:r&&!r(n)?(s=!0,n):(t(n)&&await a(),n))},"memoize")});var fa=y(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.getHomeDir=void 0;var JW=require("os"),YW=require("path"),sh={},XW=()=>process&&process.geteuid?`${process.geteuid()}`:"DEFAULT",QW=()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:r,HOMEDRIVE:n=`C:${YW.sep}`}=process.env;if(e)return e;if(t)return t;if(r)return`${n}${r}`;let i=XW();return sh[i]||(sh[i]=(0,JW.homedir)()),sh[i]};xu.getHomeDir=QW});var ah=y(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.getSSOTokenFilepath=void 0;var ZW=require("crypto"),e5=require("path"),t5=fa(),r5=e=>{let r=(0,ZW.createHash)("sha1").update(e).digest("hex");return(0,e5.join)((0,t5.getHomeDir)(),".aws","sso","cache",`${r}.json`)};Au.getSSOTokenFilepath=r5});var Zb=y(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.getSSOTokenFromFile=void 0;var n5=require("fs"),i5=ah(),{readFile:o5}=n5.promises,s5=async e=>{let t=(0,i5.getSSOTokenFilepath)(e),r=await o5(t,"utf8");return JSON.parse(r)};Tu.getSSOTokenFromFile=s5});var uh=y(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.slurpFile=void 0;var a5=require("fs"),{readFile:c5}=a5.promises,ch={},u5=(e,t)=>((!ch[e]||t!=null&&t.ignoreCache)&&(ch[e]=c5(e,"utf8")),ch[e]);Pu.slurpFile=u5});var zn=y((aPe,ha)=>{var Ou=Object.defineProperty,l5=Object.getOwnPropertyDescriptor,d5=Object.getOwnPropertyNames,p5=Object.prototype.hasOwnProperty,ar=(e,t)=>Ou(e,"name",{value:t,configurable:!0}),f5=(e,t)=>{for(var r in t)Ou(e,r,{get:t[r],enumerable:!0})},lh=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of d5(t))!p5.call(e,i)&&i!==r&&Ou(e,i,{get:()=>t[i],enumerable:!(n=l5(t,i))||n.enumerable});return e},ph=(e,t,r)=>(lh(e,t,"default"),r&&lh(r,t,"default")),m5=e=>lh(Ou({},"__esModule",{value:!0}),e),ma={};f5(ma,{CONFIG_PREFIX_SEPARATOR:()=>Gi,DEFAULT_PROFILE:()=>nC,ENV_PROFILE:()=>rC,getProfileName:()=>h5,loadSharedConfigFiles:()=>sC,loadSsoSessionData:()=>T5,parseKnownFiles:()=>I5});ha.exports=m5(ma);ph(ma,fa(),ha.exports);var rC="AWS_PROFILE",nC="default",h5=ar(e=>e.profile||process.env[rC]||nC,"getProfileName");ph(ma,ah(),ha.exports);ph(ma,Zb(),ha.exports);var Iu=sr(),y5=ar(e=>Object.entries(e).filter(([t])=>{let r=t.indexOf(Gi);return r===-1?!1:Object.values(Iu.IniSectionType).includes(t.substring(0,r))}).reduce((t,[r,n])=>{let i=r.indexOf(Gi),o=r.substring(0,i)===Iu.IniSectionType.PROFILE?r.substring(i+1):r;return t[o]=n,t},{...e.default&&{default:e.default}}),"getConfigData"),iC=require("path"),_5=fa(),v5="AWS_CONFIG_FILE",oC=ar(()=>process.env[v5]||(0,iC.join)((0,_5.getHomeDir)(),".aws","config"),"getConfigFilepath"),g5=fa(),E5="AWS_SHARED_CREDENTIALS_FILE",S5=ar(()=>process.env[E5]||(0,iC.join)((0,g5.getHomeDir)(),".aws","credentials"),"getCredentialsFilepath"),b5=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,C5=["__proto__","profile __proto__"],dh=ar(e=>{let t={},r,n;for(let i of e.split(/\r?\n/)){let o=i.split(/(^|\s)[;#]/)[0].trim();if(o[0]==="["&&o[o.length-1]==="]"){r=void 0,n=void 0;let a=o.substring(1,o.length-1),c=b5.exec(a);if(c){let[,u,,d]=c;Object.values(Iu.IniSectionType).includes(u)&&(r=[u,d].join(Gi))}else r=a;if(C5.includes(a))throw new Error(`Found invalid profile name "${a}"`)}else if(r){let a=o.indexOf("=");if(![0,-1].includes(a)){let[c,u]=[o.substring(0,a).trim(),o.substring(a+1).trim()];if(u==="")n=c;else{n&&i.trimStart()===i&&(n=void 0),t[r]=t[r]||{};let d=n?[n,c].join(Gi):c;t[r][d]=u}}}}return t},"parseIni"),eC=uh(),tC=ar(()=>({}),"swallowError"),Gi=".",sC=ar(async(e={})=>{let{filepath:t=S5(),configFilepath:r=oC()}=e,n=await Promise.all([(0,eC.slurpFile)(r,{ignoreCache:e.ignoreCache}).then(dh).then(y5).catch(tC),(0,eC.slurpFile)(t,{ignoreCache:e.ignoreCache}).then(dh).catch(tC)]);return{configFile:n[0],credentialsFile:n[1]}},"loadSharedConfigFiles"),w5=ar(e=>Object.entries(e).filter(([t])=>t.startsWith(Iu.IniSectionType.SSO_SESSION+Gi)).reduce((t,[r,n])=>({...t,[r.substring(r.indexOf(Gi)+1)]:n}),{}),"getSsoSessionData"),x5=uh(),A5=ar(()=>({}),"swallowError"),T5=ar(async(e={})=>(0,x5.slurpFile)(e.configFilepath??oC()).then(dh).then(w5).catch(A5),"loadSsoSessionData"),P5=ar((...e)=>{let t={};for(let r of e)for(let[n,i]of Object.entries(r))t[n]!==void 0?Object.assign(t[n],i):t[n]=i;return t},"mergeConfigFiles"),I5=ar(async e=>{let t=await sC(e);return P5(t.configFile,t.credentialsFile)},"parseKnownFiles")});var fn=y((cPe,uC)=>{var Ru=Object.defineProperty,O5=Object.getOwnPropertyDescriptor,R5=Object.getOwnPropertyNames,D5=Object.prototype.hasOwnProperty,_a=(e,t)=>Ru(e,"name",{value:t,configurable:!0}),N5=(e,t)=>{for(var r in t)Ru(e,r,{get:t[r],enumerable:!0})},M5=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of R5(t))!D5.call(e,i)&&i!==r&&Ru(e,i,{get:()=>t[i],enumerable:!(n=O5(t,i))||n.enumerable});return e},L5=e=>M5(Ru({},"__esModule",{value:!0}),e),cC={};N5(cC,{loadConfig:()=>q5});uC.exports=L5(cC);var ya=Ft(),k5=_a(e=>async()=>{try{let t=e(process.env);if(t===void 0)throw new Error;return t}catch(t){throw new ya.CredentialsProviderError(t.message||`Cannot load config from environment variables with getter: ${e}`)}},"fromEnv"),aC=zn(),F5=_a((e,{preferredFile:t="config",...r}={})=>async()=>{let n=(0,aC.getProfileName)(r),{configFile:i,credentialsFile:o}=await(0,aC.loadSharedConfigFiles)(r),s=o[n]||{},a=i[n]||{},c=t==="config"?{...s,...a}:{...a,...s};try{let d=e(c,t==="config"?i:o);if(d===void 0)throw new Error;return d}catch(u){throw new ya.CredentialsProviderError(u.message||`Cannot load config for profile ${n} in SDK configuration files with getter: ${e}`)}},"fromSharedConfigFiles"),B5=_a(e=>typeof e=="function","isFunction"),j5=_a(e=>B5(e)?async()=>await e():(0,ya.fromStatic)(e),"fromStatic"),q5=_a(({environmentVariableSelector:e,configFileSelector:t,default:r},n={})=>(0,ya.memoize)((0,ya.chain)(k5(e),F5(t,n),j5(r))),"loadConfig")});var fC=y(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.getEndpointUrlConfig=void 0;var lC=zn(),dC="AWS_ENDPOINT_URL",pC="endpoint_url",U5=e=>({environmentVariableSelector:t=>{let r=e.split(" ").map(o=>o.toUpperCase()),n=t[[dC,...r].join("_")];if(n)return n;let i=t[dC];if(i)return i},configFileSelector:(t,r)=>{if(r&&t.services){let i=r[["services",t.services].join(lC.CONFIG_PREFIX_SEPARATOR)];if(i){let o=e.split(" ").map(a=>a.toLowerCase()),s=i[[o.join("_"),pC].join(lC.CONFIG_PREFIX_SEPARATOR)];if(s)return s}}let n=t[pC];if(n)return n},default:void 0});Du.getEndpointUrlConfig=U5});var mC=y(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.getEndpointFromConfig=void 0;var G5=fn(),$5=fC(),H5=async e=>(0,G5.loadConfig)((0,$5.getEndpointUrlConfig)(e))();Nu.getEndpointFromConfig=H5});var vC=y((dPe,_C)=>{var Mu=Object.defineProperty,V5=Object.getOwnPropertyDescriptor,z5=Object.getOwnPropertyNames,W5=Object.prototype.hasOwnProperty,K5=(e,t)=>Mu(e,"name",{value:t,configurable:!0}),J5=(e,t)=>{for(var r in t)Mu(e,r,{get:t[r],enumerable:!0})},Y5=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of z5(t))!W5.call(e,i)&&i!==r&&Mu(e,i,{get:()=>t[i],enumerable:!(n=V5(t,i))||n.enumerable});return e},X5=e=>Y5(Mu({},"__esModule",{value:!0}),e),hC={};J5(hC,{parseQueryString:()=>yC});_C.exports=X5(hC);function yC(e){let t={};if(e=e.replace(/^\?/,""),e)for(let r of e.split("&")){let[n,i=null]=r.split("=");n=decodeURIComponent(n),i&&(i=decodeURIComponent(i)),n in t?Array.isArray(t[n])?t[n].push(i):t[n]=[t[n],i]:t[n]=i}return t}K5(yC,"parseQueryString")});var $i=y((pPe,SC)=>{var Lu=Object.defineProperty,Q5=Object.getOwnPropertyDescriptor,Z5=Object.getOwnPropertyNames,eK=Object.prototype.hasOwnProperty,tK=(e,t)=>Lu(e,"name",{value:t,configurable:!0}),rK=(e,t)=>{for(var r in t)Lu(e,r,{get:t[r],enumerable:!0})},nK=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Z5(t))!eK.call(e,i)&&i!==r&&Lu(e,i,{get:()=>t[i],enumerable:!(n=Q5(t,i))||n.enumerable});return e},iK=e=>nK(Lu({},"__esModule",{value:!0}),e),gC={};rK(gC,{parseUrl:()=>EC});SC.exports=iK(gC);var oK=vC(),EC=tK(e=>{if(typeof e=="string")return EC(new URL(e));let{hostname:t,pathname:r,port:n,protocol:i,search:o}=e,s;return o&&(s=(0,oK.parseQueryString)(o)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:s}},"parseUrl")});var Hi=y((fPe,PC)=>{var ku=Object.defineProperty,sK=Object.getOwnPropertyDescriptor,aK=Object.getOwnPropertyNames,cK=Object.prototype.hasOwnProperty,fh=(e,t)=>ku(e,"name",{value:t,configurable:!0}),uK=(e,t)=>{for(var r in t)ku(e,r,{get:t[r],enumerable:!0})},lK=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of aK(t))!cK.call(e,i)&&i!==r&&ku(e,i,{get:()=>t[i],enumerable:!(n=sK(t,i))||n.enumerable});return e},dK=e=>lK(ku({},"__esModule",{value:!0}),e),bC={};uK(bC,{deserializerMiddleware:()=>CC,deserializerMiddlewareOption:()=>xC,getSerdePlugin:()=>TC,serializerMiddleware:()=>wC,serializerMiddlewareOption:()=>AC});PC.exports=dK(bC);var CC=fh((e,t)=>(r,n)=>async i=>{let{response:o}=await r(i);try{let s=await t(o,e);return{response:o,output:s}}catch(s){if(Object.defineProperty(s,"$response",{value:o}),!("$metadata"in s)){let a="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";s.message+=`
5
- `+a,typeof s.$responseBodyText<"u"&&s.$response&&(s.$response.body=s.$responseBodyText)}throw s}},"deserializerMiddleware"),wC=fh((e,t)=>(r,n)=>async i=>{var o;let s=(o=n.endpointV2)!=null&&o.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint;if(!s)throw new Error("No valid endpoint provider available.");let a=await t(i.input,{...e,endpoint:s});return r({...i,request:a})},"serializerMiddleware"),xC={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},AC={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function TC(e,t,r){return{applyToStack:n=>{n.add(CC(e,r),xC),n.add(wC(e,t),AC)}}}fh(TC,"getSerdePlugin")});var Vi=y((mPe,LC)=>{var Bu=Object.defineProperty,pK=Object.getOwnPropertyDescriptor,fK=Object.getOwnPropertyNames,mK=Object.prototype.hasOwnProperty,Tr=(e,t)=>Bu(e,"name",{value:t,configurable:!0}),hK=(e,t)=>{for(var r in t)Bu(e,r,{get:t[r],enumerable:!0})},yK=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fK(t))!mK.call(e,i)&&i!==r&&Bu(e,i,{get:()=>t[i],enumerable:!(n=pK(t,i))||n.enumerable});return e},_K=e=>yK(Bu({},"__esModule",{value:!0}),e),OC={};hK(OC,{endpointMiddleware:()=>NC,endpointMiddlewareOptions:()=>MC,getEndpointFromInstructions:()=>RC,getEndpointPlugin:()=>TK,resolveEndpointConfig:()=>PK,resolveParams:()=>DC,toEndpointV1:()=>mh});LC.exports=_K(OC);var vK=Tr(async e=>{let t=(e==null?void 0:e.Bucket)||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),CK(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!bK(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},"resolveParamsForS3"),gK=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,EK=/(\d+\.){3}\d+/,SK=/\.\./,bK=Tr(e=>gK.test(e)&&!EK.test(e)&&!SK.test(e),"isDnsCompatibleBucketName"),CK=Tr(e=>{let[t,r,n,,,i]=e.split(":"),o=t==="arn"&&e.split(":").length>=6,s=!!(o&&r&&n&&i);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},"isArnBucketName"),wK=Tr((e,t,r)=>{let n=Tr(async()=>{let i=r[e]??r[t];return typeof i=="function"?i():i},"configProvider");return e==="credentialScope"||t==="CredentialScope"?async()=>{let i=typeof r.credentials=="function"?await r.credentials():r.credentials;return(i==null?void 0:i.credentialScope)??(i==null?void 0:i.CredentialScope)}:e==="endpoint"||t==="endpoint"?async()=>{let i=await n();if(i&&typeof i=="object"){if("url"in i)return i.url.href;if("hostname"in i){let{protocol:o,hostname:s,port:a,path:c}=i;return`${o}//${s}${a?":"+a:""}${c}`}}return i}:n},"createConfigValueProvider"),xK=mC(),IC=$i(),mh=Tr(e=>typeof e=="object"?"url"in e?(0,IC.parseUrl)(e.url):e:(0,IC.parseUrl)(e),"toEndpointV1"),RC=Tr(async(e,t,r,n)=>{if(!r.endpoint){let s=await(0,xK.getEndpointFromConfig)(r.serviceId||"");s&&(r.endpoint=()=>Promise.resolve(mh(s)))}let i=await DC(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(i,n)},"getEndpointFromInstructions"),DC=Tr(async(e,t,r)=>{var n;let i={},o=((n=t==null?void 0:t.getEndpointParameterInstructions)==null?void 0:n.call(t))||{};for(let[s,a]of Object.entries(o))switch(a.type){case"staticContextParams":i[s]=a.value;break;case"contextParams":i[s]=e[a.name];break;case"clientContextParams":case"builtInParams":i[s]=await wK(a.name,s,r)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(o).length===0&&Object.assign(i,r),String(r.serviceId).toLowerCase()==="s3"&&await vK(i),i},"resolveParams"),Fu=Ur(),NC=Tr(({config:e,instructions:t})=>(r,n)=>async i=>{var o,s,a;let c=await RC(i.input,{getEndpointParameterInstructions(){return t}},{...e},n);n.endpointV2=c,n.authSchemes=(o=c.properties)==null?void 0:o.authSchemes;let u=(s=n.authSchemes)==null?void 0:s[0];if(u){n.signing_region=u.signingRegion,n.signing_service=u.signingName;let d=(0,Fu.getSmithyContext)(n),p=(a=d==null?void 0:d.selectedHttpAuthScheme)==null?void 0:a.httpAuthOption;p&&(p.signingProperties=Object.assign(p.signingProperties||{},{signing_region:u.signingRegion,signingRegion:u.signingRegion,signing_service:u.signingName,signingName:u.signingName,signingRegionSet:u.signingRegionSet},u.properties))}return r({...i})},"endpointMiddleware"),AK=Hi(),MC={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:AK.serializerMiddlewareOption.name},TK=Tr((e,t)=>({applyToStack:r=>{r.addRelativeTo(NC({config:e,instructions:t}),MC)}}),"getEndpointPlugin"),PK=Tr(e=>{let t=e.tls??!0,{endpoint:r}=e,n=r!=null?async()=>mh(await(0,Fu.normalizeProvider)(r)()):void 0;return{...e,endpoint:n,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:(0,Fu.normalizeProvider)(e.useDualstackEndpoint??!1),useFipsEndpoint:(0,Fu.normalizeProvider)(e.useFipsEndpoint??!1)}},"resolveEndpointConfig")});function va(){return ju>qu.length-16&&(kC.default.randomFillSync(qu),ju=0),qu.slice(ju,ju+=16)}var kC,qu,ju,hh=at(()=>{kC=It(require("crypto")),qu=new Uint8Array(256),ju=qu.length});var FC,BC=at(()=>{FC=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function IK(e){return typeof e=="string"&&FC.test(e)}var Wn,ga=at(()=>{BC();Wn=IK});function zi(e,t=0){return pt[e[t+0]]+pt[e[t+1]]+pt[e[t+2]]+pt[e[t+3]]+"-"+pt[e[t+4]]+pt[e[t+5]]+"-"+pt[e[t+6]]+pt[e[t+7]]+"-"+pt[e[t+8]]+pt[e[t+9]]+"-"+pt[e[t+10]]+pt[e[t+11]]+pt[e[t+12]]+pt[e[t+13]]+pt[e[t+14]]+pt[e[t+15]]}function OK(e,t=0){let r=zi(e,t);if(!Wn(r))throw TypeError("Stringified UUID is invalid");return r}var pt,jC,Ea=at(()=>{ga();pt=[];for(let e=0;e<256;++e)pt.push((e+256).toString(16).slice(1));jC=OK});function RK(e,t,r){let n=t&&r||0,i=t||new Array(16);e=e||{};let o=e.node||qC,s=e.clockseq!==void 0?e.clockseq:yh;if(o==null||s==null){let m=e.random||(e.rng||va)();o==null&&(o=qC=[m[0]|1,m[1],m[2],m[3],m[4],m[5]]),s==null&&(s=yh=(m[6]<<8|m[7])&16383)}let a=e.msecs!==void 0?e.msecs:Date.now(),c=e.nsecs!==void 0?e.nsecs:vh+1,u=a-_h+(c-vh)/1e4;if(u<0&&e.clockseq===void 0&&(s=s+1&16383),(u<0||a>_h)&&e.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_h=a,vh=c,yh=s,a+=122192928e5;let d=((a&268435455)*1e4+c)%4294967296;i[n++]=d>>>24&255,i[n++]=d>>>16&255,i[n++]=d>>>8&255,i[n++]=d&255;let p=a/4294967296*1e4&268435455;i[n++]=p>>>8&255,i[n++]=p&255,i[n++]=p>>>24&15|16,i[n++]=p>>>16&255,i[n++]=s>>>8|128,i[n++]=s&255;for(let m=0;m<6;++m)i[n+m]=o[m];return t||zi(i)}var qC,yh,_h,vh,UC,GC=at(()=>{hh();Ea();_h=0,vh=0;UC=RK});function DK(e){if(!Wn(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var Uu,gh=at(()=>{ga();Uu=DK});function NK(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}function Sa(e,t,r){function n(i,o,s,a){var c;if(typeof i=="string"&&(i=NK(i)),typeof o=="string"&&(o=Uu(o)),((c=o)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let u=new Uint8Array(16+i.length);if(u.set(o),u.set(i,o.length),u=r(u),u[6]=u[6]&15|t,u[8]=u[8]&63|128,s){a=a||0;for(let d=0;d<16;++d)s[a+d]=u[d];return s}return zi(u)}try{n.name=e}catch{}return n.DNS=MK,n.URL=LK,n}var MK,LK,Eh=at(()=>{Ea();gh();MK="6ba7b810-9dad-11d1-80b4-00c04fd430c8",LK="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});function kK(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),$C.default.createHash("md5").update(e).digest()}var $C,HC,VC=at(()=>{$C=It(require("crypto"));HC=kK});var FK,zC,WC=at(()=>{Eh();VC();FK=Sa("v3",48,HC),zC=FK});var KC,Sh,JC=at(()=>{KC=It(require("crypto")),Sh={randomUUID:KC.default.randomUUID}});function BK(e,t,r){if(Sh.randomUUID&&!t&&!e)return Sh.randomUUID();e=e||{};let n=e.random||(e.rng||va)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return zi(n)}var YC,XC=at(()=>{JC();hh();Ea();YC=BK});function jK(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),QC.default.createHash("sha1").update(e).digest()}var QC,ZC,ew=at(()=>{QC=It(require("crypto"));ZC=jK});var qK,tw,rw=at(()=>{Eh();ew();qK=Sa("v5",80,ZC),tw=qK});var nw,iw=at(()=>{nw="00000000-0000-0000-0000-000000000000"});function UK(e){if(!Wn(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}var ow,sw=at(()=>{ga();ow=UK});var bh={};ea(bh,{NIL:()=>nw,parse:()=>Uu,stringify:()=>jC,v1:()=>UC,v3:()=>zC,v4:()=>YC,v5:()=>tw,validate:()=>Wn,version:()=>ow});var Ch=at(()=>{GC();WC();XC();rw();iw();sw();ga();Ea();gh()});var wh=y((eIe,lw)=>{var Gu=Object.defineProperty,GK=Object.getOwnPropertyDescriptor,$K=Object.getOwnPropertyNames,HK=Object.prototype.hasOwnProperty,Oo=(e,t)=>Gu(e,"name",{value:t,configurable:!0}),VK=(e,t)=>{for(var r in t)Gu(e,r,{get:t[r],enumerable:!0})},zK=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $K(t))!HK.call(e,i)&&i!==r&&Gu(e,i,{get:()=>t[i],enumerable:!(n=GK(t,i))||n.enumerable});return e},WK=e=>zK(Gu({},"__esModule",{value:!0}),e),aw={};VK(aw,{isClockSkewCorrectedError:()=>cw,isClockSkewError:()=>e9,isRetryableByTrait:()=>ZK,isServerError:()=>r9,isThrottlingError:()=>t9,isTransientError:()=>uw});lw.exports=WK(aw);var KK=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],JK=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],YK=["TimeoutError","RequestTimeout","RequestTimeoutException"],XK=[500,502,503,504],QK=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],ZK=Oo(e=>e.$retryable!==void 0,"isRetryableByTrait"),e9=Oo(e=>KK.includes(e.name),"isClockSkewError"),cw=Oo(e=>{var t;return(t=e.$metadata)==null?void 0:t.clockSkewCorrected},"isClockSkewCorrectedError"),t9=Oo(e=>{var t,r;return((t=e.$metadata)==null?void 0:t.httpStatusCode)===429||JK.includes(e.name)||((r=e.$retryable)==null?void 0:r.throttling)==!0},"isThrottlingError"),uw=Oo(e=>{var t;return cw(e)||YK.includes(e.name)||QK.includes((e==null?void 0:e.code)||"")||XK.includes(((t=e.$metadata)==null?void 0:t.httpStatusCode)||0)},"isTransientError"),r9=Oo(e=>{var t;if(((t=e.$metadata)==null?void 0:t.httpStatusCode)!==void 0){let r=e.$metadata.httpStatusCode;return 500<=r&&r<=599&&!uw(e)}return!1},"isServerError")});var Ro=y((oIe,Cw)=>{var $u=Object.defineProperty,n9=Object.getOwnPropertyDescriptor,i9=Object.getOwnPropertyNames,o9=Object.prototype.hasOwnProperty,Pr=(e,t)=>$u(e,"name",{value:t,configurable:!0}),s9=(e,t)=>{for(var r in t)$u(e,r,{get:t[r],enumerable:!0})},a9=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of i9(t))!o9.call(e,i)&&i!==r&&$u(e,i,{get:()=>t[i],enumerable:!(n=n9(t,i))||n.enumerable});return e},c9=e=>a9($u({},"__esModule",{value:!0}),e),pw={};s9(pw,{AdaptiveRetryStrategy:()=>m9,ConfiguredRetryStrategy:()=>h9,DEFAULT_MAX_ATTEMPTS:()=>xh,DEFAULT_RETRY_DELAY_BASE:()=>ba,DEFAULT_RETRY_MODE:()=>u9,DefaultRateLimiter:()=>hw,INITIAL_RETRY_TOKENS:()=>Ah,INVOCATION_ID_HEADER:()=>d9,MAXIMUM_RETRY_DELAY:()=>Th,NO_RETRY_INCREMENT:()=>gw,REQUEST_HEADER:()=>p9,RETRY_COST:()=>_w,RETRY_MODES:()=>fw,StandardRetryStrategy:()=>Ph,THROTTLING_RETRY_DELAY_BASE:()=>yw,TIMEOUT_RETRY_COST:()=>vw});Cw.exports=c9(pw);var fw=(e=>(e.STANDARD="standard",e.ADAPTIVE="adaptive",e))(fw||{}),xh=3,u9="standard",l9=wh(),mw=class{constructor(t){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(t==null?void 0:t.beta)??.7,this.minCapacity=(t==null?void 0:t.minCapacity)??1,this.minFillRate=(t==null?void 0:t.minFillRate)??.5,this.scaleConstant=(t==null?void 0:t.scaleConstant)??.4,this.smooth=(t==null?void 0:t.smooth)??.8;let r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,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(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){let r=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(n=>setTimeout(n,r))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){let t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}let r=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+r),this.lastTimestamp=t}updateClientSendingRate(t){let r;if(this.updateMeasuredRate(),(0,l9.isThrottlingError)(t)){let i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());let n=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){let n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}};Pr(mw,"DefaultRateLimiter");var hw=mw,ba=100,Th=20*1e3,yw=500,Ah=500,_w=5,vw=10,gw=1,d9="amz-sdk-invocation-id",p9="amz-sdk-request",f9=Pr(()=>{let e=ba;return{computeNextBackoffDelay:Pr(n=>Math.floor(Math.min(Th,Math.random()*2**n*e)),"computeNextBackoffDelay"),setDelayBase:Pr(n=>{e=n},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),dw=Pr(({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:Pr(()=>t,"getRetryCount"),getRetryDelay:Pr(()=>Math.min(Th,e),"getRetryDelay"),getRetryCost:Pr(()=>r,"getRetryCost")}),"createDefaultRetryToken"),Ew=class{constructor(t){this.maxAttempts=t,this.mode="standard",this.capacity=Ah,this.retryBackoffStrategy=f9(),this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return dw({retryDelay:ba,retryCount:0})}async refreshRetryTokenForRetry(t,r){let n=await this.getMaxAttempts();if(this.shouldRetry(t,r,n)){let i=r.errorType;this.retryBackoffStrategy.setDelayBase(i==="THROTTLING"?yw:ba);let o=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),s=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,o):o,a=this.getCapacityCost(i);return this.capacity-=a,dw({retryDelay:s,retryCount:t.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(Ah,this.capacity+(t.getRetryCost()??gw))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${xh}`),xh}}shouldRetry(t,r,n){return t.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t==="TRANSIENT"?vw:_w}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}};Pr(Ew,"StandardRetryStrategy");var Ph=Ew,Sw=class{constructor(t,r){this.maxAttemptsProvider=t,this.mode="adaptive";let{rateLimiter:n}=r??{};this.rateLimiter=n??new hw,this.standardRetryStrategy=new Ph(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(t,r)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}};Pr(Sw,"AdaptiveRetryStrategy");var m9=Sw,bw=class extends Ph{constructor(t,r=ba){super(typeof t=="function"?t:async()=>t),typeof r=="number"?this.computeNextBackoffDelay=()=>r:this.computeNextBackoffDelay=r}async refreshRetryTokenForRetry(t,r){let n=await super.refreshRetryTokenForRetry(t,r);return n.getRetryDelay=()=>this.computeNextBackoffDelay(n.getRetryCount()),n}};Pr(bw,"ConfiguredRetryStrategy");var h9=bw});var Pw=y((sIe,Tw)=>{var Hu=Object.defineProperty,y9=Object.getOwnPropertyDescriptor,_9=Object.getOwnPropertyNames,v9=Object.prototype.hasOwnProperty,cr=(e,t)=>Hu(e,"name",{value:t,configurable:!0}),g9=(e,t)=>{for(var r in t)Hu(e,r,{get:t[r],enumerable:!0})},E9=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _9(t))!v9.call(e,i)&&i!==r&&Hu(e,i,{get:()=>t[i],enumerable:!(n=y9(t,i))||n.enumerable});return e},S9=e=>E9(Hu({},"__esModule",{value:!0}),e),Aw={};g9(Aw,{constructStack:()=>Ih});Tw.exports=S9(Aw);var Wi=cr((e,t)=>{let r=[];if(e&&r.push(e),t)for(let n of t)r.push(n);return r},"getAllAliases"),Kn=cr((e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,"getMiddlewareNameWithAliases"),Ih=cr(()=>{let e=[],t=[],r=!1,n=new Set,i=cr(p=>p.sort((m,h)=>ww[h.step]-ww[m.step]||xw[h.priority||"normal"]-xw[m.priority||"normal"]),"sort"),o=cr(p=>{let m=!1,h=cr(v=>{let _=Wi(v.name,v.aliases);if(_.includes(p)){m=!0;for(let g of _)n.delete(g);return!1}return!0},"filterCb");return e=e.filter(h),t=t.filter(h),m},"removeByName"),s=cr(p=>{let m=!1,h=cr(v=>{if(v.middleware===p){m=!0;for(let _ of Wi(v.name,v.aliases))n.delete(_);return!1}return!0},"filterCb");return e=e.filter(h),t=t.filter(h),m},"removeByReference"),a=cr(p=>{var m;return e.forEach(h=>{p.add(h.middleware,{...h})}),t.forEach(h=>{p.addRelativeTo(h.middleware,{...h})}),(m=p.identifyOnResolve)==null||m.call(p,d.identifyOnResolve()),p},"cloneTo"),c=cr(p=>{let m=[];return p.before.forEach(h=>{h.before.length===0&&h.after.length===0?m.push(h):m.push(...c(h))}),m.push(p),p.after.reverse().forEach(h=>{h.before.length===0&&h.after.length===0?m.push(h):m.push(...c(h))}),m},"expandRelativeMiddlewareList"),u=cr((p=!1)=>{let m=[],h=[],v={};return e.forEach(g=>{let x={...g,before:[],after:[]};for(let S of Wi(x.name,x.aliases))v[S]=x;m.push(x)}),t.forEach(g=>{let x={...g,before:[],after:[]};for(let S of Wi(x.name,x.aliases))v[S]=x;h.push(x)}),h.forEach(g=>{if(g.toMiddleware){let x=v[g.toMiddleware];if(x===void 0){if(p)return;throw new Error(`${g.toMiddleware} is not found when adding ${Kn(g.name,g.aliases)} middleware ${g.relation} ${g.toMiddleware}`)}g.relation==="after"&&x.after.push(g),g.relation==="before"&&x.before.push(g)}}),i(m).map(c).reduce((g,x)=>(g.push(...x),g),[])},"getMiddlewareList"),d={add:(p,m={})=>{let{name:h,override:v,aliases:_}=m,g={step:"initialize",priority:"normal",middleware:p,...m},x=Wi(h,_);if(x.length>0){if(x.some(S=>n.has(S))){if(!v)throw new Error(`Duplicate middleware name '${Kn(h,_)}'`);for(let S of x){let M=e.findIndex(me=>{var Te;return me.name===S||((Te=me.aliases)==null?void 0:Te.some(Je=>Je===S))});if(M===-1)continue;let k=e[M];if(k.step!==g.step||g.priority!==k.priority)throw new Error(`"${Kn(k.name,k.aliases)}" middleware with ${k.priority} priority in ${k.step} step cannot be overridden by "${Kn(h,_)}" middleware with ${g.priority} priority in ${g.step} step.`);e.splice(M,1)}}for(let S of x)n.add(S)}e.push(g)},addRelativeTo:(p,m)=>{let{name:h,override:v,aliases:_}=m,g={middleware:p,...m},x=Wi(h,_);if(x.length>0){if(x.some(S=>n.has(S))){if(!v)throw new Error(`Duplicate middleware name '${Kn(h,_)}'`);for(let S of x){let M=t.findIndex(me=>{var Te;return me.name===S||((Te=me.aliases)==null?void 0:Te.some(Je=>Je===S))});if(M===-1)continue;let k=t[M];if(k.toMiddleware!==g.toMiddleware||k.relation!==g.relation)throw new Error(`"${Kn(k.name,k.aliases)}" middleware ${k.relation} "${k.toMiddleware}" middleware cannot be overridden by "${Kn(h,_)}" middleware ${g.relation} "${g.toMiddleware}" middleware.`);t.splice(M,1)}}for(let S of x)n.add(S)}t.push(g)},clone:()=>a(Ih()),use:p=>{p.applyToStack(d)},remove:p=>typeof p=="string"?o(p):s(p),removeByTag:p=>{let m=!1,h=cr(v=>{let{tags:_,name:g,aliases:x}=v;if(_&&_.includes(p)){let S=Wi(g,x);for(let M of S)n.delete(M);return m=!0,!1}return!0},"filterCb");return e=e.filter(h),t=t.filter(h),m},concat:p=>{var m;let h=a(Ih());return h.use(p),h.identifyOnResolve(r||h.identifyOnResolve()||(((m=p.identifyOnResolve)==null?void 0:m.call(p))??!1)),h},applyToStack:a,identify:()=>u(!0).map(p=>{let m=p.step??p.relation+" "+p.toMiddleware;return Kn(p.name,p.aliases)+" - "+m}),identifyOnResolve(p){return typeof p=="boolean"&&(r=p),r},resolve:(p,m)=>{for(let h of u().map(v=>v.middleware).reverse())p=h(p,m);return r&&console.log(d.identify()),p}};return d},"constructStack"),ww={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},xw={high:3,normal:2,low:1}});var Oh=y((aIe,Ow)=>{var Vu=Object.defineProperty,b9=Object.getOwnPropertyDescriptor,C9=Object.getOwnPropertyNames,w9=Object.prototype.hasOwnProperty,x9=(e,t)=>Vu(e,"name",{value:t,configurable:!0}),A9=(e,t)=>{for(var r in t)Vu(e,r,{get:t[r],enumerable:!0})},T9=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of C9(t))!w9.call(e,i)&&i!==r&&Vu(e,i,{get:()=>t[i],enumerable:!(n=b9(t,i))||n.enumerable});return e},P9=e=>T9(Vu({},"__esModule",{value:!0}),e),Iw={};A9(Iw,{isArrayBuffer:()=>I9});Ow.exports=P9(Iw);var I9=x9(e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var Do=y((cIe,Nw)=>{var zu=Object.defineProperty,O9=Object.getOwnPropertyDescriptor,R9=Object.getOwnPropertyNames,D9=Object.prototype.hasOwnProperty,Rw=(e,t)=>zu(e,"name",{value:t,configurable:!0}),N9=(e,t)=>{for(var r in t)zu(e,r,{get:t[r],enumerable:!0})},M9=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of R9(t))!D9.call(e,i)&&i!==r&&zu(e,i,{get:()=>t[i],enumerable:!(n=O9(t,i))||n.enumerable});return e},L9=e=>M9(zu({},"__esModule",{value:!0}),e),Dw={};N9(Dw,{fromArrayBuffer:()=>F9,fromString:()=>B9});Nw.exports=L9(Dw);var k9=Oh(),Rh=require("buffer"),F9=Rw((e,t=0,r=e.byteLength-t)=>{if(!(0,k9.isArrayBuffer)(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Rh.Buffer.from(e,t,r)},"fromArrayBuffer"),B9=Rw((e,t)=>{if(typeof e!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?Rh.Buffer.from(e,t):Rh.Buffer.from(e)},"fromString")});var Mw=y(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});Wu.fromBase64=void 0;var j9=Do(),q9=/^[A-Za-z0-9+/]*={0,2}$/,U9=e=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!q9.exec(e))throw new TypeError("Invalid base64 string.");let t=(0,j9.fromString)(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};Wu.fromBase64=U9});var ur=y((lIe,Bw)=>{var Ku=Object.defineProperty,G9=Object.getOwnPropertyDescriptor,$9=Object.getOwnPropertyNames,H9=Object.prototype.hasOwnProperty,Dh=(e,t)=>Ku(e,"name",{value:t,configurable:!0}),V9=(e,t)=>{for(var r in t)Ku(e,r,{get:t[r],enumerable:!0})},z9=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $9(t))!H9.call(e,i)&&i!==r&&Ku(e,i,{get:()=>t[i],enumerable:!(n=G9(t,i))||n.enumerable});return e},W9=e=>z9(Ku({},"__esModule",{value:!0}),e),Lw={};V9(Lw,{fromUtf8:()=>Fw,toUint8Array:()=>K9,toUtf8:()=>J9});Bw.exports=W9(Lw);var kw=Do(),Fw=Dh(e=>{let t=(0,kw.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),K9=Dh(e=>typeof e=="string"?Fw(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),"toUint8Array"),J9=Dh(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(0,kw.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var jw=y(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});Ju.toBase64=void 0;var Y9=Do(),X9=ur(),Q9=e=>{let t;if(typeof e=="string"?t=(0,X9.fromUtf8)(e):t=e,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,Y9.fromArrayBuffer)(t.buffer,t.byteOffset,t.byteLength).toString("base64")};Ju.toBase64=Q9});var No=y((pIe,Yu)=>{var qw=Object.defineProperty,Z9=Object.getOwnPropertyDescriptor,eJ=Object.getOwnPropertyNames,tJ=Object.prototype.hasOwnProperty,Nh=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of eJ(t))!tJ.call(e,i)&&i!==r&&qw(e,i,{get:()=>t[i],enumerable:!(n=Z9(t,i))||n.enumerable});return e},Uw=(e,t,r)=>(Nh(e,t,"default"),r&&Nh(r,t,"default")),rJ=e=>Nh(qw({},"__esModule",{value:!0}),e),Mh={};Yu.exports=rJ(Mh);Uw(Mh,Mw(),Yu.exports);Uw(Mh,jw(),Yu.exports)});var Gw=y(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});Xu.getAwsChunkedEncodingStream=void 0;var nJ=require("stream"),iJ=(e,t)=>{let{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:i,checksumLocationName:o,streamHasher:s}=t,a=r!==void 0&&i!==void 0&&o!==void 0&&s!==void 0,c=a?s(i,e):void 0,u=new nJ.Readable({read:()=>{}});return e.on("data",d=>{let p=n(d)||0;u.push(`${p.toString(16)}\r
6
- `),u.push(d),u.push(`\r
7
- `)}),e.on("end",async()=>{if(u.push(`0\r
8
- `),a){let d=r(await c);u.push(`${o}:${d}\r
9
- `),u.push(`\r
10
- `)}u.push(null)}),u};Xu.getAwsChunkedEncodingStream=iJ});var kh=y((mIe,Vw)=>{var Qu=Object.defineProperty,oJ=Object.getOwnPropertyDescriptor,sJ=Object.getOwnPropertyNames,aJ=Object.prototype.hasOwnProperty,Lh=(e,t)=>Qu(e,"name",{value:t,configurable:!0}),cJ=(e,t)=>{for(var r in t)Qu(e,r,{get:t[r],enumerable:!0})},uJ=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of sJ(t))!aJ.call(e,i)&&i!==r&&Qu(e,i,{get:()=>t[i],enumerable:!(n=oJ(t,i))||n.enumerable});return e},lJ=e=>uJ(Qu({},"__esModule",{value:!0}),e),$w={};cJ($w,{escapeUri:()=>Hw,escapeUriPath:()=>pJ});Vw.exports=lJ($w);var Hw=Lh(e=>encodeURIComponent(e).replace(/[!'()*]/g,dJ),"escapeUri"),dJ=Lh(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),pJ=Lh(e=>e.split("/").map(Hw).join("/"),"escapeUriPath")});var Jw=y((hIe,Kw)=>{var Zu=Object.defineProperty,fJ=Object.getOwnPropertyDescriptor,mJ=Object.getOwnPropertyNames,hJ=Object.prototype.hasOwnProperty,yJ=(e,t)=>Zu(e,"name",{value:t,configurable:!0}),_J=(e,t)=>{for(var r in t)Zu(e,r,{get:t[r],enumerable:!0})},vJ=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of mJ(t))!hJ.call(e,i)&&i!==r&&Zu(e,i,{get:()=>t[i],enumerable:!(n=fJ(t,i))||n.enumerable});return e},gJ=e=>vJ(Zu({},"__esModule",{value:!0}),e),zw={};_J(zw,{buildQueryString:()=>Ww});Kw.exports=gJ(zw);var Fh=kh();function Ww(e){let t=[];for(let r of Object.keys(e).sort()){let n=e[r];if(r=(0,Fh.escapeUri)(r),Array.isArray(n))for(let i=0,o=n.length;i<o;i++)t.push(`${r}=${(0,Fh.escapeUri)(n[i])}`);else{let i=r;(n||typeof n=="string")&&(i+=`=${(0,Fh.escapeUri)(n)}`),t.push(i)}}return t.join("&")}yJ(Ww,"buildQueryString")});var Ki=y((gIe,dx)=>{var EJ=Object.create,Ca=Object.defineProperty,SJ=Object.getOwnPropertyDescriptor,bJ=Object.getOwnPropertyNames,CJ=Object.getPrototypeOf,wJ=Object.prototype.hasOwnProperty,ut=(e,t)=>Ca(e,"name",{value:t,configurable:!0}),xJ=(e,t)=>{for(var r in t)Ca(e,r,{get:t[r],enumerable:!0})},Qw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of bJ(t))!wJ.call(e,i)&&i!==r&&Ca(e,i,{get:()=>t[i],enumerable:!(n=SJ(t,i))||n.enumerable});return e},AJ=(e,t,r)=>(r=e!=null?EJ(CJ(e)):{},Qw(t||!e||!e.__esModule?Ca(r,"default",{value:e,enumerable:!0}):r,e)),TJ=e=>Qw(Ca({},"__esModule",{value:!0}),e),Zw={};xJ(Zw,{DEFAULT_REQUEST_TIMEOUT:()=>DJ,NodeHttp2Handler:()=>FJ,NodeHttpHandler:()=>NJ,streamCollector:()=>jJ});dx.exports=TJ(Zw);var ex=St(),tx=Jw(),Bh=require("http"),jh=require("https"),PJ=["ECONNRESET","EPIPE","ETIMEDOUT"],rx=ut(e=>{let t={};for(let r of Object.keys(e)){let n=e[r];t[r]=Array.isArray(n)?n.join(","):n}return t},"getTransformedHeaders"),IJ=ut((e,t,r=0)=>{if(!r)return;let n=setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r);e.on("socket",i=>{i.connecting?i.on("connect",()=>{clearTimeout(n)}):clearTimeout(n)})},"setConnectionTimeout"),OJ=ut((e,{keepAlive:t,keepAliveMsecs:r})=>{t===!0&&e.on("socket",n=>{n.setKeepAlive(t,r||0)})},"setSocketKeepAlive"),RJ=ut((e,t,r=0)=>{e.setTimeout(r,()=>{e.destroy(),t(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),nx=require("stream"),Yw=1e3;async function Uh(e,t,r=Yw){let n=t.headers??{},i=n.Expect||n.expect,o=-1,s=!1;i==="100-continue"&&await Promise.race([new Promise(a=>{o=Number(setTimeout(a,Math.max(Yw,r)))}),new Promise(a=>{e.on("continue",()=>{clearTimeout(o),a()}),e.on("error",()=>{s=!0,clearTimeout(o),a()})})]),s||ix(e,t.body)}ut(Uh,"writeRequestBody");function ix(e,t){if(t instanceof nx.Readable){t.pipe(e);return}if(t){if(Buffer.isBuffer(t)||typeof t=="string"){e.end(t);return}let r=t;if(typeof r=="object"&&r.buffer&&typeof r.byteOffset=="number"&&typeof r.byteLength=="number"){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(t));return}e.end()}ut(ix,"writeBody");var DJ=0,ox=class qh{constructor(t){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((r,n)=>{typeof t=="function"?t().then(i=>{r(this.resolveDefaultConfig(i))}).catch(n):r(this.resolveDefaultConfig(t))})}static create(t){return typeof(t==null?void 0:t.handle)=="function"?t:new qh(t)}static checkSocketUsage(t,r){var n,i;let{sockets:o,requests:s,maxSockets:a}=t;if(typeof a!="number"||a===1/0||Date.now()-15e3<r)return r;if(o&&s)for(let u in o){let d=((n=o[u])==null?void 0:n.length)??0,p=((i=s[u])==null?void 0:i.length)??0;if(d>=a&&p>=2*a)return console.warn("@smithy/node-http-handler:WARN",`socket usage at capacity=${d} and ${p} additional requests are enqueued.`,"See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html","or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config."),Date.now()}return r}resolveDefaultConfig(t){let{requestTimeout:r,connectionTimeout:n,socketTimeout:i,httpAgent:o,httpsAgent:s}=t||{},a=!0,c=50;return{connectionTimeout:n,requestTimeout:r??i,httpAgent:o instanceof Bh.Agent||typeof(o==null?void 0:o.destroy)=="function"?o:new Bh.Agent({keepAlive:a,maxSockets:c,...o}),httpsAgent:s instanceof jh.Agent||typeof(s==null?void 0:s.destroy)=="function"?s:new jh.Agent({keepAlive:a,maxSockets:c,...s})}}destroy(){var t,r,n,i;(r=(t=this.config)==null?void 0:t.httpAgent)==null||r.destroy(),(i=(n=this.config)==null?void 0:n.httpsAgent)==null||i.destroy()}async handle(t,{abortSignal:r}={}){this.config||(this.config=await this.configProvider);let n;return new Promise((i,o)=>{let s,a=ut(async S=>{await s,clearTimeout(n),i(S)},"resolve"),c=ut(async S=>{await s,o(S)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(r!=null&&r.aborted){let S=new Error("Request aborted");S.name="AbortError",c(S);return}let u=t.protocol==="https:",d=u?this.config.httpsAgent:this.config.httpAgent;n=setTimeout(()=>{this.socketWarningTimestamp=qh.checkSocketUsage(d,this.socketWarningTimestamp)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2e3)+(this.config.connectionTimeout??1e3));let p=(0,tx.buildQueryString)(t.query||{}),m;if(t.username!=null||t.password!=null){let S=t.username??"",M=t.password??"";m=`${S}:${M}`}let h=t.path;p&&(h+=`?${p}`),t.fragment&&(h+=`#${t.fragment}`);let v={headers:t.headers,host:t.hostname,method:t.method,path:h,port:t.port,agent:d,auth:m},g=(u?jh.request:Bh.request)(v,S=>{let M=new ex.HttpResponse({statusCode:S.statusCode||-1,reason:S.statusMessage,headers:rx(S.headers),body:S});a({response:M})});g.on("error",S=>{PJ.includes(S.code)?c(Object.assign(S,{name:"TimeoutError"})):c(S)}),IJ(g,c,this.config.connectionTimeout),RJ(g,c,this.config.requestTimeout),r&&(r.onabort=()=>{g.abort();let S=new Error("Request aborted");S.name="AbortError",c(S)});let x=v.agent;typeof x=="object"&&"keepAlive"in x&&OJ(g,{keepAlive:x.keepAlive,keepAliveMsecs:x.keepAliveMsecs}),s=Uh(g,t,this.config.requestTimeout).catch(o)})}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[t]:r}))}httpHandlerConfigs(){return this.config??{}}};ut(ox,"NodeHttpHandler");var NJ=ox,Xw=require("http2"),MJ=AJ(require("http2")),sx=class{constructor(t){this.sessions=[],this.sessions=t??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(t){this.sessions.push(t)}contains(t){return this.sessions.includes(t)}remove(t){this.sessions=this.sessions.filter(r=>r!==t)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(t){for(let r of this.sessions)r===t&&(r.destroyed||r.destroy())}};ut(sx,"NodeHttp2ConnectionPool");var LJ=sx,ax=class{constructor(t){if(this.sessionCache=new Map,this.config=t,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(t,r){let n=this.getUrlString(t),i=this.sessionCache.get(n);if(i){let c=i.poll();if(c&&!this.config.disableConcurrency)return c}let o=MJ.default.connect(n);this.config.maxConcurrency&&o.settings({maxConcurrentStreams:this.config.maxConcurrency},c=>{if(c)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+t.destination.toString())}),o.unref();let s=ut(()=>{o.destroy(),this.deleteSession(n,o)},"destroySessionCb");o.on("goaway",s),o.on("error",s),o.on("frameError",s),o.on("close",()=>this.deleteSession(n,o)),r.requestTimeout&&o.setTimeout(r.requestTimeout,s);let a=this.sessionCache.get(n)||new LJ;return a.offerLast(o),this.sessionCache.set(n,a),o}deleteSession(t,r){let n=this.sessionCache.get(t);n&&n.contains(r)&&(n.remove(r),this.sessionCache.set(t,n))}release(t,r){var n;let i=this.getUrlString(t);(n=this.sessionCache.get(i))==null||n.offerLast(r)}destroy(){for(let[t,r]of this.sessionCache){for(let n of r)n.destroyed||n.destroy(),r.remove(n);this.sessionCache.delete(t)}}setMaxConcurrentStreams(t){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=t}setDisableConcurrentStreams(t){this.config.disableConcurrency=t}getUrlString(t){return t.destination.toString()}};ut(ax,"NodeHttp2ConnectionManager");var kJ=ax,cx=class ux{constructor(t){this.metadata={handlerProtocol:"h2"},this.connectionManager=new kJ({}),this.configProvider=new Promise((r,n)=>{typeof t=="function"?t().then(i=>{r(i||{})}).catch(n):r(t||{})})}static create(t){return typeof(t==null?void 0:t.handle)=="function"?t:new ux(t)}destroy(){this.connectionManager.destroy()}async handle(t,{abortSignal:r}={}){this.config||(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams&&this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams));let{requestTimeout:n,disableConcurrentStreams:i}=this.config;return new Promise((o,s)=>{var a;let c=!1,u,d=ut(async O=>{await u,o(O)},"resolve"),p=ut(async O=>{await u,s(O)},"reject");if(r!=null&&r.aborted){c=!0;let O=new Error("Request aborted");O.name="AbortError",p(O);return}let{hostname:m,method:h,port:v,protocol:_,query:g}=t,x="";if(t.username!=null||t.password!=null){let O=t.username??"",q=t.password??"";x=`${O}:${q}@`}let S=`${_}//${x}${m}${v?`:${v}`:""}`,M={destination:new URL(S)},k=this.connectionManager.lease(M,{requestTimeout:(a=this.config)==null?void 0:a.sessionTimeout,disableConcurrentStreams:i||!1}),me=ut(O=>{i&&this.destroySession(k),c=!0,p(O)},"rejectWithDestroy"),Te=(0,tx.buildQueryString)(g||{}),Je=t.path;Te&&(Je+=`?${Te}`),t.fragment&&(Je+=`#${t.fragment}`);let Ne=k.request({...t.headers,[Xw.constants.HTTP2_HEADER_PATH]:Je,[Xw.constants.HTTP2_HEADER_METHOD]:h});k.ref(),Ne.on("response",O=>{let q=new ex.HttpResponse({statusCode:O[":status"]||-1,headers:rx(O),body:Ne});c=!0,d({response:q}),i&&(k.close(),this.connectionManager.deleteSession(S,k))}),n&&Ne.setTimeout(n,()=>{Ne.close();let O=new Error(`Stream timed out because of no activity for ${n} ms`);O.name="TimeoutError",me(O)}),r&&(r.onabort=()=>{Ne.close();let O=new Error("Request aborted");O.name="AbortError",me(O)}),Ne.on("frameError",(O,q,oe)=>{me(new Error(`Frame type id ${O} in stream id ${oe} has failed with code ${q}.`))}),Ne.on("error",me),Ne.on("aborted",()=>{me(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Ne.rstCode}.`))}),Ne.on("close",()=>{k.unref(),i&&k.destroy(),c||me(new Error("Unexpected error: http2 request did not get a response"))}),u=Uh(Ne,t,n)})}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[t]:r}))}httpHandlerConfigs(){return this.config??{}}destroySession(t){t.destroyed||t.destroy()}};ut(cx,"NodeHttp2Handler");var FJ=cx,lx=class extends nx.Writable{constructor(){super(...arguments),this.bufferedBytes=[]}_write(t,r,n){this.bufferedBytes.push(t),n()}};ut(lx,"Collector");var BJ=lx,jJ=ut(e=>new Promise((t,r)=>{let n=new BJ;e.pipe(n),e.on("error",i=>{n.end(),r(i)}),n.on("error",r),n.on("finish",function(){let i=new Uint8Array(Buffer.concat(this.bufferedBytes));t(i)})}),"streamCollector")});var fx=y(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.sdkStreamMixin=void 0;var qJ=Ki(),UJ=Do(),Gh=require("stream"),GJ=require("util"),px="The stream has already been transformed.",$J=e=>{var t,r;if(!(e instanceof Gh.Readable)){let o=((r=(t=e==null?void 0:e.__proto__)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.name)||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${o}`)}let n=!1,i=async()=>{if(n)throw new Error(px);return n=!0,await(0,qJ.streamCollector)(e)};return Object.assign(e,{transformToByteArray:i,transformToString:async o=>{let s=await i();return o===void 0||Buffer.isEncoding(o)?(0,UJ.fromArrayBuffer)(s.buffer,s.byteOffset,s.byteLength).toString(o):new GJ.TextDecoder(o).decode(s)},transformToWebStream:()=>{if(n)throw new Error(px);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Gh.Readable.toWeb!="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return n=!0,Gh.Readable.toWeb(e)}})};el.sdkStreamMixin=$J});var zh=y((SIe,nl)=>{var tl=Object.defineProperty,HJ=Object.getOwnPropertyDescriptor,VJ=Object.getOwnPropertyNames,zJ=Object.prototype.hasOwnProperty,Vh=(e,t)=>tl(e,"name",{value:t,configurable:!0}),WJ=(e,t)=>{for(var r in t)tl(e,r,{get:t[r],enumerable:!0})},$h=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of VJ(t))!zJ.call(e,i)&&i!==r&&tl(e,i,{get:()=>t[i],enumerable:!(n=HJ(t,i))||n.enumerable});return e},mx=(e,t,r)=>($h(e,t,"default"),r&&$h(r,t,"default")),KJ=e=>$h(tl({},"__esModule",{value:!0}),e),rl={};WJ(rl,{Uint8ArrayBlobAdapter:()=>Hh});nl.exports=KJ(rl);var hx=No(),yx=ur();function _x(e,t="utf-8"){return t==="base64"?(0,hx.toBase64)(e):(0,yx.toUtf8)(e)}Vh(_x,"transformToString");function vx(e,t){return t==="base64"?Hh.mutate((0,hx.fromBase64)(e)):Hh.mutate((0,yx.fromUtf8)(e))}Vh(vx,"transformFromString");var gx=class Ex extends Uint8Array{static fromString(t,r="utf-8"){switch(typeof t){case"string":return vx(t,r);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,Ex.prototype),t}transformToString(t="utf-8"){return _x(this,t)}};Vh(gx,"Uint8ArrayBlobAdapter");var Hh=gx;mx(rl,Gw(),nl.exports);mx(rl,fx(),nl.exports)});var Be=y((AIe,Hx)=>{var cl=Object.defineProperty,JJ=Object.getOwnPropertyDescriptor,YJ=Object.getOwnPropertyNames,XJ=Object.prototype.hasOwnProperty,L=(e,t)=>cl(e,"name",{value:t,configurable:!0}),QJ=(e,t)=>{for(var r in t)cl(e,r,{get:t[r],enumerable:!0})},ZJ=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of YJ(t))!XJ.call(e,i)&&i!==r&&cl(e,i,{get:()=>t[i],enumerable:!(n=JJ(t,i))||n.enumerable});return e},eY=e=>ZJ(cl({},"__esModule",{value:!0}),e),bx={};QJ(bx,{Client:()=>rY,Command:()=>Tx,LazyJsonString:()=>QY,NoOpLogger:()=>tY,SENSITIVE_STRING:()=>oY,ServiceException:()=>qY,StringWrapper:()=>Pa,_json:()=>Zh,collectBody:()=>nY,convertMap:()=>ZY,createAggregatedClient:()=>sY,dateToUtcString:()=>Mx,decorateServiceException:()=>Fx,emitWarningIfUnsupportedVersion:()=>HY,expectBoolean:()=>cY,expectByte:()=>Qh,expectFloat32:()=>ol,expectInt:()=>lY,expectInt32:()=>Yh,expectLong:()=>Aa,expectNonNull:()=>pY,expectNumber:()=>xa,expectObject:()=>Ix,expectShort:()=>Xh,expectString:()=>fY,expectUnion:()=>mY,extendedEncodeURIComponent:()=>al,getArrayIfSingleItem:()=>XY,getDefaultClientConfiguration:()=>JY,getDefaultExtensionConfiguration:()=>jx,getValueFromTextNode:()=>qx,handleFloat:()=>_Y,limitedParseDouble:()=>ry,limitedParseFloat:()=>vY,limitedParseFloat32:()=>gY,loadConfigsForDefaultMode:()=>$Y,logger:()=>Ta,map:()=>iy,parseBoolean:()=>aY,parseEpochTimestamp:()=>RY,parseRfc3339DateTime:()=>wY,parseRfc3339DateTimeWithOffset:()=>AY,parseRfc7231DateTime:()=>OY,resolveDefaultRuntimeConfig:()=>YY,resolvedPath:()=>i7,serializeFloat:()=>o7,splitEvery:()=>$x,strictParseByte:()=>Nx,strictParseDouble:()=>ty,strictParseFloat:()=>hY,strictParseFloat32:()=>Ox,strictParseInt:()=>EY,strictParseInt32:()=>SY,strictParseLong:()=>Dx,strictParseShort:()=>Mo,take:()=>e7,throwDefaultError:()=>Bx,withBaseException:()=>UY});Hx.exports=eY(bx);var Cx=class{trace(){}debug(){}info(){}warn(){}error(){}};L(Cx,"NoOpLogger");var tY=Cx,wx=Pw(),xx=class{constructor(t){this.middlewareStack=(0,wx.constructStack)(),this.config=t}send(t,r,n){let i=typeof r!="function"?r:void 0,o=typeof r=="function"?r:n,s=t.resolveMiddleware(this.middlewareStack,this.config,i);if(o)s(t).then(a=>o(null,a.output),a=>o(a)).catch(()=>{});else return s(t).then(a=>a.output)}destroy(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()}};L(xx,"Client");var rY=xx,Wh=zh(),nY=L(async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Wh.Uint8ArrayBlobAdapter.mutate(e);if(!e)return Wh.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let r=t.streamCollector(e);return Wh.Uint8ArrayBlobAdapter.mutate(await r)},"collectBody"),Jh=sr(),Ax=class{constructor(){this.middlewareStack=(0,wx.constructStack)()}static classBuilder(){return new iY}resolveMiddlewareWithContext(t,r,n,{middlewareFn:i,clientName:o,commandName:s,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:d,CommandCtor:p}){for(let g of i.bind(this)(p,t,r,n))this.middlewareStack.use(g);let m=t.concat(this.middlewareStack),{logger:h}=r,v={logger:h,clientName:o,commandName:s,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[Jh.SMITHY_CONTEXT_KEY]:{...u},...d},{requestHandler:_}=r;return m.resolve(g=>_.handle(g.request,n||{}),v)}};L(Ax,"Command");var Tx=Ax,Px=class{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=t=>t,this._outputFilterSensitiveLog=t=>t,this._serializer=null,this._deserializer=null}init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,r,n={}){return this._smithyContext={service:t,operation:r,...n},this}c(t={}){return this._additionalContext=t,this}n(t,r){return this._clientName=t,this._commandName=r,this}f(t=n=>n,r=n=>n){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=r,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}build(){var t;let r=this,n;return n=(t=class extends Tx{constructor(...[i]){super(),this.serialize=r._serializer,this.deserialize=r._deserializer,this.input=i??{},r._init(this)}static getEndpointParameterInstructions(){return r._ep}resolveMiddleware(i,o,s){return this.resolveMiddlewareWithContext(i,o,s,{CommandCtor:n,middlewareFn:r._middlewareFn,clientName:r._clientName,commandName:r._commandName,inputFilterSensitiveLog:r._inputFilterSensitiveLog,outputFilterSensitiveLog:r._outputFilterSensitiveLog,smithyContext:r._smithyContext,additionalContext:r._additionalContext})}},L(t,"CommandRef"),t)}};L(Px,"ClassBuilder");var iY=Px,oY="***SensitiveInformation***",sY=L((e,t)=>{for(let r of Object.keys(e)){let n=e[r],i=L(async function(s,a,c){let u=new n(s);if(typeof a=="function")this.send(u,a);else if(typeof c=="function"){if(typeof a!="object")throw new Error(`Expected http options but got ${typeof a}`);this.send(u,a||{},c)}else return this.send(u,a)},"methodImpl"),o=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");t.prototype[o]=i}},"createAggregatedClient"),aY=L(e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},"parseBoolean"),cY=L(e=>{if(e!=null){if(typeof e=="number"){if((e===0||e===1)&&Ta.warn(sl(`Expected boolean, got ${typeof e}: ${e}`)),e===0)return!1;if(e===1)return!0}if(typeof e=="string"){let t=e.toLowerCase();if((t==="false"||t==="true")&&Ta.warn(sl(`Expected boolean, got ${typeof e}: ${e}`)),t==="false")return!1;if(t==="true")return!0}if(typeof e=="boolean")return e;throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`)}},"expectBoolean"),xa=L(e=>{if(e!=null){if(typeof e=="string"){let t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Ta.warn(sl(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},"expectNumber"),uY=Math.ceil(2**127*(2-2**-23)),ol=L(e=>{let t=xa(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>uY)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},"expectFloat32"),Aa=L(e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},"expectLong"),lY=Aa,Yh=L(e=>ey(e,32),"expectInt32"),Xh=L(e=>ey(e,16),"expectShort"),Qh=L(e=>ey(e,8),"expectByte"),ey=L((e,t)=>{let r=Aa(e);if(r!==void 0&&dY(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},"expectSizedInt"),dY=L((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]}},"castInt"),pY=L((e,t)=>{if(e==null)throw t?new TypeError(`Expected a non-null value for ${t}`):new TypeError("Expected a non-null value");return e},"expectNonNull"),Ix=L(e=>{if(e==null)return;if(typeof e=="object"&&!Array.isArray(e))return e;let t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},"expectObject"),fY=L(e=>{if(e!=null){if(typeof e=="string")return e;if(["boolean","number","bigint"].includes(typeof e))return Ta.warn(sl(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},"expectString"),mY=L(e=>{if(e==null)return;let t=Ix(e),r=Object.entries(t).filter(([,n])=>n!=null).map(([n])=>n);if(r.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(r.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${r} were not null.`);return t},"expectUnion"),ty=L(e=>xa(typeof e=="string"?ko(e):e),"strictParseDouble"),hY=ty,Ox=L(e=>ol(typeof e=="string"?ko(e):e),"strictParseFloat32"),yY=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,ko=L(e=>{let t=e.match(yY);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},"parseNumber"),ry=L(e=>typeof e=="string"?Rx(e):xa(e),"limitedParseDouble"),_Y=ry,vY=ry,gY=L(e=>typeof e=="string"?Rx(e):ol(e),"limitedParseFloat32"),Rx=L(e=>{switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${e}`)}},"parseFloatString"),Dx=L(e=>Aa(typeof e=="string"?ko(e):e),"strictParseLong"),EY=Dx,SY=L(e=>Yh(typeof e=="string"?ko(e):e),"strictParseInt32"),Mo=L(e=>Xh(typeof e=="string"?ko(e):e),"strictParseShort"),Nx=L(e=>Qh(typeof e=="string"?ko(e):e),"strictParseByte"),sl=L(e=>String(new TypeError(e).stack||e).split(`
4
+ `+new Array(o).join(" ")+"^"}}return null}function FY(e){var t=MR(e),r=NY();r&&r._handle&&r._handle.setBlocking&&r._handle.setBlocking(!0),t&&(console.error(),console.error(t)),console.error(e.stack),$Y(1)}function BY(){var e=process.emit;process.emit=function(t){if(t==="uncaughtException"){var r=arguments[1]&&arguments[1].stack,n=this.listeners(t).length>0;if(r&&!n)return FY(arguments[1])}return e.apply(this,arguments)}}var UY=Ii.slice(0),jY=Ci.slice(0);Us.wrapCallSite=$R;Us.getErrorSource=MR;Us.mapSourcePosition=ZS;Us.retrieveSourceMap=JS;Us.install=function(e){if(e=e||{},e.environment&&(Bu=e.environment,["node","browser","auto"].indexOf(Bu)===-1))throw new Error("environment "+Bu+" was unknown. Available options are {auto, browser, node}");if(e.retrieveFile&&(e.overrideRetrieveFile&&(Ii.length=0),Ii.unshift(e.retrieveFile)),e.retrieveSourceMap&&(e.overrideRetrieveSourceMap&&(Ci.length=0),Ci.unshift(e.retrieveSourceMap)),e.hookRequire&&!QS()){var t=DR(YS,"module"),r=t.prototype._compile;r.__sourceMapSupport||(t.prototype._compile=function(i,s){return Bs[s]=i,Uu[s]=void 0,r.call(this,i,s)},t.prototype._compile.__sourceMapSupport=!0)}if(zS||(zS="emptyCacheBetweenOperations"in e?e.emptyCacheBetweenOperations:!1),RR||(RR=!0,Error.prepareStackTrace=kY),!PR){var n="handleUncaughtExceptions"in e?e.handleUncaughtExceptions:!0;try{var o=DR(YS,"worker_threads");o.isMainThread===!1&&(n=!1)}catch{}n&&PY()&&(PR=!0,BY())}};Us.resetRetrieveHandlers=function(){Ii.length=0,Ci.length=0,Ii=UY.slice(0),Ci=jY.slice(0),JS=zf(Ci),XS=zf(Ii)}});var Di=b(lt=>{"use strict";lt.HttpAuthLocation=void 0;(function(e){e.HEADER="header",e.QUERY="query"})(lt.HttpAuthLocation||(lt.HttpAuthLocation={}));lt.HttpApiKeyAuthLocation=void 0;(function(e){e.HEADER="header",e.QUERY="query"})(lt.HttpApiKeyAuthLocation||(lt.HttpApiKeyAuthLocation={}));lt.EndpointURLScheme=void 0;(function(e){e.HTTP="http",e.HTTPS="https"})(lt.EndpointURLScheme||(lt.EndpointURLScheme={}));lt.AlgorithmId=void 0;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(lt.AlgorithmId||(lt.AlgorithmId={}));var qY=e=>{let t=[];return e.sha256!==void 0&&t.push({algorithmId:()=>lt.AlgorithmId.SHA256,checksumConstructor:()=>e.sha256}),e.md5!=null&&t.push({algorithmId:()=>lt.AlgorithmId.MD5,checksumConstructor:()=>e.md5}),{addChecksumAlgorithm(r){t.push(r)},checksumAlgorithms(){return t}}},GY=e=>{let t={};return e.checksumAlgorithms().forEach(r=>{t[r.algorithmId()]=r.checksumConstructor()}),t},HY=e=>qY(e),VY=e=>GY(e);lt.FieldPosition=void 0;(function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"})(lt.FieldPosition||(lt.FieldPosition={}));var WY="__smithy_context";lt.IniSectionType=void 0;(function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"})(lt.IniSectionType||(lt.IniSectionType={}));lt.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"})(lt.RequestHandlerProtocol||(lt.RequestHandlerProtocol={}));lt.SMITHY_CONTEXT_KEY=WY;lt.getDefaultClientConfiguration=HY;lt.resolveDefaultRuntimeConfig=VY});var ir=b(e0=>{"use strict";var FR=Di(),zY=e=>e[FR.SMITHY_CONTEXT_KEY]||(e[FR.SMITHY_CONTEXT_KEY]={}),KY=e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t};e0.getSmithyContext=zY;e0.normalizeProvider=KY});function Ba(e){return BR.includes(e)}var ju,BR,Kf=D(()=>{ju="preferred",BR=["disabled","preferred","required"]});var UR,YY,jR=D(()=>{UR=C(ir());Kf();YY=e=>{let{accountIdEndpointMode:t}=e,r=(0,UR.normalizeProvider)(t??ju);return Object.assign(e,{accountIdEndpointMode:async()=>{let n=await r();if(!Ba(n))throw new Error(`Invalid value for accountIdEndpointMode: ${n}. Valid values are: "required", "preferred", "disabled".`);return n}})}});var qR,GR,HR,VR,QY,WR=D(()=>{Kf();qR="Invalid AccountIdEndpointMode value",GR=e=>{throw new Error(e)},HR="AWS_ACCOUNT_ID_ENDPOINT_MODE",VR="account_id_endpoint_mode",QY={environmentVariableSelector:e=>{let t=e[HR];return t&&!Ba(t)&&GR(qR),t},configFileSelector:e=>{let t=e[VR];return t&&!Ba(t)&&GR(qR),t},default:ju}});var t0={};Nt(t0,{ACCOUNT_ID_ENDPOINT_MODE_VALUES:()=>BR,CONFIG_ACCOUNT_ID_ENDPOINT_MODE:()=>VR,DEFAULT_ACCOUNT_ID_ENDPOINT_MODE:()=>ju,ENV_ACCOUNT_ID_ENDPOINT_MODE:()=>HR,NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS:()=>QY,resolveAccountIdEndpointModeConfig:()=>YY,validateAccountIdEndpointMode:()=>Ba});var r0=D(()=>{jR();Kf();WR()});var nt=b(Ri=>{"use strict";var XY=Di(),JY=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){var n;(n=e.httpHandler)==null||n.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),ZY=e=>({httpHandler:e.httpHandler()}),n0=class{name;kind;values;constructor({name:t,kind:r=XY.FieldPosition.HEADER,values:n=[]}){this.name=t,this.kind=r,this.values=n}add(t){this.values.push(t)}set(t){this.values=t}remove(t){this.values=this.values.filter(r=>r!==t)}toString(){return this.values.map(t=>t.includes(",")||t.includes(" ")?`"${t}"`:t).join(", ")}get(){return this.values}},o0=class{entries={};encoding;constructor({fields:t=[],encoding:r="utf-8"}){t.forEach(this.setField.bind(this)),this.encoding=r}setField(t){this.entries[t.name.toLowerCase()]=t}getField(t){return this.entries[t.toLowerCase()]}removeField(t){delete this.entries[t.toLowerCase()]}getByType(t){return Object.values(this.entries).filter(r=>r.kind===t)}},i0=class e{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){let r=new e({...t,headers:{...t.headers}});return r.query&&(r.query=e7(r.query)),r}static isInstance(t){if(!t)return!1;let r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){return e.clone(this)}};function e7(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}var s0=class{statusCode;reason;headers;body;constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;let r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}};function t7(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}Ri.Field=n0;Ri.Fields=o0;Ri.HttpRequest=i0;Ri.HttpResponse=s0;Ri.getHttpHandlerExtensionConfiguration=JY;Ri.isValidHostname=t7;Ri.resolveHttpHandlerRuntimeConfig=ZY});var KR=b((xRe,zR)=>{function ko(e){Object.defineProperty(this,"_next",{writable:!1,enumerable:!1,value:e}),this.done=!1}ko.prototype.next=function(){if(this.done)return{done:!0};var e=this._next();return e.done&&(this.done=!0),e};typeof Symbol<"u"&&(ko.prototype[Symbol.iterator]=function(){return this});ko.of=function(){var e=arguments,t=e.length,r=0;return new ko(function(){return r>=t?{done:!0}:{done:!1,value:e[r++]}})};ko.empty=function(){var e=new ko(null);return e.done=!0,e};ko.is=function(e){return e instanceof ko?!0:typeof e=="object"&&e!==null&&typeof e.next=="function"};zR.exports=ko});var a0=b((vRe,JR)=>{var YR=typeof ArrayBuffer<"u",QR=typeof Symbol<"u";function XR(e,t){var r,n,o,i,s;if(!e)throw new Error("obliterator/forEach: invalid iterable.");if(typeof t!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(e)||YR&&ArrayBuffer.isView(e)||typeof e=="string"||e.toString()==="[object Arguments]"){for(o=0,i=e.length;o<i;o++)t(e[o],o);return}if(typeof e.forEach=="function"){e.forEach(t);return}if(QR&&Symbol.iterator in e&&typeof e.next!="function"&&(e=e[Symbol.iterator]()),typeof e.next=="function"){for(r=e,o=0;s=r.next(),s.done!==!0;)t(s.value,o),o++;return}for(n in e)e.hasOwnProperty(n)&&t(e[n],n)}XR.forEachWithNullKeys=function(e,t){var r,n,o,i,s;if(!e)throw new Error("obliterator/forEachWithNullKeys: invalid iterable.");if(typeof t!="function")throw new Error("obliterator/forEachWithNullKeys: expecting a callback.");if(Array.isArray(e)||YR&&ArrayBuffer.isView(e)||typeof e=="string"||e.toString()==="[object Arguments]"){for(o=0,i=e.length;o<i;o++)t(e[o],null);return}if(e instanceof Set){e.forEach(function(a){t(a,null)});return}if(typeof e.forEach=="function"){e.forEach(t);return}if(QR&&Symbol.iterator in e&&typeof e.next!="function"&&(e=e[Symbol.iterator]()),typeof e.next=="function"){for(r=e,o=0;s=r.next(),s.done!==!0;)t(s.value,null),o++;return}for(n in e)e.hasOwnProperty(n)&&t(e[n],n)};JR.exports=XR});var c0=b(to=>{var r7=Math.pow(2,8)-1,n7=Math.pow(2,16)-1,o7=Math.pow(2,32)-1,i7=Math.pow(2,7)-1,s7=Math.pow(2,15)-1,a7=Math.pow(2,31)-1;to.getPointerArray=function(e){var t=e-1;return t<=r7?Uint8Array:t<=n7?Uint16Array:t<=o7?Uint32Array:Float64Array};to.getSignedPointerArray=function(e){var t=e-1;return t<=i7?Int8Array:t<=s7?Int16Array:t<=a7?Int32Array:Float64Array};to.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var c7={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};to.getMinimalRepresentation=function(e,t){var r=null,n=0,o,i,s,a,c;for(a=0,c=e.length;a<c;a++)s=t?t(e[a]):e[a],i=to.getNumberType(s),o=c7[i.name],o>n&&(n=o,r=i);return r};to.isTypedArray=function(e){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(e)};to.concat=function(){var e=0,t,r,n;for(t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var o=new arguments[0].constructor(e);for(t=0,r=0;t<n;t++)o.set(arguments[t],r),r+=arguments[t].length;return o};to.indices=function(e){for(var t=to.getPointerArray(e),r=new t(e),n=0;n<e;n++)r[n]=n;return r}});var tP=b(qu=>{var ZR=a0(),eP=c0();function u7(e){return Array.isArray(e)||eP.isTypedArray(e)}function u0(e){if(typeof e.length=="number")return e.length;if(typeof e.size=="number")return e.size}function l7(e){var t=u0(e),r=typeof t=="number"?new Array(t):[],n=0;return ZR(e,function(o){r[n++]=o}),r}function d7(e){var t=u0(e),r=typeof t=="number"?eP.getPointerArray(t):Array,n=typeof t=="number"?new Array(t):[],o=typeof t=="number"?new r(t):[],i=0;return ZR(e,function(s){n[i]=s,o[i]=i++}),[n,o]}qu.isArrayLike=u7;qu.guessLength=u0;qu.toArray=l7;qu.toArrayWithIndices=d7});var nP=b((ARe,rP)=>{var l0=KR(),f7=a0(),p7=c0(),m7=tP();function Mt(e,t,r){if(arguments.length<2&&(r=e,e=null,t=null),this.capacity=r,typeof this.capacity!="number"||this.capacity<=0)throw new Error("mnemonist/lru-cache: capacity should be positive number.");var n=p7.getPointerArray(r);this.forward=new n(r),this.backward=new n(r),this.K=typeof e=="function"?new e(r):new Array(r),this.V=typeof t=="function"?new t(r):new Array(r),this.size=0,this.head=0,this.tail=0,this.items={}}Mt.prototype.clear=function(){this.size=0,this.head=0,this.tail=0,this.items={}};Mt.prototype.splayOnTop=function(e){var t=this.head;if(this.head===e)return this;var r=this.backward[e],n=this.forward[e];return this.tail===e?this.tail=r:this.backward[n]=r,this.forward[r]=n,this.backward[t]=e,this.head=e,this.forward[e]=t,this};Mt.prototype.set=function(e,t){var r=this.items[e];if(typeof r<"u"){this.splayOnTop(r),this.V[r]=t;return}this.size<this.capacity?r=this.size++:(r=this.tail,this.tail=this.backward[r],delete this.items[this.K[r]]),this.items[e]=r,this.K[r]=e,this.V[r]=t,this.forward[r]=this.head,this.backward[this.head]=r,this.head=r};Mt.prototype.setpop=function(e,t){var r=null,n=null,o=this.items[e];return typeof o<"u"?(this.splayOnTop(o),r=this.V[o],this.V[o]=t,{evicted:!1,key:e,value:r}):(this.size<this.capacity?o=this.size++:(o=this.tail,this.tail=this.backward[o],r=this.V[o],n=this.K[o],delete this.items[this.K[o]]),this.items[e]=o,this.K[o]=e,this.V[o]=t,this.forward[o]=this.head,this.backward[this.head]=o,this.head=o,n?{evicted:!0,key:n,value:r}:null)};Mt.prototype.has=function(e){return e in this.items};Mt.prototype.get=function(e){var t=this.items[e];if(!(typeof t>"u"))return this.splayOnTop(t),this.V[t]};Mt.prototype.peek=function(e){var t=this.items[e];if(!(typeof t>"u"))return this.V[t]};Mt.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var r=0,n=this.size,o=this.head,i=this.K,s=this.V,a=this.forward;r<n;)e.call(t,s[o],i[o],this),o=a[o],r++};Mt.prototype.keys=function(){var e=0,t=this.size,r=this.head,n=this.K,o=this.forward;return new l0(function(){if(e>=t)return{done:!0};var i=n[r];return e++,e<t&&(r=o[r]),{done:!1,value:i}})};Mt.prototype.values=function(){var e=0,t=this.size,r=this.head,n=this.V,o=this.forward;return new l0(function(){if(e>=t)return{done:!0};var i=n[r];return e++,e<t&&(r=o[r]),{done:!1,value:i}})};Mt.prototype.entries=function(){var e=0,t=this.size,r=this.head,n=this.K,o=this.V,i=this.forward;return new l0(function(){if(e>=t)return{done:!0};var s=n[r],a=o[r];return e++,e<t&&(r=i[r]),{done:!1,value:[s,a]}})};typeof Symbol<"u"&&(Mt.prototype[Symbol.iterator]=Mt.prototype.entries);Mt.prototype.inspect=function(){for(var e=new Map,t=this.entries(),r;r=t.next(),!r.done;)e.set(r.value[0],r.value[1]);return Object.defineProperty(e,"constructor",{value:Mt,enumerable:!1}),e};typeof Symbol<"u"&&(Mt.prototype[Symbol.for("nodejs.util.inspect.custom")]=Mt.prototype.inspect);Mt.from=function(e,t,r,n){if(arguments.length<2){if(n=m7.guessLength(e),typeof n!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(n=t,t=null,r=null);var o=new Mt(t,r,n);return f7(e,function(i,s){o.set(s,i)}),o};rP.exports=Mt});var iP=b(oP=>{"use strict";var h7=nP(),d0=class{cache;constructor(t){this.cache=new h7(t)}getEndpoint(t){let r=this.get(t);if(!r||r.length===0)return;let n=r.map(o=>o.Address);return n[Math.floor(Math.random()*n.length)]}get(t){if(!this.has(t))return;let r=this.cache.get(t);if(!r)return;let n=Date.now(),o=r.filter(i=>n<i.Expires);if(o.length===0){this.delete(t);return}return o}set(t,r){let n=Date.now();this.cache.set(t,r.map(({Address:o,CachePeriodInMinutes:i})=>({Address:o,Expires:n+i*60*1e3})))}delete(t){this.cache.set(t,[])}has(t){if(!this.cache.has(t))return!1;let r=this.cache.peek(t);return r?r.length>0:!1}clear(){this.cache.clear()}};oP.EndpointCache=d0});var m0=b(js=>{"use strict";var y7=nt(),g7=iP(),sP=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"],f0="endpoint_discovery_enabled",aP=e=>["false","0"].indexOf(e)>=0,_7={environmentVariableSelector:e=>{for(let t=0;t<sP.length;t++){let r=sP[t];if(r in e){let n=e[r];if(n==="")throw Error(`Environment variable ${r} can't be empty of undefined, got "${n}"`);return!aP(n)}}},configFileSelector:e=>{if(f0 in e){let t=e[f0];if(t===void 0)throw Error(`Shared config entry ${f0} can't be undefined, got "${t}"`);return!aP(t)}},default:void 0},E7=async(e,t,r)=>{let{accessKeyId:n}=await t.credentials(),{identifiers:o}=r;return JSON.stringify({...n&&{accessKeyId:n},...o&&{commandName:e,identifiers:Object.entries(o).sort().reduce((i,[s,a])=>({...i,[s]:a}),{})}})},Fo={},cP=async(e,t)=>new Promise((r,n)=>{let{endpointCache:o}=e,{cacheKey:i,commandName:s,identifiers:a}=t,c=o.get(i);if(c&&c.length===1&&c[0].Address==="")t.isDiscoveredEndpointRequired?(Fo[i]||(Fo[i]=[]),Fo[i].push({resolve:r,reject:n})):r();else if(c&&c.length>0)r();else{let l=[{Address:"",CachePeriodInMinutes:1}];o.set(i,l);let d=new t.endpointDiscoveryCommandCtor({Operation:s.slice(0,-7),Identifiers:a});d.resolveMiddleware(t.clientStack,e,t.options)(d).then(m=>{o.set(i,m.output.Endpoints),Fo[i]&&(Fo[i].forEach(({resolve:h})=>{h()}),delete Fo[i]),r()}).catch(m=>{o.delete(i);let h=Object.assign(new Error("The operation to discover endpoint failed. Please retry, or provide a custom endpoint and disable endpoint discovery to proceed."),{reason:m});Fo[i]&&(Fo[i].forEach(({reject:_})=>{_(h)}),delete Fo[i]),t.isDiscoveredEndpointRequired?n(h):(o.set(i,l),r())})}}),p0=(e,t)=>(r,n)=>async o=>{if(e.isCustomEndpoint){if(e.isClientEndpointDiscoveryEnabled)throw new Error("Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.");return r(o)}let{endpointDiscoveryCommandCtor:i}=e,{isDiscoveredEndpointRequired:s,identifiers:a}=t,c=n.clientName,l=n.commandName,d=await e.endpointDiscoveryEnabled(),f=await E7(l,e,{identifiers:a});if(s){if(d===!1)throw new Error(`Endpoint Discovery is disabled but ${l} on ${c} requires it. Please check your configurations.`);await cP(e,{...t,commandName:l,cacheKey:f,endpointDiscoveryCommandCtor:i})}else d&&cP(e,{...t,commandName:l,cacheKey:f,endpointDiscoveryCommandCtor:i});let{request:m}=o;if(f&&y7.HttpRequest.isInstance(m)){let h=e.endpointCache.getEndpoint(f);h&&(m.hostname=h)}return r(o)},Yf={name:"endpointDiscoveryMiddleware",step:"build",tags:["ENDPOINT_DISCOVERY"],override:!0},S7=(e,t)=>({applyToStack:r=>{r.add(p0(e,t),Yf)}}),b7=(e,t)=>({applyToStack:r=>{r.add(p0(e,{...t,isDiscoveredEndpointRequired:!0}),Yf)}}),x7=(e,t)=>({applyToStack:r=>{r.add(p0(e,{...t,isDiscoveredEndpointRequired:!1}),Yf)}}),v7=(e,{endpointDiscoveryCommandCtor:t})=>{let{endpointCacheSize:r,endpointDiscoveryEnabled:n,endpointDiscoveryEnabledProvider:o}=e;return Object.assign(e,{endpointDiscoveryCommandCtor:t,endpointCache:new g7.EndpointCache(r??1e3),endpointDiscoveryEnabled:n!==void 0?()=>Promise.resolve(n):o,isClientEndpointDiscoveryEnabled:n!==void 0})};js.NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS=_7;js.endpointDiscoveryMiddlewareOptions=Yf;js.getEndpointDiscoveryOptionalPlugin=x7;js.getEndpointDiscoveryPlugin=S7;js.getEndpointDiscoveryRequiredPlugin=b7;js.resolveEndpointDiscoveryConfig=v7});var Ua=b(Gu=>{"use strict";var T7=nt();function w7(e){return e}var uP=e=>t=>async r=>{if(!T7.HttpRequest.isInstance(r.request))return t(r);let{request:n}=r,{handlerProtocol:o=""}=e.requestHandler.metadata||{};if(o.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let i=n.hostname;n.port!=null&&(i+=`:${n.port}`),n.headers.host=i}return t(r)},lP={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},A7=e=>({applyToStack:t=>{t.add(uP(e),lP)}});Gu.getHostHeaderPlugin=A7;Gu.hostHeaderMiddleware=uP;Gu.hostHeaderMiddlewareOptions=lP;Gu.resolveHostHeaderConfig=w7});var ja=b(Qf=>{"use strict";var dP=()=>(e,t)=>async r=>{var n,o;try{let i=await e(r),{clientName:s,commandName:a,logger:c,dynamoDbDocumentClientOptions:l={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:f}=l,m=d??t.inputFilterSensitiveLog,h=f??t.outputFilterSensitiveLog,{$metadata:_,...E}=i.output;return(n=c==null?void 0:c.info)==null||n.call(c,{clientName:s,commandName:a,input:m(r.input),output:h(E),metadata:_}),i}catch(i){let{clientName:s,commandName:a,logger:c,dynamoDbDocumentClientOptions:l={}}=t,{overrideInputFilterSensitiveLog:d}=l,f=d??t.inputFilterSensitiveLog;throw(o=c==null?void 0:c.error)==null||o.call(c,{clientName:s,commandName:a,input:f(r.input),error:i,metadata:i.$metadata}),i}},fP={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},I7=e=>({applyToStack:t=>{t.add(dP(),fP)}});Qf.getLoggerPlugin=I7;Qf.loggerMiddleware=dP;Qf.loggerMiddlewareOptions=fP});var mP={};Nt(mP,{InvokeStore:()=>_0,InvokeStoreBase:()=>Vu});var Hu,pP,h0,Vu,y0,g0,_0,hP=D(()=>{Hu={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")},h0=["true","1"].includes(((pP=process.env)==null?void 0:pP.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA)??"");h0||(globalThis.awslambda=globalThis.awslambda||{});Vu=class{static PROTECTED_KEYS=Hu;isProtectedKey(t){return Object.values(Hu).includes(t)}getRequestId(){return this.get(Hu.REQUEST_ID)??"-"}getXRayTraceId(){return this.get(Hu.X_RAY_TRACE_ID)}getTenantId(){return this.get(Hu.TENANT_ID)}},y0=class extends Vu{currentContext;getContext(){return this.currentContext}hasContext(){return this.currentContext!==void 0}get(t){var r;return(r=this.currentContext)==null?void 0:r[t]}set(t,r){if(this.isProtectedKey(t))throw new Error(`Cannot modify protected Lambda context field: ${String(t)}`);this.currentContext=this.currentContext||{},this.currentContext[t]=r}run(t,r){return this.currentContext=t,r()}},g0=class e extends Vu{als;static async create(){let t=new e,r=await import("node:async_hooks");return t.als=new r.AsyncLocalStorage,t}getContext(){return this.als.getStore()}hasContext(){return this.als.getStore()!==void 0}get(t){var r;return(r=this.als.getStore())==null?void 0:r[t]}set(t,r){if(this.isProtectedKey(t))throw new Error(`Cannot modify protected Lambda context field: ${String(t)}`);let n=this.als.getStore();if(!n)throw new Error("No context available");n[t]=r}run(t,r){return this.als.run(t,r)}};(function(e){let t=null;async function r(n){return t||(t=(async()=>{var s;let i=n===!0||"AWS_LAMBDA_MAX_CONCURRENCY"in process.env?await g0.create():new y0;return!h0&&((s=globalThis.awslambda)!=null&&s.InvokeStore)?globalThis.awslambda.InvokeStore:(!h0&&globalThis.awslambda&&(globalThis.awslambda.InvokeStore=i),i)})()),t}e.getInstanceAsync=r,e._testing=process.env.AWS_LAMBDA_BENCHMARK_MODE==="1"?{reset:()=>{var n;t=null,(n=globalThis.awslambda)!=null&&n.InvokeStore&&delete globalThis.awslambda.InvokeStore,globalThis.awslambda={InvokeStore:void 0}}}:void 0})(_0||(_0={}))});var yP=b(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});Xf.recursionDetectionMiddleware=void 0;var C7=(hP(),ie(mP)),D7=nt(),E0="X-Amzn-Trace-Id",R7="AWS_LAMBDA_FUNCTION_NAME",P7="_X_AMZN_TRACE_ID",O7=()=>e=>async t=>{let{request:r}=t;if(!D7.HttpRequest.isInstance(r))return e(t);let n=Object.keys(r.headers??{}).find(d=>d.toLowerCase()===E0.toLowerCase())??E0;if(r.headers.hasOwnProperty(n))return e(t);let o=process.env[R7],i=process.env[P7],s=await C7.InvokeStore.getInstanceAsync(),c=(s==null?void 0:s.getXRayTraceId())??i,l=d=>typeof d=="string"&&d.length>0;return l(o)&&l(c)&&(r.headers[E0]=c),e({...t,request:r})};Xf.recursionDetectionMiddleware=O7});var Ga=b(qa=>{"use strict";var Wu=yP(),N7={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},$7=e=>({applyToStack:t=>{t.add(Wu.recursionDetectionMiddleware(),N7)}});qa.getRecursionDetectionPlugin=$7;Object.prototype.hasOwnProperty.call(Wu,"__proto__")&&!Object.prototype.hasOwnProperty.call(qa,"__proto__")&&Object.defineProperty(qa,"__proto__",{enumerable:!0,value:Wu.__proto__});Object.keys(Wu).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(qa,e)&&(qa[e]=Wu[e])})});var S0,M7,gP=D(()=>{S0=C(Di()),M7=e=>e[S0.SMITHY_CONTEXT_KEY]||(e[S0.SMITHY_CONTEXT_KEY]={})});var _P,EP=D(()=>{_P=(e,t)=>{if(!t||t.length===0)return e;let r=[];for(let n of t)for(let o of e)o.schemeId.split("#")[1]===n&&r.push(o);for(let n of e)r.find(({schemeId:o})=>o===n.schemeId)||r.push(n);return r}});function L7(e){let t=new Map;for(let r of e)t.set(r.schemeId,r);return t}var SP,zu,Jf=D(()=>{SP=C(ir());EP();zu=(e,t)=>(r,n)=>async o=>{var f;let i=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,o.input)),s=e.authSchemePreference?await e.authSchemePreference():[],a=_P(i,s),c=L7(e.httpAuthSchemes),l=(0,SP.getSmithyContext)(n),d=[];for(let m of a){let h=c.get(m.schemeId);if(!h){d.push(`HttpAuthScheme \`${m.schemeId}\` was not enabled for this service.`);continue}let _=h.identityProvider(await t.identityProviderConfigProvider(e));if(!_){d.push(`HttpAuthScheme \`${m.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:E={},signingProperties:T={}}=((f=m.propertiesExtractor)==null?void 0:f.call(m,e,n))||{};m.identityProperties=Object.assign(m.identityProperties||{},E),m.signingProperties=Object.assign(m.signingProperties||{},T),l.selectedHttpAuthScheme={httpAuthOption:m,identity:await _(m.identityProperties),signer:h.signer};break}if(!l.selectedHttpAuthScheme)throw new Error(d.join(`
5
+ `));return r(o)}});var bP,Bo,xP=D(()=>{Jf();bP={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Bo=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(zu(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),bP)}})});var vP,k7,TP=D(()=>{Jf();vP={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},k7=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(zu(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),vP)}})});var wP=D(()=>{Jf();xP();TP()});var AP,IP,F7,B7,b0,x0=D(()=>{AP=C(nt()),IP=C(ir()),F7=e=>t=>{throw t},B7=(e,t)=>{},b0=e=>(t,r)=>async n=>{if(!AP.HttpRequest.isInstance(n.request))return t(n);let i=(0,IP.getSmithyContext)(r).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:s={}},identity:a,signer:c}=i,l=await t({...n,request:await c.sign(n.request,a,s)}).catch((c.errorHandler||F7)(s));return(c.successHandler||B7)(l.response,s),l}});var CP,Uo,DP=D(()=>{x0();CP={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Uo=e=>({applyToStack:t=>{t.addRelativeTo(b0(e),CP)}})});var RP=D(()=>{x0();DP()});var Pi,PP=D(()=>{Pi=e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t}});function OP(e,t,r,n,o){return async function*(s,a,...c){let l=a,d=s.startingToken??l[r],f=!0,m;for(;f;){if(l[r]=d,o&&(l[o]=l[o]??s.pageSize),s.client instanceof e)m=await U7(t,s.client,a,s.withCommand,...c);else throw new Error(`Invalid client, expected instance of ${e.name}`);yield m;let h=d;d=j7(m,n),f=!!(d&&(!s.stopOnSameToken||d!==h))}return void 0}}var U7,j7,NP=D(()=>{U7=async(e,t,r,n=i=>i,...o)=>{let i=new e(r);return i=n(i)??i,await t.send(i,...o)};j7=(e,t)=>{let r=e,n=t.split(".");for(let o of n){if(!r||typeof r!="object")return;r=r[o]}return r}});var v0=b($P=>{"use strict";var q7=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";$P.isArrayBuffer=q7});var Ha=b(w0=>{"use strict";var G7=v0(),T0=require("buffer"),H7=(e,t=0,r=e.byteLength-t)=>{if(!G7.isArrayBuffer(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return T0.Buffer.from(e,t,r)},V7=(e,t)=>{if(typeof e!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?T0.Buffer.from(e,t):T0.Buffer.from(e)};w0.fromArrayBuffer=H7;w0.fromString=V7});var MP=b(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.fromBase64=void 0;var W7=Ha(),z7=/^[A-Za-z0-9+/]*={0,2}$/,K7=e=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!z7.exec(e))throw new TypeError("Invalid base64 string.");let t=(0,W7.fromString)(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};Zf.fromBase64=K7});var Kt=b(ep=>{"use strict";var LP=Ha(),kP=e=>{let t=LP.fromString(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},Y7=e=>typeof e=="string"?kP(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Q7=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 LP.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength).toString("utf8")};ep.fromUtf8=kP;ep.toUint8Array=Y7;ep.toUtf8=Q7});var FP=b(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});tp.toBase64=void 0;var X7=Ha(),J7=Kt(),Z7=e=>{let t;if(typeof e=="string"?t=(0,J7.fromUtf8)(e):t=e,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,X7.fromArrayBuffer)(t.buffer,t.byteOffset,t.byteLength).toString("base64")};tp.toBase64=Z7});var jt=b(jo=>{"use strict";var rp=MP(),np=FP();Object.prototype.hasOwnProperty.call(rp,"__proto__")&&!Object.prototype.hasOwnProperty.call(jo,"__proto__")&&Object.defineProperty(jo,"__proto__",{enumerable:!0,value:rp.__proto__});Object.keys(rp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(jo,e)&&(jo[e]=rp[e])});Object.prototype.hasOwnProperty.call(np,"__proto__")&&!Object.prototype.hasOwnProperty.call(jo,"__proto__")&&Object.defineProperty(jo,"__proto__",{enumerable:!0,value:np.__proto__});Object.keys(np).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(jo,e)&&(jo[e]=np[e])})});var I0=b(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});op.ChecksumStream=void 0;var eQ=jt(),tQ=require("stream"),A0=class extends tQ.Duplex{expectedChecksum;checksumSourceLocation;checksum;source;base64Encoder;pendingCallback=null;constructor({expectedChecksum:t,checksum:r,source:n,checksumSourceLocation:o,base64Encoder:i}){var s;if(super(),typeof n.pipe=="function")this.source=n;else throw new Error(`@smithy/util-stream: unsupported source type ${((s=n==null?void 0:n.constructor)==null?void 0:s.name)??n} in ChecksumStream.`);this.base64Encoder=i??eQ.toBase64,this.expectedChecksum=t,this.checksum=r,this.checksumSourceLocation=o,this.source.pipe(this)}_read(t){if(this.pendingCallback){let r=this.pendingCallback;this.pendingCallback=null,r()}}_write(t,r,n){try{if(this.checksum.update(t),!this.push(t)){this.pendingCallback=n;return}}catch(o){return n(o)}return n()}async _final(t){try{let r=await this.checksum.digest(),n=this.base64Encoder(r);if(this.expectedChecksum!==n)return t(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${n}" in response header "${this.checksumSourceLocation}".`))}catch(r){return t(r)}return this.push(null),t()}};op.ChecksumStream=A0});var qo=b(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.isBlob=Va.isReadableStream=void 0;var rQ=e=>{var t;return typeof ReadableStream=="function"&&(((t=e==null?void 0:e.constructor)==null?void 0:t.name)===ReadableStream.name||e instanceof ReadableStream)};Va.isReadableStream=rQ;var nQ=e=>{var t;return typeof Blob=="function"&&(((t=e==null?void 0:e.constructor)==null?void 0:t.name)===Blob.name||e instanceof Blob)};Va.isBlob=nQ});var BP=b(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.ChecksumStream=void 0;var oQ=typeof ReadableStream=="function"?ReadableStream:function(){},C0=class extends oQ{};ip.ChecksumStream=C0});var UP=b(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});sp.createChecksumStream=void 0;var iQ=jt(),sQ=qo(),aQ=BP(),cQ=({expectedChecksum:e,checksum:t,source:r,checksumSourceLocation:n,base64Encoder:o})=>{var c;if(!(0,sQ.isReadableStream)(r))throw new Error(`@smithy/util-stream: unsupported source type ${((c=r==null?void 0:r.constructor)==null?void 0:c.name)??r} in ChecksumStream.`);let i=o??iQ.toBase64;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let s=new TransformStream({start(){},async transform(l,d){t.update(l),d.enqueue(l)},async flush(l){let d=await t.digest(),f=i(d);if(e!==f){let m=new Error(`Checksum mismatch: expected "${e}" but received "${f}" in response header "${n}".`);l.error(m)}else l.terminate()}});r.pipeThrough(s);let a=s.readable;return Object.setPrototypeOf(a,aQ.ChecksumStream.prototype),a};sp.createChecksumStream=cQ});var jP=b(D0=>{"use strict";Object.defineProperty(D0,"__esModule",{value:!0});D0.createChecksumStream=fQ;var uQ=qo(),lQ=I0(),dQ=UP();function fQ(e){return typeof ReadableStream=="function"&&(0,uQ.isReadableStream)(e.source)?(0,dQ.createChecksumStream)(e):new lQ.ChecksumStream(e)}});var P0=b(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});ap.ByteArrayCollector=void 0;var R0=class{allocByteArray;byteLength=0;byteArrays=[];constructor(t){this.allocByteArray=t}push(t){this.byteArrays.push(t),this.byteLength+=t.byteLength}flush(){if(this.byteArrays.length===1){let n=this.byteArrays[0];return this.reset(),n}let t=this.allocByteArray(this.byteLength),r=0;for(let n=0;n<this.byteArrays.length;++n){let o=this.byteArrays[n];t.set(o,r),r+=o.byteLength}return this.reset(),t}reset(){this.byteArrays=[],this.byteLength=0}};ap.ByteArrayCollector=R0});var VP=b(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});Go.createBufferedReadable=void 0;Go.createBufferedReadableStream=qP;Go.merge=GP;Go.flush=cp;Go.sizeOf=Wa;Go.modeOf=HP;var pQ=P0();function qP(e,t,r){let n=e.getReader(),o=!1,i=0,s=["",new pQ.ByteArrayCollector(l=>new Uint8Array(l))],a=-1,c=async l=>{let{value:d,done:f}=await n.read(),m=d;if(f){if(a!==-1){let h=cp(s,a);Wa(h)>0&&l.enqueue(h)}l.close()}else{let h=HP(m,!1);if(a!==h&&(a>=0&&l.enqueue(cp(s,a)),a=h),a===-1){l.enqueue(m);return}let _=Wa(m);i+=_;let E=Wa(s[a]);if(_>=t&&E===0)l.enqueue(m);else{let T=GP(s,a,m);!o&&i>t*2&&(o=!0,r==null||r.warn(`@smithy/util-stream - stream chunk size ${_} is below threshold of ${t}, automatically buffering.`)),T>=t?l.enqueue(cp(s,a)):await c(l)}}};return new ReadableStream({pull:c})}Go.createBufferedReadable=qP;function GP(e,t,r){switch(t){case 0:return e[0]+=r,Wa(e[0]);case 1:case 2:return e[t].push(r),Wa(e[t])}}function cp(e,t){switch(t){case 0:let r=e[0];return e[0]="",r;case 1:case 2:return e[t].flush()}throw new Error(`@smithy/util-stream - invalid index ${t} given to flush()`)}function Wa(e){return(e==null?void 0:e.byteLength)??(e==null?void 0:e.length)??0}function HP(e,t=!0){return t&&typeof Buffer<"u"&&e instanceof Buffer?2:e instanceof Uint8Array?1:typeof e=="string"?0:-1}});var zP=b(O0=>{"use strict";Object.defineProperty(O0,"__esModule",{value:!0});O0.createBufferedReadable=yQ;var mQ=require("node:stream"),WP=P0(),Ho=VP(),hQ=qo();function yQ(e,t,r){if((0,hQ.isReadableStream)(e))return(0,Ho.createBufferedReadableStream)(e,t,r);let n=new mQ.Readable({read(){}}),o=!1,i=0,s=["",new WP.ByteArrayCollector(c=>new Uint8Array(c)),new WP.ByteArrayCollector(c=>Buffer.from(new Uint8Array(c)))],a=-1;return e.on("data",c=>{let l=(0,Ho.modeOf)(c,!0);if(a!==l&&(a>=0&&n.push((0,Ho.flush)(s,a)),a=l),a===-1){n.push(c);return}let d=(0,Ho.sizeOf)(c);i+=d;let f=(0,Ho.sizeOf)(s[a]);if(d>=t&&f===0)n.push(c);else{let m=(0,Ho.merge)(s,a,c);!o&&i>t*2&&(o=!0,r==null||r.warn(`@smithy/util-stream - stream chunk size ${d} is below threshold of ${t}, automatically buffering.`)),m>=t&&n.push((0,Ho.flush)(s,a))}}),e.on("end",()=>{if(a!==-1){let c=(0,Ho.flush)(s,a);(0,Ho.sizeOf)(c)>0&&n.push(c)}n.push(null)}),n}});var KP=b(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.getAwsChunkedEncodingStream=void 0;var gQ=(e,t)=>{let{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:o,checksumLocationName:i,streamHasher:s}=t,a=r!==void 0&&n!==void 0&&o!==void 0&&i!==void 0&&s!==void 0,c=a?s(o,e):void 0,l=e.getReader();return new ReadableStream({async pull(d){let{value:f,done:m}=await l.read();if(m){if(d.enqueue(`0\r
6
+ `),a){let h=r(await c);d.enqueue(`${i}:${h}\r
7
+ `),d.enqueue(`\r
8
+ `)}d.close()}else d.enqueue(`${(n(f)||0).toString(16)}\r
9
+ ${f}\r
10
+ `)}})};up.getAwsChunkedEncodingStream=gQ});var YP=b(N0=>{"use strict";Object.defineProperty(N0,"__esModule",{value:!0});N0.getAwsChunkedEncodingStream=bQ;var _Q=require("node:stream"),EQ=KP(),SQ=qo();function bQ(e,t){let r=e,n=e;if((0,SQ.isReadableStream)(n))return(0,EQ.getAwsChunkedEncodingStream)(n,t);let{base64Encoder:o,bodyLengthChecker:i,checksumAlgorithmFn:s,checksumLocationName:a,streamHasher:c}=t,l=o!==void 0&&s!==void 0&&a!==void 0&&c!==void 0,d=l?c(s,r):void 0,f=new _Q.Readable({read:()=>{}});return r.on("data",m=>{let h=i(m)||0;h!==0&&(f.push(`${h.toString(16)}\r
11
+ `),f.push(m),f.push(`\r
12
+ `))}),r.on("end",async()=>{if(f.push(`0\r
13
+ `),l){let m=o(await d);f.push(`${a}:${m}\r
14
+ `),f.push(`\r
15
+ `)}f.push(null)}),f}});var QP=b($0=>{"use strict";Object.defineProperty($0,"__esModule",{value:!0});$0.headStream=xQ;async function xQ(e,t){let r=0,n=[],o=e.getReader(),i=!1;for(;!i;){let{done:c,value:l}=await o.read();if(l&&(n.push(l),r+=(l==null?void 0:l.byteLength)??0),r>=t)break;i=c}o.releaseLock();let s=new Uint8Array(Math.min(t,r)),a=0;for(let c of n){if(c.byteLength>s.byteLength-a){s.set(c.subarray(0,s.byteLength-a),a);break}else s.set(c,a);a+=c.length}return s}});var XP=b(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});lp.headStream=void 0;var vQ=require("stream"),TQ=QP(),wQ=qo(),AQ=(e,t)=>(0,wQ.isReadableStream)(e)?(0,TQ.headStream)(e,t):new Promise((r,n)=>{let o=new M0;o.limit=t,e.pipe(o),e.on("error",i=>{o.end(),n(i)}),o.on("error",n),o.on("finish",function(){let i=new Uint8Array(Buffer.concat(this.buffers));r(i)})});lp.headStream=AQ;var M0=class extends vQ.Writable{buffers=[];limit=1/0;bytesBuffered=0;_write(t,r,n){if(this.buffers.push(t),this.bytesBuffered+=t.byteLength??0,this.bytesBuffered>=this.limit){let o=this.bytesBuffered-this.limit,i=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=i.subarray(0,i.byteLength-o),this.emit("finish")}n()}}});var k0=b(L0=>{"use strict";var JP=e=>encodeURIComponent(e).replace(/[!'()*]/g,IQ),IQ=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,CQ=e=>e.split("/").map(JP).join("/");L0.escapeUri=JP;L0.escapeUriPath=CQ});var B0=b(ZP=>{"use strict";var F0=k0();function DQ(e){let t=[];for(let r of Object.keys(e).sort()){let n=e[r];if(r=F0.escapeUri(r),Array.isArray(n))for(let o=0,i=n.length;o<i;o++)t.push(`${r}=${F0.escapeUri(n[o])}`);else{let o=r;(n||typeof n=="string")&&(o+=`=${F0.escapeUri(n)}`),t.push(o)}}return t.join("&")}ZP.buildQueryString=DQ});var Oi=b(Ku=>{"use strict";var oO=nt(),iO=B0(),dp=require("node:https"),sO=require("node:stream"),U0=require("node:http2");function pp(e){let t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let o=new Error("Request aborted");return o.name="AbortError",o.cause=t,o}let n=new Error(String(t));return n.name="AbortError",n}let r=new Error("Request aborted");return r.name="AbortError",r}var RQ=["ECONNRESET","EPIPE","ETIMEDOUT"],aO=e=>{let t={};for(let r of Object.keys(e)){let n=e[r];t[r]=Array.isArray(n)?n.join(","):n}return t},xr={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},eO=1e3,PQ=(e,t,r=0)=>{if(!r)return-1;let n=o=>{let i=xr.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 ${r} ms.`),{name:"TimeoutError"}))},r-o),s=a=>{a!=null&&a.connecting?a.on("connect",()=>{xr.clearTimeout(i)}):xr.clearTimeout(i)};e.socket?s(e.socket):e.on("socket",s)};return r<2e3?(n(0),0):xr.setTimeout(n.bind(null,eO),eO)},OQ=(e,t,r=0,n,o)=>r?xr.setTimeout(()=>{var s;let i=`@smithy/node-http-handler - [${n?"ERROR":"WARN"}] a request has exceeded the configured ${r} ms requestTimeout.`;if(n){let a=Object.assign(new Error(i),{name:"TimeoutError",code:"ETIMEDOUT"});e.destroy(a),t(a)}else i+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",(s=o==null?void 0:o.warn)==null||s.call(o,i)},r):-1,NQ=3e3,$Q=(e,{keepAlive:t,keepAliveMsecs:r},n=NQ)=>{if(t!==!0)return-1;let o=()=>{e.socket?e.socket.setKeepAlive(t,r||0):e.on("socket",i=>{i.setKeepAlive(t,r||0)})};return n===0?(o(),0):xr.setTimeout(o,n)},tO=3e3,MQ=(e,t,r=0)=>{let n=o=>{let i=r-o,s=()=>{e.destroy(),t(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${r} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};e.socket?(e.socket.setTimeout(i,s),e.on("close",()=>{var a;return(a=e.socket)==null?void 0:a.removeListener("timeout",s)})):e.setTimeout(i,s)};return 0<r&&r<6e3?(n(0),0):xr.setTimeout(n.bind(null,r===0?0:tO),tO)},rO=6e3;async function cO(e,t,r=rO,n=!1){let o=t.headers??{},i=o.Expect||o.expect,s=-1,a=!0;!n&&i==="100-continue"&&(a=await Promise.race([new Promise(c=>{s=Number(xr.setTimeout(()=>c(!0),Math.max(rO,r)))}),new Promise(c=>{e.on("continue",()=>{xr.clearTimeout(s),c(!0)}),e.on("response",()=>{xr.clearTimeout(s),c(!1)}),e.on("error",()=>{xr.clearTimeout(s),c(!1)})})])),a&&LQ(e,t.body)}function LQ(e,t){if(t instanceof sO.Readable){t.pipe(e);return}if(t){let r=Buffer.isBuffer(t);if(r||typeof t=="string"){r&&t.byteLength===0?e.end():e.end(t);return}let o=t;if(typeof o=="object"&&o.buffer&&typeof o.byteOffset=="number"&&typeof o.byteLength=="number"){e.end(Buffer.from(o.buffer,o.byteOffset,o.byteLength));return}e.end(Buffer.from(t));return}e.end()}var kQ=0,fp,nO,j0=class e{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(t){return typeof(t==null?void 0:t.handle)=="function"?t:new e(t)}static checkSocketUsage(t,r,n=console){var c,l,d;let{sockets:o,requests:i,maxSockets:s}=t;if(typeof s!="number"||s===1/0||Date.now()-15e3<r)return r;if(o&&i)for(let f in o){let m=((c=o[f])==null?void 0:c.length)??0,h=((l=i[f])==null?void 0:l.length)??0;if(m>=s&&h>=2*s)return(d=n==null?void 0:n.warn)==null||d.call(n,`@smithy/node-http-handler:WARN - socket usage at capacity=${m} and ${h} additional requests are enqueued.
16
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
17
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return r}constructor(t){this.configProvider=new Promise((r,n)=>{typeof t=="function"?t().then(o=>{r(this.resolveDefaultConfig(o))}).catch(n):r(this.resolveDefaultConfig(t))})}destroy(){var t,r,n,o;(r=(t=this.config)==null?void 0:t.httpAgent)==null||r.destroy(),(o=(n=this.config)==null?void 0:n.httpsAgent)==null||o.destroy()}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let o=this.config,i=t.protocol==="https:";return!i&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((s,a)=>{let c,l=[],d=async ue=>{await c,l.forEach(xr.clearTimeout),s(ue)},f=async ue=>{await c,l.forEach(xr.clearTimeout),a(ue)};if(r!=null&&r.aborted){let ue=pp(r);f(ue);return}let m=t.headers??{},h=(m.Expect??m.expect)==="100-continue",_=i?o.httpsAgent:o.httpAgent;h&&!this.externalAgent&&(_=new(i?dp.Agent:fp)({keepAlive:!1,maxSockets:1/0})),l.push(xr.setTimeout(()=>{this.socketWarningTimestamp=e.checkSocketUsage(_,this.socketWarningTimestamp,o.logger)},o.socketAcquisitionWarningTimeout??(o.requestTimeout??2e3)+(o.connectionTimeout??1e3)));let E=iO.buildQueryString(t.query||{}),T;if(t.username!=null||t.password!=null){let ue=t.username??"",q=t.password??"";T=`${ue}:${q}`}let I=t.path;E&&(I+=`?${E}`),t.fragment&&(I+=`#${t.fragment}`);let A=t.hostname??"";A[0]==="["&&A.endsWith("]")?A=t.hostname.slice(1,-1):A=t.hostname;let O={headers:t.headers,host:A,method:t.method,path:I,port:t.port,agent:_,auth:T},z=(i?dp.request:nO)(O,ue=>{let q=new oO.HttpResponse({statusCode:ue.statusCode||-1,reason:ue.statusMessage,headers:aO(ue.headers),body:ue});d({response:q})});if(z.on("error",ue=>{RQ.includes(ue.code)?f(Object.assign(ue,{name:"TimeoutError"})):f(ue)}),r){let ue=()=>{z.destroy();let q=pp(r);f(q)};if(typeof r.addEventListener=="function"){let q=r;q.addEventListener("abort",ue,{once:!0}),z.once("close",()=>q.removeEventListener("abort",ue))}else r.onabort=ue}let Q=n??o.requestTimeout;l.push(PQ(z,f,o.connectionTimeout)),l.push(OQ(z,f,Q,o.throwOnRequestTimeout,o.logger??console)),l.push(MQ(z,f,o.socketTimeout));let be=O.agent;typeof be=="object"&&"keepAlive"in be&&l.push($Q(z,{keepAlive:be.keepAlive,keepAliveMsecs:be.keepAliveMsecs})),c=cO(z,t,Q,this.externalAgent).catch(ue=>(l.forEach(xr.clearTimeout),a(ue)))})}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[t]:r}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(t){let{requestTimeout:r,connectionTimeout:n,socketTimeout:o,socketAcquisitionWarningTimeout:i,httpAgent:s,httpsAgent:a,throwOnRequestTimeout:c,logger:l}=t||{},d=!0,f=50;return{connectionTimeout:n,requestTimeout:r,socketTimeout:o,socketAcquisitionWarningTimeout:i,throwOnRequestTimeout:c,httpAgentProvider:async()=>{let{Agent:m,request:h}=await import("node:http");return nO=h,fp=m,s instanceof fp||typeof(s==null?void 0:s.destroy)=="function"?(this.externalAgent=!0,s):new fp({keepAlive:d,maxSockets:f,...s})},httpsAgent:a instanceof dp.Agent||typeof(a==null?void 0:a.destroy)=="function"?(this.externalAgent=!0,a):new dp.Agent({keepAlive:d,maxSockets:f,...a}),logger:l}}},q0=class{sessions=[];constructor(t){this.sessions=t??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(t){this.sessions.push(t)}contains(t){return this.sessions.includes(t)}remove(t){this.sessions=this.sessions.filter(r=>r!==t)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(t){for(let r of this.sessions)r===t&&(r.destroyed||r.destroy())}},G0=class{constructor(t){if(this.config=t,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}config;sessionCache=new Map;lease(t,r){let n=this.getUrlString(t),o=this.sessionCache.get(n);if(o){let c=o.poll();if(c&&!this.config.disableConcurrency)return c}let i=U0.connect(n);this.config.maxConcurrency&&i.settings({maxConcurrentStreams:this.config.maxConcurrency},c=>{if(c)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+t.destination.toString())}),i.unref();let s=()=>{i.destroy(),this.deleteSession(n,i)};i.on("goaway",s),i.on("error",s),i.on("frameError",s),i.on("close",()=>this.deleteSession(n,i)),r.requestTimeout&&i.setTimeout(r.requestTimeout,s);let a=this.sessionCache.get(n)||new q0;return a.offerLast(i),this.sessionCache.set(n,a),i}deleteSession(t,r){let n=this.sessionCache.get(t);n&&n.contains(r)&&(n.remove(r),this.sessionCache.set(t,n))}release(t,r){var o;let n=this.getUrlString(t);(o=this.sessionCache.get(n))==null||o.offerLast(r)}destroy(){for(let[t,r]of this.sessionCache){for(let n of r)n.destroyed||n.destroy(),r.remove(n);this.sessionCache.delete(t)}}setMaxConcurrentStreams(t){if(t&&t<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=t}setDisableConcurrentStreams(t){this.config.disableConcurrency=t}getUrlString(t){return t.destination.toString()}},H0=class e{config;configProvider;metadata={handlerProtocol:"h2"};connectionManager=new G0({});static create(t){return typeof(t==null?void 0:t.handle)=="function"?t:new e(t)}constructor(t){this.configProvider=new Promise((r,n)=>{typeof t=="function"?t().then(o=>{r(o||{})}).catch(n):r(t||{})})}destroy(){this.connectionManager.destroy()}async handle(t,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams&&this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams));let{requestTimeout:o,disableConcurrentStreams:i}=this.config,s=n??o;return new Promise((a,c)=>{var Z;let l=!1,d,f=async ee=>{await d,a(ee)},m=async ee=>{await d,c(ee)};if(r!=null&&r.aborted){l=!0;let ee=pp(r);m(ee);return}let{hostname:h,method:_,port:E,protocol:T,query:I}=t,A="";if(t.username!=null||t.password!=null){let ee=t.username??"",_e=t.password??"";A=`${ee}:${_e}@`}let O=`${T}//${A}${h}${E?`:${E}`:""}`,G={destination:new URL(O)},z=this.connectionManager.lease(G,{requestTimeout:(Z=this.config)==null?void 0:Z.sessionTimeout,disableConcurrentStreams:i||!1}),Q=ee=>{i&&this.destroySession(z),l=!0,m(ee)},be=iO.buildQueryString(I||{}),ue=t.path;be&&(ue+=`?${be}`),t.fragment&&(ue+=`#${t.fragment}`);let q=z.request({...t.headers,[U0.constants.HTTP2_HEADER_PATH]:ue,[U0.constants.HTTP2_HEADER_METHOD]:_});if(z.ref(),q.on("response",ee=>{let _e=new oO.HttpResponse({statusCode:ee[":status"]||-1,headers:aO(ee),body:q});l=!0,f({response:_e}),i&&(z.close(),this.connectionManager.deleteSession(O,z))}),s&&q.setTimeout(s,()=>{q.close();let ee=new Error(`Stream timed out because of no activity for ${s} ms`);ee.name="TimeoutError",Q(ee)}),r){let ee=()=>{q.close();let _e=pp(r);Q(_e)};if(typeof r.addEventListener=="function"){let _e=r;_e.addEventListener("abort",ee,{once:!0}),q.once("close",()=>_e.removeEventListener("abort",ee))}else r.onabort=ee}q.on("frameError",(ee,_e,it)=>{Q(new Error(`Frame type id ${ee} in stream id ${it} has failed with code ${_e}.`))}),q.on("error",Q),q.on("aborted",()=>{Q(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${q.rstCode}.`))}),q.on("close",()=>{z.unref(),i&&z.destroy(),l||Q(new Error("Unexpected error: http2 request did not get a response"))}),d=cO(q,t,s)})}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[t]:r}))}httpHandlerConfigs(){return this.config??{}}destroySession(t){t.destroyed||t.destroy()}},V0=class extends sO.Writable{bufferedBytes=[];_write(t,r,n){this.bufferedBytes.push(t),n()}},FQ=e=>BQ(e)?UQ(e):new Promise((t,r)=>{let n=new V0;e.pipe(n),e.on("error",o=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){let o=new Uint8Array(Buffer.concat(this.bufferedBytes));t(o)})}),BQ=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream;async function UQ(e){let t=[],r=e.getReader(),n=!1,o=0;for(;!n;){let{done:a,value:c}=await r.read();c&&(t.push(c),o+=c.length),n=a}let i=new Uint8Array(o),s=0;for(let a of t)i.set(a,s),s+=a.length;return i}Ku.DEFAULT_REQUEST_TIMEOUT=kQ;Ku.NodeHttp2Handler=H0;Ku.NodeHttpHandler=j0;Ku.streamCollector=FQ});var fO=b(hp=>{"use strict";var uO=nt(),jQ=B0(),qQ=jt();function lO(e,t){return new Request(e,t)}function GQ(e=0){return new Promise((t,r)=>{e&&setTimeout(()=>{let n=new Error(`Request did not complete within ${e} ms`);n.name="TimeoutError",r(n)},e)})}var mp={supported:void 0},W0=class e{config;configProvider;static create(t){return typeof(t==null?void 0:t.handle)=="function"?t:new e(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(r=>r||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),mp.supported===void 0&&(mp.supported=typeof Request<"u"&&"keepalive"in lO("https://[::1]"))}destroy(){}async handle(t,{abortSignal:r,requestTimeout:n}={}){var A;this.config||(this.config=await this.configProvider);let o=n??this.config.requestTimeout,i=this.config.keepAlive===!0,s=this.config.credentials;if(r!=null&&r.aborted){let O=dO(r);return Promise.reject(O)}let a=t.path,c=jQ.buildQueryString(t.query||{});c&&(a+=`?${c}`),t.fragment&&(a+=`#${t.fragment}`);let l="";if(t.username!=null||t.password!=null){let O=t.username??"",G=t.password??"";l=`${O}:${G}@`}let{port:d,method:f}=t,m=`${t.protocol}//${l}${t.hostname}${d?`:${d}`:""}${a}`,h=f==="GET"||f==="HEAD"?void 0:t.body,_={body:h,headers:new Headers(t.headers),method:f,credentials:s};(A=this.config)!=null&&A.cache&&(_.cache=this.config.cache),h&&(_.duplex="half"),typeof AbortController<"u"&&(_.signal=r),mp.supported&&(_.keepalive=i),typeof this.config.requestInit=="function"&&Object.assign(_,this.config.requestInit(t));let E=()=>{},T=lO(m,_),I=[fetch(T).then(O=>{let G=O.headers,z={};for(let be of G.entries())z[be[0]]=be[1];return O.body!=null?{response:new uO.HttpResponse({headers:z,reason:O.statusText,statusCode:O.status,body:O.body})}:O.blob().then(be=>({response:new uO.HttpResponse({headers:z,reason:O.statusText,statusCode:O.status,body:be})}))}),GQ(o)];return r&&I.push(new Promise((O,G)=>{let z=()=>{let Q=dO(r);G(Q)};if(typeof r.addEventListener=="function"){let Q=r;Q.addEventListener("abort",z,{once:!0}),E=()=>Q.removeEventListener("abort",z)}else r.onabort=z})),Promise.race(I).finally(E)}updateHttpClientConfig(t,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[t]=r,n))}httpHandlerConfigs(){return this.config??{}}};function dO(e){let t=e&&typeof e=="object"&&"reason"in e?e.reason:void 0;if(t){if(t instanceof Error){let o=new Error("Request aborted");return o.name="AbortError",o.cause=t,o}let n=new Error(String(t));return n.name="AbortError",n}let r=new Error("Request aborted");return r.name="AbortError",r}var HQ=async e=>{var t;return typeof Blob=="function"&&e instanceof Blob||((t=e.constructor)==null?void 0:t.name)==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):VQ(e):WQ(e)};async function VQ(e){let t=await zQ(e),r=qQ.fromBase64(t);return new Uint8Array(r)}async function WQ(e){let t=[],r=e.getReader(),n=!1,o=0;for(;!n;){let{done:a,value:c}=await r.read();c&&(t.push(c),o+=c.length),n=a}let i=new Uint8Array(o),s=0;for(let a of t)i.set(a,s),s+=a.length;return i}function zQ(e){return new Promise((t,r)=>{let n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));let o=n.result??"",i=o.indexOf(","),s=i>-1?i+1:o.length;t(o.substring(s))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})}hp.FetchHttpHandler=W0;hp.keepAliveSupport=mp;hp.streamCollector=HQ});var Y0=b(K0=>{"use strict";var pO={},z0={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),pO[e]=t,z0[t]=e}function KQ(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){let n=e.slice(r,r+2).toLowerCase();if(n in z0)t[r/2]=z0[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function YQ(e){let t="";for(let r=0;r<e.byteLength;r++)t+=pO[e[r]];return t}K0.fromHex=KQ;K0.toHex=YQ});var gO=b(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});yp.sdkStreamMixin=void 0;var QQ=fO(),XQ=jt(),JQ=Y0(),ZQ=Kt(),mO=qo(),hO="The stream has already been transformed.",eX=e=>{var o,i;if(!yO(e)&&!(0,mO.isReadableStream)(e)){let s=((i=(o=e==null?void 0:e.__proto__)==null?void 0:o.constructor)==null?void 0:i.name)||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${s}`)}let t=!1,r=async()=>{if(t)throw new Error(hO);return t=!0,await(0,QQ.streamCollector)(e)},n=s=>{if(typeof s.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
18
+ 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 s.stream()};return Object.assign(e,{transformToByteArray:r,transformToString:async s=>{let a=await r();if(s==="base64")return(0,XQ.toBase64)(a);if(s==="hex")return(0,JQ.toHex)(a);if(s===void 0||s==="utf8"||s==="utf-8")return(0,ZQ.toUtf8)(a);if(typeof TextDecoder=="function")return new TextDecoder(s).decode(a);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(hO);if(t=!0,yO(e))return n(e);if((0,mO.isReadableStream)(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})};yp.sdkStreamMixin=eX;var yO=e=>typeof Blob=="function"&&e instanceof Blob});var EO=b(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});gp.sdkStreamMixin=void 0;var tX=Oi(),rX=Ha(),Q0=require("stream"),nX=gO(),_O="The stream has already been transformed.",oX=e=>{var n,o;if(!(e instanceof Q0.Readable))try{return(0,nX.sdkStreamMixin)(e)}catch{let s=((o=(n=e==null?void 0:e.__proto__)==null?void 0:n.constructor)==null?void 0:o.name)||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${s}`)}let t=!1,r=async()=>{if(t)throw new Error(_O);return t=!0,await(0,tX.streamCollector)(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async i=>{let s=await r();return i===void 0||Buffer.isEncoding(i)?(0,rX.fromArrayBuffer)(s.buffer,s.byteOffset,s.byteLength).toString(i):new TextDecoder(i).decode(s)},transformToWebStream:()=>{if(t)throw new Error(_O);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Q0.Readable.toWeb!="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return t=!0,Q0.Readable.toWeb(e)}})};gp.sdkStreamMixin=oX});var SO=b(X0=>{"use strict";Object.defineProperty(X0,"__esModule",{value:!0});X0.splitStream=iX;async function iX(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}});var vO=b(J0=>{"use strict";Object.defineProperty(J0,"__esModule",{value:!0});J0.splitStream=aX;var bO=require("stream"),sX=SO(),xO=qo();async function aX(e){if((0,xO.isReadableStream)(e)||(0,xO.isBlob)(e))return(0,sX.splitStream)(e);let t=new bO.PassThrough,r=new bO.PassThrough;return e.pipe(t),e.pipe(r),[t,r]}});var wp=b(Xe=>{"use strict";var TO=jt(),wO=Kt(),_p=I0(),Ep=jP(),Sp=zP(),bp=YP(),xp=XP(),vp=EO(),Tp=vO(),AO=qo(),Z0=class e extends Uint8Array{static fromString(t,r="utf-8"){if(typeof t=="string")return r==="base64"?e.mutate(TO.fromBase64(t)):e.mutate(wO.fromUtf8(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,e.prototype),t}transformToString(t="utf-8"){return t==="base64"?TO.toBase64(this):wO.toUtf8(this)}};Xe.isBlob=AO.isBlob;Xe.isReadableStream=AO.isReadableStream;Xe.Uint8ArrayBlobAdapter=Z0;Object.prototype.hasOwnProperty.call(_p,"__proto__")&&!Object.prototype.hasOwnProperty.call(Xe,"__proto__")&&Object.defineProperty(Xe,"__proto__",{enumerable:!0,value:_p.__proto__});Object.keys(_p).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Xe,e)&&(Xe[e]=_p[e])});Object.prototype.hasOwnProperty.call(Ep,"__proto__")&&!Object.prototype.hasOwnProperty.call(Xe,"__proto__")&&Object.defineProperty(Xe,"__proto__",{enumerable:!0,value:Ep.__proto__});Object.keys(Ep).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Xe,e)&&(Xe[e]=Ep[e])});Object.prototype.hasOwnProperty.call(Sp,"__proto__")&&!Object.prototype.hasOwnProperty.call(Xe,"__proto__")&&Object.defineProperty(Xe,"__proto__",{enumerable:!0,value:Sp.__proto__});Object.keys(Sp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Xe,e)&&(Xe[e]=Sp[e])});Object.prototype.hasOwnProperty.call(bp,"__proto__")&&!Object.prototype.hasOwnProperty.call(Xe,"__proto__")&&Object.defineProperty(Xe,"__proto__",{enumerable:!0,value:bp.__proto__});Object.keys(bp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Xe,e)&&(Xe[e]=bp[e])});Object.prototype.hasOwnProperty.call(xp,"__proto__")&&!Object.prototype.hasOwnProperty.call(Xe,"__proto__")&&Object.defineProperty(Xe,"__proto__",{enumerable:!0,value:xp.__proto__});Object.keys(xp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Xe,e)&&(Xe[e]=xp[e])});Object.prototype.hasOwnProperty.call(vp,"__proto__")&&!Object.prototype.hasOwnProperty.call(Xe,"__proto__")&&Object.defineProperty(Xe,"__proto__",{enumerable:!0,value:vp.__proto__});Object.keys(vp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Xe,e)&&(Xe[e]=vp[e])});Object.prototype.hasOwnProperty.call(Tp,"__proto__")&&!Object.prototype.hasOwnProperty.call(Xe,"__proto__")&&Object.defineProperty(Xe,"__proto__",{enumerable:!0,value:Tp.__proto__});Object.keys(Tp).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Xe,e)&&(Xe[e]=Tp[e])})});var Ap,un,Ip=D(()=>{Ap=C(wp()),un=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Ap.Uint8ArrayBlobAdapter.mutate(e);if(!e)return Ap.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let r=t.streamCollector(e);return Ap.Uint8ArrayBlobAdapter.mutate(await r)}});function ro(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var Cp=D(()=>{});var Rn,eb=D(()=>{Rn=e=>typeof e=="function"?e():e});var Yu,Dp=D(()=>{Yu=(e,t,r,n,o)=>({name:t,namespace:e,traits:r,input:n,output:o})});var IO,CO,DO,tb,RO=D(()=>{IO=C(nt()),CO=C(ir());Dp();DO=e=>(t,r)=>async n=>{var f,m,h,_;let{response:o}=await t(n),{operationSchema:i}=(0,CO.getSmithyContext)(r),[,s,a,c,l,d]=i??[];try{let E=await e.protocol.deserializeResponse(Yu(s,a,c,l,d),{...e,...r},o);return{response:o,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:o,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in E)){let T="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{E.message+=`
19
+ `+T}catch{!r.logger||((m=(f=r.logger)==null?void 0:f.constructor)==null?void 0:m.name)==="NoOpLogger"?console.warn(T):(_=(h=r.logger)==null?void 0:h.warn)==null||_.call(h,T)}typeof E.$responseBodyText<"u"&&E.$response&&(E.$response.body=E.$responseBodyText);try{if(IO.HttpResponse.isInstance(o)){let{headers:I={}}=o,A=Object.entries(I);E.$metadata={httpStatusCode:o.statusCode,requestId:tb(/^x-[\w-]+-request-?id$/,A),extendedRequestId:tb(/^x-[\w-]+-id-2$/,A),cfId:tb(/^x-[\w-]+-cf-id$/,A)}}}catch{}}throw E}},tb=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1]});var OO=b(PO=>{"use strict";function cX(e){let t={};if(e=e.replace(/^\?/,""),e)for(let r of e.split("&")){let[n,o=null]=r.split("=");n=decodeURIComponent(n),o&&(o=decodeURIComponent(o)),n in t?Array.isArray(t[n])?t[n].push(o):t[n]=[t[n],o]:t[n]=o}return t}PO.parseQueryString=cX});var no=b($O=>{"use strict";var uX=OO(),NO=e=>{if(typeof e=="string")return NO(new URL(e));let{hostname:t,pathname:r,port:n,protocol:o,search:i}=e,s;return i&&(s=uX.parseQueryString(i)),{hostname:t,port:n?parseInt(n):void 0,protocol:o,path:r,query:s}};$O.parseUrl=NO});var rb,nb,MO=D(()=>{rb=C(no()),nb=e=>{if(typeof e=="object"){if("url"in e){let t=(0,rb.parseUrl)(e.url);if(e.headers){t.headers={};for(let[r,n]of Object.entries(e.headers))t.headers[r.toLowerCase()]=n.join(", ")}return t}return e}return(0,rb.parseUrl)(e)}});var LO={};Nt(LO,{toEndpointV1:()=>nb});var ob=D(()=>{MO()});var kO,FO,BO=D(()=>{ob();kO=C(ir());Dp();FO=e=>(t,r)=>async n=>{let{operationSchema:o}=(0,kO.getSmithyContext)(r),[,i,s,a,c,l]=o??[],d=r.endpointV2?async()=>nb(r.endpointV2):e.endpoint,f=await e.protocol.serializeRequest(Yu(i,s,a,c,l),n.input,{...e,...r,endpoint:d});return t({...n,request:f})}});function Vo(e){return{applyToStack:t=>{t.add(FO(e),jO),t.add(DO(e),UO),e.protocol.setSerdeContext(e)}}}var UO,jO,qO=D(()=>{RO();BO();UO={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},jO={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var Ct,Ni=D(()=>{Ct=class{name;namespace;traits;static assign(t,r){return Object.assign(t,r)}static[Symbol.hasInstance](t){let r=this.prototype.isPrototypeOf(t);return!r&&typeof t=="object"&&t!==null?t.symbol===this.symbol:r}getName(){return this.namespace+"#"+this.name}}});var Rp,lX,GO=D(()=>{Ni();Rp=class e extends Ct{static symbol=Symbol.for("@smithy/lis");name;traits;valueSchema;symbol=e.symbol},lX=(e,t,r,n)=>Ct.assign(new Rp,{name:t,namespace:e,traits:r,valueSchema:n})});var Pp,dX,HO=D(()=>{Ni();Pp=class e extends Ct{static symbol=Symbol.for("@smithy/map");name;traits;keySchema;valueSchema;symbol=e.symbol},dX=(e,t,r,n,o)=>Ct.assign(new Pp,{name:t,namespace:e,traits:r,keySchema:n,valueSchema:o})});var Op,fX,VO=D(()=>{Ni();Op=class e extends Ct{static symbol=Symbol.for("@smithy/ope");name;traits;input;output;symbol=e.symbol},fX=(e,t,r,n,o)=>Ct.assign(new Op,{name:t,namespace:e,traits:r,input:n,output:o})});var za,pX,ib=D(()=>{Ni();za=class e extends Ct{static symbol=Symbol.for("@smithy/str");name;traits;memberNames;memberList;symbol=e.symbol},pX=(e,t,r,n,o)=>Ct.assign(new za,{name:t,namespace:e,traits:r,memberNames:n,memberList:o})});var Np,mX,WO=D(()=>{Ni();ib();Np=class e extends za{static symbol=Symbol.for("@smithy/err");ctor;symbol=e.symbol},mX=(e,t,r,n,o,i)=>Ct.assign(new Np,{name:t,namespace:e,traits:r,memberNames:n,memberList:o,ctor:null})});function oo(e){if(typeof e=="object")return e;if(e=e|0,$p[e])return $p[e];let t={},r=0;for(let n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>r++&1)===1&&(t[n]=1);return $p[e]=t}var $p,sb=D(()=>{$p=[]});function Xu(e,t){if(e instanceof le)return Object.assign(e,{memberName:t,_isMemberSchema:!0});let r=le;return new r(e,t)}var Qu,Mp,Lp,le,ab,zO,KO=D(()=>{eb();sb();Qu={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},Mp=[],Lp={},le=class e{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=e.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,r){this.ref=t,this.memberName=r;let n=[],o=t,i=t;for(this._isMemberSchema=!1;ab(o);)n.push(o[1]),o=o[0],i=Rn(o),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let s=n.length-1;s>=0;--s){let a=n[s];Object.assign(this.memberTraits,oo(a))}}else this.memberTraits=0;if(i instanceof e){let s=this.memberTraits;Object.assign(this,i),this.memberTraits=Object.assign({},s,i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??i.memberName;return}if(this.schema=Rn(i),zO(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(i),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){let r=this.prototype.isPrototypeOf(t);return!r&&typeof t=="object"&&t!==null?t.symbol===this.symbol:r}static of(t){let r=typeof t=="function"||typeof t=="object"&&t!==null;if(typeof t=="number"){if(Mp[t])return Mp[t]}else if(typeof t=="string"){if(Lp[t])return Lp[t]}else if(r&&t[Qu.ns])return t[Qu.ns];let n=Rn(t);if(n instanceof e)return n;if(ab(n)){let[i,s]=n;if(i instanceof e)return Object.assign(i.getMergedTraits(),oo(s)),i;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}let o=new e(n);return r?t[Qu.ns]=o:typeof n=="string"?Lp[n]=o:typeof n=="number"?Mp[n]=o:o}getSchema(){let t=this.schema;return Array.isArray(t)&&t[0]===0?t[4]:t}getName(t=!1){let{name:r}=this;return!t&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){let t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){let t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){let t=this.getSchema();if(typeof t!="object")return!1;let r=t[0];return r===3||r===-3||r===4}isUnionSchema(){let t=this.getSchema();return typeof t!="object"?!1:t[0]===4}isBlobSchema(){let t=this.getSchema();return t===21||t===42}isTimestampSchema(){let t=this.getSchema();return typeof t=="number"&&t>=4&&t<=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(){let{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return oo(this.memberTraits)}getOwnTraits(){return oo(this.traits)}getKeySchema(){let[t,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);let n=this.getSchema(),o=t?15:n[4]??0;return Xu([o,0],"key")}getValueSchema(){let t=this.getSchema(),[r,n,o]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i=typeof t=="number"?63&t:t&&typeof t=="object"&&(n||o)?t[3+t[0]]:r?15:void 0;if(i!=null)return Xu([i,0],n?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){let r=this.getSchema();if(this.isStructSchema()&&r[4].includes(t)){let n=r[4].indexOf(t),o=r[5][n];return Xu(ab(o)?o:[o,0],t)}if(this.isDocumentSchema())return Xu([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${t}.`)}getMemberSchemas(){let t={};try{for(let[r,n]of this.structIterator())t[r]=n}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(let[t,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");let t=this.getSchema(),r=t[4].length,n=t[Qu.it];if(n&&r===n.length){yield*n;return}n=Array(r);for(let o=0;o<r;++o){let i=t[4][o],s=Xu([t[5][o],0],i);yield n[o]=[i,s]}t[Qu.it]=n}};ab=e=>Array.isArray(e)&&e.length===2,zO=e=>Array.isArray(e)&&e.length>=5});var Ju,hX,yX,YO=D(()=>{Ni();Ju=class e extends Ct{static symbol=Symbol.for("@smithy/sim");name;schemaRef;traits;symbol=e.symbol},hX=(e,t,r,n)=>Ct.assign(new Ju,{name:t,namespace:e,traits:n,schemaRef:r}),yX=(e,t,r,n)=>Ct.assign(new Ju,{name:t,namespace:e,traits:r,schemaRef:n})});var gX,QO=D(()=>{gX={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}});var bt,XO=D(()=>{bt=class e{namespace;schemas;exceptions;static registries=new Map;constructor(t,r=new Map,n=new Map){this.namespace=t,this.schemas=r,this.exceptions=n}static for(t){return e.registries.has(t)||e.registries.set(t,new e(t)),e.registries.get(t)}copyFrom(t){let{schemas:r,exceptions:n}=this;for(let[o,i]of t.schemas)r.has(o)||r.set(o,i);for(let[o,i]of t.exceptions)n.has(o)||n.set(o,i)}register(t,r){let n=this.normalizeShapeId(t);for(let o of[this,e.for(n.split("#")[0])])o.schemas.set(n,r)}getSchema(t){let r=this.normalizeShapeId(t);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(t,r){let n=t,o=n[1];for(let i of[this,e.for(o)])i.schemas.set(o+"#"+n[2],n),i.exceptions.set(n,r)}getErrorCtor(t){let r=t;return this.exceptions.has(r)?this.exceptions.get(r):e.for(r[1]).exceptions.get(r)}getBaseException(){for(let t of this.exceptions.keys())if(Array.isArray(t)){let[,r,n]=t,o=r+"#"+n;if(o.startsWith("smithy.ts.sdk.synthetic.")&&o.endsWith("ServiceException"))return t}}find(t){return[...this.schemas.values()].find(t)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(t){return t.includes("#")?t:this.namespace+"#"+t}}});var Zu={};Nt(Zu,{ErrorSchema:()=>Np,ListSchema:()=>Rp,MapSchema:()=>Pp,NormalizedSchema:()=>le,OperationSchema:()=>Op,SCHEMA:()=>gX,Schema:()=>Ct,SimpleSchema:()=>Ju,StructureSchema:()=>za,TypeRegistry:()=>bt,deref:()=>Rn,deserializerMiddlewareOption:()=>UO,error:()=>mX,getSchemaSerdePlugin:()=>Vo,isStaticSchema:()=>zO,list:()=>lX,map:()=>dX,op:()=>fX,operation:()=>Yu,serializerMiddlewareOption:()=>jO,sim:()=>hX,simAdapter:()=>yX,simpleSchemaCacheN:()=>Mp,simpleSchemaCacheS:()=>Lp,struct:()=>pX,traitsCache:()=>$p,translateTraits:()=>oo});var We=D(()=>{eb();qO();GO();HO();VO();Dp();WO();KO();Ni();YO();ib();QO();sb();XO()});var _X,JO=D(()=>{_X=(e,t,r=n=>n)=>e});var EX,SX,el,bX,kp,tl,xX,cb,ub,lb,db,vX,TX,ZO,wX,AX,Bp,IX,fb,CX,Ka,pb,DX,RX,PX,eN,tN,OX,NX,qs,mb,Fp,rl,hb=D(()=>{EX=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},SX=e=>{if(e!=null){if(typeof e=="number"){if((e===0||e===1)&&rl.warn(Fp(`Expected boolean, got ${typeof e}: ${e}`)),e===0)return!1;if(e===1)return!0}if(typeof e=="string"){let t=e.toLowerCase();if((t==="false"||t==="true")&&rl.warn(Fp(`Expected boolean, got ${typeof e}: ${e}`)),t==="false")return!1;if(t==="true")return!0}if(typeof e=="boolean")return e;throw new TypeError(`Expected boolean, got ${typeof e}: ${e}`)}},el=e=>{if(e!=null){if(typeof e=="string"){let t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&rl.warn(Fp(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},bX=Math.ceil(34028234663852886e22),kp=e=>{let t=el(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>bX)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},tl=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},xX=tl,cb=e=>db(e,32),ub=e=>db(e,16),lb=e=>db(e,8),db=(e,t)=>{let r=tl(e);if(r!==void 0&&vX(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},vX=(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]}},TX=(e,t)=>{if(e==null)throw t?new TypeError(`Expected a non-null value for ${t}`):new TypeError("Expected a non-null value");return e},ZO=e=>{if(e==null)return;if(typeof e=="object"&&!Array.isArray(e))return e;let t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},wX=e=>{if(e!=null){if(typeof e=="string")return e;if(["boolean","number","bigint"].includes(typeof e))return rl.warn(Fp(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},AX=e=>{if(e==null)return;let t=ZO(e),r=Object.entries(t).filter(([,n])=>n!=null).map(([n])=>n);if(r.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(r.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${r} were not null.`);return t},Bp=e=>el(typeof e=="string"?Ka(e):e),IX=Bp,fb=e=>kp(typeof e=="string"?Ka(e):e),CX=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Ka=e=>{let t=e.match(CX);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},pb=e=>typeof e=="string"?eN(e):el(e),DX=pb,RX=pb,PX=e=>typeof e=="string"?eN(e):kp(e),eN=e=>{switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${e}`)}},tN=e=>tl(typeof e=="string"?Ka(e):e),OX=tN,NX=e=>cb(typeof e=="string"?Ka(e):e),qs=e=>ub(typeof e=="string"?Ka(e):e),mb=e=>lb(typeof e=="string"?Ka(e):e),Fp=e=>String(new TypeError(e).stack||e).split(`
11
20
  `).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
12
- `),"stackTraceWarning"),Ta={warn:console.warn},bY=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],ny=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Mx(e){let t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),s=e.getUTCMinutes(),a=e.getUTCSeconds(),c=i<10?`0${i}`:`${i}`,u=o<10?`0${o}`:`${o}`,d=s<10?`0${s}`:`${s}`,p=a<10?`0${a}`:`${a}`;return`${bY[n]}, ${c} ${ny[r]} ${t} ${u}:${d}:${p} GMT`}L(Mx,"dateToUtcString");var CY=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),wY=L(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=CY.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,i,o,s,a,c,u]=t,d=Mo(Lo(n)),p=$r(i,"month",1,12),m=$r(o,"day",1,31);return wa(d,p,m,{hours:s,minutes:a,seconds:c,fractionalMilliseconds:u})},"parseRfc3339DateTime"),xY=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),AY=L(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=xY.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,i,o,s,a,c,u,d]=t,p=Mo(Lo(n)),m=$r(i,"month",1,12),h=$r(o,"day",1,31),v=wa(p,m,h,{hours:s,minutes:a,seconds:c,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&v.setTime(v.getTime()-jY(d)),v},"parseRfc3339DateTimeWithOffset"),TY=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$/),PY=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$/),IY=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})$/),OY=L(e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=TY.exec(e);if(t){let[r,n,i,o,s,a,c,u]=t;return wa(Mo(Lo(o)),Kh(i),$r(n,"day",1,31),{hours:s,minutes:a,seconds:c,fractionalMilliseconds:u})}if(t=PY.exec(e),t){let[r,n,i,o,s,a,c,u]=t;return MY(wa(DY(o),Kh(i),$r(n,"day",1,31),{hours:s,minutes:a,seconds:c,fractionalMilliseconds:u}))}if(t=IY.exec(e),t){let[r,n,i,o,s,a,c,u]=t;return wa(Mo(Lo(u)),Kh(n),$r(i.trimLeft(),"day",1,31),{hours:o,minutes:s,seconds:a,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),RY=L(e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=ty(e);else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(t)||t===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},"parseEpochTimestamp"),wa=L((e,t,r,n)=>{let i=t-1;return kY(e,i,r),new Date(Date.UTC(e,i,r,$r(n.hours,"hour",0,23),$r(n.minutes,"minute",0,59),$r(n.seconds,"seconds",0,60),BY(n.fractionalMilliseconds)))},"buildDate"),DY=L(e=>{let t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+Mo(Lo(e));return r<t?r+100:r},"parseTwoDigitYear"),NY=50*365*24*60*60*1e3,MY=L(e=>e.getTime()-new Date().getTime()>NY?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,"adjustRfc850Year"),Kh=L(e=>{let t=ny.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},"parseMonthByShortName"),LY=[31,28,31,30,31,30,31,31,30,31,30,31],kY=L((e,t,r)=>{let n=LY[t];if(t===1&&FY(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${ny[t]} in ${e}: ${r}`)},"validateDayOfMonth"),FY=L(e=>e%4===0&&(e%100!==0||e%400===0),"isLeapYear"),$r=L((e,t,r,n)=>{let i=Nx(Lo(e));if(i<r||i>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return i},"parseDateValue"),BY=L(e=>e==null?0:Ox("0."+e)*1e3,"parseMilliseconds"),jY=L(e=>{let t=e[0],r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);let n=Number(e.substring(1,3)),i=Number(e.substring(4,6));return r*(n*60+i)*60*1e3},"parseOffsetToMilliseconds"),Lo=L(e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)},"stripLeadingZeroes"),Lx=class kx extends Error{constructor(t){super(t.message),Object.setPrototypeOf(this,kx.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}};L(Lx,"ServiceException");var qY=Lx,Fx=L((e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,i])=>{(e[n]==null||e[n]==="")&&(e[n]=i)});let r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},"decorateServiceException"),Bx=L(({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{let i=GY(e),o=i.httpStatusCode?i.httpStatusCode+"":void 0,s=new r({name:(t==null?void 0:t.code)||(t==null?void 0:t.Code)||n||o||"UnknownError",$fault:"client",$metadata:i});throw Fx(s,t)},"throwDefaultError"),UY=L(e=>({output:t,parsedBody:r,errorCode:n})=>{Bx({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})},"withBaseException"),GY=L(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"]}),"deserializeMetadata"),$Y=L(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{}}},"loadConfigsForDefaultMode"),Sx=!1,HY=L(e=>{e&&!Sx&&parseInt(e.substring(1,e.indexOf(".")))<14&&(Sx=!0)},"emitWarningIfUnsupportedVersion"),VY=L(e=>{let t=[];for(let r in Jh.AlgorithmId){let n=Jh.AlgorithmId[r];e[n]!==void 0&&t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),zY=L(e=>{let t={};return e.checksumAlgorithms().forEach(r=>{t[r.algorithmId()]=r.checksumConstructor()}),t},"resolveChecksumRuntimeConfig"),WY=L(e=>{let t=e.retryStrategy;return{setRetryStrategy(r){t=r},retryStrategy(){return t}}},"getRetryConfiguration"),KY=L(e=>{let t={};return t.retryStrategy=e.retryStrategy(),t},"resolveRetryRuntimeConfig"),jx=L(e=>({...VY(e),...WY(e)}),"getDefaultExtensionConfiguration"),JY=jx,YY=L(e=>({...zY(e),...KY(e)}),"resolveDefaultRuntimeConfig");function al(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}L(al,"extendedEncodeURIComponent");var XY=L(e=>Array.isArray(e)?e:[e],"getArrayIfSingleItem"),qx=L(e=>{let t="#text";for(let r in e)e.hasOwnProperty(r)&&e[r][t]!==void 0?e[r]=e[r][t]:typeof e[r]=="object"&&e[r]!==null&&(e[r]=qx(e[r]));return e},"getValueFromTextNode"),Pa=L(function(){let e=Object.getPrototypeOf(this).constructor,t=Function.bind.apply(String,[null,...arguments]),r=new t;return Object.setPrototypeOf(r,e.prototype),r},"StringWrapper");Pa.prototype=Object.create(String.prototype,{constructor:{value:Pa,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Pa,String);var Ux=class il extends Pa{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(t){return t instanceof il?t:t instanceof String||typeof t=="string"?new il(t):new il(JSON.stringify(t))}};L(Ux,"LazyJsonString");var QY=Ux;function iy(e,t,r){let n,i,o;if(typeof t>"u"&&typeof r>"u")n={},o=e;else{if(n=e,typeof t=="function")return i=t,o=r,t7(n,i,o);o=t}for(let s of Object.keys(o)){if(!Array.isArray(o[s])){n[s]=o[s];continue}Gx(n,null,o,s)}return n}L(iy,"map");var ZY=L(e=>{let t={};for(let[r,n]of Object.entries(e||{}))t[r]=[,n];return t},"convertMap"),e7=L((e,t)=>{let r={};for(let n in t)Gx(r,e,t,n);return r},"take"),t7=L((e,t,r)=>iy(e,Object.entries(r).reduce((n,[i,o])=>(Array.isArray(o)?n[i]=o:typeof o=="function"?n[i]=[t,o()]:n[i]=[t,o],n),{})),"mapWithFilter"),Gx=L((e,t,r,n)=>{if(t!==null){let s=r[n];typeof s=="function"&&(s=[,s]);let[a=r7,c=n7,u=n]=s;(typeof a=="function"&&a(t[u])||typeof a!="function"&&a)&&(e[n]=c(t[u]));return}let[i,o]=r[n];if(typeof o=="function"){let s,a=i===void 0&&(s=o())!=null,c=typeof i=="function"&&!!i(void 0)||typeof i!="function"&&!!i;a?e[n]=s:c&&(e[n]=o())}else{let s=i===void 0&&o!=null,a=typeof i=="function"&&!!i(o)||typeof i!="function"&&!!i;(s||a)&&(e[n]=o)}},"applyInstruction"),r7=L(e=>e!=null,"nonNullish"),n7=L(e=>e,"pass"),i7=L((e,t,r,n,i,o)=>{if(t!=null&&t[r]!==void 0){let s=n();if(s.length<=0)throw new Error("Empty value provided for input HTTP label: "+r+".");e=e.replace(i,o?s.split("/").map(a=>al(a)).join("/"):al(s))}else throw new Error("No value provided for input HTTP label: "+r+".");return e},"resolvedPath"),o7=L(e=>{if(e!==e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}},"serializeFloat"),Zh=L(e=>{if(e==null)return{};if(Array.isArray(e))return e.filter(t=>t!=null).map(Zh);if(typeof e=="object"){let t={};for(let r of Object.keys(e))e[r]!=null&&(t[r]=Zh(e[r]));return t}return e},"_json");function $x(e,t,r){if(r<=0||!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");let n=e.split(t);if(r===1)return n;let i=[],o="";for(let s=0;s<n.length;s++)o===""?o=n[s]:o+=t+n[s],(s+1)%r===0&&(i.push(o),o="");return o!==""&&i.push(o),i}L($x,"splitEvery")});var Vx=y(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.isStreamingPayload=void 0;var s7=require("stream"),a7=e=>(e==null?void 0:e.body)instanceof s7.Readable||typeof ReadableStream<"u"&&(e==null?void 0:e.body)instanceof ReadableStream;ul.isStreamingPayload=a7});var Hr=y((RIe,cA)=>{var ll=Object.defineProperty,c7=Object.getOwnPropertyDescriptor,u7=Object.getOwnPropertyNames,l7=Object.prototype.hasOwnProperty,Ze=(e,t)=>ll(e,"name",{value:t,configurable:!0}),d7=(e,t)=>{for(var r in t)ll(e,r,{get:t[r],enumerable:!0})},p7=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of u7(t))!l7.call(e,i)&&i!==r&&ll(e,i,{get:()=>t[i],enumerable:!(n=c7(t,i))||n.enumerable});return e},f7=e=>p7(ll({},"__esModule",{value:!0}),e),Wx={};d7(Wx,{AdaptiveRetryStrategy:()=>y7,CONFIG_MAX_ATTEMPTS:()=>sy,CONFIG_RETRY_MODE:()=>rA,ENV_MAX_ATTEMPTS:()=>oy,ENV_RETRY_MODE:()=>tA,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>_7,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>g7,StandardRetryStrategy:()=>Zx,defaultDelayDecider:()=>Jx,defaultRetryDecider:()=>Yx,getOmitRetryHeadersPlugin:()=>E7,getRetryAfterHint:()=>aA,getRetryPlugin:()=>A7,omitRetryHeadersMiddleware:()=>nA,omitRetryHeadersMiddlewareOptions:()=>iA,resolveRetryConfig:()=>v7,retryMiddleware:()=>oA,retryMiddlewareOptions:()=>sA});cA.exports=f7(Wx);var Fo=St(),Kx=(Ch(),_e(bh)),Ge=Ro(),m7=Ze((e,t)=>{let r=e,n=(t==null?void 0:t.noRetryIncrement)??Ge.NO_RETRY_INCREMENT,i=(t==null?void 0:t.retryCost)??Ge.RETRY_COST,o=(t==null?void 0:t.timeoutRetryCost)??Ge.TIMEOUT_RETRY_COST,s=e,a=Ze(p=>p.name==="TimeoutError"?o:i,"getCapacityAmount"),c=Ze(p=>a(p)<=s,"hasRetryTokens");return Object.freeze({hasRetryTokens:c,retrieveRetryTokens:Ze(p=>{if(!c(p))throw new Error("No retry token available");let m=a(p);return s-=m,m},"retrieveRetryTokens"),releaseRetryTokens:Ze(p=>{s+=p??n,s=Math.min(s,r)},"releaseRetryTokens")})},"getDefaultRetryQuota"),Jx=Ze((e,t)=>Math.floor(Math.min(Ge.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e)),"defaultDelayDecider"),Jn=wh(),Yx=Ze(e=>e?(0,Jn.isRetryableByTrait)(e)||(0,Jn.isClockSkewError)(e)||(0,Jn.isThrottlingError)(e)||(0,Jn.isTransientError)(e):!1,"defaultRetryDecider"),Xx=Ze(e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),"asSdkError"),Qx=class{constructor(t,r){this.maxAttemptsProvider=t,this.mode=Ge.RETRY_MODES.STANDARD,this.retryDecider=(r==null?void 0:r.retryDecider)??Yx,this.delayDecider=(r==null?void 0:r.delayDecider)??Jx,this.retryQuota=(r==null?void 0:r.retryQuota)??m7(Ge.INITIAL_RETRY_TOKENS)}shouldRetry(t,r,n){return r<n&&this.retryDecider(t)&&this.retryQuota.hasRetryTokens(t)}async getMaxAttempts(){let t;try{t=await this.maxAttemptsProvider()}catch{t=Ge.DEFAULT_MAX_ATTEMPTS}return t}async retry(t,r,n){let i,o=0,s=0,a=await this.getMaxAttempts(),{request:c}=r;for(Fo.HttpRequest.isInstance(c)&&(c.headers[Ge.INVOCATION_ID_HEADER]=(0,Kx.v4)());;)try{Fo.HttpRequest.isInstance(c)&&(c.headers[Ge.REQUEST_HEADER]=`attempt=${o+1}; max=${a}`),n!=null&&n.beforeRequest&&await n.beforeRequest();let{response:u,output:d}=await t(r);return n!=null&&n.afterRequest&&n.afterRequest(u),this.retryQuota.releaseRetryTokens(i),d.$metadata.attempts=o+1,d.$metadata.totalRetryDelay=s,{response:u,output:d}}catch(u){let d=Xx(u);if(o++,this.shouldRetry(d,o,a)){i=this.retryQuota.retrieveRetryTokens(d);let p=this.delayDecider((0,Jn.isThrottlingError)(d)?Ge.THROTTLING_RETRY_DELAY_BASE:Ge.DEFAULT_RETRY_DELAY_BASE,o),m=h7(d.$response),h=Math.max(m||0,p);s+=h,await new Promise(v=>setTimeout(v,h));continue}throw d.$metadata||(d.$metadata={}),d.$metadata.attempts=o,d.$metadata.totalRetryDelay=s,d}}};Ze(Qx,"StandardRetryStrategy");var Zx=Qx,h7=Ze(e=>{if(!Fo.HttpResponse.isInstance(e))return;let t=Object.keys(e.headers).find(o=>o.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],n=Number(r);return Number.isNaN(n)?new Date(r).getTime()-Date.now():n*1e3},"getDelayFromRetryAfterHeader"),eA=class extends Zx{constructor(t,r){let{rateLimiter:n,...i}=r??{};super(t,i),this.rateLimiter=n??new Ge.DefaultRateLimiter,this.mode=Ge.RETRY_MODES.ADAPTIVE}async retry(t,r){return super.retry(t,r,{beforeRequest:async()=>this.rateLimiter.getSendToken(),afterRequest:n=>{this.rateLimiter.updateClientSendingRate(n)}})}};Ze(eA,"AdaptiveRetryStrategy");var y7=eA,zx=Ur(),oy="AWS_MAX_ATTEMPTS",sy="max_attempts",_7={environmentVariableSelector:e=>{let t=e[oy];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${oy} mast be a number, got "${t}"`);return r},configFileSelector:e=>{let t=e[sy];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${sy} mast be a number, got "${t}"`);return r},default:Ge.DEFAULT_MAX_ATTEMPTS},v7=Ze(e=>{let{retryStrategy:t}=e,r=(0,zx.normalizeProvider)(e.maxAttempts??Ge.DEFAULT_MAX_ATTEMPTS);return{...e,maxAttempts:r,retryStrategy:async()=>t||(await(0,zx.normalizeProvider)(e.retryMode)()===Ge.RETRY_MODES.ADAPTIVE?new Ge.AdaptiveRetryStrategy(r):new Ge.StandardRetryStrategy(r))}},"resolveRetryConfig"),tA="AWS_RETRY_MODE",rA="retry_mode",g7={environmentVariableSelector:e=>e[tA],configFileSelector:e=>e[rA],default:Ge.DEFAULT_RETRY_MODE},nA=Ze(()=>e=>async t=>{let{request:r}=t;return Fo.HttpRequest.isInstance(r)&&(delete r.headers[Ge.INVOCATION_ID_HEADER],delete r.headers[Ge.REQUEST_HEADER]),e(t)},"omitRetryHeadersMiddleware"),iA={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},E7=Ze(e=>({applyToStack:t=>{t.addRelativeTo(nA(),iA)}}),"getOmitRetryHeadersPlugin"),S7=Be(),b7=Vx(),oA=Ze(e=>(t,r)=>async n=>{var i;let o=await e.retryStrategy(),s=await e.maxAttempts();if(C7(o)){o=o;let a=await o.acquireInitialRetryToken(r.partition_id),c=new Error,u=0,d=0,{request:p}=n,m=Fo.HttpRequest.isInstance(p);for(m&&(p.headers[Ge.INVOCATION_ID_HEADER]=(0,Kx.v4)());;)try{m&&(p.headers[Ge.REQUEST_HEADER]=`attempt=${u+1}; max=${s}`);let{response:h,output:v}=await t(n);return o.recordSuccess(a),v.$metadata.attempts=u+1,v.$metadata.totalRetryDelay=d,{response:h,output:v}}catch(h){let v=w7(h);if(c=Xx(h),m&&(0,b7.isStreamingPayload)(p))throw(i=r.logger instanceof S7.NoOpLogger?console:r.logger)==null||i.warn("An error was encountered in a non-retryable streaming request."),c;try{a=await o.refreshRetryTokenForRetry(a,v)}catch{throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=u+1,c.$metadata.totalRetryDelay=d,c}u=a.getRetryCount();let _=a.getRetryDelay();d+=_,await new Promise(g=>setTimeout(g,_))}}else return o=o,o!=null&&o.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",o.mode]]),o.retry(t,n)},"retryMiddleware"),C7=Ze(e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u","isRetryStrategyV2"),w7=Ze(e=>{let t={error:e,errorType:x7(e)},r=aA(e.$response);return r&&(t.retryAfterHint=r),t},"getRetryErrorInfo"),x7=Ze(e=>(0,Jn.isThrottlingError)(e)?"THROTTLING":(0,Jn.isTransientError)(e)?"TRANSIENT":(0,Jn.isServerError)(e)?"SERVER_ERROR":"CLIENT_ERROR","getRetryErrorType"),sA={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},A7=Ze(e=>({applyToStack:t=>{t.add(oA(e),sA)}}),"getRetryPlugin"),aA=Ze(e=>{if(!Fo.HttpResponse.isInstance(e))return;let t=Object.keys(e.headers).find(o=>o.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],n=Number(r);return Number.isNaN(n)?new Date(r):new Date(n*1e3)},"getRetryAfterHint")});var bt=y((FIe,PA)=>{var pl=Object.defineProperty,T7=Object.getOwnPropertyDescriptor,P7=Object.getOwnPropertyNames,I7=Object.prototype.hasOwnProperty,je=(e,t)=>pl(e,"name",{value:t,configurable:!0}),O7=(e,t)=>{for(var r in t)pl(e,r,{get:t[r],enumerable:!0})},R7=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of P7(t))!I7.call(e,i)&&i!==r&&pl(e,i,{get:()=>t[i],enumerable:!(n=T7(t,i))||n.enumerable});return e},D7=e=>R7(pl({},"__esModule",{value:!0}),e),uA={};O7(uA,{DefaultIdentityProviderConfig:()=>U7,EXPIRATION_MS:()=>bA,HttpApiKeyAuthSigner:()=>G7,HttpBearerAuthSigner:()=>$7,NoAuthSigner:()=>H7,RequestBuilder:()=>AA,createIsIdentityExpiredFunction:()=>SA,createPaginator:()=>TA,doesIdentityRequireRefresh:()=>CA,getHttpAuthSchemeEndpointRuleSetPlugin:()=>M7,getHttpAuthSchemePlugin:()=>k7,getHttpSigningPlugin:()=>q7,getSmithyContext:()=>W7,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>pA,httpAuthSchemeMiddleware:()=>ay,httpAuthSchemeMiddlewareOptions:()=>fA,httpSigningMiddleware:()=>hA,httpSigningMiddlewareOptions:()=>yA,isIdentityExpired:()=>V7,memoizeIdentityProvider:()=>z7,normalizeProvider:()=>K7,requestBuilder:()=>wA});PA.exports=D7(uA);var lA=Ur();function dA(e){let t=new Map;for(let r of e)t.set(r.schemeId,r);return t}je(dA,"convertHttpAuthSchemesToMap");var ay=je((e,t)=>(r,n)=>async i=>{var o;let s=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,n,i.input)),a=dA(e.httpAuthSchemes),c=(0,lA.getSmithyContext)(n),u=[];for(let d of s){let p=a.get(d.schemeId);if(!p){u.push(`HttpAuthScheme \`${d.schemeId}\` was not enabled for this service.`);continue}let m=p.identityProvider(await t.identityProviderConfigProvider(e));if(!m){u.push(`HttpAuthScheme \`${d.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:h={},signingProperties:v={}}=((o=d.propertiesExtractor)==null?void 0:o.call(d,e,n))||{};d.identityProperties=Object.assign(d.identityProperties||{},h),d.signingProperties=Object.assign(d.signingProperties||{},v),c.selectedHttpAuthScheme={httpAuthOption:d,identity:await m(d.identityProperties),signer:p.signer};break}if(!c.selectedHttpAuthScheme)throw new Error(u.join(`
13
- `));return r(i)},"httpAuthSchemeMiddleware"),N7=Vi(),pA={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:N7.endpointMiddlewareOptions.name},M7=je((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(ay(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),pA)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),L7=Hi(),fA={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:L7.serializerMiddlewareOption.name},k7=je((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(ay(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),fA)}}),"getHttpAuthSchemePlugin"),mA=St(),F7=je(e=>t=>{throw t},"defaultErrorHandler"),B7=je((e,t)=>{},"defaultSuccessHandler"),hA=je(e=>(t,r)=>async n=>{if(!mA.HttpRequest.isInstance(n.request))return t(n);let o=(0,lA.getSmithyContext)(r).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:s={}},identity:a,signer:c}=o,u=await t({...n,request:await c.sign(n.request,a,s)}).catch((c.errorHandler||F7)(s));return(c.successHandler||B7)(u.response,s),u},"httpSigningMiddleware"),j7=Hr(),yA={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:j7.retryMiddlewareOptions.name},q7=je(e=>({applyToStack:t=>{t.addRelativeTo(hA(e),yA)}}),"getHttpSigningPlugin"),_A=class{constructor(t){this.authSchemes=new Map;for(let[r,n]of Object.entries(t))n!==void 0&&this.authSchemes.set(r,n)}getIdentityProvider(t){return this.authSchemes.get(t)}};je(_A,"DefaultIdentityProviderConfig");var U7=_A,dl=sr(),vA=class{async sign(t,r,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(!r.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let i=t.clone();if(n.in===dl.HttpApiKeyAuthLocation.QUERY)i.query[n.name]=r.apiKey;else if(n.in===dl.HttpApiKeyAuthLocation.HEADER)i.headers[n.name]=n.scheme?`${n.scheme} ${r.apiKey}`:r.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+n.in+"`");return i}};je(vA,"HttpApiKeyAuthSigner");var G7=vA,gA=class{async sign(t,r,n){let i=t.clone();if(!r.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return i.headers.Authorization=`Bearer ${r.token}`,i}};je(gA,"HttpBearerAuthSigner");var $7=gA,EA=class{async sign(t,r,n){return t}};je(EA,"NoAuthSigner");var H7=EA,SA=je(e=>t=>CA(t)&&t.expiration.getTime()-Date.now()<e,"createIsIdentityExpiredFunction"),bA=3e5,V7=SA(bA),CA=je(e=>e.expiration!==void 0,"doesIdentityRequireRefresh"),z7=je((e,t,r)=>{if(e===void 0)return;let n=typeof e!="function"?async()=>Promise.resolve(e):e,i,o,s,a=!1,c=je(async u=>{o||(o=n(u));try{i=await o,s=!0,a=!1}finally{o=void 0}return i},"coalesceProvider");return t===void 0?async u=>((!s||u!=null&&u.forceRefresh)&&(i=await c(u)),i):async u=>((!s||u!=null&&u.forceRefresh)&&(i=await c(u)),a?i:r(i)?(t(i)&&await c(u),i):(a=!0,i))},"memoizeIdentityProvider"),W7=je(e=>e[dl.SMITHY_CONTEXT_KEY]||(e[dl.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),K7=je(e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t},"normalizeProvider"),J7=Be();function wA(e,t){return new AA(e,t)}je(wA,"requestBuilder");var xA=class{constructor(t,r){this.input=t,this.context=r,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:t,protocol:r="https",port:n,path:i}=await this.context.endpoint();this.path=i;for(let o of this.resolvePathStack)o(this.path);return new mA.HttpRequest({protocol:r,hostname:this.hostname||t,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(t){return this.hostname=t,this}bp(t){return this.resolvePathStack.push(r=>{this.path=`${r!=null&&r.endsWith("/")?r.slice(0,-1):r||""}`+t}),this}p(t,r,n,i){return this.resolvePathStack.push(o=>{this.path=(0,J7.resolvedPath)(o,this.input,t,r,n,i)}),this}h(t){return this.headers=t,this}q(t){return this.query=t,this}b(t){return this.body=t,this}m(t){return this.method=t,this}};je(xA,"RequestBuilder");var AA=xA,Y7=je(async(e,t,r,...n)=>await t.send(new e(r),...n),"makePagedClientRequest");function TA(e,t,r,n,i){return je(async function*(s,a,...c){let u=s.startingToken||void 0,d=!0,p;for(;d;){if(a[r]=u,i&&(a[i]=a[i]??s.pageSize),s.client instanceof e)p=await Y7(t,s.client,a,...c);else throw new Error(`Invalid client, expected instance of ${e.name}`);yield p;let m=u;u=X7(p,n),d=!!(u&&(!s.stopOnSameToken||u!==m))}return void 0},"paginateOperation")}je(TA,"createPaginator");var X7=je((e,t)=>{let r=e,n=t.split(".");for(let i of n){if(!r||typeof r!="object")return;r=r[i]}return r},"get")});var Ia=y((BIe,NA)=>{var fl=Object.defineProperty,Q7=Object.getOwnPropertyDescriptor,Z7=Object.getOwnPropertyNames,eX=Object.prototype.hasOwnProperty,OA=(e,t)=>fl(e,"name",{value:t,configurable:!0}),tX=(e,t)=>{for(var r in t)fl(e,r,{get:t[r],enumerable:!0})},rX=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Z7(t))!eX.call(e,i)&&i!==r&&fl(e,i,{get:()=>t[i],enumerable:!(n=Q7(t,i))||n.enumerable});return e},nX=e=>rX(fl({},"__esModule",{value:!0}),e),RA={};tX(RA,{contentLengthMiddleware:()=>cy,contentLengthMiddlewareOptions:()=>DA,getContentLengthPlugin:()=>oX});NA.exports=nX(RA);var iX=St(),IA="content-length";function cy(e){return t=>async r=>{let n=r.request;if(iX.HttpRequest.isInstance(n)){let{body:i,headers:o}=n;if(i&&Object.keys(o).map(s=>s.toLowerCase()).indexOf(IA)===-1)try{let s=e(i);n.headers={...n.headers,[IA]:String(s)}}catch{}}return t({...r,request:n})}}OA(cy,"contentLengthMiddleware");var DA={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},oX=OA(e=>({applyToStack:t=>{t.add(cy(e.bodyLengthChecker),DA)}}),"getContentLengthPlugin")});var qA=y((jIe,jA)=>{var ml=Object.defineProperty,sX=Object.getOwnPropertyDescriptor,aX=Object.getOwnPropertyNames,cX=Object.prototype.hasOwnProperty,MA=(e,t)=>ml(e,"name",{value:t,configurable:!0}),uX=(e,t)=>{for(var r in t)ml(e,r,{get:t[r],enumerable:!0})},lX=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of aX(t))!cX.call(e,i)&&i!==r&&ml(e,i,{get:()=>t[i],enumerable:!(n=sX(t,i))||n.enumerable});return e},dX=e=>lX(ml({},"__esModule",{value:!0}),e),LA={};uX(LA,{fromHex:()=>FA,toHex:()=>BA});jA.exports=dX(LA);var kA={},uy={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),kA[e]=t,uy[t]=e}function FA(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){let n=e.slice(r,r+2).toLowerCase();if(n in uy)t[r/2]=uy[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}MA(FA,"fromHex");function BA(e){let t="";for(let r=0;r<e.byteLength;r++)t+=kA[e[r]];return t}MA(BA,"toHex")});var aT=y((GIe,sT)=>{var gl=Object.defineProperty,pX=Object.getOwnPropertyDescriptor,fX=Object.getOwnPropertyNames,mX=Object.prototype.hasOwnProperty,et=(e,t)=>gl(e,"name",{value:t,configurable:!0}),hX=(e,t)=>{for(var r in t)gl(e,r,{get:t[r],enumerable:!0})},yX=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fX(t))!mX.call(e,i)&&i!==r&&gl(e,i,{get:()=>t[i],enumerable:!(n=pX(t,i))||n.enumerable});return e},_X=e=>yX(gl({},"__esModule",{value:!0}),e),VA={};hX(VA,{SignatureV4:()=>HX,clearCredentialCache:()=>MX,createScope:()=>_l,getCanonicalHeaders:()=>fy,getCanonicalQuery:()=>ZA,getPayloadHash:()=>vl,getSigningKey:()=>QA,moveHeadersToQuery:()=>iT,prepareRequest:()=>hy});sT.exports=_X(VA);var UA=Ur(),ly=ur(),vX="X-Amz-Algorithm",gX="X-Amz-Credential",zA="X-Amz-Date",EX="X-Amz-SignedHeaders",SX="X-Amz-Expires",WA="X-Amz-Signature",KA="X-Amz-Security-Token",JA="authorization",YA=zA.toLowerCase(),bX="date",CX=[JA,YA,bX],wX=WA.toLowerCase(),py="x-amz-content-sha256",xX=KA.toLowerCase(),AX={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},TX=/^proxy-/,PX=/^sec-/,dy="AWS4-HMAC-SHA256",IX="AWS4-HMAC-SHA256-PAYLOAD",OX="UNSIGNED-PAYLOAD",RX=50,XA="aws4_request",DX=3600*24*7,Yn=qA(),NX=ur(),Bo={},yl=[],_l=et((e,t,r)=>`${e}/${t}/${r}/${XA}`,"createScope"),QA=et(async(e,t,r,n,i)=>{let o=await GA(e,t.secretAccessKey,t.accessKeyId),s=`${r}:${n}:${i}:${(0,Yn.toHex)(o)}:${t.sessionToken}`;if(s in Bo)return Bo[s];for(yl.push(s);yl.length>RX;)delete Bo[yl.shift()];let a=`AWS4${t.secretAccessKey}`;for(let c of[r,n,i,XA])a=await GA(e,a,c);return Bo[s]=a},"getSigningKey"),MX=et(()=>{yl.length=0,Object.keys(Bo).forEach(e=>{delete Bo[e]})},"clearCredentialCache"),GA=et((e,t,r)=>{let n=new e(t);return n.update((0,NX.toUint8Array)(r)),n.digest()},"hmac"),fy=et(({headers:e},t,r)=>{let n={};for(let i of Object.keys(e).sort()){if(e[i]==null)continue;let o=i.toLowerCase();(o in AX||t!=null&&t.has(o)||TX.test(o)||PX.test(o))&&(!r||r&&!r.has(o))||(n[o]=e[i].trim().replace(/\s+/g," "))}return n},"getCanonicalHeaders"),Oa=kh(),ZA=et(({query:e={}})=>{let t=[],r={};for(let n of Object.keys(e).sort()){if(n.toLowerCase()===wX)continue;t.push(n);let i=e[n];typeof i=="string"?r[n]=`${(0,Oa.escapeUri)(n)}=${(0,Oa.escapeUri)(i)}`:Array.isArray(i)&&(r[n]=i.slice(0).reduce((o,s)=>o.concat([`${(0,Oa.escapeUri)(n)}=${(0,Oa.escapeUri)(s)}`]),[]).sort().join("&"))}return t.map(n=>r[n]).filter(n=>n).join("&")},"getCanonicalQuery"),LX=Oh(),kX=ur(),vl=et(async({headers:e,body:t},r)=>{for(let n of Object.keys(e))if(n.toLowerCase()===py)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||(0,LX.isArrayBuffer)(t)){let n=new r;return n.update((0,kX.toUint8Array)(t)),(0,Yn.toHex)(await n.digest())}return OX},"getPayloadHash"),$A=ur(),eT=class{format(t){let r=[];for(let o of Object.keys(t)){let s=(0,$A.fromUtf8)(o);r.push(Uint8Array.from([s.byteLength]),s,this.formatHeaderValue(t[o]))}let n=new Uint8Array(r.reduce((o,s)=>o+s.byteLength,0)),i=0;for(let o of r)n.set(o,i),i+=o.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":let r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":let i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":let o=new DataView(new ArrayBuffer(3+t.value.byteLength));o.setUint8(0,6),o.setUint16(1,t.value.byteLength,!1);let s=new Uint8Array(o.buffer);return s.set(t.value,3),s;case"string":let a=(0,$A.fromUtf8)(t.value),c=new DataView(new ArrayBuffer(3+a.byteLength));c.setUint8(0,7),c.setUint16(1,a.byteLength,!1);let u=new Uint8Array(c.buffer);return u.set(a,3),u;case"timestamp":let d=new Uint8Array(9);return d[0]=8,d.set(jX.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!BX.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);let p=new Uint8Array(17);return p[0]=9,p.set((0,Yn.fromHex)(t.value.replace(/\-/g,"")),1),p}}};et(eT,"HeaderFormatter");var FX=eT,BX=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,tT=class rT{constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let r=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(t));n>-1&&i>0;n--,i/=256)r[n]=i;return t<0&&my(r),new rT(r)}valueOf(){let t=this.bytes.slice(0),r=t[0]&128;return r&&my(t),parseInt((0,Yn.toHex)(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};et(tT,"Int64");var jX=tT;function my(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}et(my,"negate");var qX=et((e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},"hasHeader"),nT=et(({headers:e,query:t,...r})=>({...r,headers:{...e},query:t?UX(t):void 0}),"cloneRequest"),UX=et(e=>Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{}),"cloneQuery"),iT=et((e,t={})=>{var r;let{headers:n,query:i={}}=typeof e.clone=="function"?e.clone():nT(e);for(let o of Object.keys(n)){let s=o.toLowerCase();s.slice(0,6)==="x-amz-"&&!((r=t.unhoistableHeaders)!=null&&r.has(s))&&(i[o]=n[o],delete n[o])}return{...e,headers:n,query:i}},"moveHeadersToQuery"),hy=et(e=>{e=typeof e.clone=="function"?e.clone():nT(e);for(let t of Object.keys(e.headers))CX.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},"prepareRequest"),GX=et(e=>$X(e).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),$X=et(e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e,"toDate"),oT=class{constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:s=!0}){this.headerFormatter=new FX,this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=(0,UA.normalizeProvider)(n),this.credentialProvider=(0,UA.normalizeProvider)(r)}async presign(t,r={}){let{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:o,unhoistableHeaders:s,signableHeaders:a,signingRegion:c,signingService:u}=r,d=await this.credentialProvider();this.validateResolvedCredentials(d);let p=c??await this.regionProvider(),{longDate:m,shortDate:h}=hl(n);if(i>DX)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let v=_l(h,p,u??this.service),_=iT(hy(t),{unhoistableHeaders:s});d.sessionToken&&(_.query[KA]=d.sessionToken),_.query[vX]=dy,_.query[gX]=`${d.accessKeyId}/${v}`,_.query[zA]=m,_.query[SX]=i.toString(10);let g=fy(_,o,a);return _.query[EX]=HA(g),_.query[WA]=await this.getSignature(m,v,this.getSigningKey(d,p,h,u),this.createCanonicalRequest(_,g,await vl(t,this.sha256))),_}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:n=new Date,priorSignature:i,signingRegion:o,signingService:s}){let a=o??await this.regionProvider(),{shortDate:c,longDate:u}=hl(n),d=_l(c,a,s??this.service),p=await vl({headers:{},body:r},this.sha256),m=new this.sha256;m.update(t);let h=(0,Yn.toHex)(await m.digest()),v=[IX,u,d,i,h,p].join(`
14
- `);return this.signString(v,{signingDate:n,signingRegion:a,signingService:s})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:i,priorSignature:t.priorSignature}).then(s=>({message:t.message,signature:s}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:i}={}){let o=await this.credentialProvider();this.validateResolvedCredentials(o);let s=n??await this.regionProvider(),{shortDate:a}=hl(r),c=new this.sha256(await this.getSigningKey(o,s,a,i));return c.update((0,ly.toUint8Array)(t)),(0,Yn.toHex)(await c.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:o,signingService:s}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let c=o??await this.regionProvider(),u=hy(t),{longDate:d,shortDate:p}=hl(r),m=_l(p,c,s??this.service);u.headers[YA]=d,a.sessionToken&&(u.headers[xX]=a.sessionToken);let h=await vl(u,this.sha256);!qX(py,u.headers)&&this.applyChecksum&&(u.headers[py]=h);let v=fy(u,i,n),_=await this.getSignature(d,m,this.getSigningKey(a,c,p,s),this.createCanonicalRequest(u,v,h));return u.headers[JA]=`${dy} Credential=${a.accessKeyId}/${m}, SignedHeaders=${HA(v)}, Signature=${_}`,u}createCanonicalRequest(t,r,n){let i=Object.keys(r).sort();return`${t.method}
21
+ `),rl={warn:console.warn}});function ol(e){let t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),i=e.getUTCHours(),s=e.getUTCMinutes(),a=e.getUTCSeconds(),c=o<10?`0${o}`:`${o}`,l=i<10?`0${i}`:`${i}`,d=s<10?`0${s}`:`${s}`,f=a<10?`0${a}`:`${a}`;return`${$X[n]}, ${c} ${gb[r]} ${t} ${l}:${d}:${f} GMT`}var $X,gb,MX,LX,kX,_b,FX,BX,UX,Eb,Sb,nl,jX,qX,GX,yb,HX,VX,WX,io,zX,KX,Ya,rN=D(()=>{hb();$X=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],gb=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];MX=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),LX=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=MX.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,i,s,a,c,l]=t,d=qs(Ya(n)),f=io(o,"month",1,12),m=io(i,"day",1,31);return nl(d,f,m,{hours:s,minutes:a,seconds:c,fractionalMilliseconds:l})},kX=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),_b=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let t=kX.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,o,i,s,a,c,l,d]=t,f=qs(Ya(n)),m=io(o,"month",1,12),h=io(i,"day",1,31),_=nl(f,m,h,{hours:s,minutes:a,seconds:c,fractionalMilliseconds:l});return d.toUpperCase()!="Z"&&_.setTime(_.getTime()-KX(d)),_},FX=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$/),BX=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$/),UX=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})$/),Eb=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=FX.exec(e);if(t){let[r,n,o,i,s,a,c,l]=t;return nl(qs(Ya(i)),yb(o),io(n,"day",1,31),{hours:s,minutes:a,seconds:c,fractionalMilliseconds:l})}if(t=BX.exec(e),t){let[r,n,o,i,s,a,c,l]=t;return GX(nl(jX(i),yb(o),io(n,"day",1,31),{hours:s,minutes:a,seconds:c,fractionalMilliseconds:l}))}if(t=UX.exec(e),t){let[r,n,o,i,s,a,c,l]=t;return nl(qs(Ya(l)),yb(n),io(o.trimLeft(),"day",1,31),{hours:i,minutes:s,seconds:a,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},Sb=e=>{if(e==null)return;let t;if(typeof e=="number")t=e;else if(typeof e=="string")t=Bp(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===1/0||t===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(t*1e3))},nl=(e,t,r,n)=>{let o=t-1;return VX(e,o,r),new Date(Date.UTC(e,o,r,io(n.hours,"hour",0,23),io(n.minutes,"minute",0,59),io(n.seconds,"seconds",0,60),zX(n.fractionalMilliseconds)))},jX=e=>{let t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+qs(Ya(e));return r<t?r+100:r},qX=50*365*24*60*60*1e3,GX=e=>e.getTime()-new Date().getTime()>qX?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,yb=e=>{let t=gb.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},HX=[31,28,31,30,31,30,31,31,30,31,30,31],VX=(e,t,r)=>{let n=HX[t];if(t===1&&WX(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${gb[t]} in ${e}: ${r}`)},WX=e=>e%4===0&&(e%100!==0||e%400===0),io=(e,t,r,n)=>{let o=mb(Ya(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},zX=e=>e==null?0:fb("0."+e)*1e3,KX=e=>{let t=e[0],r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);let n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1e3},Ya=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)}});var $i={};Nt($i,{__addDisposableResource:()=>vN,__assign:()=>Up,__asyncDelegator:()=>hN,__asyncGenerator:()=>mN,__asyncValues:()=>yN,__await:()=>Qa,__awaiter:()=>cN,__classPrivateFieldGet:()=>SN,__classPrivateFieldIn:()=>xN,__classPrivateFieldSet:()=>bN,__createBinding:()=>qp,__decorate:()=>iN,__disposeResources:()=>TN,__esDecorate:()=>YX,__exportStar:()=>lN,__extends:()=>nN,__generator:()=>uN,__importDefault:()=>EN,__importStar:()=>_N,__makeTemplateObject:()=>gN,__metadata:()=>aN,__param:()=>sN,__propKey:()=>XX,__read:()=>xb,__rest:()=>oN,__runInitializers:()=>QX,__setFunctionName:()=>JX,__spread:()=>dN,__spreadArray:()=>pN,__spreadArrays:()=>fN,__values:()=>jp,default:()=>tJ});function nN(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");bb(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function oN(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function iN(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function sN(e,t){return function(r,n){t(r,n,e)}}function YX(e,t,r,n,o,i){function s(I){if(I!==void 0&&typeof I!="function")throw new TypeError("Function expected");return I}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f,m=!1,h=r.length-1;h>=0;h--){var _={};for(var E in n)_[E]=E==="access"?{}:n[E];for(var E in n.access)_.access[E]=n.access[E];_.addInitializer=function(I){if(m)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(I||null))};var T=(0,r[h])(a==="accessor"?{get:d.get,set:d.set}:d[c],_);if(a==="accessor"){if(T===void 0)continue;if(T===null||typeof T!="object")throw new TypeError("Object expected");(f=s(T.get))&&(d.get=f),(f=s(T.set))&&(d.set=f),(f=s(T.init))&&o.unshift(f)}else(f=s(T))&&(a==="field"?o.unshift(f):d[c]=f)}l&&Object.defineProperty(l,n.name,d),m=!0}function QX(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function XX(e){return typeof e=="symbol"?e:"".concat(e)}function JX(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function aN(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function cN(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(d){try{l(n.next(d))}catch(f){s(f)}}function c(d){try{l(n.throw(d))}catch(f){s(f)}}function l(d){d.done?i(d.value):o(d.value).then(a,c)}l((n=n.apply(e,t||[])).next())})}function uN(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(d){return c([l,d])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(r=0)),r;)try{if(n=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,o=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1],i=l;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(l);break}i[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(d){l=[6,d],o=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function lN(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&qp(t,e,r)}function jp(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function xb(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function dN(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(xb(arguments[t]));return e}function fN(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n}function pN(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function Qa(e){return this instanceof Qa?(this.v=e,this):new Qa(e)}function mN(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o;function s(m){n[m]&&(o[m]=function(h){return new Promise(function(_,E){i.push([m,h,_,E])>1||a(m,h)})})}function a(m,h){try{c(n[m](h))}catch(_){f(i[0][3],_)}}function c(m){m.value instanceof Qa?Promise.resolve(m.value.v).then(l,d):f(i[0][2],m)}function l(m){a("next",m)}function d(m){a("throw",m)}function f(m,h){m(h),i.shift(),i.length&&a(i[0][0],i[0][1])}}function hN(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(s){return(r=!r)?{value:Qa(e[o](s)),done:!1}:i?i(s):s}:i}}function yN(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof jp=="function"?jp(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}function gN(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _N(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&qp(t,e,r);return ZX(t,e),t}function EN(e){return e&&e.__esModule?e:{default:e}}function SN(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function bN(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function xN(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function vN(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function TN(e){function t(n){e.error=e.hasError?new eJ(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}function r(){for(;e.stack.length;){var n=e.stack.pop();try{var o=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(o).then(r,function(i){return t(i),r()})}catch(i){t(i)}}if(e.hasError)throw e.error}return r()}var bb,Up,qp,ZX,eJ,tJ,Mi=D(()=>{bb=function(e,t){return bb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},bb(e,t)};Up=function(){return Up=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Up.apply(this,arguments)};qp=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});ZX=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t};eJ=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};tJ={__extends:nN,__assign:Up,__rest:oN,__decorate:iN,__param:sN,__metadata:aN,__awaiter:cN,__generator:uN,__createBinding:qp,__exportStar:lN,__values:jp,__read:xb,__spread:dN,__spreadArrays:fN,__spreadArray:pN,__await:Qa,__asyncGenerator:mN,__asyncDelegator:hN,__asyncValues:yN,__makeTemplateObject:gN,__importStar:_N,__importDefault:EN,__classPrivateFieldGet:SN,__classPrivateFieldSet:bN,__classPrivateFieldIn:xN,__addDisposableResource:vN,__disposeResources:TN}});var AN=b(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});Gp.randomUUID=void 0;var rJ=(Mi(),ie($i)),wN=rJ.__importDefault(require("crypto"));Gp.randomUUID=wN.default.randomUUID.bind(wN.default)});var vb=b(CN=>{"use strict";var IN=AN(),sr=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),nJ=()=>{if(IN.randomUUID)return IN.randomUUID();let e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,sr[e[0]]+sr[e[1]]+sr[e[2]]+sr[e[3]]+"-"+sr[e[4]]+sr[e[5]]+"-"+sr[e[6]]+sr[e[7]]+"-"+sr[e[8]]+sr[e[9]]+"-"+sr[e[10]]+sr[e[11]]+sr[e[12]]+sr[e[13]]+sr[e[14]]+sr[e[15]]};CN.v4=nJ});var ln,DN=D(()=>{ln=C(vb())});var vr,RN=D(()=>{vr=function(t){return Object.assign(new String(t),{deserializeJSON(){return JSON.parse(String(t))},toString(){return String(t)},toJSON(){return String(t)}})};vr.from=e=>e&&typeof e=="object"&&(e instanceof vr||"deserializeJSON"in e)?e:typeof e=="string"||Object.getPrototypeOf(e)===String.prototype?vr(String(e)):vr(JSON.stringify(e));vr.fromObject=vr.from});function Tb(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}var PN=D(()=>{});function Wo(e,t,r){let n=Number(e);if(n<t||n>r)throw new Error(`Value ${n} out of range [${t}, ${r}]`)}var wb,Ab,Ib,ON,NN,oJ,iJ,sJ,aJ,cJ,Xa,Cb,Db,$N=D(()=>{wb="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Ab="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",Ib="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",ON="(\\d?\\d)",NN="(\\d{4})",oJ=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),iJ=new RegExp(`^${wb}, ${ON} ${Ab} ${NN} ${Ib} GMT$`),sJ=new RegExp(`^${wb}, ${ON}-${Ab}-(\\d\\d) ${Ib} GMT$`),aJ=new RegExp(`^${wb} ${Ab} ( [1-9]|\\d\\d) ${Ib} ${NN}$`),cJ=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Xa=e=>{if(e==null)return;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 typeof e=="object"&&e.tag===1&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(t*1e3))},Cb=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC3339 timestamps must be strings");let t=oJ.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);let[,r,n,o,i,s,a,,c,l]=t;Wo(n,1,12),Wo(o,1,31),Wo(i,0,23),Wo(s,0,59),Wo(a,0,60);let d=new Date(Date.UTC(Number(r),Number(n)-1,Number(o),Number(i),Number(s),Number(a),Number(c)?Math.round(parseFloat(`0.${c}`)*1e3):0));if(d.setUTCFullYear(Number(r)),l.toUpperCase()!="Z"){let[,f,m,h]=/([+-])(\d\d):(\d\d)/.exec(l)||[void 0,"+",0,0],_=f==="-"?1:-1;d.setTime(d.getTime()+_*(Number(m)*60*60*1e3+Number(h)*60*1e3))}return d},Db=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC7231 timestamps must be strings.");let t,r,n,o,i,s,a,c;if((c=iJ.exec(e))?[,t,r,n,o,i,s,a]=c:(c=sJ.exec(e))?([,t,r,n,o,i,s,a]=c,n=(Number(n)+1900).toString()):(c=aJ.exec(e))&&([,r,t,o,i,s,a,n]=c),n&&s){let l=Date.UTC(Number(n),cJ.indexOf(r),Number(t),Number(o),Number(i),Number(s),a?Math.round(parseFloat(`0.${a}`)*1e3):0);Wo(t,1,31),Wo(o,0,23),Wo(i,0,59),Wo(s,0,60);let d=new Date(l);return d.setUTCFullYear(Number(n)),d}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)}});function Rb(e,t,r){if(r<=0||!Number.isInteger(r))throw new Error("Invalid number of delimiters ("+r+") for splitEvery.");let n=e.split(t);if(r===1)return n;let o=[],i="";for(let s=0;s<n.length;s++)i===""?i=n[s]:i+=t+n[s],(s+1)%r===0&&(o.push(i),i="");return i!==""&&o.push(i),o}var MN=D(()=>{});var il,LN=D(()=>{il=e=>{let t=e.length,r=[],n=!1,o,i=0;for(let s=0;s<t;++s){let a=e[s];switch(a){case'"':o!=="\\"&&(n=!n);break;case",":n||(r.push(e.slice(i,s)),i=s+1);break;default:}o=a}return r.push(e.slice(i)),r.map(s=>{s=s.trim();let a=s.length;return a<2?s:(s[0]==='"'&&s[a-1]==='"'&&(s=s.slice(1,a-1)),s.replace(/\\"/g,'"'))})}});function Pb(e){return new ft(String(e),"bigDecimal")}var kN,ft,FN=D(()=>{kN=/^-?\d*(\.\d+)?$/,ft=class e{string;type;constructor(t,r){if(this.string=t,this.type=r,!kN.test(t))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](t){if(!t||typeof t!="object")return!1;let r=t;return e.prototype.isPrototypeOf(t)||r.type==="bigDecimal"&&kN.test(r.string)}}});var BN={};Nt(BN,{LazyJsonString:()=>vr,NumericValue:()=>ft,_parseEpochTimestamp:()=>Xa,_parseRfc3339DateTimeWithOffset:()=>Cb,_parseRfc7231DateTime:()=>Db,copyDocumentWithTransform:()=>_X,dateToUtcString:()=>ol,expectBoolean:()=>SX,expectByte:()=>lb,expectFloat32:()=>kp,expectInt:()=>xX,expectInt32:()=>cb,expectLong:()=>tl,expectNonNull:()=>TX,expectNumber:()=>el,expectObject:()=>ZO,expectShort:()=>ub,expectString:()=>wX,expectUnion:()=>AX,generateIdempotencyToken:()=>ln.v4,handleFloat:()=>DX,limitedParseDouble:()=>pb,limitedParseFloat:()=>RX,limitedParseFloat32:()=>PX,logger:()=>rl,nv:()=>Pb,parseBoolean:()=>EX,parseEpochTimestamp:()=>Sb,parseRfc3339DateTime:()=>LX,parseRfc3339DateTimeWithOffset:()=>_b,parseRfc7231DateTime:()=>Eb,quoteHeader:()=>Tb,splitEvery:()=>Rb,splitHeader:()=>il,strictParseByte:()=>mb,strictParseDouble:()=>Bp,strictParseFloat:()=>IX,strictParseFloat32:()=>fb,strictParseInt:()=>OX,strictParseInt32:()=>NX,strictParseLong:()=>tN,strictParseShort:()=>qs});var Tr=D(()=>{JO();rN();DN();RN();hb();PN();$N();MN();LN();FN()});var wr,Ja=D(()=>{wr=class{serdeContext;setSerdeContext(t){this.serdeContext=t}}});var Hp,Ob,UN=D(()=>{Hp=C(Kt()),Ob=class{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:t,serializer:r,deserializer:n,serdeContext:o,defaultContentType:i}){this.marshaller=t,this.serializer=r,this.deserializer=n,this.serdeContext=o,this.defaultContentType=i}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n}){let o=this.marshaller,i=r.getEventStreamMember(),s=r.getMemberSchema(i),a=this.serializer,c=this.defaultContentType,l=Symbol("initialRequestMarker"),d={async*[Symbol.asyncIterator](){if(n){let f={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:c}};a.write(r,n);let m=a.flush();yield{[l]:!0,headers:f,body:m}}for await(let f of t)yield f}};return o.serialize(d,f=>{if(f[l])return{headers:f.headers,body:f.body};let m=Object.keys(f).find(A=>A!=="__type")??"",{additionalHeaders:h,body:_,eventType:E,explicitPayloadContentType:T}=this.writeEventBody(m,s,f);return{headers:{":event-type":{type:"string",value:E},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:T??c},...h},body:_}})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n}){var m;let o=this.marshaller,i=r.getEventStreamMember(),a=r.getMemberSchema(i).getMemberSchemas(),c=Symbol("initialResponseMarker"),l=o.deserialize(t.body,async h=>{var T,I;let _=Object.keys(h).find(A=>A!=="__type")??"",E=h[_].body;if(_==="initial-response"){let A=await this.deserializer.read(r,E);return delete A[i],{[c]:!0,...A}}else if(_ in a){let A=a[_];if(A.isStructSchema()){let O={},G=!1;for(let[z,Q]of A.structIterator()){let{eventHeader:be,eventPayload:ue}=Q.getMergedTraits();if(G=G||!!(be||ue),ue)Q.isBlobSchema()?O[z]=E:Q.isStringSchema()?O[z]=(((T=this.serdeContext)==null?void 0:T.utf8Encoder)??Hp.toUtf8)(E):Q.isStructSchema()&&(O[z]=await this.deserializer.read(Q,E));else if(be){let q=(I=h[_].headers[z])==null?void 0:I.value;q!=null&&(Q.isNumericSchema()?q&&typeof q=="object"&&"bytes"in q?O[z]=BigInt(q.toString()):O[z]=Number(q):O[z]=q)}}if(G)return{[_]:O};if(E.byteLength===0)return{[_]:{}}}return{[_]:await this.deserializer.read(A,E)}}else return{$unknown:h}}),d=l[Symbol.asyncIterator](),f=await d.next();if(f.done)return l;if((m=f.value)!=null&&m[c]){if(!r)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(let[h,_]of Object.entries(f.value))n[h]=_}return{async*[Symbol.asyncIterator](){var h;for((h=f==null?void 0:f.value)!=null&&h[c]||(yield f.value);;){let{done:_,value:E}=await d.next();if(_)break;yield E}}}}writeEventBody(t,r,n){var m;let o=this.serializer,i=t,s=null,a,c=r.getSchema()[4].includes(t),l={};if(c){let h=r.getMemberSchema(t);if(h.isStructSchema()){for(let[_,E]of h.structIterator()){let{eventHeader:T,eventPayload:I}=E.getMergedTraits();if(I)s=_;else if(T){let A=n[t][_],O="binary";E.isNumericSchema()?(-2)**31<=A&&A<=2**31-1?O="integer":O="long":E.isTimestampSchema()?O="timestamp":E.isStringSchema()?O="string":E.isBooleanSchema()&&(O="boolean"),A!=null&&(l[_]={type:O,value:A},delete n[t][_])}}if(s!==null){let _=h.getMemberSchema(s);_.isBlobSchema()?a="application/octet-stream":_.isStringSchema()&&(a="text/plain"),o.write(_,n[t][s])}else o.write(h,n[t])}else if(h.isUnitSchema())o.write(h,{});else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{let[h,_]=n[t];i=h,o.write(15,_)}let d=o.flush()??new Uint8Array;return{body:typeof d=="string"?(((m=this.serdeContext)==null?void 0:m.utf8Decoder)??Hp.fromUtf8)(d):d,eventType:i,explicitPayloadContentType:a,additionalHeaders:l}}}});var jN={};Nt(jN,{EventStreamSerde:()=>Ob});var qN=D(()=>{UN()});var Vp,Gs,Wp=D(()=>{We();Vp=C(nt());Ja();Gs=class extends wr{options;compositeErrorRegistry;constructor(t){super(),this.options=t,this.compositeErrorRegistry=bt.for(t.defaultNamespace);for(let r of t.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(r)}getRequestType(){return Vp.HttpRequest}getResponseType(){return Vp.HttpResponse}setSerdeContext(t){this.serdeContext=t,this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(t)}updateServiceEndpoint(t,r){if("url"in r){t.protocol=r.url.protocol,t.hostname=r.url.hostname,t.port=r.url.port?Number(r.url.port):void 0,t.path=r.url.pathname,t.fragment=r.url.hash||void 0,t.username=r.url.username||void 0,t.password=r.url.password||void 0,t.query||(t.query={});for(let[n,o]of r.url.searchParams.entries())t.query[n]=o;if(r.headers)for(let[n,o]of Object.entries(r.headers))t.headers[n]=o.join(", ");return t}else{if(t.protocol=r.protocol,t.hostname=r.hostname,t.port=r.port?Number(r.port):void 0,t.path=r.path,t.query={...r.query},r.headers)for(let[n,o]of Object.entries(r.headers))t.headers[n]=o;return t}}setHostPrefix(t,r,n){var s,a;if((s=this.serdeContext)!=null&&s.disableHostPrefix)return;let o=le.of(r.input),i=oo(r.traits??{});if(i.endpoint){let c=(a=i.endpoint)==null?void 0:a[0];if(typeof c=="string"){let l=[...o.structIterator()].filter(([,d])=>d.getMergedTraits().hostLabel);for(let[d]of l){let f=n[d];if(typeof f!="string")throw new Error(`@smithy/core/schema - ${d} in input must be a string as hostLabel.`);c=c.replace(`{${d}}`,f)}t.hostname=c+t.hostname}}}deserializeMetadata(t){return{httpStatusCode:t.statusCode,requestId:t.headers["x-amzn-requestid"]??t.headers["x-amzn-request-id"]??t.headers["x-amz-request-id"],extendedRequestId:t.headers["x-amz-id-2"],cfId:t.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:r,initialRequest:n})}async deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:r,initialResponseContainer:n})}async loadEventStreamCapability(){let{EventStreamSerde:t}=await Promise.resolve().then(()=>(qN(),jN));return new t({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(t,r,n,o,i){return[]}getEventStreamMarshaller(){let t=this.serdeContext;if(!t.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return t.eventStreamMarshaller}}});var GN,HN,Hs,VN=D(()=>{We();Tr();GN=C(nt()),HN=C(wp());Ip();Cp();Wp();Hs=class extends Gs{async serializeRequest(t,r,n){let o=r&&typeof r=="object"?r:{},i=this.serializer,s={},a={},c=await n.endpoint(),l=le.of(t==null?void 0:t.input),d=[],f=[],m=!1,h,_=new GN.HttpRequest({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:s,headers:a,body:void 0});if(c){this.updateServiceEndpoint(_,c),this.setHostPrefix(_,t,o);let E=oo(t.traits);if(E.http){_.method=E.http[0];let[T,I]=E.http[1].split("?");_.path=="/"?_.path=T:_.path+=T;let A=new URLSearchParams(I??"");Object.assign(s,Object.fromEntries(A))}}for(let[E,T]of l.structIterator()){let I=T.getMergedTraits()??{},A=o[E];if(A==null&&!T.isIdempotencyToken()){if(I.httpLabel&&(_.path.includes(`{${E}+}`)||_.path.includes(`{${E}}`)))throw new Error(`No value provided for input HTTP label: ${E}.`);continue}if(I.httpPayload)T.isStreaming()?T.isStructSchema()?o[E]&&(h=await this.serializeEventStream({eventStream:o[E],requestSchema:l})):h=A:(i.write(T,A),h=i.flush());else if(I.httpLabel){i.write(T,A);let O=i.flush();_.path.includes(`{${E}+}`)?_.path=_.path.replace(`{${E}+}`,O.split("/").map(ro).join("/")):_.path.includes(`{${E}}`)&&(_.path=_.path.replace(`{${E}}`,ro(O)))}else if(I.httpHeader)i.write(T,A),a[I.httpHeader.toLowerCase()]=String(i.flush());else if(typeof I.httpPrefixHeaders=="string")for(let[O,G]of Object.entries(A)){let z=I.httpPrefixHeaders+O;i.write([T.getValueSchema(),{httpHeader:z}],G),a[z.toLowerCase()]=i.flush()}else I.httpQuery||I.httpQueryParams?this.serializeQuery(T,A,s):(m=!0,d.push(E),f.push(T))}if(m&&o){let[E,T]=(l.getName(!0)??"#Unknown").split("#"),I=l.getSchema()[6],A=[3,E,T,l.getMergedTraits(),d,f,void 0];I?A[6]=I:A.pop(),i.write(A,o),h=i.flush()}return _.headers=a,_.query=s,_.body=h,_}serializeQuery(t,r,n){let o=this.serializer,i=t.getMergedTraits();if(i.httpQueryParams){for(let[s,a]of Object.entries(r))if(!(s in n)){let c=t.getValueSchema();Object.assign(c.getMergedTraits(),{...i,httpQuery:s,httpQueryParams:void 0}),this.serializeQuery(c,a,n)}return}if(t.isListSchema()){let s=!!t.getMergedTraits().sparse,a=[];for(let c of r){o.write([t.getValueSchema(),i],c);let l=o.flush();(s||l!==void 0)&&a.push(l)}n[i.httpQuery]=a}else o.write([t,i],r),n[i.httpQuery]=o.flush()}async deserializeResponse(t,r,n){let o=this.deserializer,i=le.of(t.output),s={};if(n.statusCode>=300){let c=await un(n.body,r);throw c.byteLength>0&&Object.assign(s,await o.read(15,c)),await this.handleError(t,r,n,s,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(let c in n.headers){let l=n.headers[c];delete n.headers[c],n.headers[c.toLowerCase()]=l}let a=await this.deserializeHttpMessage(i,r,n,s);if(a.length){let c=await un(n.body,r);if(c.byteLength>0){let l=await o.read(i,c);for(let d of a)l[d]!=null&&(s[d]=l[d])}}else a.discardResponseBody&&await un(n.body,r);return s.$metadata=this.deserializeMetadata(n),s}async deserializeHttpMessage(t,r,n,o,i){let s;o instanceof Set?s=i:s=o;let a=!0,c=this.deserializer,l=le.of(t),d=[];for(let[f,m]of l.structIterator()){let h=m.getMemberTraits();if(h.httpPayload){if(a=!1,m.isStreaming())m.isStructSchema()?s[f]=await this.deserializeEventStream({response:n,responseSchema:l}):s[f]=(0,HN.sdkStreamMixin)(n.body);else if(n.body){let E=await un(n.body,r);E.byteLength>0&&(s[f]=await c.read(m,E))}}else if(h.httpHeader){let _=String(h.httpHeader).toLowerCase(),E=n.headers[_];if(E!=null)if(m.isListSchema()){let T=m.getValueSchema();T.getMergedTraits().httpHeader=_;let I;T.isTimestampSchema()&&T.getSchema()===4?I=Rb(E,",",2):I=il(E);let A=[];for(let O of I)A.push(await c.read(T,O.trim()));s[f]=A}else s[f]=await c.read(m,E)}else if(h.httpPrefixHeaders!==void 0){s[f]={};for(let[_,E]of Object.entries(n.headers))if(_.startsWith(h.httpPrefixHeaders)){let T=m.getValueSchema();T.getMergedTraits().httpHeader=_,s[f][_.slice(h.httpPrefixHeaders.length)]=await c.read(T,E)}}else h.httpResponseCode?s[f]=n.statusCode:d.push(f)}return d.discardResponseBody=a,d}}});var WN,zo,zN=D(()=>{We();WN=C(nt());Ip();Wp();zo=class extends Gs{async serializeRequest(t,r,n){let o=this.serializer,i={},s={},a=await n.endpoint(),c=le.of(t==null?void 0:t.input),l=c.getSchema(),d,f=r&&typeof r=="object"?r:{},m=new WN.HttpRequest({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:i,headers:s,body:void 0});if(a&&(this.updateServiceEndpoint(m,a),this.setHostPrefix(m,t,f)),f){let h=c.getEventStreamMember();if(h){if(f[h]){let _={};for(let[E,T]of c.structIterator())E!==h&&f[E]&&(o.write(T,f[E]),_[E]=o.flush());d=await this.serializeEventStream({eventStream:f[h],requestSchema:c,initialRequest:_})}}else o.write(l,f),d=o.flush()}return m.headers=Object.assign(m.headers,s),m.query=i,m.body=d,m.method="POST",m}async deserializeResponse(t,r,n){let o=this.deserializer,i=le.of(t.output),s={};if(n.statusCode>=300){let c=await un(n.body,r);throw c.byteLength>0&&Object.assign(s,await o.read(15,c)),await this.handleError(t,r,n,s,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(let c in n.headers){let l=n.headers[c];delete n.headers[c],n.headers[c.toLowerCase()]=l}let a=i.getEventStreamMember();if(a)s[a]=await this.deserializeEventStream({response:n,responseSchema:i,initialResponseContainer:s});else{let c=await un(n.body,r);c.byteLength>0&&Object.assign(s,await o.read(i,c))}return s.$metadata=this.deserializeMetadata(n),s}}});var Nb,$b=D(()=>{Cp();Nb=(e,t,r,n,o,i)=>{if(t!=null&&t[r]!==void 0){let s=n();if(s==null||s.length<=0)throw new Error("Empty value provided for input HTTP label: "+r+".");e=e.replace(o,i?s.split("/").map(a=>ro(a)).join("/"):ro(s))}else throw new Error("No value provided for input HTTP label: "+r+".");return e}});function Mb(e,t){return new zp(e,t)}var KN,zp,YN=D(()=>{KN=C(nt());$b();zp=class{input;context;query={};method="";headers={};path="";body=null;hostname="";resolvePathStack=[];constructor(t,r){this.input=t,this.context=r}async build(){let{hostname:t,protocol:r="https",port:n,path:o}=await this.context.endpoint();this.path=o;for(let i of this.resolvePathStack)i(this.path);return new KN.HttpRequest({protocol:r,hostname:this.hostname||t,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(t){return this.hostname=t,this}bp(t){return this.resolvePathStack.push(r=>{this.path=`${r!=null&&r.endsWith("/")?r.slice(0,-1):r||""}`+t}),this}p(t,r,n,o){return this.resolvePathStack.push(i=>{this.path=Nb(i,this.input,t,r,n,o)}),this}h(t){return this.headers=t,this}q(t){return this.query=t,this}b(t){return this.body=t,this}m(t){return this.method=t,this}}});function Yr(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(e.getSchema()===5||e.getSchema()===6||e.getSchema()===7))return e.getSchema();let{httpLabel:r,httpPrefixHeaders:n,httpHeader:o,httpQuery:i}=e.getMergedTraits();return(t.httpBindings?typeof n=="string"||o?6:i||r?5:void 0:void 0)??t.timestampFormat.default}var Kp=D(()=>{});var Lb,QN,Vs,kb=D(()=>{We();Tr();Lb=C(jt()),QN=C(Kt());Ja();Kp();Vs=class extends wr{settings;constructor(t){super(),this.settings=t}read(t,r){var o;let n=le.of(t);if(n.isListSchema())return il(r).map(i=>this.read(n.getValueSchema(),i));if(n.isBlobSchema())return(((o=this.serdeContext)==null?void 0:o.base64Decoder)??Lb.fromBase64)(r);if(n.isTimestampSchema())switch(Yr(n,this.settings)){case 5:return Cb(r);case 6:return Db(r);case 7:return Xa(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(n.isStringSchema()){let i=n.getMergedTraits().mediaType,s=r;if(i)return n.getMergedTraits().httpHeader&&(s=this.base64ToUtf8(s)),(i==="application/json"||i.endsWith("+json"))&&(s=vr.from(s)),s}return n.isNumericSchema()?Number(r):n.isBigIntegerSchema()?BigInt(r):n.isBigDecimalSchema()?new ft(r,"bigDecimal"):n.isBooleanSchema()?String(r).toLowerCase()==="true":r}base64ToUtf8(t){var r,n;return(((r=this.serdeContext)==null?void 0:r.utf8Encoder)??QN.toUtf8)((((n=this.serdeContext)==null?void 0:n.base64Decoder)??Lb.fromBase64)(t))}}});var Yp,Ws,XN=D(()=>{We();Yp=C(Kt());Ja();kb();Ws=class extends wr{codecDeserializer;stringDeserializer;constructor(t,r){super(),this.codecDeserializer=t,this.stringDeserializer=new Vs(r)}setSerdeContext(t){this.stringDeserializer.setSerdeContext(t),this.codecDeserializer.setSerdeContext(t),this.serdeContext=t}read(t,r){var s,a;let n=le.of(t),o=n.getMergedTraits(),i=((s=this.serdeContext)==null?void 0:s.utf8Encoder)??Yp.toUtf8;if(o.httpHeader||o.httpResponseCode)return this.stringDeserializer.read(n,i(r));if(o.httpPayload){if(n.isBlobSchema()){let c=((a=this.serdeContext)==null?void 0:a.utf8Decoder)??Yp.fromUtf8;return typeof r=="string"?c(r):r}else if(n.isStringSchema())return"byteLength"in r?i(r):r}return this.codecDeserializer.read(n,r)}}});var Fb,sl,Bb=D(()=>{We();Tr();Fb=C(jt());Ja();Kp();sl=class extends wr{settings;stringBuffer="";constructor(t){super(),this.settings=t}write(t,r){var o,i;let n=le.of(t);switch(typeof r){case"object":if(r===null){this.stringBuffer="null";return}if(n.isTimestampSchema()){if(!(r instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${r} when schema expected Date in ${n.getName(!0)}`);switch(Yr(n,this.settings)){case 5:this.stringBuffer=r.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=ol(r);break;case 7:this.stringBuffer=String(r.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",r),this.stringBuffer=String(r.getTime()/1e3)}return}if(n.isBlobSchema()&&"byteLength"in r){this.stringBuffer=(((o=this.serdeContext)==null?void 0:o.base64Encoder)??Fb.toBase64)(r);return}if(n.isListSchema()&&Array.isArray(r)){let c="";for(let l of r){this.write([n.getValueSchema(),n.getMergedTraits()],l);let d=this.flush(),f=n.getValueSchema().isTimestampSchema()?d:Tb(d);c!==""&&(c+=", "),c+=f}this.stringBuffer=c;return}this.stringBuffer=JSON.stringify(r,null,2);break;case"string":let s=n.getMergedTraits().mediaType,a=r;if(s&&((s==="application/json"||s.endsWith("+json"))&&(a=vr.from(a)),n.getMergedTraits().httpHeader)){this.stringBuffer=(((i=this.serdeContext)==null?void 0:i.base64Encoder)??Fb.toBase64)(a.toString());return}this.stringBuffer=r;break;default:n.isIdempotencyToken()?this.stringBuffer=(0,ln.v4)():this.stringBuffer=String(r)}}flush(){let t=this.stringBuffer;return this.stringBuffer="",t}}});var zs,JN=D(()=>{We();Bb();zs=class{codecSerializer;stringSerializer;buffer;constructor(t,r,n=new sl(r)){this.codecSerializer=t,this.stringSerializer=n}setSerdeContext(t){this.codecSerializer.setSerdeContext(t),this.stringSerializer.setSerdeContext(t)}write(t,r){let n=le.of(t),o=n.getMergedTraits();if(o.httpHeader||o.httpLabel||o.httpQuery){this.stringSerializer.write(n,r),this.buffer=this.stringSerializer.flush();return}return this.codecSerializer.write(n,r)}flush(){if(this.buffer!==void 0){let t=this.buffer;return this.buffer=void 0,t}return this.codecSerializer.flush()}}});var ZN={};Nt(ZN,{FromStringShapeDeserializer:()=>Vs,HttpBindingProtocol:()=>Hs,HttpInterceptingShapeDeserializer:()=>Ws,HttpInterceptingShapeSerializer:()=>zs,HttpProtocol:()=>Gs,RequestBuilder:()=>zp,RpcProtocol:()=>zo,SerdeContext:()=>wr,ToStringShapeSerializer:()=>sl,collectBody:()=>un,determineTimestampFormat:()=>Yr,extendedEncodeURIComponent:()=>ro,requestBuilder:()=>Mb,resolvedPath:()=>Nb});var Nr=D(()=>{Ip();Cp();VN();Wp();zN();YN();$b();kb();XN();JN();Bb();Kp();Ja()});var e1=D(()=>{Nr()});function uJ(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}var t1=D(()=>{});var Pn,r1=D(()=>{Pn=class{authSchemes=new Map;constructor(t){for(let[r,n]of Object.entries(t))n!==void 0&&this.authSchemes.set(r,n)}getIdentityProvider(t){return this.authSchemes.get(t)}}});var n1,Ub,jb,o1=D(()=>{n1=C(nt()),Ub=C(Di()),jb=class{async sign(t,r,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(!r.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let o=n1.HttpRequest.clone(t);if(n.in===Ub.HttpApiKeyAuthLocation.QUERY)o.query[n.name]=r.apiKey;else if(n.in===Ub.HttpApiKeyAuthLocation.HEADER)o.headers[n.name]=n.scheme?`${n.scheme} ${r.apiKey}`:r.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+n.in+"`");return o}}});var i1,qb,s1=D(()=>{i1=C(nt()),qb=class{async sign(t,r,n){let o=i1.HttpRequest.clone(t);if(!r.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return o.headers.Authorization=`Bearer ${r.token}`,o}}});var Qr,a1=D(()=>{Qr=class{async sign(t,r,n){return t}}});var c1=D(()=>{o1();s1();a1()});var u1,lJ,Gb,Qp,Hb,l1=D(()=>{u1=e=>function(r){return Qp(r)&&r.expiration.getTime()-Date.now()<e},lJ=3e5,Gb=u1(3e5),Qp=e=>e.expiration!==void 0,Hb=(e,t,r)=>{if(e===void 0)return;let n=typeof e!="function"?async()=>Promise.resolve(e):e,o,i,s,a=!1,c=async l=>{i||(i=n(l));try{o=await i,s=!0,a=!1}finally{i=void 0}return o};return t===void 0?async l=>((!s||l!=null&&l.forceRefresh)&&(o=await c(l)),o):async l=>((!s||l!=null&&l.forceRefresh)&&(o=await c(l)),a?o:r(o)?(t(o)&&await c(l),o):(a=!0,o))}});var d1=D(()=>{r1();c1();l1()});var al={};Nt(al,{DefaultIdentityProviderConfig:()=>Pn,EXPIRATION_MS:()=>lJ,HttpApiKeyAuthSigner:()=>jb,HttpBearerAuthSigner:()=>qb,NoAuthSigner:()=>Qr,createIsIdentityExpiredFunction:()=>u1,createPaginator:()=>OP,doesIdentityRequireRefresh:()=>Qp,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Bo,getHttpAuthSchemePlugin:()=>k7,getHttpSigningPlugin:()=>Uo,getSmithyContext:()=>M7,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>bP,httpAuthSchemeMiddleware:()=>zu,httpAuthSchemeMiddlewareOptions:()=>vP,httpSigningMiddleware:()=>b0,httpSigningMiddlewareOptions:()=>CP,isIdentityExpired:()=>Gb,memoizeIdentityProvider:()=>Hb,normalizeProvider:()=>Pi,requestBuilder:()=>Mb,setFeature:()=>uJ});var ar=D(()=>{gP();wP();RP();PP();NP();e1();t1();d1()});var ki=b(Ks=>{"use strict";var Wb=Di(),zb=class{capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){let n=this.hash(t);if(n===!1)return r();if(!this.data.has(n)){if(this.data.size>this.capacity+10){let o=this.data.keys(),i=0;for(;;){let{value:s,done:a}=o.next();if(this.data.delete(s),a||++i>10)break}}this.data.set(n,r())}return this.data.get(n)}size(){return this.data.size}hash(t){let r="",{parameters:n}=this;if(n.length===0)return!1;for(let o of n){let i=String(t[o]??"");if(i.includes("|;"))return!1;r+=i+"|;"}return r}},dJ=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}$"),f1=e=>dJ.test(e)||e.startsWith("[")&&e.endsWith("]"),fJ=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Yb=(e,t=!1)=>{if(!t)return fJ.test(e);let r=e.split(".");for(let n of r)if(!Yb(n))return!1;return!0},Kb={},cl="endpoints";function Li(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Li(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Li).join(", ")})`:JSON.stringify(e,null,2)}var cr=class extends Error{constructor(t){super(t),this.name="EndpointError"}},pJ=(e,t)=>e===t,mJ=e=>{let t=e.split("."),r=[];for(let n of t){let o=n.indexOf("[");if(o!==-1){if(n.indexOf("]")!==n.length-1)throw new cr(`Path: '${e}' does not end with ']'`);let i=n.slice(o+1,-1);if(Number.isNaN(parseInt(i)))throw new cr(`Invalid array index: '${i}' in path: '${e}'`);o!==0&&r.push(n.slice(0,o)),r.push(i)}else r.push(n)}return r},p1=(e,t)=>mJ(t).reduce((r,n)=>{if(typeof r!="object")throw new cr(`Index '${n}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(n)]:r[n]},e),hJ=e=>e!=null,yJ=e=>!e,Vb={[Wb.EndpointURLScheme.HTTP]:80,[Wb.EndpointURLScheme.HTTPS]:443},gJ=e=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){let{hostname:m,port:h,protocol:_="",path:E="",query:T={}}=e,I=new URL(`${_}//${m}${h?`:${h}`:""}${E}`);return I.search=Object.entries(T).map(([A,O])=>`${A}=${O}`).join("&"),I}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=t.href,{host:n,hostname:o,pathname:i,protocol:s,search:a}=t;if(a)return null;let c=s.slice(0,-1);if(!Object.values(Wb.EndpointURLScheme).includes(c))return null;let l=f1(o),d=r.includes(`${n}:${Vb[c]}`)||typeof e=="string"&&e.includes(`${n}:${Vb[c]}`),f=`${n}${d?`:${Vb[c]}`:""}`;return{scheme:c,authority:f,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:l}},_J=(e,t)=>e===t,EJ=(e,t,r,n)=>t>=r||e.length<r||/[^\u0000-\u007f]/.test(e)?null:n?e.substring(e.length-r,e.length-t):e.substring(t,r),SJ=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),bJ={booleanEquals:pJ,getAttr:p1,isSet:hJ,isValidHostLabel:Yb,not:yJ,parseURL:gJ,stringEquals:_J,substring:EJ,uriEncode:SJ},m1=(e,t)=>{let r=[],n={...t.endpointParams,...t.referenceRecord},o=0;for(;o<e.length;){let i=e.indexOf("{",o);if(i===-1){r.push(e.slice(o));break}r.push(e.slice(o,i));let s=e.indexOf("}",i);if(s===-1){r.push(e.slice(i));break}e[i+1]==="{"&&e[s+1]==="}"&&(r.push(e.slice(i+1,s)),o=s+2);let a=e.substring(i+1,s);if(a.includes("#")){let[c,l]=a.split("#");r.push(p1(n[c],l))}else r.push(n[a]);o=s+1}return r.join("")},xJ=({ref:e},t)=>({...t.endpointParams,...t.referenceRecord})[e],Xp=(e,t,r)=>{if(typeof e=="string")return m1(e,r);if(e.fn)return y1.callFunction(e,r);if(e.ref)return xJ(e,r);throw new cr(`'${t}': ${String(e)} is not a string, function or reference.`)},h1=({fn:e,argv:t},r)=>{let n=t.map(i=>["boolean","number"].includes(typeof i)?i:y1.evaluateExpression(i,"arg",r)),o=e.split(".");return o[0]in Kb&&o[1]!=null?Kb[o[0]][o[1]](...n):bJ[e](...n)},y1={evaluateExpression:Xp,callFunction:h1},vJ=({assign:e,...t},r)=>{var o,i;if(e&&e in r.referenceRecord)throw new cr(`'${e}' is already defined in Reference Record.`);let n=h1(t,r);return(i=(o=r.logger)==null?void 0:o.debug)==null||i.call(o,`${cl} evaluateCondition: ${Li(t)} = ${Li(n)}`),{result:n===""?!0:!!n,...e!=null&&{toAssign:{name:e,value:n}}}},Qb=(e=[],t)=>{var n,o;let r={};for(let i of e){let{result:s,toAssign:a}=vJ(i,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!s)return{result:s};a&&(r[a.name]=a.value,(o=(n=t.logger)==null?void 0:n.debug)==null||o.call(n,`${cl} assign: ${a.name} := ${Li(a.value)}`))}return{result:!0,referenceRecord:r}},TJ=(e,t)=>Object.entries(e).reduce((r,[n,o])=>({...r,[n]:o.map(i=>{let s=Xp(i,"Header value entry",t);if(typeof s!="string")throw new cr(`Header '${n}' value '${s}' is not a string`);return s})}),{}),g1=(e,t)=>Object.entries(e).reduce((r,[n,o])=>({...r,[n]:E1.getEndpointProperty(o,t)}),{}),_1=(e,t)=>{if(Array.isArray(e))return e.map(r=>_1(r,t));switch(typeof e){case"string":return m1(e,t);case"object":if(e===null)throw new cr(`Unexpected endpoint property: ${e}`);return E1.getEndpointProperties(e,t);case"boolean":return e;default:throw new cr(`Unexpected endpoint property type: ${typeof e}`)}},E1={getEndpointProperty:_1,getEndpointProperties:g1},wJ=(e,t)=>{let r=Xp(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(n){throw console.error(`Failed to construct URL with ${r}`,n),n}throw new cr(`Endpoint URL must be a string, got ${typeof r}`)},AJ=(e,t)=>{var d,f;let{conditions:r,endpoint:n}=e,{result:o,referenceRecord:i}=Qb(r,t);if(!o)return;let s={...t,referenceRecord:{...t.referenceRecord,...i}},{url:a,properties:c,headers:l}=n;return(f=(d=t.logger)==null?void 0:d.debug)==null||f.call(d,`${cl} Resolving endpoint from template: ${Li(n)}`),{...l!=null&&{headers:TJ(l,s)},...c!=null&&{properties:g1(c,s)},url:wJ(a,s)}},IJ=(e,t)=>{let{conditions:r,error:n}=e,{result:o,referenceRecord:i}=Qb(r,t);if(o)throw new cr(Xp(n,"Error",{...t,referenceRecord:{...t.referenceRecord,...i}}))},S1=(e,t)=>{for(let r of e)if(r.type==="endpoint"){let n=AJ(r,t);if(n)return n}else if(r.type==="error")IJ(r,t);else if(r.type==="tree"){let n=b1.evaluateTreeRule(r,t);if(n)return n}else throw new cr(`Unknown endpoint rule: ${r}`);throw new cr("Rules evaluation failed")},CJ=(e,t)=>{let{conditions:r,rules:n}=e,{result:o,referenceRecord:i}=Qb(r,t);if(o)return b1.evaluateRules(n,{...t,referenceRecord:{...t.referenceRecord,...i}})},b1={evaluateRules:S1,evaluateTreeRule:CJ},DJ=(e,t)=>{var l,d,f,m;let{endpointParams:r,logger:n}=t,{parameters:o,rules:i}=e;(d=(l=t.logger)==null?void 0:l.debug)==null||d.call(l,`${cl} Initial EndpointParams: ${Li(r)}`);let s=Object.entries(o).filter(([,h])=>h.default!=null).map(([h,_])=>[h,_.default]);if(s.length>0)for(let[h,_]of s)r[h]=r[h]??_;let a=Object.entries(o).filter(([,h])=>h.required).map(([h])=>h);for(let h of a)if(r[h]==null)throw new cr(`Missing required parameter: '${h}'`);let c=S1(i,{endpointParams:r,logger:n,referenceRecord:{}});return(m=(f=t.logger)==null?void 0:f.debug)==null||m.call(f,`${cl} Resolved endpoint: ${Li(c)}`),c};Ks.EndpointCache=zb;Ks.EndpointError=cr;Ks.customEndpointFunctions=Kb;Ks.isIpAddress=f1;Ks.isValidHostLabel=Yb;Ks.resolveEndpoint=DJ});var Ys=b(On=>{"use strict";var Za=ki(),RJ=no(),v1=(e,t=!1)=>{if(t){for(let r of e.split("."))if(!v1(r))return!1;return!0}return!(!Za.isValidHostLabel(e)||e.length<3||e.length>63||e!==e.toLowerCase()||Za.isIpAddress(e))},x1=":",PJ="/",OJ=e=>{let t=e.split(x1);if(t.length<6)return null;let[r,n,o,i,s,...a]=t;if(r!=="arn"||n===""||o===""||a.join(x1)==="")return null;let c=a.map(l=>l.split(PJ)).flat();return{partition:n,service:o,region:i,accountId:s,resourceId:c}},NJ=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-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:!0,supportsFIPS:!0},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:!0,supportsFIPS:!0},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:!0,supportsFIPS:!0},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:!0,supportsFIPS:!0},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:!0,supportsFIPS:!0},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:!0,supportsFIPS:!0},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:!0,supportsFIPS:!0},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)"}}}],$J="1.1",T1={partitions:NJ,version:$J},w1=T1,A1="",I1=e=>{let{partitions:t}=w1;for(let n of t){let{regions:o,outputs:i}=n;for(let[s,a]of Object.entries(o))if(s===e)return{...i,...a}}for(let n of t){let{regionRegex:o,outputs:i}=n;if(new RegExp(o).test(e))return{...i}}let r=t.find(n=>n.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},C1=(e,t="")=>{w1=e,A1=t},MJ=()=>{C1(T1,"")},LJ=()=>A1,D1={isVirtualHostableS3Bucket:v1,parseArn:OJ,partition:I1};Za.customEndpointFunctions.aws=D1;var kJ=e=>{if(typeof e.endpointProvider!="function")throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client.");let{endpoint:t}=e;return t===void 0&&(e.endpoint=async()=>R1(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:void 0},{logger:e.logger}))),e},R1=e=>RJ.parseUrl(e.url);On.EndpointError=Za.EndpointError;On.isIpAddress=Za.isIpAddress;On.resolveEndpoint=Za.resolveEndpoint;On.awsEndpointFunctions=D1;On.getUserAgentPrefix=LJ;On.partition=I1;On.resolveDefaultAwsRegionalEndpointsConfig=kJ;On.setPartitionInfo=C1;On.toEndpointV1=R1;On.useDefaultPartitionInfo=MJ});var Jp,so,P1=D(()=>{Jp={warningEmitted:!1},so=e=>{e&&!Jp.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<20&&(Jp.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
22
+ no longer support Node.js ${e} in January 2026.
23
+
24
+ To continue receiving updates to AWS services, bug fixes, and security
25
+ updates please upgrade to a supported Node.js LTS version.
26
+
27
+ More information can be found at: https://a.co/c895JFp`))}});function Fi(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}var O1=D(()=>{});function N1(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}var $1=D(()=>{});function M1(e,t,r){return e.$source||(e.$source={}),e.$source[t]=r,e}var L1=D(()=>{});var Nn={};Nt(Nn,{emitWarningIfUnsupportedVersion:()=>so,setCredentialFeature:()=>Fi,setFeature:()=>N1,setTokenFeature:()=>M1,state:()=>Jp});var Yt=D(()=>{P1();O1();$1();L1()});var Jb=b(Bi=>{"use strict";var FJ=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],BJ=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],UJ=["TimeoutError","RequestTimeout","RequestTimeoutException"],jJ=[500,502,503,504],qJ=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],GJ=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],k1=e=>(e==null?void 0:e.$retryable)!==void 0,HJ=e=>FJ.includes(e.name),F1=e=>{var t;return(t=e.$metadata)==null?void 0:t.clockSkewCorrected},B1=e=>{let t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},VJ=e=>{var t,r;return((t=e.$metadata)==null?void 0:t.httpStatusCode)===429||BJ.includes(e.name)||((r=e.$retryable)==null?void 0:r.throttling)==!0},Xb=(e,t=0)=>{var r;return k1(e)||F1(e)||UJ.includes(e.name)||qJ.includes((e==null?void 0:e.code)||"")||GJ.includes((e==null?void 0:e.code)||"")||jJ.includes(((r=e.$metadata)==null?void 0:r.httpStatusCode)||0)||B1(e)||e.cause!==void 0&&t<=10&&Xb(e.cause,t+1)},WJ=e=>{var t;if(((t=e.$metadata)==null?void 0:t.httpStatusCode)!==void 0){let r=e.$metadata.httpStatusCode;return 500<=r&&r<=599&&!Xb(e)}return!1};Bi.isBrowserNetworkError=B1;Bi.isClockSkewCorrectedError=F1;Bi.isClockSkewError=HJ;Bi.isRetryableByTrait=k1;Bi.isServerError=WJ;Bi.isThrottlingError=VJ;Bi.isTransientError=Xb});var Ui=b(wt=>{"use strict";var zJ=Jb();wt.RETRY_MODES=void 0;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(wt.RETRY_MODES||(wt.RETRY_MODES={}));var Zb=3,KJ=wt.RETRY_MODES.STANDARD,Zp=class e{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=(t==null?void 0:t.beta)??.7,this.minCapacity=(t==null?void 0:t.minCapacity)??1,this.minFillRate=(t==null?void 0:t.minFillRate)??.5,this.scaleConstant=(t==null?void 0:t.scaleConstant)??.4,this.smooth=(t==null?void 0:t.smooth)??.8;let r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,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(t){if(this.enabled){if(this.refillTokenBucket(),t>this.availableTokens){let r=(t-this.availableTokens)/this.fillRate*1e3;await new Promise(n=>e.setTimeoutFn(n,r))}this.availableTokens=this.availableTokens-t}}refillTokenBucket(){let t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}let r=(t-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+r),this.lastTimestamp=t}updateClientSendingRate(t){let r;this.updateMeasuredRate();let n=t;if((n==null?void 0:n.errorType)==="THROTTLING"||zJ.isThrottlingError((n==null?void 0:n.error)??t)){let s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());let i=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(i)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){let n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}},ul=100,nx=20*1e3,j1=500,ex=500,q1=5,G1=10,H1=1,YJ="amz-sdk-invocation-id",QJ="amz-sdk-request",XJ=()=>{let e=ul;return{computeNextBackoffDelay:n=>Math.floor(Math.min(nx,Math.random()*2**n*e)),setDelayBase:n=>{e=n}}},U1=({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(nx,e),getRetryCost:()=>r}),ll=class{maxAttempts;mode=wt.RETRY_MODES.STANDARD;capacity=ex;retryBackoffStrategy=XJ();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return U1({retryDelay:ul,retryCount:0})}async refreshRetryTokenForRetry(t,r){let n=await this.getMaxAttempts();if(this.shouldRetry(t,r,n)){let o=r.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?j1:ul);let i=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),s=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,i):i,a=this.getCapacityCost(o);return this.capacity-=a,U1({retryDelay:s,retryCount:t.getRetryCount()+1,retryCost:a})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(ex,this.capacity+(t.getRetryCost()??H1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Zb}`),Zb}}shouldRetry(t,r,n){return t.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t==="TRANSIENT"?G1:q1}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}},tx=class{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=wt.RETRY_MODES.ADAPTIVE;constructor(t,r){this.maxAttemptsProvider=t;let{rateLimiter:n}=r??{};this.rateLimiter=n??new Zp,this.standardRetryStrategy=new ll(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(t,r)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}},rx=class extends ll{computeNextBackoffDelay;constructor(t,r=ul){super(typeof t=="function"?t:async()=>t),typeof r=="number"?this.computeNextBackoffDelay=()=>r:this.computeNextBackoffDelay=r}async refreshRetryTokenForRetry(t,r){let n=await super.refreshRetryTokenForRetry(t,r);return n.getRetryDelay=()=>this.computeNextBackoffDelay(n.getRetryCount()),n}};wt.AdaptiveRetryStrategy=tx;wt.ConfiguredRetryStrategy=rx;wt.DEFAULT_MAX_ATTEMPTS=Zb;wt.DEFAULT_RETRY_DELAY_BASE=ul;wt.DEFAULT_RETRY_MODE=KJ;wt.DefaultRateLimiter=Zp;wt.INITIAL_RETRY_TOKENS=ex;wt.INVOCATION_ID_HEADER=YJ;wt.MAXIMUM_RETRY_DELAY=nx;wt.NO_RETRY_INCREMENT=H1;wt.REQUEST_HEADER=QJ;wt.RETRY_COST=q1;wt.StandardRetryStrategy=ll;wt.THROTTLING_RETRY_DELAY_BASE=j1;wt.TIMEOUT_RETRY_COST=G1});var Qs=b(ec=>{"use strict";var JJ=(ar(),ie(al)),ZJ=Ys(),eZ=nt(),Ko=(Yt(),ie(Nn)),V1=Ui(),Y1=void 0;function tZ(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function rZ(e){let t=JJ.normalizeProvider(e.userAgentAppId??Y1),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:async()=>{var o,i;let n=await t();if(!tZ(n)){let s=((i=(o=e.logger)==null?void 0:o.constructor)==null?void 0:i.name)==="NoOpLogger"||!e.logger?console:e.logger;typeof n!="string"?s==null||s.warn("userAgentAppId must be a string or undefined."):n.length>50&&(s==null||s.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."))}return n}})}var nZ=/\d{12}\.ddb/;async function oZ(e,t,r){var i,s,a,c,l;let n=r.request;if(((i=n==null?void 0:n.headers)==null?void 0:i["smithy-protocol"])==="rpc-v2-cbor"&&Ko.setFeature(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){let d=await t.retryStrategy();if(typeof d.mode=="string")switch(d.mode){case V1.RETRY_MODES.ADAPTIVE:Ko.setFeature(e,"RETRY_MODE_ADAPTIVE","F");break;case V1.RETRY_MODES.STANDARD:Ko.setFeature(e,"RETRY_MODE_STANDARD","E");break}}if(typeof t.accountIdEndpointMode=="function"){let d=e.endpointV2;switch(String((s=d==null?void 0:d.url)==null?void 0:s.hostname).match(nZ)&&Ko.setFeature(e,"ACCOUNT_ID_ENDPOINT","O"),await((a=t.accountIdEndpointMode)==null?void 0:a.call(t))){case"disabled":Ko.setFeature(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Ko.setFeature(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Ko.setFeature(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let o=(l=(c=e.__smithy_context)==null?void 0:c.selectedHttpAuthScheme)==null?void 0:l.identity;if(o!=null&&o.$source){let d=o;d.accountId&&Ko.setFeature(e,"RESOLVED_ACCOUNT_ID","T");for(let[f,m]of Object.entries(d.$source??{}))Ko.setFeature(e,f,m)}}var W1="user-agent",ox="x-amz-user-agent",z1=" ",ix="/",iZ=/[^!$%&'*+\-.^_`|~\w]/g,sZ=/[^!$%&'*+\-.^_`|~\w#]/g,K1="-",aZ=1024;function cZ(e){let t="";for(let r in e){let n=e[r];if(t.length+n.length+1<=aZ){t.length?t+=","+n:t+=n;continue}break}return t}var Q1=e=>(t,r)=>async n=>{var _,E,T,I;let{request:o}=n;if(!eZ.HttpRequest.isInstance(o))return t(n);let{headers:i}=o,s=((_=r==null?void 0:r.userAgent)==null?void 0:_.map(em))||[],a=(await e.defaultUserAgentProvider()).map(em);await oZ(r,e,n);let c=r;a.push(`m/${cZ(Object.assign({},(E=r.__smithy_context)==null?void 0:E.features,(T=c.__aws_sdk_context)==null?void 0:T.features))}`);let l=((I=e==null?void 0:e.customUserAgent)==null?void 0:I.map(em))||[],d=await e.userAgentAppId();d&&a.push(em(["app",`${d}`]));let f=ZJ.getUserAgentPrefix(),m=(f?[f]:[]).concat([...a,...s,...l]).join(z1),h=[...a.filter(A=>A.startsWith("aws-sdk-")),...l].join(z1);return e.runtime!=="browser"?(h&&(i[ox]=i[ox]?`${i[W1]} ${h}`:h),i[W1]=m):i[ox]=m,t({...n,request:o})},em=e=>{var s;let t=e[0].split(ix).map(a=>a.replace(iZ,K1)).join(ix),r=(s=e[1])==null?void 0:s.replace(sZ,K1),n=t.indexOf(ix),o=t.substring(0,n),i=t.substring(n+1);return o==="api"&&(i=i.toLowerCase()),[o,i,r].filter(a=>a&&a.length>0).reduce((a,c,l)=>{switch(l){case 0:return c;case 1:return`${a}/${c}`;default:return`${a}#${c}`}},"")},X1={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},uZ=e=>({applyToStack:t=>{t.add(Q1(e),X1)}});ec.DEFAULT_UA_APP_ID=Y1;ec.getUserAgentMiddlewareOptions=X1;ec.getUserAgentPlugin=uZ;ec.resolveUserAgentConfig=rZ;ec.userAgentMiddleware=Q1});var sx=b(tc=>{"use strict";var lZ=(e,t,r)=>{if(t in e){if(e[t]==="true")return!0;if(e[t]==="false")return!1;throw new Error(`Cannot load ${r} "${t}". Expected "true" or "false", got ${e[t]}.`)}},dZ=(e,t,r)=>{if(!(t in e))return;let n=parseInt(e[t],10);if(Number.isNaN(n))throw new TypeError(`Cannot load ${r} '${t}'. Expected number, got '${e[t]}'.`);return n};tc.SelectorType=void 0;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(tc.SelectorType||(tc.SelectorType={}));tc.booleanSelector=lZ;tc.numberSelector=dZ});var $r=b(qt=>{"use strict";var ur=sx(),tm=ir(),fZ=ki(),ax="AWS_USE_DUALSTACK_ENDPOINT",cx="use_dualstack_endpoint",pZ=!1,mZ={environmentVariableSelector:e=>ur.booleanSelector(e,ax,ur.SelectorType.ENV),configFileSelector:e=>ur.booleanSelector(e,cx,ur.SelectorType.CONFIG),default:!1},hZ={environmentVariableSelector:e=>ur.booleanSelector(e,ax,ur.SelectorType.ENV),configFileSelector:e=>ur.booleanSelector(e,cx,ur.SelectorType.CONFIG),default:void 0},ux="AWS_USE_FIPS_ENDPOINT",lx="use_fips_endpoint",yZ=!1,gZ={environmentVariableSelector:e=>ur.booleanSelector(e,ux,ur.SelectorType.ENV),configFileSelector:e=>ur.booleanSelector(e,lx,ur.SelectorType.CONFIG),default:!1},_Z={environmentVariableSelector:e=>ur.booleanSelector(e,ux,ur.SelectorType.ENV),configFileSelector:e=>ur.booleanSelector(e,lx,ur.SelectorType.CONFIG),default:void 0},EZ=e=>{let{tls:t,endpoint:r,urlParser:n,useDualstackEndpoint:o}=e;return Object.assign(e,{tls:t??!0,endpoint:tm.normalizeProvider(typeof r=="string"?n(r):r),isCustomEndpoint:!0,useDualstackEndpoint:tm.normalizeProvider(o??!1)})},SZ=async e=>{let{tls:t=!0}=e,r=await e.region();if(!new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/).test(r))throw new Error("Invalid region in client config");let o=await e.useDualstackEndpoint(),i=await e.useFipsEndpoint(),{hostname:s}=await e.regionInfoProvider(r,{useDualstackEndpoint:o,useFipsEndpoint:i})??{};if(!s)throw new Error("Cannot resolve hostname from client config");return e.urlParser(`${t?"https:":"http:"}//${s}`)},bZ=e=>{let t=tm.normalizeProvider(e.useDualstackEndpoint??!1),{endpoint:r,useFipsEndpoint:n,urlParser:o,tls:i}=e;return Object.assign(e,{tls:i??!0,endpoint:r?tm.normalizeProvider(typeof r=="string"?o(r):r):()=>SZ({...e,useDualstackEndpoint:t,useFipsEndpoint:n}),isCustomEndpoint:!!r,useDualstackEndpoint:t})},e$="AWS_REGION",t$="region",xZ={environmentVariableSelector:e=>e[e$],configFileSelector:e=>e[t$],default:()=>{throw new Error("Region is missing")}},vZ={preferredFile:"credentials"},J1=new Set,TZ=(e,t=fZ.isValidHostLabel)=>{if(!J1.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 J1.add(e)},r$=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),wZ=e=>r$(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,AZ=e=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{let n=typeof t=="function"?await t():t,o=wZ(n);return TZ(o),o},useFipsEndpoint:async()=>{let n=typeof t=="string"?t:await t();return r$(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},Z1=(e=[],{useFipsEndpoint:t,useDualstackEndpoint:r})=>{var n;return(n=e.find(({tags:o})=>t===o.includes("fips")&&r===o.includes("dualstack")))==null?void 0:n.hostname},IZ=(e,{regionHostname:t,partitionHostname:r})=>t||(r?r.replace("{region}",e):void 0),CZ=(e,{partitionHash:t})=>Object.keys(t||{}).find(r=>t[r].regions.includes(e))??"aws",DZ=(e,{signingRegion:t,regionRegex:r,useFipsEndpoint:n})=>{if(t)return t;if(n){let o=r.replace("\\\\","\\").replace(/^\^/g,"\\.").replace(/\$$/g,"\\."),i=e.match(o);if(i)return i[0].slice(1,-1)}},RZ=(e,{useFipsEndpoint:t=!1,useDualstackEndpoint:r=!1,signingService:n,regionHash:o,partitionHash:i})=>{var h,_,E,T,I;let s=CZ(e,{partitionHash:i}),a=e in o?e:((h=i[s])==null?void 0:h.endpoint)??e,c={useFipsEndpoint:t,useDualstackEndpoint:r},l=Z1((_=o[a])==null?void 0:_.variants,c),d=Z1((E=i[s])==null?void 0:E.variants,c),f=IZ(a,{regionHostname:l,partitionHostname:d});if(f===void 0)throw new Error(`Endpoint resolution failed for: ${{resolvedRegion:a,useFipsEndpoint:t,useDualstackEndpoint:r}}`);let m=DZ(f,{signingRegion:(T=o[a])==null?void 0:T.signingRegion,regionRegex:i[s].regionRegex,useFipsEndpoint:t});return{partition:s,signingService:n,hostname:f,...m&&{signingRegion:m},...((I=o[a])==null?void 0:I.signingService)&&{signingService:o[a].signingService}}};qt.CONFIG_USE_DUALSTACK_ENDPOINT=cx;qt.CONFIG_USE_FIPS_ENDPOINT=lx;qt.DEFAULT_USE_DUALSTACK_ENDPOINT=pZ;qt.DEFAULT_USE_FIPS_ENDPOINT=yZ;qt.ENV_USE_DUALSTACK_ENDPOINT=ax;qt.ENV_USE_FIPS_ENDPOINT=ux;qt.NODE_REGION_CONFIG_FILE_OPTIONS=vZ;qt.NODE_REGION_CONFIG_OPTIONS=xZ;qt.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS=mZ;qt.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS=gZ;qt.REGION_ENV_NAME=e$;qt.REGION_INI_NAME=t$;qt.getRegionInfo=RZ;qt.nodeDualstackConfigSelectors=hZ;qt.nodeFipsConfigSelectors=_Z;qt.resolveCustomEndpointsConfig=EZ;qt.resolveEndpointsConfig=bZ;qt.resolveRegionConfig=AZ});var rc=b(rm=>{"use strict";var PZ=nt(),n$="content-length";function o$(e){return t=>async r=>{let n=r.request;if(PZ.HttpRequest.isInstance(n)){let{body:o,headers:i}=n;if(o&&Object.keys(i).map(s=>s.toLowerCase()).indexOf(n$)===-1)try{let s=e(o);n.headers={...n.headers,[n$]:String(s)}}catch{}}return t({...r,request:n})}}var i$={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},OZ=e=>({applyToStack:t=>{t.add(o$(e.bodyLengthChecker),i$)}});rm.contentLengthMiddleware=o$;rm.contentLengthMiddlewareOptions=i$;rm.getContentLengthPlugin=OZ});var lr=b(Xs=>{"use strict";var nc=class e extends Error{name="ProviderError";tryNextLink;constructor(t,r=!0){var i;let n,o=!0;typeof r=="boolean"?(n=void 0,o=r):r!=null&&typeof r=="object"&&(n=r.logger,o=r.tryNextLink??!0),super(t),this.tryNextLink=o,Object.setPrototypeOf(this,e.prototype),(i=n==null?void 0:n.debug)==null||i.call(n,`@smithy/property-provider ${o?"->":"(!)"} ${t}`)}static from(t,r=!0){return Object.assign(new this(t.message,r),t)}},dx=class e extends nc{name="CredentialsProviderError";constructor(t,r=!0){super(t,r),Object.setPrototypeOf(this,e.prototype)}},fx=class e extends nc{name="TokenProviderError";constructor(t,r=!0){super(t,r),Object.setPrototypeOf(this,e.prototype)}},NZ=(...e)=>async()=>{if(e.length===0)throw new nc("No providers in chain");let t;for(let r of e)try{return await r()}catch(n){if(t=n,n!=null&&n.tryNextLink)continue;throw n}throw t},$Z=e=>()=>Promise.resolve(e),MZ=(e,t,r)=>{let n,o,i,s=!1,a=async()=>{o||(o=e());try{n=await o,i=!0,s=!1}finally{o=void 0}return n};return t===void 0?async c=>((!i||c!=null&&c.forceRefresh)&&(n=await a()),n):async c=>((!i||c!=null&&c.forceRefresh)&&(n=await a()),s?n:r&&!r(n)?(s=!0,n):(t(n)&&await a(),n))};Xs.CredentialsProviderError=dx;Xs.ProviderError=nc;Xs.TokenProviderError=fx;Xs.chain=NZ;Xs.fromStatic=$Z;Xs.memoize=MZ});var mx=b(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.getHomeDir=void 0;var LZ=require("os"),kZ=require("path"),px={},FZ=()=>process&&process.geteuid?`${process.geteuid()}`:"DEFAULT",BZ=()=>{let{HOME:e,USERPROFILE:t,HOMEPATH:r,HOMEDRIVE:n=`C:${kZ.sep}`}=process.env;if(e)return e;if(t)return t;if(r)return`${n}${r}`;let o=FZ();return px[o]||(px[o]=(0,LZ.homedir)()),px[o]};nm.getHomeDir=BZ});var hx=b(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.getSSOTokenFilepath=void 0;var UZ=require("crypto"),jZ=require("path"),qZ=mx(),GZ=e=>{let r=(0,UZ.createHash)("sha1").update(e).digest("hex");return(0,jZ.join)((0,qZ.getHomeDir)(),".aws","sso","cache",`${r}.json`)};om.getSSOTokenFilepath=GZ});var s$=b(ji=>{"use strict";Object.defineProperty(ji,"__esModule",{value:!0});ji.getSSOTokenFromFile=ji.tokenIntercept=void 0;var HZ=require("fs/promises"),VZ=hx();ji.tokenIntercept={};var WZ=async e=>{if(ji.tokenIntercept[e])return ji.tokenIntercept[e];let t=(0,VZ.getSSOTokenFilepath)(e),r=await(0,HZ.readFile)(t,"utf8");return JSON.parse(r)};ji.getSSOTokenFromFile=WZ});var a$=b(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.readFile=Xr.fileIntercept=Xr.filePromises=void 0;var zZ=require("node:fs/promises");Xr.filePromises={};Xr.fileIntercept={};var KZ=(e,t)=>Xr.fileIntercept[e]!==void 0?Xr.fileIntercept[e]:((!Xr.filePromises[e]||t!=null&&t.ignoreCache)&&(Xr.filePromises[e]=(0,zZ.readFile)(e,"utf8")),Xr.filePromises[e]);Xr.readFile=KZ});var ao=b(Gt=>{"use strict";var Js=mx(),im=hx(),yx=s$(),sm=require("path"),am=Di(),oc=a$(),u$="AWS_PROFILE",l$="default",YZ=e=>e.profile||process.env[u$]||l$,Zs=".",QZ=e=>Object.entries(e).filter(([t])=>{let r=t.indexOf(Zs);return r===-1?!1:Object.values(am.IniSectionType).includes(t.substring(0,r))}).reduce((t,[r,n])=>{let o=r.indexOf(Zs),i=r.substring(0,o)===am.IniSectionType.PROFILE?r.substring(o+1):r;return t[i]=n,t},{...e.default&&{default:e.default}}),XZ="AWS_CONFIG_FILE",d$=()=>process.env[XZ]||sm.join(Js.getHomeDir(),".aws","config"),JZ="AWS_SHARED_CREDENTIALS_FILE",ZZ=()=>process.env[JZ]||sm.join(Js.getHomeDir(),".aws","credentials"),eee=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,tee=["__proto__","profile __proto__"],gx=e=>{let t={},r,n;for(let o of e.split(/\r?\n/)){let i=o.split(/(^|\s)[;#]/)[0].trim();if(i[0]==="["&&i[i.length-1]==="]"){r=void 0,n=void 0;let a=i.substring(1,i.length-1),c=eee.exec(a);if(c){let[,l,,d]=c;Object.values(am.IniSectionType).includes(l)&&(r=[l,d].join(Zs))}else r=a;if(tee.includes(a))throw new Error(`Found invalid profile name "${a}"`)}else if(r){let a=i.indexOf("=");if(![0,-1].includes(a)){let[c,l]=[i.substring(0,a).trim(),i.substring(a+1).trim()];if(l==="")n=c;else{n&&o.trimStart()===o&&(n=void 0),t[r]=t[r]||{};let d=n?[n,c].join(Zs):c;t[r][d]=l}}}}return t},c$=()=>({}),f$=async(e={})=>{let{filepath:t=ZZ(),configFilepath:r=d$()}=e,n=Js.getHomeDir(),o="~/",i=t;t.startsWith(o)&&(i=sm.join(n,t.slice(2)));let s=r;r.startsWith(o)&&(s=sm.join(n,r.slice(2)));let a=await Promise.all([oc.readFile(s,{ignoreCache:e.ignoreCache}).then(gx).then(QZ).catch(c$),oc.readFile(i,{ignoreCache:e.ignoreCache}).then(gx).catch(c$)]);return{configFile:a[0],credentialsFile:a[1]}},ree=e=>Object.entries(e).filter(([t])=>t.startsWith(am.IniSectionType.SSO_SESSION+Zs)).reduce((t,[r,n])=>({...t,[r.substring(r.indexOf(Zs)+1)]:n}),{}),nee=()=>({}),oee=async(e={})=>oc.readFile(e.configFilepath??d$()).then(gx).then(ree).catch(nee),iee=(...e)=>{let t={};for(let r of e)for(let[n,o]of Object.entries(r))t[n]!==void 0?Object.assign(t[n],o):t[n]=o;return t},see=async e=>{let t=await f$(e);return iee(t.configFile,t.credentialsFile)},aee={getFileRecord(){return oc.fileIntercept},interceptFile(e,t){oc.fileIntercept[e]=Promise.resolve(t)},getTokenRecord(){return yx.tokenIntercept},interceptToken(e,t){yx.tokenIntercept[e]=t}};Gt.getSSOTokenFromFile=yx.getSSOTokenFromFile;Gt.readFile=oc.readFile;Gt.CONFIG_PREFIX_SEPARATOR=Zs;Gt.DEFAULT_PROFILE=l$;Gt.ENV_PROFILE=u$;Gt.externalDataInterceptor=aee;Gt.getProfileName=YZ;Gt.loadSharedConfigFiles=f$;Gt.loadSsoSessionData=oee;Gt.parseKnownFiles=see;Object.prototype.hasOwnProperty.call(Js,"__proto__")&&!Object.prototype.hasOwnProperty.call(Gt,"__proto__")&&Object.defineProperty(Gt,"__proto__",{enumerable:!0,value:Js.__proto__});Object.keys(Js).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Gt,e)&&(Gt[e]=Js[e])});Object.prototype.hasOwnProperty.call(im,"__proto__")&&!Object.prototype.hasOwnProperty.call(Gt,"__proto__")&&Object.defineProperty(Gt,"__proto__",{enumerable:!0,value:im.__proto__});Object.keys(im).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(Gt,e)&&(Gt[e]=im[e])})});var co=b(h$=>{"use strict";var dl=lr(),p$=ao();function m$(e){try{let t=new Set(Array.from(e.match(/([A-Z_]){3,}/g)??[]));return t.delete("CONFIG"),t.delete("CONFIG_PREFIX_SEPARATOR"),t.delete("ENV"),[...t].join(", ")}catch{return e}}var cee=(e,t)=>async()=>{try{let r=e(process.env,t);if(r===void 0)throw new Error;return r}catch(r){throw new dl.CredentialsProviderError(r.message||`Not found in ENV: ${m$(e.toString())}`,{logger:t==null?void 0:t.logger})}},uee=(e,{preferredFile:t="config",...r}={})=>async()=>{let n=p$.getProfileName(r),{configFile:o,credentialsFile:i}=await p$.loadSharedConfigFiles(r),s=i[n]||{},a=o[n]||{},c=t==="config"?{...s,...a}:{...a,...s};try{let d=e(c,t==="config"?o:i);if(d===void 0)throw new Error;return d}catch(l){throw new dl.CredentialsProviderError(l.message||`Not found in config files w/ profile [${n}]: ${m$(e.toString())}`,{logger:r.logger})}},lee=e=>typeof e=="function",dee=e=>lee(e)?async()=>await e():dl.fromStatic(e),fee=({environmentVariableSelector:e,configFileSelector:t,default:r},n={})=>{let{signingName:o,logger:i}=n,s={signingName:o,logger:i};return dl.memoize(dl.chain(cee(e,s),uee(t,n),dee(r)))};h$.loadConfig=fee});var E$=b(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});cm.getEndpointUrlConfig=void 0;var y$=ao(),g$="AWS_ENDPOINT_URL",_$="endpoint_url",pee=e=>({environmentVariableSelector:t=>{let r=e.split(" ").map(i=>i.toUpperCase()),n=t[[g$,...r].join("_")];if(n)return n;let o=t[g$];if(o)return o},configFileSelector:(t,r)=>{if(r&&t.services){let o=r[["services",t.services].join(y$.CONFIG_PREFIX_SEPARATOR)];if(o){let i=e.split(" ").map(a=>a.toLowerCase()),s=o[[i.join("_"),_$].join(y$.CONFIG_PREFIX_SEPARATOR)];if(s)return s}}let n=t[_$];if(n)return n},default:void 0});cm.getEndpointUrlConfig=pee});var S$=b(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});um.getEndpointFromConfig=void 0;var mee=co(),hee=E$(),yee=async e=>(0,mee.loadConfig)((0,hee.getEndpointUrlConfig)(e??""))();um.getEndpointFromConfig=yee});var w$=b(ic=>{"use strict";var gee=nt(),_ee=(ob(),ie(LO)),b$=(e,t)=>(r,n)=>async o=>{var s,a,c,l;let{response:i}=await r(o);try{let d=await t(i,e);return{response:i,output:d}}catch(d){if(Object.defineProperty(d,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in d)){let f="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{d.message+=`
28
+ `+f}catch{!n.logger||((a=(s=n.logger)==null?void 0:s.constructor)==null?void 0:a.name)==="NoOpLogger"?console.warn(f):(l=(c=n.logger)==null?void 0:c.warn)==null||l.call(c,f)}typeof d.$responseBodyText<"u"&&d.$response&&(d.$response.body=d.$responseBodyText);try{if(gee.HttpResponse.isInstance(i)){let{headers:m={}}=i,h=Object.entries(m);d.$metadata={httpStatusCode:i.statusCode,requestId:_x(/^x-[\w-]+-request-?id$/,h),extendedRequestId:_x(/^x-[\w-]+-id-2$/,h),cfId:_x(/^x-[\w-]+-cf-id$/,h)}}}catch{}}throw d}},_x=(e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1],x$=(e,t)=>(r,n)=>async o=>{let i=e,s=n.endpointV2?async()=>_ee.toEndpointV1(n.endpointV2):i.endpoint;if(!s)throw new Error("No valid endpoint provider available.");let a=await t(o.input,{...e,endpoint:s});return r({...o,request:a})},v$={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},T$={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Eee(e,t,r){return{applyToStack:n=>{n.add(b$(e,r),v$),n.add(x$(e,t),T$)}}}ic.deserializerMiddleware=b$;ic.deserializerMiddlewareOption=v$;ic.getSerdePlugin=Eee;ic.serializerMiddleware=x$;ic.serializerMiddlewareOption=T$});var $n=b(Yo=>{"use strict";var I$=S$(),A$=no(),See=(ar(),ie(al)),lm=ir(),bee=w$(),xee=async e=>{let t=(e==null?void 0:e.Bucket)||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Iee(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Aee(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},vee=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Tee=/(\d+\.){3}\d+/,wee=/\.\./,Aee=e=>vee.test(e)&&!Tee.test(e)&&!wee.test(e),Iee=e=>{let[t,r,n,,,o]=e.split(":"),i=t==="arn"&&e.split(":").length>=6,s=!!(i&&r&&n&&o);if(i&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},Cee=(e,t,r,n=!1)=>{let o=async()=>{let i;if(n){let s=r.clientContextParams;i=(s==null?void 0:s[e])??r[e]??r[t]}else i=r[e]??r[t];return typeof i=="function"?i():i};return e==="credentialScope"||t==="CredentialScope"?async()=>{let i=typeof r.credentials=="function"?await r.credentials():r.credentials;return(i==null?void 0:i.credentialScope)??(i==null?void 0:i.CredentialScope)}:e==="accountId"||t==="AccountId"?async()=>{let i=typeof r.credentials=="function"?await r.credentials():r.credentials;return(i==null?void 0:i.accountId)??(i==null?void 0:i.AccountId)}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;let i=await o();if(i&&typeof i=="object"){if("url"in i)return i.url.href;if("hostname"in i){let{protocol:s,hostname:a,port:c,path:l}=i;return`${s}//${a}${c?":"+c:""}${l}`}}return i}:o},Ex=e=>{if(typeof e=="object"){if("url"in e){let t=A$.parseUrl(e.url);if(e.headers){t.headers={};for(let[r,n]of Object.entries(e.headers))t.headers[r.toLowerCase()]=n.join(", ")}return t}return e}return A$.parseUrl(e)},C$=async(e,t,r,n)=>{if(!r.isCustomEndpoint){let s;r.serviceConfiguredEndpoint?s=await r.serviceConfiguredEndpoint():s=await I$.getEndpointFromConfig(r.serviceId),s&&(r.endpoint=()=>Promise.resolve(Ex(s)),r.isCustomEndpoint=!0)}let o=await D$(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");let i=r.endpointProvider(o,n);if(r.isCustomEndpoint&&r.endpoint){let s=await r.endpoint();if(s!=null&&s.headers){i.headers??={};for(let[a,c]of Object.entries(s.headers))i.headers[a]=Array.isArray(c)?c:[c]}}return i},D$=async(e,t,r)=>{var i;let n={},o=((i=t==null?void 0:t.getEndpointParameterInstructions)==null?void 0:i.call(t))||{};for(let[s,a]of Object.entries(o))switch(a.type){case"staticContextParams":n[s]=a.value;break;case"contextParams":n[s]=e[a.name];break;case"clientContextParams":case"builtInParams":n[s]=await Cee(a.name,s,r,a.type!=="builtInParams")();break;case"operationContextParams":n[s]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(o).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await xee(n),n},R$=({config:e,instructions:t})=>(r,n)=>async o=>{var a,c,l;e.isCustomEndpoint&&See.setFeature(n,"ENDPOINT_OVERRIDE","N");let i=await C$(o.input,{getEndpointParameterInstructions(){return t}},{...e},n);n.endpointV2=i,n.authSchemes=(a=i.properties)==null?void 0:a.authSchemes;let s=(c=n.authSchemes)==null?void 0:c[0];if(s){n.signing_region=s.signingRegion,n.signing_service=s.signingName;let d=lm.getSmithyContext(n),f=(l=d==null?void 0:d.selectedHttpAuthScheme)==null?void 0:l.httpAuthOption;f&&(f.signingProperties=Object.assign(f.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return r({...o})},P$={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:bee.serializerMiddlewareOption.name},Dee=(e,t)=>({applyToStack:r=>{r.addRelativeTo(R$({config:e,instructions:t}),P$)}}),Ree=e=>{let t=e.tls??!0,{endpoint:r,useDualstackEndpoint:n,useFipsEndpoint:o}=e,i=r!=null?async()=>Ex(await lm.normalizeProvider(r)()):void 0,a=Object.assign(e,{endpoint:i,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:lm.normalizeProvider(n??!1),useFipsEndpoint:lm.normalizeProvider(o??!1)}),c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=I$.getEndpointFromConfig(e.serviceId)),c),a},Pee=e=>{let{endpoint:t}=e;return t===void 0&&(e.endpoint=async()=>{throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint.")}),e};Yo.endpointMiddleware=R$;Yo.endpointMiddlewareOptions=P$;Yo.getEndpointFromInstructions=C$;Yo.getEndpointPlugin=Dee;Yo.resolveEndpointConfig=Ree;Yo.resolveEndpointRequiredConfig=Pee;Yo.resolveParams=D$;Yo.toEndpointV1=Ex});var M$=b($$=>{"use strict";var ea=(e,t)=>{let r=[];if(e&&r.push(e),t)for(let n of t)r.push(n);return r},qi=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Sx=()=>{let e=[],t=[],r=!1,n=new Set,o=f=>f.sort((m,h)=>O$[h.step]-O$[m.step]||N$[h.priority||"normal"]-N$[m.priority||"normal"]),i=f=>{let m=!1,h=_=>{let E=ea(_.name,_.aliases);if(E.includes(f)){m=!0;for(let T of E)n.delete(T);return!1}return!0};return e=e.filter(h),t=t.filter(h),m},s=f=>{let m=!1,h=_=>{if(_.middleware===f){m=!0;for(let E of ea(_.name,_.aliases))n.delete(E);return!1}return!0};return e=e.filter(h),t=t.filter(h),m},a=f=>{var m;return e.forEach(h=>{f.add(h.middleware,{...h})}),t.forEach(h=>{f.addRelativeTo(h.middleware,{...h})}),(m=f.identifyOnResolve)==null||m.call(f,d.identifyOnResolve()),f},c=f=>{let m=[];return f.before.forEach(h=>{h.before.length===0&&h.after.length===0?m.push(h):m.push(...c(h))}),m.push(f),f.after.reverse().forEach(h=>{h.before.length===0&&h.after.length===0?m.push(h):m.push(...c(h))}),m},l=(f=!1)=>{let m=[],h=[],_={};return e.forEach(T=>{let I={...T,before:[],after:[]};for(let A of ea(I.name,I.aliases))_[A]=I;m.push(I)}),t.forEach(T=>{let I={...T,before:[],after:[]};for(let A of ea(I.name,I.aliases))_[A]=I;h.push(I)}),h.forEach(T=>{if(T.toMiddleware){let I=_[T.toMiddleware];if(I===void 0){if(f)return;throw new Error(`${T.toMiddleware} is not found when adding ${qi(T.name,T.aliases)} middleware ${T.relation} ${T.toMiddleware}`)}T.relation==="after"&&I.after.push(T),T.relation==="before"&&I.before.push(T)}}),o(m).map(c).reduce((T,I)=>(T.push(...I),T),[])},d={add:(f,m={})=>{let{name:h,override:_,aliases:E}=m,T={step:"initialize",priority:"normal",middleware:f,...m},I=ea(h,E);if(I.length>0){if(I.some(A=>n.has(A))){if(!_)throw new Error(`Duplicate middleware name '${qi(h,E)}'`);for(let A of I){let O=e.findIndex(z=>{var Q;return z.name===A||((Q=z.aliases)==null?void 0:Q.some(be=>be===A))});if(O===-1)continue;let G=e[O];if(G.step!==T.step||T.priority!==G.priority)throw new Error(`"${qi(G.name,G.aliases)}" middleware with ${G.priority} priority in ${G.step} step cannot be overridden by "${qi(h,E)}" middleware with ${T.priority} priority in ${T.step} step.`);e.splice(O,1)}}for(let A of I)n.add(A)}e.push(T)},addRelativeTo:(f,m)=>{let{name:h,override:_,aliases:E}=m,T={middleware:f,...m},I=ea(h,E);if(I.length>0){if(I.some(A=>n.has(A))){if(!_)throw new Error(`Duplicate middleware name '${qi(h,E)}'`);for(let A of I){let O=t.findIndex(z=>{var Q;return z.name===A||((Q=z.aliases)==null?void 0:Q.some(be=>be===A))});if(O===-1)continue;let G=t[O];if(G.toMiddleware!==T.toMiddleware||G.relation!==T.relation)throw new Error(`"${qi(G.name,G.aliases)}" middleware ${G.relation} "${G.toMiddleware}" middleware cannot be overridden by "${qi(h,E)}" middleware ${T.relation} "${T.toMiddleware}" middleware.`);t.splice(O,1)}}for(let A of I)n.add(A)}t.push(T)},clone:()=>a(Sx()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?i(f):s(f),removeByTag:f=>{let m=!1,h=_=>{let{tags:E,name:T,aliases:I}=_;if(E&&E.includes(f)){let A=ea(T,I);for(let O of A)n.delete(O);return m=!0,!1}return!0};return e=e.filter(h),t=t.filter(h),m},concat:f=>{var h;let m=a(Sx());return m.use(f),m.identifyOnResolve(r||m.identifyOnResolve()||(((h=f.identifyOnResolve)==null?void 0:h.call(f))??!1)),m},applyToStack:a,identify:()=>l(!0).map(f=>{let m=f.step??f.relation+" "+f.toMiddleware;return qi(f.name,f.aliases)+" - "+m}),identifyOnResolve(f){return typeof f=="boolean"&&(r=f),r},resolve:(f,m)=>{for(let h of l().map(_=>_.middleware).reverse())f=h(f,m);return r&&console.log(d.identify()),f}};return d},O$={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},N$={high:3,normal:2,low:1};$$.constructStack=Sx});var Te=b(et=>{"use strict";var k$=M$(),Cx=(Nr(),ie(ZN)),dm=Di(),Oee=(We(),ie(Zu)),fm=(Tr(),ie(BN)),xx=class{config;middlewareStack=k$.constructStack();initConfig;handlers;constructor(t){this.config=t;let{protocol:r,protocolSettings:n}=t;n&&typeof r=="function"&&(t.protocol=new r(n))}send(t,r,n){let o=typeof r!="function"?r:void 0,i=typeof r=="function"?r:n,s=o===void 0&&this.config.cacheMiddleware===!0,a;if(s){this.handlers||(this.handlers=new WeakMap);let c=this.handlers;c.has(t.constructor)?a=c.get(t.constructor):(a=t.resolveMiddleware(this.middlewareStack,this.config,o),c.set(t.constructor,a))}else delete this.handlers,a=t.resolveMiddleware(this.middlewareStack,this.config,o);if(i)a(t).then(c=>i(null,c.output),c=>i(c)).catch(()=>{});else return a(t).then(c=>c.output)}destroy(){var t,r,n;(n=(r=(t=this.config)==null?void 0:t.requestHandler)==null?void 0:r.destroy)==null||n.call(r),delete this.handlers}},bx="***SensitiveInformation***";function vx(e,t){if(t==null)return t;let r=Oee.NormalizedSchema.of(e);if(r.getMergedTraits().sensitive)return bx;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return bx}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return bx}else if(r.isStructSchema()&&typeof t=="object"){let n=t,o={};for(let[i,s]of r.structIterator())n[i]!=null&&(o[i]=vx(s,n[i]));return o}return t}var pm=class{middlewareStack=k$.constructStack();schema;static classBuilder(){return new Tx}resolveMiddlewareWithContext(t,r,n,{middlewareFn:o,clientName:i,commandName:s,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:l,additionalContext:d,CommandCtor:f}){for(let T of o.bind(this)(f,t,r,n))this.middlewareStack.use(T);let m=t.concat(this.middlewareStack),{logger:h}=r,_={logger:h,clientName:i,commandName:s,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[dm.SMITHY_CONTEXT_KEY]:{commandInstance:this,...l},...d},{requestHandler:E}=r;return m.resolve(T=>E.handle(T.request,n||{}),_)}},Tx=class{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,r,n={}){return this._smithyContext={service:t,operation:r,...n},this}c(t={}){return this._additionalContext=t,this}n(t,r){return this._clientName=t,this._commandName=r,this}f(t=n=>n,r=n=>n){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=r,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){let t=this,r;return r=class extends pm{input;static getEndpointParameterInstructions(){return t._ep}constructor(...[n]){super(),this.input=n??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(n,o,i){let s=t._operationSchema,a=(s==null?void 0:s[4])??(s==null?void 0:s.input),c=(s==null?void 0:s[5])??(s==null?void 0:s.output);return this.resolveMiddlewareWithContext(n,o,i,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(s?vx.bind(null,a):l=>l),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(s?vx.bind(null,c):l=>l),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}},Nee="***SensitiveInformation***",$ee=(e,t,r)=>{for(let[i,s]of Object.entries(e)){let a=async function(l,d,f){let m=new s(l);if(typeof d=="function")this.send(m,d);else if(typeof f=="function"){if(typeof d!="object")throw new Error(`Expected http options but got ${typeof d}`);this.send(m,d||{},f)}else return this.send(m,d)},c=(i[0].toLowerCase()+i.slice(1)).replace(/Command$/,"");t.prototype[c]=a}let{paginators:n={},waiters:o={}}=r??{};for(let[i,s]of Object.entries(n))t.prototype[i]===void 0&&(t.prototype[i]=function(a={},c,...l){return s({...c,client:this},a,...l)});for(let[i,s]of Object.entries(o))t.prototype[i]===void 0&&(t.prototype[i]=async function(a={},c,...l){let d=c;return typeof c=="number"&&(d={maxWaitTime:c}),s({...d,client:this},a,...l)})},wx=class e extends Error{$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;let r=t;return e.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;let r=t;return this===e?e.isInstance(t):e.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}},F$=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,o])=>{(e[n]==null||e[n]==="")&&(e[n]=o)});let r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},B$=({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{let o=Lee(e),i=o.httpStatusCode?o.httpStatusCode+"":void 0,s=new r({name:(t==null?void 0:t.code)||(t==null?void 0:t.Code)||n||i||"UnknownError",$fault:"client",$metadata:o});throw F$(s,t)},Mee=e=>({output:t,parsedBody:r,errorCode:n})=>{B$({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})},Lee=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"]}),kee=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{}}},L$=!1,Fee=e=>{e&&!L$&&parseInt(e.substring(1,e.indexOf(".")))<16&&(L$=!0)},U$=Object.values(dm.AlgorithmId),Bee=e=>{let t=[];for(let r in dm.AlgorithmId){let n=dm.AlgorithmId[r];e[n]!==void 0&&t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}for(let[r,n]of Object.entries(e.checksumAlgorithms??{}))t.push({algorithmId:()=>r,checksumConstructor:()=>n});return{addChecksumAlgorithm(r){e.checksumAlgorithms=e.checksumAlgorithms??{};let n=r.algorithmId(),o=r.checksumConstructor();U$.includes(n)?e.checksumAlgorithms[n.toUpperCase()]=o:e.checksumAlgorithms[n]=o,t.push(r)},checksumAlgorithms(){return t}}},Uee=e=>{let t={};return e.checksumAlgorithms().forEach(r=>{let n=r.algorithmId();U$.includes(n)&&(t[n]=r.checksumConstructor())}),t},jee=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),qee=e=>{let t={};return t.retryStrategy=e.retryStrategy(),t},j$=e=>Object.assign(Bee(e),jee(e)),Gee=j$,Hee=e=>Object.assign(Uee(e),qee(e)),Vee=e=>Array.isArray(e)?e:[e],q$=e=>{let t="#text";for(let r in e)e.hasOwnProperty(r)&&e[r][t]!==void 0?e[r]=e[r][t]:typeof e[r]=="object"&&e[r]!==null&&(e[r]=q$(e[r]));return e},Wee=e=>e!=null,Ax=class{trace(){}debug(){}info(){}warn(){}error(){}};function G$(e,t,r){let n,o,i;if(typeof t>"u"&&typeof r>"u")n={},i=e;else{if(n=e,typeof t=="function")return o=t,i=r,Yee(n,o,i);i=t}for(let s of Object.keys(i)){if(!Array.isArray(i[s])){n[s]=i[s];continue}H$(n,null,i,s)}return n}var zee=e=>{let t={};for(let[r,n]of Object.entries(e||{}))t[r]=[,n];return t},Kee=(e,t)=>{let r={};for(let n in t)H$(r,e,t,n);return r},Yee=(e,t,r)=>G$(e,Object.entries(r).reduce((n,[o,i])=>(Array.isArray(i)?n[o]=i:typeof i=="function"?n[o]=[t,i()]:n[o]=[t,i],n),{})),H$=(e,t,r,n)=>{if(t!==null){let s=r[n];typeof s=="function"&&(s=[,s]);let[a=Qee,c=Xee,l=n]=s;(typeof a=="function"&&a(t[l])||typeof a!="function"&&a)&&(e[n]=c(t[l]));return}let[o,i]=r[n];if(typeof i=="function"){let s,a=o===void 0&&(s=i())!=null,c=typeof o=="function"&&!!o(void 0)||typeof o!="function"&&!!o;a?e[n]=s:c&&(e[n]=i())}else{let s=o===void 0&&i!=null,a=typeof o=="function"&&!!o(i)||typeof o!="function"&&!!o;(s||a)&&(e[n]=i)}},Qee=e=>e!=null,Xee=e=>e,Jee=e=>{if(e!==e)return"NaN";switch(e){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return e}},Zee=e=>e.toISOString().replace(".000Z","Z"),Ix=e=>{if(e==null)return{};if(Array.isArray(e))return e.filter(t=>t!=null).map(Ix);if(typeof e=="object"){let t={};for(let r of Object.keys(e))e[r]!=null&&(t[r]=Ix(e[r]));return t}return e};et.collectBody=Cx.collectBody;et.extendedEncodeURIComponent=Cx.extendedEncodeURIComponent;et.resolvedPath=Cx.resolvedPath;et.Client=xx;et.Command=pm;et.NoOpLogger=Ax;et.SENSITIVE_STRING=Nee;et.ServiceException=wx;et._json=Ix;et.convertMap=zee;et.createAggregatedClient=$ee;et.decorateServiceException=F$;et.emitWarningIfUnsupportedVersion=Fee;et.getArrayIfSingleItem=Vee;et.getDefaultClientConfiguration=Gee;et.getDefaultExtensionConfiguration=j$;et.getValueFromTextNode=q$;et.isSerializableHeaderValue=Wee;et.loadConfigsForDefaultMode=kee;et.map=G$;et.resolveDefaultRuntimeConfig=Hee;et.serializeDateTime=Zee;et.serializeFloat=Jee;et.take=Kee;et.throwDefaultError=B$;et.withBaseException=Mee;Object.prototype.hasOwnProperty.call(fm,"__proto__")&&!Object.prototype.hasOwnProperty.call(et,"__proto__")&&Object.defineProperty(et,"__proto__",{enumerable:!0,value:fm.__proto__});Object.keys(fm).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(et,e)&&(et[e]=fm[e])})});var V$=b(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});mm.isStreamingPayload=void 0;var ete=require("stream"),tte=e=>(e==null?void 0:e.body)instanceof ete.Readable||typeof ReadableStream<"u"&&(e==null?void 0:e.body)instanceof ReadableStream;mm.isStreamingPayload=tte});var Mn=b(Ht=>{"use strict";var xt=Ui(),sc=nt(),Gi=Jb(),z$=vb(),W$=ir(),rte=Te(),nte=V$(),ote=(e,t)=>{let r=e,n=xt.NO_RETRY_INCREMENT,o=xt.RETRY_COST,i=xt.TIMEOUT_RETRY_COST,s=e,a=f=>f.name==="TimeoutError"?i:o,c=f=>a(f)<=s;return Object.freeze({hasRetryTokens:c,retrieveRetryTokens:f=>{if(!c(f))throw new Error("No retry token available");let m=a(f);return s-=m,m},releaseRetryTokens:f=>{s+=f??n,s=Math.min(s,r)}})},K$=(e,t)=>Math.floor(Math.min(xt.MAXIMUM_RETRY_DELAY,Math.random()*2**t*e)),Y$=e=>e?Gi.isRetryableByTrait(e)||Gi.isClockSkewError(e)||Gi.isThrottlingError(e)||Gi.isTransientError(e):!1,Q$=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),hm=class{maxAttemptsProvider;retryDecider;delayDecider;retryQuota;mode=xt.RETRY_MODES.STANDARD;constructor(t,r){this.maxAttemptsProvider=t,this.retryDecider=(r==null?void 0:r.retryDecider)??Y$,this.delayDecider=(r==null?void 0:r.delayDecider)??K$,this.retryQuota=(r==null?void 0:r.retryQuota)??ote(xt.INITIAL_RETRY_TOKENS)}shouldRetry(t,r,n){return r<n&&this.retryDecider(t)&&this.retryQuota.hasRetryTokens(t)}async getMaxAttempts(){let t;try{t=await this.maxAttemptsProvider()}catch{t=xt.DEFAULT_MAX_ATTEMPTS}return t}async retry(t,r,n){let o,i=0,s=0,a=await this.getMaxAttempts(),{request:c}=r;for(sc.HttpRequest.isInstance(c)&&(c.headers[xt.INVOCATION_ID_HEADER]=z$.v4());;)try{sc.HttpRequest.isInstance(c)&&(c.headers[xt.REQUEST_HEADER]=`attempt=${i+1}; max=${a}`),n!=null&&n.beforeRequest&&await n.beforeRequest();let{response:l,output:d}=await t(r);return n!=null&&n.afterRequest&&n.afterRequest(l),this.retryQuota.releaseRetryTokens(o),d.$metadata.attempts=i+1,d.$metadata.totalRetryDelay=s,{response:l,output:d}}catch(l){let d=Q$(l);if(i++,this.shouldRetry(d,i,a)){o=this.retryQuota.retrieveRetryTokens(d);let f=this.delayDecider(Gi.isThrottlingError(d)?xt.THROTTLING_RETRY_DELAY_BASE:xt.DEFAULT_RETRY_DELAY_BASE,i),m=ite(d.$response),h=Math.max(m||0,f);s+=h,await new Promise(_=>setTimeout(_,h));continue}throw d.$metadata||(d.$metadata={}),d.$metadata.attempts=i,d.$metadata.totalRetryDelay=s,d}}},ite=e=>{if(!sc.HttpResponse.isInstance(e))return;let t=Object.keys(e.headers).find(i=>i.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],n=Number(r);return Number.isNaN(n)?new Date(r).getTime()-Date.now():n*1e3},Dx=class extends hm{rateLimiter;constructor(t,r){let{rateLimiter:n,...o}=r??{};super(t,o),this.rateLimiter=n??new xt.DefaultRateLimiter,this.mode=xt.RETRY_MODES.ADAPTIVE}async retry(t,r){return super.retry(t,r,{beforeRequest:async()=>this.rateLimiter.getSendToken(),afterRequest:n=>{this.rateLimiter.updateClientSendingRate(n)}})}},Rx="AWS_MAX_ATTEMPTS",Px="max_attempts",ste={environmentVariableSelector:e=>{let t=e[Rx];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${Rx} mast be a number, got "${t}"`);return r},configFileSelector:e=>{let t=e[Px];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${Px} mast be a number, got "${t}"`);return r},default:xt.DEFAULT_MAX_ATTEMPTS},ate=e=>{let{retryStrategy:t,retryMode:r}=e,n=W$.normalizeProvider(e.maxAttempts??xt.DEFAULT_MAX_ATTEMPTS),o=t?Promise.resolve(t):void 0,i=async()=>await W$.normalizeProvider(r)()===xt.RETRY_MODES.ADAPTIVE?new xt.AdaptiveRetryStrategy(n):new xt.StandardRetryStrategy(n);return Object.assign(e,{maxAttempts:n,retryStrategy:()=>o??=i()})},X$="AWS_RETRY_MODE",J$="retry_mode",cte={environmentVariableSelector:e=>e[X$],configFileSelector:e=>e[J$],default:xt.DEFAULT_RETRY_MODE},Z$=()=>e=>async t=>{let{request:r}=t;return sc.HttpRequest.isInstance(r)&&(delete r.headers[xt.INVOCATION_ID_HEADER],delete r.headers[xt.REQUEST_HEADER]),e(t)},eM={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},ute=e=>({applyToStack:t=>{t.addRelativeTo(Z$(),eM)}}),tM=e=>(t,r)=>async n=>{var s;let o=await e.retryStrategy(),i=await e.maxAttempts();if(lte(o)){o=o;let a=await o.acquireInitialRetryToken(r.partition_id),c=new Error,l=0,d=0,{request:f}=n,m=sc.HttpRequest.isInstance(f);for(m&&(f.headers[xt.INVOCATION_ID_HEADER]=z$.v4());;)try{m&&(f.headers[xt.REQUEST_HEADER]=`attempt=${l+1}; max=${i}`);let{response:h,output:_}=await t(n);return o.recordSuccess(a),_.$metadata.attempts=l+1,_.$metadata.totalRetryDelay=d,{response:h,output:_}}catch(h){let _=dte(h);if(c=Q$(h),m&&nte.isStreamingPayload(f))throw(s=r.logger instanceof rte.NoOpLogger?console:r.logger)==null||s.warn("An error was encountered in a non-retryable streaming request."),c;try{a=await o.refreshRetryTokenForRetry(a,_)}catch{throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=l+1,c.$metadata.totalRetryDelay=d,c}l=a.getRetryCount();let E=a.getRetryDelay();d+=E,await new Promise(T=>setTimeout(T,E))}}else return o=o,o!=null&&o.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",o.mode]]),o.retry(t,n)},lte=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",dte=e=>{let t={error:e,errorType:fte(e)},r=nM(e.$response);return r&&(t.retryAfterHint=r),t},fte=e=>Gi.isThrottlingError(e)?"THROTTLING":Gi.isTransientError(e)?"TRANSIENT":Gi.isServerError(e)?"SERVER_ERROR":"CLIENT_ERROR",rM={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},pte=e=>({applyToStack:t=>{t.add(tM(e),rM)}}),nM=e=>{if(!sc.HttpResponse.isInstance(e))return;let t=Object.keys(e.headers).find(i=>i.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],n=Number(r);return Number.isNaN(n)?new Date(r):new Date(n*1e3)};Ht.AdaptiveRetryStrategy=Dx;Ht.CONFIG_MAX_ATTEMPTS=Px;Ht.CONFIG_RETRY_MODE=J$;Ht.ENV_MAX_ATTEMPTS=Rx;Ht.ENV_RETRY_MODE=X$;Ht.NODE_MAX_ATTEMPT_CONFIG_OPTIONS=ste;Ht.NODE_RETRY_MODE_CONFIG_OPTIONS=cte;Ht.StandardRetryStrategy=hm;Ht.defaultDelayDecider=K$;Ht.defaultRetryDecider=Y$;Ht.getOmitRetryHeadersPlugin=ute;Ht.getRetryAfterHint=nM;Ht.getRetryPlugin=pte;Ht.omitRetryHeadersMiddleware=Z$;Ht.omitRetryHeadersMiddlewareOptions=eM;Ht.resolveRetryConfig=ate;Ht.retryMiddleware=tM;Ht.retryMiddlewareOptions=rM});var oM,Ox,iM=D(()=>{oM=C(nt()),Ox=e=>{var t,r;return oM.HttpResponse.isInstance(e)?((t=e.headers)==null?void 0:t.date)??((r=e.headers)==null?void 0:r.Date):void 0}});var ac,Nx=D(()=>{ac=e=>new Date(Date.now()+e)});var sM,aM=D(()=>{Nx();sM=(e,t)=>Math.abs(ac(t).getTime()-e)>=3e5});var $x,cM=D(()=>{aM();$x=(e,t)=>{let r=Date.parse(e);return sM(r,t)?r-Date.now():t}});var Mx=D(()=>{iM();Nx();cM()});var uM,fl,cc,Qt,Lx,kx=D(()=>{uM=C(nt());Mx();fl=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},cc=async e=>{var l,d,f;let t=fl("context",e.context),r=fl("config",e.config),n=(f=(d=(l=t.endpointV2)==null?void 0:l.properties)==null?void 0:d.authSchemes)==null?void 0:f[0],i=await fl("signer",r.signer)(n),s=e==null?void 0:e.signingRegion,a=e==null?void 0:e.signingRegionSet,c=e==null?void 0:e.signingName;return{config:r,signer:i,signingRegion:s,signingRegionSet:a,signingName:c}},Qt=class{async sign(t,r,n){var f;if(!uM.HttpRequest.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let o=await cc(n),{config:i,signer:s}=o,{signingRegion:a,signingName:c}=o,l=n.context;if(((f=l==null?void 0:l.authSchemes)==null?void 0:f.length)??!1){let[m,h]=l.authSchemes;(m==null?void 0:m.name)==="sigv4a"&&(h==null?void 0:h.name)==="sigv4"&&(a=(h==null?void 0:h.signingRegion)??a,c=(h==null?void 0:h.signingName)??c)}return await s.sign(t,{signingDate:ac(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(t){return r=>{let n=r.ServerTime??Ox(r.$response);if(n){let o=fl("config",t.config),i=o.systemClockOffset;o.systemClockOffset=$x(n,o.systemClockOffset),o.systemClockOffset!==i&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){let n=Ox(t);if(n){let o=fl("config",r.config);o.systemClockOffset=$x(n,o.systemClockOffset)}}},Lx=Qt});var lM,pl,dM=D(()=>{lM=C(nt());Mx();kx();pl=class extends Qt{async sign(t,r,n){var m;if(!lM.HttpRequest.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:o,signer:i,signingRegion:s,signingRegionSet:a,signingName:c}=await cc(n),d=(await((m=o.sigv4aSigningRegionSet)==null?void 0:m.call(o))??a??[s]).join(",");return await i.sign(t,{signingDate:ac(o.systemClockOffset),signingRegion:d,signingService:c})}}});var Fx,fM=D(()=>{Fx=e=>typeof e=="string"&&e.length>0?e.split(",").map(t=>t.trim()):[]});var ym,Bx=D(()=>{ym=e=>`AWS_BEARER_TOKEN_${e.replace(/[\s-]/g,"_").toUpperCase()}`});var pM,mM,uo,hM=D(()=>{fM();Bx();pM="AWS_AUTH_SCHEME_PREFERENCE",mM="auth_scheme_preference",uo={environmentVariableSelector:(e,t)=>{if(t!=null&&t.signingName&&ym(t.signingName)in e)return["httpBearerAuth"];if(pM in e)return Fx(e[pM])},configFileSelector:e=>{if(mM in e)return Fx(e[mM])},default:[]}});var Ux,yM,gM,_M=D(()=>{ar();Ux=C(lr()),yM=e=>(e.sigv4aSigningRegionSet=Pi(e.sigv4aSigningRegionSet),e),gM={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET)return e.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map(t=>t.trim());throw new Ux.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(e){if(e.sigv4a_signing_region_set)return(e.sigv4a_signing_region_set??"").split(",").map(t=>t.trim());throw new Ux.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0}});var qM=b(Pe=>{"use strict";var Hi=Y0(),ta=Kt(),mte=v0(),xM=nt(),EM=ir(),gm=k0(),vM="X-Amz-Algorithm",TM="X-Amz-Credential",Wx="X-Amz-Date",wM="X-Amz-SignedHeaders",AM="X-Amz-Expires",zx="X-Amz-Signature",Kx="X-Amz-Security-Token",hte="X-Amz-Region-Set",Yx="authorization",Qx=Wx.toLowerCase(),IM="date",CM=[Yx,Qx,IM],DM=zx.toLowerCase(),xm="x-amz-content-sha256",RM=Kx.toLowerCase(),yte="host",PM={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},OM=/^proxy-/,NM=/^sec-/,gte=[/^proxy-/i,/^sec-/i],_m="AWS4-HMAC-SHA256",_te="AWS4-ECDSA-P256-SHA256",$M="AWS4-HMAC-SHA256-PAYLOAD",MM="UNSIGNED-PAYLOAD",LM=50,Xx="aws4_request",kM=3600*24*7,uc={},Em=[],Sm=(e,t,r)=>`${e}/${t}/${r}/${Xx}`,FM=async(e,t,r,n,o)=>{let i=await SM(e,t.secretAccessKey,t.accessKeyId),s=`${r}:${n}:${o}:${Hi.toHex(i)}:${t.sessionToken}`;if(s in uc)return uc[s];for(Em.push(s);Em.length>LM;)delete uc[Em.shift()];let a=`AWS4${t.secretAccessKey}`;for(let c of[r,n,o,Xx])a=await SM(e,a,c);return uc[s]=a},Ete=()=>{Em.length=0,Object.keys(uc).forEach(e=>{delete uc[e]})},SM=(e,t,r)=>{let n=new e(t);return n.update(ta.toUint8Array(r)),n.digest()},jx=({headers:e},t,r)=>{let n={};for(let o of Object.keys(e).sort()){if(e[o]==null)continue;let i=o.toLowerCase();(i in PM||t!=null&&t.has(i)||OM.test(i)||NM.test(i))&&(!r||r&&!r.has(i))||(n[i]=e[o].trim().replace(/\s+/g," "))}return n},bm=async({headers:e,body:t},r)=>{for(let n of Object.keys(e))if(n.toLowerCase()===xm)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||mte.isArrayBuffer(t)){let n=new r;return n.update(ta.toUint8Array(t)),Hi.toHex(await n.digest())}return MM},qx=class{format(t){let r=[];for(let i of Object.keys(t)){let s=ta.fromUtf8(i);r.push(Uint8Array.from([s.byteLength]),s,this.formatHeaderValue(t[i]))}let n=new Uint8Array(r.reduce((i,s)=>i+s.byteLength,0)),o=0;for(let i of r)n.set(i,o),o+=i.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":let r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":let o=new Uint8Array(9);return o[0]=5,o.set(t.value.bytes,1),o;case"binary":let i=new DataView(new ArrayBuffer(3+t.value.byteLength));i.setUint8(0,6),i.setUint16(1,t.value.byteLength,!1);let s=new Uint8Array(i.buffer);return s.set(t.value,3),s;case"string":let a=ta.fromUtf8(t.value),c=new DataView(new ArrayBuffer(3+a.byteLength));c.setUint8(0,7),c.setUint16(1,a.byteLength,!1);let l=new Uint8Array(c.buffer);return l.set(a,3),l;case"timestamp":let d=new Uint8Array(9);return d[0]=8,d.set(Gx.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!Ste.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);let f=new Uint8Array(17);return f[0]=9,f.set(Hi.fromHex(t.value.replace(/\-/g,"")),1),f}}},Ste=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Gx=class e{bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let r=new Uint8Array(8);for(let n=7,o=Math.abs(Math.round(t));n>-1&&o>0;n--,o/=256)r[n]=o;return t<0&&bM(r),new e(r)}valueOf(){let t=this.bytes.slice(0),r=t[0]&128;return r&&bM(t),parseInt(Hi.toHex(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function bM(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}var BM=(e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},UM=(e,t={})=>{var o,i;let{headers:r,query:n={}}=xM.HttpRequest.clone(e);for(let s of Object.keys(r)){let a=s.toLowerCase();(a.slice(0,6)==="x-amz-"&&!((o=t.unhoistableHeaders)!=null&&o.has(a))||(i=t.hoistableHeaders)!=null&&i.has(a))&&(n[s]=r[s],delete r[s])}return{...e,headers:r,query:n}},Hx=e=>{e=xM.HttpRequest.clone(e);for(let t of Object.keys(e.headers))CM.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},jM=({query:e={}})=>{let t=[],r={};for(let n of Object.keys(e)){if(n.toLowerCase()===DM)continue;let o=gm.escapeUri(n);t.push(o);let i=e[n];typeof i=="string"?r[o]=`${o}=${gm.escapeUri(i)}`:Array.isArray(i)&&(r[o]=i.slice(0).reduce((s,a)=>s.concat([`${o}=${gm.escapeUri(a)}`]),[]).sort().join("&"))}return t.sort().map(n=>r[n]).filter(n=>n).join("&")},bte=e=>xte(e).toISOString().replace(/\.\d{3}Z$/,"Z"),xte=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e,vm=class{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:n,service:o,sha256:i,uriEscapePath:s=!0}){this.service=o,this.sha256=i,this.uriEscapePath=s,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=EM.normalizeProvider(n),this.credentialProvider=EM.normalizeProvider(r)}createCanonicalRequest(t,r,n){let o=Object.keys(r).sort();return`${t.method}
15
29
  ${this.getCanonicalPath(t)}
16
- ${ZA(t)}
17
- ${i.map(o=>`${o}:${r[o]}`).join(`
30
+ ${jM(t)}
31
+ ${o.map(i=>`${i}:${r[i]}`).join(`
18
32
  `)}
19
33
 
20
- ${i.join(";")}
21
- ${n}`}async createStringToSign(t,r,n){let i=new this.sha256;i.update((0,ly.toUint8Array)(n));let o=await i.digest();return`${dy}
34
+ ${o.join(";")}
35
+ ${n}`}async createStringToSign(t,r,n,o){let i=new this.sha256;i.update(ta.toUint8Array(n));let s=await i.digest();return`${o}
22
36
  ${t}
23
37
  ${r}
24
- ${(0,Yn.toHex)(o)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){let r=[];for(let o of t.split("/"))(o==null?void 0:o.length)!==0&&o!=="."&&(o===".."?r.pop():r.push(o));let n=`${t!=null&&t.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&(t!=null&&t.endsWith("/"))?"/":""}`;return(0,Oa.escapeUri)(n).replace(/%2F/g,"/")}return t}async getSignature(t,r,n,i){let o=await this.createStringToSign(t,r,i),s=new this.sha256(await n);return s.update((0,ly.toUint8Array)(o)),(0,Yn.toHex)(await s.digest())}getSigningKey(t,r,n,i){return QA(this.sha256,t,n,r,i||this.service)}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}};et(oT,"SignatureV4");var HX=oT,hl=et(e=>{let t=GX(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},"formatDate"),HA=et(e=>Object.keys(e).sort().join(";"),"getCanonicalHeaderList")});var El=y(mn=>{"use strict";var cT=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",VX=cT+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",uT="["+cT+"]["+VX+"]*",zX=new RegExp("^"+uT+"$"),WX=function(e,t){let r=[],n=t.exec(e);for(;n;){let i=[];i.startIndex=t.lastIndex-n[0].length;let o=n.length;for(let s=0;s<o;s++)i.push(n[s]);r.push(i),n=t.exec(e)}return r},KX=function(e){let t=zX.exec(e);return!(t===null||typeof t>"u")};mn.isExist=function(e){return typeof e<"u"};mn.isEmptyObject=function(e){return Object.keys(e).length===0};mn.merge=function(e,t,r){if(t){let n=Object.keys(t),i=n.length;for(let o=0;o<i;o++)r==="strict"?e[n[o]]=[t[n[o]]]:e[n[o]]=t[n[o]]}};mn.getValue=function(e){return mn.isExist(e)?e:""};mn.isName=KX;mn.getAllMatches=WX;mn.nameRegexp=uT});var _y=y(mT=>{"use strict";var yy=El(),JX={allowBooleanAttributes:!1,unpairedTags:[]};mT.validate=function(e,t){t=Object.assign({},JX,t);let r=[],n=!1,i=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let o=0;o<e.length;o++)if(e[o]==="<"&&e[o+1]==="?"){if(o+=2,o=dT(e,o),o.err)return o}else if(e[o]==="<"){let s=o;if(o++,e[o]==="!"){o=pT(e,o);continue}else{let a=!1;e[o]==="/"&&(a=!0,o++);let c="";for(;o<e.length&&e[o]!==">"&&e[o]!==" "&&e[o]!==" "&&e[o]!==`
25
- `&&e[o]!=="\r";o++)c+=e[o];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),o--),!nQ(c)){let p;return c.trim().length===0?p="Invalid space after '<'.":p="Tag '"+c+"' is an invalid name.",tt("InvalidTag",p,Bt(e,o))}let u=QX(e,o);if(u===!1)return tt("InvalidAttr","Attributes for '"+c+"' have open quote.",Bt(e,o));let d=u.value;if(o=u.index,d[d.length-1]==="/"){let p=o-d.length;d=d.substring(0,d.length-1);let m=fT(d,t);if(m===!0)n=!0;else return tt(m.err.code,m.err.msg,Bt(e,p+m.err.line))}else if(a)if(u.tagClosed){if(d.trim().length>0)return tt("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",Bt(e,s));{let p=r.pop();if(c!==p.tagName){let m=Bt(e,p.tagStartPos);return tt("InvalidTag","Expected closing tag '"+p.tagName+"' (opened in line "+m.line+", col "+m.col+") instead of closing tag '"+c+"'.",Bt(e,s))}r.length==0&&(i=!0)}}else return tt("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",Bt(e,o));else{let p=fT(d,t);if(p!==!0)return tt(p.err.code,p.err.msg,Bt(e,o-d.length+p.err.line));if(i===!0)return tt("InvalidXml","Multiple possible root nodes found.",Bt(e,o));t.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:s}),n=!0}for(o++;o<e.length;o++)if(e[o]==="<")if(e[o+1]==="!"){o++,o=pT(e,o);continue}else if(e[o+1]==="?"){if(o=dT(e,++o),o.err)return o}else break;else if(e[o]==="&"){let p=tQ(e,o);if(p==-1)return tt("InvalidChar","char '&' is not expected.",Bt(e,o));o=p}else if(i===!0&&!lT(e[o]))return tt("InvalidXml","Extra text at the end",Bt(e,o));e[o]==="<"&&o--}}else{if(lT(e[o]))continue;return tt("InvalidChar","char '"+e[o]+"' is not expected.",Bt(e,o))}if(n){if(r.length==1)return tt("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Bt(e,r[0].tagStartPos));if(r.length>0)return tt("InvalidXml","Invalid '"+JSON.stringify(r.map(o=>o.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return tt("InvalidXml","Start tag expected.",1);return!0};function lT(e){return e===" "||e===" "||e===`
26
- `||e==="\r"}function dT(e,t){let r=t;for(;t<e.length;t++)if(e[t]=="?"||e[t]==" "){let n=e.substr(r,t-r);if(t>5&&n==="xml")return tt("InvalidXml","XML declaration allowed only at the start of the document.",Bt(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}else continue}return t}function pT(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t<e.length;t++)if(e[t]==="-"&&e[t+1]==="-"&&e[t+2]===">"){t+=2;break}}else if(e.length>t+8&&e[t+1]==="D"&&e[t+2]==="O"&&e[t+3]==="C"&&e[t+4]==="T"&&e[t+5]==="Y"&&e[t+6]==="P"&&e[t+7]==="E"){let r=1;for(t+=8;t<e.length;t++)if(e[t]==="<")r++;else if(e[t]===">"&&(r--,r===0))break}else if(e.length>t+9&&e[t+1]==="["&&e[t+2]==="C"&&e[t+3]==="D"&&e[t+4]==="A"&&e[t+5]==="T"&&e[t+6]==="A"&&e[t+7]==="["){for(t+=8;t<e.length;t++)if(e[t]==="]"&&e[t+1]==="]"&&e[t+2]===">"){t+=2;break}}return t}var YX='"',XX="'";function QX(e,t){let r="",n="",i=!1;for(;t<e.length;t++){if(e[t]===YX||e[t]===XX)n===""?n=e[t]:n!==e[t]||(n="");else if(e[t]===">"&&n===""){i=!0;break}r+=e[t]}return n!==""?!1:{value:r,index:t,tagClosed:i}}var ZX=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function fT(e,t){let r=yy.getAllMatches(e,ZX),n={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return tt("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",Ra(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return tt("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",Ra(r[i]));if(r[i][3]===void 0&&!t.allowBooleanAttributes)return tt("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",Ra(r[i]));let o=r[i][2];if(!rQ(o))return tt("InvalidAttr","Attribute '"+o+"' is an invalid name.",Ra(r[i]));if(!n.hasOwnProperty(o))n[o]=1;else return tt("InvalidAttr","Attribute '"+o+"' is repeated.",Ra(r[i]))}return!0}function eQ(e,t){let r=/\d/;for(e[t]==="x"&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(e[t]===";")return t;if(!e[t].match(r))break}return-1}function tQ(e,t){if(t++,e[t]===";")return-1;if(e[t]==="#")return t++,eQ(e,t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(e[t]===";")break;return-1}return t}function tt(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function rQ(e){return yy.isName(e)}function nQ(e){return yy.isName(e)}function Bt(e,t){let r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Ra(e){return e.startIndex+e[1].length}});var yT=y(vy=>{var hT={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}},iQ=function(e){return Object.assign({},hT,e)};vy.buildOptions=iQ;vy.defaultOptions=hT});var vT=y((zIe,_T)=>{"use strict";var gy=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,r){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:r})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}};_T.exports=gy});var ET=y((WIe,gT)=>{var oQ=El();function sQ(e,t){let r={};if(e[t+3]==="O"&&e[t+4]==="C"&&e[t+5]==="T"&&e[t+6]==="Y"&&e[t+7]==="P"&&e[t+8]==="E"){t=t+9;let n=1,i=!1,o=!1,s="";for(;t<e.length;t++)if(e[t]==="<"&&!o){if(i&&uQ(e,t))t+=7,[entityName,val,t]=aQ(e,t+1),val.indexOf("&")===-1&&(r[fQ(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(i&&lQ(e,t))t+=8;else if(i&&dQ(e,t))t+=8;else if(i&&pQ(e,t))t+=9;else if(cQ)o=!0;else throw new Error("Invalid DOCTYPE");n++,s=""}else if(e[t]===">"){if(o?e[t-1]==="-"&&e[t-2]==="-"&&(o=!1,n--):n--,n===0)break}else e[t]==="["?i=!0:s+=e[t];if(n!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:r,i:t}}function aQ(e,t){let r="";for(;t<e.length&&e[t]!=="'"&&e[t]!=='"';t++)r+=e[t];if(r=r.trim(),r.indexOf(" ")!==-1)throw new Error("External entites are not supported");let n=e[t++],i="";for(;t<e.length&&e[t]!==n;t++)i+=e[t];return[r,i,t]}function cQ(e,t){return e[t+1]==="!"&&e[t+2]==="-"&&e[t+3]==="-"}function uQ(e,t){return e[t+1]==="!"&&e[t+2]==="E"&&e[t+3]==="N"&&e[t+4]==="T"&&e[t+5]==="I"&&e[t+6]==="T"&&e[t+7]==="Y"}function lQ(e,t){return e[t+1]==="!"&&e[t+2]==="E"&&e[t+3]==="L"&&e[t+4]==="E"&&e[t+5]==="M"&&e[t+6]==="E"&&e[t+7]==="N"&&e[t+8]==="T"}function dQ(e,t){return e[t+1]==="!"&&e[t+2]==="A"&&e[t+3]==="T"&&e[t+4]==="T"&&e[t+5]==="L"&&e[t+6]==="I"&&e[t+7]==="S"&&e[t+8]==="T"}function pQ(e,t){return e[t+1]==="!"&&e[t+2]==="N"&&e[t+3]==="O"&&e[t+4]==="T"&&e[t+5]==="A"&&e[t+6]==="T"&&e[t+7]==="I"&&e[t+8]==="O"&&e[t+9]==="N"}function fQ(e){if(oQ.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}gT.exports=sQ});var bT=y((KIe,ST)=>{var mQ=/^[-+]?0x[a-fA-F0-9]+$/,hQ=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt);!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);var yQ={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function _Q(e,t={}){if(t=Object.assign({},yQ,t),!e||typeof e!="string")return e;let r=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(r))return e;if(t.hex&&mQ.test(r))return Number.parseInt(r,16);{let n=hQ.exec(r);if(n){let i=n[1],o=n[2],s=vQ(n[3]),a=n[4]||n[6];if(!t.leadingZeros&&o.length>0&&i&&r[2]!==".")return e;if(!t.leadingZeros&&o.length>0&&!i&&r[1]!==".")return e;{let c=Number(r),u=""+c;return u.search(/[eE]/)!==-1||a?t.eNotation?c:e:r.indexOf(".")!==-1?u==="0"&&s===""||u===s||i&&u==="-"+s?c:e:o?s===u||i+s===u?c:e:r===u||r===i+u?c:e}}else return e}}function vQ(e){return e&&e.indexOf(".")!==-1&&(e=e.replace(/0+$/,""),e==="."?e="0":e[0]==="."?e="0"+e:e[e.length-1]==="."&&(e=e.substr(0,e.length-1))),e}ST.exports=_Q});var wT=y((YIe,CT)=>{"use strict";var Cy=El(),Da=vT(),gQ=ET(),EQ=bT(),JIe="<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,Cy.nameRegexp),Ey=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"}},this.addExternalEntities=SQ,this.parseXml=AQ,this.parseTextData=bQ,this.resolveNameSpace=CQ,this.buildAttributesMap=xQ,this.isItStopNode=OQ,this.replaceEntitiesValue=PQ,this.readStopNodeData=DQ,this.saveTextToParentTag=IQ,this.addChild=TQ}};function SQ(e){let t=Object.keys(e);for(let r=0;r<t.length;r++){let n=t[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function bQ(e,t,r,n,i,o,s){if(e!==void 0&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));let a=this.options.tagValueProcessor(t,e,r,i,o);return a==null?e:typeof a!=typeof e||a!==e?a:this.options.trimValues?by(e,this.options.parseTagValue,this.options.numberParseOptions):e.trim()===e?by(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function CQ(e){if(this.options.removeNSPrefix){let t=e.split(":"),r=e.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(e=r+t[1])}return e}var wQ=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function xQ(e,t,r){if(!this.options.ignoreAttributes&&typeof e=="string"){let n=Cy.getAllMatches(e,wQ),i=n.length,o={};for(let s=0;s<i;s++){let a=this.resolveNameSpace(n[s][1]),c=n[s][4],u=this.options.attributeNamePrefix+a;if(a.length)if(this.options.transformAttributeName&&(u=this.options.transformAttributeName(u)),u==="__proto__"&&(u="#__proto__"),c!==void 0){this.options.trimValues&&(c=c.trim()),c=this.replaceEntitiesValue(c);let d=this.options.attributeValueProcessor(a,c,t);d==null?o[u]=c:typeof d!=typeof c||d!==c?o[u]=d:o[u]=by(c,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[u]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){let s={};return s[this.options.attributesGroupName]=o,s}return o}}var AQ=function(e){e=e.replace(/\r\n?/g,`
27
- `);let t=new Da("!xml"),r=t,n="",i="";for(let o=0;o<e.length;o++)if(e[o]==="<")if(e[o+1]==="/"){let a=Ji(e,">",o,"Closing Tag is not closed."),c=e.substring(o+2,a).trim();if(this.options.removeNSPrefix){let p=c.indexOf(":");p!==-1&&(c=c.substr(p+1))}this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&(n=this.saveTextToParentTag(n,r,i));let u=i.substring(i.lastIndexOf(".")+1);if(c&&this.options.unpairedTags.indexOf(c)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${c}>`);let d=0;u&&this.options.unpairedTags.indexOf(u)!==-1?(d=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):d=i.lastIndexOf("."),i=i.substring(0,d),r=this.tagsNodeStack.pop(),n="",o=a}else if(e[o+1]==="?"){let a=Sy(e,o,!1,"?>");if(!a)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),!(this.options.ignoreDeclaration&&a.tagName==="?xml"||this.options.ignorePiTags)){let c=new Da(a.tagName);c.add(this.options.textNodeName,""),a.tagName!==a.tagExp&&a.attrExpPresent&&(c[":@"]=this.buildAttributesMap(a.tagExp,i,a.tagName)),this.addChild(r,c,i)}o=a.closeIndex+1}else if(e.substr(o+1,3)==="!--"){let a=Ji(e,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){let c=e.substring(o+4,a-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:c}])}o=a}else if(e.substr(o+1,2)==="!D"){let a=gQ(e,o);this.docTypeEntities=a.entities,o=a.i}else if(e.substr(o+1,2)==="!["){let a=Ji(e,"]]>",o,"CDATA is not closed.")-2,c=e.substring(o+9,a);if(n=this.saveTextToParentTag(n,r,i),this.options.cdataPropName)r.add(this.options.cdataPropName,[{[this.options.textNodeName]:c}]);else{let u=this.parseTextData(c,r.tagname,i,!0,!1,!0);u==null&&(u=""),r.add(this.options.textNodeName,u)}o=a+2}else{let a=Sy(e,o,this.options.removeNSPrefix),c=a.tagName,u=a.tagExp,d=a.attrExpPresent,p=a.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,i,!1));let m=r;if(m&&this.options.unpairedTags.indexOf(m.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),c!==t.tagname&&(i+=i?"."+c:c),this.isItStopNode(this.options.stopNodes,i,c)){let h="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)o=a.closeIndex;else if(this.options.unpairedTags.indexOf(c)!==-1)o=a.closeIndex;else{let _=this.readStopNodeData(e,c,p+1);if(!_)throw new Error(`Unexpected end of ${c}`);o=_.i,h=_.tagContent}let v=new Da(c);c!==u&&d&&(v[":@"]=this.buildAttributesMap(u,i,c)),h&&(h=this.parseTextData(h,c,i,!0,d,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),v.add(this.options.textNodeName,h),this.addChild(r,v,i)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){c[c.length-1]==="/"?(c=c.substr(0,c.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));let h=new Da(c);c!==u&&d&&(h[":@"]=this.buildAttributesMap(u,i,c)),this.addChild(r,h,i),i=i.substr(0,i.lastIndexOf("."))}else{let h=new Da(c);this.tagsNodeStack.push(r),c!==u&&d&&(h[":@"]=this.buildAttributesMap(u,i,c)),this.addChild(r,h,i),r=h}n="",o=p}}else n+=e[o];return t.child};function TQ(e,t,r){let n=this.options.updateTag(t.tagname,r,t[":@"]);n===!1||(typeof n=="string"&&(t.tagname=n),e.addChild(t))}var PQ=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){let r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){let r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){let r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function IQ(e,t,r,n){return e&&(n===void 0&&(n=Object.keys(t.child).length===0),e=this.parseTextData(e,t.tagname,r,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,n),e!==void 0&&e!==""&&t.add(this.options.textNodeName,e),e=""),e}function OQ(e,t,r){let n="*."+r;for(let i in e){let o=e[i];if(n===o||t===o)return!0}return!1}function RQ(e,t,r=">"){let n,i="";for(let o=t;o<e.length;o++){let s=e[o];if(n)s===n&&(n="");else if(s==='"'||s==="'")n=s;else if(s===r[0])if(r[1]){if(e[o+1]===r[1])return{data:i,index:o}}else return{data:i,index:o};else s===" "&&(s=" ");i+=s}}function Ji(e,t,r,n){let i=e.indexOf(t,r);if(i===-1)throw new Error(n);return i+t.length-1}function Sy(e,t,r,n=">"){let i=RQ(e,t+1,n);if(!i)return;let o=i.data,s=i.index,a=o.search(/\s/),c=o,u=!0;if(a!==-1&&(c=o.substr(0,a).replace(/\s\s*$/,""),o=o.substr(a+1)),r){let d=c.indexOf(":");d!==-1&&(c=c.substr(d+1),u=c!==i.data.substr(d+1))}return{tagName:c,tagExp:o,closeIndex:s,attrExpPresent:u}}function DQ(e,t,r){let n=r,i=1;for(;r<e.length;r++)if(e[r]==="<")if(e[r+1]==="/"){let o=Ji(e,">",r,`${t} is not closed`);if(e.substring(r+2,o).trim()===t&&(i--,i===0))return{tagContent:e.substring(n,r),i:o};r=o}else if(e[r+1]==="?")r=Ji(e,"?>",r+1,"StopNode is not closed.");else if(e.substr(r+1,3)==="!--")r=Ji(e,"-->",r+3,"StopNode is not closed.");else if(e.substr(r+1,2)==="![")r=Ji(e,"]]>",r,"StopNode is not closed.")-2;else{let o=Sy(e,r,">");o&&((o&&o.tagName)===t&&o.tagExp[o.tagExp.length-1]!=="/"&&i++,r=o.closeIndex)}}function by(e,t,r){if(t&&typeof e=="string"){let n=e.trim();return n==="true"?!0:n==="false"?!1:EQ(e,r)}else return Cy.isExist(e)?e:""}CT.exports=Ey});var TT=y(AT=>{"use strict";function NQ(e,t){return xT(e,t)}function xT(e,t,r){let n,i={};for(let o=0;o<e.length;o++){let s=e[o],a=MQ(s),c="";if(r===void 0?c=a:c=r+"."+a,a===t.textNodeName)n===void 0?n=s[a]:n+=""+s[a];else{if(a===void 0)continue;if(s[a]){let u=xT(s[a],t,c),d=kQ(u,t);s[":@"]?LQ(u,s[":@"],c,t):Object.keys(u).length===1&&u[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?u=u[t.textNodeName]:Object.keys(u).length===0&&(t.alwaysCreateTextNode?u[t.textNodeName]="":u=""),i[a]!==void 0&&i.hasOwnProperty(a)?(Array.isArray(i[a])||(i[a]=[i[a]]),i[a].push(u)):t.isArray(a,c,d)?i[a]=[u]:i[a]=u}}}return typeof n=="string"?n.length>0&&(i[t.textNodeName]=n):n!==void 0&&(i[t.textNodeName]=n),i}function MQ(e){let t=Object.keys(e);for(let r=0;r<t.length;r++){let n=t[r];if(n!==":@")return n}}function LQ(e,t,r,n){if(t){let i=Object.keys(t),o=i.length;for(let s=0;s<o;s++){let a=i[s];n.isArray(a,r+"."+a,!0,!0)?e[a]=[t[a]]:e[a]=t[a]}}}function kQ(e,t){let{textNodeName:r}=t,n=Object.keys(e).length;return!!(n===0||n===1&&(e[r]||typeof e[r]=="boolean"||e[r]===0))}AT.prettify=NQ});var IT=y((QIe,PT)=>{var{buildOptions:FQ}=yT(),BQ=wT(),{prettify:jQ}=TT(),qQ=_y(),wy=class{constructor(t){this.externalEntities={},this.options=FQ(t)}parse(t,r){if(typeof t!="string")if(t.toString)t=t.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});let o=qQ.validate(t,r);if(o!==!0)throw Error(`${o.err.msg}:${o.err.line}:${o.err.col}`)}let n=new BQ(this.options);n.addExternalEntities(this.externalEntities);let i=n.parseXml(t);return this.options.preserveOrder||i===void 0?i:jQ(i,this.options)}addEntity(t,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=r}};PT.exports=wy});var MT=y((ZIe,NT)=>{function UQ(e,t){let r="";return t.format&&t.indentBy.length>0&&(r=`
28
- `),RT(e,t,"",r)}function RT(e,t,r,n){let i="",o=!1;for(let s=0;s<e.length;s++){let a=e[s],c=GQ(a),u="";if(r.length===0?u=c:u=`${r}.${c}`,c===t.textNodeName){let v=a[c];$Q(u,t)||(v=t.tagValueProcessor(c,v),v=DT(v,t)),o&&(i+=n),i+=v,o=!1;continue}else if(c===t.cdataPropName){o&&(i+=n),i+=`<![CDATA[${a[c][0][t.textNodeName]}]]>`,o=!1;continue}else if(c===t.commentPropName){i+=n+`<!--${a[c][0][t.textNodeName]}-->`,o=!0;continue}else if(c[0]==="?"){let v=OT(a[":@"],t),_=c==="?xml"?"":n,g=a[c][0][t.textNodeName];g=g.length!==0?" "+g:"",i+=_+`<${c}${g}${v}?>`,o=!0;continue}let d=n;d!==""&&(d+=t.indentBy);let p=OT(a[":@"],t),m=n+`<${c}${p}`,h=RT(a[c],t,u,d);t.unpairedTags.indexOf(c)!==-1?t.suppressUnpairedNode?i+=m+">":i+=m+"/>":(!h||h.length===0)&&t.suppressEmptyNode?i+=m+"/>":h&&h.endsWith(">")?i+=m+`>${h}${n}</${c}>`:(i+=m+">",h&&n!==""&&(h.includes("/>")||h.includes("</"))?i+=n+t.indentBy+h+n:i+=h,i+=`</${c}>`),o=!0}return i}function GQ(e){let t=Object.keys(e);for(let r=0;r<t.length;r++){let n=t[r];if(n!==":@")return n}}function OT(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){let i=t.attributeValueProcessor(n,e[n]);i=DT(i,t),i===!0&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${i}"`}return r}function $Q(e,t){e=e.substr(0,e.length-t.textNodeName.length-1);let r=e.substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function DT(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){let n=t.entities[r];e=e.replace(n.regex,n.val)}return e}NT.exports=UQ});var kT=y((eOe,LT)=>{"use strict";var HQ=MT(),VQ={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Xn(e){this.options=Object.assign({},VQ,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=KQ),this.processTextOrObjNode=zQ,this.options.format?(this.indentate=WQ,this.tagEndChar=`>
29
- `,this.newLine=`
30
- `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Xn.prototype.build=function(e){return this.options.preserveOrder?HQ(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)};Xn.prototype.j2x=function(e,t){let r="",n="";for(let i in e)if(!(typeof e[i]>"u"))if(e[i]===null)i[0]==="?"?n+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)n+=this.buildTextValNode(e[i],i,"",t);else if(typeof e[i]!="object"){let o=this.isAttribute(i);if(o)r+=this.buildAttrPairStr(o,""+e[i]);else if(i===this.options.textNodeName){let s=this.options.tagValueProcessor(i,""+e[i]);n+=this.replaceEntitiesValue(s)}else n+=this.buildTextValNode(e[i],i,"",t)}else if(Array.isArray(e[i])){let o=e[i].length,s="";for(let a=0;a<o;a++){let c=e[i][a];typeof c>"u"||(c===null?i[0]==="?"?n+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+i+"/"+this.tagEndChar:typeof c=="object"?this.options.oneListGroup?s+=this.j2x(c,t+1).val:s+=this.processTextOrObjNode(c,i,t):s+=this.buildTextValNode(c,i,"",t))}this.options.oneListGroup&&(s=this.buildObjectNode(s,i,"",t)),n+=s}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){let o=Object.keys(e[i]),s=o.length;for(let a=0;a<s;a++)r+=this.buildAttrPairStr(o[a],""+e[i][o[a]])}else n+=this.processTextOrObjNode(e[i],i,t);return{attrStr:r,val:n}};Xn.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t==="true"?" "+e:" "+e+'="'+t+'"'};function zQ(e,t,r){let n=this.j2x(e,r+1);return e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjectNode(n.val,t,n.attrStr,r)}Xn.prototype.buildObjectNode=function(e,t,r,n){if(e==="")return t[0]==="?"?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,o="";return t[0]==="?"&&(o="?",i=""),r&&e.indexOf("<")===-1?this.indentate(n)+"<"+t+r+o+">"+e+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&o.length===0?this.indentate(n)+`<!--${e}-->`+this.newLine:this.indentate(n)+"<"+t+r+o+this.tagEndChar+e+this.indentate(n)+i}};Xn.prototype.closeTag=function(e){let t="";return this.options.unpairedTags.indexOf(e)!==-1?this.options.suppressUnpairedNode||(t="/"):this.options.suppressEmptyNode?t="/":t=`></${e}`,t};Xn.prototype.buildTextValNode=function(e,t,r,n){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(n)+`<!--${e}-->`+this.newLine;if(t[0]==="?")return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===""?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+i+"</"+t+this.tagEndChar}};Xn.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){let r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e};function WQ(e){return this.options.indentBy.repeat(e)}function KQ(e){return e.startsWith(this.options.attributeNamePrefix)?e.substr(this.attrPrefixLen):!1}LT.exports=Xn});var BT=y((tOe,FT)=>{"use strict";var JQ=_y(),YQ=IT(),XQ=kT();FT.exports={XMLParser:YQ,XMLValidator:JQ,XMLBuilder:XQ}});var ft=y((nOe,QT)=>{var Sl=Object.defineProperty,QQ=Object.getOwnPropertyDescriptor,ZQ=Object.getOwnPropertyNames,eZ=Object.prototype.hasOwnProperty,ke=(e,t)=>Sl(e,"name",{value:t,configurable:!0}),tZ=(e,t)=>{for(var r in t)Sl(e,r,{get:t[r],enumerable:!0})},rZ=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ZQ(t))!eZ.call(e,i)&&i!==r&&Sl(e,i,{get:()=>t[i],enumerable:!(n=QQ(t,i))||n.enumerable});return e},nZ=e=>rZ(Sl({},"__esModule",{value:!0}),e),$T={};tZ($T,{AWSSDKSigV4Signer:()=>aZ,AwsSdkSigV4Signer:()=>WT,_toBool:()=>lZ,_toNum:()=>dZ,_toStr:()=>uZ,awsExpectUnion:()=>pZ,emitWarningIfUnsupportedVersion:()=>iZ,loadRestJsonErrorCode:()=>mZ,loadRestXmlErrorCode:()=>_Z,parseJsonBody:()=>YT,parseJsonErrorBody:()=>fZ,parseXmlBody:()=>XT,parseXmlErrorBody:()=>yZ,resolveAWSSDKSigV4Config:()=>cZ,resolveAwsSdkSigV4Config:()=>KT});QT.exports=nZ($T);var jT=!1,iZ=ke(e=>{e&&!jT&&parseInt(e.substring(1,e.indexOf(".")))<16&&(jT=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
31
- no longer support Node.js 14.x on May 1, 2024.
32
-
33
- To continue receiving updates to AWS services, bug fixes, and security
34
- updates please upgrade to an active Node.js LTS version.
35
-
36
- More information can be found at: https://a.co/dzr2AJd`))},"emitWarningIfUnsupportedVersion"),HT=St(),qT=ke(e=>{var t,r;return HT.HttpResponse.isInstance(e)?((t=e.headers)==null?void 0:t.date)??((r=e.headers)==null?void 0:r.Date):void 0},"getDateHeader"),VT=ke(e=>new Date(Date.now()+e),"getSkewCorrectedDate"),oZ=ke((e,t)=>Math.abs(VT(t).getTime()-e)>=3e5,"isClockSkewed"),UT=ke((e,t)=>{let r=Date.parse(e);return oZ(r,t)?r-Date.now():t},"getUpdatedSystemClockOffset"),Na=ke((e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},"throwSigningPropertyError"),sZ=ke(async e=>{var t,r,n;let i=Na("context",e.context),o=Na("config",e.config),s=(n=(r=(t=i.endpointV2)==null?void 0:t.properties)==null?void 0:r.authSchemes)==null?void 0:n[0],c=await Na("signer",o.signer)(s),u=e==null?void 0:e.signingRegion,d=e==null?void 0:e.signingName;return{config:o,signer:c,signingRegion:u,signingName:d}},"validateSigningProperties"),zT=class{async sign(t,r,n){if(!HT.HttpRequest.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let{config:i,signer:o,signingRegion:s,signingName:a}=await sZ(n);return await o.sign(t,{signingDate:VT(i.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(t){return r=>{let n=r.ServerTime??qT(r.$response);if(n){let i=Na("config",t.config),o=i.systemClockOffset;i.systemClockOffset=UT(n,i.systemClockOffset),i.systemClockOffset!==o&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){let n=qT(t);if(n){let i=Na("config",r.config);i.systemClockOffset=UT(n,i.systemClockOffset)}}};ke(zT,"AwsSdkSigV4Signer");var WT=zT,aZ=WT,Yi=bt(),GT=aT(),KT=ke(e=>{let t;e.credentials&&(t=(0,Yi.memoizeIdentityProvider)(e.credentials,Yi.isIdentityExpired,Yi.doesIdentityRequireRefresh)),t||(e.credentialDefaultProvider?t=(0,Yi.normalizeProvider)(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):t=ke(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds"));let{signingEscapePath:r=!0,systemClockOffset:n=e.systemClockOffset||0,sha256:i}=e,o;return e.signer?o=(0,Yi.normalizeProvider)(e.signer):e.regionInfoProvider?o=ke(()=>(0,Yi.normalizeProvider)(e.region)().then(async s=>[await e.regionInfoProvider(s,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},s]).then(([s,a])=>{let{signingRegion:c,signingService:u}=s;e.signingRegion=e.signingRegion||c||a,e.signingName=e.signingName||u||e.serviceId;let d={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},p=e.signerConstructor||GT.SignatureV4;return new p(d)}),"signer"):o=ke(async s=>{s=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await(0,Yi.normalizeProvider)(e.region)(),properties:{}},s);let a=s.signingRegion,c=s.signingName;e.signingRegion=e.signingRegion||a,e.signingName=e.signingName||c||e.serviceId;let u={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:r},d=e.signerConstructor||GT.SignatureV4;return new d(u)},"signer"),{...e,systemClockOffset:n,signingEscapePath:r,credentials:t,signer:o}},"resolveAwsSdkSigV4Config"),cZ=KT,uZ=ke(e=>{if(e==null)return e;if(typeof e=="number"||typeof e=="bigint"){let t=new Error(`Received number ${e} where a string was expected.`);return t.name="Warning",console.warn(t),String(e)}if(typeof e=="boolean"){let t=new Error(`Received boolean ${e} where a string was expected.`);return t.name="Warning",console.warn(t),String(e)}return e},"_toStr"),lZ=ke(e=>{if(e==null)return e;if(typeof e=="string"){let t=e.toLowerCase();if(e!==""&&t!=="false"&&t!=="true"){let r=new Error(`Received string "${e}" where a boolean was expected.`);r.name="Warning",console.warn(r)}return e!==""&&t!=="false"}return e},"_toBool"),dZ=ke(e=>{if(e==null)return e;if(typeof e=="string"){let t=Number(e);if(t.toString()!==e){let r=new Error(`Received string "${e}" where a number was expected.`);return r.name="Warning",console.warn(r),e}return t}return e},"_toNum"),xy=Be(),pZ=ke(e=>{if(e!=null)return typeof e=="object"&&"__type"in e&&delete e.__type,(0,xy.expectUnion)(e)},"awsExpectUnion"),JT=ke((e,t)=>(0,xy.collectBody)(e,t).then(r=>t.utf8Encoder(r)),"collectBodyString"),YT=ke((e,t)=>JT(e,t).then(r=>{if(r.length)try{return JSON.parse(r)}catch(n){throw(n==null?void 0:n.name)==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:r}),n}return{}}),"parseJsonBody"),fZ=ke(async(e,t)=>{let r=await YT(e,t);return r.message=r.message??r.Message,r},"parseJsonErrorBody"),mZ=ke((e,t)=>{let r=ke((o,s)=>Object.keys(o).find(a=>a.toLowerCase()===s.toLowerCase()),"findKey"),n=ke(o=>{let s=o;return typeof s=="number"&&(s=s.toString()),s.indexOf(",")>=0&&(s=s.split(",")[0]),s.indexOf(":")>=0&&(s=s.split(":")[0]),s.indexOf("#")>=0&&(s=s.split("#")[1]),s},"sanitizeErrorCode"),i=r(e.headers,"x-amzn-errortype");if(i!==void 0)return n(e.headers[i]);if(t.code!==void 0)return n(t.code);if(t.__type!==void 0)return n(t.__type)},"loadRestJsonErrorCode"),hZ=BT(),XT=ke((e,t)=>JT(e,t).then(r=>{if(r.length){let n=new hZ.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(c,u)=>u.trim()===""&&u.includes(`
37
- `)?"":void 0});n.addEntity("#xD","\r"),n.addEntity("#10",`
38
- `);let i;try{i=n.parse(r,!0)}catch(c){throw c&&typeof c=="object"&&Object.defineProperty(c,"$responseBodyText",{value:r}),c}let o="#text",s=Object.keys(i)[0],a=i[s];return a[o]&&(a[s]=a[o],delete a[o]),(0,xy.getValueFromTextNode)(a)}return{}}),"parseXmlBody"),yZ=ke(async(e,t)=>{let r=await XT(e,t);return r.Error&&(r.Error.message=r.Error.message??r.Error.Message),r},"parseXmlErrorBody"),_Z=ke((e,t)=>{var r;if(((r=t==null?void 0:t.Error)==null?void 0:r.Code)!==void 0)return t.Error.Code;if((t==null?void 0:t.Code)!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var Ay=y(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.resolveHttpAuthSchemeConfig=Qn.defaultDynamoDBHttpAuthSchemeProvider=Qn.defaultDynamoDBHttpAuthSchemeParametersProvider=void 0;var vZ=ft(),ZT=Ur(),gZ=async(e,t,r)=>({operation:(0,ZT.getSmithyContext)(t).operation,region:await(0,ZT.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});Qn.defaultDynamoDBHttpAuthSchemeParametersProvider=gZ;function EZ(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"dynamodb",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}var SZ=e=>{let t=[];switch(e.operation){default:t.push(EZ(e))}return t};Qn.defaultDynamoDBHttpAuthSchemeProvider=SZ;var bZ=e=>({...(0,vZ.resolveAwsSdkSigV4Config)(e)});Qn.resolveHttpAuthSchemeConfig=bZ});var Vr={};ea(Vr,{__addDisposableResource:()=>EP,__assign:()=>bl,__asyncDelegator:()=>pP,__asyncGenerator:()=>dP,__asyncValues:()=>fP,__await:()=>jo,__awaiter:()=>oP,__classPrivateFieldGet:()=>_P,__classPrivateFieldIn:()=>gP,__classPrivateFieldSet:()=>vP,__createBinding:()=>wl,__decorate:()=>rP,__disposeResources:()=>SP,__esDecorate:()=>CZ,__exportStar:()=>aP,__extends:()=>eP,__generator:()=>sP,__importDefault:()=>yP,__importStar:()=>hP,__makeTemplateObject:()=>mP,__metadata:()=>iP,__param:()=>nP,__propKey:()=>xZ,__read:()=>Py,__rest:()=>tP,__runInitializers:()=>wZ,__setFunctionName:()=>AZ,__spread:()=>cP,__spreadArray:()=>lP,__spreadArrays:()=>uP,__values:()=>Cl,default:()=>IZ});function eP(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ty(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function tP(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function rP(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function nP(e,t){return function(r,n){t(r,n,e)}}function CZ(e,t,r,n,i,o){function s(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),p,m=!1,h=r.length-1;h>=0;h--){var v={};for(var _ in n)v[_]=_==="access"?{}:n[_];for(var _ in n.access)v.access[_]=n.access[_];v.addInitializer=function(x){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(x||null))};var g=(0,r[h])(a==="accessor"?{get:d.get,set:d.set}:d[c],v);if(a==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=s(g.get))&&(d.get=p),(p=s(g.set))&&(d.set=p),(p=s(g.init))&&i.unshift(p)}else(p=s(g))&&(a==="field"?i.unshift(p):d[c]=p)}u&&Object.defineProperty(u,n.name,d),m=!0}function wZ(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function xZ(e){return typeof e=="symbol"?e:"".concat(e)}function AZ(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function iP(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function oP(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(d){try{u(n.next(d))}catch(p){s(p)}}function c(d){try{u(n.throw(d))}catch(p){s(p)}}function u(d){d.done?o(d.value):i(d.value).then(a,c)}u((n=n.apply(e,t||[])).next())})}function sP(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function aP(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&wl(t,e,r)}function Cl(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Py(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function cP(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Py(arguments[t]));return e}function uP(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function lP(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function jo(e){return this instanceof jo?(this.v=e,this):new jo(e)}function dP(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(m){n[m]&&(i[m]=function(h){return new Promise(function(v,_){o.push([m,h,v,_])>1||a(m,h)})})}function a(m,h){try{c(n[m](h))}catch(v){p(o[0][3],v)}}function c(m){m.value instanceof jo?Promise.resolve(m.value.v).then(u,d):p(o[0][2],m)}function u(m){a("next",m)}function d(m){a("throw",m)}function p(m,h){m(h),o.shift(),o.length&&a(o[0][0],o[0][1])}}function pP(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){t[i]=e[i]?function(s){return(r=!r)?{value:jo(e[i](s)),done:!1}:o?o(s):s}:o}}function fP(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Cl=="function"?Cl(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(s){return new Promise(function(a,c){s=e[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(u){o({value:u,done:a})},s)}}function mP(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function hP(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&wl(t,e,r);return TZ(t,e),t}function yP(e){return e&&e.__esModule?e:{default:e}}function _P(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function vP(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function gP(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function EP(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if(typeof n!="function")throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function SP(e){function t(n){e.error=e.hasError?new PZ(n,e.error,"An error was suppressed during disposal."):n,e.hasError=!0}function r(){for(;e.stack.length;){var n=e.stack.pop();try{var i=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(i).then(r,function(o){return t(o),r()})}catch(o){t(o)}}if(e.hasError)throw e.error}return r()}var Ty,bl,wl,TZ,PZ,IZ,zr=at(()=>{Ty=function(e,t){return Ty=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ty(e,t)};bl=function(){return bl=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},bl.apply(this,arguments)};wl=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});TZ=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t};PZ=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};IZ={__extends:eP,__assign:bl,__rest:tP,__decorate:rP,__param:nP,__metadata:iP,__awaiter:oP,__generator:sP,__createBinding:wl,__exportStar:aP,__values:Cl,__read:Py,__spread:cP,__spreadArrays:uP,__spreadArray:lP,__await:jo,__asyncGenerator:dP,__asyncDelegator:pP,__asyncValues:fP,__makeTemplateObject:mP,__importStar:hP,__importDefault:yP,__classPrivateFieldGet:_P,__classPrivateFieldSet:vP,__classPrivateFieldIn:gP,__addDisposableResource:EP,__disposeResources:SP}});var bP=y((oOe,OZ)=>{OZ.exports={name:"@aws-sdk/client-dynamodb",description:"AWS SDK for JavaScript Dynamodb Client for Node.js, Browser and React Native",version:"3.556.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-dynamodb","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo dynamodb"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/client-sts":"3.556.0","@aws-sdk/core":"3.556.0","@aws-sdk/credential-provider-node":"3.556.0","@aws-sdk/middleware-endpoint-discovery":"3.535.0","@aws-sdk/middleware-host-header":"3.535.0","@aws-sdk/middleware-logger":"3.535.0","@aws-sdk/middleware-recursion-detection":"3.535.0","@aws-sdk/middleware-user-agent":"3.540.0","@aws-sdk/region-config-resolver":"3.535.0","@aws-sdk/types":"3.535.0","@aws-sdk/util-endpoints":"3.540.0","@aws-sdk/util-user-agent-browser":"3.535.0","@aws-sdk/util-user-agent-node":"3.535.0","@smithy/config-resolver":"^2.2.0","@smithy/core":"^1.4.2","@smithy/fetch-http-handler":"^2.5.0","@smithy/hash-node":"^2.2.0","@smithy/invalid-dependency":"^2.2.0","@smithy/middleware-content-length":"^2.2.0","@smithy/middleware-endpoint":"^2.5.1","@smithy/middleware-retry":"^2.3.1","@smithy/middleware-serde":"^2.3.0","@smithy/middleware-stack":"^2.2.0","@smithy/node-config-provider":"^2.3.0","@smithy/node-http-handler":"^2.5.0","@smithy/protocol-http":"^3.3.0","@smithy/smithy-client":"^2.5.1","@smithy/types":"^2.12.0","@smithy/url-parser":"^2.2.0","@smithy/util-base64":"^2.3.0","@smithy/util-body-length-browser":"^2.2.0","@smithy/util-body-length-node":"^2.3.0","@smithy/util-defaults-mode-browser":"^2.2.1","@smithy/util-defaults-mode-node":"^2.3.1","@smithy/util-endpoints":"^1.2.0","@smithy/util-middleware":"^2.2.0","@smithy/util-retry":"^2.2.0","@smithy/util-utf8":"^2.3.0","@smithy/util-waiter":"^2.2.0",tslib:"^2.6.2",uuid:"^9.0.1"},devDependencies:{"@smithy/service-client-documentation-generator":"^2.2.0","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31","@types/uuid":"^9.0.4",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=14.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-dynamodb",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-dynamodb"}}});var Ma=y((sOe,FP)=>{var Tl=Object.defineProperty,RZ=Object.getOwnPropertyDescriptor,DZ=Object.getOwnPropertyNames,NZ=Object.prototype.hasOwnProperty,rt=(e,t)=>Tl(e,"name",{value:t,configurable:!0}),MZ=(e,t)=>{for(var r in t)Tl(e,r,{get:t[r],enumerable:!0})},LZ=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of DZ(t))!NZ.call(e,i)&&i!==r&&Tl(e,i,{get:()=>t[i],enumerable:!(n=RZ(t,i))||n.enumerable});return e},kZ=e=>LZ(Tl({},"__esModule",{value:!0}),e),AP={};MZ(AP,{DEFAULT_MAX_RETRIES:()=>OP,DEFAULT_TIMEOUT:()=>IP,ENV_CMDS_AUTH_TOKEN:()=>Ry,ENV_CMDS_FULL_URI:()=>xl,ENV_CMDS_RELATIVE_URI:()=>Al,Endpoint:()=>NP,fromContainerMetadata:()=>qZ,fromInstanceMetadata:()=>aee,getInstanceMetadataEndpoint:()=>LP,httpRequest:()=>qo,providerConfigFromInit:()=>Dy});FP.exports=kZ(AP);var FZ=require("url"),Wr=Ft(),BZ=require("buffer"),jZ=require("http");function qo(e){return new Promise((t,r)=>{var n;let i=(0,jZ.request)({method:"GET",...e,hostname:(n=e.hostname)==null?void 0:n.replace(/^\[(.+)\]$/,"$1")});i.on("error",o=>{r(Object.assign(new Wr.ProviderError("Unable to connect to instance metadata service"),o)),i.destroy()}),i.on("timeout",()=>{r(new Wr.ProviderError("TimeoutError from instance metadata service")),i.destroy()}),i.on("response",o=>{let{statusCode:s=400}=o;(s<200||300<=s)&&(r(Object.assign(new Wr.ProviderError("Error response received from instance metadata service"),{statusCode:s})),i.destroy());let a=[];o.on("data",c=>{a.push(c)}),o.on("end",()=>{t(BZ.Buffer.concat(a)),i.destroy()})}),i.end()})}rt(qo,"httpRequest");var TP=rt(e=>!!e&&typeof e=="object"&&typeof e.AccessKeyId=="string"&&typeof e.SecretAccessKey=="string"&&typeof e.Token=="string"&&typeof e.Expiration=="string","isImdsCredentials"),PP=rt(e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration)}),"fromImdsCredentials"),IP=1e3,OP=0,Dy=rt(({maxRetries:e=OP,timeout:t=IP})=>({maxRetries:e,timeout:t}),"providerConfigFromInit"),Oy=rt((e,t)=>{let r=e();for(let n=0;n<t;n++)r=r.catch(e);return r},"retry"),xl="AWS_CONTAINER_CREDENTIALS_FULL_URI",Al="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Ry="AWS_CONTAINER_AUTHORIZATION_TOKEN",qZ=rt((e={})=>{let{timeout:t,maxRetries:r}=Dy(e);return()=>Oy(async()=>{let n=await VZ(),i=JSON.parse(await UZ(t,n));if(!TP(i))throw new Wr.CredentialsProviderError("Invalid response received from instance metadata service.");return PP(i)},r)},"fromContainerMetadata"),UZ=rt(async(e,t)=>(process.env[Ry]&&(t.headers={...t.headers,Authorization:process.env[Ry]}),(await qo({...t,timeout:e})).toString()),"requestFromEcsImds"),GZ="169.254.170.2",$Z={localhost:!0,"127.0.0.1":!0},HZ={"http:":!0,"https:":!0},VZ=rt(async()=>{if(process.env[Al])return{hostname:GZ,path:process.env[Al]};if(process.env[xl]){let e=(0,FZ.parse)(process.env[xl]);if(!e.hostname||!(e.hostname in $Z))throw new Wr.CredentialsProviderError(`${e.hostname} is not a valid container metadata service hostname`,!1);if(!e.protocol||!(e.protocol in HZ))throw new Wr.CredentialsProviderError(`${e.protocol} is not a valid container metadata service protocol`,!1);return{...e,port:e.port?parseInt(e.port,10):void 0}}throw new Wr.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${Al} or ${xl} environment variable is set`,!1)},"getCmdsUri"),RP=class DP extends Wr.CredentialsProviderError{constructor(t,r=!0){super(t,r),this.tryNextLink=r,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,DP.prototype)}};rt(RP,"InstanceMetadataV1FallbackError");var zZ=RP,Ny=fn(),WZ=$i(),NP=(e=>(e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]",e))(NP||{}),KZ="AWS_EC2_METADATA_SERVICE_ENDPOINT",JZ="ec2_metadata_service_endpoint",YZ={environmentVariableSelector:e=>e[KZ],configFileSelector:e=>e[JZ],default:void 0},MP=(e=>(e.IPv4="IPv4",e.IPv6="IPv6",e))(MP||{}),XZ="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",QZ="ec2_metadata_service_endpoint_mode",ZZ={environmentVariableSelector:e=>e[XZ],configFileSelector:e=>e[QZ],default:"IPv4"},LP=rt(async()=>(0,WZ.parseUrl)(await eee()||await tee()),"getInstanceMetadataEndpoint"),eee=rt(async()=>(0,Ny.loadConfig)(YZ)(),"getFromEndpointConfig"),tee=rt(async()=>{let e=await(0,Ny.loadConfig)(ZZ)();switch(e){case"IPv4":return"http://169.254.169.254";case"IPv6":return"http://[fd00:ec2::254]";default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(MP)}`)}},"getFromEndpointModeConfig"),ree=300,nee=300,iee="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",CP=rt((e,t)=>{let r=ree+Math.floor(Math.random()*nee),n=new Date(Date.now()+r*1e3);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(n)}.
39
- For more information, please visit: `+iee);let i=e.originalExpiration??e.expiration;return{...e,...i?{originalExpiration:i}:{},expiration:n}},"getExtendedInstanceMetadataCredentials"),oee=rt((e,t={})=>{let r=(t==null?void 0:t.logger)||console,n;return async()=>{let i;try{i=await e(),i.expiration&&i.expiration.getTime()<Date.now()&&(i=CP(i,r))}catch(o){if(n)r.warn("Credential renew failed: ",o),i=CP(n,r);else throw o}return n=i,i}},"staticStabilityProvider"),kP="/latest/meta-data/iam/security-credentials/",see="/latest/api/token",Iy="AWS_EC2_METADATA_V1_DISABLED",wP="ec2_metadata_v1_disabled",xP="x-aws-ec2-metadata-token",aee=rt((e={})=>oee(cee(e),{logger:e.logger}),"fromInstanceMetadata"),cee=rt(e=>{let t=!1,{logger:r,profile:n}=e,{timeout:i,maxRetries:o}=Dy(e),s=rt(async(a,c)=>{var u;if(t||((u=c.headers)==null?void 0:u[xP])==null){let m=!1,h=!1,v=await(0,Ny.loadConfig)({environmentVariableSelector:_=>{let g=_[Iy];if(h=!!g&&g!=="false",g===void 0)throw new Wr.CredentialsProviderError(`${Iy} not set in env, checking config file next.`);return h},configFileSelector:_=>{let g=_[wP];return m=!!g&&g!=="false",m},default:!1},{profile:n})();if(e.ec2MetadataV1Disabled||v){let _=[];throw e.ec2MetadataV1Disabled&&_.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),m&&_.push(`config file profile (${wP})`),h&&_.push(`process environment variable (${Iy})`),new zZ(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${_.join(", ")}].`)}}let p=(await Oy(async()=>{let m;try{m=await lee(c)}catch(h){throw h.statusCode===401&&(t=!1),h}return m},a)).trim();return Oy(async()=>{let m;try{m=await dee(p,c)}catch(h){throw h.statusCode===401&&(t=!1),h}return m},a)},"getCredentials");return async()=>{let a=await LP();if(t)return r==null||r.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),s(o,{...a,timeout:i});{let c;try{c=(await uee({...a,timeout:i})).toString()}catch(u){if((u==null?void 0:u.statusCode)===400)throw Object.assign(u,{message:"EC2 Metadata token request returned error"});return(u.message==="TimeoutError"||[403,404,405].includes(u.statusCode))&&(t=!0),r==null||r.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),s(o,{...a,timeout:i})}return s(o,{...a,headers:{[xP]:c},timeout:i})}}},"getInstanceImdsProvider"),uee=rt(async e=>qo({...e,path:see,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),"getMetadataToken"),lee=rt(async e=>(await qo({...e,path:kP})).toString(),"getProfile"),dee=rt(async(e,t)=>{let r=JSON.parse((await qo({...t,path:kP+e})).toString());if(!TP(r))throw new Wr.CredentialsProviderError("Invalid response received from instance metadata service.");return PP(r)},"getCredentialsFromProfile")});var BP=y(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.checkUrl=void 0;var pee=Ft(),fee="169.254.170.2",mee="169.254.170.23",hee="[fd00:ec2::23]",yee=e=>{if(e.protocol!=="https:"&&!(e.hostname===fee||e.hostname===mee||e.hostname===hee)){if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let t=e.hostname.split("."),r=n=>{let i=parseInt(n,10);return 0<=i&&i<=255};if(t[0]==="127"&&r(t[1])&&r(t[2])&&r(t[3])&&t.length===4)return}throw new pee.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
38
+ ${Hi.toHex(s)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){let r=[];for(let i of t.split("/"))(i==null?void 0:i.length)!==0&&i!=="."&&(i===".."?r.pop():r.push(i));let n=`${t!=null&&t.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&(t!=null&&t.endsWith("/"))?"/":""}`;return gm.escapeUri(n).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){let r=bte(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}},Vx=class extends vm{headerFormatter=new qx;constructor({applyChecksum:t,credentials:r,region:n,service:o,sha256:i,uriEscapePath:s=!0}){super({applyChecksum:t,credentials:r,region:n,service:o,sha256:i,uriEscapePath:s})}async presign(t,r={}){let{signingDate:n=new Date,expiresIn:o=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:a,hoistableHeaders:c,signingRegion:l,signingService:d}=r,f=await this.credentialProvider();this.validateResolvedCredentials(f);let m=l??await this.regionProvider(),{longDate:h,shortDate:_}=this.formatDate(n);if(o>kM)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let E=Sm(_,m,d??this.service),T=UM(Hx(t),{unhoistableHeaders:s,hoistableHeaders:c});f.sessionToken&&(T.query[Kx]=f.sessionToken),T.query[vM]=_m,T.query[TM]=`${f.accessKeyId}/${E}`,T.query[Wx]=h,T.query[AM]=o.toString(10);let I=jx(T,i,a);return T.query[wM]=this.getCanonicalHeaderList(I),T.query[zx]=await this.getSignature(h,E,this.getSigningKey(f,m,_,d),this.createCanonicalRequest(T,I,await bm(t,this.sha256))),T}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:n=new Date,priorSignature:o,signingRegion:i,signingService:s}){let a=i??await this.regionProvider(),{shortDate:c,longDate:l}=this.formatDate(n),d=Sm(c,a,s??this.service),f=await bm({headers:{},body:r},this.sha256),m=new this.sha256;m.update(t);let h=Hi.toHex(await m.digest()),_=[$M,l,d,o,h,f].join(`
39
+ `);return this.signString(_,{signingDate:n,signingRegion:a,signingService:s})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:o}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:o,priorSignature:t.priorSignature}).then(s=>({message:t.message,signature:s}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:o}={}){let i=await this.credentialProvider();this.validateResolvedCredentials(i);let s=n??await this.regionProvider(),{shortDate:a}=this.formatDate(r),c=new this.sha256(await this.getSigningKey(i,s,a,o));return c.update(ta.toUint8Array(t)),Hi.toHex(await c.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:o,signingRegion:i,signingService:s}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let c=i??await this.regionProvider(),l=Hx(t),{longDate:d,shortDate:f}=this.formatDate(r),m=Sm(f,c,s??this.service);l.headers[Qx]=d,a.sessionToken&&(l.headers[RM]=a.sessionToken);let h=await bm(l,this.sha256);!BM(xm,l.headers)&&this.applyChecksum&&(l.headers[xm]=h);let _=jx(l,o,n),E=await this.getSignature(d,m,this.getSigningKey(a,c,f,s),this.createCanonicalRequest(l,_,h));return l.headers[Yx]=`${_m} Credential=${a.accessKeyId}/${m}, SignedHeaders=${this.getCanonicalHeaderList(_)}, Signature=${E}`,l}async getSignature(t,r,n,o){let i=await this.createStringToSign(t,r,o,_m),s=new this.sha256(await n);return s.update(ta.toUint8Array(i)),Hi.toHex(await s.digest())}getSigningKey(t,r,n,o){return FM(this.sha256,t,n,r,o||this.service)}},vte={SignatureV4a:null};Pe.ALGORITHM_IDENTIFIER=_m;Pe.ALGORITHM_IDENTIFIER_V4A=_te;Pe.ALGORITHM_QUERY_PARAM=vM;Pe.ALWAYS_UNSIGNABLE_HEADERS=PM;Pe.AMZ_DATE_HEADER=Qx;Pe.AMZ_DATE_QUERY_PARAM=Wx;Pe.AUTH_HEADER=Yx;Pe.CREDENTIAL_QUERY_PARAM=TM;Pe.DATE_HEADER=IM;Pe.EVENT_ALGORITHM_IDENTIFIER=$M;Pe.EXPIRES_QUERY_PARAM=AM;Pe.GENERATED_HEADERS=CM;Pe.HOST_HEADER=yte;Pe.KEY_TYPE_IDENTIFIER=Xx;Pe.MAX_CACHE_SIZE=LM;Pe.MAX_PRESIGNED_TTL=kM;Pe.PROXY_HEADER_PATTERN=OM;Pe.REGION_SET_PARAM=hte;Pe.SEC_HEADER_PATTERN=NM;Pe.SHA256_HEADER=xm;Pe.SIGNATURE_HEADER=DM;Pe.SIGNATURE_QUERY_PARAM=zx;Pe.SIGNED_HEADERS_QUERY_PARAM=wM;Pe.SignatureV4=Vx;Pe.SignatureV4Base=vm;Pe.TOKEN_HEADER=RM;Pe.TOKEN_QUERY_PARAM=Kx;Pe.UNSIGNABLE_PATTERNS=gte;Pe.UNSIGNED_PAYLOAD=MM;Pe.clearCredentialCache=Ete;Pe.createScope=Sm;Pe.getCanonicalHeaders=jx;Pe.getCanonicalQuery=jM;Pe.getPayloadHash=bm;Pe.getSigningKey=FM;Pe.hasHeader=BM;Pe.moveHeadersToQuery=UM;Pe.prepareRequest=Hx;Pe.signatureV4aContainer=vte});function Tte(e,{credentials:t,credentialDefaultProvider:r}){let n;return t?t!=null&&t.memoized?n=t:n=Hb(t,Gb,Qp):r?n=Pi(r(Object.assign({},e,{parentClientConfig:e}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function wte(e,t){if(t.configBound)return t;let r=async n=>t({...n,callerClientConfig:e});return r.memoized=t.memoized,r.configBound=!0,r}var Jx,Ln,GM,HM=D(()=>{Yt();ar();Jx=C(qM()),Ln=e=>{let t=e.credentials,r=!!e.credentials,n;Object.defineProperty(e,"credentials",{set(l){l&&l!==t&&l!==n&&(r=!0),t=l;let d=Tte(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=wte(e,d);if(r&&!f.attributed){let m=typeof t=="object"&&t!==null;n=async h=>{let E=await f(h);return m&&(!E.$source||Object.keys(E.$source).length===0)?Fi(E,"CREDENTIALS_CODE","e"):E},n.memoized=f.memoized,n.configBound=f.configBound,n.attributed=!0}else n=f},get(){return n},enumerable:!0,configurable:!0}),e.credentials=t;let{signingEscapePath:o=!0,systemClockOffset:i=e.systemClockOffset||0,sha256:s}=e,a;return e.signer?a=Pi(e.signer):e.regionInfoProvider?a=()=>Pi(e.region)().then(async l=>[await e.regionInfoProvider(l,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},l]).then(([l,d])=>{let{signingRegion:f,signingService:m}=l;e.signingRegion=e.signingRegion||f||d,e.signingName=e.signingName||m||e.serviceId;let h={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:o},_=e.signerConstructor||Jx.SignatureV4;return new _(h)}):a=async l=>{l=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Pi(e.region)(),properties:{}},l);let d=l.signingRegion,f=l.signingName;e.signingRegion=e.signingRegion||d,e.signingName=e.signingName||f||e.serviceId;let m={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:s,uriEscapePath:o},h=e.signerConstructor||Jx.SignatureV4;return new h(m)},Object.assign(e,{systemClockOffset:i,signingEscapePath:o,signer:a})},GM=Ln});var VM=D(()=>{kx();dM();hM();_M();HM()});var ml={};Nt(ml,{AWSSDKSigV4Signer:()=>Lx,AwsSdkSigV4ASigner:()=>pl,AwsSdkSigV4Signer:()=>Qt,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:()=>uo,NODE_SIGV4A_CONFIG_OPTIONS:()=>gM,getBearerTokenEnvKey:()=>ym,resolveAWSSDKSigV4Config:()=>GM,resolveAwsSdkSigV4AConfig:()=>yM,resolveAwsSdkSigV4Config:()=>Ln,validateSigningProperties:()=>cc});var Xt=D(()=>{VM();Bx()});var ev=b(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});Vi.resolveHttpAuthSchemeConfig=Vi.defaultDynamoDBHttpAuthSchemeProvider=Vi.defaultDynamoDBHttpAuthSchemeParametersProvider=void 0;var Ate=(Xt(),ie(ml)),Zx=ir(),Ite=async(e,t,r)=>({operation:(0,Zx.getSmithyContext)(t).operation,region:await(0,Zx.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});Vi.defaultDynamoDBHttpAuthSchemeParametersProvider=Ite;function Cte(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"dynamodb",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}var Dte=e=>{let t=[];switch(e.operation){default:t.push(Cte(e))}return t};Vi.defaultDynamoDBHttpAuthSchemeProvider=Dte;var Rte=e=>{let t=(0,Ate.resolveAwsSdkSigV4Config)(e);return Object.assign(t,{authSchemePreference:(0,Zx.normalizeProvider)(e.authSchemePreference??[])})};Vi.resolveHttpAuthSchemeConfig=Rte});var Tm=b(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});lc.DynamoDBServiceException=lc.__ServiceException=void 0;var WM=Te();Object.defineProperty(lc,"__ServiceException",{enumerable:!0,get:function(){return WM.ServiceException}});var tv=class e extends WM.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};lc.DynamoDBServiceException=tv});var kv=b(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.TransactionCanceledException=X.ConditionalCheckFailedException=X.IndexNotFoundException=X.ReplicaNotFoundException=X.ReplicaAlreadyExistsException=X.InvalidRestoreTimeException=X.TableAlreadyExistsException=X.ImportConflictException=X.PointInTimeRecoveryUnavailableException=X.InvalidExportTimeException=X.ExportConflictException=X.TransactionInProgressException=X.IdempotentParameterMismatchException=X.DuplicateItemException=X.ImportNotFoundException=X.GlobalTableNotFoundException=X.ExportNotFoundException=X.PolicyNotFoundException=X.TransactionConflictException=X.ResourceInUseException=X.GlobalTableAlreadyExistsException=X.TableNotFoundException=X.TableInUseException=X.LimitExceededException=X.ContinuousBackupsUnavailableException=X.ReplicatedWriteConflictException=X.ItemCollectionSizeLimitExceededException=X.ResourceNotFoundException=X.ProvisionedThroughputExceededException=X.InvalidEndpointException=X.ThrottlingException=X.RequestLimitExceeded=X.InternalServerError=X.BackupNotFoundException=X.BackupInUseException=void 0;var Ue=Tm(),rv=class e extends Ue.DynamoDBServiceException{name="BackupInUseException";$fault="client";constructor(t){super({name:"BackupInUseException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.BackupInUseException=rv;var nv=class e extends Ue.DynamoDBServiceException{name="BackupNotFoundException";$fault="client";constructor(t){super({name:"BackupNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.BackupNotFoundException=nv;var ov=class e extends Ue.DynamoDBServiceException{name="InternalServerError";$fault="server";constructor(t){super({name:"InternalServerError",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype)}};X.InternalServerError=ov;var iv=class e extends Ue.DynamoDBServiceException{name="RequestLimitExceeded";$fault="client";ThrottlingReasons;constructor(t){super({name:"RequestLimitExceeded",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.ThrottlingReasons=t.ThrottlingReasons}};X.RequestLimitExceeded=iv;var sv=class e extends Ue.DynamoDBServiceException{name="ThrottlingException";$fault="client";throttlingReasons;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.throttlingReasons=t.throttlingReasons}};X.ThrottlingException=sv;var av=class e extends Ue.DynamoDBServiceException{name="InvalidEndpointException";$fault="client";Message;constructor(t){super({name:"InvalidEndpointException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};X.InvalidEndpointException=av;var cv=class e extends Ue.DynamoDBServiceException{name="ProvisionedThroughputExceededException";$fault="client";ThrottlingReasons;constructor(t){super({name:"ProvisionedThroughputExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.ThrottlingReasons=t.ThrottlingReasons}};X.ProvisionedThroughputExceededException=cv;var uv=class e extends Ue.DynamoDBServiceException{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.ResourceNotFoundException=uv;var lv=class e extends Ue.DynamoDBServiceException{name="ItemCollectionSizeLimitExceededException";$fault="client";constructor(t){super({name:"ItemCollectionSizeLimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.ItemCollectionSizeLimitExceededException=lv;var dv=class e extends Ue.DynamoDBServiceException{name="ReplicatedWriteConflictException";$fault="client";$retryable={};constructor(t){super({name:"ReplicatedWriteConflictException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.ReplicatedWriteConflictException=dv;var fv=class e extends Ue.DynamoDBServiceException{name="ContinuousBackupsUnavailableException";$fault="client";constructor(t){super({name:"ContinuousBackupsUnavailableException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.ContinuousBackupsUnavailableException=fv;var pv=class e extends Ue.DynamoDBServiceException{name="LimitExceededException";$fault="client";constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.LimitExceededException=pv;var mv=class e extends Ue.DynamoDBServiceException{name="TableInUseException";$fault="client";constructor(t){super({name:"TableInUseException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.TableInUseException=mv;var hv=class e extends Ue.DynamoDBServiceException{name="TableNotFoundException";$fault="client";constructor(t){super({name:"TableNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.TableNotFoundException=hv;var yv=class e extends Ue.DynamoDBServiceException{name="GlobalTableAlreadyExistsException";$fault="client";constructor(t){super({name:"GlobalTableAlreadyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.GlobalTableAlreadyExistsException=yv;var gv=class e extends Ue.DynamoDBServiceException{name="ResourceInUseException";$fault="client";constructor(t){super({name:"ResourceInUseException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.ResourceInUseException=gv;var _v=class e extends Ue.DynamoDBServiceException{name="TransactionConflictException";$fault="client";constructor(t){super({name:"TransactionConflictException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.TransactionConflictException=_v;var Ev=class e extends Ue.DynamoDBServiceException{name="PolicyNotFoundException";$fault="client";constructor(t){super({name:"PolicyNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.PolicyNotFoundException=Ev;var Sv=class e extends Ue.DynamoDBServiceException{name="ExportNotFoundException";$fault="client";constructor(t){super({name:"ExportNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.ExportNotFoundException=Sv;var bv=class e extends Ue.DynamoDBServiceException{name="GlobalTableNotFoundException";$fault="client";constructor(t){super({name:"GlobalTableNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.GlobalTableNotFoundException=bv;var xv=class e extends Ue.DynamoDBServiceException{name="ImportNotFoundException";$fault="client";constructor(t){super({name:"ImportNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.ImportNotFoundException=xv;var vv=class e extends Ue.DynamoDBServiceException{name="DuplicateItemException";$fault="client";constructor(t){super({name:"DuplicateItemException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.DuplicateItemException=vv;var Tv=class e extends Ue.DynamoDBServiceException{name="IdempotentParameterMismatchException";$fault="client";Message;constructor(t){super({name:"IdempotentParameterMismatchException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};X.IdempotentParameterMismatchException=Tv;var wv=class e extends Ue.DynamoDBServiceException{name="TransactionInProgressException";$fault="client";Message;constructor(t){super({name:"TransactionInProgressException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};X.TransactionInProgressException=wv;var Av=class e extends Ue.DynamoDBServiceException{name="ExportConflictException";$fault="client";constructor(t){super({name:"ExportConflictException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.ExportConflictException=Av;var Iv=class e extends Ue.DynamoDBServiceException{name="InvalidExportTimeException";$fault="client";constructor(t){super({name:"InvalidExportTimeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.InvalidExportTimeException=Iv;var Cv=class e extends Ue.DynamoDBServiceException{name="PointInTimeRecoveryUnavailableException";$fault="client";constructor(t){super({name:"PointInTimeRecoveryUnavailableException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.PointInTimeRecoveryUnavailableException=Cv;var Dv=class e extends Ue.DynamoDBServiceException{name="ImportConflictException";$fault="client";constructor(t){super({name:"ImportConflictException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.ImportConflictException=Dv;var Rv=class e extends Ue.DynamoDBServiceException{name="TableAlreadyExistsException";$fault="client";constructor(t){super({name:"TableAlreadyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.TableAlreadyExistsException=Rv;var Pv=class e extends Ue.DynamoDBServiceException{name="InvalidRestoreTimeException";$fault="client";constructor(t){super({name:"InvalidRestoreTimeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.InvalidRestoreTimeException=Pv;var Ov=class e extends Ue.DynamoDBServiceException{name="ReplicaAlreadyExistsException";$fault="client";constructor(t){super({name:"ReplicaAlreadyExistsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.ReplicaAlreadyExistsException=Ov;var Nv=class e extends Ue.DynamoDBServiceException{name="ReplicaNotFoundException";$fault="client";constructor(t){super({name:"ReplicaNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.ReplicaNotFoundException=Nv;var $v=class e extends Ue.DynamoDBServiceException{name="IndexNotFoundException";$fault="client";constructor(t){super({name:"IndexNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}};X.IndexNotFoundException=$v;var Mv=class e extends Ue.DynamoDBServiceException{name="ConditionalCheckFailedException";$fault="client";Item;constructor(t){super({name:"ConditionalCheckFailedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Item=t.Item}};X.ConditionalCheckFailedException=Mv;var Lv=class e extends Ue.DynamoDBServiceException{name="TransactionCanceledException";$fault="client";Message;CancellationReasons;constructor(t){super({name:"TransactionCanceledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.CancellationReasons=t.CancellationReasons}};X.TransactionCanceledException=Lv});var kT=b(u=>{"use strict";Object.defineProperty(u,"__esModule",{value:!0});u.BatchExecuteStatementInput$=u.BackupSummary$=u.BackupDetails$=u.BackupDescription$=u.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate$=u.AutoScalingTargetTrackingScalingPolicyConfigurationDescription$=u.AutoScalingSettingsUpdate$=u.AutoScalingSettingsDescription$=u.AutoScalingPolicyUpdate$=u.AutoScalingPolicyDescription$=u.AttributeValueUpdate$=u.AttributeDefinition$=u.ArchivalSummary$=u.errorTypeRegistries=u.TransactionInProgressException$=u.TransactionConflictException$=u.TransactionCanceledException$=u.ThrottlingException$=u.TableNotFoundException$=u.TableInUseException$=u.TableAlreadyExistsException$=u.ResourceNotFoundException$=u.ResourceInUseException$=u.RequestLimitExceeded$=u.ReplicatedWriteConflictException$=u.ReplicaNotFoundException$=u.ReplicaAlreadyExistsException$=u.ProvisionedThroughputExceededException$=u.PolicyNotFoundException$=u.PointInTimeRecoveryUnavailableException$=u.LimitExceededException$=u.ItemCollectionSizeLimitExceededException$=u.InvalidRestoreTimeException$=u.InvalidExportTimeException$=u.InvalidEndpointException$=u.InternalServerError$=u.IndexNotFoundException$=u.ImportNotFoundException$=u.ImportConflictException$=u.IdempotentParameterMismatchException$=u.GlobalTableNotFoundException$=u.GlobalTableAlreadyExistsException$=u.ExportNotFoundException$=u.ExportConflictException$=u.DuplicateItemException$=u.ContinuousBackupsUnavailableException$=u.ConditionalCheckFailedException$=u.BackupNotFoundException$=u.BackupInUseException$=u.DynamoDBServiceException$=void 0;u.DescribeExportInput$=u.DescribeEndpointsResponse$=u.DescribeEndpointsRequest$=u.DescribeContributorInsightsOutput$=u.DescribeContributorInsightsInput$=u.DescribeContinuousBackupsOutput$=u.DescribeContinuousBackupsInput$=u.DescribeBackupOutput$=u.DescribeBackupInput$=u.DeleteTableOutput$=u.DeleteTableInput$=u.DeleteResourcePolicyOutput$=u.DeleteResourcePolicyInput$=u.DeleteRequest$=u.DeleteReplicationGroupMemberAction$=u.DeleteReplicaAction$=u.DeleteItemOutput$=u.DeleteItemInput$=u.DeleteGlobalTableWitnessGroupMemberAction$=u.DeleteGlobalSecondaryIndexAction$=u.DeleteBackupOutput$=u.DeleteBackupInput$=u.Delete$=u.CsvOptions$=u.CreateTableOutput$=u.CreateTableInput$=u.CreateReplicationGroupMemberAction$=u.CreateReplicaAction$=u.CreateGlobalTableWitnessGroupMemberAction$=u.CreateGlobalTableOutput$=u.CreateGlobalTableInput$=u.CreateGlobalSecondaryIndexAction$=u.CreateBackupOutput$=u.CreateBackupInput$=u.ContributorInsightsSummary$=u.ContinuousBackupsDescription$=u.ConsumedCapacity$=u.ConditionCheck$=u.Condition$=u.Capacity$=u.CancellationReason$=u.BillingModeSummary$=u.BatchWriteItemOutput$=u.BatchWriteItemInput$=u.BatchStatementResponse$=u.BatchStatementRequest$=u.BatchStatementError$=u.BatchGetItemOutput$=u.BatchGetItemInput$=u.BatchExecuteStatementOutput$=void 0;u.IncrementalExportSpecification$=u.ImportTableOutput$=u.ImportTableInput$=u.ImportTableDescription$=u.ImportSummary$=u.GlobalTableWitnessGroupUpdate$=u.GlobalTableWitnessDescription$=u.GlobalTableGlobalSecondaryIndexSettingsUpdate$=u.GlobalTableDescription$=u.GlobalTable$=u.GlobalSecondaryIndexWarmThroughputDescription$=u.GlobalSecondaryIndexUpdate$=u.GlobalSecondaryIndexInfo$=u.GlobalSecondaryIndexDescription$=u.GlobalSecondaryIndexAutoScalingUpdate$=u.GlobalSecondaryIndex$=u.GetResourcePolicyOutput$=u.GetResourcePolicyInput$=u.GetItemOutput$=u.GetItemInput$=u.Get$=u.FailureException$=u.ExportTableToPointInTimeOutput$=u.ExportTableToPointInTimeInput$=u.ExportSummary$=u.ExportDescription$=u.ExpectedAttributeValue$=u.ExecuteTransactionOutput$=u.ExecuteTransactionInput$=u.ExecuteStatementOutput$=u.ExecuteStatementInput$=u.Endpoint$=u.EnableKinesisStreamingConfiguration$=u.DescribeTimeToLiveOutput$=u.DescribeTimeToLiveInput$=u.DescribeTableReplicaAutoScalingOutput$=u.DescribeTableReplicaAutoScalingInput$=u.DescribeTableOutput$=u.DescribeTableInput$=u.DescribeLimitsOutput$=u.DescribeLimitsInput$=u.DescribeKinesisStreamingDestinationOutput$=u.DescribeKinesisStreamingDestinationInput$=u.DescribeImportOutput$=u.DescribeImportInput$=u.DescribeGlobalTableSettingsOutput$=u.DescribeGlobalTableSettingsInput$=u.DescribeGlobalTableOutput$=u.DescribeGlobalTableInput$=u.DescribeExportOutput$=void 0;u.ReplicaGlobalSecondaryIndexDescription$=u.ReplicaGlobalSecondaryIndexAutoScalingUpdate$=u.ReplicaGlobalSecondaryIndexAutoScalingDescription$=u.ReplicaGlobalSecondaryIndex$=u.ReplicaDescription$=u.ReplicaAutoScalingUpdate$=u.ReplicaAutoScalingDescription$=u.Replica$=u.QueryOutput$=u.QueryInput$=u.PutResourcePolicyOutput$=u.PutResourcePolicyInput$=u.PutRequest$=u.PutItemOutput$=u.PutItemInput$=u.Put$=u.ProvisionedThroughputOverride$=u.ProvisionedThroughputDescription$=u.ProvisionedThroughput$=u.Projection$=u.PointInTimeRecoverySpecification$=u.PointInTimeRecoveryDescription$=u.ParameterizedStatement$=u.OnDemandThroughputOverride$=u.OnDemandThroughput$=u.LocalSecondaryIndexInfo$=u.LocalSecondaryIndexDescription$=u.LocalSecondaryIndex$=u.ListTagsOfResourceOutput$=u.ListTagsOfResourceInput$=u.ListTablesOutput$=u.ListTablesInput$=u.ListImportsOutput$=u.ListImportsInput$=u.ListGlobalTablesOutput$=u.ListGlobalTablesInput$=u.ListExportsOutput$=u.ListExportsInput$=u.ListContributorInsightsOutput$=u.ListContributorInsightsInput$=u.ListBackupsOutput$=u.ListBackupsInput$=u.KinesisStreamingDestinationOutput$=u.KinesisStreamingDestinationInput$=u.KinesisDataStreamDestination$=u.KeySchemaElement$=u.KeysAndAttributes$=u.ItemResponse$=u.ItemCollectionMetrics$=u.InputFormatOptions$=void 0;u.UpdateKinesisStreamingDestinationInput$=u.UpdateKinesisStreamingConfiguration$=u.UpdateItemOutput$=u.UpdateItemInput$=u.UpdateGlobalTableSettingsOutput$=u.UpdateGlobalTableSettingsInput$=u.UpdateGlobalTableOutput$=u.UpdateGlobalTableInput$=u.UpdateGlobalSecondaryIndexAction$=u.UpdateContributorInsightsOutput$=u.UpdateContributorInsightsInput$=u.UpdateContinuousBackupsOutput$=u.UpdateContinuousBackupsInput$=u.Update$=u.UntagResourceInput$=u.TransactWriteItemsOutput$=u.TransactWriteItemsInput$=u.TransactWriteItem$=u.TransactGetItemsOutput$=u.TransactGetItemsInput$=u.TransactGetItem$=u.TimeToLiveSpecification$=u.TimeToLiveDescription$=u.ThrottlingReason$=u.TagResourceInput$=u.Tag$=u.TableWarmThroughputDescription$=u.TableDescription$=u.TableCreationParameters$=u.TableClassSummary$=u.TableAutoScalingDescription$=u.StreamSpecification$=u.SSESpecification$=u.SSEDescription$=u.SourceTableFeatureDetails$=u.SourceTableDetails$=u.ScanOutput$=u.ScanInput$=u.S3BucketSource$=u.RestoreTableToPointInTimeOutput$=u.RestoreTableToPointInTimeInput$=u.RestoreTableFromBackupOutput$=u.RestoreTableFromBackupInput$=u.RestoreSummary$=u.ReplicaUpdate$=u.ReplicationGroupUpdate$=u.ReplicaSettingsUpdate$=u.ReplicaSettingsDescription$=u.ReplicaGlobalSecondaryIndexSettingsUpdate$=u.ReplicaGlobalSecondaryIndexSettingsDescription$=void 0;u.PutItem$=u.ListTagsOfResource$=u.ListTables$=u.ListImports$=u.ListGlobalTables$=u.ListExports$=u.ListContributorInsights$=u.ListBackups$=u.ImportTable$=u.GetResourcePolicy$=u.GetItem$=u.ExportTableToPointInTime$=u.ExecuteTransaction$=u.ExecuteStatement$=u.EnableKinesisStreamingDestination$=u.DisableKinesisStreamingDestination$=u.DescribeTimeToLive$=u.DescribeTableReplicaAutoScaling$=u.DescribeTable$=u.DescribeLimits$=u.DescribeKinesisStreamingDestination$=u.DescribeImport$=u.DescribeGlobalTableSettings$=u.DescribeGlobalTable$=u.DescribeExport$=u.DescribeEndpoints$=u.DescribeContributorInsights$=u.DescribeContinuousBackups$=u.DescribeBackup$=u.DeleteTable$=u.DeleteResourcePolicy$=u.DeleteItem$=u.DeleteBackup$=u.CreateTable$=u.CreateGlobalTable$=u.CreateBackup$=u.BatchWriteItem$=u.BatchGetItem$=u.BatchExecuteStatement$=u.AttributeValue$=u.WriteRequest$=u.WarmThroughput$=u.UpdateTimeToLiveOutput$=u.UpdateTimeToLiveInput$=u.UpdateTableReplicaAutoScalingOutput$=u.UpdateTableReplicaAutoScalingInput$=u.UpdateTableOutput$=u.UpdateTableInput$=u.UpdateReplicationGroupMemberAction$=u.UpdateKinesisStreamingDestinationOutput$=void 0;u.UpdateTimeToLive$=u.UpdateTableReplicaAutoScaling$=u.UpdateTable$=u.UpdateKinesisStreamingDestination$=u.UpdateItem$=u.UpdateGlobalTableSettings$=u.UpdateGlobalTable$=u.UpdateContributorInsights$=u.UpdateContinuousBackups$=u.UntagResource$=u.TransactWriteItems$=u.TransactGetItems$=u.TagResource$=u.Scan$=u.RestoreTableToPointInTime$=u.RestoreTableFromBackup$=u.Query$=u.PutResourcePolicy$=void 0;var Pte="Action",Ote="ArchivalBackupArn",Fv="ApproximateCreationDateTimePrecision",Nte="AttributeDefinition",$te="ArchivalDateTime",hl="AttributeDefinitions",Mte="AttributeMap",Lte="AccountMaxReadCapacityUnits",kte="AccountMaxWriteCapacityUnits",wm="AttributeName",Fte="ArchivalReason",KM="ArchivalSummary",YM="AutoScalingDisabled",Bte="AutoScalingPolicyDescription",Ute="AutoScalingPolicyDescriptionList",jte="AutoScalingPolicyUpdate",QM="AutoScalingRoleArn",qte="AutoScalingSettingsDescription",Gte="AutoScalingSettingsUpdate",Hte="AutoScalingTargetTrackingScalingPolicyConfigurationDescription",Vte="AutoScalingTargetTrackingScalingPolicyConfigurationUpdate",Wte="AttributeType",Am="AttributesToGet",XM="AttributeUpdates",zte="AttributeValue",Bv="AttributeValueList",Kte="AttributeValueUpdate",Yte="Address",Uv="Attributes",Qte="Backfilling",yl="BackupArn",JM="BackupCreationDateTime",jv="BackupDescription",qv="BackupDetails",ZM="BackupExpiryDateTime",Xte="BatchExecuteStatement",Jte="BatchExecuteStatementInput",Zte="BatchExecuteStatementOutput",ere="BatchGetItem",tre="BatchGetItemInput",rre="BatchGetItemOutput",nre="BatchGetResponseMap",ore="BatchGetRequestMap",ire="BackupInUseException",gl="BillingMode",eL="BillingModeOverride",tL="BillingModeSummary",Gv="BackupName",sre="BackupNotFoundException",are="BOOL",rL="BackupStatus",nL="BackupSizeBytes",cre="BilledSizeBytes",ure="BatchStatementError",lre="BatchStatementRequest",dre="BatchStatementResponse",fre="BS",pre="BackupSummary",oL="BackupSummaries",Hv="BackupType",mre="BatchWriteItem",hre="BatchWriteItemInput",yre="BatchWriteItemOutput",gre="BatchWriteItemRequestMap",_re="B",iL="Code",Ere="CreateBackup",Vv="ContinuousBackupsDescription",Sre="CreateBackupInput",bre="CreateBackupOutput",xre="ContinuousBackupsStatus",vre="ContinuousBackupsUnavailableException",Mr="ConsumedCapacity",Tre="ConditionalCheckFailedException",wre="ConsumedCapacityMultiple",sL="ConditionCheck",aL="CreationDateTime",ra="ConditionExpression",Are="CreateGlobalSecondaryIndexAction",Ire="CreateGlobalTable",Cre="CreateGlobalTableInput",Dre="CreateGlobalTableOutput",Rre="CreateGlobalTableWitnessGroupMemberAction",Pre="ContributorInsightsAction",Im="ContributorInsightsMode",Ore="ContributorInsightsRuleList",Nre="ContributorInsightsSummary",Wv="ContributorInsightsStatus",cL="ContributorInsightsSummaries",uL="ComparisonOperator",_l="ConditionalOperator",$re="CsvOptions",Mre="CachePeriodInMinutes",Lre="CancellationReasons",kre="CreateReplicaAction",Fre="CreateReplicationGroupMemberAction",Bre="CancellationReasonList",Ure="ConfirmRemoveSelfResourceAccess",lL="ClientRequestToken",jre="CancellationReason",dc="ConsistentRead",Cm="ClientToken",qre="CreateTableInput",Gre="CreateTableOutput",Hre="CreateTable",dL="CapacityUnits",fL="CloudWatchLogGroupArn",Vre="Capacity",Wre="Condition",pL="Count",Dm="Create",zre="Csv",Kre="Delimiter",Yre="DeleteBackup",Qre="DeleteBackupInput",Xre="DescribeBackupInput",Jre="DeleteBackupOutput",Zre="DescribeBackupOutput",ene="DescribeBackup",tne="DescribeContinuousBackups",rne="DescribeContinuousBackupsInput",nne="DescribeContinuousBackupsOutput",one="DescribeContributorInsights",ine="DescribeContributorInsightsInput",sne="DescribeContributorInsightsOutput",ane="DescribeEndpoints",cne="DescribeExportInput",une="DescribeExportOutput",lne="DescribeEndpointsRequest",dne="DescribeEndpointsResponse",fne="DescribeExport",pne="DeleteGlobalSecondaryIndexAction",mne="DescribeGlobalTable",hne="DescribeGlobalTableInput",yne="DescribeGlobalTableOutput",gne="DescribeGlobalTableSettings",_ne="DescribeGlobalTableSettingsInput",Ene="DescribeGlobalTableSettingsOutput",Sne="DeleteGlobalTableWitnessGroupMemberAction",bne="DeleteItem",xne="DuplicateItemException",vne="DeleteItemInput",Tne="DescribeImportInput",wne="DeleteItemOutput",Ane="DescribeImportOutput",Ine="DescribeImport",Cne="DescribeKinesisStreamingDestination",Dne="DescribeKinesisStreamingDestinationInput",Rne="DescribeKinesisStreamingDestinationOutput",Pne="DisableKinesisStreamingDestination",One="DescribeLimits",Nne="DescribeLimitsInput",$ne="DescribeLimitsOutput",zv="DeletionProtectionEnabled",mL="DeleteRequest",Mne="DeleteReplicaAction",Lne="DeleteReplicationGroupMemberAction",kne="DeleteResourcePolicy",Fne="DeleteResourcePolicyInput",Bne="DeleteResourcePolicyOutput",Kv="DestinationStatus",Une="DestinationStatusDescription",hL="DisableScaleIn",jne="DeleteTable",qne="DeleteTableInput",Gne="DescribeTableInput",Hne="DeleteTableOutput",Vne="DescribeTableOutput",Wne="DescribeTableReplicaAutoScaling",zne="DescribeTableReplicaAutoScalingInput",Kne="DescribeTableReplicaAutoScalingOutput",Yne="DescribeTimeToLive",Qne="DescribeTimeToLiveInput",Xne="DescribeTimeToLiveOutput",Jne="DescribeTable",fc="Delete",Zne="Error",Yv="ExportArn",eoe="ExpectedAttributeMap",dn="ExpressionAttributeNames",Qo="ExpressionAttributeValues",toe="ExpressionAttributeValueMap",roe="ExpectedAttributeValue",noe="ErrorCount",ooe="ExportConflictException",Qv="ExportDescription",ioe="ExceptionDescription",yL="ExportFormat",soe="ExportFromTime",Xv="EnableKinesisStreamingConfiguration",aoe="EnableKinesisStreamingDestination",coe="ExportManifest",uoe="ExceptionName",loe="ExportNotFoundException",doe="EarliestRestorableDateTime",gL="ExpectedRevisionId",_L="ExportStatus",foe="ExclusiveStartBackupArn",poe="ExclusiveStartGlobalTableName",moe="ExecuteStatementInput",EL="ExclusiveStartKey",hoe="ExecuteStatementOutput",yoe="ExclusiveStartTableName",goe="ExportSummary",_oe="ExecuteStatement",SL="ExportSummaries",Jv="EndTime",Eoe="ExecuteTransactionInput",Soe="ExecuteTransactionOutput",boe="ExportToTime",xoe="ExportTableToPointInTime",voe="ExportTableToPointInTimeInput",Toe="ExportTableToPointInTimeOutput",bL="ExportTime",woe="ExecuteTransaction",Zv="ExportType",Aoe="ExportViewType",xL="Endpoints",vL="Enabled",Ioe="Endpoint",eT="Expected",Coe="Exists",TL="FailureCode",Doe="FilterConditionMap",wL="FailureException",AL="FilterExpression",IL="FailureMessage",CL="Get",Roe="GetItem",Poe="GetItemInput",Ooe="GetItemOutput",Noe="GetResourcePolicy",$oe="GetResourcePolicyInput",Moe="GetResourcePolicyOutput",lo="GlobalSecondaryIndexes",Loe="GlobalSecondaryIndexAutoScalingUpdate",koe="GlobalSecondaryIndexAutoScalingUpdateList",Foe="GlobalSecondaryIndexDescription",Boe="GlobalSecondaryIndexDescriptionList",Uoe="GlobalSecondaryIndexInfo",joe="GlobalSecondaryIndexList",DL="GlobalSecondaryIndexOverride",qoe="GlobalSecondaryIndexUpdate",Goe="GlobalSecondaryIndexUpdateList",RL="GlobalSecondaryIndexUpdates",Hoe="GlobalSecondaryIndexWarmThroughputDescription",Voe="GlobalSecondaryIndex",Woe="GlobalTable",zoe="GlobalTableArn",Koe="GlobalTableAlreadyExistsException",Yoe="GlobalTableBillingMode",Rm="GlobalTableDescription",PL="GlobalTableGlobalSecondaryIndexSettingsUpdate",Qoe="GlobalTableGlobalSecondaryIndexSettingsUpdateList",Xoe="GlobalTableList",Xo="GlobalTableName",Joe="GlobalTableNotFoundException",Zoe="GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate",eie="GlobalTableProvisionedWriteCapacityUnits",tie="GlobalTableStatus",rie="GlobalTableSourceArn",Pm="GlobalTableSettingsReplicationMode",nie="GlobalTableVersion",oie="GlobalTableWitnesses",iie="GlobalTableWitnessDescription",sie="GlobalTableWitnessDescriptionList",aie="GlobalTableWitnessGroupUpdate",cie="GlobalTableWitnessGroupUpdateList",uie="GlobalTableWitnessUpdates",lie="GlobalTables",die="HeaderList",Jo="Item",tT="ImportArn",OL="IndexArn",El="ItemCount",fie="ImportConflictException",pie="ItemCollectionKey",mie="ItemCollectionKeyAttributeMap",pc="ItemCollectionMetrics",hie="ItemCollectionMetricsMultiple",yie="ItemCollectionMetricsPerTable",gie="ItemCollectionSizeLimitExceededException",NL="InputCompressionType",_ie="InaccessibleEncryptionDateTime",Eie="InvalidEndpointException",rT="IncrementalExportSpecification",Sie="InvalidExportTimeException",nT="InputFormat",oT="InputFormatOptions",bie="ImportedItemCount",xie="ItemList",gt="IndexName",vie="ImportNotFoundException",Tie="IndexNotFoundException",wie="IdempotentParameterMismatchException",Aie="ItemResponse",Iie="ItemResponseList",Cie="InvalidRestoreTimeException",iT="IndexStatus",$L="IndexSizeBytes",Die="InternalServerError",ML="ImportSummaryList",Rie="ImportSummary",LL="ImportStatus",Pie="ImportTable",sT="ImportTableDescription",Oie="ImportTableInput",Nie="ImportTableOutput",aT="Items",fo="Key",$ie="KeysAndAttributes",kL="KeyConditions",Mie="KeyConditionExpression",FL="KinesisDataStreamDestinations",Lie="KinesisDataStreamDestination",kie="KeyList",Fie="KMSMasterKeyArn",Om="KMSMasterKeyId",fn="KeySchema",Bie="KinesisStreamingDestinationInput",Uie="KinesisStreamingDestinationOutput",jie="KeySchemaElement",qie="KeyType",Gie="Keys",mc="Limit",Hie="ListAttributeValue",Vie="ListBackups",Wie="ListBackupsInput",zie="ListBackupsOutput",Kie="ListContributorInsights",Yie="ListContributorInsightsInput",Qie="ListContributorInsightsOutput",Xie="LastDecreaseDateTime",Jie="ListExports",Zie="LastEvaluatedBackupArn",ese="LimitExceededException",tse="LastEvaluatedGlobalTableName",rse="ListExportsInput",cT="LastEvaluatedKey",nse="ListExportsOutput",ose="LastEvaluatedTableName",ise="ListGlobalTables",sse="ListGlobalTablesInput",ase="ListGlobalTablesOutput",cse="ListImports",use="LastIncreaseDateTime",lse="ListImportsInput",dse="ListImportsOutput",fse="LatestRestorableDateTime",pse="LatestStreamArn",Sl="LocalSecondaryIndexes",mse="LocalSecondaryIndexDescription",hse="LocalSecondaryIndexDescriptionList",yse="LocalSecondaryIndexInfo",gse="LocalSecondaryIndexList",BL="LocalSecondaryIndexOverride",_se="LocalSecondaryIndex",Ese="LatestStreamLabel",Sse="ListTables",bse="ListTablesInput",xse="ListTablesOutput",vse="ListTagsOfResource",Tse="ListTagsOfResourceInput",wse="ListTagsOfResourceOutput",UL="LastUpdateDateTime",Ase="LastUpdateToPayPerRequestDateTime",Ise="L",hc="Message",Cse="MapAttributeValue",jL="MaxResults",qL="MultiRegionConsistency",GL="MaxReadRequestUnits",HL="MinimumUnits",VL="MaximumUnits",Dse="MaxWriteRequestUnits",Rse="M",Pse="N",Ose="NonKeyAttributes",Nse="NumberOfDecreasesToday",$se="NS",po="NextToken",Mse="NULL",kn="OnDemandThroughput",Wi="OnDemandThroughputOverride",uT="Parameters",bl="ProjectionExpression",Lse="PutItem",kse="ProcessedItemCount",Fse="PutItemInput",Bse="PutItemInputAttributeMap",Use="PutItemOutput",WL="PointInTimeRecoveryDescription",jse="PointInTimeRecoveryEnabled",qse="PointInTimeRecoveryStatus",zL="PointInTimeRecoverySpecification",Gse="PointInTimeRecoveryUnavailableException",KL="PolicyName",Hse="PolicyNotFoundException",Vse="PartiQLBatchRequest",Wse="PartiQLBatchResponse",YL="PutRequest",QL="ProvisionedReadCapacityAutoScalingSettings",zse="ProvisionedReadCapacityAutoScalingSettingsUpdate",Kse="ProvisionedReadCapacityAutoScalingUpdate",XL="ProvisionedReadCapacityUnits",Yse="PutResourcePolicy",Qse="PutResourcePolicyInput",Xse="PutResourcePolicyOutput",Jse="PageSize",Zse="ProcessedSizeBytes",eae="PreparedStatementParameters",tae="ParameterizedStatement",rae="ParameterizedStatements",Fn="ProvisionedThroughput",nae="ProvisionedThroughputDescription",oae="ProvisionedThroughputExceededException",zi="ProvisionedThroughputOverride",iae="ProjectionType",JL="ProvisionedWriteCapacityAutoScalingSettings",sae="ProvisionedWriteCapacityAutoScalingSettingsUpdate",ZL="ProvisionedWriteCapacityAutoScalingUpdate",ek="ProvisionedWriteCapacityUnits",tk="Policy",Ki="Projection",rk="Put",aae="Query",cae="QueryFilter",uae="QueryInput",lae="QueryOutput",Nm="Responses",yc="ResourceArn",dae="ReplicaAlreadyExistsException",fae="ReplicaAutoScalingDescription",pae="ReplicaAutoScalingDescriptionList",mae="ReplicaAutoScalingUpdate",hae="ReplicaAutoScalingUpdateList",yae="ReplicaArn",gae="ReplicaBillingModeSummary",Jr="ReturnConsumedCapacity",xl="ReadCapacityUnits",_ae="ReplicaDescription",Eae="ReplicaDescriptionList",nk="RestoreDateTime",lT="ReplicationGroup",Sae="ReplicaGlobalSecondaryIndex",bae="ReplicaGlobalSecondaryIndexAutoScalingDescription",xae="ReplicaGlobalSecondaryIndexAutoScalingDescriptionList",vae="ReplicaGlobalSecondaryIndexAutoScalingUpdate",Tae="ReplicaGlobalSecondaryIndexAutoScalingUpdateList",wae="ReplicaGlobalSecondaryIndexDescription",Aae="ReplicaGlobalSecondaryIndexDescriptionList",Iae="ReplicaGlobalSecondaryIndexList",Cae="ReplicaGlobalSecondaryIndexSettings",Dae="ReplicaGlobalSecondaryIndexSettingsDescription",Rae="ReplicaGlobalSecondaryIndexSettingsDescriptionList",ok="ReplicaGlobalSecondaryIndexSettingsUpdate",Pae="ReplicaGlobalSecondaryIndexSettingsUpdateList",Oae="ReplicaGlobalSecondaryIndexUpdates",Nae="ReplicationGroupUpdate",$ae="ReplicationGroupUpdateList",ik="RequestItems",vl="ReturnItemCollectionMetrics",Mae="ReplicaInaccessibleDateTime",Lae="RestoreInProgress",kae="ResourceInUseException",dT="RevisionId",Fae="ReplicaList",Bae="RequestLimitExceeded",Ar="RegionName",Uae="ReplicaNotFoundException",jae="ResourceNotFoundException",qae="ResourcePolicy",sk="RecoveryPeriodInDays",ak="ReplicaProvisionedReadCapacityAutoScalingSettings",Gae="ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate",Hae="ReplicaProvisionedReadCapacityAutoScalingUpdate",ck="ReplicaProvisionedReadCapacityUnits",uk="ReplicaProvisionedWriteCapacityAutoScalingSettings",Vae="ReplicaProvisionedWriteCapacityUnits",lk="ReplicaSettings",Wae="ReplicaStatusDescription",zae="ReplicaSettingsDescriptionList",Kae="ReplicaSettingsDescription",Yae="ReplicaStatusPercentProgress",dk="ReplicaSettingsUpdate",Qae="ReplicaSettingsUpdateList",fT="ReplicaStatus",fk="RestoreSummary",Xae="ReplicaTableClass",pk="ReplicaTableClassSummary",Jae="RestoreTableFromBackup",Zae="RestoreTableFromBackupInput",ece="RestoreTableFromBackupOutput",tce="RestoreTableToPointInTime",rce="RestoreTableToPointInTimeInput",nce="RestoreTableToPointInTimeOutput",oce="ReplicaUpdate",ice="ReplicaUpdateList",pT="ReadUnitsPerSecond",mT="ReplicaUpdates",hT="ReturnValues",mo="ReturnValuesOnConditionCheckFailure",sce="ReplicatedWriteConflictException",ace="Replica",mk="Replicas",cce="Statements",Tl="StreamArn",yT="S3Bucket",uce="SourceBackupArn",gT="S3BucketOwner",$m="S3BucketSource",hk="ScannedCount",lce="StreamDescription",dce="StreamEnabled",fce="SizeEstimateRangeGB",pce="ScanFilter",mce="ScanInput",yk="ScaleInCooldown",hce="SecondaryIndexesCapacityMap",yce="ScanIndexForward",gce="S3KeyPrefix",_ce="ScanOutput",gk="ScaleOutCooldown",Ece="ScalingPolicies",Sce="ScalingPolicyUpdate",_k="S3Prefix",Mm="StreamSpecification",Ek="S3SseAlgorithm",_T="SSEDescription",Lm="SSESpecification",Sk="SSESpecificationOverride",bk="SSEType",xk="S3SseKmsKeyId",bce="SS",ET="StartTime",vk="SourceTableArn",Tk="SourceTableDetails",wk="SourceTableFeatureDetails",xce="SourceTableName",vce="StreamViewType",Tce="S",wce="Scan",Ak="Select",Ace="Segment",ST="Statement",bT="Status",Ik="Table",Zo="TableArn",Ice="TableAlreadyExistsException",xT="TableAutoScalingDescription",vT="TableClass",Cce="TableCreationDateTime",Dce="TransactionCanceledException",Rce="TransactionConflictException",Ck="TableClassOverride",TT="TableCreationParameters",Dk="TableClassSummary",gc="TableDescription",Pce="ThrottlingException",Oce="TransactGetItem",Nce="TransactGetItemsInput",$ce="TransactGetItemList",Mce="TransactGetItemsOutput",Lce="TransactGetItems",wl="TableId",kce="TransactionInProgressException",Fce="TableInUseException",Rk="TransactItems",Bce="TagKeys",Uce="TagList",jce="TableMaxReadCapacityUnits",qce="TableMaxWriteCapacityUnits",Ie="TableName",Gce="TableNotFoundException",Hce="TableNames",Pk="ThrottlingReasons",Vce="TagResourceInput",Wce="ThrottlingReasonList",zce="TimeRangeLowerBound",Kce="TimeRangeUpperBound",Yce="TagResource",Qce="ThrottlingReason",Xce="TransactStatements",Ok="TableSizeBytes",Nk="TableStatus",Jce="TotalSegments",wT="TimeToLiveDescription",Zce="TimeToLiveStatus",AT="TimeToLiveSpecification",$k="TargetTableName",Mk="TargetTrackingScalingPolicyConfiguration",Lk="TargetValue",eue="TransactWriteItem",tue="TransactWriteItemsInput",rue="TransactWriteItemList",nue="TransactWriteItemsOutput",oue="TransactWriteItems",iue="TableWarmThroughputDescription",IT="Tags",sue="Tag",km="Update",aue="UpdateContinuousBackups",cue="UpdateContinuousBackupsInput",uue="UpdateContinuousBackupsOutput",lue="UpdateContributorInsights",due="UpdateContributorInsightsInput",fue="UpdateContributorInsightsOutput",kk="UpdateExpression",pue="UpdateGlobalSecondaryIndexAction",mue="UpdateGlobalTable",hue="UpdateGlobalTableInput",yue="UpdateGlobalTableOutput",gue="UpdateGlobalTableSettings",_ue="UpdateGlobalTableSettingsInput",Eue="UpdateGlobalTableSettingsOutput",Sue="UnprocessedItems",bue="UpdateItemInput",xue="UpdateItemOutput",vue="UpdateItem",Tue="UnprocessedKeys",CT="UpdateKinesisStreamingConfiguration",wue="UpdateKinesisStreamingDestination",Aue="UpdateKinesisStreamingDestinationInput",Iue="UpdateKinesisStreamingDestinationOutput",Cue="UseLatestRestorableTime",Due="UntagResource",Rue="UpdateReplicationGroupMemberAction",Pue="UntagResourceInput",Oue="UpdateTable",Nue="UpdateTableInput",$ue="UpdateTableOutput",Mue="UpdateTableReplicaAutoScaling",Lue="UpdateTableReplicaAutoScalingInput",kue="UpdateTableReplicaAutoScalingOutput",Fue="UpdateTimeToLive",Bue="UpdateTimeToLiveInput",Uue="UpdateTimeToLiveOutput",DT="Value",Fm="WriteCapacityUnits",jue="WriteRequest",que="WriteRequests",Gue="WitnessStatus",ho="WarmThroughput",RT="WriteUnitsPerSecond",Hue="awsQueryError",ze="client",je="error",Fk="httpError",Vue="httpHeader",tt="message",Wue="reason",zue="resource",Bk="smithy.ts.sdk.synthetic.com.amazonaws.dynamodb",Kue="server",Yue="throttlingReasons",Que="x-amz-confirm-remove-self-resource-access",S="com.amazonaws.dynamodb",Uk=(We(),ie(Zu)),Xue=Tm(),qe=kv(),jk=Uk.TypeRegistry.for(Bk);u.DynamoDBServiceException$=[-3,Bk,"DynamoDBServiceException",0,[],[]];jk.registerError(u.DynamoDBServiceException$,Xue.DynamoDBServiceException);var Le=Uk.TypeRegistry.for(S);u.BackupInUseException$=[-3,S,ire,{[je]:ze},[tt],[0]];Le.registerError(u.BackupInUseException$,qe.BackupInUseException);u.BackupNotFoundException$=[-3,S,sre,{[je]:ze},[tt],[0]];Le.registerError(u.BackupNotFoundException$,qe.BackupNotFoundException);u.ConditionalCheckFailedException$=[-3,S,Tre,{[je]:ze},[tt,Jo],[0,()=>yo]];Le.registerError(u.ConditionalCheckFailedException$,qe.ConditionalCheckFailedException);u.ContinuousBackupsUnavailableException$=[-3,S,vre,{[je]:ze},[tt],[0]];Le.registerError(u.ContinuousBackupsUnavailableException$,qe.ContinuousBackupsUnavailableException);u.DuplicateItemException$=[-3,S,xne,{[je]:ze},[tt],[0]];Le.registerError(u.DuplicateItemException$,qe.DuplicateItemException);u.ExportConflictException$=[-3,S,ooe,{[je]:ze},[tt],[0]];Le.registerError(u.ExportConflictException$,qe.ExportConflictException);u.ExportNotFoundException$=[-3,S,loe,{[je]:ze},[tt],[0]];Le.registerError(u.ExportNotFoundException$,qe.ExportNotFoundException);u.GlobalTableAlreadyExistsException$=[-3,S,Koe,{[je]:ze},[tt],[0]];Le.registerError(u.GlobalTableAlreadyExistsException$,qe.GlobalTableAlreadyExistsException);u.GlobalTableNotFoundException$=[-3,S,Joe,{[je]:ze},[tt],[0]];Le.registerError(u.GlobalTableNotFoundException$,qe.GlobalTableNotFoundException);u.IdempotentParameterMismatchException$=[-3,S,wie,{[je]:ze},[hc],[0]];Le.registerError(u.IdempotentParameterMismatchException$,qe.IdempotentParameterMismatchException);u.ImportConflictException$=[-3,S,fie,{[je]:ze},[tt],[0]];Le.registerError(u.ImportConflictException$,qe.ImportConflictException);u.ImportNotFoundException$=[-3,S,vie,{[je]:ze},[tt],[0]];Le.registerError(u.ImportNotFoundException$,qe.ImportNotFoundException);u.IndexNotFoundException$=[-3,S,Tie,{[je]:ze},[tt],[0]];Le.registerError(u.IndexNotFoundException$,qe.IndexNotFoundException);u.InternalServerError$=[-3,S,Die,{[je]:Kue},[tt],[0]];Le.registerError(u.InternalServerError$,qe.InternalServerError);u.InvalidEndpointException$=[-3,S,Eie,{[je]:ze,[Fk]:421},[hc],[0]];Le.registerError(u.InvalidEndpointException$,qe.InvalidEndpointException);u.InvalidExportTimeException$=[-3,S,Sie,{[je]:ze},[tt],[0]];Le.registerError(u.InvalidExportTimeException$,qe.InvalidExportTimeException);u.InvalidRestoreTimeException$=[-3,S,Cie,{[je]:ze},[tt],[0]];Le.registerError(u.InvalidRestoreTimeException$,qe.InvalidRestoreTimeException);u.ItemCollectionSizeLimitExceededException$=[-3,S,gie,{[je]:ze},[tt],[0]];Le.registerError(u.ItemCollectionSizeLimitExceededException$,qe.ItemCollectionSizeLimitExceededException);u.LimitExceededException$=[-3,S,ese,{[je]:ze},[tt],[0]];Le.registerError(u.LimitExceededException$,qe.LimitExceededException);u.PointInTimeRecoveryUnavailableException$=[-3,S,Gse,{[je]:ze},[tt],[0]];Le.registerError(u.PointInTimeRecoveryUnavailableException$,qe.PointInTimeRecoveryUnavailableException);u.PolicyNotFoundException$=[-3,S,Hse,{[je]:ze},[tt],[0]];Le.registerError(u.PolicyNotFoundException$,qe.PolicyNotFoundException);u.ProvisionedThroughputExceededException$=[-3,S,oae,{[je]:ze},[tt,Pk],[0,()=>$T]];Le.registerError(u.ProvisionedThroughputExceededException$,qe.ProvisionedThroughputExceededException);u.ReplicaAlreadyExistsException$=[-3,S,dae,{[je]:ze},[tt],[0]];Le.registerError(u.ReplicaAlreadyExistsException$,qe.ReplicaAlreadyExistsException);u.ReplicaNotFoundException$=[-3,S,Uae,{[je]:ze},[tt],[0]];Le.registerError(u.ReplicaNotFoundException$,qe.ReplicaNotFoundException);u.ReplicatedWriteConflictException$=[-3,S,sce,{[je]:ze},[tt],[0]];Le.registerError(u.ReplicatedWriteConflictException$,qe.ReplicatedWriteConflictException);u.RequestLimitExceeded$=[-3,S,Bae,{[je]:ze},[tt,Pk],[0,()=>$T]];Le.registerError(u.RequestLimitExceeded$,qe.RequestLimitExceeded);u.ResourceInUseException$=[-3,S,kae,{[je]:ze},[tt],[0]];Le.registerError(u.ResourceInUseException$,qe.ResourceInUseException);u.ResourceNotFoundException$=[-3,S,jae,{[je]:ze},[tt],[0]];Le.registerError(u.ResourceNotFoundException$,qe.ResourceNotFoundException);u.TableAlreadyExistsException$=[-3,S,Ice,{[je]:ze},[tt],[0]];Le.registerError(u.TableAlreadyExistsException$,qe.TableAlreadyExistsException);u.TableInUseException$=[-3,S,Fce,{[je]:ze},[tt],[0]];Le.registerError(u.TableInUseException$,qe.TableInUseException);u.TableNotFoundException$=[-3,S,Gce,{[je]:ze},[tt],[0]];Le.registerError(u.TableNotFoundException$,qe.TableNotFoundException);u.ThrottlingException$=[-3,S,Pce,{[Hue]:["Throttling",400],[je]:ze,[Fk]:400},[tt,Yue],[0,()=>$T]];Le.registerError(u.ThrottlingException$,qe.ThrottlingException);u.TransactionCanceledException$=[-3,S,Dce,{[je]:ze},[hc,Lre],[0,()=>ele]];Le.registerError(u.TransactionCanceledException$,qe.TransactionCanceledException);u.TransactionConflictException$=[-3,S,Rce,{[je]:ze},[tt],[0]];Le.registerError(u.TransactionConflictException$,qe.TransactionConflictException);u.TransactionInProgressException$=[-3,S,kce,{[je]:ze},[hc],[0]];Le.registerError(u.TransactionInProgressException$,qe.TransactionInProgressException);u.errorTypeRegistries=[jk,Le];u.ArchivalSummary$=[3,S,KM,0,[$te,Fte,Ote],[4,0,0]];u.AttributeDefinition$=[3,S,Nte,0,[wm,Wte],[0,0],2];u.AttributeValueUpdate$=[3,S,Kte,0,[DT,Pte],[()=>u.AttributeValue$,0]];u.AutoScalingPolicyDescription$=[3,S,Bte,0,[KL,Mk],[0,()=>u.AutoScalingTargetTrackingScalingPolicyConfigurationDescription$]];u.AutoScalingPolicyUpdate$=[3,S,jte,0,[Mk,KL],[()=>u.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate$,0],1];u.AutoScalingSettingsDescription$=[3,S,qte,0,[HL,VL,YM,QM,Ece],[1,1,2,0,()=>Jue]];u.AutoScalingSettingsUpdate$=[3,S,Gte,0,[HL,VL,YM,QM,Sce],[1,1,2,0,()=>u.AutoScalingPolicyUpdate$]];u.AutoScalingTargetTrackingScalingPolicyConfigurationDescription$=[3,S,Hte,0,[Lk,hL,yk,gk],[1,2,1,1],1];u.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate$=[3,S,Vte,0,[Lk,hL,yk,gk],[1,2,1,1],1];u.BackupDescription$=[3,S,jv,0,[qv,Tk,wk],[()=>u.BackupDetails$,()=>u.SourceTableDetails$,()=>u.SourceTableFeatureDetails$]];u.BackupDetails$=[3,S,qv,0,[yl,Gv,rL,Hv,JM,nL,ZM],[0,0,0,0,4,1,4],5];u.BackupSummary$=[3,S,pre,0,[Ie,wl,Zo,yl,Gv,JM,ZM,rL,Hv,nL],[0,0,0,0,0,4,4,0,0,1]];u.BatchExecuteStatementInput$=[3,S,Jte,0,[cce,Jr],[()=>Sle,0],1];u.BatchExecuteStatementOutput$=[3,S,Zte,0,[Nm,Mr],[()=>ble,()=>_c]];u.BatchGetItemInput$=[3,S,tre,0,[ik,Jr],[()=>Yk,0],1];u.BatchGetItemOutput$=[3,S,rre,0,[Nm,Tue,Mr],[()=>Lle,()=>Yk,()=>_c]];u.BatchStatementError$=[3,S,ure,0,[iL,hc,Jo],[0,0,()=>yo]];u.BatchStatementRequest$=[3,S,lre,0,[ST,uT,dc,mo],[0,()=>OT,2,0],1];u.BatchStatementResponse$=[3,S,dre,0,[Zne,Ie,Jo],[()=>u.BatchStatementError$,0,()=>yo]];u.BatchWriteItemInput$=[3,S,hre,0,[ik,Jr,vl],[()=>Qk,0,0],1];u.BatchWriteItemOutput$=[3,S,yre,0,[Sue,pc,Mr],[()=>Qk,()=>Jk,()=>_c]];u.BillingModeSummary$=[3,S,tL,0,[gl,Ase],[0,4]];u.CancellationReason$=[3,S,jre,0,[Jo,iL,hc],[()=>yo,0,0]];u.Capacity$=[3,S,Vre,0,[xl,Fm,dL],[1,1,1]];u.Condition$=[3,S,Wre,0,[uL,Bv],[0,()=>Gk],1];u.ConditionCheck$=[3,S,sL,0,[fo,Ie,ra,dn,Qo,mo],[()=>Lr,0,0,128,()=>ei,0],3];u.ConsumedCapacity$=[3,S,Mr,0,[Ie,dL,xl,Fm,Ik,Sl,lo],[0,1,1,1,()=>u.Capacity$,()=>zM,()=>zM]];u.ContinuousBackupsDescription$=[3,S,Vv,0,[xre,WL],[0,()=>u.PointInTimeRecoveryDescription$],1];u.ContributorInsightsSummary$=[3,S,Nre,0,[Ie,gt,Wv,Im],[0,0,0,0]];u.CreateBackupInput$=[3,S,Sre,0,[Ie,Gv],[0,0],2];u.CreateBackupOutput$=[3,S,bre,0,[qv],[()=>u.BackupDetails$]];u.CreateGlobalSecondaryIndexAction$=[3,S,Are,0,[gt,fn,Ki,Fn,kn,ho],[0,()=>Bn,()=>u.Projection$,()=>u.ProvisionedThroughput$,()=>u.OnDemandThroughput$,()=>u.WarmThroughput$],3];u.CreateGlobalTableInput$=[3,S,Cre,0,[Xo,lT],[0,()=>zk],2];u.CreateGlobalTableOutput$=[3,S,Dre,0,[Rm],[()=>u.GlobalTableDescription$]];u.CreateGlobalTableWitnessGroupMemberAction$=[3,S,Rre,0,[Ar],[0],1];u.CreateReplicaAction$=[3,S,kre,0,[Ar],[0],1];u.CreateReplicationGroupMemberAction$=[3,S,Fre,0,[Ar,Om,zi,Wi,lo,Ck],[0,0,()=>u.ProvisionedThroughputOverride$,()=>u.OnDemandThroughputOverride$,()=>Wk,0],1];u.CreateTableInput$=[3,S,qre,0,[Ie,hl,fn,Sl,lo,gl,Fn,Mm,Lm,IT,vT,zv,ho,qae,kn,rie,Pm],[0,()=>Bm,()=>Bn,()=>PT,()=>Um,0,()=>u.ProvisionedThroughput$,()=>u.StreamSpecification$,()=>u.SSESpecification$,()=>NT,0,2,()=>u.WarmThroughput$,0,()=>u.OnDemandThroughput$,0,0],1];u.CreateTableOutput$=[3,S,Gre,0,[gc],[()=>u.TableDescription$]];u.CsvOptions$=[3,S,$re,0,[Kre,die],[0,64]];u.Delete$=[3,S,fc,0,[fo,Ie,ra,dn,Qo,mo],[()=>Lr,0,0,128,()=>ei,0],2];u.DeleteBackupInput$=[3,S,Qre,0,[yl],[0],1];u.DeleteBackupOutput$=[3,S,Jre,0,[jv],[()=>u.BackupDescription$]];u.DeleteGlobalSecondaryIndexAction$=[3,S,pne,0,[gt],[0],1];u.DeleteGlobalTableWitnessGroupMemberAction$=[3,S,Sne,0,[Ar],[0],1];u.DeleteItemInput$=[3,S,vne,0,[Ie,fo,eT,_l,hT,Jr,vl,ra,dn,Qo,mo],[0,()=>Lr,()=>MT,0,0,0,0,0,128,()=>ei,0],2];u.DeleteItemOutput$=[3,S,wne,0,[Uv,Mr,pc],[()=>yo,()=>u.ConsumedCapacity$,()=>u.ItemCollectionMetrics$]];u.DeleteReplicaAction$=[3,S,Mne,0,[Ar],[0],1];u.DeleteReplicationGroupMemberAction$=[3,S,Lne,0,[Ar],[0],1];u.DeleteRequest$=[3,S,mL,0,[fo],[()=>Lr],1];u.DeleteResourcePolicyInput$=[3,S,Fne,0,[yc,gL],[0,0],1];u.DeleteResourcePolicyOutput$=[3,S,Bne,0,[dT],[0]];u.DeleteTableInput$=[3,S,qne,0,[Ie],[0],1];u.DeleteTableOutput$=[3,S,Hne,0,[gc],[()=>u.TableDescription$]];u.DescribeBackupInput$=[3,S,Xre,0,[yl],[0],1];u.DescribeBackupOutput$=[3,S,Zre,0,[jv],[()=>u.BackupDescription$]];u.DescribeContinuousBackupsInput$=[3,S,rne,0,[Ie],[0],1];u.DescribeContinuousBackupsOutput$=[3,S,nne,0,[Vv],[()=>u.ContinuousBackupsDescription$]];u.DescribeContributorInsightsInput$=[3,S,ine,0,[Ie,gt],[0,0],1];u.DescribeContributorInsightsOutput$=[3,S,sne,0,[Ie,gt,Ore,Wv,UL,wL,Im],[0,0,64,0,4,()=>u.FailureException$,0]];u.DescribeEndpointsRequest$=[3,S,lne,0,[],[]];u.DescribeEndpointsResponse$=[3,S,dne,0,[xL],[()=>rle],1];u.DescribeExportInput$=[3,S,cne,0,[Yv],[0],1];u.DescribeExportOutput$=[3,S,une,0,[Qv],[()=>u.ExportDescription$]];u.DescribeGlobalTableInput$=[3,S,hne,0,[Xo],[0],1];u.DescribeGlobalTableOutput$=[3,S,yne,0,[Rm],[()=>u.GlobalTableDescription$]];u.DescribeGlobalTableSettingsInput$=[3,S,_ne,0,[Xo],[0],1];u.DescribeGlobalTableSettingsOutput$=[3,S,Ene,0,[Xo,lk],[0,()=>Kk]];u.DescribeImportInput$=[3,S,Tne,0,[tT],[0],1];u.DescribeImportOutput$=[3,S,Ane,0,[sT],[()=>u.ImportTableDescription$],1];u.DescribeKinesisStreamingDestinationInput$=[3,S,Dne,0,[Ie],[0],1];u.DescribeKinesisStreamingDestinationOutput$=[3,S,Rne,0,[Ie,FL],[0,()=>hle]];u.DescribeLimitsInput$=[3,S,Nne,0,[],[]];u.DescribeLimitsOutput$=[3,S,$ne,0,[Lte,kte,jce,qce],[1,1,1,1]];u.DescribeTableInput$=[3,S,Gne,0,[Ie],[0],1];u.DescribeTableOutput$=[3,S,Vne,0,[Ik],[()=>u.TableDescription$]];u.DescribeTableReplicaAutoScalingInput$=[3,S,zne,0,[Ie],[0],1];u.DescribeTableReplicaAutoScalingOutput$=[3,S,Kne,0,[xT],[()=>u.TableAutoScalingDescription$]];u.DescribeTimeToLiveInput$=[3,S,Qne,0,[Ie],[0],1];u.DescribeTimeToLiveOutput$=[3,S,Xne,0,[wT],[()=>u.TimeToLiveDescription$]];u.EnableKinesisStreamingConfiguration$=[3,S,Xv,0,[Fv],[0]];u.Endpoint$=[3,S,Ioe,0,[Yte,Mre],[0,1],2];u.ExecuteStatementInput$=[3,S,moe,0,[ST,uT,dc,po,Jr,mc,mo],[0,()=>OT,2,0,0,1,0],1];u.ExecuteStatementOutput$=[3,S,hoe,0,[aT,po,Mr,cT],[()=>jm,0,()=>u.ConsumedCapacity$,()=>Lr]];u.ExecuteTransactionInput$=[3,S,Eoe,0,[Xce,lL,Jr],[()=>Ele,[0,4],0],1];u.ExecuteTransactionOutput$=[3,S,Soe,0,[Nm,Mr],[()=>Hk,()=>_c]];u.ExpectedAttributeValue$=[3,S,roe,0,[DT,Coe,uL,Bv],[()=>u.AttributeValue$,2,0,()=>Gk]];u.ExportDescription$=[3,S,Qv,0,[Yv,_L,ET,Jv,coe,Zo,wl,bL,Cm,yT,gT,_k,Ek,xk,TL,IL,yL,cre,El,Zv,rT],[0,0,4,4,0,0,0,4,0,0,0,0,0,0,0,0,0,1,1,0,()=>u.IncrementalExportSpecification$]];u.ExportSummary$=[3,S,goe,0,[Yv,_L,Zv],[0,0,0]];u.ExportTableToPointInTimeInput$=[3,S,voe,0,[Zo,yT,bL,Cm,gT,_k,Ek,xk,yL,Zv,rT],[0,0,4,[0,4],0,0,0,0,0,0,()=>u.IncrementalExportSpecification$],2];u.ExportTableToPointInTimeOutput$=[3,S,Toe,0,[Qv],[()=>u.ExportDescription$]];u.FailureException$=[3,S,wL,0,[uoe,ioe],[0,0]];u.Get$=[3,S,CL,0,[fo,Ie,bl,dn],[()=>Lr,0,0,128],2];u.GetItemInput$=[3,S,Poe,0,[Ie,fo,Am,dc,Jr,bl,dn],[0,()=>Lr,64,2,0,0,128],2];u.GetItemOutput$=[3,S,Ooe,0,[Jo,Mr],[()=>yo,()=>u.ConsumedCapacity$]];u.GetResourcePolicyInput$=[3,S,$oe,0,[yc],[0],1];u.GetResourcePolicyOutput$=[3,S,Moe,0,[tk,dT],[0,0]];u.GlobalSecondaryIndex$=[3,S,Voe,0,[gt,fn,Ki,Fn,kn,ho],[0,()=>Bn,()=>u.Projection$,()=>u.ProvisionedThroughput$,()=>u.OnDemandThroughput$,()=>u.WarmThroughput$],3];u.GlobalSecondaryIndexAutoScalingUpdate$=[3,S,Loe,0,[gt,ZL],[0,()=>u.AutoScalingSettingsUpdate$]];u.GlobalSecondaryIndexDescription$=[3,S,Foe,0,[gt,fn,Ki,iT,Qte,Fn,$L,El,OL,kn,ho],[0,()=>Bn,()=>u.Projection$,0,2,()=>u.ProvisionedThroughputDescription$,1,1,0,()=>u.OnDemandThroughput$,()=>u.GlobalSecondaryIndexWarmThroughputDescription$]];u.GlobalSecondaryIndexInfo$=[3,S,Uoe,0,[gt,fn,Ki,Fn,kn],[0,()=>Bn,()=>u.Projection$,()=>u.ProvisionedThroughput$,()=>u.OnDemandThroughput$]];u.GlobalSecondaryIndexUpdate$=[3,S,qoe,0,[km,Dm,fc],[()=>u.UpdateGlobalSecondaryIndexAction$,()=>u.CreateGlobalSecondaryIndexAction$,()=>u.DeleteGlobalSecondaryIndexAction$]];u.GlobalSecondaryIndexWarmThroughputDescription$=[3,S,Hoe,0,[pT,RT,bT],[1,1,0]];u.GlobalTable$=[3,S,Woe,0,[Xo,lT],[0,()=>zk]];u.GlobalTableDescription$=[3,S,Rm,0,[lT,zoe,aL,tie,Xo],[()=>Vk,0,4,0,0]];u.GlobalTableGlobalSecondaryIndexSettingsUpdate$=[3,S,PL,0,[gt,ek,sae],[0,1,()=>u.AutoScalingSettingsUpdate$],1];u.GlobalTableWitnessDescription$=[3,S,iie,0,[Ar,Gue],[0,0]];u.GlobalTableWitnessGroupUpdate$=[3,S,aie,0,[Dm,fc],[()=>u.CreateGlobalTableWitnessGroupMemberAction$,()=>u.DeleteGlobalTableWitnessGroupMemberAction$]];u.ImportSummary$=[3,S,Rie,0,[tT,LL,Zo,$m,fL,nT,ET,Jv],[0,0,0,()=>u.S3BucketSource$,0,0,4,4]];u.ImportTableDescription$=[3,S,sT,0,[tT,LL,Zo,wl,Cm,$m,noe,fL,nT,oT,NL,TT,ET,Jv,Zse,kse,bie,TL,IL],[0,0,0,0,0,()=>u.S3BucketSource$,1,0,0,()=>u.InputFormatOptions$,0,()=>u.TableCreationParameters$,4,4,1,1,1,0,0]];u.ImportTableInput$=[3,S,Oie,0,[$m,nT,TT,Cm,oT,NL],[()=>u.S3BucketSource$,0,()=>u.TableCreationParameters$,[0,4],()=>u.InputFormatOptions$,0],3];u.ImportTableOutput$=[3,S,Nie,0,[sT],[()=>u.ImportTableDescription$],1];u.IncrementalExportSpecification$=[3,S,rT,0,[soe,boe,Aoe],[4,4,0]];u.InputFormatOptions$=[3,S,oT,0,[zre],[()=>u.CsvOptions$]];u.ItemCollectionMetrics$=[3,S,pc,0,[pie,fce],[()=>kle,65]];u.ItemResponse$=[3,S,Aie,0,[Jo],[()=>yo]];u.KeysAndAttributes$=[3,S,$ie,0,[Gie,Am,dc,bl,dn],[()=>mle,64,2,0,128],1];u.KeySchemaElement$=[3,S,jie,0,[wm,qie],[0,0],2];u.KinesisDataStreamDestination$=[3,S,Lie,0,[Tl,Kv,Une,Fv],[0,0,0,0]];u.KinesisStreamingDestinationInput$=[3,S,Bie,0,[Ie,Tl,Xv],[0,0,()=>u.EnableKinesisStreamingConfiguration$],2];u.KinesisStreamingDestinationOutput$=[3,S,Uie,0,[Ie,Tl,Kv,Xv],[0,0,0,()=>u.EnableKinesisStreamingConfiguration$]];u.ListBackupsInput$=[3,S,Wie,0,[Ie,mc,zce,Kce,foe,Hv],[0,1,4,4,0,0]];u.ListBackupsOutput$=[3,S,zie,0,[oL,Zie],[()=>Zue,0]];u.ListContributorInsightsInput$=[3,S,Yie,0,[Ie,po,jL],[0,0,1]];u.ListContributorInsightsOutput$=[3,S,Qie,0,[cL,po],[()=>tle,0]];u.ListExportsInput$=[3,S,rse,0,[Zo,jL,po],[0,1,0]];u.ListExportsOutput$=[3,S,nse,0,[SL,po],[()=>nle,0]];u.ListGlobalTablesInput$=[3,S,sse,0,[poe,mc,Ar],[0,1,0]];u.ListGlobalTablesOutput$=[3,S,ase,0,[lie,tse],[()=>ule,0]];u.ListImportsInput$=[3,S,lse,0,[Zo,Jse,po],[0,1,0]];u.ListImportsOutput$=[3,S,dse,0,[ML,po],[()=>fle,0]];u.ListTablesInput$=[3,S,bse,0,[yoe,mc],[0,1]];u.ListTablesOutput$=[3,S,xse,0,[Hce,ose],[64,0]];u.ListTagsOfResourceInput$=[3,S,Tse,0,[yc,po],[0,0],1];u.ListTagsOfResourceOutput$=[3,S,wse,0,[IT,po],[()=>NT,0]];u.LocalSecondaryIndex$=[3,S,_se,0,[gt,fn,Ki],[0,()=>Bn,()=>u.Projection$],3];u.LocalSecondaryIndexDescription$=[3,S,mse,0,[gt,fn,Ki,$L,El,OL],[0,()=>Bn,()=>u.Projection$,1,1,0]];u.LocalSecondaryIndexInfo$=[3,S,yse,0,[gt,fn,Ki],[0,()=>Bn,()=>u.Projection$]];u.OnDemandThroughput$=[3,S,kn,0,[GL,Dse],[1,1]];u.OnDemandThroughputOverride$=[3,S,Wi,0,[GL],[1]];u.ParameterizedStatement$=[3,S,tae,0,[ST,uT,mo],[0,()=>OT,0],1];u.PointInTimeRecoveryDescription$=[3,S,WL,0,[qse,sk,doe,fse],[0,1,4,4]];u.PointInTimeRecoverySpecification$=[3,S,zL,0,[jse,sk],[2,1],1];u.Projection$=[3,S,Ki,0,[iae,Ose],[0,64]];u.ProvisionedThroughput$=[3,S,Fn,0,[xl,Fm],[1,1],2];u.ProvisionedThroughputDescription$=[3,S,nae,0,[use,Xie,Nse,xl,Fm],[4,4,1,1,1]];u.ProvisionedThroughputOverride$=[3,S,zi,0,[xl],[1]];u.Put$=[3,S,rk,0,[Jo,Ie,ra,dn,Qo,mo],[()=>LT,0,0,128,()=>ei,0],2];u.PutItemInput$=[3,S,Fse,0,[Ie,Jo,eT,hT,Jr,vl,_l,ra,dn,Qo,mo],[0,()=>LT,()=>MT,0,0,0,0,0,128,()=>ei,0],2];u.PutItemOutput$=[3,S,Use,0,[Uv,Mr,pc],[()=>yo,()=>u.ConsumedCapacity$,()=>u.ItemCollectionMetrics$]];u.PutRequest$=[3,S,YL,0,[Jo],[()=>LT],1];u.PutResourcePolicyInput$=[3,S,Qse,0,[yc,tk,gL,Ure],[0,0,0,[2,{[Vue]:Que}]],2];u.PutResourcePolicyOutput$=[3,S,Xse,0,[dT],[0]];u.QueryInput$=[3,S,uae,0,[Ie,gt,Ak,Am,mc,dc,kL,cae,_l,yce,EL,Jr,bl,AL,Mie,dn,Qo],[0,0,0,64,1,2,()=>Fle,()=>Xk,0,2,()=>Lr,0,0,0,0,128,()=>ei],1];u.QueryOutput$=[3,S,lae,0,[aT,pL,hk,cT,Mr],[()=>jm,1,1,()=>Lr,()=>u.ConsumedCapacity$]];u.Replica$=[3,S,ace,0,[Ar],[0]];u.ReplicaAutoScalingDescription$=[3,S,fae,0,[Ar,lo,ak,uk,fT],[0,()=>Tle,()=>u.AutoScalingSettingsDescription$,()=>u.AutoScalingSettingsDescription$,0]];u.ReplicaAutoScalingUpdate$=[3,S,mae,0,[Ar,Oae,Hae],[0,()=>wle,()=>u.AutoScalingSettingsUpdate$],1];u.ReplicaDescription$=[3,S,_ae,0,[Ar,fT,yae,Wae,Yae,Om,zi,Wi,ho,lo,Mae,pk,Pm],[0,0,0,0,0,0,()=>u.ProvisionedThroughputOverride$,()=>u.OnDemandThroughputOverride$,()=>u.TableWarmThroughputDescription$,()=>Ale,4,()=>u.TableClassSummary$,0]];u.ReplicaGlobalSecondaryIndex$=[3,S,Sae,0,[gt,zi,Wi],[0,()=>u.ProvisionedThroughputOverride$,()=>u.OnDemandThroughputOverride$],1];u.ReplicaGlobalSecondaryIndexAutoScalingDescription$=[3,S,bae,0,[gt,iT,QL,JL],[0,0,()=>u.AutoScalingSettingsDescription$,()=>u.AutoScalingSettingsDescription$]];u.ReplicaGlobalSecondaryIndexAutoScalingUpdate$=[3,S,vae,0,[gt,Kse],[0,()=>u.AutoScalingSettingsUpdate$]];u.ReplicaGlobalSecondaryIndexDescription$=[3,S,wae,0,[gt,zi,Wi,ho],[0,()=>u.ProvisionedThroughputOverride$,()=>u.OnDemandThroughputOverride$,()=>u.GlobalSecondaryIndexWarmThroughputDescription$]];u.ReplicaGlobalSecondaryIndexSettingsDescription$=[3,S,Dae,0,[gt,iT,XL,QL,ek,JL],[0,0,1,()=>u.AutoScalingSettingsDescription$,1,()=>u.AutoScalingSettingsDescription$],1];u.ReplicaGlobalSecondaryIndexSettingsUpdate$=[3,S,ok,0,[gt,XL,zse],[0,1,()=>u.AutoScalingSettingsUpdate$],1];u.ReplicaSettingsDescription$=[3,S,Kae,0,[Ar,fT,gae,ck,ak,Vae,uk,Cae,pk],[0,0,()=>u.BillingModeSummary$,1,()=>u.AutoScalingSettingsDescription$,1,()=>u.AutoScalingSettingsDescription$,()=>Ile,()=>u.TableClassSummary$],1];u.ReplicaSettingsUpdate$=[3,S,dk,0,[Ar,ck,Gae,ok,Xae],[0,1,()=>u.AutoScalingSettingsUpdate$,()=>Cle,0],1];u.ReplicationGroupUpdate$=[3,S,Nae,0,[Dm,km,fc],[()=>u.CreateReplicationGroupMemberAction$,()=>u.UpdateReplicationGroupMemberAction$,()=>u.DeleteReplicationGroupMemberAction$]];u.ReplicaUpdate$=[3,S,oce,0,[Dm,fc],[()=>u.CreateReplicaAction$,()=>u.DeleteReplicaAction$]];u.RestoreSummary$=[3,S,fk,0,[nk,Lae,uce,vk],[4,2,0,0],2];u.RestoreTableFromBackupInput$=[3,S,Zae,0,[$k,yl,eL,DL,BL,zi,Wi,Sk],[0,0,0,()=>Um,()=>PT,()=>u.ProvisionedThroughput$,()=>u.OnDemandThroughput$,()=>u.SSESpecification$],2];u.RestoreTableFromBackupOutput$=[3,S,ece,0,[gc],[()=>u.TableDescription$]];u.RestoreTableToPointInTimeInput$=[3,S,rce,0,[$k,vk,xce,Cue,nk,eL,DL,BL,zi,Wi,Sk],[0,0,0,2,4,0,()=>Um,()=>PT,()=>u.ProvisionedThroughput$,()=>u.OnDemandThroughput$,()=>u.SSESpecification$],1];u.RestoreTableToPointInTimeOutput$=[3,S,nce,0,[gc],[()=>u.TableDescription$]];u.S3BucketSource$=[3,S,$m,0,[yT,gT,gce],[0,0,0],1];u.ScanInput$=[3,S,mce,0,[Ie,gt,Am,mc,Ak,pce,_l,EL,Jr,Jce,Ace,bl,AL,dn,Qo,dc],[0,0,64,1,0,()=>Xk,0,()=>Lr,0,1,1,0,0,128,()=>ei,2],1];u.ScanOutput$=[3,S,_ce,0,[aT,pL,hk,cT,Mr],[()=>jm,1,1,()=>Lr,()=>u.ConsumedCapacity$]];u.SourceTableDetails$=[3,S,Tk,0,[Ie,wl,fn,Cce,Fn,Zo,Ok,kn,El,gl],[0,0,()=>Bn,4,()=>u.ProvisionedThroughput$,0,1,()=>u.OnDemandThroughput$,1,0],5];u.SourceTableFeatureDetails$=[3,S,wk,0,[Sl,lo,lce,wT,_T],[()=>_le,()=>sle,()=>u.StreamSpecification$,()=>u.TimeToLiveDescription$,()=>u.SSEDescription$]];u.SSEDescription$=[3,S,_T,0,[bT,bk,Fie,_ie],[0,0,0,4]];u.SSESpecification$=[3,S,Lm,0,[vL,bk,Om],[2,0,0]];u.StreamSpecification$=[3,S,Mm,0,[dce,vce],[2,0],1];u.TableAutoScalingDescription$=[3,S,xT,0,[Ie,Nk,mk],[0,0,()=>xle]];u.TableClassSummary$=[3,S,Dk,0,[vT,UL],[0,4]];u.TableCreationParameters$=[3,S,TT,0,[Ie,hl,fn,gl,Fn,kn,Lm,lo],[0,()=>Bm,()=>Bn,0,()=>u.ProvisionedThroughput$,()=>u.OnDemandThroughput$,()=>u.SSESpecification$,()=>Um],3];u.TableDescription$=[3,S,gc,0,[hl,Ie,fn,Nk,aL,Fn,Ok,El,Zo,wl,tL,Sl,lo,Mm,Ese,pse,nie,mk,oie,Pm,fk,_T,KM,Dk,zv,kn,ho,qL],[()=>Bm,0,()=>Bn,0,4,()=>u.ProvisionedThroughputDescription$,1,1,0,0,()=>u.BillingModeSummary$,()=>gle,()=>ile,()=>u.StreamSpecification$,0,0,0,()=>Vk,()=>lle,0,()=>u.RestoreSummary$,()=>u.SSEDescription$,()=>u.ArchivalSummary$,()=>u.TableClassSummary$,2,()=>u.OnDemandThroughput$,()=>u.TableWarmThroughputDescription$,0]];u.TableWarmThroughputDescription$=[3,S,iue,0,[pT,RT,bT],[1,1,0]];u.Tag$=[3,S,sue,0,[fo,DT],[0,0],2];u.TagResourceInput$=[3,S,Vce,0,[yc,IT],[0,()=>NT],2];u.ThrottlingReason$=[3,S,Qce,0,[Wue,zue],[0,0]];u.TimeToLiveDescription$=[3,S,wT,0,[Zce,wm],[0,0]];u.TimeToLiveSpecification$=[3,S,AT,0,[vL,wm],[2,0],2];u.TransactGetItem$=[3,S,Oce,0,[CL],[()=>u.Get$],1];u.TransactGetItemsInput$=[3,S,Nce,0,[Rk,Jr],[()=>Ole,0],1];u.TransactGetItemsOutput$=[3,S,Mce,0,[Mr,Nm],[()=>_c,()=>Hk]];u.TransactWriteItem$=[3,S,eue,0,[sL,rk,fc,km],[()=>u.ConditionCheck$,()=>u.Put$,()=>u.Delete$,()=>u.Update$]];u.TransactWriteItemsInput$=[3,S,tue,0,[Rk,Jr,vl,lL],[()=>Nle,0,0,[0,4]],1];u.TransactWriteItemsOutput$=[3,S,nue,0,[Mr,pc],[()=>_c,()=>Jk]];u.UntagResourceInput$=[3,S,Pue,0,[yc,Bce],[0,64],2];u.Update$=[3,S,km,0,[fo,kk,Ie,ra,dn,Qo,mo],[()=>Lr,0,0,0,128,()=>ei,0],3];u.UpdateContinuousBackupsInput$=[3,S,cue,0,[Ie,zL],[0,()=>u.PointInTimeRecoverySpecification$],2];u.UpdateContinuousBackupsOutput$=[3,S,uue,0,[Vv],[()=>u.ContinuousBackupsDescription$]];u.UpdateContributorInsightsInput$=[3,S,due,0,[Ie,Pre,gt,Im],[0,0,0,0],2];u.UpdateContributorInsightsOutput$=[3,S,fue,0,[Ie,gt,Wv,Im],[0,0,0,0]];u.UpdateGlobalSecondaryIndexAction$=[3,S,pue,0,[gt,Fn,kn,ho],[0,()=>u.ProvisionedThroughput$,()=>u.OnDemandThroughput$,()=>u.WarmThroughput$],1];u.UpdateGlobalTableInput$=[3,S,hue,0,[Xo,mT],[0,()=>Ple],2];u.UpdateGlobalTableOutput$=[3,S,yue,0,[Rm],[()=>u.GlobalTableDescription$]];u.UpdateGlobalTableSettingsInput$=[3,S,_ue,0,[Xo,Yoe,eie,Zoe,PL,dk],[0,0,1,()=>u.AutoScalingSettingsUpdate$,()=>cle,()=>Dle],1];u.UpdateGlobalTableSettingsOutput$=[3,S,Eue,0,[Xo,lk],[0,()=>Kk]];u.UpdateItemInput$=[3,S,bue,0,[Ie,fo,XM,eT,_l,hT,Jr,vl,kk,ra,dn,Qo,mo],[0,()=>Lr,()=>Mle,()=>MT,0,0,0,0,0,0,128,()=>ei,0],2];u.UpdateItemOutput$=[3,S,xue,0,[Uv,Mr,pc],[()=>yo,()=>u.ConsumedCapacity$,()=>u.ItemCollectionMetrics$]];u.UpdateKinesisStreamingConfiguration$=[3,S,CT,0,[Fv],[0]];u.UpdateKinesisStreamingDestinationInput$=[3,S,Aue,0,[Ie,Tl,CT],[0,0,()=>u.UpdateKinesisStreamingConfiguration$],2];u.UpdateKinesisStreamingDestinationOutput$=[3,S,Iue,0,[Ie,Tl,Kv,CT],[0,0,0,()=>u.UpdateKinesisStreamingConfiguration$]];u.UpdateReplicationGroupMemberAction$=[3,S,Rue,0,[Ar,Om,zi,Wi,lo,Ck],[0,0,()=>u.ProvisionedThroughputOverride$,()=>u.OnDemandThroughputOverride$,()=>Wk,0],1];u.UpdateTableInput$=[3,S,Nue,0,[Ie,hl,gl,Fn,RL,Mm,Lm,mT,vT,zv,qL,uie,kn,ho,Pm],[0,()=>Bm,0,()=>u.ProvisionedThroughput$,()=>ale,()=>u.StreamSpecification$,()=>u.SSESpecification$,()=>Rle,0,2,0,()=>dle,()=>u.OnDemandThroughput$,()=>u.WarmThroughput$,0],1];u.UpdateTableOutput$=[3,S,$ue,0,[gc],[()=>u.TableDescription$]];u.UpdateTableReplicaAutoScalingInput$=[3,S,Lue,0,[Ie,RL,ZL,mT],[0,()=>ole,()=>u.AutoScalingSettingsUpdate$,()=>vle],1];u.UpdateTableReplicaAutoScalingOutput$=[3,S,kue,0,[xT],[()=>u.TableAutoScalingDescription$]];u.UpdateTimeToLiveInput$=[3,S,Bue,0,[Ie,AT],[0,()=>u.TimeToLiveSpecification$],2];u.UpdateTimeToLiveOutput$=[3,S,Uue,0,[AT],[()=>u.TimeToLiveSpecification$]];u.WarmThroughput$=[3,S,ho,0,[pT,RT],[1,1]];u.WriteRequest$=[3,S,jue,0,[YL,mL],[()=>u.PutRequest$,()=>u.DeleteRequest$]];var qk="unit",Bm=[1,S,hl,0,()=>u.AttributeDefinition$],Gk=[1,S,Bv,0,()=>u.AttributeValue$],Jue=[1,S,Ute,0,()=>u.AutoScalingPolicyDescription$],Zue=[1,S,oL,0,()=>u.BackupSummary$],ele=[1,S,Bre,0,()=>u.CancellationReason$],_c=[1,S,wre,0,()=>u.ConsumedCapacity$],tle=[1,S,cL,0,()=>u.ContributorInsightsSummary$],rle=[1,S,xL,0,()=>u.Endpoint$],nle=[1,S,SL,0,()=>u.ExportSummary$],ole=[1,S,koe,0,()=>u.GlobalSecondaryIndexAutoScalingUpdate$],ile=[1,S,Boe,0,()=>u.GlobalSecondaryIndexDescription$],sle=[1,S,lo,0,()=>u.GlobalSecondaryIndexInfo$],Um=[1,S,joe,0,()=>u.GlobalSecondaryIndex$],ale=[1,S,Goe,0,()=>u.GlobalSecondaryIndexUpdate$],cle=[1,S,Qoe,0,()=>u.GlobalTableGlobalSecondaryIndexSettingsUpdate$],ule=[1,S,Xoe,0,()=>u.GlobalTable$],lle=[1,S,sie,0,()=>u.GlobalTableWitnessDescription$],dle=[1,S,cie,0,()=>u.GlobalTableWitnessGroupUpdate$],fle=[1,S,ML,0,()=>u.ImportSummary$],ple=[1,S,hie,0,()=>u.ItemCollectionMetrics$],jm=[1,S,xie,0,()=>yo],Hk=[1,S,Iie,0,()=>u.ItemResponse$],mle=[1,S,kie,0,()=>Lr],Bn=[1,S,fn,0,()=>u.KeySchemaElement$],hle=[1,S,FL,0,()=>u.KinesisDataStreamDestination$],yle=[1,S,Hie,0,()=>u.AttributeValue$],gle=[1,S,hse,0,()=>u.LocalSecondaryIndexDescription$],_le=[1,S,Sl,0,()=>u.LocalSecondaryIndexInfo$],PT=[1,S,gse,0,()=>u.LocalSecondaryIndex$],Ele=[1,S,rae,0,()=>u.ParameterizedStatement$],Sle=[1,S,Vse,0,()=>u.BatchStatementRequest$],ble=[1,S,Wse,0,()=>u.BatchStatementResponse$],OT=[1,S,eae,0,()=>u.AttributeValue$],xle=[1,S,pae,0,()=>u.ReplicaAutoScalingDescription$],vle=[1,S,hae,0,()=>u.ReplicaAutoScalingUpdate$],Vk=[1,S,Eae,0,()=>u.ReplicaDescription$],Tle=[1,S,xae,0,()=>u.ReplicaGlobalSecondaryIndexAutoScalingDescription$],wle=[1,S,Tae,0,()=>u.ReplicaGlobalSecondaryIndexAutoScalingUpdate$],Ale=[1,S,Aae,0,()=>u.ReplicaGlobalSecondaryIndexDescription$],Wk=[1,S,Iae,0,()=>u.ReplicaGlobalSecondaryIndex$],Ile=[1,S,Rae,0,()=>u.ReplicaGlobalSecondaryIndexSettingsDescription$],Cle=[1,S,Pae,0,()=>u.ReplicaGlobalSecondaryIndexSettingsUpdate$],zk=[1,S,Fae,0,()=>u.Replica$],Kk=[1,S,zae,0,()=>u.ReplicaSettingsDescription$],Dle=[1,S,Qae,0,()=>u.ReplicaSettingsUpdate$],Rle=[1,S,$ae,0,()=>u.ReplicationGroupUpdate$],Ple=[1,S,ice,0,()=>u.ReplicaUpdate$],NT=[1,S,Uce,0,()=>u.Tag$],$T=[1,S,Wce,0,()=>u.ThrottlingReason$],Ole=[1,S,$ce,0,()=>u.TransactGetItem$],Nle=[1,S,rue,0,()=>u.TransactWriteItem$],$le=[1,S,que,0,()=>u.WriteRequest$],yo=[2,S,Mte,0,0,()=>u.AttributeValue$],Mle=[2,S,XM,0,0,()=>u.AttributeValueUpdate$],Yk=[2,S,ore,0,0,()=>u.KeysAndAttributes$],Lle=[2,S,nre,0,0,()=>jm],Qk=[2,S,gre,0,0,()=>$le],MT=[2,S,eoe,0,0,()=>u.ExpectedAttributeValue$],ei=[2,S,toe,0,0,()=>u.AttributeValue$],Xk=[2,S,Doe,0,0,()=>u.Condition$],kle=[2,S,mie,0,0,()=>u.AttributeValue$],Jk=[2,S,yie,0,0,()=>ple],Lr=[2,S,fo,0,0,()=>u.AttributeValue$],Fle=[2,S,kL,0,0,()=>u.Condition$],Ble=[2,S,Cse,0,0,()=>u.AttributeValue$],LT=[2,S,Bse,0,0,()=>u.AttributeValue$],zM=[2,S,hce,0,0,()=>u.Capacity$];u.AttributeValue$=[4,S,zte,0,[Tce,Pse,_re,bce,$se,fre,Rse,Ise,Mse,are],[0,0,21,64,64,85,()=>Ble,()=>yle,2,2]];u.BatchExecuteStatement$=[9,S,Xte,0,()=>u.BatchExecuteStatementInput$,()=>u.BatchExecuteStatementOutput$];u.BatchGetItem$=[9,S,ere,0,()=>u.BatchGetItemInput$,()=>u.BatchGetItemOutput$];u.BatchWriteItem$=[9,S,mre,0,()=>u.BatchWriteItemInput$,()=>u.BatchWriteItemOutput$];u.CreateBackup$=[9,S,Ere,0,()=>u.CreateBackupInput$,()=>u.CreateBackupOutput$];u.CreateGlobalTable$=[9,S,Ire,0,()=>u.CreateGlobalTableInput$,()=>u.CreateGlobalTableOutput$];u.CreateTable$=[9,S,Hre,0,()=>u.CreateTableInput$,()=>u.CreateTableOutput$];u.DeleteBackup$=[9,S,Yre,0,()=>u.DeleteBackupInput$,()=>u.DeleteBackupOutput$];u.DeleteItem$=[9,S,bne,0,()=>u.DeleteItemInput$,()=>u.DeleteItemOutput$];u.DeleteResourcePolicy$=[9,S,kne,0,()=>u.DeleteResourcePolicyInput$,()=>u.DeleteResourcePolicyOutput$];u.DeleteTable$=[9,S,jne,0,()=>u.DeleteTableInput$,()=>u.DeleteTableOutput$];u.DescribeBackup$=[9,S,ene,0,()=>u.DescribeBackupInput$,()=>u.DescribeBackupOutput$];u.DescribeContinuousBackups$=[9,S,tne,0,()=>u.DescribeContinuousBackupsInput$,()=>u.DescribeContinuousBackupsOutput$];u.DescribeContributorInsights$=[9,S,one,0,()=>u.DescribeContributorInsightsInput$,()=>u.DescribeContributorInsightsOutput$];u.DescribeEndpoints$=[9,S,ane,0,()=>u.DescribeEndpointsRequest$,()=>u.DescribeEndpointsResponse$];u.DescribeExport$=[9,S,fne,0,()=>u.DescribeExportInput$,()=>u.DescribeExportOutput$];u.DescribeGlobalTable$=[9,S,mne,0,()=>u.DescribeGlobalTableInput$,()=>u.DescribeGlobalTableOutput$];u.DescribeGlobalTableSettings$=[9,S,gne,0,()=>u.DescribeGlobalTableSettingsInput$,()=>u.DescribeGlobalTableSettingsOutput$];u.DescribeImport$=[9,S,Ine,0,()=>u.DescribeImportInput$,()=>u.DescribeImportOutput$];u.DescribeKinesisStreamingDestination$=[9,S,Cne,0,()=>u.DescribeKinesisStreamingDestinationInput$,()=>u.DescribeKinesisStreamingDestinationOutput$];u.DescribeLimits$=[9,S,One,0,()=>u.DescribeLimitsInput$,()=>u.DescribeLimitsOutput$];u.DescribeTable$=[9,S,Jne,0,()=>u.DescribeTableInput$,()=>u.DescribeTableOutput$];u.DescribeTableReplicaAutoScaling$=[9,S,Wne,0,()=>u.DescribeTableReplicaAutoScalingInput$,()=>u.DescribeTableReplicaAutoScalingOutput$];u.DescribeTimeToLive$=[9,S,Yne,0,()=>u.DescribeTimeToLiveInput$,()=>u.DescribeTimeToLiveOutput$];u.DisableKinesisStreamingDestination$=[9,S,Pne,0,()=>u.KinesisStreamingDestinationInput$,()=>u.KinesisStreamingDestinationOutput$];u.EnableKinesisStreamingDestination$=[9,S,aoe,0,()=>u.KinesisStreamingDestinationInput$,()=>u.KinesisStreamingDestinationOutput$];u.ExecuteStatement$=[9,S,_oe,0,()=>u.ExecuteStatementInput$,()=>u.ExecuteStatementOutput$];u.ExecuteTransaction$=[9,S,woe,0,()=>u.ExecuteTransactionInput$,()=>u.ExecuteTransactionOutput$];u.ExportTableToPointInTime$=[9,S,xoe,0,()=>u.ExportTableToPointInTimeInput$,()=>u.ExportTableToPointInTimeOutput$];u.GetItem$=[9,S,Roe,0,()=>u.GetItemInput$,()=>u.GetItemOutput$];u.GetResourcePolicy$=[9,S,Noe,0,()=>u.GetResourcePolicyInput$,()=>u.GetResourcePolicyOutput$];u.ImportTable$=[9,S,Pie,0,()=>u.ImportTableInput$,()=>u.ImportTableOutput$];u.ListBackups$=[9,S,Vie,0,()=>u.ListBackupsInput$,()=>u.ListBackupsOutput$];u.ListContributorInsights$=[9,S,Kie,0,()=>u.ListContributorInsightsInput$,()=>u.ListContributorInsightsOutput$];u.ListExports$=[9,S,Jie,0,()=>u.ListExportsInput$,()=>u.ListExportsOutput$];u.ListGlobalTables$=[9,S,ise,0,()=>u.ListGlobalTablesInput$,()=>u.ListGlobalTablesOutput$];u.ListImports$=[9,S,cse,0,()=>u.ListImportsInput$,()=>u.ListImportsOutput$];u.ListTables$=[9,S,Sse,0,()=>u.ListTablesInput$,()=>u.ListTablesOutput$];u.ListTagsOfResource$=[9,S,vse,0,()=>u.ListTagsOfResourceInput$,()=>u.ListTagsOfResourceOutput$];u.PutItem$=[9,S,Lse,0,()=>u.PutItemInput$,()=>u.PutItemOutput$];u.PutResourcePolicy$=[9,S,Yse,0,()=>u.PutResourcePolicyInput$,()=>u.PutResourcePolicyOutput$];u.Query$=[9,S,aae,0,()=>u.QueryInput$,()=>u.QueryOutput$];u.RestoreTableFromBackup$=[9,S,Jae,0,()=>u.RestoreTableFromBackupInput$,()=>u.RestoreTableFromBackupOutput$];u.RestoreTableToPointInTime$=[9,S,tce,0,()=>u.RestoreTableToPointInTimeInput$,()=>u.RestoreTableToPointInTimeOutput$];u.Scan$=[9,S,wce,0,()=>u.ScanInput$,()=>u.ScanOutput$];u.TagResource$=[9,S,Yce,0,()=>u.TagResourceInput$,()=>qk];u.TransactGetItems$=[9,S,Lce,0,()=>u.TransactGetItemsInput$,()=>u.TransactGetItemsOutput$];u.TransactWriteItems$=[9,S,oue,0,()=>u.TransactWriteItemsInput$,()=>u.TransactWriteItemsOutput$];u.UntagResource$=[9,S,Due,0,()=>u.UntagResourceInput$,()=>qk];u.UpdateContinuousBackups$=[9,S,aue,0,()=>u.UpdateContinuousBackupsInput$,()=>u.UpdateContinuousBackupsOutput$];u.UpdateContributorInsights$=[9,S,lue,0,()=>u.UpdateContributorInsightsInput$,()=>u.UpdateContributorInsightsOutput$];u.UpdateGlobalTable$=[9,S,mue,0,()=>u.UpdateGlobalTableInput$,()=>u.UpdateGlobalTableOutput$];u.UpdateGlobalTableSettings$=[9,S,gue,0,()=>u.UpdateGlobalTableSettingsInput$,()=>u.UpdateGlobalTableSettingsOutput$];u.UpdateItem$=[9,S,vue,0,()=>u.UpdateItemInput$,()=>u.UpdateItemOutput$];u.UpdateKinesisStreamingDestination$=[9,S,wue,0,()=>u.UpdateKinesisStreamingDestinationInput$,()=>u.UpdateKinesisStreamingDestinationOutput$];u.UpdateTable$=[9,S,Oue,0,()=>u.UpdateTableInput$,()=>u.UpdateTableOutput$];u.UpdateTableReplicaAutoScaling$=[9,S,Mue,0,()=>u.UpdateTableReplicaAutoScalingInput$,()=>u.UpdateTableReplicaAutoScalingOutput$];u.UpdateTimeToLive$=[9,S,Fue,0,()=>u.UpdateTimeToLiveInput$,()=>u.UpdateTimeToLiveOutput$]});var Zk=b((D$e,Ule)=>{Ule.exports={name:"@aws-sdk/client-dynamodb",description:"AWS SDK for JavaScript Dynamodb Client for Node.js, Browser and React Native",version:"3.1024.0",scripts:{build:"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline client-dynamodb","build:es":"tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_package_name"',"build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo dynamodb",test:"yarn g:vitest run --passWithNoTests","test:e2e":"yarn g:vitest run -c vitest.config.e2e.mts","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.mts","test:index":"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs","test:integration":"yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts","test:integration:watch":"yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts","test:watch":"yarn g:vitest watch --passWithNoTests"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.26","@aws-sdk/credential-provider-node":"^3.972.29","@aws-sdk/dynamodb-codec":"^3.972.27","@aws-sdk/middleware-endpoint-discovery":"^3.972.9","@aws-sdk/middleware-host-header":"^3.972.8","@aws-sdk/middleware-logger":"^3.972.8","@aws-sdk/middleware-recursion-detection":"^3.972.9","@aws-sdk/middleware-user-agent":"^3.972.28","@aws-sdk/region-config-resolver":"^3.972.10","@aws-sdk/types":"^3.973.6","@aws-sdk/util-endpoints":"^3.996.5","@aws-sdk/util-user-agent-browser":"^3.972.8","@aws-sdk/util-user-agent-node":"^3.973.14","@smithy/config-resolver":"^4.4.13","@smithy/core":"^3.23.13","@smithy/fetch-http-handler":"^5.3.15","@smithy/hash-node":"^4.2.12","@smithy/invalid-dependency":"^4.2.12","@smithy/middleware-content-length":"^4.2.12","@smithy/middleware-endpoint":"^4.4.28","@smithy/middleware-retry":"^4.4.46","@smithy/middleware-serde":"^4.2.16","@smithy/middleware-stack":"^4.2.12","@smithy/node-config-provider":"^4.3.12","@smithy/node-http-handler":"^4.5.1","@smithy/protocol-http":"^5.3.12","@smithy/smithy-client":"^4.12.8","@smithy/types":"^4.13.1","@smithy/url-parser":"^4.2.12","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/util-body-length-node":"^4.2.3","@smithy/util-defaults-mode-browser":"^4.3.44","@smithy/util-defaults-mode-node":"^4.2.48","@smithy/util-endpoints":"^3.3.3","@smithy/util-middleware":"^4.2.12","@smithy/util-retry":"^4.2.13","@smithy/util-utf8":"^4.2.2","@smithy/util-waiter":"^4.2.14",tslib:"^2.6.2"},devDependencies:{"@smithy/snapshot-testing":"^2.0.4","@tsconfig/node20":"20.1.8","@types/node":"^20.14.8",concurrently:"7.0.0","downlevel-dts":"0.10.1",premove:"4.0.0",typescript:"~5.8.3",vitest:"^4.0.17"},engines:{node:">=20.0.0"},typesVersions:{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-dynamodb",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-dynamodb"}}});var FT=b(Yi=>{"use strict";var jle=(Yt(),ie(Nn)),qle=lr(),eF="AWS_ACCESS_KEY_ID",tF="AWS_SECRET_ACCESS_KEY",rF="AWS_SESSION_TOKEN",nF="AWS_CREDENTIAL_EXPIRATION",oF="AWS_CREDENTIAL_SCOPE",iF="AWS_ACCOUNT_ID",Gle=e=>async()=>{var a;(a=e==null?void 0:e.logger)==null||a.debug("@aws-sdk/credential-provider-env - fromEnv");let t=process.env[eF],r=process.env[tF],n=process.env[rF],o=process.env[nF],i=process.env[oF],s=process.env[iF];if(t&&r){let c={accessKeyId:t,secretAccessKey:r,...n&&{sessionToken:n},...o&&{expiration:new Date(o)},...i&&{credentialScope:i},...s&&{accountId:s}};return jle.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new qle.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e==null?void 0:e.logger})};Yi.ENV_ACCOUNT_ID=iF;Yi.ENV_CREDENTIAL_SCOPE=oF;Yi.ENV_EXPIRATION=nF;Yi.ENV_KEY=eF;Yi.ENV_SECRET=tF;Yi.ENV_SESSION=rF;Yi.fromEnv=Gle});var Il=b(dr=>{"use strict";var go=lr(),Hle=require("url"),Vle=require("buffer"),Wle=require("http"),GT=co(),zle=no();function Al(e){return new Promise((t,r)=>{var o;let n=Wle.request({method:"GET",...e,hostname:(o=e.hostname)==null?void 0:o.replace(/^\[(.+)\]$/,"$1")});n.on("error",i=>{r(Object.assign(new go.ProviderError("Unable to connect to instance metadata service"),i)),n.destroy()}),n.on("timeout",()=>{r(new go.ProviderError("TimeoutError from instance metadata service")),n.destroy()}),n.on("response",i=>{let{statusCode:s=400}=i;(s<200||300<=s)&&(r(Object.assign(new go.ProviderError("Error response received from instance metadata service"),{statusCode:s})),n.destroy());let a=[];i.on("data",c=>{a.push(c)}),i.on("end",()=>{t(Vle.Buffer.concat(a)),n.destroy()})}),n.end()})}var uF=e=>!!e&&typeof e=="object"&&typeof e.AccessKeyId=="string"&&typeof e.SecretAccessKey=="string"&&typeof e.Token=="string"&&typeof e.Expiration=="string",lF=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration),...e.AccountId&&{accountId:e.AccountId}}),dF=1e3,fF=0,HT=({maxRetries:e=fF,timeout:t=dF})=>({maxRetries:e,timeout:t}),UT=(e,t)=>{let r=e();for(let n=0;n<t;n++)r=r.catch(e);return r},qm="AWS_CONTAINER_CREDENTIALS_FULL_URI",Gm="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",jT="AWS_CONTAINER_AUTHORIZATION_TOKEN",Kle=(e={})=>{let{timeout:t,maxRetries:r}=HT(e);return()=>UT(async()=>{let n=await Zle({logger:e.logger}),o=JSON.parse(await Yle(t,n));if(!uF(o))throw new go.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:e.logger});return lF(o)},r)},Yle=async(e,t)=>(process.env[jT]&&(t.headers={...t.headers,Authorization:process.env[jT]}),(await Al({...t,timeout:e})).toString()),Qle="169.254.170.2",Xle={localhost:!0,"127.0.0.1":!0},Jle={"http:":!0,"https:":!0},Zle=async({logger:e})=>{if(process.env[Gm])return{hostname:Qle,path:process.env[Gm]};if(process.env[qm]){let t=Hle.parse(process.env[qm]);if(!t.hostname||!(t.hostname in Xle))throw new go.CredentialsProviderError(`${t.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:e});if(!t.protocol||!(t.protocol in Jle))throw new go.CredentialsProviderError(`${t.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:e});return{...t,port:t.port?parseInt(t.port,10):void 0}}throw new go.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${Gm} or ${qm} environment variable is set`,{tryNextLink:!1,logger:e})},qT=class e extends go.CredentialsProviderError{tryNextLink;name="InstanceMetadataV1FallbackError";constructor(t,r=!0){super(t,r),this.tryNextLink=r,Object.setPrototypeOf(this,e.prototype)}};dr.Endpoint=void 0;(function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]"})(dr.Endpoint||(dr.Endpoint={}));var ede="AWS_EC2_METADATA_SERVICE_ENDPOINT",tde="ec2_metadata_service_endpoint",rde={environmentVariableSelector:e=>e[ede],configFileSelector:e=>e[tde],default:void 0},Ec;(function(e){e.IPv4="IPv4",e.IPv6="IPv6"})(Ec||(Ec={}));var nde="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",ode="ec2_metadata_service_endpoint_mode",ide={environmentVariableSelector:e=>e[nde],configFileSelector:e=>e[ode],default:Ec.IPv4},pF=async()=>zle.parseUrl(await sde()||await ade()),sde=async()=>GT.loadConfig(rde)(),ade=async()=>{let e=await GT.loadConfig(ide)();switch(e){case Ec.IPv4:return dr.Endpoint.IPv4;case Ec.IPv6:return dr.Endpoint.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(Ec)}`)}},cde=300,ude=300,lde="https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html",sF=(e,t)=>{let r=cde+Math.floor(Math.random()*ude),n=new Date(Date.now()+r*1e3);t.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(n)}.
40
+ For more information, please visit: `+lde);let o=e.originalExpiration??e.expiration;return{...e,...o?{originalExpiration:o}:{},expiration:n}},dde=(e,t={})=>{let r=(t==null?void 0:t.logger)||console,n;return async()=>{let o;try{o=await e(),o.expiration&&o.expiration.getTime()<Date.now()&&(o=sF(o,r))}catch(i){if(n)r.warn("Credential renew failed: ",i),o=sF(n,r);else throw i}return n=o,o}},mF="/latest/meta-data/iam/security-credentials/",fde="/latest/api/token",BT="AWS_EC2_METADATA_V1_DISABLED",aF="ec2_metadata_v1_disabled",cF="x-aws-ec2-metadata-token",pde=(e={})=>dde(mde(e),{logger:e.logger}),mde=(e={})=>{let t=!1,{logger:r,profile:n}=e,{timeout:o,maxRetries:i}=HT(e),s=async(a,c)=>{var f;if(t||((f=c.headers)==null?void 0:f[cF])==null){let m=!1,h=!1,_=await GT.loadConfig({environmentVariableSelector:E=>{let T=E[BT];if(h=!!T&&T!=="false",T===void 0)throw new go.CredentialsProviderError(`${BT} not set in env, checking config file next.`,{logger:e.logger});return h},configFileSelector:E=>{let T=E[aF];return m=!!T&&T!=="false",m},default:!1},{profile:n})();if(e.ec2MetadataV1Disabled||_){let E=[];throw e.ec2MetadataV1Disabled&&E.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),m&&E.push(`config file profile (${aF})`),h&&E.push(`process environment variable (${BT})`),new qT(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${E.join(", ")}].`)}}let d=(await UT(async()=>{let m;try{m=await yde(c)}catch(h){throw h.statusCode===401&&(t=!1),h}return m},a)).trim();return UT(async()=>{let m;try{m=await gde(d,c,e)}catch(h){throw h.statusCode===401&&(t=!1),h}return m},a)};return async()=>{let a=await pF();if(t)return r==null||r.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),s(i,{...a,timeout:o});{let c;try{c=(await hde({...a,timeout:o})).toString()}catch(l){if((l==null?void 0:l.statusCode)===400)throw Object.assign(l,{message:"EC2 Metadata token request returned error"});return(l.message==="TimeoutError"||[403,404,405].includes(l.statusCode))&&(t=!0),r==null||r.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),s(i,{...a,timeout:o})}return s(i,{...a,headers:{[cF]:c},timeout:o})}}},hde=async e=>Al({...e,path:fde,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),yde=async e=>(await Al({...e,path:mF})).toString(),gde=async(e,t,r)=>{let n=JSON.parse((await Al({...t,path:mF+e})).toString());if(!uF(n))throw new go.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:r.logger});return lF(n)};dr.DEFAULT_MAX_RETRIES=fF;dr.DEFAULT_TIMEOUT=dF;dr.ENV_CMDS_AUTH_TOKEN=jT;dr.ENV_CMDS_FULL_URI=qm;dr.ENV_CMDS_RELATIVE_URI=Gm;dr.fromContainerMetadata=Kle;dr.fromInstanceMetadata=pde;dr.getInstanceMetadataEndpoint=pF;dr.httpRequest=Al;dr.providerConfigFromInit=HT});var hF=b(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});Hm.checkUrl=void 0;var _de=lr(),Ede="169.254.170.2",Sde="169.254.170.23",bde="[fd00:ec2::23]",xde=(e,t)=>{if(e.protocol!=="https:"&&!(e.hostname===Ede||e.hostname===Sde||e.hostname===bde)){if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let r=e.hostname.split("."),n=o=>{let i=parseInt(o,10);return 0<=i&&i<=255};if(r[0]==="127"&&n(r[1])&&n(r[2])&&n(r[3])&&r.length===4)return}throw new _de.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
40
41
  - loopback CIDR 127.0.0.0/8 or [::1/128]
41
42
  - ECS container host 169.254.170.2
42
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`)}};Pl.checkUrl=yee});var jP=y(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});Uo.getCredentials=Uo.createGetRequest=void 0;var My=Ft(),_ee=St(),vee=Be(),gee=zh();function Eee(e){return new _ee.HttpRequest({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[r,n])=>(t[r]=n,t),{}),fragment:e.hash})}Uo.createGetRequest=Eee;async function See(e){var t,r;let n=(r=(t=e==null?void 0:e.headers["content-type"])!==null&&t!==void 0?t:e==null?void 0:e.headers["Content-Type"])!==null&&r!==void 0?r:"";n.includes("json")||console.warn("HTTP credential provider response header content-type was not application/json. Observed: "+n+".");let o=await(0,gee.sdkStreamMixin)(e.body).transformToString();if(e.statusCode===200){let s=JSON.parse(o);if(typeof s.AccessKeyId!="string"||typeof s.SecretAccessKey!="string"||typeof s.Token!="string"||typeof s.Expiration!="string")throw new My.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }");return{accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.Token,expiration:(0,vee.parseRfc3339DateTime)(s.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let s={};try{s=JSON.parse(o)}catch{}throw Object.assign(new My.CredentialsProviderError(`Server responded with status: ${e.statusCode}`),{Code:s.Code,Message:s.Message})}throw new My.CredentialsProviderError(`Server responded with status: ${e.statusCode}`)}Uo.getCredentials=See});var qP=y(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.retryWrapper=void 0;var bee=(e,t,r)=>async()=>{for(let n=0;n<t;++n)try{return await e()}catch{await new Promise(o=>setTimeout(o,r))}return await e()};Il.retryWrapper=bee});var $P=y(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});Ol.fromHttp=void 0;var Cee=(zr(),_e(Vr)),wee=Ki(),UP=Ft(),xee=Cee.__importDefault(require("fs/promises")),Aee=BP(),GP=jP(),Tee=qP(),Pee="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Iee="http://169.254.170.2",Oee="AWS_CONTAINER_CREDENTIALS_FULL_URI",Ree="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Dee="AWS_CONTAINER_AUTHORIZATION_TOKEN",Nee=e=>{var t,r,n,i,o,s,a,c,u;(t=e.logger)===null||t===void 0||t.debug("@aws-sdk/credential-provider-http","fromHttp");let d,p=(r=e.awsContainerCredentialsRelativeUri)!==null&&r!==void 0?r:process.env[Pee],m=(n=e.awsContainerCredentialsFullUri)!==null&&n!==void 0?n:process.env[Oee],h=(i=e.awsContainerAuthorizationToken)!==null&&i!==void 0?i:process.env[Dee],v=(o=e.awsContainerAuthorizationTokenFile)!==null&&o!==void 0?o:process.env[Ree];if(p&&m&&(console.warn("AWS SDK HTTP credentials provider:","you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),console.warn("awsContainerCredentialsFullUri will take precedence.")),h&&v&&(console.warn("AWS SDK HTTP credentials provider:","you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),console.warn("awsContainerAuthorizationToken will take precedence.")),m)d=m;else if(p)d=`${Iee}${p}`;else throw new UP.CredentialsProviderError(`No HTTP credential provider host provided.
43
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`);let _=new URL(d);(0,Aee.checkUrl)(_);let g=new wee.NodeHttpHandler({requestTimeout:(s=e.timeout)!==null&&s!==void 0?s:1e3,connectionTimeout:(a=e.timeout)!==null&&a!==void 0?a:1e3});return(0,Tee.retryWrapper)(async()=>{let x=(0,GP.createGetRequest)(_);h?x.headers.Authorization=h:v&&(x.headers.Authorization=(await xee.default.readFile(v)).toString());try{let S=await g.handle(x);return(0,GP.getCredentials)(S.response)}catch(S){throw new UP.CredentialsProviderError(String(S))}},(c=e.maxRetries)!==null&&c!==void 0?c:3,(u=e.timeout)!==null&&u!==void 0?u:1e3)};Ol.fromHttp=Nee});var HP=y(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.fromHttp=void 0;var Mee=$P();Object.defineProperty(Rl,"fromHttp",{enumerable:!0,get:function(){return Mee.fromHttp}})});var Ly=y((pOe,XP)=>{var Dl=Object.defineProperty,Lee=Object.getOwnPropertyDescriptor,kee=Object.getOwnPropertyNames,Fee=Object.prototype.hasOwnProperty,Bee=(e,t)=>Dl(e,"name",{value:t,configurable:!0}),jee=(e,t)=>{for(var r in t)Dl(e,r,{get:t[r],enumerable:!0})},qee=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of kee(t))!Fee.call(e,i)&&i!==r&&Dl(e,i,{get:()=>t[i],enumerable:!(n=Lee(t,i))||n.enumerable});return e},Uee=e=>qee(Dl({},"__esModule",{value:!0}),e),VP={};jee(VP,{ENV_CREDENTIAL_SCOPE:()=>YP,ENV_EXPIRATION:()=>JP,ENV_KEY:()=>zP,ENV_SECRET:()=>WP,ENV_SESSION:()=>KP,fromEnv:()=>$ee});XP.exports=Uee(VP);var Gee=Ft(),zP="AWS_ACCESS_KEY_ID",WP="AWS_SECRET_ACCESS_KEY",KP="AWS_SESSION_TOKEN",JP="AWS_CREDENTIAL_EXPIRATION",YP="AWS_CREDENTIAL_SCOPE",$ee=Bee(e=>async()=>{var t;(t=e==null?void 0:e.logger)==null||t.debug("@aws-sdk/credential-provider-env","fromEnv");let r=process.env[zP],n=process.env[WP],i=process.env[KP],o=process.env[JP],s=process.env[YP];if(r&&n)return{accessKeyId:r,secretAccessKey:n,...i&&{sessionToken:i},...o&&{expiration:new Date(o)},...s&&{credentialScope:s}};throw new Gee.CredentialsProviderError("Unable to find environment variable credentials.")},"fromEnv")});var ky=y(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.resolveHttpAuthSchemeConfig=Zn.defaultSSOHttpAuthSchemeProvider=Zn.defaultSSOHttpAuthSchemeParametersProvider=void 0;var Hee=ft(),QP=Ur(),Vee=async(e,t,r)=>({operation:(0,QP.getSmithyContext)(t).operation,region:await(0,QP.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});Zn.defaultSSOHttpAuthSchemeParametersProvider=Vee;function zee(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Nl(e){return{schemeId:"smithy.api#noAuth"}}var Wee=e=>{let t=[];switch(e.operation){case"GetRoleCredentials":{t.push(Nl(e));break}case"ListAccountRoles":{t.push(Nl(e));break}case"ListAccounts":{t.push(Nl(e));break}case"Logout":{t.push(Nl(e));break}default:t.push(zee(e))}return t};Zn.defaultSSOHttpAuthSchemeProvider=Wee;var Kee=e=>({...(0,Hee.resolveAwsSdkSigV4Config)(e)});Zn.resolveHttpAuthSchemeConfig=Kee});var ZP=y((mOe,Jee)=>{Jee.exports={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.556.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/core":"3.556.0","@aws-sdk/middleware-host-header":"3.535.0","@aws-sdk/middleware-logger":"3.535.0","@aws-sdk/middleware-recursion-detection":"3.535.0","@aws-sdk/middleware-user-agent":"3.540.0","@aws-sdk/region-config-resolver":"3.535.0","@aws-sdk/types":"3.535.0","@aws-sdk/util-endpoints":"3.540.0","@aws-sdk/util-user-agent-browser":"3.535.0","@aws-sdk/util-user-agent-node":"3.535.0","@smithy/config-resolver":"^2.2.0","@smithy/core":"^1.4.2","@smithy/fetch-http-handler":"^2.5.0","@smithy/hash-node":"^2.2.0","@smithy/invalid-dependency":"^2.2.0","@smithy/middleware-content-length":"^2.2.0","@smithy/middleware-endpoint":"^2.5.1","@smithy/middleware-retry":"^2.3.1","@smithy/middleware-serde":"^2.3.0","@smithy/middleware-stack":"^2.2.0","@smithy/node-config-provider":"^2.3.0","@smithy/node-http-handler":"^2.5.0","@smithy/protocol-http":"^3.3.0","@smithy/smithy-client":"^2.5.1","@smithy/types":"^2.12.0","@smithy/url-parser":"^2.2.0","@smithy/util-base64":"^2.3.0","@smithy/util-body-length-browser":"^2.2.0","@smithy/util-body-length-node":"^2.3.0","@smithy/util-defaults-mode-browser":"^2.2.1","@smithy/util-defaults-mode-node":"^2.3.1","@smithy/util-endpoints":"^1.2.0","@smithy/util-middleware":"^2.2.0","@smithy/util-retry":"^2.2.0","@smithy/util-utf8":"^2.3.0",tslib:"^2.6.2"},devDependencies:{"@smithy/service-client-documentation-generator":"^2.2.0","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=14.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}}});var La=y((hOe,sI)=>{var Ml=Object.defineProperty,Yee=Object.getOwnPropertyDescriptor,Xee=Object.getOwnPropertyNames,Qee=Object.prototype.hasOwnProperty,tI=(e,t)=>Ml(e,"name",{value:t,configurable:!0}),Zee=(e,t)=>{for(var r in t)Ml(e,r,{get:t[r],enumerable:!0})},ete=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xee(t))!Qee.call(e,i)&&i!==r&&Ml(e,i,{get:()=>t[i],enumerable:!(n=Yee(t,i))||n.enumerable});return e},tte=e=>ete(Ml({},"__esModule",{value:!0}),e),rI={};Zee(rI,{UA_APP_ID_ENV_NAME:()=>iI,UA_APP_ID_INI_NAME:()=>oI,crtAvailability:()=>nI,defaultUserAgent:()=>ite});sI.exports=tte(rI);var rte=fn(),eI=require("os"),Fy=require("process"),nI={isCrtAvailable:!1},nte=tI(()=>nI.isCrtAvailable?["md/crt-avail"]:null,"isCrtAvailable"),iI="AWS_SDK_UA_APP_ID",oI="sdk-ua-app-id",ite=tI(({serviceId:e,clientVersion:t})=>{let r=[["aws-sdk-js",t],["ua","2.0"],[`os/${(0,eI.platform)()}`,(0,eI.release)()],["lang/js"],["md/nodejs",`${Fy.versions.node}`]],n=nte();n&&r.push(n),e&&r.push([`api/${e}`,t]),Fy.env.AWS_EXECUTION_ENV&&r.push([`exec-env/${Fy.env.AWS_EXECUTION_ENV}`]);let i=(0,rte.loadConfig)({environmentVariableSelector:s=>s[iI],configFileSelector:s=>s[oI],default:void 0})(),o;return async()=>{if(!o){let s=await i;o=s?[...r,[`app/${s}`]]:[...r]}return o}},"defaultUserAgent")});var ka=y((_Oe,dI)=>{var Ll=Object.defineProperty,ote=Object.getOwnPropertyDescriptor,ste=Object.getOwnPropertyNames,ate=Object.prototype.hasOwnProperty,cI=(e,t)=>Ll(e,"name",{value:t,configurable:!0}),cte=(e,t)=>{for(var r in t)Ll(e,r,{get:t[r],enumerable:!0})},ute=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ste(t))!ate.call(e,i)&&i!==r&&Ll(e,i,{get:()=>t[i],enumerable:!(n=ote(t,i))||n.enumerable});return e},lte=e=>ute(Ll({},"__esModule",{value:!0}),e),uI={};cte(uI,{Hash:()=>fte});dI.exports=lte(uI);var By=Do(),dte=ur(),pte=require("buffer"),aI=require("crypto"),lI=class{constructor(t,r){this.algorithmIdentifier=t,this.secret=r,this.reset()}update(t,r){this.hash.update((0,dte.toUint8Array)(jy(t,r)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?(0,aI.createHmac)(this.algorithmIdentifier,jy(this.secret)):(0,aI.createHash)(this.algorithmIdentifier)}};cI(lI,"Hash");var fte=lI;function jy(e,t){return pte.Buffer.isBuffer(e)?e:typeof e=="string"?(0,By.fromString)(e,t):ArrayBuffer.isView(e)?(0,By.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength):(0,By.fromArrayBuffer)(e)}cI(jy,"castSourceData")});var Fa=y((vOe,mI)=>{var kl=Object.defineProperty,mte=Object.getOwnPropertyDescriptor,hte=Object.getOwnPropertyNames,yte=Object.prototype.hasOwnProperty,_te=(e,t)=>kl(e,"name",{value:t,configurable:!0}),vte=(e,t)=>{for(var r in t)kl(e,r,{get:t[r],enumerable:!0})},gte=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of hte(t))!yte.call(e,i)&&i!==r&&kl(e,i,{get:()=>t[i],enumerable:!(n=mte(t,i))||n.enumerable});return e},Ete=e=>gte(kl({},"__esModule",{value:!0}),e),fI={};vte(fI,{calculateBodyLength:()=>Ste});mI.exports=Ete(fI);var pI=require("fs"),Ste=_te(e=>{if(!e)return 0;if(typeof e=="string")return Buffer.byteLength(e);if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size;if(typeof e.start=="number"&&typeof e.end=="number")return e.end+1-e.start;if(typeof e.path=="string"||Buffer.isBuffer(e.path))return(0,pI.lstatSync)(e.path).size;if(typeof e.fd=="number")return(0,pI.fstatSync)(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)},"calculateBodyLength")});var II=y(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});Fl.ruleSet=void 0;var xI="required",dr="fn",pr="argv",Ho="ref",hI=!0,yI="isSet",Ba="booleanEquals",Go="error",$o="endpoint",hn="tree",qy="PartitionResult",Uy="getAttr",_I={[xI]:!1,type:"String"},vI={[xI]:!0,default:!1,type:"Boolean"},gI={[Ho]:"Endpoint"},AI={[dr]:Ba,[pr]:[{[Ho]:"UseFIPS"},!0]},TI={[dr]:Ba,[pr]:[{[Ho]:"UseDualStack"},!0]},lr={},EI={[dr]:Uy,[pr]:[{[Ho]:qy},"supportsFIPS"]},PI={[Ho]:qy},SI={[dr]:Ba,[pr]:[!0,{[dr]:Uy,[pr]:[PI,"supportsDualStack"]}]},bI=[AI],CI=[TI],wI=[{[Ho]:"Region"}],bte={version:"1.0",parameters:{Region:_I,UseDualStack:vI,UseFIPS:vI,Endpoint:_I},rules:[{conditions:[{[dr]:yI,[pr]:[gI]}],rules:[{conditions:bI,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Go},{conditions:CI,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Go},{endpoint:{url:gI,properties:lr,headers:lr},type:$o}],type:hn},{conditions:[{[dr]:yI,[pr]:wI}],rules:[{conditions:[{[dr]:"aws.partition",[pr]:wI,assign:qy}],rules:[{conditions:[AI,TI],rules:[{conditions:[{[dr]:Ba,[pr]:[hI,EI]},SI],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lr,headers:lr},type:$o}],type:hn},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Go}],type:hn},{conditions:bI,rules:[{conditions:[{[dr]:Ba,[pr]:[EI,hI]}],rules:[{conditions:[{[dr]:"stringEquals",[pr]:[{[dr]:Uy,[pr]:[PI,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:lr,headers:lr},type:$o},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:lr,headers:lr},type:$o}],type:hn},{error:"FIPS is enabled but this partition does not support FIPS",type:Go}],type:hn},{conditions:CI,rules:[{conditions:[SI],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lr,headers:lr},type:$o}],type:hn},{error:"DualStack is enabled but this partition does not support DualStack",type:Go}],type:hn},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:lr,headers:lr},type:$o}],type:hn}],type:hn},{error:"Invalid Configuration: Missing Region",type:Go}]};Fl.ruleSet=bte});var RI=y(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});Bl.defaultEndpointResolver=void 0;var Cte=Io(),OI=To(),wte=II(),xte=(e,t={})=>(0,OI.resolveEndpoint)(wte.ruleSet,{endpointParams:e,logger:t.logger});Bl.defaultEndpointResolver=xte;OI.customEndpointFunctions.aws=Cte.awsEndpointFunctions});var MI=y(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.getRuntimeConfig=void 0;var Ate=ft(),Tte=bt(),Pte=Be(),Ite=$i(),DI=No(),NI=ur(),Ote=ky(),Rte=RI(),Dte=e=>({apiVersion:"2019-06-10",base64Decoder:(e==null?void 0:e.base64Decoder)??DI.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??DI.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??Rte.defaultEndpointResolver,extensions:(e==null?void 0:e.extensions)??[],httpAuthSchemeProvider:(e==null?void 0:e.httpAuthSchemeProvider)??Ote.defaultSSOHttpAuthSchemeProvider,httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Ate.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Tte.NoAuthSigner}],logger:(e==null?void 0:e.logger)??new Pte.NoOpLogger,serviceId:(e==null?void 0:e.serviceId)??"SSO",urlParser:(e==null?void 0:e.urlParser)??Ite.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??NI.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??NI.toUtf8});jl.getRuntimeConfig=Dte});var qa=y((bOe,qI)=>{var Nte=Object.create,ja=Object.defineProperty,Mte=Object.getOwnPropertyDescriptor,Lte=Object.getOwnPropertyNames,kte=Object.getPrototypeOf,Fte=Object.prototype.hasOwnProperty,Gy=(e,t)=>ja(e,"name",{value:t,configurable:!0}),Bte=(e,t)=>{for(var r in t)ja(e,r,{get:t[r],enumerable:!0})},BI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Lte(t))!Fte.call(e,i)&&i!==r&&ja(e,i,{get:()=>t[i],enumerable:!(n=Mte(t,i))||n.enumerable});return e},jte=(e,t,r)=>(r=e!=null?Nte(kte(e)):{},BI(t||!e||!e.__esModule?ja(r,"default",{value:e,enumerable:!0}):r,e)),qte=e=>BI(ja({},"__esModule",{value:!0}),e),jI={};Bte(jI,{resolveDefaultsModeConfig:()=>Yte});qI.exports=qte(jI);var Ute=Gr(),LI=fn(),Gte=Ft(),$te="AWS_EXECUTION_ENV",kI="AWS_REGION",FI="AWS_DEFAULT_REGION",Hte="AWS_EC2_METADATA_DISABLED",Vte=["in-region","cross-region","mobile","standard","legacy"],zte="/latest/meta-data/placement/region",Wte="AWS_DEFAULTS_MODE",Kte="defaults_mode",Jte={environmentVariableSelector:e=>e[Wte],configFileSelector:e=>e[Kte],default:"legacy"},Yte=Gy(({region:e=(0,LI.loadConfig)(Ute.NODE_REGION_CONFIG_OPTIONS),defaultsMode:t=(0,LI.loadConfig)(Jte)}={})=>(0,Gte.memoize)(async()=>{let r=typeof t=="function"?await t():t;switch(r==null?void 0:r.toLowerCase()){case"auto":return Xte(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r==null?void 0:r.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Vte.join(", ")}, got ${r}`)}}),"resolveDefaultsModeConfig"),Xte=Gy(async e=>{if(e){let t=typeof e=="function"?await e():e,r=await Qte();return r?t===r?"in-region":"cross-region":"standard"}return"standard"},"resolveNodeDefaultsModeAuto"),Qte=Gy(async()=>{if(process.env[$te]&&(process.env[kI]||process.env[FI]))return process.env[kI]??process.env[FI];if(!process.env[Hte])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await Promise.resolve().then(()=>jte(Ma())),r=await e();return(await t({...r,path:zte})).toString()}catch{}},"inferPhysicalRegion")});var $I=y(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});Ul.getRuntimeConfig=void 0;var Zte=(zr(),_e(Vr)),ere=Zte.__importDefault(ZP()),tre=ft(),rre=La(),ql=Gr(),nre=ka(),UI=Hr(),Ua=fn(),GI=Ki(),ire=Fa(),ore=Ro(),sre=MI(),are=Be(),cre=qa(),ure=Be(),lre=e=>{(0,ure.emitWarningIfUnsupportedVersion)(process.version);let t=(0,cre.resolveDefaultsModeConfig)(e),r=()=>t().then(are.loadConfigsForDefaultMode),n=(0,sre.getRuntimeConfig)(e);return(0,tre.emitWarningIfUnsupportedVersion)(process.version),{...n,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??ire.calculateBodyLength,defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,rre.defaultUserAgent)({serviceId:n.serviceId,clientVersion:ere.default.version}),maxAttempts:(e==null?void 0:e.maxAttempts)??(0,Ua.loadConfig)(UI.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),region:(e==null?void 0:e.region)??(0,Ua.loadConfig)(ql.NODE_REGION_CONFIG_OPTIONS,ql.NODE_REGION_CONFIG_FILE_OPTIONS),requestHandler:GI.NodeHttpHandler.create((e==null?void 0:e.requestHandler)??r),retryMode:(e==null?void 0:e.retryMode)??(0,Ua.loadConfig)({...UI.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||ore.DEFAULT_RETRY_MODE}),sha256:(e==null?void 0:e.sha256)??nre.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??GI.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,Ua.loadConfig)(ql.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,Ua.loadConfig)(ql.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)}};Ul.getRuntimeConfig=lre});var Ga=y((wOe,JI)=>{var Gl=Object.defineProperty,dre=Object.getOwnPropertyDescriptor,pre=Object.getOwnPropertyNames,fre=Object.prototype.hasOwnProperty,Vo=(e,t)=>Gl(e,"name",{value:t,configurable:!0}),mre=(e,t)=>{for(var r in t)Gl(e,r,{get:t[r],enumerable:!0})},hre=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pre(t))!fre.call(e,i)&&i!==r&&Gl(e,i,{get:()=>t[i],enumerable:!(n=dre(t,i))||n.enumerable});return e},yre=e=>hre(Gl({},"__esModule",{value:!0}),e),VI={};mre(VI,{NODE_REGION_CONFIG_FILE_OPTIONS:()=>Ere,NODE_REGION_CONFIG_OPTIONS:()=>gre,REGION_ENV_NAME:()=>zI,REGION_INI_NAME:()=>WI,getAwsRegionExtensionConfiguration:()=>_re,resolveAwsRegionExtensionConfiguration:()=>vre,resolveRegionConfig:()=>Sre});JI.exports=yre(VI);var _re=Vo(e=>{let t=Vo(async()=>{if(e.region===void 0)throw new Error("Region is missing from runtimeConfig");let r=e.region;return typeof r=="string"?r:r()},"runtimeConfigRegion");return{setRegion(r){t=r},region(){return t}}},"getAwsRegionExtensionConfiguration"),vre=Vo(e=>({region:e.region()}),"resolveAwsRegionExtensionConfiguration"),zI="AWS_REGION",WI="region",gre={environmentVariableSelector:e=>e[zI],configFileSelector:e=>e[WI],default:()=>{throw new Error("Region is missing")}},Ere={preferredFile:"credentials"},KI=Vo(e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),"isFipsRegion"),HI=Vo(e=>KI(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,"getRealRegion"),Sre=Vo(e=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if(typeof t=="string")return HI(t);let n=await t();return HI(n)},useFipsEndpoint:async()=>{let n=typeof t=="string"?t:await t();return KI(n)?!0:typeof r!="function"?Promise.resolve(!!r):r()}}},"resolveRegionConfig")});var jO=y((DOe,BO)=>{"use strict";var Hl=Object.defineProperty,bre=Object.getOwnPropertyDescriptor,Cre=Object.getOwnPropertyNames,wre=Object.prototype.hasOwnProperty,ue=(e,t)=>Hl(e,"name",{value:t,configurable:!0}),xre=(e,t)=>{for(var r in t)Hl(e,r,{get:t[r],enumerable:!0})},Are=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Cre(t))!wre.call(e,i)&&i!==r&&Hl(e,i,{get:()=>t[i],enumerable:!(n=bre(t,i))||n.enumerable});return e},Tre=e=>Are(Hl({},"__esModule",{value:!0}),e),rO={};xre(rO,{GetRoleCredentialsCommand:()=>RO,GetRoleCredentialsRequestFilterSensitiveLog:()=>vO,GetRoleCredentialsResponseFilterSensitiveLog:()=>EO,InvalidRequestException:()=>cO,ListAccountRolesCommand:()=>$y,ListAccountRolesRequestFilterSensitiveLog:()=>SO,ListAccountsCommand:()=>Hy,ListAccountsRequestFilterSensitiveLog:()=>bO,LogoutCommand:()=>LO,LogoutRequestFilterSensitiveLog:()=>CO,ResourceNotFoundException:()=>dO,RoleCredentialsFilterSensitiveLog:()=>gO,SSO:()=>FO,SSOClient:()=>zl,SSOServiceException:()=>zo,TooManyRequestsException:()=>mO,UnauthorizedException:()=>_O,__Client:()=>$.Client,paginateListAccountRoles:()=>Zre,paginateListAccounts:()=>ene});BO.exports=Tre(rO);var YI=ca(),Pre=ua(),Ire=la(),XI=pa(),Ore=Gr(),yn=bt(),Rre=Ia(),Ha=Vi(),QI=Hr(),ZI=ky(),Dre=ue(e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}),"resolveClientEndpointParameters"),Vl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Nre=$I(),eO=Ga(),tO=St(),$=Be(),Mre=ue(e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){let o=t.findIndex(s=>s.schemeId===i.schemeId);o===-1?t.push(i):t.splice(o,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}},"getHttpAuthExtensionConfiguration"),Lre=ue(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig"),$l=ue(e=>e,"asPartial"),kre=ue((e,t)=>{let r={...$l((0,eO.getAwsRegionExtensionConfiguration)(e)),...$l((0,$.getDefaultExtensionConfiguration)(e)),...$l((0,tO.getHttpHandlerExtensionConfiguration)(e)),...$l(Mre(e))};return t.forEach(n=>n.configure(r)),{...e,...(0,eO.resolveAwsRegionExtensionConfiguration)(r),...(0,$.resolveDefaultRuntimeConfig)(r),...(0,tO.resolveHttpHandlerRuntimeConfig)(r),...Lre(r)}},"resolveRuntimeExtensions"),nO=class extends $.Client{constructor(...[t]){let r=(0,Nre.getRuntimeConfig)(t||{}),n=Dre(r),i=(0,Ore.resolveRegionConfig)(n),o=(0,Ha.resolveEndpointConfig)(i),s=(0,QI.resolveRetryConfig)(o),a=(0,YI.resolveHostHeaderConfig)(s),c=(0,XI.resolveUserAgentConfig)(a),u=(0,ZI.resolveHttpAuthSchemeConfig)(c),d=kre(u,(t==null?void 0:t.extensions)||[]);super(d),this.config=d,this.middlewareStack.use((0,QI.getRetryPlugin)(this.config)),this.middlewareStack.use((0,Rre.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,YI.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,Pre.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,Ire.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,XI.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,yn.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((0,yn.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return ZI.defaultSSOHttpAuthSchemeParametersProvider}getIdentityProviderConfigProvider(){return async t=>new yn.DefaultIdentityProviderConfig({"aws.auth#sigv4":t.credentials})}};ue(nO,"SSOClient");var zl=nO,Wl=Hi(),AOe=sr(),iO=class oO extends $.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,oO.prototype)}};ue(iO,"SSOServiceException");var zo=iO,sO=class aO extends zo{constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,aO.prototype)}};ue(sO,"InvalidRequestException");var cO=sO,uO=class lO extends zo{constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,lO.prototype)}};ue(uO,"ResourceNotFoundException");var dO=uO,pO=class fO extends zo{constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,fO.prototype)}};ue(pO,"TooManyRequestsException");var mO=pO,hO=class yO extends zo{constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,yO.prototype)}};ue(hO,"UnauthorizedException");var _O=hO,vO=ue(e=>({...e,...e.accessToken&&{accessToken:$.SENSITIVE_STRING}}),"GetRoleCredentialsRequestFilterSensitiveLog"),gO=ue(e=>({...e,...e.secretAccessKey&&{secretAccessKey:$.SENSITIVE_STRING},...e.sessionToken&&{sessionToken:$.SENSITIVE_STRING}}),"RoleCredentialsFilterSensitiveLog"),EO=ue(e=>({...e,...e.roleCredentials&&{roleCredentials:gO(e.roleCredentials)}}),"GetRoleCredentialsResponseFilterSensitiveLog"),SO=ue(e=>({...e,...e.accessToken&&{accessToken:$.SENSITIVE_STRING}}),"ListAccountRolesRequestFilterSensitiveLog"),bO=ue(e=>({...e,...e.accessToken&&{accessToken:$.SENSITIVE_STRING}}),"ListAccountsRequestFilterSensitiveLog"),CO=ue(e=>({...e,...e.accessToken&&{accessToken:$.SENSITIVE_STRING}}),"LogoutRequestFilterSensitiveLog"),$a=ft(),Fre=ue(async(e,t)=>{let r=(0,yn.requestBuilder)(e,t),n=(0,$.map)({},Jl,{[Xl]:e[Yl]});r.bp("/federation/credentials");let i=(0,$.map)({[Xre]:[,(0,$.expectNonNull)(e[Yre],"roleName")],[xO]:[,(0,$.expectNonNull)(e[wO],"accountId")]});return r.m("GET").h(n).q(i).b(void 0),r.build()},"se_GetRoleCredentialsCommand"),Bre=ue(async(e,t)=>{let r=(0,yn.requestBuilder)(e,t),n=(0,$.map)({},Jl,{[Xl]:e[Yl]});r.bp("/assignment/roles");let i=(0,$.map)({[IO]:[,e[PO]],[TO]:[()=>e.maxResults!==void 0,()=>e[AO].toString()],[xO]:[,(0,$.expectNonNull)(e[wO],"accountId")]});return r.m("GET").h(n).q(i).b(void 0),r.build()},"se_ListAccountRolesCommand"),jre=ue(async(e,t)=>{let r=(0,yn.requestBuilder)(e,t),n=(0,$.map)({},Jl,{[Xl]:e[Yl]});r.bp("/assignment/accounts");let i=(0,$.map)({[IO]:[,e[PO]],[TO]:[()=>e.maxResults!==void 0,()=>e[AO].toString()]});return r.m("GET").h(n).q(i).b(void 0),r.build()},"se_ListAccountsCommand"),qre=ue(async(e,t)=>{let r=(0,yn.requestBuilder)(e,t),n=(0,$.map)({},Jl,{[Xl]:e[Yl]});return r.bp("/logout"),r.m("POST").h(n).b(void 0),r.build()},"se_LogoutCommand"),Ure=ue(async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Kl(e,t);let r=(0,$.map)({$metadata:ei(e)}),n=(0,$.expectNonNull)((0,$.expectObject)(await(0,$a.parseJsonBody)(e.body,t)),"body"),i=(0,$.take)(n,{roleCredentials:$._json});return Object.assign(r,i),r},"de_GetRoleCredentialsCommand"),Gre=ue(async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Kl(e,t);let r=(0,$.map)({$metadata:ei(e)}),n=(0,$.expectNonNull)((0,$.expectObject)(await(0,$a.parseJsonBody)(e.body,t)),"body"),i=(0,$.take)(n,{nextToken:$.expectString,roleList:$._json});return Object.assign(r,i),r},"de_ListAccountRolesCommand"),$re=ue(async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Kl(e,t);let r=(0,$.map)({$metadata:ei(e)}),n=(0,$.expectNonNull)((0,$.expectObject)(await(0,$a.parseJsonBody)(e.body,t)),"body"),i=(0,$.take)(n,{accountList:$._json,nextToken:$.expectString});return Object.assign(r,i),r},"de_ListAccountsCommand"),Hre=ue(async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Kl(e,t);let r=(0,$.map)({$metadata:ei(e)});return await(0,$.collectBody)(e.body,t),r},"de_LogoutCommand"),Kl=ue(async(e,t)=>{let r={...e,body:await(0,$a.parseJsonErrorBody)(e.body,t)},n=(0,$a.loadRestJsonErrorCode)(e,r.body);switch(n){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await zre(r,t);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await Wre(r,t);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Kre(r,t);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Jre(r,t);default:let i=r.body;return Vre({output:e,parsedBody:i,errorCode:n})}},"de_CommandError"),Vre=(0,$.withBaseException)(zo),zre=ue(async(e,t)=>{let r=(0,$.map)({}),n=e.body,i=(0,$.take)(n,{message:$.expectString});Object.assign(r,i);let o=new cO({$metadata:ei(e),...r});return(0,$.decorateServiceException)(o,e.body)},"de_InvalidRequestExceptionRes"),Wre=ue(async(e,t)=>{let r=(0,$.map)({}),n=e.body,i=(0,$.take)(n,{message:$.expectString});Object.assign(r,i);let o=new dO({$metadata:ei(e),...r});return(0,$.decorateServiceException)(o,e.body)},"de_ResourceNotFoundExceptionRes"),Kre=ue(async(e,t)=>{let r=(0,$.map)({}),n=e.body,i=(0,$.take)(n,{message:$.expectString});Object.assign(r,i);let o=new mO({$metadata:ei(e),...r});return(0,$.decorateServiceException)(o,e.body)},"de_TooManyRequestsExceptionRes"),Jre=ue(async(e,t)=>{let r=(0,$.map)({}),n=e.body,i=(0,$.take)(n,{message:$.expectString});Object.assign(r,i);let o=new _O({$metadata:ei(e),...r});return(0,$.decorateServiceException)(o,e.body)},"de_UnauthorizedExceptionRes"),ei=ue(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"]}),"deserializeMetadata"),Jl=ue(e=>e!=null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),"isSerializableHeaderValue"),wO="accountId",Yl="accessToken",xO="account_id",AO="maxResults",TO="max_result",PO="nextToken",IO="next_token",Yre="roleName",Xre="role_name",Xl="x-amz-sso_bearer_token",OO=class extends $.Command.classBuilder().ep({...Vl}).m(function(t,r,n,i){return[(0,Wl.getSerdePlugin)(n,this.serialize,this.deserialize),(0,Ha.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(vO,EO).ser(Fre).de(Ure).build(){};ue(OO,"GetRoleCredentialsCommand");var RO=OO,DO=class extends $.Command.classBuilder().ep({...Vl}).m(function(t,r,n,i){return[(0,Wl.getSerdePlugin)(n,this.serialize,this.deserialize),(0,Ha.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(SO,void 0).ser(Bre).de(Gre).build(){};ue(DO,"ListAccountRolesCommand");var $y=DO,NO=class extends $.Command.classBuilder().ep({...Vl}).m(function(t,r,n,i){return[(0,Wl.getSerdePlugin)(n,this.serialize,this.deserialize),(0,Ha.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(bO,void 0).ser(jre).de($re).build(){};ue(NO,"ListAccountsCommand");var Hy=NO,MO=class extends $.Command.classBuilder().ep({...Vl}).m(function(t,r,n,i){return[(0,Wl.getSerdePlugin)(n,this.serialize,this.deserialize),(0,Ha.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(CO,void 0).ser(qre).de(Hre).build(){};ue(MO,"LogoutCommand");var LO=MO,Qre={GetRoleCredentialsCommand:RO,ListAccountRolesCommand:$y,ListAccountsCommand:Hy,LogoutCommand:LO},kO=class extends zl{};ue(kO,"SSO");var FO=kO;(0,$.createAggregatedClient)(Qre,FO);var Zre=(0,yn.createPaginator)(zl,$y,"nextToken","nextToken","maxResults"),ene=(0,yn.createPaginator)(zl,Hy,"nextToken","nextToken","maxResults")});var zy=y(ti=>{"use strict";Object.defineProperty(ti,"__esModule",{value:!0});ti.resolveHttpAuthSchemeConfig=ti.defaultSSOOIDCHttpAuthSchemeProvider=ti.defaultSSOOIDCHttpAuthSchemeParametersProvider=void 0;var tne=ft(),qO=Ur(),rne=async(e,t,r)=>({operation:(0,qO.getSmithyContext)(t).operation,region:await(0,qO.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});ti.defaultSSOOIDCHttpAuthSchemeParametersProvider=rne;function nne(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Vy(e){return{schemeId:"smithy.api#noAuth"}}var ine=e=>{let t=[];switch(e.operation){case"CreateToken":{t.push(Vy(e));break}case"RegisterClient":{t.push(Vy(e));break}case"StartDeviceAuthorization":{t.push(Vy(e));break}default:t.push(nne(e))}return t};ti.defaultSSOOIDCHttpAuthSchemeProvider=ine;var one=e=>({...(0,tne.resolveAwsSdkSigV4Config)(e)});ti.resolveHttpAuthSchemeConfig=one});var UO=y((MOe,sne)=>{sne.exports={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.556.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/client-sts":"3.556.0","@aws-sdk/core":"3.556.0","@aws-sdk/middleware-host-header":"3.535.0","@aws-sdk/middleware-logger":"3.535.0","@aws-sdk/middleware-recursion-detection":"3.535.0","@aws-sdk/middleware-user-agent":"3.540.0","@aws-sdk/region-config-resolver":"3.535.0","@aws-sdk/types":"3.535.0","@aws-sdk/util-endpoints":"3.540.0","@aws-sdk/util-user-agent-browser":"3.535.0","@aws-sdk/util-user-agent-node":"3.535.0","@smithy/config-resolver":"^2.2.0","@smithy/core":"^1.4.2","@smithy/fetch-http-handler":"^2.5.0","@smithy/hash-node":"^2.2.0","@smithy/invalid-dependency":"^2.2.0","@smithy/middleware-content-length":"^2.2.0","@smithy/middleware-endpoint":"^2.5.1","@smithy/middleware-retry":"^2.3.1","@smithy/middleware-serde":"^2.3.0","@smithy/middleware-stack":"^2.2.0","@smithy/node-config-provider":"^2.3.0","@smithy/node-http-handler":"^2.5.0","@smithy/protocol-http":"^3.3.0","@smithy/smithy-client":"^2.5.1","@smithy/types":"^2.12.0","@smithy/url-parser":"^2.2.0","@smithy/util-base64":"^2.3.0","@smithy/util-body-length-browser":"^2.2.0","@smithy/util-body-length-node":"^2.3.0","@smithy/util-defaults-mode-browser":"^2.2.1","@smithy/util-defaults-mode-node":"^2.3.1","@smithy/util-endpoints":"^1.2.0","@smithy/util-middleware":"^2.2.0","@smithy/util-retry":"^2.2.0","@smithy/util-utf8":"^2.3.0",tslib:"^2.6.2"},devDependencies:{"@smithy/service-client-documentation-generator":"^2.2.0","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=14.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/credential-provider-node":"^3.556.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}}});var GO=y(Kr=>{"use strict";var ane=Kr&&Kr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),cne=Kr&&Kr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),une=Kr&&Kr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&ane(t,e,r);return cne(t,e),t};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.defaultProvider=void 0;Kr.defaultProvider=(e=>()=>Promise.resolve().then(()=>une(Va())).then(({defaultProvider:t})=>t(e)()))});var nR=y(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.ruleSet=void 0;var ZO="required",mr="fn",hr="argv",Jo="ref",$O=!0,HO="isSet",za="booleanEquals",Wo="error",Ko="endpoint",_n="tree",Wy="PartitionResult",Ky="getAttr",VO={[ZO]:!1,type:"String"},zO={[ZO]:!0,default:!1,type:"Boolean"},WO={[Jo]:"Endpoint"},eR={[mr]:za,[hr]:[{[Jo]:"UseFIPS"},!0]},tR={[mr]:za,[hr]:[{[Jo]:"UseDualStack"},!0]},fr={},KO={[mr]:Ky,[hr]:[{[Jo]:Wy},"supportsFIPS"]},rR={[Jo]:Wy},JO={[mr]:za,[hr]:[!0,{[mr]:Ky,[hr]:[rR,"supportsDualStack"]}]},YO=[eR],XO=[tR],QO=[{[Jo]:"Region"}],lne={version:"1.0",parameters:{Region:VO,UseDualStack:zO,UseFIPS:zO,Endpoint:VO},rules:[{conditions:[{[mr]:HO,[hr]:[WO]}],rules:[{conditions:YO,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Wo},{conditions:XO,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Wo},{endpoint:{url:WO,properties:fr,headers:fr},type:Ko}],type:_n},{conditions:[{[mr]:HO,[hr]:QO}],rules:[{conditions:[{[mr]:"aws.partition",[hr]:QO,assign:Wy}],rules:[{conditions:[eR,tR],rules:[{conditions:[{[mr]:za,[hr]:[$O,KO]},JO],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fr,headers:fr},type:Ko}],type:_n},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Wo}],type:_n},{conditions:YO,rules:[{conditions:[{[mr]:za,[hr]:[KO,$O]}],rules:[{conditions:[{[mr]:"stringEquals",[hr]:[{[mr]:Ky,[hr]:[rR,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:fr,headers:fr},type:Ko},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:fr,headers:fr},type:Ko}],type:_n},{error:"FIPS is enabled but this partition does not support FIPS",type:Wo}],type:_n},{conditions:XO,rules:[{conditions:[JO],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:fr,headers:fr},type:Ko}],type:_n},{error:"DualStack is enabled but this partition does not support DualStack",type:Wo}],type:_n},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:fr,headers:fr},type:Ko}],type:_n}],type:_n},{error:"Invalid Configuration: Missing Region",type:Wo}]};Ql.ruleSet=lne});var oR=y(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.defaultEndpointResolver=void 0;var dne=Io(),iR=To(),pne=nR(),fne=(e,t={})=>(0,iR.resolveEndpoint)(pne.ruleSet,{endpointParams:e,logger:t.logger});Zl.defaultEndpointResolver=fne;iR.customEndpointFunctions.aws=dne.awsEndpointFunctions});var cR=y(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.getRuntimeConfig=void 0;var mne=ft(),hne=bt(),yne=Be(),_ne=$i(),sR=No(),aR=ur(),vne=zy(),gne=oR(),Ene=e=>({apiVersion:"2019-06-10",base64Decoder:(e==null?void 0:e.base64Decoder)??sR.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??sR.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??gne.defaultEndpointResolver,extensions:(e==null?void 0:e.extensions)??[],httpAuthSchemeProvider:(e==null?void 0:e.httpAuthSchemeProvider)??vne.defaultSSOOIDCHttpAuthSchemeProvider,httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new mne.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new hne.NoAuthSigner}],logger:(e==null?void 0:e.logger)??new yne.NoOpLogger,serviceId:(e==null?void 0:e.serviceId)??"SSO OIDC",urlParser:(e==null?void 0:e.urlParser)??_ne.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??aR.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??aR.toUtf8});ed.getRuntimeConfig=Ene});var dR=y(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});rd.getRuntimeConfig=void 0;var Sne=(zr(),_e(Vr)),bne=Sne.__importDefault(UO()),Cne=GO(),wne=ft(),xne=La(),td=Gr(),Ane=ka(),uR=Hr(),Wa=fn(),lR=Ki(),Tne=Fa(),Pne=Ro(),Ine=cR(),One=Be(),Rne=qa(),Dne=Be(),Nne=e=>{(0,Dne.emitWarningIfUnsupportedVersion)(process.version);let t=(0,Rne.resolveDefaultsModeConfig)(e),r=()=>t().then(One.loadConfigsForDefaultMode),n=(0,Ine.getRuntimeConfig)(e);return(0,wne.emitWarningIfUnsupportedVersion)(process.version),{...n,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??Tne.calculateBodyLength,credentialDefaultProvider:(e==null?void 0:e.credentialDefaultProvider)??Cne.defaultProvider,defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,xne.defaultUserAgent)({serviceId:n.serviceId,clientVersion:bne.default.version}),maxAttempts:(e==null?void 0:e.maxAttempts)??(0,Wa.loadConfig)(uR.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),region:(e==null?void 0:e.region)??(0,Wa.loadConfig)(td.NODE_REGION_CONFIG_OPTIONS,td.NODE_REGION_CONFIG_FILE_OPTIONS),requestHandler:lR.NodeHttpHandler.create((e==null?void 0:e.requestHandler)??r),retryMode:(e==null?void 0:e.retryMode)??(0,Wa.loadConfig)({...uR.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||Pne.DEFAULT_RETRY_MODE}),sha256:(e==null?void 0:e.sha256)??Ane.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??lR.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,Wa.loadConfig)(td.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,Wa.loadConfig)(td.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)}};rd.getRuntimeConfig=Nne});var xD=y((WOe,wD)=>{"use strict";var id=Object.defineProperty,Mne=Object.getOwnPropertyDescriptor,Lne=Object.getOwnPropertyNames,kne=Object.prototype.hasOwnProperty,ee=(e,t)=>id(e,"name",{value:t,configurable:!0}),Fne=(e,t)=>{for(var r in t)id(e,r,{get:t[r],enumerable:!0})},Bne=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Lne(t))!kne.call(e,i)&&i!==r&&id(e,i,{get:()=>t[i],enumerable:!(n=Mne(t,i))||n.enumerable});return e},jne=e=>Bne(id({},"__esModule",{value:!0}),e),vR={};Fne(vR,{AccessDeniedException:()=>xR,AuthorizationPendingException:()=>PR,CreateTokenCommand:()=>hD,CreateTokenRequestFilterSensitiveLog:()=>cD,CreateTokenResponseFilterSensitiveLog:()=>uD,CreateTokenWithIAMCommand:()=>_D,CreateTokenWithIAMRequestFilterSensitiveLog:()=>lD,CreateTokenWithIAMResponseFilterSensitiveLog:()=>dD,ExpiredTokenException:()=>RR,InternalServerException:()=>MR,InvalidClientException:()=>FR,InvalidClientMetadataException:()=>aD,InvalidGrantException:()=>qR,InvalidRequestException:()=>$R,InvalidRequestRegionException:()=>iD,InvalidScopeException:()=>zR,RegisterClientCommand:()=>gD,RegisterClientResponseFilterSensitiveLog:()=>pD,SSOOIDC:()=>CD,SSOOIDCClient:()=>ER,SSOOIDCServiceException:()=>Ot,SlowDownException:()=>JR,StartDeviceAuthorizationCommand:()=>SD,StartDeviceAuthorizationRequestFilterSensitiveLog:()=>fD,UnauthorizedClientException:()=>QR,UnsupportedGrantTypeException:()=>tD,__Client:()=>A.Client});wD.exports=jne(vR);var pR=ca(),qne=ua(),Une=la(),fR=pa(),Gne=Gr(),Xi=bt(),$ne=Ia(),Ka=Vi(),mR=Hr(),hR=zy(),Hne=ee(e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),"resolveClientEndpointParameters"),od={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Vne=dR(),yR=Ga(),_R=St(),A=Be(),zne=ee(e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){let o=t.findIndex(s=>s.schemeId===i.schemeId);o===-1?t.push(i):t.splice(o,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}},"getHttpAuthExtensionConfiguration"),Wne=ee(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig"),nd=ee(e=>e,"asPartial"),Kne=ee((e,t)=>{let r={...nd((0,yR.getAwsRegionExtensionConfiguration)(e)),...nd((0,A.getDefaultExtensionConfiguration)(e)),...nd((0,_R.getHttpHandlerExtensionConfiguration)(e)),...nd(zne(e))};return t.forEach(n=>n.configure(r)),{...e,...(0,yR.resolveAwsRegionExtensionConfiguration)(r),...(0,A.resolveDefaultRuntimeConfig)(r),...(0,_R.resolveHttpHandlerRuntimeConfig)(r),...Wne(r)}},"resolveRuntimeExtensions"),gR=class extends A.Client{constructor(...[t]){let r=(0,Vne.getRuntimeConfig)(t||{}),n=Hne(r),i=(0,Gne.resolveRegionConfig)(n),o=(0,Ka.resolveEndpointConfig)(i),s=(0,mR.resolveRetryConfig)(o),a=(0,pR.resolveHostHeaderConfig)(s),c=(0,fR.resolveUserAgentConfig)(a),u=(0,hR.resolveHttpAuthSchemeConfig)(c),d=Kne(u,(t==null?void 0:t.extensions)||[]);super(d),this.config=d,this.middlewareStack.use((0,mR.getRetryPlugin)(this.config)),this.middlewareStack.use((0,$ne.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,pR.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,qne.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,Une.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,fR.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,Xi.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((0,Xi.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return hR.defaultSSOOIDCHttpAuthSchemeParametersProvider}getIdentityProviderConfigProvider(){return async t=>new Xi.DefaultIdentityProviderConfig({"aws.auth#sigv4":t.credentials})}};ee(gR,"SSOOIDCClient");var ER=gR,sd=Hi(),UOe=sr(),SR=class bR extends A.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,bR.prototype)}};ee(SR,"SSOOIDCServiceException");var Ot=SR,CR=class wR extends Ot{constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,wR.prototype),this.error=t.error,this.error_description=t.error_description}};ee(CR,"AccessDeniedException");var xR=CR,AR=class TR extends Ot{constructor(t){super({name:"AuthorizationPendingException",$fault:"client",...t}),this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,TR.prototype),this.error=t.error,this.error_description=t.error_description}};ee(AR,"AuthorizationPendingException");var PR=AR,IR=class OR extends Ot{constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,OR.prototype),this.error=t.error,this.error_description=t.error_description}};ee(IR,"ExpiredTokenException");var RR=IR,DR=class NR extends Ot{constructor(t){super({name:"InternalServerException",$fault:"server",...t}),this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,NR.prototype),this.error=t.error,this.error_description=t.error_description}};ee(DR,"InternalServerException");var MR=DR,LR=class kR extends Ot{constructor(t){super({name:"InvalidClientException",$fault:"client",...t}),this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,kR.prototype),this.error=t.error,this.error_description=t.error_description}};ee(LR,"InvalidClientException");var FR=LR,BR=class jR extends Ot{constructor(t){super({name:"InvalidGrantException",$fault:"client",...t}),this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,jR.prototype),this.error=t.error,this.error_description=t.error_description}};ee(BR,"InvalidGrantException");var qR=BR,UR=class GR extends Ot{constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,GR.prototype),this.error=t.error,this.error_description=t.error_description}};ee(UR,"InvalidRequestException");var $R=UR,HR=class VR extends Ot{constructor(t){super({name:"InvalidScopeException",$fault:"client",...t}),this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,VR.prototype),this.error=t.error,this.error_description=t.error_description}};ee(HR,"InvalidScopeException");var zR=HR,WR=class KR extends Ot{constructor(t){super({name:"SlowDownException",$fault:"client",...t}),this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,KR.prototype),this.error=t.error,this.error_description=t.error_description}};ee(WR,"SlowDownException");var JR=WR,YR=class XR extends Ot{constructor(t){super({name:"UnauthorizedClientException",$fault:"client",...t}),this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,XR.prototype),this.error=t.error,this.error_description=t.error_description}};ee(YR,"UnauthorizedClientException");var QR=YR,ZR=class eD extends Ot{constructor(t){super({name:"UnsupportedGrantTypeException",$fault:"client",...t}),this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,eD.prototype),this.error=t.error,this.error_description=t.error_description}};ee(ZR,"UnsupportedGrantTypeException");var tD=ZR,rD=class nD extends Ot{constructor(t){super({name:"InvalidRequestRegionException",$fault:"client",...t}),this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,nD.prototype),this.error=t.error,this.error_description=t.error_description,this.endpoint=t.endpoint,this.region=t.region}};ee(rD,"InvalidRequestRegionException");var iD=rD,oD=class sD extends Ot{constructor(t){super({name:"InvalidClientMetadataException",$fault:"client",...t}),this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,sD.prototype),this.error=t.error,this.error_description=t.error_description}};ee(oD,"InvalidClientMetadataException");var aD=oD,cD=ee(e=>({...e,...e.clientSecret&&{clientSecret:A.SENSITIVE_STRING},...e.refreshToken&&{refreshToken:A.SENSITIVE_STRING}}),"CreateTokenRequestFilterSensitiveLog"),uD=ee(e=>({...e,...e.accessToken&&{accessToken:A.SENSITIVE_STRING},...e.refreshToken&&{refreshToken:A.SENSITIVE_STRING},...e.idToken&&{idToken:A.SENSITIVE_STRING}}),"CreateTokenResponseFilterSensitiveLog"),lD=ee(e=>({...e,...e.refreshToken&&{refreshToken:A.SENSITIVE_STRING},...e.assertion&&{assertion:A.SENSITIVE_STRING},...e.subjectToken&&{subjectToken:A.SENSITIVE_STRING}}),"CreateTokenWithIAMRequestFilterSensitiveLog"),dD=ee(e=>({...e,...e.accessToken&&{accessToken:A.SENSITIVE_STRING},...e.refreshToken&&{refreshToken:A.SENSITIVE_STRING},...e.idToken&&{idToken:A.SENSITIVE_STRING}}),"CreateTokenWithIAMResponseFilterSensitiveLog"),pD=ee(e=>({...e,...e.clientSecret&&{clientSecret:A.SENSITIVE_STRING}}),"RegisterClientResponseFilterSensitiveLog"),fD=ee(e=>({...e,...e.clientSecret&&{clientSecret:A.SENSITIVE_STRING}}),"StartDeviceAuthorizationRequestFilterSensitiveLog"),Yo=ft(),Jne=ee(async(e,t)=>{let r=(0,Xi.requestBuilder)(e,t),n={"content-type":"application/json"};r.bp("/token");let i;return i=JSON.stringify((0,A.take)(e,{clientId:[],clientSecret:[],code:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:o=>(0,A._json)(o)})),r.m("POST").h(n).b(i),r.build()},"se_CreateTokenCommand"),Yne=ee(async(e,t)=>{let r=(0,Xi.requestBuilder)(e,t),n={"content-type":"application/json"};r.bp("/token");let i=(0,A.map)({[_ie]:[,"t"]}),o;return o=JSON.stringify((0,A.take)(e,{assertion:[],clientId:[],code:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:s=>(0,A._json)(s),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(n).q(i).b(o),r.build()},"se_CreateTokenWithIAMCommand"),Xne=ee(async(e,t)=>{let r=(0,Xi.requestBuilder)(e,t),n={"content-type":"application/json"};r.bp("/client/register");let i;return i=JSON.stringify((0,A.take)(e,{clientName:[],clientType:[],scopes:o=>(0,A._json)(o)})),r.m("POST").h(n).b(i),r.build()},"se_RegisterClientCommand"),Qne=ee(async(e,t)=>{let r=(0,Xi.requestBuilder)(e,t),n={"content-type":"application/json"};r.bp("/device_authorization");let i;return i=JSON.stringify((0,A.take)(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(n).b(i),r.build()},"se_StartDeviceAuthorizationCommand"),Zne=ee(async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return ad(e,t);let r=(0,A.map)({$metadata:mt(e)}),n=(0,A.expectNonNull)((0,A.expectObject)(await(0,Yo.parseJsonBody)(e.body,t)),"body"),i=(0,A.take)(n,{accessToken:A.expectString,expiresIn:A.expectInt32,idToken:A.expectString,refreshToken:A.expectString,tokenType:A.expectString});return Object.assign(r,i),r},"de_CreateTokenCommand"),eie=ee(async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return ad(e,t);let r=(0,A.map)({$metadata:mt(e)}),n=(0,A.expectNonNull)((0,A.expectObject)(await(0,Yo.parseJsonBody)(e.body,t)),"body"),i=(0,A.take)(n,{accessToken:A.expectString,expiresIn:A.expectInt32,idToken:A.expectString,issuedTokenType:A.expectString,refreshToken:A.expectString,scope:A._json,tokenType:A.expectString});return Object.assign(r,i),r},"de_CreateTokenWithIAMCommand"),tie=ee(async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return ad(e,t);let r=(0,A.map)({$metadata:mt(e)}),n=(0,A.expectNonNull)((0,A.expectObject)(await(0,Yo.parseJsonBody)(e.body,t)),"body"),i=(0,A.take)(n,{authorizationEndpoint:A.expectString,clientId:A.expectString,clientIdIssuedAt:A.expectLong,clientSecret:A.expectString,clientSecretExpiresAt:A.expectLong,tokenEndpoint:A.expectString});return Object.assign(r,i),r},"de_RegisterClientCommand"),rie=ee(async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return ad(e,t);let r=(0,A.map)({$metadata:mt(e)}),n=(0,A.expectNonNull)((0,A.expectObject)(await(0,Yo.parseJsonBody)(e.body,t)),"body"),i=(0,A.take)(n,{deviceCode:A.expectString,expiresIn:A.expectInt32,interval:A.expectInt32,userCode:A.expectString,verificationUri:A.expectString,verificationUriComplete:A.expectString});return Object.assign(r,i),r},"de_StartDeviceAuthorizationCommand"),ad=ee(async(e,t)=>{let r={...e,body:await(0,Yo.parseJsonErrorBody)(e.body,t)},n=(0,Yo.loadRestJsonErrorCode)(e,r.body);switch(n){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await iie(r,t);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await oie(r,t);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await sie(r,t);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await aie(r,t);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await cie(r,t);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await lie(r,t);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await die(r,t);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await fie(r,t);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await mie(r,t);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await hie(r,t);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await yie(r,t);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await pie(r,t);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await uie(r,t);default:let i=r.body;return nie({output:e,parsedBody:i,errorCode:n})}},"de_CommandError"),nie=(0,A.withBaseException)(Ot),iie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new xR({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_AccessDeniedExceptionRes"),oie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new PR({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_AuthorizationPendingExceptionRes"),sie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new RR({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_ExpiredTokenExceptionRes"),aie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new MR({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_InternalServerExceptionRes"),cie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new FR({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_InvalidClientExceptionRes"),uie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new aD({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_InvalidClientMetadataExceptionRes"),lie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new qR({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_InvalidGrantExceptionRes"),die=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new $R({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_InvalidRequestExceptionRes"),pie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{endpoint:A.expectString,error:A.expectString,error_description:A.expectString,region:A.expectString});Object.assign(r,i);let o=new iD({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_InvalidRequestRegionExceptionRes"),fie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new zR({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_InvalidScopeExceptionRes"),mie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new JR({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_SlowDownExceptionRes"),hie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new QR({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_UnauthorizedClientExceptionRes"),yie=ee(async(e,t)=>{let r=(0,A.map)({}),n=e.body,i=(0,A.take)(n,{error:A.expectString,error_description:A.expectString});Object.assign(r,i);let o=new tD({$metadata:mt(e),...r});return(0,A.decorateServiceException)(o,e.body)},"de_UnsupportedGrantTypeExceptionRes"),mt=ee(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"]}),"deserializeMetadata"),_ie="aws_iam",mD=class extends A.Command.classBuilder().ep({...od}).m(function(t,r,n,i){return[(0,sd.getSerdePlugin)(n,this.serialize,this.deserialize),(0,Ka.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(cD,uD).ser(Jne).de(Zne).build(){};ee(mD,"CreateTokenCommand");var hD=mD,yD=class extends A.Command.classBuilder().ep({...od}).m(function(t,r,n,i){return[(0,sd.getSerdePlugin)(n,this.serialize,this.deserialize),(0,Ka.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(lD,dD).ser(Yne).de(eie).build(){};ee(yD,"CreateTokenWithIAMCommand");var _D=yD,vD=class extends A.Command.classBuilder().ep({...od}).m(function(t,r,n,i){return[(0,sd.getSerdePlugin)(n,this.serialize,this.deserialize),(0,Ka.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,pD).ser(Xne).de(tie).build(){};ee(vD,"RegisterClientCommand");var gD=vD,ED=class extends A.Command.classBuilder().ep({...od}).m(function(t,r,n,i){return[(0,sd.getSerdePlugin)(n,this.serialize,this.deserialize),(0,Ka.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(fD,void 0).ser(Qne).de(rie).build(){};ee(ED,"StartDeviceAuthorizationCommand");var SD=ED,vie={CreateTokenCommand:hD,CreateTokenWithIAMCommand:_D,RegisterClientCommand:gD,StartDeviceAuthorizationCommand:SD},bD=class extends ER{};ee(bD,"SSOOIDC");var CD=bD;(0,A.createAggregatedClient)(vie,CD)});var MD=y((KOe,ND)=>{var cd=Object.defineProperty,gie=Object.getOwnPropertyDescriptor,PD=Object.getOwnPropertyNames,Eie=Object.prototype.hasOwnProperty,ri=(e,t)=>cd(e,"name",{value:t,configurable:!0}),Sie=(e,t)=>function(){return e&&(t=(0,e[PD(e)[0]])(e=0)),t},ID=(e,t)=>{for(var r in t)cd(e,r,{get:t[r],enumerable:!0})},bie=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of PD(t))!Eie.call(e,i)&&i!==r&&cd(e,i,{get:()=>t[i],enumerable:!(n=gie(t,i))||n.enumerable});return e},Cie=e=>bie(cd({},"__esModule",{value:!0}),e),Xy={};ID(Xy,{CreateTokenCommand:()=>Yy.CreateTokenCommand,SSOOIDCClient:()=>Yy.SSOOIDCClient});var Yy,OD=Sie({"src/loadSsoOidc.ts"(){Yy=xD()}}),RD={};ID(RD,{fromSso:()=>DD,fromStatic:()=>Oie,nodeProvider:()=>Rie});ND.exports=Cie(RD);var wie=300*1e3,Qy="To refresh this SSO session run 'aws sso login' with the corresponding profile.",Jy={},xie=ri(async e=>{let{SSOOIDCClient:t}=await Promise.resolve().then(()=>(OD(),Xy));if(Jy[e])return Jy[e];let r=new t({region:e});return Jy[e]=r,r},"getSsoOidcClient"),Aie=ri(async(e,t)=>{let{CreateTokenCommand:r}=await Promise.resolve().then(()=>(OD(),Xy));return(await xie(t)).send(new r({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},"getNewSsoOidcToken"),Ir=Ft(),AD=ri(e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new Ir.TokenProviderError(`Token is expired. ${Qy}`,!1)},"validateTokenExpiry"),Qi=ri((e,t,r=!1)=>{if(typeof t>"u")throw new Ir.TokenProviderError(`Value not present for '${e}' in SSO Token${r?". Cannot refresh":""}. ${Qy}`,!1)},"validateTokenKey"),Ja=zn(),Tie=require("fs"),{writeFile:Pie}=Tie.promises,Iie=ri((e,t)=>{let r=(0,Ja.getSSOTokenFilepath)(e),n=JSON.stringify(t,null,2);return Pie(r,n)},"writeSSOTokenToFile"),TD=new Date(0),DD=ri((e={})=>async()=>{var t;(t=e.logger)==null||t.debug("@aws-sdk/token-providers","fromSso");let r=await(0,Ja.parseKnownFiles)(e),n=(0,Ja.getProfileName)(e),i=r[n];if(i){if(!i.sso_session)throw new Ir.TokenProviderError(`Profile '${n}' is missing required property 'sso_session'.`)}else throw new Ir.TokenProviderError(`Profile '${n}' could not be found in shared credentials file.`,!1);let o=i.sso_session,a=(await(0,Ja.loadSsoSessionData)(e))[o];if(!a)throw new Ir.TokenProviderError(`Sso session '${o}' could not be found in shared credentials file.`,!1);for(let v of["sso_start_url","sso_region"])if(!a[v])throw new Ir.TokenProviderError(`Sso session '${o}' is missing required property '${v}'.`,!1);let c=a.sso_start_url,u=a.sso_region,d;try{d=await(0,Ja.getSSOTokenFromFile)(o)}catch{throw new Ir.TokenProviderError(`The SSO session token associated with profile=${n} was not found or is invalid. ${Qy}`,!1)}Qi("accessToken",d.accessToken),Qi("expiresAt",d.expiresAt);let{accessToken:p,expiresAt:m}=d,h={token:p,expiration:new Date(m)};if(h.expiration.getTime()-Date.now()>wie)return h;if(Date.now()-TD.getTime()<30*1e3)return AD(h),h;Qi("clientId",d.clientId,!0),Qi("clientSecret",d.clientSecret,!0),Qi("refreshToken",d.refreshToken,!0);try{TD.setTime(Date.now());let v=await Aie(d,u);Qi("accessToken",v.accessToken),Qi("expiresIn",v.expiresIn);let _=new Date(Date.now()+v.expiresIn*1e3);try{await Iie(o,{...d,accessToken:v.accessToken,expiresAt:_.toISOString(),refreshToken:v.refreshToken})}catch{}return{token:v.accessToken,expiration:_}}catch{return AD(h),h}},"fromSso"),Oie=ri(({token:e,logger:t})=>async()=>{if(t==null||t.debug("@aws-sdk/token-providers","fromStatic"),!e||!e.token)throw new Ir.TokenProviderError("Please pass a valid token to fromStatic",!1);return e},"fromStatic"),Rie=ri((e={})=>(0,Ir.memoize)((0,Ir.chain)(DD(e),async()=>{throw new Ir.TokenProviderError("Could not load token from any providers",!1)}),t=>t.expiration!==void 0&&t.expiration.getTime()-Date.now()<3e5,t=>t.expiration!==void 0),"nodeProvider")});var e_=y((JOe,GD)=>{var ld=Object.defineProperty,Die=Object.getOwnPropertyDescriptor,kD=Object.getOwnPropertyNames,Nie=Object.prototype.hasOwnProperty,dd=(e,t)=>ld(e,"name",{value:t,configurable:!0}),Mie=(e,t)=>function(){return e&&(t=(0,e[kD(e)[0]])(e=0)),t},FD=(e,t)=>{for(var r in t)ld(e,r,{get:t[r],enumerable:!0})},Lie=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of kD(t))!Nie.call(e,i)&&i!==r&&ld(e,i,{get:()=>t[i],enumerable:!(n=Die(t,i))||n.enumerable});return e},kie=e=>Lie(ld({},"__esModule",{value:!0}),e),BD={};FD(BD,{GetRoleCredentialsCommand:()=>Zy.GetRoleCredentialsCommand,SSOClient:()=>Zy.SSOClient});var Zy,Fie=Mie({"src/loadSso.ts"(){Zy=jO()}}),jD={};FD(jD,{fromSSO:()=>jie,isSsoProfile:()=>qD,validateSsoProfile:()=>UD});GD.exports=kie(jD);var qD=dd(e=>e&&(typeof e.sso_start_url=="string"||typeof e.sso_account_id=="string"||typeof e.sso_session=="string"||typeof e.sso_region=="string"||typeof e.sso_role_name=="string"),"isSsoProfile"),Bie=MD(),Or=Ft(),ud=zn(),Ya=!1,LD=dd(async({ssoStartUrl:e,ssoSession:t,ssoAccountId:r,ssoRegion:n,ssoRoleName:i,ssoClient:o,clientConfig:s,profile:a})=>{let c,u="To refresh this SSO session run aws sso login with the corresponding profile.";if(t)try{let k=await(0,Bie.fromSso)({profile:a})();c={accessToken:k.token,expiresAt:new Date(k.expiration).toISOString()}}catch(k){throw new Or.CredentialsProviderError(k.message,Ya)}else try{c=await(0,ud.getSSOTokenFromFile)(e)}catch{throw new Or.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${u}`,Ya)}if(new Date(c.expiresAt).getTime()-Date.now()<=0)throw new Or.CredentialsProviderError(`The SSO session associated with this profile has expired. ${u}`,Ya);let{accessToken:d}=c,{SSOClient:p,GetRoleCredentialsCommand:m}=await Promise.resolve().then(()=>(Fie(),BD)),h=o||new p(Object.assign({},s??{},{region:(s==null?void 0:s.region)??n})),v;try{v=await h.send(new m({accountId:r,roleName:i,accessToken:d}))}catch(k){throw Or.CredentialsProviderError.from(k,Ya)}let{roleCredentials:{accessKeyId:_,secretAccessKey:g,sessionToken:x,expiration:S,credentialScope:M}={}}=v;if(!_||!g||!x||!S)throw new Or.CredentialsProviderError("SSO returns an invalid temporary credential.",Ya);return{accessKeyId:_,secretAccessKey:g,sessionToken:x,expiration:new Date(S),credentialScope:M}},"resolveSSOCredentials"),UD=dd(e=>{let{sso_start_url:t,sso_account_id:r,sso_region:n,sso_role_name:i}=e;if(!t||!r||!n||!i)throw new Or.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}
44
- Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,!1);return e},"validateSsoProfile"),jie=dd((e={})=>async()=>{var t;(t=e.logger)==null||t.debug("@aws-sdk/credential-provider-sso","fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:i,ssoRoleName:o,ssoSession:s}=e,{ssoClient:a}=e,c=(0,ud.getProfileName)(e);if(!r&&!n&&!i&&!o&&!s){let d=(await(0,ud.parseKnownFiles)(e))[c];if(!d)throw new Or.CredentialsProviderError(`Profile ${c} was not found.`);if(!qD(d))throw new Or.CredentialsProviderError(`Profile ${c} is not configured with SSO credentials.`);if(d!=null&&d.sso_session){let x=(await(0,ud.loadSsoSessionData)(e))[d.sso_session],S=` configurations in profile ${c} and sso-session ${d.sso_session}`;if(i&&i!==x.sso_region)throw new Or.CredentialsProviderError("Conflicting SSO region"+S,!1);if(r&&r!==x.sso_start_url)throw new Or.CredentialsProviderError("Conflicting SSO start_url"+S,!1);d.sso_region=x.sso_region,d.sso_start_url=x.sso_start_url}let{sso_start_url:p,sso_account_id:m,sso_region:h,sso_role_name:v,sso_session:_}=UD(d);return LD({ssoStartUrl:p,ssoSession:_,ssoAccountId:m,ssoRegion:h,ssoRoleName:v,ssoClient:a,clientConfig:e.clientConfig,profile:c})}else{if(!r||!n||!i||!o)throw new Or.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"');return LD({ssoStartUrl:r,ssoSession:s,ssoAccountId:n,ssoRegion:i,ssoRoleName:o,ssoClient:a,clientConfig:e.clientConfig,profile:c})}},"fromSSO")});var t_=y(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.resolveHttpAuthSchemeConfig=Rr.resolveStsAuthConfig=Rr.defaultSTSHttpAuthSchemeProvider=Rr.defaultSTSHttpAuthSchemeParametersProvider=void 0;var qie=ft(),$D=Ur(),Uie=Xa(),Gie=async(e,t,r)=>({operation:(0,$D.getSmithyContext)(t).operation,region:await(0,$D.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});Rr.defaultSTSHttpAuthSchemeParametersProvider=Gie;function $ie(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function HD(e){return{schemeId:"smithy.api#noAuth"}}var Hie=e=>{let t=[];switch(e.operation){case"AssumeRoleWithSAML":{t.push(HD(e));break}case"AssumeRoleWithWebIdentity":{t.push(HD(e));break}default:t.push($ie(e))}return t};Rr.defaultSTSHttpAuthSchemeProvider=Hie;var Vie=e=>({...e,stsClientCtor:Uie.STSClient});Rr.resolveStsAuthConfig=Vie;var zie=e=>{let t=(0,Rr.resolveStsAuthConfig)(e);return{...(0,qie.resolveAwsSdkSigV4Config)(t)}};Rr.resolveHttpAuthSchemeConfig=zie});var Dr=y(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});Xo.commonParams=Xo.resolveClientEndpointParameters=void 0;var Wie=e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"});Xo.resolveClientEndpointParameters=Wie;Xo.commonParams={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var VD=y((QOe,Kie)=>{Kie.exports={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.556.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/core":"3.556.0","@aws-sdk/middleware-host-header":"3.535.0","@aws-sdk/middleware-logger":"3.535.0","@aws-sdk/middleware-recursion-detection":"3.535.0","@aws-sdk/middleware-user-agent":"3.540.0","@aws-sdk/region-config-resolver":"3.535.0","@aws-sdk/types":"3.535.0","@aws-sdk/util-endpoints":"3.540.0","@aws-sdk/util-user-agent-browser":"3.535.0","@aws-sdk/util-user-agent-node":"3.535.0","@smithy/config-resolver":"^2.2.0","@smithy/core":"^1.4.2","@smithy/fetch-http-handler":"^2.5.0","@smithy/hash-node":"^2.2.0","@smithy/invalid-dependency":"^2.2.0","@smithy/middleware-content-length":"^2.2.0","@smithy/middleware-endpoint":"^2.5.1","@smithy/middleware-retry":"^2.3.1","@smithy/middleware-serde":"^2.3.0","@smithy/middleware-stack":"^2.2.0","@smithy/node-config-provider":"^2.3.0","@smithy/node-http-handler":"^2.5.0","@smithy/protocol-http":"^3.3.0","@smithy/smithy-client":"^2.5.1","@smithy/types":"^2.12.0","@smithy/url-parser":"^2.2.0","@smithy/util-base64":"^2.3.0","@smithy/util-body-length-browser":"^2.2.0","@smithy/util-body-length-node":"^2.3.0","@smithy/util-defaults-mode-browser":"^2.2.1","@smithy/util-defaults-mode-node":"^2.3.1","@smithy/util-endpoints":"^1.2.0","@smithy/util-middleware":"^2.2.0","@smithy/util-retry":"^2.2.0","@smithy/util-utf8":"^2.3.0",tslib:"^2.6.2"},devDependencies:{"@smithy/service-client-documentation-generator":"^2.2.0","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=14.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/credential-provider-node":"^3.556.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}}});var zD=y(Jr=>{"use strict";var Jie=Jr&&Jr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Yie=Jr&&Jr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Xie=Jr&&Jr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Jie(t,e,r);return Yie(t,e),t};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.defaultProvider=void 0;Jr.defaultProvider=(e=>()=>Promise.resolve().then(()=>Xie(Va())).then(({defaultProvider:t})=>t(e)()))});var mN=y(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});pd.ruleSet=void 0;var iN="required",se="type",ve="fn",ge="argv",ii="ref",WD=!1,r_=!0,ni="booleanEquals",ht="stringEquals",oN="sigv4",sN="sts",aN="us-east-1",qe="endpoint",KD="https://sts.{Region}.{PartitionResult#dnsSuffix}",Yr="tree",Qo="error",i_="getAttr",JD={[iN]:!1,[se]:"String"},n_={[iN]:!0,default:!1,[se]:"Boolean"},cN={[ii]:"Endpoint"},YD={[ve]:"isSet",[ge]:[{[ii]:"Region"}]},yt={[ii]:"Region"},XD={[ve]:"aws.partition",[ge]:[yt],assign:"PartitionResult"},uN={[ii]:"UseFIPS"},lN={[ii]:"UseDualStack"},Ct={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:oN,signingName:sN,signingRegion:aN}]},headers:{}},Yt={},QD={conditions:[{[ve]:ht,[ge]:[yt,"aws-global"]}],[qe]:Ct,[se]:qe},dN={[ve]:ni,[ge]:[uN,!0]},pN={[ve]:ni,[ge]:[lN,!0]},ZD={[ve]:i_,[ge]:[{[ii]:"PartitionResult"},"supportsFIPS"]},fN={[ii]:"PartitionResult"},eN={[ve]:ni,[ge]:[!0,{[ve]:i_,[ge]:[fN,"supportsDualStack"]}]},tN=[{[ve]:"isSet",[ge]:[cN]}],rN=[dN],nN=[pN],Qie={version:"1.0",parameters:{Region:JD,UseDualStack:n_,UseFIPS:n_,Endpoint:JD,UseGlobalEndpoint:n_},rules:[{conditions:[{[ve]:ni,[ge]:[{[ii]:"UseGlobalEndpoint"},r_]},{[ve]:"not",[ge]:tN},YD,XD,{[ve]:ni,[ge]:[uN,WD]},{[ve]:ni,[ge]:[lN,WD]}],rules:[{conditions:[{[ve]:ht,[ge]:[yt,"ap-northeast-1"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"ap-south-1"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"ap-southeast-1"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"ap-southeast-2"]}],endpoint:Ct,[se]:qe},QD,{conditions:[{[ve]:ht,[ge]:[yt,"ca-central-1"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"eu-central-1"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"eu-north-1"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"eu-west-1"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"eu-west-2"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"eu-west-3"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"sa-east-1"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,aN]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"us-east-2"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"us-west-1"]}],endpoint:Ct,[se]:qe},{conditions:[{[ve]:ht,[ge]:[yt,"us-west-2"]}],endpoint:Ct,[se]:qe},{endpoint:{url:KD,properties:{authSchemes:[{name:oN,signingName:sN,signingRegion:"{Region}"}]},headers:Yt},[se]:qe}],[se]:Yr},{conditions:tN,rules:[{conditions:rN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[se]:Qo},{conditions:nN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[se]:Qo},{endpoint:{url:cN,properties:Yt,headers:Yt},[se]:qe}],[se]:Yr},{conditions:[YD],rules:[{conditions:[XD],rules:[{conditions:[dN,pN],rules:[{conditions:[{[ve]:ni,[ge]:[r_,ZD]},eN],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Yt,headers:Yt},[se]:qe}],[se]:Yr},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[se]:Qo}],[se]:Yr},{conditions:rN,rules:[{conditions:[{[ve]:ni,[ge]:[ZD,r_]}],rules:[{conditions:[{[ve]:ht,[ge]:[{[ve]:i_,[ge]:[fN,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Yt,headers:Yt},[se]:qe},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Yt,headers:Yt},[se]:qe}],[se]:Yr},{error:"FIPS is enabled but this partition does not support FIPS",[se]:Qo}],[se]:Yr},{conditions:nN,rules:[{conditions:[eN],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Yt,headers:Yt},[se]:qe}],[se]:Yr},{error:"DualStack is enabled but this partition does not support DualStack",[se]:Qo}],[se]:Yr},QD,{endpoint:{url:KD,properties:Yt,headers:Yt},[se]:qe}],[se]:Yr}],[se]:Yr},{error:"Invalid Configuration: Missing Region",[se]:Qo}]};pd.ruleSet=Qie});var yN=y(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.defaultEndpointResolver=void 0;var Zie=Io(),hN=To(),eoe=mN(),toe=(e,t={})=>(0,hN.resolveEndpoint)(eoe.ruleSet,{endpointParams:e,logger:t.logger});fd.defaultEndpointResolver=toe;hN.customEndpointFunctions.aws=Zie.awsEndpointFunctions});var gN=y(md=>{"use strict";Object.defineProperty(md,"__esModule",{value:!0});md.getRuntimeConfig=void 0;var roe=ft(),noe=bt(),ioe=Be(),ooe=$i(),_N=No(),vN=ur(),soe=t_(),aoe=yN(),coe=e=>({apiVersion:"2011-06-15",base64Decoder:(e==null?void 0:e.base64Decoder)??_N.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??_N.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??aoe.defaultEndpointResolver,extensions:(e==null?void 0:e.extensions)??[],httpAuthSchemeProvider:(e==null?void 0:e.httpAuthSchemeProvider)??soe.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new roe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new noe.NoAuthSigner}],logger:(e==null?void 0:e.logger)??new ioe.NoOpLogger,serviceId:(e==null?void 0:e.serviceId)??"STS",urlParser:(e==null?void 0:e.urlParser)??ooe.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??vN.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??vN.toUtf8});md.getRuntimeConfig=coe});var wN=y(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.getRuntimeConfig=void 0;var uoe=(zr(),_e(Vr)),loe=uoe.__importDefault(VD()),EN=zD(),SN=ft(),doe=La(),hd=Gr(),poe=bt(),foe=ka(),bN=Hr(),Qa=fn(),CN=Ki(),moe=Fa(),hoe=Ro(),yoe=gN(),_oe=Be(),voe=qa(),goe=Be(),Eoe=e=>{(0,goe.emitWarningIfUnsupportedVersion)(process.version);let t=(0,voe.resolveDefaultsModeConfig)(e),r=()=>t().then(_oe.loadConfigsForDefaultMode),n=(0,yoe.getRuntimeConfig)(e);return(0,SN.emitWarningIfUnsupportedVersion)(process.version),{...n,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??moe.calculateBodyLength,credentialDefaultProvider:(e==null?void 0:e.credentialDefaultProvider)??EN.defaultProvider,defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,doe.defaultUserAgent)({serviceId:n.serviceId,clientVersion:loe.default.version}),httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:i=>i.getIdentityProvider("aws.auth#sigv4")||(async o=>await(0,EN.defaultProvider)((o==null?void 0:o.__config)||{})()),signer:new SN.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:i=>i.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new poe.NoAuthSigner}],maxAttempts:(e==null?void 0:e.maxAttempts)??(0,Qa.loadConfig)(bN.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),region:(e==null?void 0:e.region)??(0,Qa.loadConfig)(hd.NODE_REGION_CONFIG_OPTIONS,hd.NODE_REGION_CONFIG_FILE_OPTIONS),requestHandler:CN.NodeHttpHandler.create((e==null?void 0:e.requestHandler)??r),retryMode:(e==null?void 0:e.retryMode)??(0,Qa.loadConfig)({...bN.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||hoe.DEFAULT_RETRY_MODE}),sha256:(e==null?void 0:e.sha256)??foe.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??CN.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,Qa.loadConfig)(hd.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,Qa.loadConfig)(hd.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)}};yd.getRuntimeConfig=Eoe});var xN=y(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.resolveHttpAuthRuntimeConfig=Zo.getHttpAuthExtensionConfiguration=void 0;var Soe=e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){let o=t.findIndex(s=>s.schemeId===i.schemeId);o===-1?t.push(i):t.splice(o,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}};Zo.getHttpAuthExtensionConfiguration=Soe;var boe=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});Zo.resolveHttpAuthRuntimeConfig=boe});var o_=y(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.resolveRuntimeExtensions=void 0;var AN=Ga(),TN=St(),PN=Be(),IN=xN(),_d=e=>e,Coe=(e,t)=>{let r={..._d((0,AN.getAwsRegionExtensionConfiguration)(e)),..._d((0,PN.getDefaultExtensionConfiguration)(e)),..._d((0,TN.getHttpHandlerExtensionConfiguration)(e)),..._d((0,IN.getHttpAuthExtensionConfiguration)(e))};return t.forEach(n=>n.configure(r)),{...e,...(0,AN.resolveAwsRegionExtensionConfiguration)(r),...(0,PN.resolveDefaultRuntimeConfig)(r),...(0,TN.resolveHttpHandlerRuntimeConfig)(r),...(0,IN.resolveHttpAuthRuntimeConfig)(r)}};vd.resolveRuntimeExtensions=Coe});var Xa=y(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.STSClient=es.__Client=void 0;var ON=ca(),woe=ua(),xoe=la(),RN=pa(),Aoe=Gr(),s_=bt(),Toe=Ia(),Poe=Vi(),DN=Hr(),MN=Be();Object.defineProperty(es,"__Client",{enumerable:!0,get:function(){return MN.Client}});var NN=t_(),Ioe=Dr(),Ooe=wN(),Roe=o_(),a_=class extends MN.Client{constructor(...[t]){let r=(0,Ooe.getRuntimeConfig)(t||{}),n=(0,Ioe.resolveClientEndpointParameters)(r),i=(0,Aoe.resolveRegionConfig)(n),o=(0,Poe.resolveEndpointConfig)(i),s=(0,DN.resolveRetryConfig)(o),a=(0,ON.resolveHostHeaderConfig)(s),c=(0,RN.resolveUserAgentConfig)(a),u=(0,NN.resolveHttpAuthSchemeConfig)(c),d=(0,Roe.resolveRuntimeExtensions)(u,(t==null?void 0:t.extensions)||[]);super(d),this.config=d,this.middlewareStack.use((0,DN.getRetryPlugin)(this.config)),this.middlewareStack.use((0,Toe.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,ON.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,woe.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,xoe.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,RN.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,s_.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((0,s_.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return NN.defaultSTSHttpAuthSchemeParametersProvider}getIdentityProviderConfigProvider(){return async t=>new s_.DefaultIdentityProviderConfig({"aws.auth#sigv4":t.credentials})}};es.STSClient=a_});var G_=y((_Re,U_)=>{"use strict";var gd=Object.defineProperty,Doe=Object.getOwnPropertyDescriptor,Noe=Object.getOwnPropertyNames,Moe=Object.prototype.hasOwnProperty,I=(e,t)=>gd(e,"name",{value:t,configurable:!0}),Loe=(e,t)=>{for(var r in t)gd(e,r,{get:t[r],enumerable:!0})},k_=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Noe(t))!Moe.call(e,i)&&i!==r&&gd(e,i,{get:()=>t[i],enumerable:!(n=Doe(t,i))||n.enumerable});return e},koe=(e,t,r)=>(k_(e,t,"default"),r&&k_(r,t,"default")),Foe=e=>k_(gd({},"__esModule",{value:!0}),e),F_={};Loe(F_,{AssumeRoleCommand:()=>j_,AssumeRoleResponseFilterSensitiveLog:()=>c1,AssumeRoleWithSAMLCommand:()=>v1,AssumeRoleWithSAMLRequestFilterSensitiveLog:()=>u1,AssumeRoleWithSAMLResponseFilterSensitiveLog:()=>l1,AssumeRoleWithWebIdentityCommand:()=>q_,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>d1,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>p1,ClientInputEndpointParameters:()=>oae.ClientInputEndpointParameters,CredentialsFilterSensitiveLog:()=>cs,DecodeAuthorizationMessageCommand:()=>S1,ExpiredTokenException:()=>qN,GetAccessKeyInfoCommand:()=>C1,GetCallerIdentityCommand:()=>x1,GetFederationTokenCommand:()=>T1,GetFederationTokenResponseFilterSensitiveLog:()=>f1,GetSessionTokenCommand:()=>I1,GetSessionTokenResponseFilterSensitiveLog:()=>m1,IDPCommunicationErrorException:()=>i1,IDPRejectedClaimException:()=>QN,InvalidAuthorizationMessageException:()=>a1,InvalidIdentityTokenException:()=>t1,MalformedPolicyDocumentException:()=>$N,PackedPolicyTooLargeException:()=>zN,RegionDisabledException:()=>JN,RuntimeExtension:()=>sae.RuntimeExtension,STS:()=>R1,STSServiceException:()=>Xr,decorateDefaultCredentialProvider:()=>uae,getDefaultRoleAssumer:()=>L1,getDefaultRoleAssumerWithWebIdentity:()=>k1});U_.exports=Foe(F_);koe(F_,Xa(),U_.exports);var oi=Vi(),si=Hi(),aRe=sr(),Boe=Dr(),V=Be(),kN=class FN extends V.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,FN.prototype)}};I(kN,"STSServiceException");var Xr=kN,BN=class jN extends Xr{constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,jN.prototype)}};I(BN,"ExpiredTokenException");var qN=BN,UN=class GN extends Xr{constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,GN.prototype)}};I(UN,"MalformedPolicyDocumentException");var $N=UN,HN=class VN extends Xr{constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,VN.prototype)}};I(HN,"PackedPolicyTooLargeException");var zN=HN,WN=class KN extends Xr{constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,KN.prototype)}};I(WN,"RegionDisabledException");var JN=WN,YN=class XN extends Xr{constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,XN.prototype)}};I(YN,"IDPRejectedClaimException");var QN=YN,ZN=class e1 extends Xr{constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,e1.prototype)}};I(ZN,"InvalidIdentityTokenException");var t1=ZN,r1=class n1 extends Xr{constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,n1.prototype)}};I(r1,"IDPCommunicationErrorException");var i1=r1,o1=class s1 extends Xr{constructor(t){super({name:"InvalidAuthorizationMessageException",$fault:"client",...t}),this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,s1.prototype)}};I(o1,"InvalidAuthorizationMessageException");var a1=o1,cs=I(e=>({...e,...e.SecretAccessKey&&{SecretAccessKey:V.SENSITIVE_STRING}}),"CredentialsFilterSensitiveLog"),c1=I(e=>({...e,...e.Credentials&&{Credentials:cs(e.Credentials)}}),"AssumeRoleResponseFilterSensitiveLog"),u1=I(e=>({...e,...e.SAMLAssertion&&{SAMLAssertion:V.SENSITIVE_STRING}}),"AssumeRoleWithSAMLRequestFilterSensitiveLog"),l1=I(e=>({...e,...e.Credentials&&{Credentials:cs(e.Credentials)}}),"AssumeRoleWithSAMLResponseFilterSensitiveLog"),d1=I(e=>({...e,...e.WebIdentityToken&&{WebIdentityToken:V.SENSITIVE_STRING}}),"AssumeRoleWithWebIdentityRequestFilterSensitiveLog"),p1=I(e=>({...e,...e.Credentials&&{Credentials:cs(e.Credentials)}}),"AssumeRoleWithWebIdentityResponseFilterSensitiveLog"),f1=I(e=>({...e,...e.Credentials&&{Credentials:cs(e.Credentials)}}),"GetFederationTokenResponseFilterSensitiveLog"),m1=I(e=>({...e,...e.Credentials&&{Credentials:cs(e.Credentials)}}),"GetSessionTokenResponseFilterSensitiveLog"),Sn=ft(),joe=St(),qoe=I(async(e,t)=>{let r=ui,n;return n=fi({...lse(e,t),[di]:Use,[pi]:li}),ci(t,r,"/",void 0,n)},"se_AssumeRoleCommand"),Uoe=I(async(e,t)=>{let r=ui,n;return n=fi({...dse(e,t),[di]:Gse,[pi]:li}),ci(t,r,"/",void 0,n)},"se_AssumeRoleWithSAMLCommand"),Goe=I(async(e,t)=>{let r=ui,n;return n=fi({...pse(e,t),[di]:$se,[pi]:li}),ci(t,r,"/",void 0,n)},"se_AssumeRoleWithWebIdentityCommand"),$oe=I(async(e,t)=>{let r=ui,n;return n=fi({...fse(e,t),[di]:Hse,[pi]:li}),ci(t,r,"/",void 0,n)},"se_DecodeAuthorizationMessageCommand"),Hoe=I(async(e,t)=>{let r=ui,n;return n=fi({...mse(e,t),[di]:Vse,[pi]:li}),ci(t,r,"/",void 0,n)},"se_GetAccessKeyInfoCommand"),Voe=I(async(e,t)=>{let r=ui,n;return n=fi({...hse(e,t),[di]:zse,[pi]:li}),ci(t,r,"/",void 0,n)},"se_GetCallerIdentityCommand"),zoe=I(async(e,t)=>{let r=ui,n;return n=fi({...yse(e,t),[di]:Wse,[pi]:li}),ci(t,r,"/",void 0,n)},"se_GetFederationTokenCommand"),Woe=I(async(e,t)=>{let r=ui,n;return n=fi({..._se(e,t),[di]:Kse,[pi]:li}),ci(t,r,"/",void 0,n)},"se_GetSessionTokenCommand"),Koe=I(async(e,t)=>{if(e.statusCode>=300)return ai(e,t);let r=await(0,Sn.parseXmlBody)(e.body,t),n={};return n=Cse(r.AssumeRoleResult,t),{$metadata:wt(e),...n}},"de_AssumeRoleCommand"),Joe=I(async(e,t)=>{if(e.statusCode>=300)return ai(e,t);let r=await(0,Sn.parseXmlBody)(e.body,t),n={};return n=wse(r.AssumeRoleWithSAMLResult,t),{$metadata:wt(e),...n}},"de_AssumeRoleWithSAMLCommand"),Yoe=I(async(e,t)=>{if(e.statusCode>=300)return ai(e,t);let r=await(0,Sn.parseXmlBody)(e.body,t),n={};return n=xse(r.AssumeRoleWithWebIdentityResult,t),{$metadata:wt(e),...n}},"de_AssumeRoleWithWebIdentityCommand"),Xoe=I(async(e,t)=>{if(e.statusCode>=300)return ai(e,t);let r=await(0,Sn.parseXmlBody)(e.body,t),n={};return n=Ase(r.DecodeAuthorizationMessageResult,t),{$metadata:wt(e),...n}},"de_DecodeAuthorizationMessageCommand"),Qoe=I(async(e,t)=>{if(e.statusCode>=300)return ai(e,t);let r=await(0,Sn.parseXmlBody)(e.body,t),n={};return n=Ise(r.GetAccessKeyInfoResult,t),{$metadata:wt(e),...n}},"de_GetAccessKeyInfoCommand"),Zoe=I(async(e,t)=>{if(e.statusCode>=300)return ai(e,t);let r=await(0,Sn.parseXmlBody)(e.body,t),n={};return n=Ose(r.GetCallerIdentityResult,t),{$metadata:wt(e),...n}},"de_GetCallerIdentityCommand"),ese=I(async(e,t)=>{if(e.statusCode>=300)return ai(e,t);let r=await(0,Sn.parseXmlBody)(e.body,t),n={};return n=Rse(r.GetFederationTokenResult,t),{$metadata:wt(e),...n}},"de_GetFederationTokenCommand"),tse=I(async(e,t)=>{if(e.statusCode>=300)return ai(e,t);let r=await(0,Sn.parseXmlBody)(e.body,t),n={};return n=Dse(r.GetSessionTokenResult,t),{$metadata:wt(e),...n}},"de_GetSessionTokenCommand"),ai=I(async(e,t)=>{let r={...e,body:await(0,Sn.parseXmlErrorBody)(e.body,t)},n=Jse(e,r.body);switch(n){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await rse(r,t);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await ase(r,t);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await cse(r,t);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await use(r,t);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await ise(r,t);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await sse(r,t);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await nse(r,t);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await ose(r,t);default:let i=r.body;return qse({output:e,parsedBody:i.Error,errorCode:n})}},"de_CommandError"),rse=I(async(e,t)=>{let r=e.body,n=Tse(r.Error,t),i=new qN({$metadata:wt(e),...n});return(0,V.decorateServiceException)(i,r)},"de_ExpiredTokenExceptionRes"),nse=I(async(e,t)=>{let r=e.body,n=Nse(r.Error,t),i=new i1({$metadata:wt(e),...n});return(0,V.decorateServiceException)(i,r)},"de_IDPCommunicationErrorExceptionRes"),ise=I(async(e,t)=>{let r=e.body,n=Mse(r.Error,t),i=new QN({$metadata:wt(e),...n});return(0,V.decorateServiceException)(i,r)},"de_IDPRejectedClaimExceptionRes"),ose=I(async(e,t)=>{let r=e.body,n=Lse(r.Error,t),i=new a1({$metadata:wt(e),...n});return(0,V.decorateServiceException)(i,r)},"de_InvalidAuthorizationMessageExceptionRes"),sse=I(async(e,t)=>{let r=e.body,n=kse(r.Error,t),i=new t1({$metadata:wt(e),...n});return(0,V.decorateServiceException)(i,r)},"de_InvalidIdentityTokenExceptionRes"),ase=I(async(e,t)=>{let r=e.body,n=Fse(r.Error,t),i=new $N({$metadata:wt(e),...n});return(0,V.decorateServiceException)(i,r)},"de_MalformedPolicyDocumentExceptionRes"),cse=I(async(e,t)=>{let r=e.body,n=Bse(r.Error,t),i=new zN({$metadata:wt(e),...n});return(0,V.decorateServiceException)(i,r)},"de_PackedPolicyTooLargeExceptionRes"),use=I(async(e,t)=>{let r=e.body,n=jse(r.Error,t),i=new JN({$metadata:wt(e),...n});return(0,V.decorateServiceException)(i,r)},"de_RegionDisabledExceptionRes"),lse=I((e,t)=>{var r,n,i,o;let s={};if(e[En]!=null&&(s[En]=e[En]),e[is]!=null&&(s[is]=e[is]),e[_r]!=null){let a=Ed(e[_r],t);((r=e[_r])==null?void 0:r.length)===0&&(s.PolicyArns=[]),Object.entries(a).forEach(([c,u])=>{let d=`PolicyArns.${c}`;s[d]=u})}if(e[yr]!=null&&(s[yr]=e[yr]),e[Dt]!=null&&(s[Dt]=e[Dt]),e[ss]!=null){let a=h1(e[ss],t);((n=e[ss])==null?void 0:n.length)===0&&(s.Tags=[]),Object.entries(a).forEach(([c,u])=>{let d=`Tags.${c}`;s[d]=u})}if(e[R_]!=null){let a=bse(e[R_],t);((i=e[R_])==null?void 0:i.length)===0&&(s.TransitiveTagKeys=[]),Object.entries(a).forEach(([c,u])=>{let d=`TransitiveTagKeys.${c}`;s[d]=u})}if(e[p_]!=null&&(s[p_]=e[p_]),e[os]!=null&&(s[os]=e[os]),e[as]!=null&&(s[as]=e[as]),e[gr]!=null&&(s[gr]=e[gr]),e[b_]!=null){let a=Ese(e[b_],t);((o=e[b_])==null?void 0:o.length)===0&&(s.ProvidedContexts=[]),Object.entries(a).forEach(([c,u])=>{let d=`ProvidedContexts.${c}`;s[d]=u})}return s},"se_AssumeRoleRequest"),dse=I((e,t)=>{var r;let n={};if(e[En]!=null&&(n[En]=e[En]),e[E_]!=null&&(n[E_]=e[E_]),e[T_]!=null&&(n[T_]=e[T_]),e[_r]!=null){let i=Ed(e[_r],t);((r=e[_r])==null?void 0:r.length)===0&&(n.PolicyArns=[]),Object.entries(i).forEach(([o,s])=>{let a=`PolicyArns.${o}`;n[a]=s})}return e[yr]!=null&&(n[yr]=e[yr]),e[Dt]!=null&&(n[Dt]=e[Dt]),n},"se_AssumeRoleWithSAMLRequest"),pse=I((e,t)=>{var r;let n={};if(e[En]!=null&&(n[En]=e[En]),e[is]!=null&&(n[is]=e[is]),e[M_]!=null&&(n[M_]=e[M_]),e[C_]!=null&&(n[C_]=e[C_]),e[_r]!=null){let i=Ed(e[_r],t);((r=e[_r])==null?void 0:r.length)===0&&(n.PolicyArns=[]),Object.entries(i).forEach(([o,s])=>{let a=`PolicyArns.${o}`;n[a]=s})}return e[yr]!=null&&(n[yr]=e[yr]),e[Dt]!=null&&(n[Dt]=e[Dt]),n},"se_AssumeRoleWithWebIdentityRequest"),fse=I((e,t)=>{let r={};return e[f_]!=null&&(r[f_]=e[f_]),r},"se_DecodeAuthorizationMessageRequest"),mse=I((e,t)=>{let r={};return e[ts]!=null&&(r[ts]=e[ts]),r},"se_GetAccessKeyInfoRequest"),hse=I((e,t)=>({}),"se_GetCallerIdentityRequest"),yse=I((e,t)=>{var r,n;let i={};if(e[v_]!=null&&(i[v_]=e[v_]),e[yr]!=null&&(i[yr]=e[yr]),e[_r]!=null){let o=Ed(e[_r],t);((r=e[_r])==null?void 0:r.length)===0&&(i.PolicyArns=[]),Object.entries(o).forEach(([s,a])=>{let c=`PolicyArns.${s}`;i[c]=a})}if(e[Dt]!=null&&(i[Dt]=e[Dt]),e[ss]!=null){let o=h1(e[ss],t);((n=e[ss])==null?void 0:n.length)===0&&(i.Tags=[]),Object.entries(o).forEach(([s,a])=>{let c=`Tags.${s}`;i[c]=a})}return i},"se_GetFederationTokenRequest"),_se=I((e,t)=>{let r={};return e[Dt]!=null&&(r[Dt]=e[Dt]),e[os]!=null&&(r[os]=e[os]),e[as]!=null&&(r[as]=e[as]),r},"se_GetSessionTokenRequest"),Ed=I((e,t)=>{let r={},n=1;for(let i of e){if(i===null)continue;let o=vse(i,t);Object.entries(o).forEach(([s,a])=>{r[`member.${n}.${s}`]=a}),n++}return r},"se_policyDescriptorListType"),vse=I((e,t)=>{let r={};return e[L_]!=null&&(r[L_]=e[L_]),r},"se_PolicyDescriptorType"),gse=I((e,t)=>{let r={};return e[S_]!=null&&(r[S_]=e[S_]),e[u_]!=null&&(r[u_]=e[u_]),r},"se_ProvidedContext"),Ese=I((e,t)=>{let r={},n=1;for(let i of e){if(i===null)continue;let o=gse(i,t);Object.entries(o).forEach(([s,a])=>{r[`member.${n}.${s}`]=a}),n++}return r},"se_ProvidedContextsListType"),Sse=I((e,t)=>{let r={};return e[__]!=null&&(r[__]=e[__]),e[N_]!=null&&(r[N_]=e[N_]),r},"se_Tag"),bse=I((e,t)=>{let r={},n=1;for(let i of e)i!==null&&(r[`member.${n}`]=i,n++);return r},"se_tagKeyListType"),h1=I((e,t)=>{let r={},n=1;for(let i of e){if(i===null)continue;let o=Sse(i,t);Object.entries(o).forEach(([s,a])=>{r[`member.${n}.${s}`]=a}),n++}return r},"se_tagListType"),B_=I((e,t)=>{let r={};return e[c_]!=null&&(r[c_]=(0,V.expectString)(e[c_])),e[gn]!=null&&(r[gn]=(0,V.expectString)(e[gn])),r},"de_AssumedRoleUser"),Cse=I((e,t)=>{let r={};return e[Rt]!=null&&(r[Rt]=Za(e[Rt],t)),e[vn]!=null&&(r[vn]=B_(e[vn],t)),e[vr]!=null&&(r[vr]=(0,V.strictParseInt32)(e[vr])),e[gr]!=null&&(r[gr]=(0,V.expectString)(e[gr])),r},"de_AssumeRoleResponse"),wse=I((e,t)=>{let r={};return e[Rt]!=null&&(r[Rt]=Za(e[Rt],t)),e[vn]!=null&&(r[vn]=B_(e[vn],t)),e[vr]!=null&&(r[vr]=(0,V.strictParseInt32)(e[vr])),e[x_]!=null&&(r[x_]=(0,V.expectString)(e[x_])),e[I_]!=null&&(r[I_]=(0,V.expectString)(e[I_])),e[y_]!=null&&(r[y_]=(0,V.expectString)(e[y_])),e[ns]!=null&&(r[ns]=(0,V.expectString)(e[ns])),e[g_]!=null&&(r[g_]=(0,V.expectString)(e[g_])),e[gr]!=null&&(r[gr]=(0,V.expectString)(e[gr])),r},"de_AssumeRoleWithSAMLResponse"),xse=I((e,t)=>{let r={};return e[Rt]!=null&&(r[Rt]=Za(e[Rt],t)),e[P_]!=null&&(r[P_]=(0,V.expectString)(e[P_])),e[vn]!=null&&(r[vn]=B_(e[vn],t)),e[vr]!=null&&(r[vr]=(0,V.strictParseInt32)(e[vr])),e[w_]!=null&&(r[w_]=(0,V.expectString)(e[w_])),e[ns]!=null&&(r[ns]=(0,V.expectString)(e[ns])),e[gr]!=null&&(r[gr]=(0,V.expectString)(e[gr])),r},"de_AssumeRoleWithWebIdentityResponse"),Za=I((e,t)=>{let r={};return e[ts]!=null&&(r[ts]=(0,V.expectString)(e[ts])),e[A_]!=null&&(r[A_]=(0,V.expectString)(e[A_])),e[O_]!=null&&(r[O_]=(0,V.expectString)(e[O_])),e[d_]!=null&&(r[d_]=(0,V.expectNonNull)((0,V.parseRfc3339DateTimeWithOffset)(e[d_]))),r},"de_Credentials"),Ase=I((e,t)=>{let r={};return e[l_]!=null&&(r[l_]=(0,V.expectString)(e[l_])),r},"de_DecodeAuthorizationMessageResponse"),Tse=I((e,t)=>{let r={};return e[Ue]!=null&&(r[Ue]=(0,V.expectString)(e[Ue])),r},"de_ExpiredTokenException"),Pse=I((e,t)=>{let r={};return e[h_]!=null&&(r[h_]=(0,V.expectString)(e[h_])),e[gn]!=null&&(r[gn]=(0,V.expectString)(e[gn])),r},"de_FederatedUser"),Ise=I((e,t)=>{let r={};return e[rs]!=null&&(r[rs]=(0,V.expectString)(e[rs])),r},"de_GetAccessKeyInfoResponse"),Ose=I((e,t)=>{let r={};return e[D_]!=null&&(r[D_]=(0,V.expectString)(e[D_])),e[rs]!=null&&(r[rs]=(0,V.expectString)(e[rs])),e[gn]!=null&&(r[gn]=(0,V.expectString)(e[gn])),r},"de_GetCallerIdentityResponse"),Rse=I((e,t)=>{let r={};return e[Rt]!=null&&(r[Rt]=Za(e[Rt],t)),e[m_]!=null&&(r[m_]=Pse(e[m_],t)),e[vr]!=null&&(r[vr]=(0,V.strictParseInt32)(e[vr])),r},"de_GetFederationTokenResponse"),Dse=I((e,t)=>{let r={};return e[Rt]!=null&&(r[Rt]=Za(e[Rt],t)),r},"de_GetSessionTokenResponse"),Nse=I((e,t)=>{let r={};return e[Ue]!=null&&(r[Ue]=(0,V.expectString)(e[Ue])),r},"de_IDPCommunicationErrorException"),Mse=I((e,t)=>{let r={};return e[Ue]!=null&&(r[Ue]=(0,V.expectString)(e[Ue])),r},"de_IDPRejectedClaimException"),Lse=I((e,t)=>{let r={};return e[Ue]!=null&&(r[Ue]=(0,V.expectString)(e[Ue])),r},"de_InvalidAuthorizationMessageException"),kse=I((e,t)=>{let r={};return e[Ue]!=null&&(r[Ue]=(0,V.expectString)(e[Ue])),r},"de_InvalidIdentityTokenException"),Fse=I((e,t)=>{let r={};return e[Ue]!=null&&(r[Ue]=(0,V.expectString)(e[Ue])),r},"de_MalformedPolicyDocumentException"),Bse=I((e,t)=>{let r={};return e[Ue]!=null&&(r[Ue]=(0,V.expectString)(e[Ue])),r},"de_PackedPolicyTooLargeException"),jse=I((e,t)=>{let r={};return e[Ue]!=null&&(r[Ue]=(0,V.expectString)(e[Ue])),r},"de_RegionDisabledException"),wt=I(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"]}),"deserializeMetadata"),qse=(0,V.withBaseException)(Xr),ci=I(async(e,t,r,n,i)=>{let{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),u={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+r:c+r,headers:t};return n!==void 0&&(u.hostname=n),i!==void 0&&(u.body=i),new joe.HttpRequest(u)},"buildHttpRpcRequest"),ui={"content-type":"application/x-www-form-urlencoded"},li="2011-06-15",di="Action",ts="AccessKeyId",Use="AssumeRole",c_="AssumedRoleId",vn="AssumedRoleUser",Gse="AssumeRoleWithSAML",$se="AssumeRoleWithWebIdentity",rs="Account",gn="Arn",ns="Audience",Rt="Credentials",u_="ContextAssertion",Hse="DecodeAuthorizationMessage",l_="DecodedMessage",Dt="DurationSeconds",d_="Expiration",p_="ExternalId",f_="EncodedMessage",m_="FederatedUser",h_="FederatedUserId",Vse="GetAccessKeyInfo",zse="GetCallerIdentity",Wse="GetFederationToken",Kse="GetSessionToken",y_="Issuer",__="Key",v_="Name",g_="NameQualifier",yr="Policy",_r="PolicyArns",E_="PrincipalArn",S_="ProviderArn",b_="ProvidedContexts",C_="ProviderId",vr="PackedPolicySize",w_="Provider",En="RoleArn",is="RoleSessionName",x_="Subject",A_="SecretAccessKey",T_="SAMLAssertion",P_="SubjectFromWebIdentityToken",gr="SourceIdentity",os="SerialNumber",I_="SubjectType",O_="SessionToken",ss="Tags",as="TokenCode",R_="TransitiveTagKeys",D_="UserId",pi="Version",N_="Value",M_="WebIdentityToken",L_="arn",Ue="message",fi=I(e=>Object.entries(e).map(([t,r])=>(0,V.extendedEncodeURIComponent)(t)+"="+(0,V.extendedEncodeURIComponent)(r)).join("&"),"buildFormUrlencodedString"),Jse=I((e,t)=>{var r;if(((r=t.Error)==null?void 0:r.Code)!==void 0)return t.Error.Code;if(e.statusCode==404)return"NotFound"},"loadQueryErrorCode"),y1=class extends V.Command.classBuilder().ep({...Boe.commonParams}).m(function(t,r,n,i){return[(0,si.getSerdePlugin)(n,this.serialize,this.deserialize),(0,oi.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,c1).ser(qoe).de(Koe).build(){};I(y1,"AssumeRoleCommand");var j_=y1,Yse=Dr(),_1=class extends V.Command.classBuilder().ep({...Yse.commonParams}).m(function(t,r,n,i){return[(0,si.getSerdePlugin)(n,this.serialize,this.deserialize),(0,oi.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(u1,l1).ser(Uoe).de(Joe).build(){};I(_1,"AssumeRoleWithSAMLCommand");var v1=_1,Xse=Dr(),g1=class extends V.Command.classBuilder().ep({...Xse.commonParams}).m(function(t,r,n,i){return[(0,si.getSerdePlugin)(n,this.serialize,this.deserialize),(0,oi.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(d1,p1).ser(Goe).de(Yoe).build(){};I(g1,"AssumeRoleWithWebIdentityCommand");var q_=g1,Qse=Dr(),E1=class extends V.Command.classBuilder().ep({...Qse.commonParams}).m(function(t,r,n,i){return[(0,si.getSerdePlugin)(n,this.serialize,this.deserialize),(0,oi.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser($oe).de(Xoe).build(){};I(E1,"DecodeAuthorizationMessageCommand");var S1=E1,Zse=Dr(),b1=class extends V.Command.classBuilder().ep({...Zse.commonParams}).m(function(t,r,n,i){return[(0,si.getSerdePlugin)(n,this.serialize,this.deserialize),(0,oi.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(Hoe).de(Qoe).build(){};I(b1,"GetAccessKeyInfoCommand");var C1=b1,eae=Dr(),w1=class extends V.Command.classBuilder().ep({...eae.commonParams}).m(function(t,r,n,i){return[(0,si.getSerdePlugin)(n,this.serialize,this.deserialize),(0,oi.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(Voe).de(Zoe).build(){};I(w1,"GetCallerIdentityCommand");var x1=w1,tae=Dr(),A1=class extends V.Command.classBuilder().ep({...tae.commonParams}).m(function(t,r,n,i){return[(0,si.getSerdePlugin)(n,this.serialize,this.deserialize),(0,oi.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,f1).ser(zoe).de(ese).build(){};I(A1,"GetFederationTokenCommand");var T1=A1,rae=Dr(),P1=class extends V.Command.classBuilder().ep({...rae.commonParams}).m(function(t,r,n,i){return[(0,si.getSerdePlugin)(n,this.serialize,this.deserialize),(0,oi.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,m1).ser(Woe).de(tse).build(){};I(P1,"GetSessionTokenCommand");var I1=P1,nae=Xa(),iae={AssumeRoleCommand:j_,AssumeRoleWithSAMLCommand:v1,AssumeRoleWithWebIdentityCommand:q_,DecodeAuthorizationMessageCommand:S1,GetAccessKeyInfoCommand:C1,GetCallerIdentityCommand:x1,GetFederationTokenCommand:T1,GetSessionTokenCommand:I1},O1=class extends nae.STSClient{};I(O1,"STS");var R1=O1;(0,V.createAggregatedClient)(iae,R1);var oae=Dr(),sae=o_(),LN="us-east-1",D1=I(async(e,t,r)=>{var n;let i=typeof e=="function"?await e():e,o=typeof t=="function"?await t():t;return(n=r==null?void 0:r.debug)==null||n.call(r,"@aws-sdk/client-sts::resolveRegion","accepting first of:",`${i} (provider)`,`${o} (parent client)`,`${LN} (STS default)`),i??o??LN},"resolveRegion"),aae=I((e,t)=>{let r,n;return async(i,o)=>{var s,a,c;if(n=i,!r){let{logger:d=(s=e==null?void 0:e.parentClientConfig)==null?void 0:s.logger,region:p,requestHandler:m=(a=e==null?void 0:e.parentClientConfig)==null?void 0:a.requestHandler,credentialProviderLogger:h}=e,v=await D1(p,(c=e==null?void 0:e.parentClientConfig)==null?void 0:c.region,h);r=new t({credentialDefaultProvider:()=>async()=>n,region:v,requestHandler:m,logger:d})}let{Credentials:u}=await r.send(new j_(o));if(!u||!u.AccessKeyId||!u.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${o.RoleArn}`);return{accessKeyId:u.AccessKeyId,secretAccessKey:u.SecretAccessKey,sessionToken:u.SessionToken,expiration:u.Expiration,credentialScope:u.CredentialScope}}},"getDefaultRoleAssumer"),cae=I((e,t)=>{let r;return async n=>{var i,o,s;if(!r){let{logger:c=(i=e==null?void 0:e.parentClientConfig)==null?void 0:i.logger,region:u,requestHandler:d=(o=e==null?void 0:e.parentClientConfig)==null?void 0:o.requestHandler,credentialProviderLogger:p}=e,m=await D1(u,(s=e==null?void 0:e.parentClientConfig)==null?void 0:s.region,p);r=new t({region:m,requestHandler:d,logger:c})}let{Credentials:a}=await r.send(new q_(n));if(!a||!a.AccessKeyId||!a.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${n.RoleArn}`);return{accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,sessionToken:a.SessionToken,expiration:a.Expiration,credentialScope:a.CredentialScope}}},"getDefaultRoleAssumerWithWebIdentity"),N1=Xa(),M1=I((e,t)=>{var r;return t?(r=class extends e{constructor(n){super(n);for(let i of t)this.middlewareStack.use(i)}},I(r,"CustomizableSTSClient"),r):e},"getCustomizableStsClientCtor"),L1=I((e={},t)=>aae(e,M1(N1.STSClient,t)),"getDefaultRoleAssumer"),k1=I((e={},t)=>cae(e,M1(N1.STSClient,t)),"getDefaultRoleAssumerWithWebIdentity"),uae=I(e=>t=>e({roleAssumer:L1(t),roleAssumerWithWebIdentity:k1(t),...t}),"decorateDefaultCredentialProvider")});var V_=y((gRe,j1)=>{var Sd=Object.defineProperty,lae=Object.getOwnPropertyDescriptor,dae=Object.getOwnPropertyNames,pae=Object.prototype.hasOwnProperty,H_=(e,t)=>Sd(e,"name",{value:t,configurable:!0}),fae=(e,t)=>{for(var r in t)Sd(e,r,{get:t[r],enumerable:!0})},mae=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of dae(t))!pae.call(e,i)&&i!==r&&Sd(e,i,{get:()=>t[i],enumerable:!(n=lae(t,i))||n.enumerable});return e},hae=e=>mae(Sd({},"__esModule",{value:!0}),e),B1={};fae(B1,{fromProcess:()=>Eae});j1.exports=hae(B1);var F1=zn(),$_=Ft(),yae=require("child_process"),_ae=require("util"),vae=H_((e,t)=>{if(t.Version!==1)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(t.AccessKeyId===void 0||t.SecretAccessKey===void 0)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(t.Expiration){let r=new Date;if(new Date(t.Expiration)<r)throw Error(`Profile ${e} credential_process returned expired credentials.`)}return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,...t.SessionToken&&{sessionToken:t.SessionToken},...t.Expiration&&{expiration:new Date(t.Expiration)},...t.CredentialScope&&{credentialScope:t.CredentialScope}}},"getValidatedProcessCredentials"),gae=H_(async(e,t)=>{let r=t[e];if(t[e]){let n=r.credential_process;if(n!==void 0){let i=(0,_ae.promisify)(yae.exec);try{let{stdout:o}=await i(n),s;try{s=JSON.parse(o.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return vae(e,s)}catch(o){throw new $_.CredentialsProviderError(o.message)}}else throw new $_.CredentialsProviderError(`Profile ${e} did not contain credential_process.`)}else throw new $_.CredentialsProviderError(`Profile ${e} could not be found in shared credentials file.`)},"resolveProcessCredentials"),Eae=H_((e={})=>async()=>{var t;(t=e.logger)==null||t.debug("@aws-sdk/credential-provider-process","fromProcess");let r=await(0,F1.parseKnownFiles)(e);return gae((0,F1.getProfileName)(e),r)},"fromProcess")});var q1=y(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.getDefaultRoleAssumerWithWebIdentity=void 0;var Sae=G_();Object.defineProperty(bd,"getDefaultRoleAssumerWithWebIdentity",{enumerable:!0,get:function(){return Sae.getDefaultRoleAssumerWithWebIdentity}})});var z_=y(Qr=>{"use strict";var bae=Qr&&Qr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Cae=Qr&&Qr.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wae=Qr&&Qr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&bae(t,e,r);return Cae(t,e),t};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.fromWebToken=void 0;var xae=e=>async()=>{var t;(t=e.logger)===null||t===void 0||t.debug("@aws-sdk/credential-provider-web-identity","fromWebToken");let{roleArn:r,roleSessionName:n,webIdentityToken:i,providerId:o,policyArns:s,policy:a,durationSeconds:c}=e,{roleAssumerWithWebIdentity:u}=e;if(!u){let{getDefaultRoleAssumerWithWebIdentity:d}=await Promise.resolve().then(()=>wae(q1()));u=d({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:e.parentClientConfig},e.clientPlugins)}return u({RoleArn:r,RoleSessionName:n??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:i,ProviderId:o,PolicyArns:s,Policy:a,DurationSeconds:c})};Qr.fromWebToken=xae});var U1=y(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.fromTokenFile=void 0;var Aae=Ft(),Tae=require("fs"),Pae=z_(),Iae="AWS_WEB_IDENTITY_TOKEN_FILE",Oae="AWS_ROLE_ARN",Rae="AWS_ROLE_SESSION_NAME",Dae=(e={})=>async()=>{var t,r,n,i;(t=e.logger)===null||t===void 0||t.debug("@aws-sdk/credential-provider-web-identity","fromTokenFile");let o=(r=e==null?void 0:e.webIdentityTokenFile)!==null&&r!==void 0?r:process.env[Iae],s=(n=e==null?void 0:e.roleArn)!==null&&n!==void 0?n:process.env[Oae],a=(i=e==null?void 0:e.roleSessionName)!==null&&i!==void 0?i:process.env[Rae];if(!o||!s)throw new Aae.CredentialsProviderError("Web identity configuration not specified");return(0,Pae.fromWebToken)({...e,webIdentityToken:(0,Tae.readFileSync)(o,{encoding:"ascii"}),roleArn:s,roleSessionName:a})()};Cd.fromTokenFile=Dae});var J_=y((CRe,wd)=>{var G1=Object.defineProperty,Nae=Object.getOwnPropertyDescriptor,Mae=Object.getOwnPropertyNames,Lae=Object.prototype.hasOwnProperty,W_=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Mae(t))!Lae.call(e,i)&&i!==r&&G1(e,i,{get:()=>t[i],enumerable:!(n=Nae(t,i))||n.enumerable});return e},$1=(e,t,r)=>(W_(e,t,"default"),r&&W_(r,t,"default")),kae=e=>W_(G1({},"__esModule",{value:!0}),e),K_={};wd.exports=kae(K_);$1(K_,U1(),wd.exports);$1(K_,z_(),wd.exports)});var eM=y((wRe,Z1)=>{var Fae=Object.create,ec=Object.defineProperty,Bae=Object.getOwnPropertyDescriptor,z1=Object.getOwnPropertyNames,jae=Object.getPrototypeOf,qae=Object.prototype.hasOwnProperty,Nt=(e,t)=>ec(e,"name",{value:t,configurable:!0}),Uae=(e,t)=>function(){return e&&(t=(0,e[z1(e)[0]])(e=0)),t},W1=(e,t)=>{for(var r in t)ec(e,r,{get:t[r],enumerable:!0})},K1=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of z1(t))!qae.call(e,i)&&i!==r&&ec(e,i,{get:()=>t[i],enumerable:!(n=Bae(t,i))||n.enumerable});return e},us=(e,t,r)=>(r=e!=null?Fae(jae(e)):{},K1(t||!e||!e.__esModule?ec(r,"default",{value:e,enumerable:!0}):r,e)),Gae=e=>K1(ec({},"__esModule",{value:!0}),e),J1={};W1(J1,{getDefaultRoleAssumer:()=>Y1.getDefaultRoleAssumer});var Y1,$ae=Uae({"src/loadSts.ts"(){Y1=G_()}}),X1={};W1(X1,{fromIni:()=>tce});Z1.exports=Gae(X1);var Y_=zn(),xd=Ft(),Hae=Nt((e,t)=>{let r={EcsContainer:n=>Promise.resolve().then(()=>us(Ma())).then(({fromContainerMetadata:i})=>i(n)),Ec2InstanceMetadata:n=>Promise.resolve().then(()=>us(Ma())).then(({fromInstanceMetadata:i})=>i(n)),Environment:n=>Promise.resolve().then(()=>us(Ly())).then(({fromEnv:i})=>i(n))};if(e in r)return r[e];throw new xd.CredentialsProviderError(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`)},"resolveCredentialSource"),Vae=Nt(e=>!!e&&typeof e=="object"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(zae(e)||Wae(e)),"isAssumeRoleProfile"),zae=Nt(e=>typeof e.source_profile=="string"&&typeof e.credential_source>"u","isAssumeRoleWithSourceProfile"),Wae=Nt(e=>typeof e.credential_source=="string"&&typeof e.source_profile>"u","isAssumeRoleWithProviderProfile"),Kae=Nt(async(e,t,r,n={})=>{var i;(i=r.logger)==null||i.debug("@aws-sdk/credential-provider-ini","resolveAssumeRoleCredentials (STS)");let o=t[e];if(!r.roleAssumer){let{getDefaultRoleAssumer:p}=await Promise.resolve().then(()=>($ae(),J1));r.roleAssumer=p({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r==null?void 0:r.parentClientConfig},r.clientPlugins)}let{source_profile:s}=o;if(s&&s in n)throw new xd.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${(0,Y_.getProfileName)(r)}. Profiles visited: `+Object.keys(n).join(", "),!1);let a=s?Q1(s,t,r,{...n,[s]:!0}):(await Hae(o.credential_source,e)(r))(),c={RoleArn:o.role_arn,RoleSessionName:o.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:o.external_id,DurationSeconds:parseInt(o.duration_seconds||"3600",10)},{mfa_serial:u}=o;if(u){if(!r.mfaCodeProvider)throw new xd.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,!1);c.SerialNumber=u,c.TokenCode=await r.mfaCodeProvider(u)}let d=await a;return r.roleAssumer(d,c)},"resolveAssumeRoleCredentials"),Jae=Nt(e=>!!e&&typeof e=="object"&&typeof e.credential_process=="string","isProcessProfile"),Yae=Nt(async(e,t)=>Promise.resolve().then(()=>us(V_())).then(({fromProcess:r})=>r({...e,profile:t})()),"resolveProcessCredentials"),Xae=Nt(async(e,t={})=>{let{fromSSO:r}=await Promise.resolve().then(()=>us(e_()));return r({profile:e,logger:t.logger})()},"resolveSsoCredentials"),Qae=Nt(e=>e&&(typeof e.sso_start_url=="string"||typeof e.sso_account_id=="string"||typeof e.sso_session=="string"||typeof e.sso_region=="string"||typeof e.sso_role_name=="string"),"isSsoProfile"),H1=Nt(e=>!!e&&typeof e=="object"&&typeof e.aws_access_key_id=="string"&&typeof e.aws_secret_access_key=="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1,"isStaticCredsProfile"),V1=Nt((e,t)=>{var r;return(r=t==null?void 0:t.logger)==null||r.debug("@aws-sdk/credential-provider-ini","resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,credentialScope:e.aws_credential_scope})},"resolveStaticCredentials"),Zae=Nt(e=>!!e&&typeof e=="object"&&typeof e.web_identity_token_file=="string"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,"isWebIdentityProfile"),ece=Nt(async(e,t)=>Promise.resolve().then(()=>us(J_())).then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})()),"resolveWebIdentityCredentials"),Q1=Nt(async(e,t,r,n={})=>{let i=t[e];if(Object.keys(n).length>0&&H1(i))return V1(i,r);if(Vae(i))return Kae(e,t,r,n);if(H1(i))return V1(i,r);if(Zae(i))return ece(i,r);if(Jae(i))return Yae(r,e);if(Qae(i))return await Xae(e,r);throw new xd.CredentialsProviderError(`Profile ${e} could not be found or parsed in shared credentials file.`)},"resolveProfileData"),tce=Nt((e={})=>async()=>{var t;(t=e.logger)==null||t.debug("@aws-sdk/credential-provider-ini","fromIni");let r=await(0,Y_.parseKnownFiles)(e);return Q1((0,Y_.getProfileName)(e),r,e)},"fromIni")});var Va=y((xRe,oM)=>{var rce=Object.create,tc=Object.defineProperty,nce=Object.getOwnPropertyDescriptor,ice=Object.getOwnPropertyNames,oce=Object.getPrototypeOf,sce=Object.prototype.hasOwnProperty,Ad=(e,t)=>tc(e,"name",{value:t,configurable:!0}),ace=(e,t)=>{for(var r in t)tc(e,r,{get:t[r],enumerable:!0})},tM=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ice(t))!sce.call(e,i)&&i!==r&&tc(e,i,{get:()=>t[i],enumerable:!(n=nce(t,i))||n.enumerable});return e},Zi=(e,t,r)=>(r=e!=null?rce(oce(e)):{},tM(t||!e||!e.__esModule?tc(r,"default",{value:e,enumerable:!0}):r,e)),cce=e=>tM(tc({},"__esModule",{value:!0}),e),rM={};ace(rM,{credentialsTreatedAsExpired:()=>iM,credentialsWillNeedRefresh:()=>nM,defaultProvider:()=>pce});oM.exports=cce(rM);var uce=zn(),ls=Ft(),lce="AWS_EC2_METADATA_DISABLED",dce=Ad(async e=>{var t,r;let{ENV_CMDS_FULL_URI:n,ENV_CMDS_RELATIVE_URI:i,fromContainerMetadata:o,fromInstanceMetadata:s}=await Promise.resolve().then(()=>Zi(Ma()));if(process.env[i]||process.env[n]){(t=e.logger)==null||t.debug("@aws-sdk/credential-provider-node","remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:a}=await Promise.resolve().then(()=>Zi(HP()));return(0,ls.chain)(a(e),o(e))}return process.env[lce]?async()=>{throw new ls.CredentialsProviderError("EC2 Instance Metadata Service access disabled")}:((r=e.logger)==null||r.debug("@aws-sdk/credential-provider-node","remoteProvider::fromInstanceMetadata"),s(e))},"remoteProvider"),pce=Ad((e={})=>(0,ls.memoize)((0,ls.chain)(...e.profile||process.env[uce.ENV_PROFILE]?[]:[async()=>{var t;(t=e.logger)==null||t.debug("@aws-sdk/credential-provider-node","defaultProvider::fromEnv");let{fromEnv:r}=await Promise.resolve().then(()=>Zi(Ly()));return r(e)()}],async()=>{var t;(t=e.logger)==null||t.debug("@aws-sdk/credential-provider-node","defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:i,ssoRoleName:o,ssoSession:s}=e;if(!r&&!n&&!i&&!o&&!s)throw new ls.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).");let{fromSSO:a}=await Promise.resolve().then(()=>Zi(e_()));return a(e)()},async()=>{var t;(t=e.logger)==null||t.debug("@aws-sdk/credential-provider-node","defaultProvider::fromIni");let{fromIni:r}=await Promise.resolve().then(()=>Zi(eM()));return r(e)()},async()=>{var t;(t=e.logger)==null||t.debug("@aws-sdk/credential-provider-node","defaultProvider::fromProcess");let{fromProcess:r}=await Promise.resolve().then(()=>Zi(V_()));return r(e)()},async()=>{var t;(t=e.logger)==null||t.debug("@aws-sdk/credential-provider-node","defaultProvider::fromTokenFile");let{fromTokenFile:r}=await Promise.resolve().then(()=>Zi(J_()));return r(e)()},async()=>{var t;return(t=e.logger)==null||t.debug("@aws-sdk/credential-provider-node","defaultProvider::remoteProvider"),(await dce(e))()},async()=>{throw new ls.CredentialsProviderError("Could not load credentials from any providers",!1)}),iM,nM),"defaultProvider"),nM=Ad(e=>(e==null?void 0:e.expiration)!==void 0,"credentialsWillNeedRefresh"),iM=Ad(e=>(e==null?void 0:e.expiration)!==void 0&&e.expiration.getTime()-Date.now()<3e5,"credentialsTreatedAsExpired")});var bM=y(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.ruleSet=void 0;var _M="required",Qt="fn",Zt="argv",ps="ref",sM=!0,aM="isSet",rc="booleanEquals",ds="error",eo="endpoint",bn="tree",X_="PartitionResult",Q_="getAttr",cM="stringEquals",uM={[_M]:!1,type:"String"},lM={[_M]:!0,default:!1,type:"Boolean"},dM={[ps]:"Endpoint"},vM={[Qt]:rc,[Zt]:[{[ps]:"UseFIPS"},!0]},gM={[Qt]:rc,[Zt]:[{[ps]:"UseDualStack"},!0]},Xt={},EM={[ps]:"Region"},pM={[Qt]:Q_,[Zt]:[{[ps]:X_},"supportsFIPS"]},SM={[ps]:X_},fM={[Qt]:rc,[Zt]:[!0,{[Qt]:Q_,[Zt]:[SM,"supportsDualStack"]}]},mM=[vM],hM=[gM],yM=[EM],fce={version:"1.0",parameters:{Region:uM,UseDualStack:lM,UseFIPS:lM,Endpoint:uM},rules:[{conditions:[{[Qt]:aM,[Zt]:[dM]}],rules:[{conditions:mM,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ds},{conditions:hM,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ds},{endpoint:{url:dM,properties:Xt,headers:Xt},type:eo}],type:bn},{conditions:[{[Qt]:aM,[Zt]:yM}],rules:[{conditions:[{[Qt]:"aws.partition",[Zt]:yM,assign:X_}],rules:[{conditions:[vM,gM],rules:[{conditions:[{[Qt]:rc,[Zt]:[sM,pM]},fM],rules:[{endpoint:{url:"https://dynamodb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Xt,headers:Xt},type:eo}],type:bn},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ds}],type:bn},{conditions:mM,rules:[{conditions:[{[Qt]:rc,[Zt]:[pM,sM]}],rules:[{conditions:[{[Qt]:cM,[Zt]:[{[Qt]:Q_,[Zt]:[SM,"name"]},"aws-us-gov"]}],endpoint:{url:"https://dynamodb.{Region}.amazonaws.com",properties:Xt,headers:Xt},type:eo},{endpoint:{url:"https://dynamodb-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Xt,headers:Xt},type:eo}],type:bn},{error:"FIPS is enabled but this partition does not support FIPS",type:ds}],type:bn},{conditions:hM,rules:[{conditions:[fM],rules:[{endpoint:{url:"https://dynamodb.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Xt,headers:Xt},type:eo}],type:bn},{error:"DualStack is enabled but this partition does not support DualStack",type:ds}],type:bn},{conditions:[{[Qt]:cM,[Zt]:[EM,"local"]}],endpoint:{url:"http://localhost:8000",properties:{authSchemes:[{name:"sigv4",signingName:"dynamodb",signingRegion:"us-east-1"}]},headers:Xt},type:eo},{endpoint:{url:"https://dynamodb.{Region}.{PartitionResult#dnsSuffix}",properties:Xt,headers:Xt},type:eo}],type:bn}],type:bn},{error:"Invalid Configuration: Missing Region",type:ds}]};Td.ruleSet=fce});var wM=y(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.defaultEndpointResolver=void 0;var mce=Io(),CM=To(),hce=bM(),yce=(e,t={})=>(0,CM.resolveEndpoint)(hce.ruleSet,{endpointParams:e,logger:t.logger});Pd.defaultEndpointResolver=yce;CM.customEndpointFunctions.aws=mce.awsEndpointFunctions});var TM=y(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.getRuntimeConfig=void 0;var _ce=ft(),vce=Be(),gce=$i(),xM=No(),AM=ur(),Ece=Ay(),Sce=wM(),bce=e=>({apiVersion:"2012-08-10",base64Decoder:(e==null?void 0:e.base64Decoder)??xM.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??xM.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??Sce.defaultEndpointResolver,extensions:(e==null?void 0:e.extensions)??[],httpAuthSchemeProvider:(e==null?void 0:e.httpAuthSchemeProvider)??Ece.defaultDynamoDBHttpAuthSchemeProvider,httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new _ce.AwsSdkSigV4Signer}],logger:(e==null?void 0:e.logger)??new vce.NoOpLogger,serviceId:(e==null?void 0:e.serviceId)??"DynamoDB",urlParser:(e==null?void 0:e.urlParser)??gce.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??AM.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??AM.toUtf8});Id.getRuntimeConfig=bce});var OM=y(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.getRuntimeConfig=void 0;var Cce=(zr(),_e(Vr)),wce=Cce.__importDefault(bP()),xce=ft(),Ace=Va(),Tce=Jm(),Pce=La(),Od=Gr(),Ice=ka(),PM=Hr(),fs=fn(),IM=Ki(),Oce=Fa(),Rce=Ro(),Dce=TM(),Nce=Be(),Mce=qa(),Lce=Be(),kce=e=>{(0,Lce.emitWarningIfUnsupportedVersion)(process.version);let t=(0,Mce.resolveDefaultsModeConfig)(e),r=()=>t().then(Nce.loadConfigsForDefaultMode),n=(0,Dce.getRuntimeConfig)(e);return(0,xce.emitWarningIfUnsupportedVersion)(process.version),{...n,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??Oce.calculateBodyLength,credentialDefaultProvider:(e==null?void 0:e.credentialDefaultProvider)??Ace.defaultProvider,defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,Pce.defaultUserAgent)({serviceId:n.serviceId,clientVersion:wce.default.version}),endpointDiscoveryEnabledProvider:(e==null?void 0:e.endpointDiscoveryEnabledProvider)??(0,fs.loadConfig)(Tce.NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS),maxAttempts:(e==null?void 0:e.maxAttempts)??(0,fs.loadConfig)(PM.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),region:(e==null?void 0:e.region)??(0,fs.loadConfig)(Od.NODE_REGION_CONFIG_OPTIONS,Od.NODE_REGION_CONFIG_FILE_OPTIONS),requestHandler:IM.NodeHttpHandler.create((e==null?void 0:e.requestHandler)??r),retryMode:(e==null?void 0:e.retryMode)??(0,fs.loadConfig)({...PM.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||Rce.DEFAULT_RETRY_MODE}),sha256:(e==null?void 0:e.sha256)??Ice.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??IM.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,fs.loadConfig)(Od.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,fs.loadConfig)(Od.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS)}};Rd.getRuntimeConfig=kce});var kM=y((ORe,LM)=>{var Dd=Object.defineProperty,Fce=Object.getOwnPropertyDescriptor,Bce=Object.getOwnPropertyNames,jce=Object.prototype.hasOwnProperty,mi=(e,t)=>Dd(e,"name",{value:t,configurable:!0}),qce=(e,t)=>{for(var r in t)Dd(e,r,{get:t[r],enumerable:!0})},Uce=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Bce(t))!jce.call(e,i)&&i!==r&&Dd(e,i,{get:()=>t[i],enumerable:!(n=Fce(t,i))||n.enumerable});return e},Gce=e=>Uce(Dd({},"__esModule",{value:!0}),e),DM={};qce(DM,{WaiterState:()=>MM,checkExceptions:()=>Hce,createWaiter:()=>Jce,waiterServiceDefaults:()=>NM});LM.exports=Gce(DM);var $ce=mi(e=>new Promise(t=>setTimeout(t,e*1e3)),"sleep"),NM={minDelay:2,maxDelay:120},MM=(e=>(e.ABORTED="ABORTED",e.FAILURE="FAILURE",e.SUCCESS="SUCCESS",e.RETRY="RETRY",e.TIMEOUT="TIMEOUT",e))(MM||{}),Hce=mi(e=>{if(e.state==="ABORTED"){let t=new Error(`${JSON.stringify({...e,reason:"Request was aborted"})}`);throw t.name="AbortError",t}else if(e.state==="TIMEOUT"){let t=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"})}`);throw t.name="TimeoutError",t}else if(e.state!=="SUCCESS")throw new Error(`${JSON.stringify({result:e})}`);return e},"checkExceptions"),Vce=mi((e,t,r,n)=>{if(n>r)return t;let i=e*2**(n-1);return zce(e,i)},"exponentialBackoffWithJitter"),zce=mi((e,t)=>e+Math.random()*(t-e),"randomInRange"),Wce=mi(async({minDelay:e,maxDelay:t,maxWaitTime:r,abortController:n,client:i,abortSignal:o},s,a)=>{var c;let{state:u,reason:d}=await a(i,s);if(u!=="RETRY")return{state:u,reason:d};let p=1,m=Date.now()+r*1e3,h=Math.log(t/e)/Math.log(2)+1;for(;;){if((c=n==null?void 0:n.signal)!=null&&c.aborted||o!=null&&o.aborted)return{state:"ABORTED"};let v=Vce(e,t,h,p);if(Date.now()+v*1e3>m)return{state:"TIMEOUT"};await $ce(v);let{state:_,reason:g}=await a(i,s);if(_!=="RETRY")return{state:_,reason:g};p+=1}},"runPolling"),Kce=mi(e=>{if(e.maxWaitTime<1)throw new Error("WaiterConfiguration.maxWaitTime must be greater than 0");if(e.minDelay<1)throw new Error("WaiterConfiguration.minDelay must be greater than 0");if(e.maxDelay<1)throw new Error("WaiterConfiguration.maxDelay must be greater than 0");if(e.maxWaitTime<=e.minDelay)throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);if(e.maxDelay<e.minDelay)throw new Error(`WaiterConfiguration.maxDelay [${e.maxDelay}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`)},"validateWaiterOptions"),RM=mi(async e=>new Promise(t=>{e.onabort=()=>t({state:"ABORTED"})}),"abortTimeout"),Jce=mi(async(e,t,r)=>{let n={...NM,...e};Kce(n);let i=[Wce(n,t,r)];return e.abortController&&i.push(RM(e.abortController.signal)),e.abortSignal&&i.push(RM(e.abortSignal)),Promise.race(i)},"createWaiter")});var fv=y((FDe,nj)=>{"use strict";var Ld=Object.defineProperty,Yce=Object.getOwnPropertyDescriptor,Xce=Object.getOwnPropertyNames,Qce=Object.prototype.hasOwnProperty,f=(e,t)=>Ld(e,"name",{value:t,configurable:!0}),Zce=(e,t)=>{for(var r in t)Ld(e,r,{get:t[r],enumerable:!0})},eue=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Xce(t))!Qce.call(e,i)&&i!==r&&Ld(e,i,{get:()=>t[i],enumerable:!(n=Yce(t,i))||n.enumerable});return e},tue=e=>eue(Ld({},"__esModule",{value:!0}),e),$M={};Zce($M,{ApproximateCreationDateTimePrecision:()=>cue,AttributeAction:()=>uue,AttributeValue:()=>Md,BackupInUseException:()=>KM,BackupNotFoundException:()=>XM,BackupStatus:()=>due,BackupType:()=>pue,BackupTypeFilter:()=>Eue,BatchExecuteStatementCommand:()=>nF,BatchGetItemCommand:()=>oF,BatchStatementErrorCodeEnum:()=>Cue,BatchWriteItemCommand:()=>aF,BillingMode:()=>fue,ComparisonOperator:()=>xue,ConditionalCheckFailedException:()=>Nk,ConditionalOperator:()=>Aue,ContinuousBackupsStatus:()=>Tue,ContinuousBackupsUnavailableException:()=>vL,ContributorInsightsAction:()=>Iue,ContributorInsightsStatus:()=>Oue,CreateBackupCommand:()=>uF,CreateGlobalTableCommand:()=>dF,CreateTableCommand:()=>fF,DeleteBackupCommand:()=>hF,DeleteItemCommand:()=>_F,DeleteResourcePolicyCommand:()=>gF,DeleteTableCommand:()=>SF,DescribeBackupCommand:()=>CF,DescribeContinuousBackupsCommand:()=>xF,DescribeContributorInsightsCommand:()=>TF,DescribeEndpointsCommand:()=>sv,DescribeExportCommand:()=>IF,DescribeGlobalTableCommand:()=>RF,DescribeGlobalTableSettingsCommand:()=>NF,DescribeImportCommand:()=>LF,DescribeKinesisStreamingDestinationCommand:()=>FF,DescribeLimitsCommand:()=>jF,DescribeTableCommand:()=>jd,DescribeTableReplicaAutoScalingCommand:()=>GF,DescribeTimeToLiveCommand:()=>HF,DestinationStatus:()=>Vue,DisableKinesisStreamingDestinationCommand:()=>zF,DuplicateItemException:()=>XL,DynamoDB:()=>ej,DynamoDBClient:()=>vi,DynamoDBServiceException:()=>le,EnableKinesisStreamingDestinationCommand:()=>KF,ExecuteStatementCommand:()=>YF,ExecuteTransactionCommand:()=>QF,ExportConflictException:()=>sk,ExportFormat:()=>Fue,ExportNotFoundException:()=>GL,ExportStatus:()=>Bue,ExportTableToPointInTimeCommand:()=>eB,ExportType:()=>jue,ExportViewType:()=>que,GetItemCommand:()=>rB,GetResourcePolicyCommand:()=>iB,GlobalTableAlreadyExistsException:()=>OL,GlobalTableNotFoundException:()=>VL,GlobalTableStatus:()=>Rue,IdempotentParameterMismatchException:()=>ek,ImportConflictException:()=>hk,ImportNotFoundException:()=>KL,ImportStatus:()=>Gue,ImportTableCommand:()=>sB,IndexNotFoundException:()=>Ok,IndexStatus:()=>Mue,InputCompressionType:()=>$ue,InputFormat:()=>Hue,InternalServerError:()=>eL,InvalidEndpointException:()=>sL,InvalidExportTimeException:()=>uk,InvalidRestoreTimeException:()=>Sk,ItemCollectionSizeLimitExceededException:()=>hL,KeyType:()=>mue,LimitExceededException:()=>SL,ListBackupsCommand:()=>cB,ListContributorInsightsCommand:()=>av,ListExportsCommand:()=>cv,ListGlobalTablesCommand:()=>pB,ListImportsCommand:()=>uv,ListTablesCommand:()=>lv,ListTagsOfResourceCommand:()=>yB,PointInTimeRecoveryStatus:()=>Pue,PointInTimeRecoveryUnavailableException:()=>pk,PolicyNotFoundException:()=>jL,ProjectionType:()=>hue,ProvisionedThroughputExceededException:()=>uL,PutItemCommand:()=>vB,PutResourcePolicyCommand:()=>EB,QueryCommand:()=>dv,ReplicaAlreadyExistsException:()=>wk,ReplicaNotFoundException:()=>Tk,ReplicaStatus:()=>Due,RequestLimitExceeded:()=>nL,ResourceInUseException:()=>NL,ResourceNotFoundException:()=>pL,RestoreTableFromBackupCommand:()=>CB,RestoreTableToPointInTimeCommand:()=>xB,ReturnConsumedCapacity:()=>Sue,ReturnItemCollectionMetrics:()=>wue,ReturnValue:()=>kue,ReturnValuesOnConditionCheckFailure:()=>bue,S3SseAlgorithm:()=>Uue,SSEStatus:()=>_ue,SSEType:()=>yue,ScalarAttributeType:()=>lue,ScanCommand:()=>pv,Select:()=>zue,StreamViewType:()=>vue,TableAlreadyExistsException:()=>vk,TableClass:()=>Nue,TableInUseException:()=>wL,TableNotFoundException:()=>TL,TableStatus:()=>Lue,TagResourceCommand:()=>PB,TimeToLiveStatus:()=>gue,TransactGetItemsCommand:()=>OB,TransactWriteItemsCommand:()=>DB,TransactionCanceledException:()=>kk,TransactionConflictException:()=>kL,TransactionInProgressException:()=>nk,UntagResourceCommand:()=>MB,UpdateContinuousBackupsCommand:()=>kB,UpdateContributorInsightsCommand:()=>BB,UpdateGlobalTableCommand:()=>qB,UpdateGlobalTableSettingsCommand:()=>GB,UpdateItemCommand:()=>HB,UpdateKinesisStreamingDestinationCommand:()=>zB,UpdateTableCommand:()=>KB,UpdateTableReplicaAutoScalingCommand:()=>YB,UpdateTimeToLiveCommand:()=>QB,__Client:()=>l.Client,paginateListContributorInsights:()=>whe,paginateListExports:()=>Ahe,paginateListImports:()=>Phe,paginateListTables:()=>Ohe,paginateQuery:()=>Dhe,paginateScan:()=>Mhe,waitForTableExists:()=>Lhe,waitForTableNotExists:()=>Fhe,waitUntilTableExists:()=>khe,waitUntilTableNotExists:()=>Bhe});nj.exports=tue($M);var rue=Jm(),FM=ca(),nue=ua(),iue=la(),BM=pa(),oue=Gr(),Z_=bt(),sue=Ia(),jM=Hr(),qM=Ay(),z=Vi(),K=Hi(),RRe=sr(),aue=f(e=>({...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"dynamodb"}),"resolveClientEndpointParameters"),J={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},G=ft(),ev=St(),kd=(Ch(),_e(bh)),l=Be(),HM=class VM extends l.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,VM.prototype)}};f(HM,"DynamoDBServiceException");var le=HM,cue={MICROSECOND:"MICROSECOND",MILLISECOND:"MILLISECOND"},uue={ADD:"ADD",DELETE:"DELETE",PUT:"PUT"},lue={B:"B",N:"N",S:"S"},due={AVAILABLE:"AVAILABLE",CREATING:"CREATING",DELETED:"DELETED"},pue={AWS_BACKUP:"AWS_BACKUP",SYSTEM:"SYSTEM",USER:"USER"},fue={PAY_PER_REQUEST:"PAY_PER_REQUEST",PROVISIONED:"PROVISIONED"},mue={HASH:"HASH",RANGE:"RANGE"},hue={ALL:"ALL",INCLUDE:"INCLUDE",KEYS_ONLY:"KEYS_ONLY"},yue={AES256:"AES256",KMS:"KMS"},_ue={DISABLED:"DISABLED",DISABLING:"DISABLING",ENABLED:"ENABLED",ENABLING:"ENABLING",UPDATING:"UPDATING"},vue={KEYS_ONLY:"KEYS_ONLY",NEW_AND_OLD_IMAGES:"NEW_AND_OLD_IMAGES",NEW_IMAGE:"NEW_IMAGE",OLD_IMAGE:"OLD_IMAGE"},gue={DISABLED:"DISABLED",DISABLING:"DISABLING",ENABLED:"ENABLED",ENABLING:"ENABLING"},zM=class WM extends le{constructor(t){super({name:"BackupInUseException",$fault:"client",...t}),this.name="BackupInUseException",this.$fault="client",Object.setPrototypeOf(this,WM.prototype)}};f(zM,"BackupInUseException");var KM=zM,JM=class YM extends le{constructor(t){super({name:"BackupNotFoundException",$fault:"client",...t}),this.name="BackupNotFoundException",this.$fault="client",Object.setPrototypeOf(this,YM.prototype)}};f(JM,"BackupNotFoundException");var XM=JM,Eue={ALL:"ALL",AWS_BACKUP:"AWS_BACKUP",SYSTEM:"SYSTEM",USER:"USER"},Sue={INDEXES:"INDEXES",NONE:"NONE",TOTAL:"TOTAL"},bue={ALL_OLD:"ALL_OLD",NONE:"NONE"},Cue={AccessDenied:"AccessDenied",ConditionalCheckFailed:"ConditionalCheckFailed",DuplicateItem:"DuplicateItem",InternalServerError:"InternalServerError",ItemCollectionSizeLimitExceeded:"ItemCollectionSizeLimitExceeded",ProvisionedThroughputExceeded:"ProvisionedThroughputExceeded",RequestLimitExceeded:"RequestLimitExceeded",ResourceNotFound:"ResourceNotFound",ThrottlingError:"ThrottlingError",TransactionConflict:"TransactionConflict",ValidationError:"ValidationError"},QM=class ZM extends le{constructor(t){super({name:"InternalServerError",$fault:"server",...t}),this.name="InternalServerError",this.$fault="server",Object.setPrototypeOf(this,ZM.prototype)}};f(QM,"InternalServerError");var eL=QM,tL=class rL extends le{constructor(t){super({name:"RequestLimitExceeded",$fault:"client",...t}),this.name="RequestLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,rL.prototype)}};f(tL,"RequestLimitExceeded");var nL=tL,iL=class oL extends le{constructor(t){super({name:"InvalidEndpointException",$fault:"client",...t}),this.name="InvalidEndpointException",this.$fault="client",Object.setPrototypeOf(this,oL.prototype),this.Message=t.Message}};f(iL,"InvalidEndpointException");var sL=iL,aL=class cL extends le{constructor(t){super({name:"ProvisionedThroughputExceededException",$fault:"client",...t}),this.name="ProvisionedThroughputExceededException",this.$fault="client",Object.setPrototypeOf(this,cL.prototype)}};f(aL,"ProvisionedThroughputExceededException");var uL=aL,lL=class dL extends le{constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,dL.prototype)}};f(lL,"ResourceNotFoundException");var pL=lL,wue={NONE:"NONE",SIZE:"SIZE"},fL=class mL extends le{constructor(t){super({name:"ItemCollectionSizeLimitExceededException",$fault:"client",...t}),this.name="ItemCollectionSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,mL.prototype)}};f(fL,"ItemCollectionSizeLimitExceededException");var hL=fL,xue={BEGINS_WITH:"BEGINS_WITH",BETWEEN:"BETWEEN",CONTAINS:"CONTAINS",EQ:"EQ",GE:"GE",GT:"GT",IN:"IN",LE:"LE",LT:"LT",NE:"NE",NOT_CONTAINS:"NOT_CONTAINS",NOT_NULL:"NOT_NULL",NULL:"NULL"},Aue={AND:"AND",OR:"OR"},Tue={DISABLED:"DISABLED",ENABLED:"ENABLED"},Pue={DISABLED:"DISABLED",ENABLED:"ENABLED"},yL=class _L extends le{constructor(t){super({name:"ContinuousBackupsUnavailableException",$fault:"client",...t}),this.name="ContinuousBackupsUnavailableException",this.$fault="client",Object.setPrototypeOf(this,_L.prototype)}};f(yL,"ContinuousBackupsUnavailableException");var vL=yL,Iue={DISABLE:"DISABLE",ENABLE:"ENABLE"},Oue={DISABLED:"DISABLED",DISABLING:"DISABLING",ENABLED:"ENABLED",ENABLING:"ENABLING",FAILED:"FAILED"},gL=class EL extends le{constructor(t){super({name:"LimitExceededException",$fault:"client",...t}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,EL.prototype)}};f(gL,"LimitExceededException");var SL=gL,bL=class CL extends le{constructor(t){super({name:"TableInUseException",$fault:"client",...t}),this.name="TableInUseException",this.$fault="client",Object.setPrototypeOf(this,CL.prototype)}};f(bL,"TableInUseException");var wL=bL,xL=class AL extends le{constructor(t){super({name:"TableNotFoundException",$fault:"client",...t}),this.name="TableNotFoundException",this.$fault="client",Object.setPrototypeOf(this,AL.prototype)}};f(xL,"TableNotFoundException");var TL=xL,Rue={ACTIVE:"ACTIVE",CREATING:"CREATING",DELETING:"DELETING",UPDATING:"UPDATING"},Due={ACTIVE:"ACTIVE",CREATING:"CREATING",CREATION_FAILED:"CREATION_FAILED",DELETING:"DELETING",INACCESSIBLE_ENCRYPTION_CREDENTIALS:"INACCESSIBLE_ENCRYPTION_CREDENTIALS",REGION_DISABLED:"REGION_DISABLED",UPDATING:"UPDATING"},Nue={STANDARD:"STANDARD",STANDARD_INFREQUENT_ACCESS:"STANDARD_INFREQUENT_ACCESS"},PL=class IL extends le{constructor(t){super({name:"GlobalTableAlreadyExistsException",$fault:"client",...t}),this.name="GlobalTableAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,IL.prototype)}};f(PL,"GlobalTableAlreadyExistsException");var OL=PL,Mue={ACTIVE:"ACTIVE",CREATING:"CREATING",DELETING:"DELETING",UPDATING:"UPDATING"},Lue={ACTIVE:"ACTIVE",ARCHIVED:"ARCHIVED",ARCHIVING:"ARCHIVING",CREATING:"CREATING",DELETING:"DELETING",INACCESSIBLE_ENCRYPTION_CREDENTIALS:"INACCESSIBLE_ENCRYPTION_CREDENTIALS",UPDATING:"UPDATING"},RL=class DL extends le{constructor(t){super({name:"ResourceInUseException",$fault:"client",...t}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,DL.prototype)}};f(RL,"ResourceInUseException");var NL=RL,kue={ALL_NEW:"ALL_NEW",ALL_OLD:"ALL_OLD",NONE:"NONE",UPDATED_NEW:"UPDATED_NEW",UPDATED_OLD:"UPDATED_OLD"},ML=class LL extends le{constructor(t){super({name:"TransactionConflictException",$fault:"client",...t}),this.name="TransactionConflictException",this.$fault="client",Object.setPrototypeOf(this,LL.prototype)}};f(ML,"TransactionConflictException");var kL=ML,FL=class BL extends le{constructor(t){super({name:"PolicyNotFoundException",$fault:"client",...t}),this.name="PolicyNotFoundException",this.$fault="client",Object.setPrototypeOf(this,BL.prototype)}};f(FL,"PolicyNotFoundException");var jL=FL,Fue={DYNAMODB_JSON:"DYNAMODB_JSON",ION:"ION"},Bue={COMPLETED:"COMPLETED",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"},jue={FULL_EXPORT:"FULL_EXPORT",INCREMENTAL_EXPORT:"INCREMENTAL_EXPORT"},que={NEW_AND_OLD_IMAGES:"NEW_AND_OLD_IMAGES",NEW_IMAGE:"NEW_IMAGE"},Uue={AES256:"AES256",KMS:"KMS"},qL=class UL extends le{constructor(t){super({name:"ExportNotFoundException",$fault:"client",...t}),this.name="ExportNotFoundException",this.$fault="client",Object.setPrototypeOf(this,UL.prototype)}};f(qL,"ExportNotFoundException");var GL=qL,$L=class HL extends le{constructor(t){super({name:"GlobalTableNotFoundException",$fault:"client",...t}),this.name="GlobalTableNotFoundException",this.$fault="client",Object.setPrototypeOf(this,HL.prototype)}};f($L,"GlobalTableNotFoundException");var VL=$L,Gue={CANCELLED:"CANCELLED",CANCELLING:"CANCELLING",COMPLETED:"COMPLETED",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"},$ue={GZIP:"GZIP",NONE:"NONE",ZSTD:"ZSTD"},Hue={CSV:"CSV",DYNAMODB_JSON:"DYNAMODB_JSON",ION:"ION"},zL=class WL extends le{constructor(t){super({name:"ImportNotFoundException",$fault:"client",...t}),this.name="ImportNotFoundException",this.$fault="client",Object.setPrototypeOf(this,WL.prototype)}};f(zL,"ImportNotFoundException");var KL=zL,Vue={ACTIVE:"ACTIVE",DISABLED:"DISABLED",DISABLING:"DISABLING",ENABLE_FAILED:"ENABLE_FAILED",ENABLING:"ENABLING",UPDATING:"UPDATING"},JL=class YL extends le{constructor(t){super({name:"DuplicateItemException",$fault:"client",...t}),this.name="DuplicateItemException",this.$fault="client",Object.setPrototypeOf(this,YL.prototype)}};f(JL,"DuplicateItemException");var XL=JL,QL=class ZL extends le{constructor(t){super({name:"IdempotentParameterMismatchException",$fault:"client",...t}),this.name="IdempotentParameterMismatchException",this.$fault="client",Object.setPrototypeOf(this,ZL.prototype),this.Message=t.Message}};f(QL,"IdempotentParameterMismatchException");var ek=QL,tk=class rk extends le{constructor(t){super({name:"TransactionInProgressException",$fault:"client",...t}),this.name="TransactionInProgressException",this.$fault="client",Object.setPrototypeOf(this,rk.prototype),this.Message=t.Message}};f(tk,"TransactionInProgressException");var nk=tk,ik=class ok extends le{constructor(t){super({name:"ExportConflictException",$fault:"client",...t}),this.name="ExportConflictException",this.$fault="client",Object.setPrototypeOf(this,ok.prototype)}};f(ik,"ExportConflictException");var sk=ik,ak=class ck extends le{constructor(t){super({name:"InvalidExportTimeException",$fault:"client",...t}),this.name="InvalidExportTimeException",this.$fault="client",Object.setPrototypeOf(this,ck.prototype)}};f(ak,"InvalidExportTimeException");var uk=ak,lk=class dk extends le{constructor(t){super({name:"PointInTimeRecoveryUnavailableException",$fault:"client",...t}),this.name="PointInTimeRecoveryUnavailableException",this.$fault="client",Object.setPrototypeOf(this,dk.prototype)}};f(lk,"PointInTimeRecoveryUnavailableException");var pk=lk,fk=class mk extends le{constructor(t){super({name:"ImportConflictException",$fault:"client",...t}),this.name="ImportConflictException",this.$fault="client",Object.setPrototypeOf(this,mk.prototype)}};f(fk,"ImportConflictException");var hk=fk,zue={ALL_ATTRIBUTES:"ALL_ATTRIBUTES",ALL_PROJECTED_ATTRIBUTES:"ALL_PROJECTED_ATTRIBUTES",COUNT:"COUNT",SPECIFIC_ATTRIBUTES:"SPECIFIC_ATTRIBUTES"},yk=class _k extends le{constructor(t){super({name:"TableAlreadyExistsException",$fault:"client",...t}),this.name="TableAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,_k.prototype)}};f(yk,"TableAlreadyExistsException");var vk=yk,gk=class Ek extends le{constructor(t){super({name:"InvalidRestoreTimeException",$fault:"client",...t}),this.name="InvalidRestoreTimeException",this.$fault="client",Object.setPrototypeOf(this,Ek.prototype)}};f(gk,"InvalidRestoreTimeException");var Sk=gk,bk=class Ck extends le{constructor(t){super({name:"ReplicaAlreadyExistsException",$fault:"client",...t}),this.name="ReplicaAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Ck.prototype)}};f(bk,"ReplicaAlreadyExistsException");var wk=bk,xk=class Ak extends le{constructor(t){super({name:"ReplicaNotFoundException",$fault:"client",...t}),this.name="ReplicaNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ak.prototype)}};f(xk,"ReplicaNotFoundException");var Tk=xk,Pk=class Ik extends le{constructor(t){super({name:"IndexNotFoundException",$fault:"client",...t}),this.name="IndexNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ik.prototype)}};f(Pk,"IndexNotFoundException");var Ok=Pk,Md;(e=>{e.visit=f((t,r)=>t.S!==void 0?r.S(t.S):t.N!==void 0?r.N(t.N):t.B!==void 0?r.B(t.B):t.SS!==void 0?r.SS(t.SS):t.NS!==void 0?r.NS(t.NS):t.BS!==void 0?r.BS(t.BS):t.M!==void 0?r.M(t.M):t.L!==void 0?r.L(t.L):t.NULL!==void 0?r.NULL(t.NULL):t.BOOL!==void 0?r.BOOL(t.BOOL):r._(t.$unknown[0],t.$unknown[1]),"visit")})(Md||(Md={}));var Rk=class Dk extends le{constructor(t){super({name:"ConditionalCheckFailedException",$fault:"client",...t}),this.name="ConditionalCheckFailedException",this.$fault="client",Object.setPrototypeOf(this,Dk.prototype),this.Item=t.Item}};f(Rk,"ConditionalCheckFailedException");var Nk=Rk,Mk=class Lk extends le{constructor(t){super({name:"TransactionCanceledException",$fault:"client",...t}),this.name="TransactionCanceledException",this.$fault="client",Object.setPrototypeOf(this,Lk.prototype),this.Message=t.Message,this.CancellationReasons=t.CancellationReasons}};f(Mk,"TransactionCanceledException");var kk=Mk,Wue=f(async(e,t)=>{let r=W("BatchExecuteStatement"),n;return n=JSON.stringify(kpe(e,t)),X(t,r,"/",void 0,n)},"se_BatchExecuteStatementCommand"),Kue=f(async(e,t)=>{let r=W("BatchGetItem"),n;return n=JSON.stringify(Fpe(e,t)),X(t,r,"/",void 0,n)},"se_BatchGetItemCommand"),Jue=f(async(e,t)=>{let r=W("BatchWriteItem"),n;return n=JSON.stringify(qpe(e,t)),X(t,r,"/",void 0,n)},"se_BatchWriteItemCommand"),Yue=f(async(e,t)=>{let r=W("CreateBackup"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_CreateBackupCommand"),Xue=f(async(e,t)=>{let r=W("CreateGlobalTable"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_CreateGlobalTableCommand"),Que=f(async(e,t)=>{let r=W("CreateTable"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_CreateTableCommand"),Zue=f(async(e,t)=>{let r=W("DeleteBackup"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DeleteBackupCommand"),ele=f(async(e,t)=>{let r=W("DeleteItem"),n;return n=JSON.stringify(Vpe(e,t)),X(t,r,"/",void 0,n)},"se_DeleteItemCommand"),tle=f(async(e,t)=>{let r=W("DeleteResourcePolicy"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DeleteResourcePolicyCommand"),rle=f(async(e,t)=>{let r=W("DeleteTable"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DeleteTableCommand"),nle=f(async(e,t)=>{let r=W("DescribeBackup"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeBackupCommand"),ile=f(async(e,t)=>{let r=W("DescribeContinuousBackups"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeContinuousBackupsCommand"),ole=f(async(e,t)=>{let r=W("DescribeContributorInsights"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeContributorInsightsCommand"),sle=f(async(e,t)=>{let r=W("DescribeEndpoints"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeEndpointsCommand"),ale=f(async(e,t)=>{let r=W("DescribeExport"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeExportCommand"),cle=f(async(e,t)=>{let r=W("DescribeGlobalTable"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeGlobalTableCommand"),ule=f(async(e,t)=>{let r=W("DescribeGlobalTableSettings"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeGlobalTableSettingsCommand"),lle=f(async(e,t)=>{let r=W("DescribeImport"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeImportCommand"),dle=f(async(e,t)=>{let r=W("DescribeKinesisStreamingDestination"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeKinesisStreamingDestinationCommand"),ple=f(async(e,t)=>{let r=W("DescribeLimits"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeLimitsCommand"),fle=f(async(e,t)=>{let r=W("DescribeTable"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeTableCommand"),mle=f(async(e,t)=>{let r=W("DescribeTableReplicaAutoScaling"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeTableReplicaAutoScalingCommand"),hle=f(async(e,t)=>{let r=W("DescribeTimeToLive"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DescribeTimeToLiveCommand"),yle=f(async(e,t)=>{let r=W("DisableKinesisStreamingDestination"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_DisableKinesisStreamingDestinationCommand"),_le=f(async(e,t)=>{let r=W("EnableKinesisStreamingDestination"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_EnableKinesisStreamingDestinationCommand"),vle=f(async(e,t)=>{let r=W("ExecuteStatement"),n;return n=JSON.stringify(Wpe(e,t)),X(t,r,"/",void 0,n)},"se_ExecuteStatementCommand"),gle=f(async(e,t)=>{let r=W("ExecuteTransaction"),n;return n=JSON.stringify(Kpe(e,t)),X(t,r,"/",void 0,n)},"se_ExecuteTransactionCommand"),Ele=f(async(e,t)=>{let r=W("ExportTableToPointInTime"),n;return n=JSON.stringify(Ype(e,t)),X(t,r,"/",void 0,n)},"se_ExportTableToPointInTimeCommand"),Sle=f(async(e,t)=>{let r=W("GetItem"),n;return n=JSON.stringify(Qpe(e,t)),X(t,r,"/",void 0,n)},"se_GetItemCommand"),ble=f(async(e,t)=>{let r=W("GetResourcePolicy"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_GetResourcePolicyCommand"),Cle=f(async(e,t)=>{let r=W("ImportTable"),n;return n=JSON.stringify(nfe(e,t)),X(t,r,"/",void 0,n)},"se_ImportTableCommand"),wle=f(async(e,t)=>{let r=W("ListBackups"),n;return n=JSON.stringify(ufe(e,t)),X(t,r,"/",void 0,n)},"se_ListBackupsCommand"),xle=f(async(e,t)=>{let r=W("ListContributorInsights"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_ListContributorInsightsCommand"),Ale=f(async(e,t)=>{let r=W("ListExports"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_ListExportsCommand"),Tle=f(async(e,t)=>{let r=W("ListGlobalTables"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_ListGlobalTablesCommand"),Ple=f(async(e,t)=>{let r=W("ListImports"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_ListImportsCommand"),Ile=f(async(e,t)=>{let r=W("ListTables"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_ListTablesCommand"),Ole=f(async(e,t)=>{let r=W("ListTagsOfResource"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_ListTagsOfResourceCommand"),Rle=f(async(e,t)=>{let r=W("PutItem"),n;return n=JSON.stringify(hfe(e,t)),X(t,r,"/",void 0,n)},"se_PutItemCommand"),Dle=f(async(e,t)=>{let r=W("PutResourcePolicy"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_PutResourcePolicyCommand"),Nle=f(async(e,t)=>{let r=W("Query"),n;return n=JSON.stringify(_fe(e,t)),X(t,r,"/",void 0,n)},"se_QueryCommand"),Mle=f(async(e,t)=>{let r=W("RestoreTableFromBackup"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_RestoreTableFromBackupCommand"),Lle=f(async(e,t)=>{let r=W("RestoreTableToPointInTime"),n;return n=JSON.stringify(Afe(e,t)),X(t,r,"/",void 0,n)},"se_RestoreTableToPointInTimeCommand"),kle=f(async(e,t)=>{let r=W("Scan"),n;return n=JSON.stringify(Tfe(e,t)),X(t,r,"/",void 0,n)},"se_ScanCommand"),Fle=f(async(e,t)=>{let r=W("TagResource"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_TagResourceCommand"),Ble=f(async(e,t)=>{let r=W("TransactGetItems"),n;return n=JSON.stringify(Ofe(e,t)),X(t,r,"/",void 0,n)},"se_TransactGetItemsCommand"),jle=f(async(e,t)=>{let r=W("TransactWriteItems"),n;return n=JSON.stringify(Nfe(e,t)),X(t,r,"/",void 0,n)},"se_TransactWriteItemsCommand"),qle=f(async(e,t)=>{let r=W("UntagResource"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_UntagResourceCommand"),Ule=f(async(e,t)=>{let r=W("UpdateContinuousBackups"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_UpdateContinuousBackupsCommand"),Gle=f(async(e,t)=>{let r=W("UpdateContributorInsights"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_UpdateContributorInsightsCommand"),$le=f(async(e,t)=>{let r=W("UpdateGlobalTable"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_UpdateGlobalTableCommand"),Hle=f(async(e,t)=>{let r=W("UpdateGlobalTableSettings"),n;return n=JSON.stringify(Lfe(e,t)),X(t,r,"/",void 0,n)},"se_UpdateGlobalTableSettingsCommand"),Vle=f(async(e,t)=>{let r=W("UpdateItem"),n;return n=JSON.stringify(kfe(e,t)),X(t,r,"/",void 0,n)},"se_UpdateItemCommand"),zle=f(async(e,t)=>{let r=W("UpdateKinesisStreamingDestination"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_UpdateKinesisStreamingDestinationCommand"),Wle=f(async(e,t)=>{let r=W("UpdateTable"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_UpdateTableCommand"),Kle=f(async(e,t)=>{let r=W("UpdateTableReplicaAutoScaling"),n;return n=JSON.stringify(Ffe(e,t)),X(t,r,"/",void 0,n)},"se_UpdateTableReplicaAutoScalingCommand"),Jle=f(async(e,t)=>{let r=W("UpdateTimeToLive"),n;return n=JSON.stringify((0,l._json)(e)),X(t,r,"/",void 0,n)},"se_UpdateTimeToLiveCommand"),Yle=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=zfe(r,t),{$metadata:N(e),...n}},"de_BatchExecuteStatementCommand"),Xle=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=Wfe(r,t),{$metadata:N(e),...n}},"de_BatchGetItemCommand"),Qle=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=Qfe(r,t),{$metadata:N(e),...n}},"de_BatchWriteItemCommand"),Zle=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=ime(r,t),{$metadata:N(e),...n}},"de_CreateBackupCommand"),ede=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=ome(r,t),{$metadata:N(e),...n}},"de_CreateGlobalTableCommand"),tde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=sme(r,t),{$metadata:N(e),...n}},"de_CreateTableCommand"),rde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=ame(r,t),{$metadata:N(e),...n}},"de_DeleteBackupCommand"),nde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=cme(r,t),{$metadata:N(e),...n}},"de_DeleteItemCommand"),ide=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_DeleteResourcePolicyCommand"),ode=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=lme(r,t),{$metadata:N(e),...n}},"de_DeleteTableCommand"),sde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=dme(r,t),{$metadata:N(e),...n}},"de_DescribeBackupCommand"),ade=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=pme(r,t),{$metadata:N(e),...n}},"de_DescribeContinuousBackupsCommand"),cde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=fme(r,t),{$metadata:N(e),...n}},"de_DescribeContributorInsightsCommand"),ude=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_DescribeEndpointsCommand"),lde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=mme(r,t),{$metadata:N(e),...n}},"de_DescribeExportCommand"),dde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=hme(r,t),{$metadata:N(e),...n}},"de_DescribeGlobalTableCommand"),pde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=yme(r,t),{$metadata:N(e),...n}},"de_DescribeGlobalTableSettingsCommand"),fde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=_me(r,t),{$metadata:N(e),...n}},"de_DescribeImportCommand"),mde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_DescribeKinesisStreamingDestinationCommand"),hde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_DescribeLimitsCommand"),yde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=vme(r,t),{$metadata:N(e),...n}},"de_DescribeTableCommand"),_de=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=gme(r,t),{$metadata:N(e),...n}},"de_DescribeTableReplicaAutoScalingCommand"),vde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_DescribeTimeToLiveCommand"),gde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_DisableKinesisStreamingDestinationCommand"),Ede=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_EnableKinesisStreamingDestinationCommand"),Sde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=Eme(r,t),{$metadata:N(e),...n}},"de_ExecuteStatementCommand"),bde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=Sme(r,t),{$metadata:N(e),...n}},"de_ExecuteTransactionCommand"),Cde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=bme(r,t),{$metadata:N(e),...n}},"de_ExportTableToPointInTimeCommand"),wde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=Cme(r,t),{$metadata:N(e),...n}},"de_GetItemCommand"),xde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_GetResourcePolicyCommand"),Ade=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=Pme(r,t),{$metadata:N(e),...n}},"de_ImportTableCommand"),Tde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=Fme(r,t),{$metadata:N(e),...n}},"de_ListBackupsCommand"),Pde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_ListContributorInsightsCommand"),Ide=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_ListExportsCommand"),Ode=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_ListGlobalTablesCommand"),Rde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=Bme(r,t),{$metadata:N(e),...n}},"de_ListImportsCommand"),Dde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_ListTablesCommand"),Nde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_ListTagsOfResourceCommand"),Mde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=$me(r,t),{$metadata:N(e),...n}},"de_PutItemCommand"),Lde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_PutResourcePolicyCommand"),kde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=Vme(r,t),{$metadata:N(e),...n}},"de_QueryCommand"),Fde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=the(r,t),{$metadata:N(e),...n}},"de_RestoreTableFromBackupCommand"),Bde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=rhe(r,t),{$metadata:N(e),...n}},"de_RestoreTableToPointInTimeCommand"),jde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=nhe(r,t),{$metadata:N(e),...n}},"de_ScanCommand"),qde=f(async(e,t)=>e.statusCode>=300?Y(e,t):(await(0,l.collectBody)(e.body,t),{$metadata:N(e)}),"de_TagResourceCommand"),Ude=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=she(r,t),{$metadata:N(e),...n}},"de_TransactGetItemsCommand"),Gde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=che(r,t),{$metadata:N(e),...n}},"de_TransactWriteItemsCommand"),$de=f(async(e,t)=>e.statusCode>=300?Y(e,t):(await(0,l.collectBody)(e.body,t),{$metadata:N(e)}),"de_UntagResourceCommand"),Hde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=uhe(r,t),{$metadata:N(e),...n}},"de_UpdateContinuousBackupsCommand"),Vde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_UpdateContributorInsightsCommand"),zde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=lhe(r,t),{$metadata:N(e),...n}},"de_UpdateGlobalTableCommand"),Wde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=dhe(r,t),{$metadata:N(e),...n}},"de_UpdateGlobalTableSettingsCommand"),Kde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=phe(r,t),{$metadata:N(e),...n}},"de_UpdateItemCommand"),Jde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_UpdateKinesisStreamingDestinationCommand"),Yde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=fhe(r,t),{$metadata:N(e),...n}},"de_UpdateTableCommand"),Xde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=mhe(r,t),{$metadata:N(e),...n}},"de_UpdateTableReplicaAutoScalingCommand"),Qde=f(async(e,t)=>{if(e.statusCode>=300)return Y(e,t);let r=await(0,G.parseJsonBody)(e.body,t),n={};return n=(0,l._json)(r),{$metadata:N(e),...n}},"de_UpdateTimeToLiveCommand"),Y=f(async(e,t)=>{let r={...e,body:await(0,G.parseJsonErrorBody)(e.body,t)},n=(0,G.loadRestJsonErrorCode)(e,r.body);switch(n){case"InternalServerError":case"com.amazonaws.dynamodb#InternalServerError":throw await ppe(r,t);case"RequestLimitExceeded":case"com.amazonaws.dynamodb#RequestLimitExceeded":throw await Cpe(r,t);case"InvalidEndpointException":case"com.amazonaws.dynamodb#InvalidEndpointException":throw await fpe(r,t);case"ProvisionedThroughputExceededException":case"com.amazonaws.dynamodb#ProvisionedThroughputExceededException":throw await Epe(r,t);case"ResourceNotFoundException":case"com.amazonaws.dynamodb#ResourceNotFoundException":throw await xpe(r,t);case"ItemCollectionSizeLimitExceededException":case"com.amazonaws.dynamodb#ItemCollectionSizeLimitExceededException":throw await ype(r,t);case"BackupInUseException":case"com.amazonaws.dynamodb#BackupInUseException":throw await Zde(r,t);case"ContinuousBackupsUnavailableException":case"com.amazonaws.dynamodb#ContinuousBackupsUnavailableException":throw await rpe(r,t);case"LimitExceededException":case"com.amazonaws.dynamodb#LimitExceededException":throw await _pe(r,t);case"TableInUseException":case"com.amazonaws.dynamodb#TableInUseException":throw await Tpe(r,t);case"TableNotFoundException":case"com.amazonaws.dynamodb#TableNotFoundException":throw await Ppe(r,t);case"GlobalTableAlreadyExistsException":case"com.amazonaws.dynamodb#GlobalTableAlreadyExistsException":throw await spe(r,t);case"ResourceInUseException":case"com.amazonaws.dynamodb#ResourceInUseException":throw await wpe(r,t);case"BackupNotFoundException":case"com.amazonaws.dynamodb#BackupNotFoundException":throw await epe(r,t);case"ConditionalCheckFailedException":case"com.amazonaws.dynamodb#ConditionalCheckFailedException":throw await tpe(r,t);case"TransactionConflictException":case"com.amazonaws.dynamodb#TransactionConflictException":throw await Ope(r,t);case"PolicyNotFoundException":case"com.amazonaws.dynamodb#PolicyNotFoundException":throw await gpe(r,t);case"ExportNotFoundException":case"com.amazonaws.dynamodb#ExportNotFoundException":throw await ope(r,t);case"GlobalTableNotFoundException":case"com.amazonaws.dynamodb#GlobalTableNotFoundException":throw await ape(r,t);case"ImportNotFoundException":case"com.amazonaws.dynamodb#ImportNotFoundException":throw await lpe(r,t);case"DuplicateItemException":case"com.amazonaws.dynamodb#DuplicateItemException":throw await npe(r,t);case"IdempotentParameterMismatchException":case"com.amazonaws.dynamodb#IdempotentParameterMismatchException":throw await cpe(r,t);case"TransactionCanceledException":case"com.amazonaws.dynamodb#TransactionCanceledException":throw await Ipe(r,t);case"TransactionInProgressException":case"com.amazonaws.dynamodb#TransactionInProgressException":throw await Rpe(r,t);case"ExportConflictException":case"com.amazonaws.dynamodb#ExportConflictException":throw await ipe(r,t);case"InvalidExportTimeException":case"com.amazonaws.dynamodb#InvalidExportTimeException":throw await mpe(r,t);case"PointInTimeRecoveryUnavailableException":case"com.amazonaws.dynamodb#PointInTimeRecoveryUnavailableException":throw await vpe(r,t);case"ImportConflictException":case"com.amazonaws.dynamodb#ImportConflictException":throw await upe(r,t);case"TableAlreadyExistsException":case"com.amazonaws.dynamodb#TableAlreadyExistsException":throw await Ape(r,t);case"InvalidRestoreTimeException":case"com.amazonaws.dynamodb#InvalidRestoreTimeException":throw await hpe(r,t);case"ReplicaAlreadyExistsException":case"com.amazonaws.dynamodb#ReplicaAlreadyExistsException":throw await Spe(r,t);case"ReplicaNotFoundException":case"com.amazonaws.dynamodb#ReplicaNotFoundException":throw await bpe(r,t);case"IndexNotFoundException":case"com.amazonaws.dynamodb#IndexNotFoundException":throw await dpe(r,t);default:let i=r.body;return _he({output:e,parsedBody:i,errorCode:n})}},"de_CommandError"),Zde=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new KM({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_BackupInUseExceptionRes"),epe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new XM({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_BackupNotFoundExceptionRes"),tpe=f(async(e,t)=>{let r=e.body,n=nme(r,t),i=new Nk({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ConditionalCheckFailedExceptionRes"),rpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new vL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ContinuousBackupsUnavailableExceptionRes"),npe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new XL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_DuplicateItemExceptionRes"),ipe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new sk({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ExportConflictExceptionRes"),ope=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new GL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ExportNotFoundExceptionRes"),spe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new OL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_GlobalTableAlreadyExistsExceptionRes"),ape=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new VL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_GlobalTableNotFoundExceptionRes"),cpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new ek({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_IdempotentParameterMismatchExceptionRes"),upe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new hk({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ImportConflictExceptionRes"),lpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new KL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ImportNotFoundExceptionRes"),dpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new Ok({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_IndexNotFoundExceptionRes"),ppe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new eL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_InternalServerErrorRes"),fpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new sL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_InvalidEndpointExceptionRes"),mpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new uk({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_InvalidExportTimeExceptionRes"),hpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new Sk({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_InvalidRestoreTimeExceptionRes"),ype=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new hL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ItemCollectionSizeLimitExceededExceptionRes"),_pe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new SL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_LimitExceededExceptionRes"),vpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new pk({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_PointInTimeRecoveryUnavailableExceptionRes"),gpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new jL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_PolicyNotFoundExceptionRes"),Epe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new uL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ProvisionedThroughputExceededExceptionRes"),Spe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new wk({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ReplicaAlreadyExistsExceptionRes"),bpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new Tk({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ReplicaNotFoundExceptionRes"),Cpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new nL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_RequestLimitExceededRes"),wpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new NL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ResourceInUseExceptionRes"),xpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new pL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_ResourceNotFoundExceptionRes"),Ape=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new vk({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_TableAlreadyExistsExceptionRes"),Tpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new wL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_TableInUseExceptionRes"),Ppe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new TL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_TableNotFoundExceptionRes"),Ipe=f(async(e,t)=>{let r=e.body,n=ahe(r,t),i=new kk({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_TransactionCanceledExceptionRes"),Ope=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new kL({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_TransactionConflictExceptionRes"),Rpe=f(async(e,t)=>{let r=e.body,n=(0,l._json)(r),i=new nk({$metadata:N(e),...n});return(0,l.decorateServiceException)(i,r)},"de_TransactionInProgressExceptionRes"),Dpe=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=Npe(i,t)),r),{}),"se_AttributeUpdates"),Cn=f((e,t)=>Md.visit(e,{B:r=>({B:t.base64Encoder(r)}),BOOL:r=>({BOOL:r}),BS:r=>({BS:Gpe(r,t)}),L:r=>({L:cfe(r,t)}),M:r=>({M:lfe(r,t)}),N:r=>({N:r}),NS:r=>({NS:(0,l._json)(r)}),NULL:r=>({NULL:r}),S:r=>({S:r}),SS:r=>({SS:(0,l._json)(r)}),_:(r,n)=>({name:n})}),"se_AttributeValue"),Fk=f((e,t)=>e.filter(r=>r!=null).map(r=>Cn(r,t)),"se_AttributeValueList"),Npe=f((e,t)=>(0,l.take)(e,{Action:[],Value:r=>Cn(r,t)}),"se_AttributeValueUpdate"),Mpe=f((e,t)=>(0,l.take)(e,{PolicyName:[],TargetTrackingScalingPolicyConfiguration:r=>Lpe(r,t)}),"se_AutoScalingPolicyUpdate"),yi=f((e,t)=>(0,l.take)(e,{AutoScalingDisabled:[],AutoScalingRoleArn:[],MaximumUnits:[],MinimumUnits:[],ScalingPolicyUpdate:r=>Mpe(r,t)}),"se_AutoScalingSettingsUpdate"),Lpe=f((e,t)=>(0,l.take)(e,{DisableScaleIn:[],ScaleInCooldown:[],ScaleOutCooldown:[],TargetValue:l.serializeFloat}),"se_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate"),kpe=f((e,t)=>(0,l.take)(e,{ReturnConsumedCapacity:[],Statements:r=>ffe(r,t)}),"se_BatchExecuteStatementInput"),Fpe=f((e,t)=>(0,l.take)(e,{RequestItems:r=>Bpe(r,t),ReturnConsumedCapacity:[]}),"se_BatchGetItemInput"),Bpe=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=afe(i,t)),r),{}),"se_BatchGetRequestMap"),jpe=f((e,t)=>(0,l.take)(e,{ConsistentRead:[],Parameters:r=>rv(r,t),ReturnValuesOnConditionCheckFailure:[],Statement:[]}),"se_BatchStatementRequest"),qpe=f((e,t)=>(0,l.take)(e,{RequestItems:r=>Upe(r,t),ReturnConsumedCapacity:[],ReturnItemCollectionMetrics:[]}),"se_BatchWriteItemInput"),Upe=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=jfe(i,t)),r),{}),"se_BatchWriteItemRequestMap"),Gpe=f((e,t)=>e.filter(r=>r!=null).map(r=>t.base64Encoder(r)),"se_BinarySetAttributeValue"),Bk=f((e,t)=>(0,l.take)(e,{AttributeValueList:r=>Fk(r,t),ComparisonOperator:[]}),"se_Condition"),$pe=f((e,t)=>(0,l.take)(e,{ConditionExpression:[],ExpressionAttributeNames:l._json,ExpressionAttributeValues:r=>wn(r,t),Key:r=>Mr(r,t),ReturnValuesOnConditionCheckFailure:[],TableName:[]}),"se_ConditionCheck"),Hpe=f((e,t)=>(0,l.take)(e,{ConditionExpression:[],ExpressionAttributeNames:l._json,ExpressionAttributeValues:r=>wn(r,t),Key:r=>Mr(r,t),ReturnValuesOnConditionCheckFailure:[],TableName:[]}),"se_Delete"),Vpe=f((e,t)=>(0,l.take)(e,{ConditionExpression:[],ConditionalOperator:[],Expected:r=>tv(r,t),ExpressionAttributeNames:l._json,ExpressionAttributeValues:r=>wn(r,t),Key:r=>Mr(r,t),ReturnConsumedCapacity:[],ReturnItemCollectionMetrics:[],ReturnValues:[],ReturnValuesOnConditionCheckFailure:[],TableName:[]}),"se_DeleteItemInput"),zpe=f((e,t)=>(0,l.take)(e,{Key:r=>Mr(r,t)}),"se_DeleteRequest"),Wpe=f((e,t)=>(0,l.take)(e,{ConsistentRead:[],Limit:[],NextToken:[],Parameters:r=>rv(r,t),ReturnConsumedCapacity:[],ReturnValuesOnConditionCheckFailure:[],Statement:[]}),"se_ExecuteStatementInput"),Kpe=f((e,t)=>(0,l.take)(e,{ClientRequestToken:[!0,r=>r??(0,kd.v4)()],ReturnConsumedCapacity:[],TransactStatements:r=>pfe(r,t)}),"se_ExecuteTransactionInput"),tv=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=Jpe(i,t)),r),{}),"se_ExpectedAttributeMap"),Jpe=f((e,t)=>(0,l.take)(e,{AttributeValueList:r=>Fk(r,t),ComparisonOperator:[],Exists:[],Value:r=>Cn(r,t)}),"se_ExpectedAttributeValue"),Ype=f((e,t)=>(0,l.take)(e,{ClientToken:[!0,r=>r??(0,kd.v4)()],ExportFormat:[],ExportTime:r=>Math.round(r.getTime()/1e3),ExportType:[],IncrementalExportSpecification:r=>ife(r,t),S3Bucket:[],S3BucketOwner:[],S3Prefix:[],S3SseAlgorithm:[],S3SseKmsKeyId:[],TableArn:[]}),"se_ExportTableToPointInTimeInput"),wn=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=Cn(i,t)),r),{}),"se_ExpressionAttributeValueMap"),jk=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=Bk(i,t)),r),{}),"se_FilterConditionMap"),Xpe=f((e,t)=>(0,l.take)(e,{ExpressionAttributeNames:l._json,Key:r=>Mr(r,t),ProjectionExpression:[],TableName:[]}),"se_Get"),Qpe=f((e,t)=>(0,l.take)(e,{AttributesToGet:l._json,ConsistentRead:[],ExpressionAttributeNames:l._json,Key:r=>Mr(r,t),ProjectionExpression:[],ReturnConsumedCapacity:[],TableName:[]}),"se_GetItemInput"),Zpe=f((e,t)=>(0,l.take)(e,{IndexName:[],ProvisionedWriteCapacityAutoScalingUpdate:r=>yi(r,t)}),"se_GlobalSecondaryIndexAutoScalingUpdate"),efe=f((e,t)=>e.filter(r=>r!=null).map(r=>Zpe(r,t)),"se_GlobalSecondaryIndexAutoScalingUpdateList"),tfe=f((e,t)=>(0,l.take)(e,{IndexName:[],ProvisionedWriteCapacityAutoScalingSettingsUpdate:r=>yi(r,t),ProvisionedWriteCapacityUnits:[]}),"se_GlobalTableGlobalSecondaryIndexSettingsUpdate"),rfe=f((e,t)=>e.filter(r=>r!=null).map(r=>tfe(r,t)),"se_GlobalTableGlobalSecondaryIndexSettingsUpdateList"),nfe=f((e,t)=>(0,l.take)(e,{ClientToken:[!0,r=>r??(0,kd.v4)()],InputCompressionType:[],InputFormat:[],InputFormatOptions:l._json,S3BucketSource:l._json,TableCreationParameters:l._json}),"se_ImportTableInput"),ife=f((e,t)=>(0,l.take)(e,{ExportFromTime:r=>Math.round(r.getTime()/1e3),ExportToTime:r=>Math.round(r.getTime()/1e3),ExportViewType:[]}),"se_IncrementalExportSpecification"),Mr=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=Cn(i,t)),r),{}),"se_Key"),ofe=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=Bk(i,t)),r),{}),"se_KeyConditions"),sfe=f((e,t)=>e.filter(r=>r!=null).map(r=>Mr(r,t)),"se_KeyList"),afe=f((e,t)=>(0,l.take)(e,{AttributesToGet:l._json,ConsistentRead:[],ExpressionAttributeNames:l._json,Keys:r=>sfe(r,t),ProjectionExpression:[]}),"se_KeysAndAttributes"),cfe=f((e,t)=>e.filter(r=>r!=null).map(r=>Cn(r,t)),"se_ListAttributeValue"),ufe=f((e,t)=>(0,l.take)(e,{BackupType:[],ExclusiveStartBackupArn:[],Limit:[],TableName:[],TimeRangeLowerBound:r=>Math.round(r.getTime()/1e3),TimeRangeUpperBound:r=>Math.round(r.getTime()/1e3)}),"se_ListBackupsInput"),lfe=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=Cn(i,t)),r),{}),"se_MapAttributeValue"),dfe=f((e,t)=>(0,l.take)(e,{Parameters:r=>rv(r,t),ReturnValuesOnConditionCheckFailure:[],Statement:[]}),"se_ParameterizedStatement"),pfe=f((e,t)=>e.filter(r=>r!=null).map(r=>dfe(r,t)),"se_ParameterizedStatements"),ffe=f((e,t)=>e.filter(r=>r!=null).map(r=>jpe(r,t)),"se_PartiQLBatchRequest"),rv=f((e,t)=>e.filter(r=>r!=null).map(r=>Cn(r,t)),"se_PreparedStatementParameters"),mfe=f((e,t)=>(0,l.take)(e,{ConditionExpression:[],ExpressionAttributeNames:l._json,ExpressionAttributeValues:r=>wn(r,t),Item:r=>nv(r,t),ReturnValuesOnConditionCheckFailure:[],TableName:[]}),"se_Put"),hfe=f((e,t)=>(0,l.take)(e,{ConditionExpression:[],ConditionalOperator:[],Expected:r=>tv(r,t),ExpressionAttributeNames:l._json,ExpressionAttributeValues:r=>wn(r,t),Item:r=>nv(r,t),ReturnConsumedCapacity:[],ReturnItemCollectionMetrics:[],ReturnValues:[],ReturnValuesOnConditionCheckFailure:[],TableName:[]}),"se_PutItemInput"),nv=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=Cn(i,t)),r),{}),"se_PutItemInputAttributeMap"),yfe=f((e,t)=>(0,l.take)(e,{Item:r=>nv(r,t)}),"se_PutRequest"),_fe=f((e,t)=>(0,l.take)(e,{AttributesToGet:l._json,ConditionalOperator:[],ConsistentRead:[],ExclusiveStartKey:r=>Mr(r,t),ExpressionAttributeNames:l._json,ExpressionAttributeValues:r=>wn(r,t),FilterExpression:[],IndexName:[],KeyConditionExpression:[],KeyConditions:r=>ofe(r,t),Limit:[],ProjectionExpression:[],QueryFilter:r=>jk(r,t),ReturnConsumedCapacity:[],ScanIndexForward:[],Select:[],TableName:[]}),"se_QueryInput"),vfe=f((e,t)=>(0,l.take)(e,{RegionName:[],ReplicaGlobalSecondaryIndexUpdates:r=>Sfe(r,t),ReplicaProvisionedReadCapacityAutoScalingUpdate:r=>yi(r,t)}),"se_ReplicaAutoScalingUpdate"),gfe=f((e,t)=>e.filter(r=>r!=null).map(r=>vfe(r,t)),"se_ReplicaAutoScalingUpdateList"),Efe=f((e,t)=>(0,l.take)(e,{IndexName:[],ProvisionedReadCapacityAutoScalingUpdate:r=>yi(r,t)}),"se_ReplicaGlobalSecondaryIndexAutoScalingUpdate"),Sfe=f((e,t)=>e.filter(r=>r!=null).map(r=>Efe(r,t)),"se_ReplicaGlobalSecondaryIndexAutoScalingUpdateList"),bfe=f((e,t)=>(0,l.take)(e,{IndexName:[],ProvisionedReadCapacityAutoScalingSettingsUpdate:r=>yi(r,t),ProvisionedReadCapacityUnits:[]}),"se_ReplicaGlobalSecondaryIndexSettingsUpdate"),Cfe=f((e,t)=>e.filter(r=>r!=null).map(r=>bfe(r,t)),"se_ReplicaGlobalSecondaryIndexSettingsUpdateList"),wfe=f((e,t)=>(0,l.take)(e,{RegionName:[],ReplicaGlobalSecondaryIndexSettingsUpdate:r=>Cfe(r,t),ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate:r=>yi(r,t),ReplicaProvisionedReadCapacityUnits:[],ReplicaTableClass:[]}),"se_ReplicaSettingsUpdate"),xfe=f((e,t)=>e.filter(r=>r!=null).map(r=>wfe(r,t)),"se_ReplicaSettingsUpdateList"),Afe=f((e,t)=>(0,l.take)(e,{BillingModeOverride:[],GlobalSecondaryIndexOverride:l._json,LocalSecondaryIndexOverride:l._json,ProvisionedThroughputOverride:l._json,RestoreDateTime:r=>Math.round(r.getTime()/1e3),SSESpecificationOverride:l._json,SourceTableArn:[],SourceTableName:[],TargetTableName:[],UseLatestRestorableTime:[]}),"se_RestoreTableToPointInTimeInput"),Tfe=f((e,t)=>(0,l.take)(e,{AttributesToGet:l._json,ConditionalOperator:[],ConsistentRead:[],ExclusiveStartKey:r=>Mr(r,t),ExpressionAttributeNames:l._json,ExpressionAttributeValues:r=>wn(r,t),FilterExpression:[],IndexName:[],Limit:[],ProjectionExpression:[],ReturnConsumedCapacity:[],ScanFilter:r=>jk(r,t),Segment:[],Select:[],TableName:[],TotalSegments:[]}),"se_ScanInput"),Pfe=f((e,t)=>(0,l.take)(e,{Get:r=>Xpe(r,t)}),"se_TransactGetItem"),Ife=f((e,t)=>e.filter(r=>r!=null).map(r=>Pfe(r,t)),"se_TransactGetItemList"),Ofe=f((e,t)=>(0,l.take)(e,{ReturnConsumedCapacity:[],TransactItems:r=>Ife(r,t)}),"se_TransactGetItemsInput"),Rfe=f((e,t)=>(0,l.take)(e,{ConditionCheck:r=>$pe(r,t),Delete:r=>Hpe(r,t),Put:r=>mfe(r,t),Update:r=>Mfe(r,t)}),"se_TransactWriteItem"),Dfe=f((e,t)=>e.filter(r=>r!=null).map(r=>Rfe(r,t)),"se_TransactWriteItemList"),Nfe=f((e,t)=>(0,l.take)(e,{ClientRequestToken:[!0,r=>r??(0,kd.v4)()],ReturnConsumedCapacity:[],ReturnItemCollectionMetrics:[],TransactItems:r=>Dfe(r,t)}),"se_TransactWriteItemsInput"),Mfe=f((e,t)=>(0,l.take)(e,{ConditionExpression:[],ExpressionAttributeNames:l._json,ExpressionAttributeValues:r=>wn(r,t),Key:r=>Mr(r,t),ReturnValuesOnConditionCheckFailure:[],TableName:[],UpdateExpression:[]}),"se_Update"),Lfe=f((e,t)=>(0,l.take)(e,{GlobalTableBillingMode:[],GlobalTableGlobalSecondaryIndexSettingsUpdate:r=>rfe(r,t),GlobalTableName:[],GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate:r=>yi(r,t),GlobalTableProvisionedWriteCapacityUnits:[],ReplicaSettingsUpdate:r=>xfe(r,t)}),"se_UpdateGlobalTableSettingsInput"),kfe=f((e,t)=>(0,l.take)(e,{AttributeUpdates:r=>Dpe(r,t),ConditionExpression:[],ConditionalOperator:[],Expected:r=>tv(r,t),ExpressionAttributeNames:l._json,ExpressionAttributeValues:r=>wn(r,t),Key:r=>Mr(r,t),ReturnConsumedCapacity:[],ReturnItemCollectionMetrics:[],ReturnValues:[],ReturnValuesOnConditionCheckFailure:[],TableName:[],UpdateExpression:[]}),"se_UpdateItemInput"),Ffe=f((e,t)=>(0,l.take)(e,{GlobalSecondaryIndexUpdates:r=>efe(r,t),ProvisionedWriteCapacityAutoScalingUpdate:r=>yi(r,t),ReplicaUpdates:r=>gfe(r,t),TableName:[]}),"se_UpdateTableReplicaAutoScalingInput"),Bfe=f((e,t)=>(0,l.take)(e,{DeleteRequest:r=>zpe(r,t),PutRequest:r=>yfe(r,t)}),"se_WriteRequest"),jfe=f((e,t)=>e.filter(r=>r!=null).map(r=>Bfe(r,t)),"se_WriteRequests"),qfe=f((e,t)=>(0,l.take)(e,{ArchivalBackupArn:l.expectString,ArchivalDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),ArchivalReason:l.expectString}),"de_ArchivalSummary"),Zr=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=ms((0,G.awsExpectUnion)(i),t)),r),{}),"de_AttributeMap"),ms=f((e,t)=>e.B!=null?{B:t.base64Decoder(e.B)}:(0,l.expectBoolean)(e.BOOL)!==void 0?{BOOL:(0,l.expectBoolean)(e.BOOL)}:e.BS!=null?{BS:eme(e.BS,t)}:e.L!=null?{L:kme(e.L,t)}:e.M!=null?{M:jme(e.M,t)}:(0,l.expectString)(e.N)!==void 0?{N:(0,l.expectString)(e.N)}:e.NS!=null?{NS:(0,l._json)(e.NS)}:(0,l.expectBoolean)(e.NULL)!==void 0?{NULL:(0,l.expectBoolean)(e.NULL)}:(0,l.expectString)(e.S)!==void 0?{S:(0,l.expectString)(e.S)}:e.SS!=null?{SS:(0,l._json)(e.SS)}:{$unknown:Object.entries(e)[0]},"de_AttributeValue"),Ufe=f((e,t)=>(0,l.take)(e,{PolicyName:l.expectString,TargetTrackingScalingPolicyConfiguration:r=>$fe(r,t)}),"de_AutoScalingPolicyDescription"),Gfe=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>Ufe(n,t)),"de_AutoScalingPolicyDescriptionList"),hi=f((e,t)=>(0,l.take)(e,{AutoScalingDisabled:l.expectBoolean,AutoScalingRoleArn:l.expectString,MaximumUnits:l.expectLong,MinimumUnits:l.expectLong,ScalingPolicies:r=>Gfe(r,t)}),"de_AutoScalingSettingsDescription"),$fe=f((e,t)=>(0,l.take)(e,{DisableScaleIn:l.expectBoolean,ScaleInCooldown:l.expectInt32,ScaleOutCooldown:l.expectInt32,TargetValue:l.limitedParseDouble}),"de_AutoScalingTargetTrackingScalingPolicyConfigurationDescription"),qk=f((e,t)=>(0,l.take)(e,{BackupDetails:r=>Uk(r,t),SourceTableDetails:r=>ihe(r,t),SourceTableFeatureDetails:r=>ohe(r,t)}),"de_BackupDescription"),Uk=f((e,t)=>(0,l.take)(e,{BackupArn:l.expectString,BackupCreationDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),BackupExpiryDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),BackupName:l.expectString,BackupSizeBytes:l.expectLong,BackupStatus:l.expectString,BackupType:l.expectString}),"de_BackupDetails"),Hfe=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>Vfe(n,t)),"de_BackupSummaries"),Vfe=f((e,t)=>(0,l.take)(e,{BackupArn:l.expectString,BackupCreationDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),BackupExpiryDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),BackupName:l.expectString,BackupSizeBytes:l.expectLong,BackupStatus:l.expectString,BackupType:l.expectString,TableArn:l.expectString,TableId:l.expectString,TableName:l.expectString}),"de_BackupSummary"),zfe=f((e,t)=>(0,l.take)(e,{ConsumedCapacity:r=>hs(r,t),Responses:r=>qme(r,t)}),"de_BatchExecuteStatementOutput"),Wfe=f((e,t)=>(0,l.take)(e,{ConsumedCapacity:r=>hs(r,t),Responses:r=>Jfe(r,t),UnprocessedKeys:r=>Kfe(r,t)}),"de_BatchGetItemOutput"),Kfe=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=Lme(i,t)),r),{}),"de_BatchGetRequestMap"),Jfe=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=Bd(i,t)),r),{}),"de_BatchGetResponseMap"),Yfe=f((e,t)=>(0,l.take)(e,{Code:l.expectString,Item:r=>Zr(r,t),Message:l.expectString}),"de_BatchStatementError"),Xfe=f((e,t)=>(0,l.take)(e,{Error:r=>Yfe(r,t),Item:r=>Zr(r,t),TableName:l.expectString}),"de_BatchStatementResponse"),Qfe=f((e,t)=>(0,l.take)(e,{ConsumedCapacity:r=>hs(r,t),ItemCollectionMetrics:r=>Wk(r,t),UnprocessedItems:r=>Zfe(r,t)}),"de_BatchWriteItemOutput"),Zfe=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=yhe(i,t)),r),{}),"de_BatchWriteItemRequestMap"),Gk=f((e,t)=>(0,l.take)(e,{BillingMode:l.expectString,LastUpdateToPayPerRequestDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r)))}),"de_BillingModeSummary"),eme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>t.base64Decoder(n)),"de_BinarySetAttributeValue"),tme=f((e,t)=>(0,l.take)(e,{Code:l.expectString,Item:r=>Zr(r,t),Message:l.expectString}),"de_CancellationReason"),rme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>tme(n,t)),"de_CancellationReasonList"),$k=f((e,t)=>(0,l.take)(e,{CapacityUnits:l.limitedParseDouble,ReadCapacityUnits:l.limitedParseDouble,WriteCapacityUnits:l.limitedParseDouble}),"de_Capacity"),nme=f((e,t)=>(0,l.take)(e,{Item:r=>Zr(r,t),message:l.expectString}),"de_ConditionalCheckFailedException"),_i=f((e,t)=>(0,l.take)(e,{CapacityUnits:l.limitedParseDouble,GlobalSecondaryIndexes:r=>UM(r,t),LocalSecondaryIndexes:r=>UM(r,t),ReadCapacityUnits:l.limitedParseDouble,Table:r=>$k(r,t),TableName:l.expectString,WriteCapacityUnits:l.limitedParseDouble}),"de_ConsumedCapacity"),hs=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>_i(n,t)),"de_ConsumedCapacityMultiple"),Hk=f((e,t)=>(0,l.take)(e,{ContinuousBackupsStatus:l.expectString,PointInTimeRecoveryDescription:r=>Ume(r,t)}),"de_ContinuousBackupsDescription"),ime=f((e,t)=>(0,l.take)(e,{BackupDetails:r=>Uk(r,t)}),"de_CreateBackupOutput"),ome=f((e,t)=>(0,l.take)(e,{GlobalTableDescription:r=>iv(r,t)}),"de_CreateGlobalTableOutput"),sme=f((e,t)=>(0,l.take)(e,{TableDescription:r=>ys(r,t)}),"de_CreateTableOutput"),ame=f((e,t)=>(0,l.take)(e,{BackupDescription:r=>qk(r,t)}),"de_DeleteBackupOutput"),cme=f((e,t)=>(0,l.take)(e,{Attributes:r=>Zr(r,t),ConsumedCapacity:r=>_i(r,t),ItemCollectionMetrics:r=>Fd(r,t)}),"de_DeleteItemOutput"),ume=f((e,t)=>(0,l.take)(e,{Key:r=>nc(r,t)}),"de_DeleteRequest"),lme=f((e,t)=>(0,l.take)(e,{TableDescription:r=>ys(r,t)}),"de_DeleteTableOutput"),dme=f((e,t)=>(0,l.take)(e,{BackupDescription:r=>qk(r,t)}),"de_DescribeBackupOutput"),pme=f((e,t)=>(0,l.take)(e,{ContinuousBackupsDescription:r=>Hk(r,t)}),"de_DescribeContinuousBackupsOutput"),fme=f((e,t)=>(0,l.take)(e,{ContributorInsightsRuleList:l._json,ContributorInsightsStatus:l.expectString,FailureException:l._json,IndexName:l.expectString,LastUpdateDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),TableName:l.expectString}),"de_DescribeContributorInsightsOutput"),mme=f((e,t)=>(0,l.take)(e,{ExportDescription:r=>Vk(r,t)}),"de_DescribeExportOutput"),hme=f((e,t)=>(0,l.take)(e,{GlobalTableDescription:r=>iv(r,t)}),"de_DescribeGlobalTableOutput"),yme=f((e,t)=>(0,l.take)(e,{GlobalTableName:l.expectString,ReplicaSettings:r=>Xk(r,t)}),"de_DescribeGlobalTableSettingsOutput"),_me=f((e,t)=>(0,l.take)(e,{ImportTableDescription:r=>zk(r,t)}),"de_DescribeImportOutput"),vme=f((e,t)=>(0,l.take)(e,{Table:r=>ys(r,t)}),"de_DescribeTableOutput"),gme=f((e,t)=>(0,l.take)(e,{TableAutoScalingDescription:r=>Zk(r,t)}),"de_DescribeTableReplicaAutoScalingOutput"),Eme=f((e,t)=>(0,l.take)(e,{ConsumedCapacity:r=>_i(r,t),Items:r=>Bd(r,t),LastEvaluatedKey:r=>nc(r,t),NextToken:l.expectString}),"de_ExecuteStatementOutput"),Sme=f((e,t)=>(0,l.take)(e,{ConsumedCapacity:r=>hs(r,t),Responses:r=>Kk(r,t)}),"de_ExecuteTransactionOutput"),Vk=f((e,t)=>(0,l.take)(e,{BilledSizeBytes:l.expectLong,ClientToken:l.expectString,EndTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),ExportArn:l.expectString,ExportFormat:l.expectString,ExportManifest:l.expectString,ExportStatus:l.expectString,ExportTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),ExportType:l.expectString,FailureCode:l.expectString,FailureMessage:l.expectString,IncrementalExportSpecification:r=>Ime(r,t),ItemCount:l.expectLong,S3Bucket:l.expectString,S3BucketOwner:l.expectString,S3Prefix:l.expectString,S3SseAlgorithm:l.expectString,S3SseKmsKeyId:l.expectString,StartTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),TableArn:l.expectString,TableId:l.expectString}),"de_ExportDescription"),bme=f((e,t)=>(0,l.take)(e,{ExportDescription:r=>Vk(r,t)}),"de_ExportTableToPointInTimeOutput"),Cme=f((e,t)=>(0,l.take)(e,{ConsumedCapacity:r=>_i(r,t),Item:r=>Zr(r,t)}),"de_GetItemOutput"),wme=f((e,t)=>(0,l.take)(e,{Backfilling:l.expectBoolean,IndexArn:l.expectString,IndexName:l.expectString,IndexSizeBytes:l.expectLong,IndexStatus:l.expectString,ItemCount:l.expectLong,KeySchema:l._json,Projection:l._json,ProvisionedThroughput:r=>Jk(r,t)}),"de_GlobalSecondaryIndexDescription"),xme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>wme(n,t)),"de_GlobalSecondaryIndexDescriptionList"),iv=f((e,t)=>(0,l.take)(e,{CreationDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),GlobalTableArn:l.expectString,GlobalTableName:l.expectString,GlobalTableStatus:l.expectString,ReplicationGroup:r=>Yk(r,t)}),"de_GlobalTableDescription"),Ame=f((e,t)=>(0,l.take)(e,{CloudWatchLogGroupArn:l.expectString,EndTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),ImportArn:l.expectString,ImportStatus:l.expectString,InputFormat:l.expectString,S3BucketSource:l._json,StartTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),TableArn:l.expectString}),"de_ImportSummary"),Tme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>Ame(n,t)),"de_ImportSummaryList"),zk=f((e,t)=>(0,l.take)(e,{ClientToken:l.expectString,CloudWatchLogGroupArn:l.expectString,EndTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),ErrorCount:l.expectLong,FailureCode:l.expectString,FailureMessage:l.expectString,ImportArn:l.expectString,ImportStatus:l.expectString,ImportedItemCount:l.expectLong,InputCompressionType:l.expectString,InputFormat:l.expectString,InputFormatOptions:l._json,ProcessedItemCount:l.expectLong,ProcessedSizeBytes:l.expectLong,S3BucketSource:l._json,StartTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),TableArn:l.expectString,TableCreationParameters:l._json,TableId:l.expectString}),"de_ImportTableDescription"),Pme=f((e,t)=>(0,l.take)(e,{ImportTableDescription:r=>zk(r,t)}),"de_ImportTableOutput"),Ime=f((e,t)=>(0,l.take)(e,{ExportFromTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),ExportToTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),ExportViewType:l.expectString}),"de_IncrementalExportSpecification"),Ome=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=ms((0,G.awsExpectUnion)(i),t)),r),{}),"de_ItemCollectionKeyAttributeMap"),Fd=f((e,t)=>(0,l.take)(e,{ItemCollectionKey:r=>Ome(r,t),SizeEstimateRangeGB:r=>Dme(r,t)}),"de_ItemCollectionMetrics"),Rme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>Fd(n,t)),"de_ItemCollectionMetricsMultiple"),Wk=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=Rme(i,t)),r),{}),"de_ItemCollectionMetricsPerTable"),Dme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>(0,l.limitedParseDouble)(n)),"de_ItemCollectionSizeEstimateRange"),Bd=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>Zr(n,t)),"de_ItemList"),Nme=f((e,t)=>(0,l.take)(e,{Item:r=>Zr(r,t)}),"de_ItemResponse"),Kk=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>Nme(n,t)),"de_ItemResponseList"),nc=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=ms((0,G.awsExpectUnion)(i),t)),r),{}),"de_Key"),Mme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>nc(n,t)),"de_KeyList"),Lme=f((e,t)=>(0,l.take)(e,{AttributesToGet:l._json,ConsistentRead:l.expectBoolean,ExpressionAttributeNames:l._json,Keys:r=>Mme(r,t),ProjectionExpression:l.expectString}),"de_KeysAndAttributes"),kme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>ms((0,G.awsExpectUnion)(n),t)),"de_ListAttributeValue"),Fme=f((e,t)=>(0,l.take)(e,{BackupSummaries:r=>Hfe(r,t),LastEvaluatedBackupArn:l.expectString}),"de_ListBackupsOutput"),Bme=f((e,t)=>(0,l.take)(e,{ImportSummaryList:r=>Tme(r,t),NextToken:l.expectString}),"de_ListImportsOutput"),jme=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=ms((0,G.awsExpectUnion)(i),t)),r),{}),"de_MapAttributeValue"),qme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>Xfe(n,t)),"de_PartiQLBatchResponse"),Ume=f((e,t)=>(0,l.take)(e,{EarliestRestorableDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),LatestRestorableDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),PointInTimeRecoveryStatus:l.expectString}),"de_PointInTimeRecoveryDescription"),Jk=f((e,t)=>(0,l.take)(e,{LastDecreaseDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),LastIncreaseDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),NumberOfDecreasesToday:l.expectLong,ReadCapacityUnits:l.expectLong,WriteCapacityUnits:l.expectLong}),"de_ProvisionedThroughputDescription"),Gme=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=ms((0,G.awsExpectUnion)(i),t)),r),{}),"de_PutItemInputAttributeMap"),$me=f((e,t)=>(0,l.take)(e,{Attributes:r=>Zr(r,t),ConsumedCapacity:r=>_i(r,t),ItemCollectionMetrics:r=>Fd(r,t)}),"de_PutItemOutput"),Hme=f((e,t)=>(0,l.take)(e,{Item:r=>Gme(r,t)}),"de_PutRequest"),Vme=f((e,t)=>(0,l.take)(e,{ConsumedCapacity:r=>_i(r,t),Count:l.expectInt32,Items:r=>Bd(r,t),LastEvaluatedKey:r=>nc(r,t),ScannedCount:l.expectInt32}),"de_QueryOutput"),zme=f((e,t)=>(0,l.take)(e,{GlobalSecondaryIndexes:r=>Yme(r,t),RegionName:l.expectString,ReplicaProvisionedReadCapacityAutoScalingSettings:r=>hi(r,t),ReplicaProvisionedWriteCapacityAutoScalingSettings:r=>hi(r,t),ReplicaStatus:l.expectString}),"de_ReplicaAutoScalingDescription"),Wme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>zme(n,t)),"de_ReplicaAutoScalingDescriptionList"),Kme=f((e,t)=>(0,l.take)(e,{GlobalSecondaryIndexes:l._json,KMSMasterKeyId:l.expectString,ProvisionedThroughputOverride:l._json,RegionName:l.expectString,ReplicaInaccessibleDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),ReplicaStatus:l.expectString,ReplicaStatusDescription:l.expectString,ReplicaStatusPercentProgress:l.expectString,ReplicaTableClassSummary:r=>ov(r,t)}),"de_ReplicaDescription"),Yk=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>Kme(n,t)),"de_ReplicaDescriptionList"),Jme=f((e,t)=>(0,l.take)(e,{IndexName:l.expectString,IndexStatus:l.expectString,ProvisionedReadCapacityAutoScalingSettings:r=>hi(r,t),ProvisionedWriteCapacityAutoScalingSettings:r=>hi(r,t)}),"de_ReplicaGlobalSecondaryIndexAutoScalingDescription"),Yme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>Jme(n,t)),"de_ReplicaGlobalSecondaryIndexAutoScalingDescriptionList"),Xme=f((e,t)=>(0,l.take)(e,{IndexName:l.expectString,IndexStatus:l.expectString,ProvisionedReadCapacityAutoScalingSettings:r=>hi(r,t),ProvisionedReadCapacityUnits:l.expectLong,ProvisionedWriteCapacityAutoScalingSettings:r=>hi(r,t),ProvisionedWriteCapacityUnits:l.expectLong}),"de_ReplicaGlobalSecondaryIndexSettingsDescription"),Qme=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>Xme(n,t)),"de_ReplicaGlobalSecondaryIndexSettingsDescriptionList"),Zme=f((e,t)=>(0,l.take)(e,{RegionName:l.expectString,ReplicaBillingModeSummary:r=>Gk(r,t),ReplicaGlobalSecondaryIndexSettings:r=>Qme(r,t),ReplicaProvisionedReadCapacityAutoScalingSettings:r=>hi(r,t),ReplicaProvisionedReadCapacityUnits:l.expectLong,ReplicaProvisionedWriteCapacityAutoScalingSettings:r=>hi(r,t),ReplicaProvisionedWriteCapacityUnits:l.expectLong,ReplicaStatus:l.expectString,ReplicaTableClassSummary:r=>ov(r,t)}),"de_ReplicaSettingsDescription"),Xk=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>Zme(n,t)),"de_ReplicaSettingsDescriptionList"),ehe=f((e,t)=>(0,l.take)(e,{RestoreDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),RestoreInProgress:l.expectBoolean,SourceBackupArn:l.expectString,SourceTableArn:l.expectString}),"de_RestoreSummary"),the=f((e,t)=>(0,l.take)(e,{TableDescription:r=>ys(r,t)}),"de_RestoreTableFromBackupOutput"),rhe=f((e,t)=>(0,l.take)(e,{TableDescription:r=>ys(r,t)}),"de_RestoreTableToPointInTimeOutput"),nhe=f((e,t)=>(0,l.take)(e,{ConsumedCapacity:r=>_i(r,t),Count:l.expectInt32,Items:r=>Bd(r,t),LastEvaluatedKey:r=>nc(r,t),ScannedCount:l.expectInt32}),"de_ScanOutput"),UM=f((e,t)=>Object.entries(e).reduce((r,[n,i])=>(i===null||(r[n]=$k(i,t)),r),{}),"de_SecondaryIndexesCapacityMap"),ihe=f((e,t)=>(0,l.take)(e,{BillingMode:l.expectString,ItemCount:l.expectLong,KeySchema:l._json,ProvisionedThroughput:l._json,TableArn:l.expectString,TableCreationDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),TableId:l.expectString,TableName:l.expectString,TableSizeBytes:l.expectLong}),"de_SourceTableDetails"),ohe=f((e,t)=>(0,l.take)(e,{GlobalSecondaryIndexes:l._json,LocalSecondaryIndexes:l._json,SSEDescription:r=>Qk(r,t),StreamDescription:l._json,TimeToLiveDescription:l._json}),"de_SourceTableFeatureDetails"),Qk=f((e,t)=>(0,l.take)(e,{InaccessibleEncryptionDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),KMSMasterKeyArn:l.expectString,SSEType:l.expectString,Status:l.expectString}),"de_SSEDescription"),Zk=f((e,t)=>(0,l.take)(e,{Replicas:r=>Wme(r,t),TableName:l.expectString,TableStatus:l.expectString}),"de_TableAutoScalingDescription"),ov=f((e,t)=>(0,l.take)(e,{LastUpdateDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),TableClass:l.expectString}),"de_TableClassSummary"),ys=f((e,t)=>(0,l.take)(e,{ArchivalSummary:r=>qfe(r,t),AttributeDefinitions:l._json,BillingModeSummary:r=>Gk(r,t),CreationDateTime:r=>(0,l.expectNonNull)((0,l.parseEpochTimestamp)((0,l.expectNumber)(r))),DeletionProtectionEnabled:l.expectBoolean,GlobalSecondaryIndexes:r=>xme(r,t),GlobalTableVersion:l.expectString,ItemCount:l.expectLong,KeySchema:l._json,LatestStreamArn:l.expectString,LatestStreamLabel:l.expectString,LocalSecondaryIndexes:l._json,ProvisionedThroughput:r=>Jk(r,t),Replicas:r=>Yk(r,t),RestoreSummary:r=>ehe(r,t),SSEDescription:r=>Qk(r,t),StreamSpecification:l._json,TableArn:l.expectString,TableClassSummary:r=>ov(r,t),TableId:l.expectString,TableName:l.expectString,TableSizeBytes:l.expectLong,TableStatus:l.expectString}),"de_TableDescription"),she=f((e,t)=>(0,l.take)(e,{ConsumedCapacity:r=>hs(r,t),Responses:r=>Kk(r,t)}),"de_TransactGetItemsOutput"),ahe=f((e,t)=>(0,l.take)(e,{CancellationReasons:r=>rme(r,t),Message:l.expectString}),"de_TransactionCanceledException"),che=f((e,t)=>(0,l.take)(e,{ConsumedCapacity:r=>hs(r,t),ItemCollectionMetrics:r=>Wk(r,t)}),"de_TransactWriteItemsOutput"),uhe=f((e,t)=>(0,l.take)(e,{ContinuousBackupsDescription:r=>Hk(r,t)}),"de_UpdateContinuousBackupsOutput"),lhe=f((e,t)=>(0,l.take)(e,{GlobalTableDescription:r=>iv(r,t)}),"de_UpdateGlobalTableOutput"),dhe=f((e,t)=>(0,l.take)(e,{GlobalTableName:l.expectString,ReplicaSettings:r=>Xk(r,t)}),"de_UpdateGlobalTableSettingsOutput"),phe=f((e,t)=>(0,l.take)(e,{Attributes:r=>Zr(r,t),ConsumedCapacity:r=>_i(r,t),ItemCollectionMetrics:r=>Fd(r,t)}),"de_UpdateItemOutput"),fhe=f((e,t)=>(0,l.take)(e,{TableDescription:r=>ys(r,t)}),"de_UpdateTableOutput"),mhe=f((e,t)=>(0,l.take)(e,{TableAutoScalingDescription:r=>Zk(r,t)}),"de_UpdateTableReplicaAutoScalingOutput"),hhe=f((e,t)=>(0,l.take)(e,{DeleteRequest:r=>ume(r,t),PutRequest:r=>Hme(r,t)}),"de_WriteRequest"),yhe=f((e,t)=>(e||[]).filter(n=>n!=null).map(n=>hhe(n,t)),"de_WriteRequests"),N=f(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"]}),"deserializeMetadata"),_he=(0,l.withBaseException)(le),X=f(async(e,t,r,n,i)=>{let{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),u={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+r:c+r,headers:t};return n!==void 0&&(u.hostname=n),i!==void 0&&(u.body=i),new ev.HttpRequest(u)},"buildHttpRpcRequest");function W(e){return{"content-type":"application/x-amz-json-1.0","x-amz-target":`DynamoDB_20120810.${e}`}}f(W,"sharedHeaders");var eF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeEndpoints",{}).n("DynamoDBClient","DescribeEndpointsCommand").f(void 0,void 0).ser(sle).de(ude).build(){};f(eF,"DescribeEndpointsCommand");var sv=eF,vhe=OM(),GM=Ga(),ghe=f(e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(i){let o=t.findIndex(s=>s.schemeId===i.schemeId);o===-1?t.push(i):t.splice(o,1,i)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(i){r=i},httpAuthSchemeProvider(){return r},setCredentials(i){n=i},credentials(){return n}}},"getHttpAuthExtensionConfiguration"),Ehe=f(e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),"resolveHttpAuthRuntimeConfig"),Nd=f(e=>e,"asPartial"),She=f((e,t)=>{let r={...Nd((0,GM.getAwsRegionExtensionConfiguration)(e)),...Nd((0,l.getDefaultExtensionConfiguration)(e)),...Nd((0,ev.getHttpHandlerExtensionConfiguration)(e)),...Nd(ghe(e))};return t.forEach(n=>n.configure(r)),{...e,...(0,GM.resolveAwsRegionExtensionConfiguration)(r),...(0,l.resolveDefaultRuntimeConfig)(r),...(0,ev.resolveHttpHandlerRuntimeConfig)(r),...Ehe(r)}},"resolveRuntimeExtensions"),tF=class extends l.Client{constructor(...[t]){let r=(0,vhe.getRuntimeConfig)(t||{}),n=aue(r),i=(0,oue.resolveRegionConfig)(n),o=(0,z.resolveEndpointConfig)(i),s=(0,jM.resolveRetryConfig)(o),a=(0,FM.resolveHostHeaderConfig)(s),c=(0,BM.resolveUserAgentConfig)(a),u=(0,qM.resolveHttpAuthSchemeConfig)(c),d=(0,rue.resolveEndpointDiscoveryConfig)(u,{endpointDiscoveryCommandCtor:sv}),p=She(d,(t==null?void 0:t.extensions)||[]);super(p),this.config=p,this.middlewareStack.use((0,jM.getRetryPlugin)(this.config)),this.middlewareStack.use((0,sue.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,FM.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,nue.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,iue.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,BM.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,Z_.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((0,Z_.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return qM.defaultDynamoDBHttpAuthSchemeParametersProvider}getIdentityProviderConfigProvider(){return async t=>new Z_.DefaultIdentityProviderConfig({"aws.auth#sigv4":t.credentials})}};f(tF,"DynamoDBClient");var vi=tF,rF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","BatchExecuteStatement",{}).n("DynamoDBClient","BatchExecuteStatementCommand").f(void 0,void 0).ser(Wue).de(Yle).build(){};f(rF,"BatchExecuteStatementCommand");var nF=rF,iF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","BatchGetItem",{}).n("DynamoDBClient","BatchGetItemCommand").f(void 0,void 0).ser(Kue).de(Xle).build(){};f(iF,"BatchGetItemCommand");var oF=iF,sF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","BatchWriteItem",{}).n("DynamoDBClient","BatchWriteItemCommand").f(void 0,void 0).ser(Jue).de(Qle).build(){};f(sF,"BatchWriteItemCommand");var aF=sF,cF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","CreateBackup",{}).n("DynamoDBClient","CreateBackupCommand").f(void 0,void 0).ser(Yue).de(Zle).build(){};f(cF,"CreateBackupCommand");var uF=cF,lF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","CreateGlobalTable",{}).n("DynamoDBClient","CreateGlobalTableCommand").f(void 0,void 0).ser(Xue).de(ede).build(){};f(lF,"CreateGlobalTableCommand");var dF=lF,pF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","CreateTable",{}).n("DynamoDBClient","CreateTableCommand").f(void 0,void 0).ser(Que).de(tde).build(){};f(pF,"CreateTableCommand");var fF=pF,mF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DeleteBackup",{}).n("DynamoDBClient","DeleteBackupCommand").f(void 0,void 0).ser(Zue).de(rde).build(){};f(mF,"DeleteBackupCommand");var hF=mF,yF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DeleteItem",{}).n("DynamoDBClient","DeleteItemCommand").f(void 0,void 0).ser(ele).de(nde).build(){};f(yF,"DeleteItemCommand");var _F=yF,vF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DeleteResourcePolicy",{}).n("DynamoDBClient","DeleteResourcePolicyCommand").f(void 0,void 0).ser(tle).de(ide).build(){};f(vF,"DeleteResourcePolicyCommand");var gF=vF,EF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DeleteTable",{}).n("DynamoDBClient","DeleteTableCommand").f(void 0,void 0).ser(rle).de(ode).build(){};f(EF,"DeleteTableCommand");var SF=EF,bF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeBackup",{}).n("DynamoDBClient","DescribeBackupCommand").f(void 0,void 0).ser(nle).de(sde).build(){};f(bF,"DescribeBackupCommand");var CF=bF,wF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeContinuousBackups",{}).n("DynamoDBClient","DescribeContinuousBackupsCommand").f(void 0,void 0).ser(ile).de(ade).build(){};f(wF,"DescribeContinuousBackupsCommand");var xF=wF,AF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeContributorInsights",{}).n("DynamoDBClient","DescribeContributorInsightsCommand").f(void 0,void 0).ser(ole).de(cde).build(){};f(AF,"DescribeContributorInsightsCommand");var TF=AF,PF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeExport",{}).n("DynamoDBClient","DescribeExportCommand").f(void 0,void 0).ser(ale).de(lde).build(){};f(PF,"DescribeExportCommand");var IF=PF,OF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeGlobalTable",{}).n("DynamoDBClient","DescribeGlobalTableCommand").f(void 0,void 0).ser(cle).de(dde).build(){};f(OF,"DescribeGlobalTableCommand");var RF=OF,DF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeGlobalTableSettings",{}).n("DynamoDBClient","DescribeGlobalTableSettingsCommand").f(void 0,void 0).ser(ule).de(pde).build(){};f(DF,"DescribeGlobalTableSettingsCommand");var NF=DF,MF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeImport",{}).n("DynamoDBClient","DescribeImportCommand").f(void 0,void 0).ser(lle).de(fde).build(){};f(MF,"DescribeImportCommand");var LF=MF,kF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeKinesisStreamingDestination",{}).n("DynamoDBClient","DescribeKinesisStreamingDestinationCommand").f(void 0,void 0).ser(dle).de(mde).build(){};f(kF,"DescribeKinesisStreamingDestinationCommand");var FF=kF,BF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeLimits",{}).n("DynamoDBClient","DescribeLimitsCommand").f(void 0,void 0).ser(ple).de(hde).build(){};f(BF,"DescribeLimitsCommand");var jF=BF,qF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeTable",{}).n("DynamoDBClient","DescribeTableCommand").f(void 0,void 0).ser(fle).de(yde).build(){};f(qF,"DescribeTableCommand");var jd=qF,UF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeTableReplicaAutoScaling",{}).n("DynamoDBClient","DescribeTableReplicaAutoScalingCommand").f(void 0,void 0).ser(mle).de(_de).build(){};f(UF,"DescribeTableReplicaAutoScalingCommand");var GF=UF,$F=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeTimeToLive",{}).n("DynamoDBClient","DescribeTimeToLiveCommand").f(void 0,void 0).ser(hle).de(vde).build(){};f($F,"DescribeTimeToLiveCommand");var HF=$F,VF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DisableKinesisStreamingDestination",{}).n("DynamoDBClient","DisableKinesisStreamingDestinationCommand").f(void 0,void 0).ser(yle).de(gde).build(){};f(VF,"DisableKinesisStreamingDestinationCommand");var zF=VF,WF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","EnableKinesisStreamingDestination",{}).n("DynamoDBClient","EnableKinesisStreamingDestinationCommand").f(void 0,void 0).ser(_le).de(Ede).build(){};f(WF,"EnableKinesisStreamingDestinationCommand");var KF=WF,JF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ExecuteStatement",{}).n("DynamoDBClient","ExecuteStatementCommand").f(void 0,void 0).ser(vle).de(Sde).build(){};f(JF,"ExecuteStatementCommand");var YF=JF,XF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ExecuteTransaction",{}).n("DynamoDBClient","ExecuteTransactionCommand").f(void 0,void 0).ser(gle).de(bde).build(){};f(XF,"ExecuteTransactionCommand");var QF=XF,ZF=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ExportTableToPointInTime",{}).n("DynamoDBClient","ExportTableToPointInTimeCommand").f(void 0,void 0).ser(Ele).de(Cde).build(){};f(ZF,"ExportTableToPointInTimeCommand");var eB=ZF,tB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","GetItem",{}).n("DynamoDBClient","GetItemCommand").f(void 0,void 0).ser(Sle).de(wde).build(){};f(tB,"GetItemCommand");var rB=tB,nB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","GetResourcePolicy",{}).n("DynamoDBClient","GetResourcePolicyCommand").f(void 0,void 0).ser(ble).de(xde).build(){};f(nB,"GetResourcePolicyCommand");var iB=nB,oB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ImportTable",{}).n("DynamoDBClient","ImportTableCommand").f(void 0,void 0).ser(Cle).de(Ade).build(){};f(oB,"ImportTableCommand");var sB=oB,aB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListBackups",{}).n("DynamoDBClient","ListBackupsCommand").f(void 0,void 0).ser(wle).de(Tde).build(){};f(aB,"ListBackupsCommand");var cB=aB,uB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListContributorInsights",{}).n("DynamoDBClient","ListContributorInsightsCommand").f(void 0,void 0).ser(xle).de(Pde).build(){};f(uB,"ListContributorInsightsCommand");var av=uB,lB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListExports",{}).n("DynamoDBClient","ListExportsCommand").f(void 0,void 0).ser(Ale).de(Ide).build(){};f(lB,"ListExportsCommand");var cv=lB,dB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListGlobalTables",{}).n("DynamoDBClient","ListGlobalTablesCommand").f(void 0,void 0).ser(Tle).de(Ode).build(){};f(dB,"ListGlobalTablesCommand");var pB=dB,fB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListImports",{}).n("DynamoDBClient","ListImportsCommand").f(void 0,void 0).ser(Ple).de(Rde).build(){};f(fB,"ListImportsCommand");var uv=fB,mB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListTables",{}).n("DynamoDBClient","ListTablesCommand").f(void 0,void 0).ser(Ile).de(Dde).build(){};f(mB,"ListTablesCommand");var lv=mB,hB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListTagsOfResource",{}).n("DynamoDBClient","ListTagsOfResourceCommand").f(void 0,void 0).ser(Ole).de(Nde).build(){};f(hB,"ListTagsOfResourceCommand");var yB=hB,_B=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","PutItem",{}).n("DynamoDBClient","PutItemCommand").f(void 0,void 0).ser(Rle).de(Mde).build(){};f(_B,"PutItemCommand");var vB=_B,gB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","PutResourcePolicy",{}).n("DynamoDBClient","PutResourcePolicyCommand").f(void 0,void 0).ser(Dle).de(Lde).build(){};f(gB,"PutResourcePolicyCommand");var EB=gB,SB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","Query",{}).n("DynamoDBClient","QueryCommand").f(void 0,void 0).ser(Nle).de(kde).build(){};f(SB,"QueryCommand");var dv=SB,bB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","RestoreTableFromBackup",{}).n("DynamoDBClient","RestoreTableFromBackupCommand").f(void 0,void 0).ser(Mle).de(Fde).build(){};f(bB,"RestoreTableFromBackupCommand");var CB=bB,wB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","RestoreTableToPointInTime",{}).n("DynamoDBClient","RestoreTableToPointInTimeCommand").f(void 0,void 0).ser(Lle).de(Bde).build(){};f(wB,"RestoreTableToPointInTimeCommand");var xB=wB,AB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","Scan",{}).n("DynamoDBClient","ScanCommand").f(void 0,void 0).ser(kle).de(jde).build(){};f(AB,"ScanCommand");var pv=AB,TB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","TagResource",{}).n("DynamoDBClient","TagResourceCommand").f(void 0,void 0).ser(Fle).de(qde).build(){};f(TB,"TagResourceCommand");var PB=TB,IB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","TransactGetItems",{}).n("DynamoDBClient","TransactGetItemsCommand").f(void 0,void 0).ser(Ble).de(Ude).build(){};f(IB,"TransactGetItemsCommand");var OB=IB,RB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","TransactWriteItems",{}).n("DynamoDBClient","TransactWriteItemsCommand").f(void 0,void 0).ser(jle).de(Gde).build(){};f(RB,"TransactWriteItemsCommand");var DB=RB,NB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UntagResource",{}).n("DynamoDBClient","UntagResourceCommand").f(void 0,void 0).ser(qle).de($de).build(){};f(NB,"UntagResourceCommand");var MB=NB,LB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateContinuousBackups",{}).n("DynamoDBClient","UpdateContinuousBackupsCommand").f(void 0,void 0).ser(Ule).de(Hde).build(){};f(LB,"UpdateContinuousBackupsCommand");var kB=LB,FB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateContributorInsights",{}).n("DynamoDBClient","UpdateContributorInsightsCommand").f(void 0,void 0).ser(Gle).de(Vde).build(){};f(FB,"UpdateContributorInsightsCommand");var BB=FB,jB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateGlobalTable",{}).n("DynamoDBClient","UpdateGlobalTableCommand").f(void 0,void 0).ser($le).de(zde).build(){};f(jB,"UpdateGlobalTableCommand");var qB=jB,UB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateGlobalTableSettings",{}).n("DynamoDBClient","UpdateGlobalTableSettingsCommand").f(void 0,void 0).ser(Hle).de(Wde).build(){};f(UB,"UpdateGlobalTableSettingsCommand");var GB=UB,$B=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateItem",{}).n("DynamoDBClient","UpdateItemCommand").f(void 0,void 0).ser(Vle).de(Kde).build(){};f($B,"UpdateItemCommand");var HB=$B,VB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateKinesisStreamingDestination",{}).n("DynamoDBClient","UpdateKinesisStreamingDestinationCommand").f(void 0,void 0).ser(zle).de(Jde).build(){};f(VB,"UpdateKinesisStreamingDestinationCommand");var zB=VB,WB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateTable",{}).n("DynamoDBClient","UpdateTableCommand").f(void 0,void 0).ser(Wle).de(Yde).build(){};f(WB,"UpdateTableCommand");var KB=WB,JB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateTableReplicaAutoScaling",{}).n("DynamoDBClient","UpdateTableReplicaAutoScalingCommand").f(void 0,void 0).ser(Kle).de(Xde).build(){};f(JB,"UpdateTableReplicaAutoScalingCommand");var YB=JB,XB=class extends l.Command.classBuilder().ep({...J}).m(function(t,r,n,i){return[(0,K.getSerdePlugin)(n,this.serialize,this.deserialize),(0,z.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateTimeToLive",{}).n("DynamoDBClient","UpdateTimeToLiveCommand").f(void 0,void 0).ser(Jle).de(Qde).build(){};f(XB,"UpdateTimeToLiveCommand");var QB=XB,bhe={BatchExecuteStatementCommand:nF,BatchGetItemCommand:oF,BatchWriteItemCommand:aF,CreateBackupCommand:uF,CreateGlobalTableCommand:dF,CreateTableCommand:fF,DeleteBackupCommand:hF,DeleteItemCommand:_F,DeleteResourcePolicyCommand:gF,DeleteTableCommand:SF,DescribeBackupCommand:CF,DescribeContinuousBackupsCommand:xF,DescribeContributorInsightsCommand:TF,DescribeEndpointsCommand:sv,DescribeExportCommand:IF,DescribeGlobalTableCommand:RF,DescribeGlobalTableSettingsCommand:NF,DescribeImportCommand:LF,DescribeKinesisStreamingDestinationCommand:FF,DescribeLimitsCommand:jF,DescribeTableCommand:jd,DescribeTableReplicaAutoScalingCommand:GF,DescribeTimeToLiveCommand:HF,DisableKinesisStreamingDestinationCommand:zF,EnableKinesisStreamingDestinationCommand:KF,ExecuteStatementCommand:YF,ExecuteTransactionCommand:QF,ExportTableToPointInTimeCommand:eB,GetItemCommand:rB,GetResourcePolicyCommand:iB,ImportTableCommand:sB,ListBackupsCommand:cB,ListContributorInsightsCommand:av,ListExportsCommand:cv,ListGlobalTablesCommand:pB,ListImportsCommand:uv,ListTablesCommand:lv,ListTagsOfResourceCommand:yB,PutItemCommand:vB,PutResourcePolicyCommand:EB,QueryCommand:dv,RestoreTableFromBackupCommand:CB,RestoreTableToPointInTimeCommand:xB,ScanCommand:pv,TagResourceCommand:PB,TransactGetItemsCommand:OB,TransactWriteItemsCommand:DB,UntagResourceCommand:MB,UpdateContinuousBackupsCommand:kB,UpdateContributorInsightsCommand:BB,UpdateGlobalTableCommand:qB,UpdateGlobalTableSettingsCommand:GB,UpdateItemCommand:HB,UpdateKinesisStreamingDestinationCommand:zB,UpdateTableCommand:KB,UpdateTableReplicaAutoScalingCommand:YB,UpdateTimeToLiveCommand:QB},ZB=class extends vi{};f(ZB,"DynamoDB");var ej=ZB;(0,l.createAggregatedClient)(bhe,ej);var Che=bt(),whe=(0,Che.createPaginator)(vi,av,"NextToken","NextToken","MaxResults"),xhe=bt(),Ahe=(0,xhe.createPaginator)(vi,cv,"NextToken","NextToken","MaxResults"),The=bt(),Phe=(0,The.createPaginator)(vi,uv,"NextToken","NextToken","PageSize"),Ihe=bt(),Ohe=(0,Ihe.createPaginator)(vi,lv,"ExclusiveStartTableName","LastEvaluatedTableName","Limit"),Rhe=bt(),Dhe=(0,Rhe.createPaginator)(vi,dv,"ExclusiveStartKey","LastEvaluatedKey","Limit"),Nhe=bt(),Mhe=(0,Nhe.createPaginator)(vi,pv,"ExclusiveStartKey","LastEvaluatedKey","Limit"),Nr=kM(),tj=f(async(e,t)=>{let r;try{let n=await e.send(new jd(t));r=n;try{if(f(()=>n.Table.TableStatus,"returnComparator")()==="ACTIVE")return{state:Nr.WaiterState.SUCCESS,reason:r}}catch{}}catch(n){if(r=n,n.name&&n.name=="ResourceNotFoundException")return{state:Nr.WaiterState.RETRY,reason:r}}return{state:Nr.WaiterState.RETRY,reason:r}},"checkState"),Lhe=f(async(e,t)=>{let r={minDelay:20,maxDelay:120};return(0,Nr.createWaiter)({...r,...e},t,tj)},"waitForTableExists"),khe=f(async(e,t)=>{let r={minDelay:20,maxDelay:120},n=await(0,Nr.createWaiter)({...r,...e},t,tj);return(0,Nr.checkExceptions)(n)},"waitUntilTableExists"),rj=f(async(e,t)=>{let r;try{r=await e.send(new jd(t))}catch(n){if(r=n,n.name&&n.name=="ResourceNotFoundException")return{state:Nr.WaiterState.SUCCESS,reason:r}}return{state:Nr.WaiterState.RETRY,reason:r}},"checkState"),Fhe=f(async(e,t)=>{let r={minDelay:20,maxDelay:120};return(0,Nr.createWaiter)({...r,...e},t,rj)},"waitForTableNotExists"),Bhe=f(async(e,t)=>{let r={minDelay:20,maxDelay:120},n=await(0,Nr.createWaiter)({...r,...e},t,rj);return(0,Nr.checkExceptions)(n)},"waitUntilTableNotExists")});var er={};ea(er,{__assign:()=>hv,__asyncDelegator:()=>tye,__asyncGenerator:()=>eye,__asyncValues:()=>rye,__await:()=>ic,__awaiter:()=>Khe,__classPrivateFieldGet:()=>aye,__classPrivateFieldIn:()=>uye,__classPrivateFieldSet:()=>cye,__createBinding:()=>_v,__decorate:()=>Uhe,__esDecorate:()=>$he,__exportStar:()=>Yhe,__extends:()=>jhe,__generator:()=>Jhe,__importDefault:()=>sye,__importStar:()=>oye,__makeTemplateObject:()=>nye,__metadata:()=>Whe,__param:()=>Ghe,__propKey:()=>Vhe,__read:()=>ij,__rest:()=>qhe,__runInitializers:()=>Hhe,__setFunctionName:()=>zhe,__spread:()=>Xhe,__spreadArray:()=>Zhe,__spreadArrays:()=>Qhe,__values:()=>yv});function jhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");mv(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function qhe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Uhe(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function Ghe(e,t){return function(r,n){t(r,n,e)}}function $he(e,t,r,n,i,o){function s(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),p,m=!1,h=r.length-1;h>=0;h--){var v={};for(var _ in n)v[_]=_==="access"?{}:n[_];for(var _ in n.access)v.access[_]=n.access[_];v.addInitializer=function(x){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(x||null))};var g=(0,r[h])(a==="accessor"?{get:d.get,set:d.set}:d[c],v);if(a==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(p=s(g.get))&&(d.get=p),(p=s(g.set))&&(d.set=p),(p=s(g.init))&&i.push(p)}else(p=s(g))&&(a==="field"?i.push(p):d[c]=p)}u&&Object.defineProperty(u,n.name,d),m=!0}function Hhe(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function Vhe(e){return typeof e=="symbol"?e:"".concat(e)}function zhe(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function Whe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Khe(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(d){try{u(n.next(d))}catch(p){s(p)}}function c(d){try{u(n.throw(d))}catch(p){s(p)}}function u(d){d.done?o(d.value):i(d.value).then(a,c)}u((n=n.apply(e,t||[])).next())})}function Jhe(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(r=0)),r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Yhe(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&_v(t,e,r)}function yv(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ij(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function Xhe(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ij(arguments[t]));return e}function Qhe(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function Zhe(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function ic(e){return this instanceof ic?(this.v=e,this):new ic(e)}function eye(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(m){n[m]&&(i[m]=function(h){return new Promise(function(v,_){o.push([m,h,v,_])>1||a(m,h)})})}function a(m,h){try{c(n[m](h))}catch(v){p(o[0][3],v)}}function c(m){m.value instanceof ic?Promise.resolve(m.value.v).then(u,d):p(o[0][2],m)}function u(m){a("next",m)}function d(m){a("throw",m)}function p(m,h){m(h),o.shift(),o.length&&a(o[0][0],o[0][1])}}function tye(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){t[i]=e[i]?function(s){return(r=!r)?{value:ic(e[i](s)),done:!1}:o?o(s):s}:o}}function rye(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof yv=="function"?yv(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(s){return new Promise(function(a,c){s=e[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(u){o({value:u,done:a})},s)}}function nye(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function oye(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&_v(t,e,r);return iye(t,e),t}function sye(e){return e&&e.__esModule?e:{default:e}}function aye(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function cye(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r}function uye(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}var mv,hv,_v,iye,tr=at(()=>{mv=function(e,t){return mv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},mv(e,t)};hv=function(){return hv=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},hv.apply(this,arguments)};_v=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});iye=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}});var xn={};ea(xn,{__assign:()=>gv,__asyncDelegator:()=>bye,__asyncGenerator:()=>Sye,__asyncValues:()=>Cye,__await:()=>oc,__awaiter:()=>hye,__classPrivateFieldGet:()=>Tye,__classPrivateFieldSet:()=>Pye,__createBinding:()=>_ye,__decorate:()=>pye,__exportStar:()=>vye,__extends:()=>lye,__generator:()=>yye,__importDefault:()=>Aye,__importStar:()=>xye,__makeTemplateObject:()=>wye,__metadata:()=>mye,__param:()=>fye,__read:()=>oj,__rest:()=>dye,__spread:()=>gye,__spreadArrays:()=>Eye,__values:()=>Ev});function lye(e,t){vv(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function dye(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function pye(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(o=(i<3?s(o):i>3?s(t,r,o):s(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function fye(e,t){return function(r,n){t(r,n,e)}}function mye(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function hye(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(d){try{u(n.next(d))}catch(p){s(p)}}function c(d){try{u(n.throw(d))}catch(p){s(p)}}function u(d){d.done?o(d.value):i(d.value).then(a,c)}u((n=n.apply(e,t||[])).next())})}function yye(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(d){return c([u,d])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function _ye(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}function vye(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function Ev(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function oj(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function gye(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(oj(arguments[t]));return e}function Eye(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function oc(e){return this instanceof oc?(this.v=e,this):new oc(e)}function Sye(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(m){n[m]&&(i[m]=function(h){return new Promise(function(v,_){o.push([m,h,v,_])>1||a(m,h)})})}function a(m,h){try{c(n[m](h))}catch(v){p(o[0][3],v)}}function c(m){m.value instanceof oc?Promise.resolve(m.value.v).then(u,d):p(o[0][2],m)}function u(m){a("next",m)}function d(m){a("throw",m)}function p(m,h){m(h),o.shift(),o.length&&a(o[0][0],o[0][1])}}function bye(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){t[i]=e[i]?function(s){return(r=!r)?{value:oc(e[i](s)),done:i==="return"}:o?o(s):s}:o}}function Cye(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Ev=="function"?Ev(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(s){return new Promise(function(a,c){s=e[o](s),i(a,c,s.done,s.value)})}}function i(o,s,a,c){Promise.resolve(c).then(function(u){o({value:u,done:a})},s)}}function wye(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function xye(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function Aye(e){return e&&e.__esModule?e:{default:e}}function Tye(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function Pye(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}var vv,gv,An=at(()=>{vv=function(e,t){return vv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},vv(e,t)};gv=function(){return gv=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},gv.apply(this,arguments)}});var sj=y(_s=>{"use strict";Object.defineProperty(_s,"__esModule",{value:!0});_s.toUtf8=_s.fromUtf8=void 0;var Iye=e=>{let t=[];for(let r=0,n=e.length;r<n;r++){let i=e.charCodeAt(r);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192,i&63|128);else if(r+1<e.length&&(i&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320){let o=65536+((i&1023)<<10)+(e.charCodeAt(++r)&1023);t.push(o>>18|240,o>>12&63|128,o>>6&63|128,o&63|128)}else t.push(i>>12|224,i>>6&63|128,i&63|128)}return Uint8Array.from(t)};_s.fromUtf8=Iye;var Oye=e=>{let t="";for(let r=0,n=e.length;r<n;r++){let i=e[r];if(i<128)t+=String.fromCharCode(i);else if(192<=i&&i<224){let o=e[++r];t+=String.fromCharCode((i&31)<<6|o&63)}else if(240<=i&&i<365){let s="%"+[i,e[++r],e[++r],e[++r]].map(a=>a.toString(16)).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((i&15)<<12|(e[++r]&63)<<6|e[++r]&63)}return t};_s.toUtf8=Oye});var aj=y(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.toUtf8=vs.fromUtf8=void 0;function Rye(e){return new TextEncoder().encode(e)}vs.fromUtf8=Rye;function Dye(e){return new TextDecoder("utf-8").decode(e)}vs.toUtf8=Dye});var qd=y(gs=>{"use strict";Object.defineProperty(gs,"__esModule",{value:!0});gs.toUtf8=gs.fromUtf8=void 0;var cj=sj(),uj=aj(),Nye=e=>typeof TextEncoder=="function"?(0,uj.fromUtf8)(e):(0,cj.fromUtf8)(e);gs.fromUtf8=Nye;var Mye=e=>typeof TextDecoder=="function"?(0,uj.toUtf8)(e):(0,cj.toUtf8)(e);gs.toUtf8=Mye});var lj=y(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.convertToBuffer=void 0;var Lye=qd(),kye=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:Lye.fromUtf8;function Fye(e){return e instanceof Uint8Array?e:typeof e=="string"?kye(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}Ud.convertToBuffer=Fye});var dj=y(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});Gd.isEmptyData=void 0;function Bye(e){return typeof e=="string"?e.length===0:e.byteLength===0}Gd.isEmptyData=Bye});var pj=y($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});$d.numToUint8=void 0;function jye(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}$d.numToUint8=jye});var fj=y(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});Hd.uint32ArrayFrom=void 0;function qye(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}Hd.uint32ArrayFrom=qye});var Sv=y(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.uint32ArrayFrom=en.numToUint8=en.isEmptyData=en.convertToBuffer=void 0;var Uye=lj();Object.defineProperty(en,"convertToBuffer",{enumerable:!0,get:function(){return Uye.convertToBuffer}});var Gye=dj();Object.defineProperty(en,"isEmptyData",{enumerable:!0,get:function(){return Gye.isEmptyData}});var $ye=pj();Object.defineProperty(en,"numToUint8",{enumerable:!0,get:function(){return $ye.numToUint8}});var Hye=fj();Object.defineProperty(en,"uint32ArrayFrom",{enumerable:!0,get:function(){return Hye.uint32ArrayFrom}})});var yj=y(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});Vd.AwsCrc32=void 0;var mj=(An(),_e(xn)),bv=Sv(),hj=zd(),Vye=(function(){function e(){this.crc32=new hj.Crc32}return e.prototype.update=function(t){(0,bv.isEmptyData)(t)||this.crc32.update((0,bv.convertToBuffer)(t))},e.prototype.digest=function(){return mj.__awaiter(this,void 0,void 0,function(){return mj.__generator(this,function(t){return[2,(0,bv.numToUint8)(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new hj.Crc32},e})();Vd.AwsCrc32=Vye});var zd=y(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.AwsCrc32=gi.Crc32=gi.crc32=void 0;var zye=(An(),_e(xn)),Wye=Sv();function Kye(e){return new _j().update(e).digest()}gi.crc32=Kye;var _j=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,n;try{for(var i=zye.__values(t),o=i.next();!o.done;o=i.next()){var s=o.value;this.checksum=this.checksum>>>8^Yye[(this.checksum^s)&255]}}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})();gi.Crc32=_j;var Jye=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],Yye=(0,Wye.uint32ArrayFrom)(Jye),Xye=yj();Object.defineProperty(gi,"AwsCrc32",{enumerable:!0,get:function(){return Xye.AwsCrc32}})});var Ss=y(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.toHex=Es.fromHex=void 0;var vj={},Cv={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),vj[e]=t,Cv[t]=e}function Qye(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){let n=e.slice(r,r+2).toLowerCase();if(n in Cv)t[r/2]=Cv[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}Es.fromHex=Qye;function Zye(e){let t="";for(let r=0;r<e.byteLength;r++)t+=vj[e[r]];return t}Es.toHex=Zye});var xv=y(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});Wd.Int64=void 0;var e_e=Ss(),wv=class e{constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let r=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(t));n>-1&&i>0;n--,i/=256)r[n]=i;return t<0&&gj(r),new e(r)}valueOf(){let t=this.bytes.slice(0),r=t[0]&128;return r&&gj(t),parseInt((0,e_e.toHex)(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};Wd.Int64=wv;function gj(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}});var Pv=y(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});Kd.HeaderMarshaller=void 0;var bs=Ss(),Av=xv(),Tv=class{constructor(t,r){this.toUtf8=t,this.fromUtf8=r}format(t){let r=[];for(let o of Object.keys(t)){let s=this.fromUtf8(o);r.push(Uint8Array.from([s.byteLength]),s,this.formatHeaderValue(t[o]))}let n=new Uint8Array(r.reduce((o,s)=>o+s.byteLength,0)),i=0;for(let o of r)n.set(o,i),i+=o.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":let r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":let i=new Uint8Array(9);return i[0]=5,i.set(t.value.bytes,1),i;case"binary":let o=new DataView(new ArrayBuffer(3+t.value.byteLength));o.setUint8(0,6),o.setUint16(1,t.value.byteLength,!1);let s=new Uint8Array(o.buffer);return s.set(t.value,3),s;case"string":let a=this.fromUtf8(t.value),c=new DataView(new ArrayBuffer(3+a.byteLength));c.setUint8(0,7),c.setUint16(1,a.byteLength,!1);let u=new Uint8Array(c.buffer);return u.set(a,3),u;case"timestamp":let d=new Uint8Array(9);return d[0]=8,d.set(Av.Int64.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!u_e.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);let p=new Uint8Array(17);return p[0]=9,p.set((0,bs.fromHex)(t.value.replace(/\-/g,"")),1),p}}parse(t){let r={},n=0;for(;n<t.byteLength;){let i=t.getUint8(n++),o=this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+n,i));switch(n+=i,t.getUint8(n++)){case 0:r[o]={type:Sj,value:!0};break;case 1:r[o]={type:Sj,value:!1};break;case 2:r[o]={type:t_e,value:t.getInt8(n++)};break;case 3:r[o]={type:r_e,value:t.getInt16(n,!1)},n+=2;break;case 4:r[o]={type:n_e,value:t.getInt32(n,!1)},n+=4;break;case 5:r[o]={type:i_e,value:new Av.Int64(new Uint8Array(t.buffer,t.byteOffset+n,8))},n+=8;break;case 6:let s=t.getUint16(n,!1);n+=2,r[o]={type:o_e,value:new Uint8Array(t.buffer,t.byteOffset+n,s)},n+=s;break;case 7:let a=t.getUint16(n,!1);n+=2,r[o]={type:s_e,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+n,a))},n+=a;break;case 8:r[o]={type:a_e,value:new Date(new Av.Int64(new Uint8Array(t.buffer,t.byteOffset+n,8)).valueOf())},n+=8;break;case 9:let c=new Uint8Array(t.buffer,t.byteOffset+n,16);n+=16,r[o]={type:c_e,value:`${(0,bs.toHex)(c.subarray(0,4))}-${(0,bs.toHex)(c.subarray(4,6))}-${(0,bs.toHex)(c.subarray(6,8))}-${(0,bs.toHex)(c.subarray(8,10))}-${(0,bs.toHex)(c.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return r}};Kd.HeaderMarshaller=Tv;var Ej;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(Ej||(Ej={}));var Sj="boolean",t_e="byte",r_e="short",n_e="integer",i_e="long",o_e="binary",s_e="string",a_e="timestamp",c_e="uuid",u_e=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/});var Cj=y(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});Jd.splitMessage=void 0;var l_e=zd(),bj=4,Ei=bj*2,to=4,d_e=Ei+to*2;function p_e({byteLength:e,byteOffset:t,buffer:r}){if(e<d_e)throw new Error("Provided message too short to accommodate event stream message overhead");let n=new DataView(r,t,e),i=n.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");let o=n.getUint32(bj,!1),s=n.getUint32(Ei,!1),a=n.getUint32(e-to,!1),c=new l_e.Crc32().update(new Uint8Array(r,t,Ei));if(s!==c.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(r,t+Ei,e-(Ei+to))),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(r,t+Ei+to,o),body:new Uint8Array(r,t+Ei+to+o,i-o-(Ei+to+to))}}Jd.splitMessage=p_e});var wj=y(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});Yd.EventStreamCodec=void 0;var f_e=zd(),m_e=Pv(),h_e=Cj(),Iv=class{constructor(t,r){this.headerMarshaller=new m_e.HeaderMarshaller(t,r),this.messageBuffer=[],this.isEndOfStream=!1}feed(t){this.messageBuffer.push(this.decode(t))}endOfStream(){this.isEndOfStream=!0}getMessage(){let t=this.messageBuffer.pop(),r=this.isEndOfStream;return{getMessage(){return t},isEndOfStream(){return r}}}getAvailableMessages(){let t=this.messageBuffer;this.messageBuffer=[];let r=this.isEndOfStream;return{getMessages(){return t},isEndOfStream(){return r}}}encode({headers:t,body:r}){let n=this.headerMarshaller.format(t),i=n.byteLength+r.byteLength+16,o=new Uint8Array(i),s=new DataView(o.buffer,o.byteOffset,o.byteLength),a=new f_e.Crc32;return s.setUint32(0,i,!1),s.setUint32(4,n.byteLength,!1),s.setUint32(8,a.update(o.subarray(0,8)).digest(),!1),o.set(n,12),o.set(r,n.byteLength+12),s.setUint32(i-4,a.update(o.subarray(8,i-4)).digest(),!1),o}decode(t){let{headers:r,body:n}=(0,h_e.splitMessage)(t);return{headers:this.headerMarshaller.parse(r),body:n}}formatHeaders(t){return this.headerMarshaller.format(t)}};Yd.EventStreamCodec=Iv});var Aj=y(xj=>{"use strict";Object.defineProperty(xj,"__esModule",{value:!0})});var Tj=y(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});Xd.MessageDecoderStream=void 0;var Ov=class{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.inputStream)yield this.options.decoder.decode(t)}};Xd.MessageDecoderStream=Ov});var Pj=y(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});Qd.MessageEncoderStream=void 0;var Rv=class{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.messageStream)yield this.options.encoder.encode(t);this.options.includeEndFrame&&(yield new Uint8Array(0))}};Qd.MessageEncoderStream=Rv});var Ij=y(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.SmithyMessageDecoderStream=void 0;var Dv=class{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.messageStream){let r=await this.options.deserializer(t);r!==void 0&&(yield r)}}};Zd.SmithyMessageDecoderStream=Dv});var Oj=y(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});ep.SmithyMessageEncoderStream=void 0;var Nv=class{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.inputStream)yield this.options.serializer(t)}};ep.SmithyMessageEncoderStream=Nv});var Rj=y(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});var Si=(tr(),_e(er));Si.__exportStar(wj(),tn);Si.__exportStar(Pv(),tn);Si.__exportStar(xv(),tn);Si.__exportStar(Aj(),tn);Si.__exportStar(Tj(),tn);Si.__exportStar(Pj(),tn);Si.__exportStar(Ij(),tn);Si.__exportStar(Oj(),tn)});var Dj=y(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});tp.normalizeProvider=void 0;var y_e=e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t};tp.normalizeProvider=y_e});var Nj=y(Mv=>{"use strict";Object.defineProperty(Mv,"__esModule",{value:!0});var __e=(tr(),_e(er));__e.__exportStar(Dj(),Mv)});var Lv=y(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});rp.isArrayBuffer=void 0;var v_e=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";rp.isArrayBuffer=v_e});var Fv=y(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});Cs.fromString=Cs.fromArrayBuffer=void 0;var g_e=Lv(),kv=require("buffer"),E_e=(e,t=0,r=e.byteLength-t)=>{if(!(0,g_e.isArrayBuffer)(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return kv.Buffer.from(e,t,r)};Cs.fromArrayBuffer=E_e;var S_e=(e,t)=>{if(typeof e!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?kv.Buffer.from(e,t):kv.Buffer.from(e)};Cs.fromString=S_e});var Bv=y(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});np.fromUtf8=void 0;var b_e=Fv(),C_e=e=>{let t=(0,b_e.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};np.fromUtf8=C_e});var Mj=y(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.toUint8Array=void 0;var w_e=Bv(),x_e=e=>typeof e=="string"?(0,w_e.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e);ip.toUint8Array=x_e});var Lj=y(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});op.toUtf8=void 0;var A_e=Fv(),T_e=e=>(0,A_e.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8");op.toUtf8=T_e});var sp=y(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});var jv=(tr(),_e(er));jv.__exportStar(Bv(),sc);jv.__exportStar(Mj(),sc);jv.__exportStar(Lj(),sc)});var ro=y(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.MAX_PRESIGNED_TTL=H.KEY_TYPE_IDENTIFIER=H.MAX_CACHE_SIZE=H.UNSIGNED_PAYLOAD=H.EVENT_ALGORITHM_IDENTIFIER=H.ALGORITHM_IDENTIFIER_V4A=H.ALGORITHM_IDENTIFIER=H.UNSIGNABLE_PATTERNS=H.SEC_HEADER_PATTERN=H.PROXY_HEADER_PATTERN=H.ALWAYS_UNSIGNABLE_HEADERS=H.HOST_HEADER=H.TOKEN_HEADER=H.SHA256_HEADER=H.SIGNATURE_HEADER=H.GENERATED_HEADERS=H.DATE_HEADER=H.AMZ_DATE_HEADER=H.AUTH_HEADER=H.REGION_SET_PARAM=H.TOKEN_QUERY_PARAM=H.SIGNATURE_QUERY_PARAM=H.EXPIRES_QUERY_PARAM=H.SIGNED_HEADERS_QUERY_PARAM=H.AMZ_DATE_QUERY_PARAM=H.CREDENTIAL_QUERY_PARAM=H.ALGORITHM_QUERY_PARAM=void 0;H.ALGORITHM_QUERY_PARAM="X-Amz-Algorithm";H.CREDENTIAL_QUERY_PARAM="X-Amz-Credential";H.AMZ_DATE_QUERY_PARAM="X-Amz-Date";H.SIGNED_HEADERS_QUERY_PARAM="X-Amz-SignedHeaders";H.EXPIRES_QUERY_PARAM="X-Amz-Expires";H.SIGNATURE_QUERY_PARAM="X-Amz-Signature";H.TOKEN_QUERY_PARAM="X-Amz-Security-Token";H.REGION_SET_PARAM="X-Amz-Region-Set";H.AUTH_HEADER="authorization";H.AMZ_DATE_HEADER=H.AMZ_DATE_QUERY_PARAM.toLowerCase();H.DATE_HEADER="date";H.GENERATED_HEADERS=[H.AUTH_HEADER,H.AMZ_DATE_HEADER,H.DATE_HEADER];H.SIGNATURE_HEADER=H.SIGNATURE_QUERY_PARAM.toLowerCase();H.SHA256_HEADER="x-amz-content-sha256";H.TOKEN_HEADER=H.TOKEN_QUERY_PARAM.toLowerCase();H.HOST_HEADER="host";H.ALWAYS_UNSIGNABLE_HEADERS={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0};H.PROXY_HEADER_PATTERN=/^proxy-/;H.SEC_HEADER_PATTERN=/^sec-/;H.UNSIGNABLE_PATTERNS=[/^proxy-/i,/^sec-/i];H.ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256";H.ALGORITHM_IDENTIFIER_V4A="AWS4-ECDSA-P256-SHA256";H.EVENT_ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256-PAYLOAD";H.UNSIGNED_PAYLOAD="UNSIGNED-PAYLOAD";H.MAX_CACHE_SIZE=50;H.KEY_TYPE_IDENTIFIER="aws4_request";H.MAX_PRESIGNED_TTL=3600*24*7});var Uv=y(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});bi.clearCredentialCache=bi.getSigningKey=bi.createScope=void 0;var P_e=Ss(),I_e=sp(),qv=ro(),ws={},ap=[],O_e=(e,t,r)=>`${e}/${t}/${r}/${qv.KEY_TYPE_IDENTIFIER}`;bi.createScope=O_e;var R_e=async(e,t,r,n,i)=>{let o=await kj(e,t.secretAccessKey,t.accessKeyId),s=`${r}:${n}:${i}:${(0,P_e.toHex)(o)}:${t.sessionToken}`;if(s in ws)return ws[s];for(ap.push(s);ap.length>qv.MAX_CACHE_SIZE;)delete ws[ap.shift()];let a=`AWS4${t.secretAccessKey}`;for(let c of[r,n,i,qv.KEY_TYPE_IDENTIFIER])a=await kj(e,a,c);return ws[s]=a};bi.getSigningKey=R_e;var D_e=()=>{ap.length=0,Object.keys(ws).forEach(e=>{delete ws[e]})};bi.clearCredentialCache=D_e;var kj=(e,t,r)=>{let n=new e(t);return n.update((0,I_e.toUint8Array)(r)),n.digest()}});var $v=y(cp=>{"use strict";Object.defineProperty(cp,"__esModule",{value:!0});cp.getCanonicalHeaders=void 0;var Gv=ro(),N_e=({headers:e},t,r)=>{let n={};for(let i of Object.keys(e).sort()){if(e[i]==null)continue;let o=i.toLowerCase();(o in Gv.ALWAYS_UNSIGNABLE_HEADERS||t!=null&&t.has(o)||Gv.PROXY_HEADER_PATTERN.test(o)||Gv.SEC_HEADER_PATTERN.test(o))&&(!r||r&&!r.has(o))||(n[o]=e[i].trim().replace(/\s+/g," "))}return n};cp.getCanonicalHeaders=N_e});var Hv=y(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.escapeUri=void 0;var M_e=e=>encodeURIComponent(e).replace(/[!'()*]/g,L_e);up.escapeUri=M_e;var L_e=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`});var Fj=y(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});lp.escapeUriPath=void 0;var k_e=Hv(),F_e=e=>e.split("/").map(k_e.escapeUri).join("/");lp.escapeUriPath=F_e});var jj=y(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});var Bj=(tr(),_e(er));Bj.__exportStar(Hv(),dp);Bj.__exportStar(Fj(),dp)});var Vv=y(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.getCanonicalQuery=void 0;var pp=jj(),B_e=ro(),j_e=({query:e={}})=>{let t=[],r={};for(let n of Object.keys(e).sort()){if(n.toLowerCase()===B_e.SIGNATURE_HEADER)continue;t.push(n);let i=e[n];typeof i=="string"?r[n]=`${(0,pp.escapeUri)(n)}=${(0,pp.escapeUri)(i)}`:Array.isArray(i)&&(r[n]=i.slice(0).sort().reduce((o,s)=>o.concat([`${(0,pp.escapeUri)(n)}=${(0,pp.escapeUri)(s)}`]),[]).join("&"))}return t.map(n=>r[n]).filter(n=>n).join("&")};fp.getCanonicalQuery=j_e});var zv=y(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.getPayloadHash=void 0;var q_e=Lv(),U_e=Ss(),G_e=sp(),qj=ro(),$_e=async({headers:e,body:t},r)=>{for(let n of Object.keys(e))if(n.toLowerCase()===qj.SHA256_HEADER)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||(0,q_e.isArrayBuffer)(t)){let n=new r;return n.update((0,G_e.toUint8Array)(t)),(0,U_e.toHex)(await n.digest())}return qj.UNSIGNED_PAYLOAD};mp.getPayloadHash=$_e});var Uj=y(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.deleteHeader=Ci.getHeaderValue=Ci.hasHeader=void 0;var H_e=(e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1};Ci.hasHeader=H_e;var V_e=(e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))if(e===r.toLowerCase())return t[r]};Ci.getHeaderValue=V_e;var z_e=(e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))e===r.toLowerCase()&&delete t[r]};Ci.deleteHeader=z_e});var Wv=y(no=>{"use strict";Object.defineProperty(no,"__esModule",{value:!0});no.cloneQuery=no.cloneRequest=void 0;var W_e=({headers:e,query:t,...r})=>({...r,headers:{...e},query:t?(0,no.cloneQuery)(t):void 0});no.cloneRequest=W_e;var K_e=e=>Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{});no.cloneQuery=K_e});var Kv=y(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});hp.moveHeadersToQuery=void 0;var J_e=Wv(),Y_e=(e,t={})=>{var r;let{headers:n,query:i={}}=typeof e.clone=="function"?e.clone():(0,J_e.cloneRequest)(e);for(let o of Object.keys(n)){let s=o.toLowerCase();s.slice(0,6)==="x-amz-"&&!(!((r=t.unhoistableHeaders)===null||r===void 0)&&r.has(s))&&(i[o]=n[o],delete n[o])}return{...e,headers:n,query:i}};hp.moveHeadersToQuery=Y_e});var Jv=y(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});yp.prepareRequest=void 0;var X_e=Wv(),Q_e=ro(),Z_e=e=>{e=typeof e.clone=="function"?e.clone():(0,X_e.cloneRequest)(e);for(let t of Object.keys(e.headers))Q_e.GENERATED_HEADERS.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e};yp.prepareRequest=Z_e});var Gj=y(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.toDate=io.iso8601=void 0;var eve=e=>(0,io.toDate)(e).toISOString().replace(/\.\d{3}Z$/,"Z");io.iso8601=eve;var tve=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;io.toDate=tve});var Wj=y(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.SignatureV4=void 0;var rve=Rj(),_p=Ss(),$j=Nj(),ac=sp(),_t=ro(),vp=Uv(),Hj=$v(),nve=Vv(),Yv=zv(),ive=Uj(),ove=Kv(),Vj=Jv(),sve=Gj(),Xv=class{constructor({applyChecksum:t,credentials:r,region:n,service:i,sha256:o,uriEscapePath:s=!0}){this.headerMarshaller=new rve.HeaderMarshaller(ac.toUtf8,ac.fromUtf8),this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=(0,$j.normalizeProvider)(n),this.credentialProvider=(0,$j.normalizeProvider)(r)}async presign(t,r={}){let{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:o,unhoistableHeaders:s,signableHeaders:a,signingRegion:c,signingService:u}=r,d=await this.credentialProvider();this.validateResolvedCredentials(d);let p=c??await this.regionProvider(),{longDate:m,shortDate:h}=gp(n);if(i>_t.MAX_PRESIGNED_TTL)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let v=(0,vp.createScope)(h,p,u??this.service),_=(0,ove.moveHeadersToQuery)((0,Vj.prepareRequest)(t),{unhoistableHeaders:s});d.sessionToken&&(_.query[_t.TOKEN_QUERY_PARAM]=d.sessionToken),_.query[_t.ALGORITHM_QUERY_PARAM]=_t.ALGORITHM_IDENTIFIER,_.query[_t.CREDENTIAL_QUERY_PARAM]=`${d.accessKeyId}/${v}`,_.query[_t.AMZ_DATE_QUERY_PARAM]=m,_.query[_t.EXPIRES_QUERY_PARAM]=i.toString(10);let g=(0,Hj.getCanonicalHeaders)(_,o,a);return _.query[_t.SIGNED_HEADERS_QUERY_PARAM]=zj(g),_.query[_t.SIGNATURE_QUERY_PARAM]=await this.getSignature(m,v,this.getSigningKey(d,p,h,u),this.createCanonicalRequest(_,g,await(0,Yv.getPayloadHash)(t,this.sha256))),_}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:n=new Date,priorSignature:i,signingRegion:o,signingService:s}){let a=o??await this.regionProvider(),{shortDate:c,longDate:u}=gp(n),d=(0,vp.createScope)(c,a,s??this.service),p=await(0,Yv.getPayloadHash)({headers:{},body:r},this.sha256),m=new this.sha256;m.update(t);let h=(0,_p.toHex)(await m.digest()),v=[_t.EVENT_ALGORITHM_IDENTIFIER,u,d,i,h,p].join(`
45
- `);return this.signString(v,{signingDate:n,signingRegion:a,signingService:s})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:i}){return this.signEvent({headers:this.headerMarshaller.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:i,priorSignature:t.priorSignature}).then(s=>({message:t.message,signature:s}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:i}={}){let o=await this.credentialProvider();this.validateResolvedCredentials(o);let s=n??await this.regionProvider(),{shortDate:a}=gp(r),c=new this.sha256(await this.getSigningKey(o,s,a,i));return c.update((0,ac.toUint8Array)(t)),(0,_p.toHex)(await c.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:o,signingService:s}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let c=o??await this.regionProvider(),u=(0,Vj.prepareRequest)(t),{longDate:d,shortDate:p}=gp(r),m=(0,vp.createScope)(p,c,s??this.service);u.headers[_t.AMZ_DATE_HEADER]=d,a.sessionToken&&(u.headers[_t.TOKEN_HEADER]=a.sessionToken);let h=await(0,Yv.getPayloadHash)(u,this.sha256);!(0,ive.hasHeader)(_t.SHA256_HEADER,u.headers)&&this.applyChecksum&&(u.headers[_t.SHA256_HEADER]=h);let v=(0,Hj.getCanonicalHeaders)(u,i,n),_=await this.getSignature(d,m,this.getSigningKey(a,c,p,s),this.createCanonicalRequest(u,v,h));return u.headers[_t.AUTH_HEADER]=`${_t.ALGORITHM_IDENTIFIER} Credential=${a.accessKeyId}/${m}, SignedHeaders=${zj(v)}, Signature=${_}`,u}createCanonicalRequest(t,r,n){let i=Object.keys(r).sort();return`${t.method}
43
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:t})}};Hm.checkUrl=xde});var yF=b(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});Vm.createGetRequest=Ade;Vm.getCredentials=Ide;var VT=lr(),vde=nt(),Tde=Te(),wde=wp();function Ade(e){return new vde.HttpRequest({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((t,[r,n])=>(t[r]=n,t),{}),fragment:e.hash})}async function Ide(e,t){let n=await(0,wde.sdkStreamMixin)(e.body).transformToString();if(e.statusCode===200){let o=JSON.parse(n);if(typeof o.AccessKeyId!="string"||typeof o.SecretAccessKey!="string"||typeof o.Token!="string"||typeof o.Expiration!="string")throw new VT.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.Token,expiration:(0,Tde.parseRfc3339DateTime)(o.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let o={};try{o=JSON.parse(n)}catch{}throw Object.assign(new VT.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:o.Code,Message:o.Message})}throw new VT.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:t})}});var gF=b(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});Wm.retryWrapper=void 0;var Cde=(e,t,r)=>async()=>{for(let n=0;n<t;++n)try{return await e()}catch{await new Promise(i=>setTimeout(i,r))}return await e()};Wm.retryWrapper=Cde});var SF=b(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});zm.fromHttp=void 0;var Dde=(Mi(),ie($i)),Rde=(Yt(),ie(Nn)),Pde=Oi(),_F=lr(),Ode=Dde.__importDefault(require("node:fs/promises")),Nde=hF(),EF=yF(),$de=gF(),Mde="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Lde="http://169.254.170.2",kde="AWS_CONTAINER_CREDENTIALS_FULL_URI",Fde="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Bde="AWS_CONTAINER_AUTHORIZATION_TOKEN",Ude=(e={})=>{var l,d,f,m;(l=e.logger)==null||l.debug("@aws-sdk/credential-provider-http - fromHttp");let t,r=e.awsContainerCredentialsRelativeUri??process.env[Mde],n=e.awsContainerCredentialsFullUri??process.env[kde],o=e.awsContainerAuthorizationToken??process.env[Bde],i=e.awsContainerAuthorizationTokenFile??process.env[Fde],s=((f=(d=e.logger)==null?void 0:d.constructor)==null?void 0:f.name)==="NoOpLogger"||!((m=e.logger)!=null&&m.warn)?console.warn:e.logger.warn.bind(e.logger);if(r&&n&&(s("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),s("awsContainerCredentialsFullUri will take precedence.")),o&&i&&(s("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),s("awsContainerAuthorizationToken will take precedence.")),n)t=n;else if(r)t=`${Lde}${r}`;else throw new _F.CredentialsProviderError(`No HTTP credential provider host provided.
44
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let a=new URL(t);(0,Nde.checkUrl)(a,e.logger);let c=Pde.NodeHttpHandler.create({requestTimeout:e.timeout??1e3,connectionTimeout:e.timeout??1e3});return(0,$de.retryWrapper)(async()=>{let h=(0,EF.createGetRequest)(a);o?h.headers.Authorization=o:i&&(h.headers.Authorization=(await Ode.default.readFile(i)).toString());try{let _=await c.handle(h);return(0,EF.getCredentials)(_.response).then(E=>(0,Rde.setCredentialFeature)(E,"CREDENTIALS_HTTP","z"))}catch(_){throw new _F.CredentialsProviderError(String(_),{logger:e.logger})}},e.maxRetries??3,e.timeout??1e3)};zm.fromHttp=Ude});var WT=b(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});Km.fromHttp=void 0;var jde=SF();Object.defineProperty(Km,"fromHttp",{enumerable:!0,get:function(){return jde.fromHttp}})});function qde(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Gde(e){return{schemeId:"smithy.api#noAuth"}}var Cl,bF,xF,vF,zT=D(()=>{Xt();Cl=C(ir()),bF=async(e,t,r)=>({operation:(0,Cl.getSmithyContext)(t).operation,region:await(0,Cl.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});xF=e=>{let t=[];switch(e.operation){case"CreateToken":{t.push(Gde(e));break}default:t.push(qde(e))}return t},vF=e=>{let t=Ln(e);return Object.assign(t,{authSchemePreference:(0,Cl.normalizeProvider)(e.authSchemePreference??[])})}});var TF,wF,KT=D(()=>{TF=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),wF={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var Qi,Dl=D(()=>{Qi={name:"@aws-sdk/nested-clients",version:"3.996.18",description:"Nested clients for AWS SDK packages.",main:"./dist-cjs/index.js",module:"./dist-es/index.js",types:"./dist-types/index.d.ts",scripts:{build:"yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_package_name"',"build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=20.0.0"},sideEffects:!1,author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.26","@aws-sdk/middleware-host-header":"^3.972.8","@aws-sdk/middleware-logger":"^3.972.8","@aws-sdk/middleware-recursion-detection":"^3.972.9","@aws-sdk/middleware-user-agent":"^3.972.28","@aws-sdk/region-config-resolver":"^3.972.10","@aws-sdk/types":"^3.973.6","@aws-sdk/util-endpoints":"^3.996.5","@aws-sdk/util-user-agent-browser":"^3.972.8","@aws-sdk/util-user-agent-node":"^3.973.14","@smithy/config-resolver":"^4.4.13","@smithy/core":"^3.23.13","@smithy/fetch-http-handler":"^5.3.15","@smithy/hash-node":"^4.2.12","@smithy/invalid-dependency":"^4.2.12","@smithy/middleware-content-length":"^4.2.12","@smithy/middleware-endpoint":"^4.4.28","@smithy/middleware-retry":"^4.4.46","@smithy/middleware-serde":"^4.2.16","@smithy/middleware-stack":"^4.2.12","@smithy/node-config-provider":"^4.3.12","@smithy/node-http-handler":"^4.5.1","@smithy/protocol-http":"^5.3.12","@smithy/smithy-client":"^4.12.8","@smithy/types":"^4.13.1","@smithy/url-parser":"^4.2.12","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/util-body-length-node":"^4.2.3","@smithy/util-defaults-mode-browser":"^4.3.44","@smithy/util-defaults-mode-node":"^4.2.48","@smithy/util-endpoints":"^3.3.3","@smithy/util-middleware":"^4.2.12","@smithy/util-retry":"^4.2.13","@smithy/util-utf8":"^4.2.2",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",premove:"4.0.0",typescript:"~5.8.3"},typesVersions:{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["./cognito-identity.d.ts","./cognito-identity.js","./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sso.d.ts","./sso.js","./sts.d.ts","./sts.js","dist-*/**"],browser:{"./dist-es/submodules/cognito-identity/runtimeConfig":"./dist-es/submodules/cognito-identity/runtimeConfig.browser","./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sso/runtimeConfig":"./dist-es/submodules/sso/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/nested-clients"},exports:{"./package.json":"./package.json","./sso-oidc":{types:"./dist-types/submodules/sso-oidc/index.d.ts",module:"./dist-es/submodules/sso-oidc/index.js",node:"./dist-cjs/submodules/sso-oidc/index.js",import:"./dist-es/submodules/sso-oidc/index.js",require:"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{types:"./dist-types/submodules/sts/index.d.ts",module:"./dist-es/submodules/sts/index.js",node:"./dist-cjs/submodules/sts/index.js",import:"./dist-es/submodules/sts/index.js",require:"./dist-cjs/submodules/sts/index.js"},"./signin":{types:"./dist-types/submodules/signin/index.d.ts",module:"./dist-es/submodules/signin/index.js",node:"./dist-cjs/submodules/signin/index.js",import:"./dist-es/submodules/signin/index.js",require:"./dist-cjs/submodules/signin/index.js"},"./cognito-identity":{types:"./dist-types/submodules/cognito-identity/index.d.ts",module:"./dist-es/submodules/cognito-identity/index.js",node:"./dist-cjs/submodules/cognito-identity/index.js",import:"./dist-es/submodules/cognito-identity/index.js",require:"./dist-cjs/submodules/cognito-identity/index.js"},"./sso":{types:"./dist-types/submodules/sso/index.d.ts",module:"./dist-es/submodules/sso/index.js",node:"./dist-cjs/submodules/sso/index.js",import:"./dist-es/submodules/sso/index.js",require:"./dist-cjs/submodules/sso/index.js"}}}});var bc=b(na=>{"use strict";var AF=require("node:os"),Rl=require("node:process"),IF=sx(),CF=require("node:fs/promises"),Sc=require("node:path"),Vde=Qs(),Wde=()=>{let e=["deno","bun","llrt"];for(let t of e)if(Rl.versions[t])return[`md/${t}`,Rl.versions[t]];return["md/nodejs",Rl.versions.node]},zde=e=>{let t=process.cwd();if(!e)return[t];let r=Sc.normalize(e),n=r.split(Sc.sep),o=n.indexOf("node_modules"),i=o!==-1?n.slice(0,o).join(Sc.sep):r;return t===i?[t]:[i,t]},Kde=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/,DF=(e="")=>{let t=e.match(Kde);if(!t)return;let[r,n,o,i]=[t[1],t[2],t[3],t[4]];return i?`${r}.${n}.${o}-${i}`:`${r}.${n}.${o}`},Yde=["^","~",">=","<=",">","<"],Qde=["latest","beta","dev","rc","insiders","next"],Xde=(e="")=>{if(Qde.includes(e))return e;let t=Yde.find(n=>e.startsWith(n))??"",r=DF(e.slice(t.length));if(r)return`${t}${r}`},_o,Jde=Sc.join("node_modules","typescript","package.json"),Zde=async()=>{if(_o===null)return;if(typeof _o=="string")return["md/tsc",_o];let e=!1;try{e=IF.booleanSelector(process.env,"AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED",IF.SelectorType.ENV)||!1}catch{}if(e){_o=null;return}let r=zde(typeof __dirname<"u"?__dirname:void 0),n;for(let s of r)try{let a=Sc.join(s,"package.json"),c=await CF.readFile(a,"utf-8"),{dependencies:l,devDependencies:d}=JSON.parse(c),f=(d==null?void 0:d.typescript)??(l==null?void 0:l.typescript);if(typeof f!="string")continue;n=f;break}catch{}if(!n){_o=null;return}let o;for(let s of r)try{let a=Sc.join(s,Jde),c=await CF.readFile(a,"utf-8"),{version:l}=JSON.parse(c),d=DF(l);if(typeof d!="string")continue;o=d;break}catch{}if(o)return _o=o,["md/tsc",_o];let i=Xde(n);if(typeof i!="string"){_o=null;return}return _o=`dev_${i}`,["md/tsc",_o]},RF={isCrtAvailable:!1},efe=()=>RF.isCrtAvailable?["md/crt-avail"]:null,PF=({serviceId:e,clientVersion:t})=>{let r=Wde();return async n=>{var l;let o=[["aws-sdk-js",t],["ua","2.1"],[`os/${AF.platform()}`,AF.release()],["lang/js"],r],i=await Zde();i&&o.push(i);let s=efe();s&&o.push(s),e&&o.push([`api/${e}`,t]),Rl.env.AWS_EXECUTION_ENV&&o.push([`exec-env/${Rl.env.AWS_EXECUTION_ENV}`]);let a=await((l=n==null?void 0:n.userAgentAppId)==null?void 0:l.call(n));return a?[...o,[`app/${a}`]]:[...o]}},tfe=PF,OF="AWS_SDK_UA_APP_ID",NF="sdk_ua_app_id",rfe="sdk-ua-app-id",nfe={environmentVariableSelector:e=>e[OF],configFileSelector:e=>e[NF]??e[rfe],default:Vde.DEFAULT_UA_APP_ID};na.NODE_APP_ID_CONFIG_OPTIONS=nfe;na.UA_APP_ID_ENV_NAME=OF;na.UA_APP_ID_INI_NAME=NF;na.createDefaultUserAgentProvider=PF;na.crtAvailability=RF;na.defaultUserAgent=tfe});var xc=b(LF=>{"use strict";var YT=Ha(),ofe=Kt(),ife=require("buffer"),$F=require("crypto"),QT=class{algorithmIdentifier;secret;hash;constructor(t,r){this.algorithmIdentifier=t,this.secret=r,this.reset()}update(t,r){this.hash.update(ofe.toUint8Array(MF(t,r)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?$F.createHmac(this.algorithmIdentifier,MF(this.secret)):$F.createHash(this.algorithmIdentifier)}};function MF(e,t){return ife.Buffer.isBuffer(e)?e:typeof e=="string"?YT.fromString(e,t):ArrayBuffer.isView(e)?YT.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength):YT.fromArrayBuffer(e)}LF.Hash=QT});var vc=b(kF=>{"use strict";var XT=require("node:fs"),sfe=e=>{if(!e)return 0;if(typeof e=="string")return Buffer.byteLength(e);if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size;if(typeof e.start=="number"&&typeof e.end=="number")return e.end+1-e.start;if(e instanceof XT.ReadStream){if(e.path!=null)return XT.lstatSync(e.path).size;if(typeof e.fd=="number")return XT.fstatSync(e.fd).size}throw new Error(`Body Length computation failed for ${e}`)};kF.calculateBodyLength=sfe});var Tc=b(jF=>{"use strict";var afe=$r(),FF=co(),cfe=lr(),ufe="AWS_EXECUTION_ENV",BF="AWS_REGION",UF="AWS_DEFAULT_REGION",lfe="AWS_EC2_METADATA_DISABLED",dfe=["in-region","cross-region","mobile","standard","legacy"],ffe="/latest/meta-data/placement/region",pfe="AWS_DEFAULTS_MODE",mfe="defaults_mode",hfe={environmentVariableSelector:e=>e[pfe],configFileSelector:e=>e[mfe],default:"legacy"},yfe=({region:e=FF.loadConfig(afe.NODE_REGION_CONFIG_OPTIONS),defaultsMode:t=FF.loadConfig(hfe)}={})=>cfe.memoize(async()=>{let r=typeof t=="function"?await t():t;switch(r==null?void 0:r.toLowerCase()){case"auto":return gfe(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r==null?void 0:r.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${dfe.join(", ")}, got ${r}`)}}),gfe=async e=>{if(e){let t=typeof e=="function"?await e():e,r=await _fe();return r?t===r?"in-region":"cross-region":"standard"}return"standard"},_fe=async()=>{if(process.env[ufe]&&(process.env[BF]||process.env[UF]))return process.env[BF]??process.env[UF];if(!process.env[lfe])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await Promise.resolve().then(()=>C(Il())),r=await e();return(await t({...r,path:ffe})).toString()}catch{}};jF.resolveDefaultsModeConfig=yfe});function Xi(e){return typeof Buffer<"u"?Buffer.alloc(e):new Uint8Array(e)}function Ym(e){return e[JT]=!0,e}var JT,Qm=D(()=>{JT=Symbol("@smithy/core/cbor::tagSymbol")});function HF(e){at=e,ri=new DataView(at.buffer,at.byteOffset,at.byteLength)}function Eo(e,t){if(e>=t)throw new Error("unexpected end of (decode) payload.");let r=(at[e]&224)>>5,n=at[e]&31;switch(r){case 0:case 1:case 6:let o,i;if(n<24)o=n,i=1;else switch(n){case 24:case 25:case 26:case 27:let s=WF[n],a=s+1;if(i=a,t-e<a)throw new Error(`countLength ${s} greater than remaining buf len.`);let c=e+1;s===1?o=at[c]:s===2?o=ri.getUint16(c):s===4?o=ri.getUint32(c):o=ri.getBigUint64(c);break;default:throw new Error(`unexpected minor value ${n}.`)}if(r===0)return Ne=i,ZT(o);if(r===1){let s;return typeof o=="bigint"?s=BigInt(-1)-o:s=-1-o,Ne=i,ZT(s)}else if(n===2||n===3){let s=$l(e+i,t),a=BigInt(0),c=e+i+Ne;for(let l=c;l<c+s;++l)a=a<<BigInt(8)|BigInt(at[l]);return Ne=i+Ne+s,n===3?-a-BigInt(1):a}else if(n===4){let s=Eo(e+i,t),[a,c]=s,l=c<0?-1:1,d="0".repeat(Math.abs(a)+1)+String(BigInt(l)*BigInt(c)),f,m=c<0?"-":"";return f=a===0?d:d.slice(0,d.length+a)+"."+d.slice(a),f=f.replace(/^0+/g,""),f===""&&(f="0"),f[0]==="."&&(f="0"+f),f=m+f,Ne=i+Ne,Pb(f)}else{let s=Eo(e+i,t);return Ne=i+Ne,Ym({tag:ZT(o),value:s})}case 3:case 5:case 4:case 2:if(n===31)switch(r){case 3:return wfe(e,t);case 5:return Rfe(e,t);case 4:return Cfe(e,t);case 2:return Afe(e,t)}else switch(r){case 3:return Tfe(e,t);case 5:return Dfe(e,t);case 4:return Ife(e,t);case 2:return iw(e,t)}default:return Pfe(e,t)}}function VF(e,t,r){var n;return bfe&&((n=e.constructor)==null?void 0:n.name)==="Buffer"?e.toString("utf-8",t,r):qF?qF.decode(e.subarray(t,r)):(0,GF.toUtf8)(e.subarray(t,r))}function xfe(e){let t=Number(e);return(t<Number.MIN_SAFE_INTEGER||Number.MAX_SAFE_INTEGER<t)&&console.warn(new Error(`@smithy/core/cbor - truncating BigInt(${e}) to ${t} with loss of precision.`)),t}function vfe(e,t){let r=e>>7,n=(e&124)>>2,o=(e&3)<<8|t,i=r===0?1:-1,s,a;if(n===0){if(o===0)return 0;s=Math.pow(2,-14),a=0}else{if(n===31)return o===0?i*(1/0):NaN;s=Math.pow(2,n-15),a=1}return a+=o/1024,i*(s*a)}function $l(e,t){let r=at[e]&31;if(r<24)return Ne=1,r;if(r===24||r===25||r===26||r===27){let n=WF[r];if(Ne=n+1,t-e<Ne)throw new Error(`countLength ${n} greater than remaining buf len.`);let o=e+1;return n===1?at[o]:n===2?ri.getUint16(o):n===4?ri.getUint32(o):xfe(ri.getBigUint64(o))}throw new Error(`unexpected minor value ${r}.`)}function Tfe(e,t){let r=$l(e,t),n=Ne;if(e+=n,t-e<r)throw new Error(`string len ${r} greater than remaining buf len.`);let o=VF(at,e,e+r);return Ne=n+r,o}function wfe(e,t){e+=1;let r=[];for(let n=e;e<t;){if(at[e]===255){let c=Xi(r.length);return c.set(r,0),Ne=e-n+2,VF(c,0,c.length)}let o=(at[e]&224)>>5,i=at[e]&31;if(o!==3)throw new Error(`unexpected major type ${o} in indefinite string.`);if(i===31)throw new Error("nested indefinite string.");let s=iw(e,t);e+=Ne;for(let c=0;c<s.length;++c)r.push(s[c])}throw new Error("expected break marker.")}function iw(e,t){let r=$l(e,t),n=Ne;if(e+=n,t-e<r)throw new Error(`unstructured byte string len ${r} greater than remaining buf len.`);let o=at.subarray(e,e+r);return Ne=n+r,o}function Afe(e,t){e+=1;let r=[];for(let n=e;e<t;){if(at[e]===255){let c=Xi(r.length);return c.set(r,0),Ne=e-n+2,c}let o=(at[e]&224)>>5,i=at[e]&31;if(o!==2)throw new Error(`unexpected major type ${o} in indefinite string.`);if(i===31)throw new Error("nested indefinite string.");let s=iw(e,t);e+=Ne;for(let c=0;c<s.length;++c)r.push(s[c])}throw new Error("expected break marker.")}function Ife(e,t){let r=$l(e,t),n=Ne;e+=n;let o=e,i=Array(r);for(let s=0;s<r;++s){let a=Eo(e,t),c=Ne;i[s]=a,e+=c}return Ne=n+(e-o),i}function Cfe(e,t){e+=1;let r=[];for(let n=e;e<t;){if(at[e]===255)return Ne=e-n+2,r;let o=Eo(e,t);e+=Ne,r.push(o)}throw new Error("expected break marker.")}function Dfe(e,t){let r=$l(e,t),n=Ne;e+=n;let o=e,i={};for(let s=0;s<r;++s){if(e>=t)throw new Error("unexpected end of map payload.");let a=(at[e]&224)>>5;if(a!==3)throw new Error(`unexpected major type ${a} for map key at index ${e}.`);let c=Eo(e,t);e+=Ne;let l=Eo(e,t);e+=Ne,i[c]=l}return Ne=n+(e-o),i}function Rfe(e,t){e+=1;let r=e,n={};for(;e<t;){if(e>=t)throw new Error("unexpected end of map payload.");if(at[e]===255)return Ne=e-r+2,n;let o=(at[e]&224)>>5;if(o!==3)throw new Error(`unexpected major type ${o} for map key.`);let i=Eo(e,t);e+=Ne;let s=Eo(e,t);e+=Ne,n[i]=s}throw new Error("expected break marker.")}function Pfe(e,t){let r=at[e]&31;switch(r){case 21:case 20:return Ne=1,r===21;case 22:return Ne=1,null;case 23:return Ne=1,null;case 25:if(t-e<3)throw new Error("incomplete float16 at end of buf.");return Ne=3,vfe(at[e+1],at[e+2]);case 26:if(t-e<5)throw new Error("incomplete float32 at end of buf.");return Ne=5,ri.getFloat32(e+1);case 27:if(t-e<9)throw new Error("incomplete float64 at end of buf.");return Ne=9,ri.getFloat64(e+1);default:throw new Error(`unexpected minor value ${r}.`)}}function ZT(e){if(typeof e=="number")return e;let t=Number(e);return Number.MIN_SAFE_INTEGER<=t&&t<=Number.MAX_SAFE_INTEGER?t:e}var GF,Sfe,bfe,at,ri,qF,Ne,WF,zF=D(()=>{Tr();GF=C(Kt());Qm();Sfe=typeof TextDecoder<"u",bfe=typeof Buffer<"u",at=Xi(0),ri=new DataView(at.buffer,at.byteOffset,at.byteLength),qF=Sfe?new TextDecoder:null,Ne=0;WF={24:1,25:2,26:4,27:8}});function aw(e){xe.byteLength-me<e&&(me<16e6?Jm(Math.max(xe.byteLength*4,xe.byteLength+e)):Jm(xe.byteLength+e+16e6))}function cw(){let e=Xi(me);return e.set(xe.subarray(0,me),0),me=0,e}function Jm(e){let t=xe;xe=Xi(e),t&&(t.copy?t.copy(xe,0,0,t.byteLength):xe.set(t,0)),ii=new DataView(xe.buffer,xe.byteOffset,xe.byteLength)}function oi(e,t){t<24?xe[me++]=e<<5|t:t<256?(xe[me++]=e<<5|24,xe[me++]=t):t<65536?(xe[me++]=e<<5|25,ii.setUint16(me,t),me+=2):t<2**32?(xe[me++]=e<<5|26,ii.setUint32(me,t),me+=4):(xe[me++]=e<<5|27,ii.setBigUint64(me,typeof t=="bigint"?t:BigInt(t)),me+=8)}function QF(e){var r;let t=[e];for(;t.length;){let n=t.pop();if(aw(typeof n=="string"?n.length*4:64),typeof n=="string"){if(KF)oi(3,Buffer.byteLength(n)),me+=xe.write(n,me);else{let o=(0,YF.fromUtf8)(n);oi(3,o.byteLength),xe.set(o,me),me+=o.byteLength}continue}else if(typeof n=="number"){if(Number.isInteger(n)){let o=n>=0,i=o?0:1,s=o?n:-n-1;s<24?xe[me++]=i<<5|s:s<256?(xe[me++]=i<<5|24,xe[me++]=s):s<65536?(xe[me++]=i<<5|25,xe[me++]=s>>8,xe[me++]=s):s<4294967296?(xe[me++]=i<<5|26,ii.setUint32(me,s),me+=4):(xe[me++]=i<<5|27,ii.setBigUint64(me,BigInt(s)),me+=8);continue}xe[me++]=251,ii.setFloat64(me,n),me+=8;continue}else if(typeof n=="bigint"){let o=n>=0,i=o?0:1,s=o?n:-n-BigInt(1),a=Number(s);if(a<24)xe[me++]=i<<5|a;else if(a<256)xe[me++]=i<<5|24,xe[me++]=a;else if(a<65536)xe[me++]=i<<5|25,xe[me++]=a>>8,xe[me++]=a&255;else if(a<4294967296)xe[me++]=i<<5|26,ii.setUint32(me,a),me+=4;else if(s<BigInt("18446744073709551616"))xe[me++]=i<<5|27,ii.setBigUint64(me,s),me+=8;else{let c=s.toString(2),l=new Uint8Array(Math.ceil(c.length/8)),d=s,f=0;for(;l.byteLength-++f>=0;)l[l.byteLength-f]=Number(d&BigInt(255)),d>>=BigInt(8);aw(l.byteLength*2),xe[me++]=o?194:195,KF?oi(2,Buffer.byteLength(l)):oi(2,l.byteLength),xe.set(l,me),me+=l.byteLength}continue}else if(n===null){xe[me++]=246;continue}else if(typeof n=="boolean"){xe[me++]=224|(n?21:20);continue}else{if(typeof n>"u")throw new Error("@smithy/core/cbor: client may not serialize undefined value.");if(Array.isArray(n)){for(let o=n.length-1;o>=0;--o)t.push(n[o]);oi(4,n.length);continue}else if(typeof n.byteLength=="number"){aw(n.length*2),oi(2,n.length),xe.set(n,me),me+=n.byteLength;continue}else if(typeof n=="object"){if(n instanceof ft){let i=n.string.indexOf("."),s=i===-1?0:i-n.string.length+1,a=BigInt(n.string.replace(".",""));xe[me++]=196,t.push(a),t.push(s),oi(4,2);continue}if(n[JT])if("tag"in n&&"value"in n){t.push(n.value),oi(6,n.tag);continue}else throw new Error("tag encountered with missing fields, need 'tag' and 'value', found: "+JSON.stringify(n));let o=Object.keys(n);for(let i=o.length-1;i>=0;--i){let s=o[i];t.push(n[s]),t.push(s)}oi(5,o.length);continue}}throw new Error(`data type ${((r=n==null?void 0:n.constructor)==null?void 0:r.name)??typeof n} not compatible for encoding.`)}}var YF,KF,Ofe,xe,ii,me,XF=D(()=>{Tr();YF=C(Kt());Qm();KF=typeof Buffer<"u",Ofe=2048,xe=Xi(Ofe),ii=new DataView(xe.buffer,xe.byteOffset,xe.byteLength),me=0});var uw,JF=D(()=>{zF();XF();uw={deserialize(e){return HF(e),Eo(0,e.length)},serialize(e){try{return QF(e),cw()}catch(t){throw cw(),t}},resizeEncodingBuffer(e){Jm(e)}}});var Zm,eh,th=D(()=>{Qm();Zm=e=>Ym({tag:1,value:e.getTime()/1e3}),eh=(e,t)=>{let r=o=>{let i=o;return typeof i=="number"&&(i=i.toString()),i.indexOf(",")>=0&&(i=i.split(",")[0]),i.indexOf(":")>=0&&(i=i.split(":")[0]),i.indexOf("#")>=0&&(i=i.split("#")[1]),i};if(t.__type!==void 0)return r(t.__type);let n=Object.keys(t).find(o=>o.toLowerCase()==="code");if(n&&t[n]!==void 0)return r(t[n])}});var fw,rh,lw,dw,pw=D(()=>{Nr();We();Tr();Tr();fw=C(jt());JF();th();rh=class extends wr{createSerializer(){let t=new lw;return t.setSerdeContext(this.serdeContext),t}createDeserializer(){let t=new dw;return t.setSerdeContext(this.serdeContext),t}},lw=class extends wr{value;write(t,r){this.value=this.serialize(t,r)}serialize(t,r){var o;let n=le.of(t);if(r==null)return n.isIdempotencyToken()?(0,ln.v4)():r;if(n.isBlobSchema())return typeof r=="string"?(((o=this.serdeContext)==null?void 0:o.base64Decoder)??fw.fromBase64)(r):r;if(n.isTimestampSchema())return typeof r=="number"||typeof r=="bigint"?Zm(new Date(Number(r)/1e3|0)):Zm(r);if(typeof r=="function"||typeof r=="object"){let i=r;if(n.isListSchema()&&Array.isArray(i)){let a=!!n.getMergedTraits().sparse,c=[],l=0;for(let d of i){let f=this.serialize(n.getValueSchema(),d);(f!=null||a)&&(c[l++]=f)}return c}if(i instanceof Date)return Zm(i);let s={};if(n.isMapSchema()){let a=!!n.getMergedTraits().sparse;for(let c of Object.keys(i)){let l=this.serialize(n.getValueSchema(),i[c]);(l!=null||a)&&(s[c]=l)}}else if(n.isStructSchema()){for(let[c,l]of n.structIterator()){let d=this.serialize(l,i[c]);d!=null&&(s[c]=d)}if(n.isUnionSchema()&&Array.isArray(i.$unknown)){let[c,l]=i.$unknown;s[c]=l}else if(typeof i.__type=="string")for(let[c,l]of Object.entries(i))c in s||(s[c]=this.serialize(15,l))}else if(n.isDocumentSchema())for(let a of Object.keys(i))s[a]=this.serialize(n.getValueSchema(),i[a]);else if(n.isBigDecimalSchema())return i;return s}return r}flush(){let t=uw.serialize(this.value);return this.value=void 0,t}},dw=class extends wr{read(t,r){let n=uw.deserialize(r);return this.readValue(t,n)}readValue(t,r){var o;let n=le.of(t);if(n.isTimestampSchema()){if(typeof r=="number")return Xa(r);if(typeof r=="object"&&r.tag===1&&"value"in r)return Xa(r.value)}if(n.isBlobSchema())return typeof r=="string"?(((o=this.serdeContext)==null?void 0:o.base64Decoder)??fw.fromBase64)(r):r;if(typeof r>"u"||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="bigint"||typeof r=="symbol")return r;if(typeof r=="object"){if(r===null)return null;if("byteLength"in r||r instanceof Date||n.isDocumentSchema())return r;if(n.isListSchema()){let s=[],a=n.getValueSchema();for(let c of r){let l=this.readValue(a,c);s.push(l)}return s}let i={};if(n.isMapSchema()){let s=n.getValueSchema();for(let a of Object.keys(r)){let c=this.readValue(s,r[a]);i[a]=c}}else if(n.isStructSchema()){let s=n.isUnionSchema(),a;s&&(a=new Set(Object.keys(r).filter(c=>c!=="__type")));for(let[c,l]of n.structIterator())s&&a.delete(c),r[c]!=null&&(i[c]=this.readValue(l,r[c]));if(s&&(a==null?void 0:a.size)===1&&Object.keys(i).length===0){let c=a.values().next().value;i.$unknown=[c,r[c]]}else if(typeof r.__type=="string")for(let[c,l]of Object.entries(r))c in i||(i[c]=l)}else if(r instanceof ft)return r;return i}else return r}}});var ZF,nh,eB=D(()=>{Nr();We();We();ZF=C(ir());pw();th();nh=class extends zo{codec=new rh;serializer=this.codec.createSerializer();deserializer=this.codec.createDeserializer();constructor({defaultNamespace:t,errorTypeRegistries:r}){super({defaultNamespace:t,errorTypeRegistries:r})}getShapeId(){return"smithy.protocols#rpcv2Cbor"}getPayloadCodec(){return this.codec}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n);if(Object.assign(o.headers,{"content-type":this.getDefaultContentType(),"smithy-protocol":"rpc-v2-cbor",accept:this.getDefaultContentType()}),Rn(t.input)==="unit")delete o.body,delete o.headers["content-type"];else{o.body||(this.serializer.write(15,{}),o.body=this.serializer.flush());try{o.headers["content-length"]=String(o.body.byteLength)}catch{}}let{service:i,operation:s}=(0,ZF.getSmithyContext)(n),a=`/service/${i}/operation/${s}`;return o.path.endsWith("/")?o.path+=a.slice(1):o.path+=a,o}async deserializeResponse(t,r,n){return super.deserializeResponse(t,r,n)}async handleError(t,r,n,o,i){let s=eh(n,o)??"Unknown",a={$metadata:i,$fault:n.statusCode<=500?"client":"server"},c=this.options.defaultNamespace;s.includes("#")&&([c]=s.split("#"));let l=this.compositeErrorRegistry,d=bt.for(c);l.copyFrom(d);let f;try{f=l.getSchema(s)}catch{o.Message&&(o.message=o.Message);let A=bt.for("smithy.ts.sdk.synthetic."+c);l.copyFrom(A);let O=l.getBaseException();if(O){let G=l.getErrorCtor(O);throw Object.assign(new G({name:s}),a,o)}throw Object.assign(new Error(s),a,o)}let m=le.of(f),h=l.getErrorCtor(f),_=o.message??o.Message??"Unknown",E=new h(_),T={};for(let[I,A]of m.structIterator())T[I]=this.deserializer.readValue(A,o[I]);throw Object.assign(E,a,{$fault:m.getMergedTraits().error,message:_},T)}getDefaultContentType(){return"application/cbor"}}});var tB=D(()=>{th();eB();pw()});var mw,pn,Ac=D(()=>{We();mw=C(Te()),pn=class{queryCompat;errorRegistry;constructor(t=!1){this.queryCompat=t}resolveRestContentType(t,r){let n=r.getMemberSchemas(),o=Object.values(n).find(i=>!!i.getMergedTraits().httpPayload);if(o){let i=o.getMergedTraits().mediaType;return i||(o.isStringSchema()?"text/plain":o.isBlobSchema()?"application/octet-stream":t)}else if(!r.isUnitSchema()&&Object.values(n).find(s=>{let{httpQuery:a,httpQueryParams:c,httpHeader:l,httpLabel:d,httpPrefixHeaders:f}=s.getMergedTraits();return!a&&!c&&!l&&!d&&f===void 0}))return t}async getErrorSchemaOrThrowBaseException(t,r,n,o,i,s){var l,d;let a=t;t.includes("#")&&([,a]=t.split("#"));let c={$metadata:i,$fault:n.statusCode<500?"client":"server"};if(!this.errorRegistry)throw new Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:(s==null?void 0:s(this.errorRegistry,a))??this.errorRegistry.getSchema(t),errorMetadata:c}}catch{o.message=o.message??o.Message??"UnknownError";let m=this.errorRegistry,h=m.getBaseException();if(h){let T=m.getErrorCtor(h)??Error;throw this.decorateServiceException(Object.assign(new T({name:a}),c),o)}let _=o,E=(_==null?void 0:_.message)??(_==null?void 0:_.Message)??((l=_==null?void 0:_.Error)==null?void 0:l.Message)??((d=_==null?void 0:_.Error)==null?void 0:d.message);throw this.decorateServiceException(Object.assign(new Error(E),{name:a},c),o)}}compose(t,r,n){let o=n;r.includes("#")&&([o]=r.split("#"));let i=bt.for(o),s=bt.for("smithy.ts.sdk.synthetic."+n);t.copyFrom(i),t.copyFrom(s),this.errorRegistry=t}decorateServiceException(t,r={}){var n,o,i,s;if(this.queryCompat){let a=t.Message??r.Message,c=(0,mw.decorateServiceException)(t,r);a&&(c.message=a),c.Error={...c.Error,Type:(n=c.Error)==null?void 0:n.Type,Code:(o=c.Error)==null?void 0:o.Code,Message:((i=c.Error)==null?void 0:i.message)??((s=c.Error)==null?void 0:s.Message)??a};let l=c.$metadata.requestId;return l&&(c.RequestId=l),c}return(0,mw.decorateServiceException)(t,r)}setQueryCompatError(t,r){var o;let n=(o=r.headers)==null?void 0:o["x-amzn-query-error"];if(t!==void 0&&n!=null){let[i,s]=n.split(";"),a=Object.entries(t),c={Code:i,Type:s};Object.assign(t,c);for(let[l,d]of a)c[l==="message"?"Message":l]=d;delete c.__type,t.Error=c}}queryCompatOutput(t,r){t.Error&&(r.Error=t.Error),t.Type&&(r.Type=t.Type),t.Code&&(r.Code=t.Code)}findQueryCompatibleError(t,r){try{return t.getSchema(r)}catch{return t.find(o=>{var i;return((i=le.of(o).getMergedTraits().awsQueryError)==null?void 0:i[0])===r})}}}});var oh,rB=D(()=>{tB();We();Ac();oh=class extends nh{awsQueryCompatible;mixin;constructor({defaultNamespace:t,errorTypeRegistries:r,awsQueryCompatible:n}){super({defaultNamespace:t,errorTypeRegistries:r}),this.awsQueryCompatible=!!n,this.mixin=new pn(this.awsQueryCompatible)}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n);return this.awsQueryCompatible&&(o.headers["x-amzn-query-mode"]="true"),o}async handleError(t,r,n,o,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(o,n);let s=(()=>{let _=n.headers["x-amzn-query-error"];return _&&this.awsQueryCompatible?_.split(";")[0]:eh(n,o)??"Unknown"})();this.mixin.compose(this.compositeErrorRegistry,s,this.options.defaultNamespace);let{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,o,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),l=le.of(a),d=o.message??o.Message??"UnknownError",f=this.compositeErrorRegistry.getErrorCtor(a)??Error,m=new f(d),h={};for(let[_,E]of l.structIterator())o[_]!=null&&(h[_]=this.deserializer.readValue(E,o[_]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(o,h),this.mixin.decorateServiceException(Object.assign(m,c,{$fault:l.getMergedTraits().error,message:d},h),o)}}});var nB,oB,iB,sB=D(()=>{nB=e=>{if(e==null)return e;if(typeof e=="number"||typeof e=="bigint"){let t=new Error(`Received number ${e} where a string was expected.`);return t.name="Warning",console.warn(t),String(e)}if(typeof e=="boolean"){let t=new Error(`Received boolean ${e} where a string was expected.`);return t.name="Warning",console.warn(t),String(e)}return e},oB=e=>{if(e==null)return e;if(typeof e=="string"){let t=e.toLowerCase();if(e!==""&&t!=="false"&&t!=="true"){let r=new Error(`Received string "${e}" where a boolean was expected.`);r.name="Warning",console.warn(r)}return e!==""&&t!=="false"}return e},iB=e=>{if(e==null)return e;if(typeof e=="string"){let t=Number(e);if(t.toString()!==e){let r=new Error(`Received string "${e}" where a number was expected.`);return r.name="Warning",console.warn(r),e}return t}return e}});var fr,ts=D(()=>{fr=class{serdeContext;setSerdeContext(t){this.serdeContext=t}}});var Ic,hw=D(()=>{Ic=class{from;to;keys;constructor(t,r){this.from=t,this.to=r,this.keys=new Set(Object.keys(this.from).filter(n=>n!=="__type"))}mark(t){this.keys.delete(t)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){let t=this.keys.values().next().value,r=this.from[t];this.to.$unknown=[t,r]}}}});function aB(e,t,r){if(r!=null&&r.source){let n=r.source;if(typeof t=="number"&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||n!==String(t)))return n.includes(".")?new ft(n,"bigDecimal"):BigInt(n)}return t}var cB=D(()=>{Tr()});var uB,lB,ih,yw=D(()=>{uB=C(Te()),lB=C(Kt()),ih=(e,t)=>(0,uB.collectBody)(e,t).then(r=>((t==null?void 0:t.utf8Encoder)??lB.toUtf8)(r))});var Ml,dB,Cc,Ll=D(()=>{yw();Ml=(e,t)=>ih(e,t).then(r=>{if(r.length)try{return JSON.parse(r)}catch(n){throw(n==null?void 0:n.name)==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:r}),n}return{}}),dB=async(e,t)=>{let r=await Ml(e,t);return r.message=r.message??r.Message,r},Cc=(e,t)=>{let r=(i,s)=>Object.keys(i).find(a=>a.toLowerCase()===s.toLowerCase()),n=i=>{let s=i;return typeof s=="number"&&(s=s.toString()),s.indexOf(",")>=0&&(s=s.split(",")[0]),s.indexOf(":")>=0&&(s=s.split(":")[0]),s.indexOf("#")>=0&&(s=s.split("#")[1]),s},o=r(e.headers,"x-amzn-errortype");if(o!==void 0)return n(e.headers[o]);if(t&&typeof t=="object"){let i=r(t,"code");if(i&&t[i]!==void 0)return n(t[i]);if(t.__type!==void 0)return n(t.__type)}}});var fB,Dc,gw=D(()=>{Nr();We();Tr();fB=C(jt());ts();hw();cB();Ll();Dc=class extends fr{settings;constructor(t){super(),this.settings=t}async read(t,r){return this._read(t,typeof r=="string"?JSON.parse(r,aB):await Ml(r,this.serdeContext))}readObject(t,r){return this._read(t,r)}_read(t,r){let n=r!==null&&typeof r=="object",o=le.of(t);if(n){if(o.isStructSchema()){let s=r,a=o.isUnionSchema(),c={},l,{jsonName:d}=this.settings;d&&(l={});let f;a&&(f=new Ic(s,c));for(let[m,h]of o.structIterator()){let _=m;d&&(_=h.getMergedTraits().jsonName??_,l[_]=m),a&&f.mark(_),s[_]!=null&&(c[m]=this._read(h,s[_]))}if(a)f.writeUnknown();else if(typeof s.__type=="string")for(let[m,h]of Object.entries(s)){let _=d?l[m]??m:m;_ in c||(c[_]=h)}return c}if(Array.isArray(r)&&o.isListSchema()){let s=o.getValueSchema(),a=[];for(let c of r)a.push(this._read(s,c));return a}if(o.isMapSchema()){let s=o.getValueSchema(),a={};for(let[c,l]of Object.entries(r))a[c]=this._read(s,l);return a}}if(o.isBlobSchema()&&typeof r=="string")return(0,fB.fromBase64)(r);let i=o.getMergedTraits().mediaType;if(o.isStringSchema()&&typeof r=="string"&&i)return i==="application/json"||i.endsWith("+json")?vr.from(r):r;if(o.isTimestampSchema()&&r!=null)switch(Yr(o,this.settings)){case 5:return _b(r);case 6:return Eb(r);case 7:return Sb(r);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",r),new Date(r)}if(o.isBigIntegerSchema()&&(typeof r=="number"||typeof r=="string"))return BigInt(r);if(o.isBigDecimalSchema()&&r!=null){if(r instanceof ft)return r;let s=r;return s.type==="bigDecimal"&&"string"in s?new ft(s.string,s.type):new ft(String(r),"bigDecimal")}if(o.isNumericSchema()&&typeof r=="string"){switch(r){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return r}if(o.isDocumentSchema())if(n){let s=Array.isArray(r)?[]:{};for(let[a,c]of Object.entries(r))c instanceof ft?s[a]=c:s[a]=this._read(o,c);return s}else return structuredClone(r);return r}}});var pB,sh,mB=D(()=>{Tr();pB="\u039D",sh=class{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.");return this.stage=1,(t,r)=>{if(r instanceof ft){let n=`${pB+"nv"+this.counter++}_`+r.string;return this.values.set(`"${n}"`,r.string),n}if(typeof r=="bigint"){let n=r.toString(),o=`${pB+"b"+this.counter++}_`+n;return this.values.set(`"${o}"`,n),o}return r}}replaceInJson(t){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.");if(this.stage=2,this.counter===0)return t;for(let[r,n]of this.values)t=t.replace(r,n);return t}}});var _w,Rc,Ew=D(()=>{Nr();We();Tr();_w=C(jt());ts();mB();Rc=class extends fr{settings;buffer;useReplacer=!1;rootSchema;constructor(t){super(),this.settings=t}write(t,r){this.rootSchema=le.of(t),this.buffer=this._write(this.rootSchema,r)}writeDiscriminatedDocument(t,r){this.write(t,r),typeof this.buffer=="object"&&(this.buffer.__type=le.of(t).getName(!0))}flush(){let{rootSchema:t,useReplacer:r}=this;if(this.rootSchema=void 0,this.useReplacer=!1,t!=null&&t.isStructSchema()||t!=null&&t.isDocumentSchema()){if(!r)return JSON.stringify(this.buffer);let n=new sh;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(t,r,n){var s,a;let o=r!==null&&typeof r=="object",i=le.of(t);if(o){if(i.isStructSchema()){let c=r,l={},{jsonName:d}=this.settings,f;d&&(f={});for(let[m,h]of i.structIterator()){let _=this._write(h,c[m],i);if(_!==void 0){let E=m;d&&(E=h.getMergedTraits().jsonName??m,f[m]=E),l[E]=_}}if(i.isUnionSchema()&&Object.keys(l).length===0){let{$unknown:m}=c;if(Array.isArray(m)){let[h,_]=m;l[h]=this._write(15,_)}}else if(typeof c.__type=="string")for(let[m,h]of Object.entries(c)){let _=d?f[m]??m:m;_ in l||(l[_]=this._write(15,h))}return l}if(Array.isArray(r)&&i.isListSchema()){let c=i.getValueSchema(),l=[],d=!!i.getMergedTraits().sparse;for(let f of r)(d||f!=null)&&l.push(this._write(c,f));return l}if(i.isMapSchema()){let c=i.getValueSchema(),l={},d=!!i.getMergedTraits().sparse;for(let[f,m]of Object.entries(r))(d||m!=null)&&(l[f]=this._write(c,m));return l}if(r instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?r:(((s=this.serdeContext)==null?void 0:s.base64Encoder)??_w.toBase64)(r);if(r instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(Yr(i,this.settings)){case 5:return r.toISOString().replace(".000Z","Z");case 6:return ol(r);case 7:return r.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",r),r.getTime()/1e3}r instanceof ft&&(this.useReplacer=!0)}if(!(r===null&&(n!=null&&n.isStructSchema()))){if(i.isStringSchema()){if(typeof r>"u"&&i.isIdempotencyToken())return(0,ln.v4)();let c=i.getMergedTraits().mediaType;return r!=null&&c&&(c==="application/json"||c.endsWith("+json"))?vr.from(r):r}if(typeof r=="number"&&i.isNumericSchema())return Math.abs(r)===1/0||isNaN(r)?String(r):r;if(typeof r=="string"&&i.isBlobSchema())return i===this.rootSchema?r:(((a=this.serdeContext)==null?void 0:a.base64Encoder)??_w.toBase64)(r);if(typeof r=="bigint"&&(this.useReplacer=!0),i.isDocumentSchema())if(o){let c=Array.isArray(r)?[]:{};for(let[l,d]of Object.entries(r))d instanceof ft?(this.useReplacer=!0,c[l]=d):c[l]=this._write(i,d);return c}else return structuredClone(r);return r}}}});var rs,ah=D(()=>{ts();gw();Ew();rs=class extends fr{settings;constructor(t){super(),this.settings=t}createSerializer(){let t=new Rc(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){let t=new Dc(this.settings);return t.setSerdeContext(this.serdeContext),t}}});var ns,ch=D(()=>{Nr();We();Ac();ah();Ll();ns=class extends zo{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:o,jsonCodec:i}){super({defaultNamespace:t,errorTypeRegistries:r}),this.serviceTarget=n,this.codec=i??new rs({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!o,this.mixin=new pn(this.awsQueryCompatible)}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n);return o.path.endsWith("/")||(o.path+="/"),Object.assign(o.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${t.name}`}),this.awsQueryCompatible&&(o.headers["x-amzn-query-mode"]="true"),(Rn(t.input)==="unit"||!o.body)&&(o.body="{}"),o}getPayloadCodec(){return this.codec}async handleError(t,r,n,o,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(o,n);let s=Cc(n,o)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,s,this.options.defaultNamespace);let{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,o,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),l=le.of(a),d=o.message??o.Message??"UnknownError",f=this.compositeErrorRegistry.getErrorCtor(a)??Error,m=new f(d),h={};for(let[_,E]of l.structIterator())o[_]!=null&&(h[_]=this.codec.createDeserializer().readObject(E,o[_]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(o,h),this.mixin.decorateServiceException(Object.assign(m,c,{$fault:l.getMergedTraits().error,message:d},h),o)}}});var uh,hB=D(()=>{ch();uh=class extends ns{constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:o,jsonCodec:i}){super({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:o,jsonCodec:i})}getShapeId(){return"aws.protocols#awsJson1_0"}getJsonRpcVersion(){return"1.0"}getDefaultContentType(){return"application/x-amz-json-1.0"}}});var lh,yB=D(()=>{ch();lh=class extends ns{constructor({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:o,jsonCodec:i}){super({defaultNamespace:t,errorTypeRegistries:r,serviceTarget:n,awsQueryCompatible:o,jsonCodec:i})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}});var So,gB=D(()=>{Nr();We();Ac();ah();Ll();So=class extends Hs{serializer;deserializer;codec;mixin=new pn;constructor({defaultNamespace:t,errorTypeRegistries:r}){super({defaultNamespace:t,errorTypeRegistries:r});let n={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new rs(n),this.serializer=new zs(this.codec.createSerializer(),n),this.deserializer=new Ws(this.codec.createDeserializer(),n)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(t){this.codec.setSerdeContext(t),super.setSerdeContext(t)}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n),i=le.of(t.input);if(!o.headers["content-type"]){let s=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);s&&(o.headers["content-type"]=s)}return o.body==null&&o.headers["content-type"]===this.getDefaultContentType()&&(o.body="{}"),o}async deserializeResponse(t,r,n){let o=await super.deserializeResponse(t,r,n),i=le.of(t.output);for(let[s,a]of i.structIterator())a.getMemberTraits().httpPayload&&!(s in o)&&(o[s]=null);return o}async handleError(t,r,n,o,i){let s=Cc(n,o)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,s,this.options.defaultNamespace);let{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,o,i),l=le.of(a),d=o.message??o.Message??"UnknownError",f=this.compositeErrorRegistry.getErrorCtor(a)??Error,m=new f(d);await this.deserializeHttpMessage(a,r,n,o);let h={};for(let[_,E]of l.structIterator()){let T=E.getMergedTraits().jsonName??_;h[_]=this.codec.createDeserializer().readObject(E,o[T])}throw this.mixin.decorateServiceException(Object.assign(m,c,{$fault:l.getMergedTraits().error,message:d},h),o)}getDefaultContentType(){return"application/json"}}});var _B,EB,SB=D(()=>{_B=C(Te()),EB=e=>{if(e!=null)return typeof e=="object"&&"__type"in e&&delete e.__type,(0,_B.expectUnion)(e)}});var xB=b((gLe,bB)=>{(()=>{"use strict";var e={d:(g,p)=>{for(var y in p)e.o(p,y)&&!e.o(g,y)&&Object.defineProperty(g,y,{enumerable:!0,get:p[y]})},o:(g,p)=>Object.prototype.hasOwnProperty.call(g,p),r:g=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(g,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{XMLBuilder:()=>J9,XMLParser:()=>He,XMLValidator:()=>Z9});let r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n=new RegExp("^["+r+"]["+r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function o(g,p){let y=[],x=p.exec(g);for(;x;){let w=[];w.startIndex=p.lastIndex-x[0].length;let v=x.length;for(let F=0;F<v;F++)w.push(x[F]);y.push(w),x=p.exec(g)}return y}let i=function(g){return n.exec(g)!=null},s=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],a=["__proto__","constructor","prototype"],c={allowBooleanAttributes:!1,unpairedTags:[]};function l(g,p){p=Object.assign({},c,p);let y=[],x=!1,w=!1;g[0]==="\uFEFF"&&(g=g.substr(1));for(let v=0;v<g.length;v++)if(g[v]==="<"&&g[v+1]==="?"){if(v+=2,v=f(g,v),v.err)return v}else{if(g[v]!=="<"){if(d(g[v]))continue;return O("InvalidChar","char '"+g[v]+"' is not expected.",Q(g,v))}{let F=v;if(v++,g[v]==="!"){v=m(g,v);continue}{let P=!1;g[v]==="/"&&(P=!0,v++);let L="";for(;v<g.length&&g[v]!==">"&&g[v]!==" "&&g[v]!==" "&&g[v]!==`
45
+ `&&g[v]!=="\r";v++)L+=g[v];if(L=L.trim(),L[L.length-1]==="/"&&(L=L.substring(0,L.length-1),v--),!z(L)){let te;return te=L.trim().length===0?"Invalid space after '<'.":"Tag '"+L+"' is an invalid name.",O("InvalidTag",te,Q(g,v))}let U=E(g,v);if(U===!1)return O("InvalidAttr","Attributes for '"+L+"' have open quote.",Q(g,v));let W=U.value;if(v=U.index,W[W.length-1]==="/"){let te=v-W.length;W=W.substring(0,W.length-1);let Me=I(W,p);if(Me!==!0)return O(Me.err.code,Me.err.msg,Q(g,te+Me.err.line));x=!0}else if(P){if(!U.tagClosed)return O("InvalidTag","Closing tag '"+L+"' doesn't have proper closing.",Q(g,v));if(W.trim().length>0)return O("InvalidTag","Closing tag '"+L+"' can't have attributes or invalid starting.",Q(g,F));if(y.length===0)return O("InvalidTag","Closing tag '"+L+"' has not been opened.",Q(g,F));{let te=y.pop();if(L!==te.tagName){let Me=Q(g,te.tagStartPos);return O("InvalidTag","Expected closing tag '"+te.tagName+"' (opened in line "+Me.line+", col "+Me.col+") instead of closing tag '"+L+"'.",Q(g,F))}y.length==0&&(w=!0)}}else{let te=I(W,p);if(te!==!0)return O(te.err.code,te.err.msg,Q(g,v-W.length+te.err.line));if(w===!0)return O("InvalidXml","Multiple possible root nodes found.",Q(g,v));p.unpairedTags.indexOf(L)!==-1||y.push({tagName:L,tagStartPos:F}),x=!0}for(v++;v<g.length;v++)if(g[v]==="<"){if(g[v+1]==="!"){v++,v=m(g,v);continue}if(g[v+1]!=="?")break;if(v=f(g,++v),v.err)return v}else if(g[v]==="&"){let te=A(g,v);if(te==-1)return O("InvalidChar","char '&' is not expected.",Q(g,v));v=te}else if(w===!0&&!d(g[v]))return O("InvalidXml","Extra text at the end",Q(g,v));g[v]==="<"&&v--}}}return x?y.length==1?O("InvalidTag","Unclosed tag '"+y[0].tagName+"'.",Q(g,y[0].tagStartPos)):!(y.length>0)||O("InvalidXml","Invalid '"+JSON.stringify(y.map(v=>v.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):O("InvalidXml","Start tag expected.",1)}function d(g){return g===" "||g===" "||g===`
46
+ `||g==="\r"}function f(g,p){let y=p;for(;p<g.length;p++)if(g[p]=="?"||g[p]==" "){let x=g.substr(y,p-y);if(p>5&&x==="xml")return O("InvalidXml","XML declaration allowed only at the start of the document.",Q(g,p));if(g[p]=="?"&&g[p+1]==">"){p++;break}continue}return p}function m(g,p){if(g.length>p+5&&g[p+1]==="-"&&g[p+2]==="-"){for(p+=3;p<g.length;p++)if(g[p]==="-"&&g[p+1]==="-"&&g[p+2]===">"){p+=2;break}}else if(g.length>p+8&&g[p+1]==="D"&&g[p+2]==="O"&&g[p+3]==="C"&&g[p+4]==="T"&&g[p+5]==="Y"&&g[p+6]==="P"&&g[p+7]==="E"){let y=1;for(p+=8;p<g.length;p++)if(g[p]==="<")y++;else if(g[p]===">"&&(y--,y===0))break}else if(g.length>p+9&&g[p+1]==="["&&g[p+2]==="C"&&g[p+3]==="D"&&g[p+4]==="A"&&g[p+5]==="T"&&g[p+6]==="A"&&g[p+7]==="["){for(p+=8;p<g.length;p++)if(g[p]==="]"&&g[p+1]==="]"&&g[p+2]===">"){p+=2;break}}return p}let h='"',_="'";function E(g,p){let y="",x="",w=!1;for(;p<g.length;p++){if(g[p]===h||g[p]===_)x===""?x=g[p]:x!==g[p]||(x="");else if(g[p]===">"&&x===""){w=!0;break}y+=g[p]}return x===""&&{value:y,index:p,tagClosed:w}}let T=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function I(g,p){let y=o(g,T),x={};for(let w=0;w<y.length;w++){if(y[w][1].length===0)return O("InvalidAttr","Attribute '"+y[w][2]+"' has no space in starting.",be(y[w]));if(y[w][3]!==void 0&&y[w][4]===void 0)return O("InvalidAttr","Attribute '"+y[w][2]+"' is without value.",be(y[w]));if(y[w][3]===void 0&&!p.allowBooleanAttributes)return O("InvalidAttr","boolean attribute '"+y[w][2]+"' is not allowed.",be(y[w]));let v=y[w][2];if(!G(v))return O("InvalidAttr","Attribute '"+v+"' is an invalid name.",be(y[w]));if(Object.prototype.hasOwnProperty.call(x,v))return O("InvalidAttr","Attribute '"+v+"' is repeated.",be(y[w]));x[v]=1}return!0}function A(g,p){if(g[++p]===";")return-1;if(g[p]==="#")return(function(x,w){let v=/\d/;for(x[w]==="x"&&(w++,v=/[\da-fA-F]/);w<x.length;w++){if(x[w]===";")return w;if(!x[w].match(v))break}return-1})(g,++p);let y=0;for(;p<g.length;p++,y++)if(!(g[p].match(/\w/)&&y<20)){if(g[p]===";")break;return-1}return p}function O(g,p,y){return{err:{code:g,msg:p,line:y.line||y,col:y.col}}}function G(g){return i(g)}function z(g){return i(g)}function Q(g,p){let y=g.substring(0,p).split(/\r?\n/);return{line:y.length,col:y[y.length-1].length+1}}function be(g){return g.startIndex+g[1].length}let ue=g=>s.includes(g)?"__"+g:g,q={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(g,p){return p},attributeValueProcessor:function(g,p){return p},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(g,p,y){return g},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:ue};function Z(g,p){if(typeof g!="string")return;let y=g.toLowerCase();if(s.some(x=>y===x.toLowerCase()))throw new Error(`[SECURITY] Invalid ${p}: "${g}" is a reserved JavaScript keyword that could cause prototype pollution`);if(a.some(x=>y===x.toLowerCase()))throw new Error(`[SECURITY] Invalid ${p}: "${g}" is a reserved JavaScript keyword that could cause prototype pollution`)}function ee(g){return typeof g=="boolean"?{enabled:g,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof g=="object"&&g!==null?{enabled:g.enabled!==!1,maxEntitySize:Math.max(1,g.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,g.maxExpansionDepth??10),maxTotalExpansions:Math.max(1,g.maxTotalExpansions??1e3),maxExpandedLength:Math.max(1,g.maxExpandedLength??1e5),maxEntityCount:Math.max(1,g.maxEntityCount??100),allowedTags:g.allowedTags??null,tagFilter:g.tagFilter??null}:ee(!0)}let _e=function(g){let p=Object.assign({},q,g),y=[{value:p.attributeNamePrefix,name:"attributeNamePrefix"},{value:p.attributesGroupName,name:"attributesGroupName"},{value:p.textNodeName,name:"textNodeName"},{value:p.cdataPropName,name:"cdataPropName"},{value:p.commentPropName,name:"commentPropName"}];for(let{value:x,name:w}of y)x&&Z(x,w);return p.onDangerousProperty===null&&(p.onDangerousProperty=ue),p.processEntities=ee(p.processEntities),p.stopNodes&&Array.isArray(p.stopNodes)&&(p.stopNodes=p.stopNodes.map(x=>typeof x=="string"&&x.startsWith("*.")?".."+x.substring(2):x)),p},it;it=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class Be{constructor(p){this.tagname=p,this.child=[],this[":@"]=Object.create(null)}add(p,y){p==="__proto__"&&(p="#__proto__"),this.child.push({[p]:y})}addChild(p,y){p.tagname==="__proto__"&&(p.tagname="#__proto__"),p[":@"]&&Object.keys(p[":@"]).length>0?this.child.push({[p.tagname]:p.child,":@":p[":@"]}):this.child.push({[p.tagname]:p.child}),y!==void 0&&(this.child[this.child.length-1][it]={startIndex:y})}static getMetaDataSymbol(){return it}}class rt{constructor(p){this.suppressValidationErr=!p,this.options=p}readDocType(p,y){let x=Object.create(null),w=0;if(p[y+3]!=="O"||p[y+4]!=="C"||p[y+5]!=="T"||p[y+6]!=="Y"||p[y+7]!=="P"||p[y+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{y+=9;let v=1,F=!1,P=!1,L="";for(;y<p.length;y++)if(p[y]!=="<"||P)if(p[y]===">"){if(P?p[y-1]==="-"&&p[y-2]==="-"&&(P=!1,v--):v--,v===0)break}else p[y]==="["?F=!0:L+=p[y];else{if(F&&Oe(p,"!ENTITY",y)){let U,W;if(y+=7,[U,W,y]=this.readEntityExp(p,y+1,this.suppressValidationErr),W.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&w>=this.options.maxEntityCount)throw new Error(`Entity count (${w+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);let te=U.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");x[U]={regx:RegExp(`&${te};`,"g"),val:W},w++}}else if(F&&Oe(p,"!ELEMENT",y)){y+=8;let{index:U}=this.readElementExp(p,y+1);y=U}else if(F&&Oe(p,"!ATTLIST",y))y+=8;else if(F&&Oe(p,"!NOTATION",y)){y+=9;let{index:U}=this.readNotationExp(p,y+1,this.suppressValidationErr);y=U}else{if(!Oe(p,"!--",y))throw new Error("Invalid DOCTYPE");P=!0}v++,L=""}if(v!==0)throw new Error("Unclosed DOCTYPE")}return{entities:x,i:y}}readEntityExp(p,y){let x=y=we(p,y);for(;y<p.length&&!/\s/.test(p[y])&&p[y]!=='"'&&p[y]!=="'";)y++;let w=p.substring(x,y);if(st(w),y=we(p,y),!this.suppressValidationErr){if(p.substring(y,y+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(p[y]==="%")throw new Error("Parameter entities are not supported")}let v="";if([y,v]=this.readIdentifierVal(p,y,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&v.length>this.options.maxEntitySize)throw new Error(`Entity "${w}" size (${v.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[w,v,--y]}readNotationExp(p,y){let x=y=we(p,y);for(;y<p.length&&!/\s/.test(p[y]);)y++;let w=p.substring(x,y);!this.suppressValidationErr&&st(w),y=we(p,y);let v=p.substring(y,y+6).toUpperCase();if(!this.suppressValidationErr&&v!=="SYSTEM"&&v!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${v}"`);y+=v.length,y=we(p,y);let F=null,P=null;if(v==="PUBLIC")[y,F]=this.readIdentifierVal(p,y,"publicIdentifier"),p[y=we(p,y)]!=='"'&&p[y]!=="'"||([y,P]=this.readIdentifierVal(p,y,"systemIdentifier"));else if(v==="SYSTEM"&&([y,P]=this.readIdentifierVal(p,y,"systemIdentifier"),!this.suppressValidationErr&&!P))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:w,publicIdentifier:F,systemIdentifier:P,index:--y}}readIdentifierVal(p,y,x){let w="",v=p[y];if(v!=='"'&&v!=="'")throw new Error(`Expected quoted string, found "${v}"`);let F=++y;for(;y<p.length&&p[y]!==v;)y++;if(w=p.substring(F,y),p[y]!==v)throw new Error(`Unterminated ${x} value`);return[++y,w]}readElementExp(p,y){let x=y=we(p,y);for(;y<p.length&&!/\s/.test(p[y]);)y++;let w=p.substring(x,y);if(!this.suppressValidationErr&&!i(w))throw new Error(`Invalid element name: "${w}"`);let v="";if(p[y=we(p,y)]==="E"&&Oe(p,"MPTY",y))y+=4;else if(p[y]==="A"&&Oe(p,"NY",y))y+=2;else if(p[y]==="("){let F=++y;for(;y<p.length&&p[y]!==")";)y++;if(v=p.substring(F,y),p[y]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${p[y]}"`);return{elementName:w,contentModel:v.trim(),index:y}}readAttlistExp(p,y){let x=y=we(p,y);for(;y<p.length&&!/\s/.test(p[y]);)y++;let w=p.substring(x,y);for(st(w),x=y=we(p,y);y<p.length&&!/\s/.test(p[y]);)y++;let v=p.substring(x,y);if(!st(v))throw new Error(`Invalid attribute name: "${v}"`);y=we(p,y);let F="";if(p.substring(y,y+8).toUpperCase()==="NOTATION"){if(F="NOTATION",p[y=we(p,y+=8)]!=="(")throw new Error(`Expected '(', found "${p[y]}"`);y++;let L=[];for(;y<p.length&&p[y]!==")";){let U=y;for(;y<p.length&&p[y]!=="|"&&p[y]!==")";)y++;let W=p.substring(U,y);if(W=W.trim(),!st(W))throw new Error(`Invalid notation name: "${W}"`);L.push(W),p[y]==="|"&&(y++,y=we(p,y))}if(p[y]!==")")throw new Error("Unterminated list of notations");y++,F+=" ("+L.join("|")+")"}else{let L=y;for(;y<p.length&&!/\s/.test(p[y]);)y++;F+=p.substring(L,y);let U=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!U.includes(F.toUpperCase()))throw new Error(`Invalid attribute type: "${F}"`)}y=we(p,y);let P="";return p.substring(y,y+8).toUpperCase()==="#REQUIRED"?(P="#REQUIRED",y+=8):p.substring(y,y+7).toUpperCase()==="#IMPLIED"?(P="#IMPLIED",y+=7):[y,P]=this.readIdentifierVal(p,y,"ATTLIST"),{elementName:w,attributeName:v,attributeType:F,defaultValue:P,index:y}}}let we=(g,p)=>{for(;p<g.length&&/\s/.test(g[p]);)p++;return p};function Oe(g,p,y){for(let x=0;x<p.length;x++)if(p[x]!==g[y+x+1])return!1;return!0}function st(g){if(i(g))return g;throw new Error(`Invalid entity name ${g}`)}let Qe=/^[-+]?0x[a-fA-F0-9]+$/,An=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,ut={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"},Qn=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/,Se=new Set(["push","pop","reset","updateCurrent","restore"]);class mt{constructor(p={}){this.separator=p.separator||".",this.path=[],this.siblingStacks=[]}push(p,y=null,x=null){this.path.length>0&&(this.path[this.path.length-1].values=void 0);let w=this.path.length;this.siblingStacks[w]||(this.siblingStacks[w]=new Map);let v=this.siblingStacks[w],F=x?`${x}:${p}`:p,P=v.get(F)||0,L=0;for(let W of v.values())L+=W;v.set(F,P+1);let U={tag:p,position:L,counter:P};x!=null&&(U.namespace=x),y!=null&&(U.values=y),this.path.push(U)}pop(){if(this.path.length===0)return;let p=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),p}updateCurrent(p){if(this.path.length>0){let y=this.path[this.path.length-1];p!=null&&(y.values=p)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(p){var x;return this.path.length===0||(x=this.path[this.path.length-1].values)==null?void 0:x[p]}hasAttr(p){if(this.path.length===0)return!1;let y=this.path[this.path.length-1];return y.values!==void 0&&p in y.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(p,y=!0){let x=p||this.separator;return this.path.map(w=>y&&w.namespace?`${w.namespace}:${w.tag}`:w.tag).join(x)}toArray(){return this.path.map(p=>p.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(p){let y=p.segments;return y.length!==0&&(p.hasDeepWildcard()?this._matchWithDeepWildcard(y):this._matchSimple(y))}_matchSimple(p){if(this.path.length!==p.length)return!1;for(let y=0;y<p.length;y++){let x=p[y],w=this.path[y],v=y===this.path.length-1;if(!this._matchSegment(x,w,v))return!1}return!0}_matchWithDeepWildcard(p){let y=this.path.length-1,x=p.length-1;for(;x>=0&&y>=0;){let w=p[x];if(w.type==="deep-wildcard"){if(x--,x<0)return!0;let v=p[x],F=!1;for(let P=y;P>=0;P--){let L=P===this.path.length-1;if(this._matchSegment(v,this.path[P],L)){y=P-1,x--,F=!0;break}}if(!F)return!1}else{let v=y===this.path.length-1;if(!this._matchSegment(w,this.path[y],v))return!1;y--,x--}}return x<0}_matchSegment(p,y,x){if(p.tag!=="*"&&p.tag!==y.tag||p.namespace!==void 0&&p.namespace!=="*"&&p.namespace!==y.namespace)return!1;if(p.attrName!==void 0){if(!x||!y.values||!(p.attrName in y.values))return!1;if(p.attrValue!==void 0){let w=y.values[p.attrName];if(String(w)!==String(p.attrValue))return!1}}if(p.position!==void 0){if(!x)return!1;let w=y.counter??0;if(p.position==="first"&&w!==0||p.position==="odd"&&w%2!=1||p.position==="even"&&w%2!=0||p.position==="nth"&&w!==p.positionValue)return!1}return!0}snapshot(){return{path:this.path.map(p=>({...p})),siblingStacks:this.siblingStacks.map(p=>new Map(p))}}restore(p){this.path=p.path.map(y=>({...y})),this.siblingStacks=p.siblingStacks.map(y=>new Map(y))}readOnly(){return new Proxy(this,{get(p,y,x){if(Se.has(y))return()=>{throw new TypeError(`Cannot call '${y}' on a read-only Matcher. Obtain a writable instance to mutate state.`)};let w=Reflect.get(p,y,x);return y==="path"||y==="siblingStacks"?Object.freeze(Array.isArray(w)?w.map(v=>v instanceof Map?Object.freeze(new Map(v)):Object.freeze({...v})):w):typeof w=="function"?w.bind(p):w},set(p,y){throw new TypeError(`Cannot set property '${String(y)}' on a read-only Matcher.`)},deleteProperty(p,y){throw new TypeError(`Cannot delete property '${String(y)}' from a read-only Matcher.`)}})}}class Xn{constructor(p,y={}){this.pattern=p,this.separator=y.separator||".",this.segments=this._parse(p),this._hasDeepWildcard=this.segments.some(x=>x.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(x=>x.attrName!==void 0),this._hasPositionSelector=this.segments.some(x=>x.position!==void 0)}_parse(p){let y=[],x=0,w="";for(;x<p.length;)p[x]===this.separator?x+1<p.length&&p[x+1]===this.separator?(w.trim()&&(y.push(this._parseSegment(w.trim())),w=""),y.push({type:"deep-wildcard"}),x+=2):(w.trim()&&y.push(this._parseSegment(w.trim())),w="",x++):(w+=p[x],x++);return w.trim()&&y.push(this._parseSegment(w.trim())),y}_parseSegment(p){let y={type:"tag"},x=null,w=p,v=p.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(v&&(w=v[1]+v[3],v[2])){let W=v[2].slice(1,-1);W&&(x=W)}let F,P,L=w;if(w.includes("::")){let W=w.indexOf("::");if(F=w.substring(0,W).trim(),L=w.substring(W+2).trim(),!F)throw new Error(`Invalid namespace in pattern: ${p}`)}let U=null;if(L.includes(":")){let W=L.lastIndexOf(":"),te=L.substring(0,W).trim(),Me=L.substring(W+1).trim();["first","last","odd","even"].includes(Me)||/^nth\(\d+\)$/.test(Me)?(P=te,U=Me):P=L}else P=L;if(!P)throw new Error(`Invalid segment pattern: ${p}`);if(y.tag=P,F&&(y.namespace=F),x)if(x.includes("=")){let W=x.indexOf("=");y.attrName=x.substring(0,W).trim(),y.attrValue=x.substring(W+1).trim()}else y.attrName=x.trim();if(U){let W=U.match(/^nth\((\d+)\)$/);W?(y.position="nth",y.positionValue=parseInt(W[1],10)):y.position=U}return y}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}function Ou(g,p){if(!g)return{};let y=p.attributesGroupName?g[p.attributesGroupName]:g;if(!y)return{};let x={};for(let w in y)w.startsWith(p.attributeNamePrefix)?x[w.substring(p.attributeNamePrefix.length)]=y[w]:x[w]=y[w];return x}function Ai(g){if(!g||typeof g!="string")return;let p=g.indexOf(":");if(p!==-1&&p>0){let y=g.substring(0,p);if(y!=="xmlns")return y}}class Nu{constructor(p){var y;if(this.options=p,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(x,w)=>Tt(w,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(x,w)=>Tt(w,16,"&#x")}},this.addExternalEntities=Wt,this.parseXml=R,this.parseTextData=Na,this.resolveNameSpace=Jn,this.buildAttributesMap=$u,this.isItStopNode=$,this.replaceEntitiesValue=V,this.readStopNodeData=ye,this.saveTextToParentTag=B,this.addChild=N,this.ignoreAttributesFn=typeof(y=this.options.ignoreAttributes)=="function"?y:Array.isArray(y)?x=>{for(let w of y)if(typeof w=="string"&&x===w||w instanceof RegExp&&w.test(x))return!0}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new mt,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let x=0;x<this.options.stopNodes.length;x++){let w=this.options.stopNodes[x];typeof w=="string"?this.stopNodeExpressions.push(new Xn(w)):w instanceof Xn&&this.stopNodeExpressions.push(w)}}}}function Wt(g){let p=Object.keys(g);for(let y=0;y<p.length;y++){let x=p[y],w=x.replace(/[.\-+*:]/g,"\\.");this.lastEntities[x]={regex:new RegExp("&"+w+";","g"),val:g[x]}}}function Na(g,p,y,x,w,v,F){if(g!==void 0&&(this.options.trimValues&&!x&&(g=g.trim()),g.length>0)){F||(g=this.replaceEntitiesValue(g,p,y));let P=this.options.jPath?y.toString():y,L=this.options.tagValueProcessor(p,g,P,w,v);return L==null?g:typeof L!=typeof g||L!==g?L:this.options.trimValues||g.trim()===g?St(g,this.options.parseTagValue,this.options.numberParseOptions):g}}function Jn(g){if(this.options.removeNSPrefix){let p=g.split(":"),y=g.charAt(0)==="/"?"/":"";if(p[0]==="xmlns")return"";p.length===2&&(g=y+p[1])}return g}let Pr=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function $u(g,p,y){if(this.options.ignoreAttributes!==!0&&typeof g=="string"){let x=o(g,Pr),w=x.length,v={},F={};for(let P=0;P<w;P++){let L=this.resolveNameSpace(x[P][1]),U=x[P][4];if(L.length&&U!==void 0){let W=U;this.options.trimValues&&(W=W.trim()),W=this.replaceEntitiesValue(W,y,this.readonlyMatcher),F[L]=W}}Object.keys(F).length>0&&typeof p=="object"&&p.updateCurrent&&p.updateCurrent(F);for(let P=0;P<w;P++){let L=this.resolveNameSpace(x[P][1]),U=this.options.jPath?p.toString():this.readonlyMatcher;if(this.ignoreAttributesFn(L,U))continue;let W=x[P][4],te=this.options.attributeNamePrefix+L;if(L.length)if(this.options.transformAttributeName&&(te=this.options.transformAttributeName(te)),te=j(te,this.options),W!==void 0){this.options.trimValues&&(W=W.trim()),W=this.replaceEntitiesValue(W,y,this.readonlyMatcher);let Me=this.options.jPath?p.toString():this.readonlyMatcher,Re=this.options.attributeValueProcessor(L,W,Me);v[te]=Re==null?W:typeof Re!=typeof W||Re!==W?Re:St(W,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(v[te]=!0)}if(!Object.keys(v).length)return;if(this.options.attributesGroupName){let P={};return P[this.options.attributesGroupName]=v,P}return v}}let R=function(g){g=g.replace(/\r\n?/g,`
47
+ `);let p=new Be("!xml"),y=p,x="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let w=new rt(this.options.processEntities);for(let v=0;v<g.length;v++)if(g[v]==="<")if(g[v+1]==="/"){let F=K(g,">",v,"Closing Tag is not closed."),P=g.substring(v+2,F).trim();if(this.options.removeNSPrefix){let U=P.indexOf(":");U!==-1&&(P=P.substr(U+1))}P=M(this.options.transformTagName,P,"",this.options).tagName,y&&(x=this.saveTextToParentTag(x,y,this.readonlyMatcher));let L=this.matcher.getCurrentTag();if(P&&this.options.unpairedTags.indexOf(P)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${P}>`);L&&this.options.unpairedTags.indexOf(L)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,y=this.tagsNodeStack.pop(),x="",v=F}else if(g[v+1]==="?"){let F=J(g,v,!1,"?>");if(!F)throw new Error("Pi Tag is not closed.");if(x=this.saveTextToParentTag(x,y,this.readonlyMatcher),!(this.options.ignoreDeclaration&&F.tagName==="?xml"||this.options.ignorePiTags)){let P=new Be(F.tagName);P.add(this.options.textNodeName,""),F.tagName!==F.tagExp&&F.attrExpPresent&&(P[":@"]=this.buildAttributesMap(F.tagExp,this.matcher,F.tagName)),this.addChild(y,P,this.readonlyMatcher,v)}v=F.closeIndex+1}else if(g.substr(v+1,3)==="!--"){let F=K(g,"-->",v+4,"Comment is not closed.");if(this.options.commentPropName){let P=g.substring(v+4,F-2);x=this.saveTextToParentTag(x,y,this.readonlyMatcher),y.add(this.options.commentPropName,[{[this.options.textNodeName]:P}])}v=F}else if(g.substr(v+1,2)==="!D"){let F=w.readDocType(g,v);this.docTypeEntities=F.entities,v=F.i}else if(g.substr(v+1,2)==="!["){let F=K(g,"]]>",v,"CDATA is not closed.")-2,P=g.substring(v+9,F);x=this.saveTextToParentTag(x,y,this.readonlyMatcher);let L=this.parseTextData(P,y.tagname,this.readonlyMatcher,!0,!1,!0,!0);L==null&&(L=""),this.options.cdataPropName?y.add(this.options.cdataPropName,[{[this.options.textNodeName]:P}]):y.add(this.options.textNodeName,L),v=F+2}else{let F=J(g,v,this.options.removeNSPrefix);if(!F){let Or=g.substring(Math.max(0,v-50),Math.min(g.length,v+50));throw new Error(`readTagExp returned undefined at position ${v}. Context: "${Or}"`)}let P=F.tagName,L=F.rawTagName,U=F.tagExp,W=F.attrExpPresent,te=F.closeIndex;if({tagName:P,tagExp:U}=M(this.options.transformTagName,P,U,this.options),this.options.strictReservedNames&&(P===this.options.commentPropName||P===this.options.cdataPropName||P===this.options.textNodeName||P===this.options.attributesGroupName))throw new Error(`Invalid tag name: ${P}`);y&&x&&y.tagname!=="!xml"&&(x=this.saveTextToParentTag(x,y,this.readonlyMatcher,!1));let Me=y;Me&&this.options.unpairedTags.indexOf(Me.tagname)!==-1&&(y=this.tagsNodeStack.pop(),this.matcher.pop());let Re=!1;U.length>0&&U.lastIndexOf("/")===U.length-1&&(Re=!0,P[P.length-1]==="/"?(P=P.substr(0,P.length-1),U=P):U=U.substr(0,U.length-1),W=P!==U);let $e,Ze=null,Zn={};$e=Ai(L),P!==p.tagname&&this.matcher.push(P,{},$e),P!==U&&W&&(Ze=this.buildAttributesMap(U,this.matcher,P),Ze&&(Zn=Ou(Ze,this.options))),P!==p.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));let zt=v;if(this.isCurrentNodeStopNode){let Or="";if(Re)v=F.closeIndex;else if(this.options.unpairedTags.indexOf(P)!==-1)v=F.closeIndex;else{let PS=this.readStopNodeData(g,L,te+1);if(!PS)throw new Error(`Unexpected end of ${L}`);v=PS.i,Or=PS.tagContent}let RS=new Be(P);Ze&&(RS[":@"]=Ze),RS.add(this.options.textNodeName,Or),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(y,RS,this.readonlyMatcher,zt)}else{if(Re){({tagName:P,tagExp:U}=M(this.options.transformTagName,P,U,this.options));let Or=new Be(P);Ze&&(Or[":@"]=Ze),this.addChild(y,Or,this.readonlyMatcher,zt),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(this.options.unpairedTags.indexOf(P)!==-1){let Or=new Be(P);Ze&&(Or[":@"]=Ze),this.addChild(y,Or,this.readonlyMatcher,zt),this.matcher.pop(),this.isCurrentNodeStopNode=!1,v=F.closeIndex;continue}{let Or=new Be(P);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(y),Ze&&(Or[":@"]=Ze),this.addChild(y,Or,this.readonlyMatcher,zt),y=Or}}x="",v=te}}else x+=g[v];return p.child};function N(g,p,y,x){this.options.captureMetaData||(x=void 0);let w=this.options.jPath?y.toString():y,v=this.options.updateTag(p.tagname,w,p[":@"]);v===!1||(typeof v=="string"&&(p.tagname=v),g.addChild(p,x))}function V(g,p,y){let x=this.options.processEntities;if(!x||!x.enabled)return g;if(x.allowedTags){let w=this.options.jPath?y.toString():y;if(!(Array.isArray(x.allowedTags)?x.allowedTags.includes(p):x.allowedTags(p,w)))return g}if(x.tagFilter){let w=this.options.jPath?y.toString():y;if(!x.tagFilter(p,w))return g}for(let w of Object.keys(this.docTypeEntities)){let v=this.docTypeEntities[w],F=g.match(v.regx);if(F){if(this.entityExpansionCount+=F.length,x.maxTotalExpansions&&this.entityExpansionCount>x.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${x.maxTotalExpansions}`);let P=g.length;if(g=g.replace(v.regx,v.val),x.maxExpandedLength&&(this.currentExpandedLength+=g.length-P,this.currentExpandedLength>x.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${x.maxExpandedLength}`)}}for(let w of Object.keys(this.lastEntities)){let v=this.lastEntities[w],F=g.match(v.regex);if(F&&(this.entityExpansionCount+=F.length,x.maxTotalExpansions&&this.entityExpansionCount>x.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${x.maxTotalExpansions}`);g=g.replace(v.regex,v.val)}if(g.indexOf("&")===-1)return g;if(this.options.htmlEntities)for(let w of Object.keys(this.htmlEntities)){let v=this.htmlEntities[w],F=g.match(v.regex);if(F&&(this.entityExpansionCount+=F.length,x.maxTotalExpansions&&this.entityExpansionCount>x.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${x.maxTotalExpansions}`);g=g.replace(v.regex,v.val)}return g.replace(this.ampEntity.regex,this.ampEntity.val)}function B(g,p,y,x){return g&&(x===void 0&&(x=p.child.length===0),(g=this.parseTextData(g,p.tagname,y,!1,!!p[":@"]&&Object.keys(p[":@"]).length!==0,x))!==void 0&&g!==""&&p.add(this.options.textNodeName,g),g=""),g}function $(g,p){if(!g||g.length===0)return!1;for(let y=0;y<g.length;y++)if(p.matches(g[y]))return!0;return!1}function K(g,p,y,x){let w=g.indexOf(p,y);if(w===-1)throw new Error(x);return w+p.length-1}function J(g,p,y,x=">"){let w=(function(te,Me,Re=">"){let $e,Ze="";for(let Zn=Me;Zn<te.length;Zn++){let zt=te[Zn];if($e)zt===$e&&($e="");else if(zt==='"'||zt==="'")$e=zt;else if(zt===Re[0]){if(!Re[1])return{data:Ze,index:Zn};if(te[Zn+1]===Re[1])return{data:Ze,index:Zn}}else zt===" "&&(zt=" ");Ze+=zt}})(g,p+1,x);if(!w)return;let v=w.data,F=w.index,P=v.search(/\s/),L=v,U=!0;P!==-1&&(L=v.substring(0,P),v=v.substring(P+1).trimStart());let W=L;if(y){let te=L.indexOf(":");te!==-1&&(L=L.substr(te+1),U=L!==w.data.substr(te+1))}return{tagName:L,tagExp:v,closeIndex:F,attrExpPresent:U,rawTagName:W}}function ye(g,p,y){let x=y,w=1;for(;y<g.length;y++)if(g[y]==="<")if(g[y+1]==="/"){let v=K(g,">",y,`${p} is not closed`);if(g.substring(y+2,v).trim()===p&&(w--,w===0))return{tagContent:g.substring(x,y),i:v};y=v}else if(g[y+1]==="?")y=K(g,"?>",y+1,"StopNode is not closed.");else if(g.substr(y+1,3)==="!--")y=K(g,"-->",y+3,"StopNode is not closed.");else if(g.substr(y+1,2)==="![")y=K(g,"]]>",y,"StopNode is not closed.")-2;else{let v=J(g,y,">");v&&((v&&v.tagName)===p&&v.tagExp[v.tagExp.length-1]!=="/"&&w++,y=v.closeIndex)}}function St(g,p,y){if(p&&typeof g=="string"){let x=g.trim();return x==="true"||x!=="false"&&(function(w,v={}){if(v=Object.assign({},ut,v),!w||typeof w!="string")return w;let F=w.trim();if(v.skipLike!==void 0&&v.skipLike.test(F))return w;if(w==="0")return 0;if(v.hex&&Qe.test(F))return(function(L){if(parseInt)return parseInt(L,16);if(Number.parseInt)return Number.parseInt(L,16);if(window&&window.parseInt)return window.parseInt(L,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(F);if(isFinite(F)){if(F.includes("e")||F.includes("E"))return(function(L,U,W){if(!W.eNotation)return L;let te=U.match(Qn);if(te){let Me=te[1]||"",Re=te[3].indexOf("e")===-1?"E":"e",$e=te[2],Ze=Me?L[$e.length+1]===Re:L[$e.length]===Re;return $e.length>1&&Ze?L:($e.length!==1||!te[3].startsWith(`.${Re}`)&&te[3][0]!==Re)&&$e.length>0?W.leadingZeros&&!Ze?(U=(te[1]||"")+te[3],Number(U)):L:Number(U)}return L})(w,F,v);{let L=An.exec(F);if(L){let U=L[1]||"",W=L[2],te=((P=L[3])&&P.indexOf(".")!==-1&&((P=P.replace(/0+$/,""))==="."?P="0":P[0]==="."?P="0"+P:P[P.length-1]==="."&&(P=P.substring(0,P.length-1))),P),Me=U?w[W.length+1]===".":w[W.length]===".";if(!v.leadingZeros&&(W.length>1||W.length===1&&!Me))return w;{let Re=Number(F),$e=String(Re);if(Re===0)return Re;if($e.search(/[eE]/)!==-1)return v.eNotation?Re:w;if(F.indexOf(".")!==-1)return $e==="0"||$e===te||$e===`${U}${te}`?Re:w;let Ze=W?te:F;return W?Ze===$e||U+Ze===$e?Re:w:Ze===$e||Ze===U+$e?Re:w}}return w}}var P;return(function(L,U,W){let te=U===1/0;switch(W.infinity.toLowerCase()){case"null":return null;case"infinity":return U;case"string":return te?"Infinity":"-Infinity";default:return L}})(w,Number(F),v)})(g,y)}return g!==void 0?g:""}function Tt(g,p,y){let x=Number.parseInt(g,p);return x>=0&&x<=1114111?String.fromCodePoint(x):y+g+";"}function M(g,p,y,x){if(g){let w=g(p);y===p&&(y=w),p=w}return{tagName:p=j(p,x),tagExp:y}}function j(g,p){if(a.includes(g))throw new Error(`[SECURITY] Invalid name: "${g}" is a reserved JavaScript keyword that could cause prototype pollution`);return s.includes(g)?p.onDangerousProperty(g):g}let H=Be.getMetaDataSymbol();function Y(g,p){if(!g||typeof g!="object")return{};if(!p)return g;let y={};for(let x in g)x.startsWith(p)?y[x.substring(p.length)]=g[x]:y[x]=g[x];return y}function pe(g,p,y,x){return Ot(g,p,y,x)}function Ot(g,p,y,x){let w,v={};for(let F=0;F<g.length;F++){let P=g[F],L=Ae(P);if(L!==void 0&&L!==p.textNodeName){let U=Y(P[":@"]||{},p.attributeNamePrefix);y.push(L,U)}if(L===p.textNodeName)w===void 0?w=P[L]:w+=""+P[L];else{if(L===void 0)continue;if(P[L]){let U=Ot(P[L],p,y,x),W=ge(U,p);if(P[":@"]?De(U,P[":@"],x,p):Object.keys(U).length!==1||U[p.textNodeName]===void 0||p.alwaysCreateTextNode?Object.keys(U).length===0&&(p.alwaysCreateTextNode?U[p.textNodeName]="":U=""):U=U[p.textNodeName],P[H]!==void 0&&typeof U=="object"&&U!==null&&(U[H]=P[H]),v[L]!==void 0&&Object.prototype.hasOwnProperty.call(v,L))Array.isArray(v[L])||(v[L]=[v[L]]),v[L].push(U);else{let te=p.jPath?x.toString():x;p.isArray(L,te,W)?v[L]=[U]:v[L]=U}L!==void 0&&L!==p.textNodeName&&y.pop()}}}return typeof w=="string"?w.length>0&&(v[p.textNodeName]=w):w!==void 0&&(v[p.textNodeName]=w),v}function Ae(g){let p=Object.keys(g);for(let y=0;y<p.length;y++){let x=p[y];if(x!==":@")return x}}function De(g,p,y,x){if(p){let w=Object.keys(p),v=w.length;for(let F=0;F<v;F++){let P=w[F],L=P.startsWith(x.attributeNamePrefix)?P.substring(x.attributeNamePrefix.length):P,U=x.jPath?y.toString()+"."+L:y;x.isArray(P,U,!0,!0)?g[P]=[p[P]]:g[P]=p[P]}}}function ge(g,p){let{textNodeName:y}=p,x=Object.keys(g).length;return x===0||!(x!==1||!g[y]&&typeof g[y]!="boolean"&&g[y]!==0)}class He{constructor(p){this.externalEntities={},this.options=_e(p)}parse(p,y){if(typeof p!="string"&&p.toString)p=p.toString();else if(typeof p!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(y){y===!0&&(y={});let v=l(p,y);if(v!==!0)throw Error(`${v.err.msg}:${v.err.line}:${v.err.col}`)}let x=new Nu(this.options);x.addExternalEntities(this.externalEntities);let w=x.parseXml(p);return this.options.preserveOrder||w===void 0?w:pe(w,this.options,x.matcher,x.readonlyMatcher)}addEntity(p,y){if(y.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(p.indexOf("&")!==-1||p.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(y==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[p]=y}static getMetaDataSymbol(){return Be.getMetaDataSymbol()}}function Ve(g,p){let y="";p.format&&p.indentBy.length>0&&(y=`
48
+ `);let x=[];if(p.stopNodes&&Array.isArray(p.stopNodes))for(let w=0;w<p.stopNodes.length;w++){let v=p.stopNodes[w];typeof v=="string"?x.push(new Xn(v)):v instanceof Xn&&x.push(v)}return In(g,p,y,new mt,x)}function In(g,p,y,x,w){let v="",F=!1;if(p.maxNestedTags&&x.getDepth()>p.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(g)){if(g!=null){let P=g.toString();return P=DS(P,p),P}return""}for(let P=0;P<g.length;P++){let L=g[P],U=ZD(L);if(U===void 0)continue;let W=jf(L[":@"],p);x.push(U,W);let te=z9(x,w);if(U===p.textNodeName){let Ze=L[U];te||(Ze=p.tagValueProcessor(U,Ze),Ze=DS(Ze,p)),F&&(v+=y),v+=Ze,F=!1,x.pop();continue}if(U===p.cdataPropName){F&&(v+=y),v+=`<![CDATA[${L[U][0][p.textNodeName]}]]>`,F=!1,x.pop();continue}if(U===p.commentPropName){v+=y+`<!--${L[U][0][p.textNodeName]}-->`,F=!0,x.pop();continue}if(U[0]==="?"){let Ze=eR(L[":@"],p,te),Zn=U==="?xml"?"":y,zt=L[U][0][p.textNodeName];zt=zt.length!==0?" "+zt:"",v+=Zn+`<${U}${zt}${Ze}?>`,F=!0,x.pop();continue}let Me=y;Me!==""&&(Me+=p.indentBy);let Re=y+`<${U}${eR(L[":@"],p,te)}`,$e;$e=te?JD(L[U],p):In(L[U],p,Me,x,w),p.unpairedTags.indexOf(U)!==-1?p.suppressUnpairedNode?v+=Re+">":v+=Re+"/>":$e&&$e.length!==0||!p.suppressEmptyNode?$e&&$e.endsWith(">")?v+=Re+`>${$e}${y}</${U}>`:(v+=Re+">",$e&&y!==""&&($e.includes("/>")||$e.includes("</"))?v+=y+p.indentBy+$e+y:v+=$e,v+=`</${U}>`):v+=Re+"/>",F=!0,x.pop()}return v}function jf(g,p){if(!g||p.ignoreAttributes)return null;let y={},x=!1;for(let w in g)Object.prototype.hasOwnProperty.call(g,w)&&(y[w.startsWith(p.attributeNamePrefix)?w.substr(p.attributeNamePrefix.length):w]=g[w],x=!0);return x?y:null}function JD(g,p){if(!Array.isArray(g))return g!=null?g.toString():"";let y="";for(let x=0;x<g.length;x++){let w=g[x],v=ZD(w);if(v===p.textNodeName)y+=w[v];else if(v===p.cdataPropName)y+=w[v][0][p.textNodeName];else if(v===p.commentPropName)y+=w[v][0][p.textNodeName];else{if(v&&v[0]==="?")continue;if(v){let F=W9(w[":@"],p),P=JD(w[v],p);P&&P.length!==0?y+=`<${v}${F}>${P}</${v}>`:y+=`<${v}${F}/>`}}}return y}function W9(g,p){let y="";if(g&&!p.ignoreAttributes)for(let x in g){if(!Object.prototype.hasOwnProperty.call(g,x))continue;let w=g[x];w===!0&&p.suppressBooleanAttributes?y+=` ${x.substr(p.attributeNamePrefix.length)}`:y+=` ${x.substr(p.attributeNamePrefix.length)}="${w}"`}return y}function ZD(g){let p=Object.keys(g);for(let y=0;y<p.length;y++){let x=p[y];if(Object.prototype.hasOwnProperty.call(g,x)&&x!==":@")return x}}function eR(g,p,y){let x="";if(g&&!p.ignoreAttributes)for(let w in g){if(!Object.prototype.hasOwnProperty.call(g,w))continue;let v;y?v=g[w]:(v=p.attributeValueProcessor(w,g[w]),v=DS(v,p)),v===!0&&p.suppressBooleanAttributes?x+=` ${w.substr(p.attributeNamePrefix.length)}`:x+=` ${w.substr(p.attributeNamePrefix.length)}="${v}"`}return x}function z9(g,p){if(!p||p.length===0)return!1;for(let y=0;y<p.length;y++)if(g.matches(p[y]))return!0;return!1}function DS(g,p){if(g&&g.length>0&&p.processEntities)for(let y=0;y<p.entities.length;y++){let x=p.entities[y];g=g.replace(x.regex,x.val)}return g}let K9={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(g,p){return p},attributeValueProcessor:function(g,p){return p},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function an(g){if(this.options=Object.assign({},K9,g),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(y=>typeof y=="string"&&y.startsWith("*.")?".."+y.substring(2):y)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let y=0;y<this.options.stopNodes.length;y++){let x=this.options.stopNodes[y];typeof x=="string"?this.stopNodeExpressions.push(new Xn(x)):x instanceof Xn&&this.stopNodeExpressions.push(x)}var p;this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=typeof(p=this.options.ignoreAttributes)=="function"?p:Array.isArray(p)?y=>{for(let x of p)if(typeof x=="string"&&y===x||x instanceof RegExp&&x.test(y))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=X9),this.processTextOrObjNode=Y9,this.options.format?(this.indentate=Q9,this.tagEndChar=`>
49
+ `,this.newLine=`
50
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Y9(g,p,y,x){let w=this.extractAttributes(g);if(x.push(p,w),this.checkStopNode(x)){let F=this.buildRawContent(g),P=this.buildAttributesForStopNode(g);return x.pop(),this.buildObjectNode(F,p,P,y)}let v=this.j2x(g,y+1,x);return x.pop(),g[this.options.textNodeName]!==void 0&&Object.keys(g).length===1?this.buildTextValNode(g[this.options.textNodeName],p,v.attrStr,y,x):this.buildObjectNode(v.val,p,v.attrStr,y)}function Q9(g){return this.options.indentBy.repeat(g)}function X9(g){return!(!g.startsWith(this.options.attributeNamePrefix)||g===this.options.textNodeName)&&g.substr(this.attrPrefixLen)}an.prototype.build=function(g){if(this.options.preserveOrder)return Ve(g,this.options);{Array.isArray(g)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(g={[this.options.arrayNodeName]:g});let p=new mt;return this.j2x(g,0,p).val}},an.prototype.j2x=function(g,p,y){let x="",w="";if(this.options.maxNestedTags&&y.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let v=this.options.jPath?y.toString():y,F=this.checkStopNode(y);for(let P in g)if(Object.prototype.hasOwnProperty.call(g,P))if(g[P]===void 0)this.isAttribute(P)&&(w+="");else if(g[P]===null)this.isAttribute(P)||P===this.options.cdataPropName?w+="":P[0]==="?"?w+=this.indentate(p)+"<"+P+"?"+this.tagEndChar:w+=this.indentate(p)+"<"+P+"/"+this.tagEndChar;else if(g[P]instanceof Date)w+=this.buildTextValNode(g[P],P,"",p,y);else if(typeof g[P]!="object"){let L=this.isAttribute(P);if(L&&!this.ignoreAttributesFn(L,v))x+=this.buildAttrPairStr(L,""+g[P],F);else if(!L)if(P===this.options.textNodeName){let U=this.options.tagValueProcessor(P,""+g[P]);w+=this.replaceEntitiesValue(U)}else{y.push(P);let U=this.checkStopNode(y);if(y.pop(),U){let W=""+g[P];w+=W===""?this.indentate(p)+"<"+P+this.closeTag(P)+this.tagEndChar:this.indentate(p)+"<"+P+">"+W+"</"+P+this.tagEndChar}else w+=this.buildTextValNode(g[P],P,"",p,y)}}else if(Array.isArray(g[P])){let L=g[P].length,U="",W="";for(let te=0;te<L;te++){let Me=g[P][te];if(Me!==void 0)if(Me===null)P[0]==="?"?w+=this.indentate(p)+"<"+P+"?"+this.tagEndChar:w+=this.indentate(p)+"<"+P+"/"+this.tagEndChar;else if(typeof Me=="object")if(this.options.oneListGroup){y.push(P);let Re=this.j2x(Me,p+1,y);y.pop(),U+=Re.val,this.options.attributesGroupName&&Me.hasOwnProperty(this.options.attributesGroupName)&&(W+=Re.attrStr)}else U+=this.processTextOrObjNode(Me,P,p,y);else if(this.options.oneListGroup){let Re=this.options.tagValueProcessor(P,Me);Re=this.replaceEntitiesValue(Re),U+=Re}else{y.push(P);let Re=this.checkStopNode(y);if(y.pop(),Re){let $e=""+Me;U+=$e===""?this.indentate(p)+"<"+P+this.closeTag(P)+this.tagEndChar:this.indentate(p)+"<"+P+">"+$e+"</"+P+this.tagEndChar}else U+=this.buildTextValNode(Me,P,"",p,y)}}this.options.oneListGroup&&(U=this.buildObjectNode(U,P,W,p)),w+=U}else if(this.options.attributesGroupName&&P===this.options.attributesGroupName){let L=Object.keys(g[P]),U=L.length;for(let W=0;W<U;W++)x+=this.buildAttrPairStr(L[W],""+g[P][L[W]],F)}else w+=this.processTextOrObjNode(g[P],P,p,y);return{attrStr:x,val:w}},an.prototype.buildAttrPairStr=function(g,p,y){return y||(p=this.options.attributeValueProcessor(g,""+p),p=this.replaceEntitiesValue(p)),this.options.suppressBooleanAttributes&&p==="true"?" "+g:" "+g+'="'+p+'"'},an.prototype.extractAttributes=function(g){if(!g||typeof g!="object")return null;let p={},y=!1;if(this.options.attributesGroupName&&g[this.options.attributesGroupName]){let x=g[this.options.attributesGroupName];for(let w in x)Object.prototype.hasOwnProperty.call(x,w)&&(p[w.startsWith(this.options.attributeNamePrefix)?w.substring(this.options.attributeNamePrefix.length):w]=x[w],y=!0)}else for(let x in g){if(!Object.prototype.hasOwnProperty.call(g,x))continue;let w=this.isAttribute(x);w&&(p[w]=g[x],y=!0)}return y?p:null},an.prototype.buildRawContent=function(g){if(typeof g=="string")return g;if(typeof g!="object"||g===null)return String(g);if(g[this.options.textNodeName]!==void 0)return g[this.options.textNodeName];let p="";for(let y in g){if(!Object.prototype.hasOwnProperty.call(g,y)||this.isAttribute(y)||this.options.attributesGroupName&&y===this.options.attributesGroupName)continue;let x=g[y];if(y===this.options.textNodeName)p+=x;else if(Array.isArray(x)){for(let w of x)if(typeof w=="string"||typeof w=="number")p+=`<${y}>${w}</${y}>`;else if(typeof w=="object"&&w!==null){let v=this.buildRawContent(w),F=this.buildAttributesForStopNode(w);p+=v===""?`<${y}${F}/>`:`<${y}${F}>${v}</${y}>`}}else if(typeof x=="object"&&x!==null){let w=this.buildRawContent(x),v=this.buildAttributesForStopNode(x);p+=w===""?`<${y}${v}/>`:`<${y}${v}>${w}</${y}>`}else p+=`<${y}>${x}</${y}>`}return p},an.prototype.buildAttributesForStopNode=function(g){if(!g||typeof g!="object")return"";let p="";if(this.options.attributesGroupName&&g[this.options.attributesGroupName]){let y=g[this.options.attributesGroupName];for(let x in y){if(!Object.prototype.hasOwnProperty.call(y,x))continue;let w=x.startsWith(this.options.attributeNamePrefix)?x.substring(this.options.attributeNamePrefix.length):x,v=y[x];v===!0&&this.options.suppressBooleanAttributes?p+=" "+w:p+=" "+w+'="'+v+'"'}}else for(let y in g){if(!Object.prototype.hasOwnProperty.call(g,y))continue;let x=this.isAttribute(y);if(x){let w=g[y];w===!0&&this.options.suppressBooleanAttributes?p+=" "+x:p+=" "+x+'="'+w+'"'}}return p},an.prototype.buildObjectNode=function(g,p,y,x){if(g==="")return p[0]==="?"?this.indentate(x)+"<"+p+y+"?"+this.tagEndChar:this.indentate(x)+"<"+p+y+this.closeTag(p)+this.tagEndChar;{let w="</"+p+this.tagEndChar,v="";return p[0]==="?"&&(v="?",w=""),!y&&y!==""||g.indexOf("<")!==-1?this.options.commentPropName!==!1&&p===this.options.commentPropName&&v.length===0?this.indentate(x)+`<!--${g}-->`+this.newLine:this.indentate(x)+"<"+p+y+v+this.tagEndChar+g+this.indentate(x)+w:this.indentate(x)+"<"+p+y+v+">"+g+w}},an.prototype.closeTag=function(g){let p="";return this.options.unpairedTags.indexOf(g)!==-1?this.options.suppressUnpairedNode||(p="/"):p=this.options.suppressEmptyNode?"/":`></${g}`,p},an.prototype.checkStopNode=function(g){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let p=0;p<this.stopNodeExpressions.length;p++)if(g.matches(this.stopNodeExpressions[p]))return!0;return!1},an.prototype.buildTextValNode=function(g,p,y,x,w){if(this.options.cdataPropName!==!1&&p===this.options.cdataPropName)return this.indentate(x)+`<![CDATA[${g}]]>`+this.newLine;if(this.options.commentPropName!==!1&&p===this.options.commentPropName)return this.indentate(x)+`<!--${g}-->`+this.newLine;if(p[0]==="?")return this.indentate(x)+"<"+p+y+"?"+this.tagEndChar;{let v=this.options.tagValueProcessor(p,g);return v=this.replaceEntitiesValue(v),v===""?this.indentate(x)+"<"+p+y+this.closeTag(p)+this.tagEndChar:this.indentate(x)+"<"+p+y+">"+v+"</"+p+this.tagEndChar}},an.prototype.replaceEntitiesValue=function(g){if(g&&g.length>0&&this.options.processEntities)for(let p=0;p<this.options.entities.length;p++){let y=this.options.entities[p];g=g.replace(y.regex,y.val)}return g};let J9=an,Z9={validate:l};bB.exports=t})()});var vB=b(bw=>{"use strict";Object.defineProperty(bw,"__esModule",{value:!0});bw.parseXML=$fe;var Nfe=xB(),Sw=new Nfe.XMLParser({attributeNamePrefix:"",processEntities:{enabled:!0,maxTotalExpansions:1/0},htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>t.trim()===""&&t.includes(`
51
+ `)?"":void 0,maxNestedTags:1/0});Sw.addEntity("#xD","\r");Sw.addEntity("#10",`
52
+ `);function $fe(e){return Sw.parse(e,!0)}});var ph=b(fh=>{"use strict";var Mfe=vB(),Lfe=/[&<>"]/g,kfe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function Ffe(e){return e.replace(Lfe,t=>kfe[t])}var Bfe=/[&"'<>\r\n\u0085\u2028]/g,Ufe={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;","\r":"&#x0D;","\n":"&#x0A;","\x85":"&#x85;","\u2028":"&#x2028;"};function jfe(e){return e.replace(Bfe,t=>Ufe[t])}var dh=class{value;constructor(t){this.value=t}toString(){return jfe(""+this.value)}},xw=class e{name;children;attributes={};static of(t,r,n){let o=new e(t);return r!==void 0&&o.addChildNode(new dh(r)),n!==void 0&&o.withName(n),o}constructor(t,r=[]){this.name=t,this.children=r}withName(t){return this.name=t,this}addAttribute(t,r){return this.attributes[t]=r,this}addChildNode(t){return this.children.push(t),this}removeAttribute(t){return delete this.attributes[t],this}n(t){return this.name=t,this}c(t){return this.children.push(t),this}a(t,r){return r!=null&&(this.attributes[t]=r),this}cc(t,r,n=r){if(t[r]!=null){let o=e.of(r,t[r]).withName(n);this.c(o)}}l(t,r,n,o){t[r]!=null&&o().map(s=>{s.withName(n),this.c(s)})}lc(t,r,n,o){if(t[r]!=null){let i=o(),s=new e(n);i.map(a=>{s.c(a)}),this.c(s)}}toString(){let t=!!this.children.length,r=`<${this.name}`,n=this.attributes;for(let o of Object.keys(n)){let i=n[o];i!=null&&(r+=` ${o}="${Ffe(""+i)}"`)}return r+=t?`>${this.children.map(o=>o.toString()).join("")}</${this.name}>`:"/>"}};fh.parseXML=Mfe.parseXML;fh.XmlNode=xw;fh.XmlText=dh});var TB,wB,AB,os,mh=D(()=>{TB=C(ph());Nr();We();wB=C(Te()),AB=C(Kt());ts();hw();os=class extends fr{settings;stringDeserializer;constructor(t){super(),this.settings=t,this.stringDeserializer=new Vs(t)}setSerdeContext(t){this.serdeContext=t,this.stringDeserializer.setSerdeContext(t)}read(t,r,n){var l;let o=le.of(t),i=o.getMemberSchemas();if(o.isStructSchema()&&o.isMemberSchema()&&!!Object.values(i).find(d=>!!d.getMemberTraits().eventPayload)){let d={},f=Object.keys(i)[0];return i[f].isBlobSchema()?d[f]=r:d[f]=this.read(i[f],r),d}let a=(((l=this.serdeContext)==null?void 0:l.utf8Encoder)??AB.toUtf8)(r),c=this.parseXml(a);return this.readSchema(t,n?c[n]:c)}readSchema(t,r){let n=le.of(t);if(n.isUnitSchema())return;let o=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(r))return this.readSchema(n,[r]);if(r==null)return r;if(typeof r=="object"){let i=!!o.xmlFlattened;if(n.isListSchema()){let a=n.getValueSchema(),c=[],l=a.getMergedTraits().xmlName??"member",d=i?r:(r[0]??r)[l];if(d==null)return c;let f=Array.isArray(d)?d:[d];for(let m of f)c.push(this.readSchema(a,m));return c}let s={};if(n.isMapSchema()){let a=n.getKeySchema(),c=n.getValueSchema(),l;i?l=Array.isArray(r)?r:[r]:l=Array.isArray(r.entry)?r.entry:[r.entry];let d=a.getMergedTraits().xmlName??"key",f=c.getMergedTraits().xmlName??"value";for(let m of l){let h=m[d],_=m[f];s[h]=this.readSchema(c,_)}return s}if(n.isStructSchema()){let a=n.isUnionSchema(),c;a&&(c=new Ic(r,s));for(let[l,d]of n.structIterator()){let f=d.getMergedTraits(),m=f.httpPayload?f.xmlName??d.getName():d.getMemberTraits().xmlName??l;a&&c.mark(m),r[m]!=null&&(s[l]=this.readSchema(d,r[m]))}return a&&c.writeUnknown(),s}if(n.isDocumentSchema())return r;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(!0)}`)}return n.isListSchema()?[]:n.isMapSchema()||n.isStructSchema()?{}:this.stringDeserializer.read(n,r)}parseXml(t){if(t.length){let r;try{r=(0,TB.parseXML)(t)}catch(s){throw s&&typeof s=="object"&&Object.defineProperty(s,"$responseBodyText",{value:t}),s}let n="#text",o=Object.keys(r)[0],i=r[o];return i[n]&&(i[o]=i[n],delete i[n]),(0,wB.getValueFromTextNode)(i)}return{}}}});var IB,CB,Pc,vw=D(()=>{Nr();We();Tr();IB=C(Te()),CB=C(jt());ts();Pc=class extends fr{settings;buffer;constructor(t){super(),this.settings=t}write(t,r,n=""){var i;this.buffer===void 0&&(this.buffer="");let o=le.of(t);if(n&&!n.endsWith(".")&&(n+="."),o.isBlobSchema())(typeof r=="string"||r instanceof Uint8Array)&&(this.writeKey(n),this.writeValue((((i=this.serdeContext)==null?void 0:i.base64Encoder)??CB.toBase64)(r)));else if(o.isBooleanSchema()||o.isNumericSchema()||o.isStringSchema())r!=null?(this.writeKey(n),this.writeValue(String(r))):o.isIdempotencyToken()&&(this.writeKey(n),this.writeValue((0,ln.v4)()));else if(o.isBigIntegerSchema())r!=null&&(this.writeKey(n),this.writeValue(String(r)));else if(o.isBigDecimalSchema())r!=null&&(this.writeKey(n),this.writeValue(r instanceof ft?r.string:String(r)));else if(o.isTimestampSchema()){if(r instanceof Date)switch(this.writeKey(n),Yr(o,this.settings)){case 5:this.writeValue(r.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue((0,IB.dateToUtcString)(r));break;case 7:this.writeValue(String(r.getTime()/1e3));break}}else if(o.isDocumentSchema())Array.isArray(r)?this.write(79,r,n):r instanceof Date?this.write(4,r,n):r instanceof Uint8Array?this.write(21,r,n):r&&typeof r=="object"?this.write(143,r,n):(this.writeKey(n),this.writeValue(String(r)));else if(o.isListSchema()){if(Array.isArray(r))if(r.length===0)this.settings.serializeEmptyLists&&(this.writeKey(n),this.writeValue(""));else{let s=o.getValueSchema(),a=this.settings.flattenLists||o.getMergedTraits().xmlFlattened,c=1;for(let l of r){if(l==null)continue;let d=s.getMergedTraits(),f=this.getKey("member",d.xmlName,d.ec2QueryName),m=a?`${n}${c}`:`${n}${f}.${c}`;this.write(s,l,m),++c}}}else if(o.isMapSchema()){if(r&&typeof r=="object"){let s=o.getKeySchema(),a=o.getValueSchema(),c=o.getMergedTraits().xmlFlattened,l=1;for(let[d,f]of Object.entries(r)){if(f==null)continue;let m=s.getMergedTraits(),h=this.getKey("key",m.xmlName,m.ec2QueryName),_=c?`${n}${l}.${h}`:`${n}entry.${l}.${h}`,E=a.getMergedTraits(),T=this.getKey("value",E.xmlName,E.ec2QueryName),I=c?`${n}${l}.${T}`:`${n}entry.${l}.${T}`;this.write(s,d,_),this.write(a,f,I),++l}}}else if(o.isStructSchema()){if(r&&typeof r=="object"){let s=!1;for(let[a,c]of o.structIterator()){if(r[a]==null&&!c.isIdempotencyToken())continue;let l=c.getMergedTraits(),d=this.getKey(a,l.xmlName,l.ec2QueryName,"struct"),f=`${n}${d}`;this.write(c,r[a],f),s=!0}if(!s&&o.isUnionSchema()){let{$unknown:a}=r;if(Array.isArray(a)){let[c,l]=a,d=`${n}${c}`;this.write(15,l,d)}}}}else if(!o.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${o.getName(!0)}`)}flush(){if(this.buffer===void 0)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");let t=this.buffer;return delete this.buffer,t}getKey(t,r,n,o){let{ec2:i,capitalizeKeys:s}=this.settings;if(i&&n)return n;let a=r??t;return s&&o==="struct"?a[0].toUpperCase()+a.slice(1):a}writeKey(t){t.endsWith(".")&&(t=t.slice(0,t.length-1)),this.buffer+=`&${ro(t)}=`}writeValue(t){this.buffer+=ro(t)}}});var is,Tw=D(()=>{Nr();We();Ac();mh();vw();is=class extends zo{options;serializer;deserializer;mixin=new pn;constructor(t){super({defaultNamespace:t.defaultNamespace,errorTypeRegistries:t.errorTypeRegistries}),this.options=t;let r={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace,serializeEmptyLists:!0};this.serializer=new Pc(r),this.deserializer=new os(r)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(t){this.serializer.setSerdeContext(t),this.deserializer.setSerdeContext(t)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n);o.path.endsWith("/")||(o.path+="/"),Object.assign(o.headers,{"content-type":"application/x-www-form-urlencoded"}),(Rn(t.input)==="unit"||!o.body)&&(o.body="");let i=t.name.split("#")[1]??t.name;return o.body=`Action=${i}&Version=${this.options.version}`+o.body,o.body.endsWith("&")&&(o.body=o.body.slice(-1)),o}async deserializeResponse(t,r,n){let o=this.deserializer,i=le.of(t.output),s={};if(n.statusCode>=300){let f=await un(n.body,r);f.byteLength>0&&Object.assign(s,await o.read(15,f)),await this.handleError(t,r,n,s,this.deserializeMetadata(n))}for(let f in n.headers){let m=n.headers[f];delete n.headers[f],n.headers[f.toLowerCase()]=m}let a=t.name.split("#")[1]??t.name,c=i.isStructSchema()&&this.useNestedResult()?a+"Result":void 0,l=await un(n.body,r);return l.byteLength>0&&Object.assign(s,await o.read(i,l,c)),{$metadata:this.deserializeMetadata(n),...s}}useNestedResult(){return!0}async handleError(t,r,n,o,i){let s=this.loadQueryErrorCode(n,o)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,s,this.options.defaultNamespace);let a=this.loadQueryError(o)??{},c=this.loadQueryErrorMessage(o);a.message=c,a.Error={Type:a.Type,Code:a.Code,Message:c};let{errorSchema:l,errorMetadata:d}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,a,i,this.mixin.findQueryCompatibleError),f=le.of(l),m=this.compositeErrorRegistry.getErrorCtor(l)??Error,h=new m(c),_={Type:a.Error.Type,Code:a.Error.Code,Error:a.Error};for(let[E,T]of f.structIterator()){let I=T.getMergedTraits().xmlName??E,A=a[I]??o[I];_[E]=this.deserializer.readSchema(T,A)}throw this.mixin.decorateServiceException(Object.assign(h,d,{$fault:f.getMergedTraits().error,message:c},_),o)}loadQueryErrorCode(t,r){var o,i,s,a;let n=(a=((i=(o=r.Errors)==null?void 0:o[0])==null?void 0:i.Error)??((s=r.Errors)==null?void 0:s.Error)??r.Error)==null?void 0:a.Code;if(n!==void 0)return n;if(t.statusCode==404)return"NotFound"}loadQueryError(t){var r,n,o;return((n=(r=t.Errors)==null?void 0:r[0])==null?void 0:n.Error)??((o=t.Errors)==null?void 0:o.Error)??t.Error}loadQueryErrorMessage(t){let r=this.loadQueryError(t);return(r==null?void 0:r.message)??(r==null?void 0:r.Message)??t.message??t.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}});var hh,DB=D(()=>{Tw();hh=class extends is{options;constructor(t){super(t),this.options=t;let r={capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1,ec2:!0};Object.assign(this.serializer.settings,r)}getShapeId(){return"aws.protocols#ec2Query"}useNestedResult(){return!1}}});var RB=D(()=>{});var PB,OB,ww,NB,yh,Aw=D(()=>{PB=C(ph()),OB=C(Te());yw();ww=(e,t)=>ih(e,t).then(r=>{if(r.length){let n;try{n=(0,PB.parseXML)(r)}catch(a){throw a&&typeof a=="object"&&Object.defineProperty(a,"$responseBodyText",{value:r}),a}let o="#text",i=Object.keys(n)[0],s=n[i];return s[o]&&(s[i]=s[o],delete s[o]),(0,OB.getValueFromTextNode)(s)}return{}}),NB=async(e,t)=>{let r=await ww(e,t);return r.Error&&(r.Error.message=r.Error.message??r.Error.Message),r},yh=(e,t)=>{var r;if(((r=t==null?void 0:t.Error)==null?void 0:r.Code)!==void 0)return t.Error.Code;if((t==null?void 0:t.Code)!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"}});var Ir,Iw,gh,Oc,Cw=D(()=>{Ir=C(ph());Nr();We();Tr();Iw=C(Te()),gh=C(jt());ts();Oc=class extends fr{settings;stringBuffer;byteBuffer;buffer;constructor(t){super(),this.settings=t}write(t,r){var o;let n=le.of(t);if(n.isStringSchema()&&typeof r=="string")this.stringBuffer=r;else if(n.isBlobSchema())this.byteBuffer="byteLength"in r?r:(((o=this.serdeContext)==null?void 0:o.base64Decoder)??gh.fromBase64)(r);else{this.buffer=this.writeStruct(n,r,void 0);let i=n.getMergedTraits();i.httpPayload&&!i.xmlName&&this.buffer.withName(n.getName())}}flush(){var r;if(this.byteBuffer!==void 0){let n=this.byteBuffer;return delete this.byteBuffer,n}if(this.stringBuffer!==void 0){let n=this.stringBuffer;return delete this.stringBuffer,n}let t=this.buffer;return this.settings.xmlNamespace&&((r=t==null?void 0:t.attributes)!=null&&r.xmlns||t.addAttribute("xmlns",this.settings.xmlNamespace)),delete this.buffer,t.toString()}writeStruct(t,r,n){let o=t.getMergedTraits(),i=t.isMemberSchema()&&!o.httpPayload?t.getMemberTraits().xmlName??t.getMemberName():o.xmlName??t.getName();if(!i||!t.isStructSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${t.getName(!0)}.`);let s=Ir.XmlNode.of(i),[a,c]=this.getXmlnsAttribute(t,n);for(let[d,f]of t.structIterator()){let m=r[d];if(m!=null||f.isIdempotencyToken()){if(f.getMergedTraits().xmlAttribute){s.addAttribute(f.getMergedTraits().xmlName??d,this.writeSimple(f,m));continue}if(f.isListSchema())this.writeList(f,m,s,c);else if(f.isMapSchema())this.writeMap(f,m,s,c);else if(f.isStructSchema())s.addChildNode(this.writeStruct(f,m,c));else{let h=Ir.XmlNode.of(f.getMergedTraits().xmlName??f.getMemberName());this.writeSimpleInto(f,m,h,c),s.addChildNode(h)}}}let{$unknown:l}=r;if(l&&t.isUnionSchema()&&Array.isArray(l)&&Object.keys(r).length===1){let[d,f]=l,m=Ir.XmlNode.of(d);if(typeof f!="string")if(r instanceof Ir.XmlNode||r instanceof Ir.XmlText)s.addChildNode(r);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,f,m,c),s.addChildNode(m)}return c&&s.addAttribute(a,c),s}writeList(t,r,n,o){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${t.getName(!0)}`);let i=t.getMergedTraits(),s=t.getValueSchema(),a=s.getMergedTraits(),c=!!a.sparse,l=!!i.xmlFlattened,[d,f]=this.getXmlnsAttribute(t,o),m=(h,_)=>{if(s.isListSchema())this.writeList(s,Array.isArray(_)?_:[_],h,f);else if(s.isMapSchema())this.writeMap(s,_,h,f);else if(s.isStructSchema()){let E=this.writeStruct(s,_,f);h.addChildNode(E.withName(l?i.xmlName??t.getMemberName():a.xmlName??"member"))}else{let E=Ir.XmlNode.of(l?i.xmlName??t.getMemberName():a.xmlName??"member");this.writeSimpleInto(s,_,E,f),h.addChildNode(E)}};if(l)for(let h of r)(c||h!=null)&&m(n,h);else{let h=Ir.XmlNode.of(i.xmlName??t.getMemberName());f&&h.addAttribute(d,f);for(let _ of r)(c||_!=null)&&m(h,_);n.addChildNode(h)}}writeMap(t,r,n,o,i=!1){if(!t.isMemberSchema())throw new Error(`@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${t.getName(!0)}`);let s=t.getMergedTraits(),a=t.getKeySchema(),l=a.getMergedTraits().xmlName??"key",d=t.getValueSchema(),f=d.getMergedTraits(),m=f.xmlName??"value",h=!!f.sparse,_=!!s.xmlFlattened,[E,T]=this.getXmlnsAttribute(t,o),I=(A,O,G)=>{let z=Ir.XmlNode.of(l,O),[Q,be]=this.getXmlnsAttribute(a,T);be&&z.addAttribute(Q,be),A.addChildNode(z);let ue=Ir.XmlNode.of(m);d.isListSchema()?this.writeList(d,G,ue,T):d.isMapSchema()?this.writeMap(d,G,ue,T,!0):d.isStructSchema()?ue=this.writeStruct(d,G,T):this.writeSimpleInto(d,G,ue,T),A.addChildNode(ue)};if(_){for(let[A,O]of Object.entries(r))if(h||O!=null){let G=Ir.XmlNode.of(s.xmlName??t.getMemberName());I(G,A,O),n.addChildNode(G)}}else{let A;i||(A=Ir.XmlNode.of(s.xmlName??t.getMemberName()),T&&A.addAttribute(E,T),n.addChildNode(A));for(let[O,G]of Object.entries(r))if(h||G!=null){let z=Ir.XmlNode.of("entry");I(z,O,G),(i?n:A).addChildNode(z)}}}writeSimple(t,r){var i;if(r===null)throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value.");let n=le.of(t),o=null;if(r&&typeof r=="object")if(n.isBlobSchema())o=(((i=this.serdeContext)==null?void 0:i.base64Encoder)??gh.toBase64)(r);else if(n.isTimestampSchema()&&r instanceof Date)switch(Yr(n,this.settings)){case 5:o=r.toISOString().replace(".000Z","Z");break;case 6:o=(0,Iw.dateToUtcString)(r);break;case 7:o=String(r.getTime()/1e3);break;default:console.warn("Missing timestamp format, using http date",r),o=(0,Iw.dateToUtcString)(r);break}else{if(n.isBigDecimalSchema()&&r)return r instanceof ft?r.string:String(r);throw n.isMapSchema()||n.isListSchema()?new Error("@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead."):new Error(`@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${n.getName(!0)}`)}if((n.isBooleanSchema()||n.isNumericSchema()||n.isBigIntegerSchema()||n.isBigDecimalSchema())&&(o=String(r)),n.isStringSchema()&&(r===void 0&&n.isIdempotencyToken()?o=(0,ln.v4)():o=String(r)),o===null)throw new Error(`Unhandled schema-value pair ${n.getName(!0)}=${r}`);return o}writeSimpleInto(t,r,n,o){let i=this.writeSimple(t,r),s=le.of(t),a=new Ir.XmlText(i),[c,l]=this.getXmlnsAttribute(s,o);l&&n.addAttribute(c,l),n.addChildNode(a)}getXmlnsAttribute(t,r){let n=t.getMergedTraits(),[o,i]=n.xmlNamespace??[];return i&&i!==r?[o?`xmlns:${o}`:"xmlns",i]:[void 0,void 0]}}});var Nc,Dw=D(()=>{ts();mh();Cw();Nc=class extends fr{settings;constructor(t){super(),this.settings=t}createSerializer(){let t=new Oc(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){let t=new os(this.settings);return t.setSerdeContext(this.serdeContext),t}}});var _h,$B=D(()=>{Nr();We();Ac();Aw();Dw();_h=class extends Hs{codec;serializer;deserializer;mixin=new pn;constructor(t){super(t);let r={timestampFormat:{useTrait:!0,default:5},httpBindings:!0,xmlNamespace:t.xmlNamespace,serviceNamespace:t.defaultNamespace};this.codec=new Nc(r),this.serializer=new zs(this.codec.createSerializer(),r),this.deserializer=new Ws(this.codec.createDeserializer(),r),this.compositeErrorRegistry}getPayloadCodec(){return this.codec}getShapeId(){return"aws.protocols#restXml"}async serializeRequest(t,r,n){let o=await super.serializeRequest(t,r,n),i=le.of(t.input);if(!o.headers["content-type"]){let s=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);s&&(o.headers["content-type"]=s)}return typeof o.body=="string"&&o.headers["content-type"]===this.getDefaultContentType()&&!o.body.startsWith("<?xml ")&&!this.hasUnstructuredPayloadBinding(i)&&(o.body='<?xml version="1.0" encoding="UTF-8"?>'+o.body),o}async deserializeResponse(t,r,n){return super.deserializeResponse(t,r,n)}async handleError(t,r,n,o,i){var _,E,T;let s=yh(n,o)??"Unknown";if(this.mixin.compose(this.compositeErrorRegistry,s,this.options.defaultNamespace),o.Error&&typeof o.Error=="object")for(let I of Object.keys(o.Error))o[I]=o.Error[I],I.toLowerCase()==="message"&&(o.message=o.Error[I]);o.RequestId&&!i.requestId&&(i.requestId=o.RequestId);let{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,o,i),l=le.of(a),d=((_=o.Error)==null?void 0:_.message)??((E=o.Error)==null?void 0:E.Message)??o.message??o.Message??"UnknownError",f=this.compositeErrorRegistry.getErrorCtor(a)??Error,m=new f(d);await this.deserializeHttpMessage(a,r,n,o);let h={};for(let[I,A]of l.structIterator()){let O=A.getMergedTraits().xmlName??I,G=((T=o.Error)==null?void 0:T[O])??o[O];h[I]=this.codec.createDeserializer().readSchema(A,G)}throw this.mixin.decorateServiceException(Object.assign(m,c,{$fault:l.getMergedTraits().error,message:d},h),o)}getDefaultContentType(){return"application/xml"}hasUnstructuredPayloadBinding(t){for(let[,r]of t.structIterator())if(r.getMergedTraits().httpPayload)return!(r.isStructSchema()||r.isMapSchema()||r.isListSchema());return!1}}});var Rw={};Nt(Rw,{AwsEc2QueryProtocol:()=>hh,AwsJson1_0Protocol:()=>uh,AwsJson1_1Protocol:()=>lh,AwsJsonRpcProtocol:()=>ns,AwsQueryProtocol:()=>is,AwsRestJsonProtocol:()=>So,AwsRestXmlProtocol:()=>_h,AwsSmithyRpcV2CborProtocol:()=>oh,JsonCodec:()=>rs,JsonShapeDeserializer:()=>Dc,JsonShapeSerializer:()=>Rc,QueryShapeSerializer:()=>Pc,XmlCodec:()=>Nc,XmlShapeDeserializer:()=>os,XmlShapeSerializer:()=>Oc,_toBool:()=>oB,_toNum:()=>iB,_toStr:()=>nB,awsExpectUnion:()=>EB,loadRestJsonErrorCode:()=>Cc,loadRestXmlErrorCode:()=>yh,parseJsonBody:()=>Ml,parseJsonErrorBody:()=>dB,parseXmlBody:()=>ww,parseXmlErrorBody:()=>NB});var ss=D(()=>{rB();sB();hB();yB();ch();gB();ah();gw();Ew();SB();Ll();DB();Tw();RB();vw();$B();Dw();mh();Cw();Aw()});var HB,hn,MB,kl,$c,Mc,si,Pw,Ow,LB,kB,FB,VB,WB,mn,BB,zB,UB,jB,qB,GB,qfe,KB,YB=D(()=>{HB="required",hn="argv",MB="isSet",kl="booleanEquals",$c="error",Mc="endpoint",si="tree",Pw="PartitionResult",Ow="getAttr",LB={[HB]:!1,type:"string"},kB={[HB]:!0,default:!1,type:"boolean"},FB={ref:"Endpoint"},VB={fn:kl,[hn]:[{ref:"UseFIPS"},!0]},WB={fn:kl,[hn]:[{ref:"UseDualStack"},!0]},mn={},BB={fn:Ow,[hn]:[{ref:Pw},"supportsFIPS"]},zB={ref:Pw},UB={fn:kl,[hn]:[!0,{fn:Ow,[hn]:[zB,"supportsDualStack"]}]},jB=[VB],qB=[WB],GB=[{ref:"Region"}],qfe={version:"1.0",parameters:{Region:LB,UseDualStack:kB,UseFIPS:kB,Endpoint:LB},rules:[{conditions:[{fn:MB,[hn]:[FB]}],rules:[{conditions:jB,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:$c},{conditions:qB,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:$c},{endpoint:{url:FB,properties:mn,headers:mn},type:Mc}],type:si},{conditions:[{fn:MB,[hn]:GB}],rules:[{conditions:[{fn:"aws.partition",[hn]:GB,assign:Pw}],rules:[{conditions:[VB,WB],rules:[{conditions:[{fn:kl,[hn]:[!0,BB]},UB],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:mn,headers:mn},type:Mc}],type:si},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:$c}],type:si},{conditions:jB,rules:[{conditions:[{fn:kl,[hn]:[BB,!0]}],rules:[{conditions:[{fn:"stringEquals",[hn]:[{fn:Ow,[hn]:[zB,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:mn,headers:mn},type:Mc},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:mn,headers:mn},type:Mc}],type:si},{error:"FIPS is enabled but this partition does not support FIPS",type:$c}],type:si},{conditions:qB,rules:[{conditions:[UB],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:mn,headers:mn},type:Mc}],type:si},{error:"DualStack is enabled but this partition does not support DualStack",type:$c}],type:si},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:mn,headers:mn},type:Mc}],type:si}],type:si},{error:"Invalid Configuration: Missing Region",type:$c}]},KB=qfe});var QB,Lc,Gfe,XB,JB=D(()=>{QB=C(Ys()),Lc=C(ki());YB();Gfe=new Lc.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),XB=(e,t={})=>Gfe.get(e,()=>(0,Lc.resolveEndpoint)(KB,{endpointParams:e,logger:t.logger}));Lc.customEndpointFunctions.aws=QB.awsEndpointFunctions});var ZB,Jt,Eh=D(()=>{ZB=C(Te()),Jt=class e extends ZB.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}});var Fl,Bl,Ul,jl,ql,Gl,Hl,Vl,Wl,zl,Kl,Nw=D(()=>{Eh();Fl=class e extends Jt{name="AccessDeniedException";$fault="client";error;reason;error_description;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},Bl=class e extends Jt{name="AuthorizationPendingException";$fault="client";error;error_description;constructor(t){super({name:"AuthorizationPendingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Ul=class e extends Jt{name="ExpiredTokenException";$fault="client";error;error_description;constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},jl=class e extends Jt{name="InternalServerException";$fault="server";error;error_description;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},ql=class e extends Jt{name="InvalidClientException";$fault="client";error;error_description;constructor(t){super({name:"InvalidClientException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Gl=class e extends Jt{name="InvalidGrantException";$fault="client";error;error_description;constructor(t){super({name:"InvalidGrantException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Hl=class e extends Jt{name="InvalidRequestException";$fault="client";error;reason;error_description;constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},Vl=class e extends Jt{name="InvalidScopeException";$fault="client";error;error_description;constructor(t){super({name:"InvalidScopeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Wl=class e extends Jt{name="SlowDownException";$fault="client";error;error_description;constructor(t){super({name:"SlowDownException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},zl=class e extends Jt{name="UnauthorizedClientException";$fault="client";error;error_description;constructor(t){super({name:"UnauthorizedClientException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Kl=class e extends Jt{name="UnsupportedGrantTypeException";$fault="client";error;error_description;constructor(t){super({name:"UnsupportedGrantTypeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}}});var Hfe,Vfe,Wfe,zfe,Kfe,Yfe,Qfe,Xfe,Jfe,Zfe,epe,tpe,rpe,npe,ope,ipe,spe,ape,cpe,upe,bo,lpe,dpe,fpe,ppe,mpe,At,hpe,Un,ype,gpe,jn,_pe,eU,tU,Epe,rU,Spe,bpe,xpe,Lt,nU,oU,yn,iU,sU,aU,cU,uU,lU,dU,fU,pU,mU,hU,$w,vpe,Tpe,wpe,Ape,yU,gU,_U,Mw,Sh=D(()=>{We();Nw();Eh();Hfe="AccessDeniedException",Vfe="AuthorizationPendingException",Wfe="AccessToken",zfe="ClientSecret",Kfe="CreateToken",Yfe="CreateTokenRequest",Qfe="CreateTokenResponse",Xfe="CodeVerifier",Jfe="ExpiredTokenException",Zfe="InvalidClientException",epe="InvalidGrantException",tpe="InvalidRequestException",rpe="InternalServerException",npe="InvalidScopeException",ope="IdToken",ipe="RefreshToken",spe="SlowDownException",ape="UnauthorizedClientException",cpe="UnsupportedGrantTypeException",upe="accessToken",bo="client",lpe="clientId",dpe="clientSecret",fpe="codeVerifier",ppe="code",mpe="deviceCode",At="error",hpe="expiresIn",Un="error_description",ype="grantType",gpe="http",jn="httpError",_pe="idToken",eU="reason",tU="refreshToken",Epe="redirectUri",rU="smithy.ts.sdk.synthetic.com.amazonaws.ssooidc",Spe="scope",bpe="server",xpe="tokenType",Lt="com.amazonaws.ssooidc",nU=bt.for(rU),oU=[-3,rU,"SSOOIDCServiceException",0,[],[]];nU.registerError(oU,Jt);yn=bt.for(Lt),iU=[-3,Lt,Hfe,{[At]:bo,[jn]:400},[At,eU,Un],[0,0,0]];yn.registerError(iU,Fl);sU=[-3,Lt,Vfe,{[At]:bo,[jn]:400},[At,Un],[0,0]];yn.registerError(sU,Bl);aU=[-3,Lt,Jfe,{[At]:bo,[jn]:400},[At,Un],[0,0]];yn.registerError(aU,Ul);cU=[-3,Lt,rpe,{[At]:bpe,[jn]:500},[At,Un],[0,0]];yn.registerError(cU,jl);uU=[-3,Lt,Zfe,{[At]:bo,[jn]:401},[At,Un],[0,0]];yn.registerError(uU,ql);lU=[-3,Lt,epe,{[At]:bo,[jn]:400},[At,Un],[0,0]];yn.registerError(lU,Gl);dU=[-3,Lt,tpe,{[At]:bo,[jn]:400},[At,eU,Un],[0,0,0]];yn.registerError(dU,Hl);fU=[-3,Lt,npe,{[At]:bo,[jn]:400},[At,Un],[0,0]];yn.registerError(fU,Vl);pU=[-3,Lt,spe,{[At]:bo,[jn]:400},[At,Un],[0,0]];yn.registerError(pU,Wl);mU=[-3,Lt,ape,{[At]:bo,[jn]:400},[At,Un],[0,0]];yn.registerError(mU,zl);hU=[-3,Lt,cpe,{[At]:bo,[jn]:400},[At,Un],[0,0]];yn.registerError(hU,Kl);$w=[nU,yn],vpe=[0,Lt,Wfe,8,0],Tpe=[0,Lt,zfe,8,0],wpe=[0,Lt,Xfe,8,0],Ape=[0,Lt,ope,8,0],yU=[0,Lt,ipe,8,0],gU=[3,Lt,Yfe,0,[lpe,dpe,ype,mpe,ppe,tU,Spe,Epe,fpe],[0,[()=>Tpe,0],0,0,0,[()=>yU,0],64,0,[()=>wpe,0]],3],_U=[3,Lt,Qfe,0,[upe,xpe,hpe,tU,_pe],[[()=>vpe,0],0,1,[()=>yU,0],[()=>Ape,0]]],Mw=[9,Lt,Kfe,{[gpe]:["POST","/token",200]},()=>gU,()=>_U]});var EU,SU,bh,xh,bU,xU=D(()=>{Xt();ss();ar();EU=C(Te()),SU=C(no()),bh=C(jt()),xh=C(Kt());zT();JB();Sh();bU=e=>({apiVersion:"2019-06-10",base64Decoder:(e==null?void 0:e.base64Decoder)??bh.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??bh.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??XB,extensions:(e==null?void 0:e.extensions)??[],httpAuthSchemeProvider:(e==null?void 0:e.httpAuthSchemeProvider)??xF,httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Qt},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Qr}],logger:(e==null?void 0:e.logger)??new EU.NoOpLogger,protocol:(e==null?void 0:e.protocol)??So,protocolSettings:(e==null?void 0:e.protocolSettings)??{defaultNamespace:"com.amazonaws.ssooidc",errorTypeRegistries:$w,version:"2019-06-10",serviceTarget:"AWSSSOOIDCService"},serviceId:(e==null?void 0:e.serviceId)??"SSO OIDC",urlParser:(e==null?void 0:e.urlParser)??SU.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??xh.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??xh.toUtf8})});var vh,cs,vU,Th,as,wh,Ah,TU,wU,AU,IU,CU=D(()=>{Dl();Yt();Xt();vh=C(bc()),cs=C($r()),vU=C(xc()),Th=C(Mn()),as=C(co()),wh=C(Oi()),Ah=C(Te()),TU=C(vc()),wU=C(Tc()),AU=C(Ui());xU();IU=e=>{(0,Ah.emitWarningIfUnsupportedVersion)(process.version);let t=(0,wU.resolveDefaultsModeConfig)(e),r=()=>t().then(Ah.loadConfigsForDefaultMode),n=bU(e);so(process.version);let o={profile:e==null?void 0:e.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:(e==null?void 0:e.authSchemePreference)??(0,as.loadConfig)(uo,o),bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??TU.calculateBodyLength,defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,vh.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:Qi.version}),maxAttempts:(e==null?void 0:e.maxAttempts)??(0,as.loadConfig)(Th.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:(e==null?void 0:e.region)??(0,as.loadConfig)(cs.NODE_REGION_CONFIG_OPTIONS,{...cs.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:wh.NodeHttpHandler.create((e==null?void 0:e.requestHandler)??r),retryMode:(e==null?void 0:e.retryMode)??(0,as.loadConfig)({...Th.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||AU.DEFAULT_RETRY_MODE},e),sha256:(e==null?void 0:e.sha256)??vU.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??wh.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,as.loadConfig)(cs.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,as.loadConfig)(cs.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:(e==null?void 0:e.userAgentAppId)??(0,as.loadConfig)(vh.NODE_APP_ID_CONFIG_OPTIONS,o)}}});var RU=b(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.warning=void 0;kc.stsRegionDefaultResolver=Cpe;var DU=$r(),Ipe=co();function Cpe(e={}){return(0,Ipe.loadConfig)({...DU.NODE_REGION_CONFIG_OPTIONS,async default(){return kc.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."),"us-east-1"}},{...DU.NODE_REGION_CONFIG_FILE_OPTIONS,...e})}kc.warning={silence:!1}});var oa=b(gn=>{"use strict";var Ih=RU(),Yl=$r(),Dpe=e=>({setRegion(t){e.region=t},region(){return e.region}}),Rpe=e=>({region:e.region()});gn.NODE_REGION_CONFIG_FILE_OPTIONS=Yl.NODE_REGION_CONFIG_FILE_OPTIONS;gn.NODE_REGION_CONFIG_OPTIONS=Yl.NODE_REGION_CONFIG_OPTIONS;gn.REGION_ENV_NAME=Yl.REGION_ENV_NAME;gn.REGION_INI_NAME=Yl.REGION_INI_NAME;gn.resolveRegionConfig=Yl.resolveRegionConfig;gn.getAwsRegionExtensionConfiguration=Dpe;gn.resolveAwsRegionExtensionConfiguration=Rpe;Object.prototype.hasOwnProperty.call(Ih,"__proto__")&&!Object.prototype.hasOwnProperty.call(gn,"__proto__")&&Object.defineProperty(gn,"__proto__",{enumerable:!0,value:Ih.__proto__});Object.keys(Ih).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(gn,e)&&(gn[e]=Ih[e])})});var PU,OU,NU=D(()=>{PU=e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let i=t.findIndex(s=>s.schemeId===o.schemeId);i===-1?t.push(o):t.splice(i,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},OU=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})});var Ch,Dh,Rh,$U,MU=D(()=>{Ch=C(oa()),Dh=C(nt()),Rh=C(Te());NU();$U=(e,t)=>{let r=Object.assign((0,Ch.getAwsRegionExtensionConfiguration)(e),(0,Rh.getDefaultExtensionConfiguration)(e),(0,Dh.getHttpHandlerExtensionConfiguration)(e),PU(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,Ch.resolveAwsRegionExtensionConfiguration)(r),(0,Rh.resolveDefaultRuntimeConfig)(r),(0,Dh.resolveHttpHandlerRuntimeConfig)(r),OU(r))}});var Ph,LU,kU,Oh,FU,BU,UU,Nh,Lw,Ql,kw=D(()=>{Ph=C(Ua()),LU=C(ja()),kU=C(Ga()),Oh=C(Qs()),FU=C($r());ar();We();BU=C(rc()),UU=C($n()),Nh=C(Mn()),Lw=C(Te());zT();KT();CU();MU();Ql=class extends Lw.Client{config;constructor(...[t]){let r=IU(t||{});super(r),this.initConfig=r;let n=TF(r),o=(0,Oh.resolveUserAgentConfig)(n),i=(0,Nh.resolveRetryConfig)(o),s=(0,FU.resolveRegionConfig)(i),a=(0,Ph.resolveHostHeaderConfig)(s),c=(0,UU.resolveEndpointConfig)(a),l=vF(c),d=$U(l,(t==null?void 0:t.extensions)||[]);this.config=d,this.middlewareStack.use(Vo(this.config)),this.middlewareStack.use((0,Oh.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,Nh.getRetryPlugin)(this.config)),this.middlewareStack.use((0,BU.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,Ph.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,LU.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,kU.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:bF,identityProviderConfigProvider:async f=>new Pn({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Uo(this.config))}destroy(){super.destroy()}}});var jU,Fw,Xl,Bw=D(()=>{jU=C($n()),Fw=C(Te());KT();Sh();Xl=class extends Fw.Command.classBuilder().ep(wF).m(function(t,r,n,o){return[(0,jU.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").sc(Mw).build(){}});var qU,Ppe,$h,GU=D(()=>{qU=C(Te());Bw();kw();Ppe={CreateTokenCommand:Xl},$h=class extends Ql{};(0,qU.createAggregatedClient)(Ppe,$h)});var HU=D(()=>{Bw()});var Ope,Npe,VU=D(()=>{Ope={KMS_ACCESS_DENIED:"KMS_AccessDeniedException"},Npe={KMS_DISABLED_KEY:"KMS_DisabledException",KMS_INVALID_KEY_USAGE:"KMS_InvalidKeyUsageException",KMS_INVALID_STATE:"KMS_InvalidStateException",KMS_KEY_NOT_FOUND:"KMS_NotFoundException"}});var WU=D(()=>{});var Uw={};Nt(Uw,{$Command:()=>Fw.Command,AccessDeniedException:()=>Fl,AccessDeniedException$:()=>iU,AccessDeniedExceptionReason:()=>Ope,AuthorizationPendingException:()=>Bl,AuthorizationPendingException$:()=>sU,CreateToken$:()=>Mw,CreateTokenCommand:()=>Xl,CreateTokenRequest$:()=>gU,CreateTokenResponse$:()=>_U,ExpiredTokenException:()=>Ul,ExpiredTokenException$:()=>aU,InternalServerException:()=>jl,InternalServerException$:()=>cU,InvalidClientException:()=>ql,InvalidClientException$:()=>uU,InvalidGrantException:()=>Gl,InvalidGrantException$:()=>lU,InvalidRequestException:()=>Hl,InvalidRequestException$:()=>dU,InvalidRequestExceptionReason:()=>Npe,InvalidScopeException:()=>Vl,InvalidScopeException$:()=>fU,SSOOIDC:()=>$h,SSOOIDCClient:()=>Ql,SSOOIDCServiceException:()=>Jt,SSOOIDCServiceException$:()=>oU,SlowDownException:()=>Wl,SlowDownException$:()=>pU,UnauthorizedClientException:()=>zl,UnauthorizedClientException$:()=>mU,UnsupportedGrantTypeException:()=>Kl,UnsupportedGrantTypeException$:()=>hU,__Client:()=>Lw.Client,errorTypeRegistries:()=>$w});var jw=D(()=>{kw();GU();HU();Sh();VU();Nw();WU();Eh()});var QU=b(Zl=>{"use strict";var $pe=(Yt(),ie(Nn)),Mpe=(Xt(),ie(ml)),Zr=lr(),Jl=ao(),Lpe=require("node:fs"),kpe=({logger:e,signingName:t}={})=>async()=>{var o;if((o=e==null?void 0:e.debug)==null||o.call(e,"@aws-sdk/token-providers - fromEnvSigningName"),!t)throw new Zr.TokenProviderError("Please pass 'signingName' to compute environment variable key",{logger:e});let r=Mpe.getBearerTokenEnvKey(t);if(!(r in process.env))throw new Zr.TokenProviderError(`Token not present in '${r}' environment variable`,{logger:e});let n={token:process.env[r]};return $pe.setTokenFeature(n,"BEARER_SERVICE_ENV_VARS","3"),n},Fpe=300*1e3,qw="To refresh this SSO session run 'aws sso login' with the corresponding profile.",Bpe=async(e,t={},r)=>{var s;let{SSOOIDCClient:n}=await Promise.resolve().then(()=>(jw(),Uw)),o=a=>{var c,l;return((c=t.clientConfig)==null?void 0:c[a])??((l=t.parentClientConfig)==null?void 0:l[a])??(r==null?void 0:r[a])};return new n(Object.assign({},t.clientConfig??{},{region:e??((s=t.clientConfig)==null?void 0:s.region),logger:o("logger"),userAgentAppId:o("userAgentAppId")}))},Upe=async(e,t,r={},n)=>{let{CreateTokenCommand:o}=await Promise.resolve().then(()=>(jw(),Uw));return(await Bpe(t,r,n)).send(new o({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))},zU=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new Zr.TokenProviderError(`Token is expired. ${qw}`,!1)},ia=(e,t,r=!1)=>{if(typeof t>"u")throw new Zr.TokenProviderError(`Value not present for '${e}' in SSO Token${r?". Cannot refresh":""}. ${qw}`,!1)},{writeFile:jpe}=Lpe.promises,qpe=(e,t)=>{let r=Jl.getSSOTokenFilepath(e),n=JSON.stringify(t,null,2);return jpe(r,n)},KU=new Date(0),YU=(e={})=>async({callerClientConfig:t}={})=>{var h;(h=e.logger)==null||h.debug("@aws-sdk/token-providers - fromSso");let r=await Jl.parseKnownFiles(e),n=Jl.getProfileName({profile:e.profile??(t==null?void 0:t.profile)}),o=r[n];if(o){if(!o.sso_session)throw new Zr.TokenProviderError(`Profile '${n}' is missing required property 'sso_session'.`)}else throw new Zr.TokenProviderError(`Profile '${n}' could not be found in shared credentials file.`,!1);let i=o.sso_session,a=(await Jl.loadSsoSessionData(e))[i];if(!a)throw new Zr.TokenProviderError(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(let _ of["sso_start_url","sso_region"])if(!a[_])throw new Zr.TokenProviderError(`Sso session '${i}' is missing required property '${_}'.`,!1);a.sso_start_url;let c=a.sso_region,l;try{l=await Jl.getSSOTokenFromFile(i)}catch{throw new Zr.TokenProviderError(`The SSO session token associated with profile=${n} was not found or is invalid. ${qw}`,!1)}ia("accessToken",l.accessToken),ia("expiresAt",l.expiresAt);let{accessToken:d,expiresAt:f}=l,m={token:d,expiration:new Date(f)};if(m.expiration.getTime()-Date.now()>Fpe)return m;if(Date.now()-KU.getTime()<30*1e3)return zU(m),m;ia("clientId",l.clientId,!0),ia("clientSecret",l.clientSecret,!0),ia("refreshToken",l.refreshToken,!0);try{KU.setTime(Date.now());let _=await Upe(l,c,e,t);ia("accessToken",_.accessToken),ia("expiresIn",_.expiresIn);let E=new Date(Date.now()+_.expiresIn*1e3);try{await qpe(i,{...l,accessToken:_.accessToken,expiresAt:E.toISOString(),refreshToken:_.refreshToken})}catch{}return{token:_.accessToken,expiration:E}}catch{return zU(m),m}},Gpe=({token:e,logger:t})=>async()=>{if(t==null||t.debug("@aws-sdk/token-providers - fromStatic"),!e||!e.token)throw new Zr.TokenProviderError("Please pass a valid token to fromStatic",!1);return e},Hpe=(e={})=>Zr.memoize(Zr.chain(YU(e),async()=>{throw new Zr.TokenProviderError("Could not load token from any providers",!1)}),t=>t.expiration!==void 0&&t.expiration.getTime()-Date.now()<3e5,t=>t.expiration!==void 0);Zl.fromEnvSigningName=kpe;Zl.fromSso=YU;Zl.fromStatic=Gpe;Zl.nodeProvider=Hpe});function Vpe(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Wpe(e){return{schemeId:"smithy.api#noAuth"}}var ed,XU,JU,ZU,Gw=D(()=>{Xt();ed=C(ir()),XU=async(e,t,r)=>({operation:(0,ed.getSmithyContext)(t).operation,region:await(0,ed.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});JU=e=>{let t=[];switch(e.operation){case"GetRoleCredentials":{t.push(Wpe(e));break}default:t.push(Vpe(e))}return t},ZU=e=>{let t=Ln(e);return Object.assign(t,{authSchemePreference:(0,ed.normalizeProvider)(e.authSchemePreference??[])})}});var e2,t2,Hw=D(()=>{e2=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}),t2={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var d2,En,r2,td,Fc,Bc,ai,Vw,Ww,n2,o2,i2,f2,p2,_n,s2,m2,a2,c2,u2,l2,zpe,h2,y2=D(()=>{d2="required",En="argv",r2="isSet",td="booleanEquals",Fc="error",Bc="endpoint",ai="tree",Vw="PartitionResult",Ww="getAttr",n2={[d2]:!1,type:"string"},o2={[d2]:!0,default:!1,type:"boolean"},i2={ref:"Endpoint"},f2={fn:td,[En]:[{ref:"UseFIPS"},!0]},p2={fn:td,[En]:[{ref:"UseDualStack"},!0]},_n={},s2={fn:Ww,[En]:[{ref:Vw},"supportsFIPS"]},m2={ref:Vw},a2={fn:td,[En]:[!0,{fn:Ww,[En]:[m2,"supportsDualStack"]}]},c2=[f2],u2=[p2],l2=[{ref:"Region"}],zpe={version:"1.0",parameters:{Region:n2,UseDualStack:o2,UseFIPS:o2,Endpoint:n2},rules:[{conditions:[{fn:r2,[En]:[i2]}],rules:[{conditions:c2,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Fc},{conditions:u2,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Fc},{endpoint:{url:i2,properties:_n,headers:_n},type:Bc}],type:ai},{conditions:[{fn:r2,[En]:l2}],rules:[{conditions:[{fn:"aws.partition",[En]:l2,assign:Vw}],rules:[{conditions:[f2,p2],rules:[{conditions:[{fn:td,[En]:[!0,s2]},a2],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_n,headers:_n},type:Bc}],type:ai},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Fc}],type:ai},{conditions:c2,rules:[{conditions:[{fn:td,[En]:[s2,!0]}],rules:[{conditions:[{fn:"stringEquals",[En]:[{fn:Ww,[En]:[m2,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:_n,headers:_n},type:Bc},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:_n,headers:_n},type:Bc}],type:ai},{error:"FIPS is enabled but this partition does not support FIPS",type:Fc}],type:ai},{conditions:u2,rules:[{conditions:[a2],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_n,headers:_n},type:Bc}],type:ai},{error:"DualStack is enabled but this partition does not support DualStack",type:Fc}],type:ai},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:_n,headers:_n},type:Bc}],type:ai}],type:ai},{error:"Invalid Configuration: Missing Region",type:Fc}]},h2=zpe});var g2,Uc,Kpe,_2,E2=D(()=>{g2=C(Ys()),Uc=C(ki());y2();Kpe=new Uc.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),_2=(e,t={})=>Kpe.get(e,()=>(0,Uc.resolveEndpoint)(h2,{endpointParams:e,logger:t.logger}));Uc.customEndpointFunctions.aws=g2.awsEndpointFunctions});var S2,qn,Mh=D(()=>{S2=C(Te()),qn=class e extends S2.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}});var rd,nd,od,id,zw=D(()=>{Mh();rd=class e extends qn{name="InvalidRequestException";$fault="client";constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},nd=class e extends qn{name="ResourceNotFoundException";$fault="client";constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},od=class e extends qn{name="TooManyRequestsException";$fault="client";constructor(t){super({name:"TooManyRequestsException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},id=class e extends qn{name="UnauthorizedException";$fault="client";constructor(t){super({name:"UnauthorizedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}}});var Ype,Qpe,Xpe,Jpe,Zpe,eme,tme,rme,nme,ome,ime,sme,ame,cme,ume,Lh,kh,lme,dme,Fh,fme,b2,Bh,pme,mme,hme,x2,yme,gme,_me,Sn,v2,T2,sd,w2,A2,I2,C2,Kw,Eme,Sme,bme,D2,R2,P2,Yw,Uh=D(()=>{We();zw();Mh();Ype="AccessTokenType",Qpe="GetRoleCredentials",Xpe="GetRoleCredentialsRequest",Jpe="GetRoleCredentialsResponse",Zpe="InvalidRequestException",eme="RoleCredentials",tme="ResourceNotFoundException",rme="SecretAccessKeyType",nme="SessionTokenType",ome="TooManyRequestsException",ime="UnauthorizedException",sme="accountId",ame="accessKeyId",cme="accessToken",ume="account_id",Lh="client",kh="error",lme="expiration",dme="http",Fh="httpError",fme="httpHeader",b2="httpQuery",Bh="message",pme="roleCredentials",mme="roleName",hme="role_name",x2="smithy.ts.sdk.synthetic.com.amazonaws.sso",yme="secretAccessKey",gme="sessionToken",_me="x-amz-sso_bearer_token",Sn="com.amazonaws.sso",v2=bt.for(x2),T2=[-3,x2,"SSOServiceException",0,[],[]];v2.registerError(T2,qn);sd=bt.for(Sn),w2=[-3,Sn,Zpe,{[kh]:Lh,[Fh]:400},[Bh],[0]];sd.registerError(w2,rd);A2=[-3,Sn,tme,{[kh]:Lh,[Fh]:404},[Bh],[0]];sd.registerError(A2,nd);I2=[-3,Sn,ome,{[kh]:Lh,[Fh]:429},[Bh],[0]];sd.registerError(I2,od);C2=[-3,Sn,ime,{[kh]:Lh,[Fh]:401},[Bh],[0]];sd.registerError(C2,id);Kw=[v2,sd],Eme=[0,Sn,Ype,8,0],Sme=[0,Sn,rme,8,0],bme=[0,Sn,nme,8,0],D2=[3,Sn,Xpe,0,[mme,sme,cme],[[0,{[b2]:hme}],[0,{[b2]:ume}],[()=>Eme,{[fme]:_me}]],3],R2=[3,Sn,Jpe,0,[pme],[[()=>P2,0]]],P2=[3,Sn,eme,0,[ame,yme,gme,lme],[0,[()=>Sme,0],[()=>bme,0],1]],Yw=[9,Sn,Qpe,{[dme]:["GET","/federation/credentials",200]},()=>D2,()=>R2]});var O2,N2,jh,qh,$2,M2=D(()=>{Xt();ss();ar();O2=C(Te()),N2=C(no()),jh=C(jt()),qh=C(Kt());Gw();E2();Uh();$2=e=>({apiVersion:"2019-06-10",base64Decoder:(e==null?void 0:e.base64Decoder)??jh.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??jh.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??_2,extensions:(e==null?void 0:e.extensions)??[],httpAuthSchemeProvider:(e==null?void 0:e.httpAuthSchemeProvider)??JU,httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Qt},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Qr}],logger:(e==null?void 0:e.logger)??new O2.NoOpLogger,protocol:(e==null?void 0:e.protocol)??So,protocolSettings:(e==null?void 0:e.protocolSettings)??{defaultNamespace:"com.amazonaws.sso",errorTypeRegistries:Kw,version:"2019-06-10",serviceTarget:"SWBPortalService"},serviceId:(e==null?void 0:e.serviceId)??"SSO",urlParser:(e==null?void 0:e.urlParser)??N2.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??qh.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??qh.toUtf8})});var Gh,ls,L2,Hh,us,Vh,Wh,k2,F2,B2,U2,j2=D(()=>{Dl();Yt();Xt();Gh=C(bc()),ls=C($r()),L2=C(xc()),Hh=C(Mn()),us=C(co()),Vh=C(Oi()),Wh=C(Te()),k2=C(vc()),F2=C(Tc()),B2=C(Ui());M2();U2=e=>{(0,Wh.emitWarningIfUnsupportedVersion)(process.version);let t=(0,F2.resolveDefaultsModeConfig)(e),r=()=>t().then(Wh.loadConfigsForDefaultMode),n=$2(e);so(process.version);let o={profile:e==null?void 0:e.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:(e==null?void 0:e.authSchemePreference)??(0,us.loadConfig)(uo,o),bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??k2.calculateBodyLength,defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,Gh.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:Qi.version}),maxAttempts:(e==null?void 0:e.maxAttempts)??(0,us.loadConfig)(Hh.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:(e==null?void 0:e.region)??(0,us.loadConfig)(ls.NODE_REGION_CONFIG_OPTIONS,{...ls.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:Vh.NodeHttpHandler.create((e==null?void 0:e.requestHandler)??r),retryMode:(e==null?void 0:e.retryMode)??(0,us.loadConfig)({...Hh.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||B2.DEFAULT_RETRY_MODE},e),sha256:(e==null?void 0:e.sha256)??L2.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??Vh.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,us.loadConfig)(ls.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,us.loadConfig)(ls.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:(e==null?void 0:e.userAgentAppId)??(0,us.loadConfig)(Gh.NODE_APP_ID_CONFIG_OPTIONS,o)}}});var q2,G2,H2=D(()=>{q2=e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let i=t.findIndex(s=>s.schemeId===o.schemeId);i===-1?t.push(o):t.splice(i,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},G2=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})});var zh,Kh,Yh,V2,W2=D(()=>{zh=C(oa()),Kh=C(nt()),Yh=C(Te());H2();V2=(e,t)=>{let r=Object.assign((0,zh.getAwsRegionExtensionConfiguration)(e),(0,Yh.getDefaultExtensionConfiguration)(e),(0,Kh.getHttpHandlerExtensionConfiguration)(e),q2(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,zh.resolveAwsRegionExtensionConfiguration)(r),(0,Yh.resolveDefaultRuntimeConfig)(r),(0,Kh.resolveHttpHandlerRuntimeConfig)(r),G2(r))}});var Qh,z2,K2,Xh,Y2,Q2,X2,Jh,Qw,ad,Xw=D(()=>{Qh=C(Ua()),z2=C(ja()),K2=C(Ga()),Xh=C(Qs()),Y2=C($r());ar();We();Q2=C(rc()),X2=C($n()),Jh=C(Mn()),Qw=C(Te());Gw();Hw();j2();W2();ad=class extends Qw.Client{config;constructor(...[t]){let r=U2(t||{});super(r),this.initConfig=r;let n=e2(r),o=(0,Xh.resolveUserAgentConfig)(n),i=(0,Jh.resolveRetryConfig)(o),s=(0,Y2.resolveRegionConfig)(i),a=(0,Qh.resolveHostHeaderConfig)(s),c=(0,X2.resolveEndpointConfig)(a),l=ZU(c),d=V2(l,(t==null?void 0:t.extensions)||[]);this.config=d,this.middlewareStack.use(Vo(this.config)),this.middlewareStack.use((0,Xh.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,Jh.getRetryPlugin)(this.config)),this.middlewareStack.use((0,Q2.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,Qh.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,z2.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,K2.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:XU,identityProviderConfigProvider:async f=>new Pn({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Uo(this.config))}destroy(){super.destroy()}}});var J2,Jw,cd,Zw=D(()=>{J2=C($n()),Jw=C(Te());Hw();Uh();cd=class extends Jw.Command.classBuilder().ep(t2).m(function(t,r,n,o){return[(0,J2.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").sc(Yw).build(){}});var Z2,xme,Zh,ej=D(()=>{Z2=C(Te());Zw();Xw();xme={GetRoleCredentialsCommand:cd},Zh=class extends ad{};(0,Z2.createAggregatedClient)(xme,Zh)});var tj=D(()=>{Zw()});var rj=D(()=>{});var nj={};Nt(nj,{$Command:()=>Jw.Command,GetRoleCredentials$:()=>Yw,GetRoleCredentialsCommand:()=>cd,GetRoleCredentialsRequest$:()=>D2,GetRoleCredentialsResponse$:()=>R2,InvalidRequestException:()=>rd,InvalidRequestException$:()=>w2,ResourceNotFoundException:()=>nd,ResourceNotFoundException$:()=>A2,RoleCredentials$:()=>P2,SSO:()=>Zh,SSOClient:()=>ad,SSOServiceException:()=>qn,SSOServiceException$:()=>T2,TooManyRequestsException:()=>od,TooManyRequestsException$:()=>I2,UnauthorizedException:()=>id,UnauthorizedException$:()=>C2,__Client:()=>Qw.Client,errorTypeRegistries:()=>Kw});var oj=D(()=>{Xw();ej();tj();Uh();zw();rj();Mh()});var sj=b(eA=>{"use strict";var ij=(oj(),ie(nj));eA.GetRoleCredentialsCommand=ij.GetRoleCredentialsCommand;eA.SSOClient=ij.SSOClient});var tA=b(ty=>{"use strict";var Gn=lr(),ey=ao(),aj=(Yt(),ie(Nn)),vme=QU(),uj=e=>e&&(typeof e.sso_start_url=="string"||typeof e.sso_account_id=="string"||typeof e.sso_session=="string"||typeof e.sso_region=="string"||typeof e.sso_role_name=="string"),ud=!1,cj=async({ssoStartUrl:e,ssoSession:t,ssoAccountId:r,ssoRegion:n,ssoRoleName:o,ssoClient:i,clientConfig:s,parentClientConfig:a,callerClientConfig:c,profile:l,filepath:d,configFilepath:f,ignoreCache:m,logger:h})=>{let _,E="To refresh this SSO session run aws sso login with the corresponding profile.";if(t)try{let _e=await vme.fromSso({profile:l,filepath:d,configFilepath:f,ignoreCache:m})();_={accessToken:_e.token,expiresAt:new Date(_e.expiration).toISOString()}}catch(_e){throw new Gn.CredentialsProviderError(_e.message,{tryNextLink:ud,logger:h})}else try{_=await ey.getSSOTokenFromFile(e)}catch{throw new Gn.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${E}`,{tryNextLink:ud,logger:h})}if(new Date(_.expiresAt).getTime()-Date.now()<=0)throw new Gn.CredentialsProviderError(`The SSO session associated with this profile has expired. ${E}`,{tryNextLink:ud,logger:h});let{accessToken:T}=_,{SSOClient:I,GetRoleCredentialsCommand:A}=await Promise.resolve().then(function(){return sj()}),O=i||new I(Object.assign({},s??{},{logger:(s==null?void 0:s.logger)??(c==null?void 0:c.logger)??(a==null?void 0:a.logger),region:(s==null?void 0:s.region)??n,userAgentAppId:(s==null?void 0:s.userAgentAppId)??(c==null?void 0:c.userAgentAppId)??(a==null?void 0:a.userAgentAppId)})),G;try{G=await O.send(new A({accountId:r,roleName:o,accessToken:T}))}catch(_e){throw new Gn.CredentialsProviderError(_e,{tryNextLink:ud,logger:h})}let{roleCredentials:{accessKeyId:z,secretAccessKey:Q,sessionToken:be,expiration:ue,credentialScope:q,accountId:Z}={}}=G;if(!z||!Q||!be||!ue)throw new Gn.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:ud,logger:h});let ee={accessKeyId:z,secretAccessKey:Q,sessionToken:be,expiration:new Date(ue),...q&&{credentialScope:q},...Z&&{accountId:Z}};return t?aj.setCredentialFeature(ee,"CREDENTIALS_SSO","s"):aj.setCredentialFeature(ee,"CREDENTIALS_SSO_LEGACY","u"),ee},lj=(e,t)=>{let{sso_start_url:r,sso_account_id:n,sso_region:o,sso_role_name:i}=e;if(!r||!n||!o||!i)throw new Gn.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}
53
+ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:t});return e},Tme=(e={})=>async({callerClientConfig:t}={})=>{var l;(l=e.logger)==null||l.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:o,ssoRoleName:i,ssoSession:s}=e,{ssoClient:a}=e,c=ey.getProfileName({profile:e.profile??(t==null?void 0:t.profile)});if(!r&&!n&&!o&&!i&&!s){let f=(await ey.parseKnownFiles(e))[c];if(!f)throw new Gn.CredentialsProviderError(`Profile ${c} was not found.`,{logger:e.logger});if(!uj(f))throw new Gn.CredentialsProviderError(`Profile ${c} is not configured with SSO credentials.`,{logger:e.logger});if(f!=null&&f.sso_session){let A=(await ey.loadSsoSessionData(e))[f.sso_session],O=` configurations in profile ${c} and sso-session ${f.sso_session}`;if(o&&o!==A.sso_region)throw new Gn.CredentialsProviderError("Conflicting SSO region"+O,{tryNextLink:!1,logger:e.logger});if(r&&r!==A.sso_start_url)throw new Gn.CredentialsProviderError("Conflicting SSO start_url"+O,{tryNextLink:!1,logger:e.logger});f.sso_region=A.sso_region,f.sso_start_url=A.sso_start_url}let{sso_start_url:m,sso_account_id:h,sso_region:_,sso_role_name:E,sso_session:T}=lj(f,e.logger);return cj({ssoStartUrl:m,ssoSession:T,ssoAccountId:h,ssoRegion:_,ssoRoleName:E,ssoClient:a,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:c,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}else{if(!r||!n||!o||!i)throw new Gn.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});return cj({ssoStartUrl:r,ssoSession:s,ssoAccountId:n,ssoRegion:o,ssoRoleName:i,ssoClient:a,clientConfig:e.clientConfig,parentClientConfig:e.parentClientConfig,callerClientConfig:e.callerClientConfig,profile:c,filepath:e.filepath,configFilepath:e.configFilepath,ignoreCache:e.ignoreCache,logger:e.logger})}};ty.fromSSO=Tme;ty.isSsoProfile=uj;ty.validateSsoProfile=lj});function wme(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Ame(e){return{schemeId:"smithy.api#noAuth"}}var ld,dj,fj,pj,rA=D(()=>{Xt();ld=C(ir()),dj=async(e,t,r)=>({operation:(0,ld.getSmithyContext)(t).operation,region:await(0,ld.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});fj=e=>{let t=[];switch(e.operation){case"CreateOAuth2Token":{t.push(Ame(e));break}default:t.push(wme(e))}return t},pj=e=>{let t=Ln(e);return Object.assign(t,{authSchemePreference:(0,ld.normalizeProvider)(e.authSchemePreference??[])})}});var mj,hj,nA=D(()=>{mj=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"signin"}),hj={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var vj,mr,yj,sa,jc,ds,Hn,oy,oA,gj,_j,Ej,iA,sA,pr,aA,ry,ny,Sj,bj,xj,Ime,Tj,wj=D(()=>{vj="required",mr="argv",yj="isSet",sa="booleanEquals",jc="error",ds="endpoint",Hn="tree",oy="PartitionResult",oA="stringEquals",gj={[vj]:!0,default:!1,type:"boolean"},_j={[vj]:!1,type:"string"},Ej={ref:"Endpoint"},iA={fn:sa,[mr]:[{ref:"UseFIPS"},!0]},sA={fn:sa,[mr]:[{ref:"UseDualStack"},!0]},pr={},aA={fn:"getAttr",[mr]:[{ref:oy},"name"]},ry={fn:sa,[mr]:[{ref:"UseFIPS"},!1]},ny={fn:sa,[mr]:[{ref:"UseDualStack"},!1]},Sj={fn:"getAttr",[mr]:[{ref:oy},"supportsFIPS"]},bj={fn:sa,[mr]:[!0,{fn:"getAttr",[mr]:[{ref:oy},"supportsDualStack"]}]},xj=[{ref:"Region"}],Ime={version:"1.0",parameters:{UseDualStack:gj,UseFIPS:gj,Endpoint:_j,Region:_j},rules:[{conditions:[{fn:yj,[mr]:[Ej]}],rules:[{conditions:[iA],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:jc},{rules:[{conditions:[sA],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:jc},{endpoint:{url:Ej,properties:pr,headers:pr},type:ds}],type:Hn}],type:Hn},{rules:[{conditions:[{fn:yj,[mr]:xj}],rules:[{conditions:[{fn:"aws.partition",[mr]:xj,assign:oy}],rules:[{conditions:[{fn:oA,[mr]:[aA,"aws"]},ry,ny],endpoint:{url:"https://{Region}.signin.aws.amazon.com",properties:pr,headers:pr},type:ds},{conditions:[{fn:oA,[mr]:[aA,"aws-cn"]},ry,ny],endpoint:{url:"https://{Region}.signin.amazonaws.cn",properties:pr,headers:pr},type:ds},{conditions:[{fn:oA,[mr]:[aA,"aws-us-gov"]},ry,ny],endpoint:{url:"https://{Region}.signin.amazonaws-us-gov.com",properties:pr,headers:pr},type:ds},{conditions:[iA,sA],rules:[{conditions:[{fn:sa,[mr]:[!0,Sj]},bj],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:pr,headers:pr},type:ds}],type:Hn},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:jc}],type:Hn},{conditions:[iA,ny],rules:[{conditions:[{fn:sa,[mr]:[Sj,!0]}],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",properties:pr,headers:pr},type:ds}],type:Hn},{error:"FIPS is enabled but this partition does not support FIPS",type:jc}],type:Hn},{conditions:[ry,sA],rules:[{conditions:[bj],rules:[{endpoint:{url:"https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:pr,headers:pr},type:ds}],type:Hn},{error:"DualStack is enabled but this partition does not support DualStack",type:jc}],type:Hn},{endpoint:{url:"https://signin.{Region}.{PartitionResult#dnsSuffix}",properties:pr,headers:pr},type:ds}],type:Hn}],type:Hn},{error:"Invalid Configuration: Missing Region",type:jc}],type:Hn}]},Tj=Ime});var Aj,qc,Cme,Ij,Cj=D(()=>{Aj=C(Ys()),qc=C(ki());wj();Cme=new qc.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ij=(e,t={})=>Cme.get(e,()=>(0,qc.resolveEndpoint)(Tj,{endpointParams:e,logger:t.logger}));qc.customEndpointFunctions.aws=Aj.awsEndpointFunctions});var Dj,Vn,iy=D(()=>{Dj=C(Te()),Vn=class e extends Dj.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}});var dd,fd,pd,md,cA=D(()=>{iy();dd=class e extends Vn{name="AccessDeniedException";$fault="client";error;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},fd=class e extends Vn{name="InternalServerException";$fault="server";error;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},pd=class e extends Vn{name="TooManyRequestsError";$fault="client";error;constructor(t){super({name:"TooManyRequestsError",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}},md=class e extends Vn{name="ValidationException";$fault="client";error;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.error=t.error}}});var Dme,Rme,Pme,Ome,Nme,$me,Mme,Lme,kme,Fme,Bme,Rj,Pj,uA,Oj,Nj,Ume,fs,$j,Mj,jme,lA,Lj,en,ay,sy,kj,jj,Fj,Bj,qme,Gme,Hme,Uj,bn,qj,Gj,hd,Hj,Vj,Wj,zj,dA,Kj,Yj,Qj,Xj,Jj,Zj,fA,cy=D(()=>{We();cA();iy();Dme="AccessDeniedException",Rme="AccessToken",Pme="CreateOAuth2Token",Ome="CreateOAuth2TokenRequest",Nme="CreateOAuth2TokenRequestBody",$me="CreateOAuth2TokenResponseBody",Mme="CreateOAuth2TokenResponse",Lme="InternalServerException",kme="RefreshToken",Fme="TooManyRequestsError",Bme="ValidationException",Rj="accessKeyId",Pj="accessToken",uA="client",Oj="clientId",Nj="codeVerifier",Ume="code",fs="error",$j="expiresIn",Mj="grantType",jme="http",lA="httpError",Lj="idToken",en="jsonName",ay="message",sy="refreshToken",kj="redirectUri",jj="smithy.ts.sdk.synthetic.com.amazonaws.signin",Fj="secretAccessKey",Bj="sessionToken",qme="server",Gme="tokenInput",Hme="tokenOutput",Uj="tokenType",bn="com.amazonaws.signin",qj=bt.for(jj),Gj=[-3,jj,"SigninServiceException",0,[],[]];qj.registerError(Gj,Vn);hd=bt.for(bn),Hj=[-3,bn,Dme,{[fs]:uA},[fs,ay],[0,0],2];hd.registerError(Hj,dd);Vj=[-3,bn,Lme,{[fs]:qme,[lA]:500},[fs,ay],[0,0],2];hd.registerError(Vj,fd);Wj=[-3,bn,Fme,{[fs]:uA,[lA]:429},[fs,ay],[0,0],2];hd.registerError(Wj,pd);zj=[-3,bn,Bme,{[fs]:uA,[lA]:400},[fs,ay],[0,0],2];hd.registerError(zj,md);dA=[qj,hd],Kj=[0,bn,kme,8,0],Yj=[3,bn,Rme,8,[Rj,Fj,Bj],[[0,{[en]:Rj}],[0,{[en]:Fj}],[0,{[en]:Bj}]],3],Qj=[3,bn,Ome,0,[Gme],[[()=>Xj,16]],1],Xj=[3,bn,Nme,0,[Oj,Mj,Ume,kj,Nj,sy],[[0,{[en]:Oj}],[0,{[en]:Mj}],0,[0,{[en]:kj}],[0,{[en]:Nj}],[()=>Kj,{[en]:sy}]],2],Jj=[3,bn,Mme,0,[Hme],[[()=>Zj,16]],1],Zj=[3,bn,$me,0,[Pj,Uj,$j,sy,Lj],[[()=>Yj,{[en]:Pj}],[0,{[en]:Uj}],[1,{[en]:$j}],[()=>Kj,{[en]:sy}],[0,{[en]:Lj}]],4],fA=[9,bn,Pme,{[jme]:["POST","/v1/token",200]},()=>Qj,()=>Jj]});var eq,tq,uy,ly,rq,nq=D(()=>{Xt();ss();ar();eq=C(Te()),tq=C(no()),uy=C(jt()),ly=C(Kt());rA();Cj();cy();rq=e=>({apiVersion:"2023-01-01",base64Decoder:(e==null?void 0:e.base64Decoder)??uy.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??uy.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??Ij,extensions:(e==null?void 0:e.extensions)??[],httpAuthSchemeProvider:(e==null?void 0:e.httpAuthSchemeProvider)??fj,httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Qt},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Qr}],logger:(e==null?void 0:e.logger)??new eq.NoOpLogger,protocol:(e==null?void 0:e.protocol)??So,protocolSettings:(e==null?void 0:e.protocolSettings)??{defaultNamespace:"com.amazonaws.signin",errorTypeRegistries:dA,version:"2023-01-01",serviceTarget:"Signin"},serviceId:(e==null?void 0:e.serviceId)??"Signin",urlParser:(e==null?void 0:e.urlParser)??tq.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??ly.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??ly.toUtf8})});var dy,ms,oq,fy,ps,py,my,iq,sq,aq,cq,uq=D(()=>{Dl();Yt();Xt();dy=C(bc()),ms=C($r()),oq=C(xc()),fy=C(Mn()),ps=C(co()),py=C(Oi()),my=C(Te()),iq=C(vc()),sq=C(Tc()),aq=C(Ui());nq();cq=e=>{(0,my.emitWarningIfUnsupportedVersion)(process.version);let t=(0,sq.resolveDefaultsModeConfig)(e),r=()=>t().then(my.loadConfigsForDefaultMode),n=rq(e);so(process.version);let o={profile:e==null?void 0:e.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:(e==null?void 0:e.authSchemePreference)??(0,ps.loadConfig)(uo,o),bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??iq.calculateBodyLength,defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,dy.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:Qi.version}),maxAttempts:(e==null?void 0:e.maxAttempts)??(0,ps.loadConfig)(fy.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:(e==null?void 0:e.region)??(0,ps.loadConfig)(ms.NODE_REGION_CONFIG_OPTIONS,{...ms.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:py.NodeHttpHandler.create((e==null?void 0:e.requestHandler)??r),retryMode:(e==null?void 0:e.retryMode)??(0,ps.loadConfig)({...fy.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||aq.DEFAULT_RETRY_MODE},e),sha256:(e==null?void 0:e.sha256)??oq.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??py.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,ps.loadConfig)(ms.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,ps.loadConfig)(ms.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:(e==null?void 0:e.userAgentAppId)??(0,ps.loadConfig)(dy.NODE_APP_ID_CONFIG_OPTIONS,o)}}});var lq,dq,fq=D(()=>{lq=e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let i=t.findIndex(s=>s.schemeId===o.schemeId);i===-1?t.push(o):t.splice(i,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},dq=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})});var hy,yy,gy,pq,mq=D(()=>{hy=C(oa()),yy=C(nt()),gy=C(Te());fq();pq=(e,t)=>{let r=Object.assign((0,hy.getAwsRegionExtensionConfiguration)(e),(0,gy.getDefaultExtensionConfiguration)(e),(0,yy.getHttpHandlerExtensionConfiguration)(e),lq(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,hy.resolveAwsRegionExtensionConfiguration)(r),(0,gy.resolveDefaultRuntimeConfig)(r),(0,yy.resolveHttpHandlerRuntimeConfig)(r),dq(r))}});var _y,hq,yq,Ey,gq,_q,Eq,Sy,pA,yd,mA=D(()=>{_y=C(Ua()),hq=C(ja()),yq=C(Ga()),Ey=C(Qs()),gq=C($r());ar();We();_q=C(rc()),Eq=C($n()),Sy=C(Mn()),pA=C(Te());rA();nA();uq();mq();yd=class extends pA.Client{config;constructor(...[t]){let r=cq(t||{});super(r),this.initConfig=r;let n=mj(r),o=(0,Ey.resolveUserAgentConfig)(n),i=(0,Sy.resolveRetryConfig)(o),s=(0,gq.resolveRegionConfig)(i),a=(0,_y.resolveHostHeaderConfig)(s),c=(0,Eq.resolveEndpointConfig)(a),l=pj(c),d=pq(l,(t==null?void 0:t.extensions)||[]);this.config=d,this.middlewareStack.use(Vo(this.config)),this.middlewareStack.use((0,Ey.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,Sy.getRetryPlugin)(this.config)),this.middlewareStack.use((0,_q.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,_y.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,hq.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,yq.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:dj,identityProviderConfigProvider:async f=>new Pn({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Uo(this.config))}destroy(){super.destroy()}}});var Sq,hA,gd,yA=D(()=>{Sq=C($n()),hA=C(Te());nA();cy();gd=class extends hA.Command.classBuilder().ep(hj).m(function(t,r,n,o){return[(0,Sq.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("Signin","CreateOAuth2Token",{}).n("SigninClient","CreateOAuth2TokenCommand").sc(fA).build(){}});var bq,Vme,by,xq=D(()=>{bq=C(Te());yA();mA();Vme={CreateOAuth2TokenCommand:gd},by=class extends yd{};(0,bq.createAggregatedClient)(Vme,by)});var vq=D(()=>{yA()});var Wme,Tq=D(()=>{Wme={AUTHCODE_EXPIRED:"AUTHCODE_EXPIRED",INSUFFICIENT_PERMISSIONS:"INSUFFICIENT_PERMISSIONS",INVALID_REQUEST:"INVALID_REQUEST",SERVER_ERROR:"server_error",TOKEN_EXPIRED:"TOKEN_EXPIRED",USER_CREDENTIALS_CHANGED:"USER_CREDENTIALS_CHANGED"}});var wq=D(()=>{});var Aq={};Nt(Aq,{$Command:()=>hA.Command,AccessDeniedException:()=>dd,AccessDeniedException$:()=>Hj,AccessToken$:()=>Yj,CreateOAuth2Token$:()=>fA,CreateOAuth2TokenCommand:()=>gd,CreateOAuth2TokenRequest$:()=>Qj,CreateOAuth2TokenRequestBody$:()=>Xj,CreateOAuth2TokenResponse$:()=>Jj,CreateOAuth2TokenResponseBody$:()=>Zj,InternalServerException:()=>fd,InternalServerException$:()=>Vj,OAuth2ErrorCode:()=>Wme,Signin:()=>by,SigninClient:()=>yd,SigninServiceException:()=>Vn,SigninServiceException$:()=>Gj,TooManyRequestsError:()=>pd,TooManyRequestsError$:()=>Wj,ValidationException:()=>md,ValidationException$:()=>zj,__Client:()=>pA.Client,errorTypeRegistries:()=>dA});var Iq=D(()=>{mA();xq();vq();cy();Tq();cA();wq();iy()});var Dq=b(Cq=>{"use strict";var zme=(Yt(),ie(Nn)),hs=lr(),EA=ao(),Kme=nt(),xy=require("node:crypto"),gA=require("node:fs"),Yme=require("node:os"),_A=require("node:path"),SA=class e{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300*1e3;constructor(t,r,n){this.profileData=t,this.init=r,this.callerClientConfig=n}async loadCredentials(){let t=await this.loadToken();if(!t)throw new hs.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let r=t.accessToken,n=Date.now();return new Date(r.expiresAt).getTime()-n<=e.REFRESH_THRESHOLD?this.refresh(t):{accessKeyId:r.accessKeyId,secretAccessKey:r.secretAccessKey,sessionToken:r.sessionToken,accountId:r.accountId,expiration:new Date(r.expiresAt)}}get logger(){var t;return(t=this.init)==null?void 0:t.logger}get loginSession(){return this.profileData.login_session}async refresh(t){var f,m,h,_,E,T;let{SigninClient:r,CreateOAuth2TokenCommand:n}=await Promise.resolve().then(()=>(Iq(),Aq)),{logger:o,userAgentAppId:i}=this.callerClientConfig??{},a=(I=>{var A;return((A=I==null?void 0:I.metadata)==null?void 0:A.handlerProtocol)==="h2"})((f=this.callerClientConfig)==null?void 0:f.requestHandler)||(m=this.callerClientConfig)==null?void 0:m.requestHandler,c=this.profileData.region??await((_=(h=this.callerClientConfig)==null?void 0:h.region)==null?void 0:_.call(h))??process.env.AWS_REGION,l=new r({credentials:{accessKeyId:"",secretAccessKey:""},region:c,requestHandler:a,logger:o,userAgentAppId:i,...(E=this.init)==null?void 0:E.clientConfig});this.createDPoPInterceptor(l.middlewareStack);let d={tokenInput:{clientId:t.clientId,refreshToken:t.refreshToken,grantType:"refresh_token"}};try{let I=await l.send(new n(d)),{accessKeyId:A,secretAccessKey:O,sessionToken:G}=((T=I.tokenOutput)==null?void 0:T.accessToken)??{},{refreshToken:z,expiresIn:Q}=I.tokenOutput??{};if(!A||!O||!G||!z)throw new hs.CredentialsProviderError("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let be=(Q??900)*1e3,ue=new Date(Date.now()+be),q={...t,accessToken:{...t.accessToken,accessKeyId:A,secretAccessKey:O,sessionToken:G,expiresAt:ue.toISOString()},refreshToken:z};await this.saveToken(q);let Z=q.accessToken;return{accessKeyId:Z.accessKeyId,secretAccessKey:Z.secretAccessKey,sessionToken:Z.sessionToken,accountId:Z.accountId,expiration:ue}}catch(I){if(I.name==="AccessDeniedException"){let A=I.error,O;switch(A){case"TOKEN_EXPIRED":O="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":O="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":O="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:O=`Failed to refresh token: ${String(I)}. Please re-authenticate using \`aws login\``}throw new hs.CredentialsProviderError(O,{logger:this.logger,tryNextLink:!1})}throw new hs.CredentialsProviderError(`Failed to refresh token: ${String(I)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){var r,n;let t=this.getTokenFilePath();try{let o;try{o=await EA.readFile(t,{ignoreCache:(r=this.init)==null?void 0:r.ignoreCache})}catch{o=await gA.promises.readFile(t,"utf8")}let i=JSON.parse(o),s=["accessToken","clientId","refreshToken","dpopKey"].filter(a=>!i[a]);if((n=i.accessToken)!=null&&n.accountId||s.push("accountId"),s.length>0)throw new hs.CredentialsProviderError(`Token validation failed, missing fields: ${s.join(", ")}`,{logger:this.logger,tryNextLink:!1});return i}catch(o){throw new hs.CredentialsProviderError(`Failed to load token from ${t}: ${String(o)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(t){let r=this.getTokenFilePath(),n=_A.dirname(r);try{await gA.promises.mkdir(n,{recursive:!0})}catch{}await gA.promises.writeFile(r,JSON.stringify(t,null,2),"utf8")}getTokenFilePath(){let t=process.env.AWS_LOGIN_CACHE_DIRECTORY??_A.join(Yme.homedir(),".aws","login","cache"),r=Buffer.from(this.loginSession,"utf8"),n=xy.createHash("sha256").update(r).digest("hex");return _A.join(t,`${n}.json`)}derToRawSignature(t){let r=2;if(t[r]!==2)throw new Error("Invalid DER signature");r++;let n=t[r++],o=t.subarray(r,r+n);if(r+=n,t[r]!==2)throw new Error("Invalid DER signature");r++;let i=t[r++],s=t.subarray(r,r+i);o=o[0]===0?o.subarray(1):o,s=s[0]===0?s.subarray(1):s;let a=Buffer.concat([Buffer.alloc(32-o.length),o]),c=Buffer.concat([Buffer.alloc(32-s.length),s]);return Buffer.concat([a,c])}createDPoPInterceptor(t){t.add(r=>async n=>{if(Kme.HttpRequest.isInstance(n.request)){let o=n.request,i=`${o.protocol}//${o.hostname}${o.port?`:${o.port}`:""}${o.path}`,s=await this.generateDpop(o.method,i);o.headers={...o.headers,DPoP:s}}return r(n)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(t="POST",r){let n=await this.loadToken();try{let o=xy.createPrivateKey({key:n.dpopKey,format:"pem",type:"sec1"}),s=xy.createPublicKey(o).export({format:"der",type:"spki"}),a=-1;for(let A=0;A<s.length;A++)if(s[A]===4){a=A;break}let c=s.slice(a+1,a+33),l=s.slice(a+33,a+65),d={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:c.toString("base64url"),y:l.toString("base64url")}},f={jti:crypto.randomUUID(),htm:t,htu:r,iat:Math.floor(Date.now()/1e3)},m=Buffer.from(JSON.stringify(d)).toString("base64url"),h=Buffer.from(JSON.stringify(f)).toString("base64url"),_=`${m}.${h}`,E=xy.sign("sha256",Buffer.from(_),o),I=this.derToRawSignature(E).toString("base64url");return`${_}.${I}`}catch(o){throw new hs.CredentialsProviderError(`Failed to generate Dpop proof: ${o instanceof Error?o.message:String(o)}`,{logger:this.logger,tryNextLink:!1})}}},Qme=e=>async({callerClientConfig:t}={})=>{var a,c;(c=(a=e==null?void 0:e.logger)==null?void 0:a.debug)==null||c.call(a,"@aws-sdk/credential-providers - fromLoginCredentials");let r=await EA.parseKnownFiles(e||{}),n=EA.getProfileName({profile:(e==null?void 0:e.profile)??(t==null?void 0:t.profile)}),o=r[n];if(!(o!=null&&o.login_session))throw new hs.CredentialsProviderError(`Profile ${n} does not contain login_session.`,{tryNextLink:!0,logger:e==null?void 0:e.logger});let s=await new SA(o,e,t).loadCredentials();return zme.setCredentialFeature(s,"CREDENTIALS_LOGIN","AD")};Cq.fromLoginCredentials=Qme});function Xme(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Jme(e){return{schemeId:"smithy.api#noAuth"}}var _d,Rq,Pq,Zme,Oq,bA=D(()=>{Xt();_d=C(ir());Ed();Rq=async(e,t,r)=>({operation:(0,_d.getSmithyContext)(t).operation,region:await(0,_d.normalizeProvider)(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});Pq=e=>{let t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(Jme(e));break}default:t.push(Xme(e))}return t},Zme=e=>Object.assign(e,{stsClientCtor:xo}),Oq=e=>{let t=Zme(e),r=Ln(t);return Object.assign(r,{authSchemePreference:(0,_d.normalizeProvider)(e.authSchemePreference??[])})}});var Nq,vy,Ty=D(()=>{Nq=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),vy={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var Hq,Ce,Je,ys,er,Vq,Wq,_t,$q,vo,Gc,vA,Mq,xA,zq,Lq,tr,kq,Kq,Yq,hr,tn,Fq,Qq,Xq,Bq,Jq,Uq,jq,qq,Gq,ehe,Zq,eG=D(()=>{Hq="required",Ce="type",Je="argv",ys="booleanEquals",er="stringEquals",Vq="sigv4",Wq="us-east-1",_t="endpoint",$q="https://sts.{Region}.{PartitionResult#dnsSuffix}",vo="tree",Gc="error",vA="getAttr",Mq={[Hq]:!1,[Ce]:"string"},xA={[Hq]:!0,default:!1,[Ce]:"boolean"},zq={ref:"Endpoint"},Lq={fn:"isSet",[Je]:[{ref:"Region"}]},tr={ref:"Region"},kq={fn:"aws.partition",[Je]:[tr],assign:"PartitionResult"},Kq={ref:"UseFIPS"},Yq={ref:"UseDualStack"},hr={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:Vq,signingName:"sts",signingRegion:Wq}]},headers:{}},tn={},Fq={conditions:[{fn:er,[Je]:[tr,"aws-global"]}],[_t]:hr,[Ce]:_t},Qq={fn:ys,[Je]:[Kq,!0]},Xq={fn:ys,[Je]:[Yq,!0]},Bq={fn:vA,[Je]:[{ref:"PartitionResult"},"supportsFIPS"]},Jq={ref:"PartitionResult"},Uq={fn:ys,[Je]:[!0,{fn:vA,[Je]:[Jq,"supportsDualStack"]}]},jq=[{fn:"isSet",[Je]:[zq]}],qq=[Qq],Gq=[Xq],ehe={version:"1.0",parameters:{Region:Mq,UseDualStack:xA,UseFIPS:xA,Endpoint:Mq,UseGlobalEndpoint:xA},rules:[{conditions:[{fn:ys,[Je]:[{ref:"UseGlobalEndpoint"},!0]},{fn:"not",[Je]:jq},Lq,kq,{fn:ys,[Je]:[Kq,!1]},{fn:ys,[Je]:[Yq,!1]}],rules:[{conditions:[{fn:er,[Je]:[tr,"ap-northeast-1"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"ap-south-1"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"ap-southeast-1"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"ap-southeast-2"]}],endpoint:hr,[Ce]:_t},Fq,{conditions:[{fn:er,[Je]:[tr,"ca-central-1"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"eu-central-1"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"eu-north-1"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"eu-west-1"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"eu-west-2"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"eu-west-3"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"sa-east-1"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,Wq]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"us-east-2"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"us-west-1"]}],endpoint:hr,[Ce]:_t},{conditions:[{fn:er,[Je]:[tr,"us-west-2"]}],endpoint:hr,[Ce]:_t},{endpoint:{url:$q,properties:{authSchemes:[{name:Vq,signingName:"sts",signingRegion:"{Region}"}]},headers:tn},[Ce]:_t}],[Ce]:vo},{conditions:jq,rules:[{conditions:qq,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[Ce]:Gc},{conditions:Gq,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[Ce]:Gc},{endpoint:{url:zq,properties:tn,headers:tn},[Ce]:_t}],[Ce]:vo},{conditions:[Lq],rules:[{conditions:[kq],rules:[{conditions:[Qq,Xq],rules:[{conditions:[{fn:ys,[Je]:[!0,Bq]},Uq],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:tn,headers:tn},[Ce]:_t}],[Ce]:vo},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[Ce]:Gc}],[Ce]:vo},{conditions:qq,rules:[{conditions:[{fn:ys,[Je]:[Bq,!0]}],rules:[{conditions:[{fn:er,[Je]:[{fn:vA,[Je]:[Jq,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:tn,headers:tn},[Ce]:_t},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:tn,headers:tn},[Ce]:_t}],[Ce]:vo},{error:"FIPS is enabled but this partition does not support FIPS",[Ce]:Gc}],[Ce]:vo},{conditions:Gq,rules:[{conditions:[Uq],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:tn,headers:tn},[Ce]:_t}],[Ce]:vo},{error:"DualStack is enabled but this partition does not support DualStack",[Ce]:Gc}],[Ce]:vo},Fq,{endpoint:{url:$q,properties:tn,headers:tn},[Ce]:_t}],[Ce]:vo}],[Ce]:vo},{error:"Invalid Configuration: Missing Region",[Ce]:Gc}]},Zq=ehe});var tG,Hc,the,rG,nG=D(()=>{tG=C(Ys()),Hc=C(ki());eG();the=new Hc.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),rG=(e,t={})=>the.get(e,()=>(0,Hc.resolveEndpoint)(Zq,{endpointParams:e,logger:t.logger}));Hc.customEndpointFunctions.aws=tG.awsEndpointFunctions});var oG,kr,wy=D(()=>{oG=C(Te()),kr=class e extends oG.ServiceException{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}});var Sd,bd,xd,vd,Td,wd,Ad,TA=D(()=>{wy();Sd=class e extends kr{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},bd=class e extends kr{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},xd=class e extends kr{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},vd=class e extends kr{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Td=class e extends kr{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},wd=class e extends kr{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}},Ad=class e extends kr{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}}});var rhe,nhe,ohe,ihe,she,ahe,wA,che,uhe,lhe,dhe,AA,fhe,iG,phe,mhe,hhe,yhe,ghe,_he,Ehe,She,sG,aG,bhe,xhe,vhe,The,whe,Ahe,cG,Ihe,Che,uG,Dhe,lG,Rhe,Phe,IA,Ohe,Nhe,$he,Mhe,Lhe,khe,Fhe,Bhe,Uhe,jhe,aa,ca,qhe,ua,la,da,Ghe,dG,Hhe,Et,fG,pG,gs,mG,hG,yG,gG,_G,EG,SG,CA,Vhe,Whe,DA,bG,xG,vG,TG,RA,wG,AG,IG,CG,zhe,Khe,PA,OA,Id=D(()=>{We();TA();wy();rhe="Arn",nhe="AccessKeyId",ohe="AssumeRole",ihe="AssumedRoleId",she="AssumeRoleRequest",ahe="AssumeRoleResponse",wA="AssumedRoleUser",che="AssumeRoleWithWebIdentity",uhe="AssumeRoleWithWebIdentityRequest",lhe="AssumeRoleWithWebIdentityResponse",dhe="Audience",AA="Credentials",fhe="ContextAssertion",iG="DurationSeconds",phe="Expiration",mhe="ExternalId",hhe="ExpiredTokenException",yhe="IDPCommunicationErrorException",ghe="IDPRejectedClaimException",_he="InvalidIdentityTokenException",Ehe="Key",She="MalformedPolicyDocumentException",sG="Policy",aG="PolicyArns",bhe="ProviderArn",xhe="ProvidedContexts",vhe="ProvidedContextsListType",The="ProvidedContext",whe="PolicyDescriptorType",Ahe="ProviderId",cG="PackedPolicySize",Ihe="PackedPolicyTooLargeException",Che="Provider",uG="RoleArn",Dhe="RegionDisabledException",lG="RoleSessionName",Rhe="SecretAccessKey",Phe="SubjectFromWebIdentityToken",IA="SourceIdentity",Ohe="SerialNumber",Nhe="SessionToken",$he="Tags",Mhe="TokenCode",Lhe="TransitiveTagKeys",khe="Tag",Fhe="Value",Bhe="WebIdentityToken",Uhe="arn",jhe="accessKeySecretType",aa="awsQueryError",ca="client",qhe="clientTokenType",ua="error",la="httpError",da="message",Ghe="policyDescriptorListType",dG="smithy.ts.sdk.synthetic.com.amazonaws.sts",Hhe="tagListType",Et="com.amazonaws.sts",fG=bt.for(dG),pG=[-3,dG,"STSServiceException",0,[],[]];fG.registerError(pG,kr);gs=bt.for(Et),mG=[-3,Et,hhe,{[aa]:["ExpiredTokenException",400],[ua]:ca,[la]:400},[da],[0]];gs.registerError(mG,Sd);hG=[-3,Et,yhe,{[aa]:["IDPCommunicationError",400],[ua]:ca,[la]:400},[da],[0]];gs.registerError(hG,Ad);yG=[-3,Et,ghe,{[aa]:["IDPRejectedClaim",403],[ua]:ca,[la]:403},[da],[0]];gs.registerError(yG,Td);gG=[-3,Et,_he,{[aa]:["InvalidIdentityToken",400],[ua]:ca,[la]:400},[da],[0]];gs.registerError(gG,wd);_G=[-3,Et,She,{[aa]:["MalformedPolicyDocument",400],[ua]:ca,[la]:400},[da],[0]];gs.registerError(_G,bd);EG=[-3,Et,Ihe,{[aa]:["PackedPolicyTooLarge",400],[ua]:ca,[la]:400},[da],[0]];gs.registerError(EG,xd);SG=[-3,Et,Dhe,{[aa]:["RegionDisabledException",403],[ua]:ca,[la]:403},[da],[0]];gs.registerError(SG,vd);CA=[fG,gs],Vhe=[0,Et,jhe,8,0],Whe=[0,Et,qhe,8,0],DA=[3,Et,wA,0,[ihe,rhe],[0,0],2],bG=[3,Et,she,0,[uG,lG,aG,sG,iG,$he,Lhe,mhe,Ohe,Mhe,IA,xhe],[0,0,()=>CG,0,1,()=>Khe,64,0,0,0,0,()=>zhe],2],xG=[3,Et,ahe,0,[AA,wA,cG,IA],[[()=>RA,0],()=>DA,1,0]],vG=[3,Et,uhe,0,[uG,lG,Bhe,Ahe,aG,sG,iG],[0,0,[()=>Whe,0],0,()=>CG,0,1],3],TG=[3,Et,lhe,0,[AA,Phe,wA,cG,Che,dhe,IA],[[()=>RA,0],0,()=>DA,1,0,0,0]],RA=[3,Et,AA,0,[nhe,Rhe,Nhe,phe],[0,[()=>Vhe,0],0,4],4],wG=[3,Et,whe,0,[Uhe],[0]],AG=[3,Et,The,0,[bhe,fhe],[0,0]],IG=[3,Et,khe,0,[Ehe,Fhe],[0,0],2],CG=[1,Et,Ghe,0,()=>wG],zhe=[1,Et,vhe,0,()=>AG],Khe=[1,Et,Hhe,0,()=>IG],PA=[9,Et,ohe,0,()=>bG,()=>xG],OA=[9,Et,che,0,()=>vG,()=>TG]});var DG,RG,Ay,Iy,PG,OG=D(()=>{Xt();ss();ar();DG=C(Te()),RG=C(no()),Ay=C(jt()),Iy=C(Kt());bA();nG();Id();PG=e=>({apiVersion:"2011-06-15",base64Decoder:(e==null?void 0:e.base64Decoder)??Ay.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??Ay.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??rG,extensions:(e==null?void 0:e.extensions)??[],httpAuthSchemeProvider:(e==null?void 0:e.httpAuthSchemeProvider)??Pq,httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Qt},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Qr}],logger:(e==null?void 0:e.logger)??new DG.NoOpLogger,protocol:(e==null?void 0:e.protocol)??is,protocolSettings:(e==null?void 0:e.protocolSettings)??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:CA,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:(e==null?void 0:e.serviceId)??"STS",urlParser:(e==null?void 0:e.urlParser)??RG.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??Iy.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??Iy.toUtf8})});var Cy,Es,NG,Dy,_s,Ry,Py,$G,MG,LG,kG,FG=D(()=>{Dl();Yt();Xt();Cy=C(bc()),Es=C($r());ar();NG=C(xc()),Dy=C(Mn()),_s=C(co()),Ry=C(Oi()),Py=C(Te()),$G=C(vc()),MG=C(Tc()),LG=C(Ui());OG();kG=e=>{(0,Py.emitWarningIfUnsupportedVersion)(process.version);let t=(0,MG.resolveDefaultsModeConfig)(e),r=()=>t().then(Py.loadConfigsForDefaultMode),n=PG(e);so(process.version);let o={profile:e==null?void 0:e.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,authSchemePreference:(e==null?void 0:e.authSchemePreference)??(0,_s.loadConfig)(uo,o),bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??$G.calculateBodyLength,defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,Cy.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:Qi.version}),httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:i=>i.getIdentityProvider("aws.auth#sigv4")||(async s=>await e.credentialDefaultProvider((s==null?void 0:s.__config)||{})()),signer:new Qt},{schemeId:"smithy.api#noAuth",identityProvider:i=>i.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Qr}],maxAttempts:(e==null?void 0:e.maxAttempts)??(0,_s.loadConfig)(Dy.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:(e==null?void 0:e.region)??(0,_s.loadConfig)(Es.NODE_REGION_CONFIG_OPTIONS,{...Es.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:Ry.NodeHttpHandler.create((e==null?void 0:e.requestHandler)??r),retryMode:(e==null?void 0:e.retryMode)??(0,_s.loadConfig)({...Dy.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||LG.DEFAULT_RETRY_MODE},e),sha256:(e==null?void 0:e.sha256)??NG.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??Ry.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,_s.loadConfig)(Es.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,_s.loadConfig)(Es.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:(e==null?void 0:e.userAgentAppId)??(0,_s.loadConfig)(Cy.NODE_APP_ID_CONFIG_OPTIONS,o)}}});var BG,UG,jG=D(()=>{BG=e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let i=t.findIndex(s=>s.schemeId===o.schemeId);i===-1?t.push(o):t.splice(i,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},UG=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})});var Oy,Ny,$y,qG,GG=D(()=>{Oy=C(oa()),Ny=C(nt()),$y=C(Te());jG();qG=(e,t)=>{let r=Object.assign((0,Oy.getAwsRegionExtensionConfiguration)(e),(0,$y.getDefaultExtensionConfiguration)(e),(0,Ny.getHttpHandlerExtensionConfiguration)(e),BG(e));return t.forEach(n=>n.configure(r)),Object.assign(e,(0,Oy.resolveAwsRegionExtensionConfiguration)(r),(0,$y.resolveDefaultRuntimeConfig)(r),(0,Ny.resolveHttpHandlerRuntimeConfig)(r),UG(r))}});var My,HG,VG,Ly,WG,zG,KG,ky,NA,xo,Ed=D(()=>{My=C(Ua()),HG=C(ja()),VG=C(Ga()),Ly=C(Qs()),WG=C($r());ar();We();zG=C(rc()),KG=C($n()),ky=C(Mn()),NA=C(Te());bA();Ty();FG();GG();xo=class extends NA.Client{config;constructor(...[t]){let r=kG(t||{});super(r),this.initConfig=r;let n=Nq(r),o=(0,Ly.resolveUserAgentConfig)(n),i=(0,ky.resolveRetryConfig)(o),s=(0,WG.resolveRegionConfig)(i),a=(0,My.resolveHostHeaderConfig)(s),c=(0,KG.resolveEndpointConfig)(a),l=Oq(c),d=qG(l,(t==null?void 0:t.extensions)||[]);this.config=d,this.middlewareStack.use(Vo(this.config)),this.middlewareStack.use((0,Ly.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,ky.getRetryPlugin)(this.config)),this.middlewareStack.use((0,zG.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,My.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,HG.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,VG.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use(Bo(this.config,{httpAuthSchemeParametersProvider:Rq,identityProviderConfigProvider:async f=>new Pn({"aws.auth#sigv4":f.credentials})})),this.middlewareStack.use(Uo(this.config))}destroy(){super.destroy()}}});var YG,QG,fa,Fy=D(()=>{YG=C($n()),QG=C(Te());Ty();Id();fa=class extends QG.Command.classBuilder().ep(vy).m(function(t,r,n,o){return[(0,YG.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(PA).build(){}});var XG,JG,pa,By=D(()=>{XG=C($n()),JG=C(Te());Ty();Id();pa=class extends JG.Command.classBuilder().ep(vy).m(function(t,r,n,o){return[(0,XG.getEndpointPlugin)(n,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(OA).build(){}});var ZG,Yhe,Uy,e3=D(()=>{ZG=C(Te());Fy();By();Ed();Yhe={AssumeRoleCommand:fa,AssumeRoleWithWebIdentityCommand:pa},Uy=class extends xo{};(0,ZG.createAggregatedClient)(Yhe,Uy)});var t3=D(()=>{Fy();By()});var r3=D(()=>{});var n3,o3,i3,s3,a3,c3,u3=D(()=>{Yt();n3=C(oa());Fy();By();o3=e=>{if(typeof(e==null?void 0:e.Arn)=="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}},i3=async(e,t,r,n={})=>{var c;let o=typeof e=="function"?await e():e,i=typeof t=="function"?await t():t,s="",a=o??i??(s=await(0,n3.stsRegionDefaultResolver)(n)());return(c=r==null?void 0:r.debug)==null||c.call(r,"@aws-sdk/client-sts::resolveRegion","accepting first of:",`${o} (credential provider clientConfig)`,`${i} (contextual client)`,`${s} (STS default: AWS_REGION, profile region, or us-east-1)`),a},s3=(e,t)=>{let r,n;return async(o,i)=>{var d,f,m,h,_;if(n=o,!r){let{logger:E=(d=e==null?void 0:e.parentClientConfig)==null?void 0:d.logger,profile:T=(f=e==null?void 0:e.parentClientConfig)==null?void 0:f.profile,region:I,requestHandler:A=(m=e==null?void 0:e.parentClientConfig)==null?void 0:m.requestHandler,credentialProviderLogger:O,userAgentAppId:G=(h=e==null?void 0:e.parentClientConfig)==null?void 0:h.userAgentAppId}=e,z=await i3(I,(_=e==null?void 0:e.parentClientConfig)==null?void 0:_.region,O,{logger:E,profile:T}),Q=!c3(A);r=new t({...e,userAgentAppId:G,profile:T,credentialDefaultProvider:()=>async()=>n,region:z,requestHandler:Q?A:void 0,logger:E})}let{Credentials:s,AssumedRoleUser:a}=await r.send(new fa(i));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${i.RoleArn}`);let c=o3(a),l={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,...s.CredentialScope&&{credentialScope:s.CredentialScope},...c&&{accountId:c}};return Fi(l,"CREDENTIALS_STS_ASSUME_ROLE","i"),l}},a3=(e,t)=>{let r;return async n=>{var c,l,d,f,m;if(!r){let{logger:h=(c=e==null?void 0:e.parentClientConfig)==null?void 0:c.logger,profile:_=(l=e==null?void 0:e.parentClientConfig)==null?void 0:l.profile,region:E,requestHandler:T=(d=e==null?void 0:e.parentClientConfig)==null?void 0:d.requestHandler,credentialProviderLogger:I,userAgentAppId:A=(f=e==null?void 0:e.parentClientConfig)==null?void 0:f.userAgentAppId}=e,O=await i3(E,(m=e==null?void 0:e.parentClientConfig)==null?void 0:m.region,I,{logger:h,profile:_}),G=!c3(T);r=new t({...e,userAgentAppId:A,profile:_,region:O,requestHandler:G?T:void 0,logger:h})}let{Credentials:o,AssumedRoleUser:i}=await r.send(new pa(n));if(!o||!o.AccessKeyId||!o.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${n.RoleArn}`);let s=o3(i),a={accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.SessionToken,expiration:o.Expiration,...o.CredentialScope&&{credentialScope:o.CredentialScope},...s&&{accountId:s}};return s&&Fi(a,"RESOLVED_ACCOUNT_ID","T"),Fi(a,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),a}},c3=e=>{var t;return((t=e==null?void 0:e.metadata)==null?void 0:t.handlerProtocol)==="h2"}});var l3,d3,f3,Qhe,p3=D(()=>{u3();Ed();l3=(e,t)=>t?class extends e{constructor(n){super(n);for(let o of t)this.middlewareStack.use(o)}}:e,d3=(e={},t)=>s3(e,l3(xo,t)),f3=(e={},t)=>a3(e,l3(xo,t)),Qhe=e=>t=>e({roleAssumer:d3(t),roleAssumerWithWebIdentity:f3(t),...t})});var $A={};Nt($A,{AssumeRole$:()=>PA,AssumeRoleCommand:()=>fa,AssumeRoleRequest$:()=>bG,AssumeRoleResponse$:()=>xG,AssumeRoleWithWebIdentity$:()=>OA,AssumeRoleWithWebIdentityCommand:()=>pa,AssumeRoleWithWebIdentityRequest$:()=>vG,AssumeRoleWithWebIdentityResponse$:()=>TG,AssumedRoleUser$:()=>DA,Credentials$:()=>RA,ExpiredTokenException:()=>Sd,ExpiredTokenException$:()=>mG,IDPCommunicationErrorException:()=>Ad,IDPCommunicationErrorException$:()=>hG,IDPRejectedClaimException:()=>Td,IDPRejectedClaimException$:()=>yG,InvalidIdentityTokenException:()=>wd,InvalidIdentityTokenException$:()=>gG,MalformedPolicyDocumentException:()=>bd,MalformedPolicyDocumentException$:()=>_G,PackedPolicyTooLargeException:()=>xd,PackedPolicyTooLargeException$:()=>EG,PolicyDescriptorType$:()=>wG,ProvidedContext$:()=>AG,RegionDisabledException:()=>vd,RegionDisabledException$:()=>SG,STS:()=>Uy,STSClient:()=>xo,STSServiceException:()=>kr,STSServiceException$:()=>pG,Tag$:()=>IG,__Client:()=>NA.Client,decorateDefaultCredentialProvider:()=>Qhe,errorTypeRegistries:()=>CA,getDefaultRoleAssumer:()=>d3,getDefaultRoleAssumerWithWebIdentity:()=>f3});var MA=D(()=>{Ed();e3();t3();Id();TA();r3();p3();wy()});var FA=b(m3=>{"use strict";var kA=ao(),LA=lr(),Xhe=require("node:child_process"),Jhe=require("node:util"),Zhe=(Yt(),ie(Nn)),eye=(e,t,r)=>{var i;if(t.Version!==1)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(t.AccessKeyId===void 0||t.SecretAccessKey===void 0)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(t.Expiration){let s=new Date;if(new Date(t.Expiration)<s)throw Error(`Profile ${e} credential_process returned expired credentials.`)}let n=t.AccountId;!n&&((i=r==null?void 0:r[e])!=null&&i.aws_account_id)&&(n=r[e].aws_account_id);let o={accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,...t.SessionToken&&{sessionToken:t.SessionToken},...t.Expiration&&{expiration:new Date(t.Expiration)},...t.CredentialScope&&{credentialScope:t.CredentialScope},...n&&{accountId:n}};return Zhe.setCredentialFeature(o,"CREDENTIALS_PROCESS","w"),o},tye=async(e,t,r)=>{var o,i;let n=t[e];if(t[e]){let s=n.credential_process;if(s!==void 0){let a=Jhe.promisify(((i=(o=kA.externalDataInterceptor)==null?void 0:o.getTokenRecord)==null?void 0:i.call(o).exec)??Xhe.exec);try{let{stdout:c}=await a(s),l;try{l=JSON.parse(c.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return eye(e,l,t)}catch(c){throw new LA.CredentialsProviderError(c.message,{logger:r})}}else throw new LA.CredentialsProviderError(`Profile ${e} did not contain credential_process.`,{logger:r})}else throw new LA.CredentialsProviderError(`Profile ${e} could not be found in shared credentials file.`,{logger:r})},rye=(e={})=>async({callerClientConfig:t}={})=>{var n;(n=e.logger)==null||n.debug("@aws-sdk/credential-provider-process - fromProcess");let r=await kA.parseKnownFiles(e);return tye(kA.getProfileName({profile:e.profile??(t==null?void 0:t.profile)}),r,e.logger)};m3.fromProcess=rye});var BA=b(To=>{"use strict";var nye=To&&To.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),oye=To&&To.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),iye=To&&To.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),o=0;o<n.length;o++)n[o]!=="default"&&nye(r,t,n[o]);return oye(r,t),r}})();Object.defineProperty(To,"__esModule",{value:!0});To.fromWebToken=void 0;var sye=e=>async t=>{var d;(d=e.logger)==null||d.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");let{roleArn:r,roleSessionName:n,webIdentityToken:o,providerId:i,policyArns:s,policy:a,durationSeconds:c}=e,{roleAssumerWithWebIdentity:l}=e;if(!l){let{getDefaultRoleAssumerWithWebIdentity:f}=await Promise.resolve().then(()=>iye((MA(),ie($A))));l=f({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t==null?void 0:t.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return l({RoleArn:r,RoleSessionName:n??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:o,ProviderId:i,PolicyArns:s,Policy:a,DurationSeconds:c})};To.fromWebToken=sye});var y3=b(jy=>{"use strict";Object.defineProperty(jy,"__esModule",{value:!0});jy.fromTokenFile=void 0;var aye=(Yt(),ie(Nn)),cye=lr(),uye=ao(),lye=require("node:fs"),dye=BA(),h3="AWS_WEB_IDENTITY_TOKEN_FILE",fye="AWS_ROLE_ARN",pye="AWS_ROLE_SESSION_NAME",mye=(e={})=>async t=>{var s,a,c;(s=e.logger)==null||s.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");let r=(e==null?void 0:e.webIdentityTokenFile)??process.env[h3],n=(e==null?void 0:e.roleArn)??process.env[fye],o=(e==null?void 0:e.roleSessionName)??process.env[pye];if(!r||!n)throw new cye.CredentialsProviderError("Web identity configuration not specified",{logger:e.logger});let i=await(0,dye.fromWebToken)({...e,webIdentityToken:((c=(a=uye.externalDataInterceptor)==null?void 0:a.getTokenRecord)==null?void 0:c.call(a)[r])??(0,lye.readFileSync)(r,{encoding:"ascii"}),roleArn:n,roleSessionName:o})(t);return r===process.env[h3]&&(0,aye.setCredentialFeature)(i,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h"),i};jy.fromTokenFile=mye});var UA=b(ci=>{"use strict";var qy=y3(),Gy=BA();Object.prototype.hasOwnProperty.call(qy,"__proto__")&&!Object.prototype.hasOwnProperty.call(ci,"__proto__")&&Object.defineProperty(ci,"__proto__",{enumerable:!0,value:qy.__proto__});Object.keys(qy).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ci,e)&&(ci[e]=qy[e])});Object.prototype.hasOwnProperty.call(Gy,"__proto__")&&!Object.prototype.hasOwnProperty.call(ci,"__proto__")&&Object.defineProperty(ci,"__proto__",{enumerable:!0,value:Gy.__proto__});Object.keys(Gy).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(ci,e)&&(ci[e]=Gy[e])})});var x3=b(b3=>{"use strict";var qA=ao(),Cd=lr(),ui=(Yt(),ie(Nn)),hye=Dq(),yye=(e,t,r)=>{let n={EcsContainer:async o=>{let{fromHttp:i}=await Promise.resolve().then(()=>C(WT())),{fromContainerMetadata:s}=await Promise.resolve().then(()=>C(Il()));return r==null||r.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>Cd.chain(i(o??{}),s(o))().then(jA)},Ec2InstanceMetadata:async o=>{r==null||r.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:i}=await Promise.resolve().then(()=>C(Il()));return async()=>i(o)().then(jA)},Environment:async o=>{r==null||r.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:i}=await Promise.resolve().then(()=>C(FT()));return async()=>i(o)().then(jA)}};if(e in n)return n[e];throw new Cd.CredentialsProviderError(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:r})},jA=e=>ui.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p"),gye=(e,{profile:t="default",logger:r}={})=>!!e&&typeof e=="object"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(_ye(e,{profile:t,logger:r})||Eye(e,{profile:t,logger:r})),_ye=(e,{profile:t,logger:r})=>{var o;let n=typeof e.source_profile=="string"&&typeof e.credential_source>"u";return n&&((o=r==null?void 0:r.debug)==null||o.call(r,` ${t} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`)),n},Eye=(e,{profile:t,logger:r})=>{var o;let n=typeof e.credential_source=="string"&&typeof e.source_profile>"u";return n&&((o=r==null?void 0:r.debug)==null||o.call(r,` ${t} isCredentialSourceProfile credential_source=${e.credential_source}`)),n},Sye=async(e,t,r,n,o={},i)=>{var d,f,m;(d=r.logger)==null||d.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let s=t[e],{source_profile:a,region:c}=s;if(!r.roleAssumer){let{getDefaultRoleAssumer:h}=await Promise.resolve().then(()=>(MA(),$A));r.roleAssumer=h({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:{...n,...r==null?void 0:r.parentClientConfig,region:c??((f=r==null?void 0:r.parentClientConfig)==null?void 0:f.region)??(n==null?void 0:n.region)}},r.clientPlugins)}if(a&&a in o)throw new Cd.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${qA.getProfileName(r)}. Profiles visited: `+Object.keys(o).join(", "),{logger:r.logger});(m=r.logger)==null||m.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${a?`source_profile=[${a}]`:`profile=[${e}]`}`);let l=a?i(a,t,r,n,{...o,[a]:!0},g3(t[a]??{})):(await yye(s.credential_source,e,r.logger)(r))();if(g3(s))return l.then(h=>ui.setCredentialFeature(h,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));{let h={RoleArn:s.role_arn,RoleSessionName:s.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:s.external_id,DurationSeconds:parseInt(s.duration_seconds||"3600",10)},{mfa_serial:_}=s;if(_){if(!r.mfaCodeProvider)throw new Cd.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});h.SerialNumber=_,h.TokenCode=await r.mfaCodeProvider(_)}let E=await l;return r.roleAssumer(E,h).then(T=>ui.setCredentialFeature(T,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},g3=e=>!e.role_arn&&!!e.credential_source,bye=e=>!!(e&&e.login_session),xye=async(e,t,r)=>{let n=await hye.fromLoginCredentials({...t,profile:e})({callerClientConfig:r});return ui.setCredentialFeature(n,"CREDENTIALS_PROFILE_LOGIN","AC")},vye=e=>!!e&&typeof e=="object"&&typeof e.credential_process=="string",Tye=async(e,t)=>Promise.resolve().then(()=>C(FA())).then(({fromProcess:r})=>r({...e,profile:t})().then(n=>ui.setCredentialFeature(n,"CREDENTIALS_PROFILE_PROCESS","v"))),wye=async(e,t,r={},n)=>{let{fromSSO:o}=await Promise.resolve().then(()=>C(tA()));return o({profile:e,logger:r.logger,parentClientConfig:r.parentClientConfig,clientConfig:r.clientConfig})({callerClientConfig:n}).then(i=>t.sso_session?ui.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO","r"):ui.setCredentialFeature(i,"CREDENTIALS_PROFILE_SSO_LEGACY","t"))},Aye=e=>e&&(typeof e.sso_start_url=="string"||typeof e.sso_account_id=="string"||typeof e.sso_session=="string"||typeof e.sso_region=="string"||typeof e.sso_role_name=="string"),_3=e=>!!e&&typeof e=="object"&&typeof e.aws_access_key_id=="string"&&typeof e.aws_secret_access_key=="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,E3=async(e,t)=>{var n;(n=t==null?void 0:t.logger)==null||n.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let r={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return ui.setCredentialFeature(r,"CREDENTIALS_PROFILE","n")},Iye=e=>!!e&&typeof e=="object"&&typeof e.web_identity_token_file=="string"&&typeof e.role_arn=="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,Cye=async(e,t,r)=>Promise.resolve().then(()=>C(UA())).then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity,logger:t.logger,parentClientConfig:t.parentClientConfig})({callerClientConfig:r}).then(o=>ui.setCredentialFeature(o,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q"))),S3=async(e,t,r,n,o={},i=!1)=>{let s=t[e];if(Object.keys(o).length>0&&_3(s))return E3(s,r);if(i||gye(s,{profile:e,logger:r.logger}))return Sye(e,t,r,n,o,S3);if(_3(s))return E3(s,r);if(Iye(s))return Cye(s,r,n);if(vye(s))return Tye(r,e);if(Aye(s))return await wye(e,s,r,n);if(bye(s))return xye(e,r,n);throw new Cd.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})},Dye=(e={})=>async({callerClientConfig:t}={})=>{var n;(n=e.logger)==null||n.debug("@aws-sdk/credential-provider-ini - fromIni");let r=await qA.parseKnownFiles(e);return S3(qA.getProfileName({profile:e.profile??(t==null?void 0:t.profile)}),r,e,t)};b3.fromIni=Dye});var HA=b(Hy=>{"use strict";var GA=FT(),Dd=lr(),Rye=ao(),v3="AWS_EC2_METADATA_DISABLED",Pye=async e=>{var i,s;let{ENV_CMDS_FULL_URI:t,ENV_CMDS_RELATIVE_URI:r,fromContainerMetadata:n,fromInstanceMetadata:o}=await Promise.resolve().then(()=>C(Il()));if(process.env[r]||process.env[t]){(i=e.logger)==null||i.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:a}=await Promise.resolve().then(()=>C(WT()));return Dd.chain(a(e),n(e))}return process.env[v3]&&process.env[v3]!=="false"?async()=>{throw new Dd.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:e.logger})}:((s=e.logger)==null||s.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),o(e))};function Oye(e,t){let r=Nye(e),n,o,i,s=async a=>{var c;if(a!=null&&a.forceRefresh)return await r(a);if(i!=null&&i.expiration&&((c=i==null?void 0:i.expiration)==null?void 0:c.getTime())<Date.now()&&(i=void 0),n)await n;else if(!i||t!=null&&t(i))if(i)o||(o=r(a).then(l=>{i=l}).finally(()=>{o=void 0}));else return n=r(a).then(l=>{i=l}).finally(()=>{n=void 0}),s(a);return i};return s}var Nye=e=>async t=>{let r;for(let n of e)try{return await n(t)}catch(o){if(r=o,o!=null&&o.tryNextLink)continue;throw o}throw r},T3=!1,$ye=(e={})=>Oye([async()=>{var r,n,o,i;if(e.profile??process.env[Rye.ENV_PROFILE])throw process.env[GA.ENV_KEY]&&process.env[GA.ENV_SECRET]&&(T3||(((r=e.logger)!=null&&r.warn&&((o=(n=e.logger)==null?void 0:n.constructor)==null?void 0:o.name)!=="NoOpLogger"?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
54
+ Multiple credential sources detected:
55
+ Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
56
+ This SDK will proceed with the AWS_PROFILE value.
57
+
58
+ However, a future version may change this behavior to prefer the ENV static credentials.
59
+ Please ensure that your environment only sets either the AWS_PROFILE or the
60
+ AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
61
+ `),T3=!0)),new Dd.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:e.logger,tryNextLink:!0});return(i=e.logger)==null||i.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),GA.fromEnv(e)()},async t=>{var c;(c=e.logger)==null||c.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:o,ssoRoleName:i,ssoSession:s}=e;if(!r&&!n&&!o&&!i&&!s)throw new Dd.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:e.logger});let{fromSSO:a}=await Promise.resolve().then(()=>C(tA()));return a(e)(t)},async t=>{var n;(n=e.logger)==null||n.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:r}=await Promise.resolve().then(()=>C(x3()));return r(e)(t)},async t=>{var n;(n=e.logger)==null||n.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:r}=await Promise.resolve().then(()=>C(FA()));return r(e)(t)},async t=>{var n;(n=e.logger)==null||n.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:r}=await Promise.resolve().then(()=>C(UA()));return r(e)(t)},async()=>{var t;return(t=e.logger)==null||t.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Pye(e))()},async()=>{throw new Dd.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:e.logger})}],w3),Mye=e=>(e==null?void 0:e.expiration)!==void 0,w3=e=>(e==null?void 0:e.expiration)!==void 0&&e.expiration.getTime()-Date.now()<3e5;Hy.credentialsTreatedAsExpired=w3;Hy.credentialsWillNeedRefresh=Mye;Hy.defaultProvider=$ye});var P3=b(R3=>{"use strict";var KA=(ss(),ie(Rw)),A3=(We(),ie(Zu)),I3=Te(),C3=jt(),VA=class extends KA.JsonCodec{constructor(){super({timestampFormat:{useTrait:!0,default:7},jsonName:!1})}createSerializer(){let t=new WA(this.settings);return t.setSerdeContext(this.serdeContext),t}createDeserializer(){let t=new zA(this.settings);return t.setSerdeContext(this.serdeContext),t}},D3="com.amazonaws.dynamodb#AttributeValue",WA=class extends KA.JsonShapeSerializer{_write(t,r,n){var i;let o=A3.NormalizedSchema.of(t);if(o.isStructSchema()&&o.getName(!0)===D3&&r&&typeof r=="object"){let s=r,a=I3._json(s),c=((i=this.serdeContext)==null?void 0:i.base64Encoder)??C3.toBase64;if(s.B instanceof Uint8Array&&(a.B=c(s.B)),Array.isArray(s.BS)&&(a.BS=s.BS.map(c)),Array.isArray(s.L)&&(a.L=s.L.filter(l=>l!=null).map(l=>this._write(o,l,n))),s.M&&typeof s.M=="object"){a.M={};for(let[l,d]of Object.entries(s.M))d!=null&&(a.M[l]=this._write(o,d,n))}return a}return super._write(o,r,n)}},zA=class extends KA.JsonShapeDeserializer{_read(t,r){var o;let n=A3.NormalizedSchema.of(t);if(n.isStructSchema()&&n.getName(!0)===D3&&r&&typeof r=="object"){let i=r,s=I3._json(i),a=((o=this.serdeContext)==null?void 0:o.base64Decoder)??C3.fromBase64;if(typeof i.B=="string"&&(s.B=a(i.B)),Array.isArray(i.BS)&&(s.BS=i.BS.map(a)),Array.isArray(i.L)&&(s.L=i.L.map(c=>this._read(n,c))),i.M&&typeof i.M=="object"){s.M={};for(let[c,l]of Object.entries(i.M))s.M[c]=this._read(n,l)}return s}return super._read(n,r)}};R3.DynamoDBJsonCodec=VA});var rH=b(Wy=>{"use strict";Object.defineProperty(Wy,"__esModule",{value:!0});Wy.ruleSet=void 0;var XA="required",Ee="type",Dt="rules",ot="conditions",ae="fn",ce="argv",ke="ref",Vy="assign",wo="url",Ao="properties",Io="headers",Z3="metricValues",Lye=!1,Rt="error",yr="stringEquals",O3="https://dynamodb.{Region}.{PartitionResult#dualStackDnsSuffix}",Fr="endpoint",kt="tree",JA="dynamodb",Rd={[XA]:!1,[Ee]:"string"},N3={[XA]:!0,default:!1,[Ee]:"boolean"},$3={[ae]:"isSet",[ce]:[{[ke]:"Endpoint"}]},kye={[ke]:"Endpoint"},M3={[ae]:"isSet",[ce]:[{[ke]:"Region"}]},eH={[ke]:"Region"},L3={[ae]:"aws.partition",[ce]:[eH],[Vy]:"PartitionResult"},k3={[ot]:[{[ae]:"booleanEquals",[ce]:[{[ke]:"UseFIPS"},!0]}],[Rt]:"Invalid Configuration: FIPS and custom endpoint are not supported",[Ee]:Rt},Vc={[ae]:"booleanEquals",[ce]:[{[ke]:"UseFIPS"},!0]},F3={[ot]:[{[ae]:"booleanEquals",[ce]:[{[ke]:"UseDualStack"},!0]}],[Rt]:"Invalid Configuration: Dualstack and custom endpoint are not supported",[Ee]:Rt},tH={[ae]:"booleanEquals",[ce]:[{[ke]:"UseDualStack"},!0]},B3={[Fr]:{[wo]:"{Endpoint}",[Ao]:{},[Io]:{}},[Ee]:Fr},li={},U3={[ae]:"booleanEquals",[ce]:[{[ae]:"getAttr",[ce]:[{[ke]:"PartitionResult"},"supportsFIPS"]},!0]},j3={[ae]:"booleanEquals",[ce]:[{[ae]:"getAttr",[ce]:[{[ke]:"PartitionResult"},"supportsDualStack"]},!0]},YA={[ot]:[{[ae]:"isSet",[ce]:[{[ke]:"AccountIdEndpointMode"}]},{[ae]:yr,[ce]:[{[ke]:"AccountIdEndpointMode"},"required"]}],[Dt]:[{[Rt]:"Invalid Configuration: AccountIdEndpointMode is required and FIPS is enabled, but FIPS account endpoints are not supported",[Ee]:Rt}],[Ee]:kt},Pd={[ae]:"getAttr",[ce]:[{[ke]:"PartitionResult"},"name"]},q3={[Fr]:{[wo]:"https://dynamodb.{Region}.{PartitionResult#dnsSuffix}",[Ao]:{},[Io]:{}},[Ee]:Fr},G3={[wo]:"https://{ParsedArn#accountId}.ddb.{Region}.{PartitionResult#dualStackDnsSuffix}",[Ao]:{[Z3]:["O"]},[Io]:{}},QA={[Z3]:["O"]},H3={[Rt]:"Credentials-sourced account ID parameter is invalid",[Ee]:Rt},V3={[ot]:[{[ae]:"isSet",[ce]:[{[ke]:"AccountIdEndpointMode"}]},{[ae]:yr,[ce]:[{[ke]:"AccountIdEndpointMode"},"required"]}],[Dt]:[{[ot]:[{[ae]:"not",[ce]:[Vc]}],[Dt]:[{[ot]:[{[ae]:yr,[ce]:[Pd,"aws"]}],[Dt]:[{[Rt]:"AccountIdEndpointMode is required but no AccountID was provided or able to be loaded",[Ee]:Rt}],[Ee]:kt},{[Rt]:"Invalid Configuration: AccountIdEndpointMode is required but account endpoints are not supported in this partition",[Ee]:Rt}],[Ee]:kt},{[Rt]:"Invalid Configuration: AccountIdEndpointMode is required and FIPS is enabled, but FIPS account endpoints are not supported",[Ee]:Rt}],[Ee]:kt},W3={[wo]:"https://{ParsedArn#accountId}.ddb.{Region}.{PartitionResult#dnsSuffix}",[Ao]:QA,[Io]:{}},z3=[Vc],K3=[tH],Y3=[{[ae]:"isSet",[ce]:[{[ke]:"AccountIdEndpointMode"}]},{[ae]:"not",[ce]:[{[ae]:yr,[ce]:[{[ke]:"AccountIdEndpointMode"},"disabled"]}]},{[ae]:yr,[ce]:[Pd,"aws"]},{[ae]:"not",[ce]:[Vc]},{[ae]:"isSet",[ce]:[{[ke]:"ResourceArn"}]},{[ae]:"aws.parseArn",[ce]:[{[ke]:"ResourceArn"}],[Vy]:"ParsedArn"},{[ae]:yr,[ce]:[{[ae]:"getAttr",[ce]:[{[ke]:"ParsedArn"},"service"]},JA]},{[ae]:"isValidHostLabel",[ce]:[{[ae]:"getAttr",[ce]:[{[ke]:"ParsedArn"},"region"]},!1]},{[ae]:yr,[ce]:[{[ae]:"getAttr",[ce]:[{[ke]:"ParsedArn"},"region"]},"{Region}"]},{[ae]:"isValidHostLabel",[ce]:[{[ae]:"getAttr",[ce]:[{[ke]:"ParsedArn"},"accountId"]},!1]}],Q3=[{[ae]:"isSet",[ce]:[{[ke]:"AccountIdEndpointMode"}]},{[ae]:"not",[ce]:[{[ae]:yr,[ce]:[{[ke]:"AccountIdEndpointMode"},"disabled"]}]},{[ae]:yr,[ce]:[Pd,"aws"]},{[ae]:"not",[ce]:[Vc]},{[ae]:"isSet",[ce]:[{[ke]:"ResourceArnList"}]},{[ae]:"getAttr",[ce]:[{[ke]:"ResourceArnList"},"[0]"],[Vy]:"FirstArn"},{[ae]:"aws.parseArn",[ce]:[{[ke]:"FirstArn"}],[Vy]:"ParsedArn"},{[ae]:yr,[ce]:[{[ae]:"getAttr",[ce]:[{[ke]:"ParsedArn"},"service"]},JA]},{[ae]:"isValidHostLabel",[ce]:[{[ae]:"getAttr",[ce]:[{[ke]:"ParsedArn"},"region"]},!1]},{[ae]:yr,[ce]:[{[ae]:"getAttr",[ce]:[{[ke]:"ParsedArn"},"region"]},"{Region}"]},{[ae]:"isValidHostLabel",[ce]:[{[ae]:"getAttr",[ce]:[{[ke]:"ParsedArn"},"accountId"]},!1]}],X3=[{[ae]:"isSet",[ce]:[{[ke]:"AccountIdEndpointMode"}]},{[ae]:"not",[ce]:[{[ae]:yr,[ce]:[{[ke]:"AccountIdEndpointMode"},"disabled"]}]},{[ae]:yr,[ce]:[Pd,"aws"]},{[ae]:"not",[ce]:[Vc]},{[ae]:"isSet",[ce]:[{[ke]:"AccountId"}]}],J3=[{[ae]:"isValidHostLabel",[ce]:[{[ke]:"AccountId"},!1]}],Fye={version:"1.0",parameters:{Region:Rd,UseDualStack:N3,UseFIPS:N3,Endpoint:Rd,AccountId:Rd,AccountIdEndpointMode:Rd,ResourceArn:Rd,ResourceArnList:{[XA]:Lye,[Ee]:"stringArray"}},[Dt]:[{[ot]:[$3,M3,L3],[Dt]:[k3,F3,{[ot]:[{[ae]:yr,[ce]:[kye,O3]}],error:"Endpoint override is not supported for dual-stack endpoints. Please enable dual-stack functionality by enabling the configuration. For more details, see: https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html",[Ee]:Rt},B3],[Ee]:kt},{[ot]:[$3],[Dt]:[k3,F3,B3],[Ee]:kt},{[ot]:[M3],[Dt]:[{[ot]:[L3],[Dt]:[{[ot]:[{[ae]:yr,[ce]:[eH,"local"]}],[Dt]:[{[ot]:z3,error:"Invalid Configuration: FIPS and local endpoint are not supported",[Ee]:Rt},{[ot]:K3,error:"Invalid Configuration: Dualstack and local endpoint are not supported",[Ee]:Rt},{endpoint:{[wo]:"http://localhost:8000",[Ao]:{authSchemes:[{name:"sigv4",signingName:JA,signingRegion:"us-east-1"}]},[Io]:li},[Ee]:Fr}],[Ee]:kt},{[ot]:[Vc,tH],[Dt]:[{[ot]:[U3,j3],[Dt]:[YA,{endpoint:{[wo]:"https://dynamodb-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[Ao]:li,[Io]:li},[Ee]:Fr}],[Ee]:kt},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[Ee]:Rt}],[Ee]:kt},{[ot]:z3,[Dt]:[{[ot]:[U3],[Dt]:[{[ot]:[{[ae]:yr,[ce]:[Pd,"aws-us-gov"]}],[Dt]:[YA,q3],[Ee]:kt},YA,{endpoint:{[wo]:"https://dynamodb-fips.{Region}.{PartitionResult#dnsSuffix}",[Ao]:li,[Io]:li},[Ee]:Fr}],[Ee]:kt},{error:"FIPS is enabled but this partition does not support FIPS",[Ee]:Rt}],[Ee]:kt},{[ot]:K3,[Dt]:[{[ot]:[j3],[Dt]:[{[ot]:Y3,endpoint:G3,[Ee]:Fr},{[ot]:Q3,endpoint:G3,[Ee]:Fr},{[ot]:X3,[Dt]:[{[ot]:J3,[Dt]:[{endpoint:{[wo]:"https://{AccountId}.ddb.{Region}.{PartitionResult#dualStackDnsSuffix}",[Ao]:QA,[Io]:li},[Ee]:Fr}],[Ee]:kt},H3],[Ee]:kt},V3,{endpoint:{[wo]:O3,[Ao]:li,[Io]:li},[Ee]:Fr}],[Ee]:kt},{error:"DualStack is enabled but this partition does not support DualStack",[Ee]:Rt}],[Ee]:kt},{[ot]:Y3,endpoint:W3,[Ee]:Fr},{[ot]:Q3,endpoint:W3,[Ee]:Fr},{[ot]:X3,[Dt]:[{[ot]:J3,[Dt]:[{endpoint:{[wo]:"https://{AccountId}.ddb.{Region}.{PartitionResult#dnsSuffix}",[Ao]:QA,[Io]:li},[Ee]:Fr}],[Ee]:kt},H3],[Ee]:kt},V3,q3],[Ee]:kt}],[Ee]:kt},{error:"Invalid Configuration: Missing Region",[Ee]:Rt}]};Wy.ruleSet=Fye});var nH=b(zy=>{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});zy.defaultEndpointResolver=void 0;var Bye=Ys(),ZA=ki(),Uye=rH(),jye=new ZA.EndpointCache({size:50,params:["AccountId","AccountIdEndpointMode","Endpoint","Region","ResourceArn","ResourceArnList","UseDualStack","UseFIPS"]}),qye=(e,t={})=>jye.get(e,()=>(0,ZA.resolveEndpoint)(Uye.ruleSet,{endpointParams:e,logger:t.logger}));zy.defaultEndpointResolver=qye;ZA.customEndpointFunctions.aws=Bye.awsEndpointFunctions});var sH=b(Ky=>{"use strict";Object.defineProperty(Ky,"__esModule",{value:!0});Ky.getRuntimeConfig=void 0;var Gye=(Xt(),ie(ml)),Hye=(ss(),ie(Rw)),Vye=P3(),Wye=Te(),zye=no(),oH=jt(),iH=Kt(),Kye=ev(),Yye=nH(),Qye=kT(),Xye=e=>({apiVersion:"2012-08-10",base64Decoder:(e==null?void 0:e.base64Decoder)??oH.fromBase64,base64Encoder:(e==null?void 0:e.base64Encoder)??oH.toBase64,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??Yye.defaultEndpointResolver,extensions:(e==null?void 0:e.extensions)??[],httpAuthSchemeProvider:(e==null?void 0:e.httpAuthSchemeProvider)??Kye.defaultDynamoDBHttpAuthSchemeProvider,httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Gye.AwsSdkSigV4Signer}],logger:(e==null?void 0:e.logger)??new Wye.NoOpLogger,protocol:(e==null?void 0:e.protocol)??Hye.AwsJson1_0Protocol,protocolSettings:(e==null?void 0:e.protocolSettings)??{defaultNamespace:"com.amazonaws.dynamodb",errorTypeRegistries:Qye.errorTypeRegistries,xmlNamespace:"http://dynamodb.amazonaws.com/doc/2012-08-10/",version:"2012-08-10",serviceTarget:"DynamoDB_20120810",jsonCodec:new Vye.DynamoDBJsonCodec},serviceId:(e==null?void 0:e.serviceId)??"DynamoDB",urlParser:(e==null?void 0:e.urlParser)??zye.parseUrl,utf8Decoder:(e==null?void 0:e.utf8Decoder)??iH.fromUtf8,utf8Encoder:(e==null?void 0:e.utf8Encoder)??iH.toUtf8});Ky.getRuntimeConfig=Xye});var dH=b(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});Qy.getRuntimeConfig=void 0;var Jye=(Mi(),ie($i)),Zye=Jye.__importDefault(Zk()),ege=(r0(),ie(t0)),tge=(Yt(),ie(Nn)),rge=(Xt(),ie(ml)),nge=HA(),oge=m0(),aH=bc(),Yy=$r(),ige=xc(),cH=Mn(),di=co(),uH=Oi(),lH=Te(),sge=vc(),age=Tc(),cge=Ui(),uge=sH(),lge=e=>{(0,lH.emitWarningIfUnsupportedVersion)(process.version);let t=(0,age.resolveDefaultsModeConfig)(e),r=()=>t().then(lH.loadConfigsForDefaultMode),n=(0,uge.getRuntimeConfig)(e);(0,tge.emitWarningIfUnsupportedVersion)(process.version);let o={profile:e==null?void 0:e.profile,logger:n.logger};return{...n,...e,runtime:"node",defaultsMode:t,accountIdEndpointMode:(e==null?void 0:e.accountIdEndpointMode)??(0,di.loadConfig)(ege.NODE_ACCOUNT_ID_ENDPOINT_MODE_CONFIG_OPTIONS,o),authSchemePreference:(e==null?void 0:e.authSchemePreference)??(0,di.loadConfig)(rge.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,o),bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??sge.calculateBodyLength,credentialDefaultProvider:(e==null?void 0:e.credentialDefaultProvider)??nge.defaultProvider,defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??(0,aH.createDefaultUserAgentProvider)({serviceId:n.serviceId,clientVersion:Zye.default.version}),endpointDiscoveryEnabledProvider:(e==null?void 0:e.endpointDiscoveryEnabledProvider)??(0,di.loadConfig)(oge.NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS,o),maxAttempts:(e==null?void 0:e.maxAttempts)??(0,di.loadConfig)(cH.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:(e==null?void 0:e.region)??(0,di.loadConfig)(Yy.NODE_REGION_CONFIG_OPTIONS,{...Yy.NODE_REGION_CONFIG_FILE_OPTIONS,...o}),requestHandler:uH.NodeHttpHandler.create((e==null?void 0:e.requestHandler)??r),retryMode:(e==null?void 0:e.retryMode)??(0,di.loadConfig)({...cH.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||cge.DEFAULT_RETRY_MODE},e),sha256:(e==null?void 0:e.sha256)??ige.Hash.bind(null,"sha256"),streamCollector:(e==null?void 0:e.streamCollector)??uH.streamCollector,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(0,di.loadConfig)(Yy.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,o),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(0,di.loadConfig)(Yy.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,o),userAgentAppId:(e==null?void 0:e.userAgentAppId)??(0,di.loadConfig)(aH.NODE_APP_ID_CONFIG_OPTIONS,o)}};Qy.getRuntimeConfig=lge});var hH=b(Cr=>{"use strict";var Xy=()=>{let e=new WeakSet;return(t,r)=>{if(typeof r=="object"&&r!==null){if(e.has(r))return"[Circular]";e.add(r)}return r}},dge=e=>new Promise(t=>setTimeout(t,e*1e3)),mH={minDelay:2,maxDelay:120};Cr.WaiterState=void 0;(function(e){e.ABORTED="ABORTED",e.FAILURE="FAILURE",e.SUCCESS="SUCCESS",e.RETRY="RETRY",e.TIMEOUT="TIMEOUT"})(Cr.WaiterState||(Cr.WaiterState={}));var fge=e=>{if(e.state===Cr.WaiterState.ABORTED){let t=new Error(`${JSON.stringify({...e,reason:"Request was aborted"},Xy())}`);throw t.name="AbortError",t}else if(e.state===Cr.WaiterState.TIMEOUT){let t=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"},Xy())}`);throw t.name="TimeoutError",t}else if(e.state!==Cr.WaiterState.SUCCESS)throw new Error(`${JSON.stringify(e,Xy())}`);return e},pge=(e,t,r,n)=>{if(n>r)return t;let o=e*2**(n-1);return mge(e,o)},mge=(e,t)=>e+Math.random()*(t-e),hge=async({minDelay:e,maxDelay:t,maxWaitTime:r,abortController:n,client:o,abortSignal:i},s,a)=>{var _;let c={},{state:l,reason:d}=await a(o,s);if(d){let E=fH(d);c[E]|=0,c[E]+=1}if(l!==Cr.WaiterState.RETRY)return{state:l,reason:d,observedResponses:c};let f=1,m=Date.now()+r*1e3,h=Math.log(t/e)/Math.log(2)+1;for(;;){if((_=n==null?void 0:n.signal)!=null&&_.aborted||i!=null&&i.aborted){let A="AbortController signal aborted.";return c[A]|=0,c[A]+=1,{state:Cr.WaiterState.ABORTED,observedResponses:c}}let E=pge(e,t,h,f);if(Date.now()+E*1e3>m)return{state:Cr.WaiterState.TIMEOUT,observedResponses:c};await dge(E);let{state:T,reason:I}=await a(o,s);if(I){let A=fH(I);c[A]|=0,c[A]+=1}if(T!==Cr.WaiterState.RETRY)return{state:T,reason:I,observedResponses:c};f+=1}},fH=e=>{var t,r;return e!=null&&e.$responseBodyText?`Deserialization error for body: ${e.$responseBodyText}`:(t=e==null?void 0:e.$metadata)!=null&&t.httpStatusCode?e.$response||e.message?`${((r=e.$response)==null?void 0:r.statusCode)??e.$metadata.httpStatusCode??"Unknown"}: ${e.message}`:`${e.$metadata.httpStatusCode}: OK`:String((e==null?void 0:e.message)??JSON.stringify(e,Xy())??"Unknown")},yge=e=>{if(e.maxWaitTime<=0)throw new Error("WaiterConfiguration.maxWaitTime must be greater than 0");if(e.minDelay<=0)throw new Error("WaiterConfiguration.minDelay must be greater than 0");if(e.maxDelay<=0)throw new Error("WaiterConfiguration.maxDelay must be greater than 0");if(e.maxWaitTime<=e.minDelay)throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);if(e.maxDelay<e.minDelay)throw new Error(`WaiterConfiguration.maxDelay [${e.maxDelay}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`)},pH=e=>{let t,r=new Promise(n=>{t=()=>n({state:Cr.WaiterState.ABORTED}),typeof e.addEventListener=="function"?e.addEventListener("abort",t):e.onabort=t});return{clearListener(){typeof e.removeEventListener=="function"&&e.removeEventListener("abort",t)},aborted:r}},gge=async(e,t,r)=>{var s;let n={...mH,...e};yge(n);let o=[hge(n,t,r)],i=[];if(e.abortSignal){let{aborted:a,clearListener:c}=pH(e.abortSignal);i.push(c),o.push(a)}if((s=e.abortController)!=null&&s.signal){let{aborted:a,clearListener:c}=pH(e.abortController.signal);i.push(c),o.push(a)}return Promise.race(o).then(a=>{for(let c of i)c();return a})};Cr.checkExceptions=fge;Cr.createWaiter=gge;Cr.waiterServiceDefaults=mH});var eI=b(k=>{"use strict";var _ge=(r0(),ie(t0)),Ege=m0(),yH=Ua(),Sge=ja(),bge=Ga(),gH=Qs(),xge=$r(),fi=(ar(),ie(al)),vge=(We(),ie(Zu)),Tge=rc(),de=$n(),_H=Mn(),ne=Te(),EH=ev(),se=kT(),wge=dH(),SH=oa(),bH=nt(),Fe=hH(),Jy=kv(),Age=Tm(),Ige=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"dynamodb"}),fe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},AccountId:{type:"builtInParams",name:"accountId"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"},AccountIdEndpointMode:{type:"builtInParams",name:"accountIdEndpointMode"}},Od=class extends ne.Command.classBuilder().ep(fe).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeEndpoints",{}).n("DynamoDBClient","DescribeEndpointsCommand").sc(se.DescribeEndpoints$).build(){},Cge=e=>{let t=e.httpAuthSchemes,r=e.httpAuthSchemeProvider,n=e.credentials;return{setHttpAuthScheme(o){let i=t.findIndex(s=>s.schemeId===o.schemeId);i===-1?t.push(o):t.splice(i,1,o)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(o){r=o},httpAuthSchemeProvider(){return r},setCredentials(o){n=o},credentials(){return n}}},Dge=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Rge=(e,t)=>{let r=Object.assign(SH.getAwsRegionExtensionConfiguration(e),ne.getDefaultExtensionConfiguration(e),bH.getHttpHandlerExtensionConfiguration(e),Cge(e));return t.forEach(n=>n.configure(r)),Object.assign(e,SH.resolveAwsRegionExtensionConfiguration(r),ne.resolveDefaultRuntimeConfig(r),bH.resolveHttpHandlerRuntimeConfig(r),Dge(r))},Co=class extends ne.Client{config;constructor(...[t]){let r=wge.getRuntimeConfig(t||{});super(r),this.initConfig=r;let n=Ige(r),o=_ge.resolveAccountIdEndpointModeConfig(n),i=gH.resolveUserAgentConfig(o),s=_H.resolveRetryConfig(i),a=xge.resolveRegionConfig(s),c=yH.resolveHostHeaderConfig(a),l=de.resolveEndpointConfig(c),d=EH.resolveHttpAuthSchemeConfig(l),f=Ege.resolveEndpointDiscoveryConfig(d,{endpointDiscoveryCommandCtor:Od}),m=Rge(f,(t==null?void 0:t.extensions)||[]);this.config=m,this.middlewareStack.use(vge.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(gH.getUserAgentPlugin(this.config)),this.middlewareStack.use(_H.getRetryPlugin(this.config)),this.middlewareStack.use(Tge.getContentLengthPlugin(this.config)),this.middlewareStack.use(yH.getHostHeaderPlugin(this.config)),this.middlewareStack.use(Sge.getLoggerPlugin(this.config)),this.middlewareStack.use(bge.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(fi.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:EH.defaultDynamoDBHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async h=>new fi.DefaultIdentityProviderConfig({"aws.auth#sigv4":h.credentials})})),this.middlewareStack.use(fi.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},Zy=class extends ne.Command.classBuilder().ep(fe).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","BatchExecuteStatement",{}).n("DynamoDBClient","BatchExecuteStatementCommand").sc(se.BatchExecuteStatement$).build(){},eg=class extends ne.Command.classBuilder().ep({...fe,ResourceArnList:{type:"operationContextParams",get:t=>Object.keys((t==null?void 0:t.RequestItems)??{})}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","BatchGetItem",{}).n("DynamoDBClient","BatchGetItemCommand").sc(se.BatchGetItem$).build(){},tg=class extends ne.Command.classBuilder().ep({...fe,ResourceArnList:{type:"operationContextParams",get:t=>Object.keys((t==null?void 0:t.RequestItems)??{})}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","BatchWriteItem",{}).n("DynamoDBClient","BatchWriteItemCommand").sc(se.BatchWriteItem$).build(){},rg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","CreateBackup",{}).n("DynamoDBClient","CreateBackupCommand").sc(se.CreateBackup$).build(){},ng=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"GlobalTableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","CreateGlobalTable",{}).n("DynamoDBClient","CreateGlobalTableCommand").sc(se.CreateGlobalTable$).build(){},og=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","CreateTable",{}).n("DynamoDBClient","CreateTableCommand").sc(se.CreateTable$).build(){},ig=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"BackupArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DeleteBackup",{}).n("DynamoDBClient","DeleteBackupCommand").sc(se.DeleteBackup$).build(){},sg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DeleteItem",{}).n("DynamoDBClient","DeleteItemCommand").sc(se.DeleteItem$).build(){},ag=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"ResourceArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DeleteResourcePolicy",{}).n("DynamoDBClient","DeleteResourcePolicyCommand").sc(se.DeleteResourcePolicy$).build(){},cg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DeleteTable",{}).n("DynamoDBClient","DeleteTableCommand").sc(se.DeleteTable$).build(){},ug=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"BackupArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeBackup",{}).n("DynamoDBClient","DescribeBackupCommand").sc(se.DescribeBackup$).build(){},lg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeContinuousBackups",{}).n("DynamoDBClient","DescribeContinuousBackupsCommand").sc(se.DescribeContinuousBackups$).build(){},Nd=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeContributorInsights",{}).n("DynamoDBClient","DescribeContributorInsightsCommand").sc(se.DescribeContributorInsights$).build(){},$d=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"ExportArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeExport",{}).n("DynamoDBClient","DescribeExportCommand").sc(se.DescribeExport$).build(){},dg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"GlobalTableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeGlobalTable",{}).n("DynamoDBClient","DescribeGlobalTableCommand").sc(se.DescribeGlobalTable$).build(){},fg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"GlobalTableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeGlobalTableSettings",{}).n("DynamoDBClient","DescribeGlobalTableSettingsCommand").sc(se.DescribeGlobalTableSettings$).build(){},Md=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"ImportArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeImport",{}).n("DynamoDBClient","DescribeImportCommand").sc(se.DescribeImport$).build(){},Ld=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeKinesisStreamingDestination",{}).n("DynamoDBClient","DescribeKinesisStreamingDestinationCommand").sc(se.DescribeKinesisStreamingDestination$).build(){},pg=class extends ne.Command.classBuilder().ep(fe).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeLimits",{}).n("DynamoDBClient","DescribeLimitsCommand").sc(se.DescribeLimits$).build(){},Wc=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeTable",{}).n("DynamoDBClient","DescribeTableCommand").sc(se.DescribeTable$).build(){},mg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeTableReplicaAutoScaling",{}).n("DynamoDBClient","DescribeTableReplicaAutoScalingCommand").sc(se.DescribeTableReplicaAutoScaling$).build(){},hg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DescribeTimeToLive",{}).n("DynamoDBClient","DescribeTimeToLiveCommand").sc(se.DescribeTimeToLive$).build(){},yg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","DisableKinesisStreamingDestination",{}).n("DynamoDBClient","DisableKinesisStreamingDestinationCommand").sc(se.DisableKinesisStreamingDestination$).build(){},gg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","EnableKinesisStreamingDestination",{}).n("DynamoDBClient","EnableKinesisStreamingDestinationCommand").sc(se.EnableKinesisStreamingDestination$).build(){},_g=class extends ne.Command.classBuilder().ep(fe).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ExecuteStatement",{}).n("DynamoDBClient","ExecuteStatementCommand").sc(se.ExecuteStatement$).build(){},Eg=class extends ne.Command.classBuilder().ep(fe).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ExecuteTransaction",{}).n("DynamoDBClient","ExecuteTransactionCommand").sc(se.ExecuteTransaction$).build(){},Sg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ExportTableToPointInTime",{}).n("DynamoDBClient","ExportTableToPointInTimeCommand").sc(se.ExportTableToPointInTime$).build(){},bg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","GetItem",{}).n("DynamoDBClient","GetItemCommand").sc(se.GetItem$).build(){},xg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"ResourceArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","GetResourcePolicy",{}).n("DynamoDBClient","GetResourcePolicyCommand").sc(se.GetResourcePolicy$).build(){},vg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"operationContextParams",get:t=>{var r;return(r=t==null?void 0:t.TableCreationParameters)==null?void 0:r.TableName}}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ImportTable",{}).n("DynamoDBClient","ImportTableCommand").sc(se.ImportTable$).build(){},Tg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListBackups",{}).n("DynamoDBClient","ListBackupsCommand").sc(se.ListBackups$).build(){},kd=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListContributorInsights",{}).n("DynamoDBClient","ListContributorInsightsCommand").sc(se.ListContributorInsights$).build(){},Fd=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListExports",{}).n("DynamoDBClient","ListExportsCommand").sc(se.ListExports$).build(){},wg=class extends ne.Command.classBuilder().ep(fe).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListGlobalTables",{}).n("DynamoDBClient","ListGlobalTablesCommand").sc(se.ListGlobalTables$).build(){},Bd=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListImports",{}).n("DynamoDBClient","ListImportsCommand").sc(se.ListImports$).build(){},Ud=class extends ne.Command.classBuilder().ep(fe).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListTables",{}).n("DynamoDBClient","ListTablesCommand").sc(se.ListTables$).build(){},Ag=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"ResourceArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","ListTagsOfResource",{}).n("DynamoDBClient","ListTagsOfResourceCommand").sc(se.ListTagsOfResource$).build(){},Ig=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","PutItem",{}).n("DynamoDBClient","PutItemCommand").sc(se.PutItem$).build(){},Cg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"ResourceArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","PutResourcePolicy",{}).n("DynamoDBClient","PutResourcePolicyCommand").sc(se.PutResourcePolicy$).build(){},jd=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","Query",{}).n("DynamoDBClient","QueryCommand").sc(se.Query$).build(){},Dg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TargetTableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","RestoreTableFromBackup",{}).n("DynamoDBClient","RestoreTableFromBackupCommand").sc(se.RestoreTableFromBackup$).build(){},Rg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TargetTableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","RestoreTableToPointInTime",{}).n("DynamoDBClient","RestoreTableToPointInTimeCommand").sc(se.RestoreTableToPointInTime$).build(){},qd=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","Scan",{}).n("DynamoDBClient","ScanCommand").sc(se.Scan$).build(){},Pg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"ResourceArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","TagResource",{}).n("DynamoDBClient","TagResourceCommand").sc(se.TagResource$).build(){},Og=class extends ne.Command.classBuilder().ep({...fe,ResourceArnList:{type:"operationContextParams",get:t=>{var r;return(r=t==null?void 0:t.TransactItems)==null?void 0:r.map(n=>{var o;return(o=n==null?void 0:n.Get)==null?void 0:o.TableName})}}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","TransactGetItems",{}).n("DynamoDBClient","TransactGetItemsCommand").sc(se.TransactGetItems$).build(){},Ng=class extends ne.Command.classBuilder().ep({...fe,ResourceArnList:{type:"operationContextParams",get:t=>{var r;return(r=t==null?void 0:t.TransactItems)==null?void 0:r.map(n=>{var o,i,s,a;return[(o=n==null?void 0:n.ConditionCheck)==null?void 0:o.TableName,(i=n==null?void 0:n.Put)==null?void 0:i.TableName,(s=n==null?void 0:n.Delete)==null?void 0:s.TableName,(a=n==null?void 0:n.Update)==null?void 0:a.TableName].filter(c=>c)}).flat()}}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","TransactWriteItems",{}).n("DynamoDBClient","TransactWriteItemsCommand").sc(se.TransactWriteItems$).build(){},$g=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"ResourceArn"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UntagResource",{}).n("DynamoDBClient","UntagResourceCommand").sc(se.UntagResource$).build(){},Mg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateContinuousBackups",{}).n("DynamoDBClient","UpdateContinuousBackupsCommand").sc(se.UpdateContinuousBackups$).build(){},Lg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateContributorInsights",{}).n("DynamoDBClient","UpdateContributorInsightsCommand").sc(se.UpdateContributorInsights$).build(){},kg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"GlobalTableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateGlobalTable",{}).n("DynamoDBClient","UpdateGlobalTableCommand").sc(se.UpdateGlobalTable$).build(){},Fg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"GlobalTableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateGlobalTableSettings",{}).n("DynamoDBClient","UpdateGlobalTableSettingsCommand").sc(se.UpdateGlobalTableSettings$).build(){},Bg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateItem",{}).n("DynamoDBClient","UpdateItemCommand").sc(se.UpdateItem$).build(){},Ug=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateKinesisStreamingDestination",{}).n("DynamoDBClient","UpdateKinesisStreamingDestinationCommand").sc(se.UpdateKinesisStreamingDestination$).build(){},jg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateTable",{}).n("DynamoDBClient","UpdateTableCommand").sc(se.UpdateTable$).build(){},qg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateTableReplicaAutoScaling",{}).n("DynamoDBClient","UpdateTableReplicaAutoScalingCommand").sc(se.UpdateTableReplicaAutoScaling$).build(){},Gg=class extends ne.Command.classBuilder().ep({...fe,ResourceArn:{type:"contextParams",name:"TableName"}}).m(function(t,r,n,o){return[de.getEndpointPlugin(n,t.getEndpointParameterInstructions())]}).s("DynamoDB_20120810","UpdateTimeToLive",{}).n("DynamoDBClient","UpdateTimeToLiveCommand").sc(se.UpdateTimeToLive$).build(){},xH=fi.createPaginator(Co,kd,"NextToken","NextToken","MaxResults"),vH=fi.createPaginator(Co,Fd,"NextToken","NextToken","MaxResults"),TH=fi.createPaginator(Co,Bd,"NextToken","NextToken","PageSize"),wH=fi.createPaginator(Co,Ud,"ExclusiveStartTableName","LastEvaluatedTableName","Limit"),AH=fi.createPaginator(Co,jd,"ExclusiveStartKey","LastEvaluatedKey","Limit"),IH=fi.createPaginator(Co,qd,"ExclusiveStartKey","LastEvaluatedKey","Limit"),CH=async(e,t)=>{let r;try{let n=await e.send(new Nd(t));r=n;try{if(n.ContributorInsightsStatus==="ENABLED")return{state:Fe.WaiterState.SUCCESS,reason:r}}catch{}try{if(n.ContributorInsightsStatus==="FAILED")return{state:Fe.WaiterState.FAILURE,reason:r}}catch{}}catch(n){r=n}return{state:Fe.WaiterState.RETRY,reason:r}},Pge=async(e,t)=>{let r={minDelay:20,maxDelay:120};return Fe.createWaiter({...r,...e},t,CH)},DH=async(e,t)=>{let r={minDelay:20,maxDelay:120},n=await Fe.createWaiter({...r,...e},t,CH);return Fe.checkExceptions(n)},RH=async(e,t)=>{let r;try{let n=await e.send(new $d(t));r=n;try{if(n.ExportDescription.ExportStatus==="COMPLETED")return{state:Fe.WaiterState.SUCCESS,reason:r}}catch{}try{if(n.ExportDescription.ExportStatus==="FAILED")return{state:Fe.WaiterState.FAILURE,reason:r}}catch{}}catch(n){r=n}return{state:Fe.WaiterState.RETRY,reason:r}},Oge=async(e,t)=>{let r={minDelay:20,maxDelay:120};return Fe.createWaiter({...r,...e},t,RH)},PH=async(e,t)=>{let r={minDelay:20,maxDelay:120},n=await Fe.createWaiter({...r,...e},t,RH);return Fe.checkExceptions(n)},OH=async(e,t)=>{let r;try{let n=await e.send(new Md(t));r=n;try{if(n.ImportTableDescription.ImportStatus==="COMPLETED")return{state:Fe.WaiterState.SUCCESS,reason:r}}catch{}try{if(n.ImportTableDescription.ImportStatus==="FAILED")return{state:Fe.WaiterState.FAILURE,reason:r}}catch{}try{if(n.ImportTableDescription.ImportStatus==="CANCELLED")return{state:Fe.WaiterState.FAILURE,reason:r}}catch{}}catch(n){r=n}return{state:Fe.WaiterState.RETRY,reason:r}},Nge=async(e,t)=>{let r={minDelay:20,maxDelay:120};return Fe.createWaiter({...r,...e},t,OH)},NH=async(e,t)=>{let r={minDelay:20,maxDelay:120},n=await Fe.createWaiter({...r,...e},t,OH);return Fe.checkExceptions(n)},$H=async(e,t)=>{let r;try{let n=await e.send(new Ld(t));r=n;try{let o=()=>[].concat(...n.KinesisDataStreamDestinations).map(a=>a.DestinationStatus);for(let i of o())if(i=="ACTIVE")return{state:Fe.WaiterState.SUCCESS,reason:r}}catch{}try{if((()=>{let i=n.KinesisDataStreamDestinations.filter(s=>(s.DestinationStatus=="DISABLED"||s.DestinationStatus=="ENABLE_FAILED")&&(s.DestinationStatus=="ENABLE_FAILED"||s.DestinationStatus=="DISABLED"));return n.KinesisDataStreamDestinations.length>0&&i.length==n.KinesisDataStreamDestinations.length})()==!0)return{state:Fe.WaiterState.FAILURE,reason:r}}catch{}}catch(n){r=n}return{state:Fe.WaiterState.RETRY,reason:r}},$ge=async(e,t)=>{let r={minDelay:20,maxDelay:120};return Fe.createWaiter({...r,...e},t,$H)},MH=async(e,t)=>{let r={minDelay:20,maxDelay:120},n=await Fe.createWaiter({...r,...e},t,$H);return Fe.checkExceptions(n)},LH=async(e,t)=>{let r;try{let n=await e.send(new Wc(t));r=n;try{if(n.Table.TableStatus==="ACTIVE")return{state:Fe.WaiterState.SUCCESS,reason:r}}catch{}}catch(n){if(r=n,n.name&&n.name=="ResourceNotFoundException")return{state:Fe.WaiterState.RETRY,reason:r}}return{state:Fe.WaiterState.RETRY,reason:r}},Mge=async(e,t)=>{let r={minDelay:20,maxDelay:120};return Fe.createWaiter({...r,...e},t,LH)},kH=async(e,t)=>{let r={minDelay:20,maxDelay:120},n=await Fe.createWaiter({...r,...e},t,LH);return Fe.checkExceptions(n)},FH=async(e,t)=>{let r;try{r=await e.send(new Wc(t))}catch(n){if(r=n,n.name&&n.name=="ResourceNotFoundException")return{state:Fe.WaiterState.SUCCESS,reason:r}}return{state:Fe.WaiterState.RETRY,reason:r}},Lge=async(e,t)=>{let r={minDelay:20,maxDelay:120};return Fe.createWaiter({...r,...e},t,FH)},BH=async(e,t)=>{let r={minDelay:20,maxDelay:120},n=await Fe.createWaiter({...r,...e},t,FH);return Fe.checkExceptions(n)},kge={BatchExecuteStatementCommand:Zy,BatchGetItemCommand:eg,BatchWriteItemCommand:tg,CreateBackupCommand:rg,CreateGlobalTableCommand:ng,CreateTableCommand:og,DeleteBackupCommand:ig,DeleteItemCommand:sg,DeleteResourcePolicyCommand:ag,DeleteTableCommand:cg,DescribeBackupCommand:ug,DescribeContinuousBackupsCommand:lg,DescribeContributorInsightsCommand:Nd,DescribeEndpointsCommand:Od,DescribeExportCommand:$d,DescribeGlobalTableCommand:dg,DescribeGlobalTableSettingsCommand:fg,DescribeImportCommand:Md,DescribeKinesisStreamingDestinationCommand:Ld,DescribeLimitsCommand:pg,DescribeTableCommand:Wc,DescribeTableReplicaAutoScalingCommand:mg,DescribeTimeToLiveCommand:hg,DisableKinesisStreamingDestinationCommand:yg,EnableKinesisStreamingDestinationCommand:gg,ExecuteStatementCommand:_g,ExecuteTransactionCommand:Eg,ExportTableToPointInTimeCommand:Sg,GetItemCommand:bg,GetResourcePolicyCommand:xg,ImportTableCommand:vg,ListBackupsCommand:Tg,ListContributorInsightsCommand:kd,ListExportsCommand:Fd,ListGlobalTablesCommand:wg,ListImportsCommand:Bd,ListTablesCommand:Ud,ListTagsOfResourceCommand:Ag,PutItemCommand:Ig,PutResourcePolicyCommand:Cg,QueryCommand:jd,RestoreTableFromBackupCommand:Dg,RestoreTableToPointInTimeCommand:Rg,ScanCommand:qd,TagResourceCommand:Pg,TransactGetItemsCommand:Og,TransactWriteItemsCommand:Ng,UntagResourceCommand:$g,UpdateContinuousBackupsCommand:Mg,UpdateContributorInsightsCommand:Lg,UpdateGlobalTableCommand:kg,UpdateGlobalTableSettingsCommand:Fg,UpdateItemCommand:Bg,UpdateKinesisStreamingDestinationCommand:Ug,UpdateTableCommand:jg,UpdateTableReplicaAutoScalingCommand:qg,UpdateTimeToLiveCommand:Gg},Fge={paginateListContributorInsights:xH,paginateListExports:vH,paginateListImports:TH,paginateListTables:wH,paginateQuery:AH,paginateScan:IH},Bge={waitUntilContributorInsightsEnabled:DH,waitUntilExportCompleted:PH,waitUntilImportCompleted:NH,waitUntilKinesisStreamingDestinationActive:MH,waitUntilTableExists:kH,waitUntilTableNotExists:BH},Hg=class extends Co{};ne.createAggregatedClient(kge,Hg,{paginators:Fge,waiters:Bge});var Uge={MICROSECOND:"MICROSECOND",MILLISECOND:"MILLISECOND"},jge={ADD:"ADD",DELETE:"DELETE",PUT:"PUT"},qge={B:"B",N:"N",S:"S"},Gge={AVAILABLE:"AVAILABLE",CREATING:"CREATING",DELETED:"DELETED"},Hge={AWS_BACKUP:"AWS_BACKUP",SYSTEM:"SYSTEM",USER:"USER"},Vge={PAY_PER_REQUEST:"PAY_PER_REQUEST",PROVISIONED:"PROVISIONED"},Wge={HASH:"HASH",RANGE:"RANGE"},zge={ALL:"ALL",INCLUDE:"INCLUDE",KEYS_ONLY:"KEYS_ONLY"},Kge={AES256:"AES256",KMS:"KMS"},Yge={DISABLED:"DISABLED",DISABLING:"DISABLING",ENABLED:"ENABLED",ENABLING:"ENABLING",UPDATING:"UPDATING"},Qge={KEYS_ONLY:"KEYS_ONLY",NEW_AND_OLD_IMAGES:"NEW_AND_OLD_IMAGES",NEW_IMAGE:"NEW_IMAGE",OLD_IMAGE:"OLD_IMAGE"},Xge={DISABLED:"DISABLED",DISABLING:"DISABLING",ENABLED:"ENABLED",ENABLING:"ENABLING"},Jge={ALL:"ALL",AWS_BACKUP:"AWS_BACKUP",SYSTEM:"SYSTEM",USER:"USER"},Zge={INDEXES:"INDEXES",NONE:"NONE",TOTAL:"TOTAL"},e_e={ALL_OLD:"ALL_OLD",NONE:"NONE"},t_e={AccessDenied:"AccessDenied",ConditionalCheckFailed:"ConditionalCheckFailed",DuplicateItem:"DuplicateItem",InternalServerError:"InternalServerError",ItemCollectionSizeLimitExceeded:"ItemCollectionSizeLimitExceeded",ProvisionedThroughputExceeded:"ProvisionedThroughputExceeded",RequestLimitExceeded:"RequestLimitExceeded",ResourceNotFound:"ResourceNotFound",ThrottlingError:"ThrottlingError",TransactionConflict:"TransactionConflict",ValidationError:"ValidationError"},r_e={NONE:"NONE",SIZE:"SIZE"},n_e={BEGINS_WITH:"BEGINS_WITH",BETWEEN:"BETWEEN",CONTAINS:"CONTAINS",EQ:"EQ",GE:"GE",GT:"GT",IN:"IN",LE:"LE",LT:"LT",NE:"NE",NOT_CONTAINS:"NOT_CONTAINS",NOT_NULL:"NOT_NULL",NULL:"NULL"},o_e={AND:"AND",OR:"OR"},i_e={DISABLED:"DISABLED",ENABLED:"ENABLED"},s_e={DISABLED:"DISABLED",ENABLED:"ENABLED"},a_e={DISABLE:"DISABLE",ENABLE:"ENABLE"},c_e={ACCESSED_AND_THROTTLED_KEYS:"ACCESSED_AND_THROTTLED_KEYS",THROTTLED_KEYS:"THROTTLED_KEYS"},u_e={DISABLED:"DISABLED",DISABLING:"DISABLING",ENABLED:"ENABLED",ENABLING:"ENABLING",FAILED:"FAILED"},l_e={ACTIVE:"ACTIVE",CREATING:"CREATING",DELETING:"DELETING",UPDATING:"UPDATING"},d_e={ACTIVE:"ACTIVE",CREATING:"CREATING",DELETING:"DELETING",UPDATING:"UPDATING"},f_e={DISABLED:"DISABLED",ENABLED:"ENABLED",ENABLED_WITH_OVERRIDES:"ENABLED_WITH_OVERRIDES"},p_e={ACTIVE:"ACTIVE",ARCHIVED:"ARCHIVED",ARCHIVING:"ARCHIVING",CREATING:"CREATING",CREATION_FAILED:"CREATION_FAILED",DELETING:"DELETING",INACCESSIBLE_ENCRYPTION_CREDENTIALS:"INACCESSIBLE_ENCRYPTION_CREDENTIALS",REGION_DISABLED:"REGION_DISABLED",REPLICATION_NOT_AUTHORIZED:"REPLICATION_NOT_AUTHORIZED",UPDATING:"UPDATING"},m_e={STANDARD:"STANDARD",STANDARD_INFREQUENT_ACCESS:"STANDARD_INFREQUENT_ACCESS"},h_e={ACTIVE:"ACTIVE",ARCHIVED:"ARCHIVED",ARCHIVING:"ARCHIVING",CREATING:"CREATING",DELETING:"DELETING",INACCESSIBLE_ENCRYPTION_CREDENTIALS:"INACCESSIBLE_ENCRYPTION_CREDENTIALS",REPLICATION_NOT_AUTHORIZED:"REPLICATION_NOT_AUTHORIZED",UPDATING:"UPDATING"},y_e={ACTIVE:"ACTIVE",CREATING:"CREATING",DELETING:"DELETING"},g_e={EVENTUAL:"EVENTUAL",STRONG:"STRONG"},__e={ALL_NEW:"ALL_NEW",ALL_OLD:"ALL_OLD",NONE:"NONE",UPDATED_NEW:"UPDATED_NEW",UPDATED_OLD:"UPDATED_OLD"},E_e={DYNAMODB_JSON:"DYNAMODB_JSON",ION:"ION"},S_e={COMPLETED:"COMPLETED",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"},b_e={FULL_EXPORT:"FULL_EXPORT",INCREMENTAL_EXPORT:"INCREMENTAL_EXPORT"},x_e={NEW_AND_OLD_IMAGES:"NEW_AND_OLD_IMAGES",NEW_IMAGE:"NEW_IMAGE"},v_e={AES256:"AES256",KMS:"KMS"},T_e={CANCELLED:"CANCELLED",CANCELLING:"CANCELLING",COMPLETED:"COMPLETED",FAILED:"FAILED",IN_PROGRESS:"IN_PROGRESS"},w_e={GZIP:"GZIP",NONE:"NONE",ZSTD:"ZSTD"},A_e={CSV:"CSV",DYNAMODB_JSON:"DYNAMODB_JSON",ION:"ION"},I_e={ACTIVE:"ACTIVE",DISABLED:"DISABLED",DISABLING:"DISABLING",ENABLE_FAILED:"ENABLE_FAILED",ENABLING:"ENABLING",UPDATING:"UPDATING"},C_e={ALL_ATTRIBUTES:"ALL_ATTRIBUTES",ALL_PROJECTED_ATTRIBUTES:"ALL_PROJECTED_ATTRIBUTES",COUNT:"COUNT",SPECIFIC_ATTRIBUTES:"SPECIFIC_ATTRIBUTES"};k.$Command=ne.Command;k.__Client=ne.Client;k.DynamoDBServiceException=Age.DynamoDBServiceException;k.ApproximateCreationDateTimePrecision=Uge;k.AttributeAction=jge;k.BackupStatus=Gge;k.BackupType=Hge;k.BackupTypeFilter=Jge;k.BatchExecuteStatementCommand=Zy;k.BatchGetItemCommand=eg;k.BatchStatementErrorCodeEnum=t_e;k.BatchWriteItemCommand=tg;k.BillingMode=Vge;k.ComparisonOperator=n_e;k.ConditionalOperator=o_e;k.ContinuousBackupsStatus=i_e;k.ContributorInsightsAction=a_e;k.ContributorInsightsMode=c_e;k.ContributorInsightsStatus=u_e;k.CreateBackupCommand=rg;k.CreateGlobalTableCommand=ng;k.CreateTableCommand=og;k.DeleteBackupCommand=ig;k.DeleteItemCommand=sg;k.DeleteResourcePolicyCommand=ag;k.DeleteTableCommand=cg;k.DescribeBackupCommand=ug;k.DescribeContinuousBackupsCommand=lg;k.DescribeContributorInsightsCommand=Nd;k.DescribeEndpointsCommand=Od;k.DescribeExportCommand=$d;k.DescribeGlobalTableCommand=dg;k.DescribeGlobalTableSettingsCommand=fg;k.DescribeImportCommand=Md;k.DescribeKinesisStreamingDestinationCommand=Ld;k.DescribeLimitsCommand=pg;k.DescribeTableCommand=Wc;k.DescribeTableReplicaAutoScalingCommand=mg;k.DescribeTimeToLiveCommand=hg;k.DestinationStatus=I_e;k.DisableKinesisStreamingDestinationCommand=yg;k.DynamoDB=Hg;k.DynamoDBClient=Co;k.EnableKinesisStreamingDestinationCommand=gg;k.ExecuteStatementCommand=_g;k.ExecuteTransactionCommand=Eg;k.ExportFormat=E_e;k.ExportStatus=S_e;k.ExportTableToPointInTimeCommand=Sg;k.ExportType=b_e;k.ExportViewType=x_e;k.GetItemCommand=bg;k.GetResourcePolicyCommand=xg;k.GlobalTableSettingsReplicationMode=f_e;k.GlobalTableStatus=l_e;k.ImportStatus=T_e;k.ImportTableCommand=vg;k.IndexStatus=d_e;k.InputCompressionType=w_e;k.InputFormat=A_e;k.KeyType=Wge;k.ListBackupsCommand=Tg;k.ListContributorInsightsCommand=kd;k.ListExportsCommand=Fd;k.ListGlobalTablesCommand=wg;k.ListImportsCommand=Bd;k.ListTablesCommand=Ud;k.ListTagsOfResourceCommand=Ag;k.MultiRegionConsistency=g_e;k.PointInTimeRecoveryStatus=s_e;k.ProjectionType=zge;k.PutItemCommand=Ig;k.PutResourcePolicyCommand=Cg;k.QueryCommand=jd;k.ReplicaStatus=p_e;k.RestoreTableFromBackupCommand=Dg;k.RestoreTableToPointInTimeCommand=Rg;k.ReturnConsumedCapacity=Zge;k.ReturnItemCollectionMetrics=r_e;k.ReturnValue=__e;k.ReturnValuesOnConditionCheckFailure=e_e;k.S3SseAlgorithm=v_e;k.SSEStatus=Yge;k.SSEType=Kge;k.ScalarAttributeType=qge;k.ScanCommand=qd;k.Select=C_e;k.StreamViewType=Qge;k.TableClass=m_e;k.TableStatus=h_e;k.TagResourceCommand=Pg;k.TimeToLiveStatus=Xge;k.TransactGetItemsCommand=Og;k.TransactWriteItemsCommand=Ng;k.UntagResourceCommand=$g;k.UpdateContinuousBackupsCommand=Mg;k.UpdateContributorInsightsCommand=Lg;k.UpdateGlobalTableCommand=kg;k.UpdateGlobalTableSettingsCommand=Fg;k.UpdateItemCommand=Bg;k.UpdateKinesisStreamingDestinationCommand=Ug;k.UpdateTableCommand=jg;k.UpdateTableReplicaAutoScalingCommand=qg;k.UpdateTimeToLiveCommand=Gg;k.WitnessStatus=y_e;k.paginateListContributorInsights=xH;k.paginateListExports=vH;k.paginateListImports=TH;k.paginateListTables=wH;k.paginateQuery=AH;k.paginateScan=IH;k.waitForContributorInsightsEnabled=Pge;k.waitForExportCompleted=Oge;k.waitForImportCompleted=Nge;k.waitForKinesisStreamingDestinationActive=$ge;k.waitForTableExists=Mge;k.waitForTableNotExists=Lge;k.waitUntilContributorInsightsEnabled=DH;k.waitUntilExportCompleted=PH;k.waitUntilImportCompleted=NH;k.waitUntilKinesisStreamingDestinationActive=MH;k.waitUntilTableExists=kH;k.waitUntilTableNotExists=BH;Object.prototype.hasOwnProperty.call(se,"__proto__")&&!Object.prototype.hasOwnProperty.call(k,"__proto__")&&Object.defineProperty(k,"__proto__",{enumerable:!0,value:se.__proto__});Object.keys(se).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(k,e)&&(k[e]=se[e])});Object.prototype.hasOwnProperty.call(Jy,"__proto__")&&!Object.prototype.hasOwnProperty.call(k,"__proto__")&&Object.defineProperty(k,"__proto__",{enumerable:!0,value:Jy.__proto__});Object.keys(Jy).forEach(function(e){e!=="default"&&!Object.prototype.hasOwnProperty.call(k,e)&&(k[e]=Jy[e])})});var rn={};Nt(rn,{__assign:()=>rI,__asyncDelegator:()=>V_e,__asyncGenerator:()=>H_e,__asyncValues:()=>W_e,__await:()=>Gd,__awaiter:()=>F_e,__classPrivateFieldGet:()=>X_e,__classPrivateFieldIn:()=>Z_e,__classPrivateFieldSet:()=>J_e,__createBinding:()=>oI,__decorate:()=>P_e,__esDecorate:()=>N_e,__exportStar:()=>U_e,__extends:()=>D_e,__generator:()=>B_e,__importDefault:()=>Q_e,__importStar:()=>Y_e,__makeTemplateObject:()=>z_e,__metadata:()=>k_e,__param:()=>O_e,__propKey:()=>M_e,__read:()=>UH,__rest:()=>R_e,__runInitializers:()=>$_e,__setFunctionName:()=>L_e,__spread:()=>j_e,__spreadArray:()=>G_e,__spreadArrays:()=>q_e,__values:()=>nI});function D_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");tI(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function R_e(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function P_e(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function O_e(e,t){return function(r,n){t(r,n,e)}}function N_e(e,t,r,n,o,i){function s(I){if(I!==void 0&&typeof I!="function")throw new TypeError("Function expected");return I}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",l=!t&&e?n.static?e:e.prototype:null,d=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f,m=!1,h=r.length-1;h>=0;h--){var _={};for(var E in n)_[E]=E==="access"?{}:n[E];for(var E in n.access)_.access[E]=n.access[E];_.addInitializer=function(I){if(m)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(I||null))};var T=(0,r[h])(a==="accessor"?{get:d.get,set:d.set}:d[c],_);if(a==="accessor"){if(T===void 0)continue;if(T===null||typeof T!="object")throw new TypeError("Object expected");(f=s(T.get))&&(d.get=f),(f=s(T.set))&&(d.set=f),(f=s(T.init))&&o.push(f)}else(f=s(T))&&(a==="field"?o.push(f):d[c]=f)}l&&Object.defineProperty(l,n.name,d),m=!0}function $_e(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function M_e(e){return typeof e=="symbol"?e:"".concat(e)}function L_e(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function k_e(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function F_e(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(d){try{l(n.next(d))}catch(f){s(f)}}function c(d){try{l(n.throw(d))}catch(f){s(f)}}function l(d){d.done?i(d.value):o(d.value).then(a,c)}l((n=n.apply(e,t||[])).next())})}function B_e(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(d){return c([l,d])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(r=0)),r;)try{if(n=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,o=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1],i=l;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(l);break}i[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(d){l=[6,d],o=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function U_e(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&oI(t,e,r)}function nI(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function UH(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function j_e(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(UH(arguments[t]));return e}function q_e(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n}function G_e(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function Gd(e){return this instanceof Gd?(this.v=e,this):new Gd(e)}function H_e(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o;function s(m){n[m]&&(o[m]=function(h){return new Promise(function(_,E){i.push([m,h,_,E])>1||a(m,h)})})}function a(m,h){try{c(n[m](h))}catch(_){f(i[0][3],_)}}function c(m){m.value instanceof Gd?Promise.resolve(m.value.v).then(l,d):f(i[0][2],m)}function l(m){a("next",m)}function d(m){a("throw",m)}function f(m,h){m(h),i.shift(),i.length&&a(i[0][0],i[0][1])}}function V_e(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(s){return(r=!r)?{value:Gd(e[o](s)),done:!1}:i?i(s):s}:i}}function W_e(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof nI=="function"?nI(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}function z_e(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Y_e(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&oI(t,e,r);return K_e(t,e),t}function Q_e(e){return e&&e.__esModule?e:{default:e}}function X_e(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function J_e(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function Z_e(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}var tI,rI,oI,K_e,nn=D(()=>{tI=function(e,t){return tI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},tI(e,t)};rI=function(){return rI=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},rI.apply(this,arguments)};oI=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});K_e=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}});var pi={};Nt(pi,{__assign:()=>sI,__asyncDelegator:()=>fEe,__asyncGenerator:()=>dEe,__asyncValues:()=>pEe,__await:()=>Hd,__awaiter:()=>iEe,__classPrivateFieldGet:()=>gEe,__classPrivateFieldSet:()=>_Ee,__createBinding:()=>aEe,__decorate:()=>rEe,__exportStar:()=>cEe,__extends:()=>eEe,__generator:()=>sEe,__importDefault:()=>yEe,__importStar:()=>hEe,__makeTemplateObject:()=>mEe,__metadata:()=>oEe,__param:()=>nEe,__read:()=>jH,__rest:()=>tEe,__spread:()=>uEe,__spreadArrays:()=>lEe,__values:()=>aI});function eEe(e,t){iI(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function tEe(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function rEe(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(o<3?s(i):o>3?s(t,r,i):s(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function nEe(e,t){return function(r,n){t(r,n,e)}}function oEe(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function iEe(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(d){try{l(n.next(d))}catch(f){s(f)}}function c(d){try{l(n.throw(d))}catch(f){s(f)}}function l(d){d.done?i(d.value):o(d.value).then(a,c)}l((n=n.apply(e,t||[])).next())})}function sEe(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(l){return function(d){return c([l,d])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,o=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){r.label=l[1];break}if(l[0]===6&&r.label<i[1]){r.label=i[1],i=l;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(l);break}i[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(d){l=[6,d],o=0}finally{n=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function aEe(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}function cEe(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function aI(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function jH(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i}function uEe(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(jH(arguments[t]));return e}function lEe(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n}function Hd(e){return this instanceof Hd?(this.v=e,this):new Hd(e)}function dEe(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o;function s(m){n[m]&&(o[m]=function(h){return new Promise(function(_,E){i.push([m,h,_,E])>1||a(m,h)})})}function a(m,h){try{c(n[m](h))}catch(_){f(i[0][3],_)}}function c(m){m.value instanceof Hd?Promise.resolve(m.value.v).then(l,d):f(i[0][2],m)}function l(m){a("next",m)}function d(m){a("throw",m)}function f(m,h){m(h),i.shift(),i.length&&a(i[0][0],i[0][1])}}function fEe(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(s){return(r=!r)?{value:Hd(e[o](s)),done:o==="return"}:i?i(s):s}:i}}function pEe(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof aI=="function"?aI(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),o(a,c,s.done,s.value)})}}function o(i,s,a,c){Promise.resolve(c).then(function(l){i({value:l,done:a})},s)}}function mEe(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function hEe(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function yEe(e){return e&&e.__esModule?e:{default:e}}function gEe(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function _Ee(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}var iI,sI,mi=D(()=>{iI=function(e,t){return iI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},iI(e,t)};sI=function(){return sI=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},sI.apply(this,arguments)}});var qH=b(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.toUtf8=zc.fromUtf8=void 0;var EEe=e=>{let t=[];for(let r=0,n=e.length;r<n;r++){let o=e.charCodeAt(r);if(o<128)t.push(o);else if(o<2048)t.push(o>>6|192,o&63|128);else if(r+1<e.length&&(o&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320){let i=65536+((o&1023)<<10)+(e.charCodeAt(++r)&1023);t.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else t.push(o>>12|224,o>>6&63|128,o&63|128)}return Uint8Array.from(t)};zc.fromUtf8=EEe;var SEe=e=>{let t="";for(let r=0,n=e.length;r<n;r++){let o=e[r];if(o<128)t+=String.fromCharCode(o);else if(192<=o&&o<224){let i=e[++r];t+=String.fromCharCode((o&31)<<6|i&63)}else if(240<=o&&o<365){let s="%"+[o,e[++r],e[++r],e[++r]].map(a=>a.toString(16)).join("%");t+=decodeURIComponent(s)}else t+=String.fromCharCode((o&15)<<12|(e[++r]&63)<<6|e[++r]&63)}return t};zc.toUtf8=SEe});var GH=b(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.toUtf8=Kc.fromUtf8=void 0;function bEe(e){return new TextEncoder().encode(e)}Kc.fromUtf8=bEe;function xEe(e){return new TextDecoder("utf-8").decode(e)}Kc.toUtf8=xEe});var Vg=b(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.toUtf8=Yc.fromUtf8=void 0;var HH=qH(),VH=GH(),vEe=e=>typeof TextEncoder=="function"?(0,VH.fromUtf8)(e):(0,HH.fromUtf8)(e);Yc.fromUtf8=vEe;var TEe=e=>typeof TextDecoder=="function"?(0,VH.toUtf8)(e):(0,HH.toUtf8)(e);Yc.toUtf8=TEe});var WH=b(Wg=>{"use strict";Object.defineProperty(Wg,"__esModule",{value:!0});Wg.convertToBuffer=void 0;var wEe=Vg(),AEe=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:wEe.fromUtf8;function IEe(e){return e instanceof Uint8Array?e:typeof e=="string"?AEe(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}Wg.convertToBuffer=IEe});var zH=b(zg=>{"use strict";Object.defineProperty(zg,"__esModule",{value:!0});zg.isEmptyData=void 0;function CEe(e){return typeof e=="string"?e.length===0:e.byteLength===0}zg.isEmptyData=CEe});var KH=b(Kg=>{"use strict";Object.defineProperty(Kg,"__esModule",{value:!0});Kg.numToUint8=void 0;function DEe(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}Kg.numToUint8=DEe});var YH=b(Yg=>{"use strict";Object.defineProperty(Yg,"__esModule",{value:!0});Yg.uint32ArrayFrom=void 0;function REe(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}Yg.uint32ArrayFrom=REe});var cI=b(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.uint32ArrayFrom=Do.numToUint8=Do.isEmptyData=Do.convertToBuffer=void 0;var PEe=WH();Object.defineProperty(Do,"convertToBuffer",{enumerable:!0,get:function(){return PEe.convertToBuffer}});var OEe=zH();Object.defineProperty(Do,"isEmptyData",{enumerable:!0,get:function(){return OEe.isEmptyData}});var NEe=KH();Object.defineProperty(Do,"numToUint8",{enumerable:!0,get:function(){return NEe.numToUint8}});var $Ee=YH();Object.defineProperty(Do,"uint32ArrayFrom",{enumerable:!0,get:function(){return $Ee.uint32ArrayFrom}})});var JH=b(Qg=>{"use strict";Object.defineProperty(Qg,"__esModule",{value:!0});Qg.AwsCrc32=void 0;var QH=(mi(),ie(pi)),uI=cI(),XH=Xg(),MEe=(function(){function e(){this.crc32=new XH.Crc32}return e.prototype.update=function(t){(0,uI.isEmptyData)(t)||this.crc32.update((0,uI.convertToBuffer)(t))},e.prototype.digest=function(){return QH.__awaiter(this,void 0,void 0,function(){return QH.__generator(this,function(t){return[2,(0,uI.numToUint8)(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new XH.Crc32},e})();Qg.AwsCrc32=MEe});var Xg=b(Ss=>{"use strict";Object.defineProperty(Ss,"__esModule",{value:!0});Ss.AwsCrc32=Ss.Crc32=Ss.crc32=void 0;var LEe=(mi(),ie(pi)),kEe=cI();function FEe(e){return new ZH().update(e).digest()}Ss.crc32=FEe;var ZH=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var r,n;try{for(var o=LEe.__values(t),i=o.next();!i.done;i=o.next()){var s=i.value;this.checksum=this.checksum>>>8^UEe[(this.checksum^s)&255]}}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})();Ss.Crc32=ZH;var BEe=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],UEe=(0,kEe.uint32ArrayFrom)(BEe),jEe=JH();Object.defineProperty(Ss,"AwsCrc32",{enumerable:!0,get:function(){return jEe.AwsCrc32}})});var Xc=b(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.toHex=Qc.fromHex=void 0;var e4={},lI={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),e4[e]=t,lI[t]=e}function qEe(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){let n=e.slice(r,r+2).toLowerCase();if(n in lI)t[r/2]=lI[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}Qc.fromHex=qEe;function GEe(e){let t="";for(let r=0;r<e.byteLength;r++)t+=e4[e[r]];return t}Qc.toHex=GEe});var fI=b(Jg=>{"use strict";Object.defineProperty(Jg,"__esModule",{value:!0});Jg.Int64=void 0;var HEe=Xc(),dI=class e{constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let r=new Uint8Array(8);for(let n=7,o=Math.abs(Math.round(t));n>-1&&o>0;n--,o/=256)r[n]=o;return t<0&&t4(r),new e(r)}valueOf(){let t=this.bytes.slice(0),r=t[0]&128;return r&&t4(t),parseInt((0,HEe.toHex)(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};Jg.Int64=dI;function t4(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}});var hI=b(Zg=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});Zg.HeaderMarshaller=void 0;var Jc=Xc(),pI=fI(),mI=class{constructor(t,r){this.toUtf8=t,this.fromUtf8=r}format(t){let r=[];for(let i of Object.keys(t)){let s=this.fromUtf8(i);r.push(Uint8Array.from([s.byteLength]),s,this.formatHeaderValue(t[i]))}let n=new Uint8Array(r.reduce((i,s)=>i+s.byteLength,0)),o=0;for(let i of r)n.set(i,o),o+=i.byteLength;return n}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":let r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":let o=new Uint8Array(9);return o[0]=5,o.set(t.value.bytes,1),o;case"binary":let i=new DataView(new ArrayBuffer(3+t.value.byteLength));i.setUint8(0,6),i.setUint16(1,t.value.byteLength,!1);let s=new Uint8Array(i.buffer);return s.set(t.value,3),s;case"string":let a=this.fromUtf8(t.value),c=new DataView(new ArrayBuffer(3+a.byteLength));c.setUint8(0,7),c.setUint16(1,a.byteLength,!1);let l=new Uint8Array(c.buffer);return l.set(a,3),l;case"timestamp":let d=new Uint8Array(9);return d[0]=8,d.set(pI.Int64.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!ZEe.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);let f=new Uint8Array(17);return f[0]=9,f.set((0,Jc.fromHex)(t.value.replace(/\-/g,"")),1),f}}parse(t){let r={},n=0;for(;n<t.byteLength;){let o=t.getUint8(n++),i=this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+n,o));switch(n+=o,t.getUint8(n++)){case 0:r[i]={type:n4,value:!0};break;case 1:r[i]={type:n4,value:!1};break;case 2:r[i]={type:VEe,value:t.getInt8(n++)};break;case 3:r[i]={type:WEe,value:t.getInt16(n,!1)},n+=2;break;case 4:r[i]={type:zEe,value:t.getInt32(n,!1)},n+=4;break;case 5:r[i]={type:KEe,value:new pI.Int64(new Uint8Array(t.buffer,t.byteOffset+n,8))},n+=8;break;case 6:let s=t.getUint16(n,!1);n+=2,r[i]={type:YEe,value:new Uint8Array(t.buffer,t.byteOffset+n,s)},n+=s;break;case 7:let a=t.getUint16(n,!1);n+=2,r[i]={type:QEe,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+n,a))},n+=a;break;case 8:r[i]={type:XEe,value:new Date(new pI.Int64(new Uint8Array(t.buffer,t.byteOffset+n,8)).valueOf())},n+=8;break;case 9:let c=new Uint8Array(t.buffer,t.byteOffset+n,16);n+=16,r[i]={type:JEe,value:`${(0,Jc.toHex)(c.subarray(0,4))}-${(0,Jc.toHex)(c.subarray(4,6))}-${(0,Jc.toHex)(c.subarray(6,8))}-${(0,Jc.toHex)(c.subarray(8,10))}-${(0,Jc.toHex)(c.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return r}};Zg.HeaderMarshaller=mI;var r4;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(r4||(r4={}));var n4="boolean",VEe="byte",WEe="short",zEe="integer",KEe="long",YEe="binary",QEe="string",XEe="timestamp",JEe="uuid",ZEe=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/});var i4=b(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});e_.splitMessage=void 0;var eSe=Xg(),o4=4,bs=o4*2,ma=4,tSe=bs+ma*2;function rSe({byteLength:e,byteOffset:t,buffer:r}){if(e<tSe)throw new Error("Provided message too short to accommodate event stream message overhead");let n=new DataView(r,t,e),o=n.getUint32(0,!1);if(e!==o)throw new Error("Reported message length does not match received message length");let i=n.getUint32(o4,!1),s=n.getUint32(bs,!1),a=n.getUint32(e-ma,!1),c=new eSe.Crc32().update(new Uint8Array(r,t,bs));if(s!==c.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(r,t+bs,e-(bs+ma))),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(r,t+bs+ma,i),body:new Uint8Array(r,t+bs+ma+i,o-i-(bs+ma+ma))}}e_.splitMessage=rSe});var s4=b(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});t_.EventStreamCodec=void 0;var nSe=Xg(),oSe=hI(),iSe=i4(),yI=class{constructor(t,r){this.headerMarshaller=new oSe.HeaderMarshaller(t,r),this.messageBuffer=[],this.isEndOfStream=!1}feed(t){this.messageBuffer.push(this.decode(t))}endOfStream(){this.isEndOfStream=!0}getMessage(){let t=this.messageBuffer.pop(),r=this.isEndOfStream;return{getMessage(){return t},isEndOfStream(){return r}}}getAvailableMessages(){let t=this.messageBuffer;this.messageBuffer=[];let r=this.isEndOfStream;return{getMessages(){return t},isEndOfStream(){return r}}}encode({headers:t,body:r}){let n=this.headerMarshaller.format(t),o=n.byteLength+r.byteLength+16,i=new Uint8Array(o),s=new DataView(i.buffer,i.byteOffset,i.byteLength),a=new nSe.Crc32;return s.setUint32(0,o,!1),s.setUint32(4,n.byteLength,!1),s.setUint32(8,a.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(r,n.byteLength+12),s.setUint32(o-4,a.update(i.subarray(8,o-4)).digest(),!1),i}decode(t){let{headers:r,body:n}=(0,iSe.splitMessage)(t);return{headers:this.headerMarshaller.parse(r),body:n}}formatHeaders(t){return this.headerMarshaller.format(t)}};t_.EventStreamCodec=yI});var c4=b(a4=>{"use strict";Object.defineProperty(a4,"__esModule",{value:!0})});var u4=b(r_=>{"use strict";Object.defineProperty(r_,"__esModule",{value:!0});r_.MessageDecoderStream=void 0;var gI=class{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.inputStream)yield this.options.decoder.decode(t)}};r_.MessageDecoderStream=gI});var l4=b(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});n_.MessageEncoderStream=void 0;var _I=class{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.messageStream)yield this.options.encoder.encode(t);this.options.includeEndFrame&&(yield new Uint8Array(0))}};n_.MessageEncoderStream=_I});var d4=b(o_=>{"use strict";Object.defineProperty(o_,"__esModule",{value:!0});o_.SmithyMessageDecoderStream=void 0;var EI=class{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.messageStream){let r=await this.options.deserializer(t);r!==void 0&&(yield r)}}};o_.SmithyMessageDecoderStream=EI});var f4=b(i_=>{"use strict";Object.defineProperty(i_,"__esModule",{value:!0});i_.SmithyMessageEncoderStream=void 0;var SI=class{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let t of this.options.inputStream)yield this.options.serializer(t)}};i_.SmithyMessageEncoderStream=SI});var p4=b(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});var xs=(nn(),ie(rn));xs.__exportStar(s4(),Ro);xs.__exportStar(hI(),Ro);xs.__exportStar(fI(),Ro);xs.__exportStar(c4(),Ro);xs.__exportStar(u4(),Ro);xs.__exportStar(l4(),Ro);xs.__exportStar(d4(),Ro);xs.__exportStar(f4(),Ro)});var m4=b(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});s_.normalizeProvider=void 0;var sSe=e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t};s_.normalizeProvider=sSe});var h4=b(bI=>{"use strict";Object.defineProperty(bI,"__esModule",{value:!0});var aSe=(nn(),ie(rn));aSe.__exportStar(m4(),bI)});var xI=b(a_=>{"use strict";Object.defineProperty(a_,"__esModule",{value:!0});a_.isArrayBuffer=void 0;var cSe=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";a_.isArrayBuffer=cSe});var TI=b(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.fromString=Zc.fromArrayBuffer=void 0;var uSe=xI(),vI=require("buffer"),lSe=(e,t=0,r=e.byteLength-t)=>{if(!(0,uSe.isArrayBuffer)(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return vI.Buffer.from(e,t,r)};Zc.fromArrayBuffer=lSe;var dSe=(e,t)=>{if(typeof e!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?vI.Buffer.from(e,t):vI.Buffer.from(e)};Zc.fromString=dSe});var wI=b(c_=>{"use strict";Object.defineProperty(c_,"__esModule",{value:!0});c_.fromUtf8=void 0;var fSe=TI(),pSe=e=>{let t=(0,fSe.fromString)(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};c_.fromUtf8=pSe});var y4=b(u_=>{"use strict";Object.defineProperty(u_,"__esModule",{value:!0});u_.toUint8Array=void 0;var mSe=wI(),hSe=e=>typeof e=="string"?(0,mSe.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e);u_.toUint8Array=hSe});var g4=b(l_=>{"use strict";Object.defineProperty(l_,"__esModule",{value:!0});l_.toUtf8=void 0;var ySe=TI(),gSe=e=>(0,ySe.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("utf8");l_.toUtf8=gSe});var d_=b(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});var AI=(nn(),ie(rn));AI.__exportStar(wI(),Vd);AI.__exportStar(y4(),Vd);AI.__exportStar(g4(),Vd)});var ha=b(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.MAX_PRESIGNED_TTL=oe.KEY_TYPE_IDENTIFIER=oe.MAX_CACHE_SIZE=oe.UNSIGNED_PAYLOAD=oe.EVENT_ALGORITHM_IDENTIFIER=oe.ALGORITHM_IDENTIFIER_V4A=oe.ALGORITHM_IDENTIFIER=oe.UNSIGNABLE_PATTERNS=oe.SEC_HEADER_PATTERN=oe.PROXY_HEADER_PATTERN=oe.ALWAYS_UNSIGNABLE_HEADERS=oe.HOST_HEADER=oe.TOKEN_HEADER=oe.SHA256_HEADER=oe.SIGNATURE_HEADER=oe.GENERATED_HEADERS=oe.DATE_HEADER=oe.AMZ_DATE_HEADER=oe.AUTH_HEADER=oe.REGION_SET_PARAM=oe.TOKEN_QUERY_PARAM=oe.SIGNATURE_QUERY_PARAM=oe.EXPIRES_QUERY_PARAM=oe.SIGNED_HEADERS_QUERY_PARAM=oe.AMZ_DATE_QUERY_PARAM=oe.CREDENTIAL_QUERY_PARAM=oe.ALGORITHM_QUERY_PARAM=void 0;oe.ALGORITHM_QUERY_PARAM="X-Amz-Algorithm";oe.CREDENTIAL_QUERY_PARAM="X-Amz-Credential";oe.AMZ_DATE_QUERY_PARAM="X-Amz-Date";oe.SIGNED_HEADERS_QUERY_PARAM="X-Amz-SignedHeaders";oe.EXPIRES_QUERY_PARAM="X-Amz-Expires";oe.SIGNATURE_QUERY_PARAM="X-Amz-Signature";oe.TOKEN_QUERY_PARAM="X-Amz-Security-Token";oe.REGION_SET_PARAM="X-Amz-Region-Set";oe.AUTH_HEADER="authorization";oe.AMZ_DATE_HEADER=oe.AMZ_DATE_QUERY_PARAM.toLowerCase();oe.DATE_HEADER="date";oe.GENERATED_HEADERS=[oe.AUTH_HEADER,oe.AMZ_DATE_HEADER,oe.DATE_HEADER];oe.SIGNATURE_HEADER=oe.SIGNATURE_QUERY_PARAM.toLowerCase();oe.SHA256_HEADER="x-amz-content-sha256";oe.TOKEN_HEADER=oe.TOKEN_QUERY_PARAM.toLowerCase();oe.HOST_HEADER="host";oe.ALWAYS_UNSIGNABLE_HEADERS={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0};oe.PROXY_HEADER_PATTERN=/^proxy-/;oe.SEC_HEADER_PATTERN=/^sec-/;oe.UNSIGNABLE_PATTERNS=[/^proxy-/i,/^sec-/i];oe.ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256";oe.ALGORITHM_IDENTIFIER_V4A="AWS4-ECDSA-P256-SHA256";oe.EVENT_ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256-PAYLOAD";oe.UNSIGNED_PAYLOAD="UNSIGNED-PAYLOAD";oe.MAX_CACHE_SIZE=50;oe.KEY_TYPE_IDENTIFIER="aws4_request";oe.MAX_PRESIGNED_TTL=3600*24*7});var CI=b(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.clearCredentialCache=vs.getSigningKey=vs.createScope=void 0;var _Se=Xc(),ESe=d_(),II=ha(),eu={},f_=[],SSe=(e,t,r)=>`${e}/${t}/${r}/${II.KEY_TYPE_IDENTIFIER}`;vs.createScope=SSe;var bSe=async(e,t,r,n,o)=>{let i=await _4(e,t.secretAccessKey,t.accessKeyId),s=`${r}:${n}:${o}:${(0,_Se.toHex)(i)}:${t.sessionToken}`;if(s in eu)return eu[s];for(f_.push(s);f_.length>II.MAX_CACHE_SIZE;)delete eu[f_.shift()];let a=`AWS4${t.secretAccessKey}`;for(let c of[r,n,o,II.KEY_TYPE_IDENTIFIER])a=await _4(e,a,c);return eu[s]=a};vs.getSigningKey=bSe;var xSe=()=>{f_.length=0,Object.keys(eu).forEach(e=>{delete eu[e]})};vs.clearCredentialCache=xSe;var _4=(e,t,r)=>{let n=new e(t);return n.update((0,ESe.toUint8Array)(r)),n.digest()}});var RI=b(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});p_.getCanonicalHeaders=void 0;var DI=ha(),vSe=({headers:e},t,r)=>{let n={};for(let o of Object.keys(e).sort()){if(e[o]==null)continue;let i=o.toLowerCase();(i in DI.ALWAYS_UNSIGNABLE_HEADERS||t!=null&&t.has(i)||DI.PROXY_HEADER_PATTERN.test(i)||DI.SEC_HEADER_PATTERN.test(i))&&(!r||r&&!r.has(i))||(n[i]=e[o].trim().replace(/\s+/g," "))}return n};p_.getCanonicalHeaders=vSe});var PI=b(m_=>{"use strict";Object.defineProperty(m_,"__esModule",{value:!0});m_.escapeUri=void 0;var TSe=e=>encodeURIComponent(e).replace(/[!'()*]/g,wSe);m_.escapeUri=TSe;var wSe=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`});var E4=b(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});h_.escapeUriPath=void 0;var ASe=PI(),ISe=e=>e.split("/").map(ASe.escapeUri).join("/");h_.escapeUriPath=ISe});var b4=b(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});var S4=(nn(),ie(rn));S4.__exportStar(PI(),y_);S4.__exportStar(E4(),y_)});var OI=b(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});__.getCanonicalQuery=void 0;var g_=b4(),CSe=ha(),DSe=({query:e={}})=>{let t=[],r={};for(let n of Object.keys(e).sort()){if(n.toLowerCase()===CSe.SIGNATURE_HEADER)continue;t.push(n);let o=e[n];typeof o=="string"?r[n]=`${(0,g_.escapeUri)(n)}=${(0,g_.escapeUri)(o)}`:Array.isArray(o)&&(r[n]=o.slice(0).sort().reduce((i,s)=>i.concat([`${(0,g_.escapeUri)(n)}=${(0,g_.escapeUri)(s)}`]),[]).join("&"))}return t.map(n=>r[n]).filter(n=>n).join("&")};__.getCanonicalQuery=DSe});var NI=b(E_=>{"use strict";Object.defineProperty(E_,"__esModule",{value:!0});E_.getPayloadHash=void 0;var RSe=xI(),PSe=Xc(),OSe=d_(),x4=ha(),NSe=async({headers:e,body:t},r)=>{for(let n of Object.keys(e))if(n.toLowerCase()===x4.SHA256_HEADER)return e[n];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||(0,RSe.isArrayBuffer)(t)){let n=new r;return n.update((0,OSe.toUint8Array)(t)),(0,PSe.toHex)(await n.digest())}return x4.UNSIGNED_PAYLOAD};E_.getPayloadHash=NSe});var v4=b(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});Ts.deleteHeader=Ts.getHeaderValue=Ts.hasHeader=void 0;var $Se=(e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1};Ts.hasHeader=$Se;var MSe=(e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))if(e===r.toLowerCase())return t[r]};Ts.getHeaderValue=MSe;var LSe=(e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))e===r.toLowerCase()&&delete t[r]};Ts.deleteHeader=LSe});var $I=b(ya=>{"use strict";Object.defineProperty(ya,"__esModule",{value:!0});ya.cloneQuery=ya.cloneRequest=void 0;var kSe=({headers:e,query:t,...r})=>({...r,headers:{...e},query:t?(0,ya.cloneQuery)(t):void 0});ya.cloneRequest=kSe;var FSe=e=>Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{});ya.cloneQuery=FSe});var MI=b(S_=>{"use strict";Object.defineProperty(S_,"__esModule",{value:!0});S_.moveHeadersToQuery=void 0;var BSe=$I(),USe=(e,t={})=>{var r;let{headers:n,query:o={}}=typeof e.clone=="function"?e.clone():(0,BSe.cloneRequest)(e);for(let i of Object.keys(n)){let s=i.toLowerCase();s.slice(0,6)==="x-amz-"&&!(!((r=t.unhoistableHeaders)===null||r===void 0)&&r.has(s))&&(o[i]=n[i],delete n[i])}return{...e,headers:n,query:o}};S_.moveHeadersToQuery=USe});var LI=b(b_=>{"use strict";Object.defineProperty(b_,"__esModule",{value:!0});b_.prepareRequest=void 0;var jSe=$I(),qSe=ha(),GSe=e=>{e=typeof e.clone=="function"?e.clone():(0,jSe.cloneRequest)(e);for(let t of Object.keys(e.headers))qSe.GENERATED_HEADERS.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e};b_.prepareRequest=GSe});var T4=b(ga=>{"use strict";Object.defineProperty(ga,"__esModule",{value:!0});ga.toDate=ga.iso8601=void 0;var HSe=e=>(0,ga.toDate)(e).toISOString().replace(/\.\d{3}Z$/,"Z");ga.iso8601=HSe;var VSe=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;ga.toDate=VSe});var D4=b(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});w_.SignatureV4=void 0;var WSe=p4(),x_=Xc(),w4=h4(),Wd=d_(),rr=ha(),v_=CI(),A4=RI(),zSe=OI(),kI=NI(),KSe=v4(),YSe=MI(),I4=LI(),QSe=T4(),FI=class{constructor({applyChecksum:t,credentials:r,region:n,service:o,sha256:i,uriEscapePath:s=!0}){this.headerMarshaller=new WSe.HeaderMarshaller(Wd.toUtf8,Wd.fromUtf8),this.service=o,this.sha256=i,this.uriEscapePath=s,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=(0,w4.normalizeProvider)(n),this.credentialProvider=(0,w4.normalizeProvider)(r)}async presign(t,r={}){let{signingDate:n=new Date,expiresIn:o=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:a,signingRegion:c,signingService:l}=r,d=await this.credentialProvider();this.validateResolvedCredentials(d);let f=c??await this.regionProvider(),{longDate:m,shortDate:h}=T_(n);if(o>rr.MAX_PRESIGNED_TTL)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let _=(0,v_.createScope)(h,f,l??this.service),E=(0,YSe.moveHeadersToQuery)((0,I4.prepareRequest)(t),{unhoistableHeaders:s});d.sessionToken&&(E.query[rr.TOKEN_QUERY_PARAM]=d.sessionToken),E.query[rr.ALGORITHM_QUERY_PARAM]=rr.ALGORITHM_IDENTIFIER,E.query[rr.CREDENTIAL_QUERY_PARAM]=`${d.accessKeyId}/${_}`,E.query[rr.AMZ_DATE_QUERY_PARAM]=m,E.query[rr.EXPIRES_QUERY_PARAM]=o.toString(10);let T=(0,A4.getCanonicalHeaders)(E,i,a);return E.query[rr.SIGNED_HEADERS_QUERY_PARAM]=C4(T),E.query[rr.SIGNATURE_QUERY_PARAM]=await this.getSignature(m,_,this.getSigningKey(d,f,h,l),this.createCanonicalRequest(E,T,await(0,kI.getPayloadHash)(t,this.sha256))),E}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:n=new Date,priorSignature:o,signingRegion:i,signingService:s}){let a=i??await this.regionProvider(),{shortDate:c,longDate:l}=T_(n),d=(0,v_.createScope)(c,a,s??this.service),f=await(0,kI.getPayloadHash)({headers:{},body:r},this.sha256),m=new this.sha256;m.update(t);let h=(0,x_.toHex)(await m.digest()),_=[rr.EVENT_ALGORITHM_IDENTIFIER,l,d,o,h,f].join(`
62
+ `);return this.signString(_,{signingDate:n,signingRegion:a,signingService:s})}async signMessage(t,{signingDate:r=new Date,signingRegion:n,signingService:o}){return this.signEvent({headers:this.headerMarshaller.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:n,signingService:o,priorSignature:t.priorSignature}).then(s=>({message:t.message,signature:s}))}async signString(t,{signingDate:r=new Date,signingRegion:n,signingService:o}={}){let i=await this.credentialProvider();this.validateResolvedCredentials(i);let s=n??await this.regionProvider(),{shortDate:a}=T_(r),c=new this.sha256(await this.getSigningKey(i,s,a,o));return c.update((0,Wd.toUint8Array)(t)),(0,x_.toHex)(await c.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:o,signingRegion:i,signingService:s}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let c=i??await this.regionProvider(),l=(0,I4.prepareRequest)(t),{longDate:d,shortDate:f}=T_(r),m=(0,v_.createScope)(f,c,s??this.service);l.headers[rr.AMZ_DATE_HEADER]=d,a.sessionToken&&(l.headers[rr.TOKEN_HEADER]=a.sessionToken);let h=await(0,kI.getPayloadHash)(l,this.sha256);!(0,KSe.hasHeader)(rr.SHA256_HEADER,l.headers)&&this.applyChecksum&&(l.headers[rr.SHA256_HEADER]=h);let _=(0,A4.getCanonicalHeaders)(l,o,n),E=await this.getSignature(d,m,this.getSigningKey(a,c,f,s),this.createCanonicalRequest(l,_,h));return l.headers[rr.AUTH_HEADER]=`${rr.ALGORITHM_IDENTIFIER} Credential=${a.accessKeyId}/${m}, SignedHeaders=${C4(_)}, Signature=${E}`,l}createCanonicalRequest(t,r,n){let o=Object.keys(r).sort();return`${t.method}
46
63
  ${this.getCanonicalPath(t)}
47
- ${(0,nve.getCanonicalQuery)(t)}
48
- ${i.map(o=>`${o}:${r[o]}`).join(`
64
+ ${(0,zSe.getCanonicalQuery)(t)}
65
+ ${o.map(i=>`${i}:${r[i]}`).join(`
49
66
  `)}
50
67
 
51
- ${i.join(";")}
52
- ${n}`}async createStringToSign(t,r,n){let i=new this.sha256;i.update((0,ac.toUint8Array)(n));let o=await i.digest();return`${_t.ALGORITHM_IDENTIFIER}
68
+ ${o.join(";")}
69
+ ${n}`}async createStringToSign(t,r,n){let o=new this.sha256;o.update((0,Wd.toUint8Array)(n));let i=await o.digest();return`${rr.ALGORITHM_IDENTIFIER}
53
70
  ${t}
54
71
  ${r}
55
- ${(0,_p.toHex)(o)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){let r=[];for(let o of t.split("/"))(o==null?void 0:o.length)!==0&&o!=="."&&(o===".."?r.pop():r.push(o));let n=`${t!=null&&t.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&(t!=null&&t.endsWith("/"))?"/":""}`;return encodeURIComponent(n).replace(/%2F/g,"/")}return t}async getSignature(t,r,n,i){let o=await this.createStringToSign(t,r,i),s=new this.sha256(await n);return s.update((0,ac.toUint8Array)(o)),(0,_p.toHex)(await s.digest())}getSigningKey(t,r,n,i){return(0,vp.getSigningKey)(this.sha256,t,n,r,i||this.service)}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}};Ep.SignatureV4=Xv;var gp=e=>{let t=(0,sve.iso8601)(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},zj=e=>Object.keys(e).sort().join(";")});var Jj=y(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.prepareRequest=jt.moveHeadersToQuery=jt.getPayloadHash=jt.getCanonicalQuery=jt.getCanonicalHeaders=void 0;var Kj=(tr(),_e(er));Kj.__exportStar(Wj(),jt);var ave=$v();Object.defineProperty(jt,"getCanonicalHeaders",{enumerable:!0,get:function(){return ave.getCanonicalHeaders}});var cve=Vv();Object.defineProperty(jt,"getCanonicalQuery",{enumerable:!0,get:function(){return cve.getCanonicalQuery}});var uve=zv();Object.defineProperty(jt,"getPayloadHash",{enumerable:!0,get:function(){return uve.getPayloadHash}});var lve=Kv();Object.defineProperty(jt,"moveHeadersToQuery",{enumerable:!0,get:function(){return lve.moveHeadersToQuery}});var dve=Jv();Object.defineProperty(jt,"prepareRequest",{enumerable:!0,get:function(){return dve.prepareRequest}});Kj.__exportStar(Uv(),jt)});var Yj=y(Qv=>{"use strict";Object.defineProperty(Qv,"__esModule",{value:!0});var pve=(tr(),_e(er));pve.__exportStar(Jj(),Qv)});var Xj=y(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.isEmptyData=void 0;function fve(e){return typeof e=="string"?e.length===0:e.byteLength===0}Sp.isEmptyData=fve});var Zv=y(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.EMPTY_DATA_SHA_256=Tn.SHA_256_HMAC_ALGO=Tn.SHA_256_HASH=void 0;Tn.SHA_256_HASH={name:"SHA-256"};Tn.SHA_256_HMAC_ALGO={name:"HMAC",hash:Tn.SHA_256_HASH};Tn.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])});var Cp=y(bp=>{Object.defineProperty(bp,"__esModule",{value:!0});bp.locateWindow=void 0;var mve={};function hve(){return typeof window<"u"?window:typeof self<"u"?self:mve}bp.locateWindow=hve});var tg=y(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});wp.Sha256=void 0;var yve=Xj(),Qj=Zv(),_ve=qd(),eg=Cp(),vve=(function(){function e(t){this.secret=t,this.reset()}return e.prototype.update=function(t){var r=this;(0,yve.isEmptyData)(t)||(this.operation=this.operation.then(function(n){return n.onerror=function(){r.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(Zj(t)),n}),this.operation.catch(function(){}))},e.prototype.digest=function(){return this.operation.then(function(t){return new Promise(function(r,n){t.onerror=function(){n(new Error("Error encountered finalizing hash"))},t.oncomplete=function(){t.result&&r(new Uint8Array(t.result)),n(new Error("Error encountered finalizing hash"))},t.finish()})})},e.prototype.reset=function(){this.secret?(this.operation=gve(this.secret).then(function(t){return(0,eg.locateWindow)().msCrypto.subtle.sign(Qj.SHA_256_HMAC_ALGO,t)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,eg.locateWindow)().msCrypto.subtle.digest("SHA-256"))},e})();wp.Sha256=vve;function gve(e){return new Promise(function(t,r){var n=(0,eg.locateWindow)().msCrypto.subtle.importKey("raw",Zj(e),Qj.SHA_256_HMAC_ALGO,!1,["sign"]);n.oncomplete=function(){n.result&&t(n.result),r(new Error("ImportKey completed without importing key."))},n.onerror=function(){r(new Error("ImportKey failed to import key."))}})}function Zj(e){return typeof e=="string"?(0,_ve.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}});var eq=y(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});xp.convertToBuffer=void 0;var Eve=qd(),Sve=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:Eve.fromUtf8;function bve(e){return e instanceof Uint8Array?e:typeof e=="string"?Sve(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}xp.convertToBuffer=bve});var tq=y(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});Ap.isEmptyData=void 0;function Cve(e){return typeof e=="string"?e.length===0:e.byteLength===0}Ap.isEmptyData=Cve});var rq=y(Tp=>{"use strict";Object.defineProperty(Tp,"__esModule",{value:!0});Tp.numToUint8=void 0;function wve(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}Tp.numToUint8=wve});var nq=y(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.uint32ArrayFrom=void 0;function xve(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}Pp.uint32ArrayFrom=xve});var Ip=y(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.uint32ArrayFrom=rn.numToUint8=rn.isEmptyData=rn.convertToBuffer=void 0;var Ave=eq();Object.defineProperty(rn,"convertToBuffer",{enumerable:!0,get:function(){return Ave.convertToBuffer}});var Tve=tq();Object.defineProperty(rn,"isEmptyData",{enumerable:!0,get:function(){return Tve.isEmptyData}});var Pve=rq();Object.defineProperty(rn,"numToUint8",{enumerable:!0,get:function(){return Pve.numToUint8}});var Ive=nq();Object.defineProperty(rn,"uint32ArrayFrom",{enumerable:!0,get:function(){return Ive.uint32ArrayFrom}})});var ng=y(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});Dp.Sha256=void 0;var Op=Ip(),Rp=Zv(),rg=Cp(),Ove=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!(0,Op.isEmptyData)(t)){var r=(0,Op.convertToBuffer)(t),n=new Uint8Array(this.toHash.byteLength+r.byteLength);n.set(this.toHash,0),n.set(r,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return(0,rg.locateWindow)().crypto.subtle.sign(Rp.SHA_256_HMAC_ALGO,r,t.toHash).then(function(n){return new Uint8Array(n)})}):(0,Op.isEmptyData)(this.toHash)?Promise.resolve(Rp.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,rg.locateWindow)().crypto.subtle.digest(Rp.SHA_256_HASH,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){var t=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,n){(0,rg.locateWindow)().crypto.subtle.importKey("raw",(0,Op.convertToBuffer)(t.secret),Rp.SHA_256_HMAC_ALGO,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},e})();Dp.Sha256=Ove});var ig=y(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.MAX_HASHABLE_LENGTH=Er.INIT=Er.KEY=Er.DIGEST_LENGTH=Er.BLOCK_SIZE=void 0;Er.BLOCK_SIZE=64;Er.DIGEST_LENGTH=32;Er.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);Er.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];Er.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var iq=y(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});Np.RawSha256=void 0;var Sr=ig(),Rve=(function(){function e(){this.state=Int32Array.from(Sr.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,n=t.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>Sr.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=t[r++],n--,this.bufferLength===Sr.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%Sr.BLOCK_SIZE>=Sr.BLOCK_SIZE-8){for(var i=this.bufferLength;i<Sr.BLOCK_SIZE;i++)r.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<Sr.BLOCK_SIZE-8;i++)r.setUint8(i,0);r.setUint32(Sr.BLOCK_SIZE-8,Math.floor(t/4294967296),!0),r.setUint32(Sr.BLOCK_SIZE-4,t),this.hashBuffer(),this.finished=!0}for(var o=new Uint8Array(Sr.DIGEST_LENGTH),i=0;i<8;i++)o[i*4]=this.state[i]>>>24&255,o[i*4+1]=this.state[i]>>>16&255,o[i*4+2]=this.state[i]>>>8&255,o[i*4+3]=this.state[i]>>>0&255;return o},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,n=t.state,i=n[0],o=n[1],s=n[2],a=n[3],c=n[4],u=n[5],d=n[6],p=n[7],m=0;m<Sr.BLOCK_SIZE;m++){if(m<16)this.temp[m]=(r[m*4]&255)<<24|(r[m*4+1]&255)<<16|(r[m*4+2]&255)<<8|r[m*4+3]&255;else{var h=this.temp[m-2],v=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[m-15];var _=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[m]=(v+this.temp[m-7]|0)+(_+this.temp[m-16]|0)}var g=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&d)|0)+(p+(Sr.KEY[m]+this.temp[m]|0)|0)|0,x=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&o^i&s^o&s)|0;p=d,d=u,u=c,c=a+g|0,a=s,s=o,o=i,i=g+x|0}n[0]+=i,n[1]+=o,n[2]+=s,n[3]+=a,n[4]+=c,n[5]+=u,n[6]+=d,n[7]+=p},e})();Np.RawSha256=Rve});var sq=y(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});kp.Sha256=void 0;var oq=(An(),_e(xn)),Lp=ig(),Mp=iq(),og=Ip(),Dve=(function(){function e(t){this.secret=t,this.hash=new Mp.RawSha256,this.reset()}return e.prototype.update=function(t){if(!((0,og.isEmptyData)(t)||this.error))try{this.hash.update((0,og.convertToBuffer)(t))}catch(r){this.error=r}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return oq.__awaiter(this,void 0,void 0,function(){return oq.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Mp.RawSha256,this.secret){this.outer=new Mp.RawSha256;var t=Nve(this.secret),r=new Uint8Array(Lp.BLOCK_SIZE);r.set(t);for(var n=0;n<Lp.BLOCK_SIZE;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(var n=0;n<t.byteLength;n++)t[n]=0}},e})();kp.Sha256=Dve;function Nve(e){var t=(0,og.convertToBuffer)(e);if(t.byteLength>Lp.BLOCK_SIZE){var r=new Mp.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(Lp.BLOCK_SIZE);return n.set(t),n}});var aq=y(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:!0});var Mve=(An(),_e(xn));Mve.__exportStar(sq(),sg)});var lq=y(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.supportsZeroByteGCM=nn.supportsSubtleCrypto=nn.supportsSecureRandom=nn.supportsWebCrypto=void 0;var cq=(An(),_e(xn)),Lve=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function kve(e){if(uq(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return ag(t)}return!1}nn.supportsWebCrypto=kve;function uq(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}nn.supportsSecureRandom=uq;function ag(e){return e&&Lve.every(function(t){return typeof e[t]=="function"})}nn.supportsSubtleCrypto=ag;function Fve(e){return cq.__awaiter(this,void 0,void 0,function(){var t,r,n;return cq.__generator(this,function(i){switch(i.label){case 0:if(!ag(e))return[2,!1];i.label=1;case 1:return i.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=i.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return r=i.sent(),[2,r.byteLength===16];case 4:return n=i.sent(),[2,!1];case 5:return[2]}})})}nn.supportsZeroByteGCM=Fve});var dq=y(cg=>{"use strict";Object.defineProperty(cg,"__esModule",{value:!0});var Bve=(An(),_e(xn));Bve.__exportStar(lq(),cg)});var fq=y(pq=>{"use strict";Object.defineProperty(pq,"__esModule",{value:!0})});var hq=y(mq=>{"use strict";Object.defineProperty(mq,"__esModule",{value:!0})});var _q=y(yq=>{"use strict";Object.defineProperty(yq,"__esModule",{value:!0})});var gq=y(vq=>{"use strict";Object.defineProperty(vq,"__esModule",{value:!0})});var Eq=y(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});Fp.isMsWindow=void 0;var jve=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function qve(e){return"MSInputMethodContext"in e&&"msCrypto"in e}function Uve(e){if(qve(e)&&e.msCrypto.subtle!==void 0){var t=e.msCrypto,r=t.getRandomValues,n=t.subtle;return jve.map(function(i){return n[i]}).concat(r).every(function(i){return typeof i=="function"})}return!1}Fp.isMsWindow=Uve});var Sq=y(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});var cc=(An(),_e(xn));cc.__exportStar(fq(),oo);cc.__exportStar(hq(),oo);cc.__exportStar(_q(),oo);cc.__exportStar(gq(),oo);cc.__exportStar(Eq(),oo)});var Cq=y(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});Bp.Sha256=void 0;var Gve=tg(),$ve=ng(),Hve=aq(),Vve=dq(),zve=Sq(),bq=Cp(),Wve=Ip(),Kve=(function(){function e(t){(0,Vve.supportsWebCrypto)((0,bq.locateWindow)())?this.hash=new $ve.Sha256(t):(0,zve.isMsWindow)((0,bq.locateWindow)())?this.hash=new Gve.Sha256(t):this.hash=new Hve.Sha256(t)}return e.prototype.update=function(t,r){this.hash.update((0,Wve.convertToBuffer)(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();Bp.Sha256=Kve});var wq=y(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.WebCryptoSha256=so.Ie11Sha256=void 0;var Jve=(An(),_e(xn));Jve.__exportStar(Cq(),so);var Yve=tg();Object.defineProperty(so,"Ie11Sha256",{enumerable:!0,get:function(){return Yve.Sha256}});var Xve=ng();Object.defineProperty(so,"WebCryptoSha256",{enumerable:!0,get:function(){return Xve.Sha256}})});var qq=y((ZNe,jq)=>{var qp=Object.defineProperty,Qve=Object.getOwnPropertyDescriptor,Zve=Object.getOwnPropertyNames,ege=Object.prototype.hasOwnProperty,We=(e,t)=>qp(e,"name",{value:t,configurable:!0}),tge=(e,t)=>{for(var r in t)qp(e,r,{get:t[r],enumerable:!0})},rge=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Zve(t))!ege.call(e,i)&&i!==r&&qp(e,i,{get:()=>t[i],enumerable:!(n=Qve(t,i))||n.enumerable});return e},nge=e=>rge(qp({},"__esModule",{value:!0}),e),Oq={};tge(Oq,{NumberValueImpl:()=>Up,convertToAttr:()=>lc,convertToNative:()=>uc,marshall:()=>Bq,unmarshall:()=>uge});jq.exports=nge(Oq);var Rq=class Dq{constructor(t){typeof t=="object"&&"N"in t?this.value=String(t.N):this.value=String(t);let r=typeof t.valueOf()=="number"?t.valueOf():0;if(r>Number.MAX_SAFE_INTEGER||r<Number.MIN_SAFE_INTEGER||Math.abs(r)===1/0||Number.isNaN(r))throw new Error(`NumberValue should not be initialized with an imprecise number=${r}. Use a string instead.`)}static from(t){return new Dq(t)}toAttributeValue(){return{N:this.toString()}}toBigInt(){let t=this.toString();return BigInt(t)}toString(){return String(this.value)}valueOf(){return this.toString()}};We(Rq,"NumberValue");var Up=Rq,lc=We((e,t)=>{var r,n,i,o,s,a;if(e===void 0)throw new Error("Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.");if(e===null&&typeof e=="object")return jp();if(Array.isArray(e))return ige(e,t);if(((r=e==null?void 0:e.constructor)==null?void 0:r.name)==="Set")return oge(e,t);if(((n=e==null?void 0:e.constructor)==null?void 0:n.name)==="Map")return sge(e,t);if(((i=e==null?void 0:e.constructor)==null?void 0:i.name)==="Object"||!e.constructor&&typeof e=="object")return xq(e,t);if(Fq(e))return e.length===0&&(t!=null&&t.convertEmptyValues)?jp():Nq(e);if(typeof e=="boolean"||((o=e==null?void 0:e.constructor)==null?void 0:o.name)==="Boolean")return{BOOL:e.valueOf()};if(typeof e=="number"||((s=e==null?void 0:e.constructor)==null?void 0:s.name)==="Number")return kq(e);if(e instanceof Up)return e.toAttributeValue();if(typeof e=="bigint")return Lq(e);if(typeof e=="string"||((a=e==null?void 0:e.constructor)==null?void 0:a.name)==="String")return e.length===0&&(t!=null&&t.convertEmptyValues)?jp():Mq(e);if(t!=null&&t.convertClassInstanceToMap&&typeof e=="object")return xq(e,t);throw new Error(`Unsupported type passed: ${e}. Pass options.convertClassInstanceToMap=true to marshall typeof object as map attribute.`)},"convertToAttr"),ige=We((e,t)=>({L:e.filter(r=>typeof r!="function"&&(!(t!=null&&t.removeUndefinedValues)||(t==null?void 0:t.removeUndefinedValues)&&r!==void 0)).map(r=>lc(r,t))}),"convertToListAttr"),oge=We((e,t)=>{let r=t!=null&&t.removeUndefinedValues?new Set([...e].filter(i=>i!==void 0)):e;if(!(t!=null&&t.removeUndefinedValues)&&r.has(void 0))throw new Error("Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.");if(r.size===0){if(t!=null&&t.convertEmptyValues)return jp();throw new Error("Pass a non-empty set, or options.convertEmptyValues=true.")}let n=r.values().next().value;if(n instanceof Up)return{NS:Array.from(r).map(i=>i.toString())};if(typeof n=="number")return{NS:Array.from(r).map(kq).map(i=>i.N)};if(typeof n=="bigint")return{NS:Array.from(r).map(Lq).map(i=>i.N)};if(typeof n=="string")return{SS:Array.from(r).map(Mq).map(i=>i.S)};if(Fq(n))return{BS:Array.from(r).map(Nq).map(i=>i.B)};throw new Error("Only Number Set (NS), Binary Set (BS) or String Set (SS) are allowed.")},"convertToSetAttr"),sge=We((e,t)=>({M:(r=>{let n={};for(let[i,o]of r)typeof o!="function"&&(o!==void 0||!(t!=null&&t.removeUndefinedValues))&&(n[i]=lc(o,t));return n})(e)}),"convertToMapAttrFromIterable"),xq=We((e,t)=>({M:(r=>{let n={};for(let i in r){let o=r[i];typeof o!="function"&&(o!==void 0||!(t!=null&&t.removeUndefinedValues))&&(n[i]=lc(o,t))}return n})(e)}),"convertToMapAttrFromEnumerableProps"),jp=We(()=>({NULL:!0}),"convertToNullAttr"),Nq=We(e=>({B:e}),"convertToBinaryAttr"),Mq=We(e=>({S:e.toString()}),"convertToStringAttr"),Lq=We(e=>({N:e.toString()}),"convertToBigIntAttr"),Aq=We(e=>{throw new Error(`${e} ${typeof BigInt=="function"?"Use BigInt.":"Pass string value instead."} `)},"validateBigIntAndThrow"),kq=We(e=>{if([Number.NaN,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY].map(t=>t.toString()).includes(e.toString()))throw new Error(`Special numeric value ${e.toString()} is not allowed`);return e>Number.MAX_SAFE_INTEGER?Aq(`Number ${e.toString()} is greater than Number.MAX_SAFE_INTEGER.`):e<Number.MIN_SAFE_INTEGER&&Aq(`Number ${e.toString()} is lesser than Number.MIN_SAFE_INTEGER.`),{N:e.toString()}},"convertToNumberAttr"),Fq=We(e=>{let t=["ArrayBuffer","Blob","Buffer","DataView","File","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];return e!=null&&e.constructor?t.includes(e.constructor.name):!1},"isBinary"),uc=We((e,t)=>{for(let[r,n]of Object.entries(e))if(n!==void 0)switch(r){case"NULL":return null;case"BOOL":return!!n;case"N":return Tq(n,t);case"B":return Iq(n);case"S":return Pq(n);case"L":return age(n,t);case"M":return cge(n,t);case"NS":return new Set(n.map(i=>Tq(i,t)));case"BS":return new Set(n.map(Iq));case"SS":return new Set(n.map(Pq));default:throw new Error(`Unsupported type passed: ${r}`)}throw new Error(`No value defined: ${JSON.stringify(e)}`)},"convertToNative"),Tq=We((e,t)=>{if(t!=null&&t.wrapNumbers)return Up.from(e);let r=Number(e),n=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];if((r>Number.MAX_SAFE_INTEGER||r<Number.MIN_SAFE_INTEGER)&&!n.includes(r))if(typeof BigInt=="function")try{return BigInt(e)}catch{throw new Error(`${e} can't be converted to BigInt. Set options.wrapNumbers to get string value.`)}else throw new Error(`${e} is outside SAFE_INTEGER bounds. Set options.wrapNumbers to get string value.`);return r},"convertNumber"),Pq=We(e=>e,"convertString"),Iq=We(e=>e,"convertBinary"),age=We((e,t)=>e.map(r=>uc(r,t)),"convertList"),cge=We((e,t)=>Object.entries(e).reduce((r,[n,i])=>(r[n]=uc(i,t),r),{}),"convertMap");function Bq(e,t){let r=lc(e,t),[n,i]=Object.entries(r)[0];switch(n){case"M":case"L":return t!=null&&t.convertTopLevelContainer?r:i;case"SS":case"NS":case"BS":case"S":case"N":case"B":case"NULL":case"BOOL":case"$unknown":default:return r}}We(Bq,"marshall");var uge=We((e,t)=>t!=null&&t.convertWithoutMapWrapper?uc(e,t):uc({M:e},t),"unmarshall")});var EU=y((f1e,gU)=>{var $p=Object.defineProperty,lge=Object.getOwnPropertyDescriptor,dge=Object.getOwnPropertyNames,pge=Object.prototype.hasOwnProperty,Pe=(e,t)=>$p(e,"name",{value:t,configurable:!0}),fge=(e,t)=>{for(var r in t)$p(e,r,{get:t[r],enumerable:!0})},mge=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of dge(t))!pge.call(e,i)&&i!==r&&$p(e,i,{get:()=>t[i],enumerable:!(n=lge(t,i))||n.enumerable});return e},hge=e=>mge($p({},"__esModule",{value:!0}),e),Gq={};fge(Gq,{BatchExecuteStatementCommand:()=>Hq,BatchGetCommand:()=>zq,BatchWriteCommand:()=>Kq,DeleteCommand:()=>Yq,DynamoDBDocument:()=>gge,DynamoDBDocumentClient:()=>Hp,DynamoDBDocumentClientCommand:()=>qt,ExecuteStatementCommand:()=>Qq,ExecuteTransactionCommand:()=>eU,GetCommand:()=>rU,NativeAttributeBinary:()=>wi.NativeAttributeBinary,NativeAttributeValue:()=>wi.NativeAttributeValue,NativeScalarAttributeValue:()=>wi.NativeScalarAttributeValue,NumberValue:()=>wi.NumberValueImpl,PaginationConfiguration:()=>Ege.PaginationConfiguration,PutCommand:()=>iU,QueryCommand:()=>fg,ScanCommand:()=>mg,TransactGetCommand:()=>cU,TransactWriteCommand:()=>lU,UpdateCommand:()=>pU,__Client:()=>lg.Client,marshallOptions:()=>wi.marshallOptions,paginateQuery:()=>_U,paginateScan:()=>vU,unmarshallOptions:()=>wi.unmarshallOptions});gU.exports=hge(Gq);var rr=fv(),lg=Be(),wi=qq(),dc=null,ie={},Pn=[],Uq="*",Gp=Pe((e,t,r)=>{if(e!==void 0){if(r==null)return t(e);{let n=Object.keys(r),i=n.length===1&&n[0]===Uq,o=n.length>=1&&!i,s=n.length===0;if(o)return dg(e,t,r);if(s)return yge(e,t,dc);if(i)return Object.entries(e??{}).reduce((a,[c,u])=>(typeof u!="function"&&(a[c]=Gp(u,t,r[Uq])),a),Array.isArray(e)?[]:{})}}},"processObj"),dg=Pe((e,t,r)=>{let n;if(Array.isArray(e))n=[...e].filter(i=>typeof i!="function");else{n={};for(let[i,o]of Object.entries(e))typeof o!="function"&&(n[i]=o)}for(let[i,o]of Object.entries(r)){if(typeof e[i]=="function")continue;let s=Gp(e[i],t,o);s!==void 0&&typeof s!="function"&&(n[i]=s)}return n},"processKeysInObj"),yge=Pe((e,t,r)=>Array.isArray(e)?e.filter(n=>typeof n!="function").map(n=>Gp(n,t,r)):Object.entries(e).reduce((n,[i,o])=>{if(typeof o=="function")return n;let s=Gp(o,t,r);return s!==void 0&&typeof s!="function"&&(n[i]=s),n},{}),"processAllKeysInObj"),_ge=Pe((e,t,r)=>dg(e,Pe(i=>(0,wi.marshall)(i,r),"marshallFunc"),t),"marshallInput"),vge=Pe((e,t,r)=>dg(e,Pe(i=>(0,wi.unmarshall)(i,r),"unmarshallFunc"),t),"unmarshallOutput"),pg=class ug extends lg.Command{addMarshallingMiddleware(t){let{marshallOptions:r={},unmarshallOptions:n={}}=t.translateConfig||{};r.convertTopLevelContainer=r.convertTopLevelContainer??!0,n.convertWithoutMapWrapper=n.convertWithoutMapWrapper??!0,this.clientCommand.middlewareStack.addRelativeTo((i,o)=>async s=>{s.input=_ge(this.input,this.inputKeyNodes,r),o.dynamoDbDocumentClientOptions=o.dynamoDbDocumentClientOptions||ug.defaultLogFilterOverrides;let a=s.input;return o.dynamoDbDocumentClientOptions.overrideInputFilterSensitiveLog=()=>{var c;return(c=o.inputFilterSensitiveLog)==null?void 0:c.call(o,a)},i(s)},{name:"DocumentMarshall",relation:"before",toMiddleware:"serializerMiddleware",override:!0}),this.clientCommand.middlewareStack.addRelativeTo((i,o)=>async s=>{let a=await i(s),c=a.output;return o.dynamoDbDocumentClientOptions=o.dynamoDbDocumentClientOptions||ug.defaultLogFilterOverrides,o.dynamoDbDocumentClientOptions.overrideOutputFilterSensitiveLog=()=>{var u;return(u=o.outputFilterSensitiveLog)==null?void 0:u.call(o,c)},a.output=vge(a.output,this.outputKeyNodes,n),a},{name:"DocumentUnmarshall",relation:"before",toMiddleware:"deserializerMiddleware",override:!0})}};Pe(pg,"DynamoDBDocumentClientCommand");pg.defaultLogFilterOverrides={overrideInputFilterSensitiveLog(...e){},overrideOutputFilterSensitiveLog(...e){}};var qt=pg,$q=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={Statements:{"*":{Parameters:Pn}}},this.outputKeyNodes={Responses:{"*":{Error:{Item:ie},Item:ie}}},this.clientCommand=new rr.BatchExecuteStatementCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe($q,"BatchExecuteStatementCommand");var Hq=$q,Vq=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={RequestItems:{"*":{Keys:{"*":ie}}}},this.outputKeyNodes={Responses:{"*":{"*":ie}},UnprocessedKeys:{"*":{Keys:{"*":ie}}}},this.clientCommand=new rr.BatchGetItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(Vq,"BatchGetCommand");var zq=Vq,Wq=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={RequestItems:{"*":{"*":{PutRequest:{Item:ie},DeleteRequest:{Key:ie}}}}},this.outputKeyNodes={UnprocessedItems:{"*":{"*":{PutRequest:{Item:ie},DeleteRequest:{Key:ie}}}},ItemCollectionMetrics:{"*":{"*":{ItemCollectionKey:ie}}}},this.clientCommand=new rr.BatchWriteItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(Wq,"BatchWriteCommand");var Kq=Wq,Jq=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={Key:ie,Expected:{"*":{Value:dc,AttributeValueList:Pn}},ExpressionAttributeValues:ie},this.outputKeyNodes={Attributes:ie,ItemCollectionMetrics:{ItemCollectionKey:ie}},this.clientCommand=new rr.DeleteItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(Jq,"DeleteCommand");var Yq=Jq,Xq=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={Parameters:Pn},this.outputKeyNodes={Items:{"*":ie},LastEvaluatedKey:ie},this.clientCommand=new rr.ExecuteStatementCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(Xq,"ExecuteStatementCommand");var Qq=Xq,Zq=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={TransactStatements:{"*":{Parameters:Pn}}},this.outputKeyNodes={Responses:{"*":{Item:ie}}},this.clientCommand=new rr.ExecuteTransactionCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(Zq,"ExecuteTransactionCommand");var eU=Zq,tU=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={Key:ie},this.outputKeyNodes={Item:ie},this.clientCommand=new rr.GetItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(tU,"GetCommand");var rU=tU,nU=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={Item:ie,Expected:{"*":{Value:dc,AttributeValueList:Pn}},ExpressionAttributeValues:ie},this.outputKeyNodes={Attributes:ie,ItemCollectionMetrics:{ItemCollectionKey:ie}},this.clientCommand=new rr.PutItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(nU,"PutCommand");var iU=nU,oU=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={KeyConditions:{"*":{AttributeValueList:Pn}},QueryFilter:{"*":{AttributeValueList:Pn}},ExclusiveStartKey:ie,ExpressionAttributeValues:ie},this.outputKeyNodes={Items:{"*":ie},LastEvaluatedKey:ie},this.clientCommand=new rr.QueryCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(oU,"QueryCommand");var fg=oU,sU=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={ScanFilter:{"*":{AttributeValueList:Pn}},ExclusiveStartKey:ie,ExpressionAttributeValues:ie},this.outputKeyNodes={Items:{"*":ie},LastEvaluatedKey:ie},this.clientCommand=new rr.ScanCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(sU,"ScanCommand");var mg=sU,aU=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={TransactItems:{"*":{Get:{Key:ie}}}},this.outputKeyNodes={Responses:{"*":{Item:ie}}},this.clientCommand=new rr.TransactGetItemsCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(aU,"TransactGetCommand");var cU=aU,uU=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={TransactItems:{"*":{ConditionCheck:{Key:ie,ExpressionAttributeValues:ie},Put:{Item:ie,ExpressionAttributeValues:ie},Delete:{Key:ie,ExpressionAttributeValues:ie},Update:{Key:ie,ExpressionAttributeValues:ie}}}},this.outputKeyNodes={ItemCollectionMetrics:{"*":{"*":{ItemCollectionKey:ie}}}},this.clientCommand=new rr.TransactWriteItemsCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(uU,"TransactWriteCommand");var lU=uU,dU=class extends qt{constructor(t){super(),this.input=t,this.inputKeyNodes={Key:ie,AttributeUpdates:{"*":{Value:dc}},Expected:{"*":{Value:dc,AttributeValueList:Pn}},ExpressionAttributeValues:ie},this.outputKeyNodes={Attributes:ie,ItemCollectionMetrics:{ItemCollectionKey:ie}},this.clientCommand=new rr.UpdateItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let i=t.concat(this.middlewareStack),o=this.clientCommand.resolveMiddleware(i,r,n);return async()=>o(this.clientCommand)}};Pe(dU,"UpdateCommand");var pU=dU,fU=class mU extends lg.Client{constructor(t,r){super(t.config),this.config=t.config,this.config.translateConfig=r,this.middlewareStack=t.middlewareStack}static from(t,r){return new mU(t,r)}destroy(){}};Pe(fU,"DynamoDBDocumentClient");var Hp=fU,hU=class yU extends Hp{static from(t,r){return new yU(t,r)}batchExecuteStatement(t,r,n){let i=new Hq(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}batchGet(t,r,n){let i=new zq(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}batchWrite(t,r,n){let i=new Kq(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}delete(t,r,n){let i=new Yq(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}executeStatement(t,r,n){let i=new Qq(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}executeTransaction(t,r,n){let i=new eU(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}get(t,r,n){let i=new rU(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}put(t,r,n){let i=new iU(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}query(t,r,n){let i=new fg(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}scan(t,r,n){let i=new mg(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}transactGet(t,r,n){let i=new cU(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}transactWrite(t,r,n){let i=new lU(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}update(t,r,n){let i=new pU(t);if(typeof r=="function")this.send(i,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(i,r||{},n)}else return this.send(i,r)}};Pe(hU,"DynamoDBDocument");var gge=hU,Ege=sr(),Sge=Pe(async(e,t,...r)=>await e.send(new fg(t),...r),"makePagedClientRequest");async function*_U(e,t,...r){let n=e.startingToken||void 0,i=!0,o;for(;i;){if(t.ExclusiveStartKey=n,t.Limit=e.pageSize,e.client instanceof Hp)o=await Sge(e.client,t,...r);else throw new Error("Invalid client, expected DynamoDBDocument | DynamoDBDocumentClient");yield o,n=o.LastEvaluatedKey,i=!!n}return void 0}Pe(_U,"paginateQuery");var bge=Pe(async(e,t,...r)=>await e.send(new mg(t),...r),"makePagedClientRequest");async function*vU(e,t,...r){let n=e.startingToken||void 0,i=!0,o;for(;i;){if(t.ExclusiveStartKey=n,t.Limit=e.pageSize,e.client instanceof Hp)o=await bge(e.client,t,...r);else throw new Error("Invalid client, expected DynamoDBDocument | DynamoDBDocumentClient");yield o,n=o.LastEvaluatedKey,i=!!n}return void 0}Pe(vU,"paginateScan")});var SU=y(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.DBManager=void 0;var Cge=EU(),hg=class{get client(){return this._client}get ddbDocClient(){return this._ddbDocClient}constructor(t){let{dynamoClient:r,tableName:n}=t;this._tableName=n,this._client=r,this._ddbDocClient=Cge.DynamoDBDocument.from(this._client)}get tableName(){return this._tableName}set tableName(t){this._tableName=t}};Vp.DBManager=hg});var bU=y(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});pc.TransformationType=void 0;var wge;(function(e){e[e.PLAIN_TO_CLASS=0]="PLAIN_TO_CLASS",e[e.CLASS_TO_PLAIN=1]="CLASS_TO_PLAIN",e[e.CLASS_TO_CLASS=2]="CLASS_TO_CLASS"})(wge=pc.TransformationType||(pc.TransformationType={}))});var fc=y(ao=>{"use strict";var xge=ao&&ao.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Age=ao&&ao.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&xge(t,e,r)};Object.defineProperty(ao,"__esModule",{value:!0});Age(bU(),ao)});var CU=y(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});zp.MetadataStorage=void 0;var In=fc(),yg=class{constructor(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}addTypeMetadata(t){this._typeMetadatas.has(t.target)||this._typeMetadatas.set(t.target,new Map),this._typeMetadatas.get(t.target).set(t.propertyName,t)}addTransformMetadata(t){this._transformMetadatas.has(t.target)||this._transformMetadatas.set(t.target,new Map),this._transformMetadatas.get(t.target).has(t.propertyName)||this._transformMetadatas.get(t.target).set(t.propertyName,[]),this._transformMetadatas.get(t.target).get(t.propertyName).push(t)}addExposeMetadata(t){this._exposeMetadatas.has(t.target)||this._exposeMetadatas.set(t.target,new Map),this._exposeMetadatas.get(t.target).set(t.propertyName,t)}addExcludeMetadata(t){this._excludeMetadatas.has(t.target)||this._excludeMetadatas.set(t.target,new Map),this._excludeMetadatas.get(t.target).set(t.propertyName,t)}findTransformMetadatas(t,r,n){return this.findMetadatas(this._transformMetadatas,t,r).filter(i=>!i.options||i.options.toClassOnly===!0&&i.options.toPlainOnly===!0?!0:i.options.toClassOnly===!0?n===In.TransformationType.CLASS_TO_CLASS||n===In.TransformationType.PLAIN_TO_CLASS:i.options.toPlainOnly===!0?n===In.TransformationType.CLASS_TO_PLAIN:!0)}findExcludeMetadata(t,r){return this.findMetadata(this._excludeMetadatas,t,r)}findExposeMetadata(t,r){return this.findMetadata(this._exposeMetadatas,t,r)}findExposeMetadataByCustomName(t,r){return this.getExposedMetadatas(t).find(n=>n.options&&n.options.name===r)}findTypeMetadata(t,r){return this.findMetadata(this._typeMetadatas,t,r)}getStrategy(t){let r=this._excludeMetadatas.get(t),n=r&&r.get(void 0),i=this._exposeMetadatas.get(t),o=i&&i.get(void 0);return n&&o||!n&&!o?"none":n?"excludeAll":"exposeAll"}getExposedMetadatas(t){return this.getMetadata(this._exposeMetadatas,t)}getExcludedMetadatas(t){return this.getMetadata(this._excludeMetadatas,t)}getExposedProperties(t,r){return this.getExposedMetadatas(t).filter(n=>!n.options||n.options.toClassOnly===!0&&n.options.toPlainOnly===!0?!0:n.options.toClassOnly===!0?r===In.TransformationType.CLASS_TO_CLASS||r===In.TransformationType.PLAIN_TO_CLASS:n.options.toPlainOnly===!0?r===In.TransformationType.CLASS_TO_PLAIN:!0).map(n=>n.propertyName)}getExcludedProperties(t,r){return this.getExcludedMetadatas(t).filter(n=>!n.options||n.options.toClassOnly===!0&&n.options.toPlainOnly===!0?!0:n.options.toClassOnly===!0?r===In.TransformationType.CLASS_TO_CLASS||r===In.TransformationType.PLAIN_TO_CLASS:n.options.toPlainOnly===!0?r===In.TransformationType.CLASS_TO_PLAIN:!0).map(n=>n.propertyName)}clear(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()}getMetadata(t,r){let n=t.get(r),i;n&&(i=Array.from(n.values()).filter(s=>s.propertyName!==void 0));let o=[];for(let s of this.getAncestors(r)){let a=t.get(s);if(a){let c=Array.from(a.values()).filter(u=>u.propertyName!==void 0);o.push(...c)}}return o.concat(i||[])}findMetadata(t,r,n){let i=t.get(r);if(i){let o=i.get(n);if(o)return o}for(let o of this.getAncestors(r)){let s=t.get(o);if(s){let a=s.get(n);if(a)return a}}}findMetadatas(t,r,n){let i=t.get(r),o;i&&(o=i.get(n));let s=[];for(let a of this.getAncestors(r)){let c=t.get(a);c&&c.has(n)&&s.push(...c.get(n))}return s.slice().reverse().concat((o||[]).slice().reverse())}getAncestors(t){if(!t)return[];if(!this._ancestorsMap.has(t)){let r=[];for(let n=Object.getPrototypeOf(t.prototype.constructor);typeof n.prototype<"u";n=Object.getPrototypeOf(n.prototype.constructor))r.push(n);this._ancestorsMap.set(t,r)}return this._ancestorsMap.get(t)}};zp.MetadataStorage=yg});var xs=y(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});Wp.defaultMetadataStorage=void 0;var Tge=CU();Wp.defaultMetadataStorage=new Tge.MetadataStorage});var wU=y(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.getGlobal=void 0;function Pge(){if(typeof globalThis<"u")return globalThis;if(typeof global<"u")return global;if(typeof window<"u")return window;if(typeof self<"u")return self}Kp.getGlobal=Pge});var xU=y(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});Jp.isPromise=void 0;function Ige(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}Jp.isPromise=Ige});var TU=y(xi=>{"use strict";var Oge=xi&&xi.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),AU=xi&&xi.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Oge(t,e,r)};Object.defineProperty(xi,"__esModule",{value:!0});AU(wU(),xi);AU(xU(),xi)});var IU=y(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});Yp.TransformOperationExecutor=void 0;var Ut=xs(),Ke=fc(),PU=TU();function Rge(e){let t=new e;return!(t instanceof Set)&&!("push"in t)?[]:t}var _g=class{constructor(t,r){this.transformationType=t,this.options=r,this.recursionStack=new Set}transform(t,r,n,i,o,s=0){if(Array.isArray(r)||r instanceof Set){let a=i&&this.transformationType===Ke.TransformationType.PLAIN_TO_CLASS?Rge(i):[];return r.forEach((c,u)=>{let d=t?t[u]:void 0;if(!this.options.enableCircularCheck||!this.isCircular(c)){let p;if(typeof n!="function"&&n&&n.options&&n.options.discriminator&&n.options.discriminator.property&&n.options.discriminator.subTypes){if(this.transformationType===Ke.TransformationType.PLAIN_TO_CLASS){p=n.options.discriminator.subTypes.find(_=>_.name===c[n.options.discriminator.property]);let h={newObject:a,object:c,property:void 0},v=n.typeFunction(h);p===void 0?p=v:p=p.value,n.options.keepDiscriminatorProperty||delete c[n.options.discriminator.property]}this.transformationType===Ke.TransformationType.CLASS_TO_CLASS&&(p=c.constructor),this.transformationType===Ke.TransformationType.CLASS_TO_PLAIN&&(c[n.options.discriminator.property]=n.options.discriminator.subTypes.find(h=>h.value===c.constructor).name)}else p=n;let m=this.transform(d,c,p,void 0,c instanceof Map,s+1);a instanceof Set?a.add(m):a.push(m)}else this.transformationType===Ke.TransformationType.CLASS_TO_CLASS&&(a instanceof Set?a.add(c):a.push(c))}),a}else{if(n===String&&!o)return r==null?r:String(r);if(n===Number&&!o)return r==null?r:Number(r);if(n===Boolean&&!o)return r==null?r:!!r;if((n===Date||r instanceof Date)&&!o)return r instanceof Date?new Date(r.valueOf()):r==null?r:new Date(r);if((0,PU.getGlobal)().Buffer&&(n===Buffer||r instanceof Buffer)&&!o)return r==null?r:Buffer.from(r);if((0,PU.isPromise)(r)&&!o)return new Promise((a,c)=>{r.then(u=>a(this.transform(void 0,u,n,void 0,void 0,s+1)),c)});if(!o&&r!==null&&typeof r=="object"&&typeof r.then=="function")return r;if(typeof r=="object"&&r!==null){!n&&r.constructor!==Object&&(!Array.isArray(r)&&r.constructor===Array||(n=r.constructor)),!n&&t&&(n=t.constructor),this.options.enableCircularCheck&&this.recursionStack.add(r);let a=this.getKeys(n,r,o),c=t||{};!t&&(this.transformationType===Ke.TransformationType.PLAIN_TO_CLASS||this.transformationType===Ke.TransformationType.CLASS_TO_CLASS)&&(o?c=new Map:n?c=new n:c={});for(let u of a){if(u==="__proto__"||u==="constructor")continue;let d=u,p=u,m=u;if(!this.options.ignoreDecorators&&n){if(this.transformationType===Ke.TransformationType.PLAIN_TO_CLASS){let S=Ut.defaultMetadataStorage.findExposeMetadataByCustomName(n,u);S&&(m=S.propertyName,p=S.propertyName)}else if(this.transformationType===Ke.TransformationType.CLASS_TO_PLAIN||this.transformationType===Ke.TransformationType.CLASS_TO_CLASS){let S=Ut.defaultMetadataStorage.findExposeMetadata(n,u);S&&S.options&&S.options.name&&(p=S.options.name)}}let h;this.transformationType===Ke.TransformationType.PLAIN_TO_CLASS?h=r[d]:r instanceof Map?h=r.get(d):r[d]instanceof Function?h=r[d]():h=r[d];let v,_=h instanceof Map;if(n&&o)v=n;else if(n){let S=Ut.defaultMetadataStorage.findTypeMetadata(n,m);if(S){let M={newObject:c,object:r,property:m},k=S.typeFunction?S.typeFunction(M):S.reflectedType;S.options&&S.options.discriminator&&S.options.discriminator.property&&S.options.discriminator.subTypes?r[d]instanceof Array?v=S:(this.transformationType===Ke.TransformationType.PLAIN_TO_CLASS&&(v=S.options.discriminator.subTypes.find(me=>{if(h&&h instanceof Object&&S.options.discriminator.property in h)return me.name===h[S.options.discriminator.property]}),v===void 0?v=k:v=v.value,S.options.keepDiscriminatorProperty||h&&h instanceof Object&&S.options.discriminator.property in h&&delete h[S.options.discriminator.property]),this.transformationType===Ke.TransformationType.CLASS_TO_CLASS&&(v=h.constructor),this.transformationType===Ke.TransformationType.CLASS_TO_PLAIN&&h&&(h[S.options.discriminator.property]=S.options.discriminator.subTypes.find(me=>me.value===h.constructor).name)):v=k,_=_||S.reflectedType===Map}else if(this.options.targetMaps)this.options.targetMaps.filter(M=>M.target===n&&!!M.properties[m]).forEach(M=>v=M.properties[m]);else if(this.options.enableImplicitConversion&&this.transformationType===Ke.TransformationType.PLAIN_TO_CLASS){let M=Reflect.getMetadata("design:type",n.prototype,m);M&&(v=M)}}let g=Array.isArray(r[d])?this.getReflectedType(n,m):void 0,x=t?t[d]:void 0;if(c.constructor.prototype){let S=Object.getOwnPropertyDescriptor(c.constructor.prototype,p);if((this.transformationType===Ke.TransformationType.PLAIN_TO_CLASS||this.transformationType===Ke.TransformationType.CLASS_TO_CLASS)&&(S&&!S.set||c[p]instanceof Function))continue}if(!this.options.enableCircularCheck||!this.isCircular(h)){let S=this.transformationType===Ke.TransformationType.PLAIN_TO_CLASS?p:u,M;this.transformationType===Ke.TransformationType.CLASS_TO_PLAIN?(M=r[S],M=this.applyCustomTransformations(M,n,S,r,this.transformationType),M=r[S]===M?h:M,M=this.transform(x,M,v,g,_,s+1)):h===void 0&&this.options.exposeDefaultValues?M=c[p]:(M=this.transform(x,h,v,g,_,s+1),M=this.applyCustomTransformations(M,n,S,r,this.transformationType)),(M!==void 0||this.options.exposeUnsetFields)&&(c instanceof Map?c.set(p,M):c[p]=M)}else if(this.transformationType===Ke.TransformationType.CLASS_TO_CLASS){let S=h;S=this.applyCustomTransformations(S,n,u,r,this.transformationType),(S!==void 0||this.options.exposeUnsetFields)&&(c instanceof Map?c.set(p,S):c[p]=S)}}return this.options.enableCircularCheck&&this.recursionStack.delete(r),c}else return r}}applyCustomTransformations(t,r,n,i,o){let s=Ut.defaultMetadataStorage.findTransformMetadatas(r,n,this.transformationType);return this.options.version!==void 0&&(s=s.filter(a=>a.options?this.checkVersion(a.options.since,a.options.until):!0)),this.options.groups&&this.options.groups.length?s=s.filter(a=>a.options?this.checkGroups(a.options.groups):!0):s=s.filter(a=>!a.options||!a.options.groups||!a.options.groups.length),s.forEach(a=>{t=a.transformFn({value:t,key:n,obj:i,type:o,options:this.options})}),t}isCircular(t){return this.recursionStack.has(t)}getReflectedType(t,r){if(!t)return;let n=Ut.defaultMetadataStorage.findTypeMetadata(t,r);return n?n.reflectedType:void 0}getKeys(t,r,n){let i=Ut.defaultMetadataStorage.getStrategy(t);i==="none"&&(i=this.options.strategy||"exposeAll");let o=[];if((i==="exposeAll"||n)&&(r instanceof Map?o=Array.from(r.keys()):o=Object.keys(r)),n)return o;if(this.options.ignoreDecorators&&this.options.excludeExtraneousValues&&t){let s=Ut.defaultMetadataStorage.getExposedProperties(t,this.transformationType),a=Ut.defaultMetadataStorage.getExcludedProperties(t,this.transformationType);o=[...s,...a]}if(!this.options.ignoreDecorators&&t){let s=Ut.defaultMetadataStorage.getExposedProperties(t,this.transformationType);this.transformationType===Ke.TransformationType.PLAIN_TO_CLASS&&(s=s.map(c=>{let u=Ut.defaultMetadataStorage.findExposeMetadata(t,c);return u&&u.options&&u.options.name?u.options.name:c})),this.options.excludeExtraneousValues?o=s:o=o.concat(s);let a=Ut.defaultMetadataStorage.getExcludedProperties(t,this.transformationType);a.length>0&&(o=o.filter(c=>!a.includes(c))),this.options.version!==void 0&&(o=o.filter(c=>{let u=Ut.defaultMetadataStorage.findExposeMetadata(t,c);return!u||!u.options?!0:this.checkVersion(u.options.since,u.options.until)})),this.options.groups&&this.options.groups.length?o=o.filter(c=>{let u=Ut.defaultMetadataStorage.findExposeMetadata(t,c);return!u||!u.options?!0:this.checkGroups(u.options.groups)}):o=o.filter(c=>{let u=Ut.defaultMetadataStorage.findExposeMetadata(t,c);return!u||!u.options||!u.options.groups||!u.options.groups.length})}return this.options.excludePrefixes&&this.options.excludePrefixes.length&&(o=o.filter(s=>this.options.excludePrefixes.every(a=>s.substr(0,a.length)!==a))),o=o.filter((s,a,c)=>c.indexOf(s)===a),o}checkVersion(t,r){let n=!0;return n&&t&&(n=this.options.version>=t),n&&r&&(n=this.options.version<r),n}checkGroups(t){return t?this.options.groups.some(r=>t.includes(r)):!0}};Yp.TransformOperationExecutor=_g});var OU=y(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});Xp.defaultOptions=void 0;Xp.defaultOptions={enableCircularCheck:!1,enableImplicitConversion:!1,excludeExtraneousValues:!1,excludePrefixes:void 0,exposeDefaultValues:!1,exposeUnsetFields:!0,groups:void 0,ignoreDecorators:!1,strategy:void 0,targetMaps:void 0,version:void 0}});var Is=y(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});Qp.ClassTransformer=void 0;var As=IU(),Ts=fc(),Ps=OU(),vg=class{instanceToPlain(t,r){return new As.TransformOperationExecutor(Ts.TransformationType.CLASS_TO_PLAIN,{...Ps.defaultOptions,...r}).transform(void 0,t,void 0,void 0,void 0,void 0)}classToPlainFromExist(t,r,n){return new As.TransformOperationExecutor(Ts.TransformationType.CLASS_TO_PLAIN,{...Ps.defaultOptions,...n}).transform(r,t,void 0,void 0,void 0,void 0)}plainToInstance(t,r,n){return new As.TransformOperationExecutor(Ts.TransformationType.PLAIN_TO_CLASS,{...Ps.defaultOptions,...n}).transform(void 0,r,t,void 0,void 0,void 0)}plainToClassFromExist(t,r,n){return new As.TransformOperationExecutor(Ts.TransformationType.PLAIN_TO_CLASS,{...Ps.defaultOptions,...n}).transform(t,r,void 0,void 0,void 0,void 0)}instanceToInstance(t,r){return new As.TransformOperationExecutor(Ts.TransformationType.CLASS_TO_CLASS,{...Ps.defaultOptions,...r}).transform(void 0,t,void 0,void 0,void 0,void 0)}classToClassFromExist(t,r,n){return new As.TransformOperationExecutor(Ts.TransformationType.CLASS_TO_CLASS,{...Ps.defaultOptions,...n}).transform(r,t,void 0,void 0,void 0,void 0)}serialize(t,r){return JSON.stringify(this.instanceToPlain(t,r))}deserialize(t,r,n){let i=JSON.parse(r);return this.plainToInstance(t,i,n)}deserializeArray(t,r,n){let i=JSON.parse(r);return this.plainToInstance(t,i,n)}};Qp.ClassTransformer=vg});var RU=y(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.Exclude=void 0;var Dge=xs();function Nge(e={}){return function(t,r){Dge.defaultMetadataStorage.addExcludeMetadata({target:t instanceof Function?t:t.constructor,propertyName:r,options:e})}}Zp.Exclude=Nge});var DU=y(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.Expose=void 0;var Mge=xs();function Lge(e={}){return function(t,r){Mge.defaultMetadataStorage.addExposeMetadata({target:t instanceof Function?t:t.constructor,propertyName:r,options:e})}}ef.Expose=Lge});var NU=y(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0});tf.TransformInstanceToInstance=void 0;var kge=Is();function Fge(e){return function(t,r,n){let i=new kge.ClassTransformer,o=n.value;n.value=function(...s){let a=o.apply(this,s);return!!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"?a.then(u=>i.instanceToInstance(u,e)):i.instanceToInstance(a,e)}}}tf.TransformInstanceToInstance=Fge});var MU=y(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.TransformInstanceToPlain=void 0;var Bge=Is();function jge(e){return function(t,r,n){let i=new Bge.ClassTransformer,o=n.value;n.value=function(...s){let a=o.apply(this,s);return!!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"?a.then(u=>i.instanceToPlain(u,e)):i.instanceToPlain(a,e)}}}rf.TransformInstanceToPlain=jge});var LU=y(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.TransformPlainToInstance=void 0;var qge=Is();function Uge(e,t){return function(r,n,i){let o=new qge.ClassTransformer,s=i.value;i.value=function(...a){let c=s.apply(this,a);return!!c&&(typeof c=="object"||typeof c=="function")&&typeof c.then=="function"?c.then(d=>o.plainToInstance(e,d,t)):o.plainToInstance(e,c,t)}}}nf.TransformPlainToInstance=Uge});var kU=y(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.Transform=void 0;var Gge=xs();function $ge(e,t={}){return function(r,n){Gge.defaultMetadataStorage.addTransformMetadata({target:r.constructor,propertyName:n,transformFn:e,options:t})}}of.Transform=$ge});var FU=y(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.Type=void 0;var Hge=xs();function Vge(e,t={}){return function(r,n){let i=Reflect.getMetadata("design:type",r,n);Hge.defaultMetadataStorage.addTypeMetadata({target:r.constructor,propertyName:n,reflectedType:i,typeFunction:e,options:t})}}sf.Type=Vge});var BU=y(nr=>{"use strict";var zge=nr&&nr.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),co=nr&&nr.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&zge(t,e,r)};Object.defineProperty(nr,"__esModule",{value:!0});co(RU(),nr);co(DU(),nr);co(NU(),nr);co(MU(),nr);co(LU(),nr);co(kU(),nr);co(FU(),nr)});var qU=y(jU=>{"use strict";Object.defineProperty(jU,"__esModule",{value:!0})});var GU=y(UU=>{"use strict";Object.defineProperty(UU,"__esModule",{value:!0})});var HU=y($U=>{"use strict";Object.defineProperty($U,"__esModule",{value:!0})});var zU=y(VU=>{"use strict";Object.defineProperty(VU,"__esModule",{value:!0})});var KU=y(WU=>{"use strict";Object.defineProperty(WU,"__esModule",{value:!0})});var YU=y(JU=>{"use strict";Object.defineProperty(JU,"__esModule",{value:!0})});var QU=y(XU=>{"use strict";Object.defineProperty(XU,"__esModule",{value:!0})});var e2=y(ZU=>{"use strict";Object.defineProperty(ZU,"__esModule",{value:!0})});var r2=y(t2=>{"use strict";Object.defineProperty(t2,"__esModule",{value:!0})});var i2=y(n2=>{"use strict";Object.defineProperty(n2,"__esModule",{value:!0})});var s2=y(o2=>{"use strict";Object.defineProperty(o2,"__esModule",{value:!0})});var c2=y(a2=>{"use strict";Object.defineProperty(a2,"__esModule",{value:!0})});var l2=y(u2=>{"use strict";Object.defineProperty(u2,"__esModule",{value:!0})});var p2=y(d2=>{"use strict";Object.defineProperty(d2,"__esModule",{value:!0})});var f2=y(nt=>{"use strict";var Wge=nt&&nt.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),Gt=nt&&nt.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Wge(t,e,r)};Object.defineProperty(nt,"__esModule",{value:!0});Gt(qU(),nt);Gt(GU(),nt);Gt(HU(),nt);Gt(zU(),nt);Gt(KU(),nt);Gt(YU(),nt);Gt(QU(),nt);Gt(e2(),nt);Gt(r2(),nt);Gt(i2(),nt);Gt(s2(),nt);Gt(c2(),nt);Gt(l2(),nt);Gt(p2(),nt)});var af=y(pe=>{"use strict";var Kge=pe&&pe.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),gg=pe&&pe.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Kge(t,e,r)};Object.defineProperty(pe,"__esModule",{value:!0});pe.deserializeArray=pe.deserialize=pe.serialize=pe.classToClassFromExist=pe.instanceToInstance=pe.plainToClassFromExist=pe.plainToInstance=pe.plainToClass=pe.classToPlainFromExist=pe.instanceToPlain=pe.classToPlain=pe.ClassTransformer=void 0;var Jge=Is(),Yge=Is();Object.defineProperty(pe,"ClassTransformer",{enumerable:!0,get:function(){return Yge.ClassTransformer}});gg(BU(),pe);gg(f2(),pe);gg(fc(),pe);var Lr=new Jge.ClassTransformer;function Xge(e,t){return Lr.instanceToPlain(e,t)}pe.classToPlain=Xge;function Qge(e,t){return Lr.instanceToPlain(e,t)}pe.instanceToPlain=Qge;function Zge(e,t,r){return Lr.classToPlainFromExist(e,t,r)}pe.classToPlainFromExist=Zge;function e0e(e,t,r){return Lr.plainToInstance(e,t,r)}pe.plainToClass=e0e;function t0e(e,t,r){return Lr.plainToInstance(e,t,r)}pe.plainToInstance=t0e;function r0e(e,t,r){return Lr.plainToClassFromExist(e,t,r)}pe.plainToClassFromExist=r0e;function n0e(e,t){return Lr.instanceToInstance(e,t)}pe.instanceToInstance=n0e;function i0e(e,t,r){return Lr.classToClassFromExist(e,t,r)}pe.classToClassFromExist=i0e;function o0e(e,t){return Lr.serialize(e,t)}pe.serialize=o0e;function s0e(e,t,r){return Lr.deserialize(e,t,r)}pe.deserialize=s0e;function a0e(e,t,r){return Lr.deserializeArray(e,t,r)}pe.deserializeArray=a0e});var Sg=y(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.Rules=void 0;var c0e=af(),Eg=class e{static async Load(t){let{dbManager:r,key:n}=t,{Item:i}=await r.ddbDocClient.get({TableName:r.tableName,Key:{PK:`appName#${n.AppName}`.toLowerCase(),SK:"rules"}});return(0,c0e.plainToInstance)(e,i)}constructor(t){Object.assign(this,t),t===void 0&&(this._ruleSet={})}get DbStruct(){return{PK:this.PK,SK:this.SK,AppName:this.AppName,RuleSet:this.RuleSet,Version:this.Version}}async Save(t){let r=t.ddbDocClient.put({TableName:t.tableName,Item:this.DbStruct}),n=t.ddbDocClient.put({TableName:t.tableName,Item:this.DbStruct});await Promise.all([r,n]),await r,await n}get PK(){return`appName#${this.AppName}`.toLowerCase()}get SK(){return"rules"}get AppName(){return this._appName}set AppName(t){this._appName=t.toLowerCase()}get RuleSet(){return this._ruleSet}set RuleSet(t){this._ruleSet=t}get Version(){return this._version}set Version(t){this._version=t}};cf.Rules=Eg});var Cg=y(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.Version=void 0;var m2=af(),Os;(function(e){e[e.AppName=0]="AppName"})(Os||(Os={}));var bg=class e{static async LoadVersions(t){let{dbManager:r,key:n}=t,{Items:i}=await r.ddbDocClient.query({TableName:r.tableName,KeyConditionExpression:"PK = :pkval and begins_with(SK, :skval)",ExpressionAttributeValues:{":pkval":`appName#${n.AppName}`.toLowerCase(),":skval":"version"}}),o=[];if(i!==void 0)for(let s of i){let a=(0,m2.plainToInstance)(e,s);o.push(a)}return o}static async LoadVersion(t){let{dbManager:r,key:n}=t,{Item:i}=await r.ddbDocClient.get({TableName:r.tableName,Key:{PK:`appName#${n.AppName}`.toLowerCase(),SK:`version#${n.SemVer}`.toLowerCase()}});return(0,m2.plainToInstance)(e,i)}static async DeleteVersion(t){let{dbManager:r,key:n}=t;await r.ddbDocClient.delete({TableName:r.tableName,Key:{PK:`appName#${n.AppName}`.toLowerCase(),SK:`version#${n.SemVer}`.toLowerCase()}})}get PK(){switch(this._keyBy){case Os.AppName:return`appName#${this.AppName}`.toLowerCase();default:throw new Error("Missing SaveBy handler")}}constructor(t){this._keyBy=Os.AppName,this._status="pending",this._startupType="iframe",this._defaultFile="",this._integrationID="",this._routeIDAppVersion="",this._routeIDAppVersionSplat="",this._url="",this._lambdaARN="",Object.assign(this,t)}get DbStruct(){return{PK:this.PK,SK:this.SK,AppName:this.AppName,SemVer:this.SemVer,Type:this.Type,StartupType:this.StartupType,Status:this.Status,DefaultFile:this.DefaultFile,IntegrationID:this.IntegrationID,RouteIDAppVersion:this.RouteIDAppVersion,RouteIDAppVersionSplat:this.RouteIDAppVersionSplat,URL:this.URL,LambdaARN:this.LambdaARN}}async Save(t){this._keyBy=Os.AppName,await t.ddbDocClient.put({TableName:t.tableName,Item:this.DbStruct})}get SK(){switch(this._keyBy){case Os.AppName:return`version#${this.SemVer}`.toLowerCase();default:throw new Error("Missing SaveBy handler")}}get AppName(){return this._appName}set AppName(t){this._appName=t.toLowerCase()}get SemVer(){return this._semVer}set SemVer(t){this._semVer=t}get Type(){return this._type}set Type(t){this._type=t}get StartupType(){return this._startupType}set StartupType(t){this._startupType=t}get Status(){return this._status}set Status(t){this._status=t}get DefaultFile(){return this._defaultFile}set DefaultFile(t){this._defaultFile=t}get IntegrationID(){return this._integrationID}set IntegrationID(t){this._integrationID=t}get RouteIDAppVersion(){return this._routeIDAppVersion}set RouteIDAppVersion(t){this._routeIDAppVersion=t}get RouteIDAppVersionSplat(){return this._routeIDAppVersionSplat}set RouteIDAppVersionSplat(t){this._routeIDAppVersionSplat=t}get URL(){return this._url}set URL(t){this._url=t}get LambdaARN(){return this._lambdaARN}set LambdaARN(t){this._lambdaARN=t}};uf.Version=bg});var _2=y(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.Application=void 0;var h2=af(),y2=Sg(),u0e=Cg(),On;(function(e){e[e.AppName=0]="AppName",e[e.Applications=1]="Applications"})(On||(On={}));var wg=class e{static async UpdateDefaultRule(t){let{dbManager:r,key:n}=t,i=await y2.Rules.Load({dbManager:r,key:n}),o=i.RuleSet.default;o.SemVer=n.SemVer,await i.Save(r)}static async GetVersionsAndRules(t){let{key:r,dbManager:n}=t,i=u0e.Version.LoadVersions({dbManager:n,key:r}),o=y2.Rules.Load({dbManager:n,key:r});return await Promise.all([i,o]),{Versions:await i,Rules:await o}}static async Load(t){let{key:r,dbManager:n}=t,{Item:i}=await n.ddbDocClient.get({TableName:n.tableName,Key:{PK:`appName#${r.AppName}`.toLowerCase(),SK:"application"}});return(0,h2.plainToInstance)(e,i)}static async LoadAllApps(t){let{Items:r}=await t.ddbDocClient.query({TableName:t.tableName,KeyConditionExpression:"PK = :pkval",ExpressionAttributeValues:{":pkval":"applications"}}),n=[];if(r!==void 0)for(let i of r){let o=(0,h2.plainToInstance)(e,i);n.push(o)}return n}constructor(t){Object.assign(this,t),this._keyBy=On.AppName}get DbStruct(){return{PK:this.PK,SK:this.SK,AppName:this.AppName,DisplayName:this.DisplayName}}async Save(t){this._keyBy=On.AppName;let r=t.ddbDocClient.put({TableName:t.tableName,Item:this.DbStruct});this._keyBy=On.Applications;let n=t.ddbDocClient.put({TableName:t.tableName,Item:this.DbStruct});await Promise.all([r,n]),await r,await n}get PK(){switch(this._keyBy){case On.Applications:return"applications";case On.AppName:return`appName#${this.AppName}`.toLowerCase();default:throw new Error("Missing SaveBy handler")}}get SK(){switch(this._keyBy){case On.Applications:return`appName#${this.AppName}`.toLowerCase();case On.AppName:return"application";default:throw new Error("Missing SaveBy handler")}}get AppName(){return this._appName}set AppName(t){this._appName=t.toLowerCase()}get DisplayName(){return this._displayName}set DisplayName(t){this._displayName=t}};lf.Application=wg});var xg=y(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.Version=on.Rules=on.Application=on.DBManager=void 0;var l0e=SU();Object.defineProperty(on,"DBManager",{enumerable:!0,get:function(){return l0e.DBManager}});var d0e=_2();Object.defineProperty(on,"Application",{enumerable:!0,get:function(){return d0e.Application}});var p0e=Sg();Object.defineProperty(on,"Rules",{enumerable:!0,get:function(){return p0e.Rules}});var f0e=Cg();Object.defineProperty(on,"Version",{enumerable:!0,get:function(){return f0e.Version}})});var $t=y(Ag=>{"use strict";Ag.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((r,n)=>{e.call(this,...t,(i,o)=>i!=null?n(i):r(o))})},"name",{value:e.name})};Ag.fromPromise=function(e){return Object.defineProperty(function(...t){let r=t[t.length-1];if(typeof r!="function")return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(n=>r(null,n),r)},"name",{value:e.name})}});var g2=y((eMe,v2)=>{var Ai=require("constants"),m0e=process.cwd,df=null,h0e=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return df||(df=m0e.call(process)),df};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Tg=process.chdir,process.chdir=function(e){df=null,Tg.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Tg));var Tg;v2.exports=y0e;function y0e(e){Ai.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=o(e.chown),e.fchown=o(e.fchown),e.lchown=o(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=s(e.chownSync),e.fchownSync=s(e.fchownSync),e.lchownSync=s(e.lchownSync),e.chmodSync=i(e.chmodSync),e.fchmodSync=i(e.fchmodSync),e.lchmodSync=i(e.lchmodSync),e.stat=a(e.stat),e.fstat=a(e.fstat),e.lstat=a(e.lstat),e.statSync=c(e.statSync),e.fstatSync=c(e.fstatSync),e.lstatSync=c(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(d,p,m){m&&process.nextTick(m)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(d,p,m,h){h&&process.nextTick(h)},e.lchownSync=function(){}),h0e==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:(function(d){function p(m,h,v){var _=Date.now(),g=0;d(m,h,function x(S){if(S&&(S.code==="EACCES"||S.code==="EPERM")&&Date.now()-_<6e4){setTimeout(function(){e.stat(h,function(M,k){M&&M.code==="ENOENT"?d(m,h,x):v(S)})},g),g<100&&(g+=10);return}v&&v(S)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,d),p})(e.rename)),e.read=typeof e.read!="function"?e.read:(function(d){function p(m,h,v,_,g,x){var S;if(x&&typeof x=="function"){var M=0;S=function(k,me,Te){if(k&&k.code==="EAGAIN"&&M<10)return M++,d.call(e,m,h,v,_,g,S);x.apply(this,arguments)}}return d.call(e,m,h,v,_,g,S)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,d),p})(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:(function(d){return function(p,m,h,v,_){for(var g=0;;)try{return d.call(e,p,m,h,v,_)}catch(x){if(x.code==="EAGAIN"&&g<10){g++;continue}throw x}}})(e.readSync);function t(d){d.lchmod=function(p,m,h){d.open(p,Ai.O_WRONLY|Ai.O_SYMLINK,m,function(v,_){if(v){h&&h(v);return}d.fchmod(_,m,function(g){d.close(_,function(x){h&&h(g||x)})})})},d.lchmodSync=function(p,m){var h=d.openSync(p,Ai.O_WRONLY|Ai.O_SYMLINK,m),v=!0,_;try{_=d.fchmodSync(h,m),v=!1}finally{if(v)try{d.closeSync(h)}catch{}else d.closeSync(h)}return _}}function r(d){Ai.hasOwnProperty("O_SYMLINK")&&d.futimes?(d.lutimes=function(p,m,h,v){d.open(p,Ai.O_SYMLINK,function(_,g){if(_){v&&v(_);return}d.futimes(g,m,h,function(x){d.close(g,function(S){v&&v(x||S)})})})},d.lutimesSync=function(p,m,h){var v=d.openSync(p,Ai.O_SYMLINK),_,g=!0;try{_=d.futimesSync(v,m,h),g=!1}finally{if(g)try{d.closeSync(v)}catch{}else d.closeSync(v)}return _}):d.futimes&&(d.lutimes=function(p,m,h,v){v&&process.nextTick(v)},d.lutimesSync=function(){})}function n(d){return d&&function(p,m,h){return d.call(e,p,m,function(v){u(v)&&(v=null),h&&h.apply(this,arguments)})}}function i(d){return d&&function(p,m){try{return d.call(e,p,m)}catch(h){if(!u(h))throw h}}}function o(d){return d&&function(p,m,h,v){return d.call(e,p,m,h,function(_){u(_)&&(_=null),v&&v.apply(this,arguments)})}}function s(d){return d&&function(p,m,h){try{return d.call(e,p,m,h)}catch(v){if(!u(v))throw v}}}function a(d){return d&&function(p,m,h){typeof m=="function"&&(h=m,m=null);function v(_,g){g&&(g.uid<0&&(g.uid+=4294967296),g.gid<0&&(g.gid+=4294967296)),h&&h.apply(this,arguments)}return m?d.call(e,p,m,v):d.call(e,p,v)}}function c(d){return d&&function(p,m){var h=m?d.call(e,p,m):d.call(e,p);return h&&(h.uid<0&&(h.uid+=4294967296),h.gid<0&&(h.gid+=4294967296)),h}}function u(d){if(!d||d.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(d.code==="EINVAL"||d.code==="EPERM"))}}});var b2=y((tMe,S2)=>{var E2=require("stream").Stream;S2.exports=_0e;function _0e(e){return{ReadStream:t,WriteStream:r};function t(n,i){if(!(this instanceof t))return new t(n,i);E2.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var s=Object.keys(i),a=0,c=s.length;a<c;a++){var u=s[a];this[u]=i[u]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}e.open(this.path,this.flags,this.mode,function(d,p){if(d){o.emit("error",d),o.readable=!1;return}o.fd=p,o.emit("open",p),o._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);E2.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s<a;s++){var c=o[s];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var w2=y((rMe,C2)=>{"use strict";C2.exports=g0e;var v0e=Object.getPrototypeOf||function(e){return e.__proto__};function g0e(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:v0e(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var xt=y((nMe,Og)=>{var $e=require("fs"),E0e=g2(),S0e=b2(),b0e=w2(),pf=require("util"),vt,mf;typeof Symbol=="function"&&typeof Symbol.for=="function"?(vt=Symbol.for("graceful-fs.queue"),mf=Symbol.for("graceful-fs.previous")):(vt="___graceful-fs.queue",mf="___graceful-fs.previous");function C0e(){}function T2(e,t){Object.defineProperty(e,vt,{get:function(){return t}})}var uo=C0e;pf.debuglog?uo=pf.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(uo=function(){var e=pf.format.apply(pf,arguments);e="GFS4: "+e.split(/\n/).join(`
56
- GFS4: `),console.error(e)});$e[vt]||(x2=global[vt]||[],T2($e,x2),$e.close=(function(e){function t(r,n){return e.call($e,r,function(i){i||A2(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,mf,{value:e}),t})($e.close),$e.closeSync=(function(e){function t(r){e.apply($e,arguments),A2()}return Object.defineProperty(t,mf,{value:e}),t})($e.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){uo($e[vt]),require("assert").equal($e[vt].length,0)}));var x2;global[vt]||T2(global,$e[vt]);Og.exports=Pg(b0e($e));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!$e.__patched&&(Og.exports=Pg($e),$e.__patched=!0);function Pg(e){E0e(e),e.gracefulify=Pg,e.createReadStream=me,e.createWriteStream=Te;var t=e.readFile;e.readFile=r;function r(O,q,oe){return typeof q=="function"&&(oe=q,q=null),be(O,q,oe);function be(He,Oe,Ce,we){return t(He,Oe,function(Ee){Ee&&(Ee.code==="EMFILE"||Ee.code==="ENFILE")?Rs([be,[He,Oe,Ce],Ee,we||Date.now(),Date.now()]):typeof Ce=="function"&&Ce.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=i;function i(O,q,oe,be){return typeof oe=="function"&&(be=oe,oe=null),He(O,q,oe,be);function He(Oe,Ce,we,Ee,Ve){return n(Oe,Ce,we,function(Se){Se&&(Se.code==="EMFILE"||Se.code==="ENFILE")?Rs([He,[Oe,Ce,we,Ee],Se,Ve||Date.now(),Date.now()]):typeof Ee=="function"&&Ee.apply(this,arguments)})}}var o=e.appendFile;o&&(e.appendFile=s);function s(O,q,oe,be){return typeof oe=="function"&&(be=oe,oe=null),He(O,q,oe,be);function He(Oe,Ce,we,Ee,Ve){return o(Oe,Ce,we,function(Se){Se&&(Se.code==="EMFILE"||Se.code==="ENFILE")?Rs([He,[Oe,Ce,we,Ee],Se,Ve||Date.now(),Date.now()]):typeof Ee=="function"&&Ee.apply(this,arguments)})}}var a=e.copyFile;a&&(e.copyFile=c);function c(O,q,oe,be){return typeof oe=="function"&&(be=oe,oe=0),He(O,q,oe,be);function He(Oe,Ce,we,Ee,Ve){return a(Oe,Ce,we,function(Se){Se&&(Se.code==="EMFILE"||Se.code==="ENFILE")?Rs([He,[Oe,Ce,we,Ee],Se,Ve||Date.now(),Date.now()]):typeof Ee=="function"&&Ee.apply(this,arguments)})}}var u=e.readdir;e.readdir=p;var d=/^v[0-5]\./;function p(O,q,oe){typeof q=="function"&&(oe=q,q=null);var be=d.test(process.version)?function(Ce,we,Ee,Ve){return u(Ce,He(Ce,we,Ee,Ve))}:function(Ce,we,Ee,Ve){return u(Ce,we,He(Ce,we,Ee,Ve))};return be(O,q,oe);function He(Oe,Ce,we,Ee){return function(Ve,Se){Ve&&(Ve.code==="EMFILE"||Ve.code==="ENFILE")?Rs([be,[Oe,Ce,we],Ve,Ee||Date.now(),Date.now()]):(Se&&Se.sort&&Se.sort(),typeof we=="function"&&we.call(this,Ve,Se))}}}if(process.version.substr(0,4)==="v0.8"){var m=S0e(e);x=m.ReadStream,M=m.WriteStream}var h=e.ReadStream;h&&(x.prototype=Object.create(h.prototype),x.prototype.open=S);var v=e.WriteStream;v&&(M.prototype=Object.create(v.prototype),M.prototype.open=k),Object.defineProperty(e,"ReadStream",{get:function(){return x},set:function(O){x=O},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return M},set:function(O){M=O},enumerable:!0,configurable:!0});var _=x;Object.defineProperty(e,"FileReadStream",{get:function(){return _},set:function(O){_=O},enumerable:!0,configurable:!0});var g=M;Object.defineProperty(e,"FileWriteStream",{get:function(){return g},set:function(O){g=O},enumerable:!0,configurable:!0});function x(O,q){return this instanceof x?(h.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var O=this;Ne(O.path,O.flags,O.mode,function(q,oe){q?(O.autoClose&&O.destroy(),O.emit("error",q)):(O.fd=oe,O.emit("open",oe),O.read())})}function M(O,q){return this instanceof M?(v.apply(this,arguments),this):M.apply(Object.create(M.prototype),arguments)}function k(){var O=this;Ne(O.path,O.flags,O.mode,function(q,oe){q?(O.destroy(),O.emit("error",q)):(O.fd=oe,O.emit("open",oe))})}function me(O,q){return new e.ReadStream(O,q)}function Te(O,q){return new e.WriteStream(O,q)}var Je=e.open;e.open=Ne;function Ne(O,q,oe,be){return typeof oe=="function"&&(be=oe,oe=null),He(O,q,oe,be);function He(Oe,Ce,we,Ee,Ve){return Je(Oe,Ce,we,function(Se,cn){Se&&(Se.code==="EMFILE"||Se.code==="ENFILE")?Rs([He,[Oe,Ce,we,Ee],Se,Ve||Date.now(),Date.now()]):typeof Ee=="function"&&Ee.apply(this,arguments)})}}return e}function Rs(e){uo("ENQUEUE",e[0].name,e[1]),$e[vt].push(e),Ig()}var ff;function A2(){for(var e=Date.now(),t=0;t<$e[vt].length;++t)$e[vt][t].length>2&&($e[vt][t][3]=e,$e[vt][t][4]=e);Ig()}function Ig(){if(clearTimeout(ff),ff=void 0,$e[vt].length!==0){var e=$e[vt].shift(),t=e[0],r=e[1],n=e[2],i=e[3],o=e[4];if(i===void 0)uo("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-i>=6e4){uo("TIMEOUT",t.name,r);var s=r.pop();typeof s=="function"&&s.call(null,n)}else{var a=Date.now()-o,c=Math.max(o-i,1),u=Math.min(c*1.2,100);a>=u?(uo("RETRY",t.name,r),t.apply(null,r.concat([i]))):$e[vt].push(e)}ff===void 0&&(ff=setTimeout(Ig,0))}}});var mc=y(Ti=>{"use strict";var P2=$t().fromCallback,Mt=xt(),w0e=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof Mt[e]=="function");Object.keys(Mt).forEach(e=>{e!=="promises"&&(Ti[e]=Mt[e])});w0e.forEach(e=>{Ti[e]=P2(Mt[e])});Ti.exists=function(e,t){return typeof t=="function"?Mt.exists(e,t):new Promise(r=>Mt.exists(e,r))};Ti.read=function(e,t,r,n,i,o){return typeof o=="function"?Mt.read(e,t,r,n,i,o):new Promise((s,a)=>{Mt.read(e,t,r,n,i,(c,u,d)=>{if(c)return a(c);s({bytesRead:u,buffer:d})})})};Ti.write=function(e,t,...r){return typeof r[r.length-1]=="function"?Mt.write(e,t,...r):new Promise((n,i)=>{Mt.write(e,t,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffer:a})})})};typeof Mt.writev=="function"&&(Ti.writev=function(e,t,...r){return typeof r[r.length-1]=="function"?Mt.writev(e,t,...r):new Promise((n,i)=>{Mt.writev(e,t,...r,(o,s,a)=>{if(o)return i(o);n({bytesWritten:s,buffers:a})})})});typeof Mt.realpath.native=="function"&&(Ti.realpath.native=P2(Mt.realpath.native))});var Rg=y((oMe,I2)=>{I2.exports=e=>{let t=process.versions.node.split(".").map(r=>parseInt(r,10));return e=e.split(".").map(r=>parseInt(r,10)),t[0]>e[0]||t[0]===e[0]&&(t[1]>e[1]||t[1]===e[1]&&t[2]>=e[2])}});var M2=y((sMe,Dg)=>{"use strict";var Ds=mc(),Rn=require("path"),x0e=Rg(),O2=x0e("10.12.0"),R2=e=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(Rn.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}},D2=e=>{let t={mode:511};return typeof e=="number"&&(e={mode:e}),{...t,...e}},N2=e=>{let t=new Error(`operation not permitted, mkdir '${e}'`);return t.code="EPERM",t.errno=-4048,t.path=e,t.syscall="mkdir",t};Dg.exports.makeDir=async(e,t)=>{if(R2(e),t=D2(t),O2){let n=Rn.resolve(e);return Ds.mkdir(n,{mode:t.mode,recursive:!0})}let r=async n=>{try{await Ds.mkdir(n,t.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Rn.dirname(n)===n)throw N2(n);if(i.message.includes("null bytes"))throw i;return await r(Rn.dirname(n)),r(n)}try{if(!(await Ds.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Rn.resolve(e))};Dg.exports.makeDirSync=(e,t)=>{if(R2(e),t=D2(t),O2){let n=Rn.resolve(e);return Ds.mkdirSync(n,{mode:t.mode,recursive:!0})}let r=n=>{try{Ds.mkdirSync(n,t.mode)}catch(i){if(i.code==="EPERM")throw i;if(i.code==="ENOENT"){if(Rn.dirname(n)===n)throw N2(n);if(i.message.includes("null bytes"))throw i;return r(Rn.dirname(n)),r(n)}try{if(!Ds.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw i}}};return r(Rn.resolve(e))}});var kr=y((aMe,L2)=>{"use strict";var A0e=$t().fromPromise,{makeDir:T0e,makeDirSync:Ng}=M2(),Mg=A0e(T0e);L2.exports={mkdirs:Mg,mkdirsSync:Ng,mkdirp:Mg,mkdirpSync:Ng,ensureDir:Mg,ensureDirSync:Ng}});var Lg=y((cMe,k2)=>{"use strict";var Ns=xt();function P0e(e,t,r,n){Ns.open(e,"r+",(i,o)=>{if(i)return n(i);Ns.futimes(o,t,r,s=>{Ns.close(o,a=>{n&&n(s||a)})})})}function I0e(e,t,r){let n=Ns.openSync(e,"r+");return Ns.futimesSync(n,t,r),Ns.closeSync(n)}k2.exports={utimesMillis:P0e,utimesMillisSync:I0e}});var hc=y((uMe,q2)=>{"use strict";var Ms=mc(),Ht=require("path"),O0e=require("util"),R0e=Rg(),hf=R0e("10.5.0"),F2=e=>hf?Ms.stat(e,{bigint:!0}):Ms.stat(e),kg=e=>hf?Ms.statSync(e,{bigint:!0}):Ms.statSync(e);function D0e(e,t){return Promise.all([F2(e),F2(t).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function N0e(e,t){let r,n=kg(e);try{r=kg(t)}catch(i){if(i.code==="ENOENT")return{srcStat:n,destStat:null};throw i}return{srcStat:n,destStat:r}}function M0e(e,t,r,n){O0e.callbackify(D0e)(e,t,(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;return a&&yf(s,a)?n(new Error("Source and destination must not be the same.")):s.isDirectory()&&Fg(e,t)?n(new Error(_f(e,t,r))):n(null,{srcStat:s,destStat:a})})}function L0e(e,t,r){let{srcStat:n,destStat:i}=N0e(e,t);if(i&&yf(n,i))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&Fg(e,t))throw new Error(_f(e,t,r));return{srcStat:n,destStat:i}}function B2(e,t,r,n,i){let o=Ht.resolve(Ht.dirname(e)),s=Ht.resolve(Ht.dirname(r));if(s===o||s===Ht.parse(s).root)return i();let a=(c,u)=>c?c.code==="ENOENT"?i():i(c):yf(t,u)?i(new Error(_f(e,r,n))):B2(e,t,s,n,i);hf?Ms.stat(s,{bigint:!0},a):Ms.stat(s,a)}function j2(e,t,r,n){let i=Ht.resolve(Ht.dirname(e)),o=Ht.resolve(Ht.dirname(r));if(o===i||o===Ht.parse(o).root)return;let s;try{s=kg(o)}catch(a){if(a.code==="ENOENT")return;throw a}if(yf(t,s))throw new Error(_f(e,r,n));return j2(e,t,o,n)}function yf(e,t){return!!(t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev&&(hf||t.ino<Number.MAX_SAFE_INTEGER||t.size===e.size&&t.mode===e.mode&&t.nlink===e.nlink&&t.atimeMs===e.atimeMs&&t.mtimeMs===e.mtimeMs&&t.ctimeMs===e.ctimeMs&&t.birthtimeMs===e.birthtimeMs))}function Fg(e,t){let r=Ht.resolve(e).split(Ht.sep).filter(i=>i),n=Ht.resolve(t).split(Ht.sep).filter(i=>i);return r.reduce((i,o,s)=>i&&n[s]===o,!0)}function _f(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}q2.exports={checkPaths:M0e,checkPathsSync:L0e,checkParentPaths:B2,checkParentPathsSync:j2,isSrcSubdir:Fg}});var V2=y((lMe,H2)=>{"use strict";var At=xt(),yc=require("path"),k0e=kr().mkdirsSync,F0e=Lg().utimesMillisSync,_c=hc();function B0e(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
72
+ ${(0,x_.toHex)(i)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){let r=[];for(let i of t.split("/"))(i==null?void 0:i.length)!==0&&i!=="."&&(i===".."?r.pop():r.push(i));let n=`${t!=null&&t.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&(t!=null&&t.endsWith("/"))?"/":""}`;return encodeURIComponent(n).replace(/%2F/g,"/")}return t}async getSignature(t,r,n,o){let i=await this.createStringToSign(t,r,o),s=new this.sha256(await n);return s.update((0,Wd.toUint8Array)(i)),(0,x_.toHex)(await s.digest())}getSigningKey(t,r,n,o){return(0,v_.getSigningKey)(this.sha256,t,n,r,o||this.service)}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}};w_.SignatureV4=FI;var T_=e=>{let t=(0,QSe.iso8601)(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},C4=e=>Object.keys(e).sort().join(";")});var P4=b(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.prepareRequest=Br.moveHeadersToQuery=Br.getPayloadHash=Br.getCanonicalQuery=Br.getCanonicalHeaders=void 0;var R4=(nn(),ie(rn));R4.__exportStar(D4(),Br);var XSe=RI();Object.defineProperty(Br,"getCanonicalHeaders",{enumerable:!0,get:function(){return XSe.getCanonicalHeaders}});var JSe=OI();Object.defineProperty(Br,"getCanonicalQuery",{enumerable:!0,get:function(){return JSe.getCanonicalQuery}});var ZSe=NI();Object.defineProperty(Br,"getPayloadHash",{enumerable:!0,get:function(){return ZSe.getPayloadHash}});var e0e=MI();Object.defineProperty(Br,"moveHeadersToQuery",{enumerable:!0,get:function(){return e0e.moveHeadersToQuery}});var t0e=LI();Object.defineProperty(Br,"prepareRequest",{enumerable:!0,get:function(){return t0e.prepareRequest}});R4.__exportStar(CI(),Br)});var O4=b(BI=>{"use strict";Object.defineProperty(BI,"__esModule",{value:!0});var r0e=(nn(),ie(rn));r0e.__exportStar(P4(),BI)});var N4=b(A_=>{"use strict";Object.defineProperty(A_,"__esModule",{value:!0});A_.isEmptyData=void 0;function n0e(e){return typeof e=="string"?e.length===0:e.byteLength===0}A_.isEmptyData=n0e});var UI=b(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.EMPTY_DATA_SHA_256=hi.SHA_256_HMAC_ALGO=hi.SHA_256_HASH=void 0;hi.SHA_256_HASH={name:"SHA-256"};hi.SHA_256_HMAC_ALGO={name:"HMAC",hash:hi.SHA_256_HASH};hi.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])});var C_=b(I_=>{Object.defineProperty(I_,"__esModule",{value:!0});I_.locateWindow=void 0;var o0e={};function i0e(){return typeof window<"u"?window:typeof self<"u"?self:o0e}I_.locateWindow=i0e});var qI=b(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});D_.Sha256=void 0;var s0e=N4(),$4=UI(),a0e=Vg(),jI=C_(),c0e=(function(){function e(t){this.secret=t,this.reset()}return e.prototype.update=function(t){var r=this;(0,s0e.isEmptyData)(t)||(this.operation=this.operation.then(function(n){return n.onerror=function(){r.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(M4(t)),n}),this.operation.catch(function(){}))},e.prototype.digest=function(){return this.operation.then(function(t){return new Promise(function(r,n){t.onerror=function(){n(new Error("Error encountered finalizing hash"))},t.oncomplete=function(){t.result&&r(new Uint8Array(t.result)),n(new Error("Error encountered finalizing hash"))},t.finish()})})},e.prototype.reset=function(){this.secret?(this.operation=u0e(this.secret).then(function(t){return(0,jI.locateWindow)().msCrypto.subtle.sign($4.SHA_256_HMAC_ALGO,t)}),this.operation.catch(function(){})):this.operation=Promise.resolve((0,jI.locateWindow)().msCrypto.subtle.digest("SHA-256"))},e})();D_.Sha256=c0e;function u0e(e){return new Promise(function(t,r){var n=(0,jI.locateWindow)().msCrypto.subtle.importKey("raw",M4(e),$4.SHA_256_HMAC_ALGO,!1,["sign"]);n.oncomplete=function(){n.result&&t(n.result),r(new Error("ImportKey completed without importing key."))},n.onerror=function(){r(new Error("ImportKey failed to import key."))}})}function M4(e){return typeof e=="string"?(0,a0e.fromUtf8)(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}});var L4=b(R_=>{"use strict";Object.defineProperty(R_,"__esModule",{value:!0});R_.convertToBuffer=void 0;var l0e=Vg(),d0e=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:l0e.fromUtf8;function f0e(e){return e instanceof Uint8Array?e:typeof e=="string"?d0e(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}R_.convertToBuffer=f0e});var k4=b(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});P_.isEmptyData=void 0;function p0e(e){return typeof e=="string"?e.length===0:e.byteLength===0}P_.isEmptyData=p0e});var F4=b(O_=>{"use strict";Object.defineProperty(O_,"__esModule",{value:!0});O_.numToUint8=void 0;function m0e(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}O_.numToUint8=m0e});var B4=b(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});N_.uint32ArrayFrom=void 0;function h0e(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}N_.uint32ArrayFrom=h0e});var $_=b(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.uint32ArrayFrom=Po.numToUint8=Po.isEmptyData=Po.convertToBuffer=void 0;var y0e=L4();Object.defineProperty(Po,"convertToBuffer",{enumerable:!0,get:function(){return y0e.convertToBuffer}});var g0e=k4();Object.defineProperty(Po,"isEmptyData",{enumerable:!0,get:function(){return g0e.isEmptyData}});var _0e=F4();Object.defineProperty(Po,"numToUint8",{enumerable:!0,get:function(){return _0e.numToUint8}});var E0e=B4();Object.defineProperty(Po,"uint32ArrayFrom",{enumerable:!0,get:function(){return E0e.uint32ArrayFrom}})});var HI=b(k_=>{"use strict";Object.defineProperty(k_,"__esModule",{value:!0});k_.Sha256=void 0;var M_=$_(),L_=UI(),GI=C_(),S0e=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!(0,M_.isEmptyData)(t)){var r=(0,M_.convertToBuffer)(t),n=new Uint8Array(this.toHash.byteLength+r.byteLength);n.set(this.toHash,0),n.set(r,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(r){return(0,GI.locateWindow)().crypto.subtle.sign(L_.SHA_256_HMAC_ALGO,r,t.toHash).then(function(n){return new Uint8Array(n)})}):(0,M_.isEmptyData)(this.toHash)?Promise.resolve(L_.EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return(0,GI.locateWindow)().crypto.subtle.digest(L_.SHA_256_HASH,t.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},e.prototype.reset=function(){var t=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,n){(0,GI.locateWindow)().crypto.subtle.importKey("raw",(0,M_.convertToBuffer)(t.secret),L_.SHA_256_HMAC_ALGO,!1,["sign"]).then(r,n)}),this.key.catch(function(){}))},e})();k_.Sha256=S0e});var VI=b(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.MAX_HASHABLE_LENGTH=xn.INIT=xn.KEY=xn.DIGEST_LENGTH=xn.BLOCK_SIZE=void 0;xn.BLOCK_SIZE=64;xn.DIGEST_LENGTH=32;xn.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);xn.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];xn.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1});var U4=b(F_=>{"use strict";Object.defineProperty(F_,"__esModule",{value:!0});F_.RawSha256=void 0;var vn=VI(),b0e=(function(){function e(){this.state=Int32Array.from(vn.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,n=t.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>vn.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=t[r++],n--,this.bufferLength===vn.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(r.setUint8(this.bufferLength++,128),n%vn.BLOCK_SIZE>=vn.BLOCK_SIZE-8){for(var o=this.bufferLength;o<vn.BLOCK_SIZE;o++)r.setUint8(o,0);this.hashBuffer(),this.bufferLength=0}for(var o=this.bufferLength;o<vn.BLOCK_SIZE-8;o++)r.setUint8(o,0);r.setUint32(vn.BLOCK_SIZE-8,Math.floor(t/4294967296),!0),r.setUint32(vn.BLOCK_SIZE-4,t),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(vn.DIGEST_LENGTH),o=0;o<8;o++)i[o*4]=this.state[o]>>>24&255,i[o*4+1]=this.state[o]>>>16&255,i[o*4+2]=this.state[o]>>>8&255,i[o*4+3]=this.state[o]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var t=this,r=t.buffer,n=t.state,o=n[0],i=n[1],s=n[2],a=n[3],c=n[4],l=n[5],d=n[6],f=n[7],m=0;m<vn.BLOCK_SIZE;m++){if(m<16)this.temp[m]=(r[m*4]&255)<<24|(r[m*4+1]&255)<<16|(r[m*4+2]&255)<<8|r[m*4+3]&255;else{var h=this.temp[m-2],_=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[m-15];var E=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[m]=(_+this.temp[m-7]|0)+(E+this.temp[m-16]|0)}var T=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&l^~c&d)|0)+(f+(vn.KEY[m]+this.temp[m]|0)|0)|0,I=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&i^o&s^i&s)|0;f=d,d=l,l=c,c=a+T|0,a=s,s=i,i=o,o=T+I|0}n[0]+=o,n[1]+=i,n[2]+=s,n[3]+=a,n[4]+=c,n[5]+=l,n[6]+=d,n[7]+=f},e})();F_.RawSha256=b0e});var q4=b(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});j_.Sha256=void 0;var j4=(mi(),ie(pi)),U_=VI(),B_=U4(),WI=$_(),x0e=(function(){function e(t){this.secret=t,this.hash=new B_.RawSha256,this.reset()}return e.prototype.update=function(t){if(!((0,WI.isEmptyData)(t)||this.error))try{this.hash.update((0,WI.convertToBuffer)(t))}catch(r){this.error=r}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return j4.__awaiter(this,void 0,void 0,function(){return j4.__generator(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new B_.RawSha256,this.secret){this.outer=new B_.RawSha256;var t=v0e(this.secret),r=new Uint8Array(U_.BLOCK_SIZE);r.set(t);for(var n=0;n<U_.BLOCK_SIZE;n++)t[n]^=54,r[n]^=92;this.hash.update(t),this.outer.update(r);for(var n=0;n<t.byteLength;n++)t[n]=0}},e})();j_.Sha256=x0e;function v0e(e){var t=(0,WI.convertToBuffer)(e);if(t.byteLength>U_.BLOCK_SIZE){var r=new B_.RawSha256;r.update(t),t=r.digest()}var n=new Uint8Array(U_.BLOCK_SIZE);return n.set(t),n}});var G4=b(zI=>{"use strict";Object.defineProperty(zI,"__esModule",{value:!0});var T0e=(mi(),ie(pi));T0e.__exportStar(q4(),zI)});var W4=b(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.supportsZeroByteGCM=Oo.supportsSubtleCrypto=Oo.supportsSecureRandom=Oo.supportsWebCrypto=void 0;var H4=(mi(),ie(pi)),w0e=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function A0e(e){if(V4(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return KI(t)}return!1}Oo.supportsWebCrypto=A0e;function V4(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}Oo.supportsSecureRandom=V4;function KI(e){return e&&w0e.every(function(t){return typeof e[t]=="function"})}Oo.supportsSubtleCrypto=KI;function I0e(e){return H4.__awaiter(this,void 0,void 0,function(){var t,r,n;return H4.__generator(this,function(o){switch(o.label){case 0:if(!KI(e))return[2,!1];o.label=1;case 1:return o.trys.push([1,4,,5]),[4,e.generateKey({name:"AES-GCM",length:128},!1,["encrypt"])];case 2:return t=o.sent(),[4,e.encrypt({name:"AES-GCM",iv:new Uint8Array(Array(12)),additionalData:new Uint8Array(Array(16)),tagLength:128},t,new Uint8Array(0))];case 3:return r=o.sent(),[2,r.byteLength===16];case 4:return n=o.sent(),[2,!1];case 5:return[2]}})})}Oo.supportsZeroByteGCM=I0e});var z4=b(YI=>{"use strict";Object.defineProperty(YI,"__esModule",{value:!0});var C0e=(mi(),ie(pi));C0e.__exportStar(W4(),YI)});var Y4=b(K4=>{"use strict";Object.defineProperty(K4,"__esModule",{value:!0})});var X4=b(Q4=>{"use strict";Object.defineProperty(Q4,"__esModule",{value:!0})});var Z4=b(J4=>{"use strict";Object.defineProperty(J4,"__esModule",{value:!0})});var t6=b(e6=>{"use strict";Object.defineProperty(e6,"__esModule",{value:!0})});var r6=b(q_=>{"use strict";Object.defineProperty(q_,"__esModule",{value:!0});q_.isMsWindow=void 0;var D0e=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function R0e(e){return"MSInputMethodContext"in e&&"msCrypto"in e}function P0e(e){if(R0e(e)&&e.msCrypto.subtle!==void 0){var t=e.msCrypto,r=t.getRandomValues,n=t.subtle;return D0e.map(function(o){return n[o]}).concat(r).every(function(o){return typeof o=="function"})}return!1}q_.isMsWindow=P0e});var n6=b(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var zd=(mi(),ie(pi));zd.__exportStar(Y4(),_a);zd.__exportStar(X4(),_a);zd.__exportStar(Z4(),_a);zd.__exportStar(t6(),_a);zd.__exportStar(r6(),_a)});var i6=b(G_=>{"use strict";Object.defineProperty(G_,"__esModule",{value:!0});G_.Sha256=void 0;var O0e=qI(),N0e=HI(),$0e=G4(),M0e=z4(),L0e=n6(),o6=C_(),k0e=$_(),F0e=(function(){function e(t){(0,M0e.supportsWebCrypto)((0,o6.locateWindow)())?this.hash=new N0e.Sha256(t):(0,L0e.isMsWindow)((0,o6.locateWindow)())?this.hash=new O0e.Sha256(t):this.hash=new $0e.Sha256(t)}return e.prototype.update=function(t,r){this.hash.update((0,k0e.convertToBuffer)(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();G_.Sha256=F0e});var s6=b(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.WebCryptoSha256=Ea.Ie11Sha256=void 0;var B0e=(mi(),ie(pi));B0e.__exportStar(i6(),Ea);var U0e=qI();Object.defineProperty(Ea,"Ie11Sha256",{enumerable:!0,get:function(){return U0e.Sha256}});var j0e=HI();Object.defineProperty(Ea,"WebCryptoSha256",{enumerable:!0,get:function(){return j0e.Sha256}})});var a6={};Nt(a6,{AWSSDKSigV4Signer:()=>Lx,AwsEc2QueryProtocol:()=>hh,AwsJson1_0Protocol:()=>uh,AwsJson1_1Protocol:()=>lh,AwsJsonRpcProtocol:()=>ns,AwsQueryProtocol:()=>is,AwsRestJsonProtocol:()=>So,AwsRestXmlProtocol:()=>_h,AwsSdkSigV4ASigner:()=>pl,AwsSdkSigV4Signer:()=>Qt,AwsSmithyRpcV2CborProtocol:()=>oh,JsonCodec:()=>rs,JsonShapeDeserializer:()=>Dc,JsonShapeSerializer:()=>Rc,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:()=>uo,NODE_SIGV4A_CONFIG_OPTIONS:()=>gM,QueryShapeSerializer:()=>Pc,XmlCodec:()=>Nc,XmlShapeDeserializer:()=>os,XmlShapeSerializer:()=>Oc,_toBool:()=>oB,_toNum:()=>iB,_toStr:()=>nB,awsExpectUnion:()=>EB,emitWarningIfUnsupportedVersion:()=>so,getBearerTokenEnvKey:()=>ym,loadRestJsonErrorCode:()=>Cc,loadRestXmlErrorCode:()=>yh,parseJsonBody:()=>Ml,parseJsonErrorBody:()=>dB,parseXmlBody:()=>ww,parseXmlErrorBody:()=>NB,resolveAWSSDKSigV4Config:()=>GM,resolveAwsSdkSigV4AConfig:()=>yM,resolveAwsSdkSigV4Config:()=>Ln,setCredentialFeature:()=>Fi,setFeature:()=>N1,setTokenFeature:()=>M1,state:()=>Jp,validateSigningProperties:()=>cc});var c6=D(()=>{Yt();Xt();ss()});var E6=b(ru=>{"use strict";var tu=class e{value;constructor(t){typeof t=="object"&&"N"in t?this.value=String(t.N):this.value=String(t);let r=typeof t.valueOf()=="number"?t.valueOf():0;if(r>Number.MAX_SAFE_INTEGER||r<Number.MIN_SAFE_INTEGER||Math.abs(r)===1/0||Number.isNaN(r))throw new Error(`NumberValue should not be initialized with an imprecise number=${r}. Use a string instead.`)}static from(t){return new e(t)}toAttributeValue(){return{N:this.toString()}}toBigInt(){let t=this.toString();return BigInt(t)}toString(){return String(this.value)}valueOf(){return this.toString()}},Yd=(e,t)=>{var r,n,o,i,s,a;if(e===void 0)throw new Error("Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.");if(e===null&&typeof e=="object")return H_();if(Array.isArray(e))return q0e(e,t);if(((r=e==null?void 0:e.constructor)==null?void 0:r.name)==="Set")return G0e(e,t);if(((n=e==null?void 0:e.constructor)==null?void 0:n.name)==="Map")return H0e(e,t);if(((o=e==null?void 0:e.constructor)==null?void 0:o.name)==="Object"||!e.constructor&&typeof e=="object")return u6(e,t);if(_6(e))return e.length===0&&(t!=null&&t.convertEmptyValues)?H_():m6(e);if(typeof e=="boolean"||((i=e==null?void 0:e.constructor)==null?void 0:i.name)==="Boolean")return{BOOL:e.valueOf()};if(typeof e=="number"||((s=e==null?void 0:e.constructor)==null?void 0:s.name)==="Number")return g6(e,t);if(e instanceof tu)return e.toAttributeValue();if(typeof e=="bigint")return y6(e);if(typeof e=="string"||((a=e==null?void 0:e.constructor)==null?void 0:a.name)==="String")return e.length===0&&(t!=null&&t.convertEmptyValues)?H_():h6(e);if(t!=null&&t.convertClassInstanceToMap&&typeof e=="object")return u6(e,t);throw new Error(`Unsupported type passed: ${e}. Pass options.convertClassInstanceToMap=true to marshall typeof object as map attribute.`)},q0e=(e,t)=>({L:e.filter(r=>typeof r!="function"&&(!(t!=null&&t.removeUndefinedValues)||(t==null?void 0:t.removeUndefinedValues)&&r!==void 0)).map(r=>Yd(r,t))}),G0e=(e,t)=>{let r=t!=null&&t.removeUndefinedValues?new Set([...e].filter(o=>o!==void 0)):e;if(!(t!=null&&t.removeUndefinedValues)&&r.has(void 0))throw new Error("Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.");if(r.size===0){if(t!=null&&t.convertEmptyValues)return H_();throw new Error("Pass a non-empty set, or options.convertEmptyValues=true.")}let n=r.values().next().value;if(n instanceof tu)return{NS:Array.from(r).map(o=>o.toString())};if(typeof n=="number")return{NS:Array.from(r).map(o=>g6(o,t)).map(o=>o.N)};if(typeof n=="bigint")return{NS:Array.from(r).map(y6).map(o=>o.N)};if(typeof n=="string")return{SS:Array.from(r).map(h6).map(o=>o.S)};if(_6(n))return{BS:Array.from(r).map(m6).map(o=>o.B)};throw new Error("Only Number Set (NS), Binary Set (BS) or String Set (SS) are allowed.")},H0e=(e,t)=>({M:(r=>{let n={};for(let[o,i]of r)typeof i!="function"&&(i!==void 0||!(t!=null&&t.removeUndefinedValues))&&(n[o]=Yd(i,t));return n})(e)}),u6=(e,t)=>({M:(r=>{let n={};for(let o in r){let i=r[o];typeof i!="function"&&(i!==void 0||!(t!=null&&t.removeUndefinedValues))&&(n[o]=Yd(i,t))}return n})(e)}),H_=()=>({NULL:!0}),m6=e=>({B:e}),h6=e=>({S:e.toString()}),y6=e=>({N:e.toString()}),l6=e=>{throw new Error(`${e} Use NumberValue from @aws-sdk/lib-dynamodb.`)},g6=(e,t)=>{if([Number.NaN,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY].map(r=>r.toString()).includes(e.toString()))throw new Error(`Special numeric value ${e.toString()} is not allowed`);return t!=null&&t.allowImpreciseNumbers||(Number(e)>Number.MAX_SAFE_INTEGER?l6(`Number ${e.toString()} is greater than Number.MAX_SAFE_INTEGER.`):Number(e)<Number.MIN_SAFE_INTEGER&&l6(`Number ${e.toString()} is lesser than Number.MIN_SAFE_INTEGER.`)),{N:e.toString()}},_6=e=>{let t=["ArrayBuffer","Blob","Buffer","DataView","File","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];return e!=null&&e.constructor?t.includes(e.constructor.name):!1},Kd=(e,t)=>{for(let[r,n]of Object.entries(e))if(n!==void 0)switch(r){case"NULL":return null;case"BOOL":return!!n;case"N":return d6(n,t);case"B":return p6(n);case"S":return f6(n);case"L":return V0e(n,t);case"M":return W0e(n,t);case"NS":return new Set(n.map(o=>d6(o,t)));case"BS":return new Set(n.map(p6));case"SS":return new Set(n.map(f6));default:throw new Error(`Unsupported type passed: ${r}`)}throw new Error(`No value defined: ${JSON.stringify(e)}`)},d6=(e,t)=>{if(typeof(t==null?void 0:t.wrapNumbers)=="function")return t==null?void 0:t.wrapNumbers(e);if(t!=null&&t.wrapNumbers)return tu.from(e);let r=Number(e),n=[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];if((r>Number.MAX_SAFE_INTEGER||r<Number.MIN_SAFE_INTEGER)&&!n.includes(r))if(typeof BigInt=="function")try{return BigInt(e)}catch{throw new Error(`${e} can't be converted to BigInt. Set options.wrapNumbers to get string value.`)}else throw new Error(`${e} is outside SAFE_INTEGER bounds. Set options.wrapNumbers to get string value.`);return r},f6=e=>e,p6=e=>e,V0e=(e,t)=>e.map(r=>Kd(r,t)),W0e=(e,t)=>Object.entries(e).reduce((r,[n,o])=>(r[n]=Kd(o,t),r),{});function z0e(e,t){let r=Yd(e,t),[n,o]=Object.entries(r)[0];switch(n){case"M":case"L":return t!=null&&t.convertTopLevelContainer?r:o;case"SS":case"NS":case"BS":case"S":case"N":case"B":case"NULL":case"BOOL":case"$unknown":default:return r}}var K0e=(e,t)=>t!=null&&t.convertWithoutMapWrapper?Kd(e,t):Kd({M:e},t);ru.NumberValueImpl=tu;ru.convertToAttr=Yd;ru.convertToNative=Kd;ru.marshall=z0e;ru.unmarshall=K0e});var x6=b(It=>{"use strict";var nE=Te(),Y0e=(c6(),ie(a6)),XI=E6(),on=eI(),b6=(ar(),ie(al)),Qd=null,ve={},yi=[],S6="*",V_=(e,t,r)=>{if(e!==void 0){if(r==null)return t(e);{let n=Object.keys(r),o=n.length===1&&n[0]===S6,i=n.length>=1&&!o,s=n.length===0;if(i)return JI(e,t,r);if(s)return Q0e(e,t,Qd);if(o)return Object.entries(e??{}).reduce((a,[c,l])=>(typeof l!="function"&&(a[c]=V_(l,t,r[S6])),a),Array.isArray(e)?[]:{})}}},JI=(e,t,r)=>{let n;if(Array.isArray(e))n=e.filter(o=>typeof o!="function");else{n={};for(let[o,i]of Object.entries(e))typeof i!="function"&&(n[o]=i)}for(let[o,i]of Object.entries(r)){if(typeof e[o]=="function")continue;let s=V_(e[o],t,i);s!==void 0&&typeof s!="function"&&(n[o]=s)}return n},Q0e=(e,t,r)=>Array.isArray(e)?e.filter(n=>typeof n!="function").map(n=>V_(n,t,r)):Object.entries(e).reduce((n,[o,i])=>{if(typeof i=="function")return n;let s=V_(i,t,r);return s!==void 0&&typeof s!="function"&&(n[o]=s),n},{}),X0e=(e,t,r)=>JI(e,o=>XI.marshall(o,r),t),J0e=(e,t,r)=>JI(e,o=>XI.unmarshall(o,r),t),gr=class extends nE.Command{addMarshallingMiddleware(t){let{marshallOptions:r={},unmarshallOptions:n={}}=t.translateConfig||{};r.convertTopLevelContainer=r.convertTopLevelContainer??!0,n.convertWithoutMapWrapper=n.convertWithoutMapWrapper??!0,this.clientCommand.middlewareStack.addRelativeTo((o,i)=>async s=>(Y0e.setFeature(i,"DDB_MAPPER","d"),o({...s,input:X0e(s.input,this.inputKeyNodes,r)})),{name:"DocumentMarshall",relation:"before",toMiddleware:"serializerMiddleware",override:!0}),this.clientCommand.middlewareStack.addRelativeTo((o,i)=>async s=>{let a=await o(s);return a.output=J0e(a.output,this.outputKeyNodes,n),a},{name:"DocumentUnmarshall",relation:"before",toMiddleware:"deserializerMiddleware",override:!0})}},W_=class extends gr{input;inputKeyNodes={Statements:{"*":{Parameters:yi}}};outputKeyNodes={Responses:{"*":{Error:{Item:ve},Item:ve}}};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.BatchExecuteStatementCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},z_=class extends gr{input;inputKeyNodes={RequestItems:{"*":{Keys:{"*":ve}}}};outputKeyNodes={Responses:{"*":{"*":ve}},UnprocessedKeys:{"*":{Keys:{"*":ve}}}};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.BatchGetItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},K_=class extends gr{input;inputKeyNodes={RequestItems:{"*":{"*":{PutRequest:{Item:ve},DeleteRequest:{Key:ve}}}}};outputKeyNodes={UnprocessedItems:{"*":{"*":{PutRequest:{Item:ve},DeleteRequest:{Key:ve}}}},ItemCollectionMetrics:{"*":{"*":{ItemCollectionKey:ve}}}};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.BatchWriteItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},Y_=class extends gr{input;inputKeyNodes={Key:ve,Expected:{"*":{Value:Qd,AttributeValueList:yi}},ExpressionAttributeValues:ve};outputKeyNodes={Attributes:ve,ItemCollectionMetrics:{ItemCollectionKey:ve}};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.DeleteItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},Q_=class extends gr{input;inputKeyNodes={Parameters:yi};outputKeyNodes={Items:{"*":ve},LastEvaluatedKey:ve};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.ExecuteStatementCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},X_=class extends gr{input;inputKeyNodes={TransactStatements:{"*":{Parameters:yi}}};outputKeyNodes={Responses:{"*":{Item:ve}}};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.ExecuteTransactionCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},J_=class extends gr{input;inputKeyNodes={Key:ve};outputKeyNodes={Item:ve};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.GetItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},Z_=class extends gr{input;inputKeyNodes={Item:ve,Expected:{"*":{Value:Qd,AttributeValueList:yi}},ExpressionAttributeValues:ve};outputKeyNodes={Attributes:ve,ItemCollectionMetrics:{ItemCollectionKey:ve}};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.PutItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},Xd=class extends gr{input;inputKeyNodes={KeyConditions:{"*":{AttributeValueList:yi}},QueryFilter:{"*":{AttributeValueList:yi}},ExclusiveStartKey:ve,ExpressionAttributeValues:ve};outputKeyNodes={Items:{"*":ve},LastEvaluatedKey:ve};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.QueryCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},Jd=class extends gr{input;inputKeyNodes={ScanFilter:{"*":{AttributeValueList:yi}},ExclusiveStartKey:ve,ExpressionAttributeValues:ve};outputKeyNodes={Items:{"*":ve},LastEvaluatedKey:ve};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.ScanCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},eE=class extends gr{input;inputKeyNodes={TransactItems:{"*":{Get:{Key:ve}}}};outputKeyNodes={Responses:{"*":{Item:ve}}};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.TransactGetItemsCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},tE=class extends gr{input;inputKeyNodes={TransactItems:{"*":{ConditionCheck:{Key:ve,ExpressionAttributeValues:ve},Put:{Item:ve,ExpressionAttributeValues:ve},Delete:{Key:ve,ExpressionAttributeValues:ve},Update:{Key:ve,ExpressionAttributeValues:ve}}}};outputKeyNodes={ItemCollectionMetrics:{"*":{"*":{ItemCollectionKey:ve}}}};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.TransactWriteItemsCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},rE=class extends gr{input;inputKeyNodes={Key:ve,AttributeUpdates:{"*":{Value:Qd}},Expected:{"*":{Value:Qd,AttributeValueList:yi}},ExpressionAttributeValues:ve};outputKeyNodes={Attributes:ve,ItemCollectionMetrics:{ItemCollectionKey:ve}};clientCommand;middlewareStack;constructor(t){super(),this.input=t,this.clientCommand=new on.UpdateItemCommand(this.input),this.middlewareStack=this.clientCommand.middlewareStack}resolveMiddleware(t,r,n){this.addMarshallingMiddleware(r);let o=t.concat(this.middlewareStack),i=this.clientCommand.resolveMiddleware(o,r,n);return async()=>i(this.clientCommand)}},nu=class e extends nE.Client{config;constructor(t,r){var n;if(super(t.config),this.config=t.config,this.config.translateConfig=r,this.middlewareStack=t.middlewareStack,(n=this.config)!=null&&n.cacheMiddleware)throw new Error("@aws-sdk/lib-dynamodb - cacheMiddleware=true is not compatible with the DynamoDBDocumentClient. This option must be set to false.")}static from(t,r){return new e(t,r)}destroy(){}},Z0e=b6.createPaginator(nu,Xd,"ExclusiveStartKey","LastEvaluatedKey","Limit"),ebe=b6.createPaginator(nu,Jd,"ExclusiveStartKey","LastEvaluatedKey","Limit"),QI=class e extends nu{static from(t,r){return new e(t,r)}batchExecuteStatement(t,r,n){let o=new W_(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}batchGet(t,r,n){let o=new z_(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}batchWrite(t,r,n){let o=new K_(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}delete(t,r,n){let o=new Y_(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}executeStatement(t,r,n){let o=new Q_(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}executeTransaction(t,r,n){let o=new X_(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}get(t,r,n){let o=new J_(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}put(t,r,n){let o=new Z_(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}query(t,r,n){let o=new Xd(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}scan(t,r,n){let o=new Jd(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}transactGet(t,r,n){let o=new eE(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}transactWrite(t,r,n){let o=new tE(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}update(t,r,n){let o=new rE(t);if(typeof r=="function")this.send(o,r);else if(typeof n=="function"){if(typeof r!="object")throw new Error(`Expect http options but get ${typeof r}`);this.send(o,r||{},n)}else return this.send(o,r)}};It.$Command=nE.Command;It.__Client=nE.Client;It.NumberValue=XI.NumberValueImpl;It.BatchExecuteStatementCommand=W_;It.BatchGetCommand=z_;It.BatchWriteCommand=K_;It.DeleteCommand=Y_;It.DynamoDBDocument=QI;It.DynamoDBDocumentClient=nu;It.DynamoDBDocumentClientCommand=gr;It.ExecuteStatementCommand=Q_;It.ExecuteTransactionCommand=X_;It.GetCommand=J_;It.PutCommand=Z_;It.QueryCommand=Xd;It.ScanCommand=Jd;It.TransactGetCommand=eE;It.TransactWriteCommand=tE;It.UpdateCommand=rE;It.paginateQuery=Z0e;It.paginateScan=ebe});var v6=b(oE=>{"use strict";Object.defineProperty(oE,"__esModule",{value:!0});oE.DBManager=void 0;var tbe=x6(),ZI=class{get client(){return this._client}get ddbDocClient(){return this._ddbDocClient}constructor(t){let{dynamoClient:r,tableName:n}=t;this._tableName=n,this._client=r,this._ddbDocClient=tbe.DynamoDBDocument.from(this._client)}get tableName(){return this._tableName}set tableName(t){this._tableName=t}};oE.DBManager=ZI});var T6=b(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.TransformationType=void 0;var rbe;(function(e){e[e.PLAIN_TO_CLASS=0]="PLAIN_TO_CLASS",e[e.CLASS_TO_PLAIN=1]="CLASS_TO_PLAIN",e[e.CLASS_TO_CLASS=2]="CLASS_TO_CLASS"})(rbe=Zd.TransformationType||(Zd.TransformationType={}))});var ef=b(Sa=>{"use strict";var nbe=Sa&&Sa.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),obe=Sa&&Sa.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&nbe(t,e,r)};Object.defineProperty(Sa,"__esModule",{value:!0});obe(T6(),Sa)});var w6=b(iE=>{"use strict";Object.defineProperty(iE,"__esModule",{value:!0});iE.MetadataStorage=void 0;var gi=ef(),eC=class{constructor(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}addTypeMetadata(t){this._typeMetadatas.has(t.target)||this._typeMetadatas.set(t.target,new Map),this._typeMetadatas.get(t.target).set(t.propertyName,t)}addTransformMetadata(t){this._transformMetadatas.has(t.target)||this._transformMetadatas.set(t.target,new Map),this._transformMetadatas.get(t.target).has(t.propertyName)||this._transformMetadatas.get(t.target).set(t.propertyName,[]),this._transformMetadatas.get(t.target).get(t.propertyName).push(t)}addExposeMetadata(t){this._exposeMetadatas.has(t.target)||this._exposeMetadatas.set(t.target,new Map),this._exposeMetadatas.get(t.target).set(t.propertyName,t)}addExcludeMetadata(t){this._excludeMetadatas.has(t.target)||this._excludeMetadatas.set(t.target,new Map),this._excludeMetadatas.get(t.target).set(t.propertyName,t)}findTransformMetadatas(t,r,n){return this.findMetadatas(this._transformMetadatas,t,r).filter(o=>!o.options||o.options.toClassOnly===!0&&o.options.toPlainOnly===!0?!0:o.options.toClassOnly===!0?n===gi.TransformationType.CLASS_TO_CLASS||n===gi.TransformationType.PLAIN_TO_CLASS:o.options.toPlainOnly===!0?n===gi.TransformationType.CLASS_TO_PLAIN:!0)}findExcludeMetadata(t,r){return this.findMetadata(this._excludeMetadatas,t,r)}findExposeMetadata(t,r){return this.findMetadata(this._exposeMetadatas,t,r)}findExposeMetadataByCustomName(t,r){return this.getExposedMetadatas(t).find(n=>n.options&&n.options.name===r)}findTypeMetadata(t,r){return this.findMetadata(this._typeMetadatas,t,r)}getStrategy(t){let r=this._excludeMetadatas.get(t),n=r&&r.get(void 0),o=this._exposeMetadatas.get(t),i=o&&o.get(void 0);return n&&i||!n&&!i?"none":n?"excludeAll":"exposeAll"}getExposedMetadatas(t){return this.getMetadata(this._exposeMetadatas,t)}getExcludedMetadatas(t){return this.getMetadata(this._excludeMetadatas,t)}getExposedProperties(t,r){return this.getExposedMetadatas(t).filter(n=>!n.options||n.options.toClassOnly===!0&&n.options.toPlainOnly===!0?!0:n.options.toClassOnly===!0?r===gi.TransformationType.CLASS_TO_CLASS||r===gi.TransformationType.PLAIN_TO_CLASS:n.options.toPlainOnly===!0?r===gi.TransformationType.CLASS_TO_PLAIN:!0).map(n=>n.propertyName)}getExcludedProperties(t,r){return this.getExcludedMetadatas(t).filter(n=>!n.options||n.options.toClassOnly===!0&&n.options.toPlainOnly===!0?!0:n.options.toClassOnly===!0?r===gi.TransformationType.CLASS_TO_CLASS||r===gi.TransformationType.PLAIN_TO_CLASS:n.options.toPlainOnly===!0?r===gi.TransformationType.CLASS_TO_PLAIN:!0).map(n=>n.propertyName)}clear(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()}getMetadata(t,r){let n=t.get(r),o;n&&(o=Array.from(n.values()).filter(s=>s.propertyName!==void 0));let i=[];for(let s of this.getAncestors(r)){let a=t.get(s);if(a){let c=Array.from(a.values()).filter(l=>l.propertyName!==void 0);i.push(...c)}}return i.concat(o||[])}findMetadata(t,r,n){let o=t.get(r);if(o){let i=o.get(n);if(i)return i}for(let i of this.getAncestors(r)){let s=t.get(i);if(s){let a=s.get(n);if(a)return a}}}findMetadatas(t,r,n){let o=t.get(r),i;o&&(i=o.get(n));let s=[];for(let a of this.getAncestors(r)){let c=t.get(a);c&&c.has(n)&&s.push(...c.get(n))}return s.slice().reverse().concat((i||[]).slice().reverse())}getAncestors(t){if(!t)return[];if(!this._ancestorsMap.has(t)){let r=[];for(let n=Object.getPrototypeOf(t.prototype.constructor);typeof n.prototype<"u";n=Object.getPrototypeOf(n.prototype.constructor))r.push(n);this._ancestorsMap.set(t,r)}return this._ancestorsMap.get(t)}};iE.MetadataStorage=eC});var ou=b(sE=>{"use strict";Object.defineProperty(sE,"__esModule",{value:!0});sE.defaultMetadataStorage=void 0;var ibe=w6();sE.defaultMetadataStorage=new ibe.MetadataStorage});var A6=b(aE=>{"use strict";Object.defineProperty(aE,"__esModule",{value:!0});aE.getGlobal=void 0;function sbe(){if(typeof globalThis<"u")return globalThis;if(typeof global<"u")return global;if(typeof window<"u")return window;if(typeof self<"u")return self}aE.getGlobal=sbe});var I6=b(cE=>{"use strict";Object.defineProperty(cE,"__esModule",{value:!0});cE.isPromise=void 0;function abe(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}cE.isPromise=abe});var D6=b(ws=>{"use strict";var cbe=ws&&ws.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),C6=ws&&ws.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&cbe(t,e,r)};Object.defineProperty(ws,"__esModule",{value:!0});C6(A6(),ws);C6(I6(),ws)});var P6=b(uE=>{"use strict";Object.defineProperty(uE,"__esModule",{value:!0});uE.TransformOperationExecutor=void 0;var Ur=ou(),Pt=ef(),R6=D6();function ube(e){let t=new e;return!(t instanceof Set)&&!("push"in t)?[]:t}var tC=class{constructor(t,r){this.transformationType=t,this.options=r,this.recursionStack=new Set}transform(t,r,n,o,i,s=0){if(Array.isArray(r)||r instanceof Set){let a=o&&this.transformationType===Pt.TransformationType.PLAIN_TO_CLASS?ube(o):[];return r.forEach((c,l)=>{let d=t?t[l]:void 0;if(!this.options.enableCircularCheck||!this.isCircular(c)){let f;if(typeof n!="function"&&n&&n.options&&n.options.discriminator&&n.options.discriminator.property&&n.options.discriminator.subTypes){if(this.transformationType===Pt.TransformationType.PLAIN_TO_CLASS){f=n.options.discriminator.subTypes.find(E=>E.name===c[n.options.discriminator.property]);let h={newObject:a,object:c,property:void 0},_=n.typeFunction(h);f===void 0?f=_:f=f.value,n.options.keepDiscriminatorProperty||delete c[n.options.discriminator.property]}this.transformationType===Pt.TransformationType.CLASS_TO_CLASS&&(f=c.constructor),this.transformationType===Pt.TransformationType.CLASS_TO_PLAIN&&(c[n.options.discriminator.property]=n.options.discriminator.subTypes.find(h=>h.value===c.constructor).name)}else f=n;let m=this.transform(d,c,f,void 0,c instanceof Map,s+1);a instanceof Set?a.add(m):a.push(m)}else this.transformationType===Pt.TransformationType.CLASS_TO_CLASS&&(a instanceof Set?a.add(c):a.push(c))}),a}else{if(n===String&&!i)return r==null?r:String(r);if(n===Number&&!i)return r==null?r:Number(r);if(n===Boolean&&!i)return r==null?r:!!r;if((n===Date||r instanceof Date)&&!i)return r instanceof Date?new Date(r.valueOf()):r==null?r:new Date(r);if((0,R6.getGlobal)().Buffer&&(n===Buffer||r instanceof Buffer)&&!i)return r==null?r:Buffer.from(r);if((0,R6.isPromise)(r)&&!i)return new Promise((a,c)=>{r.then(l=>a(this.transform(void 0,l,n,void 0,void 0,s+1)),c)});if(!i&&r!==null&&typeof r=="object"&&typeof r.then=="function")return r;if(typeof r=="object"&&r!==null){!n&&r.constructor!==Object&&(!Array.isArray(r)&&r.constructor===Array||(n=r.constructor)),!n&&t&&(n=t.constructor),this.options.enableCircularCheck&&this.recursionStack.add(r);let a=this.getKeys(n,r,i),c=t||{};!t&&(this.transformationType===Pt.TransformationType.PLAIN_TO_CLASS||this.transformationType===Pt.TransformationType.CLASS_TO_CLASS)&&(i?c=new Map:n?c=new n:c={});for(let l of a){if(l==="__proto__"||l==="constructor")continue;let d=l,f=l,m=l;if(!this.options.ignoreDecorators&&n){if(this.transformationType===Pt.TransformationType.PLAIN_TO_CLASS){let A=Ur.defaultMetadataStorage.findExposeMetadataByCustomName(n,l);A&&(m=A.propertyName,f=A.propertyName)}else if(this.transformationType===Pt.TransformationType.CLASS_TO_PLAIN||this.transformationType===Pt.TransformationType.CLASS_TO_CLASS){let A=Ur.defaultMetadataStorage.findExposeMetadata(n,l);A&&A.options&&A.options.name&&(f=A.options.name)}}let h;this.transformationType===Pt.TransformationType.PLAIN_TO_CLASS?h=r[d]:r instanceof Map?h=r.get(d):r[d]instanceof Function?h=r[d]():h=r[d];let _,E=h instanceof Map;if(n&&i)_=n;else if(n){let A=Ur.defaultMetadataStorage.findTypeMetadata(n,m);if(A){let O={newObject:c,object:r,property:m},G=A.typeFunction?A.typeFunction(O):A.reflectedType;A.options&&A.options.discriminator&&A.options.discriminator.property&&A.options.discriminator.subTypes?r[d]instanceof Array?_=A:(this.transformationType===Pt.TransformationType.PLAIN_TO_CLASS&&(_=A.options.discriminator.subTypes.find(z=>{if(h&&h instanceof Object&&A.options.discriminator.property in h)return z.name===h[A.options.discriminator.property]}),_===void 0?_=G:_=_.value,A.options.keepDiscriminatorProperty||h&&h instanceof Object&&A.options.discriminator.property in h&&delete h[A.options.discriminator.property]),this.transformationType===Pt.TransformationType.CLASS_TO_CLASS&&(_=h.constructor),this.transformationType===Pt.TransformationType.CLASS_TO_PLAIN&&h&&(h[A.options.discriminator.property]=A.options.discriminator.subTypes.find(z=>z.value===h.constructor).name)):_=G,E=E||A.reflectedType===Map}else if(this.options.targetMaps)this.options.targetMaps.filter(O=>O.target===n&&!!O.properties[m]).forEach(O=>_=O.properties[m]);else if(this.options.enableImplicitConversion&&this.transformationType===Pt.TransformationType.PLAIN_TO_CLASS){let O=Reflect.getMetadata("design:type",n.prototype,m);O&&(_=O)}}let T=Array.isArray(r[d])?this.getReflectedType(n,m):void 0,I=t?t[d]:void 0;if(c.constructor.prototype){let A=Object.getOwnPropertyDescriptor(c.constructor.prototype,f);if((this.transformationType===Pt.TransformationType.PLAIN_TO_CLASS||this.transformationType===Pt.TransformationType.CLASS_TO_CLASS)&&(A&&!A.set||c[f]instanceof Function))continue}if(!this.options.enableCircularCheck||!this.isCircular(h)){let A=this.transformationType===Pt.TransformationType.PLAIN_TO_CLASS?f:l,O;this.transformationType===Pt.TransformationType.CLASS_TO_PLAIN?(O=r[A],O=this.applyCustomTransformations(O,n,A,r,this.transformationType),O=r[A]===O?h:O,O=this.transform(I,O,_,T,E,s+1)):h===void 0&&this.options.exposeDefaultValues?O=c[f]:(O=this.transform(I,h,_,T,E,s+1),O=this.applyCustomTransformations(O,n,A,r,this.transformationType)),(O!==void 0||this.options.exposeUnsetFields)&&(c instanceof Map?c.set(f,O):c[f]=O)}else if(this.transformationType===Pt.TransformationType.CLASS_TO_CLASS){let A=h;A=this.applyCustomTransformations(A,n,l,r,this.transformationType),(A!==void 0||this.options.exposeUnsetFields)&&(c instanceof Map?c.set(f,A):c[f]=A)}}return this.options.enableCircularCheck&&this.recursionStack.delete(r),c}else return r}}applyCustomTransformations(t,r,n,o,i){let s=Ur.defaultMetadataStorage.findTransformMetadatas(r,n,this.transformationType);return this.options.version!==void 0&&(s=s.filter(a=>a.options?this.checkVersion(a.options.since,a.options.until):!0)),this.options.groups&&this.options.groups.length?s=s.filter(a=>a.options?this.checkGroups(a.options.groups):!0):s=s.filter(a=>!a.options||!a.options.groups||!a.options.groups.length),s.forEach(a=>{t=a.transformFn({value:t,key:n,obj:o,type:i,options:this.options})}),t}isCircular(t){return this.recursionStack.has(t)}getReflectedType(t,r){if(!t)return;let n=Ur.defaultMetadataStorage.findTypeMetadata(t,r);return n?n.reflectedType:void 0}getKeys(t,r,n){let o=Ur.defaultMetadataStorage.getStrategy(t);o==="none"&&(o=this.options.strategy||"exposeAll");let i=[];if((o==="exposeAll"||n)&&(r instanceof Map?i=Array.from(r.keys()):i=Object.keys(r)),n)return i;if(this.options.ignoreDecorators&&this.options.excludeExtraneousValues&&t){let s=Ur.defaultMetadataStorage.getExposedProperties(t,this.transformationType),a=Ur.defaultMetadataStorage.getExcludedProperties(t,this.transformationType);i=[...s,...a]}if(!this.options.ignoreDecorators&&t){let s=Ur.defaultMetadataStorage.getExposedProperties(t,this.transformationType);this.transformationType===Pt.TransformationType.PLAIN_TO_CLASS&&(s=s.map(c=>{let l=Ur.defaultMetadataStorage.findExposeMetadata(t,c);return l&&l.options&&l.options.name?l.options.name:c})),this.options.excludeExtraneousValues?i=s:i=i.concat(s);let a=Ur.defaultMetadataStorage.getExcludedProperties(t,this.transformationType);a.length>0&&(i=i.filter(c=>!a.includes(c))),this.options.version!==void 0&&(i=i.filter(c=>{let l=Ur.defaultMetadataStorage.findExposeMetadata(t,c);return!l||!l.options?!0:this.checkVersion(l.options.since,l.options.until)})),this.options.groups&&this.options.groups.length?i=i.filter(c=>{let l=Ur.defaultMetadataStorage.findExposeMetadata(t,c);return!l||!l.options?!0:this.checkGroups(l.options.groups)}):i=i.filter(c=>{let l=Ur.defaultMetadataStorage.findExposeMetadata(t,c);return!l||!l.options||!l.options.groups||!l.options.groups.length})}return this.options.excludePrefixes&&this.options.excludePrefixes.length&&(i=i.filter(s=>this.options.excludePrefixes.every(a=>s.substr(0,a.length)!==a))),i=i.filter((s,a,c)=>c.indexOf(s)===a),i}checkVersion(t,r){let n=!0;return n&&t&&(n=this.options.version>=t),n&&r&&(n=this.options.version<r),n}checkGroups(t){return t?this.options.groups.some(r=>t.includes(r)):!0}};uE.TransformOperationExecutor=tC});var O6=b(lE=>{"use strict";Object.defineProperty(lE,"__esModule",{value:!0});lE.defaultOptions=void 0;lE.defaultOptions={enableCircularCheck:!1,enableImplicitConversion:!1,excludeExtraneousValues:!1,excludePrefixes:void 0,exposeDefaultValues:!1,exposeUnsetFields:!0,groups:void 0,ignoreDecorators:!1,strategy:void 0,targetMaps:void 0,version:void 0}});var cu=b(dE=>{"use strict";Object.defineProperty(dE,"__esModule",{value:!0});dE.ClassTransformer=void 0;var iu=P6(),su=ef(),au=O6(),rC=class{instanceToPlain(t,r){return new iu.TransformOperationExecutor(su.TransformationType.CLASS_TO_PLAIN,{...au.defaultOptions,...r}).transform(void 0,t,void 0,void 0,void 0,void 0)}classToPlainFromExist(t,r,n){return new iu.TransformOperationExecutor(su.TransformationType.CLASS_TO_PLAIN,{...au.defaultOptions,...n}).transform(r,t,void 0,void 0,void 0,void 0)}plainToInstance(t,r,n){return new iu.TransformOperationExecutor(su.TransformationType.PLAIN_TO_CLASS,{...au.defaultOptions,...n}).transform(void 0,r,t,void 0,void 0,void 0)}plainToClassFromExist(t,r,n){return new iu.TransformOperationExecutor(su.TransformationType.PLAIN_TO_CLASS,{...au.defaultOptions,...n}).transform(t,r,void 0,void 0,void 0,void 0)}instanceToInstance(t,r){return new iu.TransformOperationExecutor(su.TransformationType.CLASS_TO_CLASS,{...au.defaultOptions,...r}).transform(void 0,t,void 0,void 0,void 0,void 0)}classToClassFromExist(t,r,n){return new iu.TransformOperationExecutor(su.TransformationType.CLASS_TO_CLASS,{...au.defaultOptions,...n}).transform(r,t,void 0,void 0,void 0,void 0)}serialize(t,r){return JSON.stringify(this.instanceToPlain(t,r))}deserialize(t,r,n){let o=JSON.parse(r);return this.plainToInstance(t,o,n)}deserializeArray(t,r,n){let o=JSON.parse(r);return this.plainToInstance(t,o,n)}};dE.ClassTransformer=rC});var N6=b(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.Exclude=void 0;var lbe=ou();function dbe(e={}){return function(t,r){lbe.defaultMetadataStorage.addExcludeMetadata({target:t instanceof Function?t:t.constructor,propertyName:r,options:e})}}fE.Exclude=dbe});var $6=b(pE=>{"use strict";Object.defineProperty(pE,"__esModule",{value:!0});pE.Expose=void 0;var fbe=ou();function pbe(e={}){return function(t,r){fbe.defaultMetadataStorage.addExposeMetadata({target:t instanceof Function?t:t.constructor,propertyName:r,options:e})}}pE.Expose=pbe});var M6=b(mE=>{"use strict";Object.defineProperty(mE,"__esModule",{value:!0});mE.TransformInstanceToInstance=void 0;var mbe=cu();function hbe(e){return function(t,r,n){let o=new mbe.ClassTransformer,i=n.value;n.value=function(...s){let a=i.apply(this,s);return!!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"?a.then(l=>o.instanceToInstance(l,e)):o.instanceToInstance(a,e)}}}mE.TransformInstanceToInstance=hbe});var L6=b(hE=>{"use strict";Object.defineProperty(hE,"__esModule",{value:!0});hE.TransformInstanceToPlain=void 0;var ybe=cu();function gbe(e){return function(t,r,n){let o=new ybe.ClassTransformer,i=n.value;n.value=function(...s){let a=i.apply(this,s);return!!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"?a.then(l=>o.instanceToPlain(l,e)):o.instanceToPlain(a,e)}}}hE.TransformInstanceToPlain=gbe});var k6=b(yE=>{"use strict";Object.defineProperty(yE,"__esModule",{value:!0});yE.TransformPlainToInstance=void 0;var _be=cu();function Ebe(e,t){return function(r,n,o){let i=new _be.ClassTransformer,s=o.value;o.value=function(...a){let c=s.apply(this,a);return!!c&&(typeof c=="object"||typeof c=="function")&&typeof c.then=="function"?c.then(d=>i.plainToInstance(e,d,t)):i.plainToInstance(e,c,t)}}}yE.TransformPlainToInstance=Ebe});var F6=b(gE=>{"use strict";Object.defineProperty(gE,"__esModule",{value:!0});gE.Transform=void 0;var Sbe=ou();function bbe(e,t={}){return function(r,n){Sbe.defaultMetadataStorage.addTransformMetadata({target:r.constructor,propertyName:n,transformFn:e,options:t})}}gE.Transform=bbe});var B6=b(_E=>{"use strict";Object.defineProperty(_E,"__esModule",{value:!0});_E.Type=void 0;var xbe=ou();function vbe(e,t={}){return function(r,n){let o=Reflect.getMetadata("design:type",r,n);xbe.defaultMetadataStorage.addTypeMetadata({target:r.constructor,propertyName:n,reflectedType:o,typeFunction:e,options:t})}}_E.Type=vbe});var U6=b(sn=>{"use strict";var Tbe=sn&&sn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),ba=sn&&sn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Tbe(t,e,r)};Object.defineProperty(sn,"__esModule",{value:!0});ba(N6(),sn);ba($6(),sn);ba(M6(),sn);ba(L6(),sn);ba(k6(),sn);ba(F6(),sn);ba(B6(),sn)});var q6=b(j6=>{"use strict";Object.defineProperty(j6,"__esModule",{value:!0})});var H6=b(G6=>{"use strict";Object.defineProperty(G6,"__esModule",{value:!0})});var W6=b(V6=>{"use strict";Object.defineProperty(V6,"__esModule",{value:!0})});var K6=b(z6=>{"use strict";Object.defineProperty(z6,"__esModule",{value:!0})});var Q6=b(Y6=>{"use strict";Object.defineProperty(Y6,"__esModule",{value:!0})});var J6=b(X6=>{"use strict";Object.defineProperty(X6,"__esModule",{value:!0})});var eV=b(Z6=>{"use strict";Object.defineProperty(Z6,"__esModule",{value:!0})});var rV=b(tV=>{"use strict";Object.defineProperty(tV,"__esModule",{value:!0})});var oV=b(nV=>{"use strict";Object.defineProperty(nV,"__esModule",{value:!0})});var sV=b(iV=>{"use strict";Object.defineProperty(iV,"__esModule",{value:!0})});var cV=b(aV=>{"use strict";Object.defineProperty(aV,"__esModule",{value:!0})});var lV=b(uV=>{"use strict";Object.defineProperty(uV,"__esModule",{value:!0})});var fV=b(dV=>{"use strict";Object.defineProperty(dV,"__esModule",{value:!0})});var mV=b(pV=>{"use strict";Object.defineProperty(pV,"__esModule",{value:!0})});var hV=b(Ft=>{"use strict";var wbe=Ft&&Ft.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),jr=Ft&&Ft.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&wbe(t,e,r)};Object.defineProperty(Ft,"__esModule",{value:!0});jr(q6(),Ft);jr(H6(),Ft);jr(W6(),Ft);jr(K6(),Ft);jr(Q6(),Ft);jr(J6(),Ft);jr(eV(),Ft);jr(rV(),Ft);jr(oV(),Ft);jr(sV(),Ft);jr(cV(),Ft);jr(lV(),Ft);jr(fV(),Ft);jr(mV(),Ft)});var EE=b(Ke=>{"use strict";var Abe=Ke&&Ke.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),nC=Ke&&Ke.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Abe(t,e,r)};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.deserializeArray=Ke.deserialize=Ke.serialize=Ke.classToClassFromExist=Ke.instanceToInstance=Ke.plainToClassFromExist=Ke.plainToInstance=Ke.plainToClass=Ke.classToPlainFromExist=Ke.instanceToPlain=Ke.classToPlain=Ke.ClassTransformer=void 0;var Ibe=cu(),Cbe=cu();Object.defineProperty(Ke,"ClassTransformer",{enumerable:!0,get:function(){return Cbe.ClassTransformer}});nC(U6(),Ke);nC(hV(),Ke);nC(ef(),Ke);var Wn=new Ibe.ClassTransformer;function Dbe(e,t){return Wn.instanceToPlain(e,t)}Ke.classToPlain=Dbe;function Rbe(e,t){return Wn.instanceToPlain(e,t)}Ke.instanceToPlain=Rbe;function Pbe(e,t,r){return Wn.classToPlainFromExist(e,t,r)}Ke.classToPlainFromExist=Pbe;function Obe(e,t,r){return Wn.plainToInstance(e,t,r)}Ke.plainToClass=Obe;function Nbe(e,t,r){return Wn.plainToInstance(e,t,r)}Ke.plainToInstance=Nbe;function $be(e,t,r){return Wn.plainToClassFromExist(e,t,r)}Ke.plainToClassFromExist=$be;function Mbe(e,t){return Wn.instanceToInstance(e,t)}Ke.instanceToInstance=Mbe;function Lbe(e,t,r){return Wn.classToClassFromExist(e,t,r)}Ke.classToClassFromExist=Lbe;function kbe(e,t){return Wn.serialize(e,t)}Ke.serialize=kbe;function Fbe(e,t,r){return Wn.deserialize(e,t,r)}Ke.deserialize=Fbe;function Bbe(e,t,r){return Wn.deserializeArray(e,t,r)}Ke.deserializeArray=Bbe});var iC=b(SE=>{"use strict";Object.defineProperty(SE,"__esModule",{value:!0});SE.Rules=void 0;var Ube=EE(),oC=class e{static async Load(t){let{dbManager:r,key:n}=t,{Item:o}=await r.ddbDocClient.get({TableName:r.tableName,Key:{PK:`appName#${n.AppName}`.toLowerCase(),SK:"rules"}});return(0,Ube.plainToInstance)(e,o)}constructor(t){Object.assign(this,t),t===void 0&&(this._ruleSet={})}get DbStruct(){return{PK:this.PK,SK:this.SK,AppName:this.AppName,RuleSet:this.RuleSet,Version:this.Version}}async Save(t){let r=t.ddbDocClient.put({TableName:t.tableName,Item:this.DbStruct}),n=t.ddbDocClient.put({TableName:t.tableName,Item:this.DbStruct});await Promise.all([r,n]),await r,await n}get PK(){return`appName#${this.AppName}`.toLowerCase()}get SK(){return"rules"}get AppName(){return this._appName}set AppName(t){this._appName=t.toLowerCase()}get RuleSet(){return this._ruleSet}set RuleSet(t){this._ruleSet=t}get Version(){return this._version}set Version(t){this._version=t}};SE.Rules=oC});var aC=b(bE=>{"use strict";Object.defineProperty(bE,"__esModule",{value:!0});bE.Version=void 0;var yV=EE(),uu;(function(e){e[e.AppName=0]="AppName"})(uu||(uu={}));var sC=class e{static async LoadVersions(t){let{dbManager:r,key:n}=t,{Items:o}=await r.ddbDocClient.query({TableName:r.tableName,KeyConditionExpression:"PK = :pkval and begins_with(SK, :skval)",ExpressionAttributeValues:{":pkval":`appName#${n.AppName}`.toLowerCase(),":skval":"version"}}),i=[];if(o!==void 0)for(let s of o){let a=(0,yV.plainToInstance)(e,s);i.push(a)}return i}static async LoadVersion(t){let{dbManager:r,key:n}=t,{Item:o}=await r.ddbDocClient.get({TableName:r.tableName,Key:{PK:`appName#${n.AppName}`.toLowerCase(),SK:`version#${n.SemVer}`.toLowerCase()}});return(0,yV.plainToInstance)(e,o)}static async DeleteVersion(t){let{dbManager:r,key:n}=t;await r.ddbDocClient.delete({TableName:r.tableName,Key:{PK:`appName#${n.AppName}`.toLowerCase(),SK:`version#${n.SemVer}`.toLowerCase()}})}get PK(){switch(this._keyBy){case uu.AppName:return`appName#${this.AppName}`.toLowerCase();default:throw new Error("Missing SaveBy handler")}}constructor(t){this._keyBy=uu.AppName,this._status="pending",this._startupType="iframe",this._defaultFile="",this._integrationID="",this._routeIDAppVersion="",this._routeIDAppVersionSplat="",this._url="",this._lambdaARN="",Object.assign(this,t)}get DbStruct(){return{PK:this.PK,SK:this.SK,AppName:this.AppName,SemVer:this.SemVer,Type:this.Type,StartupType:this.StartupType,Status:this.Status,DefaultFile:this.DefaultFile,IntegrationID:this.IntegrationID,RouteIDAppVersion:this.RouteIDAppVersion,RouteIDAppVersionSplat:this.RouteIDAppVersionSplat,URL:this.URL,LambdaARN:this.LambdaARN}}async Save(t){this._keyBy=uu.AppName,await t.ddbDocClient.put({TableName:t.tableName,Item:this.DbStruct})}get SK(){switch(this._keyBy){case uu.AppName:return`version#${this.SemVer}`.toLowerCase();default:throw new Error("Missing SaveBy handler")}}get AppName(){return this._appName}set AppName(t){this._appName=t.toLowerCase()}get SemVer(){return this._semVer}set SemVer(t){this._semVer=t}get Type(){return this._type}set Type(t){this._type=t}get StartupType(){return this._startupType}set StartupType(t){this._startupType=t}get Status(){return this._status}set Status(t){this._status=t}get DefaultFile(){return this._defaultFile}set DefaultFile(t){this._defaultFile=t}get IntegrationID(){return this._integrationID}set IntegrationID(t){this._integrationID=t}get RouteIDAppVersion(){return this._routeIDAppVersion}set RouteIDAppVersion(t){this._routeIDAppVersion=t}get RouteIDAppVersionSplat(){return this._routeIDAppVersionSplat}set RouteIDAppVersionSplat(t){this._routeIDAppVersionSplat=t}get URL(){return this._url}set URL(t){this._url=t}get LambdaARN(){return this._lambdaARN}set LambdaARN(t){this._lambdaARN=t}};bE.Version=sC});var EV=b(xE=>{"use strict";Object.defineProperty(xE,"__esModule",{value:!0});xE.Application=void 0;var gV=EE(),_V=iC(),jbe=aC(),_i;(function(e){e[e.AppName=0]="AppName",e[e.Applications=1]="Applications"})(_i||(_i={}));var cC=class e{static async UpdateDefaultRule(t){let{dbManager:r,key:n}=t,o=await _V.Rules.Load({dbManager:r,key:n}),i=o.RuleSet.default;i.SemVer=n.SemVer,await o.Save(r)}static async GetVersionsAndRules(t){let{key:r,dbManager:n}=t,o=jbe.Version.LoadVersions({dbManager:n,key:r}),i=_V.Rules.Load({dbManager:n,key:r});return await Promise.all([o,i]),{Versions:await o,Rules:await i}}static async Load(t){let{key:r,dbManager:n}=t,{Item:o}=await n.ddbDocClient.get({TableName:n.tableName,Key:{PK:`appName#${r.AppName}`.toLowerCase(),SK:"application"}});return(0,gV.plainToInstance)(e,o)}static async LoadAllApps(t){let{Items:r}=await t.ddbDocClient.query({TableName:t.tableName,KeyConditionExpression:"PK = :pkval",ExpressionAttributeValues:{":pkval":"applications"}}),n=[];if(r!==void 0)for(let o of r){let i=(0,gV.plainToInstance)(e,o);n.push(i)}return n}constructor(t){Object.assign(this,t),this._keyBy=_i.AppName}get DbStruct(){return{PK:this.PK,SK:this.SK,AppName:this.AppName,DisplayName:this.DisplayName}}async Save(t){this._keyBy=_i.AppName;let r=t.ddbDocClient.put({TableName:t.tableName,Item:this.DbStruct});this._keyBy=_i.Applications;let n=t.ddbDocClient.put({TableName:t.tableName,Item:this.DbStruct});await Promise.all([r,n]),await r,await n}get PK(){switch(this._keyBy){case _i.Applications:return"applications";case _i.AppName:return`appName#${this.AppName}`.toLowerCase();default:throw new Error("Missing SaveBy handler")}}get SK(){switch(this._keyBy){case _i.Applications:return`appName#${this.AppName}`.toLowerCase();case _i.AppName:return"application";default:throw new Error("Missing SaveBy handler")}}get AppName(){return this._appName}set AppName(t){this._appName=t.toLowerCase()}get DisplayName(){return this._displayName}set DisplayName(t){this._displayName=t}};xE.Application=cC});var uC=b(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});No.Version=No.Rules=No.Application=No.DBManager=void 0;var qbe=v6();Object.defineProperty(No,"DBManager",{enumerable:!0,get:function(){return qbe.DBManager}});var Gbe=EV();Object.defineProperty(No,"Application",{enumerable:!0,get:function(){return Gbe.Application}});var Hbe=iC();Object.defineProperty(No,"Rules",{enumerable:!0,get:function(){return Hbe.Rules}});var Vbe=aC();Object.defineProperty(No,"Version",{enumerable:!0,get:function(){return Vbe.Version}})});var qr=b(lC=>{"use strict";lC.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]=="function")e.apply(this,t);else return new Promise((r,n)=>{e.call(this,...t,(o,i)=>o!=null?n(o):r(i))})},"name",{value:e.name})};lC.fromPromise=function(e){return Object.defineProperty(function(...t){let r=t[t.length-1];if(typeof r!="function")return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(n=>r(null,n),r)},"name",{value:e.name})}});var bV=b((zqe,SV)=>{var As=require("constants"),Wbe=process.cwd,vE=null,zbe=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return vE||(vE=Wbe.call(process)),vE};try{process.cwd()}catch{}typeof process.chdir=="function"&&(dC=process.chdir,process.chdir=function(e){vE=null,dC.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,dC));var dC;SV.exports=Kbe;function Kbe(e){As.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||r(e),e.chown=i(e.chown),e.fchown=i(e.fchown),e.lchown=i(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=s(e.chownSync),e.fchownSync=s(e.fchownSync),e.lchownSync=s(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=a(e.stat),e.fstat=a(e.fstat),e.lstat=a(e.lstat),e.statSync=c(e.statSync),e.fstatSync=c(e.fstatSync),e.lstatSync=c(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(d,f,m){m&&process.nextTick(m)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(d,f,m,h){h&&process.nextTick(h)},e.lchownSync=function(){}),zbe==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:(function(d){function f(m,h,_){var E=Date.now(),T=0;d(m,h,function I(A){if(A&&(A.code==="EACCES"||A.code==="EPERM")&&Date.now()-E<6e4){setTimeout(function(){e.stat(h,function(O,G){O&&O.code==="ENOENT"?d(m,h,I):_(A)})},T),T<100&&(T+=10);return}_&&_(A)})}return Object.setPrototypeOf&&Object.setPrototypeOf(f,d),f})(e.rename)),e.read=typeof e.read!="function"?e.read:(function(d){function f(m,h,_,E,T,I){var A;if(I&&typeof I=="function"){var O=0;A=function(G,z,Q){if(G&&G.code==="EAGAIN"&&O<10)return O++,d.call(e,m,h,_,E,T,A);I.apply(this,arguments)}}return d.call(e,m,h,_,E,T,A)}return Object.setPrototypeOf&&Object.setPrototypeOf(f,d),f})(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:(function(d){return function(f,m,h,_,E){for(var T=0;;)try{return d.call(e,f,m,h,_,E)}catch(I){if(I.code==="EAGAIN"&&T<10){T++;continue}throw I}}})(e.readSync);function t(d){d.lchmod=function(f,m,h){d.open(f,As.O_WRONLY|As.O_SYMLINK,m,function(_,E){if(_){h&&h(_);return}d.fchmod(E,m,function(T){d.close(E,function(I){h&&h(T||I)})})})},d.lchmodSync=function(f,m){var h=d.openSync(f,As.O_WRONLY|As.O_SYMLINK,m),_=!0,E;try{E=d.fchmodSync(h,m),_=!1}finally{if(_)try{d.closeSync(h)}catch{}else d.closeSync(h)}return E}}function r(d){As.hasOwnProperty("O_SYMLINK")&&d.futimes?(d.lutimes=function(f,m,h,_){d.open(f,As.O_SYMLINK,function(E,T){if(E){_&&_(E);return}d.futimes(T,m,h,function(I){d.close(T,function(A){_&&_(I||A)})})})},d.lutimesSync=function(f,m,h){var _=d.openSync(f,As.O_SYMLINK),E,T=!0;try{E=d.futimesSync(_,m,h),T=!1}finally{if(T)try{d.closeSync(_)}catch{}else d.closeSync(_)}return E}):d.futimes&&(d.lutimes=function(f,m,h,_){_&&process.nextTick(_)},d.lutimesSync=function(){})}function n(d){return d&&function(f,m,h){return d.call(e,f,m,function(_){l(_)&&(_=null),h&&h.apply(this,arguments)})}}function o(d){return d&&function(f,m){try{return d.call(e,f,m)}catch(h){if(!l(h))throw h}}}function i(d){return d&&function(f,m,h,_){return d.call(e,f,m,h,function(E){l(E)&&(E=null),_&&_.apply(this,arguments)})}}function s(d){return d&&function(f,m,h){try{return d.call(e,f,m,h)}catch(_){if(!l(_))throw _}}}function a(d){return d&&function(f,m,h){typeof m=="function"&&(h=m,m=null);function _(E,T){T&&(T.uid<0&&(T.uid+=4294967296),T.gid<0&&(T.gid+=4294967296)),h&&h.apply(this,arguments)}return m?d.call(e,f,m,_):d.call(e,f,_)}}function c(d){return d&&function(f,m){var h=m?d.call(e,f,m):d.call(e,f);return h&&(h.uid<0&&(h.uid+=4294967296),h.gid<0&&(h.gid+=4294967296)),h}}function l(d){if(!d||d.code==="ENOSYS")return!0;var f=!process.getuid||process.getuid()!==0;return!!(f&&(d.code==="EINVAL"||d.code==="EPERM"))}}});var TV=b((Kqe,vV)=>{var xV=require("stream").Stream;vV.exports=Ybe;function Ybe(e){return{ReadStream:t,WriteStream:r};function t(n,o){if(!(this instanceof t))return new t(n,o);xV.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,o=o||{};for(var s=Object.keys(o),a=0,c=s.length;a<c;a++){var l=s[a];this[l]=o[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}e.open(this.path,this.flags,this.mode,function(d,f){if(d){i.emit("error",d),i.readable=!1;return}i.fd=f,i.emit("open",f),i._read()})}function r(n,o){if(!(this instanceof r))return new r(n,o);xV.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,o=o||{};for(var i=Object.keys(o),s=0,a=i.length;s<a;s++){var c=i[s];this[c]=o[c]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var AV=b((Yqe,wV)=>{"use strict";wV.exports=Xbe;var Qbe=Object.getPrototypeOf||function(e){return e.__proto__};function Xbe(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var t={__proto__:Qbe(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}});var _r=b((Qqe,mC)=>{var vt=require("fs"),Jbe=bV(),Zbe=TV(),exe=AV(),TE=require("util"),nr,AE;typeof Symbol=="function"&&typeof Symbol.for=="function"?(nr=Symbol.for("graceful-fs.queue"),AE=Symbol.for("graceful-fs.previous")):(nr="___graceful-fs.queue",AE="___graceful-fs.previous");function txe(){}function DV(e,t){Object.defineProperty(e,nr,{get:function(){return t}})}var xa=txe;TE.debuglog?xa=TE.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(xa=function(){var e=TE.format.apply(TE,arguments);e="GFS4: "+e.split(/\n/).join(`
73
+ GFS4: `),console.error(e)});vt[nr]||(IV=global[nr]||[],DV(vt,IV),vt.close=(function(e){function t(r,n){return e.call(vt,r,function(o){o||CV(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(t,AE,{value:e}),t})(vt.close),vt.closeSync=(function(e){function t(r){e.apply(vt,arguments),CV()}return Object.defineProperty(t,AE,{value:e}),t})(vt.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){xa(vt[nr]),require("assert").equal(vt[nr].length,0)}));var IV;global[nr]||DV(global,vt[nr]);mC.exports=fC(exe(vt));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!vt.__patched&&(mC.exports=fC(vt),vt.__patched=!0);function fC(e){Jbe(e),e.gracefulify=fC,e.createReadStream=z,e.createWriteStream=Q;var t=e.readFile;e.readFile=r;function r(q,Z,ee){return typeof Z=="function"&&(ee=Z,Z=null),_e(q,Z,ee);function _e(it,Be,rt,we){return t(it,Be,function(Oe){Oe&&(Oe.code==="EMFILE"||Oe.code==="ENFILE")?lu([_e,[it,Be,rt],Oe,we||Date.now(),Date.now()]):typeof rt=="function"&&rt.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=o;function o(q,Z,ee,_e){return typeof ee=="function"&&(_e=ee,ee=null),it(q,Z,ee,_e);function it(Be,rt,we,Oe,st){return n(Be,rt,we,function(Qe){Qe&&(Qe.code==="EMFILE"||Qe.code==="ENFILE")?lu([it,[Be,rt,we,Oe],Qe,st||Date.now(),Date.now()]):typeof Oe=="function"&&Oe.apply(this,arguments)})}}var i=e.appendFile;i&&(e.appendFile=s);function s(q,Z,ee,_e){return typeof ee=="function"&&(_e=ee,ee=null),it(q,Z,ee,_e);function it(Be,rt,we,Oe,st){return i(Be,rt,we,function(Qe){Qe&&(Qe.code==="EMFILE"||Qe.code==="ENFILE")?lu([it,[Be,rt,we,Oe],Qe,st||Date.now(),Date.now()]):typeof Oe=="function"&&Oe.apply(this,arguments)})}}var a=e.copyFile;a&&(e.copyFile=c);function c(q,Z,ee,_e){return typeof ee=="function"&&(_e=ee,ee=0),it(q,Z,ee,_e);function it(Be,rt,we,Oe,st){return a(Be,rt,we,function(Qe){Qe&&(Qe.code==="EMFILE"||Qe.code==="ENFILE")?lu([it,[Be,rt,we,Oe],Qe,st||Date.now(),Date.now()]):typeof Oe=="function"&&Oe.apply(this,arguments)})}}var l=e.readdir;e.readdir=f;var d=/^v[0-5]\./;function f(q,Z,ee){typeof Z=="function"&&(ee=Z,Z=null);var _e=d.test(process.version)?function(rt,we,Oe,st){return l(rt,it(rt,we,Oe,st))}:function(rt,we,Oe,st){return l(rt,we,it(rt,we,Oe,st))};return _e(q,Z,ee);function it(Be,rt,we,Oe){return function(st,Qe){st&&(st.code==="EMFILE"||st.code==="ENFILE")?lu([_e,[Be,rt,we],st,Oe||Date.now(),Date.now()]):(Qe&&Qe.sort&&Qe.sort(),typeof we=="function"&&we.call(this,st,Qe))}}}if(process.version.substr(0,4)==="v0.8"){var m=Zbe(e);I=m.ReadStream,O=m.WriteStream}var h=e.ReadStream;h&&(I.prototype=Object.create(h.prototype),I.prototype.open=A);var _=e.WriteStream;_&&(O.prototype=Object.create(_.prototype),O.prototype.open=G),Object.defineProperty(e,"ReadStream",{get:function(){return I},set:function(q){I=q},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return O},set:function(q){O=q},enumerable:!0,configurable:!0});var E=I;Object.defineProperty(e,"FileReadStream",{get:function(){return E},set:function(q){E=q},enumerable:!0,configurable:!0});var T=O;Object.defineProperty(e,"FileWriteStream",{get:function(){return T},set:function(q){T=q},enumerable:!0,configurable:!0});function I(q,Z){return this instanceof I?(h.apply(this,arguments),this):I.apply(Object.create(I.prototype),arguments)}function A(){var q=this;ue(q.path,q.flags,q.mode,function(Z,ee){Z?(q.autoClose&&q.destroy(),q.emit("error",Z)):(q.fd=ee,q.emit("open",ee),q.read())})}function O(q,Z){return this instanceof O?(_.apply(this,arguments),this):O.apply(Object.create(O.prototype),arguments)}function G(){var q=this;ue(q.path,q.flags,q.mode,function(Z,ee){Z?(q.destroy(),q.emit("error",Z)):(q.fd=ee,q.emit("open",ee))})}function z(q,Z){return new e.ReadStream(q,Z)}function Q(q,Z){return new e.WriteStream(q,Z)}var be=e.open;e.open=ue;function ue(q,Z,ee,_e){return typeof ee=="function"&&(_e=ee,ee=null),it(q,Z,ee,_e);function it(Be,rt,we,Oe,st){return be(Be,rt,we,function(Qe,An){Qe&&(Qe.code==="EMFILE"||Qe.code==="ENFILE")?lu([it,[Be,rt,we,Oe],Qe,st||Date.now(),Date.now()]):typeof Oe=="function"&&Oe.apply(this,arguments)})}}return e}function lu(e){xa("ENQUEUE",e[0].name,e[1]),vt[nr].push(e),pC()}var wE;function CV(){for(var e=Date.now(),t=0;t<vt[nr].length;++t)vt[nr][t].length>2&&(vt[nr][t][3]=e,vt[nr][t][4]=e);pC()}function pC(){if(clearTimeout(wE),wE=void 0,vt[nr].length!==0){var e=vt[nr].shift(),t=e[0],r=e[1],n=e[2],o=e[3],i=e[4];if(o===void 0)xa("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-o>=6e4){xa("TIMEOUT",t.name,r);var s=r.pop();typeof s=="function"&&s.call(null,n)}else{var a=Date.now()-i,c=Math.max(i-o,1),l=Math.min(c*1.2,100);a>=l?(xa("RETRY",t.name,r),t.apply(null,r.concat([o]))):vt[nr].push(e)}wE===void 0&&(wE=setTimeout(pC,0))}}});var tf=b(Is=>{"use strict";var RV=qr().fromCallback,Dr=_r(),rxe=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof Dr[e]=="function");Object.keys(Dr).forEach(e=>{e!=="promises"&&(Is[e]=Dr[e])});rxe.forEach(e=>{Is[e]=RV(Dr[e])});Is.exists=function(e,t){return typeof t=="function"?Dr.exists(e,t):new Promise(r=>Dr.exists(e,r))};Is.read=function(e,t,r,n,o,i){return typeof i=="function"?Dr.read(e,t,r,n,o,i):new Promise((s,a)=>{Dr.read(e,t,r,n,o,(c,l,d)=>{if(c)return a(c);s({bytesRead:l,buffer:d})})})};Is.write=function(e,t,...r){return typeof r[r.length-1]=="function"?Dr.write(e,t,...r):new Promise((n,o)=>{Dr.write(e,t,...r,(i,s,a)=>{if(i)return o(i);n({bytesWritten:s,buffer:a})})})};typeof Dr.writev=="function"&&(Is.writev=function(e,t,...r){return typeof r[r.length-1]=="function"?Dr.writev(e,t,...r):new Promise((n,o)=>{Dr.writev(e,t,...r,(i,s,a)=>{if(i)return o(i);n({bytesWritten:s,buffers:a})})})});typeof Dr.realpath.native=="function"&&(Is.realpath.native=RV(Dr.realpath.native))});var hC=b((Jqe,PV)=>{PV.exports=e=>{let t=process.versions.node.split(".").map(r=>parseInt(r,10));return e=e.split(".").map(r=>parseInt(r,10)),t[0]>e[0]||t[0]===e[0]&&(t[1]>e[1]||t[1]===e[1]&&t[2]>=e[2])}});var LV=b((Zqe,yC)=>{"use strict";var du=tf(),Ei=require("path"),nxe=hC(),OV=nxe("10.12.0"),NV=e=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(Ei.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}},$V=e=>{let t={mode:511};return typeof e=="number"&&(e={mode:e}),{...t,...e}},MV=e=>{let t=new Error(`operation not permitted, mkdir '${e}'`);return t.code="EPERM",t.errno=-4048,t.path=e,t.syscall="mkdir",t};yC.exports.makeDir=async(e,t)=>{if(NV(e),t=$V(t),OV){let n=Ei.resolve(e);return du.mkdir(n,{mode:t.mode,recursive:!0})}let r=async n=>{try{await du.mkdir(n,t.mode)}catch(o){if(o.code==="EPERM")throw o;if(o.code==="ENOENT"){if(Ei.dirname(n)===n)throw MV(n);if(o.message.includes("null bytes"))throw o;return await r(Ei.dirname(n)),r(n)}try{if(!(await du.stat(n)).isDirectory())throw new Error("The path is not a directory")}catch{throw o}}};return r(Ei.resolve(e))};yC.exports.makeDirSync=(e,t)=>{if(NV(e),t=$V(t),OV){let n=Ei.resolve(e);return du.mkdirSync(n,{mode:t.mode,recursive:!0})}let r=n=>{try{du.mkdirSync(n,t.mode)}catch(o){if(o.code==="EPERM")throw o;if(o.code==="ENOENT"){if(Ei.dirname(n)===n)throw MV(n);if(o.message.includes("null bytes"))throw o;return r(Ei.dirname(n)),r(n)}try{if(!du.statSync(n).isDirectory())throw new Error("The path is not a directory")}catch{throw o}}};return r(Ei.resolve(e))}});var zn=b((eGe,kV)=>{"use strict";var oxe=qr().fromPromise,{makeDir:ixe,makeDirSync:gC}=LV(),_C=oxe(ixe);kV.exports={mkdirs:_C,mkdirsSync:gC,mkdirp:_C,mkdirpSync:gC,ensureDir:_C,ensureDirSync:gC}});var EC=b((tGe,FV)=>{"use strict";var fu=_r();function sxe(e,t,r,n){fu.open(e,"r+",(o,i)=>{if(o)return n(o);fu.futimes(i,t,r,s=>{fu.close(i,a=>{n&&n(s||a)})})})}function axe(e,t,r){let n=fu.openSync(e,"r+");return fu.futimesSync(n,t,r),fu.closeSync(n)}FV.exports={utimesMillis:sxe,utimesMillisSync:axe}});var rf=b((rGe,qV)=>{"use strict";var pu=tf(),Gr=require("path"),cxe=require("util"),uxe=hC(),IE=uxe("10.5.0"),BV=e=>IE?pu.stat(e,{bigint:!0}):pu.stat(e),SC=e=>IE?pu.statSync(e,{bigint:!0}):pu.statSync(e);function lxe(e,t){return Promise.all([BV(e),BV(t).catch(r=>{if(r.code==="ENOENT")return null;throw r})]).then(([r,n])=>({srcStat:r,destStat:n}))}function dxe(e,t){let r,n=SC(e);try{r=SC(t)}catch(o){if(o.code==="ENOENT")return{srcStat:n,destStat:null};throw o}return{srcStat:n,destStat:r}}function fxe(e,t,r,n){cxe.callbackify(lxe)(e,t,(o,i)=>{if(o)return n(o);let{srcStat:s,destStat:a}=i;return a&&CE(s,a)?n(new Error("Source and destination must not be the same.")):s.isDirectory()&&bC(e,t)?n(new Error(DE(e,t,r))):n(null,{srcStat:s,destStat:a})})}function pxe(e,t,r){let{srcStat:n,destStat:o}=dxe(e,t);if(o&&CE(n,o))throw new Error("Source and destination must not be the same.");if(n.isDirectory()&&bC(e,t))throw new Error(DE(e,t,r));return{srcStat:n,destStat:o}}function UV(e,t,r,n,o){let i=Gr.resolve(Gr.dirname(e)),s=Gr.resolve(Gr.dirname(r));if(s===i||s===Gr.parse(s).root)return o();let a=(c,l)=>c?c.code==="ENOENT"?o():o(c):CE(t,l)?o(new Error(DE(e,r,n))):UV(e,t,s,n,o);IE?pu.stat(s,{bigint:!0},a):pu.stat(s,a)}function jV(e,t,r,n){let o=Gr.resolve(Gr.dirname(e)),i=Gr.resolve(Gr.dirname(r));if(i===o||i===Gr.parse(i).root)return;let s;try{s=SC(i)}catch(a){if(a.code==="ENOENT")return;throw a}if(CE(t,s))throw new Error(DE(e,r,n));return jV(e,t,i,n)}function CE(e,t){return!!(t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev&&(IE||t.ino<Number.MAX_SAFE_INTEGER||t.size===e.size&&t.mode===e.mode&&t.nlink===e.nlink&&t.atimeMs===e.atimeMs&&t.mtimeMs===e.mtimeMs&&t.ctimeMs===e.ctimeMs&&t.birthtimeMs===e.birthtimeMs))}function bC(e,t){let r=Gr.resolve(e).split(Gr.sep).filter(o=>o),n=Gr.resolve(t).split(Gr.sep).filter(o=>o);return r.reduce((o,i,s)=>o&&n[s]===i,!0)}function DE(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}qV.exports={checkPaths:fxe,checkPathsSync:pxe,checkParentPaths:UV,checkParentPathsSync:jV,isSrcSubdir:bC}});var zV=b((nGe,WV)=>{"use strict";var Er=_r(),nf=require("path"),mxe=zn().mkdirsSync,hxe=EC().utimesMillisSync,of=rf();function yxe(e,t,r){typeof r=="function"&&(r={filter:r}),r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
57
74
 
58
- see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:i}=_c.checkPathsSync(e,t,"copy");return _c.checkParentPathsSync(e,n,t,"copy"),j0e(i,e,t,r)}function j0e(e,t,r,n){if(n.filter&&!n.filter(t,r))return;let i=yc.dirname(r);return At.existsSync(i)||k0e(i),U2(e,t,r,n)}function U2(e,t,r,n){if(!(n.filter&&!n.filter(t,r)))return q0e(e,t,r,n)}function q0e(e,t,r,n){let o=(n.dereference?At.statSync:At.lstatSync)(t);if(o.isDirectory())return W0e(o,e,t,r,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return U0e(o,e,t,r,n);if(o.isSymbolicLink())return Y0e(e,t,r,n)}function U0e(e,t,r,n,i){return t?G0e(e,r,n,i):G2(e,r,n,i)}function G0e(e,t,r,n){if(n.overwrite)return At.unlinkSync(r),G2(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function G2(e,t,r,n){return At.copyFileSync(t,r),n.preserveTimestamps&&$0e(e.mode,t,r),Bg(r,e.mode)}function $0e(e,t,r){return H0e(e)&&V0e(r,e),z0e(t,r)}function H0e(e){return(e&128)===0}function V0e(e,t){return Bg(e,t|128)}function Bg(e,t){return At.chmodSync(e,t)}function z0e(e,t){let r=At.statSync(e);return F0e(t,r.atime,r.mtime)}function W0e(e,t,r,n,i){if(!t)return K0e(e.mode,r,n,i);if(t&&!t.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return $2(r,n,i)}function K0e(e,t,r,n){return At.mkdirSync(r),$2(t,r,n),Bg(r,e)}function $2(e,t,r){At.readdirSync(e).forEach(n=>J0e(n,e,t,r))}function J0e(e,t,r,n){let i=yc.join(t,e),o=yc.join(r,e),{destStat:s}=_c.checkPathsSync(i,o,"copy");return U2(s,i,o,n)}function Y0e(e,t,r,n){let i=At.readlinkSync(t);if(n.dereference&&(i=yc.resolve(process.cwd(),i)),e){let o;try{o=At.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return At.symlinkSync(i,r);throw s}if(n.dereference&&(o=yc.resolve(process.cwd(),o)),_c.isSrcSubdir(i,o))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`);if(At.statSync(r).isDirectory()&&_c.isSrcSubdir(o,i))throw new Error(`Cannot overwrite '${o}' with '${i}'.`);return X0e(i,r)}else return At.symlinkSync(i,r)}function X0e(e,t){return At.unlinkSync(t),At.symlinkSync(e,t)}H2.exports=B0e});var jg=y((dMe,z2)=>{"use strict";z2.exports={copySync:V2()}});var Pi=y((pMe,K2)=>{"use strict";var Q0e=$t().fromPromise,W2=mc();function Z0e(e){return W2.access(e).then(()=>!0).catch(()=>!1)}K2.exports={pathExists:Q0e(Z0e),pathExistsSync:W2.existsSync}});var nG=y((fMe,rG)=>{"use strict";var Vt=xt(),vc=require("path"),eEe=kr().mkdirs,tEe=Pi().pathExists,rEe=Lg().utimesMillis,gc=hc();function nEe(e,t,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
75
+ see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:n,destStat:o}=of.checkPathsSync(e,t,"copy");return of.checkParentPathsSync(e,n,t,"copy"),gxe(o,e,t,r)}function gxe(e,t,r,n){if(n.filter&&!n.filter(t,r))return;let o=nf.dirname(r);return Er.existsSync(o)||mxe(o),GV(e,t,r,n)}function GV(e,t,r,n){if(!(n.filter&&!n.filter(t,r)))return _xe(e,t,r,n)}function _xe(e,t,r,n){let i=(n.dereference?Er.statSync:Er.lstatSync)(t);if(i.isDirectory())return wxe(i,e,t,r,n);if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return Exe(i,e,t,r,n);if(i.isSymbolicLink())return Cxe(e,t,r,n)}function Exe(e,t,r,n,o){return t?Sxe(e,r,n,o):HV(e,r,n,o)}function Sxe(e,t,r,n){if(n.overwrite)return Er.unlinkSync(r),HV(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}function HV(e,t,r,n){return Er.copyFileSync(t,r),n.preserveTimestamps&&bxe(e.mode,t,r),xC(r,e.mode)}function bxe(e,t,r){return xxe(e)&&vxe(r,e),Txe(t,r)}function xxe(e){return(e&128)===0}function vxe(e,t){return xC(e,t|128)}function xC(e,t){return Er.chmodSync(e,t)}function Txe(e,t){let r=Er.statSync(e);return hxe(t,r.atime,r.mtime)}function wxe(e,t,r,n,o){if(!t)return Axe(e.mode,r,n,o);if(t&&!t.isDirectory())throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`);return VV(r,n,o)}function Axe(e,t,r,n){return Er.mkdirSync(r),VV(t,r,n),xC(r,e)}function VV(e,t,r){Er.readdirSync(e).forEach(n=>Ixe(n,e,t,r))}function Ixe(e,t,r,n){let o=nf.join(t,e),i=nf.join(r,e),{destStat:s}=of.checkPathsSync(o,i,"copy");return GV(s,o,i,n)}function Cxe(e,t,r,n){let o=Er.readlinkSync(t);if(n.dereference&&(o=nf.resolve(process.cwd(),o)),e){let i;try{i=Er.readlinkSync(r)}catch(s){if(s.code==="EINVAL"||s.code==="UNKNOWN")return Er.symlinkSync(o,r);throw s}if(n.dereference&&(i=nf.resolve(process.cwd(),i)),of.isSrcSubdir(o,i))throw new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`);if(Er.statSync(r).isDirectory()&&of.isSrcSubdir(i,o))throw new Error(`Cannot overwrite '${i}' with '${o}'.`);return Dxe(o,r)}else return Er.symlinkSync(o,r)}function Dxe(e,t){return Er.unlinkSync(t),Er.symlinkSync(e,t)}WV.exports=yxe});var vC=b((oGe,KV)=>{"use strict";KV.exports={copySync:zV()}});var Cs=b((iGe,QV)=>{"use strict";var Rxe=qr().fromPromise,YV=tf();function Pxe(e){return YV.access(e).then(()=>!0).catch(()=>!1)}QV.exports={pathExists:Rxe(Pxe),pathExistsSync:YV.existsSync}});var i8=b((sGe,o8)=>{"use strict";var Hr=_r(),sf=require("path"),Oxe=zn().mkdirs,Nxe=Cs().pathExists,$xe=EC().utimesMillis,af=rf();function Mxe(e,t,r,n){typeof r=="function"&&!n?(n=r,r={}):typeof r=="function"&&(r={filter:r}),n=n||function(){},r=r||{},r.clobber="clobber"in r?!!r.clobber:!0,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
59
76
 
60
- see https://github.com/jprichardson/node-fs-extra/issues/269`),gc.checkPaths(e,t,"copy",(i,o)=>{if(i)return n(i);let{srcStat:s,destStat:a}=o;gc.checkParentPaths(e,s,t,"copy",c=>c?n(c):r.filter?Q2(J2,a,e,t,r,n):J2(a,e,t,r,n))})}function J2(e,t,r,n,i){let o=vc.dirname(r);tEe(o,(s,a)=>{if(s)return i(s);if(a)return qg(e,t,r,n,i);eEe(o,c=>c?i(c):qg(e,t,r,n,i))})}function Q2(e,t,r,n,i,o){Promise.resolve(i.filter(r,n)).then(s=>s?e(t,r,n,i,o):o(),s=>o(s))}function qg(e,t,r,n,i){return n.filter?Q2(Y2,e,t,r,n,i):Y2(e,t,r,n,i)}function Y2(e,t,r,n,i){(n.dereference?Vt.stat:Vt.lstat)(t,(s,a)=>{if(s)return i(s);if(a.isDirectory())return lEe(a,e,t,r,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return iEe(a,e,t,r,n,i);if(a.isSymbolicLink())return fEe(e,t,r,n,i)})}function iEe(e,t,r,n,i,o){return t?oEe(e,r,n,i,o):Z2(e,r,n,i,o)}function oEe(e,t,r,n,i){if(n.overwrite)Vt.unlink(r,o=>o?i(o):Z2(e,t,r,n,i));else return n.errorOnExist?i(new Error(`'${r}' already exists`)):i()}function Z2(e,t,r,n,i){Vt.copyFile(t,r,o=>o?i(o):n.preserveTimestamps?sEe(e.mode,t,r,i):vf(r,e.mode,i))}function sEe(e,t,r,n){return aEe(e)?cEe(r,e,i=>i?n(i):X2(e,t,r,n)):X2(e,t,r,n)}function aEe(e){return(e&128)===0}function cEe(e,t,r){return vf(e,t|128,r)}function X2(e,t,r,n){uEe(t,r,i=>i?n(i):vf(r,e,n))}function vf(e,t,r){return Vt.chmod(e,t,r)}function uEe(e,t,r){Vt.stat(e,(n,i)=>n?r(n):rEe(t,i.atime,i.mtime,r))}function lEe(e,t,r,n,i,o){return t?t&&!t.isDirectory()?o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):eG(r,n,i,o):dEe(e.mode,r,n,i,o)}function dEe(e,t,r,n,i){Vt.mkdir(r,o=>{if(o)return i(o);eG(t,r,n,s=>s?i(s):vf(r,e,i))})}function eG(e,t,r,n){Vt.readdir(e,(i,o)=>i?n(i):tG(o,e,t,r,n))}function tG(e,t,r,n,i){let o=e.pop();return o?pEe(e,o,t,r,n,i):i()}function pEe(e,t,r,n,i,o){let s=vc.join(r,t),a=vc.join(n,t);gc.checkPaths(s,a,"copy",(c,u)=>{if(c)return o(c);let{destStat:d}=u;qg(d,s,a,i,p=>p?o(p):tG(e,r,n,i,o))})}function fEe(e,t,r,n,i){Vt.readlink(t,(o,s)=>{if(o)return i(o);if(n.dereference&&(s=vc.resolve(process.cwd(),s)),e)Vt.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?Vt.symlink(s,r,i):i(a):(n.dereference&&(c=vc.resolve(process.cwd(),c)),gc.isSrcSubdir(s,c)?i(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${c}'.`)):e.isDirectory()&&gc.isSrcSubdir(c,s)?i(new Error(`Cannot overwrite '${c}' with '${s}'.`)):mEe(s,r,i)));else return Vt.symlink(s,r,i)})}function mEe(e,t,r){Vt.unlink(t,n=>n?r(n):Vt.symlink(e,t,r))}rG.exports=nEe});var Ug=y((mMe,iG)=>{"use strict";var hEe=$t().fromCallback;iG.exports={copy:hEe(nG())}});var fG=y((hMe,pG)=>{"use strict";var oG=xt(),uG=require("path"),Ie=require("assert"),Ec=process.platform==="win32";function lG(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{e[r]=e[r]||oG[r],r=r+"Sync",e[r]=e[r]||oG[r]}),e.maxBusyTries=e.maxBusyTries||3}function Gg(e,t,r){let n=0;typeof t=="function"&&(r=t,t={}),Ie(e,"rimraf: missing path"),Ie.strictEqual(typeof e,"string","rimraf: path should be a string"),Ie.strictEqual(typeof r,"function","rimraf: callback function required"),Ie(t,"rimraf: invalid options argument provided"),Ie.strictEqual(typeof t,"object","rimraf: options should be object"),lG(t),sG(e,t,function i(o){if(o){if((o.code==="EBUSY"||o.code==="ENOTEMPTY"||o.code==="EPERM")&&n<t.maxBusyTries){n++;let s=n*100;return setTimeout(()=>sG(e,t,i),s)}o.code==="ENOENT"&&(o=null)}r(o)})}function sG(e,t,r){Ie(e),Ie(t),Ie(typeof r=="function"),t.lstat(e,(n,i)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&Ec)return aG(e,t,n,r);if(i&&i.isDirectory())return gf(e,t,n,r);t.unlink(e,o=>{if(o){if(o.code==="ENOENT")return r(null);if(o.code==="EPERM")return Ec?aG(e,t,o,r):gf(e,t,o,r);if(o.code==="EISDIR")return gf(e,t,o,r)}return r(o)})})}function aG(e,t,r,n){Ie(e),Ie(t),Ie(typeof n=="function"),t.chmod(e,438,i=>{i?n(i.code==="ENOENT"?null:r):t.stat(e,(o,s)=>{o?n(o.code==="ENOENT"?null:r):s.isDirectory()?gf(e,t,r,n):t.unlink(e,n)})})}function cG(e,t,r){let n;Ie(e),Ie(t);try{t.chmodSync(e,438)}catch(i){if(i.code==="ENOENT")return;throw r}try{n=t.statSync(e)}catch(i){if(i.code==="ENOENT")return;throw r}n.isDirectory()?Ef(e,t,r):t.unlinkSync(e)}function gf(e,t,r,n){Ie(e),Ie(t),Ie(typeof n=="function"),t.rmdir(e,i=>{i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?yEe(e,t,n):i&&i.code==="ENOTDIR"?n(r):n(i)})}function yEe(e,t,r){Ie(e),Ie(t),Ie(typeof r=="function"),t.readdir(e,(n,i)=>{if(n)return r(n);let o=i.length,s;if(o===0)return t.rmdir(e,r);i.forEach(a=>{Gg(uG.join(e,a),t,c=>{if(!s){if(c)return r(s=c);--o===0&&t.rmdir(e,r)}})})})}function dG(e,t){let r;t=t||{},lG(t),Ie(e,"rimraf: missing path"),Ie.strictEqual(typeof e,"string","rimraf: path should be a string"),Ie(t,"rimraf: missing options"),Ie.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e)}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&Ec&&cG(e,t,n)}try{r&&r.isDirectory()?Ef(e,t,null):t.unlinkSync(e)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return Ec?cG(e,t,n):Ef(e,t,n);if(n.code!=="EISDIR")throw n;Ef(e,t,n)}}function Ef(e,t,r){Ie(e),Ie(t);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")_Ee(e,t);else if(n.code!=="ENOENT")throw n}}function _Ee(e,t){if(Ie(e),Ie(t),t.readdirSync(e).forEach(r=>dG(uG.join(e,r),t)),Ec){let r=Date.now();do try{return t.rmdirSync(e,t)}catch{}while(Date.now()-r<500)}else return t.rmdirSync(e,t)}pG.exports=Gg;Gg.sync=dG});var Sc=y((yMe,hG)=>{"use strict";var vEe=$t().fromCallback,mG=fG();hG.exports={remove:vEe(mG),removeSync:mG.sync}});var CG=y((_Me,bG)=>{"use strict";var gEe=$t().fromCallback,vG=xt(),gG=require("path"),EG=kr(),SG=Sc(),yG=gEe(function(t,r){r=r||function(){},vG.readdir(t,(n,i)=>{if(n)return EG.mkdirs(t,r);i=i.map(s=>gG.join(t,s)),o();function o(){let s=i.pop();if(!s)return r();SG.remove(s,a=>{if(a)return r(a);o()})}})});function _G(e){let t;try{t=vG.readdirSync(e)}catch{return EG.mkdirsSync(e)}t.forEach(r=>{r=gG.join(e,r),SG.removeSync(r)})}bG.exports={emptyDirSync:_G,emptydirSync:_G,emptyDir:yG,emptydir:yG}});var TG=y((vMe,AG)=>{"use strict";var EEe=$t().fromCallback,wG=require("path"),Ii=xt(),xG=kr();function SEe(e,t){function r(){Ii.writeFile(e,"",n=>{if(n)return t(n);t()})}Ii.stat(e,(n,i)=>{if(!n&&i.isFile())return t();let o=wG.dirname(e);Ii.stat(o,(s,a)=>{if(s)return s.code==="ENOENT"?xG.mkdirs(o,c=>{if(c)return t(c);r()}):t(s);a.isDirectory()?r():Ii.readdir(o,c=>{if(c)return t(c)})})})}function bEe(e){let t;try{t=Ii.statSync(e)}catch{}if(t&&t.isFile())return;let r=wG.dirname(e);try{Ii.statSync(r).isDirectory()||Ii.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")xG.mkdirsSync(r);else throw n}Ii.writeFileSync(e,"")}AG.exports={createFile:EEe(SEe),createFileSync:bEe}});var DG=y((gMe,RG)=>{"use strict";var CEe=$t().fromCallback,IG=require("path"),lo=xt(),OG=kr(),PG=Pi().pathExists;function wEe(e,t,r){function n(i,o){lo.link(i,o,s=>{if(s)return r(s);r(null)})}PG(t,(i,o)=>{if(i)return r(i);if(o)return r(null);lo.lstat(e,s=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),r(s);let a=IG.dirname(t);PG(a,(c,u)=>{if(c)return r(c);if(u)return n(e,t);OG.mkdirs(a,d=>{if(d)return r(d);n(e,t)})})})})}function xEe(e,t){if(lo.existsSync(t))return;try{lo.lstatSync(e)}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=IG.dirname(t);return lo.existsSync(n)||OG.mkdirsSync(n),lo.linkSync(e,t)}RG.exports={createLink:CEe(wEe),createLinkSync:xEe}});var MG=y((EMe,NG)=>{"use strict";var Oi=require("path"),bc=xt(),AEe=Pi().pathExists;function TEe(e,t,r){if(Oi.isAbsolute(e))return bc.lstat(e,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:e,toDst:e}));{let n=Oi.dirname(t),i=Oi.join(n,e);return AEe(i,(o,s)=>o?r(o):s?r(null,{toCwd:i,toDst:e}):bc.lstat(e,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:e,toDst:Oi.relative(n,e)})))}}function PEe(e,t){let r;if(Oi.isAbsolute(e)){if(r=bc.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{let n=Oi.dirname(t),i=Oi.join(n,e);if(r=bc.existsSync(i),r)return{toCwd:i,toDst:e};if(r=bc.existsSync(e),!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:Oi.relative(n,e)}}}NG.exports={symlinkPaths:TEe,symlinkPathsSync:PEe}});var FG=y((SMe,kG)=>{"use strict";var LG=xt();function IEe(e,t,r){if(r=typeof t=="function"?t:r,t=typeof t=="function"?!1:t,t)return r(null,t);LG.lstat(e,(n,i)=>{if(n)return r(null,"file");t=i&&i.isDirectory()?"dir":"file",r(null,t)})}function OEe(e,t){let r;if(t)return t;try{r=LG.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}kG.exports={symlinkType:IEe,symlinkTypeSync:OEe}});var HG=y((bMe,$G)=>{"use strict";var REe=$t().fromCallback,jG=require("path"),Ls=xt(),qG=kr(),DEe=qG.mkdirs,NEe=qG.mkdirsSync,UG=MG(),MEe=UG.symlinkPaths,LEe=UG.symlinkPathsSync,GG=FG(),kEe=GG.symlinkType,FEe=GG.symlinkTypeSync,BG=Pi().pathExists;function BEe(e,t,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,BG(t,(i,o)=>{if(i)return n(i);if(o)return n(null);MEe(e,t,(s,a)=>{if(s)return n(s);e=a.toDst,kEe(a.toCwd,r,(c,u)=>{if(c)return n(c);let d=jG.dirname(t);BG(d,(p,m)=>{if(p)return n(p);if(m)return Ls.symlink(e,t,u,n);DEe(d,h=>{if(h)return n(h);Ls.symlink(e,t,u,n)})})})})})}function jEe(e,t,r){if(Ls.existsSync(t))return;let i=LEe(e,t);e=i.toDst,r=FEe(i.toCwd,r);let o=jG.dirname(t);return Ls.existsSync(o)||NEe(o),Ls.symlinkSync(e,t,r)}$G.exports={createSymlink:REe(BEe),createSymlinkSync:jEe}});var zG=y((CMe,VG)=>{"use strict";var Sf=TG(),bf=DG(),Cf=HG();VG.exports={createFile:Sf.createFile,createFileSync:Sf.createFileSync,ensureFile:Sf.createFile,ensureFileSync:Sf.createFileSync,createLink:bf.createLink,createLinkSync:bf.createLinkSync,ensureLink:bf.createLink,ensureLinkSync:bf.createLinkSync,createSymlink:Cf.createSymlink,createSymlinkSync:Cf.createSymlinkSync,ensureSymlink:Cf.createSymlink,ensureSymlinkSync:Cf.createSymlinkSync}});var wf=y((wMe,WG)=>{function qEe(e,{EOL:t=`
61
- `,finalEOL:r=!0,replacer:n=null,spaces:i}={}){let o=r?t:"";return JSON.stringify(e,n,i).replace(/\n/g,t)+o}function UEe(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}WG.exports={stringify:qEe,stripBom:UEe}});var XG=y((xMe,YG)=>{var ks;try{ks=xt()}catch{ks=require("fs")}var xf=$t(),{stringify:KG,stripBom:JG}=wf();async function GEe(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||ks,n="throws"in t?t.throws:!0,i=await xf.fromCallback(r.readFile)(e,t);i=JG(i);let o;try{o=JSON.parse(i,t?t.reviver:null)}catch(s){if(n)throw s.message=`${e}: ${s.message}`,s;return null}return o}var $Ee=xf.fromPromise(GEe);function HEe(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||ks,n="throws"in t?t.throws:!0;try{let i=r.readFileSync(e,t);return i=JG(i),JSON.parse(i,t.reviver)}catch(i){if(n)throw i.message=`${e}: ${i.message}`,i;return null}}async function VEe(e,t,r={}){let n=r.fs||ks,i=KG(t,r);await xf.fromCallback(n.writeFile)(e,i,r)}var zEe=xf.fromPromise(VEe);function WEe(e,t,r={}){let n=r.fs||ks,i=KG(t,r);return n.writeFileSync(e,i,r)}var KEe={readFile:$Ee,readFileSync:HEe,writeFile:zEe,writeFileSync:WEe};YG.exports=KEe});var ZG=y((AMe,QG)=>{"use strict";var Af=XG();QG.exports={readJson:Af.readFile,readJsonSync:Af.readFileSync,writeJson:Af.writeFile,writeJsonSync:Af.writeFileSync}});var Tf=y((TMe,r$)=>{"use strict";var JEe=$t().fromCallback,Cc=xt(),e$=require("path"),t$=kr(),YEe=Pi().pathExists;function XEe(e,t,r,n){typeof r=="function"&&(n=r,r="utf8");let i=e$.dirname(e);YEe(i,(o,s)=>{if(o)return n(o);if(s)return Cc.writeFile(e,t,r,n);t$.mkdirs(i,a=>{if(a)return n(a);Cc.writeFile(e,t,r,n)})})}function QEe(e,...t){let r=e$.dirname(e);if(Cc.existsSync(r))return Cc.writeFileSync(e,...t);t$.mkdirsSync(r),Cc.writeFileSync(e,...t)}r$.exports={outputFile:JEe(XEe),outputFileSync:QEe}});var i$=y((PMe,n$)=>{"use strict";var{stringify:ZEe}=wf(),{outputFile:eSe}=Tf();async function tSe(e,t,r={}){let n=ZEe(t,r);await eSe(e,n,r)}n$.exports=tSe});var s$=y((IMe,o$)=>{"use strict";var{stringify:rSe}=wf(),{outputFileSync:nSe}=Tf();function iSe(e,t,r){let n=rSe(t,r);nSe(e,n,r)}o$.exports=iSe});var c$=y((OMe,a$)=>{"use strict";var oSe=$t().fromPromise,Lt=ZG();Lt.outputJson=oSe(i$());Lt.outputJsonSync=s$();Lt.outputJSON=Lt.outputJson;Lt.outputJSONSync=Lt.outputJsonSync;Lt.writeJSON=Lt.writeJson;Lt.writeJSONSync=Lt.writeJsonSync;Lt.readJSON=Lt.readJson;Lt.readJSONSync=Lt.readJsonSync;a$.exports=Lt});var m$=y((RMe,f$)=>{"use strict";var d$=xt(),sSe=require("path"),aSe=jg().copySync,p$=Sc().removeSync,cSe=kr().mkdirpSync,u$=hc();function uSe(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:i}=u$.checkPathsSync(e,t,"move");return u$.checkParentPathsSync(e,i,t,"move"),cSe(sSe.dirname(t)),lSe(e,t,n)}function lSe(e,t,r){if(r)return p$(t),l$(e,t,r);if(d$.existsSync(t))throw new Error("dest already exists.");return l$(e,t,r)}function l$(e,t,r){try{d$.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return dSe(e,t,r)}}function dSe(e,t,r){return aSe(e,t,{overwrite:r,errorOnExist:!0}),p$(e)}f$.exports=uSe});var y$=y((DMe,h$)=>{"use strict";h$.exports={moveSync:m$()}});var S$=y((NMe,E$)=>{"use strict";var pSe=xt(),fSe=require("path"),mSe=Ug().copy,g$=Sc().remove,hSe=kr().mkdirp,ySe=Pi().pathExists,_$=hc();function _Se(e,t,r,n){typeof r=="function"&&(n=r,r={});let i=r.overwrite||r.clobber||!1;_$.checkPaths(e,t,"move",(o,s)=>{if(o)return n(o);let{srcStat:a}=s;_$.checkParentPaths(e,a,t,"move",c=>{if(c)return n(c);hSe(fSe.dirname(t),u=>u?n(u):vSe(e,t,i,n))})})}function vSe(e,t,r,n){if(r)return g$(t,i=>i?n(i):v$(e,t,r,n));ySe(t,(i,o)=>i?n(i):o?n(new Error("dest already exists.")):v$(e,t,r,n))}function v$(e,t,r,n){pSe.rename(e,t,i=>i?i.code!=="EXDEV"?n(i):gSe(e,t,r,n):n())}function gSe(e,t,r,n){mSe(e,t,{overwrite:r,errorOnExist:!0},o=>o?n(o):g$(e,n))}E$.exports=_Se});var C$=y((MMe,b$)=>{"use strict";var ESe=$t().fromCallback;b$.exports={move:ESe(S$())}});var Hg=y((LMe,$g)=>{"use strict";$g.exports={...mc(),...jg(),...Ug(),...CG(),...zG(),...c$(),...kr(),...y$(),...C$(),...Tf(),...Pi(),...Sc()};var w$=require("fs");Object.getOwnPropertyDescriptor(w$,"promises")&&Object.defineProperty($g.exports,"promises",{get(){return w$.promises}})});var O$=y((kMe,I$)=>{I$.exports=wc;wc.default=wc;wc.stable=T$;wc.stableStringify=T$;var Pf="[...]",x$="[Circular]",fo=[],po=[];function A$(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function wc(e,t,r,n){typeof n>"u"&&(n=A$()),Vg(e,"",0,[],void 0,0,n);var i;try{po.length===0?i=JSON.stringify(e,t,r):i=JSON.stringify(e,P$(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;fo.length!==0;){var o=fo.pop();o.length===4?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}}return i}function Fs(e,t,r,n){var i=Object.getOwnPropertyDescriptor(n,r);i.get!==void 0?i.configurable?(Object.defineProperty(n,r,{value:e}),fo.push([n,r,t,i])):po.push([t,r,e]):(n[r]=e,fo.push([n,r,t]))}function Vg(e,t,r,n,i,o,s){o+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<n.length;a++)if(n[a]===e){Fs(x$,e,t,i);return}if(typeof s.depthLimit<"u"&&o>s.depthLimit){Fs(Pf,e,t,i);return}if(typeof s.edgesLimit<"u"&&r+1>s.edgesLimit){Fs(Pf,e,t,i);return}if(n.push(e),Array.isArray(e))for(a=0;a<e.length;a++)Vg(e[a],a,a,n,e,o,s);else{var c=Object.keys(e);for(a=0;a<c.length;a++){var u=c[a];Vg(e[u],u,a,n,e,o,s)}}n.pop()}}function SSe(e,t){return e<t?-1:e>t?1:0}function T$(e,t,r,n){typeof n>"u"&&(n=A$());var i=zg(e,"",0,[],void 0,0,n)||e,o;try{po.length===0?o=JSON.stringify(i,t,r):o=JSON.stringify(i,P$(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;fo.length!==0;){var s=fo.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return o}function zg(e,t,r,n,i,o,s){o+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<n.length;a++)if(n[a]===e){Fs(x$,e,t,i);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof s.depthLimit<"u"&&o>s.depthLimit){Fs(Pf,e,t,i);return}if(typeof s.edgesLimit<"u"&&r+1>s.edgesLimit){Fs(Pf,e,t,i);return}if(n.push(e),Array.isArray(e))for(a=0;a<e.length;a++)zg(e[a],a,a,n,e,o,s);else{var c={},u=Object.keys(e).sort(SSe);for(a=0;a<u.length;a++){var d=u[a];zg(e[d],d,a,n,e,o,s),c[d]=e[d]}if(typeof i<"u")fo.push([i,t,e]),i[t]=c;else return c}n.pop()}}function P$(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(po.length>0)for(var n=0;n<po.length;n++){var i=po[n];if(i[1]===t&&i[0]===r){r=i[2],po.splice(n,1);break}}return e.call(this,t,r)}}});var D$=y((FMe,R$)=>{var bSe=O$(),Ae={LOG:Symbol("log"),META:Symbol("meta"),ERROR:Symbol("error"),OPTS:Symbol("opts")},If=class e{constructor(t,r){this[Ae.LOG]=t,this[Ae.META]={},this[Ae.ERROR]=null,this[Ae.OPTS]=r;let{meta:n,tags:i}=this[Ae.LOG];if(n&&(typeof n!="object"||Array.isArray(n))&&(this[Ae.LOG].meta={meta:n}),n||(this[Ae.LOG].meta={}),i||(this[Ae.LOG].tags=[]),e.isError(t.msg)){let o=t.msg;this[Ae.ERROR]=o,this[Ae.META].stack=o.stack,this[Ae.LOG].msg=o.message}}get level(){return this[Ae.LOG].level}get msg(){return this[Ae.LOG].msg}set msg(t){this[Ae.LOG].msg=t}get message(){return this.msg}set message(t){this.msg=t}get meta(){let t=this[Ae.OPTS],r={...this[Ae.META],...this[Ae.OPTS].meta,...this[Ae.LOG].meta};if(t.dynamicMeta&&typeof t.dynamicMeta=="function"){let n=t.dynamicMeta.call(this,this,t);typeof n=="object"&&(r=Object.assign(r,n))}for(let[n,i]of Object.entries(r))typeof i=="object"&&e.isError(i)&&(r[n]=e.stubError(i));return r}set meta(t){this[Ae.LOG].meta={...this[Ae.LOG].meta,...t}}get tags(){let t=this[Ae.OPTS];return[].concat(t.tags,this[Ae.LOG].tags).map(n=>{if(typeof n=="function")return n.call(this,{level:this.level,meta:this.meta,options:t});let i=n.match(/(<<(.*)>>)/);return i&&i[2]==="level"?n.replace(i[1],this.level):n}).filter(n=>n!=null&&n!=="")}set tags(t){this[Ae.LOG].tags=this[Ae.LOG].tags.concat(t)}get value(){let t=this[Ae.OPTS];return{[t.levelKey]:t.levelKey?this.level:void 0,[t.messageKey]:this.msg,...this.meta,[t.tagsKey]:t.tagsKey?this.tags:void 0}}get log(){return this.value}get throw(){let t=this[Ae.ERROR]||new Error(this.msg);throw t.log=this,t}toJSON(t){return bSe(this.value,this[Ae.OPTS].replacer||null,t?4:0)}static isError(t){return!!t&&typeof t=="object"&&(t instanceof Error||Object.prototype.hasOwnProperty.call(t,"message")&&Object.prototype.hasOwnProperty.call(t,"stack"))}static stubError(t){return typeof t.toJSON=="function"||(t.toJSON=function(){return["name","message","stack"].concat(Object.keys(t)).reduce((n,i)=>{if(i in t){let o=t[i];if(typeof o=="function")return n;n[i]=o}return n},{})}),t}};If.symbols=Ae;R$.exports=If});var M$=y((BMe,N$)=>{var CSe=require("events"),wSe=D$(),Bs={LEVELS:Symbol("levels")},Of=class e extends CSe{constructor(t={},r={}){super(),this.LambdaLog=e,this.LogMessage=wSe,this.options={meta:{},tags:[],dynamicMeta:null,debug:!1,dev:!1,silent:["true","yes","y","1"].includes(process.env.LAMBDALOG_SILENT),replacer:null,logHandler:console,levelKey:"_logLevel",messageKey:"msg",tagsKey:"_tags",...t},this[Bs.LEVELS]={info:"info",warn:"warn",error:"error",debug(){return this.options.debug?"debug":!1},...r},this.console=this.options.logHandler;let n=this[Bs.LEVELS];for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&this.addLevel(i,n[i])}addLevel(t,r){return this[Bs.LEVELS][t]=r,this[t]=(n,i={},o=[])=>this.log(t,n,i,o),this}log(t,r,n={},i=[]){if(!Object.prototype.hasOwnProperty.call(this[Bs.LEVELS],t))throw new Error(`"${t}" is not a valid log level`);let o=new this.LogMessage({level:t,msg:r,meta:n,tags:i},this.options),s=this[Bs.LEVELS][t];return typeof s=="function"&&(s=s.call(this,o)),s?(this.options.silent||this.console[s](o.toJSON(this.options.dev)),this.emit("log",o),o):!1}assert(t,r,n={},i=[]){return t?!1:this.log("error",r,n,i)}result(t,r={},n=[]){if(!t||typeof t.then!="function")throw new Error("A promise must be provided as the first argument");return new Promise(o=>{t.then(s=>o(this.log("info",s,r,n))).catch(s=>o(this.log("error",s,r,n)))})}};Of.symbols=Bs;N$.exports=Of});var Wg=y((jMe,L$)=>{var xSe=M$(),ASe=new xSe;L$.exports=ASe});var xc=y(Kg=>{"use strict";Object.defineProperty(Kg,"__esModule",{value:!0});var TSe=Wg(),Rf=class{};Kg.default=Rf;Rf.Instance=new TSe.LambdaLog({silent:process.env.JEST_WORKER_ID!==void 0})});var j$=y(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.loadAppFrame=void 0;var B$=(zr(),_e(Vr)),Jg=B$.__importDefault(require("path")),k$=Hg(),PSe=B$.__importDefault(xc()),F$=PSe.default.Instance;function ISe({basePath:e="."}){let t=[e,Jg.default.join(e,".."),Jg.default.join(e,"templates"),e,"/opt","/opt/templates"];for(let r of t){let n=Jg.default.join(r,"appFrame.html");try{if((0,k$.pathExistsSync)(n))return F$.info("found html file",{fullPath:n}),(0,k$.readFileSync)(n,"utf-8")}catch{}}throw F$.error("appFrame.html not found"),new Error("appFrame.html not found")}Df.loadAppFrame=ISe});var Ac=y(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.AppVersionCache=void 0;var Yg=xg(),Xg=class e{static GetInstance({dbManager:t}){return e.instance||(e.instance=new e({dbManager:t})),e.instance}constructor({dbManager:t}){this.negativeAppNameCache=new Map,this.appRulesCache=new Map,this.appVersionsCache=new Map,this.dbManager=t}get CacheIsEmpty(){return this.appRulesCache.size===0&&this.appVersionsCache.size===0}async PopulateEmptyCache({key:{AppName:t}}){let r=await Yg.Application.GetVersionsAndRules({dbManager:this.dbManager,key:{AppName:t}});if(!r||r.Versions.length===0&&!r.Rules){this.negativeAppNameCache.set(t.toLowerCase(),{timestamp:Date.now(),data:void 0});return}this.negativeAppNameCache.delete(t.toLowerCase()),this.appRulesCache.set(t.toLowerCase(),{timestamp:Date.now(),data:r.Rules});let n=new Map;for(let i of r.Versions)n.set(i.SemVer,{timestamp:Date.now(),data:i});this.appVersionsCache.set(t.toLowerCase(),n)}ClearCache(){this.appRulesCache.clear(),this.appVersionsCache.clear()}async GetRules({key:{AppName:t}}){var r;let n=Date.now(),i=this.negativeAppNameCache.get(t.toLowerCase());if(i&&n-i.timestamp<6e4)return;i&&this.negativeAppNameCache.delete(t.toLowerCase());let o=this.appRulesCache.get(t.toLowerCase());if(o&&n-o.timestamp<6e4)return o.data;if(this.CacheIsEmpty||!o)return await this.PopulateEmptyCache({key:{AppName:t}}),(r=this.appRulesCache.get(t.toLowerCase()))===null||r===void 0?void 0:r.data;let s=await Yg.Application.GetVersionsAndRules({dbManager:this.dbManager,key:{AppName:t}});return this.appRulesCache.set(t.toLowerCase(),{timestamp:n,data:s.Rules}),s.Rules}async GetVersionInfo({key:{AppName:t,SemVer:r}}){var n,i;let o=Date.now(),s=this.negativeAppNameCache.get(t.toLowerCase());if(s&&o-s.timestamp<6e4)return;s&&this.negativeAppNameCache.delete(t.toLowerCase());let a=this.appVersionsCache.get(t.toLowerCase());if(a){let c=a.get(r);if(c&&o-c.timestamp<9e5)return c.data}if(this.CacheIsEmpty||!a)return await this.PopulateEmptyCache({key:{AppName:t}}),this.appVersionsCache?(i=(n=this.appVersionsCache.get(t.toLowerCase()))===null||n===void 0?void 0:n.get(r))===null||i===void 0?void 0:i.data:void 0;{let c=await Yg.Version.LoadVersion({dbManager:this.dbManager,key:{AppName:t,SemVer:r}});if(!c)return;let u=this.appVersionsCache.get(t.toLowerCase());return u?(u.set(r,{timestamp:o,data:c}),c):void 0}}};Nf.AppVersionCache=Xg});var Qg=y(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.GetAppInfo=void 0;var OSe=Ac();async function RSe(e){let{dbManager:t,appName:r}=e,n,i=OSe.AppVersionCache.GetInstance({dbManager:t});if(n=await i.GetRules({key:{AppName:r}}),n&&n.AppName===r.toLowerCase())return r;if(n=await i.GetRules({key:{AppName:"[root]"}}),n&&n.AppName==="[root]")return"[root]"}Mf.GetAppInfo=RSe});var q$=y(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.normalizePathPrefix=void 0;function DSe(e){let t=e;return t!==""&&!t.startsWith("/")&&(t="/"+e),t.endsWith("/")&&(t=t.substring(0,t.length-1)),t}Lf.normalizePathPrefix=DSe});var U$=y(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.RouteApp=void 0;var NSe=(zr(),_e(Vr)),MSe=Ac(),LSe=NSe.__importDefault(xc()),Zg=LSe.default.Instance;async function kSe(e){var t;let{dbManager:r,event:n,normalizedPathPrefix:i="",appName:o,possibleSemVerPathNextData:s,possibleSemVerPathAfterApp:a,possibleSemVerQuery:c,additionalParts:u,appNameOrRootTrailingSlash:d}=e,p,m=MSe.AppVersionCache.GetInstance({dbManager:r}),h=a?await m.GetVersionInfo({key:{AppName:o,SemVer:a}}):void 0,v=s?await m.GetVersionInfo({key:{AppName:o,SemVer:s}}):void 0,_=c?await m.GetVersionInfo({key:{AppName:o,SemVer:c}}):void 0,g=h||v;if(g)return{statusCode:200,appName:o,semVer:g.SemVer,isAPIPath:u.startsWith("api/"),...g!=null&&g.URL?{url:g==null?void 0:g.URL}:{},...g!=null&&g.Type?{type:(g==null?void 0:g.Type)==="lambda"?"apigwy":g==null?void 0:g.Type}:{}};if(_)p=_;else{if(c)return Zg.error(`could not find app ${o}, for path ${n.rawPath} - returning 404`,{statusCode:404}),{statusCode:404,errorMessage:`Router - Could not find app: ${n.rawPath}, ${o}`};{let x=await m.GetRules({key:{AppName:o}}),S=(t=x==null?void 0:x.RuleSet.default)===null||t===void 0?void 0:t.SemVer;if(S==null)return Zg.error(`could not find app ${o}, for path ${n.rawPath} - returning 404`,{statusCode:404}),{statusCode:404,errorMessage:`Router - Could not find app: ${n.rawPath}, ${o}`};p=await m.GetVersionInfo({key:{AppName:o,SemVer:S}})}}if(!p)return Zg.error(`could not find version info for app ${o}, for path ${n.rawPath} - returning 404`,{statusCode:404}),{statusCode:404,errorMessage:`Router - Could not find version info for app: ${n.rawPath}, ${o}`};if((p==null?void 0:p.StartupType)==="iframe"||!(p!=null&&p.StartupType)){let x;return(p==null?void 0:p.DefaultFile)===void 0||(p==null?void 0:p.DefaultFile)===""||u!==""?(x=`${i}/${d}${p.SemVer}`,u!==""&&(x+=`/${u}`)):x=`${i}/${d}${p.SemVer}/${p.DefaultFile}`,{statusCode:200,appName:o,semVer:p.SemVer,startupType:"iframe",isAPIPath:u.startsWith("api/"),...p!=null&&p.URL?{url:p==null?void 0:p.URL}:{},...p!=null&&p.Type?{type:(p==null?void 0:p.Type)==="lambda"?"apigwy":p==null?void 0:p.Type}:{},iFrameAppVersionPath:x}}else{if((p==null?void 0:p.Type)==="lambda")throw new Error("Invalid type for direct app version");if(["apigwy","static"].includes((p==null?void 0:p.Type)||""))throw new Error("Invalid type for direct app version");return{statusCode:200,appName:o,semVer:p.SemVer,startupType:"direct",isAPIPath:u.startsWith("api/"),...p!=null&&p.URL?{url:p==null?void 0:p.URL}:{},...p!=null&&p.Type?{type:p==null?void 0:p.Type}:{}}}}kf.RouteApp=kSe});var t0=y(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.RedirectToDefaultFile=void 0;var FSe=(zr(),_e(Vr)),BSe=Ac(),jSe=FSe.__importDefault(xc()),e0=jSe.default.Instance;async function qSe(e){let{dbManager:t,normalizedPathPrefix:r="",appName:n,appNameOrRootTrailingSlash:i,semVer:o}=e,s;try{s=await BSe.AppVersionCache.GetInstance({dbManager:t}).GetVersionInfo({key:{AppName:n,SemVer:o}})}catch(a){e0.info(`LoadVersion threw for '${r}/${i}${o}' - falling through to app routing'`,{appName:n,semVer:o,error:a});return}if(s===void 0){e0.info(`LoadVersion returned undefined for '${r}/${i}${o}', assuming not found - falling through to app routing'`,{appName:n,semVer:o});return}if(s.DefaultFile)return e0.info(`found '${r}/${i}${o}' - returning 302 to ${r}/${i}${o}/${s.DefaultFile}`,{statusCode:302,routedPath:`${r}/${i}${o}/${s.DefaultFile}`}),{statusCode:302,redirectLocation:`${r}/${i}${o}/${s.DefaultFile}`}}Ff.RedirectToDefaultFile=qSe});var $$=y(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.GetRoute=void 0;var USe=(zr(),_e(Vr)),GSe=USe.__importDefault(xc()),G$=Qg(),$Se=U$(),HSe=t0(),VSe=Ac(),Bf=GSe.default.Instance;async function zSe(e){let{dbManager:t,normalizedPathPrefix:r="",queryStringParameters:n,locales:i=[]}=e;try{let o=VSe.AppVersionCache.GetInstance({dbManager:t});if(r&&!e.rawPath.startsWith(r))return{statusCode:404,errorMessage:"Request not routable"};let s=r&&e.rawPath.startsWith(r)?e.rawPath.slice(r.length-1):e.rawPath,a=i.reduce((M,k)=>M.startsWith(`/${k}/`)?M.slice(k.length+1):M,s),c=a.split("/"),u;if(c.length>=4&&c[1]==="_next"&&c[2]==="data"){let k=c.length>=5&&i.some(Te=>c[4]===Te)?c[5]:c[4],me=k.endsWith(".json")?k.slice(0,k.length-5):k;u=await(0,G$.GetAppInfo)({dbManager:t,appName:me})}if(u||(u=await(0,G$.GetAppInfo)({dbManager:t,appName:c.length>=2?c[1]:"[root]"})),!u)return{statusCode:404,errorMessage:"App not found"};let d=u==="[root]",p=d?"":`${u}/`,h=(d?a:a.slice(u.length+1)).split("/"),v="";if(h.length>=2&&h[1]!==""&&(v=h.slice(1).join("/")),(h.length===2||h.length===3&&!h[2])&&await o.GetVersionInfo({key:{AppName:u,SemVer:h[1]}})){let k=await(0,HSe.RedirectToDefaultFile)({dbManager:t,appName:u,normalizedPathPrefix:r,semVer:h[1],appNameOrRootTrailingSlash:p});if(k)return k}let _=h.length>=4?h[3]:"",g=c.length>=4&&c[1]==="_next"&&c[2]=="data"?c[3]:_,x=h.length>=2?h[1]:"",S=await(0,$Se.RouteApp)({dbManager:t,normalizedPathPrefix:r,event:e,appName:u,possibleSemVerPathNextData:g,possibleSemVerPathAfterApp:x,possibleSemVerQuery:(n==null?void 0:n.get("appver"))||"",additionalParts:v,appNameOrRootTrailingSlash:p});return S||{statusCode:599,errorMessage:`Router - Could not route: ${e.rawPath}, no matching route`}}catch(o){return Bf.error("unexpected exception - returning 599",{statusCode:599,error:o}),o instanceof Error?(Bf.error("unexpected exception - returning 599",{statusCode:599,error:o}),{statusCode:599,errorMessage:`Router - Could not route: ${e.rawPath}, ${o.message}`}):typeof o=="string"?(Bf.error("unexpected exception - returning 599",{statusCode:599,error:o}),{statusCode:599,errorMessage:`Router - Could not route: ${e.rawPath}, ${o}`}):(Bf.error("unexpected exception - returning 599",{statusCode:599,error:o}),{statusCode:599,errorMessage:`Router - Could not route: ${e.rawPath}, unknown error`})}}jf.GetRoute=zSe});var H$=y(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.RedirectToDefaultFile=br.GetRoute=br.normalizePathPrefix=br.GetAppInfo=br.loadAppFrame=void 0;var WSe=j$();Object.defineProperty(br,"loadAppFrame",{enumerable:!0,get:function(){return WSe.loadAppFrame}});var KSe=Qg();Object.defineProperty(br,"GetAppInfo",{enumerable:!0,get:function(){return KSe.GetAppInfo}});var JSe=q$();Object.defineProperty(br,"normalizePathPrefix",{enumerable:!0,get:function(){return JSe.normalizePathPrefix}});var YSe=$$();Object.defineProperty(br,"GetRoute",{enumerable:!0,get:function(){return YSe.GetRoute}});var XSe=t0();Object.defineProperty(br,"RedirectToDefaultFile",{enumerable:!0,get:function(){return XSe.RedirectToDefaultFile}})});var z$=y(V$=>{"use strict";Object.defineProperty(V$,"__esModule",{value:!0})});var W$=y(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.HttpAuthLocation=void 0;var QSe;(function(e){e.HEADER="header",e.QUERY="query"})(QSe=Tc.HttpAuthLocation||(Tc.HttpAuthLocation={}))});var J$=y(K$=>{"use strict";Object.defineProperty(K$,"__esModule",{value:!0})});var X$=y(Y$=>{"use strict";Object.defineProperty(Y$,"__esModule",{value:!0})});var Z$=y(Q$=>{"use strict";Object.defineProperty(Q$,"__esModule",{value:!0})});var t3=y(e3=>{"use strict";Object.defineProperty(e3,"__esModule",{value:!0})});var n3=y(r3=>{"use strict";Object.defineProperty(r3,"__esModule",{value:!0})});var o3=y(i3=>{"use strict";Object.defineProperty(i3,"__esModule",{value:!0})});var a3=y(s3=>{"use strict";Object.defineProperty(s3,"__esModule",{value:!0})});var c3=y(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});var r0=(tr(),_e(er));r0.__exportStar(n3(),Pc);r0.__exportStar(o3(),Pc);r0.__exportStar(a3(),Pc)});var l3=y(u3=>{"use strict";Object.defineProperty(u3,"__esModule",{value:!0})});var p3=y(d3=>{"use strict";Object.defineProperty(d3,"__esModule",{value:!0})});var f3=y(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.EndpointURLScheme=void 0;var ZSe;(function(e){e.HTTP="http",e.HTTPS="https"})(ZSe=Ic.EndpointURLScheme||(Ic.EndpointURLScheme={}))});var h3=y(m3=>{"use strict";Object.defineProperty(m3,"__esModule",{value:!0})});var _3=y(y3=>{"use strict";Object.defineProperty(y3,"__esModule",{value:!0})});var g3=y(v3=>{"use strict";Object.defineProperty(v3,"__esModule",{value:!0})});var S3=y(E3=>{"use strict";Object.defineProperty(E3,"__esModule",{value:!0})});var C3=y(b3=>{"use strict";Object.defineProperty(b3,"__esModule",{value:!0})});var w3=y(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});var Oc=(tr(),_e(er));Oc.__exportStar(h3(),mo);Oc.__exportStar(_3(),mo);Oc.__exportStar(g3(),mo);Oc.__exportStar(S3(),mo);Oc.__exportStar(C3(),mo)});var A3=y(x3=>{"use strict";Object.defineProperty(x3,"__esModule",{value:!0})});var T3=y(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.FieldPosition=void 0;var ebe;(function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"})(ebe=Rc.FieldPosition||(Rc.FieldPosition={}))});var I3=y(P3=>{"use strict";Object.defineProperty(P3,"__esModule",{value:!0})});var R3=y(O3=>{"use strict";Object.defineProperty(O3,"__esModule",{value:!0})});var N3=y(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var D3=(tr(),_e(er));D3.__exportStar(I3(),qf);D3.__exportStar(R3(),qf)});var L3=y(M3=>{"use strict";Object.defineProperty(M3,"__esModule",{value:!0})});var F3=y(k3=>{"use strict";Object.defineProperty(k3,"__esModule",{value:!0})});var j3=y(B3=>{"use strict";Object.defineProperty(B3,"__esModule",{value:!0})});var U3=y(q3=>{"use strict";Object.defineProperty(q3,"__esModule",{value:!0})});var $3=y(G3=>{"use strict";Object.defineProperty(G3,"__esModule",{value:!0})});var V3=y(H3=>{"use strict";Object.defineProperty(H3,"__esModule",{value:!0})});var W3=y(z3=>{"use strict";Object.defineProperty(z3,"__esModule",{value:!0})});var J3=y(K3=>{"use strict";Object.defineProperty(K3,"__esModule",{value:!0})});var X3=y(Y3=>{"use strict";Object.defineProperty(Y3,"__esModule",{value:!0})});var Z3=y(Q3=>{"use strict";Object.defineProperty(Q3,"__esModule",{value:!0})});var tH=y(eH=>{"use strict";Object.defineProperty(eH,"__esModule",{value:!0})});var nH=y(rH=>{"use strict";Object.defineProperty(rH,"__esModule",{value:!0})});var oH=y(iH=>{"use strict";Object.defineProperty(iH,"__esModule",{value:!0})});var sH=y(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});Dc.RequestHandlerProtocol=void 0;var tbe;(function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"})(tbe=Dc.RequestHandlerProtocol||(Dc.RequestHandlerProtocol={}))});var cH=y(aH=>{"use strict";Object.defineProperty(aH,"__esModule",{value:!0})});var lH=y(uH=>{"use strict";Object.defineProperty(uH,"__esModule",{value:!0})});var pH=y(dH=>{"use strict";Object.defineProperty(dH,"__esModule",{value:!0})});var mH=y(fH=>{"use strict";Object.defineProperty(fH,"__esModule",{value:!0})});var yH=y(hH=>{"use strict";Object.defineProperty(hH,"__esModule",{value:!0})});var _H=y(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});var fe=(tr(),_e(er));fe.__exportStar(z$(),de);fe.__exportStar(W$(),de);fe.__exportStar(J$(),de);fe.__exportStar(X$(),de);fe.__exportStar(Z$(),de);fe.__exportStar(t3(),de);fe.__exportStar(c3(),de);fe.__exportStar(l3(),de);fe.__exportStar(p3(),de);fe.__exportStar(f3(),de);fe.__exportStar(w3(),de);fe.__exportStar(A3(),de);fe.__exportStar(T3(),de);fe.__exportStar(N3(),de);fe.__exportStar(L3(),de);fe.__exportStar(F3(),de);fe.__exportStar(j3(),de);fe.__exportStar(U3(),de);fe.__exportStar($3(),de);fe.__exportStar(V3(),de);fe.__exportStar(W3(),de);fe.__exportStar(J3(),de);fe.__exportStar(X3(),de);fe.__exportStar(Z3(),de);fe.__exportStar(tH(),de);fe.__exportStar(nH(),de);fe.__exportStar(oH(),de);fe.__exportStar(sH(),de);fe.__exportStar(cH(),de);fe.__exportStar(lH(),de);fe.__exportStar(pH(),de);fe.__exportStar(mH(),de);fe.__exportStar(yH(),de)});var vH=y(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.Field=void 0;var rbe=_H(),n0=class{constructor({name:t,kind:r=rbe.FieldPosition.HEADER,values:n=[]}){this.name=t,this.kind=r,this.values=n}add(t){this.values.push(t)}set(t){this.values=t}remove(t){this.values=this.values.filter(r=>r!==t)}toString(){return this.values.map(t=>t.includes(",")||t.includes(" ")?`"${t}"`:t).join(", ")}get(){return this.values}};Uf.Field=n0});var gH=y(Gf=>{"use strict";Object.defineProperty(Gf,"__esModule",{value:!0});Gf.Fields=void 0;var i0=class{constructor({fields:t=[],encoding:r="utf-8"}){this.entries={},t.forEach(this.setField.bind(this)),this.encoding=r}setField(t){this.entries[t.name.toLowerCase()]=t}getField(t){return this.entries[t.toLowerCase()]}removeField(t){delete this.entries[t.toLowerCase()]}getByType(t){return Object.values(this.entries).filter(r=>r.kind===t)}};Gf.Fields=i0});var SH=y(EH=>{"use strict";Object.defineProperty(EH,"__esModule",{value:!0})});var bH=y($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.HttpRequest=void 0;var o0=class e{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static isInstance(t){if(!t)return!1;let r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){let t=new e({...this,headers:{...this.headers}});return t.query&&(t.query=nbe(t.query)),t}};$f.HttpRequest=o0;function nbe(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}});var CH=y(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});Hf.HttpResponse=void 0;var s0=class{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;let r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}};Hf.HttpResponse=s0});var wH=y(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf.isValidHostname=void 0;function ibe(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}Vf.isValidHostname=ibe});var AH=y(xH=>{"use strict";Object.defineProperty(xH,"__esModule",{value:!0})});var TH=y(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});var ho=(tr(),_e(er));ho.__exportStar(vH(),Dn);ho.__exportStar(gH(),Dn);ho.__exportStar(SH(),Dn);ho.__exportStar(bH(),Dn);ho.__exportStar(CH(),Dn);ho.__exportStar(wH(),Dn);ho.__exportStar(AH(),Dn)});var PH=y(a0=>{"use strict";Object.defineProperty(a0,"__esModule",{value:!0});var obe=(tr(),_e(er));obe.__exportStar(TH(),a0)});var js=y((Nc,l0)=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.default=abe;function zf(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?zf=function(r){return typeof r}:zf=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},zf(e)}function abe(e){var t=typeof e=="string"||e instanceof String;if(!t){var r=zf(e);throw e===null?r="null":r==="object"&&(r=e.constructor.name),new TypeError("Expected a string but received a ".concat(r))}}l0.exports=Nc.default;l0.exports.default=Nc.default});var Wf=y((Mc,d0)=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.default=cbe;function cbe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)typeof e[r]>"u"&&(e[r]=t[r]);return e}d0.exports=Mc.default;d0.exports.default=Mc.default});var DH=y((Lc,p0)=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.default=dbe;var ube=lbe(js());function lbe(e){return e&&e.__esModule?e:{default:e}}function Kf(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Kf=function(r){return typeof r}:Kf=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Kf(e)}function dbe(e,t){(0,ube.default)(e);var r,n;Kf(t)==="object"?(r=t.min||0,n=t.max):(r=arguments[1],n=arguments[2]);var i=encodeURI(e).split(/%..|./).length-1;return i>=r&&(typeof n>"u"||i<=n)}p0.exports=Lc.default;p0.exports.default=Lc.default});var m0=y((kc,f0)=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.default=hbe;var pbe=NH(js()),fbe=NH(Wf());function NH(e){return e&&e.__esModule?e:{default:e}}var mbe={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1};function hbe(e,t){(0,pbe.default)(e),t=(0,fbe.default)(t,mbe),t.allow_trailing_dot&&e[e.length-1]==="."&&(e=e.substring(0,e.length-1)),t.allow_wildcard===!0&&e.indexOf("*.")===0&&(e=e.substring(2));var r=e.split("."),n=r[r.length-1];return t.require_tld&&(r.length<2||!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(n)||/\s/.test(n))||!t.allow_numeric_tld&&/^\d+$/.test(n)?!1:r.every(function(i){return!(i.length>63||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(i)||/[\uff01-\uff5e]/.test(i)||/^-|-$/.test(i)||!t.allow_underscores&&/_/.test(i))})}f0.exports=kc.default;f0.exports.default=kc.default});var Jf=y((Fc,y0)=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.default=h0;var ybe=_be(js());function _be(e){return e&&e.__esModule?e:{default:e}}var MH="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",Ri="(".concat(MH,"[.]){3}").concat(MH),vbe=new RegExp("^".concat(Ri,"$")),it="(?:[0-9a-fA-F]{1,4})",gbe=new RegExp("^("+"(?:".concat(it,":){7}(?:").concat(it,"|:)|")+"(?:".concat(it,":){6}(?:").concat(Ri,"|:").concat(it,"|:)|")+"(?:".concat(it,":){5}(?::").concat(Ri,"|(:").concat(it,"){1,2}|:)|")+"(?:".concat(it,":){4}(?:(:").concat(it,"){0,1}:").concat(Ri,"|(:").concat(it,"){1,3}|:)|")+"(?:".concat(it,":){3}(?:(:").concat(it,"){0,2}:").concat(Ri,"|(:").concat(it,"){1,4}|:)|")+"(?:".concat(it,":){2}(?:(:").concat(it,"){0,3}:").concat(Ri,"|(:").concat(it,"){1,5}|:)|")+"(?:".concat(it,":){1}(?:(:").concat(it,"){0,4}:").concat(Ri,"|(:").concat(it,"){1,6}|:)|")+"(?::((?::".concat(it,"){0,5}:").concat(Ri,"|(?::").concat(it,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function h0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if((0,ybe.default)(e),t=String(t),!t)return h0(e,4)||h0(e,6);if(t==="4"){if(!vbe.test(e))return!1;var r=e.split(".").sort(function(n,i){return n-i});return r[3]<=255}return t==="6"?!!gbe.test(e):!1}y0.exports=Fc.default;y0.exports.default=Fc.default});var kH=y((jc,v0)=>{"use strict";Object.defineProperty(jc,"__esModule",{value:!0});jc.default=Dbe;var Ebe=Bc(js()),Sbe=Bc(Wf()),_0=Bc(DH()),bbe=Bc(m0()),LH=Bc(Jf());function Bc(e){return e&&e.__esModule?e:{default:e}}var Cbe={allow_display_name:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[]},wbe=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,xbe=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,Abe=/^[a-z\d]+$/,Tbe=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,Pbe=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,Ibe=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,Obe=254;function Rbe(e){var t=e.replace(/^"(.+)"$/,"$1");if(!t.trim())return!1;var r=/[\.";<>]/.test(t);if(r){if(t===e)return!1;var n=t.split('"').length===t.split('\\"').length;if(!n)return!1}return!0}function Dbe(e,t){if((0,Ebe.default)(e),t=(0,Sbe.default)(t,Cbe),t.require_display_name||t.allow_display_name){var r=e.match(wbe);if(r){var n=r[1];if(e=e.replace(n,"").replace(/(^<|>$)/g,""),n.endsWith(" ")&&(n=n.substr(0,n.length-1)),!Rbe(n))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>Obe)return!1;var i=e.split("@"),o=i.pop(),s=o.toLowerCase();if(t.host_blacklist.includes(s))return!1;var a=i.join("@");if(t.domain_specific_validation&&(s==="gmail.com"||s==="googlemail.com")){a=a.toLowerCase();var c=a.split("+")[0];if(!(0,_0.default)(c.replace(/\./g,""),{min:6,max:30}))return!1;for(var u=c.split("."),d=0;d<u.length;d++)if(!Abe.test(u[d]))return!1}if(t.ignore_max_length===!1&&(!(0,_0.default)(a,{max:64})||!(0,_0.default)(o,{max:254})))return!1;if(!(0,bbe.default)(o,{require_tld:t.require_tld})){if(!t.allow_ip_domain)return!1;if(!(0,LH.default)(o)){if(!o.startsWith("[")||!o.endsWith("]"))return!1;var p=o.substr(1,o.length-2);if(p.length===0||!(0,LH.default)(p))return!1}}if(a[0]==='"')return a=a.slice(1,a.length-1),t.allow_utf8_local_part?Ibe.test(a):Tbe.test(a);for(var m=t.allow_utf8_local_part?Pbe:xbe,h=a.split("."),v=0;v<h.length;v++)if(!m.test(h[v]))return!1;return!(t.blacklisted_chars&&a.search(new RegExp("[".concat(t.blacklisted_chars,"]+"),"g"))!==-1)}v0.exports=jc.default;v0.exports.default=jc.default});var qH=y((qc,g0)=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.default=Hbe;var Nbe=Yf(js()),Mbe=Yf(m0()),FH=Yf(Jf()),Lbe=Yf(Wf());function Yf(e){return e&&e.__esModule?e:{default:e}}function kbe(e,t){return qbe(e)||jbe(e,t)||Bbe(e,t)||Fbe()}function Fbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
62
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bbe(e,t){if(e){if(typeof e=="string")return BH(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return BH(e,t)}}function BH(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function jbe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done)&&(r.push(a.value),!(t&&r.length===t));n=!0);}catch(c){i=!0,o=c}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw o}}return r}}function qbe(e){if(Array.isArray(e))return e}var Ube={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},Gbe=/^\[([^\]]+)\](?::([0-9]+))?$/;function $be(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function jH(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(e===n||$be(n)&&n.test(e))return!0}return!1}function Hbe(e,t){if((0,Nbe.default)(e),!e||/[\s<>]/.test(e)||e.indexOf("mailto:")===0||(t=(0,Lbe.default)(t,Ube),t.validate_length&&e.length>=2083)||!t.allow_fragments&&e.includes("#")||!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;var r,n,i,o,s,a,c,u;if(c=e.split("#"),e=c.shift(),c=e.split("?"),e=c.shift(),c=e.split("://"),c.length>1){if(r=c.shift().toLowerCase(),t.require_valid_protocol&&t.protocols.indexOf(r)===-1)return!1}else{if(t.require_protocol)return!1;if(e.substr(0,2)==="//"){if(!t.allow_protocol_relative_urls)return!1;c[0]=e.substr(2)}}if(e=c.join("://"),e==="")return!1;if(c=e.split("/"),e=c.shift(),e===""&&!t.require_host)return!0;if(c=e.split("@"),c.length>1){if(t.disallow_auth||c[0]===""||(n=c.shift(),n.indexOf(":")>=0&&n.split(":").length>2))return!1;var d=n.split(":"),p=kbe(d,2),m=p[0],h=p[1];if(m===""&&h==="")return!1}o=c.join("@"),a=null,u=null;var v=o.match(Gbe);if(v?(i="",u=v[1],a=v[2]||null):(c=o.split(":"),i=c.shift(),c.length&&(a=c.join(":"))),a!==null&&a.length>0){if(s=parseInt(a,10),!/^[0-9]+$/.test(a)||s<=0||s>65535)return!1}else if(t.require_port)return!1;return t.host_whitelist?jH(i,t.host_whitelist):!(!(0,FH.default)(i)&&!(0,Mbe.default)(i,t)&&(!u||!(0,FH.default)(u,6))||(i=i||u,t.host_blacklist&&jH(i,t.host_blacklist)))}g0.exports=qc.default;g0.exports.default=qc.default});var GH=y((XLe,UH)=>{"use strict";var Vbe=kH(),zbe=qH(),Wbe=Jf();function E0(e,t){if(!e)throw new Error(t)}var Kbe={name:"email",coerce:e=>e.toString(),validate:function(e){E0(Vbe(e),"must be an email address")}},Jbe={name:"ipaddress",coerce:e=>e.toString(),validate:function(e){E0(Wbe(e),"must be an IP address")}},Ybe={name:"url",coerce:e=>e.toString(),validate:function(e){E0(zbe(e,{require_tld:!1}),"must be a URL")}};UH.exports={email:Kbe,ipaddress:Jbe,url:Ybe}});var R6=y(O6=>{"use strict";Object.defineProperty(O6,"__esModule",{value:!0})});var k0=y(L0=>{"use strict";Object.defineProperty(L0,"__esModule",{value:!0});var M0=class{constructor(){if(!!!(Reflect&&Reflect.getMetadata))throw new Error("reflect-metadata should be installed properly");this._reflect=Reflect}isConstructor(t){return!!t.prototype&&!!t.prototype.constructor.name&&t instanceof Function}isConfigClass(t){let r=this._reflect.hasMetadata("tsconvict:properties",t),n=this._reflect.hasMetadata("tsconvict:schema",t);return r||n}getTsType(t,r){return this._reflect.getMetadata("design:type",t,r)}getConvictMetaForProperty(t,r){return this._reflect.getMetadata("tsconvict:property",t,r)}setConvictMetaForProperty(t,r,n){return this._reflect.defineMetadata("tsconvict:property",t,r,n)}setConvictMetaForClass(t,r){return this._reflect.defineMetadata("tsconvict:schema",t,r)}getConvictMetaForClass(t){return this._reflect.getMetadata("tsconvict:schema",t)||null}setPropertyForClass(t,r){let n=this.getClassProperties(t);return n.length===0&&(this._reflect.defineMetadata("tsconvict:properties",[],t.constructor),n=this.getClassProperties(t)),n.push(r)}getClassProperties(t){return this._reflect.getMetadata("tsconvict:properties",t.constructor)||[]}};L0.default=new M0});var D6=y(Mi=>{"use strict";var Exe=Mi&&Mi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.Property=Mi.Config=void 0;var nm=Exe(k0());function Sxe(e={}){return t=>{nm.default.setConvictMetaForClass(e,t)}}Mi.Config=Sxe;function bxe(e){return(t,r)=>{if(typeof e=="object"&&typeof e.format>"u"){let n=nm.default.getTsType(t,r);n&&(e.format=n)}nm.default.setConvictMetaForProperty(e,t,r),nm.default.setPropertyForClass(t,r)}}Mi.Property=bxe});var q6=y((ske,j6)=>{"use strict";var Cxe=require("util"),wxe=require("fs"),N6=require("path");function zc(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",n=!1,i=e.match(/^-+/);for(let o=i?i[0].length:0;o<e.length;o++){let s=e.charAt(o);n&&(n=!1,s=s.toUpperCase()),o!==0&&(s==="-"||s==="_")?n=!0:s!=="-"&&s!=="_"&&(r+=s)}return r}}function k6(e,t){let r=e.toLowerCase();t=t||"-";let n="";for(let i=0;i<e.length;i++){let o=r.charAt(i),s=e.charAt(i);o!==s&&i>0?n+=`${t}${r.charAt(i)}`:n+=s}return n}function F6(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function xxe(e){if(Array.isArray(e))return e.map(s=>typeof s!="string"?s+"":s);e=e.trim();let t=0,r=null,n=null,i=null,o=[];for(let s=0;s<e.length;s++){if(r=n,n=e.charAt(s),n===" "&&!i){r!==" "&&t++;continue}n===i?i=null:(n==="'"||n==='"')&&!i&&(i=n),o[t]||(o[t]=""),o[t]+=n}return o}var Fr;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"})(Fr||(Fr={}));var Mn,B0=class{constructor(t){Mn=t}parse(t,r){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),i=xxe(t),o=Axe(Object.assign(Object.create(null),n.alias)),s=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),a=Object.assign(Object.create(null),n.default),c=n.configObjects||[],u=n.envPrefix,d=s["populate--"],p=d?"--":"_",m=Object.create(null),h=Object.create(null),v=n.__||Mn.format,_={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},g=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,x=new RegExp("^--"+s["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(E){let b=typeof E=="object"?E.key:E,D=Object.keys(E).map(function(T){return{boolean:"bools",string:"strings",number:"numbers"}[T]}).filter(Boolean).pop();D&&(_[D][b]=!0),_.arrays[b]=!0,_.keys.push(b)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(E){_.bools[E]=!0,_.keys.push(E)}),[].concat(n.string||[]).filter(Boolean).forEach(function(E){_.strings[E]=!0,_.keys.push(E)}),[].concat(n.number||[]).filter(Boolean).forEach(function(E){_.numbers[E]=!0,_.keys.push(E)}),[].concat(n.count||[]).filter(Boolean).forEach(function(E){_.counts[E]=!0,_.keys.push(E)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(E){_.normalize[E]=!0,_.keys.push(E)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([E,b])=>{typeof b=="number"&&(_.nargs[E]=b,_.keys.push(E))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([E,b])=>{typeof b=="function"&&(_.coercions[E]=b,_.keys.push(E))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(E){_.configs[E]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([E,b])=>{(typeof b=="boolean"||typeof b=="function")&&(_.configs[E]=b)})),Bn(n.key,o,n.default,_.arrays),Object.keys(a).forEach(function(E){(_.aliases[E]||[]).forEach(function(b){a[b]=a[E]})});let S=null;Em();let M=[],k=Object.assign(Object.create(null),{_:[]}),me={};for(let E=0;E<i.length;E++){let b=i[E],D=b.replace(/^-{3,}/,"---"),T,C,B,j,te,Ye;if(b!=="--"&&So(b))Te(b);else if(D.match(/---+(=|$)/)){Te(b);continue}else if(b.match(/^--.+=/)||!s["short-option-groups"]&&b.match(/^-.+=/))j=b.match(/^--?([^=]+)=([\s\S]*)$/),j!==null&&Array.isArray(j)&&j.length>=3&&(ne(j[1],_.arrays)?E=Ne(E,j[1],i,j[2]):ne(j[1],_.nargs)!==!1?E=Je(E,j[1],i,j[2]):O(j[1],j[2]));else if(b.match(x)&&s["boolean-negation"])j=b.match(x),j!==null&&Array.isArray(j)&&j.length>=2&&(C=j[1],O(C,ne(C,_.arrays)?[!1]:!1));else if(b.match(/^--.+/)||!s["short-option-groups"]&&b.match(/^-[^-]+/))j=b.match(/^--?(.+)/),j!==null&&Array.isArray(j)&&j.length>=2&&(C=j[1],ne(C,_.arrays)?E=Ne(E,C,i):ne(C,_.nargs)!==!1?E=Je(E,C,i):(te=i[E+1],te!==void 0&&(!te.match(/^-/)||te.match(g))&&!ne(C,_.bools)&&!ne(C,_.counts)||/^(true|false)$/.test(te)?(O(C,te),E++):O(C,gt(C))));else if(b.match(/^-.\..+=/))j=b.match(/^-([^=]+)=([\s\S]*)$/),j!==null&&Array.isArray(j)&&j.length>=3&&O(j[1],j[2]);else if(b.match(/^-.\..+/)&&!b.match(g))te=i[E+1],j=b.match(/^-(.\..+)/),j!==null&&Array.isArray(j)&&j.length>=2&&(C=j[1],te!==void 0&&!te.match(/^-/)&&!ne(C,_.bools)&&!ne(C,_.counts)?(O(C,te),E++):O(C,gt(C)));else if(b.match(/^-[^-]+/)&&!b.match(g)){B=b.slice(1,-1).split(""),T=!1;for(let st=0;st<B.length;st++){if(te=b.slice(st+2),B[st+1]&&B[st+1]==="="){Ye=b.slice(st+3),C=B[st],ne(C,_.arrays)?E=Ne(E,C,i,Ye):ne(C,_.nargs)!==!1?E=Je(E,C,i,Ye):O(C,Ye),T=!0;break}if(te==="-"){O(B[st],te);continue}if(/[A-Za-z]/.test(B[st])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(te)&&ne(te,_.bools)===!1){O(B[st],te),T=!0;break}if(B[st+1]&&B[st+1].match(/\W/)){O(B[st],te),T=!0;break}else O(B[st],gt(B[st]))}C=b.slice(-1)[0],!T&&C!=="-"&&(ne(C,_.arrays)?E=Ne(E,C,i):ne(C,_.nargs)!==!1?E=Je(E,C,i):(te=i[E+1],te!==void 0&&(!/^(-|--)[^-]/.test(te)||te.match(g))&&!ne(C,_.bools)&&!ne(C,_.counts)||/^(true|false)$/.test(te)?(O(C,te),E++):O(C,gt(C))))}else if(b.match(/^-[0-9]$/)&&b.match(g)&&ne(b.slice(1),_.bools))C=b.slice(1),O(C,gt(C));else if(b==="--"){M=i.slice(E+1);break}else if(s["halt-at-non-option"]){M=i.slice(E);break}else Te(b)}we(k,!0),we(k,!1),He(k),Ce(),Se(k,_.aliases,a,!0),Ee(k),s["set-placeholder-key"]&&Ve(k),Object.keys(_.counts).forEach(function(E){cn(k,E.split("."))||O(E,0)}),d&&M.length&&(k[p]=[]),M.forEach(function(E){k[p].push(E)}),s["camel-case-expansion"]&&s["strip-dashed"]&&Object.keys(k).filter(E=>E!=="--"&&E.includes("-")).forEach(E=>{delete k[E]}),s["strip-aliased"]&&[].concat(...Object.keys(o).map(E=>o[E])).forEach(E=>{s["camel-case-expansion"]&&E.includes("-")&&delete k[E.split(".").map(b=>zc(b)).join(".")],delete k[E]});function Te(E){let b=be("_",E);(typeof b=="string"||typeof b=="number")&&k._.push(b)}function Je(E,b,D,T){let C,B=ne(b,_.nargs);if(B=typeof B!="number"||isNaN(B)?1:B,B===0)return ir(T)||(S=Error(v("Argument unexpected for: %s",b))),O(b,gt(b)),E;let j=ir(T)?0:1;if(s["nargs-eats-options"])D.length-(E+1)+j<B&&(S=Error(v("Not enough arguments following: %s",b))),j=B;else{for(C=E+1;C<D.length&&(!D[C].match(/^-[^0-9]/)||D[C].match(g)||So(D[C]));C++)j++;j<B&&(S=Error(v("Not enough arguments following: %s",b)))}let te=Math.min(j,B);for(!ir(T)&&te>0&&(O(b,T),te--),C=E+1;C<te+E+1;C++)O(b,D[C]);return E+te}function Ne(E,b,D,T){let C=[],B=T||D[E+1],j=ne(b,_.nargs);if(ne(b,_.bools)&&!/^(true|false)$/.test(B))C.push(!0);else if(ir(B)||ir(T)&&/^-/.test(B)&&!g.test(B)&&!So(B)){if(a[b]!==void 0){let te=a[b];C=Array.isArray(te)?te:[te]}}else{ir(T)||C.push(oe(b,T));for(let te=E+1;te<D.length&&!(!s["greedy-arrays"]&&C.length>0||j&&typeof j=="number"&&C.length>=j||(B=D[te],/^-/.test(B)&&!g.test(B)&&!So(B)));te++)E=te,C.push(oe(b,B))}return typeof j=="number"&&(j&&C.length<j||isNaN(j)&&C.length===0)&&(S=Error(v("Not enough arguments following: %s",b))),O(b,C),E}function O(E,b){if(/-/.test(E)&&s["camel-case-expansion"]){let C=E.split(".").map(function(B){return zc(B)}).join(".");q(E,C)}let D=oe(E,b),T=E.split(".");Me(k,T,D),_.aliases[E]&&_.aliases[E].forEach(function(C){let B=C.split(".");Me(k,B,D)}),T.length>1&&s["dot-notation"]&&(_.aliases[T[0]]||[]).forEach(function(C){let B=C.split("."),j=[].concat(T);j.shift(),B=B.concat(j),(_.aliases[E]||[]).includes(B.join("."))||Me(k,B,D)}),ne(E,_.normalize)&&!ne(E,_.arrays)&&[E].concat(_.aliases[E]||[]).forEach(function(B){Object.defineProperty(me,B,{enumerable:!0,get(){return b},set(j){b=typeof j=="string"?Mn.normalize(j):j}})})}function q(E,b){_.aliases[E]&&_.aliases[E].length||(_.aliases[E]=[b],m[b]=!0),_.aliases[b]&&_.aliases[b].length||q(b,E)}function oe(E,b){typeof b=="string"&&(b[0]==="'"||b[0]==='"')&&b[b.length-1]===b[0]&&(b=b.substring(1,b.length-1)),(ne(E,_.bools)||ne(E,_.counts))&&typeof b=="string"&&(b=b==="true");let D=Array.isArray(b)?b.map(function(T){return be(E,T)}):be(E,b);return ne(E,_.counts)&&(ir(D)||typeof D=="boolean")&&(D=F0()),ne(E,_.normalize)&&ne(E,_.arrays)&&(Array.isArray(b)?D=b.map(T=>Mn.normalize(T)):D=Mn.normalize(b)),D}function be(E,b){return!s["parse-positional-numbers"]&&E==="_"||!ne(E,_.strings)&&!ne(E,_.bools)&&!Array.isArray(b)&&(F6(b)&&s["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${b}`)))||!ir(b)&&ne(E,_.numbers))&&(b=Number(b)),b}function He(E){let b=Object.create(null);Se(b,_.aliases,a),Object.keys(_.configs).forEach(function(D){let T=E[D]||b[D];if(T)try{let C=null,B=Mn.resolve(Mn.cwd(),T),j=_.configs[D];if(typeof j=="function"){try{C=j(B)}catch(te){C=te}if(C instanceof Error){S=C;return}}else C=Mn.require(B);Oe(C)}catch(C){C.name==="PermissionDenied"?S=C:E[D]&&(S=Error(v("Invalid JSON config file: %s",T)))}})}function Oe(E,b){Object.keys(E).forEach(function(D){let T=E[D],C=b?b+"."+D:D;typeof T=="object"&&T!==null&&!Array.isArray(T)&&s["dot-notation"]?Oe(T,C):(!cn(k,C.split("."))||ne(C,_.arrays)&&s["combine-arrays"])&&O(C,T)})}function Ce(){typeof c<"u"&&c.forEach(function(E){Oe(E)})}function we(E,b){if(typeof u>"u")return;let D=typeof u=="string"?u:"",T=Mn.env();Object.keys(T).forEach(function(C){if(D===""||C.lastIndexOf(D,0)===0){let B=C.split("__").map(function(j,te){return te===0&&(j=j.substring(D.length)),zc(j)});(b&&_.configs[B.join(".")]||!b)&&!cn(E,B)&&O(B.join("."),T[C])}})}function Ee(E){let b,D=new Set;Object.keys(E).forEach(function(T){if(!D.has(T)&&(b=ne(T,_.coercions),typeof b=="function"))try{let C=be(T,b(E[T]));[].concat(_.aliases[T]||[],T).forEach(B=>{D.add(B),E[B]=C})}catch(C){S=C}})}function Ve(E){return _.keys.forEach(b=>{~b.indexOf(".")||typeof E[b]>"u"&&(E[b]=void 0)}),E}function Se(E,b,D,T=!1){Object.keys(D).forEach(function(C){cn(E,C.split("."))||(Me(E,C.split("."),D[C]),T&&(h[C]=!0),(b[C]||[]).forEach(function(B){cn(E,B.split("."))||Me(E,B.split("."),D[C])}))})}function cn(E,b){let D=E;s["dot-notation"]||(b=[b.join(".")]),b.slice(0,-1).forEach(function(C){D=D[C]||{}});let T=b[b.length-1];return typeof D!="object"?!1:T in D}function Me(E,b,D){let T=E;s["dot-notation"]||(b=[b.join(".")]),b.slice(0,-1).forEach(function(Ye){Ye=M6(Ye),typeof T=="object"&&T[Ye]===void 0&&(T[Ye]={}),typeof T[Ye]!="object"||Array.isArray(T[Ye])?(Array.isArray(T[Ye])?T[Ye].push({}):T[Ye]=[T[Ye],{}],T=T[Ye][T[Ye].length-1]):T=T[Ye]});let C=M6(b[b.length-1]),B=ne(b.join("."),_.arrays),j=Array.isArray(D),te=s["duplicate-arguments-array"];!te&&ne(C,_.nargs)&&(te=!0,(!ir(T[C])&&_.nargs[C]===1||Array.isArray(T[C])&&T[C].length===_.nargs[C])&&(T[C]=void 0)),D===F0()?T[C]=F0(T[C]):Array.isArray(T[C])?te&&B&&j?T[C]=s["flatten-duplicate-arrays"]?T[C].concat(D):(Array.isArray(T[C][0])?T[C]:[T[C]]).concat([D]):!te&&!!B==!!j?T[C]=D:T[C]=T[C].concat([D]):T[C]===void 0&&B?T[C]=j?D:[D]:te&&!(T[C]===void 0||ne(C,_.counts)||ne(C,_.bools))?T[C]=[T[C],D]:T[C]=D}function Bn(...E){E.forEach(function(b){Object.keys(b||{}).forEach(function(D){_.aliases[D]||(_.aliases[D]=[].concat(o[D]||[]),_.aliases[D].concat(D).forEach(function(T){if(/-/.test(T)&&s["camel-case-expansion"]){let C=zc(T);C!==D&&_.aliases[D].indexOf(C)===-1&&(_.aliases[D].push(C),m[C]=!0)}}),_.aliases[D].concat(D).forEach(function(T){if(T.length>1&&/[A-Z]/.test(T)&&s["camel-case-expansion"]){let C=k6(T,"-");C!==D&&_.aliases[D].indexOf(C)===-1&&(_.aliases[D].push(C),m[C]=!0)}}),_.aliases[D].forEach(function(T){_.aliases[T]=[D].concat(_.aliases[D].filter(function(C){return T!==C}))}))})})}function ne(E,b){let D=[].concat(_.aliases[E]||[],E),T=Object.keys(b),C=D.find(B=>T.includes(B));return C?b[C]:!1}function ze(E){let b=Object.keys(_);return[].concat(b.map(T=>_[T])).some(function(T){return Array.isArray(T)?T.includes(E):T[E]})}function _m(E,...b){return[].concat(...b).some(function(T){let C=E.match(T);return C&&ze(C[1])})}function vm(E){if(E.match(g)||!E.match(/^-[^-]+/))return!1;let b=!0,D,T=E.slice(1).split("");for(let C=0;C<T.length;C++){if(D=E.slice(C+2),!ze(T[C])){b=!1;break}if(T[C+1]&&T[C+1]==="="||D==="-"||/[A-Za-z]/.test(T[C])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(D)||T[C+1]&&T[C+1].match(/\W/))break}return b}function So(E){return s["unknown-options-as-args"]&&gm(E)}function gm(E){return E=E.replace(/^-{3,}/,"--"),E.match(g)||vm(E)?!1:!_m(E,/^-+([^=]+?)=[\s\S]*$/,x,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function gt(E){return!ne(E,_.bools)&&!ne(E,_.counts)&&`${E}`in a?a[E]:Zc(jn(E))}function Zc(E){return{[Fr.BOOLEAN]:!0,[Fr.STRING]:"",[Fr.NUMBER]:void 0,[Fr.ARRAY]:[]}[E]}function jn(E){let b=Fr.BOOLEAN;return ne(E,_.strings)?b=Fr.STRING:ne(E,_.numbers)?b=Fr.NUMBER:ne(E,_.bools)?b=Fr.BOOLEAN:ne(E,_.arrays)&&(b=Fr.ARRAY),b}function ir(E){return E===void 0}function Em(){Object.keys(_.counts).find(E=>ne(E,_.arrays)?(S=Error(v("Invalid configuration: %s, opts.count excludes opts.array.",E)),!0):ne(E,_.nargs)?(S=Error(v("Invalid configuration: %s, opts.count excludes opts.narg.",E)),!0):!1)}return{aliases:Object.assign({},_.aliases),argv:Object.assign(me,k),configuration:s,defaulted:Object.assign({},h),error:S,newAliases:Object.assign({},m)}}};function Axe(e){let t=[],r=Object.create(null),n=!0;for(Object.keys(e).forEach(function(i){t.push([].concat(e[i],i))});n;){n=!1;for(let i=0;i<t.length;i++)for(let o=i+1;o<t.length;o++)if(t[i].filter(function(a){return t[o].indexOf(a)!==-1}).length){t[i]=t[i].concat(t[o]),t.splice(o,1),n=!0;break}}return t.forEach(function(i){i=i.filter(function(s,a,c){return c.indexOf(s)===a});let o=i.pop();o!==void 0&&typeof o=="string"&&(r[o]=i)}),r}function F0(e){return e!==void 0?e+1:1}function M6(e){return e==="__proto__"?"___proto___":e}var L6=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):10;if(process&&process.version&&Number(process.version.match(/v([^.]+)/)[1])<L6)throw Error(`yargs parser supports a minimum Node.js version of ${L6}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var Txe=process?process.env:{},B6=new B0({cwd:process.cwd,env:()=>Txe,format:Cxe.format,normalize:N6.normalize,resolve:N6.resolve,require:e=>{if(typeof require<"u")return require(e);if(e.match(/\.json$/))return wxe.readFileSync(e,"utf8");throw Error("only .json config files are supported in ESM")}}),Wc=function(t,r){return B6.parse(t.slice(),r).argv};Wc.detailed=function(e,t){return B6.parse(e.slice(),t)};Wc.camelCase=zc;Wc.decamelize=k6;Wc.looksLikeNumber=F6;j6.exports=Wc});var PV=y((Kc,Hs)=>{var Pxe=200,Q6="__lodash_hash_undefined__",Z6=9007199254740991,z0="[object Arguments]",Ixe="[object Array]",eV="[object Boolean]",tV="[object Date]",Oxe="[object Error]",W0="[object Function]",rV="[object GeneratorFunction]",im="[object Map]",nV="[object Number]",K0="[object Object]",U6="[object Promise]",iV="[object RegExp]",om="[object Set]",oV="[object String]",sV="[object Symbol]",q0="[object WeakMap]",aV="[object ArrayBuffer]",sm="[object DataView]",cV="[object Float32Array]",uV="[object Float64Array]",lV="[object Int8Array]",dV="[object Int16Array]",pV="[object Int32Array]",fV="[object Uint8Array]",mV="[object Uint8ClampedArray]",hV="[object Uint16Array]",yV="[object Uint32Array]",Rxe=/[\\^$.*+?()[\]{}|]/g,Dxe=/\w*$/,Nxe=/^\[object .+?Constructor\]$/,Mxe=/^(?:0|[1-9]\d*)$/,De={};De[z0]=De[Ixe]=De[aV]=De[sm]=De[eV]=De[tV]=De[cV]=De[uV]=De[lV]=De[dV]=De[pV]=De[im]=De[nV]=De[K0]=De[iV]=De[om]=De[oV]=De[sV]=De[fV]=De[mV]=De[hV]=De[yV]=!0;De[Oxe]=De[W0]=De[q0]=!1;var Lxe=typeof global=="object"&&global&&global.Object===Object&&global,kxe=typeof self=="object"&&self&&self.Object===Object&&self,Ln=Lxe||kxe||Function("return this")(),_V=typeof Kc=="object"&&Kc&&!Kc.nodeType&&Kc,G6=_V&&typeof Hs=="object"&&Hs&&!Hs.nodeType&&Hs,Fxe=G6&&G6.exports===_V;function Bxe(e,t){return e.set(t[0],t[1]),e}function jxe(e,t){return e.add(t),e}function qxe(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Uxe(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function vV(e,t,r,n){var i=-1,o=e?e.length:0;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Gxe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function $xe(e,t){return e==null?void 0:e[t]}function gV(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function $6(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function J0(e,t){return function(r){return e(t(r))}}function H6(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Hxe=Array.prototype,Vxe=Function.prototype,am=Object.prototype,j0=Ln["__core-js_shared__"],V6=(function(){var e=/[^.]+$/.exec(j0&&j0.keys&&j0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),EV=Vxe.toString,Li=am.hasOwnProperty,cm=am.toString,zxe=RegExp("^"+EV.call(Li).replace(Rxe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),z6=Fxe?Ln.Buffer:void 0,W6=Ln.Symbol,K6=Ln.Uint8Array,Wxe=J0(Object.getPrototypeOf,Object),Kxe=Object.create,Jxe=am.propertyIsEnumerable,Yxe=Hxe.splice,J6=Object.getOwnPropertySymbols,Xxe=z6?z6.isBuffer:void 0,Qxe=J0(Object.keys,Object),U0=Ws(Ln,"DataView"),Jc=Ws(Ln,"Map"),G0=Ws(Ln,"Promise"),$0=Ws(Ln,"Set"),H0=Ws(Ln,"WeakMap"),Yc=Ws(Object,"create"),Zxe=Eo(U0),eAe=Eo(Jc),tAe=Eo(G0),rAe=Eo($0),nAe=Eo(H0),Y6=W6?W6.prototype:void 0,X6=Y6?Y6.valueOf:void 0;function go(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function iAe(){this.__data__=Yc?Yc(null):{}}function oAe(e){return this.has(e)&&delete this.__data__[e]}function sAe(e){var t=this.__data__;if(Yc){var r=t[e];return r===Q6?void 0:r}return Li.call(t,e)?t[e]:void 0}function aAe(e){var t=this.__data__;return Yc?t[e]!==void 0:Li.call(t,e)}function cAe(e,t){var r=this.__data__;return r[e]=Yc&&t===void 0?Q6:t,this}go.prototype.clear=iAe;go.prototype.delete=oAe;go.prototype.get=sAe;go.prototype.has=aAe;go.prototype.set=cAe;function kn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function uAe(){this.__data__=[]}function lAe(e){var t=this.__data__,r=um(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Yxe.call(t,r,1),!0}function dAe(e){var t=this.__data__,r=um(t,e);return r<0?void 0:t[r][1]}function pAe(e){return um(this.__data__,e)>-1}function fAe(e,t){var r=this.__data__,n=um(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}kn.prototype.clear=uAe;kn.prototype.delete=lAe;kn.prototype.get=dAe;kn.prototype.has=pAe;kn.prototype.set=fAe;function Vs(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function mAe(){this.__data__={hash:new go,map:new(Jc||kn),string:new go}}function hAe(e){return lm(this,e).delete(e)}function yAe(e){return lm(this,e).get(e)}function _Ae(e){return lm(this,e).has(e)}function vAe(e,t){return lm(this,e).set(e,t),this}Vs.prototype.clear=mAe;Vs.prototype.delete=hAe;Vs.prototype.get=yAe;Vs.prototype.has=_Ae;Vs.prototype.set=vAe;function zs(e){this.__data__=new kn(e)}function gAe(){this.__data__=new kn}function EAe(e){return this.__data__.delete(e)}function SAe(e){return this.__data__.get(e)}function bAe(e){return this.__data__.has(e)}function CAe(e,t){var r=this.__data__;if(r instanceof kn){var n=r.__data__;if(!Jc||n.length<Pxe-1)return n.push([e,t]),this;r=this.__data__=new Vs(n)}return r.set(e,t),this}zs.prototype.clear=gAe;zs.prototype.delete=EAe;zs.prototype.get=SAe;zs.prototype.has=bAe;zs.prototype.set=CAe;function wAe(e,t){var r=X0(e)||KAe(e)?Gxe(e.length,String):[],n=r.length,i=!!n;for(var o in e)(t||Li.call(e,o))&&!(i&&(o=="length"||HAe(o,n)))&&r.push(o);return r}function SV(e,t,r){var n=e[t];(!(Li.call(e,t)&&xV(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function um(e,t){for(var r=e.length;r--;)if(xV(e[r][0],t))return r;return-1}function xAe(e,t){return e&&bV(t,Q0(t),e)}function V0(e,t,r,n,i,o,s){var a;if(n&&(a=o?n(e,i,o,s):n(e)),a!==void 0)return a;if(!dm(e))return e;var c=X0(e);if(c){if(a=UAe(e),!t)return BAe(e,a)}else{var u=vo(e),d=u==W0||u==rV;if(YAe(e))return RAe(e,t);if(u==K0||u==z0||d&&!o){if(gV(e))return o?e:{};if(a=GAe(d?{}:e),!t)return jAe(e,xAe(a,e))}else{if(!De[u])return o?e:{};a=$Ae(e,u,V0,t)}}s||(s=new zs);var p=s.get(e);if(p)return p;if(s.set(e,a),!c)var m=r?qAe(e):Q0(e);return qxe(m||e,function(h,v){m&&(v=h,h=e[v]),SV(a,v,V0(h,t,r,n,v,e,s))}),a}function AAe(e){return dm(e)?Kxe(e):{}}function TAe(e,t,r){var n=t(e);return X0(e)?n:Uxe(n,r(e))}function PAe(e){return cm.call(e)}function IAe(e){if(!dm(e)||zAe(e))return!1;var t=TV(e)||gV(e)?zxe:Nxe;return t.test(Eo(e))}function OAe(e){if(!wV(e))return Qxe(e);var t=[];for(var r in Object(e))Li.call(e,r)&&r!="constructor"&&t.push(r);return t}function RAe(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function Y0(e){var t=new e.constructor(e.byteLength);return new K6(t).set(new K6(e)),t}function DAe(e,t){var r=t?Y0(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function NAe(e,t,r){var n=t?r($6(e),!0):$6(e);return vV(n,Bxe,new e.constructor)}function MAe(e){var t=new e.constructor(e.source,Dxe.exec(e));return t.lastIndex=e.lastIndex,t}function LAe(e,t,r){var n=t?r(H6(e),!0):H6(e);return vV(n,jxe,new e.constructor)}function kAe(e){return X6?Object(X6.call(e)):{}}function FAe(e,t){var r=t?Y0(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function BAe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function bV(e,t,r,n){r||(r={});for(var i=-1,o=t.length;++i<o;){var s=t[i],a=n?n(r[s],e[s],s,r,e):void 0;SV(r,s,a===void 0?e[s]:a)}return r}function jAe(e,t){return bV(e,CV(e),t)}function qAe(e){return TAe(e,Q0,CV)}function lm(e,t){var r=e.__data__;return VAe(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Ws(e,t){var r=$xe(e,t);return IAe(r)?r:void 0}var CV=J6?J0(J6,Object):ZAe,vo=PAe;(U0&&vo(new U0(new ArrayBuffer(1)))!=sm||Jc&&vo(new Jc)!=im||G0&&vo(G0.resolve())!=U6||$0&&vo(new $0)!=om||H0&&vo(new H0)!=q0)&&(vo=function(e){var t=cm.call(e),r=t==K0?e.constructor:void 0,n=r?Eo(r):void 0;if(n)switch(n){case Zxe:return sm;case eAe:return im;case tAe:return U6;case rAe:return om;case nAe:return q0}return t});function UAe(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&Li.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function GAe(e){return typeof e.constructor=="function"&&!wV(e)?AAe(Wxe(e)):{}}function $Ae(e,t,r,n){var i=e.constructor;switch(t){case aV:return Y0(e);case eV:case tV:return new i(+e);case sm:return DAe(e,n);case cV:case uV:case lV:case dV:case pV:case fV:case mV:case hV:case yV:return FAe(e,n);case im:return NAe(e,n,r);case nV:case oV:return new i(e);case iV:return MAe(e);case om:return LAe(e,n,r);case sV:return kAe(e)}}function HAe(e,t){return t=t??Z6,!!t&&(typeof e=="number"||Mxe.test(e))&&e>-1&&e%1==0&&e<t}function VAe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function zAe(e){return!!V6&&V6 in e}function wV(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||am;return e===r}function Eo(e){if(e!=null){try{return EV.call(e)}catch{}try{return e+""}catch{}}return""}function WAe(e){return V0(e,!0,!0)}function xV(e,t){return e===t||e!==e&&t!==t}function KAe(e){return JAe(e)&&Li.call(e,"callee")&&(!Jxe.call(e,"callee")||cm.call(e)==z0)}var X0=Array.isArray;function AV(e){return e!=null&&XAe(e.length)&&!TV(e)}function JAe(e){return QAe(e)&&AV(e)}var YAe=Xxe||eTe;function TV(e){var t=dm(e)?cm.call(e):"";return t==W0||t==rV}function XAe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Z6}function dm(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function QAe(e){return!!e&&typeof e=="object"}function Q0(e){return AV(e)?wAe(e):OAe(e)}function ZAe(){return[]}function eTe(){return!1}Hs.exports=WAe});var BV=y((ake,FV)=>{"use strict";var tTe=require("fs"),rTe=q6(),Ks=PV(),nTe=["__proto__.","constructor.prototype."],iTe="strict",IV="warn";function ki(e,t){if(!e)throw new Error(t)}function OV(e){return Number.isInteger(e)&&e>=0&&e<=65535}function tE(e){return String(e).includes("\\\\.\\pipe\\")}var Xc={"*":function(){},int:function(e){ki(Number.isInteger(e),"must be an integer")},nat:function(e){ki(Number.isInteger(e)&&e>=0,"must be a positive integer")},port:function(e){ki(OV(e),"ports must be within range 0 - 65535")},windows_named_pipe:function(e){ki(tE(e),"must be a valid pipe")},port_or_windows_named_pipe:function(e){tE(e)||ki(OV(e),"must be a windows named pipe or a number within range 0 - 65535")}};Xc.integer=Xc.int;var rE=new Map,nE={"*":JSON.parse};function RV(e,t){let r=Object.keys(e),n,i=[];for(;r.length;){n=r.shift();let s=Js(e,n);if(typeof s=="object"&&!Array.isArray(s)&&s!=null){if(t)if("_cvtProperties"in s)s=s._cvtProperties,n=`${n}._cvtProperties`;else{i.push([n,s]);continue}let a=Object.keys(s);if(a.length>0){a.forEach(function(c){r.push(`${n}.${c}`)});continue}}i.push([n,s])}let o={};return i.forEach(function(s){let a=s[0];t&&(a=a.replace(/\._cvtProperties/g,""));let c=s[1];o[a]=c}),o}function oTe(e,t,r){let n={undeclared:[],invalid_type:[],missing:[]},i=RV(e),o=RV(t._cvtProperties,!0);return Object.keys(o).forEach(function(s){let a=o[s],c=i[s];if(!(s in i))try{if(typeof a.default=="object"&&!Array.isArray(a.default))c=Js(e,s);else throw new Error("missing")}catch{let d=new Error(`configuration param '${s}' missing from config, did you override its parent?`);n.missing.push(d);return}if(delete i[s],(a.format==="object"||typeof a.default=="object")&&Object.keys(i).filter(function(u){return u.lastIndexOf(`${s}.`,0)===0}).forEach(function(u){delete i[u]}),!(typeof a.default>"u"&&c===a.default))try{a._format(c)}catch(u){n.invalid_type.push(u)}}),r&&Object.keys(i).forEach(function(s){let a=new Error(`configuration param '${s}' not declared in the schema`);n.undeclared.push(a)}),n}function sTe(e,t){ki(e.indexOf(t)!==-1,`must be one of the possible values: ${JSON.stringify(e)}`)}var oE={Object,Array,String,Number,Boolean,RegExp},MV=Object.keys(oE),aTe=MV.map(function(e){return oE[e]});function LV(e,t,r,n,i,o,s){if(e==="_cvtProperties")throw new Error(`'${n}': '_cvtProperties' is reserved word of convict.`);if(typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length>0&&!("default"in t)){r[e]={_cvtProperties:{}},Object.keys(t).forEach(function(d){LV(d,t[d],r[e]._cvtProperties,`${n}.${d}`,i,o,s)});return}else(typeof t!="object"||Array.isArray(t)||t===null||Object.keys(t).length==0)&&(t={default:t});let a=Ks(t);if(r[e]=a,a.env&&(i[a.env]||(i[a.env]=[]),i[a.env].push(n)),a.arg){if(o[a.arg])throw new Error(`'${n}' reuses a command-line argument: ${a.arg}`);o[a.arg]=n}a.sensitive===!0&&s.add(n);let c=a.format,u;if(aTe.indexOf(c)>=0||MV.indexOf(c)>=0){let d=typeof c=="string"?oE[c]:c;u=function(p){ki(Object.prototype.toString.call(p)==Object.prototype.toString.call(new d),`must be of type ${d.name}`)},a.format=d.name.toLowerCase()}else if(typeof c=="string"){if(!Xc[c])throw new Error(`'${n}' uses an unknown format type: ${c}`);u=Xc[c]}else if(Array.isArray(c))u=sTe.bind(null,c);else if(typeof c=="function")u=c;else if(c&&typeof c!="function")throw new Error(`'${n}': "format" must be a function or a known format type.`);if(!u&&!c){let d=Object.prototype.toString.call(a.default);u=function(p){ki(Object.prototype.toString.call(p)==d," should be of type "+d.replace(/\[.* |]/g,""))}}a._format=function(d){if(!(this.nullable&&d===null))try{u(d,this)}catch(p){throw p.fullName=n,p.value=d,p}}}function Z0(e){let t=e.getEnv();Object.keys(e._env).forEach(function(r){t[r]!==void 0&&e._env[r].forEach(function(i){e.set(i,t[r])})})}function eE(e){let t=rTe(e.getArgs(),{configuration:{"dot-notation":!1}});Object.keys(e._argv).forEach(function(r){let n=e._argv[r];t[r]!==void 0&&e.set(n,String(t[r]))})}function kV(e,t,r){Object.keys(e._cvtProperties).forEach(function(n){let i=e._cvtProperties[n];if(i._cvtProperties){let o=t[n]||{};kV(i,o,r),t[n]=o}else t[n]=sE(n,Ks(i.default),e,r)})}function DV(e){return typeof e=="object"&&e!==null}function iE(e,t,r){Object.keys(e).forEach(function(n){Array.isArray(e[n])||!DV(e[n])||!r||r.format==="object"?t[n]=sE(n,e[n],r):(DV(t[n])||(t[n]={}),iE(e[n],t[n],r._cvtProperties[n]))})}function cTe(e,t){let r=t.split("."),n=e;for(;r.length>0;){let i=r.shift();if(n&&n._cvtProperties&&n._cvtProperties[i])n=n._cvtProperties[i];else{n=null;break}}return n}function uTe(e,t){let r=cTe(e,t);return r==null?null:typeof r.format=="string"?r.format:r.default!=null?typeof r.default:null}function sE(e,t,r,n){let i=uTe(r,e);if(typeof t=="string"){if(rE.has(i))return rE.get(i)(t,n,e);switch(i){case"port":case"nat":case"integer":case"int":t=parseInt(t,10);break;case"port_or_windows_named_pipe":t=tE(t)?t:parseInt(t,10);break;case"number":t=parseFloat(t);break;case"boolean":t=String(t).toLowerCase()!=="false";break;case"array":t=t.split(",");break;case"object":t=JSON.parse(t);break;case"regexp":t=new RegExp(t);break;default:}}return t}function NV(e){let t=e.split("."),r=t.length>1?t.pop():"";return(nE[r]||nE["*"])(tTe.readFileSync(e,"utf-8"))}function Js(e,t,r){if(t){let n=t.split(".");for(;n.length;){let i=n.shift();if(r&&e[i]==null)e[i]={},e=e[i];else if(i in e)e=e[i];else throw new Error(`cannot find configuration param '${t}'`)}}return e}var Qc=function(t,r){let n={getArgs:function(){return r&&r.args||process.argv.slice(2)},getEnv:function(){return r&&r.env||process.env},getProperties:function(){return Ks(this._instance)},toString:function(){let i=Ks(this._instance);return this._sensitive.forEach(function(o){let s=o.split("."),a=s.pop(),c=s.join("."),u=Js(i,c);u[a]="[Sensitive]"}),JSON.stringify(i,null,2)},getSchema:function(){return JSON.parse(JSON.stringify(this._schema))},getSchemaString:function(){return JSON.stringify(this._schema,null,2)},get:function(i){let o=Js(this._instance,i);return Ks(o)},default:function(i){i=i.split(".").join("._cvtProperties.")+".default";let o=Js(this._schema._cvtProperties,i);return Ks(o)},reset:function(i){this.set(i,this.default(i))},has:function(i){try{return typeof this.get(i)<"u"}catch{return!1}},set:function(i,o){for(let d of nTe)if(i.startsWith(d)||i.includes(`.${d}`))return this;o=sE(i,o,this._schema,this);let s=i.split("."),a=s.pop(),c=s.join("."),u=Js(this._instance,c,!0);return u[a]=o,this},load:function(i){return iE(i,this._instance,this._schema),Z0(n),eE(n),this},loadFile:function(i){let o=this;return Array.isArray(i)||(i=[i]),i.forEach(function(s){let a=NV(s);a&&iE(a,o._instance,o._schema)}),Z0(n),eE(n),this},validate:function(i){if(i=i||{},i.allowed=i.allowed||IV,i.output&&typeof i.output!="function")throw new Error("options.output is optional and must be a function.");let o=i.output||global.console.log,s=oTe(this._instance,this._schema,i.allowed);if(s.invalid_type.length+s.undeclared.length+s.missing.length){let a=this._sensitive,c=function(v){let _="";for(let g=0;g<v.length;g++){_.length&&(_+=`
63
- `);let x=v[g];x.fullName&&(_+=x.fullName+": "),x.message&&(_+=x.message),x.value&&!a.has(x.fullName)&&(_+=": value was "+JSON.stringify(x.value))}return _},u=c(s.invalid_type),d=c(s.undeclared),p=c(s.missing),m=[u,p];if(i.allowed===IV&&d.length){let v="Warning:";process.stdout.isTTY&&(v="\x1B[33;1m"+v+"\x1B[0m"),o(v+" "+d)}else i.allowed===iTe&&m.push(d);let h=m.filter(function(v){return v.length}).join(`
64
- `);if(h.length)throw new Error(h)}return this}};return typeof t=="string"?n._def=NV(t):n._def=t,n._schema={_cvtProperties:{}},n._env={},n._argv={},n._sensitive=new Set,Object.keys(n._def).forEach(function(i){LV(i,n._def[i],n._schema._cvtProperties,i,n._env,n._argv,n._sensitive)}),n._instance={},kV(n._schema,n._instance,n),Z0(n),eE(n),n};Qc.addFormat=function(e,t,r){if(typeof e=="object"&&(t=e.validate,r=e.coerce,e=e.name),typeof t!="function")throw new Error(`Validation function for '${e}' must be a function.`);if(r&&typeof r!="function")throw new Error(`Coerce function for '${e}' must be a function.`);Xc[e]=t,r&&rE.set(e,r)};Qc.addFormats=function(e){Object.keys(e).forEach(function(t){Qc.addFormat(t,e[t].validate,e[t].coerce)})};Qc.addParser=function(e){Array.isArray(e)||(e=[e]),e.forEach(function(t){if(!t)throw new Error("Invalid parser");if(!t.extension)throw new Error("Missing parser.extension");if(!t.parse)throw new Error("Missing parser.parse function");if(typeof t.parse!="function")throw new Error("Invalid parser.parse function");(Array.isArray(t.extension)?t.extension:[t.extension]).forEach(function(n){if(typeof n!="string")throw new Error("Invalid parser.extension");nE[n]=t.parse})})};FV.exports=Qc});var jV=y(Ys=>{"use strict";var pm=Ys&&Ys.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.TSConvict=void 0;var an=pm(k0()),aE=pm(BV()),lTe=pm(require("fs")),dTe=pm(require("path")),cE=class{constructor(t){if(this.opts={},!an.default.isConfigClass)throw new Error("A class must be decorated with Config or at least one Property");let r=an.default.getConvictMetaForClass(t);r!==null&&(typeof r.parser<"u"&&aE.default.addParser(r.parser),typeof r.formats<"u"&&aE.default.addFormats(r.formats),this.opts=r),this.baseModel=new t,this.schema=this.getSchemaFor(this.baseModel),this.client=aE.default(this.schema)}load(t=null){let r=null;if(typeof this.opts.file<"u"&&lTe.default.existsSync(dTe.default.resolve(this.opts.file))&&(r=this.opts.file),typeof t=="string"||Array.isArray(t)){let o;Array.isArray(t)?o=t:o=[t],r!==null&&o.unshift(r),this.client.loadFile(o)}else if(t===null)r!==null?this.client.loadFile(r):this.client.load({});else if(typeof t=="object")r!==null&&this.client.loadFile(r),this.client.load(t);else throw new Error(`Could not load the config given: ${t}`);let n=this.opts.validationMethod===void 0?"strict":this.opts.validationMethod;this.client.validate({allowed:n});let i=this.client.getProperties();return this.applyDataToModel(this.baseModel,i)}getSchemaFor(t){let r={};for(let n of an.default.getClassProperties(t)){let i=an.default.getConvictMetaForProperty(t,n);if(an.default.isConstructor(i)&&an.default.isConfigClass(i))try{t[n]=new i,r[n]=this.getSchemaFor(t[n])}catch(o){throw console.error(o),new Error("Could not make a new class of "+i)}else r[n]=i}return r}applyDataToModel(t,r){for(let n of an.default.getClassProperties(t)){let i=an.default.getConvictMetaForProperty(t,n);an.default.isConstructor(i)&&an.default.isConfigClass(i)?this.applyDataToModel(t[n],r[n]||{}):n in r&&(t[n]=r[n])}return t}};Ys.TSConvict=cE});var qV=y(Fn=>{"use strict";var pTe=Fn&&Fn.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),uE=Fn&&Fn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&pTe(t,e,r)};Object.defineProperty(Fn,"__esModule",{value:!0});uE(R6(),Fn);uE(D6(),Fn);uE(jV(),Fn)});var gTe={};ea(gTe,{handler:()=>vTe,overrideDBManager:()=>hTe});module.exports=_e(gTe);YE().install();var XE;(function(e){(function(t){var r=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),n=i(e);typeof r.Reflect>"u"?r.Reflect=e:n=i(r.Reflect,n),t(n);function i(o,s){return function(a,c){typeof o[a]!="function"&&Object.defineProperty(o,a,{configurable:!0,writable:!0,value:c}),s&&s(a,c)}}})(function(t){var r=Object.prototype.hasOwnProperty,n=typeof Symbol=="function",i=n&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",o=n&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",s=typeof Object.create=="function",a={__proto__:[]}instanceof Array,c=!s&&!a,u={create:s?function(){return st(Object.create(null))}:a?function(){return st({__proto__:null})}:function(){return st({})},has:c?function(w,P){return r.call(w,P)}:function(w,P){return P in w},get:c?function(w,P){return r.call(w,P)?w[P]:void 0}:function(w,P){return w[P]}},d=Object.getPrototypeOf(Function),p=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",m=!p&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:j(),h=!p&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:te(),v=!p&&typeof WeakMap=="function"?WeakMap:Ye(),_=new v;function g(w,P,R,F){if(Me(R)){if(!Zc(w))throw new TypeError;if(!ir(P))throw new TypeError;return q(w,P)}else{if(!Zc(w))throw new TypeError;if(!ze(P))throw new TypeError;if(!ze(F)&&!Me(F)&&!Bn(F))throw new TypeError;return Bn(F)&&(F=void 0),R=gt(R),oe(w,P,R,F)}}t("decorate",g);function x(w,P){function R(F,Z){if(!ze(F))throw new TypeError;if(!Me(Z)&&!Em(Z))throw new TypeError;Ee(w,P,F,Z)}return R}t("metadata",x);function S(w,P,R,F){if(!ze(R))throw new TypeError;return Me(F)||(F=gt(F)),Ee(w,P,R,F)}t("defineMetadata",S);function M(w,P,R){if(!ze(P))throw new TypeError;return Me(R)||(R=gt(R)),He(w,P,R)}t("hasMetadata",M);function k(w,P,R){if(!ze(P))throw new TypeError;return Me(R)||(R=gt(R)),Oe(w,P,R)}t("hasOwnMetadata",k);function me(w,P,R){if(!ze(P))throw new TypeError;return Me(R)||(R=gt(R)),Ce(w,P,R)}t("getMetadata",me);function Te(w,P,R){if(!ze(P))throw new TypeError;return Me(R)||(R=gt(R)),we(w,P,R)}t("getOwnMetadata",Te);function Je(w,P){if(!ze(w))throw new TypeError;return Me(P)||(P=gt(P)),Ve(w,P)}t("getMetadataKeys",Je);function Ne(w,P){if(!ze(w))throw new TypeError;return Me(P)||(P=gt(P)),Se(w,P)}t("getOwnMetadataKeys",Ne);function O(w,P,R){if(!ze(P))throw new TypeError;Me(R)||(R=gt(R));var F=be(P,R,!1);if(Me(F)||!F.delete(w))return!1;if(F.size>0)return!0;var Z=_.get(P);return Z.delete(R),Z.size>0||_.delete(P),!0}t("deleteMetadata",O);function q(w,P){for(var R=w.length-1;R>=0;--R){var F=w[R],Z=F(P);if(!Me(Z)&&!Bn(Z)){if(!ir(Z))throw new TypeError;P=Z}}return P}function oe(w,P,R,F){for(var Z=w.length-1;Z>=0;--Z){var lt=w[Z],ae=lt(P,R,F);if(!Me(ae)&&!Bn(ae)){if(!ze(ae))throw new TypeError;F=ae}}return F}function be(w,P,R){var F=_.get(w);if(Me(F)){if(!R)return;F=new m,_.set(w,F)}var Z=F.get(P);if(Me(Z)){if(!R)return;Z=new m,F.set(P,Z)}return Z}function He(w,P,R){var F=Oe(w,P,R);if(F)return!0;var Z=B(P);return Bn(Z)?!1:He(w,Z,R)}function Oe(w,P,R){var F=be(P,R,!1);return Me(F)?!1:So(F.has(w))}function Ce(w,P,R){var F=Oe(w,P,R);if(F)return we(w,P,R);var Z=B(P);if(!Bn(Z))return Ce(w,Z,R)}function we(w,P,R){var F=be(P,R,!1);if(!Me(F))return F.get(w)}function Ee(w,P,R,F){var Z=be(R,F,!0);Z.set(w,P)}function Ve(w,P){var R=Se(w,P),F=B(w);if(F===null)return R;var Z=Ve(F,P);if(Z.length<=0)return R;if(R.length<=0)return Z;for(var lt=new h,ae=[],ce=0,re=R;ce<re.length;ce++){var he=re[ce],ye=lt.has(he);ye||(lt.add(he),ae.push(he))}for(var qn=0,mE=Z;qn<mE.length;qn++){var he=mE[qn],ye=lt.has(he);ye||(lt.add(he),ae.push(he))}return ae}function Se(w,P){var R=[],F=be(w,P,!1);if(Me(F))return R;for(var Z=F.keys(),lt=b(Z),ae=0;;){var ce=T(lt);if(!ce)return R.length=ae,R;var re=D(ce);try{R[ae]=re}catch(he){try{C(lt)}finally{throw he}}ae++}}function cn(w){if(w===null)return 1;switch(typeof w){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return w===null?1:6;default:return 6}}function Me(w){return w===void 0}function Bn(w){return w===null}function ne(w){return typeof w=="symbol"}function ze(w){return typeof w=="object"?w!==null:typeof w=="function"}function _m(w,P){switch(cn(w)){case 0:return w;case 1:return w;case 2:return w;case 3:return w;case 4:return w;case 5:return w}var R=P===3?"string":P===5?"number":"default",F=E(w,i);if(F!==void 0){var Z=F.call(w,R);if(ze(Z))throw new TypeError;return Z}return vm(w,R==="default"?"number":R)}function vm(w,P){if(P==="string"){var R=w.toString;if(jn(R)){var F=R.call(w);if(!ze(F))return F}var Z=w.valueOf;if(jn(Z)){var F=Z.call(w);if(!ze(F))return F}}else{var Z=w.valueOf;if(jn(Z)){var F=Z.call(w);if(!ze(F))return F}var lt=w.toString;if(jn(lt)){var F=lt.call(w);if(!ze(F))return F}}throw new TypeError}function So(w){return!!w}function gm(w){return""+w}function gt(w){var P=_m(w,3);return ne(P)?P:gm(P)}function Zc(w){return Array.isArray?Array.isArray(w):w instanceof Object?w instanceof Array:Object.prototype.toString.call(w)==="[object Array]"}function jn(w){return typeof w=="function"}function ir(w){return typeof w=="function"}function Em(w){switch(cn(w)){case 3:return!0;case 4:return!0;default:return!1}}function E(w,P){var R=w[P];if(R!=null){if(!jn(R))throw new TypeError;return R}}function b(w){var P=E(w,o);if(!jn(P))throw new TypeError;var R=P.call(w);if(!ze(R))throw new TypeError;return R}function D(w){return w.value}function T(w){var P=w.next();return P.done?!1:P}function C(w){var P=w.return;P&&P.call(w)}function B(w){var P=Object.getPrototypeOf(w);if(typeof w!="function"||w===d||P!==d)return P;var R=w.prototype,F=R&&Object.getPrototypeOf(R);if(F==null||F===Object.prototype)return P;var Z=F.constructor;return typeof Z!="function"||Z===w?P:Z}function j(){var w={},P=[],R=(function(){function ae(ce,re,he){this._index=0,this._keys=ce,this._values=re,this._selector=he}return ae.prototype["@@iterator"]=function(){return this},ae.prototype[o]=function(){return this},ae.prototype.next=function(){var ce=this._index;if(ce>=0&&ce<this._keys.length){var re=this._selector(this._keys[ce],this._values[ce]);return ce+1>=this._keys.length?(this._index=-1,this._keys=P,this._values=P):this._index++,{value:re,done:!1}}return{value:void 0,done:!0}},ae.prototype.throw=function(ce){throw this._index>=0&&(this._index=-1,this._keys=P,this._values=P),ce},ae.prototype.return=function(ce){return this._index>=0&&(this._index=-1,this._keys=P,this._values=P),{value:ce,done:!0}},ae})();return(function(){function ae(){this._keys=[],this._values=[],this._cacheKey=w,this._cacheIndex=-2}return Object.defineProperty(ae.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),ae.prototype.has=function(ce){return this._find(ce,!1)>=0},ae.prototype.get=function(ce){var re=this._find(ce,!1);return re>=0?this._values[re]:void 0},ae.prototype.set=function(ce,re){var he=this._find(ce,!0);return this._values[he]=re,this},ae.prototype.delete=function(ce){var re=this._find(ce,!1);if(re>=0){for(var he=this._keys.length,ye=re+1;ye<he;ye++)this._keys[ye-1]=this._keys[ye],this._values[ye-1]=this._values[ye];return this._keys.length--,this._values.length--,ce===this._cacheKey&&(this._cacheKey=w,this._cacheIndex=-2),!0}return!1},ae.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=w,this._cacheIndex=-2},ae.prototype.keys=function(){return new R(this._keys,this._values,F)},ae.prototype.values=function(){return new R(this._keys,this._values,Z)},ae.prototype.entries=function(){return new R(this._keys,this._values,lt)},ae.prototype["@@iterator"]=function(){return this.entries()},ae.prototype[o]=function(){return this.entries()},ae.prototype._find=function(ce,re){return this._cacheKey!==ce&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=ce)),this._cacheIndex<0&&re&&(this._cacheIndex=this._keys.length,this._keys.push(ce),this._values.push(void 0)),this._cacheIndex},ae})();function F(ae,ce){return ae}function Z(ae,ce){return ce}function lt(ae,ce){return[ae,ce]}}function te(){return(function(){function w(){this._map=new m}return Object.defineProperty(w.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),w.prototype.has=function(P){return this._map.has(P)},w.prototype.add=function(P){return this._map.set(P,P),this},w.prototype.delete=function(P){return this._map.delete(P)},w.prototype.clear=function(){this._map.clear()},w.prototype.keys=function(){return this._map.keys()},w.prototype.values=function(){return this._map.values()},w.prototype.entries=function(){return this._map.entries()},w.prototype["@@iterator"]=function(){return this.keys()},w.prototype[o]=function(){return this.keys()},w})()}function Ye(){var w=16,P=u.create(),R=F();return(function(){function re(){this._key=F()}return re.prototype.has=function(he){var ye=Z(he,!1);return ye!==void 0?u.has(ye,this._key):!1},re.prototype.get=function(he){var ye=Z(he,!1);return ye!==void 0?u.get(ye,this._key):void 0},re.prototype.set=function(he,ye){var qn=Z(he,!0);return qn[this._key]=ye,this},re.prototype.delete=function(he){var ye=Z(he,!1);return ye!==void 0?delete ye[this._key]:!1},re.prototype.clear=function(){this._key=F()},re})();function F(){var re;do re="@@WeakMap@@"+ce();while(u.has(P,re));return P[re]=!0,re}function Z(re,he){if(!r.call(re,R)){if(!he)return;Object.defineProperty(re,R,{value:u.create()})}return re[R]}function lt(re,he){for(var ye=0;ye<he;++ye)re[ye]=Math.random()*255|0;return re}function ae(re){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(re)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(re)):lt(new Uint8Array(re),re):lt(new Array(re),re)}function ce(){var re=ae(w);re[6]=re[6]&79|64,re[8]=re[8]&191|128;for(var he="",ye=0;ye<w;++ye){var qn=re[ye];(ye===4||ye===6||ye===8)&&(he+="-"),qn<16&&(he+="0"),he+=qn.toString(16).toLowerCase()}return he}}function st(w){return w.__=void 0,delete w.__,w}})})(XE||(XE={}));var GV=It(fv()),dE=It(Va()),pE=It(Yj()),fE=It(wq()),$V=It(xg()),Qs=It(H$());var IH=It(PH()),sbe={"x-forwarded-for":!0,"x-amzn-trace-id":!0};function c0(e){let{request:t}=e,{headers:r,method:n,body:i,querystring:o,uri:s}=t,a=o.replace(/\[/g,"%5B").replace(/]/g,"%5D"),c=r.host[0].value,u=new URL(`https://${c}${s}${o?`?${o}`:""}`),d={};for(let h of Object.keys(r))sbe[h]||(d[h]=r[h][0].value);let p={};for(let h of u.searchParams.keys())p[h]=u.searchParams.get(h)||"";t.querystring=a;let m;return i&&i.data&&i.encoding==="base64"?m=Buffer.from(i.data,"base64"):i&&i.data&&(m=i.data),new IH.HttpRequest({headers:d,hostname:c,method:n,port:443,protocol:"https:",path:t.uri,body:m,query:p})}var u0=["authorization","x-amz-date","x-amz-security-token","x-amz-content-sha256"];async function OH(e,t,r){let n=c0({request:e});for(let o of u0)delete n.headers[o];let i=await r.sign(n);for(let o of u0)e.headers[o]=[{key:o,value:i.headers[o]}];return e}async function RH(e,t,r){let n=c0({request:e}),i=await r.presign(n);for(let o of u0)e.headers[o]=[{key:o,value:i.headers[o]}];return e}var hm=It(GH());function i6(e){return typeof e>"u"||e===null}function Xbe(e){return typeof e=="object"&&e!==null}function Qbe(e){return Array.isArray(e)?e:i6(e)?[]:[e]}function Zbe(e,t){var r,n,i,o;if(t)for(o=Object.keys(t),r=0,n=o.length;r<n;r+=1)i=o[r],e[i]=t[i];return e}function eCe(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function tCe(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var rCe=i6,nCe=Xbe,iCe=Qbe,oCe=eCe,sCe=tCe,aCe=Zbe,ct={isNothing:rCe,isObject:nCe,toArray:iCe,repeat:oCe,isNegativeZero:sCe,extend:aCe};function o6(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
77
+ see https://github.com/jprichardson/node-fs-extra/issues/269`),af.checkPaths(e,t,"copy",(o,i)=>{if(o)return n(o);let{srcStat:s,destStat:a}=i;af.checkParentPaths(e,s,t,"copy",c=>c?n(c):r.filter?e8(XV,a,e,t,r,n):XV(a,e,t,r,n))})}function XV(e,t,r,n,o){let i=sf.dirname(r);Nxe(i,(s,a)=>{if(s)return o(s);if(a)return TC(e,t,r,n,o);Oxe(i,c=>c?o(c):TC(e,t,r,n,o))})}function e8(e,t,r,n,o,i){Promise.resolve(o.filter(r,n)).then(s=>s?e(t,r,n,o,i):i(),s=>i(s))}function TC(e,t,r,n,o){return n.filter?e8(JV,e,t,r,n,o):JV(e,t,r,n,o)}function JV(e,t,r,n,o){(n.dereference?Hr.stat:Hr.lstat)(t,(s,a)=>{if(s)return o(s);if(a.isDirectory())return qxe(a,e,t,r,n,o);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return Lxe(a,e,t,r,n,o);if(a.isSymbolicLink())return Vxe(e,t,r,n,o)})}function Lxe(e,t,r,n,o,i){return t?kxe(e,r,n,o,i):t8(e,r,n,o,i)}function kxe(e,t,r,n,o){if(n.overwrite)Hr.unlink(r,i=>i?o(i):t8(e,t,r,n,o));else return n.errorOnExist?o(new Error(`'${r}' already exists`)):o()}function t8(e,t,r,n,o){Hr.copyFile(t,r,i=>i?o(i):n.preserveTimestamps?Fxe(e.mode,t,r,o):RE(r,e.mode,o))}function Fxe(e,t,r,n){return Bxe(e)?Uxe(r,e,o=>o?n(o):ZV(e,t,r,n)):ZV(e,t,r,n)}function Bxe(e){return(e&128)===0}function Uxe(e,t,r){return RE(e,t|128,r)}function ZV(e,t,r,n){jxe(t,r,o=>o?n(o):RE(r,e,n))}function RE(e,t,r){return Hr.chmod(e,t,r)}function jxe(e,t,r){Hr.stat(e,(n,o)=>n?r(n):$xe(t,o.atime,o.mtime,r))}function qxe(e,t,r,n,o,i){return t?t&&!t.isDirectory()?i(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)):r8(r,n,o,i):Gxe(e.mode,r,n,o,i)}function Gxe(e,t,r,n,o){Hr.mkdir(r,i=>{if(i)return o(i);r8(t,r,n,s=>s?o(s):RE(r,e,o))})}function r8(e,t,r,n){Hr.readdir(e,(o,i)=>o?n(o):n8(i,e,t,r,n))}function n8(e,t,r,n,o){let i=e.pop();return i?Hxe(e,i,t,r,n,o):o()}function Hxe(e,t,r,n,o,i){let s=sf.join(r,t),a=sf.join(n,t);af.checkPaths(s,a,"copy",(c,l)=>{if(c)return i(c);let{destStat:d}=l;TC(d,s,a,o,f=>f?i(f):n8(e,r,n,o,i))})}function Vxe(e,t,r,n,o){Hr.readlink(t,(i,s)=>{if(i)return o(i);if(n.dereference&&(s=sf.resolve(process.cwd(),s)),e)Hr.readlink(r,(a,c)=>a?a.code==="EINVAL"||a.code==="UNKNOWN"?Hr.symlink(s,r,o):o(a):(n.dereference&&(c=sf.resolve(process.cwd(),c)),af.isSrcSubdir(s,c)?o(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${c}'.`)):e.isDirectory()&&af.isSrcSubdir(c,s)?o(new Error(`Cannot overwrite '${c}' with '${s}'.`)):Wxe(s,r,o)));else return Hr.symlink(s,r,o)})}function Wxe(e,t,r){Hr.unlink(t,n=>n?r(n):Hr.symlink(e,t,r))}o8.exports=Mxe});var wC=b((aGe,s8)=>{"use strict";var zxe=qr().fromCallback;s8.exports={copy:zxe(i8())}});var h8=b((cGe,m8)=>{"use strict";var a8=_r(),d8=require("path"),dt=require("assert"),cf=process.platform==="win32";function f8(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(r=>{e[r]=e[r]||a8[r],r=r+"Sync",e[r]=e[r]||a8[r]}),e.maxBusyTries=e.maxBusyTries||3}function AC(e,t,r){let n=0;typeof t=="function"&&(r=t,t={}),dt(e,"rimraf: missing path"),dt.strictEqual(typeof e,"string","rimraf: path should be a string"),dt.strictEqual(typeof r,"function","rimraf: callback function required"),dt(t,"rimraf: invalid options argument provided"),dt.strictEqual(typeof t,"object","rimraf: options should be object"),f8(t),c8(e,t,function o(i){if(i){if((i.code==="EBUSY"||i.code==="ENOTEMPTY"||i.code==="EPERM")&&n<t.maxBusyTries){n++;let s=n*100;return setTimeout(()=>c8(e,t,o),s)}i.code==="ENOENT"&&(i=null)}r(i)})}function c8(e,t,r){dt(e),dt(t),dt(typeof r=="function"),t.lstat(e,(n,o)=>{if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&cf)return u8(e,t,n,r);if(o&&o.isDirectory())return PE(e,t,n,r);t.unlink(e,i=>{if(i){if(i.code==="ENOENT")return r(null);if(i.code==="EPERM")return cf?u8(e,t,i,r):PE(e,t,i,r);if(i.code==="EISDIR")return PE(e,t,i,r)}return r(i)})})}function u8(e,t,r,n){dt(e),dt(t),dt(typeof n=="function"),t.chmod(e,438,o=>{o?n(o.code==="ENOENT"?null:r):t.stat(e,(i,s)=>{i?n(i.code==="ENOENT"?null:r):s.isDirectory()?PE(e,t,r,n):t.unlink(e,n)})})}function l8(e,t,r){let n;dt(e),dt(t);try{t.chmodSync(e,438)}catch(o){if(o.code==="ENOENT")return;throw r}try{n=t.statSync(e)}catch(o){if(o.code==="ENOENT")return;throw r}n.isDirectory()?OE(e,t,r):t.unlinkSync(e)}function PE(e,t,r,n){dt(e),dt(t),dt(typeof n=="function"),t.rmdir(e,o=>{o&&(o.code==="ENOTEMPTY"||o.code==="EEXIST"||o.code==="EPERM")?Kxe(e,t,n):o&&o.code==="ENOTDIR"?n(r):n(o)})}function Kxe(e,t,r){dt(e),dt(t),dt(typeof r=="function"),t.readdir(e,(n,o)=>{if(n)return r(n);let i=o.length,s;if(i===0)return t.rmdir(e,r);o.forEach(a=>{AC(d8.join(e,a),t,c=>{if(!s){if(c)return r(s=c);--i===0&&t.rmdir(e,r)}})})})}function p8(e,t){let r;t=t||{},f8(t),dt(e,"rimraf: missing path"),dt.strictEqual(typeof e,"string","rimraf: path should be a string"),dt(t,"rimraf: missing options"),dt.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e)}catch(n){if(n.code==="ENOENT")return;n.code==="EPERM"&&cf&&l8(e,t,n)}try{r&&r.isDirectory()?OE(e,t,null):t.unlinkSync(e)}catch(n){if(n.code==="ENOENT")return;if(n.code==="EPERM")return cf?l8(e,t,n):OE(e,t,n);if(n.code!=="EISDIR")throw n;OE(e,t,n)}}function OE(e,t,r){dt(e),dt(t);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")Yxe(e,t);else if(n.code!=="ENOENT")throw n}}function Yxe(e,t){if(dt(e),dt(t),t.readdirSync(e).forEach(r=>p8(d8.join(e,r),t)),cf){let r=Date.now();do try{return t.rmdirSync(e,t)}catch{}while(Date.now()-r<500)}else return t.rmdirSync(e,t)}m8.exports=AC;AC.sync=p8});var uf=b((uGe,g8)=>{"use strict";var Qxe=qr().fromCallback,y8=h8();g8.exports={remove:Qxe(y8),removeSync:y8.sync}});var w8=b((lGe,T8)=>{"use strict";var Xxe=qr().fromCallback,S8=_r(),b8=require("path"),x8=zn(),v8=uf(),_8=Xxe(function(t,r){r=r||function(){},S8.readdir(t,(n,o)=>{if(n)return x8.mkdirs(t,r);o=o.map(s=>b8.join(t,s)),i();function i(){let s=o.pop();if(!s)return r();v8.remove(s,a=>{if(a)return r(a);i()})}})});function E8(e){let t;try{t=S8.readdirSync(e)}catch{return x8.mkdirsSync(e)}t.forEach(r=>{r=b8.join(e,r),v8.removeSync(r)})}T8.exports={emptyDirSync:E8,emptydirSync:E8,emptyDir:_8,emptydir:_8}});var D8=b((dGe,C8)=>{"use strict";var Jxe=qr().fromCallback,A8=require("path"),Ds=_r(),I8=zn();function Zxe(e,t){function r(){Ds.writeFile(e,"",n=>{if(n)return t(n);t()})}Ds.stat(e,(n,o)=>{if(!n&&o.isFile())return t();let i=A8.dirname(e);Ds.stat(i,(s,a)=>{if(s)return s.code==="ENOENT"?I8.mkdirs(i,c=>{if(c)return t(c);r()}):t(s);a.isDirectory()?r():Ds.readdir(i,c=>{if(c)return t(c)})})})}function eve(e){let t;try{t=Ds.statSync(e)}catch{}if(t&&t.isFile())return;let r=A8.dirname(e);try{Ds.statSync(r).isDirectory()||Ds.readdirSync(r)}catch(n){if(n&&n.code==="ENOENT")I8.mkdirsSync(r);else throw n}Ds.writeFileSync(e,"")}C8.exports={createFile:Jxe(Zxe),createFileSync:eve}});var $8=b((fGe,N8)=>{"use strict";var tve=qr().fromCallback,P8=require("path"),va=_r(),O8=zn(),R8=Cs().pathExists;function rve(e,t,r){function n(o,i){va.link(o,i,s=>{if(s)return r(s);r(null)})}R8(t,(o,i)=>{if(o)return r(o);if(i)return r(null);va.lstat(e,s=>{if(s)return s.message=s.message.replace("lstat","ensureLink"),r(s);let a=P8.dirname(t);R8(a,(c,l)=>{if(c)return r(c);if(l)return n(e,t);O8.mkdirs(a,d=>{if(d)return r(d);n(e,t)})})})})}function nve(e,t){if(va.existsSync(t))return;try{va.lstatSync(e)}catch(i){throw i.message=i.message.replace("lstat","ensureLink"),i}let n=P8.dirname(t);return va.existsSync(n)||O8.mkdirsSync(n),va.linkSync(e,t)}N8.exports={createLink:tve(rve),createLinkSync:nve}});var L8=b((pGe,M8)=>{"use strict";var Rs=require("path"),lf=_r(),ove=Cs().pathExists;function ive(e,t,r){if(Rs.isAbsolute(e))return lf.lstat(e,n=>n?(n.message=n.message.replace("lstat","ensureSymlink"),r(n)):r(null,{toCwd:e,toDst:e}));{let n=Rs.dirname(t),o=Rs.join(n,e);return ove(o,(i,s)=>i?r(i):s?r(null,{toCwd:o,toDst:e}):lf.lstat(e,a=>a?(a.message=a.message.replace("lstat","ensureSymlink"),r(a)):r(null,{toCwd:e,toDst:Rs.relative(n,e)})))}}function sve(e,t){let r;if(Rs.isAbsolute(e)){if(r=lf.existsSync(e),!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{let n=Rs.dirname(t),o=Rs.join(n,e);if(r=lf.existsSync(o),r)return{toCwd:o,toDst:e};if(r=lf.existsSync(e),!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:Rs.relative(n,e)}}}M8.exports={symlinkPaths:ive,symlinkPathsSync:sve}});var B8=b((mGe,F8)=>{"use strict";var k8=_r();function ave(e,t,r){if(r=typeof t=="function"?t:r,t=typeof t=="function"?!1:t,t)return r(null,t);k8.lstat(e,(n,o)=>{if(n)return r(null,"file");t=o&&o.isDirectory()?"dir":"file",r(null,t)})}function cve(e,t){let r;if(t)return t;try{r=k8.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}F8.exports={symlinkType:ave,symlinkTypeSync:cve}});var W8=b((hGe,V8)=>{"use strict";var uve=qr().fromCallback,j8=require("path"),mu=_r(),q8=zn(),lve=q8.mkdirs,dve=q8.mkdirsSync,G8=L8(),fve=G8.symlinkPaths,pve=G8.symlinkPathsSync,H8=B8(),mve=H8.symlinkType,hve=H8.symlinkTypeSync,U8=Cs().pathExists;function yve(e,t,r,n){n=typeof r=="function"?r:n,r=typeof r=="function"?!1:r,U8(t,(o,i)=>{if(o)return n(o);if(i)return n(null);fve(e,t,(s,a)=>{if(s)return n(s);e=a.toDst,mve(a.toCwd,r,(c,l)=>{if(c)return n(c);let d=j8.dirname(t);U8(d,(f,m)=>{if(f)return n(f);if(m)return mu.symlink(e,t,l,n);lve(d,h=>{if(h)return n(h);mu.symlink(e,t,l,n)})})})})})}function gve(e,t,r){if(mu.existsSync(t))return;let o=pve(e,t);e=o.toDst,r=hve(o.toCwd,r);let i=j8.dirname(t);return mu.existsSync(i)||dve(i),mu.symlinkSync(e,t,r)}V8.exports={createSymlink:uve(yve),createSymlinkSync:gve}});var K8=b((yGe,z8)=>{"use strict";var NE=D8(),$E=$8(),ME=W8();z8.exports={createFile:NE.createFile,createFileSync:NE.createFileSync,ensureFile:NE.createFile,ensureFileSync:NE.createFileSync,createLink:$E.createLink,createLinkSync:$E.createLinkSync,ensureLink:$E.createLink,ensureLinkSync:$E.createLinkSync,createSymlink:ME.createSymlink,createSymlinkSync:ME.createSymlinkSync,ensureSymlink:ME.createSymlink,ensureSymlinkSync:ME.createSymlinkSync}});var LE=b((gGe,Y8)=>{function _ve(e,{EOL:t=`
78
+ `,finalEOL:r=!0,replacer:n=null,spaces:o}={}){let i=r?t:"";return JSON.stringify(e,n,o).replace(/\n/g,t)+i}function Eve(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}Y8.exports={stringify:_ve,stripBom:Eve}});var Z8=b((_Ge,J8)=>{var hu;try{hu=_r()}catch{hu=require("fs")}var kE=qr(),{stringify:Q8,stripBom:X8}=LE();async function Sve(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||hu,n="throws"in t?t.throws:!0,o=await kE.fromCallback(r.readFile)(e,t);o=X8(o);let i;try{i=JSON.parse(o,t?t.reviver:null)}catch(s){if(n)throw s.message=`${e}: ${s.message}`,s;return null}return i}var bve=kE.fromPromise(Sve);function xve(e,t={}){typeof t=="string"&&(t={encoding:t});let r=t.fs||hu,n="throws"in t?t.throws:!0;try{let o=r.readFileSync(e,t);return o=X8(o),JSON.parse(o,t.reviver)}catch(o){if(n)throw o.message=`${e}: ${o.message}`,o;return null}}async function vve(e,t,r={}){let n=r.fs||hu,o=Q8(t,r);await kE.fromCallback(n.writeFile)(e,o,r)}var Tve=kE.fromPromise(vve);function wve(e,t,r={}){let n=r.fs||hu,o=Q8(t,r);return n.writeFileSync(e,o,r)}var Ave={readFile:bve,readFileSync:xve,writeFile:Tve,writeFileSync:wve};J8.exports=Ave});var tW=b((EGe,eW)=>{"use strict";var FE=Z8();eW.exports={readJson:FE.readFile,readJsonSync:FE.readFileSync,writeJson:FE.writeFile,writeJsonSync:FE.writeFileSync}});var BE=b((SGe,oW)=>{"use strict";var Ive=qr().fromCallback,df=_r(),rW=require("path"),nW=zn(),Cve=Cs().pathExists;function Dve(e,t,r,n){typeof r=="function"&&(n=r,r="utf8");let o=rW.dirname(e);Cve(o,(i,s)=>{if(i)return n(i);if(s)return df.writeFile(e,t,r,n);nW.mkdirs(o,a=>{if(a)return n(a);df.writeFile(e,t,r,n)})})}function Rve(e,...t){let r=rW.dirname(e);if(df.existsSync(r))return df.writeFileSync(e,...t);nW.mkdirsSync(r),df.writeFileSync(e,...t)}oW.exports={outputFile:Ive(Dve),outputFileSync:Rve}});var sW=b((bGe,iW)=>{"use strict";var{stringify:Pve}=LE(),{outputFile:Ove}=BE();async function Nve(e,t,r={}){let n=Pve(t,r);await Ove(e,n,r)}iW.exports=Nve});var cW=b((xGe,aW)=>{"use strict";var{stringify:$ve}=LE(),{outputFileSync:Mve}=BE();function Lve(e,t,r){let n=$ve(t,r);Mve(e,n,r)}aW.exports=Lve});var lW=b((vGe,uW)=>{"use strict";var kve=qr().fromPromise,Rr=tW();Rr.outputJson=kve(sW());Rr.outputJsonSync=cW();Rr.outputJSON=Rr.outputJson;Rr.outputJSONSync=Rr.outputJsonSync;Rr.writeJSON=Rr.writeJson;Rr.writeJSONSync=Rr.writeJsonSync;Rr.readJSON=Rr.readJson;Rr.readJSONSync=Rr.readJsonSync;uW.exports=Rr});var yW=b((TGe,hW)=>{"use strict";var pW=_r(),Fve=require("path"),Bve=vC().copySync,mW=uf().removeSync,Uve=zn().mkdirpSync,dW=rf();function jve(e,t,r){r=r||{};let n=r.overwrite||r.clobber||!1,{srcStat:o}=dW.checkPathsSync(e,t,"move");return dW.checkParentPathsSync(e,o,t,"move"),Uve(Fve.dirname(t)),qve(e,t,n)}function qve(e,t,r){if(r)return mW(t),fW(e,t,r);if(pW.existsSync(t))throw new Error("dest already exists.");return fW(e,t,r)}function fW(e,t,r){try{pW.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return Gve(e,t,r)}}function Gve(e,t,r){return Bve(e,t,{overwrite:r,errorOnExist:!0}),mW(e)}hW.exports=jve});var _W=b((wGe,gW)=>{"use strict";gW.exports={moveSync:yW()}});var vW=b((AGe,xW)=>{"use strict";var Hve=_r(),Vve=require("path"),Wve=wC().copy,bW=uf().remove,zve=zn().mkdirp,Kve=Cs().pathExists,EW=rf();function Yve(e,t,r,n){typeof r=="function"&&(n=r,r={});let o=r.overwrite||r.clobber||!1;EW.checkPaths(e,t,"move",(i,s)=>{if(i)return n(i);let{srcStat:a}=s;EW.checkParentPaths(e,a,t,"move",c=>{if(c)return n(c);zve(Vve.dirname(t),l=>l?n(l):Qve(e,t,o,n))})})}function Qve(e,t,r,n){if(r)return bW(t,o=>o?n(o):SW(e,t,r,n));Kve(t,(o,i)=>o?n(o):i?n(new Error("dest already exists.")):SW(e,t,r,n))}function SW(e,t,r,n){Hve.rename(e,t,o=>o?o.code!=="EXDEV"?n(o):Xve(e,t,r,n):n())}function Xve(e,t,r,n){Wve(e,t,{overwrite:r,errorOnExist:!0},i=>i?n(i):bW(e,n))}xW.exports=Yve});var wW=b((IGe,TW)=>{"use strict";var Jve=qr().fromCallback;TW.exports={move:Jve(vW())}});var CC=b((CGe,IC)=>{"use strict";IC.exports={...tf(),...vC(),...wC(),...w8(),...K8(),...lW(),...zn(),..._W(),...wW(),...BE(),...Cs(),...uf()};var AW=require("fs");Object.getOwnPropertyDescriptor(AW,"promises")&&Object.defineProperty(IC.exports,"promises",{get(){return AW.promises}})});var OW=b((DGe,PW)=>{PW.exports=ff;ff.default=ff;ff.stable=DW;ff.stableStringify=DW;var UE="[...]",IW="[Circular]",wa=[],Ta=[];function CW(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function ff(e,t,r,n){typeof n>"u"&&(n=CW()),DC(e,"",0,[],void 0,0,n);var o;try{Ta.length===0?o=JSON.stringify(e,t,r):o=JSON.stringify(e,RW(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;wa.length!==0;){var i=wa.pop();i.length===4?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}}return o}function yu(e,t,r,n){var o=Object.getOwnPropertyDescriptor(n,r);o.get!==void 0?o.configurable?(Object.defineProperty(n,r,{value:e}),wa.push([n,r,t,o])):Ta.push([t,r,e]):(n[r]=e,wa.push([n,r,t]))}function DC(e,t,r,n,o,i,s){i+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<n.length;a++)if(n[a]===e){yu(IW,e,t,o);return}if(typeof s.depthLimit<"u"&&i>s.depthLimit){yu(UE,e,t,o);return}if(typeof s.edgesLimit<"u"&&r+1>s.edgesLimit){yu(UE,e,t,o);return}if(n.push(e),Array.isArray(e))for(a=0;a<e.length;a++)DC(e[a],a,a,n,e,i,s);else{var c=Object.keys(e);for(a=0;a<c.length;a++){var l=c[a];DC(e[l],l,a,n,e,i,s)}}n.pop()}}function Zve(e,t){return e<t?-1:e>t?1:0}function DW(e,t,r,n){typeof n>"u"&&(n=CW());var o=RC(e,"",0,[],void 0,0,n)||e,i;try{Ta.length===0?i=JSON.stringify(o,t,r):i=JSON.stringify(o,RW(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;wa.length!==0;){var s=wa.pop();s.length===4?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}}return i}function RC(e,t,r,n,o,i,s){i+=1;var a;if(typeof e=="object"&&e!==null){for(a=0;a<n.length;a++)if(n[a]===e){yu(IW,e,t,o);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof s.depthLimit<"u"&&i>s.depthLimit){yu(UE,e,t,o);return}if(typeof s.edgesLimit<"u"&&r+1>s.edgesLimit){yu(UE,e,t,o);return}if(n.push(e),Array.isArray(e))for(a=0;a<e.length;a++)RC(e[a],a,a,n,e,i,s);else{var c={},l=Object.keys(e).sort(Zve);for(a=0;a<l.length;a++){var d=l[a];RC(e[d],d,a,n,e,i,s),c[d]=e[d]}if(typeof o<"u")wa.push([o,t,e]),o[t]=c;else return c}n.pop()}}function RW(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(Ta.length>0)for(var n=0;n<Ta.length;n++){var o=Ta[n];if(o[1]===t&&o[0]===r){r=o[2],Ta.splice(n,1);break}}return e.call(this,t,r)}}});var $W=b((RGe,NW)=>{var eTe=OW(),ct={LOG:Symbol("log"),META:Symbol("meta"),ERROR:Symbol("error"),OPTS:Symbol("opts")},jE=class e{constructor(t,r){this[ct.LOG]=t,this[ct.META]={},this[ct.ERROR]=null,this[ct.OPTS]=r;let{meta:n,tags:o}=this[ct.LOG];if(n&&(typeof n!="object"||Array.isArray(n))&&(this[ct.LOG].meta={meta:n}),n||(this[ct.LOG].meta={}),o||(this[ct.LOG].tags=[]),e.isError(t.msg)){let i=t.msg;this[ct.ERROR]=i,this[ct.META].stack=i.stack,this[ct.LOG].msg=i.message}}get level(){return this[ct.LOG].level}get msg(){return this[ct.LOG].msg}set msg(t){this[ct.LOG].msg=t}get message(){return this.msg}set message(t){this.msg=t}get meta(){let t=this[ct.OPTS],r={...this[ct.META],...this[ct.OPTS].meta,...this[ct.LOG].meta};if(t.dynamicMeta&&typeof t.dynamicMeta=="function"){let n=t.dynamicMeta.call(this,this,t);typeof n=="object"&&(r=Object.assign(r,n))}for(let[n,o]of Object.entries(r))typeof o=="object"&&e.isError(o)&&(r[n]=e.stubError(o));return r}set meta(t){this[ct.LOG].meta={...this[ct.LOG].meta,...t}}get tags(){let t=this[ct.OPTS];return[].concat(t.tags,this[ct.LOG].tags).map(n=>{if(typeof n=="function")return n.call(this,{level:this.level,meta:this.meta,options:t});let o=n.match(/(<<(.*)>>)/);return o&&o[2]==="level"?n.replace(o[1],this.level):n}).filter(n=>n!=null&&n!=="")}set tags(t){this[ct.LOG].tags=this[ct.LOG].tags.concat(t)}get value(){let t=this[ct.OPTS];return{[t.levelKey]:t.levelKey?this.level:void 0,[t.messageKey]:this.msg,...this.meta,[t.tagsKey]:t.tagsKey?this.tags:void 0}}get log(){return this.value}get throw(){let t=this[ct.ERROR]||new Error(this.msg);throw t.log=this,t}toJSON(t){return eTe(this.value,this[ct.OPTS].replacer||null,t?4:0)}static isError(t){return!!t&&typeof t=="object"&&(t instanceof Error||Object.prototype.hasOwnProperty.call(t,"message")&&Object.prototype.hasOwnProperty.call(t,"stack"))}static stubError(t){return typeof t.toJSON=="function"||(t.toJSON=function(){return["name","message","stack"].concat(Object.keys(t)).reduce((n,o)=>{if(o in t){let i=t[o];if(typeof i=="function")return n;n[o]=i}return n},{})}),t}};jE.symbols=ct;NW.exports=jE});var LW=b((PGe,MW)=>{var tTe=require("events"),rTe=$W(),gu={LEVELS:Symbol("levels")},qE=class e extends tTe{constructor(t={},r={}){super(),this.LambdaLog=e,this.LogMessage=rTe,this.options={meta:{},tags:[],dynamicMeta:null,debug:!1,dev:!1,silent:["true","yes","y","1"].includes(process.env.LAMBDALOG_SILENT),replacer:null,logHandler:console,levelKey:"_logLevel",messageKey:"msg",tagsKey:"_tags",...t},this[gu.LEVELS]={info:"info",warn:"warn",error:"error",debug(){return this.options.debug?"debug":!1},...r},this.console=this.options.logHandler;let n=this[gu.LEVELS];for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&this.addLevel(o,n[o])}addLevel(t,r){return this[gu.LEVELS][t]=r,this[t]=(n,o={},i=[])=>this.log(t,n,o,i),this}log(t,r,n={},o=[]){if(!Object.prototype.hasOwnProperty.call(this[gu.LEVELS],t))throw new Error(`"${t}" is not a valid log level`);let i=new this.LogMessage({level:t,msg:r,meta:n,tags:o},this.options),s=this[gu.LEVELS][t];return typeof s=="function"&&(s=s.call(this,i)),s?(this.options.silent||this.console[s](i.toJSON(this.options.dev)),this.emit("log",i),i):!1}assert(t,r,n={},o=[]){return t?!1:this.log("error",r,n,o)}result(t,r={},n=[]){if(!t||typeof t.then!="function")throw new Error("A promise must be provided as the first argument");return new Promise(i=>{t.then(s=>i(this.log("info",s,r,n))).catch(s=>i(this.log("error",s,r,n)))})}};qE.symbols=gu;MW.exports=qE});var PC=b((OGe,kW)=>{var nTe=LW(),oTe=new nTe;kW.exports=oTe});var pf=b(OC=>{"use strict";Object.defineProperty(OC,"__esModule",{value:!0});var iTe=PC(),GE=class{};OC.default=GE;GE.Instance=new iTe.LambdaLog({silent:process.env.JEST_WORKER_ID!==void 0})});var jW=b(HE=>{"use strict";Object.defineProperty(HE,"__esModule",{value:!0});HE.loadAppFrame=void 0;var UW=(Mi(),ie($i)),NC=UW.__importDefault(require("path")),FW=CC(),sTe=UW.__importDefault(pf()),BW=sTe.default.Instance;function aTe({basePath:e="."}){let t=[e,NC.default.join(e,".."),NC.default.join(e,"templates"),e,"/opt","/opt/templates"];for(let r of t){let n=NC.default.join(r,"appFrame.html");try{if((0,FW.pathExistsSync)(n))return BW.info("found html file",{fullPath:n}),(0,FW.readFileSync)(n,"utf-8")}catch{}}throw BW.error("appFrame.html not found"),new Error("appFrame.html not found")}HE.loadAppFrame=aTe});var mf=b(VE=>{"use strict";Object.defineProperty(VE,"__esModule",{value:!0});VE.AppVersionCache=void 0;var $C=uC(),MC=class e{static GetInstance({dbManager:t}){return e.instance||(e.instance=new e({dbManager:t})),e.instance}constructor({dbManager:t}){this.negativeAppNameCache=new Map,this.appRulesCache=new Map,this.appVersionsCache=new Map,this.dbManager=t}get CacheIsEmpty(){return this.appRulesCache.size===0&&this.appVersionsCache.size===0}async PopulateEmptyCache({key:{AppName:t}}){let r=await $C.Application.GetVersionsAndRules({dbManager:this.dbManager,key:{AppName:t}});if(!r||r.Versions.length===0&&!r.Rules){this.negativeAppNameCache.set(t.toLowerCase(),{timestamp:Date.now(),data:void 0});return}this.negativeAppNameCache.delete(t.toLowerCase()),this.appRulesCache.set(t.toLowerCase(),{timestamp:Date.now(),data:r.Rules});let n=new Map;for(let o of r.Versions)n.set(o.SemVer,{timestamp:Date.now(),data:o});this.appVersionsCache.set(t.toLowerCase(),n)}ClearCache(){this.appRulesCache.clear(),this.appVersionsCache.clear()}async GetRules({key:{AppName:t}}){var r;let n=Date.now(),o=this.negativeAppNameCache.get(t.toLowerCase());if(o&&n-o.timestamp<6e4)return;o&&this.negativeAppNameCache.delete(t.toLowerCase());let i=this.appRulesCache.get(t.toLowerCase());if(i&&n-i.timestamp<6e4)return i.data;if(this.CacheIsEmpty||!i)return await this.PopulateEmptyCache({key:{AppName:t}}),(r=this.appRulesCache.get(t.toLowerCase()))===null||r===void 0?void 0:r.data;let s=await $C.Application.GetVersionsAndRules({dbManager:this.dbManager,key:{AppName:t}});return this.appRulesCache.set(t.toLowerCase(),{timestamp:n,data:s.Rules}),s.Rules}async GetVersionInfo({key:{AppName:t,SemVer:r}}){var n,o;let i=Date.now(),s=this.negativeAppNameCache.get(t.toLowerCase());if(s&&i-s.timestamp<6e4)return;s&&this.negativeAppNameCache.delete(t.toLowerCase());let a=this.appVersionsCache.get(t.toLowerCase());if(a){let c=a.get(r);if(c&&i-c.timestamp<9e5)return c.data}if(this.CacheIsEmpty||!a)return await this.PopulateEmptyCache({key:{AppName:t}}),this.appVersionsCache?(o=(n=this.appVersionsCache.get(t.toLowerCase()))===null||n===void 0?void 0:n.get(r))===null||o===void 0?void 0:o.data:void 0;{let c=await $C.Version.LoadVersion({dbManager:this.dbManager,key:{AppName:t,SemVer:r}});if(!c)return;let l=this.appVersionsCache.get(t.toLowerCase());return l?(l.set(r,{timestamp:i,data:c}),c):void 0}}};VE.AppVersionCache=MC});var LC=b(WE=>{"use strict";Object.defineProperty(WE,"__esModule",{value:!0});WE.GetAppInfo=void 0;var cTe=mf();async function uTe(e){let{dbManager:t,appName:r}=e,n,o=cTe.AppVersionCache.GetInstance({dbManager:t});if(n=await o.GetRules({key:{AppName:r}}),n&&n.AppName===r.toLowerCase())return r;if(n=await o.GetRules({key:{AppName:"[root]"}}),n&&n.AppName==="[root]")return"[root]"}WE.GetAppInfo=uTe});var qW=b(zE=>{"use strict";Object.defineProperty(zE,"__esModule",{value:!0});zE.normalizePathPrefix=void 0;function lTe(e){let t=e;return t!==""&&!t.startsWith("/")&&(t="/"+e),t.endsWith("/")&&(t=t.substring(0,t.length-1)),t}zE.normalizePathPrefix=lTe});var GW=b(KE=>{"use strict";Object.defineProperty(KE,"__esModule",{value:!0});KE.RouteApp=void 0;var dTe=(Mi(),ie($i)),fTe=mf(),pTe=dTe.__importDefault(pf()),kC=pTe.default.Instance;async function mTe(e){var t;let{dbManager:r,event:n,normalizedPathPrefix:o="",appName:i,possibleSemVerPathNextData:s,possibleSemVerPathAfterApp:a,possibleSemVerQuery:c,additionalParts:l,appNameOrRootTrailingSlash:d}=e,f,m=fTe.AppVersionCache.GetInstance({dbManager:r}),h=a?await m.GetVersionInfo({key:{AppName:i,SemVer:a}}):void 0,_=s?await m.GetVersionInfo({key:{AppName:i,SemVer:s}}):void 0,E=c?await m.GetVersionInfo({key:{AppName:i,SemVer:c}}):void 0,T=h||_;if(T)return{statusCode:200,appName:i,semVer:T.SemVer,isAPIPath:l.startsWith("api/"),...T!=null&&T.URL?{url:T==null?void 0:T.URL}:{},...T!=null&&T.Type?{type:(T==null?void 0:T.Type)==="lambda"?"apigwy":T==null?void 0:T.Type}:{}};if(E)f=E;else{if(c)return kC.error(`could not find app ${i}, for path ${n.rawPath} - returning 404`,{statusCode:404}),{statusCode:404,errorMessage:`Router - Could not find app: ${n.rawPath}, ${i}`};{let I=await m.GetRules({key:{AppName:i}}),A=(t=I==null?void 0:I.RuleSet.default)===null||t===void 0?void 0:t.SemVer;if(A==null)return kC.error(`could not find app ${i}, for path ${n.rawPath} - returning 404`,{statusCode:404}),{statusCode:404,errorMessage:`Router - Could not find app: ${n.rawPath}, ${i}`};f=await m.GetVersionInfo({key:{AppName:i,SemVer:A}})}}if(!f)return kC.error(`could not find version info for app ${i}, for path ${n.rawPath} - returning 404`,{statusCode:404}),{statusCode:404,errorMessage:`Router - Could not find version info for app: ${n.rawPath}, ${i}`};if((f==null?void 0:f.StartupType)==="iframe"||!(f!=null&&f.StartupType)){let I;return(f==null?void 0:f.DefaultFile)===void 0||(f==null?void 0:f.DefaultFile)===""||l!==""?(I=`${o}/${d}${f.SemVer}`,l!==""&&(I+=`/${l}`)):I=`${o}/${d}${f.SemVer}/${f.DefaultFile}`,{statusCode:200,appName:i,semVer:f.SemVer,startupType:"iframe",isAPIPath:l.startsWith("api/"),...f!=null&&f.URL?{url:f==null?void 0:f.URL}:{},...f!=null&&f.Type?{type:(f==null?void 0:f.Type)==="lambda"?"apigwy":f==null?void 0:f.Type}:{},iFrameAppVersionPath:I}}else{if((f==null?void 0:f.Type)==="lambda")throw new Error("Invalid type for direct app version");if(["apigwy","static"].includes((f==null?void 0:f.Type)||""))throw new Error("Invalid type for direct app version");return{statusCode:200,appName:i,semVer:f.SemVer,startupType:"direct",isAPIPath:l.startsWith("api/"),...f!=null&&f.URL?{url:f==null?void 0:f.URL}:{},...f!=null&&f.Type?{type:f==null?void 0:f.Type}:{}}}}KE.RouteApp=mTe});var BC=b(YE=>{"use strict";Object.defineProperty(YE,"__esModule",{value:!0});YE.RedirectToDefaultFile=void 0;var hTe=(Mi(),ie($i)),yTe=mf(),gTe=hTe.__importDefault(pf()),FC=gTe.default.Instance;async function _Te(e){let{dbManager:t,normalizedPathPrefix:r="",appName:n,appNameOrRootTrailingSlash:o,semVer:i}=e,s;try{s=await yTe.AppVersionCache.GetInstance({dbManager:t}).GetVersionInfo({key:{AppName:n,SemVer:i}})}catch(a){FC.info(`LoadVersion threw for '${r}/${o}${i}' - falling through to app routing'`,{appName:n,semVer:i,error:a});return}if(s===void 0){FC.info(`LoadVersion returned undefined for '${r}/${o}${i}', assuming not found - falling through to app routing'`,{appName:n,semVer:i});return}if(s.DefaultFile)return FC.info(`found '${r}/${o}${i}' - returning 302 to ${r}/${o}${i}/${s.DefaultFile}`,{statusCode:302,routedPath:`${r}/${o}${i}/${s.DefaultFile}`}),{statusCode:302,redirectLocation:`${r}/${o}${i}/${s.DefaultFile}`}}YE.RedirectToDefaultFile=_Te});var VW=b(XE=>{"use strict";Object.defineProperty(XE,"__esModule",{value:!0});XE.GetRoute=void 0;var ETe=(Mi(),ie($i)),STe=ETe.__importDefault(pf()),HW=LC(),bTe=GW(),xTe=BC(),vTe=mf(),QE=STe.default.Instance;async function TTe(e){let{dbManager:t,normalizedPathPrefix:r="",queryStringParameters:n,locales:o=[]}=e;try{let i=vTe.AppVersionCache.GetInstance({dbManager:t});if(r&&!e.rawPath.startsWith(r))return{statusCode:404,errorMessage:"Request not routable"};let s=r&&e.rawPath.startsWith(r)?e.rawPath.slice(r.length-1):e.rawPath,a=o.reduce((O,G)=>O.startsWith(`/${G}/`)?O.slice(G.length+1):O,s),c=a.split("/"),l;if(c.length>=4&&c[1]==="_next"&&c[2]==="data"){let G=c.length>=5&&o.some(Q=>c[4]===Q)?c[5]:c[4],z=G.endsWith(".json")?G.slice(0,G.length-5):G;l=await(0,HW.GetAppInfo)({dbManager:t,appName:z})}if(l||(l=await(0,HW.GetAppInfo)({dbManager:t,appName:c.length>=2?c[1]:"[root]"})),!l)return{statusCode:404,errorMessage:"App not found"};let d=l==="[root]",f=d?"":`${l}/`,h=(d?a:a.slice(l.length+1)).split("/"),_="";if(h.length>=2&&h[1]!==""&&(_=h.slice(1).join("/")),(h.length===2||h.length===3&&!h[2])&&await i.GetVersionInfo({key:{AppName:l,SemVer:h[1]}})){let G=await(0,xTe.RedirectToDefaultFile)({dbManager:t,appName:l,normalizedPathPrefix:r,semVer:h[1],appNameOrRootTrailingSlash:f});if(G)return G}let E=h.length>=4?h[3]:"",T=c.length>=4&&c[1]==="_next"&&c[2]=="data"?c[3]:E,I=h.length>=2?h[1]:"",A=await(0,bTe.RouteApp)({dbManager:t,normalizedPathPrefix:r,event:e,appName:l,possibleSemVerPathNextData:T,possibleSemVerPathAfterApp:I,possibleSemVerQuery:(n==null?void 0:n.get("appver"))||"",additionalParts:_,appNameOrRootTrailingSlash:f});return A||{statusCode:599,errorMessage:`Router - Could not route: ${e.rawPath}, no matching route`}}catch(i){return QE.error("unexpected exception - returning 599",{statusCode:599,error:i}),i instanceof Error?(QE.error("unexpected exception - returning 599",{statusCode:599,error:i}),{statusCode:599,errorMessage:`Router - Could not route: ${e.rawPath}, ${i.message}`}):typeof i=="string"?(QE.error("unexpected exception - returning 599",{statusCode:599,error:i}),{statusCode:599,errorMessage:`Router - Could not route: ${e.rawPath}, ${i}`}):(QE.error("unexpected exception - returning 599",{statusCode:599,error:i}),{statusCode:599,errorMessage:`Router - Could not route: ${e.rawPath}, unknown error`})}}XE.GetRoute=TTe});var WW=b(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.RedirectToDefaultFile=Tn.GetRoute=Tn.normalizePathPrefix=Tn.GetAppInfo=Tn.loadAppFrame=void 0;var wTe=jW();Object.defineProperty(Tn,"loadAppFrame",{enumerable:!0,get:function(){return wTe.loadAppFrame}});var ATe=LC();Object.defineProperty(Tn,"GetAppInfo",{enumerable:!0,get:function(){return ATe.GetAppInfo}});var ITe=qW();Object.defineProperty(Tn,"normalizePathPrefix",{enumerable:!0,get:function(){return ITe.normalizePathPrefix}});var CTe=VW();Object.defineProperty(Tn,"GetRoute",{enumerable:!0,get:function(){return CTe.GetRoute}});var DTe=BC();Object.defineProperty(Tn,"RedirectToDefaultFile",{enumerable:!0,get:function(){return DTe.RedirectToDefaultFile}})});var KW=b(zW=>{"use strict";Object.defineProperty(zW,"__esModule",{value:!0})});var YW=b(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.HttpAuthLocation=void 0;var RTe;(function(e){e.HEADER="header",e.QUERY="query"})(RTe=hf.HttpAuthLocation||(hf.HttpAuthLocation={}))});var XW=b(QW=>{"use strict";Object.defineProperty(QW,"__esModule",{value:!0})});var ZW=b(JW=>{"use strict";Object.defineProperty(JW,"__esModule",{value:!0})});var tz=b(ez=>{"use strict";Object.defineProperty(ez,"__esModule",{value:!0})});var nz=b(rz=>{"use strict";Object.defineProperty(rz,"__esModule",{value:!0})});var iz=b(oz=>{"use strict";Object.defineProperty(oz,"__esModule",{value:!0})});var az=b(sz=>{"use strict";Object.defineProperty(sz,"__esModule",{value:!0})});var uz=b(cz=>{"use strict";Object.defineProperty(cz,"__esModule",{value:!0})});var lz=b(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});var UC=(nn(),ie(rn));UC.__exportStar(iz(),yf);UC.__exportStar(az(),yf);UC.__exportStar(uz(),yf)});var fz=b(dz=>{"use strict";Object.defineProperty(dz,"__esModule",{value:!0})});var mz=b(pz=>{"use strict";Object.defineProperty(pz,"__esModule",{value:!0})});var hz=b(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.EndpointURLScheme=void 0;var PTe;(function(e){e.HTTP="http",e.HTTPS="https"})(PTe=gf.EndpointURLScheme||(gf.EndpointURLScheme={}))});var gz=b(yz=>{"use strict";Object.defineProperty(yz,"__esModule",{value:!0})});var Ez=b(_z=>{"use strict";Object.defineProperty(_z,"__esModule",{value:!0})});var bz=b(Sz=>{"use strict";Object.defineProperty(Sz,"__esModule",{value:!0})});var vz=b(xz=>{"use strict";Object.defineProperty(xz,"__esModule",{value:!0})});var wz=b(Tz=>{"use strict";Object.defineProperty(Tz,"__esModule",{value:!0})});var Az=b(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});var _f=(nn(),ie(rn));_f.__exportStar(gz(),Aa);_f.__exportStar(Ez(),Aa);_f.__exportStar(bz(),Aa);_f.__exportStar(vz(),Aa);_f.__exportStar(wz(),Aa)});var Cz=b(Iz=>{"use strict";Object.defineProperty(Iz,"__esModule",{value:!0})});var Dz=b(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.FieldPosition=void 0;var OTe;(function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"})(OTe=Ef.FieldPosition||(Ef.FieldPosition={}))});var Pz=b(Rz=>{"use strict";Object.defineProperty(Rz,"__esModule",{value:!0})});var Nz=b(Oz=>{"use strict";Object.defineProperty(Oz,"__esModule",{value:!0})});var Mz=b(JE=>{"use strict";Object.defineProperty(JE,"__esModule",{value:!0});var $z=(nn(),ie(rn));$z.__exportStar(Pz(),JE);$z.__exportStar(Nz(),JE)});var kz=b(Lz=>{"use strict";Object.defineProperty(Lz,"__esModule",{value:!0})});var Bz=b(Fz=>{"use strict";Object.defineProperty(Fz,"__esModule",{value:!0})});var jz=b(Uz=>{"use strict";Object.defineProperty(Uz,"__esModule",{value:!0})});var Gz=b(qz=>{"use strict";Object.defineProperty(qz,"__esModule",{value:!0})});var Vz=b(Hz=>{"use strict";Object.defineProperty(Hz,"__esModule",{value:!0})});var zz=b(Wz=>{"use strict";Object.defineProperty(Wz,"__esModule",{value:!0})});var Yz=b(Kz=>{"use strict";Object.defineProperty(Kz,"__esModule",{value:!0})});var Xz=b(Qz=>{"use strict";Object.defineProperty(Qz,"__esModule",{value:!0})});var Zz=b(Jz=>{"use strict";Object.defineProperty(Jz,"__esModule",{value:!0})});var tK=b(eK=>{"use strict";Object.defineProperty(eK,"__esModule",{value:!0})});var nK=b(rK=>{"use strict";Object.defineProperty(rK,"__esModule",{value:!0})});var iK=b(oK=>{"use strict";Object.defineProperty(oK,"__esModule",{value:!0})});var aK=b(sK=>{"use strict";Object.defineProperty(sK,"__esModule",{value:!0})});var cK=b(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.RequestHandlerProtocol=void 0;var NTe;(function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"})(NTe=Sf.RequestHandlerProtocol||(Sf.RequestHandlerProtocol={}))});var lK=b(uK=>{"use strict";Object.defineProperty(uK,"__esModule",{value:!0})});var fK=b(dK=>{"use strict";Object.defineProperty(dK,"__esModule",{value:!0})});var mK=b(pK=>{"use strict";Object.defineProperty(pK,"__esModule",{value:!0})});var yK=b(hK=>{"use strict";Object.defineProperty(hK,"__esModule",{value:!0})});var _K=b(gK=>{"use strict";Object.defineProperty(gK,"__esModule",{value:!0})});var EK=b(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});var Ye=(nn(),ie(rn));Ye.__exportStar(KW(),Ge);Ye.__exportStar(YW(),Ge);Ye.__exportStar(XW(),Ge);Ye.__exportStar(ZW(),Ge);Ye.__exportStar(tz(),Ge);Ye.__exportStar(nz(),Ge);Ye.__exportStar(lz(),Ge);Ye.__exportStar(fz(),Ge);Ye.__exportStar(mz(),Ge);Ye.__exportStar(hz(),Ge);Ye.__exportStar(Az(),Ge);Ye.__exportStar(Cz(),Ge);Ye.__exportStar(Dz(),Ge);Ye.__exportStar(Mz(),Ge);Ye.__exportStar(kz(),Ge);Ye.__exportStar(Bz(),Ge);Ye.__exportStar(jz(),Ge);Ye.__exportStar(Gz(),Ge);Ye.__exportStar(Vz(),Ge);Ye.__exportStar(zz(),Ge);Ye.__exportStar(Yz(),Ge);Ye.__exportStar(Xz(),Ge);Ye.__exportStar(Zz(),Ge);Ye.__exportStar(tK(),Ge);Ye.__exportStar(nK(),Ge);Ye.__exportStar(iK(),Ge);Ye.__exportStar(aK(),Ge);Ye.__exportStar(cK(),Ge);Ye.__exportStar(lK(),Ge);Ye.__exportStar(fK(),Ge);Ye.__exportStar(mK(),Ge);Ye.__exportStar(yK(),Ge);Ye.__exportStar(_K(),Ge)});var SK=b(ZE=>{"use strict";Object.defineProperty(ZE,"__esModule",{value:!0});ZE.Field=void 0;var $Te=EK(),jC=class{constructor({name:t,kind:r=$Te.FieldPosition.HEADER,values:n=[]}){this.name=t,this.kind=r,this.values=n}add(t){this.values.push(t)}set(t){this.values=t}remove(t){this.values=this.values.filter(r=>r!==t)}toString(){return this.values.map(t=>t.includes(",")||t.includes(" ")?`"${t}"`:t).join(", ")}get(){return this.values}};ZE.Field=jC});var bK=b(eS=>{"use strict";Object.defineProperty(eS,"__esModule",{value:!0});eS.Fields=void 0;var qC=class{constructor({fields:t=[],encoding:r="utf-8"}){this.entries={},t.forEach(this.setField.bind(this)),this.encoding=r}setField(t){this.entries[t.name.toLowerCase()]=t}getField(t){return this.entries[t.toLowerCase()]}removeField(t){delete this.entries[t.toLowerCase()]}getByType(t){return Object.values(this.entries).filter(r=>r.kind===t)}};eS.Fields=qC});var vK=b(xK=>{"use strict";Object.defineProperty(xK,"__esModule",{value:!0})});var TK=b(tS=>{"use strict";Object.defineProperty(tS,"__esModule",{value:!0});tS.HttpRequest=void 0;var GC=class e{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static isInstance(t){if(!t)return!1;let r=t;return"method"in r&&"protocol"in r&&"hostname"in r&&"path"in r&&typeof r.query=="object"&&typeof r.headers=="object"}clone(){let t=new e({...this,headers:{...this.headers}});return t.query&&(t.query=MTe(t.query)),t}};tS.HttpRequest=GC;function MTe(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}});var wK=b(rS=>{"use strict";Object.defineProperty(rS,"__esModule",{value:!0});rS.HttpResponse=void 0;var HC=class{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;let r=t;return typeof r.statusCode=="number"&&typeof r.headers=="object"}};rS.HttpResponse=HC});var AK=b(nS=>{"use strict";Object.defineProperty(nS,"__esModule",{value:!0});nS.isValidHostname=void 0;function LTe(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}nS.isValidHostname=LTe});var CK=b(IK=>{"use strict";Object.defineProperty(IK,"__esModule",{value:!0})});var DK=b(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});var Ia=(nn(),ie(rn));Ia.__exportStar(SK(),Si);Ia.__exportStar(bK(),Si);Ia.__exportStar(vK(),Si);Ia.__exportStar(TK(),Si);Ia.__exportStar(wK(),Si);Ia.__exportStar(AK(),Si);Ia.__exportStar(CK(),Si)});var RK=b(VC=>{"use strict";Object.defineProperty(VC,"__esModule",{value:!0});var kTe=(nn(),ie(rn));kTe.__exportStar(DK(),VC)});var _u=b((bf,KC)=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.default=BTe;function oS(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?oS=function(r){return typeof r}:oS=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},oS(e)}function BTe(e){var t=typeof e=="string"||e instanceof String;if(!t){var r=oS(e);throw e===null?r="null":r==="object"&&(r=e.constructor.name),new TypeError("Expected a string but received a ".concat(r))}}KC.exports=bf.default;KC.exports.default=bf.default});var iS=b((xf,YC)=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.default=UTe;function UTe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)typeof e[r]>"u"&&(e[r]=t[r]);return e}YC.exports=xf.default;YC.exports.default=xf.default});var $K=b((vf,QC)=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.default=GTe;var jTe=qTe(_u());function qTe(e){return e&&e.__esModule?e:{default:e}}function sS(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sS=function(r){return typeof r}:sS=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},sS(e)}function GTe(e,t){(0,jTe.default)(e);var r,n;sS(t)==="object"?(r=t.min||0,n=t.max):(r=arguments[1],n=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=r&&(typeof n>"u"||o<=n)}QC.exports=vf.default;QC.exports.default=vf.default});var JC=b((Tf,XC)=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.default=zTe;var HTe=MK(_u()),VTe=MK(iS());function MK(e){return e&&e.__esModule?e:{default:e}}var WTe={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1};function zTe(e,t){(0,HTe.default)(e),t=(0,VTe.default)(t,WTe),t.allow_trailing_dot&&e[e.length-1]==="."&&(e=e.substring(0,e.length-1)),t.allow_wildcard===!0&&e.indexOf("*.")===0&&(e=e.substring(2));var r=e.split("."),n=r[r.length-1];return t.require_tld&&(r.length<2||!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(n)||/\s/.test(n))||!t.allow_numeric_tld&&/^\d+$/.test(n)?!1:r.every(function(o){return!(o.length>63||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(o)||/[\uff01-\uff5e]/.test(o)||/^-|-$/.test(o)||!t.allow_underscores&&/_/.test(o))})}XC.exports=Tf.default;XC.exports.default=Tf.default});var aS=b((wf,eD)=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.default=ZC;var KTe=YTe(_u());function YTe(e){return e&&e.__esModule?e:{default:e}}var LK="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",Ps="(".concat(LK,"[.]){3}").concat(LK),QTe=new RegExp("^".concat(Ps,"$")),Bt="(?:[0-9a-fA-F]{1,4})",XTe=new RegExp("^("+"(?:".concat(Bt,":){7}(?:").concat(Bt,"|:)|")+"(?:".concat(Bt,":){6}(?:").concat(Ps,"|:").concat(Bt,"|:)|")+"(?:".concat(Bt,":){5}(?::").concat(Ps,"|(:").concat(Bt,"){1,2}|:)|")+"(?:".concat(Bt,":){4}(?:(:").concat(Bt,"){0,1}:").concat(Ps,"|(:").concat(Bt,"){1,3}|:)|")+"(?:".concat(Bt,":){3}(?:(:").concat(Bt,"){0,2}:").concat(Ps,"|(:").concat(Bt,"){1,4}|:)|")+"(?:".concat(Bt,":){2}(?:(:").concat(Bt,"){0,3}:").concat(Ps,"|(:").concat(Bt,"){1,5}|:)|")+"(?:".concat(Bt,":){1}(?:(:").concat(Bt,"){0,4}:").concat(Ps,"|(:").concat(Bt,"){1,6}|:)|")+"(?::((?::".concat(Bt,"){0,5}:").concat(Ps,"|(?::").concat(Bt,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function ZC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if((0,KTe.default)(e),t=String(t),!t)return ZC(e,4)||ZC(e,6);if(t==="4"){if(!QTe.test(e))return!1;var r=e.split(".").sort(function(n,o){return n-o});return r[3]<=255}return t==="6"?!!XTe.test(e):!1}eD.exports=wf.default;eD.exports.default=wf.default});var FK=b((If,rD)=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.default=lwe;var JTe=Af(_u()),ZTe=Af(iS()),tD=Af($K()),ewe=Af(JC()),kK=Af(aS());function Af(e){return e&&e.__esModule?e:{default:e}}var twe={allow_display_name:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[]},rwe=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,nwe=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,owe=/^[a-z\d]+$/,iwe=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,swe=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,awe=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,cwe=254;function uwe(e){var t=e.replace(/^"(.+)"$/,"$1");if(!t.trim())return!1;var r=/[\.";<>]/.test(t);if(r){if(t===e)return!1;var n=t.split('"').length===t.split('\\"').length;if(!n)return!1}return!0}function lwe(e,t){if((0,JTe.default)(e),t=(0,ZTe.default)(t,twe),t.require_display_name||t.allow_display_name){var r=e.match(rwe);if(r){var n=r[1];if(e=e.replace(n,"").replace(/(^<|>$)/g,""),n.endsWith(" ")&&(n=n.substr(0,n.length-1)),!uwe(n))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>cwe)return!1;var o=e.split("@"),i=o.pop(),s=i.toLowerCase();if(t.host_blacklist.includes(s))return!1;var a=o.join("@");if(t.domain_specific_validation&&(s==="gmail.com"||s==="googlemail.com")){a=a.toLowerCase();var c=a.split("+")[0];if(!(0,tD.default)(c.replace(/\./g,""),{min:6,max:30}))return!1;for(var l=c.split("."),d=0;d<l.length;d++)if(!owe.test(l[d]))return!1}if(t.ignore_max_length===!1&&(!(0,tD.default)(a,{max:64})||!(0,tD.default)(i,{max:254})))return!1;if(!(0,ewe.default)(i,{require_tld:t.require_tld})){if(!t.allow_ip_domain)return!1;if(!(0,kK.default)(i)){if(!i.startsWith("[")||!i.endsWith("]"))return!1;var f=i.substr(1,i.length-2);if(f.length===0||!(0,kK.default)(f))return!1}}if(a[0]==='"')return a=a.slice(1,a.length-1),t.allow_utf8_local_part?awe.test(a):iwe.test(a);for(var m=t.allow_utf8_local_part?swe:nwe,h=a.split("."),_=0;_<h.length;_++)if(!m.test(h[_]))return!1;return!(t.blacklisted_chars&&a.search(new RegExp("[".concat(t.blacklisted_chars,"]+"),"g"))!==-1)}rD.exports=If.default;rD.exports.default=If.default});var qK=b((Cf,nD)=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.default=xwe;var dwe=cS(_u()),fwe=cS(JC()),BK=cS(aS()),pwe=cS(iS());function cS(e){return e&&e.__esModule?e:{default:e}}function mwe(e,t){return _we(e)||gwe(e,t)||ywe(e,t)||hwe()}function hwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
79
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ywe(e,t){if(e){if(typeof e=="string")return UK(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return UK(e,t)}}function UK(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function gwe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,o=!1,i=void 0;try{for(var s=e[Symbol.iterator](),a;!(n=(a=s.next()).done)&&(r.push(a.value),!(t&&r.length===t));n=!0);}catch(c){o=!0,i=c}finally{try{!n&&s.return!=null&&s.return()}finally{if(o)throw i}}return r}}function _we(e){if(Array.isArray(e))return e}var Ewe={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},Swe=/^\[([^\]]+)\](?::([0-9]+))?$/;function bwe(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function jK(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(e===n||bwe(n)&&n.test(e))return!0}return!1}function xwe(e,t){if((0,dwe.default)(e),!e||/[\s<>]/.test(e)||e.indexOf("mailto:")===0||(t=(0,pwe.default)(t,Ewe),t.validate_length&&e.length>=2083)||!t.allow_fragments&&e.includes("#")||!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;var r,n,o,i,s,a,c,l;if(c=e.split("#"),e=c.shift(),c=e.split("?"),e=c.shift(),c=e.split("://"),c.length>1){if(r=c.shift().toLowerCase(),t.require_valid_protocol&&t.protocols.indexOf(r)===-1)return!1}else{if(t.require_protocol)return!1;if(e.substr(0,2)==="//"){if(!t.allow_protocol_relative_urls)return!1;c[0]=e.substr(2)}}if(e=c.join("://"),e==="")return!1;if(c=e.split("/"),e=c.shift(),e===""&&!t.require_host)return!0;if(c=e.split("@"),c.length>1){if(t.disallow_auth||c[0]===""||(n=c.shift(),n.indexOf(":")>=0&&n.split(":").length>2))return!1;var d=n.split(":"),f=mwe(d,2),m=f[0],h=f[1];if(m===""&&h==="")return!1}i=c.join("@"),a=null,l=null;var _=i.match(Swe);if(_?(o="",l=_[1],a=_[2]||null):(c=i.split(":"),o=c.shift(),c.length&&(a=c.join(":"))),a!==null&&a.length>0){if(s=parseInt(a,10),!/^[0-9]+$/.test(a)||s<=0||s>65535)return!1}else if(t.require_port)return!1;return t.host_whitelist?jK(o,t.host_whitelist):!(!(0,BK.default)(o)&&!(0,fwe.default)(o,t)&&(!l||!(0,BK.default)(l,6))||(o=o||l,t.host_blacklist&&jK(o,t.host_blacklist)))}nD.exports=Cf.default;nD.exports.default=Cf.default});var HK=b((H3e,GK)=>{"use strict";var vwe=FK(),Twe=qK(),wwe=aS();function oD(e,t){if(!e)throw new Error(t)}var Awe={name:"email",coerce:e=>e.toString(),validate:function(e){oD(vwe(e),"must be an email address")}},Iwe={name:"ipaddress",coerce:e=>e.toString(),validate:function(e){oD(wwe(e),"must be an IP address")}},Cwe={name:"url",coerce:e=>e.toString(),validate:function(e){oD(Twe(e,{require_tld:!1}),"must be a URL")}};GK.exports={email:Awe,ipaddress:Iwe,url:Cwe}});var N5=b(O5=>{"use strict";Object.defineProperty(O5,"__esModule",{value:!0})});var SD=b(ED=>{"use strict";Object.defineProperty(ED,"__esModule",{value:!0});var _D=class{constructor(){if(!!!(Reflect&&Reflect.getMetadata))throw new Error("reflect-metadata should be installed properly");this._reflect=Reflect}isConstructor(t){return!!t.prototype&&!!t.prototype.constructor.name&&t instanceof Function}isConfigClass(t){let r=this._reflect.hasMetadata("tsconvict:properties",t),n=this._reflect.hasMetadata("tsconvict:schema",t);return r||n}getTsType(t,r){return this._reflect.getMetadata("design:type",t,r)}getConvictMetaForProperty(t,r){return this._reflect.getMetadata("tsconvict:property",t,r)}setConvictMetaForProperty(t,r,n){return this._reflect.defineMetadata("tsconvict:property",t,r,n)}setConvictMetaForClass(t,r){return this._reflect.defineMetadata("tsconvict:schema",t,r)}getConvictMetaForClass(t){return this._reflect.getMetadata("tsconvict:schema",t)||null}setPropertyForClass(t,r){let n=this.getClassProperties(t);return n.length===0&&(this._reflect.defineMetadata("tsconvict:properties",[],t.constructor),n=this.getClassProperties(t)),n.push(r)}getClassProperties(t){return this._reflect.getMetadata("tsconvict:properties",t.constructor)||[]}};ED.default=new _D});var $5=b($s=>{"use strict";var JIe=$s&&$s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($s,"__esModule",{value:!0});$s.Property=$s.Config=void 0;var hS=JIe(SD());function ZIe(e={}){return t=>{hS.default.setConvictMetaForClass(e,t)}}$s.Config=ZIe;function eCe(e){return(t,r)=>{if(typeof e=="object"&&typeof e.format>"u"){let n=hS.default.getTsType(t,r);n&&(e.format=n)}hS.default.setConvictMetaForProperty(e,t,r),hS.default.setPropertyForClass(t,r)}}$s.Property=eCe});var q5=b((Z3e,j5)=>{"use strict";var tCe=require("util"),rCe=require("fs"),M5=require("path");function $f(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",n=!1,o=e.match(/^-+/);for(let i=o?o[0].length:0;i<e.length;i++){let s=e.charAt(i);n&&(n=!1,s=s.toUpperCase()),i!==0&&(s==="-"||s==="_")?n=!0:s!=="-"&&s!=="_"&&(r+=s)}return r}}function F5(e,t){let r=e.toLowerCase();t=t||"-";let n="";for(let o=0;o<e.length;o++){let i=r.charAt(o),s=e.charAt(o);i!==s&&o>0?n+=`${t}${r.charAt(o)}`:n+=s}return n}function B5(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function nCe(e){if(Array.isArray(e))return e.map(s=>typeof s!="string"?s+"":s);e=e.trim();let t=0,r=null,n=null,o=null,i=[];for(let s=0;s<e.length;s++){if(r=n,n=e.charAt(s),n===" "&&!o){r!==" "&&t++;continue}n===o?o=null:(n==="'"||n==='"')&&!o&&(o=n),i[t]||(i[t]=""),i[t]+=n}return i}var Kn;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"})(Kn||(Kn={}));var xi,xD=class{constructor(t){xi=t}parse(t,r){let n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),o=nCe(t),i=oCe(Object.assign(Object.create(null),n.alias)),s=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),a=Object.assign(Object.create(null),n.default),c=n.configObjects||[],l=n.envPrefix,d=s["populate--"],f=d?"--":"_",m=Object.create(null),h=Object.create(null),_=n.__||xi.format,E={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},T=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,I=new RegExp("^--"+s["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(R){let N=typeof R=="object"?R.key:R,V=Object.keys(R).map(function(B){return{boolean:"bools",string:"strings",number:"numbers"}[B]}).filter(Boolean).pop();V&&(E[V][N]=!0),E.arrays[N]=!0,E.keys.push(N)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(R){E.bools[R]=!0,E.keys.push(R)}),[].concat(n.string||[]).filter(Boolean).forEach(function(R){E.strings[R]=!0,E.keys.push(R)}),[].concat(n.number||[]).filter(Boolean).forEach(function(R){E.numbers[R]=!0,E.keys.push(R)}),[].concat(n.count||[]).filter(Boolean).forEach(function(R){E.counts[R]=!0,E.keys.push(R)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(R){E.normalize[R]=!0,E.keys.push(R)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([R,N])=>{typeof N=="number"&&(E.nargs[R]=N,E.keys.push(R))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([R,N])=>{typeof N=="function"&&(E.coercions[R]=N,E.keys.push(R))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(R){E.configs[R]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([R,N])=>{(typeof N=="boolean"||typeof N=="function")&&(E.configs[R]=N)})),Qn(n.key,i,n.default,E.arrays),Object.keys(a).forEach(function(R){(E.aliases[R]||[]).forEach(function(N){a[N]=a[R]})});let A=null;$u();let O=[],G=Object.assign(Object.create(null),{_:[]}),z={};for(let R=0;R<o.length;R++){let N=o[R],V=N.replace(/^-{3,}/,"---"),B,$,K,J,ye,St;if(N!=="--"&&Ai(N))Q(N);else if(V.match(/---+(=|$)/)){Q(N);continue}else if(N.match(/^--.+=/)||!s["short-option-groups"]&&N.match(/^-.+=/))J=N.match(/^--?([^=]+)=([\s\S]*)$/),J!==null&&Array.isArray(J)&&J.length>=3&&(Se(J[1],E.arrays)?R=ue(R,J[1],o,J[2]):Se(J[1],E.nargs)!==!1?R=be(R,J[1],o,J[2]):q(J[1],J[2]));else if(N.match(I)&&s["boolean-negation"])J=N.match(I),J!==null&&Array.isArray(J)&&J.length>=2&&($=J[1],q($,Se($,E.arrays)?[!1]:!1));else if(N.match(/^--.+/)||!s["short-option-groups"]&&N.match(/^-[^-]+/))J=N.match(/^--?(.+)/),J!==null&&Array.isArray(J)&&J.length>=2&&($=J[1],Se($,E.arrays)?R=ue(R,$,o):Se($,E.nargs)!==!1?R=be(R,$,o):(ye=o[R+1],ye!==void 0&&(!ye.match(/^-/)||ye.match(T))&&!Se($,E.bools)&&!Se($,E.counts)||/^(true|false)$/.test(ye)?(q($,ye),R++):q($,Wt($))));else if(N.match(/^-.\..+=/))J=N.match(/^-([^=]+)=([\s\S]*)$/),J!==null&&Array.isArray(J)&&J.length>=3&&q(J[1],J[2]);else if(N.match(/^-.\..+/)&&!N.match(T))ye=o[R+1],J=N.match(/^-(.\..+)/),J!==null&&Array.isArray(J)&&J.length>=2&&($=J[1],ye!==void 0&&!ye.match(/^-/)&&!Se($,E.bools)&&!Se($,E.counts)?(q($,ye),R++):q($,Wt($)));else if(N.match(/^-[^-]+/)&&!N.match(T)){K=N.slice(1,-1).split(""),B=!1;for(let Tt=0;Tt<K.length;Tt++){if(ye=N.slice(Tt+2),K[Tt+1]&&K[Tt+1]==="="){St=N.slice(Tt+3),$=K[Tt],Se($,E.arrays)?R=ue(R,$,o,St):Se($,E.nargs)!==!1?R=be(R,$,o,St):q($,St),B=!0;break}if(ye==="-"){q(K[Tt],ye);continue}if(/[A-Za-z]/.test(K[Tt])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(ye)&&Se(ye,E.bools)===!1){q(K[Tt],ye),B=!0;break}if(K[Tt+1]&&K[Tt+1].match(/\W/)){q(K[Tt],ye),B=!0;break}else q(K[Tt],Wt(K[Tt]))}$=N.slice(-1)[0],!B&&$!=="-"&&(Se($,E.arrays)?R=ue(R,$,o):Se($,E.nargs)!==!1?R=be(R,$,o):(ye=o[R+1],ye!==void 0&&(!/^(-|--)[^-]/.test(ye)||ye.match(T))&&!Se($,E.bools)&&!Se($,E.counts)||/^(true|false)$/.test(ye)?(q($,ye),R++):q($,Wt($))))}else if(N.match(/^-[0-9]$/)&&N.match(T)&&Se(N.slice(1),E.bools))$=N.slice(1),q($,Wt($));else if(N==="--"){O=o.slice(R+1);break}else if(s["halt-at-non-option"]){O=o.slice(R);break}else Q(N)}we(G,!0),we(G,!1),it(G),rt(),Qe(G,E.aliases,a,!0),Oe(G),s["set-placeholder-key"]&&st(G),Object.keys(E.counts).forEach(function(R){An(G,R.split("."))||q(R,0)}),d&&O.length&&(G[f]=[]),O.forEach(function(R){G[f].push(R)}),s["camel-case-expansion"]&&s["strip-dashed"]&&Object.keys(G).filter(R=>R!=="--"&&R.includes("-")).forEach(R=>{delete G[R]}),s["strip-aliased"]&&[].concat(...Object.keys(i).map(R=>i[R])).forEach(R=>{s["camel-case-expansion"]&&R.includes("-")&&delete G[R.split(".").map(N=>$f(N)).join(".")],delete G[R]});function Q(R){let N=_e("_",R);(typeof N=="string"||typeof N=="number")&&G._.push(N)}function be(R,N,V,B){let $,K=Se(N,E.nargs);if(K=typeof K!="number"||isNaN(K)?1:K,K===0)return Pr(B)||(A=Error(_("Argument unexpected for: %s",N))),q(N,Wt(N)),R;let J=Pr(B)?0:1;if(s["nargs-eats-options"])V.length-(R+1)+J<K&&(A=Error(_("Not enough arguments following: %s",N))),J=K;else{for($=R+1;$<V.length&&(!V[$].match(/^-[^0-9]/)||V[$].match(T)||Ai(V[$]));$++)J++;J<K&&(A=Error(_("Not enough arguments following: %s",N)))}let ye=Math.min(J,K);for(!Pr(B)&&ye>0&&(q(N,B),ye--),$=R+1;$<ye+R+1;$++)q(N,V[$]);return R+ye}function ue(R,N,V,B){let $=[],K=B||V[R+1],J=Se(N,E.nargs);if(Se(N,E.bools)&&!/^(true|false)$/.test(K))$.push(!0);else if(Pr(K)||Pr(B)&&/^-/.test(K)&&!T.test(K)&&!Ai(K)){if(a[N]!==void 0){let ye=a[N];$=Array.isArray(ye)?ye:[ye]}}else{Pr(B)||$.push(ee(N,B));for(let ye=R+1;ye<V.length&&!(!s["greedy-arrays"]&&$.length>0||J&&typeof J=="number"&&$.length>=J||(K=V[ye],/^-/.test(K)&&!T.test(K)&&!Ai(K)));ye++)R=ye,$.push(ee(N,K))}return typeof J=="number"&&(J&&$.length<J||isNaN(J)&&$.length===0)&&(A=Error(_("Not enough arguments following: %s",N))),q(N,$),R}function q(R,N){if(/-/.test(R)&&s["camel-case-expansion"]){let $=R.split(".").map(function(K){return $f(K)}).join(".");Z(R,$)}let V=ee(R,N),B=R.split(".");ut(G,B,V),E.aliases[R]&&E.aliases[R].forEach(function($){let K=$.split(".");ut(G,K,V)}),B.length>1&&s["dot-notation"]&&(E.aliases[B[0]]||[]).forEach(function($){let K=$.split("."),J=[].concat(B);J.shift(),K=K.concat(J),(E.aliases[R]||[]).includes(K.join("."))||ut(G,K,V)}),Se(R,E.normalize)&&!Se(R,E.arrays)&&[R].concat(E.aliases[R]||[]).forEach(function(K){Object.defineProperty(z,K,{enumerable:!0,get(){return N},set(J){N=typeof J=="string"?xi.normalize(J):J}})})}function Z(R,N){E.aliases[R]&&E.aliases[R].length||(E.aliases[R]=[N],m[N]=!0),E.aliases[N]&&E.aliases[N].length||Z(N,R)}function ee(R,N){typeof N=="string"&&(N[0]==="'"||N[0]==='"')&&N[N.length-1]===N[0]&&(N=N.substring(1,N.length-1)),(Se(R,E.bools)||Se(R,E.counts))&&typeof N=="string"&&(N=N==="true");let V=Array.isArray(N)?N.map(function(B){return _e(R,B)}):_e(R,N);return Se(R,E.counts)&&(Pr(V)||typeof V=="boolean")&&(V=bD()),Se(R,E.normalize)&&Se(R,E.arrays)&&(Array.isArray(N)?V=N.map(B=>xi.normalize(B)):V=xi.normalize(N)),V}function _e(R,N){return!s["parse-positional-numbers"]&&R==="_"||!Se(R,E.strings)&&!Se(R,E.bools)&&!Array.isArray(N)&&(B5(N)&&s["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${N}`)))||!Pr(N)&&Se(R,E.numbers))&&(N=Number(N)),N}function it(R){let N=Object.create(null);Qe(N,E.aliases,a),Object.keys(E.configs).forEach(function(V){let B=R[V]||N[V];if(B)try{let $=null,K=xi.resolve(xi.cwd(),B),J=E.configs[V];if(typeof J=="function"){try{$=J(K)}catch(ye){$=ye}if($ instanceof Error){A=$;return}}else $=xi.require(K);Be($)}catch($){$.name==="PermissionDenied"?A=$:R[V]&&(A=Error(_("Invalid JSON config file: %s",B)))}})}function Be(R,N){Object.keys(R).forEach(function(V){let B=R[V],$=N?N+"."+V:V;typeof B=="object"&&B!==null&&!Array.isArray(B)&&s["dot-notation"]?Be(B,$):(!An(G,$.split("."))||Se($,E.arrays)&&s["combine-arrays"])&&q($,B)})}function rt(){typeof c<"u"&&c.forEach(function(R){Be(R)})}function we(R,N){if(typeof l>"u")return;let V=typeof l=="string"?l:"",B=xi.env();Object.keys(B).forEach(function($){if(V===""||$.lastIndexOf(V,0)===0){let K=$.split("__").map(function(J,ye){return ye===0&&(J=J.substring(V.length)),$f(J)});(N&&E.configs[K.join(".")]||!N)&&!An(R,K)&&q(K.join("."),B[$])}})}function Oe(R){let N,V=new Set;Object.keys(R).forEach(function(B){if(!V.has(B)&&(N=Se(B,E.coercions),typeof N=="function"))try{let $=_e(B,N(R[B]));[].concat(E.aliases[B]||[],B).forEach(K=>{V.add(K),R[K]=$})}catch($){A=$}})}function st(R){return E.keys.forEach(N=>{~N.indexOf(".")||typeof R[N]>"u"&&(R[N]=void 0)}),R}function Qe(R,N,V,B=!1){Object.keys(V).forEach(function($){An(R,$.split("."))||(ut(R,$.split("."),V[$]),B&&(h[$]=!0),(N[$]||[]).forEach(function(K){An(R,K.split("."))||ut(R,K.split("."),V[$])}))})}function An(R,N){let V=R;s["dot-notation"]||(N=[N.join(".")]),N.slice(0,-1).forEach(function($){V=V[$]||{}});let B=N[N.length-1];return typeof V!="object"?!1:B in V}function ut(R,N,V){let B=R;s["dot-notation"]||(N=[N.join(".")]),N.slice(0,-1).forEach(function(St){St=L5(St),typeof B=="object"&&B[St]===void 0&&(B[St]={}),typeof B[St]!="object"||Array.isArray(B[St])?(Array.isArray(B[St])?B[St].push({}):B[St]=[B[St],{}],B=B[St][B[St].length-1]):B=B[St]});let $=L5(N[N.length-1]),K=Se(N.join("."),E.arrays),J=Array.isArray(V),ye=s["duplicate-arguments-array"];!ye&&Se($,E.nargs)&&(ye=!0,(!Pr(B[$])&&E.nargs[$]===1||Array.isArray(B[$])&&B[$].length===E.nargs[$])&&(B[$]=void 0)),V===bD()?B[$]=bD(B[$]):Array.isArray(B[$])?ye&&K&&J?B[$]=s["flatten-duplicate-arrays"]?B[$].concat(V):(Array.isArray(B[$][0])?B[$]:[B[$]]).concat([V]):!ye&&!!K==!!J?B[$]=V:B[$]=B[$].concat([V]):B[$]===void 0&&K?B[$]=J?V:[V]:ye&&!(B[$]===void 0||Se($,E.counts)||Se($,E.bools))?B[$]=[B[$],V]:B[$]=V}function Qn(...R){R.forEach(function(N){Object.keys(N||{}).forEach(function(V){E.aliases[V]||(E.aliases[V]=[].concat(i[V]||[]),E.aliases[V].concat(V).forEach(function(B){if(/-/.test(B)&&s["camel-case-expansion"]){let $=$f(B);$!==V&&E.aliases[V].indexOf($)===-1&&(E.aliases[V].push($),m[$]=!0)}}),E.aliases[V].concat(V).forEach(function(B){if(B.length>1&&/[A-Z]/.test(B)&&s["camel-case-expansion"]){let $=F5(B,"-");$!==V&&E.aliases[V].indexOf($)===-1&&(E.aliases[V].push($),m[$]=!0)}}),E.aliases[V].forEach(function(B){E.aliases[B]=[V].concat(E.aliases[V].filter(function($){return B!==$}))}))})})}function Se(R,N){let V=[].concat(E.aliases[R]||[],R),B=Object.keys(N),$=V.find(K=>B.includes(K));return $?N[$]:!1}function mt(R){let N=Object.keys(E);return[].concat(N.map(B=>E[B])).some(function(B){return Array.isArray(B)?B.includes(R):B[R]})}function Xn(R,...N){return[].concat(...N).some(function(B){let $=R.match(B);return $&&mt($[1])})}function Ou(R){if(R.match(T)||!R.match(/^-[^-]+/))return!1;let N=!0,V,B=R.slice(1).split("");for(let $=0;$<B.length;$++){if(V=R.slice($+2),!mt(B[$])){N=!1;break}if(B[$+1]&&B[$+1]==="="||V==="-"||/[A-Za-z]/.test(B[$])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(V)||B[$+1]&&B[$+1].match(/\W/))break}return N}function Ai(R){return s["unknown-options-as-args"]&&Nu(R)}function Nu(R){return R=R.replace(/^-{3,}/,"--"),R.match(T)||Ou(R)?!1:!Xn(R,/^-+([^=]+?)=[\s\S]*$/,I,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function Wt(R){return!Se(R,E.bools)&&!Se(R,E.counts)&&`${R}`in a?a[R]:Na(Jn(R))}function Na(R){return{[Kn.BOOLEAN]:!0,[Kn.STRING]:"",[Kn.NUMBER]:void 0,[Kn.ARRAY]:[]}[R]}function Jn(R){let N=Kn.BOOLEAN;return Se(R,E.strings)?N=Kn.STRING:Se(R,E.numbers)?N=Kn.NUMBER:Se(R,E.bools)?N=Kn.BOOLEAN:Se(R,E.arrays)&&(N=Kn.ARRAY),N}function Pr(R){return R===void 0}function $u(){Object.keys(E.counts).find(R=>Se(R,E.arrays)?(A=Error(_("Invalid configuration: %s, opts.count excludes opts.array.",R)),!0):Se(R,E.nargs)?(A=Error(_("Invalid configuration: %s, opts.count excludes opts.narg.",R)),!0):!1)}return{aliases:Object.assign({},E.aliases),argv:Object.assign(z,G),configuration:s,defaulted:Object.assign({},h),error:A,newAliases:Object.assign({},m)}}};function oCe(e){let t=[],r=Object.create(null),n=!0;for(Object.keys(e).forEach(function(o){t.push([].concat(e[o],o))});n;){n=!1;for(let o=0;o<t.length;o++)for(let i=o+1;i<t.length;i++)if(t[o].filter(function(a){return t[i].indexOf(a)!==-1}).length){t[o]=t[o].concat(t[i]),t.splice(i,1),n=!0;break}}return t.forEach(function(o){o=o.filter(function(s,a,c){return c.indexOf(s)===a});let i=o.pop();i!==void 0&&typeof i=="string"&&(r[i]=o)}),r}function bD(e){return e!==void 0?e+1:1}function L5(e){return e==="__proto__"?"___proto___":e}var k5=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):10;if(process&&process.version&&Number(process.version.match(/v([^.]+)/)[1])<k5)throw Error(`yargs parser supports a minimum Node.js version of ${k5}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var iCe=process?process.env:{},U5=new xD({cwd:process.cwd,env:()=>iCe,format:tCe.format,normalize:M5.normalize,resolve:M5.resolve,require:e=>{if(typeof require<"u")return require(e);if(e.match(/\.json$/))return rCe.readFileSync(e,"utf8");throw Error("only .json config files are supported in ESM")}}),Mf=function(t,r){return U5.parse(t.slice(),r).argv};Mf.detailed=function(e,t){return U5.parse(e.slice(),t)};Mf.camelCase=$f;Mf.decamelize=F5;Mf.looksLikeNumber=B5;j5.exports=Mf});var R9=b((Lf,vu)=>{var sCe=200,e9="__lodash_hash_undefined__",t9=9007199254740991,RD="[object Arguments]",aCe="[object Array]",r9="[object Boolean]",n9="[object Date]",cCe="[object Error]",PD="[object Function]",o9="[object GeneratorFunction]",yS="[object Map]",i9="[object Number]",OD="[object Object]",G5="[object Promise]",s9="[object RegExp]",gS="[object Set]",a9="[object String]",c9="[object Symbol]",TD="[object WeakMap]",u9="[object ArrayBuffer]",_S="[object DataView]",l9="[object Float32Array]",d9="[object Float64Array]",f9="[object Int8Array]",p9="[object Int16Array]",m9="[object Int32Array]",h9="[object Uint8Array]",y9="[object Uint8ClampedArray]",g9="[object Uint16Array]",_9="[object Uint32Array]",uCe=/[\\^$.*+?()[\]{}|]/g,lCe=/\w*$/,dCe=/^\[object .+?Constructor\]$/,fCe=/^(?:0|[1-9]\d*)$/,pt={};pt[RD]=pt[aCe]=pt[u9]=pt[_S]=pt[r9]=pt[n9]=pt[l9]=pt[d9]=pt[f9]=pt[p9]=pt[m9]=pt[yS]=pt[i9]=pt[OD]=pt[s9]=pt[gS]=pt[a9]=pt[c9]=pt[h9]=pt[y9]=pt[g9]=pt[_9]=!0;pt[cCe]=pt[PD]=pt[TD]=!1;var pCe=typeof global=="object"&&global&&global.Object===Object&&global,mCe=typeof self=="object"&&self&&self.Object===Object&&self,vi=pCe||mCe||Function("return this")(),E9=typeof Lf=="object"&&Lf&&!Lf.nodeType&&Lf,H5=E9&&typeof vu=="object"&&vu&&!vu.nodeType&&vu,hCe=H5&&H5.exports===E9;function yCe(e,t){return e.set(t[0],t[1]),e}function gCe(e,t){return e.add(t),e}function _Ce(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function ECe(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function S9(e,t,r,n){var o=-1,i=e?e.length:0;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}function SCe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function bCe(e,t){return e==null?void 0:e[t]}function b9(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function V5(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function ND(e,t){return function(r){return e(t(r))}}function W5(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var xCe=Array.prototype,vCe=Function.prototype,ES=Object.prototype,vD=vi["__core-js_shared__"],z5=(function(){var e=/[^.]+$/.exec(vD&&vD.keys&&vD.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})(),x9=vCe.toString,Ms=ES.hasOwnProperty,SS=ES.toString,TCe=RegExp("^"+x9.call(Ms).replace(uCe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),K5=hCe?vi.Buffer:void 0,Y5=vi.Symbol,Q5=vi.Uint8Array,wCe=ND(Object.getPrototypeOf,Object),ACe=Object.create,ICe=ES.propertyIsEnumerable,CCe=xCe.splice,X5=Object.getOwnPropertySymbols,DCe=K5?K5.isBuffer:void 0,RCe=ND(Object.keys,Object),wD=Au(vi,"DataView"),kf=Au(vi,"Map"),AD=Au(vi,"Promise"),ID=Au(vi,"Set"),CD=Au(vi,"WeakMap"),Ff=Au(Object,"create"),PCe=Oa(wD),OCe=Oa(kf),NCe=Oa(AD),$Ce=Oa(ID),MCe=Oa(CD),J5=Y5?Y5.prototype:void 0,Z5=J5?J5.valueOf:void 0;function Pa(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function LCe(){this.__data__=Ff?Ff(null):{}}function kCe(e){return this.has(e)&&delete this.__data__[e]}function FCe(e){var t=this.__data__;if(Ff){var r=t[e];return r===e9?void 0:r}return Ms.call(t,e)?t[e]:void 0}function BCe(e){var t=this.__data__;return Ff?t[e]!==void 0:Ms.call(t,e)}function UCe(e,t){var r=this.__data__;return r[e]=Ff&&t===void 0?e9:t,this}Pa.prototype.clear=LCe;Pa.prototype.delete=kCe;Pa.prototype.get=FCe;Pa.prototype.has=BCe;Pa.prototype.set=UCe;function Ti(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function jCe(){this.__data__=[]}function qCe(e){var t=this.__data__,r=bS(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():CCe.call(t,r,1),!0}function GCe(e){var t=this.__data__,r=bS(t,e);return r<0?void 0:t[r][1]}function HCe(e){return bS(this.__data__,e)>-1}function VCe(e,t){var r=this.__data__,n=bS(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Ti.prototype.clear=jCe;Ti.prototype.delete=qCe;Ti.prototype.get=GCe;Ti.prototype.has=HCe;Ti.prototype.set=VCe;function Tu(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function WCe(){this.__data__={hash:new Pa,map:new(kf||Ti),string:new Pa}}function zCe(e){return xS(this,e).delete(e)}function KCe(e){return xS(this,e).get(e)}function YCe(e){return xS(this,e).has(e)}function QCe(e,t){return xS(this,e).set(e,t),this}Tu.prototype.clear=WCe;Tu.prototype.delete=zCe;Tu.prototype.get=KCe;Tu.prototype.has=YCe;Tu.prototype.set=QCe;function wu(e){this.__data__=new Ti(e)}function XCe(){this.__data__=new Ti}function JCe(e){return this.__data__.delete(e)}function ZCe(e){return this.__data__.get(e)}function eDe(e){return this.__data__.has(e)}function tDe(e,t){var r=this.__data__;if(r instanceof Ti){var n=r.__data__;if(!kf||n.length<sCe-1)return n.push([e,t]),this;r=this.__data__=new Tu(n)}return r.set(e,t),this}wu.prototype.clear=XCe;wu.prototype.delete=JCe;wu.prototype.get=ZCe;wu.prototype.has=eDe;wu.prototype.set=tDe;function rDe(e,t){var r=MD(e)||ADe(e)?SCe(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||Ms.call(e,i))&&!(o&&(i=="length"||xDe(i,n)))&&r.push(i);return r}function v9(e,t,r){var n=e[t];(!(Ms.call(e,t)&&I9(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function bS(e,t){for(var r=e.length;r--;)if(I9(e[r][0],t))return r;return-1}function nDe(e,t){return e&&T9(t,LD(t),e)}function DD(e,t,r,n,o,i,s){var a;if(n&&(a=i?n(e,o,i,s):n(e)),a!==void 0)return a;if(!vS(e))return e;var c=MD(e);if(c){if(a=EDe(e),!t)return yDe(e,a)}else{var l=Ra(e),d=l==PD||l==o9;if(CDe(e))return uDe(e,t);if(l==OD||l==RD||d&&!i){if(b9(e))return i?e:{};if(a=SDe(d?{}:e),!t)return gDe(e,nDe(a,e))}else{if(!pt[l])return i?e:{};a=bDe(e,l,DD,t)}}s||(s=new wu);var f=s.get(e);if(f)return f;if(s.set(e,a),!c)var m=r?_De(e):LD(e);return _Ce(m||e,function(h,_){m&&(_=h,h=e[_]),v9(a,_,DD(h,t,r,n,_,e,s))}),a}function oDe(e){return vS(e)?ACe(e):{}}function iDe(e,t,r){var n=t(e);return MD(e)?n:ECe(n,r(e))}function sDe(e){return SS.call(e)}function aDe(e){if(!vS(e)||TDe(e))return!1;var t=D9(e)||b9(e)?TCe:dCe;return t.test(Oa(e))}function cDe(e){if(!A9(e))return RCe(e);var t=[];for(var r in Object(e))Ms.call(e,r)&&r!="constructor"&&t.push(r);return t}function uDe(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function $D(e){var t=new e.constructor(e.byteLength);return new Q5(t).set(new Q5(e)),t}function lDe(e,t){var r=t?$D(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function dDe(e,t,r){var n=t?r(V5(e),!0):V5(e);return S9(n,yCe,new e.constructor)}function fDe(e){var t=new e.constructor(e.source,lCe.exec(e));return t.lastIndex=e.lastIndex,t}function pDe(e,t,r){var n=t?r(W5(e),!0):W5(e);return S9(n,gCe,new e.constructor)}function mDe(e){return Z5?Object(Z5.call(e)):{}}function hDe(e,t){var r=t?$D(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function yDe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function T9(e,t,r,n){r||(r={});for(var o=-1,i=t.length;++o<i;){var s=t[o],a=n?n(r[s],e[s],s,r,e):void 0;v9(r,s,a===void 0?e[s]:a)}return r}function gDe(e,t){return T9(e,w9(e),t)}function _De(e){return iDe(e,LD,w9)}function xS(e,t){var r=e.__data__;return vDe(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Au(e,t){var r=bCe(e,t);return aDe(r)?r:void 0}var w9=X5?ND(X5,Object):PDe,Ra=sDe;(wD&&Ra(new wD(new ArrayBuffer(1)))!=_S||kf&&Ra(new kf)!=yS||AD&&Ra(AD.resolve())!=G5||ID&&Ra(new ID)!=gS||CD&&Ra(new CD)!=TD)&&(Ra=function(e){var t=SS.call(e),r=t==OD?e.constructor:void 0,n=r?Oa(r):void 0;if(n)switch(n){case PCe:return _S;case OCe:return yS;case NCe:return G5;case $Ce:return gS;case MCe:return TD}return t});function EDe(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&Ms.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function SDe(e){return typeof e.constructor=="function"&&!A9(e)?oDe(wCe(e)):{}}function bDe(e,t,r,n){var o=e.constructor;switch(t){case u9:return $D(e);case r9:case n9:return new o(+e);case _S:return lDe(e,n);case l9:case d9:case f9:case p9:case m9:case h9:case y9:case g9:case _9:return hDe(e,n);case yS:return dDe(e,n,r);case i9:case a9:return new o(e);case s9:return fDe(e);case gS:return pDe(e,n,r);case c9:return mDe(e)}}function xDe(e,t){return t=t??t9,!!t&&(typeof e=="number"||fCe.test(e))&&e>-1&&e%1==0&&e<t}function vDe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function TDe(e){return!!z5&&z5 in e}function A9(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ES;return e===r}function Oa(e){if(e!=null){try{return x9.call(e)}catch{}try{return e+""}catch{}}return""}function wDe(e){return DD(e,!0,!0)}function I9(e,t){return e===t||e!==e&&t!==t}function ADe(e){return IDe(e)&&Ms.call(e,"callee")&&(!ICe.call(e,"callee")||SS.call(e)==RD)}var MD=Array.isArray;function C9(e){return e!=null&&DDe(e.length)&&!D9(e)}function IDe(e){return RDe(e)&&C9(e)}var CDe=DCe||ODe;function D9(e){var t=vS(e)?SS.call(e):"";return t==PD||t==o9}function DDe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=t9}function vS(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function RDe(e){return!!e&&typeof e=="object"}function LD(e){return C9(e)?rDe(e):cDe(e)}function PDe(){return[]}function ODe(){return!1}vu.exports=wDe});var U9=b((eHe,B9)=>{"use strict";var NDe=require("fs"),$De=q5(),Iu=R9(),MDe=["__proto__.","constructor.prototype."],LDe="strict",P9="warn";function Ls(e,t){if(!e)throw new Error(t)}function O9(e){return Number.isInteger(e)&&e>=0&&e<=65535}function BD(e){return String(e).includes("\\\\.\\pipe\\")}var Bf={"*":function(){},int:function(e){Ls(Number.isInteger(e),"must be an integer")},nat:function(e){Ls(Number.isInteger(e)&&e>=0,"must be a positive integer")},port:function(e){Ls(O9(e),"ports must be within range 0 - 65535")},windows_named_pipe:function(e){Ls(BD(e),"must be a valid pipe")},port_or_windows_named_pipe:function(e){BD(e)||Ls(O9(e),"must be a windows named pipe or a number within range 0 - 65535")}};Bf.integer=Bf.int;var UD=new Map,jD={"*":JSON.parse};function N9(e,t){let r=Object.keys(e),n,o=[];for(;r.length;){n=r.shift();let s=Cu(e,n);if(typeof s=="object"&&!Array.isArray(s)&&s!=null){if(t)if("_cvtProperties"in s)s=s._cvtProperties,n=`${n}._cvtProperties`;else{o.push([n,s]);continue}let a=Object.keys(s);if(a.length>0){a.forEach(function(c){r.push(`${n}.${c}`)});continue}}o.push([n,s])}let i={};return o.forEach(function(s){let a=s[0];t&&(a=a.replace(/\._cvtProperties/g,""));let c=s[1];i[a]=c}),i}function kDe(e,t,r){let n={undeclared:[],invalid_type:[],missing:[]},o=N9(e),i=N9(t._cvtProperties,!0);return Object.keys(i).forEach(function(s){let a=i[s],c=o[s];if(!(s in o))try{if(typeof a.default=="object"&&!Array.isArray(a.default))c=Cu(e,s);else throw new Error("missing")}catch{let d=new Error(`configuration param '${s}' missing from config, did you override its parent?`);n.missing.push(d);return}if(delete o[s],(a.format==="object"||typeof a.default=="object")&&Object.keys(o).filter(function(l){return l.lastIndexOf(`${s}.`,0)===0}).forEach(function(l){delete o[l]}),!(typeof a.default>"u"&&c===a.default))try{a._format(c)}catch(l){n.invalid_type.push(l)}}),r&&Object.keys(o).forEach(function(s){let a=new Error(`configuration param '${s}' not declared in the schema`);n.undeclared.push(a)}),n}function FDe(e,t){Ls(e.indexOf(t)!==-1,`must be one of the possible values: ${JSON.stringify(e)}`)}var GD={Object,Array,String,Number,Boolean,RegExp},L9=Object.keys(GD),BDe=L9.map(function(e){return GD[e]});function k9(e,t,r,n,o,i,s){if(e==="_cvtProperties")throw new Error(`'${n}': '_cvtProperties' is reserved word of convict.`);if(typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length>0&&!("default"in t)){r[e]={_cvtProperties:{}},Object.keys(t).forEach(function(d){k9(d,t[d],r[e]._cvtProperties,`${n}.${d}`,o,i,s)});return}else(typeof t!="object"||Array.isArray(t)||t===null||Object.keys(t).length==0)&&(t={default:t});let a=Iu(t);if(r[e]=a,a.env&&(o[a.env]||(o[a.env]=[]),o[a.env].push(n)),a.arg){if(i[a.arg])throw new Error(`'${n}' reuses a command-line argument: ${a.arg}`);i[a.arg]=n}a.sensitive===!0&&s.add(n);let c=a.format,l;if(BDe.indexOf(c)>=0||L9.indexOf(c)>=0){let d=typeof c=="string"?GD[c]:c;l=function(f){Ls(Object.prototype.toString.call(f)==Object.prototype.toString.call(new d),`must be of type ${d.name}`)},a.format=d.name.toLowerCase()}else if(typeof c=="string"){if(!Bf[c])throw new Error(`'${n}' uses an unknown format type: ${c}`);l=Bf[c]}else if(Array.isArray(c))l=FDe.bind(null,c);else if(typeof c=="function")l=c;else if(c&&typeof c!="function")throw new Error(`'${n}': "format" must be a function or a known format type.`);if(!l&&!c){let d=Object.prototype.toString.call(a.default);l=function(f){Ls(Object.prototype.toString.call(f)==d," should be of type "+d.replace(/\[.* |]/g,""))}}a._format=function(d){if(!(this.nullable&&d===null))try{l(d,this)}catch(f){throw f.fullName=n,f.value=d,f}}}function kD(e){let t=e.getEnv();Object.keys(e._env).forEach(function(r){t[r]!==void 0&&e._env[r].forEach(function(o){e.set(o,t[r])})})}function FD(e){let t=$De(e.getArgs(),{configuration:{"dot-notation":!1}});Object.keys(e._argv).forEach(function(r){let n=e._argv[r];t[r]!==void 0&&e.set(n,String(t[r]))})}function F9(e,t,r){Object.keys(e._cvtProperties).forEach(function(n){let o=e._cvtProperties[n];if(o._cvtProperties){let i=t[n]||{};F9(o,i,r),t[n]=i}else t[n]=HD(n,Iu(o.default),e,r)})}function $9(e){return typeof e=="object"&&e!==null}function qD(e,t,r){Object.keys(e).forEach(function(n){Array.isArray(e[n])||!$9(e[n])||!r||r.format==="object"?t[n]=HD(n,e[n],r):($9(t[n])||(t[n]={}),qD(e[n],t[n],r._cvtProperties[n]))})}function UDe(e,t){let r=t.split("."),n=e;for(;r.length>0;){let o=r.shift();if(n&&n._cvtProperties&&n._cvtProperties[o])n=n._cvtProperties[o];else{n=null;break}}return n}function jDe(e,t){let r=UDe(e,t);return r==null?null:typeof r.format=="string"?r.format:r.default!=null?typeof r.default:null}function HD(e,t,r,n){let o=jDe(r,e);if(typeof t=="string"){if(UD.has(o))return UD.get(o)(t,n,e);switch(o){case"port":case"nat":case"integer":case"int":t=parseInt(t,10);break;case"port_or_windows_named_pipe":t=BD(t)?t:parseInt(t,10);break;case"number":t=parseFloat(t);break;case"boolean":t=String(t).toLowerCase()!=="false";break;case"array":t=t.split(",");break;case"object":t=JSON.parse(t);break;case"regexp":t=new RegExp(t);break;default:}}return t}function M9(e){let t=e.split("."),r=t.length>1?t.pop():"";return(jD[r]||jD["*"])(NDe.readFileSync(e,"utf-8"))}function Cu(e,t,r){if(t){let n=t.split(".");for(;n.length;){let o=n.shift();if(r&&e[o]==null)e[o]={},e=e[o];else if(o in e)e=e[o];else throw new Error(`cannot find configuration param '${t}'`)}}return e}var Uf=function(t,r){let n={getArgs:function(){return r&&r.args||process.argv.slice(2)},getEnv:function(){return r&&r.env||process.env},getProperties:function(){return Iu(this._instance)},toString:function(){let o=Iu(this._instance);return this._sensitive.forEach(function(i){let s=i.split("."),a=s.pop(),c=s.join("."),l=Cu(o,c);l[a]="[Sensitive]"}),JSON.stringify(o,null,2)},getSchema:function(){return JSON.parse(JSON.stringify(this._schema))},getSchemaString:function(){return JSON.stringify(this._schema,null,2)},get:function(o){let i=Cu(this._instance,o);return Iu(i)},default:function(o){o=o.split(".").join("._cvtProperties.")+".default";let i=Cu(this._schema._cvtProperties,o);return Iu(i)},reset:function(o){this.set(o,this.default(o))},has:function(o){try{return typeof this.get(o)<"u"}catch{return!1}},set:function(o,i){for(let d of MDe)if(o.startsWith(d)||o.includes(`.${d}`))return this;i=HD(o,i,this._schema,this);let s=o.split("."),a=s.pop(),c=s.join("."),l=Cu(this._instance,c,!0);return l[a]=i,this},load:function(o){return qD(o,this._instance,this._schema),kD(n),FD(n),this},loadFile:function(o){let i=this;return Array.isArray(o)||(o=[o]),o.forEach(function(s){let a=M9(s);a&&qD(a,i._instance,i._schema)}),kD(n),FD(n),this},validate:function(o){if(o=o||{},o.allowed=o.allowed||P9,o.output&&typeof o.output!="function")throw new Error("options.output is optional and must be a function.");let i=o.output||global.console.log,s=kDe(this._instance,this._schema,o.allowed);if(s.invalid_type.length+s.undeclared.length+s.missing.length){let a=this._sensitive,c=function(_){let E="";for(let T=0;T<_.length;T++){E.length&&(E+=`
80
+ `);let I=_[T];I.fullName&&(E+=I.fullName+": "),I.message&&(E+=I.message),I.value&&!a.has(I.fullName)&&(E+=": value was "+JSON.stringify(I.value))}return E},l=c(s.invalid_type),d=c(s.undeclared),f=c(s.missing),m=[l,f];if(o.allowed===P9&&d.length){let _="Warning:";process.stdout.isTTY&&(_="\x1B[33;1m"+_+"\x1B[0m"),i(_+" "+d)}else o.allowed===LDe&&m.push(d);let h=m.filter(function(_){return _.length}).join(`
81
+ `);if(h.length)throw new Error(h)}return this}};return typeof t=="string"?n._def=M9(t):n._def=t,n._schema={_cvtProperties:{}},n._env={},n._argv={},n._sensitive=new Set,Object.keys(n._def).forEach(function(o){k9(o,n._def[o],n._schema._cvtProperties,o,n._env,n._argv,n._sensitive)}),n._instance={},F9(n._schema,n._instance,n),kD(n),FD(n),n};Uf.addFormat=function(e,t,r){if(typeof e=="object"&&(t=e.validate,r=e.coerce,e=e.name),typeof t!="function")throw new Error(`Validation function for '${e}' must be a function.`);if(r&&typeof r!="function")throw new Error(`Coerce function for '${e}' must be a function.`);Bf[e]=t,r&&UD.set(e,r)};Uf.addFormats=function(e){Object.keys(e).forEach(function(t){Uf.addFormat(t,e[t].validate,e[t].coerce)})};Uf.addParser=function(e){Array.isArray(e)||(e=[e]),e.forEach(function(t){if(!t)throw new Error("Invalid parser");if(!t.extension)throw new Error("Missing parser.extension");if(!t.parse)throw new Error("Missing parser.parse function");if(typeof t.parse!="function")throw new Error("Invalid parser.parse function");(Array.isArray(t.extension)?t.extension:[t.extension]).forEach(function(n){if(typeof n!="string")throw new Error("Invalid parser.extension");jD[n]=t.parse})})};B9.exports=Uf});var j9=b(Du=>{"use strict";var TS=Du&&Du.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Du,"__esModule",{value:!0});Du.TSConvict=void 0;var Mo=TS(SD()),VD=TS(U9()),qDe=TS(require("fs")),GDe=TS(require("path")),WD=class{constructor(t){if(this.opts={},!Mo.default.isConfigClass)throw new Error("A class must be decorated with Config or at least one Property");let r=Mo.default.getConvictMetaForClass(t);r!==null&&(typeof r.parser<"u"&&VD.default.addParser(r.parser),typeof r.formats<"u"&&VD.default.addFormats(r.formats),this.opts=r),this.baseModel=new t,this.schema=this.getSchemaFor(this.baseModel),this.client=VD.default(this.schema)}load(t=null){let r=null;if(typeof this.opts.file<"u"&&qDe.default.existsSync(GDe.default.resolve(this.opts.file))&&(r=this.opts.file),typeof t=="string"||Array.isArray(t)){let i;Array.isArray(t)?i=t:i=[t],r!==null&&i.unshift(r),this.client.loadFile(i)}else if(t===null)r!==null?this.client.loadFile(r):this.client.load({});else if(typeof t=="object")r!==null&&this.client.loadFile(r),this.client.load(t);else throw new Error(`Could not load the config given: ${t}`);let n=this.opts.validationMethod===void 0?"strict":this.opts.validationMethod;this.client.validate({allowed:n});let o=this.client.getProperties();return this.applyDataToModel(this.baseModel,o)}getSchemaFor(t){let r={};for(let n of Mo.default.getClassProperties(t)){let o=Mo.default.getConvictMetaForProperty(t,n);if(Mo.default.isConstructor(o)&&Mo.default.isConfigClass(o))try{t[n]=new o,r[n]=this.getSchemaFor(t[n])}catch(i){throw console.error(i),new Error("Could not make a new class of "+o)}else r[n]=o}return r}applyDataToModel(t,r){for(let n of Mo.default.getClassProperties(t)){let o=Mo.default.getConvictMetaForProperty(t,n);Mo.default.isConstructor(o)&&Mo.default.isConfigClass(o)?this.applyDataToModel(t[n],r[n]||{}):n in r&&(t[n]=r[n])}return t}};Du.TSConvict=WD});var q9=b(wi=>{"use strict";var HDe=wi&&wi.__createBinding||(Object.create?(function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]})),zD=wi&&wi.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&HDe(t,e,r)};Object.defineProperty(wi,"__esModule",{value:!0});zD(N5(),wi);zD($5(),wi);zD(j9(),wi)});var XDe={};Nt(XDe,{handler:()=>QDe,overrideDBManager:()=>zDe});module.exports=ie(XDe);LR().install();var kR;(function(e){(function(t){var r=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:Function("return this;")(),n=o(e);typeof r.Reflect>"u"?r.Reflect=e:n=o(r.Reflect,n),t(n);function o(i,s){return function(a,c){typeof i[a]!="function"&&Object.defineProperty(i,a,{configurable:!0,writable:!0,value:c}),s&&s(a,c)}}})(function(t){var r=Object.prototype.hasOwnProperty,n=typeof Symbol=="function",o=n&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",i=n&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",s=typeof Object.create=="function",a={__proto__:[]}instanceof Array,c=!s&&!a,l={create:s?function(){return Tt(Object.create(null))}:a?function(){return Tt({__proto__:null})}:function(){return Tt({})},has:c?function(M,j){return r.call(M,j)}:function(M,j){return j in M},get:c?function(M,j){return r.call(M,j)?M[j]:void 0}:function(M,j){return M[j]}},d=Object.getPrototypeOf(Function),f=typeof process=="object"&&process.env&&process.env.REFLECT_METADATA_USE_MAP_POLYFILL==="true",m=!f&&typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:J(),h=!f&&typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:ye(),_=!f&&typeof WeakMap=="function"?WeakMap:St(),E=new _;function T(M,j,H,Y){if(ut(H)){if(!Na(M))throw new TypeError;if(!Pr(j))throw new TypeError;return Z(M,j)}else{if(!Na(M))throw new TypeError;if(!mt(j))throw new TypeError;if(!mt(Y)&&!ut(Y)&&!Qn(Y))throw new TypeError;return Qn(Y)&&(Y=void 0),H=Wt(H),ee(M,j,H,Y)}}t("decorate",T);function I(M,j){function H(Y,pe){if(!mt(Y))throw new TypeError;if(!ut(pe)&&!$u(pe))throw new TypeError;Oe(M,j,Y,pe)}return H}t("metadata",I);function A(M,j,H,Y){if(!mt(H))throw new TypeError;return ut(Y)||(Y=Wt(Y)),Oe(M,j,H,Y)}t("defineMetadata",A);function O(M,j,H){if(!mt(j))throw new TypeError;return ut(H)||(H=Wt(H)),it(M,j,H)}t("hasMetadata",O);function G(M,j,H){if(!mt(j))throw new TypeError;return ut(H)||(H=Wt(H)),Be(M,j,H)}t("hasOwnMetadata",G);function z(M,j,H){if(!mt(j))throw new TypeError;return ut(H)||(H=Wt(H)),rt(M,j,H)}t("getMetadata",z);function Q(M,j,H){if(!mt(j))throw new TypeError;return ut(H)||(H=Wt(H)),we(M,j,H)}t("getOwnMetadata",Q);function be(M,j){if(!mt(M))throw new TypeError;return ut(j)||(j=Wt(j)),st(M,j)}t("getMetadataKeys",be);function ue(M,j){if(!mt(M))throw new TypeError;return ut(j)||(j=Wt(j)),Qe(M,j)}t("getOwnMetadataKeys",ue);function q(M,j,H){if(!mt(j))throw new TypeError;ut(H)||(H=Wt(H));var Y=_e(j,H,!1);if(ut(Y)||!Y.delete(M))return!1;if(Y.size>0)return!0;var pe=E.get(j);return pe.delete(H),pe.size>0||E.delete(j),!0}t("deleteMetadata",q);function Z(M,j){for(var H=M.length-1;H>=0;--H){var Y=M[H],pe=Y(j);if(!ut(pe)&&!Qn(pe)){if(!Pr(pe))throw new TypeError;j=pe}}return j}function ee(M,j,H,Y){for(var pe=M.length-1;pe>=0;--pe){var Ot=M[pe],Ae=Ot(j,H,Y);if(!ut(Ae)&&!Qn(Ae)){if(!mt(Ae))throw new TypeError;Y=Ae}}return Y}function _e(M,j,H){var Y=E.get(M);if(ut(Y)){if(!H)return;Y=new m,E.set(M,Y)}var pe=Y.get(j);if(ut(pe)){if(!H)return;pe=new m,Y.set(j,pe)}return pe}function it(M,j,H){var Y=Be(M,j,H);if(Y)return!0;var pe=K(j);return Qn(pe)?!1:it(M,pe,H)}function Be(M,j,H){var Y=_e(j,H,!1);return ut(Y)?!1:Ai(Y.has(M))}function rt(M,j,H){var Y=Be(M,j,H);if(Y)return we(M,j,H);var pe=K(j);if(!Qn(pe))return rt(M,pe,H)}function we(M,j,H){var Y=_e(j,H,!1);if(!ut(Y))return Y.get(M)}function Oe(M,j,H,Y){var pe=_e(H,Y,!0);pe.set(M,j)}function st(M,j){var H=Qe(M,j),Y=K(M);if(Y===null)return H;var pe=st(Y,j);if(pe.length<=0)return H;if(H.length<=0)return pe;for(var Ot=new h,Ae=[],De=0,ge=H;De<ge.length;De++){var He=ge[De],Ve=Ot.has(He);Ve||(Ot.add(He),Ae.push(He))}for(var In=0,jf=pe;In<jf.length;In++){var He=jf[In],Ve=Ot.has(He);Ve||(Ot.add(He),Ae.push(He))}return Ae}function Qe(M,j){var H=[],Y=_e(M,j,!1);if(ut(Y))return H;for(var pe=Y.keys(),Ot=N(pe),Ae=0;;){var De=B(Ot);if(!De)return H.length=Ae,H;var ge=V(De);try{H[Ae]=ge}catch(He){try{$(Ot)}finally{throw He}}Ae++}}function An(M){if(M===null)return 1;switch(typeof M){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return M===null?1:6;default:return 6}}function ut(M){return M===void 0}function Qn(M){return M===null}function Se(M){return typeof M=="symbol"}function mt(M){return typeof M=="object"?M!==null:typeof M=="function"}function Xn(M,j){switch(An(M)){case 0:return M;case 1:return M;case 2:return M;case 3:return M;case 4:return M;case 5:return M}var H=j===3?"string":j===5?"number":"default",Y=R(M,o);if(Y!==void 0){var pe=Y.call(M,H);if(mt(pe))throw new TypeError;return pe}return Ou(M,H==="default"?"number":H)}function Ou(M,j){if(j==="string"){var H=M.toString;if(Jn(H)){var Y=H.call(M);if(!mt(Y))return Y}var pe=M.valueOf;if(Jn(pe)){var Y=pe.call(M);if(!mt(Y))return Y}}else{var pe=M.valueOf;if(Jn(pe)){var Y=pe.call(M);if(!mt(Y))return Y}var Ot=M.toString;if(Jn(Ot)){var Y=Ot.call(M);if(!mt(Y))return Y}}throw new TypeError}function Ai(M){return!!M}function Nu(M){return""+M}function Wt(M){var j=Xn(M,3);return Se(j)?j:Nu(j)}function Na(M){return Array.isArray?Array.isArray(M):M instanceof Object?M instanceof Array:Object.prototype.toString.call(M)==="[object Array]"}function Jn(M){return typeof M=="function"}function Pr(M){return typeof M=="function"}function $u(M){switch(An(M)){case 3:return!0;case 4:return!0;default:return!1}}function R(M,j){var H=M[j];if(H!=null){if(!Jn(H))throw new TypeError;return H}}function N(M){var j=R(M,i);if(!Jn(j))throw new TypeError;var H=j.call(M);if(!mt(H))throw new TypeError;return H}function V(M){return M.value}function B(M){var j=M.next();return j.done?!1:j}function $(M){var j=M.return;j&&j.call(M)}function K(M){var j=Object.getPrototypeOf(M);if(typeof M!="function"||M===d||j!==d)return j;var H=M.prototype,Y=H&&Object.getPrototypeOf(H);if(Y==null||Y===Object.prototype)return j;var pe=Y.constructor;return typeof pe!="function"||pe===M?j:pe}function J(){var M={},j=[],H=(function(){function Ae(De,ge,He){this._index=0,this._keys=De,this._values=ge,this._selector=He}return Ae.prototype["@@iterator"]=function(){return this},Ae.prototype[i]=function(){return this},Ae.prototype.next=function(){var De=this._index;if(De>=0&&De<this._keys.length){var ge=this._selector(this._keys[De],this._values[De]);return De+1>=this._keys.length?(this._index=-1,this._keys=j,this._values=j):this._index++,{value:ge,done:!1}}return{value:void 0,done:!0}},Ae.prototype.throw=function(De){throw this._index>=0&&(this._index=-1,this._keys=j,this._values=j),De},Ae.prototype.return=function(De){return this._index>=0&&(this._index=-1,this._keys=j,this._values=j),{value:De,done:!0}},Ae})();return(function(){function Ae(){this._keys=[],this._values=[],this._cacheKey=M,this._cacheIndex=-2}return Object.defineProperty(Ae.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Ae.prototype.has=function(De){return this._find(De,!1)>=0},Ae.prototype.get=function(De){var ge=this._find(De,!1);return ge>=0?this._values[ge]:void 0},Ae.prototype.set=function(De,ge){var He=this._find(De,!0);return this._values[He]=ge,this},Ae.prototype.delete=function(De){var ge=this._find(De,!1);if(ge>=0){for(var He=this._keys.length,Ve=ge+1;Ve<He;Ve++)this._keys[Ve-1]=this._keys[Ve],this._values[Ve-1]=this._values[Ve];return this._keys.length--,this._values.length--,De===this._cacheKey&&(this._cacheKey=M,this._cacheIndex=-2),!0}return!1},Ae.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=M,this._cacheIndex=-2},Ae.prototype.keys=function(){return new H(this._keys,this._values,Y)},Ae.prototype.values=function(){return new H(this._keys,this._values,pe)},Ae.prototype.entries=function(){return new H(this._keys,this._values,Ot)},Ae.prototype["@@iterator"]=function(){return this.entries()},Ae.prototype[i]=function(){return this.entries()},Ae.prototype._find=function(De,ge){return this._cacheKey!==De&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=De)),this._cacheIndex<0&&ge&&(this._cacheIndex=this._keys.length,this._keys.push(De),this._values.push(void 0)),this._cacheIndex},Ae})();function Y(Ae,De){return Ae}function pe(Ae,De){return De}function Ot(Ae,De){return[Ae,De]}}function ye(){return(function(){function M(){this._map=new m}return Object.defineProperty(M.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),M.prototype.has=function(j){return this._map.has(j)},M.prototype.add=function(j){return this._map.set(j,j),this},M.prototype.delete=function(j){return this._map.delete(j)},M.prototype.clear=function(){this._map.clear()},M.prototype.keys=function(){return this._map.keys()},M.prototype.values=function(){return this._map.values()},M.prototype.entries=function(){return this._map.entries()},M.prototype["@@iterator"]=function(){return this.keys()},M.prototype[i]=function(){return this.keys()},M})()}function St(){var M=16,j=l.create(),H=Y();return(function(){function ge(){this._key=Y()}return ge.prototype.has=function(He){var Ve=pe(He,!1);return Ve!==void 0?l.has(Ve,this._key):!1},ge.prototype.get=function(He){var Ve=pe(He,!1);return Ve!==void 0?l.get(Ve,this._key):void 0},ge.prototype.set=function(He,Ve){var In=pe(He,!0);return In[this._key]=Ve,this},ge.prototype.delete=function(He){var Ve=pe(He,!1);return Ve!==void 0?delete Ve[this._key]:!1},ge.prototype.clear=function(){this._key=Y()},ge})();function Y(){var ge;do ge="@@WeakMap@@"+De();while(l.has(j,ge));return j[ge]=!0,ge}function pe(ge,He){if(!r.call(ge,H)){if(!He)return;Object.defineProperty(ge,H,{value:l.create()})}return ge[H]}function Ot(ge,He){for(var Ve=0;Ve<He;++Ve)ge[Ve]=Math.random()*255|0;return ge}function Ae(ge){return typeof Uint8Array=="function"?typeof crypto<"u"?crypto.getRandomValues(new Uint8Array(ge)):typeof msCrypto<"u"?msCrypto.getRandomValues(new Uint8Array(ge)):Ot(new Uint8Array(ge),ge):Ot(new Array(ge),ge)}function De(){var ge=Ae(M);ge[6]=ge[6]&79|64,ge[8]=ge[8]&191|128;for(var He="",Ve=0;Ve<M;++Ve){var In=ge[Ve];(Ve===4||Ve===6||Ve===8)&&(He+="-"),In<16&&(He+="0"),He+=In.toString(16).toLowerCase()}return He}}function Tt(M){return M.__=void 0,delete M.__,M}})})(kR||(kR={}));var H9=C(eI()),YD=C(HA()),QD=C(O4()),XD=C(s6()),V9=C(uC()),Pu=C(WW());var PK=C(RK()),FTe={"x-forwarded-for":!0,"x-amzn-trace-id":!0};function WC(e){let{request:t}=e,{headers:r,method:n,body:o,querystring:i,uri:s}=t,a=i.replace(/\[/g,"%5B").replace(/]/g,"%5D"),c=r.host[0].value,l=new URL(`https://${c}${s}${i?`?${i}`:""}`),d={};for(let h of Object.keys(r))FTe[h]||(d[h]=r[h][0].value);let f={};for(let h of l.searchParams.keys())f[h]=l.searchParams.get(h)||"";t.querystring=a;let m;return o&&o.data&&o.encoding==="base64"?m=Buffer.from(o.data,"base64"):o&&o.data&&(m=o.data),new PK.HttpRequest({headers:d,hostname:c,method:n,port:443,protocol:"https:",path:t.uri,body:m,query:f})}var zC=["authorization","x-amz-date","x-amz-security-token","x-amz-content-sha256"];async function OK(e,t,r){let n=WC({request:e});for(let i of zC)delete n.headers[i];let o=await r.sign(n);for(let i of zC)e.headers[i]=[{key:i,value:o.headers[i]}];return e}async function NK(e,t,r){let n=WC({request:e}),o=await r.presign(n);for(let i of zC)e.headers[i]=[{key:i,value:o.headers[i]}];return e}var IS=C(HK());function s5(e){return typeof e>"u"||e===null}function Dwe(e){return typeof e=="object"&&e!==null}function Rwe(e){return Array.isArray(e)?e:s5(e)?[]:[e]}function Pwe(e,t){var r,n,o,i;if(t)for(i=Object.keys(t),r=0,n=i.length;r<n;r+=1)o=i[r],e[o]=t[o];return e}function Owe(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function Nwe(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var $we=s5,Mwe=Dwe,Lwe=Rwe,kwe=Owe,Fwe=Nwe,Bwe=Pwe,Vt={isNothing:$we,isObject:Mwe,toArray:Lwe,repeat:kwe,isNegativeZero:Fwe,extend:Bwe};function a5(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
65
82
 
66
- `+e.mark.snippet),n+" "+r):n}function Gc(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=o6(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Gc.prototype=Object.create(Error.prototype);Gc.prototype.constructor=Gc;Gc.prototype.toString=function(t){return this.name+": "+o6(this,t)};var zt=Gc;function S0(e,t,r,n,i){var o="",s="",a=Math.floor(i/2)-1;return n-t>a&&(o=" ... ",t=n-a+o.length),r-n>a&&(s=" ...",r=n+a-s.length),{str:o+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:n-t+o.length}}function b0(e,t){return ct.repeat(" ",t-e.length)+e}function cCe(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],o,s=-1;o=r.exec(e.buffer);)i.push(o.index),n.push(o.index+o[0].length),e.position<=o.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var a="",c,u,d=Math.min(e.line+t.linesAfter,i.length).toString().length,p=t.maxLength-(t.indent+d+3);for(c=1;c<=t.linesBefore&&!(s-c<0);c++)u=S0(e.buffer,n[s-c],i[s-c],e.position-(n[s]-n[s-c]),p),a=ct.repeat(" ",t.indent)+b0((e.line-c+1).toString(),d)+" | "+u.str+`
67
- `+a;for(u=S0(e.buffer,n[s],i[s],e.position,p),a+=ct.repeat(" ",t.indent)+b0((e.line+1).toString(),d)+" | "+u.str+`
68
- `,a+=ct.repeat("-",t.indent+d+3+u.pos)+`^
69
- `,c=1;c<=t.linesAfter&&!(s+c>=i.length);c++)u=S0(e.buffer,n[s+c],i[s+c],e.position-(n[s]-n[s+c]),p),a+=ct.repeat(" ",t.indent)+b0((e.line+c+1).toString(),d)+" | "+u.str+`
70
- `;return a.replace(/\n$/,"")}var uCe=cCe,lCe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],dCe=["scalar","sequence","mapping"];function pCe(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function fCe(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(lCe.indexOf(r)===-1)throw new zt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=pCe(t.styleAliases||null),dCe.indexOf(this.kind)===-1)throw new zt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Tt=fCe;function $H(e,t){var r=[];return e[t].forEach(function(n){var i=r.length;r.forEach(function(o,s){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(i=s)}),r[i]=n}),r}function mCe(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function w0(e){return this.extend(e)}w0.prototype.extend=function(t){var r=[],n=[];if(t instanceof Tt)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new zt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof Tt))throw new zt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new zt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new zt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof Tt))throw new zt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(w0.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=$H(i,"implicit"),i.compiledExplicit=$H(i,"explicit"),i.compiledTypeMap=mCe(i.compiledImplicit,i.compiledExplicit),i};var hCe=w0,yCe=new Tt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),_Ce=new Tt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),vCe=new Tt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),gCe=new hCe({explicit:[yCe,_Ce,vCe]});function ECe(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function SCe(){return null}function bCe(e){return e===null}var CCe=new Tt("tag:yaml.org,2002:null",{kind:"scalar",resolve:ECe,construct:SCe,predicate:bCe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function wCe(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function xCe(e){return e==="true"||e==="True"||e==="TRUE"}function ACe(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var TCe=new Tt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:wCe,construct:xCe,predicate:ACe,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function PCe(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function ICe(e){return 48<=e&&e<=55}function OCe(e){return 48<=e&&e<=57}function RCe(e){if(e===null)return!1;var t=e.length,r=0,n=!1,i;if(!t)return!1;if(i=e[r],(i==="-"||i==="+")&&(i=e[++r]),i==="0"){if(r+1===t)return!0;if(i=e[++r],i==="b"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!PCe(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<t;r++)if(i=e[r],i!=="_"){if(!ICe(e.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<t;r++)if(i=e[r],i!=="_"){if(!OCe(e.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}function DCe(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function NCe(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!ct.isNegativeZero(e)}var MCe=new Tt("tag:yaml.org,2002:int",{kind:"scalar",resolve:RCe,construct:DCe,predicate:NCe,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),LCe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function kCe(e){return!(e===null||!LCe.test(e)||e[e.length-1]==="_")}function FCe(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var BCe=/^[-+]?[0-9]+e/;function jCe(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ct.isNegativeZero(e))return"-0.0";return r=e.toString(10),BCe.test(r)?r.replace("e",".e"):r}function qCe(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||ct.isNegativeZero(e))}var UCe=new Tt("tag:yaml.org,2002:float",{kind:"scalar",resolve:kCe,construct:FCe,predicate:qCe,represent:jCe,defaultStyle:"lowercase"}),GCe=gCe.extend({implicit:[CCe,TCe,MCe,UCe]}),$Ce=GCe,s6=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),a6=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function HCe(e){return e===null?!1:s6.exec(e)!==null||a6.exec(e)!==null}function VCe(e){var t,r,n,i,o,s,a,c=0,u=null,d,p,m;if(t=s6.exec(e),t===null&&(t=a6.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(o=+t[4],s=+t[5],a=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(d=+t[10],p=+(t[11]||0),u=(d*60+p)*6e4,t[9]==="-"&&(u=-u)),m=new Date(Date.UTC(r,n,i,o,s,a,c)),u&&m.setTime(m.getTime()-u),m}function zCe(e){return e.toISOString()}var WCe=new Tt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:HCe,construct:VCe,instanceOf:Date,represent:zCe});function KCe(e){return e==="<<"||e===null}var JCe=new Tt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:KCe}),I0=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
71
- \r`;function YCe(e){if(e===null)return!1;var t,r,n=0,i=e.length,o=I0;for(r=0;r<i;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function XCe(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,o=I0,s=0,a=[];for(t=0;t<i;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|o.indexOf(n.charAt(t));return r=i%4*6,r===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):r===18?(a.push(s>>10&255),a.push(s>>2&255)):r===12&&a.push(s>>4&255),new Uint8Array(a)}function QCe(e){var t="",r=0,n,i,o=e.length,s=I0;for(n=0;n<o;n++)n%3===0&&n&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[n];return i=o%3,i===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):i===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):i===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function ZCe(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var ewe=new Tt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:YCe,construct:XCe,predicate:ZCe,represent:QCe}),twe=Object.prototype.hasOwnProperty,rwe=Object.prototype.toString;function nwe(e){if(e===null)return!0;var t=[],r,n,i,o,s,a=e;for(r=0,n=a.length;r<n;r+=1){if(i=a[r],s=!1,rwe.call(i)!=="[object Object]")return!1;for(o in i)if(twe.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function iwe(e){return e!==null?e:[]}var owe=new Tt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:nwe,construct:iwe}),swe=Object.prototype.toString;function awe(e){if(e===null)return!0;var t,r,n,i,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(n=s[t],swe.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;o[t]=[i[0],n[i[0]]]}return!0}function cwe(e){if(e===null)return[];var t,r,n,i,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)n=s[t],i=Object.keys(n),o[t]=[i[0],n[i[0]]];return o}var uwe=new Tt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:awe,construct:cwe}),lwe=Object.prototype.hasOwnProperty;function dwe(e){if(e===null)return!0;var t,r=e;for(t in r)if(lwe.call(r,t)&&r[t]!==null)return!1;return!0}function pwe(e){return e!==null?e:{}}var fwe=new Tt("tag:yaml.org,2002:set",{kind:"mapping",resolve:dwe,construct:pwe}),c6=$Ce.extend({implicit:[WCe,JCe],explicit:[ewe,owe,uwe,fwe]}),Ni=Object.prototype.hasOwnProperty,Xf=1,u6=2,l6=3,Qf=4,C0=1,mwe=2,HH=3,hwe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ywe=/[\x85\u2028\u2029]/,_we=/[,\[\]\{\}]/,d6=/^(?:!|!!|![a-z\-]+!)$/i,p6=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function VH(e){return Object.prototype.toString.call(e)}function sn(e){return e===10||e===13}function _o(e){return e===9||e===32}function Wt(e){return e===9||e===32||e===10||e===13}function Us(e){return e===44||e===91||e===93||e===123||e===125}function vwe(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function gwe(e){return e===120?2:e===117?4:e===85?8:0}function Ewe(e){return 48<=e&&e<=57?e-48:-1}function zH(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
72
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Swe(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var f6=new Array(256),m6=new Array(256);for(yo=0;yo<256;yo++)f6[yo]=zH(yo)?1:0,m6[yo]=zH(yo);var yo;function bwe(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||c6,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function h6(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=uCe(r),new zt(t,r)}function Q(e,t){throw h6(e,t)}function Zf(e,t){e.onWarning&&e.onWarning.call(null,h6(e,t))}var WH={YAML:function(t,r,n){var i,o,s;t.version!==null&&Q(t,"duplication of %YAML directive"),n.length!==1&&Q(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Q(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&Q(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Zf(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var i,o;n.length!==2&&Q(t,"TAG directive accepts exactly two arguments"),i=n[0],o=n[1],d6.test(i)||Q(t,"ill-formed tag handle (first argument) of the TAG directive"),Ni.call(t.tagMap,i)&&Q(t,'there is a previously declared suffix for "'+i+'" tag handle'),p6.test(o)||Q(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{Q(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o}};function Di(e,t,r,n){var i,o,s,a;if(t<r){if(a=e.input.slice(t,r),n)for(i=0,o=a.length;i<o;i+=1)s=a.charCodeAt(i),s===9||32<=s&&s<=1114111||Q(e,"expected valid JSON character");else hwe.test(a)&&Q(e,"the stream contains non-printable characters");e.result+=a}}function KH(e,t,r,n){var i,o,s,a;for(ct.isObject(r)||Q(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),s=0,a=i.length;s<a;s+=1)o=i[s],Ni.call(t,o)||(t[o]=r[o],n[o]=!0)}function Gs(e,t,r,n,i,o,s,a,c){var u,d;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),u=0,d=i.length;u<d;u+=1)Array.isArray(i[u])&&Q(e,"nested arrays are not supported inside keys"),typeof i=="object"&&VH(i[u])==="[object Object]"&&(i[u]="[object Object]");if(typeof i=="object"&&VH(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(u=0,d=o.length;u<d;u+=1)KH(e,t,o[u],r);else KH(e,t,o,r);else!e.json&&!Ni.call(r,i)&&Ni.call(t,i)&&(e.line=s||e.line,e.lineStart=a||e.lineStart,e.position=c||e.position,Q(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete r[i];return t}function O0(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Q(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function ot(e,t,r){for(var n=0,i=e.input.charCodeAt(e.position);i!==0;){for(;_o(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(sn(i))for(O0(e),i=e.input.charCodeAt(e.position),n++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&Zf(e,"deficient indentation"),n}function rm(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Wt(r)))}function R0(e,t){t===1?e.result+=" ":t>1&&(e.result+=ct.repeat(`
73
- `,t-1))}function Cwe(e,t,r){var n,i,o,s,a,c,u,d,p=e.kind,m=e.result,h;if(h=e.input.charCodeAt(e.position),Wt(h)||Us(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(i=e.input.charCodeAt(e.position+1),Wt(i)||r&&Us(i)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,a=!1;h!==0;){if(h===58){if(i=e.input.charCodeAt(e.position+1),Wt(i)||r&&Us(i))break}else if(h===35){if(n=e.input.charCodeAt(e.position-1),Wt(n))break}else{if(e.position===e.lineStart&&rm(e)||r&&Us(h))break;if(sn(h))if(c=e.line,u=e.lineStart,d=e.lineIndent,ot(e,!1,-1),e.lineIndent>=t){a=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=u,e.lineIndent=d;break}}a&&(Di(e,o,s,!1),R0(e,e.line-c),o=s=e.position,a=!1),_o(h)||(s=e.position+1),h=e.input.charCodeAt(++e.position)}return Di(e,o,s,!1),e.result?!0:(e.kind=p,e.result=m,!1)}function wwe(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Di(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else sn(r)?(Di(e,n,i,!0),R0(e,ot(e,!1,t)),n=i=e.position):e.position===e.lineStart&&rm(e)?Q(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Q(e,"unexpected end of the stream within a single quoted scalar")}function xwe(e,t){var r,n,i,o,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return Di(e,r,e.position,!0),e.position++,!0;if(a===92){if(Di(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),sn(a))ot(e,!1,t);else if(a<256&&f6[a])e.result+=m6[a],e.position++;else if((s=gwe(a))>0){for(i=s,o=0;i>0;i--)a=e.input.charCodeAt(++e.position),(s=vwe(a))>=0?o=(o<<4)+s:Q(e,"expected hexadecimal character");e.result+=Swe(o),e.position++}else Q(e,"unknown escape sequence");r=n=e.position}else sn(a)?(Di(e,r,n,!0),R0(e,ot(e,!1,t)),r=n=e.position):e.position===e.lineStart&&rm(e)?Q(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Q(e,"unexpected end of the stream within a double quoted scalar")}function Awe(e,t){var r=!0,n,i,o,s=e.tag,a,c=e.anchor,u,d,p,m,h,v=Object.create(null),_,g,x,S;if(S=e.input.charCodeAt(e.position),S===91)d=93,h=!1,a=[];else if(S===123)d=125,h=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),S=e.input.charCodeAt(++e.position);S!==0;){if(ot(e,!0,t),S=e.input.charCodeAt(e.position),S===d)return e.position++,e.tag=s,e.anchor=c,e.kind=h?"mapping":"sequence",e.result=a,!0;r?S===44&&Q(e,"expected the node content, but found ','"):Q(e,"missed comma between flow collection entries"),g=_=x=null,p=m=!1,S===63&&(u=e.input.charCodeAt(e.position+1),Wt(u)&&(p=m=!0,e.position++,ot(e,!0,t))),n=e.line,i=e.lineStart,o=e.position,$s(e,t,Xf,!1,!0),g=e.tag,_=e.result,ot(e,!0,t),S=e.input.charCodeAt(e.position),(m||e.line===n)&&S===58&&(p=!0,S=e.input.charCodeAt(++e.position),ot(e,!0,t),$s(e,t,Xf,!1,!0),x=e.result),h?Gs(e,a,v,g,_,x,n,i,o):p?a.push(Gs(e,null,v,g,_,x,n,i,o)):a.push(_),ot(e,!0,t),S=e.input.charCodeAt(e.position),S===44?(r=!0,S=e.input.charCodeAt(++e.position)):r=!1}Q(e,"unexpected end of the stream within a flow collection")}function Twe(e,t){var r,n,i=C0,o=!1,s=!1,a=t,c=0,u=!1,d,p;if(p=e.input.charCodeAt(e.position),p===124)n=!1;else if(p===62)n=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)C0===i?i=p===43?HH:mwe:Q(e,"repeat of a chomping mode identifier");else if((d=Ewe(p))>=0)d===0?Q(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Q(e,"repeat of an indentation width identifier"):(a=t+d-1,s=!0);else break;if(_o(p)){do p=e.input.charCodeAt(++e.position);while(_o(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!sn(p)&&p!==0)}for(;p!==0;){for(O0(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),sn(p)){c++;continue}if(e.lineIndent<a){i===HH?e.result+=ct.repeat(`
74
- `,o?1+c:c):i===C0&&o&&(e.result+=`
75
- `);break}for(n?_o(p)?(u=!0,e.result+=ct.repeat(`
76
- `,o?1+c:c)):u?(u=!1,e.result+=ct.repeat(`
77
- `,c+1)):c===0?o&&(e.result+=" "):e.result+=ct.repeat(`
78
- `,c):e.result+=ct.repeat(`
79
- `,o?1+c:c),o=!0,s=!0,c=0,r=e.position;!sn(p)&&p!==0;)p=e.input.charCodeAt(++e.position);Di(e,r,e.position,!1)}return!0}function JH(e,t){var r,n=e.tag,i=e.anchor,o=[],s,a=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Q(e,"tab characters must not be used in indentation")),!(c!==45||(s=e.input.charCodeAt(e.position+1),!Wt(s))));){if(a=!0,e.position++,ot(e,!0,-1)&&e.lineIndent<=t){o.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,$s(e,t,l6,!1,!0),o.push(e.result),ot(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)Q(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=n,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}function Pwe(e,t,r){var n,i,o,s,a,c,u=e.tag,d=e.anchor,p={},m=Object.create(null),h=null,v=null,_=null,g=!1,x=!1,S;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),S=e.input.charCodeAt(e.position);S!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Q(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),o=e.line,(S===63||S===58)&&Wt(n))S===63?(g&&(Gs(e,p,m,h,v,null,s,a,c),h=v=_=null),x=!0,g=!0,i=!0):g?(g=!1,i=!0):Q(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,S=n;else{if(s=e.line,a=e.lineStart,c=e.position,!$s(e,r,u6,!1,!0))break;if(e.line===o){for(S=e.input.charCodeAt(e.position);_o(S);)S=e.input.charCodeAt(++e.position);if(S===58)S=e.input.charCodeAt(++e.position),Wt(S)||Q(e,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(Gs(e,p,m,h,v,null,s,a,c),h=v=_=null),x=!0,g=!1,i=!1,h=e.tag,v=e.result;else if(x)Q(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=d,!0}else if(x)Q(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=d,!0}if((e.line===o||e.lineIndent>t)&&(g&&(s=e.line,a=e.lineStart,c=e.position),$s(e,t,Qf,!0,i)&&(g?v=e.result:_=e.result),g||(Gs(e,p,m,h,v,_,s,a,c),h=v=_=null),ot(e,!0,-1),S=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&S!==0)Q(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return g&&Gs(e,p,m,h,v,null,s,a,c),x&&(e.tag=u,e.anchor=d,e.kind="mapping",e.result=p),x}function Iwe(e){var t,r=!1,n=!1,i,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&Q(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):Q(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Wt(s);)s===33&&(n?Q(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),d6.test(i)||Q(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),_we.test(o)&&Q(e,"tag suffix cannot contain flow indicator characters")}o&&!p6.test(o)&&Q(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{Q(e,"tag name is malformed: "+o)}return r?e.tag=o:Ni.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:Q(e,'undeclared tag handle "'+i+'"'),!0}function Owe(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Q(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Wt(r)&&!Us(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Q(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function Rwe(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Wt(n)&&!Us(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Q(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ni.call(e.anchorMap,r)||Q(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],ot(e,!0,-1),!0}function $s(e,t,r,n,i){var o,s,a,c=1,u=!1,d=!1,p,m,h,v,_,g;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=a=Qf===r||l6===r,n&&ot(e,!0,-1)&&(u=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;Iwe(e)||Owe(e);)ot(e,!0,-1)?(u=!0,a=o,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):a=!1;if(a&&(a=u||i),(c===1||Qf===r)&&(Xf===r||u6===r?_=t:_=t+1,g=e.position-e.lineStart,c===1?a&&(JH(e,g)||Pwe(e,g,_))||Awe(e,_)?d=!0:(s&&Twe(e,_)||wwe(e,_)||xwe(e,_)?d=!0:Rwe(e)?(d=!0,(e.tag!==null||e.anchor!==null)&&Q(e,"alias node should not have any properties")):Cwe(e,_,Xf===r)&&(d=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(d=a&&JH(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Q(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),p=0,m=e.implicitTypes.length;p<m;p+=1)if(v=e.implicitTypes[p],v.resolve(e.result)){e.result=v.construct(e.result),e.tag=v.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ni.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,h=e.typeMap.multi[e.kind||"fallback"],p=0,m=h.length;p<m;p+=1)if(e.tag.slice(0,h[p].tag.length)===h[p].tag){v=h[p];break}v||Q(e,"unknown tag !<"+e.tag+">"),e.result!==null&&v.kind!==e.kind&&Q(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Q(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}function Dwe(e){var t=e.position,r,n,i,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(ot(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!Wt(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),i=[],n.length<1&&Q(e,"directive name must not be less than one character in length");s!==0;){for(;_o(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!sn(s));break}if(sn(s))break;for(r=e.position;s!==0&&!Wt(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}s!==0&&O0(e),Ni.call(WH,n)?WH[n](e,n,i):Zf(e,'unknown document directive "'+n+'"')}if(ot(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,ot(e,!0,-1)):o&&Q(e,"directives end mark is expected"),$s(e,e.lineIndent-1,Qf,!1,!0),ot(e,!0,-1),e.checkLineBreaks&&ywe.test(e.input.slice(t,e.position))&&Zf(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&rm(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ot(e,!0,-1));return}if(e.position<e.length-1)Q(e,"end of the stream or a document separator is expected");else return}function y6(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
80
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new bwe(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,Q(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)Dwe(r);return r.documents}function Nwe(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=y6(e,r);if(typeof t!="function")return n;for(var i=0,o=n.length;i<o;i+=1)t(n[i])}function Mwe(e,t){var r=y6(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new zt("expected a single document in the stream, but found more")}}var Lwe=Nwe,kwe=Mwe,_6={loadAll:Lwe,load:kwe},v6=Object.prototype.toString,g6=Object.prototype.hasOwnProperty,D0=65279,Fwe=9,$c=10,Bwe=13,jwe=32,qwe=33,Uwe=34,x0=35,Gwe=37,$we=38,Hwe=39,Vwe=42,E6=44,zwe=45,em=58,Wwe=61,Kwe=62,Jwe=63,Ywe=64,S6=91,b6=93,Xwe=96,C6=123,Qwe=124,w6=125,Pt={};Pt[0]="\\0";Pt[7]="\\a";Pt[8]="\\b";Pt[9]="\\t";Pt[10]="\\n";Pt[11]="\\v";Pt[12]="\\f";Pt[13]="\\r";Pt[27]="\\e";Pt[34]='\\"';Pt[92]="\\\\";Pt[133]="\\N";Pt[160]="\\_";Pt[8232]="\\L";Pt[8233]="\\P";var Zwe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],exe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function txe(e,t){var r,n,i,o,s,a,c;if(t===null)return{};for(r={},n=Object.keys(t),i=0,o=n.length;i<o;i+=1)s=n[i],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=e.compiledTypeMap.fallback[s],c&&g6.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[s]=a;return r}function rxe(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new zt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+ct.repeat("0",n-t.length)+t}var nxe=1,Hc=2;function ixe(e){this.schema=e.schema||c6,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=ct.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=txe(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Hc:nxe,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function YH(e,t){for(var r=ct.repeat(" ",t),n=0,i=-1,o="",s,a=e.length;n<a;)i=e.indexOf(`
81
- `,n),i===-1?(s=e.slice(n),n=a):(s=e.slice(n,i+1),n=i+1),s.length&&s!==`
82
- `&&(o+=r),o+=s;return o}function A0(e,t){return`
83
- `+ct.repeat(" ",e.indent*t)}function oxe(e,t){var r,n,i;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(i=e.implicitTypes[r],i.resolve(t))return!0;return!1}function tm(e){return e===jwe||e===Fwe}function Vc(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==D0||65536<=e&&e<=1114111}function XH(e){return Vc(e)&&e!==D0&&e!==Bwe&&e!==$c}function QH(e,t,r){var n=XH(e),i=n&&!tm(e);return(r?n:n&&e!==E6&&e!==S6&&e!==b6&&e!==C6&&e!==w6)&&e!==x0&&!(t===em&&!i)||XH(t)&&!tm(t)&&e===x0||t===em&&i}function sxe(e){return Vc(e)&&e!==D0&&!tm(e)&&e!==zwe&&e!==Jwe&&e!==em&&e!==E6&&e!==S6&&e!==b6&&e!==C6&&e!==w6&&e!==x0&&e!==$we&&e!==Vwe&&e!==qwe&&e!==Qwe&&e!==Wwe&&e!==Kwe&&e!==Hwe&&e!==Uwe&&e!==Gwe&&e!==Ywe&&e!==Xwe}function axe(e){return!tm(e)&&e!==em}function Uc(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function x6(e){var t=/^\n* /;return t.test(e)}var A6=1,T0=2,T6=3,P6=4,qs=5;function cxe(e,t,r,n,i,o,s,a){var c,u=0,d=null,p=!1,m=!1,h=n!==-1,v=-1,_=sxe(Uc(e,0))&&axe(Uc(e,e.length-1));if(t||s)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=Uc(e,c),!Vc(u))return qs;_=_&&QH(u,d,a),d=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=Uc(e,c),u===$c)p=!0,h&&(m=m||c-v-1>n&&e[v+1]!==" ",v=c);else if(!Vc(u))return qs;_=_&&QH(u,d,a),d=u}m=m||h&&c-v-1>n&&e[v+1]!==" "}return!p&&!m?_&&!s&&!i(e)?A6:o===Hc?qs:T0:r>9&&x6(e)?qs:s?o===Hc?qs:T0:m?P6:T6}function uxe(e,t,r,n,i){e.dump=(function(){if(t.length===0)return e.quotingType===Hc?'""':"''";if(!e.noCompatMode&&(Zwe.indexOf(t)!==-1||exe.test(t)))return e.quotingType===Hc?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),a=n||e.flowLevel>-1&&r>=e.flowLevel;function c(u){return oxe(e,u)}switch(cxe(t,a,e.indent,s,c,e.quotingType,e.forceQuotes&&!n,i)){case A6:return t;case T0:return"'"+t.replace(/'/g,"''")+"'";case T6:return"|"+ZH(t,e.indent)+e6(YH(t,o));case P6:return">"+ZH(t,e.indent)+e6(YH(lxe(t,s),o));case qs:return'"'+dxe(t)+'"';default:throw new zt("impossible error: invalid scalar style")}})()}function ZH(e,t){var r=x6(e)?String(t):"",n=e[e.length-1]===`
84
- `,i=n&&(e[e.length-2]===`
83
+ `+e.mark.snippet),n+" "+r):n}function Rf(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=a5(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Rf.prototype=Object.create(Error.prototype);Rf.prototype.constructor=Rf;Rf.prototype.toString=function(t){return this.name+": "+a5(this,t)};var Vr=Rf;function iD(e,t,r,n,o){var i="",s="",a=Math.floor(o/2)-1;return n-t>a&&(i=" ... ",t=n-a+i.length),r-n>a&&(s=" ...",r=n+a-s.length),{str:i+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:n-t+i.length}}function sD(e,t){return Vt.repeat(" ",t-e.length)+e}function Uwe(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],o=[],i,s=-1;i=r.exec(e.buffer);)o.push(i.index),n.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var a="",c,l,d=Math.min(e.line+t.linesAfter,o.length).toString().length,f=t.maxLength-(t.indent+d+3);for(c=1;c<=t.linesBefore&&!(s-c<0);c++)l=iD(e.buffer,n[s-c],o[s-c],e.position-(n[s]-n[s-c]),f),a=Vt.repeat(" ",t.indent)+sD((e.line-c+1).toString(),d)+" | "+l.str+`
84
+ `+a;for(l=iD(e.buffer,n[s],o[s],e.position,f),a+=Vt.repeat(" ",t.indent)+sD((e.line+1).toString(),d)+" | "+l.str+`
85
+ `,a+=Vt.repeat("-",t.indent+d+3+l.pos)+`^
86
+ `,c=1;c<=t.linesAfter&&!(s+c>=o.length);c++)l=iD(e.buffer,n[s+c],o[s+c],e.position-(n[s]-n[s+c]),f),a+=Vt.repeat(" ",t.indent)+sD((e.line+c+1).toString(),d)+" | "+l.str+`
87
+ `;return a.replace(/\n$/,"")}var jwe=Uwe,qwe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Gwe=["scalar","sequence","mapping"];function Hwe(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function Vwe(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(qwe.indexOf(r)===-1)throw new Vr('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Hwe(t.styleAliases||null),Gwe.indexOf(this.kind)===-1)throw new Vr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Sr=Vwe;function VK(e,t){var r=[];return e[t].forEach(function(n){var o=r.length;r.forEach(function(i,s){i.tag===n.tag&&i.kind===n.kind&&i.multi===n.multi&&(o=s)}),r[o]=n}),r}function Wwe(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function cD(e){return this.extend(e)}cD.prototype.extend=function(t){var r=[],n=[];if(t instanceof Sr)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new Vr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof Sr))throw new Vr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new Vr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new Vr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(i){if(!(i instanceof Sr))throw new Vr("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(cD.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=VK(o,"implicit"),o.compiledExplicit=VK(o,"explicit"),o.compiledTypeMap=Wwe(o.compiledImplicit,o.compiledExplicit),o};var zwe=cD,Kwe=new Sr("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Ywe=new Sr("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Qwe=new Sr("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Xwe=new zwe({explicit:[Kwe,Ywe,Qwe]});function Jwe(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Zwe(){return null}function eAe(e){return e===null}var tAe=new Sr("tag:yaml.org,2002:null",{kind:"scalar",resolve:Jwe,construct:Zwe,predicate:eAe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function rAe(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function nAe(e){return e==="true"||e==="True"||e==="TRUE"}function oAe(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var iAe=new Sr("tag:yaml.org,2002:bool",{kind:"scalar",resolve:rAe,construct:nAe,predicate:oAe,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function sAe(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function aAe(e){return 48<=e&&e<=55}function cAe(e){return 48<=e&&e<=57}function uAe(e){if(e===null)return!1;var t=e.length,r=0,n=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;n=!0}return n&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!sAe(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!aAe(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!cAe(e.charCodeAt(r)))return!1;n=!0}return!(!n||o==="_")}function lAe(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function dAe(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Vt.isNegativeZero(e)}var fAe=new Sr("tag:yaml.org,2002:int",{kind:"scalar",resolve:uAe,construct:lAe,predicate:dAe,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),pAe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mAe(e){return!(e===null||!pAe.test(e)||e[e.length-1]==="_")}function hAe(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var yAe=/^[-+]?[0-9]+e/;function gAe(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Vt.isNegativeZero(e))return"-0.0";return r=e.toString(10),yAe.test(r)?r.replace("e",".e"):r}function _Ae(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Vt.isNegativeZero(e))}var EAe=new Sr("tag:yaml.org,2002:float",{kind:"scalar",resolve:mAe,construct:hAe,predicate:_Ae,represent:gAe,defaultStyle:"lowercase"}),SAe=Xwe.extend({implicit:[tAe,iAe,fAe,EAe]}),bAe=SAe,c5=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),u5=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function xAe(e){return e===null?!1:c5.exec(e)!==null||u5.exec(e)!==null}function vAe(e){var t,r,n,o,i,s,a,c=0,l=null,d,f,m;if(t=c5.exec(e),t===null&&(t=u5.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,o));if(i=+t[4],s=+t[5],a=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(d=+t[10],f=+(t[11]||0),l=(d*60+f)*6e4,t[9]==="-"&&(l=-l)),m=new Date(Date.UTC(r,n,o,i,s,a,c)),l&&m.setTime(m.getTime()-l),m}function TAe(e){return e.toISOString()}var wAe=new Sr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:xAe,construct:vAe,instanceOf:Date,represent:TAe});function AAe(e){return e==="<<"||e===null}var IAe=new Sr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:AAe}),pD=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
88
+ \r`;function CAe(e){if(e===null)return!1;var t,r,n=0,o=e.length,i=pD;for(r=0;r<o;r++)if(t=i.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function DAe(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,i=pD,s=0,a=[];for(t=0;t<o;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|i.indexOf(n.charAt(t));return r=o%4*6,r===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):r===18?(a.push(s>>10&255),a.push(s>>2&255)):r===12&&a.push(s>>4&255),new Uint8Array(a)}function RAe(e){var t="",r=0,n,o,i=e.length,s=pD;for(n=0;n<i;n++)n%3===0&&n&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[n];return o=i%3,o===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):o===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):o===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function PAe(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var OAe=new Sr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:CAe,construct:DAe,predicate:PAe,represent:RAe}),NAe=Object.prototype.hasOwnProperty,$Ae=Object.prototype.toString;function MAe(e){if(e===null)return!0;var t=[],r,n,o,i,s,a=e;for(r=0,n=a.length;r<n;r+=1){if(o=a[r],s=!1,$Ae.call(o)!=="[object Object]")return!1;for(i in o)if(NAe.call(o,i))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function LAe(e){return e!==null?e:[]}var kAe=new Sr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:MAe,construct:LAe}),FAe=Object.prototype.toString;function BAe(e){if(e===null)return!0;var t,r,n,o,i,s=e;for(i=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(n=s[t],FAe.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;i[t]=[o[0],n[o[0]]]}return!0}function UAe(e){if(e===null)return[];var t,r,n,o,i,s=e;for(i=new Array(s.length),t=0,r=s.length;t<r;t+=1)n=s[t],o=Object.keys(n),i[t]=[o[0],n[o[0]]];return i}var jAe=new Sr("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:BAe,construct:UAe}),qAe=Object.prototype.hasOwnProperty;function GAe(e){if(e===null)return!0;var t,r=e;for(t in r)if(qAe.call(r,t)&&r[t]!==null)return!1;return!0}function HAe(e){return e!==null?e:{}}var VAe=new Sr("tag:yaml.org,2002:set",{kind:"mapping",resolve:GAe,construct:HAe}),l5=bAe.extend({implicit:[wAe,IAe],explicit:[OAe,kAe,jAe,VAe]}),Ns=Object.prototype.hasOwnProperty,uS=1,d5=2,f5=3,lS=4,aD=1,WAe=2,WK=3,zAe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,KAe=/[\x85\u2028\u2029]/,YAe=/[,\[\]\{\}]/,p5=/^(?:!|!!|![a-z\-]+!)$/i,m5=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function zK(e){return Object.prototype.toString.call(e)}function $o(e){return e===10||e===13}function Da(e){return e===9||e===32}function Wr(e){return e===9||e===32||e===10||e===13}function Su(e){return e===44||e===91||e===93||e===123||e===125}function QAe(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function XAe(e){return e===120?2:e===117?4:e===85?8:0}function JAe(e){return 48<=e&&e<=57?e-48:-1}function KK(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
89
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function ZAe(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var h5=new Array(256),y5=new Array(256);for(Ca=0;Ca<256;Ca++)h5[Ca]=KK(Ca)?1:0,y5[Ca]=KK(Ca);var Ca;function eIe(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||l5,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function g5(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=jwe(r),new Vr(t,r)}function he(e,t){throw g5(e,t)}function dS(e,t){e.onWarning&&e.onWarning.call(null,g5(e,t))}var YK={YAML:function(t,r,n){var o,i,s;t.version!==null&&he(t,"duplication of %YAML directive"),n.length!==1&&he(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&he(t,"ill-formed argument of the YAML directive"),i=parseInt(o[1],10),s=parseInt(o[2],10),i!==1&&he(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&dS(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var o,i;n.length!==2&&he(t,"TAG directive accepts exactly two arguments"),o=n[0],i=n[1],p5.test(o)||he(t,"ill-formed tag handle (first argument) of the TAG directive"),Ns.call(t.tagMap,o)&&he(t,'there is a previously declared suffix for "'+o+'" tag handle'),m5.test(i)||he(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{he(t,"tag prefix is malformed: "+i)}t.tagMap[o]=i}};function Os(e,t,r,n){var o,i,s,a;if(t<r){if(a=e.input.slice(t,r),n)for(o=0,i=a.length;o<i;o+=1)s=a.charCodeAt(o),s===9||32<=s&&s<=1114111||he(e,"expected valid JSON character");else zAe.test(a)&&he(e,"the stream contains non-printable characters");e.result+=a}}function QK(e,t,r,n){var o,i,s,a;for(Vt.isObject(r)||he(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),s=0,a=o.length;s<a;s+=1)i=o[s],Ns.call(t,i)||(t[i]=r[i],n[i]=!0)}function bu(e,t,r,n,o,i,s,a,c){var l,d;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),l=0,d=o.length;l<d;l+=1)Array.isArray(o[l])&&he(e,"nested arrays are not supported inside keys"),typeof o=="object"&&zK(o[l])==="[object Object]"&&(o[l]="[object Object]");if(typeof o=="object"&&zK(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(l=0,d=i.length;l<d;l+=1)QK(e,t,i[l],r);else QK(e,t,i,r);else!e.json&&!Ns.call(r,o)&&Ns.call(t,o)&&(e.line=s||e.line,e.lineStart=a||e.lineStart,e.position=c||e.position,he(e,"duplicated mapping key")),o==="__proto__"?Object.defineProperty(t,o,{configurable:!0,enumerable:!0,writable:!0,value:i}):t[o]=i,delete r[o];return t}function mD(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):he(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Ut(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);o!==0;){for(;Da(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if($o(o))for(mD(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&dS(e,"deficient indentation"),n}function mS(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Wr(r)))}function hD(e,t){t===1?e.result+=" ":t>1&&(e.result+=Vt.repeat(`
90
+ `,t-1))}function tIe(e,t,r){var n,o,i,s,a,c,l,d,f=e.kind,m=e.result,h;if(h=e.input.charCodeAt(e.position),Wr(h)||Su(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(o=e.input.charCodeAt(e.position+1),Wr(o)||r&&Su(o)))return!1;for(e.kind="scalar",e.result="",i=s=e.position,a=!1;h!==0;){if(h===58){if(o=e.input.charCodeAt(e.position+1),Wr(o)||r&&Su(o))break}else if(h===35){if(n=e.input.charCodeAt(e.position-1),Wr(n))break}else{if(e.position===e.lineStart&&mS(e)||r&&Su(h))break;if($o(h))if(c=e.line,l=e.lineStart,d=e.lineIndent,Ut(e,!1,-1),e.lineIndent>=t){a=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=l,e.lineIndent=d;break}}a&&(Os(e,i,s,!1),hD(e,e.line-c),i=s=e.position,a=!1),Da(h)||(s=e.position+1),h=e.input.charCodeAt(++e.position)}return Os(e,i,s,!1),e.result?!0:(e.kind=f,e.result=m,!1)}function rIe(e,t){var r,n,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Os(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,o=e.position;else return!0;else $o(r)?(Os(e,n,o,!0),hD(e,Ut(e,!1,t)),n=o=e.position):e.position===e.lineStart&&mS(e)?he(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);he(e,"unexpected end of the stream within a single quoted scalar")}function nIe(e,t){var r,n,o,i,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return Os(e,r,e.position,!0),e.position++,!0;if(a===92){if(Os(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),$o(a))Ut(e,!1,t);else if(a<256&&h5[a])e.result+=y5[a],e.position++;else if((s=XAe(a))>0){for(o=s,i=0;o>0;o--)a=e.input.charCodeAt(++e.position),(s=QAe(a))>=0?i=(i<<4)+s:he(e,"expected hexadecimal character");e.result+=ZAe(i),e.position++}else he(e,"unknown escape sequence");r=n=e.position}else $o(a)?(Os(e,r,n,!0),hD(e,Ut(e,!1,t)),r=n=e.position):e.position===e.lineStart&&mS(e)?he(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}he(e,"unexpected end of the stream within a double quoted scalar")}function oIe(e,t){var r=!0,n,o,i,s=e.tag,a,c=e.anchor,l,d,f,m,h,_=Object.create(null),E,T,I,A;if(A=e.input.charCodeAt(e.position),A===91)d=93,h=!1,a=[];else if(A===123)d=125,h=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),A=e.input.charCodeAt(++e.position);A!==0;){if(Ut(e,!0,t),A=e.input.charCodeAt(e.position),A===d)return e.position++,e.tag=s,e.anchor=c,e.kind=h?"mapping":"sequence",e.result=a,!0;r?A===44&&he(e,"expected the node content, but found ','"):he(e,"missed comma between flow collection entries"),T=E=I=null,f=m=!1,A===63&&(l=e.input.charCodeAt(e.position+1),Wr(l)&&(f=m=!0,e.position++,Ut(e,!0,t))),n=e.line,o=e.lineStart,i=e.position,xu(e,t,uS,!1,!0),T=e.tag,E=e.result,Ut(e,!0,t),A=e.input.charCodeAt(e.position),(m||e.line===n)&&A===58&&(f=!0,A=e.input.charCodeAt(++e.position),Ut(e,!0,t),xu(e,t,uS,!1,!0),I=e.result),h?bu(e,a,_,T,E,I,n,o,i):f?a.push(bu(e,null,_,T,E,I,n,o,i)):a.push(E),Ut(e,!0,t),A=e.input.charCodeAt(e.position),A===44?(r=!0,A=e.input.charCodeAt(++e.position)):r=!1}he(e,"unexpected end of the stream within a flow collection")}function iIe(e,t){var r,n,o=aD,i=!1,s=!1,a=t,c=0,l=!1,d,f;if(f=e.input.charCodeAt(e.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)aD===o?o=f===43?WK:WAe:he(e,"repeat of a chomping mode identifier");else if((d=JAe(f))>=0)d===0?he(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?he(e,"repeat of an indentation width identifier"):(a=t+d-1,s=!0);else break;if(Da(f)){do f=e.input.charCodeAt(++e.position);while(Da(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!$o(f)&&f!==0)}for(;f!==0;){for(mD(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),$o(f)){c++;continue}if(e.lineIndent<a){o===WK?e.result+=Vt.repeat(`
91
+ `,i?1+c:c):o===aD&&i&&(e.result+=`
92
+ `);break}for(n?Da(f)?(l=!0,e.result+=Vt.repeat(`
93
+ `,i?1+c:c)):l?(l=!1,e.result+=Vt.repeat(`
94
+ `,c+1)):c===0?i&&(e.result+=" "):e.result+=Vt.repeat(`
95
+ `,c):e.result+=Vt.repeat(`
96
+ `,i?1+c:c),i=!0,s=!0,c=0,r=e.position;!$o(f)&&f!==0;)f=e.input.charCodeAt(++e.position);Os(e,r,e.position,!1)}return!0}function XK(e,t){var r,n=e.tag,o=e.anchor,i=[],s,a=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,he(e,"tab characters must not be used in indentation")),!(c!==45||(s=e.input.charCodeAt(e.position+1),!Wr(s))));){if(a=!0,e.position++,Ut(e,!0,-1)&&e.lineIndent<=t){i.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,xu(e,t,f5,!1,!0),i.push(e.result),Ut(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)he(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=n,e.anchor=o,e.kind="sequence",e.result=i,!0):!1}function sIe(e,t,r){var n,o,i,s,a,c,l=e.tag,d=e.anchor,f={},m=Object.create(null),h=null,_=null,E=null,T=!1,I=!1,A;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),A=e.input.charCodeAt(e.position);A!==0;){if(!T&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,he(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),i=e.line,(A===63||A===58)&&Wr(n))A===63?(T&&(bu(e,f,m,h,_,null,s,a,c),h=_=E=null),I=!0,T=!0,o=!0):T?(T=!1,o=!0):he(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,A=n;else{if(s=e.line,a=e.lineStart,c=e.position,!xu(e,r,d5,!1,!0))break;if(e.line===i){for(A=e.input.charCodeAt(e.position);Da(A);)A=e.input.charCodeAt(++e.position);if(A===58)A=e.input.charCodeAt(++e.position),Wr(A)||he(e,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(bu(e,f,m,h,_,null,s,a,c),h=_=E=null),I=!0,T=!1,o=!1,h=e.tag,_=e.result;else if(I)he(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=l,e.anchor=d,!0}else if(I)he(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=l,e.anchor=d,!0}if((e.line===i||e.lineIndent>t)&&(T&&(s=e.line,a=e.lineStart,c=e.position),xu(e,t,lS,!0,o)&&(T?_=e.result:E=e.result),T||(bu(e,f,m,h,_,E,s,a,c),h=_=E=null),Ut(e,!0,-1),A=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&A!==0)he(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return T&&bu(e,f,m,h,_,null,s,a,c),I&&(e.tag=l,e.anchor=d,e.kind="mapping",e.result=f),I}function aIe(e){var t,r=!1,n=!1,o,i,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&he(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,o="!!",s=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(i=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):he(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Wr(s);)s===33&&(n?he(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),p5.test(o)||he(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),YAe.test(i)&&he(e,"tag suffix cannot contain flow indicator characters")}i&&!m5.test(i)&&he(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{he(e,"tag name is malformed: "+i)}return r?e.tag=i:Ns.call(e.tagMap,o)?e.tag=e.tagMap[o]+i:o==="!"?e.tag="!"+i:o==="!!"?e.tag="tag:yaml.org,2002:"+i:he(e,'undeclared tag handle "'+o+'"'),!0}function cIe(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&he(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Wr(r)&&!Su(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&he(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function uIe(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Wr(n)&&!Su(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&he(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ns.call(e.anchorMap,r)||he(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ut(e,!0,-1),!0}function xu(e,t,r,n,o){var i,s,a,c=1,l=!1,d=!1,f,m,h,_,E,T;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=s=a=lS===r||f5===r,n&&Ut(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;aIe(e)||cIe(e);)Ut(e,!0,-1)?(l=!0,a=i,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):a=!1;if(a&&(a=l||o),(c===1||lS===r)&&(uS===r||d5===r?E=t:E=t+1,T=e.position-e.lineStart,c===1?a&&(XK(e,T)||sIe(e,T,E))||oIe(e,E)?d=!0:(s&&iIe(e,E)||rIe(e,E)||nIe(e,E)?d=!0:uIe(e)?(d=!0,(e.tag!==null||e.anchor!==null)&&he(e,"alias node should not have any properties")):tIe(e,E,uS===r)&&(d=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(d=a&&XK(e,T))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&he(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),f=0,m=e.implicitTypes.length;f<m;f+=1)if(_=e.implicitTypes[f],_.resolve(e.result)){e.result=_.construct(e.result),e.tag=_.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ns.call(e.typeMap[e.kind||"fallback"],e.tag))_=e.typeMap[e.kind||"fallback"][e.tag];else for(_=null,h=e.typeMap.multi[e.kind||"fallback"],f=0,m=h.length;f<m;f+=1)if(e.tag.slice(0,h[f].tag.length)===h[f].tag){_=h[f];break}_||he(e,"unknown tag !<"+e.tag+">"),e.result!==null&&_.kind!==e.kind&&he(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+_.kind+'", not "'+e.kind+'"'),_.resolve(e.result,e.tag)?(e.result=_.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):he(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}function lIe(e){var t=e.position,r,n,o,i=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(Ut(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(i=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!Wr(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),o=[],n.length<1&&he(e,"directive name must not be less than one character in length");s!==0;){for(;Da(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!$o(s));break}if($o(s))break;for(r=e.position;s!==0&&!Wr(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}s!==0&&mD(e),Ns.call(YK,n)?YK[n](e,n,o):dS(e,'unknown document directive "'+n+'"')}if(Ut(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ut(e,!0,-1)):i&&he(e,"directives end mark is expected"),xu(e,e.lineIndent-1,lS,!1,!0),Ut(e,!0,-1),e.checkLineBreaks&&KAe.test(e.input.slice(t,e.position))&&dS(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&mS(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ut(e,!0,-1));return}if(e.position<e.length-1)he(e,"end of the stream or a document separator is expected");else return}function _5(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
97
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new eIe(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,he(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)lIe(r);return r.documents}function dIe(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=_5(e,r);if(typeof t!="function")return n;for(var o=0,i=n.length;o<i;o+=1)t(n[o])}function fIe(e,t){var r=_5(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Vr("expected a single document in the stream, but found more")}}var pIe=dIe,mIe=fIe,E5={loadAll:pIe,load:mIe},S5=Object.prototype.toString,b5=Object.prototype.hasOwnProperty,yD=65279,hIe=9,Pf=10,yIe=13,gIe=32,_Ie=33,EIe=34,uD=35,SIe=37,bIe=38,xIe=39,vIe=42,x5=44,TIe=45,fS=58,wIe=61,AIe=62,IIe=63,CIe=64,v5=91,T5=93,DIe=96,w5=123,RIe=124,A5=125,br={};br[0]="\\0";br[7]="\\a";br[8]="\\b";br[9]="\\t";br[10]="\\n";br[11]="\\v";br[12]="\\f";br[13]="\\r";br[27]="\\e";br[34]='\\"';br[92]="\\\\";br[133]="\\N";br[160]="\\_";br[8232]="\\L";br[8233]="\\P";var PIe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],OIe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function NIe(e,t){var r,n,o,i,s,a,c;if(t===null)return{};for(r={},n=Object.keys(t),o=0,i=n.length;o<i;o+=1)s=n[o],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=e.compiledTypeMap.fallback[s],c&&b5.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[s]=a;return r}function $Ie(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new Vr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Vt.repeat("0",n-t.length)+t}var MIe=1,Of=2;function LIe(e){this.schema=e.schema||l5,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Vt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=NIe(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Of:MIe,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function JK(e,t){for(var r=Vt.repeat(" ",t),n=0,o=-1,i="",s,a=e.length;n<a;)o=e.indexOf(`
98
+ `,n),o===-1?(s=e.slice(n),n=a):(s=e.slice(n,o+1),n=o+1),s.length&&s!==`
99
+ `&&(i+=r),i+=s;return i}function lD(e,t){return`
100
+ `+Vt.repeat(" ",e.indent*t)}function kIe(e,t){var r,n,o;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}function pS(e){return e===gIe||e===hIe}function Nf(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==yD||65536<=e&&e<=1114111}function ZK(e){return Nf(e)&&e!==yD&&e!==yIe&&e!==Pf}function e5(e,t,r){var n=ZK(e),o=n&&!pS(e);return(r?n:n&&e!==x5&&e!==v5&&e!==T5&&e!==w5&&e!==A5)&&e!==uD&&!(t===fS&&!o)||ZK(t)&&!pS(t)&&e===uD||t===fS&&o}function FIe(e){return Nf(e)&&e!==yD&&!pS(e)&&e!==TIe&&e!==IIe&&e!==fS&&e!==x5&&e!==v5&&e!==T5&&e!==w5&&e!==A5&&e!==uD&&e!==bIe&&e!==vIe&&e!==_Ie&&e!==RIe&&e!==wIe&&e!==AIe&&e!==xIe&&e!==EIe&&e!==SIe&&e!==CIe&&e!==DIe}function BIe(e){return!pS(e)&&e!==fS}function Df(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function I5(e){var t=/^\n* /;return t.test(e)}var C5=1,dD=2,D5=3,R5=4,Eu=5;function UIe(e,t,r,n,o,i,s,a){var c,l=0,d=null,f=!1,m=!1,h=n!==-1,_=-1,E=FIe(Df(e,0))&&BIe(Df(e,e.length-1));if(t||s)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Df(e,c),!Nf(l))return Eu;E=E&&e5(l,d,a),d=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=Df(e,c),l===Pf)f=!0,h&&(m=m||c-_-1>n&&e[_+1]!==" ",_=c);else if(!Nf(l))return Eu;E=E&&e5(l,d,a),d=l}m=m||h&&c-_-1>n&&e[_+1]!==" "}return!f&&!m?E&&!s&&!o(e)?C5:i===Of?Eu:dD:r>9&&I5(e)?Eu:s?i===Of?Eu:dD:m?R5:D5}function jIe(e,t,r,n,o){e.dump=(function(){if(t.length===0)return e.quotingType===Of?'""':"''";if(!e.noCompatMode&&(PIe.indexOf(t)!==-1||OIe.test(t)))return e.quotingType===Of?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),a=n||e.flowLevel>-1&&r>=e.flowLevel;function c(l){return kIe(e,l)}switch(UIe(t,a,e.indent,s,c,e.quotingType,e.forceQuotes&&!n,o)){case C5:return t;case dD:return"'"+t.replace(/'/g,"''")+"'";case D5:return"|"+t5(t,e.indent)+r5(JK(t,i));case R5:return">"+t5(t,e.indent)+r5(JK(qIe(t,s),i));case Eu:return'"'+GIe(t)+'"';default:throw new Vr("impossible error: invalid scalar style")}})()}function t5(e,t){var r=I5(e)?String(t):"",n=e[e.length-1]===`
101
+ `,o=n&&(e[e.length-2]===`
85
102
  `||e===`
86
- `),o=i?"+":n?"":"-";return r+o+`
87
- `}function e6(e){return e[e.length-1]===`
88
- `?e.slice(0,-1):e}function lxe(e,t){for(var r=/(\n+)([^\n]*)/g,n=(function(){var u=e.indexOf(`
89
- `);return u=u!==-1?u:e.length,r.lastIndex=u,t6(e.slice(0,u),t)})(),i=e[0]===`
90
- `||e[0]===" ",o,s;s=r.exec(e);){var a=s[1],c=s[2];o=c[0]===" ",n+=a+(!i&&!o&&c!==""?`
91
- `:"")+t6(c,t),i=o}return n}function t6(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,i=0,o,s=0,a=0,c="";n=r.exec(e);)a=n.index,a-i>t&&(o=s>i?s:a,c+=`
92
- `+e.slice(i,o),i=o+1),s=a;return c+=`
93
- `,e.length-i>t&&s>i?c+=e.slice(i,s)+`
94
- `+e.slice(s+1):c+=e.slice(i),c.slice(1)}function dxe(e){for(var t="",r=0,n,i=0;i<e.length;r>=65536?i+=2:i++)r=Uc(e,i),n=Pt[r],!n&&Vc(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=n||rxe(r);return t}function pxe(e,t,r){var n="",i=e.tag,o,s,a;for(o=0,s=r.length;o<s;o+=1)a=r[o],e.replacer&&(a=e.replacer.call(r,String(o),a)),(Nn(e,t,a,!1,!1)||typeof a>"u"&&Nn(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}function r6(e,t,r,n){var i="",o=e.tag,s,a,c;for(s=0,a=r.length;s<a;s+=1)c=r[s],e.replacer&&(c=e.replacer.call(r,String(s),c)),(Nn(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Nn(e,t+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=A0(e,t)),e.dump&&$c===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function fxe(e,t,r){var n="",i=e.tag,o=Object.keys(r),s,a,c,u,d;for(s=0,a=o.length;s<a;s+=1)d="",n!==""&&(d+=", "),e.condenseFlow&&(d+='"'),c=o[s],u=r[c],e.replacer&&(u=e.replacer.call(r,c,u)),Nn(e,t,c,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Nn(e,t,u,!1,!1)&&(d+=e.dump,n+=d));e.tag=i,e.dump="{"+n+"}"}function mxe(e,t,r,n){var i="",o=e.tag,s=Object.keys(r),a,c,u,d,p,m;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new zt("sortKeys must be a boolean or a function");for(a=0,c=s.length;a<c;a+=1)m="",(!n||i!=="")&&(m+=A0(e,t)),u=s[a],d=r[u],e.replacer&&(d=e.replacer.call(r,u,d)),Nn(e,t+1,u,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&$c===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,p&&(m+=A0(e,t)),Nn(e,t+1,d,!0,p)&&(e.dump&&$c===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,i+=m));e.tag=o,e.dump=i||"{}"}function n6(e,t,r){var n,i,o,s,a,c;for(i=r?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o<s;o+=1)if(a=i[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(c=e.styleMap[a.tag]||a.defaultStyle,v6.call(a.represent)==="[object Function]")n=a.represent(t,c);else if(g6.call(a.represent,c))n=a.represent[c](t,c);else throw new zt("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=n}return!0}return!1}function Nn(e,t,r,n,i,o,s){e.tag=null,e.dump=r,n6(e,r,!1)||n6(e,r,!0);var a=v6.call(e.dump),c=n,u;n&&(n=e.flowLevel<0||e.flowLevel>t);var d=a==="[object Object]"||a==="[object Array]",p,m;if(d&&(p=e.duplicates.indexOf(r),m=p!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(i=!1),m&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&m&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),a==="[object Object]")n&&Object.keys(e.dump).length!==0?(mxe(e,t,e.dump,i),m&&(e.dump="&ref_"+p+e.dump)):(fxe(e,t,e.dump),m&&(e.dump="&ref_"+p+" "+e.dump));else if(a==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?r6(e,t-1,e.dump,i):r6(e,t,e.dump,i),m&&(e.dump="&ref_"+p+e.dump)):(pxe(e,t,e.dump),m&&(e.dump="&ref_"+p+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&uxe(e,e.dump,t,o,c);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new zt("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function hxe(e,t){var r=[],n=[],i,o;for(P0(e,r,n),i=0,o=n.length;i<o;i+=1)t.duplicates.push(r[n[i]]);t.usedDuplicates=new Array(o)}function P0(e,t,r){var n,i,o;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)P0(e[i],t,r);else for(n=Object.keys(e),i=0,o=n.length;i<o;i+=1)P0(e[n[i]],t,r)}function yxe(e,t){t=t||{};var r=new ixe(t);r.noRefs||hxe(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Nn(r,0,n,!0,!0)?r.dump+`
95
- `:""}var _xe=yxe,vxe={dump:_xe};function N0(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var I6=_6.load,QLe=_6.loadAll,ZLe=vxe.dump;var eke=N0("safeLoad","load"),tke=N0("safeLoadAll","loadAll"),rke=N0("safeDump","dump");var Kt=It(qV());var mm=It(Hg()),fm=class{static async getExistingFiles(t){let r=[];for(let n of t)await(0,mm.pathExists)(n)&&r.push(n);return r}static getExistingFilesSync(t){let r=[];for(let n of t)(0,mm.pathExistsSync)(n)&&r.push(n);return r}};var Fe=class{static configFiles(){let t=["./config.yaml","./config.yml","./configs/config.yaml","./configs/config.yml",`./configs/config-${Fe.envLevel}.yaml`,`./configs/config-${Fe.envLevel}.yml`,"./configs/config.json",`./configs/config-${Fe.envLevel}.json`];return fm.getExistingFilesSync(t)}static get instance(){if(Fe._instance===void 0){let t=new Kt.TSConvict(Fe);Fe._instance=t.load(Fe.configFiles())}return Fe._instance}static get envLevel(){let t=process.env.NODE_ENV||"dev";return t.startsWith("prod")?"prod":t==="qa"?"qa":t==="local"?"local":"dev"}};wr([Kt.Property({doc:"AWS Account ID for app Lambda function",default:"",env:"AWS_ACCOUNT_ID"})],Fe.prototype,"awsAccountID",2),wr([Kt.Property({doc:"AWS Region for app Lambda function",default:"us-east-1",env:"AWS_REGION"})],Fe.prototype,"awsRegion",2),wr([Kt.Property({doc:"AWS Region where the origin API Gateway is located, used for signing requests",default:"us-east-2",env:"ORIGIN_REGION"})],Fe.prototype,"originRegion",2),wr([Kt.Property({doc:`Signing mode
103
+ `),i=o?"+":n?"":"-";return r+i+`
104
+ `}function r5(e){return e[e.length-1]===`
105
+ `?e.slice(0,-1):e}function qIe(e,t){for(var r=/(\n+)([^\n]*)/g,n=(function(){var l=e.indexOf(`
106
+ `);return l=l!==-1?l:e.length,r.lastIndex=l,n5(e.slice(0,l),t)})(),o=e[0]===`
107
+ `||e[0]===" ",i,s;s=r.exec(e);){var a=s[1],c=s[2];i=c[0]===" ",n+=a+(!o&&!i&&c!==""?`
108
+ `:"")+n5(c,t),o=i}return n}function n5(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,o=0,i,s=0,a=0,c="";n=r.exec(e);)a=n.index,a-o>t&&(i=s>o?s:a,c+=`
109
+ `+e.slice(o,i),o=i+1),s=a;return c+=`
110
+ `,e.length-o>t&&s>o?c+=e.slice(o,s)+`
111
+ `+e.slice(s+1):c+=e.slice(o),c.slice(1)}function GIe(e){for(var t="",r=0,n,o=0;o<e.length;r>=65536?o+=2:o++)r=Df(e,o),n=br[r],!n&&Nf(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=n||$Ie(r);return t}function HIe(e,t,r){var n="",o=e.tag,i,s,a;for(i=0,s=r.length;i<s;i+=1)a=r[i],e.replacer&&(a=e.replacer.call(r,String(i),a)),(bi(e,t,a,!1,!1)||typeof a>"u"&&bi(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function o5(e,t,r,n){var o="",i=e.tag,s,a,c;for(s=0,a=r.length;s<a;s+=1)c=r[s],e.replacer&&(c=e.replacer.call(r,String(s),c)),(bi(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&bi(e,t+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=lD(e,t)),e.dump&&Pf===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=i,e.dump=o||"[]"}function VIe(e,t,r){var n="",o=e.tag,i=Object.keys(r),s,a,c,l,d;for(s=0,a=i.length;s<a;s+=1)d="",n!==""&&(d+=", "),e.condenseFlow&&(d+='"'),c=i[s],l=r[c],e.replacer&&(l=e.replacer.call(r,c,l)),bi(e,t,c,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),bi(e,t,l,!1,!1)&&(d+=e.dump,n+=d));e.tag=o,e.dump="{"+n+"}"}function WIe(e,t,r,n){var o="",i=e.tag,s=Object.keys(r),a,c,l,d,f,m;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Vr("sortKeys must be a boolean or a function");for(a=0,c=s.length;a<c;a+=1)m="",(!n||o!=="")&&(m+=lD(e,t)),l=s[a],d=r[l],e.replacer&&(d=e.replacer.call(r,l,d)),bi(e,t+1,l,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&Pf===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,f&&(m+=lD(e,t)),bi(e,t+1,d,!0,f)&&(e.dump&&Pf===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,o+=m));e.tag=i,e.dump=o||"{}"}function i5(e,t,r){var n,o,i,s,a,c;for(o=r?e.explicitTypes:e.implicitTypes,i=0,s=o.length;i<s;i+=1)if(a=o[i],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(c=e.styleMap[a.tag]||a.defaultStyle,S5.call(a.represent)==="[object Function]")n=a.represent(t,c);else if(b5.call(a.represent,c))n=a.represent[c](t,c);else throw new Vr("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=n}return!0}return!1}function bi(e,t,r,n,o,i,s){e.tag=null,e.dump=r,i5(e,r,!1)||i5(e,r,!0);var a=S5.call(e.dump),c=n,l;n&&(n=e.flowLevel<0||e.flowLevel>t);var d=a==="[object Object]"||a==="[object Array]",f,m;if(d&&(f=e.duplicates.indexOf(r),m=f!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(o=!1),m&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(d&&m&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),a==="[object Object]")n&&Object.keys(e.dump).length!==0?(WIe(e,t,e.dump,o),m&&(e.dump="&ref_"+f+e.dump)):(VIe(e,t,e.dump),m&&(e.dump="&ref_"+f+" "+e.dump));else if(a==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?o5(e,t-1,e.dump,o):o5(e,t,e.dump,o),m&&(e.dump="&ref_"+f+e.dump)):(HIe(e,t,e.dump),m&&(e.dump="&ref_"+f+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&jIe(e,e.dump,t,i,c);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Vr("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(l=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",e.dump=l+" "+e.dump)}return!0}function zIe(e,t){var r=[],n=[],o,i;for(fD(e,r,n),o=0,i=n.length;o<i;o+=1)t.duplicates.push(r[n[o]]);t.usedDuplicates=new Array(i)}function fD(e,t,r){var n,o,i;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,i=e.length;o<i;o+=1)fD(e[o],t,r);else for(n=Object.keys(e),o=0,i=n.length;o<i;o+=1)fD(e[n[o]],t,r)}function KIe(e,t){t=t||{};var r=new LIe(t);r.noRefs||zIe(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),bi(r,0,n,!0,!0)?r.dump+`
112
+ `:""}var YIe=KIe,QIe={dump:YIe};function gD(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var P5=E5.load,V3e=E5.loadAll,W3e=QIe.dump;var z3e=gD("safeLoad","load"),K3e=gD("safeLoadAll","loadAll"),Y3e=gD("safeDump","dump");var zr=C(q9());var AS=C(CC()),wS=class{static async getExistingFiles(t){let r=[];for(let n of t)await(0,AS.pathExists)(n)&&r.push(n);return r}static getExistingFilesSync(t){let r=[];for(let n of t)(0,AS.pathExistsSync)(n)&&r.push(n);return r}};var yt=class{static configFiles(){let t=["./config.yaml","./config.yml","./configs/config.yaml","./configs/config.yml",`./configs/config-${yt.envLevel}.yaml`,`./configs/config-${yt.envLevel}.yml`,"./configs/config.json",`./configs/config-${yt.envLevel}.json`];return wS.getExistingFilesSync(t)}static get instance(){if(yt._instance===void 0){let t=new zr.TSConvict(yt);yt._instance=t.load(yt.configFiles())}return yt._instance}static get envLevel(){let t=process.env.NODE_ENV||"dev";return t.startsWith("prod")?"prod":t==="qa"?"qa":t==="local"?"local":"dev"}};Cn([zr.Property({doc:"AWS Account ID for app Lambda function",default:"",env:"AWS_ACCOUNT_ID"})],yt.prototype,"awsAccountID",2),Cn([zr.Property({doc:"AWS Region for app Lambda function",default:"us-east-1",env:"AWS_REGION"})],yt.prototype,"awsRegion",2),Cn([zr.Property({doc:"AWS Region where the origin API Gateway is located, used for signing requests",default:"us-east-2",env:"ORIGIN_REGION"})],yt.prototype,"originRegion",2),Cn([zr.Property({doc:`Signing mode
96
113
  - 'sign' - Sign API Gateway origin requests with SigV4 in headers
97
114
  - 'presign' - Sign API Gateway origin requsets with SigV4 in query params
98
- - undefined - Do not sign origin requests`,default:"",env:"SIGNING_MODE"})],Fe.prototype,"signingMode",2),wr([Kt.Property({doc:"Add X-Forwarded-Host header with value of Host header on the Edge",default:!0,env:"ADD_X_FORWARDED_HOST_HEADER"})],Fe.prototype,"addXForwardedHostHeader",2),wr([Kt.Property({doc:`Set the Host header to the Origin host name
115
+ - undefined - Do not sign origin requests`,default:"",env:"SIGNING_MODE"})],yt.prototype,"signingMode",2),Cn([zr.Property({doc:"Add X-Forwarded-Host header with value of Host header on the Edge",default:!0,env:"ADD_X_FORWARDED_HOST_HEADER"})],yt.prototype,"addXForwardedHostHeader",2),Cn([zr.Property({doc:`Set the Host header to the Origin host name
99
116
  This is useful when the OriginRequestPolicy is set to forward all headers
100
117
  API Gateway and Lambda Function URLs will both reject the request if the Host header is set
101
- to the Edge host name.`,default:!0,env:"REPLACE_HOST_HEADER"})],Fe.prototype,"replaceHostHeader",2),wr([Kt.Property({doc:"Allow 2nd generation routing by forwarding the request to the Lambda Function URL of the target version.",env:"TABLE_NAME",default:""})],Fe.prototype,"tableName",2),wr([Kt.Property({doc:"Path prefix for this deployment",default:"",env:"ROOT_PATH_PREFIX"})],Fe.prototype,"rootPathPrefix",2),wr([Kt.Property({doc:"Allowed locales for pages",default:[],env:"LOCALES"})],Fe.prototype,"locales",2),Fe=wr([Kt.Config({file:"config.yml",validationMethod:"strict",parser:{extension:["yml","yaml"],parse:I6},formats:{url:hm.url,ipaddress:hm.ipaddress}})],Fe);var UV=It(Wg()),Xs=class{};Xs.Instance=new UV.LambdaLog({silent:process.env.JEST_WORKER_ID!==void 0});var Br=Xs.Instance,Cr=Fe.instance,fTe=(0,Qs.normalizePathPrefix)(Fe.instance.rootPathPrefix),mTe=(0,Qs.loadAppFrame)({basePath:__dirname});Br.info("loaded config",{config:Cr});var ym,lE=new GV.DynamoDBClient({maxAttempts:8,region:Cr.originRegion});function hTe(e){ym=e.dbManager,lE=e.dynamoClient}ym=Cr.tableName&&lE?new $V.DBManager({dynamoClient:lE,tableName:Cr.tableName}):void 0;var yTe=new pE.SignatureV4({credentials:(0,dE.defaultProvider)(),region:Cr.originRegion||"us-east-2",service:"lambda",sha256:fE.Sha256}),_Te=new pE.SignatureV4({credentials:(0,dE.defaultProvider)(),region:Cr.originRegion||"us-east-2",service:"execute-api",sha256:fE.Sha256}),vTe=async(e,t)=>{var n,i,o,s,a,c,u,d,p,m,h,v,_,g,x,S,M,k;let r=e.Records[0].cf.request;try{let me=r;if(Br.debug("got request",{event:e,context:t}),(i=(n=r.origin)==null?void 0:n.s3)!=null&&i.domainName&&((c=(a=(s=(o=r.origin)==null?void 0:o.s3)==null?void 0:s.customHeaders["x-microapps-origin"])==null?void 0:a[0])==null?void 0:c.value)==="s3")return Br.debug("request is for S3 origin",{request:r}),(d=(u=r.headers.host)==null?void 0:u[0])!=null&&d.value&&((m=(p=r.headers.host)==null?void 0:p[0])==null?void 0:m.value)!==((v=(h=r.origin)==null?void 0:h.s3)==null?void 0:v.domainName)&&(r.headers.host=[{key:"Host",value:(g=(_=r.origin)==null?void 0:_.s3)==null?void 0:g.domainName}]),r;Cr.addXForwardedHostHeader&&r.headers.host&&(r.headers["x-forwarded-host"]=[{key:"X-Forwarded-Host",value:r.headers.host[0].value}]);let Te=(S=(x=r.origin)==null?void 0:x.custom)==null?void 0:S.domainName,Je="api-gateway";if(ym){let O=new URL(`https://localhost${r.uri}${r.querystring?`?${r.querystring}`:""}`),q=await(0,Qs.GetRoute)({dbManager:ym,locales:Cr.locales,rawPath:e.Records[0].cf.request.uri,queryStringParameters:O.searchParams,normalizedPathPrefix:fTe});if(Br.debug("got route info",{route:q}),q.startupType==="iframe"&&q.iFrameAppVersionPath&&!(q.isAPIPath??!1)){let oe=mTe.replace("{{iframeSrc}}",q.iFrameAppVersionPath);return Br.debug("returning app frame",{frameHTML:oe}),{status:"200",headers:{"content-type":[{key:"Content-Type",value:"text/html; charset=UTF-8"}],"cache-control":[{key:"Cache-Control",value:"private"}]},body:oe,bodyEncoding:"text"}}if(q.redirectLocation)return{status:`${q.statusCode}`,headers:{location:[{key:"Location",value:q.redirectLocation}]}};if(q.statusCode&&q.statusCode!==200)return{status:`${q.statusCode}`,statusDescription:q.errorMessage};q.url&&(q.type==="url"||q.type==="lambda-url")&&(Br.debug("rewriting to url",{url:q.url}),Je=q.type,Te=new URL(q.url).hostname),q.appName&&(r.headers["x-microapps-appname"]=[{key:"X-MicroApps-AppName",value:q.appName}]),q.semVer&&(r.headers["x-microapps-semver"]=[{key:"X-MicroApps-SemVer",value:q.semVer}])}if(!Te)return Br.error("No origin found",{request:r}),{status:"404",statusDescription:"Origin Domain Missing"};(Cr.tableName||Cr.replaceHostHeader&&Te||Je==="lambda-url"||Je==="url")&&(r.headers.host=[{key:"Host",value:Te}]),(k=(M=r.origin)==null?void 0:M.custom)!=null&&k.domainName?(r.origin={...r.origin},r.origin.custom.domainName=Te):r.origin={custom:{domainName:Te,keepaliveTimeout:5,port:443,protocol:"https",readTimeout:30,sslProtocols:["TLSv1.2"],customHeaders:{},path:""}},r.querystring=(r.querystring??"").replace(/&?appver=[^&]*/,"");let Ne=Te.includes(".lambda-url.")?yTe:_Te;return Cr.signingMode==="sign"?(Br.debug("signing request"),me=await OH(r,t,Ne)):Cr.signingMode==="presign"?(Br.error("presign not yet implemented"),me=await RH(r,t,Ne)):Br.info("not signing request"),me}catch(me){return Br.error("caught exception at top level",{error:me}),{status:"500",statusDescription:"Failed Modifying Origin Request"}}};0&&(module.exports={handler,overrideDBManager});
118
+ to the Edge host name.`,default:!0,env:"REPLACE_HOST_HEADER"})],yt.prototype,"replaceHostHeader",2),Cn([zr.Property({doc:"Allow 2nd generation routing by forwarding the request to the Lambda Function URL of the target version.",env:"TABLE_NAME",default:""})],yt.prototype,"tableName",2),Cn([zr.Property({doc:"Path prefix for this deployment",default:"",env:"ROOT_PATH_PREFIX"})],yt.prototype,"rootPathPrefix",2),Cn([zr.Property({doc:"Allowed locales for pages",default:[],env:"LOCALES"})],yt.prototype,"locales",2),yt=Cn([zr.Config({file:"config.yml",validationMethod:"strict",parser:{extension:["yml","yaml"],parse:P5},formats:{url:IS.url,ipaddress:IS.ipaddress}})],yt);var G9=C(PC()),Ru=class{};Ru.Instance=new G9.LambdaLog({silent:process.env.JEST_WORKER_ID!==void 0});var Yn=Ru.Instance,wn=yt.instance,VDe=(0,Pu.normalizePathPrefix)(yt.instance.rootPathPrefix),WDe=(0,Pu.loadAppFrame)({basePath:__dirname});Yn.info("loaded config",{config:wn});var CS,KD=new H9.DynamoDBClient({maxAttempts:8,region:wn.originRegion});function zDe(e){CS=e.dbManager,KD=e.dynamoClient}CS=wn.tableName&&KD?new V9.DBManager({dynamoClient:KD,tableName:wn.tableName}):void 0;var KDe=new QD.SignatureV4({credentials:(0,YD.defaultProvider)(),region:wn.originRegion||"us-east-2",service:"lambda",sha256:XD.Sha256}),YDe=new QD.SignatureV4({credentials:(0,YD.defaultProvider)(),region:wn.originRegion||"us-east-2",service:"execute-api",sha256:XD.Sha256}),QDe=async(e,t)=>{var n,o,i,s,a,c,l,d,f,m,h,_,E,T,I,A,O,G;let r=e.Records[0].cf.request;try{let z=r;if(Yn.debug("got request",{event:e,context:t}),(o=(n=r.origin)==null?void 0:n.s3)!=null&&o.domainName&&((c=(a=(s=(i=r.origin)==null?void 0:i.s3)==null?void 0:s.customHeaders["x-microapps-origin"])==null?void 0:a[0])==null?void 0:c.value)==="s3")return Yn.debug("request is for S3 origin",{request:r}),(d=(l=r.headers.host)==null?void 0:l[0])!=null&&d.value&&((m=(f=r.headers.host)==null?void 0:f[0])==null?void 0:m.value)!==((_=(h=r.origin)==null?void 0:h.s3)==null?void 0:_.domainName)&&(r.headers.host=[{key:"Host",value:(T=(E=r.origin)==null?void 0:E.s3)==null?void 0:T.domainName}]),r;wn.addXForwardedHostHeader&&r.headers.host&&(r.headers["x-forwarded-host"]=[{key:"X-Forwarded-Host",value:r.headers.host[0].value}]);let Q=(A=(I=r.origin)==null?void 0:I.custom)==null?void 0:A.domainName,be="api-gateway";if(CS){let q=new URL(`https://localhost${r.uri}${r.querystring?`?${r.querystring}`:""}`),Z=await(0,Pu.GetRoute)({dbManager:CS,locales:wn.locales,rawPath:e.Records[0].cf.request.uri,queryStringParameters:q.searchParams,normalizedPathPrefix:VDe});if(Yn.debug("got route info",{route:Z}),Z.startupType==="iframe"&&Z.iFrameAppVersionPath&&!(Z.isAPIPath??!1)){let ee=WDe.replace("{{iframeSrc}}",Z.iFrameAppVersionPath);return Yn.debug("returning app frame",{frameHTML:ee}),{status:"200",headers:{"content-type":[{key:"Content-Type",value:"text/html; charset=UTF-8"}],"cache-control":[{key:"Cache-Control",value:"private"}]},body:ee,bodyEncoding:"text"}}if(Z.redirectLocation)return{status:`${Z.statusCode}`,headers:{location:[{key:"Location",value:Z.redirectLocation}]}};if(Z.statusCode&&Z.statusCode!==200)return{status:`${Z.statusCode}`,statusDescription:Z.errorMessage};Z.url&&(Z.type==="url"||Z.type==="lambda-url")&&(Yn.debug("rewriting to url",{url:Z.url}),be=Z.type,Q=new URL(Z.url).hostname),Z.appName&&(r.headers["x-microapps-appname"]=[{key:"X-MicroApps-AppName",value:Z.appName}]),Z.semVer&&(r.headers["x-microapps-semver"]=[{key:"X-MicroApps-SemVer",value:Z.semVer}])}if(!Q)return Yn.error("No origin found",{request:r}),{status:"404",statusDescription:"Origin Domain Missing"};(wn.tableName||wn.replaceHostHeader&&Q||be==="lambda-url"||be==="url")&&(r.headers.host=[{key:"Host",value:Q}]),(G=(O=r.origin)==null?void 0:O.custom)!=null&&G.domainName?(r.origin={...r.origin},r.origin.custom.domainName=Q):r.origin={custom:{domainName:Q,keepaliveTimeout:5,port:443,protocol:"https",readTimeout:30,sslProtocols:["TLSv1.2"],customHeaders:{},path:""}},r.querystring=(r.querystring??"").replace(/&?appver=[^&]*/,"");let ue=Q.includes(".lambda-url.")?KDe:YDe;return wn.signingMode==="sign"?(Yn.debug("signing request"),z=await OK(r,t,ue)):wn.signingMode==="presign"?(Yn.error("presign not yet implemented"),z=await NK(r,t,ue)):Yn.info("not signing request"),z}catch(z){return Yn.error("caught exception at top level",{error:z}),{status:"500",statusDescription:"Failed Modifying Origin Request"}}};0&&(module.exports={handler,overrideDBManager});
102
119
  /*! Bundled license information:
103
120
 
104
121
  tslib/tslib.es6.js: