@allthings/cloud-toolkit 1.3.0-dev.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("events"),require("url"),require("util"),require("fs"),require("http"),require("https"),require("zlib"),require("stream"),require("net"),require("dns"),require("os"),require("path"),require("crypto"),require("tls"),require("child_process"),require("buffer"),require("string_decoder")):"function"==typeof define&&define.amd?define(["exports","events","url","util","fs","http","https","zlib","stream","net","dns","os","path","crypto","tls","child_process","buffer","string_decoder"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).allthings={},e.require$$0$9,e.require$$0$2,e.require$$0$7,e.require$$0$5,e.require$$0$4,e.require$$1,e.require$$3$1,e.require$$0$3,e.require$$7,e.require$$4,e.require$$0$6,e.require$$0$8,e.require$$2$1,e.require$$1$1,e.require$$0$a,e.require$$0$b,e.require$$1$2)}(this,(function(e,t,n,i,r,o,s,a,c,l,u,p,d,m,h,f,g,y){"use strict";const v=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}},b=e=>({httpHandler:e.httpHandler()});var x,w,E,S,_;!function(e){e.HEADER="header",e.QUERY="query"}(x||(x={})),function(e){e.HEADER="header",e.QUERY="query"}(w||(w={})),function(e){e.HTTP="http",e.HTTPS="https"}(E||(E={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(S||(S={})),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(_||(_={}));const O="__smithy_context";var C,k;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(C||(C={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(k||(k={}));class T{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new T({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce(((e,t)=>{const i=n[t];return{...e,[t]:Array.isArray(i)?[...i]:i}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return T.clone(this)}}class P{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const A={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},I=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!T.isInstance(n.request))return t(n);const{request:i}=n,{handlerProtocol:r=""}=e.requestHandler.metadata||{};if(r.indexOf("h2")>=0&&!i.headers[":authority"])delete i.headers.host,i.headers[":authority"]=i.hostname+(i.port?":"+i.port:"");else if(!i.headers.host){let e=i.hostname;null!=i.port&&(e+=`:${i.port}`),i.headers.host=e}return t(n)})(e),A)}}),R={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},M=e=>({applyToStack:e=>{e.add(((e,t)=>async n=>{try{const i=await e(n),{clientName:r,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=a,u=c??t.inputFilterSensitiveLog,p=l??t.outputFilterSensitiveLog,{$metadata:d,...m}=i.output;return s?.info?.({clientName:r,commandName:o,input:u(n.input),output:p(m),metadata:d}),i}catch(e){const{clientName:i,commandName:r,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,c=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:r,input:c(n.input),error:e,metadata:e.$metadata}),e}}),R)}}),j="X-Amzn-Trace-Id",$={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},N=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:i}=n;if(!T.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(j))return t(n);const r=[]._X_AMZN_TRACE_ID,o=e=>"string"==typeof e&&e.length>0;return o([].AWS_LAMBDA_FUNCTION_NAME)&&o(r)&&(i.headers[j]=r),t({...n,request:i})})(e),$)}}),D=e=>e[O]||(e[O]={}),L=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const z=(e,t)=>(n,i)=>async r=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,i,r.input)),s=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=D(i),c=[];for(const n of o){const r=s.get(n.schemeId);if(!r){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const o=r.identityProvider(await t.identityProviderConfigProvider(e));if(!o){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:l={},signingProperties:u={}}=n.propertiesExtractor?.(e,i)||{};n.identityProperties=Object.assign(n.identityProperties||{},l),n.signingProperties=Object.assign(n.signingProperties||{},u),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await o(n.identityProperties),signer:r.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(r)},F={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},U=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:i=>{i.addRelativeTo(z(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),F)}}),B={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},H={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function q(e,t,n){return{applyToStack:i=>{i.add(((e,t)=>n=>async i=>{const{response:r}=await n(i);try{return{response:r,output:await t(r,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:r}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}})(e,n),B),i.add(((e,t)=>(n,i)=>async r=>{const o=i.endpointV2?.url&&e.urlParser?async()=>e.urlParser(i.endpointV2.url):e.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const s=await t(r.input,{...e,endpoint:o});return n({...r,request:s})})(e,t),H)}}}const V=e=>e=>{throw e},G=(e,t)=>{},W={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},K=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async n=>{if(!T.isInstance(n.request))return e(n);const i=D(t).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:r={}},identity:o,signer:s}=i,a=await e({...n,request:await s.sign(n.request,o,r)}).catch((s.errorHandler||V)(r));return(s.successHandler||G)(a.response,r),a}),W)}}),Y=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},Q=async(e,t,n,...i)=>await t.send(new e(n),...i);function J(e,t,n,i,r){return async function*(o,s,...a){let c,l=o.startingToken||void 0,u=!0;for(;u;){if(s[n]=l,r&&(s[r]=s[r]??o.pageSize),!(o.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);c=await Q(t,o.client,s,...a),yield c;const p=l;l=X(c,i),u=!(!l||o.stopOnSameToken&&l===p)}}}const X=(e,t)=>{let n=e;const i=t.split(".");for(const e of i){if(!n||"object"!=typeof n)return;n=n[e]}return n},Z={},ee=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);Z[n]=e,ee[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),i=e+26;Z[n]=i,ee[i]=n}for(let e=0;e<10;e++){Z[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;Z[t]=n,ee[n]=t}Z["+"]=62,ee[62]="+",Z["/"]=63,ee[63]="/";const te=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),i=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,r=0;for(let i=t,o=t+3;i<=o;i++)if("="!==e[i]){if(!(e[i]in Z))throw new TypeError(`Invalid character ${e[i]} in base64 string.`);n|=Z[e[i]]<<6*(o-i),r+=6}else n>>=6;const o=t/4*3;n>>=r%8;const s=Math.floor(r/8);for(let e=0;e<s;e++){const t=8*(s-e-1);i.setUint8(o+e,(n&255<<t)>>t)}}return new Uint8Array(n)},ne=e=>(new TextEncoder).encode(e),ie=e=>"string"==typeof e?ne(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),re=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function oe(e){let t;t="string"==typeof e?ne(e):e;const n="object"==typeof t&&"number"==typeof t.length,i="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!i)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let r="";for(let e=0;e<t.length;e+=3){let n=0,i=0;for(let r=e,o=Math.min(e+3,t.length);r<o;r++)n|=t[r]<<8*(o-r-1),i+=8;const o=Math.ceil(i/6);n<<=6*o-i;for(let e=1;e<=o;e++){const t=6*(o-e);r+=ee[(n&63<<t)>>t]}r+="==".slice(0,4-o)}return r}class se extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?se.mutate(te(e)):se.mutate(ne(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,se.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?oe(e):re(e)}(this,e)}}const ae=e=>encodeURIComponent(e).replace(/[!'()*]/g,ce),ce=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function le(e){const t=[];for(let n of Object.keys(e).sort()){const i=e[n];if(n=ae(n),Array.isArray(i))for(let e=0,r=i.length;e<r;e++)t.push(`${n}=${ae(i[e])}`);else{let e=n;(i||"string"==typeof i)&&(e+=`=${ae(i)}`),t.push(e)}}return t.join("&")}function ue(e=0){return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}const pe={supported:void 0};let de=class e{static create(t){return"function"==typeof t?.handle?t:new e(t)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===pe.supported&&(pe.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,i=!0===this.config.keepAlive,r=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const s=le(e.query||{});s&&(o+=`?${s}`),e.fragment&&(o+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:c,method:l}=e,u=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${o}`,p="GET"===l||"HEAD"===l?void 0:e.body,d={body:p,headers:new Headers(e.headers),method:l,credentials:r};this.config?.cache&&(d.cache=this.config.cache),p&&(d.duplex="half"),"undefined"!=typeof AbortController&&(d.signal=t),pe.supported&&(d.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(d,this.config.requestInit(e));let m=()=>{};const h=new Request(u,d),f=[fetch(h).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new P({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new P({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),ue(n)];return t&&f.push(new Promise(((e,n)=>{const i=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",i,{once:!0}),m=()=>e.removeEventListener("abort",i)}else t.onabort=i}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}};const me=async e=>"function"==typeof Blob&&e instanceof Blob?new Uint8Array(await e.arrayBuffer()):async function(e){const t=[],n=e.getReader();let i=!1,r=0;for(;!i;){const{done:e,value:o}=await n.read();o&&(t.push(o),r+=o.length),i=e}const o=new Uint8Array(r);let s=0;for(const e of t)o.set(e,s),s+=e.length;return o}(e);const he={},fe={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),he[e]=t,fe[t]=e}function ge(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const i=e.slice(n,n+2).toLowerCase();if(!(i in fe))throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`);t[n/2]=fe[i]}return t}function ye(e){let t="";for(let n=0;n<e.byteLength;n++)t+=he[e[n]];return t}const ve=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return se.mutate(e);if(!e)return se.mutate(new Uint8Array);const n=t.streamCollector(e);return se.mutate(await n)};function be(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}class xe{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:i}=await this.context.endpoint();this.path=i;for(const e of this.resolvePathStack)e(this.path);return new T({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,n,i){return this.resolvePathStack.push((r=>{this.path=we(r,this.input,e,t,n,i)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const we=(e,t,n,i,r,o)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=i();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(r,o?t.split("/").map((e=>be(e))).join("/"):be(t))}return e};class Ee{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const Se=(_e=3e5,e=>Oe(e)&&e.expiration.getTime()-Date.now()<_e);var _e;const Oe=e=>void 0!==e.expiration,Ce=(e,t,n)=>{if(void 0===e)return;const i="function"!=typeof e?async()=>Promise.resolve(e):e;let r,o,s,a=!1;const c=async e=>{o||(o=i(e));try{r=await o,s=!0,a=!1}finally{o=void 0}return r};return void 0===t?async e=>(s&&!e?.forceRefresh||(r=await c(e)),r):async e=>(s&&!e?.forceRefresh||(r=await c(e)),a?r:n(r)?t(r)?(await c(e),r):r:(a=!0,r))};function ke(e){const t=Y(e.userAgentAppId??undefined);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}}}class Te{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:i}=e.next();if(this.data.delete(n),i||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const i of n){const n=String(e[i]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}const Pe=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}$"),Ae=e=>Pe.test(e)||e.startsWith("[")&&e.endsWith("]"),Ie=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Re=(e,t=!1)=>{if(!t)return Ie.test(e);const n=e.split(".");for(const e of n)if(!Re(e))return!1;return!0},Me={},je="endpoints";function $e(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${$e(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map($e).join(", ")})`:JSON.stringify(e,null,2)}class Ne extends Error{constructor(e){super(e),this.name="EndpointError"}}const De=(e,t)=>(e=>{const t=e.split("."),n=[];for(const i of t){const t=i.indexOf("[");if(-1!==t){if(i.indexOf("]")!==i.length-1)throw new Ne(`Path: '${e}' does not end with ']'`);const r=i.slice(t+1,-1);if(Number.isNaN(parseInt(r)))throw new Ne(`Invalid array index: '${r}' in path: '${e}'`);0!==t&&n.push(i.slice(0,t)),n.push(r)}else n.push(i)}return n})(t).reduce(((n,i)=>{if("object"!=typeof n)throw new Ne(`Index '${i}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(i)]:n[i]}),e),Le={[E.HTTP]:80,[E.HTTPS]:443},ze={booleanEquals:(e,t)=>e===t,getAttr:De,isSet:e=>null!=e,isValidHostLabel:Re,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:i="",path:r="",query:o={}}=e,s=new URL(`${i}//${t}${n?`:${n}`:""}${r}`);return s.search=Object.entries(o).map((([e,t])=>`${e}=${t}`)).join("&"),s}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:i,hostname:r,pathname:o,protocol:s,search:a}=t;if(a)return null;const c=s.slice(0,-1);if(!Object.values(E).includes(c))return null;const l=Ae(r);return{scheme:c,authority:`${i}${n.includes(`${i}:${Le[c]}`)||"string"==typeof e&&e.includes(`${i}:${Le[c]}`)?`:${Le[c]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:l}},stringEquals:(e,t)=>e===t,substring:(e,t,n,i)=>t>=n||e.length<n?null:i?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},Fe=(e,t)=>{const n=[],i={...t.endpointParams,...t.referenceRecord};let r=0;for(;r<e.length;){const t=e.indexOf("{",r);if(-1===t){n.push(e.slice(r));break}n.push(e.slice(r,t));const o=e.indexOf("}",t);if(-1===o){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[o+1]&&(n.push(e.slice(t+1,o)),r=o+2);const s=e.substring(t+1,o);if(s.includes("#")){const[e,t]=s.split("#");n.push(De(i[e],t))}else n.push(i[s]);r=o+1}return n.join("")},Ue=(e,t,n)=>{if("string"==typeof e)return Fe(e,n);if(e.fn)return Be(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new Ne(`'${t}': ${String(e)} is not a string, function or reference.`)},Be=({fn:e,argv:t},n)=>{const i=t.map((e=>["boolean","number"].includes(typeof e)?e:Ue(e,"arg",n))),r=e.split(".");return r[0]in Me&&null!=r[1]?Me[r[0]][r[1]](...i):ze[e](...i)},He=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Ne(`'${e}' is already defined in Reference Record.`);const i=Be(t,n);return n.logger?.debug?.(`${je} evaluateCondition: ${$e(t)} = ${$e(i)}`),{result:""===i||!!i,...null!=e&&{toAssign:{name:e,value:i}}}},qe=(e=[],t)=>{const n={};for(const i of e){const{result:e,toAssign:r}=He(i,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};r&&(n[r.name]=r.value,t.logger?.debug?.(`${je} assign: ${r.name} := ${$e(r.value)}`))}return{result:!0,referenceRecord:n}},Ve=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:i.map((e=>{const i=Ue(e,"Header value entry",t);if("string"!=typeof i)throw new Ne(`Header '${n}' value '${i}' is not a string`);return i}))})),{}),Ge=(e,t)=>{if(Array.isArray(e))return e.map((e=>Ge(e,t)));switch(typeof e){case"string":return Fe(e,t);case"object":if(null===e)throw new Ne(`Unexpected endpoint property: ${e}`);return We(e,t);case"boolean":return e;default:throw new Ne("Unexpected endpoint property type: "+typeof e)}},We=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:Ge(i,t)})),{}),Ke=(e,t)=>{const n=Ue(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new Ne("Endpoint URL must be a string, got "+typeof n)},Ye=(e,t)=>{const{conditions:n,endpoint:i}=e,{result:r,referenceRecord:o}=qe(n,t);if(!r)return;const s={...t,referenceRecord:{...t.referenceRecord,...o}},{url:a,properties:c,headers:l}=i;return t.logger?.debug?.(`${je} Resolving endpoint from template: ${$e(i)}`),{...null!=l&&{headers:Ve(l,s)},...null!=c&&{properties:We(c,s)},url:Ke(a,s)}},Qe=(e,t)=>{const{conditions:n,error:i}=e,{result:r,referenceRecord:o}=qe(n,t);if(r)throw new Ne(Ue(i,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},Je=(e,t)=>{const{conditions:n,rules:i}=e,{result:r,referenceRecord:o}=qe(n,t);if(r)return Xe(i,{...t,referenceRecord:{...t.referenceRecord,...o}})},Xe=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Ye(n,t);if(e)return e}else if("error"===n.type)Qe(n,t);else{if("tree"!==n.type)throw new Ne(`Unknown endpoint rule: ${n}`);{const e=Je(n,t);if(e)return e}}throw new Ne("Rules evaluation failed")},Ze=(e,t)=>{const{endpointParams:n,logger:i}=t,{parameters:r,rules:o}=e;t.logger?.debug?.(`${je} Initial EndpointParams: ${$e(n)}`);const s=Object.entries(r).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(s.length>0)for(const[e,t]of s)n[e]=n[e]??t;const a=Object.entries(r).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==n[e])throw new Ne(`Missing required parameter: '${e}'`);const c=Xe(o,{endpointParams:n,logger:i,referenceRecord:{}});return t.logger?.debug?.(`${je} Resolved endpoint: ${$e(c)}`),c},et=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!et(t))return!1;return!0}return!!Re(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Ae(e)))};let tt={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const nt={isVirtualHostableS3Bucket:et,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,i,r,o,s,...a]=t;if("arn"!==n||""===i||""===r||""===a.join(":"))return null;return{partition:i,service:r,region:o,accountId:s,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=tt;for(const n of t){const{regions:t,outputs:i}=n;for(const[n,r]of Object.entries(t))if(n===e)return{...i,...r}}for(const n of t){const{regionRegex:t,outputs:i}=n;if(new RegExp(t).test(e))return{...i}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function it(e,t,n){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]=n}Me.aws=nt;const rt=e=>P.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,ot=e=>new Date(Date.now()+e),st=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(ot(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},at=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};let ct=class{async sign(e,t,n){if(!T.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await(async e=>{const t=at("context",e.context),n=at("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],r=at("signer",n.signer),o=await r(i),s=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:a,signingName:c}})(n),{config:r,signer:o}=i;let{signingRegion:s,signingName:a}=i;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(s=t?.signingRegion??s,a=t?.signingName??a)}return await o.sign(e,{signingDate:ot(r.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??rt(t.$response);if(n){const i=at("config",e.config),r=i.systemClockOffset;i.systemClockOffset=st(n,i.systemClockOffset);i.systemClockOffset!==r&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=rt(e);if(n){const e=at("config",t.config);e.systemClockOffset=st(n,e.systemClockOffset)}}};const lt=(e,t,n)=>{let i,r,o,s=!1;return async t=>(o&&!t?.forceRefresh||(i=await(async()=>{r||(r=e());try{i=await r,o=!0,s=!1}finally{r=void 0}return i})()),i)},ut="X-Amz-Date",pt="X-Amz-Signature",dt="X-Amz-Security-Token",mt="authorization",ht=ut.toLowerCase(),ft=[mt,ht,"date"],gt=pt.toLowerCase(),yt="x-amz-content-sha256",vt=dt.toLowerCase(),bt={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},xt=/^proxy-/,wt=/^sec-/,Et="AWS4-HMAC-SHA256",St="AWS4-HMAC-SHA256-PAYLOAD",_t="aws4_request",Ot={},Ct=[],kt=(e,t,n)=>`${e}/${t}/${n}/${_t}`,Tt=(e,t,n)=>{const i=new e(t);return i.update(ie(n)),i.digest()},Pt=({headers:e},t,n)=>{const i={};for(const r of Object.keys(e).sort()){if(null==e[r])continue;const o=r.toLowerCase();(o in bt||t?.has(o)||xt.test(o)||wt.test(o))&&(!n||n&&!n.has(o))||(i[o]=e[r].trim().replace(/\s+/g," "))}return i},At=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===yt)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(i=t,"function"==typeof ArrayBuffer&&i instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(i))){const e=new n;return e.update(ie(t)),ye(await e.digest())}var i;return"UNSIGNED-PAYLOAD"};class It{format(e){const t=[];for(const n of Object.keys(e)){const i=ne(n);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let i=0;for(const e of t)n.set(e,i),i+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const r=new DataView(new ArrayBuffer(3+e.value.byteLength));r.setUint8(0,6),r.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(r.buffer);return o.set(e.value,3),o;case"string":const s=ne(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(jt.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!Mt.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(ge(e.value.replace(/\-/g,"")),1),u}}}var Rt;!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"}(Rt||(Rt={}));const Mt=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let jt=class e{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let e=7,i=Math.abs(Math.round(t));e>-1&&i>0;e--,i/=256)n[e]=i;return t<0&&$t(n),new e(n)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&$t(e),parseInt(ye(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function $t(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Nt=e=>{e=T.clone(e);for(const t of Object.keys(e.headers))ft.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Dt=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Lt{constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:r,uriEscapePath:o=!0}){this.headerFormatter=new It,this.service=i,this.sha256=r,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=L(n),this.credentialProvider=L(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:r,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:a,signingRegion:c,signingService:l}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);const p=c??await this.regionProvider(),{longDate:d,shortDate:m}=zt(n);if(i>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const h=kt(m,p,l??this.service),f=((e,t={})=>{const{headers:n,query:i={}}=T.clone(e);for(const e of Object.keys(n)){const r=e.toLowerCase();("x-amz-"===r.slice(0,6)&&!t.unhoistableHeaders?.has(r)||t.hoistableHeaders?.has(r))&&(i[e]=n[e],delete n[e])}return{...e,headers:n,query:i}})(Nt(e),{unhoistableHeaders:o,hoistableHeaders:a});u.sessionToken&&(f.query[dt]=u.sessionToken),f.query["X-Amz-Algorithm"]=Et,f.query["X-Amz-Credential"]=`${u.accessKeyId}/${h}`,f.query[ut]=d,f.query["X-Amz-Expires"]=i.toString(10);const g=Pt(f,r,s);return f.query["X-Amz-SignedHeaders"]=Ft(g),f.query[pt]=await this.getSignature(d,h,this.getSigningKey(u,p,m,l),this.createCanonicalRequest(f,g,await At(e,this.sha256))),f}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:i,signingRegion:r,signingService:o}){const s=r??await this.regionProvider(),{shortDate:a,longDate:c}=zt(n),l=kt(a,s,o??this.service),u=await At({headers:{},body:t},this.sha256),p=new this.sha256;p.update(e);const d=ye(await p.digest()),m=[St,c,l,i,d,u].join("\n");return this.signString(m,{signingDate:n,signingRegion:s,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:i,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:i}={}){const r=await this.credentialProvider();this.validateResolvedCredentials(r);const o=n??await this.regionProvider(),{shortDate:s}=zt(t),a=new this.sha256(await this.getSigningKey(r,o,s,i));return a.update(ie(e)),ye(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:r,signingService:o}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=r??await this.regionProvider(),c=Nt(e),{longDate:l,shortDate:u}=zt(t),p=kt(u,a,o??this.service);c.headers[ht]=l,s.sessionToken&&(c.headers[vt]=s.sessionToken);const d=await At(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(yt,c.headers)&&this.applyChecksum&&(c.headers[yt]=d);const m=Pt(c,i,n),h=await this.getSignature(l,p,this.getSigningKey(s,a,u,o),this.createCanonicalRequest(c,m,d));return c.headers[mt]=`${Et} Credential=${s.accessKeyId}/${p}, SignedHeaders=${Ft(m)}, Signature=${h}`,c}createCanonicalRequest(e,t,n){const i=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const i of Object.keys(e)){if(i.toLowerCase()===gt)continue;const r=ae(i);t.push(r);const o=e[i];"string"==typeof o?n[r]=`${r}=${ae(o)}`:Array.isArray(o)&&(n[r]=o.slice(0).reduce(((e,t)=>e.concat([`${r}=${ae(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")})(e)}\n${i.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${i.join(";")}\n${n}`}async createStringToSign(e,t,n){const i=new this.sha256;i.update(ie(n));const r=await i.digest();return`${Et}\n${e}\n${t}\n${ye(r)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return ae(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,i){const r=await this.createStringToSign(e,t,i),o=new this.sha256(await n);return o.update(ie(r)),ye(await o.digest())}getSigningKey(e,t,n,i){return(async(e,t,n,i,r)=>{const o=`${n}:${i}:${r}:${ye(await Tt(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in Ot)return Ot[o];for(Ct.push(o);Ct.length>50;)delete Ot[Ct.shift()];let s=`AWS4${t.secretAccessKey}`;for(const t of[n,i,r,_t])s=await Tt(e,s,t);return Ot[o]=s})(this.sha256,e,n,t,i||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const zt=e=>{const t=(n=e,Dt(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}},Ft=e=>Object.keys(e).sort().join(";"),Ut=e=>{let t,n=!1;e.credentials&&(n=!0,t=Ce(e.credentials,Se,Oe)),t||(t=e.credentialDefaultProvider?Y(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:i=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:o}=e;let s;return s=e.signer?Y(e.signer):e.regionInfoProvider?()=>Y(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,r])=>{const{signingRegion:s,signingService:a}=n;e.signingRegion=e.signingRegion||s||r,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Lt)(c)})):async n=>{const r=(n=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Y(e.region)(),properties:{}},n)).signingRegion,s=n.signingName;e.signingRegion=e.signingRegion||r,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Lt)(a)},{...e,systemClockOffset:r,signingEscapePath:i,credentials:n?async()=>t().then((e=>{return n="CREDENTIALS_CODE",i="e",(t=e).$source||(t.$source={}),t.$source[n]=i,t;var t,n,i})):t,signer:s}},Bt=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},Ht=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,qt=()=>{let e=[],t=[],n=!1;const i=new Set,r=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(a.identifyOnResolve()),n),o=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t},s=(n=!1)=>{const i=[],r=[],s={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Bt(t.name,t.aliases))s[e]=t;i.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Bt(t.name,t.aliases))s[e]=t;r.push(t)})),r.forEach((e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${Ht(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const a=(c=i,c.sort(((e,t)=>Vt[t.step]-Vt[e.step]||Gt[t.priority||"normal"]-Gt[e.priority||"normal"]))).map(o).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return a},a={add:(t,n={})=>{const{name:r,override:o,aliases:s}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=Bt(r,s);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${Ht(r,s)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const i=e[n];if(i.step!==a.step||a.priority!==i.priority)throw new Error(`"${Ht(i.name,i.aliases)}" middleware with ${i.priority} priority in ${i.step} step cannot be overridden by "${Ht(r,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)i.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:r,override:o,aliases:s}=n,a={middleware:e,...n},c=Bt(r,s);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${Ht(r,s)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const i=t[n];if(i.toMiddleware!==a.toMiddleware||i.relation!==a.relation)throw new Error(`"${Ht(i.name,i.aliases)}" middleware ${i.relation} "${i.toMiddleware}" middleware cannot be overridden by "${Ht(r,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)i.add(e)}t.push(a)},clone:()=>r(qt()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let r=!1;const o=e=>{const t=Bt(e.name,e.aliases);if(t.includes(n)){r=!0;for(const e of t)i.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),r})(n):(n=>{let r=!1;const o=e=>{if(e.middleware===n){r=!0;for(const t of Bt(e.name,e.aliases))i.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),r})(n),removeByTag:n=>{let r=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(n)){const e=Bt(o,s);for(const t of e)i.delete(t);return r=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),r},concat:e=>{const t=r(qt());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:r,identify:()=>s(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Ht(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of s().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},Vt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Gt={high:3,normal:2,low:1};class Wt{constructor(e){this.config=e,this.middlewareStack=qt()}send(e,t,n){const i="function"!=typeof t?t:void 0,r="function"==typeof t?t:n;let o;if(void 0===i&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?o=t.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,i),t.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,i);if(!r)return o(e).then((e=>e.output));o(e).then((e=>r(null,e.output)),(e=>r(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class Kt{constructor(){this.middlewareStack=qt()}static classBuilder(){return new Yt}resolveMiddlewareWithContext(e,t,n,{middlewareFn:i,clientName:r,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:l,CommandCtor:u}){for(const r of i.bind(this)(u,e,t,n))this.middlewareStack.use(r);const p=e.concat(this.middlewareStack),{logger:d}=t,m={logger:d,clientName:r,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[O]:{commandInstance:this,...c},...l},{requestHandler:h}=t;return p.resolve((e=>h.handle(e.request,n||{})),m)}}class Yt{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends Kt{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(n,i,r){return this.resolveMiddlewareWithContext(n,i,r,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Qt="***SensitiveInformation***",Jt=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},Xt=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&fn.warn(hn(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},Zt=Math.ceil(2**127*(2-2**-23)),en=e=>{const t=Xt(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Zt)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},tn=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},nn=e=>on(e,16),rn=e=>on(e,8),on=(e,t)=>{const n=tn(e);if(void 0!==n&&sn(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},sn=(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]}},an=(e,t)=>{if(null==e)throw new TypeError("Expected a non-null value");return e},cn=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return fn.warn(hn(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},ln=e=>Xt("string"==typeof e?dn(e):e),un=ln,pn=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,dn=e=>{const t=e.match(pn);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},mn=e=>tn("string"==typeof e?dn(e):e),hn=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),fn={warn:console.warn},gn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yn=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),vn=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=yn.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,i,r,o,s,a,c,l,u]=t,p=(e=>nn("string"==typeof e?dn(e):e))(Cn(i)),d=Sn(r,"month",1,12),m=Sn(o,"day",1,31),h=bn(p,d,m,{hours:s,minutes:a,seconds:c,fractionalMilliseconds:l});return"Z"!=u.toUpperCase()&&h.setTime(h.getTime()-On(u)),h},bn=(e,t,n,i)=>{const r=t-1;return wn(e,r,n),new Date(Date.UTC(e,r,n,Sn(i.hours,"hour",0,23),Sn(i.minutes,"minute",0,59),Sn(i.seconds,"seconds",0,60),_n(i.fractionalMilliseconds)))},xn=[31,28,31,30,31,30,31,31,30,31,30,31],wn=(e,t,n)=>{let i=xn[t];if(1===t&&En(e)&&(i=29),n>i)throw new TypeError(`Invalid day for ${gn[t]} in ${e}: ${n}`)},En=e=>e%4==0&&(e%100!=0||e%400==0),Sn=(e,t,n,i)=>{const r=(e=>rn("string"==typeof e?dn(e):e))(Cn(e));if(r<n||r>i)throw new TypeError(`${t} must be between ${n} and ${i}, inclusive`);return r},_n=e=>null==e?0:1e3*(e=>en("string"==typeof e?dn(e):e))("0."+e),On=e=>{const t=e[0];let n=1;if("+"==t)n=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);n=-1}return n*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},Cn=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)};let kn=class e extends Error{constructor(t){super(t.message),Object.setPrototypeOf(this,e.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}};const Tn=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Pn=e=>({output:t,parsedBody:n,errorCode:i})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:i})=>{const r=An(e),o=r.httpStatusCode?r.httpStatusCode+"":void 0,s=new n({name:t?.code||t?.Code||i||o||"UnknownError",$fault:"client",$metadata:r});throw Tn(s,t)})({output:t,parsedBody:n,exceptionCtor:e,errorCode:i})},An=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"]}),In=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Rn=e=>{const t=[];for(const n in S){const i=S[n];void 0!==e[i]&&t.push({algorithmId:()=>i,checksumConstructor:()=>e[i]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},Mn=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},jn=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},$n=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},Nn=e=>({...Rn(e),...jn(e)}),Dn=e=>({...Mn(e),...$n(e)}),Ln=e=>Array.isArray(e)?e:[e],zn=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&void 0!==e[n][t]?e[n]=e[n][t]:"object"==typeof e[n]&&null!==e[n]&&(e[n]=zn(e[n]));return e},Fn=e=>null!=e,Un=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};Un.prototype=Object.create(String.prototype,{constructor:{value:Un,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(Un,String);class Bn{trace(){}debug(){}info(){}warn(){}error(){}}function Hn(e,t,n){let i,r,o;if(void 0===t&&void 0===n)i={},o=e;else{if(i=e,"function"==typeof t)return r=t,o=n,Vn(i,r,o);o=t}for(const e of Object.keys(o))Array.isArray(o[e])?Gn(i,null,o,e):i[e]=o[e];return i}const qn=(e,t)=>{const n={};for(const i in t)Gn(n,e,t,i);return n},Vn=(e,t,n)=>Hn(e,Object.entries(n).reduce(((e,[n,i])=>(Array.isArray(i)?e[n]=i:e[n]="function"==typeof i?[t,i()]:[t,i],e)),{})),Gn=(e,t,n,i)=>{if(null!==t){let r=n[i];"function"==typeof r&&(r=[,r]);const[o=Wn,s=Kn,a=i]=r;return void(("function"==typeof o&&o(t[a])||"function"!=typeof o&&o)&&(e[i]=s(t[a])))}let[r,o]=n[i];if("function"==typeof o){let t;const n=void 0===r&&null!=(t=o()),s="function"==typeof r&&!!r(void 0)||"function"!=typeof r&&!!r;n?e[i]=t:s&&(e[i]=o())}else{const t=void 0===r&&null!=o,n="function"==typeof r&&!!r(o)||"function"!=typeof r&&!!r;(t||n)&&(e[i]=o)}},Wn=e=>null!=e,Kn=e=>e,Yn=e=>e.toISOString().replace(".000Z","Z"),Qn=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(Qn);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=Qn(e[n]));return t}return e},Jn=(e,t)=>ve(e,t).then((e=>t.utf8Encoder(e))),Xn=async(e,t)=>{const n=await((e,t)=>Jn(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})))(e,t);return n.message=n.message??n.Message,n};var Zn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ei(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ti(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),n}var ni,ii,ri={},oi={};function si(){return ni||(ni=1,function(e){const t=":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="["+t+"]["+(t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",i=new RegExp("^"+n+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,n){if(t){const i=Object.keys(t),r=i.length;for(let o=0;o<r;o++)e[i[o]]="strict"===n?[t[i[o]]]:t[i[o]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=i.exec(e);return!(null==t)},e.getAllMatches=function(e,t){const n=[];let i=t.exec(e);for(;i;){const r=[];r.startIndex=t.lastIndex-i[0].length;const o=i.length;for(let e=0;e<o;e++)r.push(i[e]);n.push(r),i=t.exec(e)}return n},e.nameRegexp=n}(oi)),oi}function ai(){if(ii)return ri;ii=1;const e=si(),t={allowBooleanAttributes:!1,unpairedTags:[]};function n(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function i(e,t){const n=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const i=e.substr(n,t-n);if(t>5&&"xml"===i)return p("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function r(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&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}ri.validate=function(o,s){s=Object.assign({},t,s);const c=[];let d=!1,h=!1;"\ufeff"===o[0]&&(o=o.substr(1));for(let t=0;t<o.length;t++)if("<"===o[t]&&"?"===o[t+1]){if(t+=2,t=i(o,t),t.err)return t}else{if("<"!==o[t]){if(n(o[t]))continue;return p("InvalidChar","char '"+o[t]+"' is not expected.",m(o,t))}{let g=t;if(t++,"!"===o[t]){t=r(o,t);continue}{let y=!1;"/"===o[t]&&(y=!0,t++);let v="";for(;t<o.length&&">"!==o[t]&&" "!==o[t]&&"\t"!==o[t]&&"\n"!==o[t]&&"\r"!==o[t];t++)v+=o[t];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),t--),f=v,!e.isName(f)){let e;return e=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",p("InvalidTag",e,m(o,t))}const b=a(o,t);if(!1===b)return p("InvalidAttr","Attributes for '"+v+"' have open quote.",m(o,t));let x=b.value;if(t=b.index,"/"===x[x.length-1]){const e=t-x.length;x=x.substring(0,x.length-1);const n=l(x,s);if(!0!==n)return p(n.err.code,n.err.msg,m(o,e+n.err.line));d=!0}else if(y){if(!b.tagClosed)return p("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",m(o,t));if(x.trim().length>0)return p("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",m(o,g));if(0===c.length)return p("InvalidTag","Closing tag '"+v+"' has not been opened.",m(o,g));{const e=c.pop();if(v!==e.tagName){let t=m(o,e.tagStartPos);return p("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+t.line+", col "+t.col+") instead of closing tag '"+v+"'.",m(o,g))}0==c.length&&(h=!0)}}else{const e=l(x,s);if(!0!==e)return p(e.err.code,e.err.msg,m(o,t-x.length+e.err.line));if(!0===h)return p("InvalidXml","Multiple possible root nodes found.",m(o,t));-1!==s.unpairedTags.indexOf(v)||c.push({tagName:v,tagStartPos:g}),d=!0}for(t++;t<o.length;t++)if("<"===o[t]){if("!"===o[t+1]){t++,t=r(o,t);continue}if("?"!==o[t+1])break;if(t=i(o,++t),t.err)return t}else if("&"===o[t]){const e=u(o,t);if(-1==e)return p("InvalidChar","char '&' is not expected.",m(o,t));t=e}else if(!0===h&&!n(o[t]))return p("InvalidXml","Extra text at the end",m(o,t));"<"===o[t]&&t--}}}var f;return d?1==c.length?p("InvalidTag","Unclosed tag '"+c[0].tagName+"'.",m(o,c[0].tagStartPos)):!(c.length>0)||p("InvalidXml","Invalid '"+JSON.stringify(c.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):p("InvalidXml","Start tag expected.",1)};const o='"',s="'";function a(e,t){let n="",i="",r=!1;for(;t<e.length;t++){if(e[t]===o||e[t]===s)""===i?i=e[t]:i!==e[t]||(i="");else if(">"===e[t]&&""===i){r=!0;break}n+=e[t]}return""===i&&{value:n,index:t,tagClosed:r}}const c=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function l(t,n){const i=e.getAllMatches(t,c),r={};for(let e=0;e<i.length;e++){if(0===i[e][1].length)return p("InvalidAttr","Attribute '"+i[e][2]+"' has no space in starting.",h(i[e]));if(void 0!==i[e][3]&&void 0===i[e][4])return p("InvalidAttr","Attribute '"+i[e][2]+"' is without value.",h(i[e]));if(void 0===i[e][3]&&!n.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+i[e][2]+"' is not allowed.",h(i[e]));const t=i[e][2];if(!d(t))return p("InvalidAttr","Attribute '"+t+"' is an invalid name.",h(i[e]));if(r.hasOwnProperty(t))return p("InvalidAttr","Attribute '"+t+"' is repeated.",h(i[e]));r[t]=1}return!0}function u(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function p(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function d(t){return e.isName(t)}function m(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function h(e){return e.startIndex+e[1].length}return ri}var ci,li,ui,pi,di,mi,hi,fi,gi,yi={};function vi(){if(ui)return li;ui=1;return li=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}}function bi(){if(gi)return fi;gi=1;const e=si(),t=vi(),n=function(){if(di)return pi;di=1;const e=si();function t(e,t){let n="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)n+=e[t];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const i=e[t++];let r="";for(;t<e.length&&e[t]!==i;t++)r+=e[t];return[n,r,t]}function n(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function i(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function r(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function o(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function s(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function a(t){if(e.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}return pi=function(e,c){const l={};if("O"!==e[c+3]||"C"!==e[c+4]||"T"!==e[c+5]||"Y"!==e[c+6]||"P"!==e[c+7]||"E"!==e[c+8])throw new Error("Invalid Tag instead of DOCTYPE");{c+=9;let u=1,p=!1,d=!1,m="";for(;c<e.length;c++)if("<"!==e[c]||d)if(">"===e[c]){if(d?"-"===e[c-1]&&"-"===e[c-2]&&(d=!1,u--):u--,0===u)break}else"["===e[c]?p=!0:m+=e[c];else{if(p&&i(e,c))c+=7,[entityName,val,c]=t(e,c+1),-1===val.indexOf("&")&&(l[a(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(p&&r(e,c))c+=8;else if(p&&o(e,c))c+=8;else if(p&&s(e,c))c+=9;else{if(!n)throw new Error("Invalid DOCTYPE");d=!0}u++,m=""}if(0!==u)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:c}},pi}(),i=function(){if(hi)return mi;hi=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(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);const n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};return mi=function(i,r={}){if(r=Object.assign({},n,r),!i||"string"!=typeof i)return i;let o=i.trim();if(void 0!==r.skipLike&&r.skipLike.test(o))return i;if(r.hex&&e.test(o))return Number.parseInt(o,16);{const e=t.exec(o);if(e){const t=e[1],n=e[2];let a=(s=e[3])&&-1!==s.indexOf(".")?("."===(s=s.replace(/0+$/,""))?s="0":"."===s[0]?s="0"+s:"."===s[s.length-1]&&(s=s.substr(0,s.length-1)),s):s;const c=e[4]||e[6];if(!r.leadingZeros&&n.length>0&&t&&"."!==o[2])return i;if(!r.leadingZeros&&n.length>0&&!t&&"."!==o[1])return i;{const e=Number(o),s=""+e;return-1!==s.search(/[eE]/)||c?r.eNotation?e:i:-1!==o.indexOf(".")?"0"===s&&""===a||s===a||t&&s==="-"+a?e:i:n?a===s||t+a===s?e:i:o===s||o===t+s?e:i}}return i}var s},mi}();function r(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const i=t[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:e[i]}}}function o(e,t,n,i,r,o,s){if(void 0!==e&&(this.options.trimValues&&!i&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const i=this.options.tagValueProcessor(t,e,n,r,o);if(null==i)return e;if(typeof i!=typeof e||i!==e)return i;if(this.options.trimValues)return y(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?y(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function s(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const a=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function c(t,n,i){if(!this.options.ignoreAttributes&&"string"==typeof t){const i=e.getAllMatches(t,a),r=i.length,o={};for(let e=0;e<r;e++){const t=this.resolveNameSpace(i[e][1]);let r=i[e][4],s=this.options.attributeNamePrefix+t;if(t.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==r){this.options.trimValues&&(r=r.trim()),r=this.replaceEntitiesValue(r);const e=this.options.attributeValueProcessor(t,r,n);o[s]=null==e?r:typeof e!=typeof r||e!==r?e:y(r,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const l=function(e){e=e.replace(/\r\n?/g,"\n");const i=new t("!xml");let r=i,o="",s="";for(let a=0;a<e.length;a++){if("<"===e[a])if("/"===e[a+1]){const t=h(e,">",a,"Closing Tag is not closed.");let n=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=n.indexOf(":");-1!==e&&(n=n.substr(e+1))}this.options.transformTagName&&(n=this.options.transformTagName(n)),r&&(o=this.saveTextToParentTag(o,r,s));const i=s.substring(s.lastIndexOf(".")+1);if(n&&-1!==this.options.unpairedTags.indexOf(n))throw new Error(`Unpaired tag can not be used as closing tag: </${n}>`);let c=0;i&&-1!==this.options.unpairedTags.indexOf(i)?(c=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=s.lastIndexOf("."),s=s.substring(0,c),r=this.tagsNodeStack.pop(),o="",a=t}else if("?"===e[a+1]){let n=f(e,a,!1,"?>");if(!n)throw new Error("Pi Tag is not closed.");if(o=this.saveTextToParentTag(o,r,s),this.options.ignoreDeclaration&&"?xml"===n.tagName||this.options.ignorePiTags);else{const e=new t(n.tagName);e.add(this.options.textNodeName,""),n.tagName!==n.tagExp&&n.attrExpPresent&&(e[":@"]=this.buildAttributesMap(n.tagExp,s,n.tagName)),this.addChild(r,e,s)}a=n.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=h(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const n=e.substring(a+4,t-2);o=this.saveTextToParentTag(o,r,s),r.add(this.options.commentPropName,[{[this.options.textNodeName]:n}])}a=t}else if("!D"===e.substr(a+1,2)){const t=n(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=h(e,"]]>",a,"CDATA is not closed.")-2,n=e.substring(a+9,t);o=this.saveTextToParentTag(o,r,s);let i=this.parseTextData(n,r.tagname,s,!0,!1,!0,!0);null==i&&(i=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:n}]):r.add(this.options.textNodeName,i),a=t+2}else{let n=f(e,a,this.options.removeNSPrefix),c=n.tagName;const l=n.rawTagName;let u=n.tagExp,p=n.attrExpPresent,d=n.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&o&&"!xml"!==r.tagname&&(o=this.saveTextToParentTag(o,r,s,!1));const m=r;if(m&&-1!==this.options.unpairedTags.indexOf(m.tagname)&&(r=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),c!==i.tagname&&(s+=s?"."+c:c),this.isItStopNode(this.options.stopNodes,s,c)){let i="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),u=c):u=u.substr(0,u.length-1),a=n.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=n.closeIndex;else{const t=this.readStopNodeData(e,l,d+1);if(!t)throw new Error(`Unexpected end of ${l}`);a=t.i,i=t.tagContent}const o=new t(c);c!==u&&p&&(o[":@"]=this.buildAttributesMap(u,s,c)),i&&(i=this.parseTextData(i,c,s,!0,p,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),o.add(this.options.textNodeName,i),this.addChild(r,o,s)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new t(c);c!==u&&p&&(e[":@"]=this.buildAttributesMap(u,s,c)),this.addChild(r,e,s),s=s.substr(0,s.lastIndexOf("."))}else{const e=new t(c);this.tagsNodeStack.push(r),c!==u&&p&&(e[":@"]=this.buildAttributesMap(u,s,c)),this.addChild(r,e,s),r=e}o="",a=d}}else o+=e[a]}return i.child};function u(e,t,n){const i=this.options.updateTag(t.tagname,n,t[":@"]);!1===i||("string"==typeof i?(t.tagname=i,e.addChild(t)):e.addChild(t))}const p=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function d(e,t,n,i){return e&&(void 0===i&&(i=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,i))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function m(e,t,n){const i="*."+n;for(const n in e){const r=e[n];if(i===r||t===r)return!0}return!1}function h(e,t,n,i){const r=e.indexOf(t,n);if(-1===r)throw new Error(i);return r+t.length-1}function f(e,t,n,i=">"){const r=function(e,t,n=">"){let i,r="";for(let o=t;o<e.length;o++){let t=e[o];if(i)t===i&&(i="");else if('"'===t||"'"===t)i=t;else if(t===n[0]){if(!n[1])return{data:r,index:o};if(e[o+1]===n[1])return{data:r,index:o}}else"\t"===t&&(t=" ");r+=t}}(e,t+1,i);if(!r)return;let o=r.data;const s=r.index,a=o.search(/\s/);let c=o,l=!0;-1!==a&&(c=o.substring(0,a),o=o.substring(a+1).trimStart());const u=c;if(n){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),l=c!==r.data.substr(e+1))}return{tagName:c,tagExp:o,closeIndex:s,attrExpPresent:l,rawTagName:u}}function g(e,t,n){const i=n;let r=1;for(;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){const o=h(e,">",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(r--,0===r))return{tagContent:e.substring(i,n),i:o};n=o}else if("?"===e[n+1]){n=h(e,"?>",n+1,"StopNode is not closed.")}else if("!--"===e.substr(n+1,3)){n=h(e,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===e.substr(n+1,2)){n=h(e,"]]>",n,"StopNode is not closed.")-2}else{const i=f(e,n,">");if(i){(i&&i.tagName)===t&&"/"!==i.tagExp[i.tagExp.length-1]&&r++,n=i.closeIndex}}}function y(t,n,r){if(n&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&i(t,r)}return e.isExist(t)?t:""}return fi=class{constructor(e){this.options=e,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:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=r,this.parseXml=l,this.parseTextData=o,this.resolveNameSpace=s,this.buildAttributesMap=c,this.isItStopNode=m,this.replaceEntitiesValue=p,this.readStopNodeData=g,this.saveTextToParentTag=d,this.addChild=u}}}var xi,wi,Ei,Si,_i,Oi,Ci,ki,Ti,Pi={};function Ai(){if(xi)return Pi;function e(r,o,s){let a;const c={};for(let l=0;l<r.length;l++){const u=r[l],p=t(u);let d="";if(d=void 0===s?p:s+"."+p,p===o.textNodeName)void 0===a?a=u[p]:a+=""+u[p];else{if(void 0===p)continue;if(u[p]){let t=e(u[p],o,d);const r=i(t,o);u[":@"]?n(t,u[":@"],d,o):1!==Object.keys(t).length||void 0===t[o.textNodeName]||o.alwaysCreateTextNode?0===Object.keys(t).length&&(o.alwaysCreateTextNode?t[o.textNodeName]="":t=""):t=t[o.textNodeName],void 0!==c[p]&&c.hasOwnProperty(p)?(Array.isArray(c[p])||(c[p]=[c[p]]),c[p].push(t)):o.isArray(p,d,r)?c[p]=[t]:c[p]=t}}}return"string"==typeof a?a.length>0&&(c[o.textNodeName]=a):void 0!==a&&(c[o.textNodeName]=a),c}function t(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function n(e,t,n,i){if(t){const r=Object.keys(t),o=r.length;for(let s=0;s<o;s++){const o=r[s];i.isArray(o,n+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function i(e,t){const{textNodeName:n}=t,i=Object.keys(e).length;return 0===i||!(1!==i||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n])}return xi=1,Pi.prettify=function(t,n){return e(t,n)},Pi}function Ii(){if(Ei)return wi;Ei=1;const{buildOptions:e}=function(){if(ci)return yi;ci=1;const e={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,n){return e}};return yi.buildOptions=function(t){return Object.assign({},e,t)},yi.defaultOptions=e,yi}(),t=bi(),{prettify:n}=Ai(),i=ai();return wi=class{constructor(t){this.externalEntities={},this.options=e(t)}parse(e,r){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(r){!0===r&&(r={});const t=i.validate(e,r);if(!0!==t)throw Error(`${t.err.msg}:${t.err.line}:${t.err.col}`)}const o=new t(this.options);o.addExternalEntities(this.externalEntities);const s=o.parseXml(e);return this.options.preserveOrder||void 0===s?s:n(s,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}}function Ri(){if(_i)return Si;_i=1;function e(o,s,a,c){let l="",u=!1;for(let p=0;p<o.length;p++){const d=o[p],m=t(d);if(void 0===m)continue;let h="";if(h=0===a.length?m:`${a}.${m}`,m===s.textNodeName){let e=d[m];i(h,s)||(e=s.tagValueProcessor(m,e),e=r(e,s)),u&&(l+=c),l+=e,u=!1;continue}if(m===s.cdataPropName){u&&(l+=c),l+=`<![CDATA[${d[m][0][s.textNodeName]}]]>`,u=!1;continue}if(m===s.commentPropName){l+=c+`\x3c!--${d[m][0][s.textNodeName]}--\x3e`,u=!0;continue}if("?"===m[0]){const e=n(d[":@"],s),t="?xml"===m?"":c;let i=d[m][0][s.textNodeName];i=0!==i.length?" "+i:"",l+=t+`<${m}${i}${e}?>`,u=!0;continue}let f=c;""!==f&&(f+=s.indentBy);const g=c+`<${m}${n(d[":@"],s)}`,y=e(d[m],s,h,f);-1!==s.unpairedTags.indexOf(m)?s.suppressUnpairedNode?l+=g+">":l+=g+"/>":y&&0!==y.length||!s.suppressEmptyNode?y&&y.endsWith(">")?l+=g+`>${y}${c}</${m}>`:(l+=g+">",y&&""!==c&&(y.includes("/>")||y.includes("</"))?l+=c+s.indentBy+y+c:l+=y,l+=`</${m}>`):l+=g+"/>",u=!0}return l}function t(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const i=t[n];if(e.hasOwnProperty(i)&&":@"!==i)return i}}function n(e,t){let n="";if(e&&!t.ignoreAttributes)for(let i in e){if(!e.hasOwnProperty(i))continue;let o=t.attributeValueProcessor(i,e[i]);o=r(o,t),!0===o&&t.suppressBooleanAttributes?n+=` ${i.substr(t.attributeNamePrefix.length)}`:n+=` ${i.substr(t.attributeNamePrefix.length)}="${o}"`}return n}function i(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let i in t.stopNodes)if(t.stopNodes[i]===e||t.stopNodes[i]==="*."+n)return!0;return!1}function r(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const i=t.entities[n];e=e.replace(i.regex,i.val)}return e}return Si=function(t,n){let i="";return n.format&&n.indentBy.length>0&&(i="\n"),e(t,n,"",i)}}var Mi=function(){if(Ti)return ki;Ti=1;const e=ai(),t=Ii(),n=function(){if(Ci)return Oi;Ci=1;const e=Ri(),t={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 n(e){this.options=Object.assign({},t,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=o),this.processTextOrObjNode=i,this.options.format?(this.indentate=r,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function i(e,t,n){const i=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,n):this.buildObjectNode(i.val,t,i.attrStr,n)}function r(e){return this.options.indentBy.repeat(e)}function o(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}return n.prototype.build=function(t){return this.options.preserveOrder?e(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},n.prototype.j2x=function(e,t){let n="",i="";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r))if(void 0===e[r])this.isAttribute(r)&&(i+="");else if(null===e[r])this.isAttribute(r)?i+="":"?"===r[0]?i+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if(e[r]instanceof Date)i+=this.buildTextValNode(e[r],r,"",t);else if("object"!=typeof e[r]){const o=this.isAttribute(r);if(o)n+=this.buildAttrPairStr(o,""+e[r]);else if(r===this.options.textNodeName){let t=this.options.tagValueProcessor(r,""+e[r]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[r],r,"",t)}else if(Array.isArray(e[r])){const n=e[r].length;let o="",s="";for(let a=0;a<n;a++){const n=e[r][a];if(void 0===n);else if(null===n)"?"===r[0]?i+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const e=this.j2x(n,t+1);o+=e.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else o+=this.processTextOrObjNode(n,r,t);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(r,n);e=this.replaceEntitiesValue(e),o+=e}else o+=this.buildTextValNode(n,r,"",t)}this.options.oneListGroup&&(o=this.buildObjectNode(o,r,s,t)),i+=o}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const t=Object.keys(e[r]),i=t.length;for(let o=0;o<i;o++)n+=this.buildAttrPairStr(t[o],""+e[r][t[o]])}else i+=this.processTextOrObjNode(e[r],r,t);return{attrStr:n,val:i}},n.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},n.prototype.buildObjectNode=function(e,t,n,i){if(""===e)return"?"===t[0]?this.indentate(i)+"<"+t+n+"?"+this.tagEndChar:this.indentate(i)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let r="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",r=""),!n&&""!==n||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(i)+"<"+t+n+o+this.tagEndChar+e+this.indentate(i)+r:this.indentate(i)+"<"+t+n+o+">"+e+r}},n.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},n.prototype.buildTextValNode=function(e,t,n,i){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(i)+"<"+t+n+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(t,e);return r=this.replaceEntitiesValue(r),""===r?this.indentate(i)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+n+">"+r+"</"+t+this.tagEndChar}},n.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e},Oi=n}();return ki={XMLParser:t,XMLValidator:e,XMLBuilder:n}}();const ji=(e,t)=>Jn(e,t).then((e=>{if(e.length){const t=new Mi.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});let n;t.addEntity("#xD","\r"),t.addEntity("#10","\n");try{n=t.parse(e,!0)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const i="#text",r=Object.keys(n)[0],o=n[r];return o[i]&&(o[r]=o[i],delete o[i]),zn(o)}return{}})),$i=async(e,t)=>{const n=await ji(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},Ni=/\d{12}\.ddb/;const Di="user-agent",Li="x-amz-user-agent",zi=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Fi=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Ui=e=>(t,n)=>async i=>{const{request:r}=i;if(!T.isInstance(r))return t(i);const{headers:o}=r,s=n?.userAgent?.map(Bi)||[],a=(await e.defaultUserAgentProvider()).map(Bi);await async function(e,t,n){const i=n.request;if("rpc-v2-cbor"===i?.headers?.["smithy-protocol"]&&it(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?it(e,"RETRY_MODE_ADAPTIVE","F"):it(e,"RETRY_MODE_STANDARD","E"):it(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Ni)&&it(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":it(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":it(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":it(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const t=r;t.accountId&&it(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))it(e,n,i)}}(n,e,i);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const i=e[n];if(!(t.length+i.length+1<=1024))break;t.length?t+=","+i:t+=i}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(Bi)||[],u=await e.userAgentAppId();u&&a.push(Bi([`app/${u}`]));const p=[].concat([...a,...s,...l]).join(" "),d=[...a.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(d&&(o[Li]=o[Li]?`${o[Di]} ${d}`:d),o[Di]=p):o[Li]=p,t({...i,request:r})},Bi=e=>{const t=e[0].split("/").map((e=>e.replace(zi,"-"))).join("/"),n=e[1]?.replace(Fi,"-"),i=t.indexOf("/"),r=t.substring(0,i);let o=t.substring(i+1);return"api"===r&&(o=o.toLowerCase()),[r,o,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},Hi={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},qi=e=>({applyToStack:t=>{t.add(Ui(e),Hi)}});var Vi;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Vi||(Vi={}));const Gi=!1,Wi=!1,Ki=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Yi=e=>Ki(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Qi=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return Yi(t);const e=await t();return Yi(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Ki(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}},Ji="content-length";const Xi={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Zi=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const i=t.request;if(T.isInstance(i)){const{body:e,headers:t}=i;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Ji))try{const t=n(e);i.headers={...i.headers,[Ji]:String(t)}}catch(e){}}return e({...t,request:i})}),Xi)}}),er=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,tr=/(\d+\.){3}\d+/,nr=/\.\./,ir=e=>er.test(e)&&!tr.test(e)&&!nr.test(e),rr=e=>{const[t,n,i,,,r]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&n&&i&&r);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},or=(e,t,n)=>{const i=async()=>{const i=n[e]??n[t];return"function"==typeof i?i():i};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await i();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:i,path:r}=e;return`${t}//${n}${i?":"+i:""}${r}`}}return e}:i},sr=async e=>{};const ar=e=>{if("string"==typeof e)return ar(new URL(e));const{hostname:t,pathname:n,port:i,protocol:r,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,i=null]=n.split("=");e=decodeURIComponent(e),i&&(i=decodeURIComponent(i)),e in t?Array.isArray(t[e])?t[e].push(i):t[e]=[t[e],i]:t[e]=i}return t}(o)),{hostname:t,port:i?parseInt(i):void 0,protocol:r,path:n,query:s}},cr=e=>"object"==typeof e?"url"in e?ar(e.url):e:ar(e),lr=async(e,t,n)=>{const i={},r=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(r))switch(o.type){case"staticContextParams":i[t]=o.value;break;case"contextParams":i[t]=e[o.name];break;case"clientContextParams":case"builtInParams":i[t]=await or(o.name,t,n)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(r).length&&Object.assign(i,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),rr(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!ir(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(i),i},ur=({config:e,instructions:t})=>(n,i)=>async r=>{e.endpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(i,"ENDPOINT_OVERRIDE","N");const o=await(async(e,t,n,i)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await sr(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(cr(e)))}const r=await lr(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(r,i)})(r.input,{getEndpointParameterInstructions:()=>t},{...e},i);i.endpointV2=o,i.authSchemes=o.properties?.authSchemes;const s=i.authSchemes?.[0];if(s){i.signing_region=s.signingRegion,i.signing_service=s.signingName;const e=D(i),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return n({...r})},pr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:H.name},dr=(e,t)=>({applyToStack:n=>{n.addRelativeTo(ur({config:e,instructions:t}),pr)}}),mr=e=>{const t=e.tls??!0,{endpoint:n}=e,i=null!=n?async()=>cr(await L(n)()):void 0,r=!!n,o={...e,endpoint:i,tls:t,isCustomEndpoint:r,useDualstackEndpoint:L(e.useDualstackEndpoint??!1),useFipsEndpoint:L(e.useFipsEndpoint??!1)};let s;return o.serviceConfiguredEndpoint=async()=>(e.serviceId&&!s&&(s=sr(e.serviceId)),s),o};var hr;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(hr||(hr={}));const fr=hr.STANDARD,gr=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],yr=["TimeoutError","RequestTimeout","RequestTimeoutException"],vr=[500,502,503,504],br=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],xr=e=>429===e.$metadata?.httpStatusCode||gr.includes(e.name)||1==e.$retryable?.throttling,wr=e=>(e=>e.$metadata?.clockSkewCorrected)(e)||yr.includes(e.name)||br.includes(e?.code||"")||vr.includes(e.$metadata?.httpStatusCode||0);class Er{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>setTimeout(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),xr(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const Sr=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class _r{constructor(e){this.maxAttempts=e,this.mode=hr.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Sr({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:100);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),r=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,i):i,o=this.getCapacityCost(n);return this.capacity-=o,Sr({retryDelay:r,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Or{constructor(e,t){this.maxAttemptsProvider=e,this.mode=hr.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Er,this.standardRetryStrategy=new _r(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let Cr;const kr=new Uint8Array(16);function Tr(){if(!Cr&&(Cr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cr(kr)}const Pr=[];for(let e=0;e<256;++e)Pr.push((e+256).toString(16).slice(1));var Ar={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ir(e,t,n){if(Ar.randomUUID&&!t&&!e)return Ar.randomUUID();const i=(e=e||{}).random||(e.rng||Tr)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return Pr[e[t+0]]+Pr[e[t+1]]+Pr[e[t+2]]+Pr[e[t+3]]+"-"+Pr[e[t+4]]+Pr[e[t+5]]+"-"+Pr[e[t+6]]+Pr[e[t+7]]+"-"+Pr[e[t+8]]+Pr[e[t+9]]+"-"+Pr[e[t+10]]+Pr[e[t+11]]+Pr[e[t+12]]+Pr[e[t+13]]+Pr[e[t+14]]+Pr[e[t+15]]}(i)}const Rr=e=>{const{retryStrategy:t}=e,n=L(e.maxAttempts??3);return{...e,maxAttempts:n,retryStrategy:async()=>{if(t)return t;return await L(e.retryMode)()===hr.ADAPTIVE?new Or(n):new _r(n)}}},Mr=e=>e?.body instanceof ReadableStream,jr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,$r=e=>{const t={error:e,errorType:Nr(e)},n=zr(e.$response);return n&&(t.retryAfterHint=n),t},Nr=e=>xr(e)?"THROTTLING":wr(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!wr(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Dr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Lr=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async i=>{let r=await e.retryStrategy();const o=await e.maxAttempts();if(!jr(r))return r?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",r.mode]]),r.retry(t,i);{let e=await r.acquireInitialRetryToken(n.partition_id),a=new Error,c=0,l=0;const{request:u}=i,p=T.isInstance(u);for(p&&(u.headers["amz-sdk-invocation-id"]=Ir());;)try{p&&(u.headers["amz-sdk-request"]=`attempt=${c+1}; max=${o}`);const{response:n,output:s}=await t(i);return r.recordSuccess(e),s.$metadata.attempts=c+1,s.$metadata.totalRetryDelay=l,{response:n,output:s}}catch(t){const i=$r(t);if(a=(s=t)instanceof Error?s:s instanceof Object?Object.assign(new Error,s):"string"==typeof s?new Error(s):new Error(`AWS SDK error wrapper for ${s}`),p&&Mr(u))throw(n.logger instanceof Bn?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{e=await r.refreshRetryTokenForRetry(e,i)}catch(e){throw a.$metadata||(a.$metadata={}),a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=l,a}c=e.getRetryCount();const o=e.getRetryDelay();l+=o,await new Promise((e=>setTimeout(e,o)))}}var s})(e),Dr)}}),zr=e=>{if(!P.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],i=Number(n);if(!Number.isNaN(i))return new Date(1e3*i);return new Date(n)},Fr=async(e,t,n)=>({operation:D(t).operation,region:await L(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Ur=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"lambda",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Br={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Hr="3.688.0";var qr="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Vr(e){return e instanceof Uint8Array?e:"string"==typeof e?qr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Gr(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Wr={name:"SHA-256"},Kr={name:"HMAC",hash:Wr},Yr=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]);const Qr={};function Jr(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Qr}var Xr=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Gr(e)){var t=Vr(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return Jr().crypto.subtle.sign(Kr,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Gr(this.toHash)?Promise.resolve(Yr):Promise.resolve().then((function(){return Jr().crypto.subtle.digest(Wr,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,n){Jr().crypto.subtle.importKey("raw",Vr(e.secret),Kr,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}();function Zr(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))}function eo(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}"function"==typeof SuppressedError&&SuppressedError;var to=64,no=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]),io=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ro=Math.pow(2,53)-1,oo=function(){function e(){this.state=Int32Array.from(io),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>ro)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===to&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%to>=56){for(var i=this.bufferLength;i<to;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<56;i++)t.setUint8(i,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var r=new Uint8Array(32);for(i=0;i<8;i++)r[4*i]=this.state[i]>>>24&255,r[4*i+1]=this.state[i]>>>16&255,r[4*i+2]=this.state[i]>>>8&255,r[4*i+3]=this.state[i]>>>0&255;return r},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],c=t[6],l=t[7],u=0;u<to;u++){if(u<16)this.temp[u]=(255&e[4*u])<<24|(255&e[4*u+1])<<16|(255&e[4*u+2])<<8|255&e[4*u+3];else{var p=this.temp[u-2],d=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,m=((p=this.temp[u-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[u]=(d+this.temp[u-7]|0)+(m+this.temp[u-16]|0)}var h=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&a^~s&c)|0)+(l+(no[u]+this.temp[u]|0)|0)|0,f=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&r^i&r)|0;l=c,c=a,a=s,s=o+h|0,o=r,r=i,i=n,n=h+f|0}t[0]+=n,t[1]+=i,t[2]+=r,t[3]+=o,t[4]+=s,t[5]+=a,t[6]+=c,t[7]+=l},e}(),so=function(){function e(e){this.secret=e,this.hash=new oo,this.reset()}return e.prototype.update=function(e){if(!Gr(e)&&!this.error)try{this.hash.update(Vr(e))}catch(e){this.error=e}},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 Zr(this,void 0,void 0,(function(){return eo(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new oo,this.secret){this.outer=new oo;var e=function(e){var t=Vr(e);if(t.byteLength>to){var n=new oo;n.update(t),t=n.digest()}var i=new Uint8Array(to);return i.set(t),i}(this.secret),t=new Uint8Array(to);t.set(e);for(var n=0;n<to;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var ao=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function co(e){return!(!function(e){if("object"==typeof e&&"object"==typeof e.crypto){return"function"==typeof e.crypto.getRandomValues}return!1}(e)||"object"!=typeof e.crypto.subtle)&&function(e){return e&&ao.every((function(t){return"function"==typeof e[t]}))}(e.crypto.subtle)}var lo,uo=function(){function e(e){co(Jr())?this.hash=new Xr(e):this.hash=new so(e)}return e.prototype.update=function(e,t){this.hash.update(Vr(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),po={exports:{}};var mo=(lo||(lo=1,function(e){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=n(18),r=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,i){void 0===i&&(i=!1);var r=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(r,o),a=0,c=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),i=t+new Array(n+1).join(".0");return e.map(i.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(i&&(a=s-Math.min(r,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)i.push(t(e[n]));return i},e.find=function(e,t){var n,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,i=e.length;n<i;n+=1){var r=e[n];if(t(r,n))return r}},e.assign=function(e){for(var t,n,i=e,r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){i[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=r,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(91))&&i.__esModule?i:{default:i},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=function(){function e(){}var t,n,i;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new r.default(e,t)},e.parse=function(e){return new r.default(e).getResult()},t=e,i=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),i&&s(t,i),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=c(n(92)),r=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},i=0,r={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(r[t]=s,o+=1):"object"==typeof s&&(n[t]=s,i+=1)})),i>0){var s=Object.keys(n),c=a.default.find(s,(function(e){return t.isOS(e)}));if(c){var l=this.satisfies(n[c]);if(void 0!==l)return l}var u=a.default.find(s,(function(e){return t.isPlatform(e)}));if(u){var p=this.satisfies(n[u]);if(void 0!==p)return p}}if(o>0){var d=Object.keys(r),m=a.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(r[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),r=a.default.getBrowserTypeByAlias(i);return t&&r&&(i=r.toLowerCase()),i===n},t.compareVersion=function(e){var t=[0],n=e,i=!1,r=this.getBrowserVersion();if("string"==typeof r)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(i=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(i=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(r,n,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=l,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=r.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=r.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=r.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=r.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=r.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=r.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=r.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=r.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=r.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=r.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=r.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=r.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=r.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=r.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=r.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=r.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=r.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=r.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=r.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=r.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=r.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=r.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=r.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=r.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=r.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=r.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=r.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:r.default.getFirstMatch(t,e),version:r.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=r.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=r.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=r.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=r.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=r.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=r.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=r.default.getMacOSVersionName(t),i={name:o.OS_MAP.MacOS,version:t};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=r.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=r.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=r.default.getAndroidVersionName(t),i={name:o.OS_MAP.Android,version:t};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=r.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=r.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||r.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||r.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=r.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=r.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=r.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=r.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=r.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=r.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=r.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=r.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=r.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=r.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})}(po)),po.exports),ho=ei(mo);const fo=({serviceId:e,clientVersion:t})=>async n=>{const i="undefined"!=typeof window&&window?.navigator?.userAgent?ho.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.1"],[`os/${i?.os?.name||"other"}`,i?.os?.version],["lang/js"],["md/browser",`${i?.browser?.name??"unknown"}_${i?.browser?.version??"unknown"}`]];e&&r.push([`api/${e}`,t]);const o=await(n?.userAgentAppId?.());return o&&r.push([`app/${o}`]),r};var go,yo=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),r=i.next();!r.done;r=i.next()){var o=r.value;this.checksum=this.checksum>>>8^vo[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),vo=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([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]);class bo{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(e));n>-1&&i>0;n--,i/=256)t[n]=i;return e<0&&xo(t),new bo(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&xo(e),parseInt(ye(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function xo(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class wo{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const i=this.fromUtf8(n);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let i=0;for(const e of t)n.set(e,i),i+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const r=new DataView(new ArrayBuffer(3+e.value.byteLength));r.setUint8(0,6),r.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(r.buffer);return o.set(e.value,3),o;case"string":const s=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(bo.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!Io.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(ge(e.value.replace(/\-/g,"")),1),u}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const i=e.getUint8(n++),r=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,i));switch(n+=i,e.getUint8(n++)){case 0:t[r]={type:Eo,value:!0};break;case 1:t[r]={type:Eo,value:!1};break;case 2:t[r]={type:So,value:e.getInt8(n++)};break;case 3:t[r]={type:_o,value:e.getInt16(n,!1)},n+=2;break;case 4:t[r]={type:Oo,value:e.getInt32(n,!1)},n+=4;break;case 5:t[r]={type:Co,value:new bo(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const i=e.getUint16(n,!1);n+=2,t[r]={type:ko,value:new Uint8Array(e.buffer,e.byteOffset+n,i)},n+=i;break;case 7:const o=e.getUint16(n,!1);n+=2,t[r]={type:To,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,o))},n+=o;break;case 8:t[r]={type:Po,value:new Date(new bo(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const s=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[r]={type:Ao,value:`${ye(s.subarray(0,4))}-${ye(s.subarray(4,6))}-${ye(s.subarray(6,8))}-${ye(s.subarray(8,10))}-${ye(s.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!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"}(go||(go={}));const Eo="boolean",So="byte",_o="short",Oo="integer",Co="long",ko="binary",To="string",Po="timestamp",Ao="uuid",Io=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ro{constructor(e,t){this.headerMarshaller=new wo(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),i=n.byteLength+t.byteLength+16,r=new Uint8Array(i),o=new DataView(r.buffer,r.byteOffset,r.byteLength),s=new yo;return o.setUint32(0,i,!1),o.setUint32(4,n.byteLength,!1),o.setUint32(8,s.update(r.subarray(0,8)).digest(),!1),r.set(n,12),r.set(t,n.byteLength+12),o.setUint32(i-4,s.update(r.subarray(8,i-4)).digest(),!1),r}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const i=new DataView(n,t,e),r=i.getUint32(0,!1);if(e!==r)throw new Error("Reported message length does not match received message length");const o=i.getUint32(4,!1),s=i.getUint32(8,!1),a=i.getUint32(e-4,!1),c=(new yo).update(new Uint8Array(n,t,8));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(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,o),body:new Uint8Array(n,t+8+4+o,r-o-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Mo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class jo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class $o{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class No{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Do(e,t){return async function(n){const{value:i}=n.headers[":message-type"];if("error"===i){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===i){const i=n.headers[":exception-type"].value,r={[i]:n},o=await e(r);if(o.$unknown){const e=new Error(t(n.body));throw e.name=i,e}throw o[i]}if("event"===i){const t={[n.headers[":event-type"].value]:n},i=await e(t);if(i.$unknown)return;return i}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}let Lo=class{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Ro(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,i=null,r=null;const o=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,i=new Uint8Array(e),new DataView(i.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const s=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await s.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield i)}const c=e.length;let l=0;for(;l<c;){if(!i){const t=c-l;r||(r=new Uint8Array(4));const i=Math.min(4-n,t);if(r.set(e.slice(l,l+i),n),n+=i,l+=i,n<4)break;o(new DataView(r.buffer).getUint32(0,!1)),r=null}const s=Math.min(t-n,c-l);i.set(e.slice(l,l+s),n),n+=s,l+=s,t&&t===n&&(yield i,i=null,t=0,n=0)}}}}}(e);return new $o({messageStream:new Mo({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Do(t,this.utfEncoder)})}serialize(e,t){return new jo({messageStream:new No({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};class zo{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Lo({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Fo(e)?(i=e,{[Symbol.asyncIterator]:async function*(){const e=i.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var i;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:i}=await t.next();if(n)return e.close();e.enqueue(i)}})})(n):n}}const Fo=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Uo=e=>new zo(e),Bo=e=>()=>Promise.reject(e),Ho="function"==typeof TextEncoder?new TextEncoder:null,qo=e=>{if("string"==typeof e){if(Ho)return Ho.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const i=e.charCodeAt(n);i>127&&i<=2047?t++:i>2047&&i<=65535&&(t+=2),i>=56320&&i<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},Vo="required",Go="fn",Wo="argv",Ko="ref",Yo=!0,Qo="isSet",Jo="booleanEquals",Xo="error",Zo="endpoint",es="tree",ts="PartitionResult",ns={[Vo]:!1,type:"String"},is={[Vo]:!0,default:!1,type:"Boolean"},rs={[Ko]:"Endpoint"},os={[Go]:Jo,[Wo]:[{[Ko]:"UseFIPS"},!0]},ss={[Go]:Jo,[Wo]:[{[Ko]:"UseDualStack"},!0]},as={},cs={[Go]:"getAttr",[Wo]:[{[Ko]:ts},"supportsFIPS"]},ls={[Go]:Jo,[Wo]:[!0,{[Go]:"getAttr",[Wo]:[{[Ko]:ts},"supportsDualStack"]}]},us=[os],ps=[ss],ds=[{[Ko]:"Region"}],ms={version:"1.0",parameters:{Region:ns,UseDualStack:is,UseFIPS:is,Endpoint:ns},rules:[{conditions:[{[Go]:Qo,[Wo]:[rs]}],rules:[{conditions:us,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Xo},{conditions:ps,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Xo},{endpoint:{url:rs,properties:as,headers:as},type:Zo}],type:es},{conditions:[{[Go]:Qo,[Wo]:ds}],rules:[{conditions:[{[Go]:"aws.partition",[Wo]:ds,assign:ts}],rules:[{conditions:[os,ss],rules:[{conditions:[{[Go]:Jo,[Wo]:[Yo,cs]},ls],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:as,headers:as},type:Zo}],type:es},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Xo}],type:es},{conditions:us,rules:[{conditions:[{[Go]:Jo,[Wo]:[cs,Yo]}],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}",properties:as,headers:as},type:Zo}],type:es},{error:"FIPS is enabled but this partition does not support FIPS",type:Xo}],type:es},{conditions:ps,rules:[{conditions:[ls],rules:[{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:as,headers:as},type:Zo}],type:es},{error:"DualStack is enabled but this partition does not support DualStack",type:Xo}],type:es},{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dnsSuffix}",properties:as,headers:as},type:Zo}],type:es}],type:es},{error:"Invalid Configuration: Missing Region",type:Xo}]},hs=new Te({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),fs=(e,t={})=>hs.get(e,(()=>Ze(ms,{endpointParams:e,logger:t.logger})));Me.aws=nt;const gs=["in-region","cross-region","mobile","standard","legacy"],ys=({defaultsMode:e}={})=>lt((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(vs()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${gs.join(", ")}, got ${t}`)}})),vs=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?ho.parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},bs=e=>{const t=ys(e),n=()=>t().then(In),i=(e=>({apiVersion:"2015-03-31",base64Decoder:e?.base64Decoder??te,base64Encoder:e?.base64Encoder??oe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??fs,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ur,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ct}],logger:e?.logger??new Bn,serviceId:e?.serviceId??"Lambda",urlParser:e?.urlParser??ar,utf8Decoder:e?.utf8Decoder??ne,utf8Encoder:e?.utf8Encoder??re}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??fo({serviceId:i.serviceId,clientVersion:Hr}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Uo,maxAttempts:e?.maxAttempts??3,region:e?.region??Bo("Region is missing"),requestHandler:de.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||fr),sha256:e?.sha256??uo,streamCollector:e?.streamCollector??me,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Gi)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Wi))}},xs=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},ws=e=>({region:e.region()}),Es=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}},Ss=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class _s extends Wt{constructor(...[e]){const t=bs(e||{});var n;const i=ke((n=t,{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"lambda"})),r=Rr(i),o=Qi(r),s=mr(o);var a;const c=(e=>({...Ut(e)}))((a=s,{...a,eventStreamMarshaller:a.eventStreamSerdeProvider(a)})),l=((e,t)=>{const n={...xs(e),...Nn(e),...v(e),...Es(e)};return t.forEach((e=>e.configure(n))),{...e,...ws(n),...Dn(n),...b(n),...Ss(n)}})(c,e?.extensions||[]);super(l),this.config=l,this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(Lr(this.config)),this.middlewareStack.use(Zi(this.config)),this.middlewareStack.use(I(this.config)),this.middlewareStack.use(M(this.config)),this.middlewareStack.use(N(this.config)),this.middlewareStack.use(U(this.config,{httpAuthSchemeParametersProvider:Fr,identityProviderConfigProvider:async e=>new Ee({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(K(this.config))}destroy(){super.destroy()}}class Os extends kn{constructor(e){super(e),Object.setPrototypeOf(this,Os.prototype)}}class Cs extends Os{constructor(e){super({name:"InvalidParameterValueException",$fault:"client",...e}),this.name="InvalidParameterValueException",this.$fault="client",Object.setPrototypeOf(this,Cs.prototype),this.Type=e.Type}}class ks extends Os{constructor(e){super({name:"PolicyLengthExceededException",$fault:"client",...e}),this.name="PolicyLengthExceededException",this.$fault="client",Object.setPrototypeOf(this,ks.prototype),this.Type=e.Type}}class Ts extends Os{constructor(e){super({name:"PreconditionFailedException",$fault:"client",...e}),this.name="PreconditionFailedException",this.$fault="client",Object.setPrototypeOf(this,Ts.prototype),this.Type=e.Type}}class Ps extends Os{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,Ps.prototype),this.Type=e.Type}}let As=class e extends Os{constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class Is extends Os{constructor(e){super({name:"ServiceException",$fault:"server",...e}),this.name="ServiceException",this.$fault="server",Object.setPrototypeOf(this,Is.prototype),this.Type=e.Type,this.Message=e.Message}}class Rs extends Os{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,Rs.prototype),this.retryAfterSeconds=e.retryAfterSeconds,this.Type=e.Type,this.Reason=e.Reason}}class Ms extends Os{constructor(e){super({name:"CodeSigningConfigNotFoundException",$fault:"client",...e}),this.name="CodeSigningConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ms.prototype),this.Type=e.Type,this.Message=e.Message}}class js extends Os{constructor(e){super({name:"CodeStorageExceededException",$fault:"client",...e}),this.name="CodeStorageExceededException",this.$fault="client",Object.setPrototypeOf(this,js.prototype),this.Type=e.Type}}class $s extends Os{constructor(e){super({name:"CodeVerificationFailedException",$fault:"client",...e}),this.name="CodeVerificationFailedException",this.$fault="client",Object.setPrototypeOf(this,$s.prototype),this.Type=e.Type,this.Message=e.Message}}class Ns extends Os{constructor(e){super({name:"InvalidCodeSignatureException",$fault:"client",...e}),this.name="InvalidCodeSignatureException",this.$fault="client",Object.setPrototypeOf(this,Ns.prototype),this.Type=e.Type,this.Message=e.Message}}let Ds=class e extends Os{constructor(t){super({name:"ResourceInUseException",$fault:"client",...t}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class Ls extends Os{constructor(e){super({name:"ProvisionedConcurrencyConfigNotFoundException",$fault:"client",...e}),this.name="ProvisionedConcurrencyConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ls.prototype),this.Type=e.Type}}class zs extends Os{constructor(e){super({name:"EC2AccessDeniedException",$fault:"server",...e}),this.name="EC2AccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,zs.prototype),this.Type=e.Type,this.Message=e.Message}}class Fs extends Os{constructor(e){super({name:"EC2ThrottledException",$fault:"server",...e}),this.name="EC2ThrottledException",this.$fault="server",Object.setPrototypeOf(this,Fs.prototype),this.Type=e.Type,this.Message=e.Message}}class Us extends Os{constructor(e){super({name:"EC2UnexpectedException",$fault:"server",...e}),this.name="EC2UnexpectedException",this.$fault="server",Object.setPrototypeOf(this,Us.prototype),this.Type=e.Type,this.Message=e.Message,this.EC2ErrorCode=e.EC2ErrorCode}}class Bs extends Os{constructor(e){super({name:"EFSIOException",$fault:"client",...e}),this.name="EFSIOException",this.$fault="client",Object.setPrototypeOf(this,Bs.prototype),this.Type=e.Type,this.Message=e.Message}}class Hs extends Os{constructor(e){super({name:"EFSMountConnectivityException",$fault:"client",...e}),this.name="EFSMountConnectivityException",this.$fault="client",Object.setPrototypeOf(this,Hs.prototype),this.Type=e.Type,this.Message=e.Message}}class qs extends Os{constructor(e){super({name:"EFSMountFailureException",$fault:"client",...e}),this.name="EFSMountFailureException",this.$fault="client",Object.setPrototypeOf(this,qs.prototype),this.Type=e.Type,this.Message=e.Message}}class Vs extends Os{constructor(e){super({name:"EFSMountTimeoutException",$fault:"client",...e}),this.name="EFSMountTimeoutException",this.$fault="client",Object.setPrototypeOf(this,Vs.prototype),this.Type=e.Type,this.Message=e.Message}}class Gs extends Os{constructor(e){super({name:"ENILimitReachedException",$fault:"server",...e}),this.name="ENILimitReachedException",this.$fault="server",Object.setPrototypeOf(this,Gs.prototype),this.Type=e.Type,this.Message=e.Message}}class Ws extends Os{constructor(e){super({name:"InvalidRequestContentException",$fault:"client",...e}),this.name="InvalidRequestContentException",this.$fault="client",Object.setPrototypeOf(this,Ws.prototype),this.Type=e.Type}}class Ks extends Os{constructor(e){super({name:"InvalidRuntimeException",$fault:"server",...e}),this.name="InvalidRuntimeException",this.$fault="server",Object.setPrototypeOf(this,Ks.prototype),this.Type=e.Type,this.Message=e.Message}}class Ys extends Os{constructor(e){super({name:"InvalidSecurityGroupIDException",$fault:"server",...e}),this.name="InvalidSecurityGroupIDException",this.$fault="server",Object.setPrototypeOf(this,Ys.prototype),this.Type=e.Type,this.Message=e.Message}}class Qs extends Os{constructor(e){super({name:"InvalidSubnetIDException",$fault:"server",...e}),this.name="InvalidSubnetIDException",this.$fault="server",Object.setPrototypeOf(this,Qs.prototype),this.Type=e.Type,this.Message=e.Message}}class Js extends Os{constructor(e){super({name:"InvalidZipFileException",$fault:"server",...e}),this.name="InvalidZipFileException",this.$fault="server",Object.setPrototypeOf(this,Js.prototype),this.Type=e.Type,this.Message=e.Message}}class Xs extends Os{constructor(e){super({name:"KMSAccessDeniedException",$fault:"server",...e}),this.name="KMSAccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,Xs.prototype),this.Type=e.Type,this.Message=e.Message}}class Zs extends Os{constructor(e){super({name:"KMSDisabledException",$fault:"server",...e}),this.name="KMSDisabledException",this.$fault="server",Object.setPrototypeOf(this,Zs.prototype),this.Type=e.Type,this.Message=e.Message}}class ea extends Os{constructor(e){super({name:"KMSInvalidStateException",$fault:"server",...e}),this.name="KMSInvalidStateException",this.$fault="server",Object.setPrototypeOf(this,ea.prototype),this.Type=e.Type,this.Message=e.Message}}class ta extends Os{constructor(e){super({name:"KMSNotFoundException",$fault:"server",...e}),this.name="KMSNotFoundException",this.$fault="server",Object.setPrototypeOf(this,ta.prototype),this.Type=e.Type,this.Message=e.Message}}class na extends Os{constructor(e){super({name:"RecursiveInvocationException",$fault:"client",...e}),this.name="RecursiveInvocationException",this.$fault="client",Object.setPrototypeOf(this,na.prototype),this.Type=e.Type,this.Message=e.Message}}class ia extends Os{constructor(e){super({name:"RequestTooLargeException",$fault:"client",...e}),this.name="RequestTooLargeException",this.$fault="client",Object.setPrototypeOf(this,ia.prototype),this.Type=e.Type}}class ra extends Os{constructor(e){super({name:"ResourceNotReadyException",$fault:"server",...e}),this.name="ResourceNotReadyException",this.$fault="server",Object.setPrototypeOf(this,ra.prototype),this.Type=e.Type}}class oa extends Os{constructor(e){super({name:"SnapStartException",$fault:"client",...e}),this.name="SnapStartException",this.$fault="client",Object.setPrototypeOf(this,oa.prototype),this.Type=e.Type,this.Message=e.Message}}class sa extends Os{constructor(e){super({name:"SnapStartNotReadyException",$fault:"client",...e}),this.name="SnapStartNotReadyException",this.$fault="client",Object.setPrototypeOf(this,sa.prototype),this.Type=e.Type,this.Message=e.Message}}class aa extends Os{constructor(e){super({name:"SnapStartTimeoutException",$fault:"client",...e}),this.name="SnapStartTimeoutException",this.$fault="client",Object.setPrototypeOf(this,aa.prototype),this.Type=e.Type,this.Message=e.Message}}class ca extends Os{constructor(e){super({name:"SubnetIPAddressLimitReachedException",$fault:"server",...e}),this.name="SubnetIPAddressLimitReachedException",this.$fault="server",Object.setPrototypeOf(this,ca.prototype),this.Type=e.Type,this.Message=e.Message}}class la extends Os{constructor(e){super({name:"UnsupportedMediaTypeException",$fault:"client",...e}),this.name="UnsupportedMediaTypeException",this.$fault="client",Object.setPrototypeOf(this,la.prototype),this.Type=e.Type}}var ua;!function(e){e.visit=(e,t)=>void 0!==e.PayloadChunk?t.PayloadChunk(e.PayloadChunk):void 0!==e.InvokeComplete?t.InvokeComplete(e.InvokeComplete):t._(e.$unknown[0],e.$unknown[1])}(ua||(ua={}));const pa=e=>({...e,...e.Payload&&{Payload:Qt}}),da=e=>({...e,...e.Payload&&{Payload:Qt}}),ma=async(e,t)=>{const n=function(e,t){return new xe(e,t)}(e,t),i=Hn({},Fn,{"content-type":"application/octet-stream",[hc]:e[oc],[gc]:e[ac],[pc]:e[nc]});n.bp("/2015-03-31/functions/{FunctionName}/invocations"),n.p("FunctionName",(()=>e.FunctionName),"{FunctionName}",!1);const r=Hn({[cc]:[,e[cc]]});let o;return void 0!==e.Payload&&(o=e.Payload),n.m("POST").h(i).q(r).b(o),n.build()},ha=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return fa(e,t);const n=Hn({$metadata:tc(e),[rc]:[,e.headers[mc]],[sc]:[,e.headers[fc]],[ic]:[,e.headers[dc]]}),i=await ve(e.body,t);return n.Payload=i,Hn(n,{StatusCode:[,e.statusCode]}),n},fa=async(e,t)=>{const n={...e,body:await Xn(e.body,t)},i=((e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(r=e.headers,o="x-amzn-errortype",Object.keys(r).find((e=>e.toLowerCase()===o.toLowerCase())));var r,o;return void 0!==i?n(e.headers[i]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0})(e,n.body);switch(i){case"InvalidParameterValueException":case"com.amazonaws.lambda#InvalidParameterValueException":throw await Pa(n);case"PolicyLengthExceededException":case"com.amazonaws.lambda#PolicyLengthExceededException":throw await za(n);case"PreconditionFailedException":case"com.amazonaws.lambda#PreconditionFailedException":throw await Fa(n);case"ResourceConflictException":case"com.amazonaws.lambda#ResourceConflictException":throw await qa(n);case"ResourceNotFoundException":case"com.amazonaws.lambda#ResourceNotFoundException":throw await Ga(n);case"ServiceException":case"com.amazonaws.lambda#ServiceException":throw await Ka(n);case"TooManyRequestsException":case"com.amazonaws.lambda#TooManyRequestsException":throw await Za(n);case"CodeSigningConfigNotFoundException":case"com.amazonaws.lambda#CodeSigningConfigNotFoundException":throw await ya(n);case"CodeStorageExceededException":case"com.amazonaws.lambda#CodeStorageExceededException":throw await va(n);case"CodeVerificationFailedException":case"com.amazonaws.lambda#CodeVerificationFailedException":throw await ba(n);case"InvalidCodeSignatureException":case"com.amazonaws.lambda#InvalidCodeSignatureException":throw await Ta(n);case"ResourceInUseException":case"com.amazonaws.lambda#ResourceInUseException":throw await Va(n);case"ProvisionedConcurrencyConfigNotFoundException":case"com.amazonaws.lambda#ProvisionedConcurrencyConfigNotFoundException":throw await Ua(n);case"EC2AccessDeniedException":case"com.amazonaws.lambda#EC2AccessDeniedException":throw await xa(n);case"EC2ThrottledException":case"com.amazonaws.lambda#EC2ThrottledException":throw await wa(n);case"EC2UnexpectedException":case"com.amazonaws.lambda#EC2UnexpectedException":throw await Ea(n);case"EFSIOException":case"com.amazonaws.lambda#EFSIOException":throw await Sa(n);case"EFSMountConnectivityException":case"com.amazonaws.lambda#EFSMountConnectivityException":throw await _a(n);case"EFSMountFailureException":case"com.amazonaws.lambda#EFSMountFailureException":throw await Oa(n);case"EFSMountTimeoutException":case"com.amazonaws.lambda#EFSMountTimeoutException":throw await Ca(n);case"ENILimitReachedException":case"com.amazonaws.lambda#ENILimitReachedException":throw await ka(n);case"InvalidRequestContentException":case"com.amazonaws.lambda#InvalidRequestContentException":throw await Aa(n);case"InvalidRuntimeException":case"com.amazonaws.lambda#InvalidRuntimeException":throw await Ia(n);case"InvalidSecurityGroupIDException":case"com.amazonaws.lambda#InvalidSecurityGroupIDException":throw await Ra(n);case"InvalidSubnetIDException":case"com.amazonaws.lambda#InvalidSubnetIDException":throw await Ma(n);case"InvalidZipFileException":case"com.amazonaws.lambda#InvalidZipFileException":throw await ja(n);case"KMSAccessDeniedException":case"com.amazonaws.lambda#KMSAccessDeniedException":throw await $a(n);case"KMSDisabledException":case"com.amazonaws.lambda#KMSDisabledException":throw await Na(n);case"KMSInvalidStateException":case"com.amazonaws.lambda#KMSInvalidStateException":throw await Da(n);case"KMSNotFoundException":case"com.amazonaws.lambda#KMSNotFoundException":throw await La(n);case"RecursiveInvocationException":case"com.amazonaws.lambda#RecursiveInvocationException":throw await Ba(n);case"RequestTooLargeException":case"com.amazonaws.lambda#RequestTooLargeException":throw await Ha(n);case"ResourceNotReadyException":case"com.amazonaws.lambda#ResourceNotReadyException":throw await Wa(n);case"SnapStartException":case"com.amazonaws.lambda#SnapStartException":throw await Ya(n);case"SnapStartNotReadyException":case"com.amazonaws.lambda#SnapStartNotReadyException":throw await Qa(n);case"SnapStartTimeoutException":case"com.amazonaws.lambda#SnapStartTimeoutException":throw await Ja(n);case"SubnetIPAddressLimitReachedException":case"com.amazonaws.lambda#SubnetIPAddressLimitReachedException":throw await Xa(n);case"UnsupportedMediaTypeException":case"com.amazonaws.lambda#UnsupportedMediaTypeException":throw await ec(n);default:const t=n.body;return ga({output:e,parsedBody:t,errorCode:i})}},ga=Pn(Os),ya=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ms({$metadata:tc(e),...n});return Tn(o,e.body)},va=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new js({$metadata:tc(e),...n});return Tn(o,e.body)},ba=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new $s({$metadata:tc(e),...n});return Tn(o,e.body)},xa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new zs({$metadata:tc(e),...n});return Tn(o,e.body)},wa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Fs({$metadata:tc(e),...n});return Tn(o,e.body)},Ea=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{EC2ErrorCode:cn,Message:cn,Type:cn});Object.assign(n,r);const o=new Us({$metadata:tc(e),...n});return Tn(o,e.body)},Sa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Bs({$metadata:tc(e),...n});return Tn(o,e.body)},_a=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Hs({$metadata:tc(e),...n});return Tn(o,e.body)},Oa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new qs({$metadata:tc(e),...n});return Tn(o,e.body)},Ca=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Vs({$metadata:tc(e),...n});return Tn(o,e.body)},ka=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Gs({$metadata:tc(e),...n});return Tn(o,e.body)},Ta=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ns({$metadata:tc(e),...n});return Tn(o,e.body)},Pa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Cs({$metadata:tc(e),...n});return Tn(o,e.body)},Aa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ws({$metadata:tc(e),...n});return Tn(o,e.body)},Ia=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ks({$metadata:tc(e),...n});return Tn(o,e.body)},Ra=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ys({$metadata:tc(e),...n});return Tn(o,e.body)},Ma=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Qs({$metadata:tc(e),...n});return Tn(o,e.body)},ja=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Js({$metadata:tc(e),...n});return Tn(o,e.body)},$a=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Xs({$metadata:tc(e),...n});return Tn(o,e.body)},Na=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Zs({$metadata:tc(e),...n});return Tn(o,e.body)},Da=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new ea({$metadata:tc(e),...n});return Tn(o,e.body)},La=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new ta({$metadata:tc(e),...n});return Tn(o,e.body)},za=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new ks({$metadata:tc(e),...n});return Tn(o,e.body)},Fa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ts({$metadata:tc(e),...n});return Tn(o,e.body)},Ua=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ls({$metadata:tc(e),...n});return Tn(o,e.body)},Ba=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new na({$metadata:tc(e),...n});return Tn(o,e.body)},Ha=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new ia({$metadata:tc(e),...n});return Tn(o,e.body)},qa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ps({$metadata:tc(e),...n});return Tn(o,e.body)},Va=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ds({$metadata:tc(e),...n});return Tn(o,e.body)},Ga=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new As({$metadata:tc(e),...n});return Tn(o,e.body)},Wa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new ra({$metadata:tc(e),...n});return Tn(o,e.body)},Ka=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Is({$metadata:tc(e),...n});return Tn(o,e.body)},Ya=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new oa({$metadata:tc(e),...n});return Tn(o,e.body)},Qa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new sa({$metadata:tc(e),...n});return Tn(o,e.body)},Ja=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new aa({$metadata:tc(e),...n});return Tn(o,e.body)},Xa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new ca({$metadata:tc(e),...n});return Tn(o,e.body)},Za=async(e,t)=>{const n=Hn({[lc]:[,e.headers[uc]]}),i=e.body,r=qn(i,{Reason:cn,Type:cn,message:cn});Object.assign(n,r);const o=new Rs({$metadata:tc(e),...n});return Tn(o,e.body)},ec=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new la({$metadata:tc(e),...n});return Tn(o,e.body)},tc=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"]}),nc="ClientContext",ic="ExecutedVersion",rc="FunctionError",oc="InvocationType",sc="LogResult",ac="LogType",cc="Qualifier",lc="retryAfterSeconds",uc="retry-after",pc="x-amz-client-context",dc="x-amz-executed-version",mc="x-amz-function-error",hc="x-amz-invocation-type",fc="x-amz-log-result",gc="x-amz-log-type";class yc extends(Kt.classBuilder().ep(Br).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("AWSGirApiService","Invoke",{}).n("LambdaClient","InvokeCommand").f(pa,da).ser(ma).de(ha).build()){}const vc=e=>new Promise((t=>setTimeout(t,1e3*e))),bc={minDelay:2,maxDelay:120};var xc;!function(e){e.ABORTED="ABORTED",e.FAILURE="FAILURE",e.SUCCESS="SUCCESS",e.RETRY="RETRY",e.TIMEOUT="TIMEOUT"}(xc||(xc={}));const wc=(e,t,n,i)=>{if(i>n)return t;return Ec(e,e*2**(i-1))},Ec=(e,t)=>e+Math.random()*(t-e),Sc=async({minDelay:e,maxDelay:t,maxWaitTime:n,abortController:i,client:r,abortSignal:o},s,a)=>{const{state:c,reason:l}=await a(r,s);if(c!==xc.RETRY)return{state:c,reason:l};let u=1;const p=Date.now()+1e3*n,d=Math.log(t/e)/Math.log(2)+1;for(;;){if(i?.signal?.aborted||o?.aborted)return{state:xc.ABORTED};const n=wc(e,t,d,u);if(Date.now()+1e3*n>p)return{state:xc.TIMEOUT};await vc(n);const{state:c,reason:l}=await a(r,s);if(c!==xc.RETRY)return{state:c,reason:l};u+=1}},_c=async e=>new Promise((t=>{const n=()=>t({state:xc.ABORTED});"function"==typeof e.addEventListener?e.addEventListener("abort",n):e.onabort=n})),Oc=async(e,t,n)=>{const i={...bc,...e};(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`)})(i);const r=[Sc(i,t,n)];return e.abortController&&r.push(_c(e.abortController.signal)),e.abortSignal&&r.push(_c(e.abortSignal)),Promise.race(r)},Cc={region:"eu-central-2"};const kc={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Tc=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!T.isInstance(n.request))return t(n);const{request:i}=n,{handlerProtocol:r=""}=e.requestHandler.metadata||{};if(r.indexOf("h2")>=0&&!i.headers[":authority"])delete i.headers.host,i.headers[":authority"]=i.hostname+(i.port?":"+i.port:"");else if(!i.headers.host){let e=i.hostname;null!=i.port&&(e+=`:${i.port}`),i.headers.host=e}return t(n)})(e),kc)}}),Pc={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Ac="X-Amzn-Trace-Id",Ic={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Rc=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:i}=n;if(!T.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(Ac))return t(n);const r=[]._X_AMZN_TRACE_ID,o=e=>"string"==typeof e&&e.length>0;return o([].AWS_LAMBDA_FUNCTION_NAME)&&o(r)&&(i.headers[Ac]=r),t({...n,request:i})})(e),Ic)}});const Mc=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Mc(t))return!1;return!0}return!!Re(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Ae(e)))};let jc={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const $c={isVirtualHostableS3Bucket:Mc,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,i,r,o,s,...a]=t;if("arn"!==n||""===i||""===r||""===a.join(":"))return null;return{partition:i,service:r,region:o,accountId:s,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=jc;for(const n of t){const{regions:t,outputs:i}=n;for(const[n,r]of Object.entries(t))if(n===e)return{...i,...r}}for(const n of t){const{regionRegex:t,outputs:i}=n;if(new RegExp(t).test(e))return{...i}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function Nc(e,t,n){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]=n}Me.aws=$c;const Dc=e=>P.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Lc=e=>new Date(Date.now()+e),zc=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Lc(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Fc=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Uc{async sign(e,t,n){if(!T.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await(async e=>{const t=Fc("context",e.context),n=Fc("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],r=Fc("signer",n.signer),o=await r(i),s=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:a,signingName:c}})(n),{config:r,signer:o}=i;let{signingRegion:s,signingName:a}=i;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(s=t?.signingRegion??s,a=t?.signingName??a)}return await o.sign(e,{signingDate:Lc(r.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Dc(t.$response);if(n){const i=Fc("config",e.config),r=i.systemClockOffset;i.systemClockOffset=zc(n,i.systemClockOffset);i.systemClockOffset!==r&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Dc(e);if(n){const e=Fc("config",t.config);e.systemClockOffset=zc(n,e.systemClockOffset)}}}const Bc=(e,t)=>((e,t)=>ve(e,t).then((e=>t.utf8Encoder(e))))(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),Hc=async(e,t)=>{const n=await Bc(e,t);return n.message=n.message??n.Message,n},qc=/\d{12}\.ddb/;const Vc="user-agent",Gc="x-amz-user-agent",Wc=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kc=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Yc=e=>(t,n)=>async i=>{const{request:r}=i;if(!T.isInstance(r))return t(i);const{headers:o}=r,s=n?.userAgent?.map(Qc)||[],a=(await e.defaultUserAgentProvider()).map(Qc);await async function(e,t,n){const i=n.request;if("rpc-v2-cbor"===i?.headers?.["smithy-protocol"]&&Nc(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?Nc(e,"RETRY_MODE_ADAPTIVE","F"):Nc(e,"RETRY_MODE_STANDARD","E"):Nc(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(qc)&&Nc(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":Nc(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Nc(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Nc(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const t=r;t.accountId&&Nc(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))Nc(e,n,i)}}(n,e,i);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const i=e[n];if(!(t.length+i.length+1<=1024))break;t.length?t+=","+i:t+=i}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(Qc)||[],u=await e.userAgentAppId();u&&a.push(Qc([`app/${u}`]));const p=[].concat([...a,...s,...l]).join(" "),d=[...a.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(d&&(o[Gc]=o[Gc]?`${o[Vc]} ${d}`:d),o[Vc]=p):o[Gc]=p,t({...i,request:r})},Qc=e=>{const t=e[0].split("/").map((e=>e.replace(Wc,"-"))).join("/"),n=e[1]?.replace(Kc,"-"),i=t.indexOf("/"),r=t.substring(0,i);let o=t.substring(i+1);return"api"===r&&(o=o.toLowerCase()),[r,o,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},Jc={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Xc=async(e,t,n)=>({operation:D(t).operation,region:await L(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Zc=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ssm",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},el=e=>{const t=(e=>{let t,n=!1;e.credentials&&(n=!0,t=Ce(e.credentials,Se,Oe)),t||(t=e.credentialDefaultProvider?Y(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:i=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:o}=e;let s;return s=e.signer?Y(e.signer):e.regionInfoProvider?()=>Y(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,r])=>{const{signingRegion:s,signingService:a}=n;e.signingRegion=e.signingRegion||s||r,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Lt)(c)})):async n=>{const r=(n=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Y(e.region)(),properties:{}},n)).signingRegion,s=n.signingName;e.signingRegion=e.signingRegion||r,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Lt)(a)},{...e,systemClockOffset:r,signingEscapePath:i,credentials:n?async()=>t().then((e=>{return n="CREDENTIALS_CODE",i="e",(t=e).$source||(t.$source={}),t.$source[n]=i,t;var t,n,i})):t,signer:s}})(e);return{...t}},tl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var nl="3.682.0";const il=({serviceId:e,clientVersion:t})=>async n=>{const i="undefined"!=typeof window&&window?.navigator?.userAgent?ho.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.1"],[`os/${i?.os?.name||"other"}`,i?.os?.version],["lang/js"],["md/browser",`${i?.browser?.name??"unknown"}_${i?.browser?.version??"unknown"}`]];e&&r.push([`api/${e}`,t]);const o=await(n?.userAgentAppId?.());return o&&r.push([`app/${o}`]),r};function rl(e=0){return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}const ol={supported:void 0};class sl{static create(e){return"function"==typeof e?.handle?e:new sl(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===ol.supported&&(ol.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,i=!0===this.config.keepAlive,r=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const s=le(e.query||{});s&&(o+=`?${s}`),e.fragment&&(o+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:c,method:l}=e,u=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${o}`,p="GET"===l||"HEAD"===l?void 0:e.body,d={body:p,headers:new Headers(e.headers),method:l,credentials:r};this.config?.cache&&(d.cache=this.config.cache),p&&(d.duplex="half"),"undefined"!=typeof AbortController&&(d.signal=t),ol.supported&&(d.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(d,this.config.requestInit(e));let m=()=>{};const h=new Request(u,d),f=[fetch(h).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new P({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new P({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),rl(n)];return t&&f.push(new Promise(((e,n)=>{const i=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",i,{once:!0}),m=()=>e.removeEventListener("abort",i)}else t.onabort=i}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const al=e=>"function"==typeof Blob&&e instanceof Blob?async function(e){const t=await function(e){return new Promise(((t,n)=>{const i=new FileReader;i.onloadend=()=>{if(2!==i.readyState)return n(new Error("Reader aborted too early"));const e=i.result??"",r=e.indexOf(","),o=r>-1?r+1:e.length;t(e.substring(o))},i.onabort=()=>n(new Error("Read aborted")),i.onerror=()=>n(i.error),i.readAsDataURL(e)}))}(e),n=te(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let i=!1,r=0;for(;!i;){const{done:e,value:o}=await n.read();o&&(t.push(o),r+=o.length),i=e}const o=new Uint8Array(r);let s=0;for(const e of t)o.set(e,s),s+=e.length;return o}(e);const cl="required",ll="fn",ul="argv",pl="ref",dl=!0,ml="isSet",hl="booleanEquals",fl="error",gl="endpoint",yl="tree",vl="PartitionResult",bl="getAttr",xl={[cl]:!1,type:"String"},wl={[cl]:!0,default:!1,type:"Boolean"},El={[pl]:"Endpoint"},Sl={[ll]:hl,[ul]:[{[pl]:"UseFIPS"},!0]},_l={[ll]:hl,[ul]:[{[pl]:"UseDualStack"},!0]},Ol={},Cl={[ll]:bl,[ul]:[{[pl]:vl},"supportsFIPS"]},kl={[pl]:vl},Tl={[ll]:hl,[ul]:[!0,{[ll]:bl,[ul]:[kl,"supportsDualStack"]}]},Pl=[Sl],Al=[_l],Il=[{[pl]:"Region"}],Rl={version:"1.0",parameters:{Region:xl,UseDualStack:wl,UseFIPS:wl,Endpoint:xl},rules:[{conditions:[{[ll]:ml,[ul]:[El]}],rules:[{conditions:Pl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:fl},{conditions:Al,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:fl},{endpoint:{url:El,properties:Ol,headers:Ol},type:gl}],type:yl},{conditions:[{[ll]:ml,[ul]:Il}],rules:[{conditions:[{[ll]:"aws.partition",[ul]:Il,assign:vl}],rules:[{conditions:[Sl,_l],rules:[{conditions:[{[ll]:hl,[ul]:[dl,Cl]},Tl],rules:[{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:fl}],type:yl},{conditions:Pl,rules:[{conditions:[{[ll]:hl,[ul]:[Cl,dl]}],rules:[{conditions:[{[ll]:"stringEquals",[ul]:[{[ll]:bl,[ul]:[kl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ssm.{Region}.amazonaws.com",properties:Ol,headers:Ol},type:gl},{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl},{error:"FIPS is enabled but this partition does not support FIPS",type:fl}],type:yl},{conditions:Al,rules:[{conditions:[Tl],rules:[{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl},{error:"DualStack is enabled but this partition does not support DualStack",type:fl}],type:yl},{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl}],type:yl},{error:"Invalid Configuration: Missing Region",type:fl}]},Ml=new Te({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),jl=(e,t={})=>Ml.get(e,(()=>Ze(Rl,{endpointParams:e,logger:t.logger})));Me.aws=$c;const $l=e=>{const t=ys(e),n=()=>t().then(In),i=(e=>({apiVersion:"2014-11-06",base64Decoder:e?.base64Decoder??te,base64Encoder:e?.base64Encoder??oe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??jl,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Zc,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Uc}],logger:e?.logger??new Bn,serviceId:e?.serviceId??"SSM",urlParser:e?.urlParser??ar,utf8Decoder:e?.utf8Decoder??ne,utf8Encoder:e?.utf8Encoder??re}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??il({serviceId:i.serviceId,clientVersion:nl}),maxAttempts:e?.maxAttempts??3,region:e?.region??Bo("Region is missing"),requestHandler:sl.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||fr),sha256:e?.sha256??uo,streamCollector:e?.streamCollector??al,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Gi)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Wi))}},Nl=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},Dl=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}},Ll=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class zl extends Wt{constructor(...[e]){const t=$l(e||{});var n;const i=function(e){const t=Y(e.userAgentAppId??void 0);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}}}((n=t,{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"ssm"})),r=Rr(i),o=Qi(r),s=mr(o),a=((e,t)=>{const n={...Nl(e),...Nn(e),...v(e),...Dl(e)};return t.forEach((e=>e.configure(n))),{...e,...(i=n,{region:i.region()}),...Dn(n),...b(n),...Ll(n)};var i})(el(s),e?.extensions||[]);super(a),this.config=a,this.middlewareStack.use((e=>({applyToStack:t=>{t.add(Yc(e),Jc)}}))(this.config)),this.middlewareStack.use(Lr(this.config)),this.middlewareStack.use(Zi(this.config)),this.middlewareStack.use(Tc(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add(((e,t)=>async n=>{try{const i=await e(n),{clientName:r,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=a,u=c??t.inputFilterSensitiveLog,p=l??t.outputFilterSensitiveLog,{$metadata:d,...m}=i.output;return s?.info?.({clientName:r,commandName:o,input:u(n.input),output:p(m),metadata:d}),i}catch(e){const{clientName:i,commandName:r,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,c=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:r,input:c(n.input),error:e,metadata:e.$metadata}),e}}),Pc)}})),this.middlewareStack.use(Rc(this.config)),this.middlewareStack.use(U(this.config,{httpAuthSchemeParametersProvider:Xc,identityProviderConfigProvider:async e=>new Ee({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(K(this.config))}destroy(){super.destroy()}}class Fl extends kn{constructor(e){super(e),Object.setPrototypeOf(this,Fl.prototype)}}class Ul extends Fl{constructor(e){super({name:"InternalServerError",$fault:"server",...e}),this.name="InternalServerError",this.$fault="server",Object.setPrototypeOf(this,Ul.prototype),this.Message=e.Message}}class Bl extends Fl{constructor(e){super({name:"InvalidResourceId",$fault:"client",...e}),this.name="InvalidResourceId",this.$fault="client",Object.setPrototypeOf(this,Bl.prototype)}}class Hl extends Fl{constructor(e){super({name:"InvalidResourceType",$fault:"client",...e}),this.name="InvalidResourceType",this.$fault="client",Object.setPrototypeOf(this,Hl.prototype)}}class ql extends Fl{constructor(e){super({name:"TooManyTagsError",$fault:"client",...e}),this.name="TooManyTagsError",this.$fault="client",Object.setPrototypeOf(this,ql.prototype)}}class Vl extends Fl{constructor(e){super({name:"TooManyUpdates",$fault:"client",...e}),this.name="TooManyUpdates",this.$fault="client",Object.setPrototypeOf(this,Vl.prototype),this.Message=e.Message}}let Gl=class e extends Fl{constructor(t){super({name:"AlreadyExistsException",$fault:"client",...t}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class Wl extends Fl{constructor(e){super({name:"OpsItemConflictException",$fault:"client",...e}),this.name="OpsItemConflictException",this.$fault="client",Object.setPrototypeOf(this,Wl.prototype),this.Message=e.Message}}class Kl extends Fl{constructor(e){super({name:"OpsItemInvalidParameterException",$fault:"client",...e}),this.name="OpsItemInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Kl.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class Yl extends Fl{constructor(e){super({name:"OpsItemLimitExceededException",$fault:"client",...e}),this.name="OpsItemLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Yl.prototype),this.ResourceTypes=e.ResourceTypes,this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class Ql extends Fl{constructor(e){super({name:"OpsItemNotFoundException",$fault:"client",...e}),this.name="OpsItemNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ql.prototype),this.Message=e.Message}}class Jl extends Fl{constructor(e){super({name:"OpsItemRelatedItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemRelatedItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Jl.prototype),this.Message=e.Message,this.ResourceUri=e.ResourceUri,this.OpsItemId=e.OpsItemId}}class Xl extends Fl{constructor(e){super({name:"DuplicateInstanceId",$fault:"client",...e}),this.name="DuplicateInstanceId",this.$fault="client",Object.setPrototypeOf(this,Xl.prototype)}}class Zl extends Fl{constructor(e){super({name:"InvalidCommandId",$fault:"client",...e}),this.name="InvalidCommandId",this.$fault="client",Object.setPrototypeOf(this,Zl.prototype)}}class eu extends Fl{constructor(e){super({name:"InvalidInstanceId",$fault:"client",...e}),this.name="InvalidInstanceId",this.$fault="client",Object.setPrototypeOf(this,eu.prototype),this.Message=e.Message}}class tu extends Fl{constructor(e){super({name:"DoesNotExistException",$fault:"client",...e}),this.name="DoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,tu.prototype),this.Message=e.Message}}class nu extends Fl{constructor(e){super({name:"InvalidParameters",$fault:"client",...e}),this.name="InvalidParameters",this.$fault="client",Object.setPrototypeOf(this,nu.prototype),this.Message=e.Message}}class iu extends Fl{constructor(e){super({name:"AssociationAlreadyExists",$fault:"client",...e}),this.name="AssociationAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,iu.prototype)}}class ru extends Fl{constructor(e){super({name:"AssociationLimitExceeded",$fault:"client",...e}),this.name="AssociationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ru.prototype)}}class ou extends Fl{constructor(e){super({name:"InvalidDocument",$fault:"client",...e}),this.name="InvalidDocument",this.$fault="client",Object.setPrototypeOf(this,ou.prototype),this.Message=e.Message}}class su extends Fl{constructor(e){super({name:"InvalidDocumentVersion",$fault:"client",...e}),this.name="InvalidDocumentVersion",this.$fault="client",Object.setPrototypeOf(this,su.prototype),this.Message=e.Message}}class au extends Fl{constructor(e){super({name:"InvalidOutputLocation",$fault:"client",...e}),this.name="InvalidOutputLocation",this.$fault="client",Object.setPrototypeOf(this,au.prototype)}}class cu extends Fl{constructor(e){super({name:"InvalidSchedule",$fault:"client",...e}),this.name="InvalidSchedule",this.$fault="client",Object.setPrototypeOf(this,cu.prototype),this.Message=e.Message}}class lu extends Fl{constructor(e){super({name:"InvalidTag",$fault:"client",...e}),this.name="InvalidTag",this.$fault="client",Object.setPrototypeOf(this,lu.prototype),this.Message=e.Message}}class uu extends Fl{constructor(e){super({name:"InvalidTarget",$fault:"client",...e}),this.name="InvalidTarget",this.$fault="client",Object.setPrototypeOf(this,uu.prototype),this.Message=e.Message}}class pu extends Fl{constructor(e){super({name:"InvalidTargetMaps",$fault:"client",...e}),this.name="InvalidTargetMaps",this.$fault="client",Object.setPrototypeOf(this,pu.prototype),this.Message=e.Message}}class du extends Fl{constructor(e){super({name:"UnsupportedPlatformType",$fault:"client",...e}),this.name="UnsupportedPlatformType",this.$fault="client",Object.setPrototypeOf(this,du.prototype),this.Message=e.Message}}class mu extends Fl{constructor(e){super({name:"DocumentAlreadyExists",$fault:"client",...e}),this.name="DocumentAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,mu.prototype),this.Message=e.Message}}class hu extends Fl{constructor(e){super({name:"DocumentLimitExceeded",$fault:"client",...e}),this.name="DocumentLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,hu.prototype),this.Message=e.Message}}class fu extends Fl{constructor(e){super({name:"InvalidDocumentContent",$fault:"client",...e}),this.name="InvalidDocumentContent",this.$fault="client",Object.setPrototypeOf(this,fu.prototype),this.Message=e.Message}}class gu extends Fl{constructor(e){super({name:"InvalidDocumentSchemaVersion",$fault:"client",...e}),this.name="InvalidDocumentSchemaVersion",this.$fault="client",Object.setPrototypeOf(this,gu.prototype),this.Message=e.Message}}class yu extends Fl{constructor(e){super({name:"MaxDocumentSizeExceeded",$fault:"client",...e}),this.name="MaxDocumentSizeExceeded",this.$fault="client",Object.setPrototypeOf(this,yu.prototype),this.Message=e.Message}}class vu extends Fl{constructor(e){super({name:"IdempotentParameterMismatch",$fault:"client",...e}),this.name="IdempotentParameterMismatch",this.$fault="client",Object.setPrototypeOf(this,vu.prototype),this.Message=e.Message}}class bu extends Fl{constructor(e){super({name:"ResourceLimitExceededException",$fault:"client",...e}),this.name="ResourceLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,bu.prototype),this.Message=e.Message}}class xu extends Fl{constructor(e){super({name:"OpsItemAccessDeniedException",$fault:"client",...e}),this.name="OpsItemAccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,xu.prototype),this.Message=e.Message}}class wu extends Fl{constructor(e){super({name:"OpsItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,wu.prototype),this.Message=e.Message,this.OpsItemId=e.OpsItemId}}class Eu extends Fl{constructor(e){super({name:"OpsMetadataAlreadyExistsException",$fault:"client",...e}),this.name="OpsMetadataAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Eu.prototype)}}class Su extends Fl{constructor(e){super({name:"OpsMetadataInvalidArgumentException",$fault:"client",...e}),this.name="OpsMetadataInvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,Su.prototype)}}class _u extends Fl{constructor(e){super({name:"OpsMetadataLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,_u.prototype)}}class Ou extends Fl{constructor(e){super({name:"OpsMetadataTooManyUpdatesException",$fault:"client",...e}),this.name="OpsMetadataTooManyUpdatesException",this.$fault="client",Object.setPrototypeOf(this,Ou.prototype)}}class Cu extends Fl{constructor(e){super({name:"ResourceDataSyncAlreadyExistsException",$fault:"client",...e}),this.name="ResourceDataSyncAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Cu.prototype),this.SyncName=e.SyncName}}class ku extends Fl{constructor(e){super({name:"ResourceDataSyncCountExceededException",$fault:"client",...e}),this.name="ResourceDataSyncCountExceededException",this.$fault="client",Object.setPrototypeOf(this,ku.prototype),this.Message=e.Message}}class Tu extends Fl{constructor(e){super({name:"ResourceDataSyncInvalidConfigurationException",$fault:"client",...e}),this.name="ResourceDataSyncInvalidConfigurationException",this.$fault="client",Object.setPrototypeOf(this,Tu.prototype),this.Message=e.Message}}class Pu extends Fl{constructor(e){super({name:"InvalidActivation",$fault:"client",...e}),this.name="InvalidActivation",this.$fault="client",Object.setPrototypeOf(this,Pu.prototype),this.Message=e.Message}}class Au extends Fl{constructor(e){super({name:"InvalidActivationId",$fault:"client",...e}),this.name="InvalidActivationId",this.$fault="client",Object.setPrototypeOf(this,Au.prototype),this.Message=e.Message}}class Iu extends Fl{constructor(e){super({name:"AssociationDoesNotExist",$fault:"client",...e}),this.name="AssociationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,Iu.prototype),this.Message=e.Message}}class Ru extends Fl{constructor(e){super({name:"AssociatedInstances",$fault:"client",...e}),this.name="AssociatedInstances",this.$fault="client",Object.setPrototypeOf(this,Ru.prototype)}}class Mu extends Fl{constructor(e){super({name:"InvalidDocumentOperation",$fault:"client",...e}),this.name="InvalidDocumentOperation",this.$fault="client",Object.setPrototypeOf(this,Mu.prototype),this.Message=e.Message}}class ju extends Fl{constructor(e){super({name:"InvalidDeleteInventoryParametersException",$fault:"client",...e}),this.name="InvalidDeleteInventoryParametersException",this.$fault="client",Object.setPrototypeOf(this,ju.prototype),this.Message=e.Message}}class $u extends Fl{constructor(e){super({name:"InvalidInventoryRequestException",$fault:"client",...e}),this.name="InvalidInventoryRequestException",this.$fault="client",Object.setPrototypeOf(this,$u.prototype),this.Message=e.Message}}class Nu extends Fl{constructor(e){super({name:"InvalidOptionException",$fault:"client",...e}),this.name="InvalidOptionException",this.$fault="client",Object.setPrototypeOf(this,Nu.prototype),this.Message=e.Message}}class Du extends Fl{constructor(e){super({name:"InvalidTypeNameException",$fault:"client",...e}),this.name="InvalidTypeNameException",this.$fault="client",Object.setPrototypeOf(this,Du.prototype),this.Message=e.Message}}class Lu extends Fl{constructor(e){super({name:"OpsMetadataNotFoundException",$fault:"client",...e}),this.name="OpsMetadataNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Lu.prototype)}}class zu extends Fl{constructor(e){super({name:"ParameterNotFound",$fault:"client",...e}),this.name="ParameterNotFound",this.$fault="client",Object.setPrototypeOf(this,zu.prototype)}}class Fu extends Fl{constructor(e){super({name:"ResourceInUseException",$fault:"client",...e}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,Fu.prototype),this.Message=e.Message}}class Uu extends Fl{constructor(e){super({name:"ResourceDataSyncNotFoundException",$fault:"client",...e}),this.name="ResourceDataSyncNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Uu.prototype),this.SyncName=e.SyncName,this.SyncType=e.SyncType,this.Message=e.Message}}class Bu extends Fl{constructor(e){super({name:"MalformedResourcePolicyDocumentException",$fault:"client",...e}),this.name="MalformedResourcePolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Bu.prototype),this.Message=e.Message}}class Hu extends Fl{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Hu.prototype),this.Message=e.Message}}class qu extends Fl{constructor(e){super({name:"ResourcePolicyConflictException",$fault:"client",...e}),this.name="ResourcePolicyConflictException",this.$fault="client",Object.setPrototypeOf(this,qu.prototype),this.Message=e.Message}}class Vu extends Fl{constructor(e){super({name:"ResourcePolicyInvalidParameterException",$fault:"client",...e}),this.name="ResourcePolicyInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Vu.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class Gu extends Fl{constructor(e){super({name:"ResourcePolicyNotFoundException",$fault:"client",...e}),this.name="ResourcePolicyNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Gu.prototype),this.Message=e.Message}}class Wu extends Fl{constructor(e){super({name:"TargetInUseException",$fault:"client",...e}),this.name="TargetInUseException",this.$fault="client",Object.setPrototypeOf(this,Wu.prototype),this.Message=e.Message}}class Ku extends Fl{constructor(e){super({name:"InvalidFilter",$fault:"client",...e}),this.name="InvalidFilter",this.$fault="client",Object.setPrototypeOf(this,Ku.prototype),this.Message=e.Message}}class Yu extends Fl{constructor(e){super({name:"InvalidNextToken",$fault:"client",...e}),this.name="InvalidNextToken",this.$fault="client",Object.setPrototypeOf(this,Yu.prototype),this.Message=e.Message}}class Qu extends Fl{constructor(e){super({name:"InvalidAssociationVersion",$fault:"client",...e}),this.name="InvalidAssociationVersion",this.$fault="client",Object.setPrototypeOf(this,Qu.prototype),this.Message=e.Message}}class Ju extends Fl{constructor(e){super({name:"AssociationExecutionDoesNotExist",$fault:"client",...e}),this.name="AssociationExecutionDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,Ju.prototype),this.Message=e.Message}}class Xu extends Fl{constructor(e){super({name:"InvalidFilterKey",$fault:"client",...e}),this.name="InvalidFilterKey",this.$fault="client",Object.setPrototypeOf(this,Xu.prototype)}}class Zu extends Fl{constructor(e){super({name:"InvalidFilterValue",$fault:"client",...e}),this.name="InvalidFilterValue",this.$fault="client",Object.setPrototypeOf(this,Zu.prototype),this.Message=e.Message}}class ep extends Fl{constructor(e){super({name:"AutomationExecutionNotFoundException",$fault:"client",...e}),this.name="AutomationExecutionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ep.prototype),this.Message=e.Message}}class tp extends Fl{constructor(e){super({name:"InvalidPermissionType",$fault:"client",...e}),this.name="InvalidPermissionType",this.$fault="client",Object.setPrototypeOf(this,tp.prototype),this.Message=e.Message}}class np extends Fl{constructor(e){super({name:"UnsupportedOperatingSystem",$fault:"client",...e}),this.name="UnsupportedOperatingSystem",this.$fault="client",Object.setPrototypeOf(this,np.prototype),this.Message=e.Message}}class ip extends Fl{constructor(e){super({name:"InvalidInstanceInformationFilterValue",$fault:"client",...e}),this.name="InvalidInstanceInformationFilterValue",this.$fault="client",Object.setPrototypeOf(this,ip.prototype)}}class rp extends Fl{constructor(e){super({name:"InvalidInstancePropertyFilterValue",$fault:"client",...e}),this.name="InvalidInstancePropertyFilterValue",this.$fault="client",Object.setPrototypeOf(this,rp.prototype)}}class op extends Fl{constructor(e){super({name:"InvalidDeletionIdException",$fault:"client",...e}),this.name="InvalidDeletionIdException",this.$fault="client",Object.setPrototypeOf(this,op.prototype),this.Message=e.Message}}class sp extends Fl{constructor(e){super({name:"InvalidFilterOption",$fault:"client",...e}),this.name="InvalidFilterOption",this.$fault="client",Object.setPrototypeOf(this,sp.prototype)}}class ap extends Fl{constructor(e){super({name:"OpsItemRelatedItemAssociationNotFoundException",$fault:"client",...e}),this.name="OpsItemRelatedItemAssociationNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ap.prototype),this.Message=e.Message}}class cp extends Fl{constructor(e){super({name:"InvalidDocumentType",$fault:"client",...e}),this.name="InvalidDocumentType",this.$fault="client",Object.setPrototypeOf(this,cp.prototype),this.Message=e.Message}}class lp extends Fl{constructor(e){super({name:"UnsupportedCalendarException",$fault:"client",...e}),this.name="UnsupportedCalendarException",this.$fault="client",Object.setPrototypeOf(this,lp.prototype),this.Message=e.Message}}class up extends Fl{constructor(e){super({name:"InvalidPluginName",$fault:"client",...e}),this.name="InvalidPluginName",this.$fault="client",Object.setPrototypeOf(this,up.prototype)}}class pp extends Fl{constructor(e){super({name:"InvocationDoesNotExist",$fault:"client",...e}),this.name="InvocationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,pp.prototype)}}class dp extends Fl{constructor(e){super({name:"UnsupportedFeatureRequiredException",$fault:"client",...e}),this.name="UnsupportedFeatureRequiredException",this.$fault="client",Object.setPrototypeOf(this,dp.prototype),this.Message=e.Message}}class mp extends Fl{constructor(e){super({name:"InvalidAggregatorException",$fault:"client",...e}),this.name="InvalidAggregatorException",this.$fault="client",Object.setPrototypeOf(this,mp.prototype),this.Message=e.Message}}class hp extends Fl{constructor(e){super({name:"InvalidInventoryGroupException",$fault:"client",...e}),this.name="InvalidInventoryGroupException",this.$fault="client",Object.setPrototypeOf(this,hp.prototype),this.Message=e.Message}}class fp extends Fl{constructor(e){super({name:"InvalidResultAttributeException",$fault:"client",...e}),this.name="InvalidResultAttributeException",this.$fault="client",Object.setPrototypeOf(this,fp.prototype),this.Message=e.Message}}class gp extends Fl{constructor(e){super({name:"InvalidKeyId",$fault:"client",...e}),this.name="InvalidKeyId",this.$fault="client",Object.setPrototypeOf(this,gp.prototype)}}class yp extends Fl{constructor(e){super({name:"ParameterVersionNotFound",$fault:"client",...e}),this.name="ParameterVersionNotFound",this.$fault="client",Object.setPrototypeOf(this,yp.prototype)}}class vp extends Fl{constructor(e){super({name:"ServiceSettingNotFound",$fault:"client",...e}),this.name="ServiceSettingNotFound",this.$fault="client",Object.setPrototypeOf(this,vp.prototype),this.Message=e.Message}}class bp extends Fl{constructor(e){super({name:"ParameterVersionLabelLimitExceeded",$fault:"client",...e}),this.name="ParameterVersionLabelLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,bp.prototype)}}class xp extends Fl{constructor(e){super({name:"DocumentPermissionLimit",$fault:"client",...e}),this.name="DocumentPermissionLimit",this.$fault="client",Object.setPrototypeOf(this,xp.prototype),this.Message=e.Message}}class wp extends Fl{constructor(e){super({name:"ComplianceTypeCountLimitExceededException",$fault:"client",...e}),this.name="ComplianceTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,wp.prototype),this.Message=e.Message}}class Ep extends Fl{constructor(e){super({name:"InvalidItemContentException",$fault:"client",...e}),this.name="InvalidItemContentException",this.$fault="client",Object.setPrototypeOf(this,Ep.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Sp extends Fl{constructor(e){super({name:"ItemSizeLimitExceededException",$fault:"client",...e}),this.name="ItemSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Sp.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class _p extends Fl{constructor(e){super({name:"TotalSizeLimitExceededException",$fault:"client",...e}),this.name="TotalSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,_p.prototype),this.Message=e.Message}}class Op extends Fl{constructor(e){super({name:"CustomSchemaCountLimitExceededException",$fault:"client",...e}),this.name="CustomSchemaCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Op.prototype),this.Message=e.Message}}class Cp extends Fl{constructor(e){super({name:"InvalidInventoryItemContextException",$fault:"client",...e}),this.name="InvalidInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,Cp.prototype),this.Message=e.Message}}class kp extends Fl{constructor(e){super({name:"ItemContentMismatchException",$fault:"client",...e}),this.name="ItemContentMismatchException",this.$fault="client",Object.setPrototypeOf(this,kp.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Tp extends Fl{constructor(e){super({name:"SubTypeCountLimitExceededException",$fault:"client",...e}),this.name="SubTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Tp.prototype),this.Message=e.Message}}class Pp extends Fl{constructor(e){super({name:"UnsupportedInventoryItemContextException",$fault:"client",...e}),this.name="UnsupportedInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,Pp.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Ap extends Fl{constructor(e){super({name:"UnsupportedInventorySchemaVersionException",$fault:"client",...e}),this.name="UnsupportedInventorySchemaVersionException",this.$fault="client",Object.setPrototypeOf(this,Ap.prototype),this.Message=e.Message}}class Ip extends Fl{constructor(e){super({name:"HierarchyLevelLimitExceededException",$fault:"client",...e}),this.name="HierarchyLevelLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ip.prototype)}}class Rp extends Fl{constructor(e){super({name:"HierarchyTypeMismatchException",$fault:"client",...e}),this.name="HierarchyTypeMismatchException",this.$fault="client",Object.setPrototypeOf(this,Rp.prototype)}}class Mp extends Fl{constructor(e){super({name:"IncompatiblePolicyException",$fault:"client",...e}),this.name="IncompatiblePolicyException",this.$fault="client",Object.setPrototypeOf(this,Mp.prototype)}}class jp extends Fl{constructor(e){super({name:"InvalidAllowedPatternException",$fault:"client",...e}),this.name="InvalidAllowedPatternException",this.$fault="client",Object.setPrototypeOf(this,jp.prototype)}}class $p extends Fl{constructor(e){super({name:"InvalidPolicyAttributeException",$fault:"client",...e}),this.name="InvalidPolicyAttributeException",this.$fault="client",Object.setPrototypeOf(this,$p.prototype)}}class Np extends Fl{constructor(e){super({name:"InvalidPolicyTypeException",$fault:"client",...e}),this.name="InvalidPolicyTypeException",this.$fault="client",Object.setPrototypeOf(this,Np.prototype)}}class Dp extends Fl{constructor(e){super({name:"ParameterAlreadyExists",$fault:"client",...e}),this.name="ParameterAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,Dp.prototype)}}class Lp extends Fl{constructor(e){super({name:"ParameterLimitExceeded",$fault:"client",...e}),this.name="ParameterLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,Lp.prototype)}}class zp extends Fl{constructor(e){super({name:"ParameterMaxVersionLimitExceeded",$fault:"client",...e}),this.name="ParameterMaxVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,zp.prototype)}}class Fp extends Fl{constructor(e){super({name:"ParameterPatternMismatchException",$fault:"client",...e}),this.name="ParameterPatternMismatchException",this.$fault="client",Object.setPrototypeOf(this,Fp.prototype)}}class Up extends Fl{constructor(e){super({name:"PoliciesLimitExceededException",$fault:"client",...e}),this.name="PoliciesLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Up.prototype)}}class Bp extends Fl{constructor(e){super({name:"UnsupportedParameterType",$fault:"client",...e}),this.name="UnsupportedParameterType",this.$fault="client",Object.setPrototypeOf(this,Bp.prototype)}}class Hp extends Fl{constructor(e){super({name:"ResourcePolicyLimitExceededException",$fault:"client",...e}),this.name="ResourcePolicyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Hp.prototype),this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class qp extends Fl{constructor(e){super({name:"FeatureNotAvailableException",$fault:"client",...e}),this.name="FeatureNotAvailableException",this.$fault="client",Object.setPrototypeOf(this,qp.prototype),this.Message=e.Message}}class Vp extends Fl{constructor(e){super({name:"AutomationStepNotFoundException",$fault:"client",...e}),this.name="AutomationStepNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Vp.prototype),this.Message=e.Message}}class Gp extends Fl{constructor(e){super({name:"InvalidAutomationSignalException",$fault:"client",...e}),this.name="InvalidAutomationSignalException",this.$fault="client",Object.setPrototypeOf(this,Gp.prototype),this.Message=e.Message}}class Wp extends Fl{constructor(e){super({name:"InvalidNotificationConfig",$fault:"client",...e}),this.name="InvalidNotificationConfig",this.$fault="client",Object.setPrototypeOf(this,Wp.prototype),this.Message=e.Message}}class Kp extends Fl{constructor(e){super({name:"InvalidOutputFolder",$fault:"client",...e}),this.name="InvalidOutputFolder",this.$fault="client",Object.setPrototypeOf(this,Kp.prototype)}}class Yp extends Fl{constructor(e){super({name:"InvalidRole",$fault:"client",...e}),this.name="InvalidRole",this.$fault="client",Object.setPrototypeOf(this,Yp.prototype),this.Message=e.Message}}class Qp extends Fl{constructor(e){super({name:"InvalidAssociation",$fault:"client",...e}),this.name="InvalidAssociation",this.$fault="client",Object.setPrototypeOf(this,Qp.prototype),this.Message=e.Message}}class Jp extends Fl{constructor(e){super({name:"AutomationDefinitionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Jp.prototype),this.Message=e.Message}}class Xp extends Fl{constructor(e){super({name:"AutomationDefinitionVersionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionVersionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Xp.prototype),this.Message=e.Message}}class Zp extends Fl{constructor(e){super({name:"AutomationExecutionLimitExceededException",$fault:"client",...e}),this.name="AutomationExecutionLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Zp.prototype),this.Message=e.Message}}class ed extends Fl{constructor(e){super({name:"InvalidAutomationExecutionParametersException",$fault:"client",...e}),this.name="InvalidAutomationExecutionParametersException",this.$fault="client",Object.setPrototypeOf(this,ed.prototype),this.Message=e.Message}}const td=e=>({...e,...e.Value&&{Value:Qt}}),nd=e=>({...e,...e.Parameter&&{Parameter:td(e.Parameter)}}),id=e=>({...e,...e.Parameters&&{Parameters:e.Parameters.map((e=>td(e)))}});class rd extends Fl{constructor(e){super({name:"AutomationDefinitionNotApprovedException",$fault:"client",...e}),this.name="AutomationDefinitionNotApprovedException",this.$fault="client",Object.setPrototypeOf(this,rd.prototype),this.Message=e.Message}}class od extends Fl{constructor(e){super({name:"TargetNotConnected",$fault:"client",...e}),this.name="TargetNotConnected",this.$fault="client",Object.setPrototypeOf(this,od.prototype),this.Message=e.Message}}class sd extends Fl{constructor(e){super({name:"InvalidAutomationStatusUpdateException",$fault:"client",...e}),this.name="InvalidAutomationStatusUpdateException",this.$fault="client",Object.setPrototypeOf(this,sd.prototype),this.Message=e.Message}}class ad extends Fl{constructor(e){super({name:"AssociationVersionLimitExceeded",$fault:"client",...e}),this.name="AssociationVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ad.prototype),this.Message=e.Message}}class cd extends Fl{constructor(e){super({name:"InvalidUpdate",$fault:"client",...e}),this.name="InvalidUpdate",this.$fault="client",Object.setPrototypeOf(this,cd.prototype),this.Message=e.Message}}class ld extends Fl{constructor(e){super({name:"StatusUnchanged",$fault:"client",...e}),this.name="StatusUnchanged",this.$fault="client",Object.setPrototypeOf(this,ld.prototype)}}class ud extends Fl{constructor(e){super({name:"DocumentVersionLimitExceeded",$fault:"client",...e}),this.name="DocumentVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ud.prototype),this.Message=e.Message}}class pd extends Fl{constructor(e){super({name:"DuplicateDocumentContent",$fault:"client",...e}),this.name="DuplicateDocumentContent",this.$fault="client",Object.setPrototypeOf(this,pd.prototype),this.Message=e.Message}}class dd extends Fl{constructor(e){super({name:"DuplicateDocumentVersionName",$fault:"client",...e}),this.name="DuplicateDocumentVersionName",this.$fault="client",Object.setPrototypeOf(this,dd.prototype),this.Message=e.Message}}class md extends Fl{constructor(e){super({name:"OpsMetadataKeyLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataKeyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,md.prototype)}}class hd extends Fl{constructor(e){super({name:"ResourceDataSyncConflictException",$fault:"client",...e}),this.name="ResourceDataSyncConflictException",this.$fault="client",Object.setPrototypeOf(this,hd.prototype),this.Message=e.Message}}const fd=async(e,t)=>{const n=Xh("GetParameter");let i;return i=JSON.stringify(Qn(e)),Jh(t,n,"/",void 0,i)},gd=async(e,t)=>{const n=Xh("GetParameters");let i;return i=JSON.stringify(Qn(e)),Jh(t,n,"/",void 0,i)},yd=async(e,t)=>{if(e.statusCode>=300)return bd(e,t);const n=await Bc(e.body,t);let i={};i=Vh(n);return{$metadata:Yh(e),...i}},vd=async(e,t)=>{if(e.statusCode>=300)return bd(e,t);const n=await Bc(e.body,t);let i={};i=Gh(n);return{$metadata:Yh(e),...i}},bd=async(e,t)=>{const n={...e,body:await Hc(e.body,t)},i=((e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(r=e.headers,o="x-amzn-errortype",Object.keys(r).find((e=>e.toLowerCase()===o.toLowerCase())));var r,o;return void 0!==i?n(e.headers[i]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0})(e,n.body);switch(i){case"InternalServerError":case"com.amazonaws.ssm#InternalServerError":throw await Kd(n);case"InvalidResourceId":case"com.amazonaws.ssm#InvalidResourceId":throw await $m(n);case"InvalidResourceType":case"com.amazonaws.ssm#InvalidResourceType":throw await Nm(n);case"TooManyTagsError":case"com.amazonaws.ssm#TooManyTagsError":throw await $h(n);case"TooManyUpdates":case"com.amazonaws.ssm#TooManyUpdates":throw await Nh(n);case"OpsItemConflictException":case"com.amazonaws.ssm#OpsItemConflictException":throw await Xm(n);case"OpsItemInvalidParameterException":case"com.amazonaws.ssm#OpsItemInvalidParameterException":throw await Zm(n);case"OpsItemLimitExceededException":case"com.amazonaws.ssm#OpsItemLimitExceededException":throw await eh(n);case"OpsItemNotFoundException":case"com.amazonaws.ssm#OpsItemNotFoundException":throw await th(n);case"OpsItemRelatedItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException":throw await nh(n);case"DuplicateInstanceId":case"com.amazonaws.ssm#DuplicateInstanceId":throw await Bd(n);case"InvalidCommandId":case"com.amazonaws.ssm#InvalidCommandId":throw await rm(n);case"InvalidInstanceId":case"com.amazonaws.ssm#InvalidInstanceId":throw await ym(n);case"DoesNotExistException":case"com.amazonaws.ssm#DoesNotExistException":throw await zd(n);case"InvalidParameters":case"com.amazonaws.ssm#InvalidParameters":throw await Am(n);case"AssociationAlreadyExists":case"com.amazonaws.ssm#AssociationAlreadyExists":throw await Ed(n);case"AssociationLimitExceeded":case"com.amazonaws.ssm#AssociationLimitExceeded":throw await Od(n);case"InvalidDocument":case"com.amazonaws.ssm#InvalidDocument":throw await am(n);case"InvalidDocumentVersion":case"com.amazonaws.ssm#InvalidDocumentVersion":throw await dm(n);case"InvalidOutputLocation":case"com.amazonaws.ssm#InvalidOutputLocation":throw await Pm(n);case"InvalidSchedule":case"com.amazonaws.ssm#InvalidSchedule":throw await zm(n);case"InvalidTag":case"com.amazonaws.ssm#InvalidTag":throw await Fm(n);case"InvalidTarget":case"com.amazonaws.ssm#InvalidTarget":throw await Um(n);case"InvalidTargetMaps":case"com.amazonaws.ssm#InvalidTargetMaps":throw await Bm(n);case"UnsupportedPlatformType":case"com.amazonaws.ssm#UnsupportedPlatformType":throw await qh(n);case"DocumentAlreadyExists":case"com.amazonaws.ssm#DocumentAlreadyExists":throw await $d(n);case"DocumentLimitExceeded":case"com.amazonaws.ssm#DocumentLimitExceeded":throw await Nd(n);case"InvalidDocumentContent":case"com.amazonaws.ssm#InvalidDocumentContent":throw await cm(n);case"InvalidDocumentSchemaVersion":case"com.amazonaws.ssm#InvalidDocumentSchemaVersion":throw await um(n);case"MaxDocumentSizeExceeded":case"com.amazonaws.ssm#MaxDocumentSizeExceeded":throw await Ym(n);case"IdempotentParameterMismatch":case"com.amazonaws.ssm#IdempotentParameterMismatch":throw await Gd(n);case"ResourceLimitExceededException":case"com.amazonaws.ssm#ResourceLimitExceededException":throw await _h(n);case"OpsItemAccessDeniedException":case"com.amazonaws.ssm#OpsItemAccessDeniedException":throw await Qm(n);case"OpsItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemAlreadyExistsException":throw await Jm(n);case"OpsMetadataAlreadyExistsException":case"com.amazonaws.ssm#OpsMetadataAlreadyExistsException":throw await rh(n);case"OpsMetadataInvalidArgumentException":case"com.amazonaws.ssm#OpsMetadataInvalidArgumentException":throw await oh(n);case"OpsMetadataLimitExceededException":case"com.amazonaws.ssm#OpsMetadataLimitExceededException":throw await ah(n);case"OpsMetadataTooManyUpdatesException":case"com.amazonaws.ssm#OpsMetadataTooManyUpdatesException":throw await lh(n);case"ResourceDataSyncAlreadyExistsException":case"com.amazonaws.ssm#ResourceDataSyncAlreadyExistsException":throw await vh(n);case"ResourceDataSyncCountExceededException":case"com.amazonaws.ssm#ResourceDataSyncCountExceededException":throw await xh(n);case"ResourceDataSyncInvalidConfigurationException":case"com.amazonaws.ssm#ResourceDataSyncInvalidConfigurationException":throw await wh(n);case"InvalidActivation":case"com.amazonaws.ssm#InvalidActivation":throw await Yd(n);case"InvalidActivationId":case"com.amazonaws.ssm#InvalidActivationId":throw await Qd(n);case"AssociationDoesNotExist":case"com.amazonaws.ssm#AssociationDoesNotExist":throw await Sd(n);case"AssociatedInstances":case"com.amazonaws.ssm#AssociatedInstances":throw await wd(n);case"InvalidDocumentOperation":case"com.amazonaws.ssm#InvalidDocumentOperation":throw await lm(n);case"InvalidDeleteInventoryParametersException":case"com.amazonaws.ssm#InvalidDeleteInventoryParametersException":throw await om(n);case"InvalidInventoryRequestException":case"com.amazonaws.ssm#InvalidInventoryRequestException":throw await Em(n);case"InvalidOptionException":case"com.amazonaws.ssm#InvalidOptionException":throw await km(n);case"InvalidTypeNameException":case"com.amazonaws.ssm#InvalidTypeNameException":throw await Hm(n);case"OpsMetadataNotFoundException":case"com.amazonaws.ssm#OpsMetadataNotFoundException":throw await ch(n);case"ParameterNotFound":case"com.amazonaws.ssm#ParameterNotFound":throw await mh(n);case"ResourceInUseException":case"com.amazonaws.ssm#ResourceInUseException":throw await Sh(n);case"ResourceDataSyncNotFoundException":case"com.amazonaws.ssm#ResourceDataSyncNotFoundException":throw await Eh(n);case"MalformedResourcePolicyDocumentException":case"com.amazonaws.ssm#MalformedResourcePolicyDocumentException":throw await Km(n);case"ResourceNotFoundException":case"com.amazonaws.ssm#ResourceNotFoundException":throw await Oh(n);case"ResourcePolicyConflictException":case"com.amazonaws.ssm#ResourcePolicyConflictException":throw await Ch(n);case"ResourcePolicyInvalidParameterException":case"com.amazonaws.ssm#ResourcePolicyInvalidParameterException":throw await kh(n);case"ResourcePolicyNotFoundException":case"com.amazonaws.ssm#ResourcePolicyNotFoundException":throw await Ph(n);case"TargetInUseException":case"com.amazonaws.ssm#TargetInUseException":throw await Mh(n);case"InvalidFilter":case"com.amazonaws.ssm#InvalidFilter":throw await mm(n);case"InvalidNextToken":case"com.amazonaws.ssm#InvalidNextToken":throw await Om(n);case"InvalidAssociationVersion":case"com.amazonaws.ssm#InvalidAssociationVersion":throw await em(n);case"AssociationExecutionDoesNotExist":case"com.amazonaws.ssm#AssociationExecutionDoesNotExist":throw await _d(n);case"InvalidFilterKey":case"com.amazonaws.ssm#InvalidFilterKey":throw await hm(n);case"InvalidFilterValue":case"com.amazonaws.ssm#InvalidFilterValue":throw await gm(n);case"AutomationExecutionNotFoundException":case"com.amazonaws.ssm#AutomationExecutionNotFoundException":throw await Id(n);case"InvalidPermissionType":case"com.amazonaws.ssm#InvalidPermissionType":throw await Im(n);case"UnsupportedOperatingSystem":case"com.amazonaws.ssm#UnsupportedOperatingSystem":throw await Bh(n);case"InvalidInstanceInformationFilterValue":case"com.amazonaws.ssm#InvalidInstanceInformationFilterValue":throw await vm(n);case"InvalidInstancePropertyFilterValue":case"com.amazonaws.ssm#InvalidInstancePropertyFilterValue":throw await bm(n);case"InvalidDeletionIdException":case"com.amazonaws.ssm#InvalidDeletionIdException":throw await sm(n);case"InvalidFilterOption":case"com.amazonaws.ssm#InvalidFilterOption":throw await fm(n);case"OpsItemRelatedItemAssociationNotFoundException":case"com.amazonaws.ssm#OpsItemRelatedItemAssociationNotFoundException":throw await ih(n);case"InvalidDocumentType":case"com.amazonaws.ssm#InvalidDocumentType":throw await pm(n);case"UnsupportedCalendarException":case"com.amazonaws.ssm#UnsupportedCalendarException":throw await Lh(n);case"InvalidPluginName":case"com.amazonaws.ssm#InvalidPluginName":throw await Rm(n);case"InvocationDoesNotExist":case"com.amazonaws.ssm#InvocationDoesNotExist":throw await Vm(n);case"UnsupportedFeatureRequiredException":case"com.amazonaws.ssm#UnsupportedFeatureRequiredException":throw await zh(n);case"InvalidAggregatorException":case"com.amazonaws.ssm#InvalidAggregatorException":throw await Jd(n);case"InvalidInventoryGroupException":case"com.amazonaws.ssm#InvalidInventoryGroupException":throw await xm(n);case"InvalidResultAttributeException":case"com.amazonaws.ssm#InvalidResultAttributeException":throw await Dm(n);case"InvalidKeyId":case"com.amazonaws.ssm#InvalidKeyId":throw await _m(n);case"ParameterVersionNotFound":case"com.amazonaws.ssm#ParameterVersionNotFound":throw await gh(n);case"ServiceSettingNotFound":case"com.amazonaws.ssm#ServiceSettingNotFound":throw await Ah(n);case"ParameterVersionLabelLimitExceeded":case"com.amazonaws.ssm#ParameterVersionLabelLimitExceeded":throw await fh(n);case"DocumentPermissionLimit":case"com.amazonaws.ssm#DocumentPermissionLimit":throw await Dd(n);case"ComplianceTypeCountLimitExceededException":case"com.amazonaws.ssm#ComplianceTypeCountLimitExceededException":throw await Md(n);case"InvalidItemContentException":case"com.amazonaws.ssm#InvalidItemContentException":throw await Sm(n);case"ItemSizeLimitExceededException":case"com.amazonaws.ssm#ItemSizeLimitExceededException":throw await Wm(n);case"TotalSizeLimitExceededException":case"com.amazonaws.ssm#TotalSizeLimitExceededException":throw await Dh(n);case"CustomSchemaCountLimitExceededException":case"com.amazonaws.ssm#CustomSchemaCountLimitExceededException":throw await jd(n);case"InvalidInventoryItemContextException":case"com.amazonaws.ssm#InvalidInventoryItemContextException":throw await wm(n);case"ItemContentMismatchException":case"com.amazonaws.ssm#ItemContentMismatchException":throw await Gm(n);case"SubTypeCountLimitExceededException":case"com.amazonaws.ssm#SubTypeCountLimitExceededException":throw await Rh(n);case"UnsupportedInventoryItemContextException":case"com.amazonaws.ssm#UnsupportedInventoryItemContextException":throw await Fh(n);case"UnsupportedInventorySchemaVersionException":case"com.amazonaws.ssm#UnsupportedInventorySchemaVersionException":throw await Uh(n);case"HierarchyLevelLimitExceededException":case"com.amazonaws.ssm#HierarchyLevelLimitExceededException":throw await qd(n);case"HierarchyTypeMismatchException":case"com.amazonaws.ssm#HierarchyTypeMismatchException":throw await Vd(n);case"IncompatiblePolicyException":case"com.amazonaws.ssm#IncompatiblePolicyException":throw await Wd(n);case"InvalidAllowedPatternException":case"com.amazonaws.ssm#InvalidAllowedPatternException":throw await Xd(n);case"InvalidPolicyAttributeException":case"com.amazonaws.ssm#InvalidPolicyAttributeException":throw await Mm(n);case"InvalidPolicyTypeException":case"com.amazonaws.ssm#InvalidPolicyTypeException":throw await jm(n);case"ParameterAlreadyExists":case"com.amazonaws.ssm#ParameterAlreadyExists":throw await uh(n);case"ParameterLimitExceeded":case"com.amazonaws.ssm#ParameterLimitExceeded":throw await ph(n);case"ParameterMaxVersionLimitExceeded":case"com.amazonaws.ssm#ParameterMaxVersionLimitExceeded":throw await dh(n);case"ParameterPatternMismatchException":case"com.amazonaws.ssm#ParameterPatternMismatchException":throw await hh(n);case"PoliciesLimitExceededException":case"com.amazonaws.ssm#PoliciesLimitExceededException":throw await yh(n);case"UnsupportedParameterType":case"com.amazonaws.ssm#UnsupportedParameterType":throw await Hh(n);case"ResourcePolicyLimitExceededException":case"com.amazonaws.ssm#ResourcePolicyLimitExceededException":throw await Th(n);case"AlreadyExistsException":case"com.amazonaws.ssm#AlreadyExistsException":throw await xd(n);case"FeatureNotAvailableException":case"com.amazonaws.ssm#FeatureNotAvailableException":throw await Hd(n);case"AutomationStepNotFoundException":case"com.amazonaws.ssm#AutomationStepNotFoundException":throw await Rd(n);case"InvalidAutomationSignalException":case"com.amazonaws.ssm#InvalidAutomationSignalException":throw await nm(n);case"InvalidNotificationConfig":case"com.amazonaws.ssm#InvalidNotificationConfig":throw await Cm(n);case"InvalidOutputFolder":case"com.amazonaws.ssm#InvalidOutputFolder":throw await Tm(n);case"InvalidRole":case"com.amazonaws.ssm#InvalidRole":throw await Lm(n);case"InvalidAssociation":case"com.amazonaws.ssm#InvalidAssociation":throw await Zd(n);case"AutomationDefinitionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionNotFoundException":throw await Td(n);case"AutomationDefinitionVersionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionVersionNotFoundException":throw await Pd(n);case"AutomationExecutionLimitExceededException":case"com.amazonaws.ssm#AutomationExecutionLimitExceededException":throw await Ad(n);case"InvalidAutomationExecutionParametersException":case"com.amazonaws.ssm#InvalidAutomationExecutionParametersException":throw await tm(n);case"AutomationDefinitionNotApprovedException":case"com.amazonaws.ssm#AutomationDefinitionNotApprovedException":throw await kd(n);case"TargetNotConnected":case"com.amazonaws.ssm#TargetNotConnected":throw await jh(n);case"InvalidAutomationStatusUpdateException":case"com.amazonaws.ssm#InvalidAutomationStatusUpdateException":throw await im(n);case"AssociationVersionLimitExceeded":case"com.amazonaws.ssm#AssociationVersionLimitExceeded":throw await Cd(n);case"InvalidUpdate":case"com.amazonaws.ssm#InvalidUpdate":throw await qm(n);case"StatusUnchanged":case"com.amazonaws.ssm#StatusUnchanged":throw await Ih(n);case"DocumentVersionLimitExceeded":case"com.amazonaws.ssm#DocumentVersionLimitExceeded":throw await Ld(n);case"DuplicateDocumentContent":case"com.amazonaws.ssm#DuplicateDocumentContent":throw await Fd(n);case"DuplicateDocumentVersionName":case"com.amazonaws.ssm#DuplicateDocumentVersionName":throw await Ud(n);case"OpsMetadataKeyLimitExceededException":case"com.amazonaws.ssm#OpsMetadataKeyLimitExceededException":throw await sh(n);case"ResourceDataSyncConflictException":case"com.amazonaws.ssm#ResourceDataSyncConflictException":throw await bh(n);default:const t=n.body;return Qh({output:e,parsedBody:t,errorCode:i})}},xd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Gl({$metadata:Yh(e),...i});return Tn(r,n)},wd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ru({$metadata:Yh(e),...i});return Tn(r,n)},Ed=async(e,t)=>{const n=e.body,i=Qn(n),r=new iu({$metadata:Yh(e),...i});return Tn(r,n)},Sd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Iu({$metadata:Yh(e),...i});return Tn(r,n)},_d=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ju({$metadata:Yh(e),...i});return Tn(r,n)},Od=async(e,t)=>{const n=e.body,i=Qn(n),r=new ru({$metadata:Yh(e),...i});return Tn(r,n)},Cd=async(e,t)=>{const n=e.body,i=Qn(n),r=new ad({$metadata:Yh(e),...i});return Tn(r,n)},kd=async(e,t)=>{const n=e.body,i=Qn(n),r=new rd({$metadata:Yh(e),...i});return Tn(r,n)},Td=async(e,t)=>{const n=e.body,i=Qn(n),r=new Jp({$metadata:Yh(e),...i});return Tn(r,n)},Pd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Xp({$metadata:Yh(e),...i});return Tn(r,n)},Ad=async(e,t)=>{const n=e.body,i=Qn(n),r=new Zp({$metadata:Yh(e),...i});return Tn(r,n)},Id=async(e,t)=>{const n=e.body,i=Qn(n),r=new ep({$metadata:Yh(e),...i});return Tn(r,n)},Rd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Vp({$metadata:Yh(e),...i});return Tn(r,n)},Md=async(e,t)=>{const n=e.body,i=Qn(n),r=new wp({$metadata:Yh(e),...i});return Tn(r,n)},jd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Op({$metadata:Yh(e),...i});return Tn(r,n)},$d=async(e,t)=>{const n=e.body,i=Qn(n),r=new mu({$metadata:Yh(e),...i});return Tn(r,n)},Nd=async(e,t)=>{const n=e.body,i=Qn(n),r=new hu({$metadata:Yh(e),...i});return Tn(r,n)},Dd=async(e,t)=>{const n=e.body,i=Qn(n),r=new xp({$metadata:Yh(e),...i});return Tn(r,n)},Ld=async(e,t)=>{const n=e.body,i=Qn(n),r=new ud({$metadata:Yh(e),...i});return Tn(r,n)},zd=async(e,t)=>{const n=e.body,i=Qn(n),r=new tu({$metadata:Yh(e),...i});return Tn(r,n)},Fd=async(e,t)=>{const n=e.body,i=Qn(n),r=new pd({$metadata:Yh(e),...i});return Tn(r,n)},Ud=async(e,t)=>{const n=e.body,i=Qn(n),r=new dd({$metadata:Yh(e),...i});return Tn(r,n)},Bd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Xl({$metadata:Yh(e),...i});return Tn(r,n)},Hd=async(e,t)=>{const n=e.body,i=Qn(n),r=new qp({$metadata:Yh(e),...i});return Tn(r,n)},qd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ip({$metadata:Yh(e),...i});return Tn(r,n)},Vd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Rp({$metadata:Yh(e),...i});return Tn(r,n)},Gd=async(e,t)=>{const n=e.body,i=Qn(n),r=new vu({$metadata:Yh(e),...i});return Tn(r,n)},Wd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Mp({$metadata:Yh(e),...i});return Tn(r,n)},Kd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ul({$metadata:Yh(e),...i});return Tn(r,n)},Yd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Pu({$metadata:Yh(e),...i});return Tn(r,n)},Qd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Au({$metadata:Yh(e),...i});return Tn(r,n)},Jd=async(e,t)=>{const n=e.body,i=Qn(n),r=new mp({$metadata:Yh(e),...i});return Tn(r,n)},Xd=async(e,t)=>{const n=e.body,i=Qn(n),r=new jp({$metadata:Yh(e),...i});return Tn(r,n)},Zd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Qp({$metadata:Yh(e),...i});return Tn(r,n)},em=async(e,t)=>{const n=e.body,i=Qn(n),r=new Qu({$metadata:Yh(e),...i});return Tn(r,n)},tm=async(e,t)=>{const n=e.body,i=Qn(n),r=new ed({$metadata:Yh(e),...i});return Tn(r,n)},nm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Gp({$metadata:Yh(e),...i});return Tn(r,n)},im=async(e,t)=>{const n=e.body,i=Qn(n),r=new sd({$metadata:Yh(e),...i});return Tn(r,n)},rm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Zl({$metadata:Yh(e),...i});return Tn(r,n)},om=async(e,t)=>{const n=e.body,i=Qn(n),r=new ju({$metadata:Yh(e),...i});return Tn(r,n)},sm=async(e,t)=>{const n=e.body,i=Qn(n),r=new op({$metadata:Yh(e),...i});return Tn(r,n)},am=async(e,t)=>{const n=e.body,i=Qn(n),r=new ou({$metadata:Yh(e),...i});return Tn(r,n)},cm=async(e,t)=>{const n=e.body,i=Qn(n),r=new fu({$metadata:Yh(e),...i});return Tn(r,n)},lm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Mu({$metadata:Yh(e),...i});return Tn(r,n)},um=async(e,t)=>{const n=e.body,i=Qn(n),r=new gu({$metadata:Yh(e),...i});return Tn(r,n)},pm=async(e,t)=>{const n=e.body,i=Qn(n),r=new cp({$metadata:Yh(e),...i});return Tn(r,n)},dm=async(e,t)=>{const n=e.body,i=Qn(n),r=new su({$metadata:Yh(e),...i});return Tn(r,n)},mm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ku({$metadata:Yh(e),...i});return Tn(r,n)},hm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Xu({$metadata:Yh(e),...i});return Tn(r,n)},fm=async(e,t)=>{const n=e.body,i=Qn(n),r=new sp({$metadata:Yh(e),...i});return Tn(r,n)},gm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Zu({$metadata:Yh(e),...i});return Tn(r,n)},ym=async(e,t)=>{const n=e.body,i=Qn(n),r=new eu({$metadata:Yh(e),...i});return Tn(r,n)},vm=async(e,t)=>{const n=e.body,i=Qn(n),r=new ip({$metadata:Yh(e),...i});return Tn(r,n)},bm=async(e,t)=>{const n=e.body,i=Qn(n),r=new rp({$metadata:Yh(e),...i});return Tn(r,n)},xm=async(e,t)=>{const n=e.body,i=Qn(n),r=new hp({$metadata:Yh(e),...i});return Tn(r,n)},wm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Cp({$metadata:Yh(e),...i});return Tn(r,n)},Em=async(e,t)=>{const n=e.body,i=Qn(n),r=new $u({$metadata:Yh(e),...i});return Tn(r,n)},Sm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ep({$metadata:Yh(e),...i});return Tn(r,n)},_m=async(e,t)=>{const n=e.body,i=Qn(n),r=new gp({$metadata:Yh(e),...i});return Tn(r,n)},Om=async(e,t)=>{const n=e.body,i=Qn(n),r=new Yu({$metadata:Yh(e),...i});return Tn(r,n)},Cm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Wp({$metadata:Yh(e),...i});return Tn(r,n)},km=async(e,t)=>{const n=e.body,i=Qn(n),r=new Nu({$metadata:Yh(e),...i});return Tn(r,n)},Tm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Kp({$metadata:Yh(e),...i});return Tn(r,n)},Pm=async(e,t)=>{const n=e.body,i=Qn(n),r=new au({$metadata:Yh(e),...i});return Tn(r,n)},Am=async(e,t)=>{const n=e.body,i=Qn(n),r=new nu({$metadata:Yh(e),...i});return Tn(r,n)},Im=async(e,t)=>{const n=e.body,i=Qn(n),r=new tp({$metadata:Yh(e),...i});return Tn(r,n)},Rm=async(e,t)=>{const n=e.body,i=Qn(n),r=new up({$metadata:Yh(e),...i});return Tn(r,n)},Mm=async(e,t)=>{const n=e.body,i=Qn(n),r=new $p({$metadata:Yh(e),...i});return Tn(r,n)},jm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Np({$metadata:Yh(e),...i});return Tn(r,n)},$m=async(e,t)=>{const n=e.body,i=Qn(n),r=new Bl({$metadata:Yh(e),...i});return Tn(r,n)},Nm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Hl({$metadata:Yh(e),...i});return Tn(r,n)},Dm=async(e,t)=>{const n=e.body,i=Qn(n),r=new fp({$metadata:Yh(e),...i});return Tn(r,n)},Lm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Yp({$metadata:Yh(e),...i});return Tn(r,n)},zm=async(e,t)=>{const n=e.body,i=Qn(n),r=new cu({$metadata:Yh(e),...i});return Tn(r,n)},Fm=async(e,t)=>{const n=e.body,i=Qn(n),r=new lu({$metadata:Yh(e),...i});return Tn(r,n)},Um=async(e,t)=>{const n=e.body,i=Qn(n),r=new uu({$metadata:Yh(e),...i});return Tn(r,n)},Bm=async(e,t)=>{const n=e.body,i=Qn(n),r=new pu({$metadata:Yh(e),...i});return Tn(r,n)},Hm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Du({$metadata:Yh(e),...i});return Tn(r,n)},qm=async(e,t)=>{const n=e.body,i=Qn(n),r=new cd({$metadata:Yh(e),...i});return Tn(r,n)},Vm=async(e,t)=>{const n=e.body,i=Qn(n),r=new pp({$metadata:Yh(e),...i});return Tn(r,n)},Gm=async(e,t)=>{const n=e.body,i=Qn(n),r=new kp({$metadata:Yh(e),...i});return Tn(r,n)},Wm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Sp({$metadata:Yh(e),...i});return Tn(r,n)},Km=async(e,t)=>{const n=e.body,i=Qn(n),r=new Bu({$metadata:Yh(e),...i});return Tn(r,n)},Ym=async(e,t)=>{const n=e.body,i=Qn(n),r=new yu({$metadata:Yh(e),...i});return Tn(r,n)},Qm=async(e,t)=>{const n=e.body,i=Qn(n),r=new xu({$metadata:Yh(e),...i});return Tn(r,n)},Jm=async(e,t)=>{const n=e.body,i=Qn(n),r=new wu({$metadata:Yh(e),...i});return Tn(r,n)},Xm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Wl({$metadata:Yh(e),...i});return Tn(r,n)},Zm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Kl({$metadata:Yh(e),...i});return Tn(r,n)},eh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Yl({$metadata:Yh(e),...i});return Tn(r,n)},th=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ql({$metadata:Yh(e),...i});return Tn(r,n)},nh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Jl({$metadata:Yh(e),...i});return Tn(r,n)},ih=async(e,t)=>{const n=e.body,i=Qn(n),r=new ap({$metadata:Yh(e),...i});return Tn(r,n)},rh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Eu({$metadata:Yh(e),...i});return Tn(r,n)},oh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Su({$metadata:Yh(e),...i});return Tn(r,n)},sh=async(e,t)=>{const n=e.body,i=Qn(n),r=new md({$metadata:Yh(e),...i});return Tn(r,n)},ah=async(e,t)=>{const n=e.body,i=Qn(n),r=new _u({$metadata:Yh(e),...i});return Tn(r,n)},ch=async(e,t)=>{const n=e.body,i=Qn(n),r=new Lu({$metadata:Yh(e),...i});return Tn(r,n)},lh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ou({$metadata:Yh(e),...i});return Tn(r,n)},uh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Dp({$metadata:Yh(e),...i});return Tn(r,n)},ph=async(e,t)=>{const n=e.body,i=Qn(n),r=new Lp({$metadata:Yh(e),...i});return Tn(r,n)},dh=async(e,t)=>{const n=e.body,i=Qn(n),r=new zp({$metadata:Yh(e),...i});return Tn(r,n)},mh=async(e,t)=>{const n=e.body,i=Qn(n),r=new zu({$metadata:Yh(e),...i});return Tn(r,n)},hh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Fp({$metadata:Yh(e),...i});return Tn(r,n)},fh=async(e,t)=>{const n=e.body,i=Qn(n),r=new bp({$metadata:Yh(e),...i});return Tn(r,n)},gh=async(e,t)=>{const n=e.body,i=Qn(n),r=new yp({$metadata:Yh(e),...i});return Tn(r,n)},yh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Up({$metadata:Yh(e),...i});return Tn(r,n)},vh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Cu({$metadata:Yh(e),...i});return Tn(r,n)},bh=async(e,t)=>{const n=e.body,i=Qn(n),r=new hd({$metadata:Yh(e),...i});return Tn(r,n)},xh=async(e,t)=>{const n=e.body,i=Qn(n),r=new ku({$metadata:Yh(e),...i});return Tn(r,n)},wh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Tu({$metadata:Yh(e),...i});return Tn(r,n)},Eh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Uu({$metadata:Yh(e),...i});return Tn(r,n)},Sh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Fu({$metadata:Yh(e),...i});return Tn(r,n)},_h=async(e,t)=>{const n=e.body,i=Qn(n),r=new bu({$metadata:Yh(e),...i});return Tn(r,n)},Oh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Hu({$metadata:Yh(e),...i});return Tn(r,n)},Ch=async(e,t)=>{const n=e.body,i=Qn(n),r=new qu({$metadata:Yh(e),...i});return Tn(r,n)},kh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Vu({$metadata:Yh(e),...i});return Tn(r,n)},Th=async(e,t)=>{const n=e.body,i=Qn(n),r=new Hp({$metadata:Yh(e),...i});return Tn(r,n)},Ph=async(e,t)=>{const n=e.body,i=Qn(n),r=new Gu({$metadata:Yh(e),...i});return Tn(r,n)},Ah=async(e,t)=>{const n=e.body,i=Qn(n),r=new vp({$metadata:Yh(e),...i});return Tn(r,n)},Ih=async(e,t)=>{const n=e.body,i=Qn(n),r=new ld({$metadata:Yh(e),...i});return Tn(r,n)},Rh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Tp({$metadata:Yh(e),...i});return Tn(r,n)},Mh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Wu({$metadata:Yh(e),...i});return Tn(r,n)},jh=async(e,t)=>{const n=e.body,i=Qn(n),r=new od({$metadata:Yh(e),...i});return Tn(r,n)},$h=async(e,t)=>{const n=e.body,i=Qn(n),r=new ql({$metadata:Yh(e),...i});return Tn(r,n)},Nh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Vl({$metadata:Yh(e),...i});return Tn(r,n)},Dh=async(e,t)=>{const n=e.body,i=Qn(n),r=new _p({$metadata:Yh(e),...i});return Tn(r,n)},Lh=async(e,t)=>{const n=e.body,i=Qn(n),r=new lp({$metadata:Yh(e),...i});return Tn(r,n)},zh=async(e,t)=>{const n=e.body,i=Qn(n),r=new dp({$metadata:Yh(e),...i});return Tn(r,n)},Fh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Pp({$metadata:Yh(e),...i});return Tn(r,n)},Uh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ap({$metadata:Yh(e),...i});return Tn(r,n)},Bh=async(e,t)=>{const n=e.body,i=Qn(n),r=new np({$metadata:Yh(e),...i});return Tn(r,n)},Hh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Bp({$metadata:Yh(e),...i});return Tn(r,n)},qh=async(e,t)=>{const n=e.body,i=Qn(n),r=new du({$metadata:Yh(e),...i});return Tn(r,n)},Vh=(e,t)=>qn(e,{Parameter:e=>Wh(e)}),Gh=(e,t)=>qn(e,{InvalidParameters:Qn,Parameters:e=>Kh(e)}),Wh=(e,t)=>qn(e,{ARN:cn,DataType:cn,LastModifiedDate:e=>an((e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=ln(e);else{if("object"!=typeof e||1!==e.tag)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=e.value}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(1e3*t))})(Xt(e))),Name:cn,Selector:cn,SourceResult:cn,Type:cn,Value:cn,Version:tn}),Kh=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>Wh(e)));return n},Yh=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"]}),Qh=Pn(Fl),Jh=async(e,t,n,i,r)=>{const{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),l={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(l.body=r),new T(l)};function Xh(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AmazonSSM.${e}`}}class Zh extends(Kt.classBuilder().ep(tl).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameter",{}).n("SSMClient","GetParameterCommand").f(void 0,nd).ser(fd).de(yd).build()){}class ef extends(Kt.classBuilder().ep(tl).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameters",{}).n("SSMClient","GetParametersCommand").f(void 0,id).ser(gd).de(vd).build()){}const tf={clientConfig:Cc,onlyDefault:!1,prefix:process.env.SSM_PARAM_PATH},nf=async(e,t,n)=>({operation:D(t).operation,region:await L(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const rf=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ses",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},of={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var sf="3.687.0";const af="required",cf="fn",lf="argv",uf="ref",pf=!0,df="isSet",mf="booleanEquals",hf="error",ff="endpoint",gf="tree",yf="PartitionResult",vf={[af]:!1,type:"String"},bf={[af]:!0,default:!1,type:"Boolean"},xf={[uf]:"Endpoint"},wf={[cf]:mf,[lf]:[{[uf]:"UseFIPS"},!0]},Ef={[cf]:mf,[lf]:[{[uf]:"UseDualStack"},!0]},Sf={},_f={[cf]:"getAttr",[lf]:[{[uf]:yf},"supportsFIPS"]},Of={[cf]:mf,[lf]:[!0,{[cf]:"getAttr",[lf]:[{[uf]:yf},"supportsDualStack"]}]},Cf=[wf],kf=[Ef],Tf=[{[uf]:"Region"}],Pf={version:"1.0",parameters:{Region:vf,UseDualStack:bf,UseFIPS:bf,Endpoint:vf},rules:[{conditions:[{[cf]:df,[lf]:[xf]}],rules:[{conditions:Cf,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:hf},{conditions:kf,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:hf},{endpoint:{url:xf,properties:Sf,headers:Sf},type:ff}],type:gf},{conditions:[{[cf]:df,[lf]:Tf}],rules:[{conditions:[{[cf]:"aws.partition",[lf]:Tf,assign:yf}],rules:[{conditions:[wf,Ef],rules:[{conditions:[{[cf]:mf,[lf]:[pf,_f]},Of],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:hf}],type:gf},{conditions:Cf,rules:[{conditions:[{[cf]:mf,[lf]:[_f,pf]}],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf},{error:"FIPS is enabled but this partition does not support FIPS",type:hf}],type:gf},{conditions:kf,rules:[{conditions:[Of],rules:[{endpoint:{url:"https://email.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf},{error:"DualStack is enabled but this partition does not support DualStack",type:hf}],type:gf},{endpoint:{url:"https://email.{Region}.{PartitionResult#dnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf}],type:gf},{error:"Invalid Configuration: Missing Region",type:hf}]},Af=new Te({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),If=(e,t={})=>Af.get(e,(()=>Ze(Pf,{endpointParams:e,logger:t.logger})));Me.aws=nt;const Rf=e=>{const t=ys(e),n=()=>t().then(In),i=(e=>({apiVersion:"2010-12-01",base64Decoder:e?.base64Decoder??te,base64Encoder:e?.base64Encoder??oe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??If,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??rf,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ct}],logger:e?.logger??new Bn,serviceId:e?.serviceId??"SES",urlParser:e?.urlParser??ar,utf8Decoder:e?.utf8Decoder??ne,utf8Encoder:e?.utf8Encoder??re}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??fo({serviceId:i.serviceId,clientVersion:sf}),maxAttempts:e?.maxAttempts??3,region:e?.region??Bo("Region is missing"),requestHandler:de.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||fr),sha256:e?.sha256??uo,streamCollector:e?.streamCollector??me,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Gi)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Wi))}},Mf=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}},jf=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class $f extends Wt{constructor(...[e]){const t=Rf(e||{});var n;const i=ke((n=t,{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"ses"})),r=Rr(i),o=Qi(r),s=(e=>({...Ut(e)}))(mr(o)),a=((e,t)=>{const n={...xs(e),...Nn(e),...v(e),...Mf(e)};return t.forEach((e=>e.configure(n))),{...e,...ws(n),...Dn(n),...b(n),...jf(n)}})(s,e?.extensions||[]);super(a),this.config=a,this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(Lr(this.config)),this.middlewareStack.use(Zi(this.config)),this.middlewareStack.use(I(this.config)),this.middlewareStack.use(M(this.config)),this.middlewareStack.use(N(this.config)),this.middlewareStack.use(U(this.config,{httpAuthSchemeParametersProvider:nf,identityProviderConfigProvider:async e=>new Ee({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(K(this.config))}destroy(){super.destroy()}}class Nf extends kn{constructor(e){super(e),Object.setPrototypeOf(this,Nf.prototype)}}class Df extends Nf{constructor(e){super({name:"AccountSendingPausedException",$fault:"client",...e}),this.name="AccountSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,Df.prototype)}}class Lf extends Nf{constructor(e){super({name:"AlreadyExistsException",$fault:"client",...e}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Lf.prototype),this.Name=e.Name}}class zf extends Nf{constructor(e){super({name:"CannotDeleteException",$fault:"client",...e}),this.name="CannotDeleteException",this.$fault="client",Object.setPrototypeOf(this,zf.prototype),this.Name=e.Name}}class Ff extends Nf{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ff.prototype)}}class Uf extends Nf{constructor(e){super({name:"RuleSetDoesNotExistException",$fault:"client",...e}),this.name="RuleSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Uf.prototype),this.Name=e.Name}}class Bf extends Nf{constructor(e){super({name:"ConfigurationSetAlreadyExistsException",$fault:"client",...e}),this.name="ConfigurationSetAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Bf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Hf extends Nf{constructor(e){super({name:"ConfigurationSetDoesNotExistException",$fault:"client",...e}),this.name="ConfigurationSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Hf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class qf extends Nf{constructor(e){super({name:"ConfigurationSetSendingPausedException",$fault:"client",...e}),this.name="ConfigurationSetSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,qf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Vf extends Nf{constructor(e){super({name:"InvalidConfigurationSetException",$fault:"client",...e}),this.name="InvalidConfigurationSetException",this.$fault="client",Object.setPrototypeOf(this,Vf.prototype)}}class Gf extends Nf{constructor(e){super({name:"EventDestinationAlreadyExistsException",$fault:"client",...e}),this.name="EventDestinationAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Gf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Wf extends Nf{constructor(e){super({name:"InvalidCloudWatchDestinationException",$fault:"client",...e}),this.name="InvalidCloudWatchDestinationException",this.$fault="client",Object.setPrototypeOf(this,Wf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Kf extends Nf{constructor(e){super({name:"InvalidFirehoseDestinationException",$fault:"client",...e}),this.name="InvalidFirehoseDestinationException",this.$fault="client",Object.setPrototypeOf(this,Kf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Yf extends Nf{constructor(e){super({name:"InvalidSNSDestinationException",$fault:"client",...e}),this.name="InvalidSNSDestinationException",this.$fault="client",Object.setPrototypeOf(this,Yf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Qf extends Nf{constructor(e){super({name:"InvalidTrackingOptionsException",$fault:"client",...e}),this.name="InvalidTrackingOptionsException",this.$fault="client",Object.setPrototypeOf(this,Qf.prototype)}}class Jf extends Nf{constructor(e){super({name:"TrackingOptionsAlreadyExistsException",$fault:"client",...e}),this.name="TrackingOptionsAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Jf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Xf extends Nf{constructor(e){super({name:"CustomVerificationEmailInvalidContentException",$fault:"client",...e}),this.name="CustomVerificationEmailInvalidContentException",this.$fault="client",Object.setPrototypeOf(this,Xf.prototype)}}class Zf extends Nf{constructor(e){super({name:"CustomVerificationEmailTemplateAlreadyExistsException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Zf.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class eg extends Nf{constructor(e){super({name:"FromEmailAddressNotVerifiedException",$fault:"client",...e}),this.name="FromEmailAddressNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,eg.prototype),this.FromEmailAddress=e.FromEmailAddress}}class tg extends Nf{constructor(e){super({name:"InvalidLambdaFunctionException",$fault:"client",...e}),this.name="InvalidLambdaFunctionException",this.$fault="client",Object.setPrototypeOf(this,tg.prototype),this.FunctionArn=e.FunctionArn}}class ng extends Nf{constructor(e){super({name:"InvalidS3ConfigurationException",$fault:"client",...e}),this.name="InvalidS3ConfigurationException",this.$fault="client",Object.setPrototypeOf(this,ng.prototype),this.Bucket=e.Bucket}}class ig extends Nf{constructor(e){super({name:"InvalidSnsTopicException",$fault:"client",...e}),this.name="InvalidSnsTopicException",this.$fault="client",Object.setPrototypeOf(this,ig.prototype),this.Topic=e.Topic}}class rg extends Nf{constructor(e){super({name:"RuleDoesNotExistException",$fault:"client",...e}),this.name="RuleDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,rg.prototype),this.Name=e.Name}}class og extends Nf{constructor(e){super({name:"InvalidTemplateException",$fault:"client",...e}),this.name="InvalidTemplateException",this.$fault="client",Object.setPrototypeOf(this,og.prototype),this.TemplateName=e.TemplateName}}class sg extends Nf{constructor(e){super({name:"CustomVerificationEmailTemplateDoesNotExistException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,sg.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class ag extends Nf{constructor(e){super({name:"EventDestinationDoesNotExistException",$fault:"client",...e}),this.name="EventDestinationDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,ag.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class cg extends Nf{constructor(e){super({name:"TrackingOptionsDoesNotExistException",$fault:"client",...e}),this.name="TrackingOptionsDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,cg.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class lg extends Nf{constructor(e){super({name:"TemplateDoesNotExistException",$fault:"client",...e}),this.name="TemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,lg.prototype),this.TemplateName=e.TemplateName}}class ug extends Nf{constructor(e){super({name:"InvalidDeliveryOptionsException",$fault:"client",...e}),this.name="InvalidDeliveryOptionsException",this.$fault="client",Object.setPrototypeOf(this,ug.prototype)}}class pg extends Nf{constructor(e){super({name:"InvalidPolicyException",$fault:"client",...e}),this.name="InvalidPolicyException",this.$fault="client",Object.setPrototypeOf(this,pg.prototype)}}class dg extends Nf{constructor(e){super({name:"InvalidRenderingParameterException",$fault:"client",...e}),this.name="InvalidRenderingParameterException",this.$fault="client",Object.setPrototypeOf(this,dg.prototype),this.TemplateName=e.TemplateName}}class mg extends Nf{constructor(e){super({name:"MailFromDomainNotVerifiedException",$fault:"client",...e}),this.name="MailFromDomainNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,mg.prototype)}}class hg extends Nf{constructor(e){super({name:"MessageRejected",$fault:"client",...e}),this.name="MessageRejected",this.$fault="client",Object.setPrototypeOf(this,hg.prototype)}}class fg extends Nf{constructor(e){super({name:"MissingRenderingAttributeException",$fault:"client",...e}),this.name="MissingRenderingAttributeException",this.$fault="client",Object.setPrototypeOf(this,fg.prototype),this.TemplateName=e.TemplateName}}class gg extends Nf{constructor(e){super({name:"ProductionAccessNotGrantedException",$fault:"client",...e}),this.name="ProductionAccessNotGrantedException",this.$fault="client",Object.setPrototypeOf(this,gg.prototype)}}const yg=async(e,t)=>{const n=GS;let i;return i=TT({...$b(e),[KS]:x_,[hT]:WS}),VS(t,n,"/",void 0,i)},vg=async(e,t)=>{const n=GS;let i;return i=TT({...Fb(e),[KS]:m_,[hT]:WS}),VS(t,n,"/",void 0,i)},bg=async(e,t)=>{const n=GS;let i;return i=TT({...zb(e),[KS]:h_,[hT]:WS}),VS(t,n,"/",void 0,i)},xg=async(e,t)=>{const n=GS;let i;return i=TT({...Ub(e),[KS]:f_,[hT]:WS}),VS(t,n,"/",void 0,i)},wg=async(e,t)=>{const n=GS;let i;return i=TT({...Bb(e),[KS]:g_,[hT]:WS}),VS(t,n,"/",void 0,i)},Eg=async(e,t)=>{const n=GS;let i;return i=TT({...Hb(e),[KS]:v_,[hT]:WS}),VS(t,n,"/",void 0,i)},Sg=async(e,t)=>{const n=GS;let i;return i=TT({...qb(e),[KS]:b_,[hT]:WS}),VS(t,n,"/",void 0,i)},_g=async(e,t)=>{const n=GS;let i;return i=TT({...Vb(e),[KS]:w_,[hT]:WS}),VS(t,n,"/",void 0,i)},Og=async(e,t)=>{const n=GS;let i;return i=TT({...Gb(e),[KS]:C_,[hT]:WS}),VS(t,n,"/",void 0,i)},Cg=async(e,t)=>{const n=GS;let i;return i=TT({...Kb(e),[KS]:z_,[hT]:WS}),VS(t,n,"/",void 0,i)},kg=async(e,t)=>{const n=GS;let i;return i=TT({...Wb(e),[KS]:F_,[hT]:WS}),VS(t,n,"/",void 0,i)},Tg=async(e,t)=>{const n=GS;let i;return i=TT({...Yb(e),[KS]:U_,[hT]:WS}),VS(t,n,"/",void 0,i)},Pg=async(e,t)=>{const n=GS;let i;return i=TT({...Qb(e),[KS]:H_,[hT]:WS}),VS(t,n,"/",void 0,i)},Ag=async(e,t)=>{const n=GS;let i;return i=TT({...Xb(e),[KS]:W_,[hT]:WS}),VS(t,n,"/",void 0,i)},Ig=async(e,t)=>{const n=GS;let i;return i=TT({...Jb(e),[KS]:K_,[hT]:WS}),VS(t,n,"/",void 0,i)},Rg=async(e,t)=>{const n=GS;let i;return i=TT({...Zb(e),[KS]:J_,[hT]:WS}),VS(t,n,"/",void 0,i)},Mg=async(e,t)=>{const n=GS;let i;return i=TT({...ex(e),[KS]:X_,[hT]:WS}),VS(t,n,"/",void 0,i)},jg=async(e,t)=>{const n=GS;let i;return i=TT({...tx(e),[KS]:Z_,[hT]:WS}),VS(t,n,"/",void 0,i)},$g=async(e,t)=>{const n=GS;let i;return i=TT({...nx(e),[KS]:iO,[hT]:WS}),VS(t,n,"/",void 0,i)},Ng=async(e,t)=>{const n=GS;let i;return i=TT({...ix(e),[KS]:cO,[hT]:WS}),VS(t,n,"/",void 0,i)},Dg=async(e,t)=>{const n=GS;let i;return i=TT({...rx(),[KS]:N_,[hT]:WS}),VS(t,n,"/",void 0,i)},Lg=async(e,t)=>{const n=GS;let i;return i=TT({...ox(e),[KS]:B_,[hT]:WS}),VS(t,n,"/",void 0,i)},zg=async(e,t)=>{const n=GS;let i;return i=TT({...sx(e),[KS]:tO,[hT]:WS}),VS(t,n,"/",void 0,i)},Fg=async(e,t)=>{const n=GS;let i;return i=TT({...ax(e),[KS]:eO,[hT]:WS}),VS(t,n,"/",void 0,i)},Ug=async(e,t)=>{const n=GS,i=TT({[KS]:RO,[hT]:WS});return VS(t,n,"/",void 0,i)},Bg=async(e,t)=>{const n=GS;let i;return i=TT({...mx(e),[KS]:MO,[hT]:WS}),VS(t,n,"/",void 0,i)},Hg=async(e,t)=>{const n=GS;let i;return i=TT({...hx(e),[KS]:jO,[hT]:WS}),VS(t,n,"/",void 0,i)},qg=async(e,t)=>{const n=GS;let i;return i=TT({...fx(e),[KS]:$O,[hT]:WS}),VS(t,n,"/",void 0,i)},Vg=async(e,t)=>{const n=GS;let i;return i=TT({...gx(e),[KS]:NO,[hT]:WS}),VS(t,n,"/",void 0,i)},Gg=async(e,t)=>{const n=GS;let i;return i=TT({...yx(e),[KS]:DO,[hT]:WS}),VS(t,n,"/",void 0,i)},Wg=async(e,t)=>{const n=GS;let i;return i=TT({...vx(e),[KS]:LO,[hT]:WS}),VS(t,n,"/",void 0,i)},Kg=async(e,t)=>{const n=GS,i=TT({[KS]:zO,[hT]:WS});return VS(t,n,"/",void 0,i)},Yg=async(e,t)=>{const n=GS,i=TT({[KS]:FO,[hT]:WS});return VS(t,n,"/",void 0,i)},Qg=async(e,t)=>{const n=GS;let i;return i=TT({...bx(e),[KS]:UO,[hT]:WS}),VS(t,n,"/",void 0,i)},Jg=async(e,t)=>{const n=GS;let i;return i=TT({...Ex(e),[KS]:sC,[hT]:WS}),VS(t,n,"/",void 0,i)},Xg=async(e,t)=>{const n=GS;let i;return i=TT({...Sx(e),[KS]:aC,[hT]:WS}),VS(t,n,"/",void 0,i)},Zg=async(e,t)=>{const n=GS;let i;return i=TT({..._x(e),[KS]:lC,[hT]:WS}),VS(t,n,"/",void 0,i)},ey=async(e,t)=>{const n=GS;let i;return i=TT({...Ox(e),[KS]:uC,[hT]:WS}),VS(t,n,"/",void 0,i)},ty=async(e,t)=>{const n=GS;let i;return i=TT({...Cx(),[KS]:pC,[hT]:WS}),VS(t,n,"/",void 0,i)},ny=async(e,t)=>{const n=GS;let i;return i=TT({...kx(e),[KS]:dC,[hT]:WS}),VS(t,n,"/",void 0,i)},iy=async(e,t)=>{const n=GS;let i;return i=TT({...Tx(e),[KS]:mC,[hT]:WS}),VS(t,n,"/",void 0,i)},ry=async(e,t)=>{const n=GS,i=TT({[KS]:hC,[hT]:WS});return VS(t,n,"/",void 0,i)},oy=async(e,t)=>{const n=GS;let i;return i=TT({...Mx(e),[KS]:NC,[hT]:WS}),VS(t,n,"/",void 0,i)},sy=async(e,t)=>{const n=GS;let i;return i=TT({...jx(e),[KS]:DC,[hT]:WS}),VS(t,n,"/",void 0,i)},ay=async(e,t)=>{const n=GS;let i;return i=TT({...Ux(e),[KS]:ZC,[hT]:WS}),VS(t,n,"/",void 0,i)},cy=async(e,t)=>{const n=GS;let i;return i=TT({...Hx(e),[KS]:fk,[hT]:WS}),VS(t,n,"/",void 0,i)},ly=async(e,t)=>{const n=GS;let i;return i=TT({...qx(e),[KS]:gk,[hT]:WS}),VS(t,n,"/",void 0,i)},uy=async(e,t)=>{const n=GS;let i;return i=TT({...Vx(e),[KS]:vk,[hT]:WS}),VS(t,n,"/",void 0,i)},py=async(e,t)=>{const n=GS;let i;return i=TT({...Gx(e),[KS]:xk,[hT]:WS}),VS(t,n,"/",void 0,i)},dy=async(e,t)=>{const n=GS;let i;return i=TT({...Wx(e,t),[KS]:Mk,[hT]:WS}),VS(t,n,"/",void 0,i)},my=async(e,t)=>{const n=GS;let i;return i=TT({...Kx(e),[KS]:Dk,[hT]:WS}),VS(t,n,"/",void 0,i)},hy=async(e,t)=>{const n=GS;let i;return i=TT({...Yx(e),[KS]:dk,[hT]:WS}),VS(t,n,"/",void 0,i)},fy=async(e,t)=>{const n=GS;let i;return i=TT({...Qx(e),[KS]:Sk,[hT]:WS}),VS(t,n,"/",void 0,i)},gy=async(e,t)=>{const n=GS;let i;return i=TT({...Jx(e),[KS]:_k,[hT]:WS}),VS(t,n,"/",void 0,i)},yy=async(e,t)=>{const n=GS;let i;return i=TT({...Xx(e),[KS]:Ok,[hT]:WS}),VS(t,n,"/",void 0,i)},vy=async(e,t)=>{const n=GS;let i;return i=TT({...Zx(e),[KS]:Ck,[hT]:WS}),VS(t,n,"/",void 0,i)},by=async(e,t)=>{const n=GS;let i;return i=TT({...ew(e),[KS]:kk,[hT]:WS}),VS(t,n,"/",void 0,i)},xy=async(e,t)=>{const n=GS;let i;return i=TT({...tw(e),[KS]:jk,[hT]:WS}),VS(t,n,"/",void 0,i)},wy=async(e,t)=>{const n=GS;let i;return i=TT({...sw(e),[KS]:eT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ey=async(e,t)=>{const n=GS;let i;return i=TT({...cw(e),[KS]:sT,[hT]:WS}),VS(t,n,"/",void 0,i)},Sy=async(e,t)=>{const n=GS;let i;return i=TT({...lw(e),[KS]:aT,[hT]:WS}),VS(t,n,"/",void 0,i)},_y=async(e,t)=>{const n=GS;let i;return i=TT({...uw(e),[KS]:cT,[hT]:WS}),VS(t,n,"/",void 0,i)},Oy=async(e,t)=>{const n=GS;let i;return i=TT({...pw(e),[KS]:lT,[hT]:WS}),VS(t,n,"/",void 0,i)},Cy=async(e,t)=>{const n=GS;let i;return i=TT({...dw(e),[KS]:uT,[hT]:WS}),VS(t,n,"/",void 0,i)},ky=async(e,t)=>{const n=GS;let i;return i=TT({...mw(e),[KS]:pT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ty=async(e,t)=>{const n=GS;let i;return i=TT({...hw(e),[KS]:dT,[hT]:WS}),VS(t,n,"/",void 0,i)},Py=async(e,t)=>{const n=GS;let i;return i=TT({...fw(e),[KS]:mT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ay=async(e,t)=>{const n=GS;let i;return i=TT({...gw(e),[KS]:gT,[hT]:WS}),VS(t,n,"/",void 0,i)},Iy=async(e,t)=>{const n=GS;let i;return i=TT({...yw(e),[KS]:yT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ry=async(e,t)=>{const n=GS;let i;return i=TT({...vw(e),[KS]:vT,[hT]:WS}),VS(t,n,"/",void 0,i)},My=async(e,t)=>{const n=GS;let i;return i=TT({...bw(e),[KS]:xT,[hT]:WS}),VS(t,n,"/",void 0,i)},jy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Ow(n.CloneReceiptRuleSetResult);return{$metadata:HS(e),...i}},$y=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Rw(n.CreateConfigurationSetResult);return{$metadata:HS(e),...i}},Ny=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Iw(n.CreateConfigurationSetEventDestinationResult);return{$metadata:HS(e),...i}},Dy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Mw(n.CreateConfigurationSetTrackingOptionsResult);return{$metadata:HS(e),...i}},Ly=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},zy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=jw(n.CreateReceiptFilterResult);return{$metadata:HS(e),...i}},Fy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=$w(n.CreateReceiptRuleResult);return{$metadata:HS(e),...i}},Uy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Nw(n.CreateReceiptRuleSetResult);return{$metadata:HS(e),...i}},By=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Dw(n.CreateTemplateResult);return{$metadata:HS(e),...i}},Hy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Hw(n.DeleteConfigurationSetResult);return{$metadata:HS(e),...i}},qy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Bw(n.DeleteConfigurationSetEventDestinationResult);return{$metadata:HS(e),...i}},Vy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=qw(n.DeleteConfigurationSetTrackingOptionsResult);return{$metadata:HS(e),...i}},Gy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Wy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Gw(n.DeleteIdentityResult);return{$metadata:HS(e),...i}},Ky=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Vw(n.DeleteIdentityPolicyResult);return{$metadata:HS(e),...i}},Yy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Ww(n.DeleteReceiptFilterResult);return{$metadata:HS(e),...i}},Qy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Kw(n.DeleteReceiptRuleResult);return{$metadata:HS(e),...i}},Jy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Yw(n.DeleteReceiptRuleSetResult);return{$metadata:HS(e),...i}},Xy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Qw(n.DeleteTemplateResult);return{$metadata:HS(e),...i}},Zy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},ev=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Jw(n.DescribeActiveReceiptRuleSetResult);return{$metadata:HS(e),...i}},tv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Xw(n.DescribeConfigurationSetResult);return{$metadata:HS(e),...i}},nv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Zw(n.DescribeReceiptRuleResult);return{$metadata:HS(e),...i}},iv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=eE(n.DescribeReceiptRuleSetResult);return{$metadata:HS(e),...i}},rv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=aE(n.GetAccountSendingEnabledResult);return{$metadata:HS(e),...i}},ov=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=cE(n.GetCustomVerificationEmailTemplateResult);return{$metadata:HS(e),...i}},sv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=lE(n.GetIdentityDkimAttributesResult);return{$metadata:HS(e),...i}},av=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=uE(n.GetIdentityMailFromDomainAttributesResult);return{$metadata:HS(e),...i}},cv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=pE(n.GetIdentityNotificationAttributesResult);return{$metadata:HS(e),...i}},lv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=dE(n.GetIdentityPoliciesResult);return{$metadata:HS(e),...i}},uv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=mE(n.GetIdentityVerificationAttributesResult);return{$metadata:HS(e),...i}},pv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=hE(n.GetSendQuotaResult);return{$metadata:HS(e),...i}},dv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=fE(n.GetSendStatisticsResult);return{$metadata:HS(e),...i}},mv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=gE(n.GetTemplateResult);return{$metadata:HS(e),...i}},hv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=RE(n.ListConfigurationSetsResult);return{$metadata:HS(e),...i}},fv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=ME(n.ListCustomVerificationEmailTemplatesResult);return{$metadata:HS(e),...i}},gv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=jE(n.ListIdentitiesResult);return{$metadata:HS(e),...i}},yv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=$E(n.ListIdentityPoliciesResult);return{$metadata:HS(e),...i}},vv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=NE(n.ListReceiptFiltersResult);return{$metadata:HS(e),...i}},bv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=DE(n.ListReceiptRuleSetsResult);return{$metadata:HS(e),...i}},xv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=LE(n.ListTemplatesResult);return{$metadata:HS(e),...i}},wv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=zE(n.ListVerifiedEmailAddressesResult);return{$metadata:HS(e),...i}},Ev=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=KE(n.PutConfigurationSetDeliveryOptionsResult);return{$metadata:HS(e),...i}},Sv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=YE(n.PutIdentityPolicyResult);return{$metadata:HS(e),...i}},_v=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=rS(n.ReorderReceiptRuleSetResult);return{$metadata:HS(e),...i}},Ov=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=lS(n.SendBounceResult);return{$metadata:HS(e),...i}},Cv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=uS(n.SendBulkTemplatedEmailResult);return{$metadata:HS(e),...i}},kv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=pS(n.SendCustomVerificationEmailResult);return{$metadata:HS(e),...i}},Tv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=mS(n.SendEmailResult);return{$metadata:HS(e),...i}},Pv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=hS(n.SendRawEmailResult);return{$metadata:HS(e),...i}},Av=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=fS(n.SendTemplatedEmailResult);return{$metadata:HS(e),...i}},Iv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=gS(n.SetActiveReceiptRuleSetResult);return{$metadata:HS(e),...i}},Rv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=yS(n.SetIdentityDkimEnabledResult);return{$metadata:HS(e),...i}},Mv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=vS(n.SetIdentityFeedbackForwardingEnabledResult);return{$metadata:HS(e),...i}},jv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=bS(n.SetIdentityHeadersInNotificationsEnabledResult);return{$metadata:HS(e),...i}},$v=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=xS(n.SetIdentityMailFromDomainResult);return{$metadata:HS(e),...i}},Nv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=wS(n.SetIdentityNotificationTopicResult);return{$metadata:HS(e),...i}},Dv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=ES(n.SetReceiptRulePositionResult);return{$metadata:HS(e),...i}},Lv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=PS(n.TestRenderTemplateResult);return{$metadata:HS(e),...i}},zv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Fv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=MS(n.UpdateConfigurationSetEventDestinationResult);return{$metadata:HS(e),...i}},Uv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Bv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Hv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=jS(n.UpdateConfigurationSetTrackingOptionsResult);return{$metadata:HS(e),...i}},qv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Vv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=$S(n.UpdateReceiptRuleResult);return{$metadata:HS(e),...i}},Gv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=NS(n.UpdateTemplateResult);return{$metadata:HS(e),...i}},Wv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=zS(n.VerifyDomainDkimResult);return{$metadata:HS(e),...i}},Kv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=FS(n.VerifyDomainIdentityResult);return{$metadata:HS(e),...i}},Yv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Qv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=US(n.VerifyEmailIdentityResult);return{$metadata:HS(e),...i}},Jv=async(e,t)=>{const n={...e,body:await $i(e.body,t)},i=PT(e,n.body);switch(i){case"AlreadyExists":case"com.amazonaws.ses#AlreadyExistsException":throw await Zv(n);case"LimitExceeded":case"com.amazonaws.ses#LimitExceededException":throw await Eb(n);case"RuleSetDoesNotExist":case"com.amazonaws.ses#RuleSetDoesNotExistException":throw await Tb(n);case"ConfigurationSetAlreadyExists":case"com.amazonaws.ses#ConfigurationSetAlreadyExistsException":throw await tb(n);case"InvalidConfigurationSet":case"com.amazonaws.ses#InvalidConfigurationSetException":throw await pb(n);case"ConfigurationSetDoesNotExist":case"com.amazonaws.ses#ConfigurationSetDoesNotExistException":throw await nb(n);case"EventDestinationAlreadyExists":case"com.amazonaws.ses#EventDestinationAlreadyExistsException":throw await ab(n);case"InvalidCloudWatchDestination":case"com.amazonaws.ses#InvalidCloudWatchDestinationException":throw await ub(n);case"InvalidFirehoseDestination":case"com.amazonaws.ses#InvalidFirehoseDestinationException":throw await mb(n);case"InvalidSNSDestination":case"com.amazonaws.ses#InvalidSNSDestinationException":throw await vb(n);case"InvalidTrackingOptions":case"com.amazonaws.ses#InvalidTrackingOptionsException":throw await wb(n);case"TrackingOptionsAlreadyExistsException":case"com.amazonaws.ses#TrackingOptionsAlreadyExistsException":throw await Ab(n);case"CustomVerificationEmailInvalidContent":case"com.amazonaws.ses#CustomVerificationEmailInvalidContentException":throw await rb(n);case"CustomVerificationEmailTemplateAlreadyExists":case"com.amazonaws.ses#CustomVerificationEmailTemplateAlreadyExistsException":throw await ob(n);case"FromEmailAddressNotVerified":case"com.amazonaws.ses#FromEmailAddressNotVerifiedException":throw await lb(n);case"InvalidLambdaFunction":case"com.amazonaws.ses#InvalidLambdaFunctionException":throw await hb(n);case"InvalidS3Configuration":case"com.amazonaws.ses#InvalidS3ConfigurationException":throw await yb(n);case"InvalidSnsTopic":case"com.amazonaws.ses#InvalidSnsTopicException":throw await bb(n);case"RuleDoesNotExist":case"com.amazonaws.ses#RuleDoesNotExistException":throw await kb(n);case"InvalidTemplate":case"com.amazonaws.ses#InvalidTemplateException":throw await xb(n);case"EventDestinationDoesNotExist":case"com.amazonaws.ses#EventDestinationDoesNotExistException":throw await cb(n);case"TrackingOptionsDoesNotExistException":case"com.amazonaws.ses#TrackingOptionsDoesNotExistException":throw await Ib(n);case"CannotDelete":case"com.amazonaws.ses#CannotDeleteException":throw await eb(n);case"CustomVerificationEmailTemplateDoesNotExist":case"com.amazonaws.ses#CustomVerificationEmailTemplateDoesNotExistException":throw await sb(n);case"TemplateDoesNotExist":case"com.amazonaws.ses#TemplateDoesNotExistException":throw await Pb(n);case"InvalidDeliveryOptions":case"com.amazonaws.ses#InvalidDeliveryOptionsException":throw await db(n);case"InvalidPolicy":case"com.amazonaws.ses#InvalidPolicyException":throw await fb(n);case"MessageRejected":case"com.amazonaws.ses#MessageRejected":throw await _b(n);case"AccountSendingPausedException":case"com.amazonaws.ses#AccountSendingPausedException":throw await Xv(n);case"ConfigurationSetSendingPausedException":case"com.amazonaws.ses#ConfigurationSetSendingPausedException":throw await ib(n);case"MailFromDomainNotVerifiedException":case"com.amazonaws.ses#MailFromDomainNotVerifiedException":throw await Sb(n);case"ProductionAccessNotGranted":case"com.amazonaws.ses#ProductionAccessNotGrantedException":throw await Cb(n);case"InvalidRenderingParameter":case"com.amazonaws.ses#InvalidRenderingParameterException":throw await gb(n);case"MissingRenderingAttribute":case"com.amazonaws.ses#MissingRenderingAttributeException":throw await Ob(n);default:const t=n.body;return qS({output:e,parsedBody:t.Error,errorCode:i})}},Xv=async(e,t)=>{const n=e.body,i=ww(n.Error),r=new Df({$metadata:HS(e),...i});return Tn(r,n)},Zv=async(e,t)=>{const n=e.body,i=Ew(n.Error),r=new Lf({$metadata:HS(e),...i});return Tn(r,n)},eb=async(e,t)=>{const n=e.body,i=_w(n.Error),r=new zf({$metadata:HS(e),...i});return Tn(r,n)},tb=async(e,t)=>{const n=e.body,i=Tw(n.Error),r=new Bf({$metadata:HS(e),...i});return Tn(r,n)},nb=async(e,t)=>{const n=e.body,i=Pw(n.Error),r=new Hf({$metadata:HS(e),...i});return Tn(r,n)},ib=async(e,t)=>{const n=e.body,i=Aw(n.Error),r=new qf({$metadata:HS(e),...i});return Tn(r,n)},rb=async(e,t)=>{const n=e.body,i=Lw(n.Error),r=new Xf({$metadata:HS(e),...i});return Tn(r,n)},ob=async(e,t)=>{const n=e.body,i=zw(n.Error),r=new Zf({$metadata:HS(e),...i});return Tn(r,n)},sb=async(e,t)=>{const n=e.body,i=Fw(n.Error),r=new sg({$metadata:HS(e),...i});return Tn(r,n)},ab=async(e,t)=>{const n=e.body,i=nE(n.Error),r=new Gf({$metadata:HS(e),...i});return Tn(r,n)},cb=async(e,t)=>{const n=e.body,i=iE(n.Error),r=new ag({$metadata:HS(e),...i});return Tn(r,n)},lb=async(e,t)=>{const n=e.body,i=sE(n.Error),r=new eg({$metadata:HS(e),...i});return Tn(r,n)},ub=async(e,t)=>{const n=e.body,i=vE(n.Error),r=new Wf({$metadata:HS(e),...i});return Tn(r,n)},pb=async(e,t)=>{const n=e.body,i=bE(n.Error),r=new Vf({$metadata:HS(e),...i});return Tn(r,n)},db=async(e,t)=>{const n=e.body,i=xE(n.Error),r=new ug({$metadata:HS(e),...i});return Tn(r,n)},mb=async(e,t)=>{const n=e.body,i=wE(n.Error),r=new Kf({$metadata:HS(e),...i});return Tn(r,n)},hb=async(e,t)=>{const n=e.body,i=EE(n.Error),r=new tg({$metadata:HS(e),...i});return Tn(r,n)},fb=async(e,t)=>{const n=e.body,i=SE(n.Error),r=new pg({$metadata:HS(e),...i});return Tn(r,n)},gb=async(e,t)=>{const n=e.body,i=_E(n.Error),r=new dg({$metadata:HS(e),...i});return Tn(r,n)},yb=async(e,t)=>{const n=e.body,i=OE(n.Error),r=new ng({$metadata:HS(e),...i});return Tn(r,n)},vb=async(e,t)=>{const n=e.body,i=CE(n.Error),r=new Yf({$metadata:HS(e),...i});return Tn(r,n)},bb=async(e,t)=>{const n=e.body,i=kE(n.Error),r=new ig({$metadata:HS(e),...i});return Tn(r,n)},xb=async(e,t)=>{const n=e.body,i=TE(n.Error),r=new og({$metadata:HS(e),...i});return Tn(r,n)},wb=async(e,t)=>{const n=e.body,i=PE(n.Error),r=new Qf({$metadata:HS(e),...i});return Tn(r,n)},Eb=async(e,t)=>{const n=e.body,i=IE(n.Error),r=new Ff({$metadata:HS(e),...i});return Tn(r,n)},Sb=async(e,t)=>{const n=e.body,i=UE(n.Error),r=new mg({$metadata:HS(e),...i});return Tn(r,n)},_b=async(e,t)=>{const n=e.body,i=BE(n.Error),r=new hg({$metadata:HS(e),...i});return Tn(r,n)},Ob=async(e,t)=>{const n=e.body,i=HE(n.Error),r=new fg({$metadata:HS(e),...i});return Tn(r,n)},Cb=async(e,t)=>{const n=e.body,i=WE(n.Error),r=new gg({$metadata:HS(e),...i});return Tn(r,n)},kb=async(e,t)=>{const n=e.body,i=sS(n.Error),r=new rg({$metadata:HS(e),...i});return Tn(r,n)},Tb=async(e,t)=>{const n=e.body,i=aS(n.Error),r=new Uf({$metadata:HS(e),...i});return Tn(r,n)},Pb=async(e,t)=>{const n=e.body,i=kS(n.Error),r=new lg({$metadata:HS(e),...i});return Tn(r,n)},Ab=async(e,t)=>{const n=e.body,i=IS(n.Error),r=new Jf({$metadata:HS(e),...i});return Tn(r,n)},Ib=async(e,t)=>{const n=e.body,i=RS(n.Error),r=new cg({$metadata:HS(e),...i});return Tn(r,n)},Rb=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},Mb=(e,t)=>{const n={};if(null!=e[UC]&&(n[UC]=e[UC]),null!=e[BC]&&(n[BC]=e[BC]),null!=e[a_]&&(n[a_]=e[a_]),null!=e[HC]){const t=zx(e[HC]);Object.entries(t).forEach((([e,t])=>{n[`RecipientDsnFields.${e}`]=t}))}return n},jb=(e,t)=>{const n={};if(null!=e[j_]){const t=cx(e[j_]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[nk]){const t=Ix(e[nk]);0===e[nk]?.length&&(n.ReplacementTags=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplacementTags.${e}`]=t}))}return null!=e[rk]&&(n[rk]=e[rk]),n},$b=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[jC]&&(n[jC]=e[jC]),n},Nb=(e,t)=>{const n={};return null!=e[Y_]&&(n[Y_]=e[Y_]),null!=e[lO]&&(n[lO]=e[lO]),null!=e[V_]&&(n[V_]=e[V_]),n},Db=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=Nb(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},Lb=(e,t)=>{const n={};return null!=e[pO]&&(n[pO]=e[pO]),null!=e[p_]&&(n[p_]=e[p_]),n},zb=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[gO]){const t=lx(e[gO]);Object.entries(t).forEach((([e,t])=>{n[`EventDestination.${e}`]=t}))}return n},Fb=(e,t)=>{const n={};if(null!=e[E_]){const t=(e=>{const t={};return null!=e[kC]&&(t[kC]=e[kC]),t})(e[E_]);Object.entries(t).forEach((([e,t])=>{n[`ConfigurationSet.${e}`]=t}))}return n},Ub=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[Jk]){const t=aw(e[Jk]);Object.entries(t).forEach((([e,t])=>{n[`TrackingOptions.${e}`]=t}))}return n},Bb=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[kO]&&(n[kO]=e[kO]),null!=e[tT]&&(n[tT]=e[tT]),null!=e[Wk]&&(n[Wk]=e[Wk]),null!=e[$k]&&(n[$k]=e[$k]),null!=e[AO]&&(n[AO]=e[AO]),n},Hb=(e,t)=>{const n={};if(null!=e[SO]){const t=Nx(e[SO]);Object.entries(t).forEach((([e,t])=>{n[`Filter.${e}`]=t}))}return n},qb=(e,t)=>{const n={};if(null!=e[tk]&&(n[tk]=e[tk]),null!=e[XS]&&(n[XS]=e[XS]),null!=e[ck]){const t=Lx(e[ck]);Object.entries(t).forEach((([e,t])=>{n[`Rule.${e}`]=t}))}return n},Vb=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},Gb=(e,t)=>{const n={};if(null!=e[iT]){const t=ow(e[iT]);Object.entries(t).forEach((([e,t])=>{n[`Template.${e}`]=t}))}return n},Wb=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),null!=e[yO]&&(n[yO]=e[yO]),n},Kb=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),n},Yb=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),n},Qb=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},Jb=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[LC]&&(n[LC]=e[LC]),n},Xb=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),n},Zb=(e,t)=>{const n={};return null!=e[TO]&&(n[TO]=e[TO]),n},ex=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[KC]&&(n[KC]=e[KC]),n},tx=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},nx=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},ix=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),n},rx=(e,t)=>({}),ox=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[S_]){const t=(e=>{const t={};let n=1;for(const i of e)null!==i&&(t[`member.${n}`]=i,n++);return t})(e[S_]);0===e[S_]?.length&&(n.ConfigurationSetAttributeNames=[]),Object.entries(t).forEach((([e,t])=>{n[`ConfigurationSetAttributeNames.${e}`]=t}))}return n},sx=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[KC]&&(n[KC]=e[KC]),n},ax=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},cx=(e,t)=>{const n={};if(null!=e[Gk]){const t=Rb(e[Gk]);0===e[Gk]?.length&&(n.ToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ToAddresses.${e}`]=t}))}if(null!=e[d_]){const t=Rb(e[d_]);0===e[d_]?.length&&(n.CcAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`CcAddresses.${e}`]=t}))}if(null!=e[e_]){const t=Rb(e[e_]);0===e[e_]?.length&&(n.BccAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`BccAddresses.${e}`]=t}))}return n},lx=(e,t)=>{const n={};if(null!=e[kC]&&(n[kC]=e[kC]),null!=e[hO]&&(n[hO]=e[hO]),null!=e[yC]){const t=ux(e[yC]);0===e[yC]?.length&&(n.MatchingEventTypes=[]),Object.entries(t).forEach((([e,t])=>{n[`MatchingEventTypes.${e}`]=t}))}if(null!=e[nC]){const t=wx(e[nC]);Object.entries(t).forEach((([e,t])=>{n[`KinesisFirehoseDestination.${e}`]=t}))}if(null!=e[I_]){const t=(e=>{const t={};if(null!=e[L_]){const n=Db(e[L_]);0===e[L_]?.length&&(t.DimensionConfigurations=[]),Object.entries(n).forEach((([e,n])=>{t[`DimensionConfigurations.${e}`]=n}))}return t})(e[I_]);Object.entries(t).forEach((([e,t])=>{n[`CloudWatchDestination.${e}`]=t}))}if(null!=e[Ak]){const t=iw(e[Ak]);Object.entries(t).forEach((([e,t])=>{n[`SNSDestination.${e}`]=t}))}return n},ux=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},px=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=e[kC]),null!=e[ST]&&(n[ST]=e[ST]),n},dx=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=px(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},mx=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},hx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},fx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},gx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},yx=(e,t)=>{const n={};if(null!=e[YO]&&(n[YO]=e[YO]),null!=e[zC]){const t=Rx(e[zC]);0===e[zC]?.length&&(n.PolicyNames=[]),Object.entries(t).forEach((([e,t])=>{n[`PolicyNames.${e}`]=t}))}return n},vx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},bx=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},xx=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},wx=(e,t)=>{const n={};return null!=e[QO]&&(n[QO]=e[QO]),null!=e[nO]&&(n[nO]=e[nO]),n},Ex=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),null!=e[EC]&&(n[EC]=e[EC]),n},Sx=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),null!=e[_C]&&(n[_C]=e[_C]),n},_x=(e,t)=>{const n={};return null!=e[eC]&&(n[eC]=e[eC]),null!=e[PC]&&(n[PC]=e[PC]),null!=e[EC]&&(n[EC]=e[EC]),n},Ox=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),n},Cx=(e,t)=>({}),kx=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),n},Tx=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),null!=e[EC]&&(n[EC]=e[EC]),n},Px=(e,t)=>{const n={};if(null!=e[Uk]){const t=Lb(e[Uk]);Object.entries(t).forEach((([e,t])=>{n[`Subject.${e}`]=t}))}if(null!=e[ZS]){const t=(e=>{const t={};if(null!=e[Bk]){const n=Lb(e[Bk]);Object.entries(n).forEach((([e,n])=>{t[`Text.${e}`]=n}))}if(null!=e[BO]){const n=Lb(e[BO]);Object.entries(n).forEach((([e,n])=>{t[`Html.${e}`]=n}))}return t})(e[ZS]);Object.entries(t).forEach((([e,t])=>{n[`Body.${e}`]=t}))}return n},Ax=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=e[kC]),null!=e[ST]&&(n[ST]=e[ST]),n},Ix=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=Ax(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},Rx=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},Mx=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[Q_]){const t=(e=>{const t={};return null!=e[Xk]&&(t[Xk]=e[Xk]),t})(e[Q_]);Object.entries(t).forEach((([e,t])=>{n[`DeliveryOptions.${e}`]=t}))}return n},jx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[LC]&&(n[LC]=e[LC]),null!=e[$C]&&(n[$C]=e[$C]),n},$x=(e,t)=>{const n={};if(null!=e[pk]){const t=Bx(e[pk]);Object.entries(t).forEach((([e,t])=>{n[`S3Action.${e}`]=t}))}if(null!=e[t_]){const t=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=e[Hk]),null!=e[Rk]&&(t[Rk]=e[Rk]),null!=e[yk]&&(t[yk]=e[yk]),null!=e[fC]&&(t[fC]=e[fC]),null!=e[uk]&&(t[uk]=e[uk]),t})(e[t_]);Object.entries(t).forEach((([e,t])=>{n[`BounceAction.${e}`]=t}))}if(null!=e[_T]){const t=xw(e[_T]);Object.entries(t).forEach((([e,t])=>{n[`WorkmailAction.${e}`]=t}))}if(null!=e[rC]){const t=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=e[Hk]),null!=e[_O]&&(t[_O]=e[_O]),null!=e[ZO]&&(t[ZO]=e[ZO]),t})(e[rC]);Object.entries(t).forEach((([e,t])=>{n[`LambdaAction.${e}`]=t}))}if(null!=e[hk]){const t=rw(e[hk]);Object.entries(t).forEach((([e,t])=>{n[`StopAction.${e}`]=t}))}if(null!=e[QS]){const t=(e=>{const t={};return null!=e[GO]&&(t[GO]=e[GO]),null!=e[KO]&&(t[KO]=e[KO]),t})(e[QS]);Object.entries(t).forEach((([e,t])=>{n[`AddHeaderAction.${e}`]=t}))}if(null!=e[Pk]){const t=nw(e[Pk]);Object.entries(t).forEach((([e,t])=>{n[`SNSAction.${e}`]=t}))}return n},Nx=(e,t)=>{const n={};if(null!=e[kC]&&(n[kC]=e[kC]),null!=e[JO]){const t=Dx(e[JO]);Object.entries(t).forEach((([e,t])=>{n[`IpFilter.${e}`]=t}))}return n},Dx=(e,t)=>{const n={};return null!=e[$C]&&(n[$C]=e[$C]),null!=e[R_]&&(n[R_]=e[R_]),n},Lx=(e,t)=>{const n={};if(null!=e[kC]&&(n[kC]=e[kC]),null!=e[hO]&&(n[hO]=e[hO]),null!=e[Xk]&&(n[Xk]=e[Xk]),null!=e[sk]){const t=Fx(e[sk]);0===e[sk]?.length&&(n.Recipients=[]),Object.entries(t).forEach((([e,t])=>{n[`Recipients.${e}`]=t}))}if(null!=e[JS]){const t=(e=>{const t={};let n=1;for(const i of e){if(null===i)continue;const e=$x(i);Object.entries(e).forEach((([e,i])=>{t[`member.${n}.${e}`]=i})),n++}return t})(e[JS]);0===e[JS]?.length&&(n.Actions=[]),Object.entries(t).forEach((([e,t])=>{n[`Actions.${e}`]=t}))}return null!=e[wk]&&(n[wk]=e[wk]),n},zx=(e,t)=>{const n={};if(null!=e[PO]&&(n[PO]=e[PO]),null!=e[KS]&&(n[KS]=e[KS]),null!=e[WC]&&(n[WC]=e[WC]),null!=e[Fk]&&(n[Fk]=e[Fk]),null!=e[q_]&&(n[q_]=e[q_]),null!=e[oC]&&(n[oC]=Yn(e[oC])),null!=e[bO]){const t=dx(e[bO]);0===e[bO]?.length&&(n.ExtensionFields=[]),Object.entries(t).forEach((([e,t])=>{n[`ExtensionFields.${e}`]=t}))}return n},Fx=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},Ux=(e,t)=>{const n={};if(null!=e[tk]&&(n[tk]=e[tk]),null!=e[YC]){const t=(e=>{const t={};let n=1;for(const i of e)null!==i&&(t[`member.${n}`]=i,n++);return t})(e[YC]);0===e[YC]?.length&&(n.RuleNames=[]),Object.entries(t).forEach((([e,t])=>{n[`RuleNames.${e}`]=t}))}return n},Bx=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=e[Hk]),null!=e[n_]&&(n[n_]=e[n_]),null!=e[RC]&&(n[RC]=e[RC]),null!=e[iC]&&(n[iC]=e[iC]),null!=e[XO]&&(n[XO]=e[XO]),n},Hx=(e,t)=>{const n={};if(null!=e[MC]&&(n[MC]=e[MC]),null!=e[o_]&&(n[o_]=e[o_]),null!=e[EO]&&(n[EO]=e[EO]),null!=e[gC]){const t=(e=>{const t={};if(null!=e[qC]&&(t[qC]=e[qC]),null!=e[YS]&&(t[YS]=Yn(e[YS])),null!=e[bO]){const n=dx(e[bO]);0===e[bO]?.length&&(t.ExtensionFields=[]),Object.entries(n).forEach((([e,n])=>{t[`ExtensionFields.${e}`]=n}))}return t})(e[gC]);Object.entries(t).forEach((([e,t])=>{n[`MessageDsn.${e}`]=t}))}if(null!=e[r_]){const t=(e=>{const t={};let n=1;for(const i of e){if(null===i)continue;const e=Mb(i);Object.entries(e).forEach((([e,i])=>{t[`member.${n}.${e}`]=i})),n++}return t})(e[r_]);0===e[r_]?.length&&(n.BouncedRecipientInfoList=[]),Object.entries(t).forEach((([e,t])=>{n[`BouncedRecipientInfoList.${e}`]=t}))}return null!=e[s_]&&(n[s_]=e[s_]),n},qx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[ik]){const t=Rb(e[ik]);0===e[ik]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[JC]&&(n[JC]=e[JC]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[__]&&(n[__]=e[__]),null!=e[oO]){const t=Ix(e[oO]);0===e[oO]?.length&&(n.DefaultTags=[]),Object.entries(t).forEach((([e,t])=>{n[`DefaultTags.${e}`]=t}))}if(null!=e[iT]&&(n[iT]=e[iT]),null!=e[Vk]&&(n[Vk]=e[Vk]),null!=e[rO]&&(n[rO]=e[rO]),null!=e[dO]){const t=(e=>{const t={};let n=1;for(const i of e){if(null===i)continue;const e=jb(i);Object.entries(e).forEach((([e,i])=>{t[`member.${n}.${e}`]=i})),n++}return t})(e[dO]);0===e[dO]?.length&&(n.Destinations=[]),Object.entries(t).forEach((([e,t])=>{n[`Destinations.${e}`]=t}))}return n},Vx=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[__]&&(n[__]=e[__]),n},Gx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[j_]){const t=cx(e[j_]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[fC]){const t=Px(e[fC]);Object.entries(t).forEach((([e,t])=>{n[`Message.${e}`]=t}))}if(null!=e[ik]){const t=Rb(e[ik]);0===e[ik]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[JC]&&(n[JC]=e[JC]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[nT]){const t=Ix(e[nT]);0===e[nT]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[__]&&(n[__]=e[__]),n},Wx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[dO]){const t=Rb(e[dO]);0===e[dO]?.length&&(n.Destinations=[]),Object.entries(t).forEach((([e,t])=>{n[`Destinations.${e}`]=t}))}if(null!=e[GC]){const i=((e,t)=>{const n={};return null!=e[pO]&&(n[pO]=t.base64Encoder(e[pO])),n})(e[GC],t);Object.entries(i).forEach((([e,t])=>{n[`RawMessage.${e}`]=t}))}if(null!=e[OO]&&(n[OO]=e[OO]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[nT]){const t=Ix(e[nT]);0===e[nT]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[__]&&(n[__]=e[__]),n},Kx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[j_]){const t=cx(e[j_]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[ik]){const t=Rb(e[ik]);0===e[ik]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[JC]&&(n[JC]=e[JC]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[nT]){const t=Ix(e[nT]);0===e[nT]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[__]&&(n[__]=e[__]),null!=e[iT]&&(n[iT]=e[iT]),null!=e[Vk]&&(n[Vk]=e[Vk]),null!=e[Kk]&&(n[Kk]=e[Kk]),n},Yx=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},Qx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[G_]&&(n[G_]=e[G_]),n},Jx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[CO]&&(n[CO]=e[CO]),n},Xx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[AC]&&(n[AC]=e[AC]),null!=e[hO]&&(n[hO]=e[hO]),n},Zx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[vC]&&(n[vC]=e[vC]),null!=e[i_]&&(n[i_]=e[i_]),n},ew=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[AC]&&(n[AC]=e[AC]),null!=e[Nk]&&(n[Nk]=e[Nk]),n},tw=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[KC]&&(n[KC]=e[KC]),null!=e[XS]&&(n[XS]=e[XS]),n},nw=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=e[Hk]),null!=e[xO]&&(n[xO]=e[xO]),n},iw=(e,t)=>{const n={};return null!=e[qk]&&(n[qk]=e[qk]),n},rw=(e,t)=>{const n={};return null!=e[Lk]&&(n[Lk]=e[Lk]),null!=e[Hk]&&(n[Hk]=e[Hk]),n},ow=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[Ik]&&(n[Ik]=e[Ik]),null!=e[Zk]&&(n[Zk]=e[Zk]),null!=e[WO]&&(n[WO]=e[WO]),n},sw=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[Kk]&&(n[Kk]=e[Kk]),n},aw=(e,t)=>{const n={};return null!=e[y_]&&(n[y_]=e[y_]),n},cw=(e,t)=>{const n={};return null!=e[hO]&&(n[hO]=e[hO]),n},lw=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[gO]){const t=lx(e[gO]);Object.entries(t).forEach((([e,t])=>{n[`EventDestination.${e}`]=t}))}return n},uw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),null!=e[hO]&&(n[hO]=e[hO]),n},pw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),null!=e[hO]&&(n[hO]=e[hO]),n},dw=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[Jk]){const t=aw(e[Jk]);Object.entries(t).forEach((([e,t])=>{n[`TrackingOptions.${e}`]=t}))}return n},mw=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[kO]&&(n[kO]=e[kO]),null!=e[tT]&&(n[tT]=e[tT]),null!=e[Wk]&&(n[Wk]=e[Wk]),null!=e[$k]&&(n[$k]=e[$k]),null!=e[AO]&&(n[AO]=e[AO]),n},hw=(e,t)=>{const n={};if(null!=e[tk]&&(n[tk]=e[tk]),null!=e[ck]){const t=Lx(e[ck]);Object.entries(t).forEach((([e,t])=>{n[`Rule.${e}`]=t}))}return n},fw=(e,t)=>{const n={};if(null!=e[iT]){const t=ow(e[iT]);Object.entries(t).forEach((([e,t])=>{n[`Template.${e}`]=t}))}return n},gw=(e,t)=>{const n={};return null!=e[mO]&&(n[mO]=e[mO]),n},yw=(e,t)=>{const n={};return null!=e[mO]&&(n[mO]=e[mO]),n},vw=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),n},bw=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),n},xw=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=e[Hk]),null!=e[IC]&&(n[IC]=e[IC]),n},ww=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},Ew=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Sw=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Fk]&&(t[Fk]=cn(e[Fk])),null!=e[wO]&&(t[wO]=cn(e[wO])),null!=e[SC]&&(t[SC]=cn(e[SC])),t})(e))),_w=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Ow=(e,t)=>({}),Cw=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Y_]&&(t[Y_]=cn(e[Y_])),null!=e[lO]&&(t[lO]=cn(e[lO])),null!=e[V_]&&(t[V_]=cn(e[V_])),t})(e))),kw=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),n},Tw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Pw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Aw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Iw=(e,t)=>({}),Rw=(e,t)=>({}),Mw=(e,t)=>({}),jw=(e,t)=>({}),$w=(e,t)=>({}),Nw=(e,t)=>({}),Dw=(e,t)=>({}),Lw=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},zw=(e,t)=>{const n={};return null!=e[A_]&&(n[A_]=cn(e[A_])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Fw=(e,t)=>{const n={};return null!=e[A_]&&(n[A_]=cn(e[A_])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Uw=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Qk]&&(t[Qk]=cn(e[Qk])),null!=e[kO]&&(t[kO]=cn(e[kO])),null!=e[tT]&&(t[tT]=cn(e[tT])),null!=e[$k]&&(t[$k]=cn(e[$k])),null!=e[AO]&&(t[AO]=cn(e[AO])),t})(e))),Bw=(e,t)=>({}),Hw=(e,t)=>({}),qw=(e,t)=>({}),Vw=(e,t)=>({}),Gw=(e,t)=>({}),Ww=(e,t)=>({}),Kw=(e,t)=>({}),Yw=(e,t)=>({}),Qw=(e,t)=>({}),Jw=(e,t)=>{const n={};return null!=e[CC]&&(n[CC]=eS(e[CC])),""===e.Rules?n[lk]=[]:null!=e[lk]&&null!=e[lk][kT]&&(n[lk]=nS(Ln(e[lk][kT]))),n},Xw=(e,t)=>{const n={};return null!=e[E_]&&(n[E_]=kw(e[E_])),""===e.EventDestinations?n[vO]=[]:null!=e[vO]&&null!=e[vO][kT]&&(n[vO]=rE(Ln(e[vO][kT]))),null!=e[Jk]&&(n[Jk]=AS(e[Jk])),null!=e[Q_]&&(n[Q_]=(e=>{const t={};return null!=e[Xk]&&(t[Xk]=cn(e[Xk])),t})(e[Q_])),null!=e[QC]&&(n[QC]=oS(e[QC])),n},Zw=(e,t)=>{const n={};return null!=e[ck]&&(n[ck]=ZE(e[ck])),n},eE=(e,t)=>{const n={};return null!=e[CC]&&(n[CC]=eS(e[CC])),""===e.Rules?n[lk]=[]:null!=e[lk]&&null!=e[lk][kT]&&(n[lk]=nS(Ln(e[lk][kT]))),n},tE=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[hO]&&(n[hO]=Jt(e[hO])),""===e.MatchingEventTypes?n[yC]=[]:null!=e[yC]&&null!=e[yC][kT]&&(n[yC]=oE(Ln(e[yC][kT]))),null!=e[nC]&&(n[nC]=AE(e[nC])),null!=e[I_]&&(n[I_]=(e=>{const t={};return""===e.DimensionConfigurations?t[L_]=[]:null!=e[L_]&&null!=e[L_][kT]&&(t[L_]=Cw(Ln(e[L_][kT]))),t})(e[I_])),null!=e[Ak]&&(n[Ak]=_S(e[Ak])),n},nE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},iE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},rE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>tE(e))),oE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),sE=(e,t)=>{const n={};return null!=e[kO]&&(n[kO]=cn(e[kO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},aE=(e,t)=>{const n={};return null!=e[hO]&&(n[hO]=Jt(e[hO])),n},cE=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[kO]&&(n[kO]=cn(e[kO])),null!=e[tT]&&(n[tT]=cn(e[tT])),null!=e[Wk]&&(n[Wk]=cn(e[Wk])),null!=e[$k]&&(n[$k]=cn(e[$k])),null!=e[AO]&&(n[AO]=cn(e[AO])),n},lE=(e,t)=>{const n={};return""===e.DkimAttributes?n[$_]={}:null!=e[$_]&&null!=e[$_][OT]&&(n[$_]=(e=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=yE(t.value)),e)),{}))(Ln(e[$_][OT]))),n},uE=(e,t)=>{const n={};return""===e.MailFromDomainAttributes?n[bC]={}:null!=e[bC]&&null!=e[bC][OT]&&(n[bC]=FE(Ln(e[bC][OT]))),n},pE=(e,t)=>{const n={};return""===e.NotificationAttributes?n[TC]={}:null!=e[TC]&&null!=e[TC][OT]&&(n[TC]=qE(Ln(e[TC][OT]))),n},dE=(e,t)=>{const n={};return""===e.Policies?n[FC]={}:null!=e[FC]&&null!=e[FC][OT]&&(n[FC]=VE(Ln(e[FC][OT]))),n},mE=(e,t)=>{const n={};return""===e.VerificationAttributes?n[fT]={}:null!=e[fT]&&null!=e[fT][OT]&&(n[fT]=DS(Ln(e[fT][OT]))),n},hE=(e,t)=>{const n={};return null!=e[wC]&&(n[wC]=un(e[wC])),null!=e[OC]&&(n[OC]=un(e[OC])),null!=e[Tk]&&(n[Tk]=un(e[Tk])),n},fE=(e,t)=>{const n={};return""===e.SendDataPoints?n[bk]=[]:null!=e[bk]&&null!=e[bk][kT]&&(n[bk]=dS(Ln(e[bk][kT]))),n},gE=(e,t)=>{const n={};return null!=e[iT]&&(n[iT]=CS(e[iT])),n},yE=(e,t)=>{const n={};return null!=e[G_]&&(n[G_]=Jt(e[G_])),null!=e[uO]&&(n[uO]=cn(e[uO])),""===e.DkimTokens?n[aO]=[]:null!=e[aO]&&null!=e[aO][kT]&&(n[aO]=LS(Ln(e[aO][kT]))),n},vE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},bE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},xE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},wE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},EE=(e,t)=>{const n={};return null!=e[_O]&&(n[_O]=cn(e[_O])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},SE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},_E=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},OE=(e,t)=>{const n={};return null!=e[u_]&&(n[u_]=cn(e[u_])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},CE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},kE=(e,t)=>{const n={};return null!=e[oT]&&(n[oT]=cn(e[oT])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},TE=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},PE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},AE=(e,t)=>{const n={};return null!=e[QO]&&(n[QO]=cn(e[QO])),null!=e[nO]&&(n[nO]=cn(e[nO])),n},IE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},RE=(e,t)=>{const n={};return""===e.ConfigurationSets?n[O_]=[]:null!=e[O_]&&null!=e[O_][kT]&&(n[O_]=(e=>(e||[]).filter((e=>null!=e)).map((e=>kw(e))))(Ln(e[O_][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},ME=(e,t)=>{const n={};return""===e.CustomVerificationEmailTemplates?n[P_]=[]:null!=e[P_]&&null!=e[P_][kT]&&(n[P_]=Uw(Ln(e[P_][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},jE=(e,t)=>{const n={};return""===e.Identities?n[tC]=[]:null!=e[tC]&&null!=e[tC][kT]&&(n[tC]=(e=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))))(Ln(e[tC][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},$E=(e,t)=>{const n={};return""===e.PolicyNames?n[zC]=[]:null!=e[zC]&&null!=e[zC][kT]&&(n[zC]=GE(Ln(e[zC][kT]))),n},NE=(e,t)=>{const n={};return""===e.Filters?n[IO]=[]:null!=e[IO]&&null!=e[IO][kT]&&(n[IO]=JE(Ln(e[IO][kT]))),n},DE=(e,t)=>{const n={};return""===e.RuleSets?n[ek]=[]:null!=e[ek]&&null!=e[ek][kT]&&(n[ek]=tS(Ln(e[ek][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},LE=(e,t)=>{const n={};return""===e.TemplatesMetadata?n[Yk]=[]:null!=e[Yk]&&null!=e[Yk][kT]&&(n[Yk]=TS(Ln(e[Yk][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},zE=(e,t)=>{const n={};return""===e.VerifiedEmailAddresses?n[bT]=[]:null!=e[bT]&&null!=e[bT][kT]&&(n[bT]=(e=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))))(Ln(e[bT][kT]))),n},FE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[vC]&&(t[vC]=cn(e[vC])),null!=e[xC]&&(t[xC]=cn(e[xC])),null!=e[i_]&&(t[i_]=cn(e[i_])),t})(t.value)),e)),{}),UE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},BE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},HE=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},qE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[c_]&&(t[c_]=cn(e[c_])),null!=e[k_]&&(t[k_]=cn(e[k_])),null!=e[sO]&&(t[sO]=cn(e[sO])),null!=e[CO]&&(t[CO]=Jt(e[CO])),null!=e[HO]&&(t[HO]=Jt(e[HO])),null!=e[qO]&&(t[qO]=Jt(e[qO])),null!=e[VO]&&(t[VO]=Jt(e[VO])),t})(t.value)),e)),{}),VE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=cn(t.value)),e)),{}),GE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),WE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},KE=(e,t)=>({}),YE=(e,t)=>({}),QE=(e,t)=>{const n={};return null!=e[pk]&&(n[pk]=cS(e[pk])),null!=e[t_]&&(n[t_]=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=cn(e[Hk])),null!=e[Rk]&&(t[Rk]=cn(e[Rk])),null!=e[yk]&&(t[yk]=cn(e[yk])),null!=e[fC]&&(t[fC]=cn(e[fC])),null!=e[uk]&&(t[uk]=cn(e[uk])),t})(e[t_])),null!=e[_T]&&(n[_T]=BS(e[_T])),null!=e[rC]&&(n[rC]=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=cn(e[Hk])),null!=e[_O]&&(t[_O]=cn(e[_O])),null!=e[ZO]&&(t[ZO]=cn(e[ZO])),t})(e[rC])),null!=e[hk]&&(n[hk]=OS(e[hk])),null!=e[QS]&&(n[QS]=(e=>{const t={};return null!=e[GO]&&(t[GO]=cn(e[GO])),null!=e[KO]&&(t[KO]=cn(e[KO])),t})(e[QS])),null!=e[Pk]&&(n[Pk]=SS(e[Pk])),n},JE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[kC]&&(t[kC]=cn(e[kC])),null!=e[JO]&&(t[JO]=XE(e[JO])),t})(e))),XE=(e,t)=>{const n={};return null!=e[$C]&&(n[$C]=cn(e[$C])),null!=e[R_]&&(n[R_]=cn(e[R_])),n},ZE=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[hO]&&(n[hO]=Jt(e[hO])),null!=e[Xk]&&(n[Xk]=cn(e[Xk])),""===e.Recipients?n[sk]=[]:null!=e[sk]&&null!=e[sk][kT]&&(n[sk]=iS(Ln(e[sk][kT]))),""===e.Actions?n[JS]=[]:null!=e[JS]&&null!=e[JS][kT]&&(n[JS]=(e=>(e||[]).filter((e=>null!=e)).map((e=>QE(e))))(Ln(e[JS][kT]))),null!=e[wk]&&(n[wk]=Jt(e[wk])),n},eS=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[T_]&&(n[T_]=an(vn(e[T_]))),n},tS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>eS(e))),nS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ZE(e))),iS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),rS=(e,t)=>({}),oS=(e,t)=>{const n={};return null!=e[Ek]&&(n[Ek]=Jt(e[Ek])),null!=e[VC]&&(n[VC]=Jt(e[VC])),null!=e[cC]&&(n[cC]=an(vn(e[cC]))),n},sS=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},aS=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},cS=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=cn(e[Hk])),null!=e[n_]&&(n[n_]=cn(e[n_])),null!=e[RC]&&(n[RC]=cn(e[RC])),null!=e[iC]&&(n[iC]=cn(e[iC])),null!=e[XO]&&(n[XO]=cn(e[XO])),n},lS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},uS=(e,t)=>{const n={};return""===e.Status?n[Fk]=[]:null!=e[Fk]&&null!=e[Fk][kT]&&(n[Fk]=Sw(Ln(e[Fk][kT]))),n},pS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},dS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[rT]&&(t[rT]=an(vn(e[rT]))),null!=e[D_]&&(t[D_]=mn(e[D_])),null!=e[l_]&&(t[l_]=mn(e[l_])),null!=e[M_]&&(t[M_]=mn(e[M_])),null!=e[ak]&&(t[ak]=mn(e[ak])),t})(e))),mS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},hS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},fS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},gS=(e,t)=>({}),yS=(e,t)=>({}),vS=(e,t)=>({}),bS=(e,t)=>({}),xS=(e,t)=>({}),wS=(e,t)=>({}),ES=(e,t)=>({}),SS=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=cn(e[Hk])),null!=e[xO]&&(n[xO]=cn(e[xO])),n},_S=(e,t)=>{const n={};return null!=e[qk]&&(n[qk]=cn(e[qk])),n},OS=(e,t)=>{const n={};return null!=e[Lk]&&(n[Lk]=cn(e[Lk])),null!=e[Hk]&&(n[Hk]=cn(e[Hk])),n},CS=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[Ik]&&(n[Ik]=cn(e[Ik])),null!=e[Zk]&&(n[Zk]=cn(e[Zk])),null!=e[WO]&&(n[WO]=cn(e[WO])),n},kS=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},TS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[kC]&&(t[kC]=cn(e[kC])),null!=e[T_]&&(t[T_]=an(vn(e[T_]))),t})(e))),PS=(e,t)=>{const n={};return null!=e[ok]&&(n[ok]=cn(e[ok])),n},AS=(e,t)=>{const n={};return null!=e[y_]&&(n[y_]=cn(e[y_])),n},IS=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},RS=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},MS=(e,t)=>({}),jS=(e,t)=>({}),$S=(e,t)=>({}),NS=(e,t)=>({}),DS=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[wT]&&(t[wT]=cn(e[wT])),null!=e[ET]&&(t[ET]=cn(e[ET])),t})(t.value)),e)),{}),LS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),zS=(e,t)=>{const n={};return""===e.DkimTokens?n[aO]=[]:null!=e[aO]&&null!=e[aO][kT]&&(n[aO]=LS(Ln(e[aO][kT]))),n},FS=(e,t)=>{const n={};return null!=e[ET]&&(n[ET]=cn(e[ET])),n},US=(e,t)=>({}),BS=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=cn(e[Hk])),null!=e[IC]&&(n[IC]=cn(e[IC])),n},HS=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"]}),qS=Pn(Nf),VS=async(e,t,n,i,r)=>{const{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),l={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(l.body=r),new T(l)},GS={"content-type":"application/x-www-form-urlencoded"},WS="2010-12-01",KS="Action",YS="ArrivalDate",QS="AddHeaderAction",JS="Actions",XS="After",ZS="Body",e_="BccAddresses",t_="BounceAction",n_="BucketName",i_="BehaviorOnMXFailure",r_="BouncedRecipientInfoList",o_="BounceSender",s_="BounceSenderArn",a_="BounceType",c_="BounceTopic",l_="Bounces",u_="Bucket",p_="Charset",d_="CcAddresses",m_="CreateConfigurationSet",h_="CreateConfigurationSetEventDestination",f_="CreateConfigurationSetTrackingOptions",g_="CreateCustomVerificationEmailTemplate",y_="CustomRedirectDomain",v_="CreateReceiptFilter",b_="CreateReceiptRule",x_="CloneReceiptRuleSet",w_="CreateReceiptRuleSet",E_="ConfigurationSet",S_="ConfigurationSetAttributeNames",__="ConfigurationSetName",O_="ConfigurationSets",C_="CreateTemplate",k_="ComplaintTopic",T_="CreatedTimestamp",P_="CustomVerificationEmailTemplates",A_="CustomVerificationEmailTemplateName",I_="CloudWatchDestination",R_="Cidr",M_="Complaints",j_="Destination",$_="DkimAttributes",N_="DescribeActiveReceiptRuleSet",D_="DeliveryAttempts",L_="DimensionConfigurations",z_="DeleteConfigurationSet",F_="DeleteConfigurationSetEventDestination",U_="DeleteConfigurationSetTrackingOptions",B_="DescribeConfigurationSet",H_="DeleteCustomVerificationEmailTemplate",q_="DiagnosticCode",V_="DefaultDimensionValue",G_="DkimEnabled",W_="DeleteIdentity",K_="DeleteIdentityPolicy",Y_="DimensionName",Q_="DeliveryOptions",J_="DeleteReceiptFilter",X_="DeleteReceiptRule",Z_="DeleteReceiptRuleSet",eO="DescribeReceiptRuleSet",tO="DescribeReceiptRule",nO="DeliveryStreamARN",iO="DeleteTemplate",rO="DefaultTemplateData",oO="DefaultTags",sO="DeliveryTopic",aO="DkimTokens",cO="DeleteVerifiedEmailAddress",lO="DimensionValueSource",uO="DkimVerificationStatus",pO="Data",dO="Destinations",mO="Domain",hO="Enabled",fO="EmailAddress",gO="EventDestination",yO="EventDestinationName",vO="EventDestinations",bO="ExtensionFields",xO="Encoding",wO="Error",EO="Explanation",SO="Filter",_O="FunctionArn",OO="FromArn",CO="ForwardingEnabled",kO="FromEmailAddress",TO="FilterName",PO="FinalRecipient",AO="FailureRedirectionURL",IO="Filters",RO="GetAccountSendingEnabled",MO="GetCustomVerificationEmailTemplate",jO="GetIdentityDkimAttributes",$O="GetIdentityMailFromDomainAttributes",NO="GetIdentityNotificationAttributes",DO="GetIdentityPolicies",LO="GetIdentityVerificationAttributes",zO="GetSendQuota",FO="GetSendStatistics",UO="GetTemplate",BO="Html",HO="HeadersInBounceNotificationsEnabled",qO="HeadersInComplaintNotificationsEnabled",VO="HeadersInDeliveryNotificationsEnabled",GO="HeaderName",WO="HtmlPart",KO="HeaderValue",YO="Identity",QO="IAMRoleARN",JO="IpFilter",XO="IamRoleArn",ZO="InvocationType",eC="IdentityType",tC="Identities",nC="KinesisFirehoseDestination",iC="KmsKeyArn",rC="LambdaAction",oC="LastAttemptDate",sC="ListConfigurationSets",aC="ListCustomVerificationEmailTemplates",cC="LastFreshStart",lC="ListIdentities",uC="ListIdentityPolicies",pC="ListReceiptFilters",dC="ListReceiptRuleSets",mC="ListTemplates",hC="ListVerifiedEmailAddresses",fC="Message",gC="MessageDsn",yC="MatchingEventTypes",vC="MailFromDomain",bC="MailFromDomainAttributes",xC="MailFromDomainStatus",wC="Max24HourSend",EC="MaxItems",SC="MessageId",_C="MaxResults",OC="MaxSendRate",CC="Metadata",kC="Name",TC="NotificationAttributes",PC="NextToken",AC="NotificationType",IC="OrganizationArn",RC="ObjectKeyPrefix",MC="OriginalMessageId",jC="OriginalRuleSetName",$C="Policy",NC="PutConfigurationSetDeliveryOptions",DC="PutIdentityPolicy",LC="PolicyName",zC="PolicyNames",FC="Policies",UC="Recipient",BC="RecipientArn",HC="RecipientDsnFields",qC="ReportingMta",VC="ReputationMetricsEnabled",GC="RawMessage",WC="RemoteMta",KC="RuleName",YC="RuleNames",QC="ReputationOptions",JC="ReturnPath",XC="ReturnPathArn",ZC="ReorderReceiptRuleSet",ek="RuleSets",tk="RuleSetName",nk="ReplacementTags",ik="ReplyToAddresses",rk="ReplacementTemplateData",ok="RenderedTemplate",sk="Recipients",ak="Rejects",ck="Rule",lk="Rules",uk="Sender",pk="S3Action",dk="SetActiveReceiptRuleSet",mk="SourceArn",hk="StopAction",fk="SendBounce",gk="SendBulkTemplatedEmail",yk="StatusCode",vk="SendCustomVerificationEmail",bk="SendDataPoints",xk="SendEmail",wk="ScanEnabled",Ek="SendingEnabled",Sk="SetIdentityDkimEnabled",_k="SetIdentityFeedbackForwardingEnabled",Ok="SetIdentityHeadersInNotificationsEnabled",Ck="SetIdentityMailFromDomain",kk="SetIdentityNotificationTopic",Tk="SentLast24Hours",Pk="SNSAction",Ak="SNSDestination",Ik="SubjectPart",Rk="SmtpReplyCode",Mk="SendRawEmail",jk="SetReceiptRulePosition",$k="SuccessRedirectionURL",Nk="SnsTopic",Dk="SendTemplatedEmail",Lk="Scope",zk="Source",Fk="Status",Uk="Subject",Bk="Text",Hk="TopicArn",qk="TopicARN",Vk="TemplateArn",Gk="ToAddresses",Wk="TemplateContent",Kk="TemplateData",Yk="TemplatesMetadata",Qk="TemplateName",Jk="TrackingOptions",Xk="TlsPolicy",Zk="TextPart",eT="TestRenderTemplate",tT="TemplateSubject",nT="Tags",iT="Template",rT="Timestamp",oT="Topic",sT="UpdateAccountSendingEnabled",aT="UpdateConfigurationSetEventDestination",cT="UpdateConfigurationSetReputationMetricsEnabled",lT="UpdateConfigurationSetSendingEnabled",uT="UpdateConfigurationSetTrackingOptions",pT="UpdateCustomVerificationEmailTemplate",dT="UpdateReceiptRule",mT="UpdateTemplate",hT="Version",fT="VerificationAttributes",gT="VerifyDomainDkim",yT="VerifyDomainIdentity",vT="VerifyEmailAddress",bT="VerifiedEmailAddresses",xT="VerifyEmailIdentity",wT="VerificationStatus",ET="VerificationToken",ST="Value",_T="WorkmailAction",OT="entry",CT="message",kT="member",TT=e=>Object.entries(e).map((([e,t])=>be(e)+"="+be(t))).join("&"),PT=(e,t)=>void 0!==t.Error?.Code?t.Error.Code:404==e.statusCode?"NotFound":void 0;class AT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CloneReceiptRuleSet",{}).n("SESClient","CloneReceiptRuleSetCommand").f(void 0,void 0).ser(yg).de(jy).build()){}class IT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSet",{}).n("SESClient","CreateConfigurationSetCommand").f(void 0,void 0).ser(vg).de($y).build()){}class RT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetEventDestination",{}).n("SESClient","CreateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(bg).de(Ny).build()){}class MT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetTrackingOptions",{}).n("SESClient","CreateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(xg).de(Dy).build()){}class jT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateCustomVerificationEmailTemplate",{}).n("SESClient","CreateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(wg).de(Ly).build()){}class $T extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptFilter",{}).n("SESClient","CreateReceiptFilterCommand").f(void 0,void 0).ser(Eg).de(zy).build()){}class NT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRule",{}).n("SESClient","CreateReceiptRuleCommand").f(void 0,void 0).ser(Sg).de(Fy).build()){}class DT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRuleSet",{}).n("SESClient","CreateReceiptRuleSetCommand").f(void 0,void 0).ser(_g).de(Uy).build()){}class LT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateTemplate",{}).n("SESClient","CreateTemplateCommand").f(void 0,void 0).ser(Og).de(By).build()){}class zT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSet",{}).n("SESClient","DeleteConfigurationSetCommand").f(void 0,void 0).ser(Cg).de(Hy).build()){}class FT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetEventDestination",{}).n("SESClient","DeleteConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(kg).de(qy).build()){}class UT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetTrackingOptions",{}).n("SESClient","DeleteConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(Tg).de(Vy).build()){}class BT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteCustomVerificationEmailTemplate",{}).n("SESClient","DeleteCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(Pg).de(Gy).build()){}class HT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentity",{}).n("SESClient","DeleteIdentityCommand").f(void 0,void 0).ser(Ag).de(Wy).build()){}class qT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentityPolicy",{}).n("SESClient","DeleteIdentityPolicyCommand").f(void 0,void 0).ser(Ig).de(Ky).build()){}class VT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptFilter",{}).n("SESClient","DeleteReceiptFilterCommand").f(void 0,void 0).ser(Rg).de(Yy).build()){}class GT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRule",{}).n("SESClient","DeleteReceiptRuleCommand").f(void 0,void 0).ser(Mg).de(Qy).build()){}class WT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRuleSet",{}).n("SESClient","DeleteReceiptRuleSetCommand").f(void 0,void 0).ser(jg).de(Jy).build()){}class KT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteTemplate",{}).n("SESClient","DeleteTemplateCommand").f(void 0,void 0).ser($g).de(Xy).build()){}class YT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteVerifiedEmailAddress",{}).n("SESClient","DeleteVerifiedEmailAddressCommand").f(void 0,void 0).ser(Ng).de(Zy).build()){}class QT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeActiveReceiptRuleSet",{}).n("SESClient","DescribeActiveReceiptRuleSetCommand").f(void 0,void 0).ser(Dg).de(ev).build()){}class JT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeConfigurationSet",{}).n("SESClient","DescribeConfigurationSetCommand").f(void 0,void 0).ser(Lg).de(tv).build()){}class XT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRule",{}).n("SESClient","DescribeReceiptRuleCommand").f(void 0,void 0).ser(zg).de(nv).build()){}class ZT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRuleSet",{}).n("SESClient","DescribeReceiptRuleSetCommand").f(void 0,void 0).ser(Fg).de(iv).build()){}class eP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetAccountSendingEnabled",{}).n("SESClient","GetAccountSendingEnabledCommand").f(void 0,void 0).ser(Ug).de(rv).build()){}class tP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetCustomVerificationEmailTemplate",{}).n("SESClient","GetCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(Bg).de(ov).build()){}class nP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityDkimAttributes",{}).n("SESClient","GetIdentityDkimAttributesCommand").f(void 0,void 0).ser(Hg).de(sv).build()){}class iP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityMailFromDomainAttributes",{}).n("SESClient","GetIdentityMailFromDomainAttributesCommand").f(void 0,void 0).ser(qg).de(av).build()){}class rP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityNotificationAttributes",{}).n("SESClient","GetIdentityNotificationAttributesCommand").f(void 0,void 0).ser(Vg).de(cv).build()){}class oP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityPolicies",{}).n("SESClient","GetIdentityPoliciesCommand").f(void 0,void 0).ser(Gg).de(lv).build()){}class sP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityVerificationAttributes",{}).n("SESClient","GetIdentityVerificationAttributesCommand").f(void 0,void 0).ser(Wg).de(uv).build()){}class aP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendQuota",{}).n("SESClient","GetSendQuotaCommand").f(void 0,void 0).ser(Kg).de(pv).build()){}class cP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendStatistics",{}).n("SESClient","GetSendStatisticsCommand").f(void 0,void 0).ser(Yg).de(dv).build()){}class lP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetTemplate",{}).n("SESClient","GetTemplateCommand").f(void 0,void 0).ser(Qg).de(mv).build()){}class uP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListConfigurationSets",{}).n("SESClient","ListConfigurationSetsCommand").f(void 0,void 0).ser(Jg).de(hv).build()){}class pP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListCustomVerificationEmailTemplates",{}).n("SESClient","ListCustomVerificationEmailTemplatesCommand").f(void 0,void 0).ser(Xg).de(fv).build()){}class dP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentities",{}).n("SESClient","ListIdentitiesCommand").f(void 0,void 0).ser(Zg).de(gv).build()){}class mP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentityPolicies",{}).n("SESClient","ListIdentityPoliciesCommand").f(void 0,void 0).ser(ey).de(yv).build()){}class hP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptFilters",{}).n("SESClient","ListReceiptFiltersCommand").f(void 0,void 0).ser(ty).de(vv).build()){}class fP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptRuleSets",{}).n("SESClient","ListReceiptRuleSetsCommand").f(void 0,void 0).ser(ny).de(bv).build()){}class gP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListTemplates",{}).n("SESClient","ListTemplatesCommand").f(void 0,void 0).ser(iy).de(xv).build()){}class yP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListVerifiedEmailAddresses",{}).n("SESClient","ListVerifiedEmailAddressesCommand").f(void 0,void 0).ser(ry).de(wv).build()){}class vP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutConfigurationSetDeliveryOptions",{}).n("SESClient","PutConfigurationSetDeliveryOptionsCommand").f(void 0,void 0).ser(oy).de(Ev).build()){}class bP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutIdentityPolicy",{}).n("SESClient","PutIdentityPolicyCommand").f(void 0,void 0).ser(sy).de(Sv).build()){}class xP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ReorderReceiptRuleSet",{}).n("SESClient","ReorderReceiptRuleSetCommand").f(void 0,void 0).ser(ay).de(_v).build()){}class wP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBounce",{}).n("SESClient","SendBounceCommand").f(void 0,void 0).ser(cy).de(Ov).build()){}class EP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBulkTemplatedEmail",{}).n("SESClient","SendBulkTemplatedEmailCommand").f(void 0,void 0).ser(ly).de(Cv).build()){}class SP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendCustomVerificationEmail",{}).n("SESClient","SendCustomVerificationEmailCommand").f(void 0,void 0).ser(uy).de(kv).build()){}class _P extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendEmail",{}).n("SESClient","SendEmailCommand").f(void 0,void 0).ser(py).de(Tv).build()){}class OP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendRawEmail",{}).n("SESClient","SendRawEmailCommand").f(void 0,void 0).ser(dy).de(Pv).build()){}class CP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendTemplatedEmail",{}).n("SESClient","SendTemplatedEmailCommand").f(void 0,void 0).ser(my).de(Av).build()){}class kP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetActiveReceiptRuleSet",{}).n("SESClient","SetActiveReceiptRuleSetCommand").f(void 0,void 0).ser(hy).de(Iv).build()){}class TP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityDkimEnabled",{}).n("SESClient","SetIdentityDkimEnabledCommand").f(void 0,void 0).ser(fy).de(Rv).build()){}class PP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityFeedbackForwardingEnabled",{}).n("SESClient","SetIdentityFeedbackForwardingEnabledCommand").f(void 0,void 0).ser(gy).de(Mv).build()){}class AP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityHeadersInNotificationsEnabled",{}).n("SESClient","SetIdentityHeadersInNotificationsEnabledCommand").f(void 0,void 0).ser(yy).de(jv).build()){}class IP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityMailFromDomain",{}).n("SESClient","SetIdentityMailFromDomainCommand").f(void 0,void 0).ser(vy).de($v).build()){}class RP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityNotificationTopic",{}).n("SESClient","SetIdentityNotificationTopicCommand").f(void 0,void 0).ser(by).de(Nv).build()){}class MP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetReceiptRulePosition",{}).n("SESClient","SetReceiptRulePositionCommand").f(void 0,void 0).ser(xy).de(Dv).build()){}class jP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","TestRenderTemplate",{}).n("SESClient","TestRenderTemplateCommand").f(void 0,void 0).ser(wy).de(Lv).build()){}class $P extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateAccountSendingEnabled",{}).n("SESClient","UpdateAccountSendingEnabledCommand").f(void 0,void 0).ser(Ey).de(zv).build()){}class NP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetEventDestination",{}).n("SESClient","UpdateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(Sy).de(Fv).build()){}class DP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetReputationMetricsEnabled",{}).n("SESClient","UpdateConfigurationSetReputationMetricsEnabledCommand").f(void 0,void 0).ser(_y).de(Uv).build()){}class LP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetSendingEnabled",{}).n("SESClient","UpdateConfigurationSetSendingEnabledCommand").f(void 0,void 0).ser(Oy).de(Bv).build()){}class zP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetTrackingOptions",{}).n("SESClient","UpdateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(Cy).de(Hv).build()){}class FP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateCustomVerificationEmailTemplate",{}).n("SESClient","UpdateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(ky).de(qv).build()){}class UP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateReceiptRule",{}).n("SESClient","UpdateReceiptRuleCommand").f(void 0,void 0).ser(Ty).de(Vv).build()){}class BP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateTemplate",{}).n("SESClient","UpdateTemplateCommand").f(void 0,void 0).ser(Py).de(Gv).build()){}class HP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainDkim",{}).n("SESClient","VerifyDomainDkimCommand").f(void 0,void 0).ser(Ay).de(Wv).build()){}class qP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainIdentity",{}).n("SESClient","VerifyDomainIdentityCommand").f(void 0,void 0).ser(Iy).de(Kv).build()){}class VP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailAddress",{}).n("SESClient","VerifyEmailAddressCommand").f(void 0,void 0).ser(Ry).de(Yv).build()){}class GP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailIdentity",{}).n("SESClient","VerifyEmailIdentityCommand").f(void 0,void 0).ser(My).de(Qv).build()){}const WP={CloneReceiptRuleSetCommand:AT,CreateConfigurationSetCommand:IT,CreateConfigurationSetEventDestinationCommand:RT,CreateConfigurationSetTrackingOptionsCommand:MT,CreateCustomVerificationEmailTemplateCommand:jT,CreateReceiptFilterCommand:$T,CreateReceiptRuleCommand:NT,CreateReceiptRuleSetCommand:DT,CreateTemplateCommand:LT,DeleteConfigurationSetCommand:zT,DeleteConfigurationSetEventDestinationCommand:FT,DeleteConfigurationSetTrackingOptionsCommand:UT,DeleteCustomVerificationEmailTemplateCommand:BT,DeleteIdentityCommand:HT,DeleteIdentityPolicyCommand:qT,DeleteReceiptFilterCommand:VT,DeleteReceiptRuleCommand:GT,DeleteReceiptRuleSetCommand:WT,DeleteTemplateCommand:KT,DeleteVerifiedEmailAddressCommand:YT,DescribeActiveReceiptRuleSetCommand:QT,DescribeConfigurationSetCommand:JT,DescribeReceiptRuleCommand:XT,DescribeReceiptRuleSetCommand:ZT,GetAccountSendingEnabledCommand:eP,GetCustomVerificationEmailTemplateCommand:tP,GetIdentityDkimAttributesCommand:nP,GetIdentityMailFromDomainAttributesCommand:iP,GetIdentityNotificationAttributesCommand:rP,GetIdentityPoliciesCommand:oP,GetIdentityVerificationAttributesCommand:sP,GetSendQuotaCommand:aP,GetSendStatisticsCommand:cP,GetTemplateCommand:lP,ListConfigurationSetsCommand:uP,ListCustomVerificationEmailTemplatesCommand:pP,ListIdentitiesCommand:dP,ListIdentityPoliciesCommand:mP,ListReceiptFiltersCommand:hP,ListReceiptRuleSetsCommand:fP,ListTemplatesCommand:gP,ListVerifiedEmailAddressesCommand:yP,PutConfigurationSetDeliveryOptionsCommand:vP,PutIdentityPolicyCommand:bP,ReorderReceiptRuleSetCommand:xP,SendBounceCommand:wP,SendBulkTemplatedEmailCommand:EP,SendCustomVerificationEmailCommand:SP,SendEmailCommand:_P,SendRawEmailCommand:OP,SendTemplatedEmailCommand:CP,SetActiveReceiptRuleSetCommand:kP,SetIdentityDkimEnabledCommand:TP,SetIdentityFeedbackForwardingEnabledCommand:PP,SetIdentityHeadersInNotificationsEnabledCommand:AP,SetIdentityMailFromDomainCommand:IP,SetIdentityNotificationTopicCommand:RP,SetReceiptRulePositionCommand:MP,TestRenderTemplateCommand:jP,UpdateAccountSendingEnabledCommand:$P,UpdateConfigurationSetEventDestinationCommand:NP,UpdateConfigurationSetReputationMetricsEnabledCommand:DP,UpdateConfigurationSetSendingEnabledCommand:LP,UpdateConfigurationSetTrackingOptionsCommand:zP,UpdateCustomVerificationEmailTemplateCommand:FP,UpdateReceiptRuleCommand:UP,UpdateTemplateCommand:BP,VerifyDomainDkimCommand:HP,VerifyDomainIdentityCommand:qP,VerifyEmailAddressCommand:VP,VerifyEmailIdentityCommand:GP};let KP=class extends $f{};((e,t)=>{for(const n of Object.keys(e)){const i=e[n],r=async function(e,t,n){const r=new i(e);if("function"==typeof t)this.send(r,t);else{if("function"!=typeof n)return this.send(r,t);if("object"!=typeof t)throw new Error("Expected http options but got "+typeof t);this.send(r,t||{},n)}},o=(n[0].toLowerCase()+n.slice(1)).replace(/Command$/,"");t.prototype[o]=r}})(WP,KP);const YP=J($f,pP,"NextToken","NextToken","MaxResults"),QP=J($f,dP,"NextToken","NextToken","MaxItems"),JP=async(e,t)=>{let n;try{const i=await e.send(new sP(t));n=i;try{const e=()=>Object.values(i.VerificationAttributes).map((e=>e.VerificationStatus));let t=e().length>0;for(const n of e())t=t&&"Success"==n;if(t)return{state:xc.SUCCESS,reason:n}}catch(e){}}catch(e){n=e}return{state:xc.RETRY,reason:n}};var XP,ZP,eA=Object.freeze({__proto__:null,$Command:Kt,AccountSendingPausedException:Df,AlreadyExistsException:Lf,BehaviorOnMXFailure:{RejectMessage:"RejectMessage",UseDefaultValue:"UseDefaultValue"},BounceType:{ContentRejected:"ContentRejected",DoesNotExist:"DoesNotExist",ExceededQuota:"ExceededQuota",MessageTooLarge:"MessageTooLarge",TemporaryFailure:"TemporaryFailure",Undefined:"Undefined"},BulkEmailStatus:{AccountDailyQuotaExceeded:"AccountDailyQuotaExceeded",AccountSendingPaused:"AccountSendingPaused",AccountSuspended:"AccountSuspended",AccountThrottled:"AccountThrottled",ConfigurationSetDoesNotExist:"ConfigurationSetDoesNotExist",ConfigurationSetSendingPaused:"ConfigurationSetSendingPaused",Failed:"Failed",InvalidParameterValue:"InvalidParameterValue",InvalidSendingPoolName:"InvalidSendingPoolName",MailFromDomainNotVerified:"MailFromDomainNotVerified",MessageRejected:"MessageRejected",Success:"Success",TemplateDoesNotExist:"TemplateDoesNotExist",TransientFailure:"TransientFailure"},CannotDeleteException:zf,CloneReceiptRuleSetCommand:AT,ConfigurationSetAlreadyExistsException:Bf,ConfigurationSetAttribute:{DELIVERY_OPTIONS:"deliveryOptions",EVENT_DESTINATIONS:"eventDestinations",REPUTATION_OPTIONS:"reputationOptions",TRACKING_OPTIONS:"trackingOptions"},ConfigurationSetDoesNotExistException:Hf,ConfigurationSetSendingPausedException:qf,CreateConfigurationSetCommand:IT,CreateConfigurationSetEventDestinationCommand:RT,CreateConfigurationSetTrackingOptionsCommand:MT,CreateCustomVerificationEmailTemplateCommand:jT,CreateReceiptFilterCommand:$T,CreateReceiptRuleCommand:NT,CreateReceiptRuleSetCommand:DT,CreateTemplateCommand:LT,CustomMailFromStatus:{Failed:"Failed",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"},CustomVerificationEmailInvalidContentException:Xf,CustomVerificationEmailTemplateAlreadyExistsException:Zf,CustomVerificationEmailTemplateDoesNotExistException:sg,DeleteConfigurationSetCommand:zT,DeleteConfigurationSetEventDestinationCommand:FT,DeleteConfigurationSetTrackingOptionsCommand:UT,DeleteCustomVerificationEmailTemplateCommand:BT,DeleteIdentityCommand:HT,DeleteIdentityPolicyCommand:qT,DeleteReceiptFilterCommand:VT,DeleteReceiptRuleCommand:GT,DeleteReceiptRuleSetCommand:WT,DeleteTemplateCommand:KT,DeleteVerifiedEmailAddressCommand:YT,DescribeActiveReceiptRuleSetCommand:QT,DescribeConfigurationSetCommand:JT,DescribeReceiptRuleCommand:XT,DescribeReceiptRuleSetCommand:ZT,DimensionValueSource:{EMAIL_HEADER:"emailHeader",LINK_TAG:"linkTag",MESSAGE_TAG:"messageTag"},DsnAction:{DELAYED:"delayed",DELIVERED:"delivered",EXPANDED:"expanded",FAILED:"failed",RELAYED:"relayed"},EventDestinationAlreadyExistsException:Gf,EventDestinationDoesNotExistException:ag,EventType:{BOUNCE:"bounce",CLICK:"click",COMPLAINT:"complaint",DELIVERY:"delivery",OPEN:"open",REJECT:"reject",RENDERING_FAILURE:"renderingFailure",SEND:"send"},FromEmailAddressNotVerifiedException:eg,GetAccountSendingEnabledCommand:eP,GetCustomVerificationEmailTemplateCommand:tP,GetIdentityDkimAttributesCommand:nP,GetIdentityMailFromDomainAttributesCommand:iP,GetIdentityNotificationAttributesCommand:rP,GetIdentityPoliciesCommand:oP,GetIdentityVerificationAttributesCommand:sP,GetSendQuotaCommand:aP,GetSendStatisticsCommand:cP,GetTemplateCommand:lP,IdentityType:{Domain:"Domain",EmailAddress:"EmailAddress"},InvalidCloudWatchDestinationException:Wf,InvalidConfigurationSetException:Vf,InvalidDeliveryOptionsException:ug,InvalidFirehoseDestinationException:Kf,InvalidLambdaFunctionException:tg,InvalidPolicyException:pg,InvalidRenderingParameterException:dg,InvalidS3ConfigurationException:ng,InvalidSNSDestinationException:Yf,InvalidSnsTopicException:ig,InvalidTemplateException:og,InvalidTrackingOptionsException:Qf,InvocationType:{Event:"Event",RequestResponse:"RequestResponse"},LimitExceededException:Ff,ListConfigurationSetsCommand:uP,ListCustomVerificationEmailTemplatesCommand:pP,ListIdentitiesCommand:dP,ListIdentityPoliciesCommand:mP,ListReceiptFiltersCommand:hP,ListReceiptRuleSetsCommand:fP,ListTemplatesCommand:gP,ListVerifiedEmailAddressesCommand:yP,MailFromDomainNotVerifiedException:mg,MessageRejected:hg,MissingRenderingAttributeException:fg,NotificationType:{Bounce:"Bounce",Complaint:"Complaint",Delivery:"Delivery"},ProductionAccessNotGrantedException:gg,PutConfigurationSetDeliveryOptionsCommand:vP,PutIdentityPolicyCommand:bP,ReceiptFilterPolicy:{Allow:"Allow",Block:"Block"},ReorderReceiptRuleSetCommand:xP,RuleDoesNotExistException:rg,RuleSetDoesNotExistException:Uf,SES:KP,SESClient:$f,SESServiceException:Nf,SNSActionEncoding:{Base64:"Base64",UTF8:"UTF-8"},SendBounceCommand:wP,SendBulkTemplatedEmailCommand:EP,SendCustomVerificationEmailCommand:SP,SendEmailCommand:_P,SendRawEmailCommand:OP,SendTemplatedEmailCommand:CP,SetActiveReceiptRuleSetCommand:kP,SetIdentityDkimEnabledCommand:TP,SetIdentityFeedbackForwardingEnabledCommand:PP,SetIdentityHeadersInNotificationsEnabledCommand:AP,SetIdentityMailFromDomainCommand:IP,SetIdentityNotificationTopicCommand:RP,SetReceiptRulePositionCommand:MP,StopScope:{RULE_SET:"RuleSet"},TemplateDoesNotExistException:lg,TestRenderTemplateCommand:jP,TlsPolicy:{Optional:"Optional",Require:"Require"},TrackingOptionsAlreadyExistsException:Jf,TrackingOptionsDoesNotExistException:cg,UpdateAccountSendingEnabledCommand:$P,UpdateConfigurationSetEventDestinationCommand:NP,UpdateConfigurationSetReputationMetricsEnabledCommand:DP,UpdateConfigurationSetSendingEnabledCommand:LP,UpdateConfigurationSetTrackingOptionsCommand:zP,UpdateCustomVerificationEmailTemplateCommand:FP,UpdateReceiptRuleCommand:UP,UpdateTemplateCommand:BP,VerificationStatus:{Failed:"Failed",NotStarted:"NotStarted",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"},VerifyDomainDkimCommand:HP,VerifyDomainIdentityCommand:qP,VerifyEmailAddressCommand:VP,VerifyEmailIdentityCommand:GP,__Client:Wt,paginateListCustomVerificationEmailTemplates:YP,paginateListIdentities:QP,waitForIdentityExists:async(e,t)=>Oc({minDelay:3,maxDelay:120,...e},t,JP),waitUntilIdentityExists:async(e,t)=>(e=>{if(e.state===xc.ABORTED){const t=new Error(`${JSON.stringify({...e,reason:"Request was aborted"})}`);throw t.name="AbortError",t}if(e.state===xc.TIMEOUT){const t=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"})}`);throw t.name="TimeoutError",t}if(e.state!==xc.SUCCESS)throw new Error(`${JSON.stringify(e)}`);return e})(await Oc({minDelay:3,maxDelay:120,...e},t,JP))}),tA={},nA={exports:{}},iA={exports:{}};var rA,oA,sA,aA,cA,lA,uA,pA,dA,mA,hA,fA,gA,yA,vA,bA,xA,wA,EA,SA,_A,OA,CA,kA,TA,PA,AA,IA,RA={name:"nodemailer",version:"6.9.16",description:"Easy as cake e-mail sending from your Node.js applications",main:"lib/nodemailer.js",scripts:{test:"node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","test:coverage":"c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js",lint:"eslint .",update:"rm -rf node_modules/ package-lock.json && ncu -u && npm install"},repository:{type:"git",url:"https://github.com/nodemailer/nodemailer.git"},keywords:["Nodemailer"],author:"Andris Reinman",license:"MIT-0",bugs:{url:"https://github.com/nodemailer/nodemailer/issues"},homepage:"https://nodemailer.com/",devDependencies:{"@aws-sdk/client-ses":"3.679.0",bunyan:"1.8.15",c8:"10.1.2",eslint:"8.57.0","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0",libbase64:"1.3.0",libmime:"5.3.5",libqp:"2.1.0","nodemailer-ntlm-auth":"1.0.4",proxy:"1.0.2","proxy-test-server":"1.0.0","smtp-server":"3.13.6"},engines:{node:">=6.0.0"}};function MA(){if(rA)return iA.exports;rA=1;const e=o,t=s,i=n,r=a,u=c.PassThrough,p=function(){if(ZP)return XP;ZP=1;const e=n;return XP=class{constructor(e){this.options=e||{},this.cookies=[]}set(t,n){let i,r=e.parse(n||""),o=this.parse(t);return o.domain?(i=o.domain.replace(/^\./,""),(r.hostname.length<i.length||("."+r.hostname).substr(1-i.length)!=="."+i)&&(o.domain=r.hostname)):o.domain=r.hostname,o.path||(o.path=this.getPath(r.pathname)),o.expires||(o.expires=new Date(Date.now()+1e3*(Number(this.options.sessionTimeout||1800)||1800))),this.add(o)}get(e){return this.list(e).map((e=>e.name+"="+e.value)).join("; ")}list(e){let t,n,i=[];for(t=this.cookies.length-1;t>=0;t--)n=this.cookies[t],this.isExpired(n)?this.cookies.splice(t,t):this.match(n,e)&&i.unshift(n);return i}parse(e){let t={};return(e||"").toString().split(";").forEach((e=>{let n,i=e.split("="),r=i.shift().trim().toLowerCase(),o=i.join("=").trim();if(r)switch(r){case"expires":o=new Date(o),"Invalid Date"!==o.toString()&&(t.expires=o);break;case"path":t.path=o;break;case"domain":n=o.toLowerCase(),n.length&&"."!==n.charAt(0)&&(n="."+n),t.domain=n;break;case"max-age":t.expires=new Date(Date.now()+1e3*(Number(o)||0));break;case"secure":t.secure=!0;break;case"httponly":t.httponly=!0;break;default:t.name||(t.name=r,t.value=o)}})),t}match(t,n){let i=e.parse(n||"");return(i.hostname===t.domain||"."===t.domain.charAt(0)&&("."+i.hostname).substr(-t.domain.length)===t.domain)&&this.getPath(i.pathname).substr(0,t.path.length)===t.path&&(!t.secure||"https:"===i.protocol)}add(e){let t,n;if(!e||!e.name)return!1;for(t=0,n=this.cookies.length;t<n;t++)if(this.compare(this.cookies[t],e))return this.isExpired(e)?(this.cookies.splice(t,1),!1):(this.cookies[t]=e,!0);return this.isExpired(e)||this.cookies.push(e),!0}compare(e,t){return e.name===t.name&&e.path===t.path&&e.domain===t.domain&&e.secure===t.secure&&e.httponly==e.httponly}isExpired(e){return e.expires&&e.expires<new Date||!e.value}getPath(e){let t=(e||"/").split("/");return t.pop(),t=t.join("/").trim(),"/"!==t.charAt(0)&&(t="/"+t),"/"!==t.substr(-1)&&(t+="/"),t}},XP}(),d=RA,m=l;function h(n,o){(o=o||{}).fetchRes=o.fetchRes||new u,o.cookies=o.cookies||new p,o.redirects=o.redirects||0,o.maxRedirects=isNaN(o.maxRedirects)?5:o.maxRedirects,o.cookie&&([].concat(o.cookie||[]).forEach((e=>{o.cookies.set(e,n)})),o.cookie=!1);let s,a,c,l=o.fetchRes,f=i.parse(n),g=(o.method||"").toString().trim().toUpperCase()||"GET",y=!1,v="https:"===f.protocol?t:e,b={"accept-encoding":"gzip,deflate","user-agent":"nodemailer/"+d.version};if(Object.keys(o.headers||{}).forEach((e=>{b[e.toLowerCase().trim()]=o.headers[e]})),o.userAgent&&(b["user-agent"]=o.userAgent),f.auth&&(b.Authorization="Basic "+Buffer.from(f.auth).toString("base64")),(s=o.cookies.get(n))&&(b.cookie=s),o.body){if(!1!==o.contentType&&(b["Content-Type"]=o.contentType||"application/x-www-form-urlencoded"),"function"==typeof o.body.pipe)b["Transfer-Encoding"]="chunked",a=o.body,a.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e))}));else{if(o.body instanceof Buffer)a=o.body;else if("object"==typeof o.body)try{a=Buffer.from(Object.keys(o.body).map((e=>{let t=o.body[e].toString().trim();return encodeURIComponent(e)+"="+encodeURIComponent(t)})).join("&"))}catch(e){if(y)return;return y=!0,e.type="FETCH",e.sourceUrl=n,void l.emit("error",e)}else a=Buffer.from(o.body.toString().trim());b["Content-Type"]=o.contentType||"application/x-www-form-urlencoded",b["Content-Length"]=a.length}g=(o.method||"").toString().trim().toUpperCase()||"POST"}let x={method:g,host:f.hostname,path:f.path,port:f.port?f.port:"https:"===f.protocol?443:80,headers:b,rejectUnauthorized:!1,agent:!1};o.tls&&Object.keys(o.tls).forEach((e=>{x[e]=o.tls[e]})),"https:"!==f.protocol||!f.hostname||f.hostname===x.host||m.isIP(f.hostname)||x.servername||(x.servername=f.hostname);try{c=v.request(x)}catch(e){return y=!0,setImmediate((()=>{e.type="FETCH",e.sourceUrl=n,l.emit("error",e)})),l}return o.timeout&&c.setTimeout(o.timeout,(()=>{if(y)return;y=!0,c.abort();let e=new Error("Request Timeout");e.type="FETCH",e.sourceUrl=n,l.emit("error",e)})),c.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e))})),c.on("response",(e=>{let t;if(!y){switch(e.headers["content-encoding"]){case"gzip":case"deflate":t=r.createUnzip()}if(e.headers["set-cookie"]&&[].concat(e.headers["set-cookie"]||[]).forEach((e=>{o.cookies.set(e,n)})),[301,302,303,307,308].includes(e.statusCode)&&e.headers.location){if(o.redirects++,o.redirects>o.maxRedirects){y=!0;let e=new Error("Maximum redirect count exceeded");return e.type="FETCH",e.sourceUrl=n,l.emit("error",e),void c.abort()}return o.method="GET",o.body=!1,h(i.resolve(n,e.headers.location),o)}if(l.statusCode=e.statusCode,l.headers=e.headers,e.statusCode>=300&&!o.allowErrorResponse){y=!0;let t=new Error("Invalid status code "+e.statusCode);return t.type="FETCH",t.sourceUrl=n,l.emit("error",t),void c.abort()}e.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e),c.abort())})),t?(e.pipe(t).pipe(l),t.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e),c.abort())}))):e.pipe(l)}})),setImmediate((()=>{if(a)try{if("function"==typeof a.pipe)return a.pipe(c);c.write(a)}catch(e){return y=!0,e.type="FETCH",e.sourceUrl=n,void l.emit("error",e)}c.end()})),l}return iA.exports=function(e,t){return h(e,t)},iA.exports.Cookies=p,iA.exports}function jA(){return oA||(oA=1,function(e){const t=n,o=i,s=r,a=MA(),c=u,d=l,m=p,h=3e5;let f;try{f=m.networkInterfaces()}catch(e){}e.exports.networkInterfaces=f;const g=(t,n)=>{let i=e.exports.networkInterfaces;if(!i)return!0;const r=Object.keys(i).map((e=>i[e])).reduce(((e,t)=>e.concat(t)),[]).filter((e=>!e.internal||n)).filter((e=>e.family==="IPv"+t||e.family===t)).length>0;return r},y=(e,t,n,i)=>{if(!g(e,(n=n||{}).allowInternalNetworkInterfaces))return i(null,[]);(c.Resolver?new c.Resolver(n):c)["resolve"+e](t,((e,t)=>{if(e){switch(e.code){case c.NODATA:case c.NOTFOUND:case c.NOTIMP:case c.SERVFAIL:case c.CONNREFUSED:case c.REFUSED:case"EAI_AGAIN":return i(null,[])}return i(e)}return i(null,Array.isArray(t)?t:[].concat(t||[]))}))},v=e.exports.dnsCache=new Map,b=(e,t)=>e?Object.assign({servername:e.servername,host:e.addresses&&e.addresses.length?1===e.addresses.length?e.addresses[0]:e.addresses[Math.floor(Math.random()*e.addresses.length)]:null},t||{}):Object.assign({},t||{});function x(e,t){let n=!1,i=[],r=0;e.on("error",(e=>{n||(n=!0,t(e))})),e.on("readable",(()=>{let t;for(;null!==(t=e.read());)i.push(t),r+=t.length})),e.on("end",(()=>{if(n)return;let e;n=!0;try{e=Buffer.concat(i,r)}catch(e){return t(e)}t(null,e)}))}e.exports.resolveHostname=(e,t)=>{if(!(e=e||{}).host&&e.servername&&(e.host=e.servername),!e.host||d.isIP(e.host)){let n={addresses:[e.host],servername:e.servername||!1};return t(null,b(n,{cached:!1}))}let n;if(v.has(e.host)&&(n=v.get(e.host),!n.expires||n.expires>=Date.now()))return t(null,b(n.value,{cached:!0}));y(4,e.host,e,((i,r)=>{if(i)return n?t(null,b(n.value,{cached:!0,error:i})):t(i);if(r&&r.length){let n={addresses:r,servername:e.servername||e.host};return v.set(e.host,{value:n,expires:Date.now()+(e.dnsTtl||h)}),t(null,b(n,{cached:!1}))}y(6,e.host,e,((i,r)=>{if(i)return n?t(null,b(n.value,{cached:!0,error:i})):t(i);if(r&&r.length){let n={addresses:r,servername:e.servername||e.host};return v.set(e.host,{value:n,expires:Date.now()+(e.dnsTtl||h)}),t(null,b(n,{cached:!1}))}try{c.lookup(e.host,{all:!0},((i,r)=>{if(i)return n?t(null,b(n.value,{cached:!0,error:i})):t(i);let o=!!r&&r.filter((e=>g(e.family))).map((e=>e.address)).shift();if(r&&r.length&&!o&&console.warn(`Failed to resolve IPv${r[0].family} addresses with current network`),!o&&n)return t(null,b(n.value,{cached:!0}));let s={addresses:o?[o]:[e.host],servername:e.servername||e.host};return v.set(e.host,{value:s,expires:Date.now()+(e.dnsTtl||h)}),t(null,b(s,{cached:!1}))}))}catch(i){return n?t(null,b(n.value,{cached:!0,error:i})):t(i)}}))}))},e.exports.parseConnectionUrl=e=>{e=e||"";let n={};return[t.parse(e,!0)].forEach((e=>{let t;switch(e.protocol){case"smtp:":n.secure=!1;break;case"smtps:":n.secure=!0;break;case"direct:":n.direct=!0}!isNaN(e.port)&&Number(e.port)&&(n.port=Number(e.port)),e.hostname&&(n.host=e.hostname),e.auth&&(t=e.auth.split(":"),n.auth||(n.auth={}),n.auth.user=t.shift(),n.auth.pass=t.join(":")),Object.keys(e.query||{}).forEach((t=>{let i=n,r=t,o=e.query[t];switch(isNaN(o)||(o=Number(o)),o){case"true":o=!0;break;case"false":o=!1}if(0===t.indexOf("tls."))r=t.substr(4),n.tls||(n.tls={}),i=n.tls;else if(t.indexOf(".")>=0)return;r in i||(i[r]=o)}))})),n},e.exports._logFunc=(e,t,n,i,r,...o)=>{let s={};Object.keys(n||{}).forEach((e=>{"level"!==e&&(s[e]=n[e])})),Object.keys(i||{}).forEach((e=>{"level"!==e&&(s[e]=i[e])})),e[t](s,r,...o)},e.exports.getLogger=(t,n)=>{let i={},r=["trace","debug","info","warn","error","fatal"];if(!(t=t||{}).logger)return r.forEach((e=>{i[e]=()=>!1})),i;let s=t.logger;return!0===t.logger&&(s=function(e){let t=0,n=new Map;e.forEach((e=>{e.length>t&&(t=e.length)})),e.forEach((e=>{let i=e.toUpperCase();i.length<t&&(i+=" ".repeat(t-i.length)),n.set(e,i)}));let i=(e,t,i,...r)=>{let s="";t&&("server"===t.tnx?s="S: ":"client"===t.tnx&&(s="C: "),t.sid&&(s="["+t.sid+"] "+s),t.cid&&(s="[#"+t.cid+"] "+s)),(i=o.format(i,...r)).split(/\r?\n/).forEach((t=>{console.log("[%s] %s %s",(new Date).toISOString().substr(0,19).replace(/T/," "),n.get(e),s+t)}))},r={};return e.forEach((e=>{r[e]=i.bind(null,e)})),r}(r)),r.forEach((t=>{i[t]=(i,r,...o)=>{e.exports._logFunc(s,t,n,i,r,...o)}})),i},e.exports.callbackPromise=(e,t)=>function(){let n=Array.from(arguments),i=n.shift();i?t(i):e(...n)},e.exports.parseDataURI=e=>{let t=e,n=t.indexOf(",");if(!n)return e;let i,r=t.substring(n+1),o=t.substring(5,n).split(";"),s=o.length>1&&o[o.length-1];s&&s.indexOf("=")<0&&(i=s.toLowerCase(),o.pop());let a=o.shift()||"application/octet-stream",c={};for(let e of o){let t=e.indexOf("=");if(t>=0){let n=e.substring(0,t),i=e.substring(t+1);c[n]=i}}switch(i){case"base64":r=Buffer.from(r,"base64");break;case"utf8":r=Buffer.from(r);break;default:try{r=Buffer.from(decodeURIComponent(r))}catch(e){r=Buffer.from(r)}r=Buffer.from(r)}return{data:r,encoding:i,contentType:a,params:c}},e.exports.resolveContent=(t,n,i)=>{let r;i||(r=new Promise(((t,n)=>{i=e.exports.callbackPromise(t,n)})));let o,c=t&&t[n]&&t[n].content||t[n],l=("object"==typeof t[n]&&t[n].encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");if(!c)return i(null,c);if("object"==typeof c){if("function"==typeof c.pipe)return x(c,((e,r)=>{if(e)return i(e);t[n].content?t[n].content=r:t[n]=r,i(null,r)}));if(/^https?:\/\//i.test(c.path||c.href))return o=a(c.path||c.href),x(o,i);if(/^data:/i.test(c.path||c.href)){let t=e.exports.parseDataURI(c.path||c.href);return t&&t.data?i(null,t.data):i(null,Buffer.from(0))}if(c.path)return x(s.createReadStream(c.path),i)}return"string"!=typeof t[n].content||["utf8","usascii","ascii"].includes(l)||(c=Buffer.from(t[n].content,l)),setImmediate((()=>i(null,c))),r},e.exports.assign=function(){let e=Array.from(arguments),t=e.shift()||{};return e.forEach((e=>{Object.keys(e||{}).forEach((n=>{["tls","auth"].includes(n)&&e[n]&&"object"==typeof e[n]?(t[n]||(t[n]={}),Object.keys(e[n]).forEach((i=>{t[n][i]=e[n][i]}))):t[n]=e[n]}))})),t},e.exports.encodeXText=e=>{if(!/[^\x21-\x2A\x2C-\x3C\x3E-\x7E]/.test(e))return e;let t=Buffer.from(e),n="";for(let e=0,i=t.length;e<i;e++){let i=t[e];n+=i<33||i>126||43===i||61===i?"+"+(i<16?"0":"")+i.toString(16).toUpperCase():String.fromCharCode(i)}return n}}(nA)),nA.exports}function $A(){if(aA)return sA;aA=1;const e=d,t="application/octet-stream",n=new Map([["application/acad","dwg"],["application/applixware","aw"],["application/arj","arj"],["application/atom+xml","xml"],["application/atomcat+xml","atomcat"],["application/atomsvc+xml","atomsvc"],["application/base64",["mm","mme"]],["application/binhex","hqx"],["application/binhex4","hqx"],["application/book",["book","boo"]],["application/ccxml+xml,","ccxml"],["application/cdf","cdf"],["application/cdmi-capability","cdmia"],["application/cdmi-container","cdmic"],["application/cdmi-domain","cdmid"],["application/cdmi-object","cdmio"],["application/cdmi-queue","cdmiq"],["application/clariscad","ccad"],["application/commonground","dp"],["application/cu-seeme","cu"],["application/davmount+xml","davmount"],["application/drafting","drw"],["application/dsptype","tsp"],["application/dssc+der","dssc"],["application/dssc+xml","xdssc"],["application/dxf","dxf"],["application/ecmascript",["js","es"]],["application/emma+xml","emma"],["application/envoy","evy"],["application/epub+zip","epub"],["application/excel",["xls","xl","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/exi","exi"],["application/font-tdpfr","pfr"],["application/fractals","fif"],["application/freeloader","frl"],["application/futuresplash","spl"],["application/geo+json","geojson"],["application/gnutar","tgz"],["application/groupwise","vew"],["application/hlp","hlp"],["application/hta","hta"],["application/hyperstudio","stk"],["application/i-deas","unv"],["application/iges",["iges","igs"]],["application/inf","inf"],["application/internet-property-stream","acx"],["application/ipfix","ipfix"],["application/java","class"],["application/java-archive","jar"],["application/java-byte-code","class"],["application/java-serialized-object","ser"],["application/java-vm","class"],["application/javascript","js"],["application/json","json"],["application/lha","lha"],["application/lzx","lzx"],["application/mac-binary","bin"],["application/mac-binhex","hqx"],["application/mac-binhex40","hqx"],["application/mac-compactpro","cpt"],["application/macbinary","bin"],["application/mads+xml","mads"],["application/marc","mrc"],["application/marcxml+xml","mrcx"],["application/mathematica","ma"],["application/mathml+xml","mathml"],["application/mbedlet","mbd"],["application/mbox","mbox"],["application/mcad","mcd"],["application/mediaservercontrol+xml","mscml"],["application/metalink4+xml","meta4"],["application/mets+xml","mets"],["application/mime","aps"],["application/mods+xml","mods"],["application/mp21","m21"],["application/mp4","mp4"],["application/mspowerpoint",["ppt","pot","pps","ppz"]],["application/msword",["doc","dot","w6w","wiz","word"]],["application/mswrite","wri"],["application/mxf","mxf"],["application/netmc","mcp"],["application/octet-stream",["*"]],["application/oda","oda"],["application/oebps-package+xml","opf"],["application/ogg","ogx"],["application/olescript","axs"],["application/onenote","onetoc"],["application/patch-ops-error+xml","xer"],["application/pdf","pdf"],["application/pgp-encrypted","asc"],["application/pgp-signature","pgp"],["application/pics-rules","prf"],["application/pkcs-12","p12"],["application/pkcs-crl","crl"],["application/pkcs10","p10"],["application/pkcs7-mime",["p7c","p7m"]],["application/pkcs7-signature","p7s"],["application/pkcs8","p8"],["application/pkix-attr-cert","ac"],["application/pkix-cert",["cer","crt"]],["application/pkix-crl","crl"],["application/pkix-pkipath","pkipath"],["application/pkixcmp","pki"],["application/plain","text"],["application/pls+xml","pls"],["application/postscript",["ps","ai","eps"]],["application/powerpoint","ppt"],["application/pro_eng",["part","prt"]],["application/prs.cww","cww"],["application/pskc+xml","pskcxml"],["application/rdf+xml","rdf"],["application/reginfo+xml","rif"],["application/relax-ng-compact-syntax","rnc"],["application/resource-lists+xml","rl"],["application/resource-lists-diff+xml","rld"],["application/ringing-tones","rng"],["application/rls-services+xml","rs"],["application/rsd+xml","rsd"],["application/rss+xml","xml"],["application/rtf",["rtf","rtx"]],["application/sbml+xml","sbml"],["application/scvp-cv-request","scq"],["application/scvp-cv-response","scs"],["application/scvp-vp-request","spq"],["application/scvp-vp-response","spp"],["application/sdp","sdp"],["application/sea","sea"],["application/set","set"],["application/set-payment-initiation","setpay"],["application/set-registration-initiation","setreg"],["application/shf+xml","shf"],["application/sla","stl"],["application/smil",["smi","smil"]],["application/smil+xml","smi"],["application/solids","sol"],["application/sounder","sdr"],["application/sparql-query","rq"],["application/sparql-results+xml","srx"],["application/srgs","gram"],["application/srgs+xml","grxml"],["application/sru+xml","sru"],["application/ssml+xml","ssml"],["application/step",["step","stp"]],["application/streamingmedia","ssm"],["application/tei+xml","tei"],["application/thraud+xml","tfi"],["application/timestamped-data","tsd"],["application/toolbook","tbk"],["application/vda","vda"],["application/vnd.3gpp.pic-bw-large","plb"],["application/vnd.3gpp.pic-bw-small","psb"],["application/vnd.3gpp.pic-bw-var","pvb"],["application/vnd.3gpp2.tcap","tcap"],["application/vnd.3m.post-it-notes","pwn"],["application/vnd.accpac.simply.aso","aso"],["application/vnd.accpac.simply.imp","imp"],["application/vnd.acucobol","acu"],["application/vnd.acucorp","atc"],["application/vnd.adobe.air-application-installer-package+zip","air"],["application/vnd.adobe.fxp","fxp"],["application/vnd.adobe.xdp+xml","xdp"],["application/vnd.adobe.xfdf","xfdf"],["application/vnd.ahead.space","ahead"],["application/vnd.airzip.filesecure.azf","azf"],["application/vnd.airzip.filesecure.azs","azs"],["application/vnd.amazon.ebook","azw"],["application/vnd.americandynamics.acc","acc"],["application/vnd.amiga.ami","ami"],["application/vnd.android.package-archive","apk"],["application/vnd.anser-web-certificate-issue-initiation","cii"],["application/vnd.anser-web-funds-transfer-initiation","fti"],["application/vnd.antix.game-component","atx"],["application/vnd.apple.installer+xml","mpkg"],["application/vnd.apple.mpegurl","m3u8"],["application/vnd.aristanetworks.swi","swi"],["application/vnd.audiograph","aep"],["application/vnd.blueice.multipass","mpm"],["application/vnd.bmi","bmi"],["application/vnd.businessobjects","rep"],["application/vnd.chemdraw+xml","cdxml"],["application/vnd.chipnuts.karaoke-mmd","mmd"],["application/vnd.cinderella","cdy"],["application/vnd.claymore","cla"],["application/vnd.cloanto.rp9","rp9"],["application/vnd.clonk.c4group","c4g"],["application/vnd.cluetrust.cartomobile-config","c11amc"],["application/vnd.cluetrust.cartomobile-config-pkg","c11amz"],["application/vnd.commonspace","csp"],["application/vnd.contact.cmsg","cdbcmsg"],["application/vnd.cosmocaller","cmc"],["application/vnd.crick.clicker","clkx"],["application/vnd.crick.clicker.keyboard","clkk"],["application/vnd.crick.clicker.palette","clkp"],["application/vnd.crick.clicker.template","clkt"],["application/vnd.crick.clicker.wordbank","clkw"],["application/vnd.criticaltools.wbs+xml","wbs"],["application/vnd.ctc-posml","pml"],["application/vnd.cups-ppd","ppd"],["application/vnd.curl.car","car"],["application/vnd.curl.pcurl","pcurl"],["application/vnd.data-vision.rdz","rdz"],["application/vnd.denovo.fcselayout-link","fe_launch"],["application/vnd.dna","dna"],["application/vnd.dolby.mlp","mlp"],["application/vnd.dpgraph","dpg"],["application/vnd.dreamfactory","dfac"],["application/vnd.dvb.ait","ait"],["application/vnd.dvb.service","svc"],["application/vnd.dynageo","geo"],["application/vnd.ecowin.chart","mag"],["application/vnd.enliven","nml"],["application/vnd.epson.esf","esf"],["application/vnd.epson.msf","msf"],["application/vnd.epson.quickanime","qam"],["application/vnd.epson.salt","slt"],["application/vnd.epson.ssf","ssf"],["application/vnd.eszigno3+xml","es3"],["application/vnd.ezpix-album","ez2"],["application/vnd.ezpix-package","ez3"],["application/vnd.fdf","fdf"],["application/vnd.fdsn.seed","seed"],["application/vnd.flographit","gph"],["application/vnd.fluxtime.clip","ftc"],["application/vnd.framemaker","fm"],["application/vnd.frogans.fnc","fnc"],["application/vnd.frogans.ltf","ltf"],["application/vnd.fsc.weblaunch","fsc"],["application/vnd.fujitsu.oasys","oas"],["application/vnd.fujitsu.oasys2","oa2"],["application/vnd.fujitsu.oasys3","oa3"],["application/vnd.fujitsu.oasysgp","fg5"],["application/vnd.fujitsu.oasysprs","bh2"],["application/vnd.fujixerox.ddd","ddd"],["application/vnd.fujixerox.docuworks","xdw"],["application/vnd.fujixerox.docuworks.binder","xbd"],["application/vnd.fuzzysheet","fzs"],["application/vnd.genomatix.tuxedo","txd"],["application/vnd.geogebra.file","ggb"],["application/vnd.geogebra.tool","ggt"],["application/vnd.geometry-explorer","gex"],["application/vnd.geonext","gxt"],["application/vnd.geoplan","g2w"],["application/vnd.geospace","g3w"],["application/vnd.gmx","gmx"],["application/vnd.google-earth.kml+xml","kml"],["application/vnd.google-earth.kmz","kmz"],["application/vnd.grafeq","gqf"],["application/vnd.groove-account","gac"],["application/vnd.groove-help","ghf"],["application/vnd.groove-identity-message","gim"],["application/vnd.groove-injector","grv"],["application/vnd.groove-tool-message","gtm"],["application/vnd.groove-tool-template","tpl"],["application/vnd.groove-vcard","vcg"],["application/vnd.hal+xml","hal"],["application/vnd.handheld-entertainment+xml","zmm"],["application/vnd.hbci","hbci"],["application/vnd.hhe.lesson-player","les"],["application/vnd.hp-hpgl",["hgl","hpg","hpgl"]],["application/vnd.hp-hpid","hpid"],["application/vnd.hp-hps","hps"],["application/vnd.hp-jlyt","jlt"],["application/vnd.hp-pcl","pcl"],["application/vnd.hp-pclxl","pclxl"],["application/vnd.hydrostatix.sof-data","sfd-hdstx"],["application/vnd.hzn-3d-crossword","x3d"],["application/vnd.ibm.minipay","mpy"],["application/vnd.ibm.modcap","afp"],["application/vnd.ibm.rights-management","irm"],["application/vnd.ibm.secure-container","sc"],["application/vnd.iccprofile","icc"],["application/vnd.igloader","igl"],["application/vnd.immervision-ivp","ivp"],["application/vnd.immervision-ivu","ivu"],["application/vnd.insors.igm","igm"],["application/vnd.intercon.formnet","xpw"],["application/vnd.intergeo","i2g"],["application/vnd.intu.qbo","qbo"],["application/vnd.intu.qfx","qfx"],["application/vnd.ipunplugged.rcprofile","rcprofile"],["application/vnd.irepository.package+xml","irp"],["application/vnd.is-xpr","xpr"],["application/vnd.isac.fcs","fcs"],["application/vnd.jam","jam"],["application/vnd.jcp.javame.midlet-rms","rms"],["application/vnd.jisp","jisp"],["application/vnd.joost.joda-archive","joda"],["application/vnd.kahootz","ktz"],["application/vnd.kde.karbon","karbon"],["application/vnd.kde.kchart","chrt"],["application/vnd.kde.kformula","kfo"],["application/vnd.kde.kivio","flw"],["application/vnd.kde.kontour","kon"],["application/vnd.kde.kpresenter","kpr"],["application/vnd.kde.kspread","ksp"],["application/vnd.kde.kword","kwd"],["application/vnd.kenameaapp","htke"],["application/vnd.kidspiration","kia"],["application/vnd.kinar","kne"],["application/vnd.koan","skp"],["application/vnd.kodak-descriptor","sse"],["application/vnd.las.las+xml","lasxml"],["application/vnd.llamagraphics.life-balance.desktop","lbd"],["application/vnd.llamagraphics.life-balance.exchange+xml","lbe"],["application/vnd.lotus-1-2-3","123"],["application/vnd.lotus-approach","apr"],["application/vnd.lotus-freelance","pre"],["application/vnd.lotus-notes","nsf"],["application/vnd.lotus-organizer","org"],["application/vnd.lotus-screencam","scm"],["application/vnd.lotus-wordpro","lwp"],["application/vnd.macports.portpkg","portpkg"],["application/vnd.mcd","mcd"],["application/vnd.medcalcdata","mc1"],["application/vnd.mediastation.cdkey","cdkey"],["application/vnd.mfer","mwf"],["application/vnd.mfmp","mfm"],["application/vnd.micrografx.flo","flo"],["application/vnd.micrografx.igx","igx"],["application/vnd.mif","mif"],["application/vnd.mobius.daf","daf"],["application/vnd.mobius.dis","dis"],["application/vnd.mobius.mbk","mbk"],["application/vnd.mobius.mqy","mqy"],["application/vnd.mobius.msl","msl"],["application/vnd.mobius.plc","plc"],["application/vnd.mobius.txf","txf"],["application/vnd.mophun.application","mpn"],["application/vnd.mophun.certificate","mpc"],["application/vnd.mozilla.xul+xml","xul"],["application/vnd.ms-artgalry","cil"],["application/vnd.ms-cab-compressed","cab"],["application/vnd.ms-excel",["xls","xla","xlc","xlm","xlt","xlw","xlb","xll"]],["application/vnd.ms-excel.addin.macroenabled.12","xlam"],["application/vnd.ms-excel.sheet.binary.macroenabled.12","xlsb"],["application/vnd.ms-excel.sheet.macroenabled.12","xlsm"],["application/vnd.ms-excel.template.macroenabled.12","xltm"],["application/vnd.ms-fontobject","eot"],["application/vnd.ms-htmlhelp","chm"],["application/vnd.ms-ims","ims"],["application/vnd.ms-lrm","lrm"],["application/vnd.ms-officetheme","thmx"],["application/vnd.ms-outlook","msg"],["application/vnd.ms-pki.certstore","sst"],["application/vnd.ms-pki.pko","pko"],["application/vnd.ms-pki.seccat","cat"],["application/vnd.ms-pki.stl","stl"],["application/vnd.ms-pkicertstore","sst"],["application/vnd.ms-pkiseccat","cat"],["application/vnd.ms-pkistl","stl"],["application/vnd.ms-powerpoint",["ppt","pot","pps","ppa","pwz"]],["application/vnd.ms-powerpoint.addin.macroenabled.12","ppam"],["application/vnd.ms-powerpoint.presentation.macroenabled.12","pptm"],["application/vnd.ms-powerpoint.slide.macroenabled.12","sldm"],["application/vnd.ms-powerpoint.slideshow.macroenabled.12","ppsm"],["application/vnd.ms-powerpoint.template.macroenabled.12","potm"],["application/vnd.ms-project","mpp"],["application/vnd.ms-word.document.macroenabled.12","docm"],["application/vnd.ms-word.template.macroenabled.12","dotm"],["application/vnd.ms-works",["wks","wcm","wdb","wps"]],["application/vnd.ms-wpl","wpl"],["application/vnd.ms-xpsdocument","xps"],["application/vnd.mseq","mseq"],["application/vnd.musician","mus"],["application/vnd.muvee.style","msty"],["application/vnd.neurolanguage.nlu","nlu"],["application/vnd.noblenet-directory","nnd"],["application/vnd.noblenet-sealer","nns"],["application/vnd.noblenet-web","nnw"],["application/vnd.nokia.configuration-message","ncm"],["application/vnd.nokia.n-gage.data","ngdat"],["application/vnd.nokia.n-gage.symbian.install","n-gage"],["application/vnd.nokia.radio-preset","rpst"],["application/vnd.nokia.radio-presets","rpss"],["application/vnd.nokia.ringing-tone","rng"],["application/vnd.novadigm.edm","edm"],["application/vnd.novadigm.edx","edx"],["application/vnd.novadigm.ext","ext"],["application/vnd.oasis.opendocument.chart","odc"],["application/vnd.oasis.opendocument.chart-template","otc"],["application/vnd.oasis.opendocument.database","odb"],["application/vnd.oasis.opendocument.formula","odf"],["application/vnd.oasis.opendocument.formula-template","odft"],["application/vnd.oasis.opendocument.graphics","odg"],["application/vnd.oasis.opendocument.graphics-template","otg"],["application/vnd.oasis.opendocument.image","odi"],["application/vnd.oasis.opendocument.image-template","oti"],["application/vnd.oasis.opendocument.presentation","odp"],["application/vnd.oasis.opendocument.presentation-template","otp"],["application/vnd.oasis.opendocument.spreadsheet","ods"],["application/vnd.oasis.opendocument.spreadsheet-template","ots"],["application/vnd.oasis.opendocument.text","odt"],["application/vnd.oasis.opendocument.text-master","odm"],["application/vnd.oasis.opendocument.text-template","ott"],["application/vnd.oasis.opendocument.text-web","oth"],["application/vnd.olpc-sugar","xo"],["application/vnd.oma.dd2+xml","dd2"],["application/vnd.openofficeorg.extension","oxt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","pptx"],["application/vnd.openxmlformats-officedocument.presentationml.slide","sldx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","ppsx"],["application/vnd.openxmlformats-officedocument.presentationml.template","potx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","xltx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","dotx"],["application/vnd.osgeo.mapguide.package","mgp"],["application/vnd.osgi.dp","dp"],["application/vnd.palm","pdb"],["application/vnd.pawaafile","paw"],["application/vnd.pg.format","str"],["application/vnd.pg.osasli","ei6"],["application/vnd.picsel","efif"],["application/vnd.pmi.widget","wg"],["application/vnd.pocketlearn","plf"],["application/vnd.powerbuilder6","pbd"],["application/vnd.previewsystems.box","box"],["application/vnd.proteus.magazine","mgz"],["application/vnd.publishare-delta-tree","qps"],["application/vnd.pvi.ptid1","ptid"],["application/vnd.quark.quarkxpress","qxd"],["application/vnd.realvnc.bed","bed"],["application/vnd.recordare.musicxml","mxl"],["application/vnd.recordare.musicxml+xml","musicxml"],["application/vnd.rig.cryptonote","cryptonote"],["application/vnd.rim.cod","cod"],["application/vnd.rn-realmedia","rm"],["application/vnd.rn-realplayer","rnx"],["application/vnd.route66.link66+xml","link66"],["application/vnd.sailingtracker.track","st"],["application/vnd.seemail","see"],["application/vnd.sema","sema"],["application/vnd.semd","semd"],["application/vnd.semf","semf"],["application/vnd.shana.informed.formdata","ifm"],["application/vnd.shana.informed.formtemplate","itp"],["application/vnd.shana.informed.interchange","iif"],["application/vnd.shana.informed.package","ipk"],["application/vnd.simtech-mindmapper","twd"],["application/vnd.smaf","mmf"],["application/vnd.smart.teacher","teacher"],["application/vnd.solent.sdkm+xml","sdkm"],["application/vnd.spotfire.dxp","dxp"],["application/vnd.spotfire.sfs","sfs"],["application/vnd.stardivision.calc","sdc"],["application/vnd.stardivision.draw","sda"],["application/vnd.stardivision.impress","sdd"],["application/vnd.stardivision.math","smf"],["application/vnd.stardivision.writer","sdw"],["application/vnd.stardivision.writer-global","sgl"],["application/vnd.stepmania.stepchart","sm"],["application/vnd.sun.xml.calc","sxc"],["application/vnd.sun.xml.calc.template","stc"],["application/vnd.sun.xml.draw","sxd"],["application/vnd.sun.xml.draw.template","std"],["application/vnd.sun.xml.impress","sxi"],["application/vnd.sun.xml.impress.template","sti"],["application/vnd.sun.xml.math","sxm"],["application/vnd.sun.xml.writer","sxw"],["application/vnd.sun.xml.writer.global","sxg"],["application/vnd.sun.xml.writer.template","stw"],["application/vnd.sus-calendar","sus"],["application/vnd.svd","svd"],["application/vnd.symbian.install","sis"],["application/vnd.syncml+xml","xsm"],["application/vnd.syncml.dm+wbxml","bdm"],["application/vnd.syncml.dm+xml","xdm"],["application/vnd.tao.intent-module-archive","tao"],["application/vnd.tmobile-livetv","tmo"],["application/vnd.trid.tpt","tpt"],["application/vnd.triscape.mxs","mxs"],["application/vnd.trueapp","tra"],["application/vnd.ufdl","ufd"],["application/vnd.uiq.theme","utz"],["application/vnd.umajin","umj"],["application/vnd.unity","unityweb"],["application/vnd.uoml+xml","uoml"],["application/vnd.vcx","vcx"],["application/vnd.visio","vsd"],["application/vnd.visionary","vis"],["application/vnd.vsf","vsf"],["application/vnd.wap.wbxml","wbxml"],["application/vnd.wap.wmlc","wmlc"],["application/vnd.wap.wmlscriptc","wmlsc"],["application/vnd.webturbo","wtb"],["application/vnd.wolfram.player","nbp"],["application/vnd.wordperfect","wpd"],["application/vnd.wqd","wqd"],["application/vnd.wt.stf","stf"],["application/vnd.xara",["web","xar"]],["application/vnd.xfdl","xfdl"],["application/vnd.yamaha.hv-dic","hvd"],["application/vnd.yamaha.hv-script","hvs"],["application/vnd.yamaha.hv-voice","hvp"],["application/vnd.yamaha.openscoreformat","osf"],["application/vnd.yamaha.openscoreformat.osfpvg+xml","osfpvg"],["application/vnd.yamaha.smaf-audio","saf"],["application/vnd.yamaha.smaf-phrase","spf"],["application/vnd.yellowriver-custom-menu","cmp"],["application/vnd.zul","zir"],["application/vnd.zzazz.deck+xml","zaz"],["application/vocaltec-media-desc","vmd"],["application/vocaltec-media-file","vmf"],["application/voicexml+xml","vxml"],["application/widget","wgt"],["application/winhlp","hlp"],["application/wordperfect",["wp","wp5","wp6","wpd"]],["application/wordperfect6.0",["w60","wp5"]],["application/wordperfect6.1","w61"],["application/wsdl+xml","wsdl"],["application/wspolicy+xml","wspolicy"],["application/x-123","wk1"],["application/x-7z-compressed","7z"],["application/x-abiword","abw"],["application/x-ace-compressed","ace"],["application/x-aim","aim"],["application/x-authorware-bin","aab"],["application/x-authorware-map","aam"],["application/x-authorware-seg","aas"],["application/x-bcpio","bcpio"],["application/x-binary","bin"],["application/x-binhex40","hqx"],["application/x-bittorrent","torrent"],["application/x-bsh",["bsh","sh","shar"]],["application/x-bytecode.elisp","elc"],["application/x-bytecode.python","pyc"],["application/x-bzip","bz"],["application/x-bzip2",["boz","bz2"]],["application/x-cdf","cdf"],["application/x-cdlink","vcd"],["application/x-chat",["cha","chat"]],["application/x-chess-pgn","pgn"],["application/x-cmu-raster","ras"],["application/x-cocoa","cco"],["application/x-compactpro","cpt"],["application/x-compress","z"],["application/x-compressed",["tgz","gz","z","zip"]],["application/x-conference","nsc"],["application/x-cpio","cpio"],["application/x-cpt","cpt"],["application/x-csh","csh"],["application/x-debian-package","deb"],["application/x-deepv","deepv"],["application/x-director",["dir","dcr","dxr"]],["application/x-doom","wad"],["application/x-dtbncx+xml","ncx"],["application/x-dtbook+xml","dtb"],["application/x-dtbresource+xml","res"],["application/x-dvi","dvi"],["application/x-elc","elc"],["application/x-envoy",["env","evy"]],["application/x-esrehber","es"],["application/x-excel",["xls","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/x-font-bdf","bdf"],["application/x-font-ghostscript","gsf"],["application/x-font-linux-psf","psf"],["application/x-font-otf","otf"],["application/x-font-pcf","pcf"],["application/x-font-snf","snf"],["application/x-font-ttf","ttf"],["application/x-font-type1","pfa"],["application/x-font-woff","woff"],["application/x-frame","mif"],["application/x-freelance","pre"],["application/x-futuresplash","spl"],["application/x-gnumeric","gnumeric"],["application/x-gsp","gsp"],["application/x-gss","gss"],["application/x-gtar","gtar"],["application/x-gzip",["gz","gzip"]],["application/x-hdf","hdf"],["application/x-helpfile",["help","hlp"]],["application/x-httpd-imap","imap"],["application/x-ima","ima"],["application/x-internet-signup",["ins","isp"]],["application/x-internett-signup","ins"],["application/x-inventor","iv"],["application/x-ip2","ip"],["application/x-iphone","iii"],["application/x-java-class","class"],["application/x-java-commerce","jcm"],["application/x-java-jnlp-file","jnlp"],["application/x-javascript","js"],["application/x-koan",["skd","skm","skp","skt"]],["application/x-ksh","ksh"],["application/x-latex",["latex","ltx"]],["application/x-lha","lha"],["application/x-lisp","lsp"],["application/x-livescreen","ivy"],["application/x-lotus","wq1"],["application/x-lotusscreencam","scm"],["application/x-lzh","lzh"],["application/x-lzx","lzx"],["application/x-mac-binhex40","hqx"],["application/x-macbinary","bin"],["application/x-magic-cap-package-1.0","mc$"],["application/x-mathcad","mcd"],["application/x-meme","mm"],["application/x-midi",["mid","midi"]],["application/x-mif","mif"],["application/x-mix-transfer","nix"],["application/x-mobipocket-ebook","prc"],["application/x-mplayer2","asx"],["application/x-ms-application","application"],["application/x-ms-wmd","wmd"],["application/x-ms-wmz","wmz"],["application/x-ms-xbap","xbap"],["application/x-msaccess","mdb"],["application/x-msbinder","obd"],["application/x-mscardfile","crd"],["application/x-msclip","clp"],["application/x-msdownload",["exe","dll"]],["application/x-msexcel",["xls","xla","xlw"]],["application/x-msmediaview",["mvb","m13","m14"]],["application/x-msmetafile","wmf"],["application/x-msmoney","mny"],["application/x-mspowerpoint","ppt"],["application/x-mspublisher","pub"],["application/x-msschedule","scd"],["application/x-msterminal","trm"],["application/x-mswrite","wri"],["application/x-navi-animation","ani"],["application/x-navidoc","nvd"],["application/x-navimap","map"],["application/x-navistyle","stl"],["application/x-netcdf",["cdf","nc"]],["application/x-newton-compatible-pkg","pkg"],["application/x-nokia-9000-communicator-add-on-software","aos"],["application/x-omc","omc"],["application/x-omcdatamaker","omcd"],["application/x-omcregerator","omcr"],["application/x-pagemaker",["pm4","pm5"]],["application/x-pcl","pcl"],["application/x-perfmon",["pma","pmc","pml","pmr","pmw"]],["application/x-pixclscript","plx"],["application/x-pkcs10","p10"],["application/x-pkcs12",["p12","pfx"]],["application/x-pkcs7-certificates",["p7b","spc"]],["application/x-pkcs7-certreqresp","p7r"],["application/x-pkcs7-mime",["p7m","p7c"]],["application/x-pkcs7-signature",["p7s","p7a"]],["application/x-pointplus","css"],["application/x-portable-anymap","pnm"],["application/x-project",["mpc","mpt","mpv","mpx"]],["application/x-qpro","wb1"],["application/x-rar-compressed","rar"],["application/x-rtf","rtf"],["application/x-sdp","sdp"],["application/x-sea","sea"],["application/x-seelogo","sl"],["application/x-sh","sh"],["application/x-shar",["shar","sh"]],["application/x-shockwave-flash","swf"],["application/x-silverlight-app","xap"],["application/x-sit","sit"],["application/x-sprite",["spr","sprite"]],["application/x-stuffit","sit"],["application/x-stuffitx","sitx"],["application/x-sv4cpio","sv4cpio"],["application/x-sv4crc","sv4crc"],["application/x-tar","tar"],["application/x-tbook",["sbk","tbk"]],["application/x-tcl","tcl"],["application/x-tex","tex"],["application/x-tex-tfm","tfm"],["application/x-texinfo",["texi","texinfo"]],["application/x-troff",["roff","t","tr"]],["application/x-troff-man","man"],["application/x-troff-me","me"],["application/x-troff-ms","ms"],["application/x-troff-msvideo","avi"],["application/x-ustar","ustar"],["application/x-visio",["vsd","vst","vsw"]],["application/x-vnd.audioexplosion.mzz","mzz"],["application/x-vnd.ls-xpix","xpix"],["application/x-vrml","vrml"],["application/x-wais-source",["src","wsrc"]],["application/x-winhelp","hlp"],["application/x-wintalk","wtk"],["application/x-world",["wrl","svr"]],["application/x-wpwin","wpd"],["application/x-wri","wri"],["application/x-x509-ca-cert",["cer","crt","der"]],["application/x-x509-user-cert","crt"],["application/x-xfig","fig"],["application/x-xpinstall","xpi"],["application/x-zip-compressed","zip"],["application/xcap-diff+xml","xdf"],["application/xenc+xml","xenc"],["application/xhtml+xml","xhtml"],["application/xml","xml"],["application/xml-dtd","dtd"],["application/xop+xml","xop"],["application/xslt+xml","xslt"],["application/xspf+xml","xspf"],["application/xv+xml","mxml"],["application/yang","yang"],["application/yin+xml","yin"],["application/ynd.ms-pkipko","pko"],["application/zip","zip"],["audio/adpcm","adp"],["audio/aiff",["aiff","aif","aifc"]],["audio/basic",["snd","au"]],["audio/it","it"],["audio/make",["funk","my","pfunk"]],["audio/make.my.funk","pfunk"],["audio/mid",["mid","rmi"]],["audio/midi",["midi","kar","mid"]],["audio/mod","mod"],["audio/mp4","mp4a"],["audio/mpeg",["mpga","mp3","m2a","mp2","mpa","mpg"]],["audio/mpeg3","mp3"],["audio/nspaudio",["la","lma"]],["audio/ogg","oga"],["audio/s3m","s3m"],["audio/tsp-audio","tsi"],["audio/tsplayer","tsp"],["audio/vnd.dece.audio","uva"],["audio/vnd.digital-winds","eol"],["audio/vnd.dra","dra"],["audio/vnd.dts","dts"],["audio/vnd.dts.hd","dtshd"],["audio/vnd.lucent.voice","lvp"],["audio/vnd.ms-playready.media.pya","pya"],["audio/vnd.nuera.ecelp4800","ecelp4800"],["audio/vnd.nuera.ecelp7470","ecelp7470"],["audio/vnd.nuera.ecelp9600","ecelp9600"],["audio/vnd.qcelp","qcp"],["audio/vnd.rip","rip"],["audio/voc","voc"],["audio/voxware","vox"],["audio/wav","wav"],["audio/webm","weba"],["audio/x-aac","aac"],["audio/x-adpcm","snd"],["audio/x-aiff",["aiff","aif","aifc"]],["audio/x-au","au"],["audio/x-gsm",["gsd","gsm"]],["audio/x-jam","jam"],["audio/x-liveaudio","lam"],["audio/x-mid",["mid","midi"]],["audio/x-midi",["midi","mid"]],["audio/x-mod","mod"],["audio/x-mpeg","mp2"],["audio/x-mpeg-3","mp3"],["audio/x-mpegurl","m3u"],["audio/x-mpequrl","m3u"],["audio/x-ms-wax","wax"],["audio/x-ms-wma","wma"],["audio/x-nspaudio",["la","lma"]],["audio/x-pn-realaudio",["ra","ram","rm","rmm","rmp"]],["audio/x-pn-realaudio-plugin",["ra","rmp","rpm"]],["audio/x-psid","sid"],["audio/x-realaudio","ra"],["audio/x-twinvq","vqf"],["audio/x-twinvq-plugin",["vqe","vql"]],["audio/x-vnd.audioexplosion.mjuicemediafile","mjf"],["audio/x-voc","voc"],["audio/x-wav","wav"],["audio/xm","xm"],["chemical/x-cdx","cdx"],["chemical/x-cif","cif"],["chemical/x-cmdf","cmdf"],["chemical/x-cml","cml"],["chemical/x-csml","csml"],["chemical/x-pdb",["pdb","xyz"]],["chemical/x-xyz","xyz"],["drawing/x-dwf","dwf"],["i-world/i-vrml","ivr"],["image/bmp",["bmp","bm"]],["image/cgm","cgm"],["image/cis-cod","cod"],["image/cmu-raster",["ras","rast"]],["image/fif","fif"],["image/florian",["flo","turbot"]],["image/g3fax","g3"],["image/gif","gif"],["image/ief",["ief","iefs"]],["image/jpeg",["jpeg","jpe","jpg","jfif","jfif-tbnl"]],["image/jutvision","jut"],["image/ktx","ktx"],["image/naplps",["nap","naplps"]],["image/pict",["pic","pict"]],["image/pipeg","jfif"],["image/pjpeg",["jfif","jpe","jpeg","jpg"]],["image/png",["png","x-png"]],["image/prs.btif","btif"],["image/svg+xml","svg"],["image/tiff",["tif","tiff"]],["image/vasa","mcf"],["image/vnd.adobe.photoshop","psd"],["image/vnd.dece.graphic","uvi"],["image/vnd.djvu","djvu"],["image/vnd.dvb.subtitle","sub"],["image/vnd.dwg",["dwg","dxf","svf"]],["image/vnd.dxf","dxf"],["image/vnd.fastbidsheet","fbs"],["image/vnd.fpx","fpx"],["image/vnd.fst","fst"],["image/vnd.fujixerox.edmics-mmr","mmr"],["image/vnd.fujixerox.edmics-rlc","rlc"],["image/vnd.ms-modi","mdi"],["image/vnd.net-fpx",["fpx","npx"]],["image/vnd.rn-realflash","rf"],["image/vnd.rn-realpix","rp"],["image/vnd.wap.wbmp","wbmp"],["image/vnd.xiff","xif"],["image/webp","webp"],["image/x-cmu-raster","ras"],["image/x-cmx","cmx"],["image/x-dwg",["dwg","dxf","svf"]],["image/x-freehand","fh"],["image/x-icon","ico"],["image/x-jg","art"],["image/x-jps","jps"],["image/x-niff",["niff","nif"]],["image/x-pcx","pcx"],["image/x-pict",["pct","pic"]],["image/x-portable-anymap","pnm"],["image/x-portable-bitmap","pbm"],["image/x-portable-graymap","pgm"],["image/x-portable-greymap","pgm"],["image/x-portable-pixmap","ppm"],["image/x-quicktime",["qif","qti","qtif"]],["image/x-rgb","rgb"],["image/x-tiff",["tif","tiff"]],["image/x-windows-bmp","bmp"],["image/x-xbitmap","xbm"],["image/x-xbm","xbm"],["image/x-xpixmap",["xpm","pm"]],["image/x-xwd","xwd"],["image/x-xwindowdump","xwd"],["image/xbm","xbm"],["image/xpm","xpm"],["message/rfc822",["eml","mht","mhtml","nws","mime"]],["model/iges",["iges","igs"]],["model/mesh","msh"],["model/vnd.collada+xml","dae"],["model/vnd.dwf","dwf"],["model/vnd.gdl","gdl"],["model/vnd.gtw","gtw"],["model/vnd.mts","mts"],["model/vnd.vtu","vtu"],["model/vrml",["vrml","wrl","wrz"]],["model/x-pov","pov"],["multipart/x-gzip","gzip"],["multipart/x-ustar","ustar"],["multipart/x-zip","zip"],["music/crescendo",["mid","midi"]],["music/x-karaoke","kar"],["paleovu/x-pv","pvu"],["text/asp","asp"],["text/calendar","ics"],["text/css","css"],["text/csv","csv"],["text/ecmascript","js"],["text/h323","323"],["text/html",["html","htm","stm","acgi","htmls","htx","shtml"]],["text/iuls","uls"],["text/javascript","js"],["text/mcf","mcf"],["text/n3","n3"],["text/pascal","pas"],["text/plain",["txt","bas","c","h","c++","cc","com","conf","cxx","def","f","f90","for","g","hh","idc","jav","java","list","log","lst","m","mar","pl","sdml","text"]],["text/plain-bas","par"],["text/prs.lines.tag","dsc"],["text/richtext",["rtx","rt","rtf"]],["text/scriplet","wsc"],["text/scriptlet","sct"],["text/sgml",["sgm","sgml"]],["text/tab-separated-values","tsv"],["text/troff","t"],["text/turtle","ttl"],["text/uri-list",["uni","unis","uri","uris"]],["text/vnd.abc","abc"],["text/vnd.curl","curl"],["text/vnd.curl.dcurl","dcurl"],["text/vnd.curl.mcurl","mcurl"],["text/vnd.curl.scurl","scurl"],["text/vnd.fly","fly"],["text/vnd.fmi.flexstor","flx"],["text/vnd.graphviz","gv"],["text/vnd.in3d.3dml","3dml"],["text/vnd.in3d.spot","spot"],["text/vnd.rn-realtext","rt"],["text/vnd.sun.j2me.app-descriptor","jad"],["text/vnd.wap.wml","wml"],["text/vnd.wap.wmlscript","wmls"],["text/webviewhtml","htt"],["text/x-asm",["asm","s"]],["text/x-audiosoft-intra","aip"],["text/x-c",["c","cc","cpp"]],["text/x-component","htc"],["text/x-fortran",["for","f","f77","f90"]],["text/x-h",["h","hh"]],["text/x-java-source",["java","jav"]],["text/x-java-source,java","java"],["text/x-la-asf","lsx"],["text/x-m","m"],["text/x-pascal","p"],["text/x-script","hlb"],["text/x-script.csh","csh"],["text/x-script.elisp","el"],["text/x-script.guile","scm"],["text/x-script.ksh","ksh"],["text/x-script.lisp","lsp"],["text/x-script.perl","pl"],["text/x-script.perl-module","pm"],["text/x-script.phyton","py"],["text/x-script.rexx","rexx"],["text/x-script.scheme","scm"],["text/x-script.sh","sh"],["text/x-script.tcl","tcl"],["text/x-script.tcsh","tcsh"],["text/x-script.zsh","zsh"],["text/x-server-parsed-html",["shtml","ssi"]],["text/x-setext","etx"],["text/x-sgml",["sgm","sgml"]],["text/x-speech",["spc","talk"]],["text/x-uil","uil"],["text/x-uuencode",["uu","uue"]],["text/x-vcalendar","vcs"],["text/x-vcard","vcf"],["text/xml","xml"],["video/3gpp","3gp"],["video/3gpp2","3g2"],["video/animaflex","afl"],["video/avi","avi"],["video/avs-video","avs"],["video/dl","dl"],["video/fli","fli"],["video/gl","gl"],["video/h261","h261"],["video/h263","h263"],["video/h264","h264"],["video/jpeg","jpgv"],["video/jpm","jpm"],["video/mj2","mj2"],["video/mp4","mp4"],["video/mpeg",["mpeg","mp2","mpa","mpe","mpg","mpv2","m1v","m2v","mp3"]],["video/msvideo","avi"],["video/ogg","ogv"],["video/quicktime",["mov","qt","moov"]],["video/vdo","vdo"],["video/vivo",["viv","vivo"]],["video/vnd.dece.hd","uvh"],["video/vnd.dece.mobile","uvm"],["video/vnd.dece.pd","uvp"],["video/vnd.dece.sd","uvs"],["video/vnd.dece.video","uvv"],["video/vnd.fvt","fvt"],["video/vnd.mpegurl","mxu"],["video/vnd.ms-playready.media.pyv","pyv"],["video/vnd.rn-realvideo","rv"],["video/vnd.uvvu.mp4","uvu"],["video/vnd.vivo",["viv","vivo"]],["video/vosaic","vos"],["video/webm","webm"],["video/x-amt-demorun","xdr"],["video/x-amt-showrun","xsr"],["video/x-atomic3d-feature","fmf"],["video/x-dl","dl"],["video/x-dv",["dif","dv"]],["video/x-f4v","f4v"],["video/x-fli","fli"],["video/x-flv","flv"],["video/x-gl","gl"],["video/x-isvideo","isu"],["video/x-la-asf",["lsf","lsx"]],["video/x-m4v","m4v"],["video/x-motion-jpeg","mjpg"],["video/x-mpeg",["mp3","mp2"]],["video/x-mpeq2a","mp2"],["video/x-ms-asf",["asf","asr","asx"]],["video/x-ms-asf-plugin","asx"],["video/x-ms-wm","wm"],["video/x-ms-wmv","wmv"],["video/x-ms-wmx","wmx"],["video/x-ms-wvx","wvx"],["video/x-msvideo","avi"],["video/x-qtc","qtc"],["video/x-scm","scm"],["video/x-sgi-movie",["movie","mv"]],["windows/metafile","wmf"],["www/mime","mime"],["x-conference/x-cooltalk","ice"],["x-music/x-midi",["mid","midi"]],["x-world/x-3dmf",["3dm","3dmf","qd3","qd3d"]],["x-world/x-svr","svr"],["x-world/x-vrml",["flr","vrml","wrl","wrz","xaf","xof"]],["x-world/x-vrt","vrt"],["xgl/drawing","xgz"],["xgl/movie","xmz"]]),i=new Map([["123","application/vnd.lotus-1-2-3"],["323","text/h323"],["*","application/octet-stream"],["3dm","x-world/x-3dmf"],["3dmf","x-world/x-3dmf"],["3dml","text/vnd.in3d.3dml"],["3g2","video/3gpp2"],["3gp","video/3gpp"],["7z","application/x-7z-compressed"],["a","application/octet-stream"],["aab","application/x-authorware-bin"],["aac","audio/x-aac"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abc","text/vnd.abc"],["abw","application/x-abiword"],["ac","application/pkix-attr-cert"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acgi","text/html"],["acu","application/vnd.acucobol"],["acx","application/internet-property-stream"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afl","video/animaflex"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/postscript"],["aif",["audio/aiff","audio/x-aiff"]],["aifc",["audio/aiff","audio/x-aiff"]],["aiff",["audio/aiff","audio/x-aiff"]],["aim","application/x-aim"],["aip","text/x-audiosoft-intra"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["ani","application/x-navi-animation"],["aos","application/x-nokia-9000-communicator-add-on-software"],["apk","application/vnd.android.package-archive"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["aps","application/mime"],["arc","application/octet-stream"],["arj",["application/arj","application/octet-stream"]],["art","image/x-jg"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asp","text/asp"],["asr","video/x-ms-asf"],["asx",["video/x-ms-asf","application/x-mplayer2","video/x-ms-asf-plugin"]],["atc","application/vnd.acucorp"],["atomcat","application/atomcat+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au",["audio/basic","audio/x-au"]],["avi",["video/avi","video/msvideo","application/x-troff-msvideo","video/x-msvideo"]],["avs","video/avs-video"],["aw","application/applixware"],["axs","application/olescript"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azw","application/vnd.amazon.ebook"],["bas","text/plain"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin",["application/octet-stream","application/mac-binary","application/macbinary","application/x-macbinary","application/x-binary"]],["bm","image/bmp"],["bmi","application/vnd.bmi"],["bmp",["image/bmp","image/x-windows-bmp"]],["boo","application/book"],["book","application/book"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bsh","application/x-bsh"],["btif","image/prs.btif"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c",["text/plain","text/x-c"]],["c++","text/plain"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["c4g","application/vnd.clonk.c4group"],["cab","application/vnd.ms-cab-compressed"],["car","application/vnd.curl.car"],["cat",["application/vnd.ms-pkiseccat","application/vnd.ms-pki.seccat"]],["cc",["text/plain","text/x-c"]],["ccad","application/clariscad"],["cco","application/x-cocoa"],["ccxml","application/ccxml+xml,"],["cdbcmsg","application/vnd.contact.cmsg"],["cdf",["application/cdf","application/x-cdf","application/x-netcdf"]],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer",["application/pkix-cert","application/x-x509-ca-cert"]],["cgm","image/cgm"],["cha","application/x-chat"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cla","application/vnd.claymore"],["class",["application/octet-stream","application/java","application/java-byte-code","application/java-vm","application/x-java-class"]],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod",["image/cis-cod","application/vnd.rim.cod"]],["com",["application/octet-stream","text/plain"]],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt",["application/mac-compactpro","application/x-compactpro","application/x-cpt"]],["crd","application/x-mscardfile"],["crl",["application/pkix-crl","application/pkcs-crl"]],["crt",["application/pkix-cert","application/x-x509-user-cert","application/x-x509-ca-cert"]],["cryptonote","application/vnd.rig.cryptonote"],["csh",["text/x-script.csh","application/x-csh"]],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["css",["text/css","application/x-pointplus"]],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxx","text/plain"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["davmount","application/davmount+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["deb","application/x-debian-package"],["deepv","application/x-deepv"],["def","text/plain"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dif","video/x-dv"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["djvu","image/vnd.djvu"],["dl",["video/dl","video/x-dl"]],["dll","application/x-msdownload"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.document.macroenabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroenabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp",["application/commonground","application/vnd.osgi.dp"]],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drw","application/drafting"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dv","video/x-dv"],["dvi","application/x-dvi"],["dwf",["model/vnd.dwf","drawing/x-dwf"]],["dwg",["application/acad","image/vnd.dwg","image/x-dwg"]],["dxf",["application/dxf","image/vnd.dwg","image/vnd.dxf","image/x-dwg"]],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["el","text/x-script.elisp"],["elc",["application/x-elc","application/x-bytecode.elisp"]],["eml","message/rfc822"],["emma","application/emma+xml"],["env","application/x-envoy"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es",["application/ecmascript","application/x-esrehber"]],["es3","application/vnd.eszigno3+xml"],["esf","application/vnd.epson.esf"],["etx","text/x-setext"],["evy",["application/envoy","application/x-envoy"]],["exe",["application/octet-stream","application/x-msdownload"]],["exi","application/exi"],["ext","application/vnd.novadigm.ext"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f",["text/plain","text/x-fortran"]],["f4v","video/x-f4v"],["f77","text/x-fortran"],["f90",["text/plain","text/x-fortran"]],["fbs","image/vnd.fastbidsheet"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fh","image/x-freehand"],["fif",["application/fractals","image/fif"]],["fig","application/x-xfig"],["fli",["video/fli","video/x-fli"]],["flo",["image/florian","application/vnd.micrografx.flo"]],["flr","x-world/x-vrml"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fmf","video/x-atomic3d-feature"],["fnc","application/vnd.frogans.fnc"],["for",["text/plain","text/x-fortran"]],["fpx",["image/vnd.fpx","image/vnd.net-fpx"]],["frl","application/freeloader"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["funk","audio/make"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g","text/plain"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gdl","model/vnd.gdl"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["gl",["video/gl","video/x-gl"]],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gph","application/vnd.flographit"],["gqf","application/vnd.grafeq"],["gram","application/srgs"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsd","audio/x-gsm"],["gsf","application/x-font-ghostscript"],["gsm","audio/x-gsm"],["gsp","application/x-gsp"],["gss","application/x-gss"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxt","application/vnd.geonext"],["gz",["application/x-gzip","application/x-compressed"]],["gzip",["multipart/x-gzip","application/x-gzip"]],["h",["text/plain","text/x-h"]],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hdf","application/x-hdf"],["help","application/x-helpfile"],["hgl","application/vnd.hp-hpgl"],["hh",["text/plain","text/x-h"]],["hlb","text/x-script"],["hlp",["application/winhlp","application/hlp","application/x-helpfile","application/x-winhelp"]],["hpg","application/vnd.hp-hpgl"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx",["application/mac-binhex40","application/binhex","application/binhex4","application/mac-binhex","application/x-binhex40","application/x-mac-binhex40"]],["hta","application/hta"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["htmls","text/html"],["htt","text/webviewhtml"],["htx","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["ico","image/x-icon"],["ics","text/calendar"],["idc","text/plain"],["ief","image/ief"],["iefs","image/ief"],["ifm","application/vnd.shana.informed.formdata"],["iges",["application/iges","model/iges"]],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs",["application/iges","model/iges"]],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["iii","application/x-iphone"],["ima","application/x-ima"],["imap","application/x-httpd-imap"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["inf","application/inf"],["ins",["application/x-internet-signup","application/x-internett-signup"]],["ip","application/x-ip2"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["isp","application/x-internet-signup"],["isu","video/x-isvideo"],["it","audio/it"],["itp","application/vnd.shana.informed.formtemplate"],["iv","application/x-inventor"],["ivp","application/vnd.immervision-ivp"],["ivr","i-world/i-vrml"],["ivu","application/vnd.immervision-ivu"],["ivy","application/x-livescreen"],["jad","text/vnd.sun.j2me.app-descriptor"],["jam",["application/vnd.jam","audio/x-jam"]],["jar","application/java-archive"],["jav",["text/plain","text/x-java-source"]],["java",["text/plain","text/x-java-source,java","text/x-java-source"]],["jcm","application/x-java-commerce"],["jfif",["image/pipeg","image/jpeg","image/pjpeg"]],["jfif-tbnl","image/jpeg"],["jisp","application/vnd.jisp"],["jlt","application/vnd.hp-jlyt"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jpe",["image/jpeg","image/pjpeg"]],["jpeg",["image/jpeg","image/pjpeg"]],["jpg",["image/jpeg","image/pjpeg"]],["jpgv","video/jpeg"],["jpm","video/jpm"],["jps","image/x-jps"],["js",["application/javascript","application/ecmascript","text/javascript","text/ecmascript","application/x-javascript"]],["json","application/json"],["jut","image/jutvision"],["kar",["audio/midi","music/x-karaoke"]],["karbon","application/vnd.kde.karbon"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["ksh",["application/x-ksh","text/x-script.ksh"]],["ksp","application/vnd.kde.kspread"],["ktx","image/ktx"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["la",["audio/nspaudio","audio/x-nspaudio"]],["lam","audio/x-liveaudio"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["lha",["application/octet-stream","application/lha","application/x-lha"]],["lhx","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["lma",["audio/nspaudio","audio/x-nspaudio"]],["log","text/plain"],["lrm","application/vnd.ms-lrm"],["lsf","video/x-la-asf"],["lsp",["application/x-lisp","text/x-script.lisp"]],["lst","text/plain"],["lsx",["video/x-la-asf","text/x-la-asf"]],["ltf","application/vnd.frogans.ltf"],["ltx","application/x-latex"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh",["application/octet-stream","application/x-lzh"]],["lzx",["application/lzx","application/octet-stream","application/x-lzx"]],["m",["text/plain","text/x-m"]],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m1v","video/mpeg"],["m21","application/mp21"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3u",["audio/x-mpegurl","audio/x-mpequrl"]],["m3u8","application/vnd.apple.mpegurl"],["m4v","video/x-m4v"],["ma","application/mathematica"],["mads","application/mads+xml"],["mag","application/vnd.ecowin.chart"],["man","application/x-troff-man"],["map","application/x-navimap"],["mar","text/plain"],["mathml","application/mathml+xml"],["mbd","application/mbedlet"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc$","application/x-magic-cap-package-1.0"],["mc1","application/vnd.medcalcdata"],["mcd",["application/mcad","application/vnd.mcd","application/x-mathcad"]],["mcf",["image/vasa","text/mcf"]],["mcp","application/netmc"],["mcurl","text/vnd.curl.mcurl"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["me","application/x-troff-me"],["meta4","application/metalink4+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mht","message/rfc822"],["mhtml","message/rfc822"],["mid",["audio/mid","audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["midi",["audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["mif",["application/vnd.mif","application/x-mif","application/x-frame"]],["mime",["message/rfc822","www/mime"]],["mj2","video/mj2"],["mjf","audio/x-vnd.audioexplosion.mjuicemediafile"],["mjpg","video/x-motion-jpeg"],["mlp","application/vnd.dolby.mlp"],["mm",["application/base64","application/x-meme"]],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mme","application/base64"],["mmf","application/vnd.smaf"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mny","application/x-msmoney"],["mod",["audio/mod","audio/x-mod"]],["mods","application/mods+xml"],["moov","video/quicktime"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2",["video/mpeg","audio/mpeg","video/x-mpeg","audio/x-mpeg","video/x-mpeq2a"]],["mp3",["audio/mpeg","audio/mpeg3","video/mpeg","audio/x-mpeg-3","video/x-mpeg"]],["mp4",["video/mp4","application/mp4"]],["mp4a","audio/mp4"],["mpa",["video/mpeg","audio/mpeg"]],["mpc",["application/vnd.mophun.certificate","application/x-project"]],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg",["video/mpeg","audio/mpeg"]],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/x-project"],["mpv","application/x-project"],["mpv2","video/mpeg"],["mpx","application/x-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","application/x-troff-ms"],["mscml","application/mediaservercontrol+xml"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msl","application/vnd.mobius.msl"],["msty","application/vnd.muvee.style"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musicxml","application/vnd.recordare.musicxml+xml"],["mv","video/x-sgi-movie"],["mvb","application/x-msmediaview"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["my","audio/make"],["mzz","application/x-vnd.audioexplosion.mzz"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nap","image/naplps"],["naplps","image/naplps"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncm","application/vnd.nokia.configuration-message"],["ncx","application/x-dtbncx+xml"],["ngdat","application/vnd.nokia.n-gage.data"],["nif","image/x-niff"],["niff","image/x-niff"],["nix","application/x-mix-transfer"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nvd","application/x-navidoc"],["nws","message/rfc822"],["o","application/octet-stream"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omc","application/x-omc"],["omcd","application/x-omcdatamaker"],["omcr","application/x-omcregerator"],["onetoc","application/onenote"],["opf","application/oebps-package+xml"],["org","application/vnd.lotus-organizer"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","application/x-font-otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p10",["application/pkcs10","application/x-pkcs10"]],["p12",["application/pkcs-12","application/x-pkcs12"]],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7m",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7r","application/x-pkcs7-certreqresp"],["p7s",["application/pkcs7-signature","application/x-pkcs7-signature"]],["p8","application/pkcs8"],["par","text/plain-bas"],["part","application/pro_eng"],["pas","text/pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcf","application/x-font-pcf"],["pcl",["application/vnd.hp-pcl","application/x-pcl"]],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb",["application/vnd.palm","chemical/x-pdb"]],["pdf","application/pdf"],["pfa","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfunk",["audio/make","audio/make.my.funk"]],["pfx","application/x-pkcs12"],["pgm",["image/x-portable-graymap","image/x-portable-greymap"]],["pgn","application/x-chess-pgn"],["pgp","application/pgp-signature"],["pic",["image/pict","image/x-pict"]],["pict","image/pict"],["pkg","application/x-newton-compatible-pkg"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pko",["application/ynd.ms-pkipko","application/vnd.ms-pki.pko"]],["pl",["text/plain","text/x-script.perl"]],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["plx","application/x-pixclscript"],["pm",["text/x-script.perl-module","image/x-xpixmap"]],["pm4","application/x-pagemaker"],["pm5","application/x-pagemaker"],["pma","application/x-perfmon"],["pmc","application/x-perfmon"],["pml",["application/vnd.ctc-posml","application/x-perfmon"]],["pmr","application/x-perfmon"],["pmw","application/x-perfmon"],["png","image/png"],["pnm",["application/x-portable-anymap","image/x-portable-anymap"]],["portpkg","application/vnd.macports.portpkg"],["pot",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["potm","application/vnd.ms-powerpoint.template.macroenabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["pov","model/x-pov"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroenabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["ppsm","application/vnd.ms-powerpoint.slideshow.macroenabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt",["application/vnd.ms-powerpoint","application/mspowerpoint","application/powerpoint","application/x-mspowerpoint"]],["pptm","application/vnd.ms-powerpoint.presentation.macroenabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["ppz","application/mspowerpoint"],["prc","application/x-mobipocket-ebook"],["pre",["application/vnd.lotus-freelance","application/x-freelance"]],["prf","application/pics-rules"],["prt","application/pro_eng"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd",["application/octet-stream","image/vnd.adobe.photoshop"]],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pvu","paleovu/x-pv"],["pwn","application/vnd.3m.post-it-notes"],["pwz","application/vnd.ms-powerpoint"],["py","text/x-script.phyton"],["pya","audio/vnd.ms-playready.media.pya"],["pyc","application/x-bytecode.python"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qcp","audio/vnd.qcelp"],["qd3","x-world/x-3dmf"],["qd3d","x-world/x-3dmf"],["qfx","application/vnd.intu.qfx"],["qif","image/x-quicktime"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qtc","video/x-qtc"],["qti","image/x-quicktime"],["qtif","image/x-quicktime"],["qxd","application/vnd.quark.quarkxpress"],["ra",["audio/x-realaudio","audio/x-pn-realaudio","audio/x-pn-realaudio-plugin"]],["ram","audio/x-pn-realaudio"],["rar","application/x-rar-compressed"],["ras",["image/cmu-raster","application/x-cmu-raster","image/x-cmu-raster"]],["rast","image/cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rexx","text/x-script.rexx"],["rf","image/vnd.rn-realflash"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm",["application/vnd.rn-realmedia","audio/x-pn-realaudio"]],["rmi","audio/mid"],["rmm","audio/x-pn-realaudio"],["rmp",["audio/x-pn-realaudio-plugin","audio/x-pn-realaudio"]],["rms","application/vnd.jcp.javame.midlet-rms"],["rnc","application/relax-ng-compact-syntax"],["rng",["application/ringing-tones","application/vnd.nokia.ringing-tone"]],["rnx","application/vnd.rn-realplayer"],["roff","application/x-troff"],["rp","image/vnd.rn-realpix"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsd","application/rsd+xml"],["rt",["text/richtext","text/vnd.rn-realtext"]],["rtf",["application/rtf","text/richtext","application/x-rtf"]],["rtx",["text/richtext","application/rtf"]],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["saveme","application/octet-stream"],["sbk","application/x-tbook"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm",["application/vnd.lotus-screencam","video/x-scm","text/x-script.guile","application/x-lotusscreencam","text/x-script.scheme"]],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["sct","text/scriptlet"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkm","application/vnd.solent.sdkm+xml"],["sdml","text/plain"],["sdp",["application/sdp","application/x-sdp"]],["sdr","application/sounder"],["sdw","application/vnd.stardivision.writer"],["sea",["application/sea","application/x-sea"]],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["ser","application/java-serialized-object"],["set","application/set"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sgl","application/vnd.stardivision.writer-global"],["sgm",["text/sgml","text/x-sgml"]],["sgml",["text/sgml","text/x-sgml"]],["sh",["application/x-shar","application/x-bsh","application/x-sh","text/x-script.sh"]],["shar",["application/x-bsh","application/x-shar"]],["shf","application/shf+xml"],["shtml",["text/html","text/x-server-parsed-html"]],["sid","audio/x-psid"],["sis","application/vnd.symbian.install"],["sit",["application/x-stuffit","application/x-sit"]],["sitx","application/x-stuffitx"],["skd","application/x-koan"],["skm","application/x-koan"],["skp",["application/vnd.koan","application/x-koan"]],["skt","application/x-koan"],["sl","application/x-seelogo"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi",["application/smil","application/smil+xml"]],["smil","application/smil"],["snd",["audio/basic","audio/x-adpcm"]],["snf","application/x-font-snf"],["sol","application/solids"],["spc",["text/x-speech","application/x-pkcs7-certificates"]],["spf","application/vnd.yamaha.smaf-phrase"],["spl",["application/futuresplash","application/x-futuresplash"]],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spr","application/x-sprite"],["sprite","application/x-sprite"],["src","application/x-wais-source"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssi","text/x-server-parsed-html"],["ssm","application/streamingmedia"],["ssml","application/ssml+xml"],["sst",["application/vnd.ms-pkicertstore","application/vnd.ms-pki.certstore"]],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["step","application/step"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl",["application/vnd.ms-pkistl","application/sla","application/vnd.ms-pki.stl","application/x-navistyle"]],["stm","text/html"],["stp","application/step"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["sub","image/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svf",["image/vnd.dwg","image/x-dwg"]],["svg","image/svg+xml"],["svr",["x-world/x-svr","application/x-world"]],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t",["text/troff","application/x-troff"]],["talk","text/x-speech"],["tao","application/vnd.tao.intent-module-archive"],["tar","application/x-tar"],["tbk",["application/toolbook","application/x-tbook"]],["tcap","application/vnd.3gpp2.tcap"],["tcl",["text/x-script.tcl","application/x-tcl"]],["tcsh","text/x-script.tcsh"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text",["application/plain","text/plain"]],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tgz",["application/gnutar","application/x-compressed"]],["thmx","application/vnd.ms-officetheme"],["tif",["image/tiff","image/x-tiff"]],["tiff",["image/tiff","image/x-tiff"]],["tmo","application/vnd.tmobile-livetv"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","application/x-troff"],["tra","application/vnd.trueapp"],["trm","application/x-msterminal"],["tsd","application/timestamped-data"],["tsi","audio/tsp-audio"],["tsp",["application/dsptype","audio/tsplayer"]],["tsv","text/tab-separated-values"],["ttf","application/x-font-ttf"],["ttl","text/turtle"],["turbot","image/florian"],["twd","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["ufd","application/vnd.ufdl"],["uil","text/x-uil"],["uls","text/iuls"],["umj","application/vnd.umajin"],["uni","text/uri-list"],["unis","text/uri-list"],["unityweb","application/vnd.unity"],["unv","application/i-deas"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["ustar",["application/x-ustar","multipart/x-ustar"]],["utz","application/vnd.uiq.theme"],["uu",["application/octet-stream","text/x-uuencode"]],["uue","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vda","application/vda"],["vdo","video/vdo"],["vew","application/groupwise"],["vis","application/vnd.visionary"],["viv",["video/vivo","video/vnd.vivo"]],["vivo",["video/vivo","video/vnd.vivo"]],["vmd","application/vocaltec-media-desc"],["vmf","application/vocaltec-media-file"],["voc",["audio/voc","audio/x-voc"]],["vos","video/vosaic"],["vox","audio/voxware"],["vqe","audio/x-twinvq-plugin"],["vqf","audio/x-twinvq"],["vql","audio/x-twinvq-plugin"],["vrml",["model/vrml","x-world/x-vrml","application/x-vrml"]],["vrt","x-world/x-vrt"],["vsd",["application/vnd.visio","application/x-visio"]],["vsf","application/vnd.vsf"],["vst","application/x-visio"],["vsw","application/x-visio"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w60","application/wordperfect6.0"],["w61","application/wordperfect6.1"],["w6w","application/msword"],["wad","application/x-doom"],["wav",["audio/wav","audio/x-wav"]],["wax","audio/x-ms-wax"],["wb1","application/x-qpro"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/vnd.wap.wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["web","application/vnd.xara"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wiz","application/msword"],["wk1","application/x-123"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf",["windows/metafile","application/x-msmetafile"]],["wml","text/vnd.wap.wml"],["wmlc","application/vnd.wap.wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-ms-wmz"],["woff","application/x-font-woff"],["word","application/msword"],["wp","application/wordperfect"],["wp5",["application/wordperfect","application/wordperfect6.0"]],["wp6","application/wordperfect"],["wpd",["application/wordperfect","application/vnd.wordperfect","application/x-wpwin"]],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wq1","application/x-lotus"],["wqd","application/vnd.wqd"],["wri",["application/mswrite","application/x-wri","application/x-mswrite"]],["wrl",["model/vrml","x-world/x-vrml","application/x-world"]],["wrz",["model/vrml","x-world/x-vrml"]],["wsc","text/scriplet"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wsrc","application/x-wais-source"],["wtb","application/vnd.webturbo"],["wtk","application/x-wintalk"],["wvx","video/x-ms-wvx"],["x-png","image/png"],["x3d","application/vnd.hzn-3d-crossword"],["xaf","x-world/x-vrml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm",["image/xbm","image/x-xbm","image/x-xbitmap"]],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdr","video/x-amt-demorun"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xgz","xgl/drawing"],["xhtml","application/xhtml+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlam","application/vnd.ms-excel.addin.macroenabled.12"],["xlb",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlc",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xld",["application/excel","application/x-excel"]],["xlk",["application/excel","application/x-excel"]],["xll",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlm",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xls",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlsb","application/vnd.ms-excel.sheet.binary.macroenabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroenabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xltm","application/vnd.ms-excel.template.macroenabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlv",["application/excel","application/x-excel"]],["xlw",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xm","audio/xm"],["xml",["application/xml","text/xml","application/atom+xml","application/rss+xml"]],["xmz","xgl/movie"],["xo","application/vnd.olpc-sugar"],["xof","x-world/x-vrml"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpix","application/x-vnd.ls-xpix"],["xpm",["image/xpm","image/x-xpixmap"]],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xsr","video/x-amt-showrun"],["xul","application/vnd.mozilla.xul+xml"],["xwd",["image/x-xwd","image/x-xwindowdump"]],["xyz",["chemical/x-xyz","chemical/x-pdb"]],["yang","application/yang"],["yin","application/yin+xml"],["z",["application/x-compressed","application/x-compress"]],["zaz","application/vnd.zzazz.deck+xml"],["zip",["application/zip","multipart/x-zip","application/x-zip-compressed","application/x-compressed"]],["zir","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zoo","application/octet-stream"],["zsh","text/x-script.zsh"]]);return sA={detectMimeType(n){if(!n)return t;let r=e.parse(n),o=(r.ext.substr(1)||r.name||"").split("?").shift().trim().toLowerCase(),s=t;return i.has(o)&&(s=i.get(o)),Array.isArray(s)?s[0]:s},detectExtension(e){if(!e)return"bin";let t=(e||"").toLowerCase().trim().split("/"),i=t.shift().trim(),r=t.join("/").trim();if(n.has(i+"/"+r)){let e=n.get(i+"/"+r);return Array.isArray(e)?e[0]:e}return"text"===i?"txt":"bin"}}}function NA(){if(lA)return cA;lA=1;const e=2147483647,t=36,n=/^xn--/,i=/[^\0-\x7F]/,r=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=Math.floor,a=String.fromCharCode;function c(e){throw new RangeError(o[e])}function l(e,t){const n=e.split("@");let i="";n.length>1&&(i=n[0]+"@",e=n[1]);const o=function(e,t){const n=[];let i=e.length;for(;i--;)n[i]=t(e[i]);return n}((e=e.replace(r,".")).split("."),t).join(".");return i+o}function u(e){const t=[];let n=0;const i=e.length;for(;n<i;){const r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){const i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&r)<<10)+(1023&i)+65536):(t.push(r),n--)}else t.push(r)}return t}const p=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},d=function(e,n,i){let r=0;for(e=i?s(e/700):e>>1,e+=s(e/n);e>455;r+=t)e=s(e/35);return s(r+36*e/(e+38))},m=function(n){const i=[],r=n.length;let o=0,a=128,l=72,u=n.lastIndexOf("-");u<0&&(u=0);for(let e=0;e<u;++e)n.charCodeAt(e)>=128&&c("not-basic"),i.push(n.charCodeAt(e));for(let m=u>0?u+1:0;m<r;){const u=o;for(let i=1,a=t;;a+=t){m>=r&&c("invalid-input");const u=(p=n.charCodeAt(m++))>=48&&p<58?p-48+26:p>=65&&p<91?p-65:p>=97&&p<123?p-97:t;u>=t&&c("invalid-input"),u>s((e-o)/i)&&c("overflow"),o+=u*i;const d=a<=l?1:a>=l+26?26:a-l;if(u<d)break;const h=t-d;i>s(e/h)&&c("overflow"),i*=h}const h=i.length+1;l=d(o-u,h,0==u),s(o/h)>e-a&&c("overflow"),a+=s(o/h),o%=h,i.splice(o++,0,a)}var p;return String.fromCodePoint(...i)},h=function(n){const i=[],r=(n=u(n)).length;let o=128,l=0,m=72;for(const e of n)e<128&&i.push(a(e));const h=i.length;let f=h;for(h&&i.push("-");f<r;){let r=e;for(const e of n)e>=o&&e<r&&(r=e);const u=f+1;r-o>s((e-l)/u)&&c("overflow"),l+=(r-o)*u,o=r;for(const r of n)if(r<o&&++l>e&&c("overflow"),r===o){let e=l;for(let n=t;;n+=t){const r=n<=m?1:n>=m+26?26:n-m;if(e<r)break;const o=e-r,c=t-r;i.push(a(p(r+o%c,0))),e=s(o/c)}i.push(a(p(e,0))),m=d(l,u,f===h),l=0,++f}++l,++o}return i.join("")};return cA={version:"2.3.1",ucs2:{decode:u,encode:e=>String.fromCodePoint(...e)},decode:m,encode:h,toASCII:function(e){return l(e,(function(e){return i.test(e)?"xn--"+h(e):e}))},toUnicode:function(e){return l(e,(function(e){return n.test(e)?m(e.slice(4).toLowerCase()):e}))}}}function DA(){if(pA)return uA;pA=1;const e=c.Transform;function t(e){return"string"==typeof e&&(e=Buffer.from(e,"utf-8")),e.toString("base64")}function n(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let n=[],i=0,r=1024*t;for(;i<e.length;){let o=e.substr(i,r).replace(new RegExp(".{"+t+"}","g"),"$&\r\n").trim();n.push(o),i+=r}return n.join("\r\n").trim()}return uA={encode:t,wrap:n,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this._remainingBytes=!1,this.inputBytes=0,this.outputBytes=0}_transform(e,i,r){if("buffer"!==i&&(e=Buffer.from(e,i)),!e||!e.length)return setImmediate(r);this.inputBytes+=e.length,this._remainingBytes&&this._remainingBytes.length&&(e=Buffer.concat([this._remainingBytes,e],this._remainingBytes.length+e.length),this._remainingBytes=!1),e.length%3?(this._remainingBytes=e.slice(e.length-e.length%3),e=e.slice(0,e.length-e.length%3)):this._remainingBytes=!1;let o=this._curLine+t(e);if(this.options.lineLength){o=n(o,this.options.lineLength);let e=o.lastIndexOf("\n");e<0?(this._curLine=o,o=""):e===o.length-1?this._curLine="":(this._curLine=o.substr(e+1),o=o.substr(0,e+1))}o&&(this.outputBytes+=o.length,this.push(Buffer.from(o,"ascii"))),setImmediate(r)}_flush(e){this._remainingBytes&&this._remainingBytes.length&&(this._curLine+=t(this._remainingBytes)),this._curLine&&(this._curLine=n(this._curLine,this.options.lineLength),this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii"),this._curLine=""),e()}}}}function LA(){if(mA)return dA;mA=1;const e=c.Transform;function t(e){"string"==typeof e&&(e=Buffer.from(e,"utf-8"));let t,n=[[9],[10],[13],[32,60],[62,126]],r="";for(let o=0,s=e.length;o<s;o++)t=e[o],i(t,n)&&(32!==t&&9!==t||o!==s-1&&10!==e[o+1]&&13!==e[o+1])?r+=String.fromCharCode(t):r+="="+(t<16?"0":"")+t.toString(16).toUpperCase();return r}function n(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let n,i,r,o=0,s=e.length,a=Math.floor(t/3),c="";for(;o<s;)if(r=e.substr(o,t),n=r.match(/\r\n/))r=r.substr(0,n.index+n[0].length),c+=r,o+=r.length;else if("\n"!==r.substr(-1))if(n=r.substr(-a).match(/\n.*?$/))r=r.substr(0,r.length-(n[0].length-1)),c+=r,o+=r.length;else{if(r.length>t-a&&(n=r.substr(-a).match(/[ \t.,!?][^ \t.,!?]*$/)))r=r.substr(0,r.length-(n[0].length-1));else if(r.match(/[=][\da-f]{0,2}$/i))for((n=r.match(/[=][\da-f]{0,1}$/i))&&(r=r.substr(0,r.length-n[0].length));r.length>3&&r.length<s-o&&!r.match(/^(?:=[\da-f]{2}){1,4}$/i)&&(n=r.match(/[=][\da-f]{2}$/gi))&&(i=parseInt(n[0].substr(1,2),16),!(i<128))&&(r=r.substr(0,r.length-3),!(i>=192)););o+r.length<s&&"\n"!==r.substr(-1)?(r.length===t&&r.match(/[=][\da-f]{2}$/i)?r=r.substr(0,r.length-3):r.length===t&&(r=r.substr(0,r.length-1)),o+=r.length,r+="=\r\n"):o+=r.length,c+=r}else c+=r,o+=r.length;return c}function i(e,t){for(let n=t.length-1;n>=0;n--)if(t[n].length){if(1===t[n].length&&e===t[n][0])return!0;if(2===t[n].length&&e>=t[n][0]&&e<=t[n][1])return!0}return!1}return dA={encode:t,wrap:n,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this.inputBytes=0,this.outputBytes=0}_transform(e,i,r){let o;if("buffer"!==i&&(e=Buffer.from(e,i)),!e||!e.length)return r();this.inputBytes+=e.length,this.options.lineLength?(o=this._curLine+t(e),o=n(o,this.options.lineLength),o=o.replace(/(^|\n)([^\n]*)$/,((e,t,n)=>(this._curLine=n,t))),o&&(this.outputBytes+=o.length,this.push(o))):(o=t(e),this.outputBytes+=o.length,this.push(o,"ascii")),r()}_flush(e){this._curLine&&(this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii")),e()}}}}function zA(){if(fA)return hA;fA=1;const e=DA(),t=LA(),n=$A();return hA={isPlainText:(e,t)=>"string"==typeof e&&!(t?/[\x00-\x08\x0b\x0c\x0e-\x1f"\u0080-\uFFFF]/:/[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/).test(e),hasLongerLines:(e,t)=>e.length>131072||new RegExp("^.{"+(t+1)+",}","m").test(e),encodeWord(n,i,r){let o;if((r=r||0)&&r>12&&(r-=12),"Q"===(i=(i||"Q").toString().toUpperCase().trim().charAt(0))?o=t.encode(n).replace(/[^a-z0-9!*+\-/=]/gi,(e=>{let t=e.charCodeAt(0).toString(16).toUpperCase();return" "===e?"_":"="+(1===t.length?"0"+t:t)})):"B"===i&&(o="string"==typeof n?n:e.encode(n),r=r?Math.max(3,(r-r%4)/4*3):0),r&&("B"!==i?o:e.encode(n)).length>r)if("Q"===i)o=this.splitMimeEncodedString(o,r).join("?= =?UTF-8?"+i+"?");else{let t=[],n="";for(let i=0,s=o.length;i<s;i++){let a=o.charAt(i);/[\ud83c\ud83d\ud83e]/.test(a)&&i<s-1&&(a+=o.charAt(++i)),Buffer.byteLength(n+a)<=r||0===i?n+=a:(t.push(e.encode(n)),n=a)}n&&t.push(e.encode(n)),o=t.length>1?t.join("?= =?UTF-8?"+i+"?"):t.join("")}else"B"===i&&(o=e.encode(n));return"=?UTF-8?"+i+"?"+o+("?="===o.substr(-2)?"":"?=")},encodeWords(e,t,n,i){let r;n=n||0;let o=e.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);if(!o)return e;if(i)return this.encodeWord(e,t,n);let s=e.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);if(!s)return e;let a=o.index+(o[0].match(/[^\s]/)||{index:0}).index,c=s.index+(s[1]||"").length;return r=(a?e.substr(0,a):"")+this.encodeWord(e.substring(a,c),t||"Q",n)+(c<e.length?e.substr(c):""),r},buildHeaderValue(e){let t=[];return Object.keys(e.params||{}).forEach((n=>{let i=e.params[n];!this.isPlainText(i,!0)||i.length>=75?this.buildHeaderParam(n,i,50).forEach((e=>{/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(e.value)&&"*"!==e.key.substr(-1)?t.push(e.key+"="+JSON.stringify(e.value)):t.push(e.key+"="+e.value)})):/[\s'"\\;:/=(),<>@[\]?]|^-/.test(i)?t.push(n+"="+JSON.stringify(i)):t.push(n+"="+i)})),e.value+(t.length?"; "+t.join("; "):"")},buildHeaderParam(e,t,n){let i,r,o,s,a,c,l=[],u="string"==typeof t?t:(t||"").toString(),p=0;if(n=n||50,this.isPlainText(t,!0)){if(u.length<=n)return[{key:e,value:u}];u=u.replace(new RegExp(".{"+n+"}","g"),(e=>(l.push({line:e}),""))),u&&l.push({line:u})}else{if(/[\uD800-\uDBFF]/.test(u)){for(i=[],a=0,c=u.length;a<c;a++)r=u.charAt(a),o=r.charCodeAt(0),o>=55296&&o<=56319&&a<c-1?(r+=u.charAt(a+1),i.push(r),a++):i.push(r);u=i}s="utf-8''";let e=!0;for(p=0,a=0,c=u.length;a<c;a++){if(r=u[a],e)r=this.safeEncodeURIComponent(r);else if(r=" "===r?r:this.safeEncodeURIComponent(r),r!==u[a]){if(!((this.safeEncodeURIComponent(s)+r).length>=n)){e=!0,a=p,s="";continue}l.push({line:s,encoded:e}),s="",p=a-1}(s+r).length>=n?(l.push({line:s,encoded:e}),s=r=" "===u[a]?" ":this.safeEncodeURIComponent(u[a]),r===u[a]?(e=!1,p=a-1):e=!0):s+=r}s&&l.push({line:s,encoded:e})}return l.map(((t,n)=>({key:e+"*"+n+(t.encoded?"*":""),value:t.line})))},parseHeaderValue(e){let t,n={value:!1,params:{}},i=!1,r="",o="value",s=!1,a=!1;for(let c=0,l=e.length;c<l;c++)if(t=e.charAt(c),"key"===o){if("="===t){i=r.trim().toLowerCase(),o="value",r="";continue}r+=t}else{if(a)r+=t;else{if("\\"===t){a=!0;continue}s&&t===s?s=!1:s||'"'!==t?s||";"!==t?r+=t:(!1===i?n.value=r.trim():n.params[i]=r.trim(),o="key",r=""):s=t}a=!1}return"value"===o?!1===i?n.value=r.trim():n.params[i]=r.trim():r.trim()&&(n.params[r.trim().toLowerCase()]=""),Object.keys(n.params).forEach((e=>{let t,i,r,o;(r=e.match(/(\*(\d+)|\*(\d+)\*|\*)$/))&&(t=e.substr(0,r.index),i=Number(r[2]||r[3])||0,n.params[t]&&"object"==typeof n.params[t]||(n.params[t]={charset:!1,values:[]}),o=n.params[e],0===i&&"*"===r[0].substr(-1)&&(r=o.match(/^([^']*)'[^']*'(.*)$/))&&(n.params[t].charset=r[1]||"iso-8859-1",o=r[2]),n.params[t].values[i]=o,delete n.params[e])})),Object.keys(n.params).forEach((e=>{let t;n.params[e]&&Array.isArray(n.params[e].values)&&(t=n.params[e].values.map((e=>e||"")).join(""),n.params[e].charset?n.params[e]="=?"+n.params[e].charset+"?Q?"+t.replace(/[=?_\s]/g,(e=>{let t=e.charCodeAt(0).toString(16);return" "===e?"_":"%"+(t.length<2?"0":"")+t})).replace(/%/g,"=")+"?=":n.params[e]=t)})),n},detectExtension:e=>n.detectExtension(e),detectMimeType:e=>n.detectMimeType(e),foldLines(e,t,n){t=t||76;let i,r,o=0,s=(e=(e||"").toString()).length,a="";for(;o<s;){if(i=e.substr(o,t),i.length<t){a+=i;break}(r=i.match(/^[^\n\r]*(\r?\n|\r)/))?(i=r[0],a+=i,o+=i.length):((r=i.match(/(\s+)[^\s]*$/))&&r[0].length-(n?(r[1]||"").length:0)<i.length?i=i.substr(0,i.length-(r[0].length-(n?(r[1]||"").length:0))):(r=e.substr(o+i.length).match(/^[^\s]+(\s*)/))&&(i+=r[0].substr(0,r[0].length-(n?0:(r[1]||"").length))),a+=i,o+=i.length,o<s&&(a+="\r\n"))}return a},splitMimeEncodedString:(e,t)=>{let n,i,r,o,s=[];for(t=Math.max(t||0,12);e.length;){for(n=e.substr(0,t),(i=n.match(/[=][0-9A-F]?$/i))&&(n=n.substr(0,i.index)),o=!1;!o;)o=!0,(i=e.substr(n.length).match(/^[=]([0-9A-F]{2})/i))&&(r=parseInt(i[1],16),r<194&&r>127&&(n=n.substr(0,n.length-3),o=!1));n.length&&s.push(n),e=e.substr(n.length)}return s},encodeURICharComponent:e=>{let t="",n=e.charCodeAt(0).toString(16).toUpperCase();if(n.length%2&&(n="0"+n),n.length>2)for(let e=0,i=n.length/2;e<i;e++)t+="%"+n.substr(e,2);else t+="%"+n;return t},safeEncodeURIComponent(e){e=(e||"").toString();try{e=encodeURIComponent(e)}catch(t){return e.replace(/[^\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]+/g,"")}return e.replace(/[\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]/g,(e=>this.encodeURICharComponent(e)))}},hA}function FA(){if(yA)return gA;yA=1;class e{constructor(e){this.str=(e||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let e=[];for(let e=0,t=this.str.length;e<t;e++){let n=this.str.charAt(e),i=e<t-1?this.str.charAt(e+1):null;this.checkChar(n,i)}return this.list.forEach((t=>{t.value=(t.value||"").toString().trim(),t.value&&e.push(t)})),e}checkChar(e,t){if(this.escaped);else{if(e===this.operatorExpecting)return this.node={type:"operator",value:e},t&&![" ","\t","\r","\n",",",";"].includes(t)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,this.operatorExpecting="",void(this.escaped=!1);if(!this.operatorExpecting&&e in this.operators)return this.node={type:"operator",value:e},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[e],void(this.escaped=!1);if(['"',"'"].includes(this.operatorExpecting)&&"\\"===e)return void(this.escaped=!0)}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),"\n"===e&&(e=" "),(e.charCodeAt(0)>=33||[" ","\t"].includes(e))&&(this.node.value+=e),this.escaped=!1}}function t(n,i){i=i||{};let r=new e(n).tokenize(),o=[],s=[],a=[];if(r.forEach((e=>{"operator"!==e.type||","!==e.value&&";"!==e.value?s.push(e):(s.length&&o.push(s),s=[])})),s.length&&o.push(s),o.forEach((e=>{e=function(e){let n,i,r,o=!1,s="text",a=[],c={address:[],comment:[],group:[],text:[]};for(i=0,r=e.length;i<r;i++){let t=e[i],n=i?e[i-1]:null;if("operator"===t.type)switch(t.value){case"<":s="address";break;case"(":s="comment";break;case":":s="group",o=!0;break;default:s="text"}else t.value&&("address"===s&&(t.value=t.value.replace(/^[^<]*<\s*/,"")),n&&n.noBreak&&c[s].length?c[s][c[s].length-1]+=t.value:c[s].push(t.value))}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),o)c.text=c.text.join(" "),a.push({name:c.text||n&&n.name,group:c.group.length?t(c.group.join(",")):[]});else{if(!c.address.length&&c.text.length){for(i=c.text.length-1;i>=0;i--)if(c.text[i].match(/^[^@\s]+@[^@\s]+$/)){c.address=c.text.splice(i,1);break}let e=function(e){return c.address.length?e:(c.address=[e.trim()]," ")};if(!c.address.length)for(i=c.text.length-1;i>=0&&(c.text[i]=c.text[i].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,e).trim(),!c.address.length);i--);}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),c.address.length>1&&(c.text=c.text.concat(c.address.splice(1))),c.text=c.text.join(" "),c.address=c.address.join(" "),!c.address&&o)return[];n={address:c.address||c.text||"",name:c.text||c.address||""},n.address===n.name&&((n.address||"").match(/@/)?n.name="":n.address=""),a.push(n)}return a}(e),e.length&&(a=a.concat(e))})),i.flatten){let e=[],t=n=>{n.forEach((n=>{if(n.group)return t(n.group);e.push(n)}))};return t(a),e}return a}return gA=t}function UA(){if(wA)return xA;wA=1;const e=c.Transform;return xA=class extends e{constructor(e){super(e),this.options=e||{},this.lastByte=!1}_transform(e,t,n){let i,r=0;for(let t=0,n=e.length;t<n;t++)10===e[t]&&(t&&13!==e[t-1]||!t&&13!==this.lastByte)&&(t>r&&(i=e.slice(r,t),this.push(i)),this.push(Buffer.from("\r\n")),r=t+1);r&&r<e.length?(i=e.slice(r),this.push(i)):r||this.push(e),this.lastByte=e[e.length-1],n()}},xA}function BA(){if(OA)return _A;OA=1;const e=m,t=r,n=NA(),i=c.PassThrough,o=jA(),s=zA(),a=LA(),l=DA(),u=FA(),p=MA(),d=function(){if(bA)return vA;bA=1;const e=c.Transform;return vA=class extends e{constructor(){super(),this.lastByte=!1}_transform(e,t,n){e.length&&(this.lastByte=e[e.length-1]),this.push(e),n()}_flush(e){return 10===this.lastByte?e():13===this.lastByte?(this.push(Buffer.from("\n")),e()):(this.push(Buffer.from("\r\n")),e())}}}(),h=UA(),f=function(){if(SA)return EA;SA=1;const e=c.Transform;return EA=class extends e{constructor(e){super(e),this.options=e||{}}_transform(e,t,n){let i,r=0;for(let t=0,n=e.length;t<n;t++)13===e[t]&&(i=e.slice(r,t),r=t+1,this.push(i));r&&r<e.length?(i=e.slice(r),this.push(i)):r||this.push(e),n()}},EA}();class g{constructor(t,n){this.nodeCounter=0,n=n||{},this.baseBoundary=n.baseBoundary||e.randomBytes(8).toString("hex"),this.boundaryPrefix=n.boundaryPrefix||"--_NmP",this.disableFileAccess=!!n.disableFileAccess,this.disableUrlAccess=!!n.disableUrlAccess,this.normalizeHeaderKey=n.normalizeHeaderKey,this.date=new Date,this.rootNode=n.rootNode||this,this.keepBcc=!!n.keepBcc,n.filename&&(this.filename=n.filename,t||(t=s.detectMimeType(this.filename.split(".").pop()))),this.textEncoding=(n.textEncoding||"").toString().trim().charAt(0).toUpperCase(),this.parentNode=n.parentNode,this.hostname=n.hostname,this.newline=n.newline,this.childNodes=[],this._nodeId=++this.rootNode.nodeCounter,this._headers=[],this._isPlainText=!1,this._hasLongLines=!1,this._envelope=!1,this._raw=!1,this._transforms=[],this._processFuncs=[],t&&this.setHeader("Content-Type",t)}createChild(e,t){t||"object"!=typeof e||(t=e,e=void 0);let n=new g(e,t);return this.appendChild(n),n}appendChild(e){return e.rootNode!==this.rootNode&&(e.rootNode=this.rootNode,e._nodeId=++this.rootNode.nodeCounter),e.parentNode=this,this.childNodes.push(e),e}replace(e){return e===this?this:(this.parentNode.childNodes.forEach(((t,n)=>{t===this&&(e.rootNode=this.rootNode,e.parentNode=this.parentNode,e._nodeId=this._nodeId,this.rootNode=this,this.parentNode=void 0,e.parentNode.childNodes[n]=e)})),e)}remove(){if(!this.parentNode)return this;for(let e=this.parentNode.childNodes.length-1;e>=0;e--)if(this.parentNode.childNodes[e]===this)return this.parentNode.childNodes.splice(e,1),this.parentNode=void 0,this.rootNode=this,this}setHeader(e,t){let n,i=!1;if(!t&&e&&"object"==typeof e)return e.key&&"value"in e?this.setHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.setHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.setHeader(t,e[t])})),this;n={key:e=this._normalizeHeaderKey(e),value:t};for(let t=0,r=this._headers.length;t<r;t++)this._headers[t].key===e&&(i?(this._headers.splice(t,1),t--,r--):(this._headers[t]=n,i=!0));return i||this._headers.push(n),this}addHeader(e,t){return!t&&e&&"object"==typeof e?(e.key&&e.value?this.addHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.addHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.addHeader(t,e[t])})),this):Array.isArray(t)?(t.forEach((t=>{this.addHeader(e,t)})),this):(this._headers.push({key:this._normalizeHeaderKey(e),value:t}),this)}getHeader(e){e=this._normalizeHeaderKey(e);for(let t=0,n=this._headers.length;t<n;t++)if(this._headers[t].key===e)return this._headers[t].value}setContent(e){return this.content=e,"function"==typeof this.content.pipe?(this._contentErrorHandler=e=>{this.content.removeListener("error",this._contentErrorHandler),this.content=e},this.content.once("error",this._contentErrorHandler)):"string"==typeof this.content&&(this._isPlainText=s.isPlainText(this.content),this._isPlainText&&s.hasLongerLines(this.content,76)&&(this._hasLongLines=!0)),this}build(e){let t;e||(t=new Promise(((t,n)=>{e=o.callbackPromise(t,n)})));let n=this.createReadStream(),i=[],r=0,s=!1;return n.on("readable",(()=>{let e;for(;null!==(e=n.read());)i.push(e),r+=e.length})),n.once("error",(t=>{if(!s)return s=!0,e(t)})),n.once("end",(t=>{if(!s)return s=!0,t&&t.length&&(i.push(t),r+=t.length),e(null,Buffer.concat(i,r))})),t}getTransferEncoding(){let e=!1,t=(this.getHeader("Content-Type")||"").toString().toLowerCase().trim();return this.content&&(e=(this.getHeader("Content-Transfer-Encoding")||"").toString().toLowerCase().trim(),e&&["base64","quoted-printable"].includes(e)||(/^text\//i.test(t)?e=this._isPlainText&&!this._hasLongLines?"7bit":"string"==typeof this.content||this.content instanceof Buffer?"Q"===this._getTextEncoding(this.content)?"quoted-printable":"base64":"B"===this.textEncoding?"base64":"quoted-printable":/^(multipart|message)\//i.test(t)||(e=e||"base64"))),e}buildHeaders(){let e=this.getTransferEncoding(),t=[];if(e&&this.setHeader("Content-Transfer-Encoding",e),this.filename&&!this.getHeader("Content-Disposition")&&this.setHeader("Content-Disposition","attachment"),this.rootNode===this){this.getHeader("Date")||this.setHeader("Date",this.date.toUTCString().replace(/GMT/,"+0000")),this.messageId(),this.getHeader("MIME-Version")||this.setHeader("MIME-Version","1.0");for(let e=this._headers.length-2;e>=0;e--){let t=this._headers[e];"Content-Type"===t.key&&(this._headers.splice(e,1),this._headers.push(t))}}return this._headers.forEach((e=>{let n,i,r=e.key,o=e.value,a={};if(!o||"object"!=typeof o||["From","Sender","To","Cc","Bcc","Reply-To","Date","References"].includes(r)||(Object.keys(o).forEach((e=>{"value"!==e&&(a[e]=o[e])})),o=(o.value||"").toString(),o.trim()))if(a.prepared)a.foldLines?t.push(s.foldLines(r+": "+o)):t.push(r+": "+o);else{switch(e.key){case"Content-Disposition":n=s.parseHeaderValue(o),this.filename&&(n.params.filename=this.filename),o=s.buildHeaderValue(n);break;case"Content-Type":n=s.parseHeaderValue(o),this._handleContentType(n),n.value.match(/^text\/plain\b/)&&"string"==typeof this.content&&/[\u0080-\uFFFF]/.test(this.content)&&(n.params.charset="utf-8"),o=s.buildHeaderValue(n),this.filename&&(i=this._encodeWords(this.filename),(i!==this.filename||/[\s'"\\;:/=(),<>@[\]?]|^-/.test(i))&&(i='"'+i+'"'),o+="; name="+i);break;case"Bcc":if(!this.keepBcc)return}if(o=this._encodeHeaderValue(r,o),(o||"").toString().trim()){if("function"==typeof this.normalizeHeaderKey){let e=this.normalizeHeaderKey(r,o);e&&"string"==typeof e&&e.length&&(r=e)}t.push(s.foldLines(r+": "+o,76))}}})),t.join("\r\n")}createReadStream(e){let t,n=new i(e=e||{}),r=n;this.stream(n,e,(e=>{e?r.emit("error",e):n.end()}));for(let e=0,n=this._transforms.length;e<n;e++)t="function"==typeof this._transforms[e]?this._transforms[e]():this._transforms[e],r.once("error",(e=>{t.emit("error",e)})),r=r.pipe(t);t=new d,r.once("error",(e=>{t.emit("error",e)})),r=r.pipe(t);for(let e=0,n=this._processFuncs.length;e<n;e++)t=this._processFuncs[e],r=t(r);if(this.newline){const e=["win","windows","dos","\r\n"].includes(this.newline.toString().toLowerCase())?new h:new f,t=r.pipe(e);return r.on("error",(e=>t.emit("error",e))),t}return r}transform(e){this._transforms.push(e)}processFunc(e){this._processFuncs.push(e)}stream(e,t,n){let i,r,o=this.getTransferEncoding(),s=!1,c=e=>{s||(s=!0,n(e))},u=()=>{let n=0,i=()=>{if(n>=this.childNodes.length)return e.write("\r\n--"+this.boundary+"--\r\n"),c();let r=this.childNodes[n++];e.write((n>1?"\r\n":"")+"--"+this.boundary+"\r\n"),r.stream(e,t,(e=>{if(e)return c(e);setImmediate(i)}))};if(!this.multipart)return c();setImmediate(i)},p=()=>{if(!this.content)return setImmediate(u);{if("[object Error]"===Object.prototype.toString.call(this.content))return c(this.content);"function"==typeof this.content.pipe&&(this.content.removeListener("error",this._contentErrorHandler),this._contentErrorHandler=e=>c(e),this.content.once("error",this._contentErrorHandler));let n=()=>{["quoted-printable","base64"].includes(o)?(i=new("base64"===o?l:a).Encoder(t),i.pipe(e,{end:!1}),i.once("end",u),i.once("error",(e=>c(e))),r=this._getStream(this.content),r.pipe(i)):(r=this._getStream(this.content),r.pipe(e,{end:!1}),r.once("end",u)),r.once("error",(e=>c(e)))};if(this.content._resolve){let e=[],t=0,i=!1,r=this._getStream(this.content);r.on("error",(e=>{i||(i=!0,c(e))})),r.on("readable",(()=>{let n;for(;null!==(n=r.read());)e.push(n),t+=n.length})),r.on("end",(()=>{i||(i=!0,this.content._resolve=!1,this.content._resolvedValue=Buffer.concat(e,t),setImmediate(n))}))}else setImmediate(n)}};this._raw?setImmediate((()=>{if("[object Error]"===Object.prototype.toString.call(this._raw))return c(this._raw);"function"==typeof this._raw.pipe&&this._raw.removeListener("error",this._contentErrorHandler);let t=this._getStream(this._raw);t.pipe(e,{end:!1}),t.on("error",(t=>e.emit("error",t))),t.on("end",u)})):(e.write(this.buildHeaders()+"\r\n\r\n"),setImmediate(p))}setEnvelope(e){let t;this._envelope={from:!1,to:[]},e.from&&(t=[],this._convertAddresses(this._parseAddresses(e.from),t),t=t.filter((e=>e&&e.address)),t.length&&t[0]&&(this._envelope.from=t[0].address)),["to","cc","bcc"].forEach((t=>{e[t]&&this._convertAddresses(this._parseAddresses(e[t]),this._envelope.to)})),this._envelope.to=this._envelope.to.map((e=>e.address)).filter((e=>e));let n=["to","cc","bcc","from"];return Object.keys(e).forEach((t=>{n.includes(t)||(this._envelope[t]=e[t])})),this}getAddresses(){let e={};return this._headers.forEach((t=>{let n=t.key.toLowerCase();["from","sender","reply-to","to","cc","bcc"].includes(n)&&(Array.isArray(e[n])||(e[n]=[]),this._convertAddresses(this._parseAddresses(t.value),e[n]))})),e}getEnvelope(){if(this._envelope)return this._envelope;let e={from:!1,to:[]};return this._headers.forEach((t=>{let n=[];"From"===t.key||!e.from&&["Reply-To","Sender"].includes(t.key)?(this._convertAddresses(this._parseAddresses(t.value),n),n.length&&n[0]&&(e.from=n[0].address)):["To","Cc","Bcc"].includes(t.key)&&this._convertAddresses(this._parseAddresses(t.value),e.to)})),e.to=e.to.map((e=>e.address)),e}messageId(){let e=this.getHeader("Message-ID");return e||(e=this._generateMessageId(),this.setHeader("Message-ID",e)),e}setRaw(e){return this._raw=e,this._raw&&"function"==typeof this._raw.pipe&&(this._contentErrorHandler=e=>{this._raw.removeListener("error",this._contentErrorHandler),this._raw=e},this._raw.once("error",this._contentErrorHandler)),this}_getStream(e){let n;return e._resolvedValue?(n=new i,setImmediate((()=>{try{n.end(e._resolvedValue)}catch(e){n.emit("error",e)}})),n):"function"==typeof e.pipe?e:e&&"string"==typeof e.path&&!e.href?this.disableFileAccess?(n=new i,setImmediate((()=>n.emit("error",new Error("File access rejected for "+e.path)))),n):t.createReadStream(e.path):e&&"string"==typeof e.href?this.disableUrlAccess?(n=new i,setImmediate((()=>n.emit("error",new Error("Url access rejected for "+e.href)))),n):p(e.href,{headers:e.httpHeaders}):(n=new i,setImmediate((()=>{try{n.end(e||"")}catch(e){n.emit("error",e)}})),n)}_parseAddresses(e){return[].concat.apply([],[].concat(e).map((e=>e&&e.address?(e.address=this._normalizeAddress(e.address),e.name=e.name||"",[e]):u(e))))}_normalizeHeaderKey(e){return e=(e||"").toString().replace(/\r?\n|\r/g," ").trim().toLowerCase().replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi,(e=>e.toUpperCase())).replace(/^Content-Features$/i,"Content-features"),e}_handleContentType(e){this.contentType=e.value.trim().toLowerCase(),this.multipart=!!/^multipart\//i.test(this.contentType)&&this.contentType.substr(this.contentType.indexOf("/")+1),this.multipart?this.boundary=e.params.boundary=e.params.boundary||this.boundary||this._generateBoundary():this.boundary=!1}_generateBoundary(){return this.rootNode.boundaryPrefix+"-"+this.rootNode.baseBoundary+"-Part_"+this._nodeId}_encodeHeaderValue(e,t){switch(e=this._normalizeHeaderKey(e)){case"From":case"Sender":case"To":case"Cc":case"Bcc":case"Reply-To":return this._convertAddresses(this._parseAddresses(t));case"Message-ID":case"In-Reply-To":case"Content-Id":return"<"!==(t=(t||"").toString().replace(/\r?\n|\r/g," ")).charAt(0)&&(t="<"+t),">"!==t.charAt(t.length-1)&&(t+=">"),t;case"References":return(t=[].concat.apply([],[].concat(t||"").map((e=>(e=(e||"").toString().replace(/\r?\n|\r/g," ").trim()).replace(/<[^>]*>/g,(e=>e.replace(/\s/g,""))).split(/\s+/)))).map((e=>("<"!==e.charAt(0)&&(e="<"+e),">"!==e.charAt(e.length-1)&&(e+=">"),e)))).join(" ").trim();case"Date":return"[object Date]"===Object.prototype.toString.call(t)?t.toUTCString().replace(/GMT/,"+0000"):(t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t));case"Content-Type":case"Content-Disposition":return(t||"").toString().replace(/\r?\n|\r/g," ");default:return t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t)}}_convertAddresses(e,t){let n=[];return t=t||[],[].concat(e||[]).forEach((e=>{if(e.address)e.address=this._normalizeAddress(e.address),e.name?e.name&&n.push(`${this._encodeAddressName(e.name)} <${e.address}>`):n.push(e.address.indexOf(" ")>=0?`<${e.address}>`:`${e.address}`),e.address&&(t.filter((t=>t.address===e.address)).length||t.push(e));else if(e.group){let i=(e.group.length?this._convertAddresses(e.group,t):"").trim();n.push(`${this._encodeAddressName(e.name)}:${i};`)}})),n.join(", ")}_normalizeAddress(e){let t=(e=(e||"").toString().replace(/[\x00-\x1F<>]+/g," ").trim()).lastIndexOf("@");if(t<0)return e;let i,r=e.substr(0,t),o=e.substr(t+1);try{i=n.toASCII(o.toLowerCase())}catch(e){}return r.indexOf(" ")>=0&&('"'!==r.charAt(0)&&(r='"'+r),'"'!==r.substr(-1)&&(r+='"')),`${r}@${i}`}_encodeAddressName(e){return/^[\w ]*$/.test(e)?e:/^[\x20-\x7e]*$/.test(e)?'"'+e.replace(/([\\"])/g,"\\$1")+'"':s.encodeWord(e,this._getTextEncoding(e),52)}_encodeWords(e){return s.encodeWords(e,this._getTextEncoding(e),52,!0)}_getTextEncoding(e){e=(e||"").toString();let t,n,i=this.textEncoding;return i||(n=(e.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g)||[]).length,t=(e.match(/[a-z]/gi)||[]).length,i=n<t?"Q":"B"),i}_generateMessageId(){return"<"+[2,2,2,6].reduce(((t,n)=>t+"-"+e.randomBytes(n).toString("hex")),e.randomBytes(4).toString("hex"))+"@"+(this.getEnvelope().from||this.hostname||"localhost").split("@").pop()+">"}}return _A=g}var HA,qA,VA,GA,WA,KA,YA,QA,JA,XA,ZA,eI,tI,nI,iI,rI,oI,sI={exports:{}};function aI(){if(HA)return sI.exports;HA=1;const e=NA(),t=zA(),n=m;function i(e,t,n){let i=new Set,o=new Set,s=new Map;(n||"").toLowerCase().split(":").forEach((e=>{o.add(e.trim())})),(t||"").toLowerCase().split(":").filter((e=>!o.has(e.trim()))).forEach((e=>{i.add(e.trim())}));for(let t=e.length-1;t>=0;t--){let n=e[t];i.has(n.key)&&!s.has(n.key)&&s.set(n.key,r(n.line))}let a=[],c=[];return i.forEach((e=>{s.has(e)&&(c.push(e),a.push(e+":"+s.get(e)))})),{headers:a.join("\r\n")+"\r\n",fieldNames:c.join(":")}}function r(e){return e.substr(e.indexOf(":")+1).replace(/\r?\n/g,"").replace(/\s+/g," ").trim()}return sI.exports=(o,s,a,c)=>{let l,u,p=i(o,(c=c||{}).headerFieldNames||"From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive",c.skipFields),d=function(n,i,r,o,s){let a=["v=1","a=rsa-"+o,"c=relaxed/relaxed","d="+e.toASCII(n),"q=dns/txt","s="+i,"bh="+s,"h="+r].join("; ");return t.foldLines("DKIM-Signature: "+a,76)+";\r\n b="}(c.domainName,c.keySelector,p.fieldNames,s,a);p.headers+="dkim-signature:"+r(d),l=n.createSign(("rsa-"+s).toUpperCase()),l.update(p.headers);try{u=l.sign(c.privateKey,"base64")}catch(e){return!1}return d+u.replace(/(^.{73}|.{75}(?!\r?\n|\r))/g,"$&\r\n ").trim()},sI.exports.relaxedHeaders=i,sI.exports}function cI(){if(VA)return qA;VA=1;const e=function(){if(PA)return TA;PA=1;const e=c.Transform;return TA=class extends e{constructor(e){super(e),this.lastBytes=Buffer.alloc(4),this.headersParsed=!1,this.headerBytes=0,this.headerChunks=[],this.rawHeaders=!1,this.bodySize=0}updateLastBytes(e){let t=this.lastBytes.length,n=Math.min(e.length,t);for(let e=0,i=t-n;e<i;e++)this.lastBytes[e]=this.lastBytes[e+n];for(let i=1;i<=n;i++)this.lastBytes[t-i]=e[e.length-i]}checkHeaders(e){if(this.headersParsed)return!0;let t=this.lastBytes.length,n=0;this.curLinePos=0;for(let i=0,r=this.lastBytes.length+e.length;i<r;i++){let r;if(r=i<t?this.lastBytes[i]:e[i-t],10===r&&i){let r=i-1<t?this.lastBytes[i-1]:e[i-1-t],o=i>1&&(i-2<t?this.lastBytes[i-2]:e[i-2-t]);if(10===r){this.headersParsed=!0,n=i-t+1,this.headerBytes+=n;break}if(13===r&&10===o){this.headersParsed=!0,n=i-t+1,this.headerBytes+=n;break}}}if(this.headersParsed){if(this.headerChunks.push(e.slice(0,n)),this.rawHeaders=Buffer.concat(this.headerChunks,this.headerBytes),this.headerChunks=null,this.emit("headers",this.parseHeaders()),e.length-1>n){let t=e.slice(n);this.bodySize+=t.length,setImmediate((()=>this.push(t)))}return!1}return this.headerBytes+=e.length,this.headerChunks.push(e),this.updateLastBytes(e),!1}_transform(e,t,n){if(!e||!e.length)return n();let i;"string"==typeof e&&(e=Buffer.from(e,t));try{i=this.checkHeaders(e)}catch(e){return n(e)}i&&(this.bodySize+=e.length,this.push(e)),setImmediate(n)}_flush(e){if(this.headerChunks){let e=Buffer.concat(this.headerChunks,this.headerBytes);this.bodySize+=e.length,this.push(e),this.headerChunks=null}e()}parseHeaders(){let e=(this.rawHeaders||"").toString().split(/\r?\n/);for(let t=e.length-1;t>0;t--)/^\s/.test(e[t])&&(e[t-1]+="\n"+e[t],e.splice(t,1));return e.filter((e=>e.trim())).map((e=>({key:e.substr(0,e.indexOf(":")).trim().toLowerCase(),line:e})))}},TA}(),t=function(){if(IA)return AA;IA=1;const e=c.Transform,t=m;return AA=class extends e{constructor(e){super(),e=e||{},this.chunkBuffer=[],this.chunkBufferLen=0,this.bodyHash=t.createHash(e.hashAlgo||"sha1"),this.remainder="",this.byteLength=0,this.debug=e.debug,this._debugBody=!!e.debug&&[]}updateHash(e){let t,n="",i="file";for(let t=e.length-1;t>=0;t--){let r=e[t];if("file"!==i||10!==r&&13!==r)if("file"!==i||9!==r&&32!==r){if(("line"!==i||9!==r&&32!==r)&&("file"===i||"line"===i)&&(i="body",t===e.length-1))break}else i="line";if(0===t){if("file"===i&&(!this.remainder||/[\r\n]$/.test(this.remainder))||"line"===i&&(!this.remainder||/[ \t]$/.test(this.remainder)))return void(this.remainder+=e.toString("binary"));if("line"===i||"file"===i){n=e.toString("binary"),e=!1;break}}if("body"===i){n=e.slice(t+1).toString("binary"),e=e.slice(0,t+1);break}}let r=!!this.remainder;if(e&&!r)for(let t=0,n=e.length;t<n;t++){if(t&&10===e[t]&&13!==e[t-1]){r=!0;break}if(t&&13===e[t]&&32===e[t-1]){r=!0;break}if(t&&32===e[t]&&32===e[t-1]){r=!0;break}if(9===e[t]){r=!0;break}}r?(t=this.remainder+(e?e.toString("binary"):""),this.remainder=n,t=t.replace(/\r?\n/g,"\n").replace(/[ \t]*$/gm,"").replace(/[ \t]+/gm," ").replace(/\n/g,"\r\n"),e=Buffer.from(t,"binary")):n&&(this.remainder=n),this.debug&&this._debugBody.push(e),this.bodyHash.update(e)}_transform(e,t,n){if(!e||!e.length)return n();"string"==typeof e&&(e=Buffer.from(e,t)),this.updateHash(e),this.byteLength+=e.length,this.push(e),n()}_flush(e){/[\r\n]$/.test(this.remainder)&&this.byteLength>2&&this.bodyHash.update(Buffer.from("\r\n")),this.byteLength||this.push(Buffer.from("\r\n")),this.emit("hash",this.bodyHash.digest("base64"),!!this.debug&&Buffer.concat(this._debugBody)),e()}},AA}(),n=aI(),i=c.PassThrough,o=r,s=d,a=m;class l{constructor(e,t,n,i){this.options=e||{},this.keys=t,this.cacheTreshold=Number(this.options.cacheTreshold)||131072,this.hashAlgo=this.options.hashAlgo||"sha256",this.cacheDir=this.options.cacheDir||!1,this.chunks=[],this.chunklen=0,this.readPos=0,this.cachePath=!!this.cacheDir&&s.join(this.cacheDir,"message."+Date.now()+"-"+a.randomBytes(14).toString("hex")),this.cache=!1,this.headers=!1,this.bodyHash=!1,this.parser=!1,this.relaxedBody=!1,this.input=n,this.output=i,this.output.usingCache=!1,this.hasErrored=!1,this.input.on("error",(e=>{this.hasErrored=!0,this.cleanup(),i.emit("error",e)}))}cleanup(){this.cache&&this.cachePath&&o.unlink(this.cachePath,(()=>!1))}createReadCache(){this.cache=o.createReadStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.output.emit("error",e)})),this.cache.once("close",(()=>{this.cleanup()})),this.cache.pipe(this.output)}sendNextChunk(){if(this.hasErrored)return;if(this.readPos>=this.chunks.length)return this.cache?this.createReadCache():this.output.end();let e=this.chunks[this.readPos++];if(!1===this.output.write(e))return this.output.once("drain",(()=>{this.sendNextChunk()}));setImmediate((()=>this.sendNextChunk()))}sendSignedOutput(){let e=0,t=()=>{if(e>=this.keys.length)return this.output.write(this.parser.rawHeaders),setImmediate((()=>this.sendNextChunk()));let i=this.keys[e++],r=n(this.headers,this.hashAlgo,this.bodyHash,{domainName:i.domainName,keySelector:i.keySelector,privateKey:i.privateKey,headerFieldNames:this.options.headerFieldNames,skipFields:this.options.skipFields});return r&&this.output.write(Buffer.from(r+"\r\n")),setImmediate(t)};if(this.bodyHash&&this.headers)return t();this.output.write(this.parser.rawHeaders),this.sendNextChunk()}createWriteCache(){this.output.usingCache=!0,this.cache=o.createWriteStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.relaxedBody.unpipe(this.cache),this.relaxedBody.on("readable",(()=>{for(;null!==this.relaxedBody.read(););})),this.hasErrored=!0,this.output.emit("error",e)})),this.cache.once("close",(()=>{this.sendSignedOutput()})),this.relaxedBody.removeAllListeners("readable"),this.relaxedBody.pipe(this.cache)}signStream(){this.parser=new e,this.relaxedBody=new t({hashAlgo:this.hashAlgo}),this.parser.on("headers",(e=>{this.headers=e})),this.relaxedBody.on("hash",(e=>{this.bodyHash=e})),this.relaxedBody.on("readable",(()=>{let e;if(!this.cache)for(;null!==(e=this.relaxedBody.read());)if(this.chunks.push(e),this.chunklen+=e.length,this.chunklen>=this.cacheTreshold&&this.cachePath)return this.createWriteCache()})),this.relaxedBody.on("end",(()=>{this.cache||this.sendSignedOutput()})),this.parser.pipe(this.relaxedBody),setImmediate((()=>this.input.pipe(this.parser)))}}return qA=class{constructor(e){this.options=e||{},this.keys=[].concat(this.options.keys||{domainName:e.domainName,keySelector:e.keySelector,privateKey:e.privateKey})}sign(e,t){let n=new i,r=e,o=!1;Buffer.isBuffer(e)?(o=e,r=new i):"string"==typeof e&&(o=Buffer.from(e),r=new i);let s=this.options;t&&Object.keys(t).length&&(s={},Object.keys(this.options||{}).forEach((e=>{s[e]=this.options[e]})),Object.keys(t||{}).forEach((e=>{e in s||(s[e]=t[e])})));let a=new l(s,this.keys,r,n);return setImmediate((()=>{a.signStream(),o&&setImmediate((()=>{r.end(o)}))})),n}}}function lI(){if(JA)return QA;JA=1;const e=t,r=jA(),o=$A(),s=function(){if(kA)return CA;kA=1;const e=BA(),t=zA(),n=jA().parseDataURI;return CA=class{constructor(e){this.mail=e||{},this.message=!1}compile(){return this._alternatives=this.getAlternatives(),this._htmlNode=this._alternatives.filter((e=>/^text\/html\b/i.test(e.contentType))).pop(),this._attachments=this.getAttachments(!!this._htmlNode),this._useRelated=!(!this._htmlNode||!this._attachments.related.length),this._useAlternative=this._alternatives.length>1,this._useMixed=this._attachments.attached.length>1||this._alternatives.length&&1===this._attachments.attached.length,this.mail.raw?this.message=new e("message/rfc822",{newline:this.mail.newline}).setRaw(this.mail.raw):this._useMixed?this.message=this._createMixed():this._useAlternative?this.message=this._createAlternative():this._useRelated?this.message=this._createRelated():this.message=this._createContentNode(!1,[].concat(this._alternatives||[]).concat(this._attachments.attached||[]).shift()||{contentType:"text/plain",content:""}),this.mail.headers&&this.message.addHeader(this.mail.headers),["from","sender","to","cc","bcc","reply-to","in-reply-to","references","subject","message-id","date"].forEach((e=>{let t=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()));this.mail[t]&&this.message.setHeader(e,this.mail[t])})),this.mail.envelope&&this.message.setEnvelope(this.mail.envelope),this.message.messageId(),this.message}getAttachments(e){let n,i,r=[].concat(this.mail.attachments||[]).map(((e,n)=>{let i,r=/^message\//i.test(e.contentType);/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e));let o=e.contentType||t.detectMimeType(e.filename||e.path||e.href||"bin"),s=/^image\//i.test(o);return i={contentType:o,contentDisposition:e.contentDisposition||(r||s&&e.cid?"inline":"attachment"),contentTransferEncoding:"contentTransferEncoding"in e?e.contentTransferEncoding:"base64"},e.filename?i.filename=e.filename:r||!1===e.filename||(i.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(n+1),i.filename.indexOf(".")<0&&(i.filename+="."+t.detectExtension(i.contentType))),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.cid&&(i.cid=e.cid),e.raw?i.raw=e.raw:e.path?i.content={path:e.path}:e.href?i.content={href:e.href,httpHeaders:e.httpHeaders}:i.content=e.content||"",e.encoding&&(i.encoding=e.encoding),e.headers&&(i.headers=e.headers),i}));return this.mail.icalEvent&&(n="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},i={},Object.keys(n).forEach((e=>{i[e]=n[e]})),i.contentType="application/ics",i.headers||(i.headers={}),i.filename=i.filename||"invite.ics",i.headers["Content-Disposition"]="attachment",i.headers["Content-Transfer-Encoding"]="base64"),e?{attached:r.filter((e=>!e.cid)).concat(i||[]),related:r.filter((e=>!!e.cid))}:{attached:r.concat(i||[]),related:[]}}getAlternatives(){let e,n,i,r,o,s,a=[];return this.mail.text&&(e="object"==typeof this.mail.text&&(this.mail.text.content||this.mail.text.path||this.mail.text.href||this.mail.text.raw)?this.mail.text:{content:this.mail.text},e.contentType="text/plain; charset=utf-8"),this.mail.watchHtml&&(i="object"==typeof this.mail.watchHtml&&(this.mail.watchHtml.content||this.mail.watchHtml.path||this.mail.watchHtml.href||this.mail.watchHtml.raw)?this.mail.watchHtml:{content:this.mail.watchHtml},i.contentType="text/watch-html; charset=utf-8"),this.mail.amp&&(r="object"==typeof this.mail.amp&&(this.mail.amp.content||this.mail.amp.path||this.mail.amp.href||this.mail.amp.raw)?this.mail.amp:{content:this.mail.amp},r.contentType="text/x-amp-html; charset=utf-8"),this.mail.icalEvent&&(o="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},s={},Object.keys(o).forEach((e=>{s[e]=o[e]})),s.content&&"object"==typeof s.content&&(s.content._resolve=!0),s.filename=!1,s.contentType="text/calendar; charset=utf-8; method="+(s.method||"PUBLISH").toString().trim().toUpperCase(),s.headers||(s.headers={})),this.mail.html&&(n="object"==typeof this.mail.html&&(this.mail.html.content||this.mail.html.path||this.mail.html.href||this.mail.html.raw)?this.mail.html:{content:this.mail.html},n.contentType="text/html; charset=utf-8"),[].concat(e||[]).concat(i||[]).concat(r||[]).concat(n||[]).concat(s||[]).concat(this.mail.alternatives||[]).forEach((e=>{let n;/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e)),n={contentType:e.contentType||t.detectMimeType(e.filename||e.path||e.href||"txt"),contentTransferEncoding:e.contentTransferEncoding},e.filename&&(n.filename=e.filename),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.raw?n.raw=e.raw:e.path?n.content={path:e.path}:e.href?n.content={href:e.href}:n.content=e.content||"",e.encoding&&(n.encoding=e.encoding),e.headers&&(n.headers=e.headers),a.push(n)})),a}_createMixed(t){let n;return n=t?t.createChild("multipart/mixed",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/mixed",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._useAlternative?this._createAlternative(n):this._useRelated&&this._createRelated(n),[].concat(!this._useAlternative&&this._alternatives||[]).concat(this._attachments.attached||[]).forEach((e=>{this._useRelated&&e===this._htmlNode||this._createContentNode(n,e)})),n}_createAlternative(t){let n;return n=t?t.createChild("multipart/alternative",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/alternative",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._alternatives.forEach((e=>{this._useRelated&&this._htmlNode===e?this._createRelated(n):this._createContentNode(n,e)})),n}_createRelated(t){let n;return n=t?t.createChild('multipart/related; type="text/html"',{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e('multipart/related; type="text/html"',{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._createContentNode(n,this._htmlNode),this._attachments.related.forEach((e=>this._createContentNode(n,e))),n}_createContentNode(t,n){let i;(n=n||{}).content=n.content||"";let r=(n.encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");return i=t?t.createChild(n.contentType,{filename:n.filename,textEncoding:this.mail.textEncoding,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e(n.contentType,{filename:n.filename,baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),n.headers&&i.addHeader(n.headers),n.cid&&i.setHeader("Content-Id","<"+n.cid.replace(/[<>]/g,"")+">"),n.contentTransferEncoding?i.setHeader("Content-Transfer-Encoding",n.contentTransferEncoding):this.mail.encoding&&/^text\//i.test(n.contentType)&&i.setHeader("Content-Transfer-Encoding",this.mail.encoding),/^text\//i.test(n.contentType)&&!n.contentDisposition||i.setHeader("Content-Disposition",n.contentDisposition||(n.cid&&/^image\//i.test(n.contentType)?"inline":"attachment")),"string"!=typeof n.content||["utf8","usascii","ascii"].includes(r)||(n.content=Buffer.from(n.content,r)),n.raw?i.setRaw(n.raw):i.setContent(n.content),i}_processDataUrl(e){let t;return(e.path||e.href).match(/^data:/)&&(t=n(e.path||e.href)),t?(e.content=t.data,e.contentType=e.contentType||t.contentType,"path"in e&&(e.path=!1),"href"in e&&(e.href=!1),e):e}},CA}(),a=cI(),c=function(){if(WA)return GA;WA=1;const e=l,t=h,i=n;return GA=function n(r,o,s,a){let c,l,u,p=i.parse(r);c={host:p.hostname,port:Number(p.port)?Number(p.port):"https:"===p.protocol?443:80},"https:"===p.protocol?(c.rejectUnauthorized=!1,l=t.connect.bind(t)):l=e.connect.bind(e);let d=!1,m=e=>{if(!d){d=!0;try{u.destroy()}catch(e){}a(e)}},h=()=>{let e=new Error("Proxy socket timed out");e.code="ETIMEDOUT",m(e)};u=l(c,(()=>{if(d)return;let e={Host:s+":"+o,Connection:"close"};p.auth&&(e["Proxy-Authorization"]="Basic "+Buffer.from(p.auth).toString("base64")),u.write("CONNECT "+s+":"+o+" HTTP/1.1\r\n"+Object.keys(e).map((t=>t+": "+e[t])).join("\r\n")+"\r\n\r\n");let t="",n=e=>{let i,r;if(!d&&(t+=e.toString("binary"),i=t.match(/\r\n\r\n/))){if(u.removeListener("data",n),r=t.substr(i.index+i[0].length),t=t.substr(0,i.index),r&&u.unshift(Buffer.from(r,"binary")),d=!0,i=t.match(/^HTTP\/\d+\.\d+ (\d+)/i),!i||"2"!==(i[1]||"").charAt(0)){try{u.destroy()}catch(e){}return a(new Error("Invalid response from proxy"+(i&&": "+i[1]||"")))}return u.removeListener("error",m),u.removeListener("timeout",h),u.setTimeout(0),a(null,u)}};u.on("data",n)})),u.setTimeout(n.timeout||3e4),u.on("timeout",h),u.once("error",m)},GA}(),p=i,d=n,f=RA,g=function(){if(YA)return KA;YA=1;const e=jA(),t=BA(),n=zA();return KA=class{constructor(e,t){this.mailer=e,this.data={},this.message=null,t=t||{};let n=e.options||{},i=e._defaults||{};Object.keys(t).forEach((e=>{this.data[e]=t[e]})),this.data.headers=this.data.headers||{},Object.keys(i).forEach((e=>{e in this.data?"headers"===e&&Object.keys(i.headers).forEach((e=>{e in this.data.headers||(this.data.headers[e]=i.headers[e])})):this.data[e]=i[e]})),["disableFileAccess","disableUrlAccess","normalizeHeaderKey"].forEach((e=>{e in n&&(this.data[e]=n[e])}))}resolveContent(...t){return e.resolveContent(...t)}resolveAll(i){let r=[[this.data,"html"],[this.data,"text"],[this.data,"watchHtml"],[this.data,"amp"],[this.data,"icalEvent"]];this.data.alternatives&&this.data.alternatives.length&&this.data.alternatives.forEach(((e,t)=>{r.push([this.data.alternatives,t])})),this.data.attachments&&this.data.attachments.length&&this.data.attachments.forEach(((e,t)=>{e.filename||(e.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(t+1),e.filename.indexOf(".")<0&&(e.filename+="."+n.detectExtension(e.contentType))),e.contentType||(e.contentType=n.detectMimeType(e.filename||e.path||e.href||"bin")),r.push([this.data.attachments,t])}));let o=new t;["from","to","cc","bcc","sender","replyTo"].forEach((e=>{let t;this.message?t=[].concat(o._parseAddresses(this.message.getHeader("replyTo"===e?"reply-to":e))||[]):this.data[e]&&(t=[].concat(o._parseAddresses(this.data[e])||[])),t&&t.length?this.data[e]=t:e in this.data&&(this.data[e]=null)})),["from","sender"].forEach((e=>{this.data[e]&&(this.data[e]=this.data[e].shift())}));let s=0,a=()=>{if(s>=r.length)return i(null,this.data);let t=r[s++];if(!t[0]||!t[0][t[1]])return a();e.resolveContent(...t,((e,n)=>{if(e)return i(e);let r={content:n};t[0][t[1]]&&"object"==typeof t[0][t[1]]&&!Buffer.isBuffer(t[0][t[1]])&&Object.keys(t[0][t[1]]).forEach((e=>{e in r||["content","path","href","raw"].includes(e)||(r[e]=t[0][t[1]][e])})),t[0][t[1]]=r,a()}))};setImmediate((()=>a()))}normalize(e){let t=this.data.envelope||this.message.getEnvelope(),n=this.message.messageId();this.resolveAll(((i,r)=>i?e(i):(r.envelope=t,r.messageId=n,["html","text","watchHtml","amp"].forEach((e=>{r[e]&&r[e].content&&("string"==typeof r[e].content?r[e]=r[e].content:Buffer.isBuffer(r[e].content)&&(r[e]=r[e].content.toString()))})),r.icalEvent&&Buffer.isBuffer(r.icalEvent.content)&&(r.icalEvent.content=r.icalEvent.content.toString("base64"),r.icalEvent.encoding="base64"),r.alternatives&&r.alternatives.length&&r.alternatives.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),r.attachments&&r.attachments.length&&r.attachments.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),r.normalizedHeaders={},Object.keys(r.headers||{}).forEach((e=>{let t=[].concat(r.headers[e]||[]).shift();t=t&&t.value||t,t&&(["references","in-reply-to","message-id","content-id"].includes(e)&&(t=this.message._encodeHeaderValue(e,t)),r.normalizedHeaders[e]=t)})),r.list&&"object"==typeof r.list&&this._getListHeaders(r.list).forEach((e=>{r.normalizedHeaders[e.key]=e.value.map((e=>e&&e.value||e)).join(", ")})),r.references&&(r.normalizedHeaders.references=this.message._encodeHeaderValue("references",r.references)),r.inReplyTo&&(r.normalizedHeaders["in-reply-to"]=this.message._encodeHeaderValue("in-reply-to",r.inReplyTo)),e(null,r))))}setMailerHeader(){this.message&&this.data.xMailer&&this.message.setHeader("X-Mailer",this.data.xMailer)}setPriorityHeaders(){if(this.message&&this.data.priority)switch((this.data.priority||"").toString().toLowerCase()){case"high":this.message.setHeader("X-Priority","1 (Highest)"),this.message.setHeader("X-MSMail-Priority","High"),this.message.setHeader("Importance","High");break;case"low":this.message.setHeader("X-Priority","5 (Lowest)"),this.message.setHeader("X-MSMail-Priority","Low"),this.message.setHeader("Importance","Low")}}setListHeaders(){this.message&&this.data.list&&"object"==typeof this.data.list&&this.data.list&&"object"==typeof this.data.list&&this._getListHeaders(this.data.list).forEach((e=>{e.value.forEach((t=>{this.message.addHeader(e.key,t)}))}))}_getListHeaders(e){return Object.keys(e).map((t=>({key:"list-"+t.toLowerCase().trim(),value:[].concat(e[t]||[]).map((e=>({prepared:!0,foldLines:!0,value:[].concat(e||[]).map((e=>{if("string"==typeof e&&(e={url:e}),e&&e.url){if("id"===t.toLowerCase().trim()){let t=e.comment||"";return t=n.isPlainText(t)?'"'+t+'"':n.encodeWord(t),(e.comment?t+" ":"")+this._formatListUrl(e.url).replace(/^<[^:]+\/{,2}/,"")}let i=e.comment||"";return n.isPlainText(i)||(i=n.encodeWord(i)),this._formatListUrl(e.url)+(e.comment?" ("+i+")":"")}return""})).filter((e=>e)).join(", ")})))})))}_formatListUrl(e){return e=e.replace(/[\s<]+|[\s>]+/g,""),/^(https?|mailto|ftp):/.test(e)?"<"+e+">":/^[^@]+@[^@]+$/.test(e)?"<mailto:"+e+">":"<http://"+e+">"}},KA}(),y=l,v=u,b=m;return QA=class extends e{constructor(e,t,n){super(),this.options=t||{},this._defaults=n||{},this._defaultPlugins={compile:[(...e)=>this._convertDataImages(...e)],stream:[]},this._userPlugins={compile:[],stream:[]},this.meta=new Map,this.dkim=!!this.options.dkim&&new a(this.options.dkim),this.transporter=e,this.transporter.mailer=this,this.logger=r.getLogger(this.options,{component:this.options.component||"mail"}),this.logger.debug({tnx:"create"},"Creating transport: %s",this.getVersionString()),"function"==typeof this.transporter.on&&(this.transporter.on("log",(e=>{this.logger.debug({tnx:"transport"},"%s: %s",e.type,e.message)})),this.transporter.on("error",(e=>{this.logger.error({err:e,tnx:"transport"},"Transport Error: %s",e.message),this.emit("error",e)})),this.transporter.on("idle",((...e)=>{this.emit("idle",...e)}))),["close","isIdle","verify"].forEach((e=>{this[e]=(...t)=>"function"==typeof this.transporter[e]?("verify"===e&&"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1),this.transporter[e](...t)):(this.logger.warn({tnx:"transport",methodName:e},"Non existing method %s called for transport",e),!1)})),this.options.proxy&&"string"==typeof this.options.proxy&&this.setupProxy(this.options.proxy)}use(e,t){return e=(e||"").toString(),this._userPlugins.hasOwnProperty(e)?this._userPlugins[e].push(t):this._userPlugins[e]=[t],this}sendMail(e,t=null){let n;t||(n=new Promise(((e,n)=>{t=r.callbackPromise(e,n)}))),"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1);let i=new g(this,e);return this.logger.debug({tnx:"transport",name:this.transporter.name,version:this.transporter.version,action:"send"},"Sending mail using %s/%s",this.transporter.name,this.transporter.version),this._processPlugins("compile",i,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"compile"},"PluginCompile Error: %s",e.message),t(e);i.message=new s(i.data).compile(),i.setMailerHeader(),i.setPriorityHeaders(),i.setListHeaders(),this._processPlugins("stream",i,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"stream"},"PluginStream Error: %s",e.message),t(e);(i.data.dkim||this.dkim)&&i.message.processFunc((e=>{let t=i.data.dkim?new a(i.data.dkim):this.dkim;return this.logger.debug({tnx:"DKIM",messageId:i.message.messageId(),dkimDomains:t.keys.map((e=>e.keySelector+"."+e.domainName)).join(", ")},"Signing outgoing message with %s keys",t.keys.length),t.sign(e,i.data._dkim)})),this.transporter.send(i,((...e)=>{e[0]&&this.logger.error({err:e[0],tnx:"transport",action:"send"},"Send Error: %s",e[0].message),t(...e)}))}))})),n}getVersionString(){return p.format("%s (%s; +%s; %s/%s)",f.name,f.version,f.homepage,this.transporter.name,this.transporter.version)}_processPlugins(e,t,n){if(e=(e||"").toString(),!this._userPlugins.hasOwnProperty(e))return n();let i=this._userPlugins[e]||[],r=this._defaultPlugins[e]||[];if(i.length&&this.logger.debug({tnx:"transaction",pluginCount:i.length,step:e},"Using %s plugins for %s",i.length,e),i.length+r.length===0)return n();let o=0,s="default",a=()=>{let e="default"===s?r:i;if(o>=e.length){if("default"!==s||!i.length)return n();s="user",o=0,e=i}(0,e[o++])(t,(e=>{if(e)return n(e);a()}))};a()}setupProxy(e){let t=d.parse(e);this.getSocket=(e,n)=>{let i=t.protocol.replace(/:$/,"").toLowerCase();if(this.meta.has("proxy_handler_"+i))return this.meta.get("proxy_handler_"+i)(t,e,n);switch(i){case"http":case"https":return void c(t.href,e.port,e.host,((e,t)=>e?n(e):n(null,{connection:t})));case"socks":case"socks5":case"socks4":case"socks4a":{if(!this.meta.has("proxy_socks_module"))return n(new Error("Socks module not loaded"));let i=i=>{let r=!!this.meta.get("proxy_socks_module").SocksClient,o=r?this.meta.get("proxy_socks_module").SocksClient:this.meta.get("proxy_socks_module"),s=Number(t.protocol.replace(/\D/g,""))||5,a={proxy:{ipaddress:i,port:Number(t.port),type:s},[r?"destination":"target"]:{host:e.host,port:e.port},command:"connect"};if(t.auth){let e=decodeURIComponent(t.auth.split(":").shift()),n=decodeURIComponent(t.auth.split(":").pop());r?(a.proxy.userId=e,a.proxy.password=n):4===s?a.userid=e:a.authentication={username:e,password:n}}o.createConnection(a,((e,t)=>e?n(e):n(null,{connection:t.socket||t})))};return y.isIP(t.hostname)?i(t.hostname):v.resolve(t.hostname,((e,t)=>{if(e)return n(e);i(Array.isArray(t)?t[0]:t)}))}}n(new Error("Unknown proxy configuration"))}}_convertDataImages(e,t){if(!this.options.attachDataUrls&&!e.data.attachDataUrls||!e.data.html)return t();e.resolveContent(e.data,"html",((n,i)=>{if(n)return t(n);let r=0;i=(i||"").toString().replace(/(<img\b[^<>]{0,1024} src\s{0,20}=[\s"']{0,20})(data:([^;]+);[^"'>\s]+)/gi,((t,n,i,s)=>{let a=b.randomBytes(10).toString("hex")+"@localhost";return e.data.attachments||(e.data.attachments=[]),Array.isArray(e.data.attachments)||(e.data.attachments=[].concat(e.data.attachments||[])),e.data.attachments.push({path:i,cid:a,filename:"image-"+ ++r+"."+o.detectExtension(s)}),n+"cid:"+a})),e.data.html=i,t()}))}set(e,t){return this.meta.set(e,t)}get(e){return this.meta.get(e)}},QA}function uI(){if(tI)return eI;tI=1;const e=RA,n=t.EventEmitter,i=l,r=h,o=p,s=m,a=function(){if(ZA)return XA;ZA=1;const e=c.Transform;return XA=class extends e{constructor(e){super(e),this.options=e||{},this._curLine="",this.inByteCount=0,this.outByteCount=0,this.lastByte=!1}_transform(e,t,n){let i,r,o,s=[],a=0,c=0;if(!e||!e.length)return n();for("string"==typeof e&&(e=Buffer.from(e)),this.inByteCount+=e.length,i=0,r=e.length;i<r;i++)46===e[i]?(i&&10===e[i-1]||!i&&(!this.lastByte||10===this.lastByte))&&(o=e.slice(c,i+1),s.push(o),s.push(Buffer.from(".")),a+=o.length+1,c=i+1):10===e[i]&&(i&&13!==e[i-1]||!i&&13!==this.lastByte)&&(i>c?(o=e.slice(c,i),s.push(o),a+=o.length+2):a+=2,s.push(Buffer.from("\r\n")),c=i+1);a?(c<e.length&&(o=e.slice(c),s.push(o),a+=o.length),this.outByteCount+=a,this.push(Buffer.concat(s,a))):(this.outByteCount+=e.length,this.push(e)),this.lastByte=e[e.length-1],n()}_flush(e){let t;t=10===this.lastByte?Buffer.from(".\r\n"):13===this.lastByte?Buffer.from("\n.\r\n"):Buffer.from("\r\n.\r\n"),this.outByteCount+=t.length,this.push(t),e()}},XA}(),u=c.PassThrough,d=jA(),f=6e5;return eI=class extends n{constructor(t){super(t),this.id=s.randomBytes(8).toString("base64").replace(/\W/g,""),this.stage="init",this.options=t||{},this.secureConnection=!!this.options.secure,this.alreadySecured=!!this.options.secured,this.port=Number(this.options.port)||(this.secureConnection?465:587),this.host=this.options.host||"localhost",this.servername=this.options.servername?this.options.servername:!i.isIP(this.host)&&this.host,this.allowInternalNetworkInterfaces=this.options.allowInternalNetworkInterfaces||!1,void 0===this.options.secure&&465===this.port&&(this.secureConnection=!0),this.name=this.options.name||this._getHostname(),this.logger=d.getLogger(this.options,{component:this.options.component||"smtp-connection",sid:this.id}),this.customAuth=new Map,Object.keys(this.options.customAuth||{}).forEach((e=>{let t=(e||"").toString().trim().toUpperCase();t&&this.customAuth.set(t,this.options.customAuth[e])})),this.version=e.version,this.authenticated=!1,this.destroyed=!1,this.secure=!!this.secureConnection,this._remainder="",this._responseQueue=[],this.lastServerResponse=!1,this._socket=!1,this._supportedAuth=[],this.allowsAuth=!1,this._envelope=!1,this._supportedExtensions=[],this._maxAllowedSize=0,this._responseActions=[],this._recipientQueue=[],this._greetingTimeout=!1,this._connectionTimeout=!1,this._destroyed=!1,this._closing=!1,this._onSocketData=e=>this._onData(e),this._onSocketError=e=>this._onError(e,"ESOCKET",!1,"CONN"),this._onSocketClose=()=>this._onClose(),this._onSocketEnd=()=>this._onEnd(),this._onSocketTimeout=()=>this._onTimeout()}connect(e){if("function"==typeof e){this.once("connect",(()=>{this.logger.debug({tnx:"smtp"},"SMTP handshake finished"),e()}));const t=this._isDestroyedMessage("connect");if(t)return e(this._formatError(t,"ECONNECTION",!1,"CONN"))}let t={port:this.port,host:this.host,allowInternalNetworkInterfaces:this.allowInternalNetworkInterfaces,timeout:this.options.dnsTimeout||3e4};this.options.localAddress&&(t.localAddress=this.options.localAddress);let n=()=>{this._connectionTimeout=setTimeout((()=>{this._onError("Connection timeout","ETIMEDOUT",!1,"CONN")}),this.options.connectionTimeout||12e4),this._socket.on("error",this._onSocketError)};return this.options.connection?(this._socket=this.options.connection,void(this.secureConnection&&!this.alreadySecured?setImmediate((()=>this._upgradeConnection((e=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"CONN"):this._onConnect()})))):setImmediate((()=>this._onConnect())))):this.options.socket?(this._socket=this.options.socket,d.resolveHostname(t,((e,i)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:i.host,cached:!!i.cached},"Resolved %s as %s [cache %s]",t.host,i.host,i.cached?"hit":"miss"),Object.keys(i).forEach((e=>{"_"!==e.charAt(0)&&i[e]&&(t[e]=i[e])}));try{this._socket.connect(this.port,this.host,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),n()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):this.secureConnection?(this.options.tls&&Object.keys(this.options.tls).forEach((e=>{t[e]=this.options.tls[e]})),this.servername&&!t.servername&&(t.servername=this.servername),d.resolveHostname(t,((e,i)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:i.host,cached:!!i.cached},"Resolved %s as %s [cache %s]",t.host,i.host,i.cached?"hit":"miss"),Object.keys(i).forEach((e=>{"_"!==e.charAt(0)&&i[e]&&(t[e]=i[e])}));try{this._socket=r.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),n()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):d.resolveHostname(t,((e,r)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:r.host,cached:!!r.cached},"Resolved %s as %s [cache %s]",t.host,r.host,r.cached?"hit":"miss"),Object.keys(r).forEach((e=>{"_"!==e.charAt(0)&&r[e]&&(t[e]=r[e])}));try{this._socket=i.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),n()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))}quit(){this._sendCommand("QUIT"),this._responseActions.push(this.close)}close(){if(clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._responseActions=[],this._closing)return;this._closing=!0;let e="end";"init"===this.stage&&(e="destroy"),this.logger.debug({tnx:"smtp"},'Closing connection to the server using "%s"',e);let t=this._socket&&this._socket.socket||this._socket;if(t&&!t.destroyed)try{this._socket[e]()}catch(e){}this._destroy()}login(e,t){const n=this._isDestroyedMessage("login");if(n)return t(this._formatError(n,"ECONNECTION",!1,"API"));if(this._auth=e||{},this._authMethod=(this._auth.method||"").toString().trim().toUpperCase()||!1,this._authMethod||!this._auth.oauth2||this._auth.credentials?this._authMethod&&("XOAUTH2"!==this._authMethod||this._auth.oauth2)||(this._authMethod=(this._supportedAuth[0]||"PLAIN").toUpperCase().trim()):this._authMethod="XOAUTH2",!("XOAUTH2"===this._authMethod||this._auth.credentials&&this._auth.credentials.user&&this._auth.credentials.pass)){if(!(this._auth.user&&this._auth.pass||this.customAuth.has(this._authMethod)))return t(this._formatError('Missing credentials for "'+this._authMethod+'"',"EAUTH",!1,"API"));this._auth.credentials={user:this._auth.user,pass:this._auth.pass,options:this._auth.options}}if(!this.customAuth.has(this._authMethod)){switch(this._authMethod){case"XOAUTH2":return void this._handleXOauth2Token(!1,t);case"LOGIN":return this._responseActions.push((e=>{this._actionAUTH_LOGIN_USER(e,t)})),void this._sendCommand("AUTH LOGIN");case"PLAIN":return this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),void this._sendCommand("AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0"+this._auth.credentials.pass,"utf-8").toString("base64"),"AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0/* secret */","utf-8").toString("base64"));case"CRAM-MD5":return this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5(e,t)})),void this._sendCommand("AUTH CRAM-MD5")}return t(this._formatError('Unknown authentication method "'+this._authMethod+'"',"EAUTH",!1,"API"))}{let e,n=this.customAuth.get(this._authMethod),i=!1,r=()=>{i||(i=!0,this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0))},o=n=>{i||(i=!0,t(this._formatError(n,"EAUTH",e,"AUTH "+this._authMethod)))},s=n({auth:this._auth,method:this._authMethod,extensions:[].concat(this._supportedExtensions),authMethods:[].concat(this._supportedAuth),maxAllowedSize:this._maxAllowedSize||!1,sendCommand:(t,n)=>{let i;return n||(i=new Promise(((e,t)=>{n=d.callbackPromise(e,t)}))),this._responseActions.push((i=>{e=i;let r=i.match(/^(\d+)(?:\s(\d+\.\d+\.\d+))?\s/),o={command:t,response:i};r?(o.status=Number(r[1])||0,r[2]&&(o.code=r[2]),o.text=i.substr(r[0].length)):(o.text=i,o.status=0),n(null,o)})),setImmediate((()=>this._sendCommand(t))),i},resolve:r,reject:o});s&&"function"==typeof s.catch&&s.then(r).catch(o)}}send(e,t,n){if(!t)return n(this._formatError("Empty message","EMESSAGE",!1,"API"));const i=this._isDestroyedMessage("send message");if(i)return n(this._formatError(i,"ECONNECTION",!1,"API"));if(this._maxAllowedSize&&e.size>this._maxAllowedSize)return setImmediate((()=>{n(this._formatError("Message size larger than allowed "+this._maxAllowedSize,"EMESSAGE",!1,"MAIL FROM"))}));let r=!1,o=function(){r||(r=!0,n(...arguments))};"function"==typeof t.on&&t.on("error",(e=>o(this._formatError(e,"ESTREAM",!1,"API"))));let s=Date.now();this._setEnvelope(e,((e,n)=>{if(e){let n=new u;return"function"==typeof t.pipe?t.pipe(n):(n.write(t),n.end()),o(e)}let i=Date.now(),r=this._createSendStream(((e,t)=>e?o(e):(n.envelopeTime=i-s,n.messageTime=Date.now()-i,n.messageSize=r.outByteCount,n.response=t,o(null,n))));"function"==typeof t.pipe?t.pipe(r):(r.write(t),r.end())}))}reset(e){this._sendCommand("RSET"),this._responseActions.push((t=>"2"!==t.charAt(0)?e(this._formatError("Could not reset session state. response="+t,"EPROTOCOL",t,"RSET")):(this._envelope=!1,e(null,!0))))}_onConnect(){clearTimeout(this._connectionTimeout),this.logger.info({tnx:"network",localAddress:this._socket.localAddress,localPort:this._socket.localPort,remoteAddress:this._socket.remoteAddress,remotePort:this._socket.remotePort},"%s established to %s:%s",this.secure?"Secure connection":"Connection",this._socket.remoteAddress,this._socket.remotePort),this._destroyed?this.close():(this.stage="connected",this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout),this._socket.removeListener("close",this._onSocketClose),this._socket.removeListener("end",this._onSocketEnd),this._socket.on("data",this._onSocketData),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||f),this._socket.on("timeout",this._onSocketTimeout),this._greetingTimeout=setTimeout((()=>{this._socket&&!this._destroyed&&this._responseActions[0]===this._actionGreeting&&this._onError("Greeting never received","ETIMEDOUT",!1,"CONN")}),this.options.greetingTimeout||3e4),this._responseActions.push(this._actionGreeting),this._socket.resume())}_onData(e){if(this._destroyed||!e||!e.length)return;let t,n=(e||"").toString("binary"),i=(this._remainder+n).split(/\r?\n/);this._remainder=i.pop();for(let e=0,n=i.length;e<n;e++)this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))?this._responseQueue[this._responseQueue.length-1]+="\n"+i[e]:this._responseQueue.push(i[e]);this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))||this._processResponse()}_onError(e,t,n,i){clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._destroyed||(e=this._formatError(e,t,n,i),this.logger.error(n,e.message),this.emit("error",e),this.close())}_formatError(e,t,n,i){let r;r=/Error\]$/i.test(Object.prototype.toString.call(e))?e:new Error(e),t&&"Error"!==t&&(r.code=t),n&&(r.response=n,r.message+=": "+n);let o="string"==typeof n&&Number((n.match(/^\d+/)||[])[0])||!1;return o&&(r.responseCode=o),i&&(r.command=i),r}_onClose(){let e=!1;return this._remainder&&this._remainder.trim()&&((this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},this._remainder.replace(/\r?\n$/,"")),this.lastServerResponse=e=this._remainder.trim()),this.logger.info({tnx:"network"},"Connection closed"),this.upgrading&&!this._destroyed?this._onError(new Error("Connection closed unexpectedly"),"ETLS",e,"CONN"):[this._actionGreeting,this.close].includes(this._responseActions[0])||this._destroyed?/^[45]\d{2}\b/.test(e)?this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN"):void this._destroy():this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN")}_onEnd(){this._socket&&!this._socket.destroyed&&this._socket.destroy()}_onTimeout(){return this._onError(new Error("Timeout"),"ETIMEDOUT",!1,"CONN")}_destroy(){this._destroyed||(this._destroyed=!0,this.emit("end"))}_upgradeConnection(e){this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout);let t=this._socket,n={socket:this._socket,host:this.host};Object.keys(this.options.tls||{}).forEach((e=>{n[e]=this.options.tls[e]})),this.servername&&!n.servername&&(n.servername=this.servername),this.upgrading=!0;try{this._socket=r.connect(n,(()=>(this.secure=!0,this.upgrading=!1,this._socket.on("data",this._onSocketData),t.removeListener("close",this._onSocketClose),t.removeListener("end",this._onSocketEnd),e(null,!0))))}catch(t){return e(t)}this._socket.on("error",this._onSocketError),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||f),this._socket.on("timeout",this._onSocketTimeout),t.resume()}_processResponse(){if(!this._responseQueue.length)return!1;let e=this.lastServerResponse=(this._responseQueue.shift()||"").toString();if(/^\d+-/.test(e.split("\n").pop()))return;(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},e.replace(/\r?\n$/,"")),e.trim()||setImmediate((()=>this._processResponse()));let t=this._responseActions.shift();if("function"!=typeof t)return this._onError(new Error("Unexpected Response"),"EPROTOCOL",e,"CONN");t.call(this,e),setImmediate((()=>this._processResponse()))}_sendCommand(e,t){if(!this._destroyed){if(this._socket.destroyed)return this.close();(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"client"},(t||e||"").toString().replace(/\r?\n$/,"")),this._socket.write(Buffer.from(e+"\r\n","utf-8"))}}_setEnvelope(e,t){let n=[],i=!1;if(this._envelope=e||{},this._envelope.from=(this._envelope.from&&this._envelope.from.address||this._envelope.from||"").toString().trim(),this._envelope.to=[].concat(this._envelope.to||[]).map((e=>(e&&e.address||e||"").toString().trim())),!this._envelope.to.length)return t(this._formatError("No recipients defined","EENVELOPE",!1,"API"));if(this._envelope.from&&/[\r\n<>]/.test(this._envelope.from))return t(this._formatError("Invalid sender "+JSON.stringify(this._envelope.from),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.from)&&(i=!0);for(let e=0,n=this._envelope.to.length;e<n;e++){if(!this._envelope.to[e]||/[\r\n<>]/.test(this._envelope.to[e]))return t(this._formatError("Invalid recipient "+JSON.stringify(this._envelope.to[e]),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.to[e])&&(i=!0)}if(this._envelope.rcptQueue=JSON.parse(JSON.stringify(this._envelope.to||[])),this._envelope.rejected=[],this._envelope.rejectedErrors=[],this._envelope.accepted=[],this._envelope.dsn)try{this._envelope.dsn=this._setDsnEnvelope(this._envelope.dsn)}catch(e){return t(this._formatError("Invalid DSN "+e.message,"EENVELOPE",!1,"API"))}this._responseActions.push((e=>{this._actionMAIL(e,t)})),i&&this._supportedExtensions.includes("SMTPUTF8")&&(n.push("SMTPUTF8"),this._usingSmtpUtf8=!0),this._envelope.use8BitMime&&this._supportedExtensions.includes("8BITMIME")&&(n.push("BODY=8BITMIME"),this._using8BitMime=!0),this._envelope.size&&this._supportedExtensions.includes("SIZE")&&n.push("SIZE="+this._envelope.size),this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.ret&&n.push("RET="+d.encodeXText(this._envelope.dsn.ret)),this._envelope.dsn.envid&&n.push("ENVID="+d.encodeXText(this._envelope.dsn.envid))),this._sendCommand("MAIL FROM:<"+this._envelope.from+">"+(n.length?" "+n.join(" "):""))}_setDsnEnvelope(e){let t=(e.ret||e.return||"").toString().toUpperCase()||null;if(t)switch(t){case"HDRS":case"HEADERS":t="HDRS";break;case"FULL":case"BODY":t="FULL"}if(t&&!["FULL","HDRS"].includes(t))throw new Error("ret: "+JSON.stringify(t));let n=(e.envid||e.id||"").toString()||null,i=e.notify||null;if(i){"string"==typeof i&&(i=i.split(",")),i=i.map((e=>e.trim().toUpperCase()));let e=["NEVER","SUCCESS","FAILURE","DELAY"],t=i.filter((t=>!e.includes(t)));if(t.length||i.length>1&&i.includes("NEVER"))throw new Error("notify: "+JSON.stringify(i.join(",")));i=i.join(",")}let r=(e.recipient||e.orcpt||"").toString()||null;return r&&r.indexOf(";")<0&&(r="rfc822;"+r),{ret:t,envid:n,notify:i,orcpt:r}}_getDsnRcptToArgs(){let e=[];return this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.notify&&e.push("NOTIFY="+d.encodeXText(this._envelope.dsn.notify)),this._envelope.dsn.orcpt&&e.push("ORCPT="+d.encodeXText(this._envelope.dsn.orcpt))),e.length?" "+e.join(" "):""}_createSendStream(e){let t,n=new a;return this.options.lmtp?this._envelope.accepted.forEach(((t,n)=>{let i=n===this._envelope.accepted.length-1;this._responseActions.push((n=>{this._actionLMTPStream(t,i,n,e)}))})):this._responseActions.push((t=>{this._actionSMTPStream(t,e)})),n.pipe(this._socket,{end:!1}),this.options.debug&&(t=new u,t.on("readable",(()=>{let e;for(;e=t.read();)this.logger.debug({tnx:"message"},e.toString("binary").replace(/\r?\n$/,""))})),n.pipe(t)),n.once("end",(()=>{this.logger.info({tnx:"message",inByteCount:n.inByteCount,outByteCount:n.outByteCount},"<%s bytes encoded mime message (source size %s bytes)>",n.outByteCount,n.inByteCount)})),n}_actionGreeting(e){clearTimeout(this._greetingTimeout),"220"===e.substr(0,3)?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this._onError(new Error("Invalid greeting. response="+e),"EPROTOCOL",e,"CONN")}_actionLHLO(e){"2"===e.charAt(0)?this._actionEHLO(e):this._onError(new Error("Invalid LHLO. response="+e),"EPROTOCOL",e,"LHLO")}_actionEHLO(e){let t;if("421"!==e.substr(0,3)){if("2"!==e.charAt(0))return this.options.requireTLS?void this._onError(new Error("EHLO failed but HELO does not support required STARTTLS. response="+e),"ECONNECTION",e,"EHLO"):(this._responseActions.push(this._actionHELO),void this._sendCommand("HELO "+this.name));if(this._ehloLines=e.split(/\r?\n/).map((e=>e.replace(/^\d+[ -]/,"").trim())).filter((e=>e)).slice(1),!this.secure&&!this.options.ignoreTLS&&(/[ -]STARTTLS\b/im.test(e)||this.options.requireTLS))return this._sendCommand("STARTTLS"),void this._responseActions.push(this._actionSTARTTLS);/[ -]SMTPUTF8\b/im.test(e)&&this._supportedExtensions.push("SMTPUTF8"),/[ -]DSN\b/im.test(e)&&this._supportedExtensions.push("DSN"),/[ -]8BITMIME\b/im.test(e)&&this._supportedExtensions.push("8BITMIME"),/[ -]PIPELINING\b/im.test(e)&&this._supportedExtensions.push("PIPELINING"),/[ -]AUTH\b/i.test(e)&&(this.allowsAuth=!0),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)PLAIN/i.test(e)&&this._supportedAuth.push("PLAIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)LOGIN/i.test(e)&&this._supportedAuth.push("LOGIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)CRAM-MD5/i.test(e)&&this._supportedAuth.push("CRAM-MD5"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)XOAUTH2/i.test(e)&&this._supportedAuth.push("XOAUTH2"),(t=e.match(/[ -]SIZE(?:[ \t]+(\d+))?/im))&&(this._supportedExtensions.push("SIZE"),this._maxAllowedSize=Number(t[1])||0),this.emit("connect")}else this._onError(new Error("Server terminates connection. response="+e),"ECONNECTION",e,"EHLO")}_actionHELO(e){"2"===e.charAt(0)?(this.allowsAuth=!0,this.emit("connect")):this._onError(new Error("Invalid HELO. response="+e),"EPROTOCOL",e,"HELO")}_actionSTARTTLS(e){if("2"!==e.charAt(0))return this.options.opportunisticTLS?(this.logger.info({tnx:"smtp"},"Failed STARTTLS upgrade, continuing unencrypted"),this.emit("connect")):void this._onError(new Error("Error upgrading connection with STARTTLS"),"ETLS",e,"STARTTLS");this._upgradeConnection(((e,t)=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"STARTTLS"):(this.logger.info({tnx:"smtp"},"Connection upgraded with STARTTLS"),t?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this.emit("connect"))}))}_actionAUTH_LOGIN_USER(e,t){/^334[ -]/.test(e)?(this._responseActions.push((e=>{this._actionAUTH_LOGIN_PASS(e,t)})),this._sendCommand(Buffer.from(this._auth.credentials.user+"","utf-8").toString("base64"))):t(this._formatError('Invalid login sequence while waiting for "334 VXNlcm5hbWU6"',"EAUTH",e,"AUTH LOGIN"))}_actionAUTH_CRAM_MD5(e,t){let n=e.match(/^334\s+(.+)$/),i="";if(!n)return t(this._formatError("Invalid login sequence while waiting for server challenge string","EAUTH",e,"AUTH CRAM-MD5"));i=n[1];let r=Buffer.from(i,"base64").toString("ascii"),o=s.createHmac("md5",this._auth.credentials.pass);o.update(r);let a=this._auth.credentials.user+" "+o.digest("hex");this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5_PASS(e,t)})),this._sendCommand(Buffer.from(a).toString("base64"),Buffer.from(this._auth.credentials.user+" /* secret */").toString("base64"))}_actionAUTH_CRAM_MD5_PASS(e,t){if(!e.match(/^235\s+/))return t(this._formatError('Invalid login sequence while waiting for "235"',"EAUTH",e,"AUTH CRAM-MD5"));this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0)}_actionAUTH_LOGIN_PASS(e,t){if(!/^334[ -]/.test(e))return t(this._formatError('Invalid login sequence while waiting for "334 UGFzc3dvcmQ6"',"EAUTH",e,"AUTH LOGIN"));this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),this._sendCommand(Buffer.from((this._auth.credentials.pass||"").toString(),"utf-8").toString("base64"),Buffer.from("/* secret */","utf-8").toString("base64"))}_actionAUTHComplete(e,t,n){return n||"function"!=typeof t||(n=t,t=!1),"334"===e.substr(0,3)?(this._responseActions.push((e=>{t||"XOAUTH2"!==this._authMethod?this._actionAUTHComplete(e,!0,n):setImmediate((()=>this._handleXOauth2Token(!0,n)))})),void this._sendCommand("")):"2"!==e.charAt(0)?(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),n(this._formatError("Invalid login","EAUTH",e,"AUTH "+this._authMethod))):(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,void n(null,!0))}_actionMAIL(e,t){let n,i;if(2!==Number(e.charAt(0)))return n=this._usingSmtpUtf8&&/^550 /.test(e)&&/[\x80-\uFFFF]/.test(this._envelope.from)?"Internationalized mailbox name not allowed":"Mail command failed",t(this._formatError(n,"EENVELOPE",e,"MAIL FROM"));if(!this._envelope.rcptQueue.length)return t(this._formatError("Can't send mail - no recipients defined","EENVELOPE",!1,"API"));if(this._recipientQueue=[],this._supportedExtensions.includes("PIPELINING"))for(;this._envelope.rcptQueue.length;)i=this._envelope.rcptQueue.shift(),this._recipientQueue.push(i),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+i+">"+this._getDsnRcptToArgs());else i=this._envelope.rcptQueue.shift(),this._recipientQueue.push(i),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+i+">"+this._getDsnRcptToArgs())}_actionRCPT(e,t){let n,i,r=this._recipientQueue.shift();if(2!==Number(e.charAt(0))?(n=this._usingSmtpUtf8&&/^553 /.test(e)&&/[\x80-\uFFFF]/.test(r)?"Internationalized mailbox name not allowed":"Recipient command failed",this._envelope.rejected.push(r),i=this._formatError(n,"EENVELOPE",e,"RCPT TO"),i.recipient=r,this._envelope.rejectedErrors.push(i)):this._envelope.accepted.push(r),this._envelope.rcptQueue.length||this._recipientQueue.length)this._envelope.rcptQueue.length&&(r=this._envelope.rcptQueue.shift(),this._recipientQueue.push(r),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+r+">"+this._getDsnRcptToArgs()));else{if(!(this._envelope.rejected.length<this._envelope.to.length))return i=this._formatError("Can't send mail - all recipients were rejected","EENVELOPE",e,"RCPT TO"),i.rejected=this._envelope.rejected,i.rejectedErrors=this._envelope.rejectedErrors,t(i);this._responseActions.push((e=>{this._actionDATA(e,t)})),this._sendCommand("DATA")}}_actionDATA(e,t){if(!/^[23]/.test(e))return t(this._formatError("Data command failed","EENVELOPE",e,"DATA"));let n={accepted:this._envelope.accepted,rejected:this._envelope.rejected};this._ehloLines&&this._ehloLines.length&&(n.ehlo=this._ehloLines),this._envelope.rejectedErrors.length&&(n.rejectedErrors=this._envelope.rejectedErrors),t(null,n)}_actionSMTPStream(e,t){return 2!==Number(e.charAt(0))?t(this._formatError("Message failed","EMESSAGE",e,"DATA")):t(null,e)}_actionLMTPStream(e,t,n,i){let r;if(2!==Number(n.charAt(0))){r=this._formatError("Message failed for recipient "+e,"EMESSAGE",n,"DATA"),r.recipient=e,this._envelope.rejected.push(e),this._envelope.rejectedErrors.push(r);for(let t=0,n=this._envelope.accepted.length;t<n;t++)this._envelope.accepted[t]===e&&this._envelope.accepted.splice(t,1)}if(t)return i(null,n)}_handleXOauth2Token(e,t){this._auth.oauth2.getToken(e,((n,i)=>{if(n)return this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),t(this._formatError(n,"EAUTH",!1,"AUTH XOAUTH2"));this._responseActions.push((n=>{this._actionAUTHComplete(n,e,t)})),this._sendCommand("AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token(i),"AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token("/* secret */"))}))}_isDestroyedMessage(e){if(this._destroyed)return"Cannot "+e+" - smtp connection is already destroyed.";if(this._socket){if(this._socket.destroyed)return"Cannot "+e+" - smtp connection socket is already destroyed.";if(!this._socket.writable)return"Cannot "+e+" - smtp connection socket is already half-closed."}}_getHostname(){let e;try{e=o.hostname()||""}catch(t){e="localhost"}return(!e||e.indexOf(".")<0)&&(e="[127.0.0.1]"),e.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)&&(e="["+e+"]"),e}},eI}function pI(){if(iI)return nI;iI=1;const e=c.Stream,t=MA(),n=m,i=jA();return nI=class extends e{constructor(e,t){if(super(),this.options=e||{},e&&e.serviceClient){if(!e.privateKey||!e.user)return void setImmediate((()=>this.emit("error",new Error('Options "privateKey" and "user" are required for service account!'))));let t=Math.min(Math.max(Number(this.options.serviceRequestTimeout)||0,0),3600);this.options.serviceRequestTimeout=t||300}if(this.logger=i.getLogger({logger:t},{component:this.options.component||"OAuth2"}),this.provisionCallback="function"==typeof this.options.provisionCallback&&this.options.provisionCallback,this.options.accessUrl=this.options.accessUrl||"https://accounts.google.com/o/oauth2/token",this.options.customHeaders=this.options.customHeaders||{},this.options.customParams=this.options.customParams||{},this.accessToken=this.options.accessToken||!1,this.options.expires&&Number(this.options.expires))this.expires=this.options.expires;else{let e=Math.max(Number(this.options.timeout)||0,0);this.expires=e&&Date.now()+1e3*e||0}}getToken(e,t){if(!e&&this.accessToken&&(!this.expires||this.expires>Date.now()))return t(null,this.accessToken);let n=(...e)=>{e[0]?this.logger.error({err:e[0],tnx:"OAUTH2",user:this.options.user,action:"renew"},"Failed generating new Access Token for %s",this.options.user):this.logger.info({tnx:"OAUTH2",user:this.options.user,action:"renew"},"Generated new Access Token for %s",this.options.user),t(...e)};this.provisionCallback?this.provisionCallback(this.options.user,!!e,((e,t,i)=>{!e&&t&&(this.accessToken=t,this.expires=i||0),n(e,t)})):this.generateToken(n)}updateToken(e,t){this.accessToken=e,t=Math.max(Number(t)||0,0),this.expires=t&&Date.now()+1e3*t||0,this.emit("token",{user:this.options.user,accessToken:e||"",expires:this.expires})}generateToken(e){let t,n;if(this.options.serviceClient){let i,r=Math.floor(Date.now()/1e3),o={iss:this.options.serviceClient,scope:this.options.scope||"https://mail.google.com/",sub:this.options.user,aud:this.options.accessUrl,iat:r,exp:r+this.options.serviceRequestTimeout};try{i=this.jwtSignRS256(o)}catch(t){return e(new Error("Can't generate token. Check your auth options"))}t={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i},n={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:o}}else{if(!this.options.refreshToken)return e(new Error("Can't create new access token for user"));t={client_id:this.options.clientId||"",client_secret:this.options.clientSecret||"",refresh_token:this.options.refreshToken,grant_type:"refresh_token"},n={client_id:this.options.clientId||"",client_secret:(this.options.clientSecret||"").substr(0,6)+"...",refresh_token:(this.options.refreshToken||"").substr(0,6)+"...",grant_type:"refresh_token"}}Object.keys(this.options.customParams).forEach((e=>{t[e]=this.options.customParams[e],n[e]=this.options.customParams[e]})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"generate"},"Requesting token using: %s",JSON.stringify(n)),this.postRequest(this.options.accessUrl,t,this.options,((t,n)=>{let i;if(t)return e(t);try{i=JSON.parse(n.toString())}catch(t){return e(t)}if(!i||"object"!=typeof i)return this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",(n||"").toString()),e(new Error("Invalid authentication response"));let r={};if(Object.keys(i).forEach((e=>{r[e]="access_token"!==e?i[e]:(i[e]||"").toString().substr(0,6)+"..."})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",JSON.stringify(r)),i.error){let t=i.error;return i.error_description&&(t+=": "+i.error_description),i.error_uri&&(t+=" ("+i.error_uri+")"),e(new Error(t))}return i.access_token?(this.updateToken(i.access_token,i.expires_in),e(null,this.accessToken)):e(new Error("No access token"))}))}buildXOAuth2Token(e){let t=["user="+(this.options.user||""),"auth=Bearer "+(e||this.accessToken),"",""];return Buffer.from(t.join(""),"utf-8").toString("base64")}postRequest(e,n,i,r){let o=!1,s=[],a=0,c=t(e,{method:"post",headers:i.customHeaders,body:n,allowErrorResponse:!0});c.on("readable",(()=>{let e;for(;null!==(e=c.read());)s.push(e),a+=e.length})),c.once("error",(e=>{if(!o)return o=!0,r(e)})),c.once("end",(()=>{if(!o)return o=!0,r(null,Buffer.concat(s,a))}))}toBase64URL(e){return"string"==typeof e&&(e=Buffer.from(e)),e.toString("base64").replace(/[=]+/g,"").replace(/\+/g,"-").replace(/\//g,"_")}jwtSignRS256(e){e=['{"alg":"RS256","typ":"JWT"}',JSON.stringify(e)].map((e=>this.toBase64URL(e))).join(".");let t=n.createSign("RSA-SHA256").update(e).sign(this.options.privateKey);return e+"."+this.toBase64URL(t)}},nI}var dI,mI,hI,fI,gI,yI,vI,bI,xI,wI,EI,SI,_I,OI,CI,kI={126:{host:"smtp.126.com",port:465,secure:!0},163:{host:"smtp.163.com",port:465,secure:!0},"1und1":{host:"smtp.1und1.de",port:465,secure:!0,authMethod:"LOGIN"},Aliyun:{domains:["aliyun.com"],host:"smtp.aliyun.com",port:465,secure:!0},AOL:{domains:["aol.com"],host:"smtp.aol.com",port:587},Bluewin:{host:"smtpauths.bluewin.ch",domains:["bluewin.ch"],port:465},DebugMail:{host:"debugmail.io",port:25},DynectEmail:{aliases:["Dynect"],host:"smtp.dynect.net",port:25},Ethereal:{aliases:["ethereal.email"],host:"smtp.ethereal.email",port:587},FastMail:{domains:["fastmail.fm"],host:"smtp.fastmail.com",port:465,secure:!0},"Forward Email":{aliases:["FE","ForwardEmail"],domains:["forwardemail.net"],host:"smtp.forwardemail.net",port:465,secure:!0},"Feishu Mail":{aliases:["Feishu","FeishuMail"],domains:["www.feishu.cn"],host:"smtp.feishu.cn",port:465,secure:!0},GandiMail:{aliases:["Gandi","Gandi Mail"],host:"mail.gandi.net",port:587},Gmail:{aliases:["Google Mail"],domains:["gmail.com","googlemail.com"],host:"smtp.gmail.com",port:465,secure:!0},Godaddy:{host:"smtpout.secureserver.net",port:25},GodaddyAsia:{host:"smtp.asia.secureserver.net",port:25},GodaddyEurope:{host:"smtp.europe.secureserver.net",port:25},"hot.ee":{host:"mail.hot.ee"},Hotmail:{aliases:["Outlook","Outlook.com","Hotmail.com"],domains:["hotmail.com","outlook.com"],host:"smtp-mail.outlook.com",port:587},iCloud:{aliases:["Me","Mac"],domains:["me.com","mac.com"],host:"smtp.mail.me.com",port:587},Infomaniak:{host:"mail.infomaniak.com",domains:["ik.me","ikmail.com","etik.com"],port:587},Loopia:{host:"mailcluster.loopia.se",port:465},"mail.ee":{host:"smtp.mail.ee"},"Mail.ru":{host:"smtp.mail.ru",port:465,secure:!0},"Mailcatch.app":{host:"sandbox-smtp.mailcatch.app",port:2525},Maildev:{port:1025,ignoreTLS:!0},Mailgun:{host:"smtp.mailgun.org",port:465,secure:!0},Mailjet:{host:"in.mailjet.com",port:587},Mailosaur:{host:"mailosaur.io",port:25},Mailtrap:{host:"live.smtp.mailtrap.io",port:587},Mandrill:{host:"smtp.mandrillapp.com",port:587},Naver:{host:"smtp.naver.com",port:587},One:{host:"send.one.com",port:465,secure:!0},OpenMailBox:{aliases:["OMB","openmailbox.org"],host:"smtp.openmailbox.org",port:465,secure:!0},Outlook365:{host:"smtp.office365.com",port:587,secure:!1},OhMySMTP:{host:"smtp.ohmysmtp.com",port:587,secure:!1},Postmark:{aliases:["PostmarkApp"],host:"smtp.postmarkapp.com",port:2525},"qiye.aliyun":{host:"smtp.mxhichina.com",port:"465",secure:!0},QQ:{domains:["qq.com"],host:"smtp.qq.com",port:465,secure:!0},QQex:{aliases:["QQ Enterprise"],domains:["exmail.qq.com"],host:"smtp.exmail.qq.com",port:465,secure:!0},SendCloud:{host:"smtp.sendcloud.net",port:2525},SendGrid:{host:"smtp.sendgrid.net",port:587},SendinBlue:{aliases:["Brevo"],host:"smtp-relay.brevo.com",port:587},SendPulse:{host:"smtp-pulse.com",port:465,secure:!0},SES:{host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},"SES-US-EAST-1":{host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},"SES-US-WEST-2":{host:"email-smtp.us-west-2.amazonaws.com",port:465,secure:!0},"SES-EU-WEST-1":{host:"email-smtp.eu-west-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTH-1":{host:"email-smtp.ap-south-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-1":{host:"email-smtp.ap-northeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-2":{host:"email-smtp.ap-northeast-2.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-3":{host:"email-smtp.ap-northeast-3.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-1":{host:"email-smtp.ap-southeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-2":{host:"email-smtp.ap-southeast-2.amazonaws.com",port:465,secure:!0},Sparkpost:{aliases:["SparkPost","SparkPost Mail"],domains:["sparkpost.com"],host:"smtp.sparkpostmail.com",port:587,secure:!1},Tipimail:{host:"smtp.tipimail.com",port:587},Yahoo:{domains:["yahoo.com"],host:"smtp.mail.yahoo.com",port:465,secure:!0},Yandex:{domains:["yandex.ru"],host:"smtp.yandex.ru",port:465,secure:!0},Zoho:{host:"smtp.zoho.com",port:465,secure:!0,authMethod:"LOGIN"}};function TI(){if(mI)return dI;mI=1;const e=kI,t={};function n(e){return e.replace(/[^a-zA-Z0-9.-]/g,"").toLowerCase()}function i(e){let t=["domains","aliases"],n={};return Object.keys(e).forEach((i=>{t.indexOf(i)<0&&(n[i]=e[i])})),n}return Object.keys(e).forEach((r=>{let o=e[r];t[n(r)]=i(o),[].concat(o.aliases||[]).forEach((e=>{t[n(e)]=i(o)})),[].concat(o.domains||[]).forEach((e=>{t[n(e)]=i(o)}))})),dI=function(e){return e=n(e.split("@").pop()),t[e]||!1}}function PI(){if(fI)return hI;fI=1;const e=t,n=function(){if(oI)return rI;oI=1;const e=uI(),n=jA().assign,i=pI(),r=t;return rI=class extends r{constructor(e){if(super(),this.pool=e,this.options=e.options,this.logger=this.pool.logger,this.options.auth)switch((this.options.auth.type||"").toString().toUpperCase()){case"OAUTH2":{let e=new i(this.options.auth,this.logger);e.provisionCallback=this.pool.mailer&&this.pool.mailer.get("oauth2_provision_cb")||e.provisionCallback,this.auth={type:"OAUTH2",user:this.options.auth.user,oauth2:e,method:"XOAUTH2"},e.on("token",(e=>this.pool.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e)));break}default:if(!this.options.auth.user&&!this.options.auth.pass)break;this.auth={type:(this.options.auth.type||"").toString().toUpperCase()||"LOGIN",user:this.options.auth.user,credentials:{user:this.options.auth.user||"",pass:this.options.auth.pass,options:this.options.auth.options},method:(this.options.auth.method||"").trim().toUpperCase()||this.options.authMethod||!1}}this._connection=!1,this._connected=!1,this.messages=0,this.available=!0}connect(t){this.pool.getSocket(this.options,((i,r)=>{if(i)return t(i);let o=!1,s=this.options;r&&r.connection&&(this.logger.info({tnx:"proxy",remoteAddress:r.connection.remoteAddress,remotePort:r.connection.remotePort,destHost:s.host||"",destPort:s.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",r.connection.remoteAddress,r.connection.remotePort,s.host||"",s.port||""),s=n(!1,s),Object.keys(r).forEach((e=>{s[e]=r[e]}))),this.connection=new e(s),this.connection.once("error",(e=>{if(this.emit("error",e),!o)return o=!0,t(e)})),this.connection.once("end",(()=>{if(this.close(),o)return;o=!0;let e=setTimeout((()=>{if(o)return;let e=new Error("Unexpected socket close");this.connection&&this.connection._socket&&this.connection._socket.upgrading&&(e.code="ETLS"),t(e)}),1e3);try{e.unref()}catch(e){}})),this.connection.connect((()=>{if(!o)return this.auth&&(this.connection.allowsAuth||s.forceAuth)?void this.connection.login(this.auth,(e=>{if(!o){if(o=!0,e)return this.connection.close(),this.emit("error",e),t(e);this._connected=!0,t(null,!0)}})):(o=!0,this._connected=!0,t(null,!0))}))}))}send(e,t){if(!this._connected)return this.connect((n=>n?t(n):this.send(e,t)));let n=e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i,cid:this.id},"Sending message %s using #%s to <%s>",i,this.id,r.join(", ")),e.data.dsn&&(n.dsn=e.data.dsn),this.connection.send(n,e.message.createReadStream(),((e,r)=>{if(this.messages++,e)return this.connection.close(),this.emit("error",e),t(e);r.envelope={from:n.from,to:n.to},r.messageId=i,setImmediate((()=>{let e;this.messages>=this.options.maxMessages?(e=new Error("Resource exhausted"),e.code="EMAXLIMIT",this.connection.close(),this.emit("error",e)):this.pool._checkRateLimit((()=>{this.available=!0,this.emit("available")}))})),t(null,r)}))}close(){this._connected=!1,this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.connection&&this.connection.close(),this.emit("close")}},rI}(),i=uI(),r=TI(),o=jA(),s=RA;return hI=class extends e{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let n=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=o.parseConnectionUrl(e.url),n=n||t.service),this.options=o.assign(!1,e,t,n&&r(n)),this.options.maxConnections=this.options.maxConnections||5,this.options.maxMessages=this.options.maxMessages||100,this.logger=o.getLogger(this.options,{component:this.options.component||"smtp-pool"});let a=new i(this.options);this.name="SMTP (pool)",this.version=s.version+"[client:"+a.version+"]",this._rateLimit={counter:0,timeout:null,waiting:[],checkpoint:!1,delta:Number(this.options.rateDelta)||1e3,limit:Number(this.options.rateLimit)||0},this._closed=!1,this._queue=[],this._connections=[],this._connectionCounter=0,this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}send(e,t){return!this._closed&&(this._queue.push({mail:e,requeueAttempts:0,callback:t}),this.idling&&this._queue.length>=this.options.maxConnections&&(this.idling=!1),setImmediate((()=>this._processMessages())),!0)}close(){let e,t=this._connections.length;if(this._closed=!0,clearTimeout(this._rateLimit.timeout),!t&&!this._queue.length)return;for(let n=t-1;n>=0;n--)this._connections[n]&&this._connections[n].available&&(e=this._connections[n],e.close(),this.logger.info({tnx:"connection",cid:e.id,action:"removed"},"Connection #%s removed",e.id));if(t&&!this._connections.length&&this.logger.debug({tnx:"connection"},"All connections removed"),!this._queue.length)return;let n=()=>{if(!this._queue.length)return void this.logger.debug({tnx:"connection"},"Pending queue entries cleared");let t=this._queue.shift();if(t&&"function"==typeof t.callback)try{t.callback(new Error("Connection pool was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}setImmediate(n)};setImmediate(n)}_processMessages(){let e,t,n;if(this._closed)return;if(!this._queue.length)return void(this.idling||(this.idling=!0,this.emit("idle")));for(t=0,n=this._connections.length;t<n;t++)if(this._connections[t].available){e=this._connections[t];break}if(!e&&this._connections.length<this.options.maxConnections&&(e=this._createConnection()),!e)return void(this.idling=!1);!this.idling&&this._queue.length<this.options.maxConnections&&(this.idling=!0,this.emit("idle"));let i=e.queueEntry=this._queue.shift();i.messageId=(e.queueEntry.mail.message.getHeader("message-id")||"").replace(/[<>\s]/g,""),e.available=!1,this.logger.debug({tnx:"pool",cid:e.id,messageId:i.messageId,action:"assign"},"Assigned message <%s> to #%s (%s)",i.messageId,e.id,e.messages+1),this._rateLimit.limit&&(this._rateLimit.counter++,this._rateLimit.checkpoint||(this._rateLimit.checkpoint=Date.now())),e.send(i.mail,((t,n)=>{if(i===e.queueEntry){try{i.callback(t,n)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}))}_createConnection(){let e=new n(this);return e.id=++this._connectionCounter,this.logger.info({tnx:"pool",cid:e.id,action:"conection"},"Created new pool resource #%s",e.id),e.on("available",(()=>{this.logger.debug({tnx:"connection",cid:e.id,action:"available"},"Connection #%s became available",e.id),this._closed?this.close():this._processMessages()})),e.once("error",(t=>{if("EMAXLIMIT"!==t.code?this.logger.error({err:t,tnx:"pool",cid:e.id},"Pool Error for #%s: %s",e.id,t.message):this.logger.debug({tnx:"pool",cid:e.id,action:"maxlimit"},"Max messages limit exchausted for #%s",e.id),e.queueEntry){try{e.queueEntry.callback(t)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}this._removeConnection(e),this._continueProcessing()})),e.once("close",(()=>{this.logger.info({tnx:"connection",cid:e.id,action:"closed"},"Connection #%s was closed",e.id),this._removeConnection(e),e.queueEntry?setTimeout((()=>{e.queueEntry&&(this._shouldRequeuOnConnectionClose(e.queueEntry)?this._requeueEntryOnConnectionClose(e):this._failDeliveryOnConnectionClose(e)),this._continueProcessing()}),50):this._continueProcessing()})),this._connections.push(e),e}_shouldRequeuOnConnectionClose(e){return void 0===this.options.maxRequeues||this.options.maxRequeues<0||e.requeueAttempts<this.options.maxRequeues}_failDeliveryOnConnectionClose(e){if(e.queueEntry&&e.queueEntry.callback){try{e.queueEntry.callback(new Error("Reached maximum number of retries after connection was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",messageId:e.queueEntry.messageId,cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}_requeueEntryOnConnectionClose(e){e.queueEntry.requeueAttempts=e.queueEntry.requeueAttempts+1,this.logger.debug({tnx:"pool",cid:e.id,messageId:e.queueEntry.messageId,action:"requeue"},"Re-queued message <%s> for #%s. Attempt: #%s",e.queueEntry.messageId,e.id,e.queueEntry.requeueAttempts),this._queue.unshift(e.queueEntry),e.queueEntry=!1}_continueProcessing(){this._closed?this.close():setTimeout((()=>this._processMessages()),100)}_removeConnection(e){let t=this._connections.indexOf(e);-1!==t&&this._connections.splice(t,1)}_checkRateLimit(e){if(!this._rateLimit.limit)return e();let t=Date.now();return this._rateLimit.counter<this._rateLimit.limit?e():(this._rateLimit.waiting.push(e),this._rateLimit.checkpoint<=t-this._rateLimit.delta?this._clearRateLimit():void(this._rateLimit.timeout||(this._rateLimit.timeout=setTimeout((()=>this._clearRateLimit()),this._rateLimit.delta-(t-this._rateLimit.checkpoint)),this._rateLimit.checkpoint=t)))}_clearRateLimit(){for(clearTimeout(this._rateLimit.timeout),this._rateLimit.timeout=null,this._rateLimit.counter=0,this._rateLimit.checkpoint=!1;this._rateLimit.waiting.length;){let e=this._rateLimit.waiting.shift();setImmediate(e)}}isIdle(){return this.idling}verify(e){let t;e||(t=new Promise(((t,n)=>{e=o.callbackPromise(t,n)})));let r=new n(this).auth;return this.getSocket(this.options,((t,n)=>{if(t)return e(t);let s=this.options;n&&n.connection&&(this.logger.info({tnx:"proxy",remoteAddress:n.connection.remoteAddress,remotePort:n.connection.remotePort,destHost:s.host||"",destPort:s.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",n.connection.remoteAddress,n.connection.remotePort,s.host||"",s.port||""),s=o.assign(!1,s),Object.keys(n).forEach((e=>{s[e]=n[e]})));let a=new i(s),c=!1;a.once("error",(t=>{if(!c)return c=!0,a.close(),e(t)})),a.once("end",(()=>{if(!c)return c=!0,e(new Error("Connection closed"))}));let l=()=>{if(!c)return c=!0,a.quit(),e(null,!0)};a.connect((()=>{if(!c)if(r&&(a.allowsAuth||s.forceAuth))a.login(r,(t=>{if(!c)return t?(c=!0,a.close(),e(t)):void l()}));else{if(!r&&a.allowsAuth&&s.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",c=!0,a.close(),e(t)}l()}}))})),t}},hI}function AI(){if(OI)return _I;OI=1;const e=t,n=RA,i=jA(),r=UA();return _I=class extends e{constructor(e){super(),e=e||{},this.options=e||{},this.ses=this.options.SES,this.name="SESTransport",this.version=n.version,this.logger=i.getLogger(this.options,{component:this.options.component||"ses-transport"}),this.maxConnections=Number(this.options.maxConnections)||1/0,this.connections=0,this.sendingRate=Number(this.options.sendingRate)||1/0,this.sendingRateTTL=null,this.rateInterval=1e3,this.rateMessages=[],this.pending=[],this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}send(e,t){return this.connections>=this.maxConnections?(this.idling=!1,this.pending.push({mail:e,callback:t})):this._checkSendingRate()?void this._send(e,((...e)=>{setImmediate((()=>t(...e))),this._sent()})):(this.idling=!1,this.pending.push({mail:e,callback:t}))}_checkRatedQueue(){if(this.connections>=this.maxConnections||!this._checkSendingRate())return;if(!this.pending.length)return void(this.idling||(this.idling=!0,this.emit("idle")));let e=this.pending.shift();this._send(e.mail,((...t)=>{setImmediate((()=>e.callback(...t))),this._sent()}))}_checkSendingRate(){clearTimeout(this.sendingRateTTL);let e=Date.now(),t=!1;for(let n=this.rateMessages.length-1;n>=0;n--)this.rateMessages[n].ts>=e-this.rateInterval&&(!t||this.rateMessages[n].ts<t)&&(t=this.rateMessages[n].ts),this.rateMessages[n].ts<e-this.rateInterval&&!this.rateMessages[n].pending&&this.rateMessages.splice(n,1);if(this.rateMessages.length<this.sendingRate)return!0;let n=Math.max(t+1001,e+20);this.sendingRateTTL=setTimeout((()=>this._checkRatedQueue()),e-n);try{this.sendingRateTTL.unref()}catch(e){}return!1}_sent(){this.connections--,this._checkRatedQueue()}isIdle(){return this.idling}_send(e,t){let n={ts:Date.now(),pending:!0};this.connections++,this.rateMessages.push(n);let i=e.data.envelope||e.message.getEnvelope(),o=e.message.messageId(),s=[].concat(i.to||[]);s.length>3&&s.push("...and "+s.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:o},"Sending message %s to <%s>",o,s.join(", "));setImmediate((()=>(t=>{e.data._dkim||(e.data._dkim={}),e.data._dkim.skipFields&&"string"==typeof e.data._dkim.skipFields?e.data._dkim.skipFields+=":date:message-id":e.data._dkim.skipFields="date:message-id";let n=e.message.createReadStream(),i=n.pipe(new r),o=[],s=0;i.on("readable",(()=>{let e;for(;null!==(e=i.read());)o.push(e),s+=e.length})),n.once("error",(e=>i.emit("error",e))),i.once("error",(e=>{t(e)})),i.once("end",(()=>t(null,Buffer.concat(o,s))))})(((r,s)=>{if(r)return this.logger.error({err:r,tnx:"send",messageId:o},"Failed creating message for %s. %s",o,r.message),n.pending=!1,t(r);let a={RawMessage:{Data:s},Source:i.from,Destinations:i.to};Object.keys(e.data.ses||{}).forEach((t=>{a[t]=e.data.ses[t]}));let c=(this.ses.aws?this.ses.ses:this.ses)||{},l=this.ses.aws||{};var u;u=(e,r)=>{let u;!e&&r||(r="us-east-1"),u="function"==typeof c.send&&l.SendRawEmailCommand?c.send(new l.SendRawEmailCommand(a)):c.sendRawEmail(a).promise(),u.then((e=>{"us-east-1"===r&&(r="email"),n.pending=!1,t(null,{envelope:{from:i.from,to:i.to},messageId:"<"+e.MessageId+(/@/.test(e.MessageId)?"":"@"+r+".amazonses.com")+">",response:e.MessageId,raw:s})})).catch((e=>{this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",o,e.message),n.pending=!1,t(e)}))},c.config&&"function"==typeof c.config.region?c.config.region().then((e=>u(null,e))).catch((e=>u(e))):u(null,c.config&&c.config.region||"us-east-1")}))))}verify(e){let t,n=(this.ses.aws?this.ses.ses:this.ses)||{},r=this.ses.aws||{};const o={RawMessage:{Data:"From: invalid@invalid\r\nTo: invalid@invalid\r\n Subject: Invalid\r\n\r\nInvalid"},Source:"invalid@invalid",Destinations:["invalid@invalid"]};e||(t=new Promise(((t,n)=>{e=i.callbackPromise(t,n)})));const s=t=>t&&"InvalidParameterValue"!==(t.code||t.Code)?e(t):e(null,!0);return"function"==typeof n.send&&r.SendRawEmailCommand?(o.RawMessage.Data=Buffer.from(o.RawMessage.Data),n.send(new r.SendRawEmailCommand(o),s)):n.sendRawEmail(o,s),t}},_I}var II=function(){if(CI)return tA;CI=1;const e=lI(),n=jA(),i=PI(),r=function(){if(yI)return gI;yI=1;const e=t,n=uI(),i=TI(),r=jA(),o=pI(),s=RA;return gI=class extends e{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let o=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=r.parseConnectionUrl(e.url),o=o||t.service),this.options=r.assign(!1,e,t,o&&i(o)),this.logger=r.getLogger(this.options,{component:this.options.component||"smtp-transport"});let a=new n(this.options);this.name="SMTP",this.version=s.version+"[client:"+a.version+"]",this.options.auth&&(this.auth=this.getAuth({}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}getAuth(e){if(!e)return this.auth;let t=!1,n={};if(this.options.auth&&"object"==typeof this.options.auth&&Object.keys(this.options.auth).forEach((e=>{t=!0,n[e]=this.options.auth[e]})),e&&"object"==typeof e&&Object.keys(e).forEach((i=>{t=!0,n[i]=e[i]})),!t)return!1;if("OAUTH2"===(n.type||"").toString().toUpperCase()){if(!n.service&&!n.user)return!1;let e=new o(n,this.logger);return e.provisionCallback=this.mailer&&this.mailer.get("oauth2_provision_cb")||e.provisionCallback,e.on("token",(e=>this.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e))),{type:"OAUTH2",user:n.user,oauth2:e,method:"XOAUTH2"}}return{type:(n.type||"").toString().toUpperCase()||"LOGIN",user:n.user,credentials:{user:n.user||"",pass:n.pass,options:n.options},method:(n.method||"").trim().toUpperCase()||this.options.authMethod||!1}}send(e,t){this.getSocket(this.options,((i,o)=>{if(i)return t(i);let s=!1,a=this.options;o&&o.connection&&(this.logger.info({tnx:"proxy",remoteAddress:o.connection.remoteAddress,remotePort:o.connection.remotePort,destHost:a.host||"",destPort:a.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",o.connection.remoteAddress,o.connection.remotePort,a.host||"",a.port||""),a=r.assign(!1,a),Object.keys(o).forEach((e=>{a[e]=o[e]})));let c=new n(a);c.once("error",(e=>{if(!s)return s=!0,c.close(),t(e)})),c.once("end",(()=>{if(s)return;let e=setTimeout((()=>{if(s)return;s=!0;let e=new Error("Unexpected socket close");c&&c._socket&&c._socket.upgrading&&(e.code="ETLS"),t(e)}),1e3);try{e.unref()}catch(e){}}));let l=()=>{let n=e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),e.data.dsn&&(n.dsn=e.data.dsn),this.logger.info({tnx:"send",messageId:i},"Sending message %s to <%s>",i,r.join(", ")),c.send(n,e.message.createReadStream(),((e,r)=>{if(s=!0,c.close(),e)return this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",i,e.message),t(e);r.envelope={from:n.from,to:n.to},r.messageId=i;try{return t(null,r)}catch(e){this.logger.error({err:e,tnx:"callback"},"Callback error for %s: %s",i,e.message)}}))};c.connect((()=>{if(s)return;let n=this.getAuth(e.data.auth);n&&(c.allowsAuth||a.forceAuth)?c.login(n,(e=>{if(n&&n!==this.auth&&n.oauth2&&n.oauth2.removeAllListeners(),!s)return e?(s=!0,c.close(),t(e)):void l()})):l()}))}))}verify(e){let t;return e||(t=new Promise(((t,n)=>{e=r.callbackPromise(t,n)}))),this.getSocket(this.options,((t,i)=>{if(t)return e(t);let o=this.options;i&&i.connection&&(this.logger.info({tnx:"proxy",remoteAddress:i.connection.remoteAddress,remotePort:i.connection.remotePort,destHost:o.host||"",destPort:o.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",i.connection.remoteAddress,i.connection.remotePort,o.host||"",o.port||""),o=r.assign(!1,o),Object.keys(i).forEach((e=>{o[e]=i[e]})));let s=new n(o),a=!1;s.once("error",(t=>{if(!a)return a=!0,s.close(),e(t)})),s.once("end",(()=>{if(!a)return a=!0,e(new Error("Connection closed"))}));let c=()=>{if(!a)return a=!0,s.quit(),e(null,!0)};s.connect((()=>{if(a)return;let t=this.getAuth({});if(t&&(s.allowsAuth||o.forceAuth))s.login(t,(t=>{if(!a)return t?(a=!0,s.close(),e(t)):void c()}));else{if(!t&&s.allowsAuth&&o.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",a=!0,s.close(),e(t)}c()}}))})),t}close(){this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.emit("close")}},gI}(),o=function(){if(bI)return vI;bI=1;const e=f.spawn,t=RA,n=jA();return vI=class{constructor(i){i=i||{},this._spawn=e,this.options=i||{},this.name="Sendmail",this.version=t.version,this.path="sendmail",this.args=!1,this.winbreak=!1,this.logger=n.getLogger(this.options,{component:this.options.component||"sendmail"}),i&&("string"==typeof i?this.path=i:"object"==typeof i&&(i.path&&(this.path=i.path),Array.isArray(i.args)&&(this.args=i.args),this.winbreak=["win","windows","dos","\r\n"].includes((i.newline||"").toString().toLowerCase())))}send(e,t){e.message.keepBcc=!0;let n,i,r,o=e.data.envelope||e.message.getEnvelope(),s=e.message.messageId();if([].concat(o.from||[]).concat(o.to||[]).some((e=>/^-/.test(e))))return t(new Error("Can not send mail. Invalid envelope addresses."));n=this.args?["-i"].concat(this.args).concat(o.to):["-i"].concat(o.from?["-f",o.from]:[]).concat(o.to);let a=n=>{if(!r)return r=!0,"function"==typeof t?n?t(n):t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:s,response:"Messages queued for delivery"}):void 0};try{i=this._spawn(this.path,n)}catch(e){return this.logger.error({err:e,tnx:"spawn",messageId:s},"Error occurred while spawning sendmail. %s",e.message),a(e)}if(!i)return a(new Error("sendmail was not found"));{i.on("error",(e=>{this.logger.error({err:e,tnx:"spawn",messageId:s},"Error occurred when sending message %s. %s",s,e.message),a(e)})),i.once("exit",(e=>{if(!e)return a();let t;t=127===e?new Error("Sendmail command not found, process exited with code "+e):new Error("Sendmail exited with code "+e),this.logger.error({err:t,tnx:"stdin",messageId:s},"Error sending message %s to sendmail. %s",s,t.message),a(t)})),i.once("close",a),i.stdin.on("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:s},"Error occurred when piping message %s to sendmail. %s",s,e.message),a(e)}));let t=[].concat(o.to||[]);t.length>3&&t.push("...and "+t.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:s},"Sending message %s to <%s>",s,t.join(", "));let n=e.message.createReadStream();n.once("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:s},"Error occurred when generating message %s. %s",s,e.message),i.kill("SIGINT"),a(e)})),n.pipe(i.stdin)}}}}(),s=function(){if(wI)return xI;wI=1;const e=RA,t=jA();return xI=class{constructor(n){n=n||{},this.options=n||{},this.name="StreamTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"stream-transport"}),this.winbreak=["win","windows","dos","\r\n"].includes((n.newline||"").toString().toLowerCase())}send(e,t){e.message.keepBcc=!0;let n=e.data.envelope||e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i},"Sending message %s to <%s> using %s line breaks",i,r.join(", "),this.winbreak?"<CR><LF>":"<LF>"),setImmediate((()=>{let n;try{n=e.message.createReadStream()}catch(e){return this.logger.error({err:e,tnx:"send",messageId:i},"Creating send stream failed for %s. %s",i,e.message),t(e)}if(!this.options.buffer)return n.once("error",(e=>{this.logger.error({err:e,tnx:"send",messageId:i},"Failed creating message for %s. %s",i,e.message)})),t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:i,message:n});let r=[],o=0;n.on("readable",(()=>{let e;for(;null!==(e=n.read());)r.push(e),o+=e.length})),n.once("error",(e=>(this.logger.error({err:e,tnx:"send",messageId:i},"Failed creating message for %s. %s",i,e.message),t(e)))),n.on("end",(()=>t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:i,message:Buffer.concat(r,o)})))}))}},xI}(),a=function(){if(SI)return EI;SI=1;const e=RA,t=jA();return EI=class{constructor(n){n=n||{},this.options=n||{},this.name="JSONTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"json-transport"})}send(e,t){e.message.keepBcc=!0;let n=e.data.envelope||e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i},"Composing JSON structure of %s to <%s>",i,r.join(", ")),setImmediate((()=>{e.normalize(((e,r)=>e?(this.logger.error({err:e,tnx:"send",messageId:i},"Failed building JSON structure for %s. %s",i,e.message),t(e)):(delete r.envelope,delete r.normalizedHeaders,t(null,{envelope:n,messageId:i,message:this.options.skipEncoding?r:JSON.stringify(r)}))))}))}}}(),c=AI(),l=MA(),u=RA,p=(process.env.ETHEREAL_API||"https://api.nodemailer.com").replace(/\/+$/,""),d=(process.env.ETHEREAL_WEB||"https://ethereal.email").replace(/\/+$/,""),m=(process.env.ETHEREAL_API_KEY||"").replace(/\s*/g,"")||null,h=["true","yes","y","1"].includes((process.env.ETHEREAL_CACHE||"yes").toString().trim().toLowerCase());let g=!1;return tA.createTransport=function(t,l){let u,p,d;return("object"==typeof t&&"function"!=typeof t.send||"string"==typeof t&&/^(smtps?|direct):/i.test(t))&&(p=(u="string"==typeof t?t:t.url)?n.parseConnectionUrl(u):t,t=p.pool?new i(p):p.sendmail?new o(p):p.streamTransport?new s(p):p.jsonTransport?new a(p):p.SES?new c(p):new r(p)),d=new e(t,p,l),d},tA.createTestAccount=function(e,t){let i;if(t||"function"!=typeof e||(t=e,e=!1),t||(i=new Promise(((e,i)=>{t=n.callbackPromise(e,i)}))),h&&g)return setImmediate((()=>t(null,g))),i;e=e||p;let r=[],o=0,s={},a={requestor:u.name,version:u.version};m&&(s.Authorization="Bearer "+m);let c=l(e+"/user",{contentType:"application/json",method:"POST",headers:s,body:Buffer.from(JSON.stringify(a))});return c.on("readable",(()=>{let e;for(;null!==(e=c.read());)r.push(e),o+=e.length})),c.once("error",(e=>t(e))),c.once("end",(()=>{let e,n,i=Buffer.concat(r,o);try{e=JSON.parse(i.toString())}catch(e){n=e}return n?t(n):"success"!==e.status||e.error?t(new Error(e.error||"Request failed")):(delete e.status,g=e,void t(null,g))})),i},tA.getTestMessageUrl=function(e){if(!e||!e.response)return!1;let t=new Map;return e.response.replace(/\[([^\]]+)\]$/,((e,n)=>{n.replace(/\b([A-Z0-9]+)=([^\s]+)/g,((e,n,i)=>{t.set(n,i)}))})),!(!t.has("STATUS")||!t.has("MSGID"))&&(g.web||d)+"/message/"+t.get("MSGID")},tA}();const RI={clientConfig:{region:"eu-west-1"}};var MI,jI,$I={},NI={};function DI(){if(jI)return MI;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,r){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,i()?Reflect.construct(n,r||[],o(t).constructor):n.apply(t,r))}function n(e){var t="function"==typeof Map?new Map:void 0;return n=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(i())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var s=new(e.bind.apply(e,o));return n&&r(s,n.prototype),s}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),r(n,e)},n(e)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}jI=1;var s=function(e){function n(e){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),i=t(this,n,["Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ".concat(e.toString().split("\n")[0],"\n")]),Error.captureStackTrace(i,n),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}(n,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(n(Error));return MI=function(e){if(e.length>2)throw new s(e);function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=e}function n(e){return new t(e)}return t.prototype.transform=e,n.Format=t,n},MI}var LI,zI,FI,UI,BI,HI={exports:{}},qI={exports:{}},VI={exports:{}},GI={exports:{}};function WI(){return LI||(LI=1,function(e){var t={};e.exports=t;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach((function(e){var i=n[e],r=t[e]=[];r.open="["+i[0]+"m",r.close="["+i[1]+"m"}))}(GI)),GI.exports}function KI(){return FI?zI:(FI=1,zI=function(e,t){var n=(t=t||process.argv||[]).indexOf("--"),i=/^-{1,2}/.test(e)?"":"--",r=t.indexOf(i+e);return-1!==r&&(-1===n||r<n)})}function YI(){if(BI)return UI;BI=1;var e=p,t=KI(),n=[],i=void 0;function r(r){var o=function(r){if(!1===i)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(r&&!r.isTTY&&!0!==i)return 0;var o=i?1:0;if("win32"===process.platform){var s=e.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in n)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in n}))||"codeship"===n.CI_NAME?1:o;if("TEAMCITY_VERSION"in n)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(n.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in n){var a=parseInt((n.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(n.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(n.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(n.TERM)||"COLORTERM"in n?1:o}(r);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(o)}return t("no-color")||t("no-colors")||t("color=false")?i=!1:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(i=!0),"FORCE_COLOR"in n&&(i=0===n.FORCE_COLOR.length||0!==parseInt(n.FORCE_COLOR,10)),UI={supportsColor:r,stdout:r(process.stdout),stderr:r(process.stderr)}}var QI,JI={exports:{}};var XI,ZI={exports:{}};var eR,tR={exports:{}};var nR,iR={exports:{}};var rR,oR={exports:{}};var sR,aR,cR,lR={exports:{}};function uR(){return aR||(aR=1,function(e){var t={};e.exports=t,t.themes={};var n=i,r=t.styles=WI(),o=Object.defineProperties,s=new RegExp(/[\r\n]+/g);t.supportsColor=YI().supportsColor,void 0===t.enabled&&(t.enabled=!1!==t.supportsColor()),t.enable=function(){t.enabled=!0},t.disable=function(){t.enabled=!1},t.stripColors=t.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")},t.stylize=function(e,n){if(!t.enabled)return e+"";var i=r[n];return!i&&n in t?t[n](e):i.open+e+i.close};var a=/[|\\{}()[\]^$+*?.]/g;function c(e){var t=function e(){return d.apply(e,arguments)};return t._styles=e,t.__proto__=p,t}var l,u=(l={},r.grey=r.gray,Object.keys(r).forEach((function(e){r[e].closeRe=new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(a,"\\$&")}(r[e].close),"g"),l[e]={get:function(){return c(this._styles.concat(e))}}})),l),p=o((function(){}),u);function d(){var e=Array.prototype.slice.call(arguments).map((function(e){return null!=e&&e.constructor===String?e:n.inspect(e)})).join(" ");if(!t.enabled||!e)return e;for(var i=-1!=e.indexOf("\n"),o=this._styles,a=o.length;a--;){var c=r[o[a]];e=c.open+e.replace(c.closeRe,c.open)+c.close,i&&(e=e.replace(s,(function(e){return c.close+e+c.open})))}return e}t.setTheme=function(e){if("string"!=typeof e)for(var n in e)!function(n){t[n]=function(i){if("object"==typeof e[n]){var r=i;for(var o in e[n])r=t[e[n][o]](r);return r}return t[e[n]](i)}}(n);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var m=function(e,t){var n=t.split("");return(n=n.map(e)).join("")};for(var h in t.trap=(QI||(QI=1,function(e){e.exports=function(e,t){var n="";e=(e=e||"Run the trap, drop the bass").split("");var i={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return e.forEach((function(e){e=e.toLowerCase();var t=i[e]||[" "],r=Math.floor(Math.random()*t.length);n+=void 0!==i[e]?i[e][r]:e})),n}}(JI)),JI.exports),t.zalgo=(XI||(XI=1,function(e){e.exports=function(e,t){e=e||" he is here ";var n={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},i=[].concat(n.up,n.down,n.mid);function r(e){return Math.floor(Math.random()*e)}function o(e){var t=!1;return i.filter((function(n){t=n===e})),t}return function(e,t){var i,s,a="";for(s in(t=t||{}).up=void 0===t.up||t.up,t.mid=void 0===t.mid||t.mid,t.down=void 0===t.down||t.down,t.size=void 0!==t.size?t.size:"maxi",e=e.split(""))if(!o(s)){switch(a+=e[s],i={up:0,down:0,mid:0},t.size){case"mini":i.up=r(8),i.mid=r(2),i.down=r(8);break;case"maxi":i.up=r(16)+3,i.mid=r(4)+1,i.down=r(64)+3;break;default:i.up=r(8)+1,i.mid=r(6)/2,i.down=r(8)+1}var c=["up","mid","down"];for(var l in c)for(var u=c[l],p=0;p<=i[u];p++)t[u]&&(a+=n[u][r(n[u].length)])}return a}(e,t)}}(ZI)),ZI.exports),t.maps={},t.maps.america=(eR||(eR=1,function(e){e.exports=function(e){return function(t,n,i){if(" "===t)return t;switch(n%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}}(tR)),tR.exports)(t),t.maps.zebra=(nR||(nR=1,function(e){e.exports=function(e){return function(t,n,i){return n%2==0?t:e.inverse(t)}}}(iR)),iR.exports)(t),t.maps.rainbow=(rR||(rR=1,function(e){e.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(n,i,r){return" "===n?n:e[t[i++%t.length]](n)}}}(oR)),oR.exports)(t),t.maps.random=(sR||(sR=1,function(e){e.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(n,i,r){return" "===n?n:e[t[Math.round(Math.random()*(t.length-2))]](n)}}}(lR)),lR.exports)(t),t.maps)!function(e){t[e]=function(n){return m(t.maps[e],n)}}(h);o(t,function(){var e={};return Object.keys(u).forEach((function(t){e[t]={get:function(){return c([t])}}})),e}())}(VI)),VI.exports}function pR(){return cR||(cR=1,function(e){var t=uR();e.exports=t}(qI)),qI.exports}var dR,mR={},hR={},fR={};var gR,yR={};var vR,bR,xR,wR,ER,SR,_R,OR,CR={};function kR(){return xR||(xR=1,function(e){Object.defineProperty(e,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(e,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(e,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(e,"configs",{value:(bR||(bR=1,function(e){Object.defineProperty(e,"cli",{value:(dR||(dR=1,fR.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},fR.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}),fR)}),Object.defineProperty(e,"npm",{value:(gR||(gR=1,yR.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},yR.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}),yR)}),Object.defineProperty(e,"syslog",{value:(vR||(vR=1,CR.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},CR.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}),CR)})}(hR)),hR)})}(mR)),mR}function TR(){if(wR)return HI.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}wR=1;var i=pR(),r=kR(),o=r.LEVEL,s=r.MESSAGE;i.enabled=!0;var a=/\s+/,c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.colors&&this.addColors(t.colors),this.options=t}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"addColors",value:function(t){return e.addColors(t)}},{key:"colorize",value:function(t,n,r){if(void 0===r&&(r=n),!Array.isArray(e.allColors[t]))return i[e.allColors[t]](r);for(var o=0,s=e.allColors[t].length;o<s;o++)r=i[e.allColors[t][o]](r);return r}},{key:"transform",value:function(e,t){return t.all&&"string"==typeof e[s]&&(e[s]=this.colorize(e[o],e.level,e[s])),(t.level||t.all||!t.message)&&(e.level=this.colorize(e[o],e.level)),(t.all||t.message)&&(e.message=this.colorize(e[o],e.level,e.message)),e}}],[{key:"addColors",value:function(t){var n=Object.keys(t).reduce((function(e,n){return e[n]=a.test(t[n])?t[n].split(a):t[n],e}),{});return e.allColors=Object.assign({},e.allColors||{},n),e.allColors}}])}();return HI.exports=function(e){return new c(e)},HI.exports.Colorizer=HI.exports.Format=c,HI.exports}function PR(){if(OR)return _R;OR=1;var e=DI();return _R=e((function(e){return e.message="\t".concat(e.message),e}))}var AR,IR,RR={exports:{}},MR={exports:{}};function jR(){if(AR)return MR.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}function r(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}AR=1;var o=kR(),s=o.configs,a=o.LEVEL,c=o.MESSAGE,l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{levels:s.npm.levels};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.paddings=e.paddingForLevels(t.levels,t.filler),this.options=t}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"transform",value:function(e,t){return e.message="".concat(this.paddings[e[a]]).concat(e.message),e[c]&&(e[c]="".concat(this.paddings[e[a]]).concat(e[c])),e}}],[{key:"getLongestLevel",value:function(e){var n=Object.keys(e).map((function(e){return e.length}));return Math.max.apply(Math,t(n))}},{key:"paddingForLevel",value:function(e,t,n){var i=n+1-e.length,r=Math.floor(i/t.length);return"".concat(t).concat(t.repeat(r)).slice(0,i)}},{key:"paddingForLevels",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",i=e.getLongestLevel(t);return Object.keys(t).reduce((function(t,r){return t[r]=e.paddingForLevel(r,n,i),t}),{})}}])}();return MR.exports=function(e){return new l(e)},MR.exports.Padder=MR.exports.Format=l,MR.exports}function $R(){if(IR)return RR.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}IR=1;var i=TR().Colorizer,r=jR().Padder,o=kR(),s=o.configs,a=o.MESSAGE,c=function(){return t((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.levels||(t.levels=s.cli.levels),this.colorizer=new i(t),this.padder=new r(t),this.options=t}),[{key:"transform",value:function(e,t){return this.colorizer.transform(this.padder.transform(e,t),t),e[a]="".concat(e.level,":").concat(e.message),e}}])}();return RR.exports=function(e){return new c(e)},RR.exports.Format=c,RR.exports}var NR,DR,LR,zR={exports:{}};function FR(){if(NR)return zR.exports;NR=1;var e=DI();function t(e){if(e.every(n))return function(t){for(var n=t,i=0;i<e.length;i++)if(!(n=e[i].transform(n,e[i].options)))return!1;return n}}function n(e){if("function"!=typeof e.transform)throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join("\n"));return!0}return zR.exports=function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=e(t(i)),s=o();return s.Format=o.Format,s},zR.exports.cascade=t,zR.exports}function UR(){if(LR)return DR;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,i){return(n=function(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}LR=1;var n=DI(),i=kR(),r=i.LEVEL,o=i.MESSAGE;return DR=n((function(e,n){var i=n.stack,s=n.cause;if(e instanceof Error){var a=Object.assign({},e,t(t(t({level:e.level},r,e[r]||e.level),"message",e.message),o,e[o]||e.message));return i&&(a.stack=e.stack),s&&(a.cause=e.cause),a}if(!(e.message instanceof Error))return e;var c=e.message;return Object.assign(e,c),e.message=c.message,e[o]=c.message,i&&(e.stack=c.stack),s&&(e.cause=c.cause),e}))}var BR,HR,qR,VR,GR,WR,KR,YR,QR,JR,XR,ZR,eM,tM,nM,iM={exports:{}};function rM(){return BR||(BR=1,function(e,t){const{hasOwnProperty:n}=Object.prototype,i=d();i.configure=d,i.stringify=i,i.default=i,t.stringify=i,t.configure=d,e.exports=i;const r=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function o(e){return e.length<5e3&&!r.test(e)?`"${e}"`:JSON.stringify(e)}function s(e,t){if(e.length>200||t)return e.sort(t);for(let t=1;t<e.length;t++){const n=e[t];let i=t;for(;0!==i&&e[i-1]>n;)e[i]=e[i-1],i--;e[i]=n}return e}const a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function c(e){return void 0!==a.call(e)&&0!==e.length}function l(e,t,n){e.length<n&&(n=e.length);const i=","===t?"":" ";let r=`"0":${i}${e[0]}`;for(let o=1;o<n;o++)r+=`${t}"${o}":${i}${e[o]}`;return r}function u(e,t){let i;if(n.call(e,t)){if(i=e[t],"number"!=typeof i)throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(i))throw new TypeError(`The "${t}" argument must be an integer`);if(i<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return void 0===i?1/0:i}function p(e){return 1===e?"1 item":`${e} items`}function d(e){const t=function(e){if(n.call(e,"strict")){const t=e.strict;if("boolean"!=typeof t)throw new TypeError('The "strict" argument must be of type boolean');if(t)return e=>{let t="Object can not safely be stringified. Received type "+typeof e;throw"function"!=typeof e&&(t+=` (${e.toString()})`),new Error(t)}}}(e={...e});t&&(void 0===e.bigint&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));const i=function(e){if(n.call(e,"circularValue")){const t=e.circularValue;if("string"==typeof t)return`"${t}"`;if(null==t)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}(e),r=function(e,t){let i;if(n.call(e,t)&&(i=e[t],"boolean"!=typeof i))throw new TypeError(`The "${t}" argument must be of type boolean`);return void 0===i||i}(e,"bigint"),a=function(e){let t;if(n.call(e,"deterministic")&&(t=e.deterministic,"boolean"!=typeof t&&"function"!=typeof t))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return void 0===t||t}(e),d="function"==typeof a?a:void 0,m=u(e,"maximumDepth"),h=u(e,"maximumBreadth");function f(e,n,l,u,g,y){let v=n[e];switch("object"==typeof v&&null!==v&&"function"==typeof v.toJSON&&(v=v.toJSON(e)),v=u.call(n,e,v),typeof v){case"string":return o(v);case"object":{if(null===v)return"null";if(-1!==l.indexOf(v))return i;let e="",t=",";const n=y;if(Array.isArray(v)){if(0===v.length)return"[]";if(m<l.length+1)return'"[Array]"';l.push(v),""!==g&&(e+=`\n${y+=g}`,t=`,\n${y}`);const i=Math.min(v.length,h);let r=0;for(;r<i-1;r++){const n=f(String(r),v,l,u,g,y);e+=void 0!==n?n:"null",e+=t}const o=f(String(r),v,l,u,g,y);if(e+=void 0!==o?o:"null",v.length-1>h){e+=`${t}"... ${p(v.length-h-1)} not stringified"`}return""!==g&&(e+=`\n${n}`),l.pop(),`[${e}]`}let r=Object.keys(v);const b=r.length;if(0===b)return"{}";if(m<l.length+1)return'"[Object]"';let x="",w="";""!==g&&(t=`,\n${y+=g}`,x=" ");const E=Math.min(b,h);a&&!c(v)&&(r=s(r,d)),l.push(v);for(let n=0;n<E;n++){const i=r[n],s=f(i,v,l,u,g,y);void 0!==s&&(e+=`${w}${o(i)}:${x}${s}`,w=t)}if(b>h){e+=`${w}"...":${x}"${p(b-h)} not stringified"`,w=t}return""!==g&&w.length>1&&(e=`\n${y}${e}\n${n}`),l.pop(),`{${e}}`}case"number":return isFinite(v)?String(v):t?t(v):"null";case"boolean":return!0===v?"true":"false";case"undefined":return;case"bigint":if(r)return String(v);default:return t?t(v):void 0}}function g(e,n,s,a,c,l){switch("object"==typeof n&&null!==n&&"function"==typeof n.toJSON&&(n=n.toJSON(e)),typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if(-1!==s.indexOf(n))return i;const e=l;let t="",r=",";if(Array.isArray(n)){if(0===n.length)return"[]";if(m<s.length+1)return'"[Array]"';s.push(n),""!==c&&(t+=`\n${l+=c}`,r=`,\n${l}`);const i=Math.min(n.length,h);let o=0;for(;o<i-1;o++){const e=g(String(o),n[o],s,a,c,l);t+=void 0!==e?e:"null",t+=r}const u=g(String(o),n[o],s,a,c,l);if(t+=void 0!==u?u:"null",n.length-1>h){t+=`${r}"... ${p(n.length-h-1)} not stringified"`}return""!==c&&(t+=`\n${e}`),s.pop(),`[${t}]`}s.push(n);let u="";""!==c&&(r=`,\n${l+=c}`,u=" ");let d="";for(const e of a){const i=g(e,n[e],s,a,c,l);void 0!==i&&(t+=`${d}${o(e)}:${u}${i}`,d=r)}return""!==c&&d.length>1&&(t=`\n${l}${t}\n${e}`),s.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}function y(e,n,u,f,g){switch(typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return y(e,n,u,f,g);if(null===n)return"null"}if(-1!==u.indexOf(n))return i;const t=g;if(Array.isArray(n)){if(0===n.length)return"[]";if(m<u.length+1)return'"[Array]"';u.push(n);let e=`\n${g+=f}`;const i=`,\n${g}`,r=Math.min(n.length,h);let o=0;for(;o<r-1;o++){const t=y(String(o),n[o],u,f,g);e+=void 0!==t?t:"null",e+=i}const s=y(String(o),n[o],u,f,g);if(e+=void 0!==s?s:"null",n.length-1>h){e+=`${i}"... ${p(n.length-h-1)} not stringified"`}return e+=`\n${t}`,u.pop(),`[${e}]`}let r=Object.keys(n);const v=r.length;if(0===v)return"{}";if(m<u.length+1)return'"[Object]"';const b=`,\n${g+=f}`;let x="",w="",E=Math.min(v,h);c(n)&&(x+=l(n,b,h),r=r.slice(n.length),E-=n.length,w=b),a&&(r=s(r,d)),u.push(n);for(let e=0;e<E;e++){const t=r[e],i=y(t,n[t],u,f,g);void 0!==i&&(x+=`${w}${o(t)}: ${i}`,w=b)}if(v>h){x+=`${w}"...": "${p(v-h)} not stringified"`,w=b}return""!==w&&(x=`\n${g}${x}\n${t}`),u.pop(),`{${x}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}function v(e,n,u){switch(typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return v(e,n,u);if(null===n)return"null"}if(-1!==u.indexOf(n))return i;let t="";const r=void 0!==n.length;if(r&&Array.isArray(n)){if(0===n.length)return"[]";if(m<u.length+1)return'"[Array]"';u.push(n);const e=Math.min(n.length,h);let i=0;for(;i<e-1;i++){const e=v(String(i),n[i],u);t+=void 0!==e?e:"null",t+=","}const r=v(String(i),n[i],u);if(t+=void 0!==r?r:"null",n.length-1>h){t+=`,"... ${p(n.length-h-1)} not stringified"`}return u.pop(),`[${t}]`}let f=Object.keys(n);const g=f.length;if(0===g)return"{}";if(m<u.length+1)return'"[Object]"';let y="",b=Math.min(g,h);r&&c(n)&&(t+=l(n,",",h),f=f.slice(n.length),b-=n.length,y=","),a&&(f=s(f,d)),u.push(n);for(let e=0;e<b;e++){const i=f[e],r=v(i,n[i],u);void 0!==r&&(t+=`${y}${o(i)}:${r}`,y=",")}if(g>h){t+=`${y}"...":"${p(g-h)} not stringified"`}return u.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}return function(e,t,n){if(arguments.length>1){let i="";if("number"==typeof n?i=" ".repeat(Math.min(n,10)):"string"==typeof n&&(i=n.slice(0,10)),null!=t){if("function"==typeof t)return f("",{"":e},[],t,i,"");if(Array.isArray(t))return g("",e,[],function(e){const t=new Set;for(const n of e)"string"!=typeof n&&"number"!=typeof n||t.add(String(n));return t}(t),i,"")}if(0!==i.length)return y("",e,[],i,"")}return v("",e,[])}}}(iM,iM.exports)),iM.exports}function oM(){if(qR)return HR;qR=1;var e=DI(),t=kR().MESSAGE,n=rM();function i(e,t){return"bigint"==typeof t?t.toString():t}return HR=e((function(e,r){var o=n.configure(r);return e[t]=o(e,r.replacer||i,r.space),e}))}function sM(){if(GR)return VR;GR=1;var e=DI();return VR=e((function(e,t){return t.message?(e.message="[".concat(t.label,"] ").concat(e.message),e):(e.label=t.label,e)}))}function aM(){if(KR)return WR;KR=1;var e=DI(),t=kR().MESSAGE,n=rM();return WR=e((function(e){var i={};return e.message&&(i["@message"]=e.message,delete e.message),e.timestamp&&(i["@timestamp"]=e.timestamp,delete e.timestamp),i["@fields"]=e,e[t]=n(i),e}))}function cM(){if(QR)return YR;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,i){return(n=function(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}QR=1;var n=DI();return YR=n((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i="metadata";n.key&&(i=n.key);var r=[];return n.fillExcept||n.fillWith||(r.push("level"),r.push("message")),n.fillExcept&&(r=n.fillExcept),r.length>0?function(e,n,i){var r=n.reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{}),o=Object.keys(e).reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{});return Object.assign(e,r,t({},i,o)),e}(e,r,i):n.fillWith?function(e,t,n){return e[n]=t.reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{}),e}(e,n.fillWith,i):e})),YR}function lM(){if(XR)return JR;XR=1;var e=1e3,t=60*e,n=60*t,i=24*n,r=7*i,o=365.25*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}return JR=function(a,c){c=c||{};var l=typeof a;if("string"===l&&a.length>0)return function(s){if((s=String(s)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*r;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(a);if("number"===l&&isFinite(a))return c.long?function(r){var o=Math.abs(r);if(o>=i)return s(r,o,i,"day");if(o>=n)return s(r,o,n,"hour");if(o>=t)return s(r,o,t,"minute");if(o>=e)return s(r,o,e,"second");return r+" ms"}(a):function(r){var o=Math.abs(r);if(o>=i)return Math.round(r/i)+"d";if(o>=n)return Math.round(r/n)+"h";if(o>=t)return Math.round(r/t)+"m";if(o>=e)return Math.round(r/e)+"s";return r+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},JR}function uM(){if(eM)return ZR;eM=1;var e=void 0,t=DI(),n=lM();return ZR=t((function(t){var i=+new Date;return e.diff=i-(e.prevTime||i),e.prevTime=i,t.ms="+".concat(n(e.diff)),t}))}function pM(){if(nM)return tM;nM=1;var e=i.inspect,t=DI(),n=kR(),r=n.LEVEL,o=n.MESSAGE,s=n.SPLAT;return tM=t((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Object.assign({},t);return delete i[r],delete i[o],delete i[s],t[o]=e(i,!1,n.depth||null,n.colorize),t})),tM}var dM,mM,hM,fM,gM,yM={exports:{}};function vM(){if(dM)return yM.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}dM=1;var i=kR().MESSAGE,r=function(){return t((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.template=t}),[{key:"transform",value:function(e){return e[i]=this.template(e),e}}])}();return yM.exports=function(e){return new r(e)},yM.exports.Printf=yM.exports.Format=r,yM.exports}function bM(){if(hM)return mM;hM=1;var e=DI(),t=kR().MESSAGE,n=rM();return mM=e((function(e){var i=n(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),r=e.padding&&e.padding[e.level]||"";return e[t]="{}"!==i?"".concat(e.level,":").concat(r," ").concat(e.message," ").concat(i):"".concat(e.level,":").concat(r," ").concat(e.message),e}))}function xM(){if(gM)return fM;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,o(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}gM=1;var s=i,a=kR().SPLAT,c=/%[scdjifoO%]/g,l=/%%/g,u=function(){return r((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t}),[{key:"_splat",value:function(e,n){var i=e.message,r=e[a]||e.splat||[],o=i.match(l),c=o&&o.length||0,u=n.length-c-r.length,p=u<0?r.splice(u,-1*u):[],d=p.length;if(d)for(var m=0;m<d;m++)Object.assign(e,p[m]);return e.message=s.format.apply(s,[i].concat(t(r))),e}},{key:"transform",value:function(e){var t=e.message,n=e[a]||e.splat;if(!n||!n.length)return e;var i=t&&t.match&&t.match(c);if(!i&&(n||n.length)){var r=n.length>1?n.splice(0):n,o=r.length;if(o)for(var s=0;s<o;s++)Object.assign(e,r[s]);return e}return i?this._splat(e,i):e}}])}();return fM=function(e){return new u(e)}}var wM=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,EM="\\d\\d?",SM="\\d\\d",_M="[^\\s]+",OM=/\[([^]*?)\]/gm;function CM(e,t){for(var n=[],i=0,r=e.length;i<r;i++)n.push(e[i].substr(0,t));return n}var kM=function(e){return function(t,n){var i=n[e].map((function(e){return e.toLowerCase()})),r=i.indexOf(t.toLowerCase());return r>-1?r:null}};function TM(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0,r=t;i<r.length;i++){var o=r[i];for(var s in o)e[s]=o[s]}return e}var PM=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],AM=["January","February","March","April","May","June","July","August","September","October","November","December"],IM=CM(AM,3),RM={dayNamesShort:CM(PM,3),dayNames:PM,monthNamesShort:IM,monthNames:AM,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!=10?1:0)*e%10]}},MM=TM({},RM),jM=function(e){return MM=TM(MM,e)},$M=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},NM=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length<t;)e="0"+e;return e},DM={D:function(e){return String(e.getDate())},DD:function(e){return NM(e.getDate())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return NM(e.getDay())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return NM(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},YY:function(e){return NM(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return NM(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return NM(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return NM(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return NM(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return NM(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return NM(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return NM(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+NM(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+NM(Math.floor(Math.abs(t)/60),2)+":"+NM(Math.abs(t)%60,2)}},LM=function(e){return+e-1},zM=[null,EM],FM=[null,_M],UM=["isPm",_M,function(e,t){var n=e.toLowerCase();return n===t.amPm[0]?0:n===t.amPm[1]?1:null}],BM=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var n=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?n:-n}return 0}],HM={D:["day",EM],DD:["day",SM],Do:["day",EM+_M,function(e){return parseInt(e,10)}],M:["month",EM,LM],MM:["month",SM,LM],YY:["year",SM,function(e){var t=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+e>68?t-1:t)+e)}],h:["hour",EM,void 0,"isPm"],hh:["hour",SM,void 0,"isPm"],H:["hour",EM],HH:["hour",SM],m:["minute",EM],mm:["minute",SM],s:["second",EM],ss:["second",SM],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(e){return 100*+e}],SS:["millisecond",SM,function(e){return 10*+e}],SSS:["millisecond","\\d{3}"],d:zM,dd:zM,ddd:FM,dddd:FM,MMM:["month",_M,kM("monthNamesShort")],MMMM:["month",_M,kM("monthNames")],a:UM,A:UM,ZZ:BM,Z:BM},qM={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},VM=function(e){return TM(qM,e)},GM=function(e,t,n){if(void 0===t&&(t=qM.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var i=[];t=(t=qM[t]||t).replace(OM,(function(e,t){return i.push(t),"@@@"}));var r=TM(TM({},MM),n);return(t=t.replace(wM,(function(t){return DM[t](e,r)}))).replace(/@@@/g,(function(){return i.shift()}))};function WM(e,t,n){if(void 0===n&&(n={}),"string"!=typeof t)throw new Error("Invalid format in fecha parse");if(t=qM[t]||t,e.length>1e3)return null;var i={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],o=[],s=t.replace(OM,(function(e,t){return o.push($M(t)),"@@@"})),a={},c={};s=$M(s).replace(wM,(function(e){var t=HM[e],n=t[0],i=t[1],o=t[3];if(a[n])throw new Error("Invalid format. "+n+" specified twice in format");return a[n]=!0,o&&(c[o]=!0),r.push(t),"("+i+")"})),Object.keys(c).forEach((function(e){if(!a[e])throw new Error("Invalid format. "+e+" is required in specified format")})),s=s.replace(/@@@/g,(function(){return o.shift()}));var l=e.match(new RegExp(s,"i"));if(!l)return null;for(var u,p=TM(TM({},MM),n),d=1;d<l.length;d++){var m=r[d-1],h=m[0],f=m[2],g=f?f(l[d],p):+l[d];if(null==g)return null;i[h]=g}if(1===i.isPm&&null!=i.hour&&12!=+i.hour?i.hour=+i.hour+12:0===i.isPm&&12==+i.hour&&(i.hour=0),null==i.timezoneOffset){u=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var y=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],v=(d=0,y.length);d<v;d++)if(a[y[d][0]]&&i[y[d][0]]!==u[y[d][1]]())return null}else if(u=new Date(Date.UTC(i.year,i.month,i.day,i.hour,i.minute-i.timezoneOffset,i.second,i.millisecond)),i.month>11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return u}var KM,YM,QM,JM,XM,ZM={format:GM,parse:WM,defaultI18n:RM,setGlobalDateI18n:jM,setGlobalDateMasks:VM},ej=ti(Object.freeze({__proto__:null,assign:TM,default:ZM,defaultI18n:RM,format:GM,parse:WM,setGlobalDateI18n:jM,setGlobalDateMasks:VM}));function tj(){if(YM)return KM;YM=1;var e=ej,t=DI();return KM=t((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.format&&(t.timestamp="function"==typeof n.format?n.format():e.format(new Date,n.format)),t.timestamp||(t.timestamp=(new Date).toISOString()),n.alias&&(t[n.alias]=t.timestamp),t})),KM}function nj(){if(JM)return QM;JM=1;var e=pR(),t=DI(),n=kR().MESSAGE;return QM=t((function(t,i){return!1!==i.level&&(t.level=e.strip(t.level)),!1!==i.message&&(t.message=e.strip(String(t.message))),!1!==i.raw&&t[n]&&(t[n]=e.strip(String(t[n]))),t}))}function ij(){if(XM)return NI;XM=1;var e=NI.format=DI();return NI.levels=function(){if(SR)return ER;SR=1;var e=TR().Colorizer;return ER=function(t){return e.addColors(t.colors||t),t},ER}(),Object.defineProperty(e,"align",{value:PR()}),Object.defineProperty(e,"cli",{value:$R()}),Object.defineProperty(e,"colorize",{value:TR()}),Object.defineProperty(e,"combine",{value:FR()}),Object.defineProperty(e,"errors",{value:UR()}),Object.defineProperty(e,"json",{value:oM()}),Object.defineProperty(e,"label",{value:sM()}),Object.defineProperty(e,"logstash",{value:aM()}),Object.defineProperty(e,"metadata",{value:cM()}),Object.defineProperty(e,"ms",{value:uM()}),Object.defineProperty(e,"padLevels",{value:jR()}),Object.defineProperty(e,"prettyPrint",{value:pM()}),Object.defineProperty(e,"printf",{value:vM()}),Object.defineProperty(e,"simple",{value:bM()}),Object.defineProperty(e,"splat",{value:xM()}),Object.defineProperty(e,"timestamp",{value:tj()}),Object.defineProperty(e,"uncolorize",{value:nj()}),NI}var rj,oj={};function sj(){return rj||(rj=1,function(e){var t=i.format;e.warn={deprecated:function(e){return function(){throw new Error(t("{ %s } was removed in winston@3.0.0.",e))}},useFormat:function(e){return function(){throw new Error([t("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join("\n"))}},forFunctions:function(t,n,i){i.forEach((function(i){t[i]=e.warn[n](i)}))},forProperties:function(t,n,i){i.forEach((function(i){var r=e.warn[n](i);Object.defineProperty(t,i,{get:r,set:r})}))}}}(oj)),oj}var aj,cj,lj,uj,pj,dj,mj="3.17.0",hj={},fj={exports:{}},gj={exports:{}};function yj(){if(cj)return aj;function e(e){try{if(!Zn.localStorage)return!1}catch(e){return!1}var t=Zn.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}return cj=1,aj=function(t,n){if(e("noDeprecation"))return t;var i=!1;return function(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}},aj}function vj(){return uj?lj:(uj=1,lj=t.EventEmitter)}function bj(){if(dj)return pj;function e(e,i){n(e,i),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}return dj=1,pj={destroy:function(i,r){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(r?r(i):i&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,i)):process.nextTick(n,this,i)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(i||null,(function(n){!r&&n?o._writableState?o._writableState.errorEmitted?process.nextTick(t,o):(o._writableState.errorEmitted=!0,process.nextTick(e,o,n)):process.nextTick(e,o,n):r?(process.nextTick(t,o),r(n)):process.nextTick(t,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,i=e._writableState;n&&n.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}},pj}var xj,wj,Ej,Sj={};function _j(){if(xj)return Sj;xj=1;var e={};function t(t,n,i){i||(i=Error);var r=function(e){var t,i;function r(t,i,r){return e.call(this,function(e,t,i){return"string"==typeof n?n:n(e,t,i)}(t,i,r))||this}return i=e,(t=r).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,r}(i);r.prototype.name=i.name,r.prototype.code=t,e[t]=r}function n(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}return t("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,o,s;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(n(t,"type"));else{var a=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(a," ").concat(r," ").concat(n(t,"type"))}return s+=". Received type ".concat(typeof i)}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Sj.codes=e,Sj}function Oj(){if(Ej)return wj;Ej=1;var e=_j().codes.ERR_INVALID_OPT_VALUE;return wj={getHighWaterMark:function(t,n,i,r){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(n,r,i);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new e(r?i:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}}var Cj,kj={exports:{}};function Tj(){return Cj||(Cj=1,"function"==typeof Object.create?kj.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:kj.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),kj.exports}var Pj,Aj,Ij=ti(Object.freeze({__proto__:null,default:{}}));function Rj(){if(Aj)return Pj;function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function t(t){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?e(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}Aj=1;var o=g.Buffer,s=Ij.inspect,a=s&&s.custom||"inspect";return Pj=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return i(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,i,r=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=r,i=a,o.prototype.copy.call(t,n,i),a+=s.data.length,s=s.next;return r}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,i=t.data;for(e-=i.length;t=t.next;){var r=t.data,o=e>r.length?r.length:e;if(o===r.length?i+=r:i+=r.slice(0,e),0===(e-=o)){o===r.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=r.slice(o));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var r=n.data,s=e>r.length?r.length:e;if(r.copy(t,t.length-e,0,s),0===(e-=s)){s===r.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=r.slice(s));break}++i}return this.length-=i,t}},{key:a,value:function(e,n){return s(this,t(t({},n),{},{depth:0,customInspect:!1}))}}]),e}(),Pj}var Mj,jj,$j,Nj,Dj,Lj,zj,Fj,Uj,Bj,Hj,qj,Vj,Gj,Wj,Kj={},Yj={exports:{}};function Qj(){if(jj)return Kj;jj=1;var e=(Mj||(Mj=1,function(e,t){var n=g,i=n.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(r(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),r(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(Yj,Yj.exports)),Yj.exports).Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(n){var i;switch(this.encoding=function(n){var i=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(n);if("string"!=typeof i&&(e.isEncoding===t||!t(n)))throw new Error("Unknown encoding: "+n);return i||n}(n),this.encoding){case"utf16le":this.text=o,this.end=s,i=4;break;case"utf8":this.fillLast=r,i=4;break;case"base64":this.text=a,this.end=c,i=3;break;default:return this.write=l,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(i)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function r(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function a(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}return Kj.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},n.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=i(t[r]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--r<n||-2===o)return 0;if(o=i(t[r]),o>=0)return o>0&&(e.lastNeed=o-2),o;if(--r<n||-2===o)return 0;if(o=i(t[r]),o>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},Kj}function Jj(){if(Nj)return $j;Nj=1;var e=_j().codes.ERR_STREAM_PREMATURE_CLOSE;function t(){}return $j=function n(i,r,o){if("function"==typeof r)return n(i,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];e.apply(this,i)}}}(o||t);var s=r.readable||!1!==r.readable&&i.readable,a=r.writable||!1!==r.writable&&i.writable,c=function(){i.writable||u()},l=i._writableState&&i._writableState.finished,u=function(){a=!1,l=!0,s||o.call(i)},p=i._readableState&&i._readableState.endEmitted,d=function(){s=!1,p=!0,a||o.call(i)},m=function(e){o.call(i,e)},h=function(){var t;return s&&!p?(i._readableState&&i._readableState.ended||(t=new e),o.call(i,t)):a&&!l?(i._writableState&&i._writableState.ended||(t=new e),o.call(i,t)):void 0},f=function(){i.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(i)?a&&!i._writableState&&(i.on("end",c),i.on("close",c)):(i.on("complete",u),i.on("abort",h),i.req?f():i.on("request",f)),i.on("end",d),i.on("finish",u),!1!==r.error&&i.on("error",m),i.on("close",h),function(){i.removeListener("complete",u),i.removeListener("abort",h),i.removeListener("request",f),i.req&&i.req.removeListener("finish",u),i.removeListener("end",c),i.removeListener("close",c),i.removeListener("finish",u),i.removeListener("end",d),i.removeListener("error",m),i.removeListener("close",h)}},$j}function Xj(){if(Lj)return Dj;var e;function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Lj=1;var n=Jj(),i=Symbol("lastResolve"),r=Symbol("lastReject"),o=Symbol("error"),s=Symbol("ended"),a=Symbol("lastPromise"),c=Symbol("handlePromise"),l=Symbol("stream");function u(e,t){return{value:e,done:t}}function p(e){var t=e[i];if(null!==t){var n=e[l].read();null!==n&&(e[a]=null,e[i]=null,e[r]=null,t(u(n,!1)))}}function d(e){process.nextTick(p,e)}var m=Object.getPrototypeOf((function(){})),h=Object.setPrototypeOf((t(e={get stream(){return this[l]},next:function(){var e=this,t=this[o];if(null!==t)return Promise.reject(t);if(this[s])return Promise.resolve(u(void 0,!0));if(this[l].destroyed)return new Promise((function(t,n){process.nextTick((function(){e[o]?n(e[o]):t(u(void 0,!0))}))}));var n,i=this[a];if(i)n=new Promise(function(e,t){return function(n,i){e.then((function(){t[s]?n(u(void 0,!0)):t[c](n,i)}),i)}}(i,this));else{var r=this[l].read();if(null!==r)return Promise.resolve(u(r,!1));n=new Promise(this[c])}return this[a]=n,n}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,n){e[l].destroy(null,(function(e){e?n(e):t(u(void 0,!0))}))}))})),e),m);return Dj=function(e){var p,m=Object.create(h,(t(p={},l,{value:e,writable:!0}),t(p,i,{value:null,writable:!0}),t(p,r,{value:null,writable:!0}),t(p,o,{value:null,writable:!0}),t(p,s,{value:e._readableState.endEmitted,writable:!0}),t(p,c,{value:function(e,t){var n=m[l].read();n?(m[a]=null,m[i]=null,m[r]=null,e(u(n,!1))):(m[i]=e,m[r]=t)},writable:!0}),p));return m[a]=null,n(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=m[r];return null!==t&&(m[a]=null,m[i]=null,m[r]=null,t(e)),void(m[o]=e)}var n=m[i];null!==n&&(m[a]=null,m[i]=null,m[r]=null,n(u(void 0,!0))),m[s]=!0})),e.on("readable",d.bind(null,m)),m},Dj}function Zj(){if(Bj)return Uj;var e;Bj=1,Uj=S,S.ReadableState=E,t.EventEmitter;var n=function(e,t){return e.listeners(t).length},i=vj(),r=g.Buffer,o=(void 0!==Zn?Zn:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,a=Ij;s=a&&a.debuglog?a.debuglog("stream"):function(){};var c,l,u,p=Rj(),d=bj(),m=Oj().getHighWaterMark,h=_j().codes,f=h.ERR_INVALID_ARG_TYPE,y=h.ERR_STREAM_PUSH_AFTER_EOF,v=h.ERR_METHOD_NOT_IMPLEMENTED,b=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Tj()(S,i);var x=d.errorOrDestroy,w=["error","close","destroy","pause","resume"];function E(t,n,i){e=e||e$(),t=t||{},"boolean"!=typeof i&&(i=n instanceof e),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=Qj().StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function S(t){if(e=e||e$(),!(this instanceof S))return new S(t);var n=this instanceof e;this._readableState=new E(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),i.call(this)}function _(e,t,n,i,a){s("readableAddChunk",t);var c,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(s("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}(e,l);else if(a||(c=function(e,t){var n;i=t,r.isBuffer(i)||i instanceof o||"string"==typeof t||void 0===t||e.objectMode||(n=new f("chunk",["string","Buffer","Uint8Array"],t));var i;return n}(l,t)),c)x(e,c);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===r.prototype||(t=function(e){return r.from(e)}(t)),i)l.endEmitted?x(e,new b):O(e,l,t,!0);else if(l.ended)x(e,new y);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?O(e,l,t,!1):A(e,l)):O(e,l,t,!1)}else i||(l.reading=!1,A(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function O(e,t,n,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&T(e)),A(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=d.destroy,S.prototype._undestroy=d.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var n,i=this._readableState;return i.objectMode?n=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=r.from(e,t),t=""),n=!0),_(this,e,t,!1,n)},S.prototype.unshift=function(e){return _(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){c||(c=Qj().StringDecoder);var t=new c(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var C=1073741824;function k(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;s("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(s("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(P,e))}function P(e){var t=e._readableState;s("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,$(e)}function A(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(s("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function R(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){s("readable nexttick read 0"),e.read(0)}function j(e,t){s("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),$(e),t.flowing&&!t.reading&&e.read(0)}function $(e){var t=e._readableState;for(s("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function D(e){var t=e._readableState;s("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(L,t,e))}function L(e,t){if(s("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function z(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}return S.prototype.read=function(e){s("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return s("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):T(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&D(this),null;var i,r=t.needReadable;return s("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&s("length less than watermark",r=!0),t.ended||t.reading?s("reading or ended",r=!1):r&&(s("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=k(n,t))),null===(i=e>0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&D(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){x(this,new v("_read()"))},S.prototype.pipe=function(e,t){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,s("pipe count=%d opts=%j",r.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?c:f;function a(t,n){s("onunpipe"),t===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,s("cleanup"),e.removeListener("close",m),e.removeListener("finish",h),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",a),i.removeListener("end",c),i.removeListener("end",f),i.removeListener("data",p),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){s("onend"),e.end()}r.endEmitted?process.nextTick(o):i.once("end",o),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;s("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&n(e,"data")&&(t.flowing=!0,$(e))}}(i);e.on("drain",l);var u=!1;function p(t){s("ondata");var n=e.write(t);s("dest.write",n),!1===n&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==z(r.pipes,e))&&!u&&(s("false write response, pause",r.awaitDrain),r.awaitDrain++),i.pause())}function d(t){s("onerror",t),f(),e.removeListener("error",d),0===n(e,"error")&&x(e,t)}function m(){e.removeListener("finish",h),f()}function h(){s("onfinish"),e.removeListener("close",m),f()}function f(){s("unpipe"),i.unpipe(e)}return i.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",d),e.once("close",m),e.once("finish",h),e.emit("pipe",i),r.flowing||(s("pipe resume"),i.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<r;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=z(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},S.prototype.on=function(e,t){var n=i.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,s("on readable",r.length,r.reading),r.length?T(this):r.reading||process.nextTick(M,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var n=i.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(R,this),n},S.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(R,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(s("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(j,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,n=this._readableState,i=!1;for(var r in e.on("end",(function(){if(s("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(r){(s("wrapped data"),n.decoder&&(r=n.decoder.write(r)),n.objectMode&&null==r)||(n.objectMode||r&&r.length)&&(t.push(r)||(i=!0,e.pause()))})),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){s("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=Xj()),l(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=N,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(e,t){return void 0===u&&(u=Fj?zj:(Fj=1,zj=function(){throw new Error("Readable.from is not available in the browser")})),u(S,e,t)}),Uj}function e$(){if(qj)return Hj;qj=1;var e=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};Hj=s;var t=Zj(),n=t$();Tj()(s,t);for(var i=e(n.prototype),r=0;r<i.length;r++){var o=i[r];s.prototype[o]||(s.prototype[o]=n.prototype[o])}function s(e){if(!(this instanceof s))return new s(e);t.call(this,e),n.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",a)))}function a(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}return Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),Hj}function t$(){if(Gj)return Vj;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;e.entry=null;for(;i;){var r=i.callback;t.pendingcb--,r(n),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}var t;Gj=1,Vj=E,E.WritableState=w;var n={deprecate:yj()},i=vj(),r=g.Buffer,o=(void 0!==Zn?Zn:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,a=bj(),c=Oj().getHighWaterMark,l=_j().codes,u=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,d=l.ERR_MULTIPLE_CALLBACK,m=l.ERR_STREAM_CANNOT_PIPE,h=l.ERR_STREAM_DESTROYED,f=l.ERR_STREAM_NULL_VALUES,y=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING,b=a.errorOrDestroy;function x(){}function w(n,i,r){t=t||e$(),n=n||{},"boolean"!=typeof r&&(r=i instanceof t),this.objectMode=!!n.objectMode,r&&(this.objectMode=this.objectMode||!!n.writableObjectMode),this.highWaterMark=c(this,n,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===n.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,r=n.writecb;if("function"!=typeof r)throw new d;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,r){--t.pendingcb,n?(process.nextTick(r,i),process.nextTick(T,e,t),e._writableState.errorEmitted=!0,b(e,i)):(r(i),e._writableState.errorEmitted=!0,b(e,i),T(e,t))}(e,n,i,t,r);else{var o=C(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),i?process.nextTick(_,e,n,o,r):_(e,n,o,r)}}(i,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==n.emitClose,this.autoDestroy=!!n.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function E(e){var n=this instanceof(t=t||e$());if(!n&&!s.call(E,this))return new E(e);this._writableState=new w(e,this,n),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),i.call(this)}function S(e,t,n,i,r,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new h("write")):n?e._writev(r,t.onwrite):e._write(r,o,t.onwrite),t.sync=!1}function _(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),T(e,t)}function O(t,n){n.bufferProcessing=!0;var i=n.bufferedRequest;if(t._writev&&i&&i.next){var r=n.bufferedRequestCount,o=new Array(r),s=n.corkedRequestsFree;s.entry=i;for(var a=0,c=!0;i;)o[a]=i,i.isBuf||(c=!1),i=i.next,a+=1;o.allBuffers=c,S(t,n,!0,n.length,o,"",s.finish),n.pendingcb++,n.lastBufferedRequest=null,s.next?(n.corkedRequestsFree=s.next,s.next=null):n.corkedRequestsFree=new e(n),n.bufferedRequestCount=0}else{for(;i;){var l=i.chunk,u=i.encoding,p=i.callback;if(S(t,n,!1,n.objectMode?1:l.length,l,u,p),i=i.next,n.bufferedRequestCount--,n.writing)break}null===i&&(n.lastBufferedRequest=null)}n.bufferedRequest=i,n.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(n){t.pendingcb--,n&&b(e,n),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var n=C(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(k,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}return Tj()(E,i),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:n.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===E&&(e&&e._writableState instanceof w)}})):s=function(e){return e instanceof this},E.prototype.pipe=function(){b(this,new m)},E.prototype.write=function(e,t,n){var i,s=this._writableState,a=!1,c=!s.objectMode&&(i=e,r.isBuffer(i)||i instanceof o);return c&&!r.isBuffer(e)&&(e=function(e){return r.from(e)}(e)),"function"==typeof t&&(n=t,t=null),c?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof n&&(n=x),s.ending?function(e,t){var n=new y;b(e,n),process.nextTick(t,n)}(this,n):(c||function(e,t,n,i){var r;return null===n?r=new f:"string"==typeof n||t.objectMode||(r=new u("chunk",["string","Buffer"],n)),!r||(b(e,r),process.nextTick(i,r),!1)}(this,s,e,n))&&(s.pendingcb++,a=function(e,t,n,i,o,s){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=r.from(t,n));return t}(t,i,o);i!==a&&(n=!0,o="buffer",i=a)}var c=t.objectMode?1:i.length;t.length+=c;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:o,isBuf:n,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,c,i,o,s);return l}(this,s,c,e,t,n)),a},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||O(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,n){n(new p("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,T(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=a.destroy,E.prototype._undestroy=a.undestroy,E.prototype._destroy=function(e,t){t(e)},Vj}function n$(){if(Wj)return gj.exports;Wj=1;var e=i,t=t$(),n=kR().LEVEL,r=gj.exports=function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.call(this,{objectMode:!0,highWaterMark:n.highWaterMark}),this.format=n.format,this.level=n.level,this.handleExceptions=n.handleExceptions,this.handleRejections=n.handleRejections,this.silent=n.silent,n.log&&(this.log=n.log),n.logv&&(this.logv=n.logv),n.close&&(this.close=n.close),this.once("pipe",(function(t){e.levels=t.levels,e.parent=t})),this.once("unpipe",(function(t){t===e.parent&&(e.parent=null,e.close&&e.close())}))};return e.inherits(r,t),r.prototype._write=function(e,t,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);var r=this.level||this.parent&&this.parent.level;if(!r||this.levels[r]>=this.levels[e[n]]){if(e&&!this.format)return this.log(e,i);var o=void 0,s=void 0;try{s=this.format.transform(Object.assign({},e),this.format.options)}catch(e){o=e}if(o||!s){if(i(),o)throw o;return}return this.log(s,i)}return this._writableState.sync=!1,i(null)},r.prototype._writev=function(e,t){if(this.logv){var n=e.filter(this._accept,this);return n.length?this.logv(n,t):t(null)}for(var i=0;i<e.length;i++)if(this._accept(e[i]))if(!e[i].chunk||this.format){var r=void 0,o=void 0;try{o=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(e){r=e}if(r||!o){if(e[i].callback(),r)throw t(null),r}else this.log(o,e[i].callback)}else this.log(e[i].chunk,e[i].callback);return t(null)},r.prototype._accept=function(e){var t=e.chunk;if(this.silent)return!1;var i=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&i&&!(this.levels[i]>=this.levels[t[n]])||!this.handleExceptions&&!0===t.exception)},r.prototype._nop=function(){},gj.exports}var i$,r$,o$,s$,a$={exports:{}};function c$(){return r$||(r$=1,fj.exports=n$(),fj.exports.LegacyTransportStream=function(){if(i$)return a$.exports;i$=1;var e=i,t=kR().LEVEL,n=n$(),r=a$.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};return e.inherits(r,n),r.prototype._write=function(e,n,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[t]])&&this.transport.log(e[t],e.message,e,this._nop),i(null)},r.prototype._writev=function(e,n){for(var i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[t],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return n(null)},r.prototype._deprecated=function(){console.error([this.transport.name+" is a legacy winston transport. Consider upgrading: ","- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},r.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)},a$.exports}()),fj.exports}function l$(){if(s$)return o$;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}s$=1;var a=p,c=kR(),l=c.LEVEL,u=c.MESSAGE,d=c$();return o$=function(e){function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i(this,n,[t])).name=t.name||"console",e.stderrLevels=e._stringArrayToSet(t.stderrLevels),e.consoleWarnLevels=e._stringArrayToSet(t.consoleWarnLevels),e.eol="string"==typeof t.eol?t.eol:a.EOL,e.forceConsole=t.forceConsole||!1,e._consoleLog=console.log.bind(console),e._consoleWarn=console.warn.bind(console),e._consoleError=console.error.bind(console),e.setMaxListeners(30),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"log",value:function(e,t){var n=this;return setImmediate((function(){return n.emit("logged",e)})),this.stderrLevels[e[l]]?(console._stderr&&!this.forceConsole?console._stderr.write("".concat(e[u]).concat(this.eol)):this._consoleError(e[u]),void(t&&t())):this.consoleWarnLevels[e[l]]?(console._stderr&&!this.forceConsole?console._stderr.write("".concat(e[u]).concat(this.eol)):this._consoleWarn(e[u]),void(t&&t())):(console._stdout&&!this.forceConsole?console._stdout.write("".concat(e[u]).concat(this.eol)):this._consoleLog(e[u]),void(t&&t()))}},{key:"_stringArrayToSet",value:function(e,t){if(!e)return{};if(t=t||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(t);return e.reduce((function(e,n){if("string"!=typeof n)throw new Error(t);return e[n]=!0,e}),{})}}])}(d),o$}var u$,p$={exports:{}},d$={exports:{}},m$={exports:{}};function h$(){return u$||(u$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0},e.exports=t.default}(m$,m$.exports)),m$.exports}var f$,g$={},y$={exports:{}},v$={exports:{}};var b$,x$,w$,E$={};function S$(){return x$||(x$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.isAsync)(e))return function(...t){const n=t.pop();return a(e.apply(this,t),n)};return(0,i.default)((function(t,n){var i;try{i=e.apply(this,t)}catch(e){return n(e)}if(i&&"function"==typeof i.then)return a(i,n);n(null,i)}))};var n=(f$||(f$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){var n=t.pop();return e.call(this,t,n)}},e.exports=t.default}(v$,v$.exports)),v$.exports),i=s(n),r=s(function(){if(b$)return E$;b$=1,Object.defineProperty(E$,"__esModule",{value:!0}),E$.fallback=r,E$.wrap=o;var e,t=E$.hasQueueMicrotask="function"==typeof queueMicrotask&&queueMicrotask,n=E$.hasSetImmediate="function"==typeof setImmediate&&setImmediate,i=E$.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;function r(e){setTimeout(e,0)}function o(e){return(t,...n)=>e((()=>t(...n)))}return e=t?queueMicrotask:n?setImmediate:i?process.nextTick:r,E$.default=o(e),E$}()),o=_$();function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return e.then((e=>{c(t,null,e)}),(e=>{c(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function c(e,t,n){try{e(t,n)}catch(e){(0,r.default)((e=>{throw e}),e)}}e.exports=t.default}(y$,y$.exports)),y$.exports}function _$(){if(w$)return g$;w$=1,Object.defineProperty(g$,"__esModule",{value:!0}),g$.isAsyncIterable=g$.isAsyncGenerator=g$.isAsync=void 0;var e,t=S$(),n=(e=t)&&e.__esModule?e:{default:e};function i(e){return"AsyncFunction"===e[Symbol.toStringTag]}return g$.default=function(e){if("function"!=typeof e)throw new Error("expected a function");return i(e)?(0,n.default)(e):e},g$.isAsync=i,g$.isAsyncGenerator=function(e){return"AsyncGenerator"===e[Symbol.toStringTag]},g$.isAsyncIterable=function(e){return"function"==typeof e[Symbol.asyncIterator]},g$}var O$,C$,k$={exports:{}};function T$(){return O$||(O$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t||(t=e.length);if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((i,r)=>{n[t-1]=(e,...t)=>{if(e)return r(e);i(t.length>1?t:t[0])},e.apply(this,n)}))}},e.exports=t.default}(k$,k$.exports)),k$.exports}var P$,A$={exports:{}},I$={exports:{}},R$={exports:{}},M$={exports:{}};function j$(){return P$||(P$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t},e.exports=t.default}(M$,M$.exports)),M$.exports}var $$,N$,D$={exports:{}},L$={exports:{}};function z$(){return N$||(N$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t=(0,r.default)(e);return t?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(t):function(e){var t=e?Object.keys(e):[],n=-1,i=t.length;return function r(){var o=t[++n];return"__proto__"===o?r():n<i?{value:e[o],key:o}:null}}(e)};var n=o(h$()),i=($$||($$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()},e.exports=t.default}(L$,L$.exports)),L$.exports),r=o(i);function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(D$,D$.exports)),D$.exports}var F$,U$={exports:{}};function B$(){return F$||(F$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}},e.exports=t.default}(U$,U$.exports)),U$.exports}var H$,q$,V$,G$,W$,K$,Y$={exports:{}},Q$={exports:{}};function J$(){return H$||(H$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.default={},e.exports=t.default}(Q$,Q$.exports)),Q$.exports}function X$(){return V$||(V$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=l(j$()),i=l(z$()),r=l(B$()),o=_$(),s=(q$||(q$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r){let o=!1,s=!1,a=!1,c=0,l=0;function u(){c>=t||a||o||(a=!0,e.next().then((({value:e,done:t})=>{if(!s&&!o){if(a=!1,t)return o=!0,void(c<=0&&r(null));c++,n(e,l,p),l++,u()}})).catch(d))}function p(e,t){if(c-=1,!s)return e?d(e):!1===e?(o=!0,void(s=!0)):t===i.default||o&&c<=0?(o=!0,r(null)):void u()}function d(e){s||(a=!1,o=!0,r(e))}u()};var n,i=(n=J$())&&n.__esModule?n:{default:n};e.exports=t.default}(Y$,Y$.exports)),Y$.exports),a=l(s),c=l(J$());function l(e){return e&&e.__esModule?e:{default:e}}t.default=e=>(t,s,l)=>{if(l=(0,n.default)(l),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return l(null);if((0,o.isAsyncGenerator)(t))return(0,a.default)(t,e,s,l);if((0,o.isAsyncIterable)(t))return(0,a.default)(t[Symbol.asyncIterator](),e,s,l);var u=(0,i.default)(t),p=!1,d=!1,m=0,h=!1;function f(e,t){if(!d)if(m-=1,e)p=!0,l(e);else if(!1===e)p=!0,d=!0;else{if(t===c.default||p&&m<=0)return p=!0,l(null);h||g()}}function g(){for(h=!0;m<e&&!p;){var t=u();if(null===t)return p=!0,void(m<=0&&l(null));m+=1,s(t.value,t.key,(0,r.default)(f))}h=!1}g()},e.exports=t.default}(R$,R$.exports)),R$.exports}function Z$(){return G$||(G$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=o(X$()),i=o(_$()),r=o(T$());function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.default)((function(e,t,r,o){return(0,n.default)(t)(e,(0,i.default)(r),o)}),4),e.exports=t.default}(I$,I$.exports)),I$.exports}function eN(){return K$||(K$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,i.default)(o.default,e,t)};var n=(C$||(C$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=o(h$()),i=o(_$()),r=o(T$());function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.default)(((e,t,r)=>{var o=(0,n.default)(t)?[]:{};e(t,((e,t,n)=>{(0,i.default)(e)(((e,...i)=>{i.length<2&&([i]=i),o[t]=i,n(e)}))}),(e=>r(e,o)))}),3),e.exports=t.default}(d$,d$.exports)),d$.exports),i=s(n),r=(W$||(W$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=r(Z$()),i=r(T$());function r(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)((function(e,t,i){return(0,n.default)(e,1,t,i)}),3),e.exports=t.default}(A$,A$.exports)),A$.exports),o=s(r);function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(p$,p$.exports)),p$.exports}var tN,nN,iN,rN,oN,sN,aN,cN={exports:{}};function lN(){if(nN)return tN;nN=1,tN=a;var e=_j().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,i=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,r=e.ERR_TRANSFORM_WITH_LENGTH_0,o=e$();function s(e,t){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new n);i.writechunk=null,i.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);o.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(t,n){l(e,t,n)}))}function l(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new r;if(e._transformState.transforming)throw new i;return e.push(null)}return Tj()(a,o),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,o.prototype.push.call(this,e,t)},a.prototype._transform=function(e,n,i){i(new t("_transform()"))},a.prototype._write=function(e,t,n){var i=this._transformState;if(i.writecb=n,i.writechunk=e,i.writeencoding=t,!i.transforming){var r=this._readableState;(i.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},a.prototype._destroy=function(e,t){o.prototype._destroy.call(this,e,(function(e){t(e)}))},tN}function uN(){if(sN)return oN;var e;sN=1;var t=_j().codes,n=t.ERR_MISSING_ARGS,i=t.ERR_STREAM_DESTROYED;function r(e){if(e)throw e}function o(e){e()}function s(e,t){return e.pipe(t)}return oN=function(){for(var t=arguments.length,a=new Array(t),c=0;c<t;c++)a[c]=arguments[c];var l,u=function(e){return e.length?"function"!=typeof e[e.length-1]?r:e.pop():r}(a);if(Array.isArray(a[0])&&(a=a[0]),a.length<2)throw new n("streams");var p=a.map((function(t,n){var r=n<a.length-1;return function(t,n,r,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===e&&(e=Jj()),e(t,{readable:n,writable:r},(function(e){if(e)return o(e);s=!0,o()}));var a=!1;return function(e){if(!s&&!a)return a=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new i("pipe"))}}(t,r,n>0,(function(e){l||(l=e),e&&p.forEach(o),r||(p.forEach(o),u(l))}))}));return a.reduce(s)},oN}function pN(){return aN||(aN=1,function(e,t){(t=e.exports=Zj()).Stream=t,t.Readable=t,t.Writable=t$(),t.Duplex=e$(),t.Transform=lN(),t.PassThrough=function(){if(rN)return iN;rN=1,iN=t;var e=lN();function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return Tj()(t,e),t.prototype._transform=function(e,t,n){n(null,e)},iN}(),t.finished=Jj(),t.pipeline=uN()}(cN,cN.exports)),cN.exports}var dN,mN,hN,fN,gN,yN,vN,bN,xN,wN,EN,SN,_N,ON,CN,kN,TN={exports:{}};function PN(){if(mN)return dN;mN=1;var e=[],t=[],n=function(){};function i(t){return!~e.indexOf(t)&&(e.push(t),!0)}function r(e){n=e}function o(t){for(var n=[],i=0;i<e.length;i++)if(e[i].async)n.push(e[i]);else if(e[i](t))return!0;return!!n.length&&new Promise((function(e){Promise.all(n.map((function(e){return e(t)}))).then((function(t){e(t.some(Boolean))}))}))}function s(e){return!~t.indexOf(e)&&(t.push(e),!0)}function a(){n.apply(n,arguments)}function c(e){for(var n=0;n<t.length;n++)e=t[n].apply(t[n],arguments);return e}function l(e,t){var n=Object.prototype.hasOwnProperty;for(var i in t)n.call(t,i)&&(e[i]=t[i]);return e}function u(e){return e.enabled=!1,e.modify=s,e.set=r,e.use=i,l((function(){return!1}),e)}function p(e){return e.enabled=!0,e.modify=s,e.set=r,e.use=i,l((function(){var t=Array.prototype.slice.call(arguments,0);return a.call(a,e,c(t,e)),!0}),e)}return dN=function(e){return e.introduce=l,e.enabled=o,e.process=c,e.modify=s,e.write=a,e.nope=u,e.yep=p,e.set=r,e.use=i,e}}function AN(){return gN||(gN=1,TN.exports=function(){if(fN)return hN;fN=1;var e=PN()((function e(t,n){return(n=n||{}).namespace=t,n.prod=!0,n.dev=!1,n.force||e.force?e.yep(n):e.nope(n)}));return hN=e}()),TN.exports}function IN(){if(vN)return yN;vN=1;var e=r,t=y.StringDecoder,n=pN().Stream;function i(){}return yN=function(r,o){var s=Buffer.alloc(65536),a=new t("utf8"),c=new n,l="",u=0,p=0;return-1===r.start&&delete r.start,c.readable=!0,c.destroy=function(){c.destroyed=!0,c.emit("end"),c.emit("close")},e.open(r.file,"a+","0644",(function(t,n){if(t)return o?o(t):c.emit("error",t),void c.destroy();!function t(){if(!c.destroyed)return e.read(n,s,0,s.length,u,(function(e,n){if(e)return o?o(e):c.emit("error",e),void c.destroy();if(!n)return l&&((null==r.start||p>r.start)&&(o?o(null,l):c.emit("line",l)),p++,l=""),setTimeout(t,1e3);var i=a.write(s.slice(0,n));o||c.emit("data",i);for(var d=(i=(l+i).split(/\n+/)).length-1,m=0;m<d;m++)(null==r.start||p>r.start)&&(o?o(null,i[m]):c.emit("line",i[m])),p++;return l=i[d],u+=n,t()}));e.close(n,i)}()})),o?c.destroy:c},yN}function RN(){if(xN)return bN;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=s(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,o()?Reflect.construct(n,i||[],s(t).constructor):n.apply(t,i))}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}xN=1;var l=r,u=d,m=eN(),h=a,f=kR().MESSAGE,g=pN(),y=g.Stream,v=g.PassThrough,b=c$(),x=AN()("winston:file"),w=p,E=IN();return bN=function(n){function r(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function n(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];i.slice(1).forEach((function(n){if(t[n])throw new Error("Cannot set ".concat(n," and ").concat(e," together"))}))}if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(e=i(this,r,[t])).name=t.name||"file",e._stream=new v,e._stream.setMaxListeners(30),e._onError=e._onError.bind(e),t.filename||t.dirname)n("filename or dirname","stream"),e._basename=e.filename=t.filename?u.basename(t.filename):"winston.log",e.dirname=t.dirname||u.dirname(t.filename),e.options=t.options||{flags:"a"};else{if(!t.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),n("stream","filename","maxsize"),e._dest=e._stream.pipe(e._setupStream(t.stream)),e.dirname=u.dirname(e._dest.path)}return e.maxsize=t.maxsize||null,e.rotationFormat=t.rotationFormat||!1,e.zippedArchive=t.zippedArchive||!1,e.maxFiles=t.maxFiles||null,e.eol="string"==typeof t.eol?t.eol:w.EOL,e.tailable=t.tailable||!1,e.lazy=t.lazy||!1,e._size=0,e._pendingSize=0,e._created=0,e._drain=!1,e._opening=!1,e._ending=!1,e._fileExist=!1,e.dirname&&e._createLogDirIfNotExist(e.dirname),e.lazy||e.open(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(r,n),t(r,[{key:"finishIfEnding",value:function(){var e=this;this._ending&&(this._opening?this.once("open",(function(){e._stream.once("finish",(function(){return e.emit("finish")})),setImmediate((function(){return e._stream.end()}))})):(this._stream.once("finish",(function(){return e.emit("finish")})),setImmediate((function(){return e._stream.end()}))))}},{key:"log",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(this.silent)return n(),!0;if(this._drain)this._stream.once("drain",(function(){t._drain=!1,t.log(e,n)}));else{if(!this._rotate){if(this.lazy){if(!this._fileExist)return this._opening||this.open(),void this.once("open",(function(){t._fileExist=!0,t.log(e,n)}));if(this._needsNewFile(this._pendingSize))return void this._dest.once("close",(function(){t._opening||t.open(),t.once("open",(function(){t.log(e,n)}))}))}var i="".concat(e[f]).concat(this.eol),r=Buffer.byteLength(i);this._pendingSize+=r,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);var o=this._stream.write(i,function(){var t=this;this._size+=r,this._pendingSize-=r,x("logged %s %s",this._size,i),this.emit("logged",e),this._rotate||this._opening||this._needsNewFile()&&(this.lazy?this._endStream((function(){t.emit("fileclosed")})):(this._rotate=!0,this._endStream((function(){return t._rotateFile()}))))}.bind(this));return o?n():(this._drain=!0,this._stream.once("drain",(function(){t._drain=!1,n()}))),x("written",o,this._drain),this.finishIfEnding(),o}this._stream.once("rotate",(function(){t._rotate=!1,t.log(e,n)}))}}},{key:"query",value:function(t,n){"function"==typeof t&&(n=t,t={}),t=function(t){t=t||{},t.rows=t.rows||t.limit||10,t.start=t.start||0,t.until=t.until||new Date,"object"!==e(t.until)&&(t.until=new Date(t.until));t.from=t.from||t.until-864e5,"object"!==e(t.from)&&(t.from=new Date(t.from));return t.order=t.order||"desc",t}(t);var i=u.join(this.dirname,this.filename),r="",o=[],s=0,a=l.createReadStream(i,{encoding:"utf8"});function c(n,i){try{var r=JSON.parse(n);(function(n){if(!n)return;if("object"!==e(n))return;var i=new Date(n.timestamp);if(t.from&&i<t.from||t.until&&i>t.until||t.level&&t.level!==n.level)return;return!0})(r)&&function(e){if(t.rows&&o.length>=t.rows&&"desc"!==t.order)return void(a.readable&&a.destroy());t.fields&&(e=t.fields.reduce((function(t,n){return t[n]=e[n],t}),{}));"desc"===t.order&&o.length>=t.rows&&o.shift();o.push(e)}(r)}catch(e){i||a.emit("error",e)}}a.on("error",(function(e){if(a.readable&&a.destroy(),n)return"ENOENT"!==e.code?n(e):n(null,o)})),a.on("data",(function(e){for(var n=(e=(r+e).split(/\n+/)).length-1,i=0;i<n;i++)(!t.start||s>=t.start)&&c(e[i]),s++;r=e[n]})),a.on("close",(function(){r&&c(r,!0),"desc"===t.order&&(o=o.reverse()),n&&n(null,o)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=u.join(this.dirname,this.filename),n=new y,i={file:t,start:e.start};return n.destroy=E(i,(function(e,t){if(e)return n.emit("error",e);try{n.emit("data",t),t=JSON.parse(t),n.emit("log",t)}catch(e){n.emit("error",e)}})),n}},{key:"open",value:function(){var e=this;this.filename&&(this._opening||(this._opening=!0,this.stat((function(t,n){if(t)return e.emit("error",t);x("stat done: %s { size: %s }",e.filename,n),e._size=n,e._dest=e._createStream(e._stream),e._opening=!1,e.once("open",(function(){e._stream.emit("rotate")||(e._rotate=!1)}))}))))}},{key:"stat",value:function(e){var t=this,n=this._getFile(),i=u.join(this.dirname,n);l.stat(i,(function(r,o){return r&&"ENOENT"===r.code?(x("ENOENT ok",i),t.filename=n,e(null,0)):r?(x("err ".concat(r.code," ").concat(i)),e(r)):!o||t._needsNewFile(o.size)?t._incFile((function(){return t.stat(e)})):(t.filename=n,void e(null,o.size))}))}},{key:"close",value:function(e){var t=this;this._stream&&this._stream.end((function(){e&&e(),t.emit("flush"),t.emit("closed")}))}},{key:"_needsNewFile",value:function(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}},{key:"_onError",value:function(e){this.emit("error",e)}},{key:"_setupStream",value:function(e){return e.on("error",this._onError),e}},{key:"_cleanupStream",value:function(e){return e.removeListener("error",this._onError),e.destroy(),e}},{key:"_rotateFile",value:function(){var e=this;this._incFile((function(){return e.open()}))}},{key:"_endStream",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this._dest?(this._stream.unpipe(this._dest),this._dest.end((function(){e._cleanupStream(e._dest),t()}))):t()}},{key:"_createStream",value:function(e){var t=this,n=u.join(this.dirname,this.filename);x("create stream start",n,this.options);var i=l.createWriteStream(n,this.options).on("error",(function(e){return x(e)})).on("close",(function(){return x("close",i.path,i.bytesWritten)})).on("open",(function(){x("file open ok",n),t.emit("open",n),e.pipe(i),t.rotatedWhileOpening&&(t._stream=new v,t._stream.setMaxListeners(30),t._rotateFile(),t.rotatedWhileOpening=!1,t._cleanupStream(i),e.end())}));return x("create stream ok",n),i}},{key:"_incFile",value:function(e){x("_incFile",this.filename);var t=u.extname(this._basename),n=u.basename(this._basename,t),i=[];this.zippedArchive&&i.push(function(e){var i=this._created>0&&!this.tailable?this._created:"";this._compressFile(u.join(this.dirname,"".concat(n).concat(i).concat(t)),u.join(this.dirname,"".concat(n).concat(i).concat(t,".gz")),e)}.bind(this)),i.push(function(e){this.tailable?this._checkMaxFilesTailable(t,n,e):(this._created+=1,this._checkMaxFilesIncrementing(t,n,e))}.bind(this)),m(i,e)}},{key:"_getFile",value:function(){var e=u.extname(this._basename),t=u.basename(this._basename,e),n=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?"".concat(t).concat(n).concat(e):"".concat(t).concat(e)}},{key:"_checkMaxFilesIncrementing",value:function(e,t,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);var i=this._created-this.maxFiles,r=0!==i?i:"",o=this.zippedArchive?".gz":"",s="".concat(t).concat(r).concat(e).concat(o),a=u.join(this.dirname,s);l.unlink(a,n)}},{key:"_checkMaxFilesTailable",value:function(e,t,n){var i=this,r=[];if(this.maxFiles){for(var o=this.zippedArchive?".gz":"",s=this.maxFiles-1;s>1;s--)r.push(function(n,i){var r=this,s="".concat(t).concat(n-1).concat(e).concat(o),a=u.join(this.dirname,s);l.exists(a,(function(c){if(!c)return i(null);s="".concat(t).concat(n).concat(e).concat(o),l.rename(a,u.join(r.dirname,s),i)}))}.bind(this,s));m(r,(function(){l.rename(u.join(i.dirname,"".concat(t).concat(e).concat(o)),u.join(i.dirname,"".concat(t,"1").concat(e).concat(o)),n)}))}}},{key:"_compressFile",value:function(e,t,n){l.access(e,l.F_OK,(function(i){if(i)return n();var r=h.createGzip(),o=l.createReadStream(e),s=l.createWriteStream(t);s.on("finish",(function(){l.unlink(e,n)})),o.pipe(r).pipe(s)}))}},{key:"_createLogDirIfNotExist",value:function(e){l.existsSync(e)||l.mkdirSync(e,{recursive:!0})}}])}(b),bN}function MN(){if(EN)return wN;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function c(t,n,i){return n=u(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,l()?Reflect.construct(n,i||[],u(t).constructor):n.apply(t,i))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}EN=1;var d=o,m=s,h=pN().Stream,f=c$(),g=rM().configure;return wN=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=c(this,t,[n])).options=n,e.name=n.name||"http",e.ssl=!!n.ssl,e.host=n.host||"localhost",e.port=n.port,e.auth=n.auth,e.path=n.path||"",e.maximumDepth=n.maximumDepth,e.agent=n.agent,e.headers=n.headers||{},e.headers["content-type"]="application/json",e.batch=n.batch||!1,e.batchInterval=n.batchInterval||5e3,e.batchCount=n.batchCount||10,e.batchOptions=[],e.batchTimeoutID=-1,e.batchCallback={},e.port||(e.port=e.ssl?443:80),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r(t,[{key:"log",value:function(e,t){var n=this;this._request(e,null,null,(function(t,i){i&&200!==i.statusCode&&(t=new Error("Invalid HTTP Status Code: ".concat(i.statusCode))),t?n.emit("warn",t):n.emit("logged",e)})),t&&setImmediate(t)}},{key:"query",value:function(e,t){"function"==typeof e&&(t=e,e={});var n=(e={method:"query",params:this.normalizeQuery(e)}).params.auth||null;delete e.params.auth;var i=e.params.path||null;delete e.params.path,this._request(e,n,i,(function(e,n,i){if(n&&200!==n.statusCode&&(e=new Error("Invalid HTTP Status Code: ".concat(n.statusCode))),e)return t(e);if("string"==typeof i)try{i=JSON.parse(i)}catch(e){return t(e)}t(null,i)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new h,n=(e={method:"stream",params:e}).params.path||null;delete e.params.path;var i=e.params.auth||null;delete e.params.auth;var r="",o=this._request(e,i,n);return t.destroy=function(){return o.destroy()},o.on("data",(function(e){for(var n=(e=(r+e).split(/\n+/)).length-1,i=0;i<n;i++)try{t.emit("log",JSON.parse(e[i]))}catch(e){t.emit("error",e)}r=e[n]})),o.on("error",(function(e){return t.emit("error",e)})),t}},{key:"_request",value:function(e,t,n,i){e=e||{},t=t||this.auth,n=n||this.path||"",this.batch?this._doBatch(e,i,t,n):this._doRequest(e,i,t,n)}},{key:"_doBatch",value:function(e,t,n,i){if(this.batchOptions.push(e),1===this.batchOptions.length){var r=this;this.batchCallback=t,this.batchTimeoutID=setTimeout((function(){r.batchTimeoutID=-1,r._doBatchRequest(r.batchCallback,n,i)}),this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,i)}},{key:"_doBatchRequest",value:function(e,t,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);var i=this.batchOptions.slice();this.batchOptions=[],this._doRequest(i,e,t,n)}},{key:"_doRequest",value:function(e,t,i,r){var o=Object.assign({},this.headers);i&&i.bearer&&(o.Authorization="Bearer ".concat(i.bearer));var s=(this.ssl?m:d).request(n(n({},this.options),{},{method:"POST",host:this.host,port:this.port,path:"/".concat(r.replace(/^\//,"")),headers:o,auth:i&&i.username&&i.password?"".concat(i.username,":").concat(i.password):"",agent:this.agent}));s.on("error",t),s.on("response",(function(e){return e.on("end",(function(){return t(null,e)})).resume()}));var a=g(n({},this.maximumDepth&&{maximumDepth:this.maximumDepth}));s.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}])}(f),wN}function jN(){if(_N)return SN;_N=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,SN=e}function $N(){if(CN)return ON;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}CN=1;var a=jN(),c=kR().MESSAGE,l=p,u=c$();return ON=function(e){function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=i(this,n,[t]),!t.stream||!a(t.stream))throw new Error("options.stream is required.");return e._stream=t.stream,e._stream.setMaxListeners(1/0),e.isObjectMode=t.stream._writableState.objectMode,e.eol="string"==typeof t.eol?t.eol:l.EOL,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"log",value:function(e,t){var n=this;if(setImmediate((function(){return n.emit("logged",e)})),this.isObjectMode)return this._stream.write(e),void(t&&t());this._stream.write("".concat(e[c]).concat(this.eol)),t&&t()}}])}(u),ON}var NN,DN={};function LN(){if(NN)return DN;NN=1;var e=ij(),t=kR().configs;return DN.cli=e.levels(t.cli),DN.npm=e.levels(t.npm),DN.syslog=e.levels(t.syslog),DN.addColors=e.levels,DN}var zN,FN={exports:{}},UN={exports:{}};var BN,HN,qN,VN,GN,WN,KN={exports:{}};function YN(){return HN||(HN=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=(zN||(zN=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=l(h$()),i=l(J$()),r=l(Z$()),o=l(j$()),s=l(B$()),a=l(_$()),c=l(T$());function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){n=(0,o.default)(n);var r=0,a=0,{length:c}=e,l=!1;function u(e,t){!1===e&&(l=!0),!0!==l&&(e?n(e):++a!==c&&t!==i.default||n(null))}for(0===c&&n(null);r<c;r++)t(e[r],r,(0,s.default)(u))}function p(e,t,n){return(0,r.default)(e,1/0,t,n)}t.default=(0,c.default)((function(e,t,i){return((0,n.default)(e)?u:p)(e,(0,a.default)(t),i)}),3),e.exports=t.default}(UN,UN.exports)),UN.exports),i=c(n),r=(BN||(BN=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(t,n,i)=>e(t,i)},e.exports=t.default}(KN,KN.exports)),KN.exports),o=c(r),s=c(_$()),a=c(T$());function c(e){return e&&e.__esModule?e:{default:e}}t.default=(0,a.default)((function(e,t,n){return(0,i.default)(e,(0,o.default)((0,s.default)(t)),n)}),3),e.exports=t.default}(FN,FN.exports)),FN.exports}function QN(){if(WN)return GN;WN=1;var e=function(){if(VN)return qN;VN=1;var e=Object.prototype.toString;return qN=function(t){if("string"==typeof t.displayName&&t.constructor.name)return t.displayName;if("string"==typeof t.name&&t.name)return t.name;if("object"==typeof t&&t.constructor&&"string"==typeof t.constructor.name)return t.constructor.name;var n=t.toString(),i=e.call(t).slice(8,-1);return(n="Function"===i?n.substring(n.indexOf("(")+1,n.indexOf(")")):i)||"anonymous"}}();return GN=function(t){var n,i=0;function r(){return i||(i=1,n=t.apply(this,arguments),t=null),n}return r.displayName=e(t),r},GN}var JN,XN,ZN,eD,tD,nD,iD,rD,oD,sD={};function aD(){return JN||(JN=1,function(e){function t(e){for(var t in e)this[t]=e[t]}e.get=function(t){var n=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var i={},r=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t},Error.captureStackTrace(i,t||e.get);var o=i.stack;return Error.prepareStackTrace=r,Error.stackTraceLimit=n,o},e.parse=function(e){if(!e.stack)return[];var t=this;return e.stack.split("\n").slice(1).map((function(e){if(e.match(/^\s*[-]{4,}$/))return t._createParsedCallSite({fileName:e,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=e.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var i=null,r=null,o=null,s=null,a=null,c="native"===n[5];if(n[1]){var l=(o=n[1]).lastIndexOf(".");if("."==o[l-1]&&l--,l>0){i=o.substr(0,l),r=o.substr(l+1);var u=i.indexOf(".Module");u>0&&(o=o.substr(u+1),i=i.substr(0,u))}s=null}r&&(s=i,a=r),"<anonymous>"===r&&(a=null,o=null);var p={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:o,typeName:s,methodName:a,columnNumber:parseInt(n[4],10)||null,native:c};return t._createParsedCallSite(p)}})).filter((function(e){return!!e}))};["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach((function(e){t.prototype[e]=null,t.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),["topLevel","eval","native","constructor"].forEach((function(e){t.prototype[e]=!1,t.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),e._createParsedCallSite=function(e){return new t(e)}}(sD)),sD}function cD(){if(ZN)return XN;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}ZN=1;var a=pN().Writable;return XN=function(e){function n(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t=i(this,n,[{objectMode:!0}]),!e)throw new Error("ExceptionStream requires a TransportStream instance.");return t.handleExceptions=!0,t.transport=e,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"_write",value:function(e,t,n){return e.exception?this.transport.log(e,n):(n(),!0)}}])}(a),XN}function lD(){if(tD)return eD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}tD=1;var i=p,r=YN(),o=AN()("winston:exception"),s=QN(),a=aD(),c=cD();return eD=function(){return t((function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Logger is required to handle exceptions");this.logger=t,this.handlers=new Map}),[{key:"handle",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach((function(t){if(Array.isArray(t))return t.forEach((function(t){return e._addHandler(t)}));e._addHandler(t)})),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}},{key:"unhandle",value:function(){var e=this;this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(t){return e.logger.unpipe(t)})))}},{key:"getAllInfo",value:function(e){var t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:["uncaughtException: ".concat(t||"(no error message)"),e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,exception:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}},{key:"getProcessInfo",value:function(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:i.loadavg(),uptime:i.uptime()}}},{key:"getTrace",value:function(e){return(e?a.parse(e):a.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(e){if(!this.handlers.has(e)){e.handleExceptions=!0;var t=new c(e);this.handlers.set(e,t),this.logger.pipe(t)}}},{key:"_uncaughtException",value:function(e){var t,n=this.getAllInfo(e),i=this._getExceptionHandlers(),a="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function c(){o("doExit",a),o("process._exiting",process._exiting),a&&!process._exiting&&(t&&clearTimeout(t),process.exit(1))}if(!i.length&&a&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),a=!1),!i||0===i.length)return process.nextTick(c);r(i,(function(e,t){var n=s(t),i=e.transport||e;function r(e){return function(){o(e),n()}}i._ending=!0,i.once("finish",r("finished")),i.once("error",r("error"))}),(function(){return a&&c()})),this.logger.log(n),a&&(t=setTimeout(c,3e3))}},{key:"_getExceptionHandlers",value:function(){return this.logger.transports.filter((function(e){return(e.transport||e).handleExceptions}))}}])}(),eD}function uD(){if(iD)return nD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}iD=1;var a=pN().Writable;return nD=function(e){function n(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t=i(this,n,[{objectMode:!0}]),!e)throw new Error("RejectionStream requires a TransportStream instance.");return t.handleRejections=!0,t.transport=e,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"_write",value:function(e,t,n){return e.rejection?this.transport.log(e,n):(n(),!0)}}])}(a),nD}function pD(){if(oD)return rD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}oD=1;var i=p,r=YN(),o=AN()("winston:rejection"),s=QN(),a=aD(),c=uD();return rD=function(){return t((function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Logger is required to handle rejections");this.logger=t,this.handlers=new Map}),[{key:"handle",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach((function(t){if(Array.isArray(t))return t.forEach((function(t){return e._addHandler(t)}));e._addHandler(t)})),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}},{key:"unhandle",value:function(){var e=this;this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(t){return e.logger.unpipe(t)})))}},{key:"getAllInfo",value:function(e){var t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:["unhandledRejection: ".concat(t||"(no error message)"),e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,rejection:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}},{key:"getProcessInfo",value:function(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:i.loadavg(),uptime:i.uptime()}}},{key:"getTrace",value:function(e){return(e?a.parse(e):a.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(e){if(!this.handlers.has(e)){e.handleRejections=!0;var t=new c(e);this.handlers.set(e,t),this.logger.pipe(t)}}},{key:"_unhandledRejection",value:function(e){var t,n=this.getAllInfo(e),i=this._getRejectionHandlers(),a="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function c(){o("doExit",a),o("process._exiting",process._exiting),a&&!process._exiting&&(t&&clearTimeout(t),process.exit(1))}if(!i.length&&a&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),a=!1),!i||0===i.length)return process.nextTick(c);r(i,(function(e,t){var n=s(t),i=e.transport||e;function r(e){return function(){o(e),n()}}i._ending=!0,i.once("finish",r("finished")),i.once("error",r("error"))}),(function(){return a&&c()})),this.logger.log(n),a&&(t=setTimeout(c,3e3))}},{key:"_getRejectionHandlers",value:function(){return this.logger.transports.filter((function(e){return(e.transport||e).handleRejections}))}}])}(),rD}var dD,mD,hD,fD,gD,yD,vD,bD,xD,wD,ED,SD,_D,OD,CD,kD={exports:{}},TD={exports:{}};function PD(){if(mD)return kD.exports;mD=1;const e=i,{LEVEL:t}=kR(),n=function(){if(dD)return TD.exports;dD=1;const e=i,t=t$(),{LEVEL:n}=kR(),r=TD.exports=function(e={}){t.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",(e=>{this.levels=e.levels,this.parent=e})),this.once("unpipe",(e=>{e===this.parent&&(this.parent=null,this.close&&this.close())}))};return e.inherits(r,t),r.prototype._write=function(e,t,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);const r=this.level||this.parent&&this.parent.level;if(!r||this.levels[r]>=this.levels[e[n]]){if(e&&!this.format)return this.log(e,i);let t,n;try{n=this.format.transform(Object.assign({},e),this.format.options)}catch(e){t=e}if(t||!n){if(i(),t)throw t;return}return this.log(n,i)}return this._writableState.sync=!1,i(null)},r.prototype._writev=function(e,t){if(this.logv){const n=e.filter(this._accept,this);return n.length?this.logv(n,t):t(null)}for(let n=0;n<e.length;n++){if(!this._accept(e[n]))continue;if(e[n].chunk&&!this.format){this.log(e[n].chunk,e[n].callback);continue}let i,r;try{r=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(e){i=e}if(i||!r){if(e[n].callback(),i)throw t(null),i}else this.log(r,e[n].callback)}return t(null)},r.prototype._accept=function(e){const t=e.chunk;if(this.silent)return!1;const i=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&i&&!(this.levels[i]>=this.levels[t[n]])||!this.handleExceptions&&!0===t.exception)},r.prototype._nop=function(){},TD.exports}(),r=kD.exports=function(e={}){if(n.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};return e.inherits(r,n),r.prototype._write=function(e,n,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[t]])&&this.transport.log(e[t],e.message,e,this._nop),i(null)},r.prototype._writev=function(e,n){for(let n=0;n<e.length;n++)this._accept(e[n])&&(this.transport.log(e[n].chunk[t],e[n].chunk.message,e[n].chunk,this._nop),e[n].callback());return n(null)},r.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},r.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)},kD.exports}function AD(){if(fD)return hD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}fD=1;var i=function(){return t((function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=RD();if("object"!==e(n)||Array.isArray(n)||!(n instanceof i))throw new Error("Logger is required for profiling");this.logger=n,this.start=Date.now()}),[{key:"done",value:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];"function"==typeof n[n.length-1]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),n.pop());var r="object"===e(n[n.length-1])?n.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}}])}();return hD=i}function ID(){if(yD)return gD;yD=1;class e extends Error{constructor(t){super(`Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ${t.toString().split("\n")[0]}\n`),Error.captureStackTrace(this,e)}}return gD=t=>{if(t.length>2)throw new e(t);function n(e={}){this.options=e}function i(e){return new n(e)}return n.prototype.transform=t,i.Format=n,i}}function RD(){if(wD)return xD;function e(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,n||"default");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,n,i){return n=s(n),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,o()?Reflect.construct(n,i||[],s(e).constructor):n.apply(e,i))}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}wD=1;var c=pN(),l=c.Stream,u=c.Transform,p=YN(),d=kR(),m=d.LEVEL,h=d.SPLAT,f=jN(),g=lD(),y=pD(),v=PD(),b=AD(),x=sj().warn,w=LN(),E=/%[scdjifoO%]/g,S=function(i){function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r(this,o,[{objectMode:!0}])).configure(e),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(o,i),n(o,[{key:"child",value:function(e){var t=this;return Object.create(t,{write:{value:function(n){var i=Object.assign({},e,n);n instanceof Error&&(i.stack=n.stack,i.message=n.message),t.write(i)}}})}},{key:"configure",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.silent,i=t.format,r=t.defaultMeta,o=t.levels,s=t.level,a=void 0===s?"info":s,c=t.exitOnError,l=void 0===c||c,u=t.transports,p=t.colors,d=t.emitErrs,m=t.formatters,h=t.padLevels,f=t.rewriters,v=t.stripColors,b=t.exceptionHandlers,x=t.rejectionHandlers;if(this.transports.length&&this.clear(),this.silent=n,this.format=i||this.format||function(){if(bD)return vD;bD=1;const e=ID(),{MESSAGE:t}=kR(),n=rM();function i(e,t){return"bigint"==typeof t?t.toString():t}return vD=e(((e,r)=>{const o=n.configure(r);return e[t]=o(e,r.replacer||i,r.space),e}))}()(),this.defaultMeta=r||null,this.levels=o||this.levels||w.npm.levels,this.level=a,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new g(this),this.rejections=new y(this),this.profilers={},this.exitOnError=l,u&&(u=Array.isArray(u)?u:[u]).forEach((function(t){return e.add(t)})),p||d||m||h||f||v)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"));b&&this.exceptions.handle(b),x&&this.rejections.handle(x)}},{key:"isLevelEnabled",value:function(e){var t=this,n=_(this.levels,e);if(null===n)return!1;var i=_(this.levels,this.level);return null!==i&&(this.transports&&0!==this.transports.length?-1!==this.transports.findIndex((function(e){var r=_(t.levels,e.level);return null===r&&(r=i),r>=n})):i>=n)}},{key:"log",value:function(n,i){for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];if(1===arguments.length)return n[m]=n.level,this._addDefaultMeta(n),this.write(n),this;if(2===arguments.length)return i&&"object"===t(i)?(i[m]=i.level=n,this._addDefaultMeta(i),this.write(i),this):(i=e(e(e({},m,n),"level",n),"message",i),this._addDefaultMeta(i),this.write(i),this);var a=o[0];if("object"===t(a)&&null!==a&&!(i&&i.match&&i.match(E))){var c=Object.assign({},this.defaultMeta,a,e(e(e(e({},m,n),h,o),"level",n),"message",i));return a.message&&(c.message="".concat(c.message," ").concat(a.message)),a.stack&&(c.stack=a.stack),a.cause&&(c.cause=a.cause),this.write(c),this}return this.write(Object.assign({},this.defaultMeta,e(e(e(e({},m,n),h,o),"level",n),"message",i))),this}},{key:"_transform",value:function(e,t,n){if(this.silent)return n();e[m]||(e[m]=e.level),this.levels[e[m]]||0===this.levels[e[m]]||console.error("[winston] Unknown logger level: %s",e[m]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}},{key:"_final",value:function(e){var t=this.transports.slice();p(t,(function(e,t){if(!e||e.finished)return setImmediate(t);e.once("finish",t),e.end()}),e)}},{key:"add",value:function(e){var t=!f(e)||e.log.length>2?new v({transport:e}):e;if(!t._writableState||!t._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",t),this._onEvent("warn",t),this.pipe(t),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}},{key:"remove",value:function(e){if(!e)return this;var t=e;return(!f(e)||e.log.length>2)&&(t=this.transports.filter((function(t){return t.transport===e}))[0]),t&&this.unpipe(t),this}},{key:"clear",value:function(){return this.unpipe(),this}},{key:"close",value:function(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}},{key:"setLevels",value:function(){x.deprecated("setLevels")}},{key:"query",value:function(e,t){"function"==typeof e&&(t=e,e={}),e=e||{};var n={},i=Object.assign({},e.query||{});p(this.transports.filter((function(e){return!!e.query})),(function(t,r){!function(t,n){e.query&&"function"==typeof t.formatQuery&&(e.query=t.formatQuery(i)),t.query(e,(function(i,r){if(i)return n(i);"function"==typeof t.formatResults&&(r=t.formatResults(r,e.format)),n(null,r)}))}(t,(function(e,i){r&&((i=e||i)&&(n[t.name]=i),r()),r=null}))}),(function(){return t(null,n)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new l,n=[];return t._streams=n,t.destroy=function(){for(var e=n.length;e--;)n[e].destroy()},this.transports.filter((function(e){return!!e.stream})).forEach((function(i){var r=i.stream(e);r&&(n.push(r),r.on("log",(function(e){e.transport=e.transport||[],e.transport.push(i.name),t.emit("log",e)})),r.on("error",(function(e){e.transport=e.transport||[],e.transport.push(i.name),t.emit("error",e)})))})),t}},{key:"startTimer",value:function(){return new b(this)}},{key:"profile",value:function(e){var n=Date.now();if(this.profilers[e]){var i=this.profilers[e];delete this.profilers[e];for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];"function"==typeof o[o.length-2]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),o.pop());var a="object"===t(o[o.length-1])?o.pop():{};return a.level=a.level||"info",a.durationMs=n-i,a.message=a.message||e,this.write(a)}return this.profilers[e]=n,this}},{key:"handleExceptions",value:function(){var e;console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),(e=this.exceptions).handle.apply(e,arguments)}},{key:"unhandleExceptions",value:function(){var e;console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),(e=this.exceptions).unhandle.apply(e,arguments)}},{key:"cli",value:function(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"))}},{key:"_onEvent",value:function(e,t){t["__winston"+e]||(t["__winston"+e]=function(n){"error"!==e||this.transports.includes(t)||this.add(t),this.emit(e,n,t)}.bind(this),t.on(e,t["__winston"+e]))}},{key:"_addDefaultMeta",value:function(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}}])}(u);function _(e,t){var n=e[t];return n||0===n?n:null}return Object.defineProperty(S.prototype,"transports",{configurable:!1,enumerable:!0,get:function(){var e=this._readableState.pipes;return Array.isArray(e)?e:[e].filter(Boolean)}}),xD=S}function MD(){if(SD)return ED;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,r,o){return r=i(r),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,n()?Reflect.construct(r,o||[],i(t).constructor):r.apply(t,o))}function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(n=function(){return!!e})()}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}SD=1;var o=kR().LEVEL,s=LN(),a=RD(),c=AN()("winston:create-logger");return ED=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.levels=e.levels||s.npm.levels;var n=function(e){function n(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t(this,n,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}(n,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(a),i=new n(e);return Object.keys(e.levels).forEach((function(e){c('Define prototype method for "%s"',e),"log"!==e?(n.prototype[e]=function(){for(var t=this||i,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];if(1===r.length){var a=r[0],c=a&&a.message&&a||{message:a};return c.level=c[o]=e,t._addDefaultMeta(c),t.write(c),this||i}return 0===r.length?(t.log(e,""),t):t.log.apply(t,[e].concat(r))},n.prototype[function(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}(e)]=function(){return(this||i).isLevelEnabled(e)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')})),i},ED}function jD(){if(OD)return _D;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}OD=1;var i=MD();return _D=function(){return t((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.loggers=new Map,this.options=t}),[{key:"add",value:function(e,t){var n=this;if(!this.loggers.has(e)){var r=(t=Object.assign({},t||this.options)).transports||this.options.transports;t.transports=r?Array.isArray(r)?r.slice():[r]:[];var o=i(t);o.on("close",(function(){return n._delete(e)})),this.loggers.set(e,o)}return this.loggers.get(e)}},{key:"get",value:function(e,t){return this.add(e,t)}},{key:"has",value:function(e){return!!this.loggers.has(e)}},{key:"close",value:function(e){var t=this;if(e)return this._removeLogger(e);this.loggers.forEach((function(e,n){return t._removeLogger(n)}))}},{key:"_removeLogger",value:function(e){this.loggers.has(e)&&(this.loggers.get(e).close(),this._delete(e))}},{key:"_delete",value:function(e){this.loggers.delete(e)}}])}(),_D}var $D=(CD||(CD=1,function(e){var t=ij(),n=sj().warn;e.version=mj,e.transports=(kN||(kN=1,function(e){Object.defineProperty(e,"Console",{configurable:!0,enumerable:!0,get:function(){return l$()}}),Object.defineProperty(e,"File",{configurable:!0,enumerable:!0,get:function(){return RN()}}),Object.defineProperty(e,"Http",{configurable:!0,enumerable:!0,get:function(){return MN()}}),Object.defineProperty(e,"Stream",{configurable:!0,enumerable:!0,get:function(){return $N()}})}(hj)),hj),e.config=LN(),e.addColors=t.levels,e.format=t.format,e.createLogger=MD(),e.Logger=RD(),e.ExceptionHandler=lD(),e.RejectionHandler=pD(),e.Container=jD(),e.Transport=c$(),e.loggers=new e.Container;var i=e.createLogger();Object.keys(e.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((function(t){return e[t]=function(){return i[t].apply(i,arguments)}})),Object.defineProperty(e,"level",{get:function(){return i.level},set:function(e){i.level=e}}),Object.defineProperty(e,"exceptions",{get:function(){return i.exceptions}}),Object.defineProperty(e,"rejections",{get:function(){return i.rejections}}),["exitOnError"].forEach((function(t){Object.defineProperty(e,t,{get:function(){return i[t]},set:function(e){i[t]=e}})})),Object.defineProperty(e,"default",{get:function(){return{exceptionHandlers:i.exceptionHandlers,rejectionHandlers:i.rejectionHandlers,transports:i.transports}}}),n.deprecated(e,"setLevels"),n.forFunctions(e,"useFormat",["cli"]),n.forProperties(e,"useFormat",["padLevels","stripColors"]),n.forFunctions(e,"deprecated",["addRewriter","addFilter","clone","extend"]),n.forProperties(e,"deprecated",["emitErrs","levelLength"])}($I)),$I);e.DEFAULT_PARAMETER_STORE_CLIENT_CONFIG=tf,e.DEFAULT_SES_CLIENT_CONFIG=RI,e.lambda=e=>{const{clientConfig:t,...n}={...Cc,...e},i=new _s(t);return{invokeLambda:(e,t)=>(async(e,t,n,i)=>{try{const r=new yc({FunctionName:t.functionName,InvocationType:n,Payload:Buffer.from(JSON.stringify(i))}),o=await e.send(r);return t.logger&&t.logger("info",JSON.stringify(o)),!0}catch(e){return t.logger&&t.logger("error",e),!1}})(i,n,e,t)}},e.logger=e=>{const t={defaultMeta:{...e.defaultLogInformation,deploymentStage:e.deploymentStage,service:e.service},format:$D.format.combine($D.format.timestamp({format:"DD-MM-YYYY HH:mm:ss"}),$D.format.json())};if(e.datadogApiKey){const n={host:"http-intake.logs.datadoghq.eu",path:`/api/v2/logs?dd-api-key=${e.datadogApiKey}&ddsource=nodejs&service=${e.service}`,port:443,ssl:!0};return $D.createLogger({...t,transports:[new $D.transports.Http(n)]})}return $D.createLogger({...t,transports:[new $D.transports.Console]})},e.parameterStore=e=>{const{clientConfig:t,...n}={...tf,...e},i=new zl(t);return{getSecret:(e,t="")=>(async(e,t,n,i)=>{if(t.onlyDefault)return i;try{const r=await e.send(new Zh({Name:`${t.prefix??""}${n}`,WithDecryption:!0}));return r?.Parameter?.Value??i}catch(e){return t.logger&&t.logger("error",e),i}})(i,n,e,t),getSecrets:(e,t="")=>(async(e,t,n,i)=>{if(t.onlyDefault)return[i];try{const r=new ef({Names:n.map((e=>`${t.prefix??""}${e}`)),WithDecryption:!0}),o=await e.send(r);return o?.Parameters?.map((e=>e.Value??i))??[i]}catch(e){return t.logger&&t.logger("error",e),[i]}})(i,n,e,t)}},e.ses=(e,t)=>{const{clientConfig:n,...i}={...RI,...t},r=new $f(n),o=II.createTransport(t.customSMTPConfig??{SES:{aws:eA,ses:r}});return{sendMail:t=>(async(e,t,n,i)=>{if(!n.html&&!n.text)return e.logger&&e.logger("error","The option text or html needs to be set."),!1;if(!n.to||!n.subject)return e.logger&&e.logger("error","The fields to and subject have to be set."),!1;const r=await t.sendMail({from:i,...n});return e.logger&&e.logger("info",`Transporter response: ${JSON.stringify(r)}`),!!r||(e.logger&&e.logger("error","Sending email failed!"),!1)})(i,o,t,e)}}}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("events"),require("url"),require("util"),require("fs"),require("http"),require("https"),require("zlib"),require("stream"),require("net"),require("dns"),require("os"),require("path"),require("crypto"),require("tls"),require("child_process"),require("buffer"),require("string_decoder")):"function"==typeof define&&define.amd?define(["exports","events","url","util","fs","http","https","zlib","stream","net","dns","os","path","crypto","tls","child_process","buffer","string_decoder"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).allthings={},e.require$$0$9,e.require$$0$2,e.require$$0$7,e.require$$0$5,e.require$$0$4,e.require$$1,e.require$$3$1,e.require$$0$3,e.require$$7,e.require$$4,e.require$$0$6,e.require$$0$8,e.require$$2$1,e.require$$1$1,e.require$$0$a,e.require$$0$b,e.require$$1$2)}(this,(function(e,t,n,i,r,o,s,a,c,l,u,p,d,m,h,f,g,y){"use strict";const v=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}},b=e=>({httpHandler:e.httpHandler()});var x,w,E,S,_;!function(e){e.HEADER="header",e.QUERY="query"}(x||(x={})),function(e){e.HEADER="header",e.QUERY="query"}(w||(w={})),function(e){e.HTTP="http",e.HTTPS="https"}(E||(E={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(S||(S={})),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(_||(_={}));const O="__smithy_context";var C,k;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(C||(C={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(k||(k={}));class T{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new T({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce(((e,t)=>{const i=n[t];return{...e,[t]:Array.isArray(i)?[...i]:i}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return T.clone(this)}}class P{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const A={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},I=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!T.isInstance(n.request))return t(n);const{request:i}=n,{handlerProtocol:r=""}=e.requestHandler.metadata||{};if(r.indexOf("h2")>=0&&!i.headers[":authority"])delete i.headers.host,i.headers[":authority"]=i.hostname+(i.port?":"+i.port:"");else if(!i.headers.host){let e=i.hostname;null!=i.port&&(e+=`:${i.port}`),i.headers.host=e}return t(n)})(e),A)}}),R={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},M=e=>({applyToStack:e=>{e.add(((e,t)=>async n=>{try{const i=await e(n),{clientName:r,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=a,u=c??t.inputFilterSensitiveLog,p=l??t.outputFilterSensitiveLog,{$metadata:d,...m}=i.output;return s?.info?.({clientName:r,commandName:o,input:u(n.input),output:p(m),metadata:d}),i}catch(e){const{clientName:i,commandName:r,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,c=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:r,input:c(n.input),error:e,metadata:e.$metadata}),e}}),R)}}),j="X-Amzn-Trace-Id",$={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},N=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:i}=n;if(!T.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(j))return t(n);const r=[]._X_AMZN_TRACE_ID,o=e=>"string"==typeof e&&e.length>0;return o([].AWS_LAMBDA_FUNCTION_NAME)&&o(r)&&(i.headers[j]=r),t({...n,request:i})})(e),$)}}),D=e=>e[O]||(e[O]={}),L=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const z=(e,t)=>(n,i)=>async r=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,i,r.input)),s=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=D(i),c=[];for(const n of o){const r=s.get(n.schemeId);if(!r){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const o=r.identityProvider(await t.identityProviderConfigProvider(e));if(!o){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:l={},signingProperties:u={}}=n.propertiesExtractor?.(e,i)||{};n.identityProperties=Object.assign(n.identityProperties||{},l),n.signingProperties=Object.assign(n.signingProperties||{},u),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await o(n.identityProperties),signer:r.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(r)},F={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},U=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:i=>{i.addRelativeTo(z(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),F)}}),B={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},H={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function q(e,t,n){return{applyToStack:i=>{i.add(((e,t)=>n=>async i=>{const{response:r}=await n(i);try{return{response:r,output:await t(r,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:r}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n "+t,void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}})(e,n),B),i.add(((e,t)=>(n,i)=>async r=>{const o=i.endpointV2?.url&&e.urlParser?async()=>e.urlParser(i.endpointV2.url):e.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const s=await t(r.input,{...e,endpoint:o});return n({...r,request:s})})(e,t),H)}}}const V=e=>e=>{throw e},G=(e,t)=>{},W={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},K=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async n=>{if(!T.isInstance(n.request))return e(n);const i=D(t).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:r={}},identity:o,signer:s}=i,a=await e({...n,request:await s.sign(n.request,o,r)}).catch((s.errorHandler||V)(r));return(s.successHandler||G)(a.response,r),a}),W)}}),Y=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},Q=async(e,t,n,...i)=>await t.send(new e(n),...i);function J(e,t,n,i,r){return async function*(o,s,...a){let c,l=o.startingToken||void 0,u=!0;for(;u;){if(s[n]=l,r&&(s[r]=s[r]??o.pageSize),!(o.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);c=await Q(t,o.client,s,...a),yield c;const p=l;l=X(c,i),u=!(!l||o.stopOnSameToken&&l===p)}}}const X=(e,t)=>{let n=e;const i=t.split(".");for(const e of i){if(!n||"object"!=typeof n)return;n=n[e]}return n},Z={},ee=new Array(64);for(let e=0,t="A".charCodeAt(0),n="Z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t);Z[n]=e,ee[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),i=e+26;Z[n]=i,ee[i]=n}for(let e=0;e<10;e++){Z[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;Z[t]=n,ee[n]=t}Z["+"]=62,ee[62]="+",Z["/"]=63,ee[63]="/";const te=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),i=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,r=0;for(let i=t,o=t+3;i<=o;i++)if("="!==e[i]){if(!(e[i]in Z))throw new TypeError(`Invalid character ${e[i]} in base64 string.`);n|=Z[e[i]]<<6*(o-i),r+=6}else n>>=6;const o=t/4*3;n>>=r%8;const s=Math.floor(r/8);for(let e=0;e<s;e++){const t=8*(s-e-1);i.setUint8(o+e,(n&255<<t)>>t)}}return new Uint8Array(n)},ne=e=>(new TextEncoder).encode(e),ie=e=>"string"==typeof e?ne(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),re=e=>{if("string"==typeof e)return e;if("object"!=typeof e||"number"!=typeof e.byteOffset||"number"!=typeof e.byteLength)throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function oe(e){let t;t="string"==typeof e?ne(e):e;const n="object"==typeof t&&"number"==typeof t.length,i="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!i)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let r="";for(let e=0;e<t.length;e+=3){let n=0,i=0;for(let r=e,o=Math.min(e+3,t.length);r<o;r++)n|=t[r]<<8*(o-r-1),i+=8;const o=Math.ceil(i/6);n<<=6*o-i;for(let e=1;e<=o;e++){const t=6*(o-e);r+=ee[(n&63<<t)>>t]}r+="==".slice(0,4-o)}return r}class se extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?se.mutate(te(e)):se.mutate(ne(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,se.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?oe(e):re(e)}(this,e)}}const ae=e=>encodeURIComponent(e).replace(/[!'()*]/g,ce),ce=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function le(e){const t=[];for(let n of Object.keys(e).sort()){const i=e[n];if(n=ae(n),Array.isArray(i))for(let e=0,r=i.length;e<r;e++)t.push(`${n}=${ae(i[e])}`);else{let e=n;(i||"string"==typeof i)&&(e+=`=${ae(i)}`),t.push(e)}}return t.join("&")}function ue(e=0){return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}const pe={supported:void 0};let de=class e{static create(t){return"function"==typeof t?.handle?t:new e(t)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===pe.supported&&(pe.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,i=!0===this.config.keepAlive,r=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const s=le(e.query||{});s&&(o+=`?${s}`),e.fragment&&(o+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:c,method:l}=e,u=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${o}`,p="GET"===l||"HEAD"===l?void 0:e.body,d={body:p,headers:new Headers(e.headers),method:l,credentials:r};this.config?.cache&&(d.cache=this.config.cache),p&&(d.duplex="half"),"undefined"!=typeof AbortController&&(d.signal=t),pe.supported&&(d.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(d,this.config.requestInit(e));let m=()=>{};const h=new Request(u,d),f=[fetch(h).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new P({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new P({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),ue(n)];return t&&f.push(new Promise(((e,n)=>{const i=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",i,{once:!0}),m=()=>e.removeEventListener("abort",i)}else t.onabort=i}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}};const me=async e=>"function"==typeof Blob&&e instanceof Blob?new Uint8Array(await e.arrayBuffer()):async function(e){const t=[],n=e.getReader();let i=!1,r=0;for(;!i;){const{done:e,value:o}=await n.read();o&&(t.push(o),r+=o.length),i=e}const o=new Uint8Array(r);let s=0;for(const e of t)o.set(e,s),s+=e.length;return o}(e);const he={},fe={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),he[e]=t,fe[t]=e}function ge(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const i=e.slice(n,n+2).toLowerCase();if(!(i in fe))throw new Error(`Cannot decode unrecognized sequence ${i} as hexadecimal`);t[n/2]=fe[i]}return t}function ye(e){let t="";for(let n=0;n<e.byteLength;n++)t+=he[e[n]];return t}const ve=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return se.mutate(e);if(!e)return se.mutate(new Uint8Array);const n=t.streamCollector(e);return se.mutate(await n)};function be(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}class xe{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:i}=await this.context.endpoint();this.path=i;for(const e of this.resolvePathStack)e(this.path);return new T({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,n,i){return this.resolvePathStack.push((r=>{this.path=we(r,this.input,e,t,n,i)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const we=(e,t,n,i,r,o)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=i();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(r,o?t.split("/").map((e=>be(e))).join("/"):be(t))}return e};class Ee{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}const Se=(_e=3e5,e=>Oe(e)&&e.expiration.getTime()-Date.now()<_e);var _e;const Oe=e=>void 0!==e.expiration,Ce=(e,t,n)=>{if(void 0===e)return;const i="function"!=typeof e?async()=>Promise.resolve(e):e;let r,o,s,a=!1;const c=async e=>{o||(o=i(e));try{r=await o,s=!0,a=!1}finally{o=void 0}return r};return void 0===t?async e=>(s&&!e?.forceRefresh||(r=await c(e)),r):async e=>(s&&!e?.forceRefresh||(r=await c(e)),a?r:n(r)?t(r)?(await c(e),r):r:(a=!0,r))};function ke(e){const t=Y(e.userAgentAppId??undefined);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}}}class Te{constructor({size:e,params:t}){this.data=new Map,this.parameters=[],this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(!1===n)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:n,done:i}=e.next();if(this.data.delete(n),i||++t>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(0===n.length)return!1;for(const i of n){const n=String(e[i]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}const Pe=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}$"),Ae=e=>Pe.test(e)||e.startsWith("[")&&e.endsWith("]"),Ie=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Re=(e,t=!1)=>{if(!t)return Ie.test(e);const n=e.split(".");for(const e of n)if(!Re(e))return!1;return!0},Me={},je="endpoints";function $e(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${$e(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map($e).join(", ")})`:JSON.stringify(e,null,2)}class Ne extends Error{constructor(e){super(e),this.name="EndpointError"}}const De=(e,t)=>(e=>{const t=e.split("."),n=[];for(const i of t){const t=i.indexOf("[");if(-1!==t){if(i.indexOf("]")!==i.length-1)throw new Ne(`Path: '${e}' does not end with ']'`);const r=i.slice(t+1,-1);if(Number.isNaN(parseInt(r)))throw new Ne(`Invalid array index: '${r}' in path: '${e}'`);0!==t&&n.push(i.slice(0,t)),n.push(r)}else n.push(i)}return n})(t).reduce(((n,i)=>{if("object"!=typeof n)throw new Ne(`Index '${i}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(i)]:n[i]}),e),Le={[E.HTTP]:80,[E.HTTPS]:443},ze={booleanEquals:(e,t)=>e===t,getAttr:De,isSet:e=>null!=e,isValidHostLabel:Re,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:i="",path:r="",query:o={}}=e,s=new URL(`${i}//${t}${n?`:${n}`:""}${r}`);return s.search=Object.entries(o).map((([e,t])=>`${e}=${t}`)).join("&"),s}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:i,hostname:r,pathname:o,protocol:s,search:a}=t;if(a)return null;const c=s.slice(0,-1);if(!Object.values(E).includes(c))return null;const l=Ae(r);return{scheme:c,authority:`${i}${n.includes(`${i}:${Le[c]}`)||"string"==typeof e&&e.includes(`${i}:${Le[c]}`)?`:${Le[c]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:l}},stringEquals:(e,t)=>e===t,substring:(e,t,n,i)=>t>=n||e.length<n?null:i?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},Fe=(e,t)=>{const n=[],i={...t.endpointParams,...t.referenceRecord};let r=0;for(;r<e.length;){const t=e.indexOf("{",r);if(-1===t){n.push(e.slice(r));break}n.push(e.slice(r,t));const o=e.indexOf("}",t);if(-1===o){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[o+1]&&(n.push(e.slice(t+1,o)),r=o+2);const s=e.substring(t+1,o);if(s.includes("#")){const[e,t]=s.split("#");n.push(De(i[e],t))}else n.push(i[s]);r=o+1}return n.join("")},Ue=(e,t,n)=>{if("string"==typeof e)return Fe(e,n);if(e.fn)return Be(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new Ne(`'${t}': ${String(e)} is not a string, function or reference.`)},Be=({fn:e,argv:t},n)=>{const i=t.map((e=>["boolean","number"].includes(typeof e)?e:Ue(e,"arg",n))),r=e.split(".");return r[0]in Me&&null!=r[1]?Me[r[0]][r[1]](...i):ze[e](...i)},He=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Ne(`'${e}' is already defined in Reference Record.`);const i=Be(t,n);return n.logger?.debug?.(`${je} evaluateCondition: ${$e(t)} = ${$e(i)}`),{result:""===i||!!i,...null!=e&&{toAssign:{name:e,value:i}}}},qe=(e=[],t)=>{const n={};for(const i of e){const{result:e,toAssign:r}=He(i,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};r&&(n[r.name]=r.value,t.logger?.debug?.(`${je} assign: ${r.name} := ${$e(r.value)}`))}return{result:!0,referenceRecord:n}},Ve=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:i.map((e=>{const i=Ue(e,"Header value entry",t);if("string"!=typeof i)throw new Ne(`Header '${n}' value '${i}' is not a string`);return i}))})),{}),Ge=(e,t)=>{if(Array.isArray(e))return e.map((e=>Ge(e,t)));switch(typeof e){case"string":return Fe(e,t);case"object":if(null===e)throw new Ne(`Unexpected endpoint property: ${e}`);return We(e,t);case"boolean":return e;default:throw new Ne("Unexpected endpoint property type: "+typeof e)}},We=(e,t)=>Object.entries(e).reduce(((e,[n,i])=>({...e,[n]:Ge(i,t)})),{}),Ke=(e,t)=>{const n=Ue(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new Ne("Endpoint URL must be a string, got "+typeof n)},Ye=(e,t)=>{const{conditions:n,endpoint:i}=e,{result:r,referenceRecord:o}=qe(n,t);if(!r)return;const s={...t,referenceRecord:{...t.referenceRecord,...o}},{url:a,properties:c,headers:l}=i;return t.logger?.debug?.(`${je} Resolving endpoint from template: ${$e(i)}`),{...null!=l&&{headers:Ve(l,s)},...null!=c&&{properties:We(c,s)},url:Ke(a,s)}},Qe=(e,t)=>{const{conditions:n,error:i}=e,{result:r,referenceRecord:o}=qe(n,t);if(r)throw new Ne(Ue(i,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},Je=(e,t)=>{const{conditions:n,rules:i}=e,{result:r,referenceRecord:o}=qe(n,t);if(r)return Xe(i,{...t,referenceRecord:{...t.referenceRecord,...o}})},Xe=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Ye(n,t);if(e)return e}else if("error"===n.type)Qe(n,t);else{if("tree"!==n.type)throw new Ne(`Unknown endpoint rule: ${n}`);{const e=Je(n,t);if(e)return e}}throw new Ne("Rules evaluation failed")},Ze=(e,t)=>{const{endpointParams:n,logger:i}=t,{parameters:r,rules:o}=e;t.logger?.debug?.(`${je} Initial EndpointParams: ${$e(n)}`);const s=Object.entries(r).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(s.length>0)for(const[e,t]of s)n[e]=n[e]??t;const a=Object.entries(r).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==n[e])throw new Ne(`Missing required parameter: '${e}'`);const c=Xe(o,{endpointParams:n,logger:i,referenceRecord:{}});return t.logger?.debug?.(`${je} Resolved endpoint: ${$e(c)}`),c},et=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!et(t))return!1;return!0}return!!Re(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Ae(e)))};let tt={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const nt={isVirtualHostableS3Bucket:et,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,i,r,o,s,...a]=t;if("arn"!==n||""===i||""===r||""===a.join(":"))return null;return{partition:i,service:r,region:o,accountId:s,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=tt;for(const n of t){const{regions:t,outputs:i}=n;for(const[n,r]of Object.entries(t))if(n===e)return{...i,...r}}for(const n of t){const{regionRegex:t,outputs:i}=n;if(new RegExp(t).test(e))return{...i}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function it(e,t,n){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]=n}Me.aws=nt;const rt=e=>P.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,ot=e=>new Date(Date.now()+e),st=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(ot(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},at=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};let ct=class{async sign(e,t,n){if(!T.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await(async e=>{const t=at("context",e.context),n=at("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],r=at("signer",n.signer),o=await r(i),s=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:a,signingName:c}})(n),{config:r,signer:o}=i;let{signingRegion:s,signingName:a}=i;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(s=t?.signingRegion??s,a=t?.signingName??a)}return await o.sign(e,{signingDate:ot(r.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??rt(t.$response);if(n){const i=at("config",e.config),r=i.systemClockOffset;i.systemClockOffset=st(n,i.systemClockOffset);i.systemClockOffset!==r&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=rt(e);if(n){const e=at("config",t.config);e.systemClockOffset=st(n,e.systemClockOffset)}}};const lt=(e,t,n)=>{let i,r,o,s=!1;return async t=>(o&&!t?.forceRefresh||(i=await(async()=>{r||(r=e());try{i=await r,o=!0,s=!1}finally{r=void 0}return i})()),i)},ut="X-Amz-Date",pt="X-Amz-Signature",dt="X-Amz-Security-Token",mt="authorization",ht=ut.toLowerCase(),ft=[mt,ht,"date"],gt=pt.toLowerCase(),yt="x-amz-content-sha256",vt=dt.toLowerCase(),bt={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},xt=/^proxy-/,wt=/^sec-/,Et="AWS4-HMAC-SHA256",St="AWS4-HMAC-SHA256-PAYLOAD",_t="aws4_request",Ot={},Ct=[],kt=(e,t,n)=>`${e}/${t}/${n}/${_t}`,Tt=(e,t,n)=>{const i=new e(t);return i.update(ie(n)),i.digest()},Pt=({headers:e},t,n)=>{const i={};for(const r of Object.keys(e).sort()){if(null==e[r])continue;const o=r.toLowerCase();(o in bt||t?.has(o)||xt.test(o)||wt.test(o))&&(!n||n&&!n.has(o))||(i[o]=e[r].trim().replace(/\s+/g," "))}return i},At=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===yt)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(i=t,"function"==typeof ArrayBuffer&&i instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(i))){const e=new n;return e.update(ie(t)),ye(await e.digest())}var i;return"UNSIGNED-PAYLOAD"};class It{format(e){const t=[];for(const n of Object.keys(e)){const i=ne(n);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let i=0;for(const e of t)n.set(e,i),i+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const r=new DataView(new ArrayBuffer(3+e.value.byteLength));r.setUint8(0,6),r.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(r.buffer);return o.set(e.value,3),o;case"string":const s=ne(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(jt.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!Mt.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(ge(e.value.replace(/\-/g,"")),1),u}}}var Rt;!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"}(Rt||(Rt={}));const Mt=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let jt=class e{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>0x8000000000000000||t<-0x8000000000000000)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let e=7,i=Math.abs(Math.round(t));e>-1&&i>0;e--,i/=256)n[e]=i;return t<0&&$t(n),new e(n)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&$t(e),parseInt(ye(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}};function $t(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Nt=e=>{e=T.clone(e);for(const t of Object.keys(e.headers))ft.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Dt=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Lt{constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:r,uriEscapePath:o=!0}){this.headerFormatter=new It,this.service=i,this.sha256=r,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=L(n),this.credentialProvider=L(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:r,unhoistableHeaders:o,signableHeaders:s,hoistableHeaders:a,signingRegion:c,signingService:l}=t,u=await this.credentialProvider();this.validateResolvedCredentials(u);const p=c??await this.regionProvider(),{longDate:d,shortDate:m}=zt(n);if(i>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const h=kt(m,p,l??this.service),f=((e,t={})=>{const{headers:n,query:i={}}=T.clone(e);for(const e of Object.keys(n)){const r=e.toLowerCase();("x-amz-"===r.slice(0,6)&&!t.unhoistableHeaders?.has(r)||t.hoistableHeaders?.has(r))&&(i[e]=n[e],delete n[e])}return{...e,headers:n,query:i}})(Nt(e),{unhoistableHeaders:o,hoistableHeaders:a});u.sessionToken&&(f.query[dt]=u.sessionToken),f.query["X-Amz-Algorithm"]=Et,f.query["X-Amz-Credential"]=`${u.accessKeyId}/${h}`,f.query[ut]=d,f.query["X-Amz-Expires"]=i.toString(10);const g=Pt(f,r,s);return f.query["X-Amz-SignedHeaders"]=Ft(g),f.query[pt]=await this.getSignature(d,h,this.getSigningKey(u,p,m,l),this.createCanonicalRequest(f,g,await At(e,this.sha256))),f}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:i,signingRegion:r,signingService:o}){const s=r??await this.regionProvider(),{shortDate:a,longDate:c}=zt(n),l=kt(a,s,o??this.service),u=await At({headers:{},body:t},this.sha256),p=new this.sha256;p.update(e);const d=ye(await p.digest()),m=[St,c,l,i,d,u].join("\n");return this.signString(m,{signingDate:n,signingRegion:s,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:i,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:i}={}){const r=await this.credentialProvider();this.validateResolvedCredentials(r);const o=n??await this.regionProvider(),{shortDate:s}=zt(t),a=new this.sha256(await this.getSigningKey(r,o,s,i));return a.update(ie(e)),ye(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:r,signingService:o}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=r??await this.regionProvider(),c=Nt(e),{longDate:l,shortDate:u}=zt(t),p=kt(u,a,o??this.service);c.headers[ht]=l,s.sessionToken&&(c.headers[vt]=s.sessionToken);const d=await At(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(yt,c.headers)&&this.applyChecksum&&(c.headers[yt]=d);const m=Pt(c,i,n),h=await this.getSignature(l,p,this.getSigningKey(s,a,u,o),this.createCanonicalRequest(c,m,d));return c.headers[mt]=`${Et} Credential=${s.accessKeyId}/${p}, SignedHeaders=${Ft(m)}, Signature=${h}`,c}createCanonicalRequest(e,t,n){const i=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const i of Object.keys(e)){if(i.toLowerCase()===gt)continue;const r=ae(i);t.push(r);const o=e[i];"string"==typeof o?n[r]=`${r}=${ae(o)}`:Array.isArray(o)&&(n[r]=o.slice(0).reduce(((e,t)=>e.concat([`${r}=${ae(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")})(e)}\n${i.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${i.join(";")}\n${n}`}async createStringToSign(e,t,n){const i=new this.sha256;i.update(ie(n));const r=await i.digest();return`${Et}\n${e}\n${t}\n${ye(r)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return ae(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,i){const r=await this.createStringToSign(e,t,i),o=new this.sha256(await n);return o.update(ie(r)),ye(await o.digest())}getSigningKey(e,t,n,i){return(async(e,t,n,i,r)=>{const o=`${n}:${i}:${r}:${ye(await Tt(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in Ot)return Ot[o];for(Ct.push(o);Ct.length>50;)delete Ot[Ct.shift()];let s=`AWS4${t.secretAccessKey}`;for(const t of[n,i,r,_t])s=await Tt(e,s,t);return Ot[o]=s})(this.sha256,e,n,t,i||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const zt=e=>{const t=(n=e,Dt(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}},Ft=e=>Object.keys(e).sort().join(";"),Ut=e=>{let t,n=!1;e.credentials&&(n=!0,t=Ce(e.credentials,Se,Oe)),t||(t=e.credentialDefaultProvider?Y(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:i=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:o}=e;let s;return s=e.signer?Y(e.signer):e.regionInfoProvider?()=>Y(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,r])=>{const{signingRegion:s,signingService:a}=n;e.signingRegion=e.signingRegion||s||r,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Lt)(c)})):async n=>{const r=(n=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Y(e.region)(),properties:{}},n)).signingRegion,s=n.signingName;e.signingRegion=e.signingRegion||r,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Lt)(a)},{...e,systemClockOffset:r,signingEscapePath:i,credentials:n?async()=>t().then((e=>{return n="CREDENTIALS_CODE",i="e",(t=e).$source||(t.$source={}),t.$source[n]=i,t;var t,n,i})):t,signer:s}},Bt=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},Ht=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,qt=()=>{let e=[],t=[],n=!1;const i=new Set,r=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(a.identifyOnResolve()),n),o=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t},s=(n=!1)=>{const i=[],r=[],s={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Bt(t.name,t.aliases))s[e]=t;i.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Bt(t.name,t.aliases))s[e]=t;r.push(t)})),r.forEach((e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${Ht(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const a=(c=i,c.sort(((e,t)=>Vt[t.step]-Vt[e.step]||Gt[t.priority||"normal"]-Gt[e.priority||"normal"]))).map(o).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return a},a={add:(t,n={})=>{const{name:r,override:o,aliases:s}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=Bt(r,s);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${Ht(r,s)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const i=e[n];if(i.step!==a.step||a.priority!==i.priority)throw new Error(`"${Ht(i.name,i.aliases)}" middleware with ${i.priority} priority in ${i.step} step cannot be overridden by "${Ht(r,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)i.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:r,override:o,aliases:s}=n,a={middleware:e,...n},c=Bt(r,s);if(c.length>0){if(c.some((e=>i.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${Ht(r,s)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const i=t[n];if(i.toMiddleware!==a.toMiddleware||i.relation!==a.relation)throw new Error(`"${Ht(i.name,i.aliases)}" middleware ${i.relation} "${i.toMiddleware}" middleware cannot be overridden by "${Ht(r,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)i.add(e)}t.push(a)},clone:()=>r(qt()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let r=!1;const o=e=>{const t=Bt(e.name,e.aliases);if(t.includes(n)){r=!0;for(const e of t)i.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),r})(n):(n=>{let r=!1;const o=e=>{if(e.middleware===n){r=!0;for(const t of Bt(e.name,e.aliases))i.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),r})(n),removeByTag:n=>{let r=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(n)){const e=Bt(o,s);for(const t of e)i.delete(t);return r=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),r},concat:e=>{const t=r(qt());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:r,identify:()=>s(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Ht(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of s().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},Vt={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Gt={high:3,normal:2,low:1};class Wt{constructor(e){this.config=e,this.middlewareStack=qt()}send(e,t,n){const i="function"!=typeof t?t:void 0,r="function"==typeof t?t:n;let o;if(void 0===i&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?o=t.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,i),t.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,i);if(!r)return o(e).then((e=>e.output));o(e).then((e=>r(null,e.output)),(e=>r(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class Kt{constructor(){this.middlewareStack=qt()}static classBuilder(){return new Yt}resolveMiddlewareWithContext(e,t,n,{middlewareFn:i,clientName:r,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:l,CommandCtor:u}){for(const r of i.bind(this)(u,e,t,n))this.middlewareStack.use(r);const p=e.concat(this.middlewareStack),{logger:d}=t,m={logger:d,clientName:r,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[O]:{commandInstance:this,...c},...l},{requestHandler:h}=t;return p.resolve((e=>h.handle(e.request,n||{})),m)}}class Yt{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends Kt{static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=t??{},e._init(this)}resolveMiddleware(n,i,r){return this.resolveMiddlewareWithContext(n,i,r,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const Qt="***SensitiveInformation***",Jt=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},Xt=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&fn.warn(hn(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},Zt=Math.ceil(2**127*(2-2**-23)),en=e=>{const t=Xt(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>Zt)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},tn=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},nn=e=>on(e,16),rn=e=>on(e,8),on=(e,t)=>{const n=tn(e);if(void 0!==n&&sn(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},sn=(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]}},an=(e,t)=>{if(null==e)throw new TypeError("Expected a non-null value");return e},cn=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return fn.warn(hn(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},ln=e=>Xt("string"==typeof e?dn(e):e),un=ln,pn=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,dn=e=>{const t=e.match(pn);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},mn=e=>tn("string"==typeof e?dn(e):e),hn=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),fn={warn:console.warn},gn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yn=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),vn=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=yn.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,i,r,o,s,a,c,l,u]=t,p=(e=>nn("string"==typeof e?dn(e):e))(Cn(i)),d=Sn(r,"month",1,12),m=Sn(o,"day",1,31),h=bn(p,d,m,{hours:s,minutes:a,seconds:c,fractionalMilliseconds:l});return"Z"!=u.toUpperCase()&&h.setTime(h.getTime()-On(u)),h},bn=(e,t,n,i)=>{const r=t-1;return wn(e,r,n),new Date(Date.UTC(e,r,n,Sn(i.hours,"hour",0,23),Sn(i.minutes,"minute",0,59),Sn(i.seconds,"seconds",0,60),_n(i.fractionalMilliseconds)))},xn=[31,28,31,30,31,30,31,31,30,31,30,31],wn=(e,t,n)=>{let i=xn[t];if(1===t&&En(e)&&(i=29),n>i)throw new TypeError(`Invalid day for ${gn[t]} in ${e}: ${n}`)},En=e=>e%4==0&&(e%100!=0||e%400==0),Sn=(e,t,n,i)=>{const r=(e=>rn("string"==typeof e?dn(e):e))(Cn(e));if(r<n||r>i)throw new TypeError(`${t} must be between ${n} and ${i}, inclusive`);return r},_n=e=>null==e?0:1e3*(e=>en("string"==typeof e?dn(e):e))("0."+e),On=e=>{const t=e[0];let n=1;if("+"==t)n=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);n=-1}return n*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},Cn=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)};let kn=class e extends Error{constructor(t){super(t.message),Object.setPrototypeOf(this,e.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}};const Tn=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Pn=e=>({output:t,parsedBody:n,errorCode:i})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:i})=>{const r=An(e),o=r.httpStatusCode?r.httpStatusCode+"":void 0,s=new n({name:t?.code||t?.Code||i||o||"UnknownError",$fault:"client",$metadata:r});throw Tn(s,t)})({output:t,parsedBody:n,exceptionCtor:e,errorCode:i})},An=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"]}),In=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Rn=e=>{const t=[];for(const n in S){const i=S[n];void 0!==e[i]&&t.push({algorithmId:()=>i,checksumConstructor:()=>e[i]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},Mn=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},jn=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},$n=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},Nn=e=>({...Rn(e),...jn(e)}),Dn=e=>({...Mn(e),...$n(e)}),Ln=e=>Array.isArray(e)?e:[e],zn=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&void 0!==e[n][t]?e[n]=e[n][t]:"object"==typeof e[n]&&null!==e[n]&&(e[n]=zn(e[n]));return e},Fn=e=>null!=e,Un=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};Un.prototype=Object.create(String.prototype,{constructor:{value:Un,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(Un,String);class Bn{trace(){}debug(){}info(){}warn(){}error(){}}function Hn(e,t,n){let i,r,o;if(void 0===t&&void 0===n)i={},o=e;else{if(i=e,"function"==typeof t)return r=t,o=n,Vn(i,r,o);o=t}for(const e of Object.keys(o))Array.isArray(o[e])?Gn(i,null,o,e):i[e]=o[e];return i}const qn=(e,t)=>{const n={};for(const i in t)Gn(n,e,t,i);return n},Vn=(e,t,n)=>Hn(e,Object.entries(n).reduce(((e,[n,i])=>(Array.isArray(i)?e[n]=i:e[n]="function"==typeof i?[t,i()]:[t,i],e)),{})),Gn=(e,t,n,i)=>{if(null!==t){let r=n[i];"function"==typeof r&&(r=[,r]);const[o=Wn,s=Kn,a=i]=r;return void(("function"==typeof o&&o(t[a])||"function"!=typeof o&&o)&&(e[i]=s(t[a])))}let[r,o]=n[i];if("function"==typeof o){let t;const n=void 0===r&&null!=(t=o()),s="function"==typeof r&&!!r(void 0)||"function"!=typeof r&&!!r;n?e[i]=t:s&&(e[i]=o())}else{const t=void 0===r&&null!=o,n="function"==typeof r&&!!r(o)||"function"!=typeof r&&!!r;(t||n)&&(e[i]=o)}},Wn=e=>null!=e,Kn=e=>e,Yn=e=>e.toISOString().replace(".000Z","Z"),Qn=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(Qn);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=Qn(e[n]));return t}return e},Jn=(e,t)=>ve(e,t).then((e=>t.utf8Encoder(e))),Xn=async(e,t)=>{const n=await((e,t)=>Jn(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})))(e,t);return n.message=n.message??n.Message,n};var Zn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ei(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ti(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),n}var ni,ii,ri={},oi={};function si(){return ni||(ni=1,function(e){const t=":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="["+t+"]["+(t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",i=new RegExp("^"+n+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,n){if(t){const i=Object.keys(t),r=i.length;for(let o=0;o<r;o++)e[i[o]]="strict"===n?[t[i[o]]]:t[i[o]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=i.exec(e);return!(null==t)},e.getAllMatches=function(e,t){const n=[];let i=t.exec(e);for(;i;){const r=[];r.startIndex=t.lastIndex-i[0].length;const o=i.length;for(let e=0;e<o;e++)r.push(i[e]);n.push(r),i=t.exec(e)}return n},e.nameRegexp=n}(oi)),oi}function ai(){if(ii)return ri;ii=1;const e=si(),t={allowBooleanAttributes:!1,unpairedTags:[]};function n(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function i(e,t){const n=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const i=e.substr(n,t-n);if(t>5&&"xml"===i)return p("InvalidXml","XML declaration allowed only at the start of the document.",m(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function r(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&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}ri.validate=function(o,s){s=Object.assign({},t,s);const c=[];let d=!1,h=!1;"\ufeff"===o[0]&&(o=o.substr(1));for(let t=0;t<o.length;t++)if("<"===o[t]&&"?"===o[t+1]){if(t+=2,t=i(o,t),t.err)return t}else{if("<"!==o[t]){if(n(o[t]))continue;return p("InvalidChar","char '"+o[t]+"' is not expected.",m(o,t))}{let g=t;if(t++,"!"===o[t]){t=r(o,t);continue}{let y=!1;"/"===o[t]&&(y=!0,t++);let v="";for(;t<o.length&&">"!==o[t]&&" "!==o[t]&&"\t"!==o[t]&&"\n"!==o[t]&&"\r"!==o[t];t++)v+=o[t];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),t--),f=v,!e.isName(f)){let e;return e=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",p("InvalidTag",e,m(o,t))}const b=a(o,t);if(!1===b)return p("InvalidAttr","Attributes for '"+v+"' have open quote.",m(o,t));let x=b.value;if(t=b.index,"/"===x[x.length-1]){const e=t-x.length;x=x.substring(0,x.length-1);const n=l(x,s);if(!0!==n)return p(n.err.code,n.err.msg,m(o,e+n.err.line));d=!0}else if(y){if(!b.tagClosed)return p("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",m(o,t));if(x.trim().length>0)return p("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",m(o,g));if(0===c.length)return p("InvalidTag","Closing tag '"+v+"' has not been opened.",m(o,g));{const e=c.pop();if(v!==e.tagName){let t=m(o,e.tagStartPos);return p("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+t.line+", col "+t.col+") instead of closing tag '"+v+"'.",m(o,g))}0==c.length&&(h=!0)}}else{const e=l(x,s);if(!0!==e)return p(e.err.code,e.err.msg,m(o,t-x.length+e.err.line));if(!0===h)return p("InvalidXml","Multiple possible root nodes found.",m(o,t));-1!==s.unpairedTags.indexOf(v)||c.push({tagName:v,tagStartPos:g}),d=!0}for(t++;t<o.length;t++)if("<"===o[t]){if("!"===o[t+1]){t++,t=r(o,t);continue}if("?"!==o[t+1])break;if(t=i(o,++t),t.err)return t}else if("&"===o[t]){const e=u(o,t);if(-1==e)return p("InvalidChar","char '&' is not expected.",m(o,t));t=e}else if(!0===h&&!n(o[t]))return p("InvalidXml","Extra text at the end",m(o,t));"<"===o[t]&&t--}}}var f;return d?1==c.length?p("InvalidTag","Unclosed tag '"+c[0].tagName+"'.",m(o,c[0].tagStartPos)):!(c.length>0)||p("InvalidXml","Invalid '"+JSON.stringify(c.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):p("InvalidXml","Start tag expected.",1)};const o='"',s="'";function a(e,t){let n="",i="",r=!1;for(;t<e.length;t++){if(e[t]===o||e[t]===s)""===i?i=e[t]:i!==e[t]||(i="");else if(">"===e[t]&&""===i){r=!0;break}n+=e[t]}return""===i&&{value:n,index:t,tagClosed:r}}const c=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function l(t,n){const i=e.getAllMatches(t,c),r={};for(let e=0;e<i.length;e++){if(0===i[e][1].length)return p("InvalidAttr","Attribute '"+i[e][2]+"' has no space in starting.",h(i[e]));if(void 0!==i[e][3]&&void 0===i[e][4])return p("InvalidAttr","Attribute '"+i[e][2]+"' is without value.",h(i[e]));if(void 0===i[e][3]&&!n.allowBooleanAttributes)return p("InvalidAttr","boolean attribute '"+i[e][2]+"' is not allowed.",h(i[e]));const t=i[e][2];if(!d(t))return p("InvalidAttr","Attribute '"+t+"' is an invalid name.",h(i[e]));if(r.hasOwnProperty(t))return p("InvalidAttr","Attribute '"+t+"' is repeated.",h(i[e]));r[t]=1}return!0}function u(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function p(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function d(t){return e.isName(t)}function m(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function h(e){return e.startIndex+e[1].length}return ri}var ci,li,ui,pi,di,mi,hi,fi,gi,yi={};function vi(){if(ui)return li;ui=1;return li=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}}function bi(){if(gi)return fi;gi=1;const e=si(),t=vi(),n=function(){if(di)return pi;di=1;const e=si();function t(e,t){let n="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)n+=e[t];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const i=e[t++];let r="";for(;t<e.length&&e[t]!==i;t++)r+=e[t];return[n,r,t]}function n(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function i(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function r(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function o(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function s(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function a(t){if(e.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}return pi=function(e,c){const l={};if("O"!==e[c+3]||"C"!==e[c+4]||"T"!==e[c+5]||"Y"!==e[c+6]||"P"!==e[c+7]||"E"!==e[c+8])throw new Error("Invalid Tag instead of DOCTYPE");{c+=9;let u=1,p=!1,d=!1,m="";for(;c<e.length;c++)if("<"!==e[c]||d)if(">"===e[c]){if(d?"-"===e[c-1]&&"-"===e[c-2]&&(d=!1,u--):u--,0===u)break}else"["===e[c]?p=!0:m+=e[c];else{if(p&&i(e,c))c+=7,[entityName,val,c]=t(e,c+1),-1===val.indexOf("&")&&(l[a(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(p&&r(e,c))c+=8;else if(p&&o(e,c))c+=8;else if(p&&s(e,c))c+=9;else{if(!n)throw new Error("Invalid DOCTYPE");d=!0}u++,m=""}if(0!==u)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:c}},pi}(),i=function(){if(hi)return mi;hi=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(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);const n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};return mi=function(i,r={}){if(r=Object.assign({},n,r),!i||"string"!=typeof i)return i;let o=i.trim();if(void 0!==r.skipLike&&r.skipLike.test(o))return i;if(r.hex&&e.test(o))return Number.parseInt(o,16);{const e=t.exec(o);if(e){const t=e[1],n=e[2];let a=(s=e[3])&&-1!==s.indexOf(".")?("."===(s=s.replace(/0+$/,""))?s="0":"."===s[0]?s="0"+s:"."===s[s.length-1]&&(s=s.substr(0,s.length-1)),s):s;const c=e[4]||e[6];if(!r.leadingZeros&&n.length>0&&t&&"."!==o[2])return i;if(!r.leadingZeros&&n.length>0&&!t&&"."!==o[1])return i;{const e=Number(o),s=""+e;return-1!==s.search(/[eE]/)||c?r.eNotation?e:i:-1!==o.indexOf(".")?"0"===s&&""===a||s===a||t&&s==="-"+a?e:i:n?a===s||t+a===s?e:i:o===s||o===t+s?e:i}}return i}var s},mi}();function r(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const i=t[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:e[i]}}}function o(e,t,n,i,r,o,s){if(void 0!==e&&(this.options.trimValues&&!i&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const i=this.options.tagValueProcessor(t,e,n,r,o);if(null==i)return e;if(typeof i!=typeof e||i!==e)return i;if(this.options.trimValues)return y(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?y(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function s(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}const a=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function c(t,n,i){if(!this.options.ignoreAttributes&&"string"==typeof t){const i=e.getAllMatches(t,a),r=i.length,o={};for(let e=0;e<r;e++){const t=this.resolveNameSpace(i[e][1]);let r=i[e][4],s=this.options.attributeNamePrefix+t;if(t.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==r){this.options.trimValues&&(r=r.trim()),r=this.replaceEntitiesValue(r);const e=this.options.attributeValueProcessor(t,r,n);o[s]=null==e?r:typeof e!=typeof r||e!==r?e:y(r,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const l=function(e){e=e.replace(/\r\n?/g,"\n");const i=new t("!xml");let r=i,o="",s="";for(let a=0;a<e.length;a++){if("<"===e[a])if("/"===e[a+1]){const t=h(e,">",a,"Closing Tag is not closed.");let n=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=n.indexOf(":");-1!==e&&(n=n.substr(e+1))}this.options.transformTagName&&(n=this.options.transformTagName(n)),r&&(o=this.saveTextToParentTag(o,r,s));const i=s.substring(s.lastIndexOf(".")+1);if(n&&-1!==this.options.unpairedTags.indexOf(n))throw new Error(`Unpaired tag can not be used as closing tag: </${n}>`);let c=0;i&&-1!==this.options.unpairedTags.indexOf(i)?(c=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=s.lastIndexOf("."),s=s.substring(0,c),r=this.tagsNodeStack.pop(),o="",a=t}else if("?"===e[a+1]){let n=f(e,a,!1,"?>");if(!n)throw new Error("Pi Tag is not closed.");if(o=this.saveTextToParentTag(o,r,s),this.options.ignoreDeclaration&&"?xml"===n.tagName||this.options.ignorePiTags);else{const e=new t(n.tagName);e.add(this.options.textNodeName,""),n.tagName!==n.tagExp&&n.attrExpPresent&&(e[":@"]=this.buildAttributesMap(n.tagExp,s,n.tagName)),this.addChild(r,e,s)}a=n.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=h(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const n=e.substring(a+4,t-2);o=this.saveTextToParentTag(o,r,s),r.add(this.options.commentPropName,[{[this.options.textNodeName]:n}])}a=t}else if("!D"===e.substr(a+1,2)){const t=n(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=h(e,"]]>",a,"CDATA is not closed.")-2,n=e.substring(a+9,t);o=this.saveTextToParentTag(o,r,s);let i=this.parseTextData(n,r.tagname,s,!0,!1,!0,!0);null==i&&(i=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:n}]):r.add(this.options.textNodeName,i),a=t+2}else{let n=f(e,a,this.options.removeNSPrefix),c=n.tagName;const l=n.rawTagName;let u=n.tagExp,p=n.attrExpPresent,d=n.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&o&&"!xml"!==r.tagname&&(o=this.saveTextToParentTag(o,r,s,!1));const m=r;if(m&&-1!==this.options.unpairedTags.indexOf(m.tagname)&&(r=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),c!==i.tagname&&(s+=s?"."+c:c),this.isItStopNode(this.options.stopNodes,s,c)){let i="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),u=c):u=u.substr(0,u.length-1),a=n.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=n.closeIndex;else{const t=this.readStopNodeData(e,l,d+1);if(!t)throw new Error(`Unexpected end of ${l}`);a=t.i,i=t.tagContent}const o=new t(c);c!==u&&p&&(o[":@"]=this.buildAttributesMap(u,s,c)),i&&(i=this.parseTextData(i,c,s,!0,p,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),o.add(this.options.textNodeName,i),this.addChild(r,o,s)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new t(c);c!==u&&p&&(e[":@"]=this.buildAttributesMap(u,s,c)),this.addChild(r,e,s),s=s.substr(0,s.lastIndexOf("."))}else{const e=new t(c);this.tagsNodeStack.push(r),c!==u&&p&&(e[":@"]=this.buildAttributesMap(u,s,c)),this.addChild(r,e,s),r=e}o="",a=d}}else o+=e[a]}return i.child};function u(e,t,n){const i=this.options.updateTag(t.tagname,n,t[":@"]);!1===i||("string"==typeof i?(t.tagname=i,e.addChild(t)):e.addChild(t))}const p=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function d(e,t,n,i){return e&&(void 0===i&&(i=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,i))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function m(e,t,n){const i="*."+n;for(const n in e){const r=e[n];if(i===r||t===r)return!0}return!1}function h(e,t,n,i){const r=e.indexOf(t,n);if(-1===r)throw new Error(i);return r+t.length-1}function f(e,t,n,i=">"){const r=function(e,t,n=">"){let i,r="";for(let o=t;o<e.length;o++){let t=e[o];if(i)t===i&&(i="");else if('"'===t||"'"===t)i=t;else if(t===n[0]){if(!n[1])return{data:r,index:o};if(e[o+1]===n[1])return{data:r,index:o}}else"\t"===t&&(t=" ");r+=t}}(e,t+1,i);if(!r)return;let o=r.data;const s=r.index,a=o.search(/\s/);let c=o,l=!0;-1!==a&&(c=o.substring(0,a),o=o.substring(a+1).trimStart());const u=c;if(n){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),l=c!==r.data.substr(e+1))}return{tagName:c,tagExp:o,closeIndex:s,attrExpPresent:l,rawTagName:u}}function g(e,t,n){const i=n;let r=1;for(;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){const o=h(e,">",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(r--,0===r))return{tagContent:e.substring(i,n),i:o};n=o}else if("?"===e[n+1]){n=h(e,"?>",n+1,"StopNode is not closed.")}else if("!--"===e.substr(n+1,3)){n=h(e,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===e.substr(n+1,2)){n=h(e,"]]>",n,"StopNode is not closed.")-2}else{const i=f(e,n,">");if(i){(i&&i.tagName)===t&&"/"!==i.tagExp[i.tagExp.length-1]&&r++,n=i.closeIndex}}}function y(t,n,r){if(n&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&i(t,r)}return e.isExist(t)?t:""}return fi=class{constructor(e){this.options=e,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:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=r,this.parseXml=l,this.parseTextData=o,this.resolveNameSpace=s,this.buildAttributesMap=c,this.isItStopNode=m,this.replaceEntitiesValue=p,this.readStopNodeData=g,this.saveTextToParentTag=d,this.addChild=u}}}var xi,wi,Ei,Si,_i,Oi,Ci,ki,Ti,Pi={};function Ai(){if(xi)return Pi;function e(r,o,s){let a;const c={};for(let l=0;l<r.length;l++){const u=r[l],p=t(u);let d="";if(d=void 0===s?p:s+"."+p,p===o.textNodeName)void 0===a?a=u[p]:a+=""+u[p];else{if(void 0===p)continue;if(u[p]){let t=e(u[p],o,d);const r=i(t,o);u[":@"]?n(t,u[":@"],d,o):1!==Object.keys(t).length||void 0===t[o.textNodeName]||o.alwaysCreateTextNode?0===Object.keys(t).length&&(o.alwaysCreateTextNode?t[o.textNodeName]="":t=""):t=t[o.textNodeName],void 0!==c[p]&&c.hasOwnProperty(p)?(Array.isArray(c[p])||(c[p]=[c[p]]),c[p].push(t)):o.isArray(p,d,r)?c[p]=[t]:c[p]=t}}}return"string"==typeof a?a.length>0&&(c[o.textNodeName]=a):void 0!==a&&(c[o.textNodeName]=a),c}function t(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function n(e,t,n,i){if(t){const r=Object.keys(t),o=r.length;for(let s=0;s<o;s++){const o=r[s];i.isArray(o,n+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function i(e,t){const{textNodeName:n}=t,i=Object.keys(e).length;return 0===i||!(1!==i||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n])}return xi=1,Pi.prettify=function(t,n){return e(t,n)},Pi}function Ii(){if(Ei)return wi;Ei=1;const{buildOptions:e}=function(){if(ci)return yi;ci=1;const e={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,n){return e}};return yi.buildOptions=function(t){return Object.assign({},e,t)},yi.defaultOptions=e,yi}(),t=bi(),{prettify:n}=Ai(),i=ai();return wi=class{constructor(t){this.externalEntities={},this.options=e(t)}parse(e,r){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(r){!0===r&&(r={});const t=i.validate(e,r);if(!0!==t)throw Error(`${t.err.msg}:${t.err.line}:${t.err.col}`)}const o=new t(this.options);o.addExternalEntities(this.externalEntities);const s=o.parseXml(e);return this.options.preserveOrder||void 0===s?s:n(s,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}}function Ri(){if(_i)return Si;_i=1;function e(o,s,a,c){let l="",u=!1;for(let p=0;p<o.length;p++){const d=o[p],m=t(d);if(void 0===m)continue;let h="";if(h=0===a.length?m:`${a}.${m}`,m===s.textNodeName){let e=d[m];i(h,s)||(e=s.tagValueProcessor(m,e),e=r(e,s)),u&&(l+=c),l+=e,u=!1;continue}if(m===s.cdataPropName){u&&(l+=c),l+=`<![CDATA[${d[m][0][s.textNodeName]}]]>`,u=!1;continue}if(m===s.commentPropName){l+=c+`\x3c!--${d[m][0][s.textNodeName]}--\x3e`,u=!0;continue}if("?"===m[0]){const e=n(d[":@"],s),t="?xml"===m?"":c;let i=d[m][0][s.textNodeName];i=0!==i.length?" "+i:"",l+=t+`<${m}${i}${e}?>`,u=!0;continue}let f=c;""!==f&&(f+=s.indentBy);const g=c+`<${m}${n(d[":@"],s)}`,y=e(d[m],s,h,f);-1!==s.unpairedTags.indexOf(m)?s.suppressUnpairedNode?l+=g+">":l+=g+"/>":y&&0!==y.length||!s.suppressEmptyNode?y&&y.endsWith(">")?l+=g+`>${y}${c}</${m}>`:(l+=g+">",y&&""!==c&&(y.includes("/>")||y.includes("</"))?l+=c+s.indentBy+y+c:l+=y,l+=`</${m}>`):l+=g+"/>",u=!0}return l}function t(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const i=t[n];if(e.hasOwnProperty(i)&&":@"!==i)return i}}function n(e,t){let n="";if(e&&!t.ignoreAttributes)for(let i in e){if(!e.hasOwnProperty(i))continue;let o=t.attributeValueProcessor(i,e[i]);o=r(o,t),!0===o&&t.suppressBooleanAttributes?n+=` ${i.substr(t.attributeNamePrefix.length)}`:n+=` ${i.substr(t.attributeNamePrefix.length)}="${o}"`}return n}function i(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let i in t.stopNodes)if(t.stopNodes[i]===e||t.stopNodes[i]==="*."+n)return!0;return!1}function r(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const i=t.entities[n];e=e.replace(i.regex,i.val)}return e}return Si=function(t,n){let i="";return n.format&&n.indentBy.length>0&&(i="\n"),e(t,n,"",i)}}var Mi=function(){if(Ti)return ki;Ti=1;const e=ai(),t=Ii(),n=function(){if(Ci)return Oi;Ci=1;const e=Ri(),t={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 n(e){this.options=Object.assign({},t,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=o),this.processTextOrObjNode=i,this.options.format?(this.indentate=r,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function i(e,t,n){const i=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,n):this.buildObjectNode(i.val,t,i.attrStr,n)}function r(e){return this.options.indentBy.repeat(e)}function o(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}return n.prototype.build=function(t){return this.options.preserveOrder?e(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0).val)},n.prototype.j2x=function(e,t){let n="",i="";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r))if(void 0===e[r])this.isAttribute(r)&&(i+="");else if(null===e[r])this.isAttribute(r)?i+="":"?"===r[0]?i+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if(e[r]instanceof Date)i+=this.buildTextValNode(e[r],r,"",t);else if("object"!=typeof e[r]){const o=this.isAttribute(r);if(o)n+=this.buildAttrPairStr(o,""+e[r]);else if(r===this.options.textNodeName){let t=this.options.tagValueProcessor(r,""+e[r]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[r],r,"",t)}else if(Array.isArray(e[r])){const n=e[r].length;let o="",s="";for(let a=0;a<n;a++){const n=e[r][a];if(void 0===n);else if(null===n)"?"===r[0]?i+=this.indentate(t)+"<"+r+"?"+this.tagEndChar:i+=this.indentate(t)+"<"+r+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const e=this.j2x(n,t+1);o+=e.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else o+=this.processTextOrObjNode(n,r,t);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(r,n);e=this.replaceEntitiesValue(e),o+=e}else o+=this.buildTextValNode(n,r,"",t)}this.options.oneListGroup&&(o=this.buildObjectNode(o,r,s,t)),i+=o}else if(this.options.attributesGroupName&&r===this.options.attributesGroupName){const t=Object.keys(e[r]),i=t.length;for(let o=0;o<i;o++)n+=this.buildAttrPairStr(t[o],""+e[r][t[o]])}else i+=this.processTextOrObjNode(e[r],r,t);return{attrStr:n,val:i}},n.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},n.prototype.buildObjectNode=function(e,t,n,i){if(""===e)return"?"===t[0]?this.indentate(i)+"<"+t+n+"?"+this.tagEndChar:this.indentate(i)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let r="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",r=""),!n&&""!==n||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(i)+"<"+t+n+o+this.tagEndChar+e+this.indentate(i)+r:this.indentate(i)+"<"+t+n+o+">"+e+r}},n.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},n.prototype.buildTextValNode=function(e,t,n,i){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(i)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(i)+"<"+t+n+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(t,e);return r=this.replaceEntitiesValue(r),""===r?this.indentate(i)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+n+">"+r+"</"+t+this.tagEndChar}},n.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e},Oi=n}();return ki={XMLParser:t,XMLValidator:e,XMLBuilder:n}}();const ji=(e,t)=>Jn(e,t).then((e=>{if(e.length){const t=new Mi.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});let n;t.addEntity("#xD","\r"),t.addEntity("#10","\n");try{n=t.parse(e,!0)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const i="#text",r=Object.keys(n)[0],o=n[r];return o[i]&&(o[r]=o[i],delete o[i]),zn(o)}return{}})),$i=async(e,t)=>{const n=await ji(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},Ni=/\d{12}\.ddb/;const Di="user-agent",Li="x-amz-user-agent",zi=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Fi=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Ui=e=>(t,n)=>async i=>{const{request:r}=i;if(!T.isInstance(r))return t(i);const{headers:o}=r,s=n?.userAgent?.map(Bi)||[],a=(await e.defaultUserAgentProvider()).map(Bi);await async function(e,t,n){const i=n.request;if("rpc-v2-cbor"===i?.headers?.["smithy-protocol"]&&it(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?it(e,"RETRY_MODE_ADAPTIVE","F"):it(e,"RETRY_MODE_STANDARD","E"):it(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Ni)&&it(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":it(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":it(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":it(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const t=r;t.accountId&&it(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))it(e,n,i)}}(n,e,i);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const i=e[n];if(!(t.length+i.length+1<=1024))break;t.length?t+=","+i:t+=i}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(Bi)||[],u=await e.userAgentAppId();u&&a.push(Bi([`app/${u}`]));const p=[].concat([...a,...s,...l]).join(" "),d=[...a.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(d&&(o[Li]=o[Li]?`${o[Di]} ${d}`:d),o[Di]=p):o[Li]=p,t({...i,request:r})},Bi=e=>{const t=e[0].split("/").map((e=>e.replace(zi,"-"))).join("/"),n=e[1]?.replace(Fi,"-"),i=t.indexOf("/"),r=t.substring(0,i);let o=t.substring(i+1);return"api"===r&&(o=o.toLowerCase()),[r,o,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},Hi={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},qi=e=>({applyToStack:t=>{t.add(Ui(e),Hi)}});var Vi;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Vi||(Vi={}));const Gi=!1,Wi=!1,Ki=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Yi=e=>Ki(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Qi=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return Yi(t);const e=await t();return Yi(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Ki(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}},Ji="content-length";const Xi={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Zi=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const i=t.request;if(T.isInstance(i)){const{body:e,headers:t}=i;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Ji))try{const t=n(e);i.headers={...i.headers,[Ji]:String(t)}}catch(e){}}return e({...t,request:i})}),Xi)}}),er=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,tr=/(\d+\.){3}\d+/,nr=/\.\./,ir=e=>er.test(e)&&!tr.test(e)&&!nr.test(e),rr=e=>{const[t,n,i,,,r]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&n&&i&&r);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},or=(e,t,n)=>{const i=async()=>{const i=n[e]??n[t];return"function"==typeof i?i():i};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{const e=await i();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:i,path:r}=e;return`${t}//${n}${i?":"+i:""}${r}`}}return e}:i},sr=async e=>{};const ar=e=>{if("string"==typeof e)return ar(new URL(e));const{hostname:t,pathname:n,port:i,protocol:r,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,i=null]=n.split("=");e=decodeURIComponent(e),i&&(i=decodeURIComponent(i)),e in t?Array.isArray(t[e])?t[e].push(i):t[e]=[t[e],i]:t[e]=i}return t}(o)),{hostname:t,port:i?parseInt(i):void 0,protocol:r,path:n,query:s}},cr=e=>"object"==typeof e?"url"in e?ar(e.url):e:ar(e),lr=async(e,t,n)=>{const i={},r=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(r))switch(o.type){case"staticContextParams":i[t]=o.value;break;case"contextParams":i[t]=e[o.name];break;case"clientContextParams":case"builtInParams":i[t]=await or(o.name,t,n)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(r).length&&Object.assign(i,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),rr(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!ir(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(i),i},ur=({config:e,instructions:t})=>(n,i)=>async r=>{e.endpoint&&function(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}(i,"ENDPOINT_OVERRIDE","N");const o=await(async(e,t,n,i)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await sr(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(cr(e)))}const r=await lr(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(r,i)})(r.input,{getEndpointParameterInstructions:()=>t},{...e},i);i.endpointV2=o,i.authSchemes=o.properties?.authSchemes;const s=i.authSchemes?.[0];if(s){i.signing_region=s.signingRegion,i.signing_service=s.signingName;const e=D(i),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return n({...r})},pr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:H.name},dr=(e,t)=>({applyToStack:n=>{n.addRelativeTo(ur({config:e,instructions:t}),pr)}}),mr=e=>{const t=e.tls??!0,{endpoint:n}=e,i=null!=n?async()=>cr(await L(n)()):void 0,r=!!n,o={...e,endpoint:i,tls:t,isCustomEndpoint:r,useDualstackEndpoint:L(e.useDualstackEndpoint??!1),useFipsEndpoint:L(e.useFipsEndpoint??!1)};let s;return o.serviceConfiguredEndpoint=async()=>(e.serviceId&&!s&&(s=sr(e.serviceId)),s),o};var hr;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(hr||(hr={}));const fr=hr.STANDARD,gr=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],yr=["TimeoutError","RequestTimeout","RequestTimeoutException"],vr=[500,502,503,504],br=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],xr=e=>429===e.$metadata?.httpStatusCode||gr.includes(e.name)||1==e.$retryable?.throttling,wr=e=>(e=>e.$metadata?.clockSkewCorrected)(e)||yr.includes(e.name)||br.includes(e?.code||"")||vr.includes(e.$metadata?.httpStatusCode||0);class Er{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>setTimeout(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),xr(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const Sr=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class _r{constructor(e){this.maxAttempts=e,this.mode=hr.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Sr({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:100);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),r=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,i):i,o=this.getCapacityCost(n);return this.capacity-=o,Sr({retryDelay:r,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Or{constructor(e,t){this.maxAttemptsProvider=e,this.mode=hr.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Er,this.standardRetryStrategy=new _r(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}let Cr;const kr=new Uint8Array(16);function Tr(){if(!Cr&&(Cr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Cr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Cr(kr)}const Pr=[];for(let e=0;e<256;++e)Pr.push((e+256).toString(16).slice(1));var Ar={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ir(e,t,n){if(Ar.randomUUID&&!t&&!e)return Ar.randomUUID();const i=(e=e||{}).random||(e.rng||Tr)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return Pr[e[t+0]]+Pr[e[t+1]]+Pr[e[t+2]]+Pr[e[t+3]]+"-"+Pr[e[t+4]]+Pr[e[t+5]]+"-"+Pr[e[t+6]]+Pr[e[t+7]]+"-"+Pr[e[t+8]]+Pr[e[t+9]]+"-"+Pr[e[t+10]]+Pr[e[t+11]]+Pr[e[t+12]]+Pr[e[t+13]]+Pr[e[t+14]]+Pr[e[t+15]]}(i)}const Rr=e=>{const{retryStrategy:t}=e,n=L(e.maxAttempts??3);return{...e,maxAttempts:n,retryStrategy:async()=>{if(t)return t;return await L(e.retryMode)()===hr.ADAPTIVE?new Or(n):new _r(n)}}},Mr=e=>e?.body instanceof ReadableStream,jr=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,$r=e=>{const t={error:e,errorType:Nr(e)},n=zr(e.$response);return n&&(t.retryAfterHint=n),t},Nr=e=>xr(e)?"THROTTLING":wr(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!wr(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Dr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Lr=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async i=>{let r=await e.retryStrategy();const o=await e.maxAttempts();if(!jr(r))return r?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",r.mode]]),r.retry(t,i);{let e=await r.acquireInitialRetryToken(n.partition_id),a=new Error,c=0,l=0;const{request:u}=i,p=T.isInstance(u);for(p&&(u.headers["amz-sdk-invocation-id"]=Ir());;)try{p&&(u.headers["amz-sdk-request"]=`attempt=${c+1}; max=${o}`);const{response:n,output:s}=await t(i);return r.recordSuccess(e),s.$metadata.attempts=c+1,s.$metadata.totalRetryDelay=l,{response:n,output:s}}catch(t){const i=$r(t);if(a=(s=t)instanceof Error?s:s instanceof Object?Object.assign(new Error,s):"string"==typeof s?new Error(s):new Error(`AWS SDK error wrapper for ${s}`),p&&Mr(u))throw(n.logger instanceof Bn?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{e=await r.refreshRetryTokenForRetry(e,i)}catch(e){throw a.$metadata||(a.$metadata={}),a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=l,a}c=e.getRetryCount();const o=e.getRetryDelay();l+=o,await new Promise((e=>setTimeout(e,o)))}}var s})(e),Dr)}}),zr=e=>{if(!P.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],i=Number(n);if(!Number.isNaN(i))return new Date(1e3*i);return new Date(n)},Fr=async(e,t,n)=>({operation:D(t).operation,region:await L(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Ur=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"lambda",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Br={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Hr="3.688.0";var qr="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Vr(e){return e instanceof Uint8Array?e:"string"==typeof e?qr(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Gr(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Wr={name:"SHA-256"},Kr={name:"HMAC",hash:Wr},Yr=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]);const Qr={};function Jr(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Qr}var Xr=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Gr(e)){var t=Vr(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return Jr().crypto.subtle.sign(Kr,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Gr(this.toHash)?Promise.resolve(Yr):Promise.resolve().then((function(){return Jr().crypto.subtle.digest(Wr,e.toHash)})).then((function(e){return Promise.resolve(new Uint8Array(e))}))},e.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&void 0!==this.secret&&(this.key=new Promise((function(t,n){Jr().crypto.subtle.importKey("raw",Vr(e.secret),Kr,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}();function Zr(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))}function eo(e,t){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}"function"==typeof SuppressedError&&SuppressedError;var to=64,no=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]),io=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ro=Math.pow(2,53)-1,oo=function(){function e(){this.state=Int32Array.from(io),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,8*this.bytesHashed>ro)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===to&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var e=8*this.bytesHashed,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%to>=56){for(var i=this.bufferLength;i<to;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(i=this.bufferLength;i<56;i++)t.setUint8(i,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var r=new Uint8Array(32);for(i=0;i<8;i++)r[4*i]=this.state[i]>>>24&255,r[4*i+1]=this.state[i]>>>16&255,r[4*i+2]=this.state[i]>>>8&255,r[4*i+3]=this.state[i]>>>0&255;return r},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],c=t[6],l=t[7],u=0;u<to;u++){if(u<16)this.temp[u]=(255&e[4*u])<<24|(255&e[4*u+1])<<16|(255&e[4*u+2])<<8|255&e[4*u+3];else{var p=this.temp[u-2],d=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,m=((p=this.temp[u-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[u]=(d+this.temp[u-7]|0)+(m+this.temp[u-16]|0)}var h=(((s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7))+(s&a^~s&c)|0)+(l+(no[u]+this.temp[u]|0)|0)|0,f=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&r^i&r)|0;l=c,c=a,a=s,s=o+h|0,o=r,r=i,i=n,n=h+f|0}t[0]+=n,t[1]+=i,t[2]+=r,t[3]+=o,t[4]+=s,t[5]+=a,t[6]+=c,t[7]+=l},e}(),so=function(){function e(e){this.secret=e,this.hash=new oo,this.reset()}return e.prototype.update=function(e){if(!Gr(e)&&!this.error)try{this.hash.update(Vr(e))}catch(e){this.error=e}},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 Zr(this,void 0,void 0,(function(){return eo(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new oo,this.secret){this.outer=new oo;var e=function(e){var t=Vr(e);if(t.byteLength>to){var n=new oo;n.update(t),t=n.digest()}var i=new Uint8Array(to);return i.set(t),i}(this.secret),t=new Uint8Array(to);t.set(e);for(var n=0;n<to;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(n=0;n<e.byteLength;n++)e[n]=0}},e}();var ao=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function co(e){return!(!function(e){if("object"==typeof e&&"object"==typeof e.crypto){return"function"==typeof e.crypto.getRandomValues}return!1}(e)||"object"!=typeof e.crypto.subtle)&&function(e){return e&&ao.every((function(t){return"function"==typeof e[t]}))}(e.crypto.subtle)}var lo,uo=function(){function e(e){co(Jr())?this.hash=new Xr(e):this.hash=new so(e)}return e.prototype.update=function(e,t){this.hash.update(Vr(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),po={exports:{}};var mo=(lo||(lo=1,function(e){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=n(18),r=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,i){void 0===i&&(i=!1);var r=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(r,o),a=0,c=e.map([t,n],(function(t){var n=s-e.getVersionPrecision(t),i=t+new Array(n+1).join(".0");return e.map(i.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(i&&(a=s-Math.min(r,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)i.push(t(e[n]));return i},e.find=function(e,t){var n,i;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,i=e.length;n<i;n+=1){var r=e[n];if(t(r,n))return r}},e.assign=function(e){for(var t,n,i=e,r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){i[t]=e[t]}))};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return i.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return i.BROWSER_MAP[e]||""},e}();t.default=r,e.exports=t.default},18:function(e,t,n){t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(91))&&i.__esModule?i:{default:i},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var a=function(){function e(){}var t,n,i;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new r.default(e,t)},e.parse=function(e){return new r.default(e).getResult()},t=e,i=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),i&&s(t,i),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var i=c(n(92)),r=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(i.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(r.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,(function(t){if("function"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error("Browser's test function is not valid")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},i=0,r={},o=0;if(Object.keys(e).forEach((function(t){var s=e[t];"string"==typeof s?(r[t]=s,o+=1):"object"==typeof s&&(n[t]=s,i+=1)})),i>0){var s=Object.keys(n),c=a.default.find(s,(function(e){return t.isOS(e)}));if(c){var l=this.satisfies(n[c]);if(void 0!==l)return l}var u=a.default.find(s,(function(e){return t.isPlatform(e)}));if(u){var p=this.satisfies(n[u]);if(void 0!==p)return p}}if(o>0){var d=Object.keys(r),m=a.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==m)return this.compareVersion(r[m])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),i=e.toLowerCase(),r=a.default.getBrowserTypeByAlias(i);return t&&r&&(i=r.toLowerCase()),i===n},t.compareVersion=function(e){var t=[0],n=e,i=!1,r=this.getBrowserVersion();if("string"==typeof r)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(i=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(i=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(r,n,i))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=l,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=r.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=r.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=r.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=r.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=r.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=r.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=r.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=r.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=r.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=r.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=r.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=r.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=r.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=r.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=r.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=r.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=r.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=r.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=r.default.getFirstMatch(o,e)||r.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=r.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=r.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=r.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=r.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=r.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=r.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=r.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=r.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=r.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=r.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:r.default.getFirstMatch(t,e),version:r.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=r.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=r.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=r.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=r.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=r.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=r.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=r.default.getMacOSVersionName(t),i={name:o.OS_MAP.MacOS,version:t};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=r.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=r.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=r.default.getAndroidVersionName(t),i={name:o.OS_MAP.Android,version:t};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=r.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=r.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||r.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||r.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=r.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=r.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=r.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=r.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=r.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=r.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=r.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=r.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=r.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=r.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})}(po)),po.exports),ho=ei(mo);const fo=({serviceId:e,clientVersion:t})=>async n=>{const i="undefined"!=typeof window&&window?.navigator?.userAgent?ho.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.1"],[`os/${i?.os?.name||"other"}`,i?.os?.version],["lang/js"],["md/browser",`${i?.browser?.name??"unknown"}_${i?.browser?.version??"unknown"}`]];e&&r.push([`api/${e}`,t]);const o=await(n?.userAgentAppId?.());return o&&r.push([`app/${o}`]),r};var go,yo=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),r=i.next();!r.done;r=i.next()){var o=r.value;this.checksum=this.checksum>>>8^vo[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),vo=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}([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]);class bo{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(e));n>-1&&i>0;n--,i/=256)t[n]=i;return e<0&&xo(t),new bo(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&xo(e),parseInt(ye(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function xo(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class wo{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const i=this.fromUtf8(n);t.push(Uint8Array.from([i.byteLength]),i,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let i=0;for(const e of t)n.set(e,i),i+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const r=new DataView(new ArrayBuffer(3+e.value.byteLength));r.setUint8(0,6),r.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(r.buffer);return o.set(e.value,3),o;case"string":const s=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(bo.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!Io.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(ge(e.value.replace(/\-/g,"")),1),u}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const i=e.getUint8(n++),r=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,i));switch(n+=i,e.getUint8(n++)){case 0:t[r]={type:Eo,value:!0};break;case 1:t[r]={type:Eo,value:!1};break;case 2:t[r]={type:So,value:e.getInt8(n++)};break;case 3:t[r]={type:_o,value:e.getInt16(n,!1)},n+=2;break;case 4:t[r]={type:Oo,value:e.getInt32(n,!1)},n+=4;break;case 5:t[r]={type:Co,value:new bo(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const i=e.getUint16(n,!1);n+=2,t[r]={type:ko,value:new Uint8Array(e.buffer,e.byteOffset+n,i)},n+=i;break;case 7:const o=e.getUint16(n,!1);n+=2,t[r]={type:To,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,o))},n+=o;break;case 8:t[r]={type:Po,value:new Date(new bo(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const s=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[r]={type:Ao,value:`${ye(s.subarray(0,4))}-${ye(s.subarray(4,6))}-${ye(s.subarray(6,8))}-${ye(s.subarray(8,10))}-${ye(s.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}!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"}(go||(go={}));const Eo="boolean",So="byte",_o="short",Oo="integer",Co="long",ko="binary",To="string",Po="timestamp",Ao="uuid",Io=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ro{constructor(e,t){this.headerMarshaller=new wo(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),i=n.byteLength+t.byteLength+16,r=new Uint8Array(i),o=new DataView(r.buffer,r.byteOffset,r.byteLength),s=new yo;return o.setUint32(0,i,!1),o.setUint32(4,n.byteLength,!1),o.setUint32(8,s.update(r.subarray(0,8)).digest(),!1),r.set(n,12),r.set(t,n.byteLength+12),o.setUint32(i-4,s.update(r.subarray(8,i-4)).digest(),!1),r}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const i=new DataView(n,t,e),r=i.getUint32(0,!1);if(e!==r)throw new Error("Reported message length does not match received message length");const o=i.getUint32(4,!1),s=i.getUint32(8,!1),a=i.getUint32(e-4,!1),c=(new yo).update(new Uint8Array(n,t,8));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(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,o),body:new Uint8Array(n,t+8+4+o,r-o-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Mo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class jo{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class $o{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class No{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}function Do(e,t){return async function(n){const{value:i}=n.headers[":message-type"];if("error"===i){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===i){const i=n.headers[":exception-type"].value,r={[i]:n},o=await e(r);if(o.$unknown){const e=new Error(t(n.body));throw e.name=i,e}throw o[i]}if("event"===i){const t={[n.headers[":event-type"].value]:n},i=await e(t);if(i.$unknown)return;return i}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}let Lo=class{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Ro(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,i=null,r=null;const o=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,i=new Uint8Array(e),new DataView(i.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const s=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await s.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield i)}const c=e.length;let l=0;for(;l<c;){if(!i){const t=c-l;r||(r=new Uint8Array(4));const i=Math.min(4-n,t);if(r.set(e.slice(l,l+i),n),n+=i,l+=i,n<4)break;o(new DataView(r.buffer).getUint32(0,!1)),r=null}const s=Math.min(t-n,c-l);i.set(e.slice(l,l+s),n),n+=s,l+=s,t&&t===n&&(yield i,i=null,t=0,n=0)}}}}}(e);return new $o({messageStream:new Mo({inputStream:n,decoder:this.eventStreamCodec}),deserializer:Do(t,this.utfEncoder)})}serialize(e,t){return new jo({messageStream:new No({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};class zo{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new Lo({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n=Fo(e)?(i=e,{[Symbol.asyncIterator]:async function*(){const e=i.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)return;yield n}}finally{e.releaseLock()}}}):e;var i;return this.universalMarshaller.deserialize(n,t)}serialize(e,t){const n=this.universalMarshaller.serialize(e,t);return"function"==typeof ReadableStream?(e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(e){const{done:n,value:i}=await t.next();if(n)return e.close();e.enqueue(i)}})})(n):n}}const Fo=e=>"function"==typeof ReadableStream&&e instanceof ReadableStream,Uo=e=>new zo(e),Bo=e=>()=>Promise.reject(e),Ho="function"==typeof TextEncoder?new TextEncoder:null,qo=e=>{if("string"==typeof e){if(Ho)return Ho.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const i=e.charCodeAt(n);i>127&&i<=2047?t++:i>2047&&i<=65535&&(t+=2),i>=56320&&i<=57343&&n--}return t}if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;throw new Error(`Body Length computation failed for ${e}`)},Vo="required",Go="fn",Wo="argv",Ko="ref",Yo=!0,Qo="isSet",Jo="booleanEquals",Xo="error",Zo="endpoint",es="tree",ts="PartitionResult",ns={[Vo]:!1,type:"String"},is={[Vo]:!0,default:!1,type:"Boolean"},rs={[Ko]:"Endpoint"},os={[Go]:Jo,[Wo]:[{[Ko]:"UseFIPS"},!0]},ss={[Go]:Jo,[Wo]:[{[Ko]:"UseDualStack"},!0]},as={},cs={[Go]:"getAttr",[Wo]:[{[Ko]:ts},"supportsFIPS"]},ls={[Go]:Jo,[Wo]:[!0,{[Go]:"getAttr",[Wo]:[{[Ko]:ts},"supportsDualStack"]}]},us=[os],ps=[ss],ds=[{[Ko]:"Region"}],ms={version:"1.0",parameters:{Region:ns,UseDualStack:is,UseFIPS:is,Endpoint:ns},rules:[{conditions:[{[Go]:Qo,[Wo]:[rs]}],rules:[{conditions:us,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Xo},{conditions:ps,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Xo},{endpoint:{url:rs,properties:as,headers:as},type:Zo}],type:es},{conditions:[{[Go]:Qo,[Wo]:ds}],rules:[{conditions:[{[Go]:"aws.partition",[Wo]:ds,assign:ts}],rules:[{conditions:[os,ss],rules:[{conditions:[{[Go]:Jo,[Wo]:[Yo,cs]},ls],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:as,headers:as},type:Zo}],type:es},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Xo}],type:es},{conditions:us,rules:[{conditions:[{[Go]:Jo,[Wo]:[cs,Yo]}],rules:[{endpoint:{url:"https://lambda-fips.{Region}.{PartitionResult#dnsSuffix}",properties:as,headers:as},type:Zo}],type:es},{error:"FIPS is enabled but this partition does not support FIPS",type:Xo}],type:es},{conditions:ps,rules:[{conditions:[ls],rules:[{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:as,headers:as},type:Zo}],type:es},{error:"DualStack is enabled but this partition does not support DualStack",type:Xo}],type:es},{endpoint:{url:"https://lambda.{Region}.{PartitionResult#dnsSuffix}",properties:as,headers:as},type:Zo}],type:es}],type:es},{error:"Invalid Configuration: Missing Region",type:Xo}]},hs=new Te({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),fs=(e,t={})=>hs.get(e,(()=>Ze(ms,{endpointParams:e,logger:t.logger})));Me.aws=nt;const gs=["in-region","cross-region","mobile","standard","legacy"],ys=({defaultsMode:e}={})=>lt((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(vs()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${gs.join(", ")}, got ${t}`)}})),vs=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?ho.parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},bs=e=>{const t=ys(e),n=()=>t().then(In),i=(e=>({apiVersion:"2015-03-31",base64Decoder:e?.base64Decoder??te,base64Encoder:e?.base64Encoder??oe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??fs,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Ur,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ct}],logger:e?.logger??new Bn,serviceId:e?.serviceId??"Lambda",urlParser:e?.urlParser??ar,utf8Decoder:e?.utf8Decoder??ne,utf8Encoder:e?.utf8Encoder??re}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??fo({serviceId:i.serviceId,clientVersion:Hr}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Uo,maxAttempts:e?.maxAttempts??3,region:e?.region??Bo("Region is missing"),requestHandler:de.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||fr),sha256:e?.sha256??uo,streamCollector:e?.streamCollector??me,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Gi)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Wi))}},xs=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},ws=e=>({region:e.region()}),Es=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}},Ss=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class _s extends Wt{constructor(...[e]){const t=bs(e||{});var n;const i=ke((n=t,{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"lambda"})),r=Rr(i),o=Qi(r),s=mr(o);var a;const c=(e=>({...Ut(e)}))((a=s,{...a,eventStreamMarshaller:a.eventStreamSerdeProvider(a)})),l=((e,t)=>{const n={...xs(e),...Nn(e),...v(e),...Es(e)};return t.forEach((e=>e.configure(n))),{...e,...ws(n),...Dn(n),...b(n),...Ss(n)}})(c,e?.extensions||[]);super(l),this.config=l,this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(Lr(this.config)),this.middlewareStack.use(Zi(this.config)),this.middlewareStack.use(I(this.config)),this.middlewareStack.use(M(this.config)),this.middlewareStack.use(N(this.config)),this.middlewareStack.use(U(this.config,{httpAuthSchemeParametersProvider:Fr,identityProviderConfigProvider:async e=>new Ee({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(K(this.config))}destroy(){super.destroy()}}class Os extends kn{constructor(e){super(e),Object.setPrototypeOf(this,Os.prototype)}}class Cs extends Os{constructor(e){super({name:"InvalidParameterValueException",$fault:"client",...e}),this.name="InvalidParameterValueException",this.$fault="client",Object.setPrototypeOf(this,Cs.prototype),this.Type=e.Type}}class ks extends Os{constructor(e){super({name:"PolicyLengthExceededException",$fault:"client",...e}),this.name="PolicyLengthExceededException",this.$fault="client",Object.setPrototypeOf(this,ks.prototype),this.Type=e.Type}}class Ts extends Os{constructor(e){super({name:"PreconditionFailedException",$fault:"client",...e}),this.name="PreconditionFailedException",this.$fault="client",Object.setPrototypeOf(this,Ts.prototype),this.Type=e.Type}}class Ps extends Os{constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),this.name="ResourceConflictException",this.$fault="client",Object.setPrototypeOf(this,Ps.prototype),this.Type=e.Type}}let As=class e extends Os{constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class Is extends Os{constructor(e){super({name:"ServiceException",$fault:"server",...e}),this.name="ServiceException",this.$fault="server",Object.setPrototypeOf(this,Is.prototype),this.Type=e.Type,this.Message=e.Message}}class Rs extends Os{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,Rs.prototype),this.retryAfterSeconds=e.retryAfterSeconds,this.Type=e.Type,this.Reason=e.Reason}}class Ms extends Os{constructor(e){super({name:"CodeSigningConfigNotFoundException",$fault:"client",...e}),this.name="CodeSigningConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ms.prototype),this.Type=e.Type,this.Message=e.Message}}class js extends Os{constructor(e){super({name:"CodeStorageExceededException",$fault:"client",...e}),this.name="CodeStorageExceededException",this.$fault="client",Object.setPrototypeOf(this,js.prototype),this.Type=e.Type}}class $s extends Os{constructor(e){super({name:"CodeVerificationFailedException",$fault:"client",...e}),this.name="CodeVerificationFailedException",this.$fault="client",Object.setPrototypeOf(this,$s.prototype),this.Type=e.Type,this.Message=e.Message}}class Ns extends Os{constructor(e){super({name:"InvalidCodeSignatureException",$fault:"client",...e}),this.name="InvalidCodeSignatureException",this.$fault="client",Object.setPrototypeOf(this,Ns.prototype),this.Type=e.Type,this.Message=e.Message}}let Ds=class e extends Os{constructor(t){super({name:"ResourceInUseException",$fault:"client",...t}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Type=t.Type,this.Message=t.Message}};class Ls extends Os{constructor(e){super({name:"ProvisionedConcurrencyConfigNotFoundException",$fault:"client",...e}),this.name="ProvisionedConcurrencyConfigNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ls.prototype),this.Type=e.Type}}class zs extends Os{constructor(e){super({name:"EC2AccessDeniedException",$fault:"server",...e}),this.name="EC2AccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,zs.prototype),this.Type=e.Type,this.Message=e.Message}}class Fs extends Os{constructor(e){super({name:"EC2ThrottledException",$fault:"server",...e}),this.name="EC2ThrottledException",this.$fault="server",Object.setPrototypeOf(this,Fs.prototype),this.Type=e.Type,this.Message=e.Message}}class Us extends Os{constructor(e){super({name:"EC2UnexpectedException",$fault:"server",...e}),this.name="EC2UnexpectedException",this.$fault="server",Object.setPrototypeOf(this,Us.prototype),this.Type=e.Type,this.Message=e.Message,this.EC2ErrorCode=e.EC2ErrorCode}}class Bs extends Os{constructor(e){super({name:"EFSIOException",$fault:"client",...e}),this.name="EFSIOException",this.$fault="client",Object.setPrototypeOf(this,Bs.prototype),this.Type=e.Type,this.Message=e.Message}}class Hs extends Os{constructor(e){super({name:"EFSMountConnectivityException",$fault:"client",...e}),this.name="EFSMountConnectivityException",this.$fault="client",Object.setPrototypeOf(this,Hs.prototype),this.Type=e.Type,this.Message=e.Message}}class qs extends Os{constructor(e){super({name:"EFSMountFailureException",$fault:"client",...e}),this.name="EFSMountFailureException",this.$fault="client",Object.setPrototypeOf(this,qs.prototype),this.Type=e.Type,this.Message=e.Message}}class Vs extends Os{constructor(e){super({name:"EFSMountTimeoutException",$fault:"client",...e}),this.name="EFSMountTimeoutException",this.$fault="client",Object.setPrototypeOf(this,Vs.prototype),this.Type=e.Type,this.Message=e.Message}}class Gs extends Os{constructor(e){super({name:"ENILimitReachedException",$fault:"server",...e}),this.name="ENILimitReachedException",this.$fault="server",Object.setPrototypeOf(this,Gs.prototype),this.Type=e.Type,this.Message=e.Message}}class Ws extends Os{constructor(e){super({name:"InvalidRequestContentException",$fault:"client",...e}),this.name="InvalidRequestContentException",this.$fault="client",Object.setPrototypeOf(this,Ws.prototype),this.Type=e.Type}}class Ks extends Os{constructor(e){super({name:"InvalidRuntimeException",$fault:"server",...e}),this.name="InvalidRuntimeException",this.$fault="server",Object.setPrototypeOf(this,Ks.prototype),this.Type=e.Type,this.Message=e.Message}}class Ys extends Os{constructor(e){super({name:"InvalidSecurityGroupIDException",$fault:"server",...e}),this.name="InvalidSecurityGroupIDException",this.$fault="server",Object.setPrototypeOf(this,Ys.prototype),this.Type=e.Type,this.Message=e.Message}}class Qs extends Os{constructor(e){super({name:"InvalidSubnetIDException",$fault:"server",...e}),this.name="InvalidSubnetIDException",this.$fault="server",Object.setPrototypeOf(this,Qs.prototype),this.Type=e.Type,this.Message=e.Message}}class Js extends Os{constructor(e){super({name:"InvalidZipFileException",$fault:"server",...e}),this.name="InvalidZipFileException",this.$fault="server",Object.setPrototypeOf(this,Js.prototype),this.Type=e.Type,this.Message=e.Message}}class Xs extends Os{constructor(e){super({name:"KMSAccessDeniedException",$fault:"server",...e}),this.name="KMSAccessDeniedException",this.$fault="server",Object.setPrototypeOf(this,Xs.prototype),this.Type=e.Type,this.Message=e.Message}}class Zs extends Os{constructor(e){super({name:"KMSDisabledException",$fault:"server",...e}),this.name="KMSDisabledException",this.$fault="server",Object.setPrototypeOf(this,Zs.prototype),this.Type=e.Type,this.Message=e.Message}}class ea extends Os{constructor(e){super({name:"KMSInvalidStateException",$fault:"server",...e}),this.name="KMSInvalidStateException",this.$fault="server",Object.setPrototypeOf(this,ea.prototype),this.Type=e.Type,this.Message=e.Message}}class ta extends Os{constructor(e){super({name:"KMSNotFoundException",$fault:"server",...e}),this.name="KMSNotFoundException",this.$fault="server",Object.setPrototypeOf(this,ta.prototype),this.Type=e.Type,this.Message=e.Message}}class na extends Os{constructor(e){super({name:"RecursiveInvocationException",$fault:"client",...e}),this.name="RecursiveInvocationException",this.$fault="client",Object.setPrototypeOf(this,na.prototype),this.Type=e.Type,this.Message=e.Message}}class ia extends Os{constructor(e){super({name:"RequestTooLargeException",$fault:"client",...e}),this.name="RequestTooLargeException",this.$fault="client",Object.setPrototypeOf(this,ia.prototype),this.Type=e.Type}}class ra extends Os{constructor(e){super({name:"ResourceNotReadyException",$fault:"server",...e}),this.name="ResourceNotReadyException",this.$fault="server",Object.setPrototypeOf(this,ra.prototype),this.Type=e.Type}}class oa extends Os{constructor(e){super({name:"SnapStartException",$fault:"client",...e}),this.name="SnapStartException",this.$fault="client",Object.setPrototypeOf(this,oa.prototype),this.Type=e.Type,this.Message=e.Message}}class sa extends Os{constructor(e){super({name:"SnapStartNotReadyException",$fault:"client",...e}),this.name="SnapStartNotReadyException",this.$fault="client",Object.setPrototypeOf(this,sa.prototype),this.Type=e.Type,this.Message=e.Message}}class aa extends Os{constructor(e){super({name:"SnapStartTimeoutException",$fault:"client",...e}),this.name="SnapStartTimeoutException",this.$fault="client",Object.setPrototypeOf(this,aa.prototype),this.Type=e.Type,this.Message=e.Message}}class ca extends Os{constructor(e){super({name:"SubnetIPAddressLimitReachedException",$fault:"server",...e}),this.name="SubnetIPAddressLimitReachedException",this.$fault="server",Object.setPrototypeOf(this,ca.prototype),this.Type=e.Type,this.Message=e.Message}}class la extends Os{constructor(e){super({name:"UnsupportedMediaTypeException",$fault:"client",...e}),this.name="UnsupportedMediaTypeException",this.$fault="client",Object.setPrototypeOf(this,la.prototype),this.Type=e.Type}}var ua;!function(e){e.visit=(e,t)=>void 0!==e.PayloadChunk?t.PayloadChunk(e.PayloadChunk):void 0!==e.InvokeComplete?t.InvokeComplete(e.InvokeComplete):t._(e.$unknown[0],e.$unknown[1])}(ua||(ua={}));const pa=e=>({...e,...e.Payload&&{Payload:Qt}}),da=e=>({...e,...e.Payload&&{Payload:Qt}}),ma=async(e,t)=>{const n=function(e,t){return new xe(e,t)}(e,t),i=Hn({},Fn,{"content-type":"application/octet-stream",[hc]:e[oc],[gc]:e[ac],[pc]:e[nc]});n.bp("/2015-03-31/functions/{FunctionName}/invocations"),n.p("FunctionName",(()=>e.FunctionName),"{FunctionName}",!1);const r=Hn({[cc]:[,e[cc]]});let o;return void 0!==e.Payload&&(o=e.Payload),n.m("POST").h(i).q(r).b(o),n.build()},ha=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return fa(e,t);const n=Hn({$metadata:tc(e),[rc]:[,e.headers[mc]],[sc]:[,e.headers[fc]],[ic]:[,e.headers[dc]]}),i=await ve(e.body,t);return n.Payload=i,Hn(n,{StatusCode:[,e.statusCode]}),n},fa=async(e,t)=>{const n={...e,body:await Xn(e.body,t)},i=((e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(r=e.headers,o="x-amzn-errortype",Object.keys(r).find((e=>e.toLowerCase()===o.toLowerCase())));var r,o;return void 0!==i?n(e.headers[i]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0})(e,n.body);switch(i){case"InvalidParameterValueException":case"com.amazonaws.lambda#InvalidParameterValueException":throw await Pa(n);case"PolicyLengthExceededException":case"com.amazonaws.lambda#PolicyLengthExceededException":throw await za(n);case"PreconditionFailedException":case"com.amazonaws.lambda#PreconditionFailedException":throw await Fa(n);case"ResourceConflictException":case"com.amazonaws.lambda#ResourceConflictException":throw await qa(n);case"ResourceNotFoundException":case"com.amazonaws.lambda#ResourceNotFoundException":throw await Ga(n);case"ServiceException":case"com.amazonaws.lambda#ServiceException":throw await Ka(n);case"TooManyRequestsException":case"com.amazonaws.lambda#TooManyRequestsException":throw await Za(n);case"CodeSigningConfigNotFoundException":case"com.amazonaws.lambda#CodeSigningConfigNotFoundException":throw await ya(n);case"CodeStorageExceededException":case"com.amazonaws.lambda#CodeStorageExceededException":throw await va(n);case"CodeVerificationFailedException":case"com.amazonaws.lambda#CodeVerificationFailedException":throw await ba(n);case"InvalidCodeSignatureException":case"com.amazonaws.lambda#InvalidCodeSignatureException":throw await Ta(n);case"ResourceInUseException":case"com.amazonaws.lambda#ResourceInUseException":throw await Va(n);case"ProvisionedConcurrencyConfigNotFoundException":case"com.amazonaws.lambda#ProvisionedConcurrencyConfigNotFoundException":throw await Ua(n);case"EC2AccessDeniedException":case"com.amazonaws.lambda#EC2AccessDeniedException":throw await xa(n);case"EC2ThrottledException":case"com.amazonaws.lambda#EC2ThrottledException":throw await wa(n);case"EC2UnexpectedException":case"com.amazonaws.lambda#EC2UnexpectedException":throw await Ea(n);case"EFSIOException":case"com.amazonaws.lambda#EFSIOException":throw await Sa(n);case"EFSMountConnectivityException":case"com.amazonaws.lambda#EFSMountConnectivityException":throw await _a(n);case"EFSMountFailureException":case"com.amazonaws.lambda#EFSMountFailureException":throw await Oa(n);case"EFSMountTimeoutException":case"com.amazonaws.lambda#EFSMountTimeoutException":throw await Ca(n);case"ENILimitReachedException":case"com.amazonaws.lambda#ENILimitReachedException":throw await ka(n);case"InvalidRequestContentException":case"com.amazonaws.lambda#InvalidRequestContentException":throw await Aa(n);case"InvalidRuntimeException":case"com.amazonaws.lambda#InvalidRuntimeException":throw await Ia(n);case"InvalidSecurityGroupIDException":case"com.amazonaws.lambda#InvalidSecurityGroupIDException":throw await Ra(n);case"InvalidSubnetIDException":case"com.amazonaws.lambda#InvalidSubnetIDException":throw await Ma(n);case"InvalidZipFileException":case"com.amazonaws.lambda#InvalidZipFileException":throw await ja(n);case"KMSAccessDeniedException":case"com.amazonaws.lambda#KMSAccessDeniedException":throw await $a(n);case"KMSDisabledException":case"com.amazonaws.lambda#KMSDisabledException":throw await Na(n);case"KMSInvalidStateException":case"com.amazonaws.lambda#KMSInvalidStateException":throw await Da(n);case"KMSNotFoundException":case"com.amazonaws.lambda#KMSNotFoundException":throw await La(n);case"RecursiveInvocationException":case"com.amazonaws.lambda#RecursiveInvocationException":throw await Ba(n);case"RequestTooLargeException":case"com.amazonaws.lambda#RequestTooLargeException":throw await Ha(n);case"ResourceNotReadyException":case"com.amazonaws.lambda#ResourceNotReadyException":throw await Wa(n);case"SnapStartException":case"com.amazonaws.lambda#SnapStartException":throw await Ya(n);case"SnapStartNotReadyException":case"com.amazonaws.lambda#SnapStartNotReadyException":throw await Qa(n);case"SnapStartTimeoutException":case"com.amazonaws.lambda#SnapStartTimeoutException":throw await Ja(n);case"SubnetIPAddressLimitReachedException":case"com.amazonaws.lambda#SubnetIPAddressLimitReachedException":throw await Xa(n);case"UnsupportedMediaTypeException":case"com.amazonaws.lambda#UnsupportedMediaTypeException":throw await ec(n);default:const t=n.body;return ga({output:e,parsedBody:t,errorCode:i})}},ga=Pn(Os),ya=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ms({$metadata:tc(e),...n});return Tn(o,e.body)},va=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new js({$metadata:tc(e),...n});return Tn(o,e.body)},ba=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new $s({$metadata:tc(e),...n});return Tn(o,e.body)},xa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new zs({$metadata:tc(e),...n});return Tn(o,e.body)},wa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Fs({$metadata:tc(e),...n});return Tn(o,e.body)},Ea=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{EC2ErrorCode:cn,Message:cn,Type:cn});Object.assign(n,r);const o=new Us({$metadata:tc(e),...n});return Tn(o,e.body)},Sa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Bs({$metadata:tc(e),...n});return Tn(o,e.body)},_a=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Hs({$metadata:tc(e),...n});return Tn(o,e.body)},Oa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new qs({$metadata:tc(e),...n});return Tn(o,e.body)},Ca=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Vs({$metadata:tc(e),...n});return Tn(o,e.body)},ka=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Gs({$metadata:tc(e),...n});return Tn(o,e.body)},Ta=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ns({$metadata:tc(e),...n});return Tn(o,e.body)},Pa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Cs({$metadata:tc(e),...n});return Tn(o,e.body)},Aa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ws({$metadata:tc(e),...n});return Tn(o,e.body)},Ia=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ks({$metadata:tc(e),...n});return Tn(o,e.body)},Ra=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ys({$metadata:tc(e),...n});return Tn(o,e.body)},Ma=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Qs({$metadata:tc(e),...n});return Tn(o,e.body)},ja=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Js({$metadata:tc(e),...n});return Tn(o,e.body)},$a=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Xs({$metadata:tc(e),...n});return Tn(o,e.body)},Na=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Zs({$metadata:tc(e),...n});return Tn(o,e.body)},Da=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new ea({$metadata:tc(e),...n});return Tn(o,e.body)},La=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new ta({$metadata:tc(e),...n});return Tn(o,e.body)},za=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new ks({$metadata:tc(e),...n});return Tn(o,e.body)},Fa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ts({$metadata:tc(e),...n});return Tn(o,e.body)},Ua=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ls({$metadata:tc(e),...n});return Tn(o,e.body)},Ba=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new na({$metadata:tc(e),...n});return Tn(o,e.body)},Ha=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new ia({$metadata:tc(e),...n});return Tn(o,e.body)},qa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new Ps({$metadata:tc(e),...n});return Tn(o,e.body)},Va=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Ds({$metadata:tc(e),...n});return Tn(o,e.body)},Ga=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new As({$metadata:tc(e),...n});return Tn(o,e.body)},Wa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new ra({$metadata:tc(e),...n});return Tn(o,e.body)},Ka=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new Is({$metadata:tc(e),...n});return Tn(o,e.body)},Ya=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new oa({$metadata:tc(e),...n});return Tn(o,e.body)},Qa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new sa({$metadata:tc(e),...n});return Tn(o,e.body)},Ja=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new aa({$metadata:tc(e),...n});return Tn(o,e.body)},Xa=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Message:cn,Type:cn});Object.assign(n,r);const o=new ca({$metadata:tc(e),...n});return Tn(o,e.body)},Za=async(e,t)=>{const n=Hn({[lc]:[,e.headers[uc]]}),i=e.body,r=qn(i,{Reason:cn,Type:cn,message:cn});Object.assign(n,r);const o=new Rs({$metadata:tc(e),...n});return Tn(o,e.body)},ec=async(e,t)=>{const n=Hn({}),i=e.body,r=qn(i,{Type:cn,message:cn});Object.assign(n,r);const o=new la({$metadata:tc(e),...n});return Tn(o,e.body)},tc=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"]}),nc="ClientContext",ic="ExecutedVersion",rc="FunctionError",oc="InvocationType",sc="LogResult",ac="LogType",cc="Qualifier",lc="retryAfterSeconds",uc="retry-after",pc="x-amz-client-context",dc="x-amz-executed-version",mc="x-amz-function-error",hc="x-amz-invocation-type",fc="x-amz-log-result",gc="x-amz-log-type";class yc extends(Kt.classBuilder().ep(Br).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("AWSGirApiService","Invoke",{}).n("LambdaClient","InvokeCommand").f(pa,da).ser(ma).de(ha).build()){}const vc=e=>new Promise((t=>setTimeout(t,1e3*e))),bc={minDelay:2,maxDelay:120};var xc;!function(e){e.ABORTED="ABORTED",e.FAILURE="FAILURE",e.SUCCESS="SUCCESS",e.RETRY="RETRY",e.TIMEOUT="TIMEOUT"}(xc||(xc={}));const wc=(e,t,n,i)=>{if(i>n)return t;return Ec(e,e*2**(i-1))},Ec=(e,t)=>e+Math.random()*(t-e),Sc=async({minDelay:e,maxDelay:t,maxWaitTime:n,abortController:i,client:r,abortSignal:o},s,a)=>{const{state:c,reason:l}=await a(r,s);if(c!==xc.RETRY)return{state:c,reason:l};let u=1;const p=Date.now()+1e3*n,d=Math.log(t/e)/Math.log(2)+1;for(;;){if(i?.signal?.aborted||o?.aborted)return{state:xc.ABORTED};const n=wc(e,t,d,u);if(Date.now()+1e3*n>p)return{state:xc.TIMEOUT};await vc(n);const{state:c,reason:l}=await a(r,s);if(c!==xc.RETRY)return{state:c,reason:l};u+=1}},_c=async e=>new Promise((t=>{const n=()=>t({state:xc.ABORTED});"function"==typeof e.addEventListener?e.addEventListener("abort",n):e.onabort=n})),Oc=async(e,t,n)=>{const i={...bc,...e};(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`)})(i);const r=[Sc(i,t,n)];return e.abortController&&r.push(_c(e.abortController.signal)),e.abortSignal&&r.push(_c(e.abortSignal)),Promise.race(r)},Cc={region:"eu-central-2"};const kc={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Tc=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!T.isInstance(n.request))return t(n);const{request:i}=n,{handlerProtocol:r=""}=e.requestHandler.metadata||{};if(r.indexOf("h2")>=0&&!i.headers[":authority"])delete i.headers.host,i.headers[":authority"]=i.hostname+(i.port?":"+i.port:"");else if(!i.headers.host){let e=i.hostname;null!=i.port&&(e+=`:${i.port}`),i.headers.host=e}return t(n)})(e),kc)}}),Pc={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Ac="X-Amzn-Trace-Id",Ic={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Rc=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:i}=n;if(!T.isInstance(i)||"node"!==e.runtime||i.headers.hasOwnProperty(Ac))return t(n);const r=[]._X_AMZN_TRACE_ID,o=e=>"string"==typeof e&&e.length>0;return o([].AWS_LAMBDA_FUNCTION_NAME)&&o(r)&&(i.headers[Ac]=r),t({...n,request:i})})(e),Ic)}});const Mc=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Mc(t))return!1;return!0}return!!Re(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Ae(e)))};let jc={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"};const $c={isVirtualHostableS3Bucket:Mc,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,i,r,o,s,...a]=t;if("arn"!==n||""===i||""===r||""===a.join(":"))return null;return{partition:i,service:r,region:o,accountId:s,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=jc;for(const n of t){const{regions:t,outputs:i}=n;for(const[n,r]of Object.entries(t))if(n===e)return{...i,...r}}for(const n of t){const{regionRegex:t,outputs:i}=n;if(new RegExp(t).test(e))return{...i}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};function Nc(e,t,n){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]=n}Me.aws=$c;const Dc=e=>P.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,Lc=e=>new Date(Date.now()+e),zc=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(Lc(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Fc=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class Uc{async sign(e,t,n){if(!T.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await(async e=>{const t=Fc("context",e.context),n=Fc("config",e.config),i=t.endpointV2?.properties?.authSchemes?.[0],r=Fc("signer",n.signer),o=await r(i),s=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:o,signingRegion:s,signingRegionSet:a,signingName:c}})(n),{config:r,signer:o}=i;let{signingRegion:s,signingName:a}=i;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(s=t?.signingRegion??s,a=t?.signingName??a)}return await o.sign(e,{signingDate:Lc(r.systemClockOffset),signingRegion:s,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??Dc(t.$response);if(n){const i=Fc("config",e.config),r=i.systemClockOffset;i.systemClockOffset=zc(n,i.systemClockOffset);i.systemClockOffset!==r&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=Dc(e);if(n){const e=Fc("config",t.config);e.systemClockOffset=zc(n,e.systemClockOffset)}}}const Bc=(e,t)=>((e,t)=>ve(e,t).then((e=>t.utf8Encoder(e))))(e,t).then((e=>{if(e.length)try{return JSON.parse(e)}catch(t){throw"SyntaxError"===t?.name&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}return{}})),Hc=async(e,t)=>{const n=await Bc(e,t);return n.message=n.message??n.Message,n},qc=/\d{12}\.ddb/;const Vc="user-agent",Gc="x-amz-user-agent",Wc=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Kc=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g;const Yc=e=>(t,n)=>async i=>{const{request:r}=i;if(!T.isInstance(r))return t(i);const{headers:o}=r,s=n?.userAgent?.map(Qc)||[],a=(await e.defaultUserAgentProvider()).map(Qc);await async function(e,t,n){const i=n.request;if("rpc-v2-cbor"===i?.headers?.["smithy-protocol"]&&Nc(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?Nc(e,"RETRY_MODE_ADAPTIVE","F"):Nc(e,"RETRY_MODE_STANDARD","E"):Nc(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(qc)&&Nc(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":Nc(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Nc(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Nc(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const r=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(r?.$source){const t=r;t.accountId&&Nc(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,i]of Object.entries(t.$source??{}))Nc(e,n,i)}}(n,e,i);const c=n;a.push(`m/${function(e){let t="";for(const n in e){const i=e[n];if(!(t.length+i.length+1<=1024))break;t.length?t+=","+i:t+=i}return t}(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(Qc)||[],u=await e.userAgentAppId();u&&a.push(Qc([`app/${u}`]));const p=[].concat([...a,...s,...l]).join(" "),d=[...a.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(d&&(o[Gc]=o[Gc]?`${o[Vc]} ${d}`:d),o[Vc]=p):o[Gc]=p,t({...i,request:r})},Qc=e=>{const t=e[0].split("/").map((e=>e.replace(Wc,"-"))).join("/"),n=e[1]?.replace(Kc,"-"),i=t.indexOf("/"),r=t.substring(0,i);let o=t.substring(i+1);return"api"===r&&(o=o.toLowerCase()),[r,o,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},Jc={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Xc=async(e,t,n)=>({operation:D(t).operation,region:await L(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Zc=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ssm",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},el=e=>{const t=(e=>{let t,n=!1;e.credentials&&(n=!0,t=Ce(e.credentials,Se,Oe)),t||(t=e.credentialDefaultProvider?Y(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:i=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:o}=e;let s;return s=e.signer?Y(e.signer):e.regionInfoProvider?()=>Y(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([n,r])=>{const{signingRegion:s,signingService:a}=n;e.signingRegion=e.signingRegion||s||r,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Lt)(c)})):async n=>{const r=(n=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await Y(e.region)(),properties:{}},n)).signingRegion,s=n.signingName;e.signingRegion=e.signingRegion||r,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Lt)(a)},{...e,systemClockOffset:r,signingEscapePath:i,credentials:n?async()=>t().then((e=>{return n="CREDENTIALS_CODE",i="e",(t=e).$source||(t.$source={}),t.$source[n]=i,t;var t,n,i})):t,signer:s}})(e);return{...t}},tl={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var nl="3.682.0";const il=({serviceId:e,clientVersion:t})=>async n=>{const i="undefined"!=typeof window&&window?.navigator?.userAgent?ho.parse(window.navigator.userAgent):void 0,r=[["aws-sdk-js",t],["ua","2.1"],[`os/${i?.os?.name||"other"}`,i?.os?.version],["lang/js"],["md/browser",`${i?.browser?.name??"unknown"}_${i?.browser?.version??"unknown"}`]];e&&r.push([`api/${e}`,t]);const o=await(n?.userAgentAppId?.());return o&&r.push([`app/${o}`]),r};function rl(e=0){return new Promise(((t,n)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",n(t)}),e)}))}const ol={supported:void 0};class sl{static create(e){return"function"==typeof e?.handle?e:new sl(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===ol.supported&&(ol.supported=Boolean("undefined"!=typeof Request&&"keepalive"in new Request("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t}={}){this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,i=!0===this.config.keepAlive,r=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const s=le(e.query||{});s&&(o+=`?${s}`),e.fragment&&(o+=`#${e.fragment}`);let a="";if(null!=e.username||null!=e.password){a=`${e.username??""}:${e.password??""}@`}const{port:c,method:l}=e,u=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${o}`,p="GET"===l||"HEAD"===l?void 0:e.body,d={body:p,headers:new Headers(e.headers),method:l,credentials:r};this.config?.cache&&(d.cache=this.config.cache),p&&(d.duplex="half"),"undefined"!=typeof AbortController&&(d.signal=t),ol.supported&&(d.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(d,this.config.requestInit(e));let m=()=>{};const h=new Request(u,d),f=[fetch(h).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new P({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new P({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),rl(n)];return t&&f.push(new Promise(((e,n)=>{const i=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",i,{once:!0}),m=()=>e.removeEventListener("abort",i)}else t.onabort=i}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const al=e=>"function"==typeof Blob&&e instanceof Blob?async function(e){const t=await function(e){return new Promise(((t,n)=>{const i=new FileReader;i.onloadend=()=>{if(2!==i.readyState)return n(new Error("Reader aborted too early"));const e=i.result??"",r=e.indexOf(","),o=r>-1?r+1:e.length;t(e.substring(o))},i.onabort=()=>n(new Error("Read aborted")),i.onerror=()=>n(i.error),i.readAsDataURL(e)}))}(e),n=te(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let i=!1,r=0;for(;!i;){const{done:e,value:o}=await n.read();o&&(t.push(o),r+=o.length),i=e}const o=new Uint8Array(r);let s=0;for(const e of t)o.set(e,s),s+=e.length;return o}(e);const cl="required",ll="fn",ul="argv",pl="ref",dl=!0,ml="isSet",hl="booleanEquals",fl="error",gl="endpoint",yl="tree",vl="PartitionResult",bl="getAttr",xl={[cl]:!1,type:"String"},wl={[cl]:!0,default:!1,type:"Boolean"},El={[pl]:"Endpoint"},Sl={[ll]:hl,[ul]:[{[pl]:"UseFIPS"},!0]},_l={[ll]:hl,[ul]:[{[pl]:"UseDualStack"},!0]},Ol={},Cl={[ll]:bl,[ul]:[{[pl]:vl},"supportsFIPS"]},kl={[pl]:vl},Tl={[ll]:hl,[ul]:[!0,{[ll]:bl,[ul]:[kl,"supportsDualStack"]}]},Pl=[Sl],Al=[_l],Il=[{[pl]:"Region"}],Rl={version:"1.0",parameters:{Region:xl,UseDualStack:wl,UseFIPS:wl,Endpoint:xl},rules:[{conditions:[{[ll]:ml,[ul]:[El]}],rules:[{conditions:Pl,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:fl},{conditions:Al,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:fl},{endpoint:{url:El,properties:Ol,headers:Ol},type:gl}],type:yl},{conditions:[{[ll]:ml,[ul]:Il}],rules:[{conditions:[{[ll]:"aws.partition",[ul]:Il,assign:vl}],rules:[{conditions:[Sl,_l],rules:[{conditions:[{[ll]:hl,[ul]:[dl,Cl]},Tl],rules:[{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:fl}],type:yl},{conditions:Pl,rules:[{conditions:[{[ll]:hl,[ul]:[Cl,dl]}],rules:[{conditions:[{[ll]:"stringEquals",[ul]:[{[ll]:bl,[ul]:[kl,"name"]},"aws-us-gov"]}],endpoint:{url:"https://ssm.{Region}.amazonaws.com",properties:Ol,headers:Ol},type:gl},{endpoint:{url:"https://ssm-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl},{error:"FIPS is enabled but this partition does not support FIPS",type:fl}],type:yl},{conditions:Al,rules:[{conditions:[Tl],rules:[{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl},{error:"DualStack is enabled but this partition does not support DualStack",type:fl}],type:yl},{endpoint:{url:"https://ssm.{Region}.{PartitionResult#dnsSuffix}",properties:Ol,headers:Ol},type:gl}],type:yl}],type:yl},{error:"Invalid Configuration: Missing Region",type:fl}]},Ml=new Te({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),jl=(e,t={})=>Ml.get(e,(()=>Ze(Rl,{endpointParams:e,logger:t.logger})));Me.aws=$c;const $l=e=>{const t=ys(e),n=()=>t().then(In),i=(e=>({apiVersion:"2014-11-06",base64Decoder:e?.base64Decoder??te,base64Encoder:e?.base64Encoder??oe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??jl,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Zc,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new Uc}],logger:e?.logger??new Bn,serviceId:e?.serviceId??"SSM",urlParser:e?.urlParser??ar,utf8Decoder:e?.utf8Decoder??ne,utf8Encoder:e?.utf8Encoder??re}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??il({serviceId:i.serviceId,clientVersion:nl}),maxAttempts:e?.maxAttempts??3,region:e?.region??Bo("Region is missing"),requestHandler:sl.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||fr),sha256:e?.sha256??uo,streamCollector:e?.streamCollector??al,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Gi)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Wi))}},Nl=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},Dl=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}},Ll=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class zl extends Wt{constructor(...[e]){const t=$l(e||{});var n;const i=function(e){const t=Y(e.userAgentAppId??void 0);return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{const n=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(n)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof n?t?.warn("userAgentAppId must be a string or undefined."):n.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}}}((n=t,{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"ssm"})),r=Rr(i),o=Qi(r),s=mr(o),a=((e,t)=>{const n={...Nl(e),...Nn(e),...v(e),...Dl(e)};return t.forEach((e=>e.configure(n))),{...e,...(i=n,{region:i.region()}),...Dn(n),...b(n),...Ll(n)};var i})(el(s),e?.extensions||[]);super(a),this.config=a,this.middlewareStack.use((e=>({applyToStack:t=>{t.add(Yc(e),Jc)}}))(this.config)),this.middlewareStack.use(Lr(this.config)),this.middlewareStack.use(Zi(this.config)),this.middlewareStack.use(Tc(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add(((e,t)=>async n=>{try{const i=await e(n),{clientName:r,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=a,u=c??t.inputFilterSensitiveLog,p=l??t.outputFilterSensitiveLog,{$metadata:d,...m}=i.output;return s?.info?.({clientName:r,commandName:o,input:u(n.input),output:p(m),metadata:d}),i}catch(e){const{clientName:i,commandName:r,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,c=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:i,commandName:r,input:c(n.input),error:e,metadata:e.$metadata}),e}}),Pc)}})),this.middlewareStack.use(Rc(this.config)),this.middlewareStack.use(U(this.config,{httpAuthSchemeParametersProvider:Xc,identityProviderConfigProvider:async e=>new Ee({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(K(this.config))}destroy(){super.destroy()}}class Fl extends kn{constructor(e){super(e),Object.setPrototypeOf(this,Fl.prototype)}}class Ul extends Fl{constructor(e){super({name:"InternalServerError",$fault:"server",...e}),this.name="InternalServerError",this.$fault="server",Object.setPrototypeOf(this,Ul.prototype),this.Message=e.Message}}class Bl extends Fl{constructor(e){super({name:"InvalidResourceId",$fault:"client",...e}),this.name="InvalidResourceId",this.$fault="client",Object.setPrototypeOf(this,Bl.prototype)}}class Hl extends Fl{constructor(e){super({name:"InvalidResourceType",$fault:"client",...e}),this.name="InvalidResourceType",this.$fault="client",Object.setPrototypeOf(this,Hl.prototype)}}class ql extends Fl{constructor(e){super({name:"TooManyTagsError",$fault:"client",...e}),this.name="TooManyTagsError",this.$fault="client",Object.setPrototypeOf(this,ql.prototype)}}class Vl extends Fl{constructor(e){super({name:"TooManyUpdates",$fault:"client",...e}),this.name="TooManyUpdates",this.$fault="client",Object.setPrototypeOf(this,Vl.prototype),this.Message=e.Message}}let Gl=class e extends Fl{constructor(t){super({name:"AlreadyExistsException",$fault:"client",...t}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class Wl extends Fl{constructor(e){super({name:"OpsItemConflictException",$fault:"client",...e}),this.name="OpsItemConflictException",this.$fault="client",Object.setPrototypeOf(this,Wl.prototype),this.Message=e.Message}}class Kl extends Fl{constructor(e){super({name:"OpsItemInvalidParameterException",$fault:"client",...e}),this.name="OpsItemInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Kl.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class Yl extends Fl{constructor(e){super({name:"OpsItemLimitExceededException",$fault:"client",...e}),this.name="OpsItemLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Yl.prototype),this.ResourceTypes=e.ResourceTypes,this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class Ql extends Fl{constructor(e){super({name:"OpsItemNotFoundException",$fault:"client",...e}),this.name="OpsItemNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Ql.prototype),this.Message=e.Message}}class Jl extends Fl{constructor(e){super({name:"OpsItemRelatedItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemRelatedItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Jl.prototype),this.Message=e.Message,this.ResourceUri=e.ResourceUri,this.OpsItemId=e.OpsItemId}}class Xl extends Fl{constructor(e){super({name:"DuplicateInstanceId",$fault:"client",...e}),this.name="DuplicateInstanceId",this.$fault="client",Object.setPrototypeOf(this,Xl.prototype)}}class Zl extends Fl{constructor(e){super({name:"InvalidCommandId",$fault:"client",...e}),this.name="InvalidCommandId",this.$fault="client",Object.setPrototypeOf(this,Zl.prototype)}}class eu extends Fl{constructor(e){super({name:"InvalidInstanceId",$fault:"client",...e}),this.name="InvalidInstanceId",this.$fault="client",Object.setPrototypeOf(this,eu.prototype),this.Message=e.Message}}class tu extends Fl{constructor(e){super({name:"DoesNotExistException",$fault:"client",...e}),this.name="DoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,tu.prototype),this.Message=e.Message}}class nu extends Fl{constructor(e){super({name:"InvalidParameters",$fault:"client",...e}),this.name="InvalidParameters",this.$fault="client",Object.setPrototypeOf(this,nu.prototype),this.Message=e.Message}}class iu extends Fl{constructor(e){super({name:"AssociationAlreadyExists",$fault:"client",...e}),this.name="AssociationAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,iu.prototype)}}class ru extends Fl{constructor(e){super({name:"AssociationLimitExceeded",$fault:"client",...e}),this.name="AssociationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ru.prototype)}}class ou extends Fl{constructor(e){super({name:"InvalidDocument",$fault:"client",...e}),this.name="InvalidDocument",this.$fault="client",Object.setPrototypeOf(this,ou.prototype),this.Message=e.Message}}class su extends Fl{constructor(e){super({name:"InvalidDocumentVersion",$fault:"client",...e}),this.name="InvalidDocumentVersion",this.$fault="client",Object.setPrototypeOf(this,su.prototype),this.Message=e.Message}}class au extends Fl{constructor(e){super({name:"InvalidOutputLocation",$fault:"client",...e}),this.name="InvalidOutputLocation",this.$fault="client",Object.setPrototypeOf(this,au.prototype)}}class cu extends Fl{constructor(e){super({name:"InvalidSchedule",$fault:"client",...e}),this.name="InvalidSchedule",this.$fault="client",Object.setPrototypeOf(this,cu.prototype),this.Message=e.Message}}class lu extends Fl{constructor(e){super({name:"InvalidTag",$fault:"client",...e}),this.name="InvalidTag",this.$fault="client",Object.setPrototypeOf(this,lu.prototype),this.Message=e.Message}}class uu extends Fl{constructor(e){super({name:"InvalidTarget",$fault:"client",...e}),this.name="InvalidTarget",this.$fault="client",Object.setPrototypeOf(this,uu.prototype),this.Message=e.Message}}class pu extends Fl{constructor(e){super({name:"InvalidTargetMaps",$fault:"client",...e}),this.name="InvalidTargetMaps",this.$fault="client",Object.setPrototypeOf(this,pu.prototype),this.Message=e.Message}}class du extends Fl{constructor(e){super({name:"UnsupportedPlatformType",$fault:"client",...e}),this.name="UnsupportedPlatformType",this.$fault="client",Object.setPrototypeOf(this,du.prototype),this.Message=e.Message}}class mu extends Fl{constructor(e){super({name:"DocumentAlreadyExists",$fault:"client",...e}),this.name="DocumentAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,mu.prototype),this.Message=e.Message}}class hu extends Fl{constructor(e){super({name:"DocumentLimitExceeded",$fault:"client",...e}),this.name="DocumentLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,hu.prototype),this.Message=e.Message}}class fu extends Fl{constructor(e){super({name:"InvalidDocumentContent",$fault:"client",...e}),this.name="InvalidDocumentContent",this.$fault="client",Object.setPrototypeOf(this,fu.prototype),this.Message=e.Message}}class gu extends Fl{constructor(e){super({name:"InvalidDocumentSchemaVersion",$fault:"client",...e}),this.name="InvalidDocumentSchemaVersion",this.$fault="client",Object.setPrototypeOf(this,gu.prototype),this.Message=e.Message}}class yu extends Fl{constructor(e){super({name:"MaxDocumentSizeExceeded",$fault:"client",...e}),this.name="MaxDocumentSizeExceeded",this.$fault="client",Object.setPrototypeOf(this,yu.prototype),this.Message=e.Message}}class vu extends Fl{constructor(e){super({name:"IdempotentParameterMismatch",$fault:"client",...e}),this.name="IdempotentParameterMismatch",this.$fault="client",Object.setPrototypeOf(this,vu.prototype),this.Message=e.Message}}class bu extends Fl{constructor(e){super({name:"ResourceLimitExceededException",$fault:"client",...e}),this.name="ResourceLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,bu.prototype),this.Message=e.Message}}class xu extends Fl{constructor(e){super({name:"OpsItemAccessDeniedException",$fault:"client",...e}),this.name="OpsItemAccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,xu.prototype),this.Message=e.Message}}class wu extends Fl{constructor(e){super({name:"OpsItemAlreadyExistsException",$fault:"client",...e}),this.name="OpsItemAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,wu.prototype),this.Message=e.Message,this.OpsItemId=e.OpsItemId}}class Eu extends Fl{constructor(e){super({name:"OpsMetadataAlreadyExistsException",$fault:"client",...e}),this.name="OpsMetadataAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Eu.prototype)}}class Su extends Fl{constructor(e){super({name:"OpsMetadataInvalidArgumentException",$fault:"client",...e}),this.name="OpsMetadataInvalidArgumentException",this.$fault="client",Object.setPrototypeOf(this,Su.prototype)}}class _u extends Fl{constructor(e){super({name:"OpsMetadataLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,_u.prototype)}}class Ou extends Fl{constructor(e){super({name:"OpsMetadataTooManyUpdatesException",$fault:"client",...e}),this.name="OpsMetadataTooManyUpdatesException",this.$fault="client",Object.setPrototypeOf(this,Ou.prototype)}}class Cu extends Fl{constructor(e){super({name:"ResourceDataSyncAlreadyExistsException",$fault:"client",...e}),this.name="ResourceDataSyncAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Cu.prototype),this.SyncName=e.SyncName}}class ku extends Fl{constructor(e){super({name:"ResourceDataSyncCountExceededException",$fault:"client",...e}),this.name="ResourceDataSyncCountExceededException",this.$fault="client",Object.setPrototypeOf(this,ku.prototype),this.Message=e.Message}}class Tu extends Fl{constructor(e){super({name:"ResourceDataSyncInvalidConfigurationException",$fault:"client",...e}),this.name="ResourceDataSyncInvalidConfigurationException",this.$fault="client",Object.setPrototypeOf(this,Tu.prototype),this.Message=e.Message}}class Pu extends Fl{constructor(e){super({name:"InvalidActivation",$fault:"client",...e}),this.name="InvalidActivation",this.$fault="client",Object.setPrototypeOf(this,Pu.prototype),this.Message=e.Message}}class Au extends Fl{constructor(e){super({name:"InvalidActivationId",$fault:"client",...e}),this.name="InvalidActivationId",this.$fault="client",Object.setPrototypeOf(this,Au.prototype),this.Message=e.Message}}class Iu extends Fl{constructor(e){super({name:"AssociationDoesNotExist",$fault:"client",...e}),this.name="AssociationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,Iu.prototype),this.Message=e.Message}}class Ru extends Fl{constructor(e){super({name:"AssociatedInstances",$fault:"client",...e}),this.name="AssociatedInstances",this.$fault="client",Object.setPrototypeOf(this,Ru.prototype)}}class Mu extends Fl{constructor(e){super({name:"InvalidDocumentOperation",$fault:"client",...e}),this.name="InvalidDocumentOperation",this.$fault="client",Object.setPrototypeOf(this,Mu.prototype),this.Message=e.Message}}class ju extends Fl{constructor(e){super({name:"InvalidDeleteInventoryParametersException",$fault:"client",...e}),this.name="InvalidDeleteInventoryParametersException",this.$fault="client",Object.setPrototypeOf(this,ju.prototype),this.Message=e.Message}}class $u extends Fl{constructor(e){super({name:"InvalidInventoryRequestException",$fault:"client",...e}),this.name="InvalidInventoryRequestException",this.$fault="client",Object.setPrototypeOf(this,$u.prototype),this.Message=e.Message}}class Nu extends Fl{constructor(e){super({name:"InvalidOptionException",$fault:"client",...e}),this.name="InvalidOptionException",this.$fault="client",Object.setPrototypeOf(this,Nu.prototype),this.Message=e.Message}}class Du extends Fl{constructor(e){super({name:"InvalidTypeNameException",$fault:"client",...e}),this.name="InvalidTypeNameException",this.$fault="client",Object.setPrototypeOf(this,Du.prototype),this.Message=e.Message}}class Lu extends Fl{constructor(e){super({name:"OpsMetadataNotFoundException",$fault:"client",...e}),this.name="OpsMetadataNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Lu.prototype)}}class zu extends Fl{constructor(e){super({name:"ParameterNotFound",$fault:"client",...e}),this.name="ParameterNotFound",this.$fault="client",Object.setPrototypeOf(this,zu.prototype)}}class Fu extends Fl{constructor(e){super({name:"ResourceInUseException",$fault:"client",...e}),this.name="ResourceInUseException",this.$fault="client",Object.setPrototypeOf(this,Fu.prototype),this.Message=e.Message}}class Uu extends Fl{constructor(e){super({name:"ResourceDataSyncNotFoundException",$fault:"client",...e}),this.name="ResourceDataSyncNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Uu.prototype),this.SyncName=e.SyncName,this.SyncType=e.SyncType,this.Message=e.Message}}class Bu extends Fl{constructor(e){super({name:"MalformedResourcePolicyDocumentException",$fault:"client",...e}),this.name="MalformedResourcePolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,Bu.prototype),this.Message=e.Message}}class Hu extends Fl{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Hu.prototype),this.Message=e.Message}}class qu extends Fl{constructor(e){super({name:"ResourcePolicyConflictException",$fault:"client",...e}),this.name="ResourcePolicyConflictException",this.$fault="client",Object.setPrototypeOf(this,qu.prototype),this.Message=e.Message}}class Vu extends Fl{constructor(e){super({name:"ResourcePolicyInvalidParameterException",$fault:"client",...e}),this.name="ResourcePolicyInvalidParameterException",this.$fault="client",Object.setPrototypeOf(this,Vu.prototype),this.ParameterNames=e.ParameterNames,this.Message=e.Message}}class Gu extends Fl{constructor(e){super({name:"ResourcePolicyNotFoundException",$fault:"client",...e}),this.name="ResourcePolicyNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Gu.prototype),this.Message=e.Message}}class Wu extends Fl{constructor(e){super({name:"TargetInUseException",$fault:"client",...e}),this.name="TargetInUseException",this.$fault="client",Object.setPrototypeOf(this,Wu.prototype),this.Message=e.Message}}class Ku extends Fl{constructor(e){super({name:"InvalidFilter",$fault:"client",...e}),this.name="InvalidFilter",this.$fault="client",Object.setPrototypeOf(this,Ku.prototype),this.Message=e.Message}}class Yu extends Fl{constructor(e){super({name:"InvalidNextToken",$fault:"client",...e}),this.name="InvalidNextToken",this.$fault="client",Object.setPrototypeOf(this,Yu.prototype),this.Message=e.Message}}class Qu extends Fl{constructor(e){super({name:"InvalidAssociationVersion",$fault:"client",...e}),this.name="InvalidAssociationVersion",this.$fault="client",Object.setPrototypeOf(this,Qu.prototype),this.Message=e.Message}}class Ju extends Fl{constructor(e){super({name:"AssociationExecutionDoesNotExist",$fault:"client",...e}),this.name="AssociationExecutionDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,Ju.prototype),this.Message=e.Message}}class Xu extends Fl{constructor(e){super({name:"InvalidFilterKey",$fault:"client",...e}),this.name="InvalidFilterKey",this.$fault="client",Object.setPrototypeOf(this,Xu.prototype)}}class Zu extends Fl{constructor(e){super({name:"InvalidFilterValue",$fault:"client",...e}),this.name="InvalidFilterValue",this.$fault="client",Object.setPrototypeOf(this,Zu.prototype),this.Message=e.Message}}class ep extends Fl{constructor(e){super({name:"AutomationExecutionNotFoundException",$fault:"client",...e}),this.name="AutomationExecutionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ep.prototype),this.Message=e.Message}}class tp extends Fl{constructor(e){super({name:"InvalidPermissionType",$fault:"client",...e}),this.name="InvalidPermissionType",this.$fault="client",Object.setPrototypeOf(this,tp.prototype),this.Message=e.Message}}class np extends Fl{constructor(e){super({name:"UnsupportedOperatingSystem",$fault:"client",...e}),this.name="UnsupportedOperatingSystem",this.$fault="client",Object.setPrototypeOf(this,np.prototype),this.Message=e.Message}}class ip extends Fl{constructor(e){super({name:"InvalidInstanceInformationFilterValue",$fault:"client",...e}),this.name="InvalidInstanceInformationFilterValue",this.$fault="client",Object.setPrototypeOf(this,ip.prototype)}}class rp extends Fl{constructor(e){super({name:"InvalidInstancePropertyFilterValue",$fault:"client",...e}),this.name="InvalidInstancePropertyFilterValue",this.$fault="client",Object.setPrototypeOf(this,rp.prototype)}}class op extends Fl{constructor(e){super({name:"InvalidDeletionIdException",$fault:"client",...e}),this.name="InvalidDeletionIdException",this.$fault="client",Object.setPrototypeOf(this,op.prototype),this.Message=e.Message}}class sp extends Fl{constructor(e){super({name:"InvalidFilterOption",$fault:"client",...e}),this.name="InvalidFilterOption",this.$fault="client",Object.setPrototypeOf(this,sp.prototype)}}class ap extends Fl{constructor(e){super({name:"OpsItemRelatedItemAssociationNotFoundException",$fault:"client",...e}),this.name="OpsItemRelatedItemAssociationNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ap.prototype),this.Message=e.Message}}class cp extends Fl{constructor(e){super({name:"InvalidDocumentType",$fault:"client",...e}),this.name="InvalidDocumentType",this.$fault="client",Object.setPrototypeOf(this,cp.prototype),this.Message=e.Message}}class lp extends Fl{constructor(e){super({name:"UnsupportedCalendarException",$fault:"client",...e}),this.name="UnsupportedCalendarException",this.$fault="client",Object.setPrototypeOf(this,lp.prototype),this.Message=e.Message}}class up extends Fl{constructor(e){super({name:"InvalidPluginName",$fault:"client",...e}),this.name="InvalidPluginName",this.$fault="client",Object.setPrototypeOf(this,up.prototype)}}class pp extends Fl{constructor(e){super({name:"InvocationDoesNotExist",$fault:"client",...e}),this.name="InvocationDoesNotExist",this.$fault="client",Object.setPrototypeOf(this,pp.prototype)}}class dp extends Fl{constructor(e){super({name:"UnsupportedFeatureRequiredException",$fault:"client",...e}),this.name="UnsupportedFeatureRequiredException",this.$fault="client",Object.setPrototypeOf(this,dp.prototype),this.Message=e.Message}}class mp extends Fl{constructor(e){super({name:"InvalidAggregatorException",$fault:"client",...e}),this.name="InvalidAggregatorException",this.$fault="client",Object.setPrototypeOf(this,mp.prototype),this.Message=e.Message}}class hp extends Fl{constructor(e){super({name:"InvalidInventoryGroupException",$fault:"client",...e}),this.name="InvalidInventoryGroupException",this.$fault="client",Object.setPrototypeOf(this,hp.prototype),this.Message=e.Message}}class fp extends Fl{constructor(e){super({name:"InvalidResultAttributeException",$fault:"client",...e}),this.name="InvalidResultAttributeException",this.$fault="client",Object.setPrototypeOf(this,fp.prototype),this.Message=e.Message}}class gp extends Fl{constructor(e){super({name:"InvalidKeyId",$fault:"client",...e}),this.name="InvalidKeyId",this.$fault="client",Object.setPrototypeOf(this,gp.prototype)}}class yp extends Fl{constructor(e){super({name:"ParameterVersionNotFound",$fault:"client",...e}),this.name="ParameterVersionNotFound",this.$fault="client",Object.setPrototypeOf(this,yp.prototype)}}class vp extends Fl{constructor(e){super({name:"ServiceSettingNotFound",$fault:"client",...e}),this.name="ServiceSettingNotFound",this.$fault="client",Object.setPrototypeOf(this,vp.prototype),this.Message=e.Message}}class bp extends Fl{constructor(e){super({name:"ParameterVersionLabelLimitExceeded",$fault:"client",...e}),this.name="ParameterVersionLabelLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,bp.prototype)}}class xp extends Fl{constructor(e){super({name:"DocumentPermissionLimit",$fault:"client",...e}),this.name="DocumentPermissionLimit",this.$fault="client",Object.setPrototypeOf(this,xp.prototype),this.Message=e.Message}}class wp extends Fl{constructor(e){super({name:"ComplianceTypeCountLimitExceededException",$fault:"client",...e}),this.name="ComplianceTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,wp.prototype),this.Message=e.Message}}class Ep extends Fl{constructor(e){super({name:"InvalidItemContentException",$fault:"client",...e}),this.name="InvalidItemContentException",this.$fault="client",Object.setPrototypeOf(this,Ep.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Sp extends Fl{constructor(e){super({name:"ItemSizeLimitExceededException",$fault:"client",...e}),this.name="ItemSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Sp.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class _p extends Fl{constructor(e){super({name:"TotalSizeLimitExceededException",$fault:"client",...e}),this.name="TotalSizeLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,_p.prototype),this.Message=e.Message}}class Op extends Fl{constructor(e){super({name:"CustomSchemaCountLimitExceededException",$fault:"client",...e}),this.name="CustomSchemaCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Op.prototype),this.Message=e.Message}}class Cp extends Fl{constructor(e){super({name:"InvalidInventoryItemContextException",$fault:"client",...e}),this.name="InvalidInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,Cp.prototype),this.Message=e.Message}}class kp extends Fl{constructor(e){super({name:"ItemContentMismatchException",$fault:"client",...e}),this.name="ItemContentMismatchException",this.$fault="client",Object.setPrototypeOf(this,kp.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Tp extends Fl{constructor(e){super({name:"SubTypeCountLimitExceededException",$fault:"client",...e}),this.name="SubTypeCountLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Tp.prototype),this.Message=e.Message}}class Pp extends Fl{constructor(e){super({name:"UnsupportedInventoryItemContextException",$fault:"client",...e}),this.name="UnsupportedInventoryItemContextException",this.$fault="client",Object.setPrototypeOf(this,Pp.prototype),this.TypeName=e.TypeName,this.Message=e.Message}}class Ap extends Fl{constructor(e){super({name:"UnsupportedInventorySchemaVersionException",$fault:"client",...e}),this.name="UnsupportedInventorySchemaVersionException",this.$fault="client",Object.setPrototypeOf(this,Ap.prototype),this.Message=e.Message}}class Ip extends Fl{constructor(e){super({name:"HierarchyLevelLimitExceededException",$fault:"client",...e}),this.name="HierarchyLevelLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ip.prototype)}}class Rp extends Fl{constructor(e){super({name:"HierarchyTypeMismatchException",$fault:"client",...e}),this.name="HierarchyTypeMismatchException",this.$fault="client",Object.setPrototypeOf(this,Rp.prototype)}}class Mp extends Fl{constructor(e){super({name:"IncompatiblePolicyException",$fault:"client",...e}),this.name="IncompatiblePolicyException",this.$fault="client",Object.setPrototypeOf(this,Mp.prototype)}}class jp extends Fl{constructor(e){super({name:"InvalidAllowedPatternException",$fault:"client",...e}),this.name="InvalidAllowedPatternException",this.$fault="client",Object.setPrototypeOf(this,jp.prototype)}}class $p extends Fl{constructor(e){super({name:"InvalidPolicyAttributeException",$fault:"client",...e}),this.name="InvalidPolicyAttributeException",this.$fault="client",Object.setPrototypeOf(this,$p.prototype)}}class Np extends Fl{constructor(e){super({name:"InvalidPolicyTypeException",$fault:"client",...e}),this.name="InvalidPolicyTypeException",this.$fault="client",Object.setPrototypeOf(this,Np.prototype)}}class Dp extends Fl{constructor(e){super({name:"ParameterAlreadyExists",$fault:"client",...e}),this.name="ParameterAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,Dp.prototype)}}class Lp extends Fl{constructor(e){super({name:"ParameterLimitExceeded",$fault:"client",...e}),this.name="ParameterLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,Lp.prototype)}}class zp extends Fl{constructor(e){super({name:"ParameterMaxVersionLimitExceeded",$fault:"client",...e}),this.name="ParameterMaxVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,zp.prototype)}}class Fp extends Fl{constructor(e){super({name:"ParameterPatternMismatchException",$fault:"client",...e}),this.name="ParameterPatternMismatchException",this.$fault="client",Object.setPrototypeOf(this,Fp.prototype)}}class Up extends Fl{constructor(e){super({name:"PoliciesLimitExceededException",$fault:"client",...e}),this.name="PoliciesLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Up.prototype)}}class Bp extends Fl{constructor(e){super({name:"UnsupportedParameterType",$fault:"client",...e}),this.name="UnsupportedParameterType",this.$fault="client",Object.setPrototypeOf(this,Bp.prototype)}}class Hp extends Fl{constructor(e){super({name:"ResourcePolicyLimitExceededException",$fault:"client",...e}),this.name="ResourcePolicyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Hp.prototype),this.Limit=e.Limit,this.LimitType=e.LimitType,this.Message=e.Message}}class qp extends Fl{constructor(e){super({name:"FeatureNotAvailableException",$fault:"client",...e}),this.name="FeatureNotAvailableException",this.$fault="client",Object.setPrototypeOf(this,qp.prototype),this.Message=e.Message}}class Vp extends Fl{constructor(e){super({name:"AutomationStepNotFoundException",$fault:"client",...e}),this.name="AutomationStepNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Vp.prototype),this.Message=e.Message}}class Gp extends Fl{constructor(e){super({name:"InvalidAutomationSignalException",$fault:"client",...e}),this.name="InvalidAutomationSignalException",this.$fault="client",Object.setPrototypeOf(this,Gp.prototype),this.Message=e.Message}}class Wp extends Fl{constructor(e){super({name:"InvalidNotificationConfig",$fault:"client",...e}),this.name="InvalidNotificationConfig",this.$fault="client",Object.setPrototypeOf(this,Wp.prototype),this.Message=e.Message}}class Kp extends Fl{constructor(e){super({name:"InvalidOutputFolder",$fault:"client",...e}),this.name="InvalidOutputFolder",this.$fault="client",Object.setPrototypeOf(this,Kp.prototype)}}class Yp extends Fl{constructor(e){super({name:"InvalidRole",$fault:"client",...e}),this.name="InvalidRole",this.$fault="client",Object.setPrototypeOf(this,Yp.prototype),this.Message=e.Message}}class Qp extends Fl{constructor(e){super({name:"InvalidAssociation",$fault:"client",...e}),this.name="InvalidAssociation",this.$fault="client",Object.setPrototypeOf(this,Qp.prototype),this.Message=e.Message}}class Jp extends Fl{constructor(e){super({name:"AutomationDefinitionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Jp.prototype),this.Message=e.Message}}class Xp extends Fl{constructor(e){super({name:"AutomationDefinitionVersionNotFoundException",$fault:"client",...e}),this.name="AutomationDefinitionVersionNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Xp.prototype),this.Message=e.Message}}class Zp extends Fl{constructor(e){super({name:"AutomationExecutionLimitExceededException",$fault:"client",...e}),this.name="AutomationExecutionLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Zp.prototype),this.Message=e.Message}}class ed extends Fl{constructor(e){super({name:"InvalidAutomationExecutionParametersException",$fault:"client",...e}),this.name="InvalidAutomationExecutionParametersException",this.$fault="client",Object.setPrototypeOf(this,ed.prototype),this.Message=e.Message}}const td=e=>({...e,...e.Value&&{Value:Qt}}),nd=e=>({...e,...e.Parameter&&{Parameter:td(e.Parameter)}}),id=e=>({...e,...e.Parameters&&{Parameters:e.Parameters.map((e=>td(e)))}});class rd extends Fl{constructor(e){super({name:"AutomationDefinitionNotApprovedException",$fault:"client",...e}),this.name="AutomationDefinitionNotApprovedException",this.$fault="client",Object.setPrototypeOf(this,rd.prototype),this.Message=e.Message}}class od extends Fl{constructor(e){super({name:"TargetNotConnected",$fault:"client",...e}),this.name="TargetNotConnected",this.$fault="client",Object.setPrototypeOf(this,od.prototype),this.Message=e.Message}}class sd extends Fl{constructor(e){super({name:"InvalidAutomationStatusUpdateException",$fault:"client",...e}),this.name="InvalidAutomationStatusUpdateException",this.$fault="client",Object.setPrototypeOf(this,sd.prototype),this.Message=e.Message}}class ad extends Fl{constructor(e){super({name:"AssociationVersionLimitExceeded",$fault:"client",...e}),this.name="AssociationVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ad.prototype),this.Message=e.Message}}class cd extends Fl{constructor(e){super({name:"InvalidUpdate",$fault:"client",...e}),this.name="InvalidUpdate",this.$fault="client",Object.setPrototypeOf(this,cd.prototype),this.Message=e.Message}}class ld extends Fl{constructor(e){super({name:"StatusUnchanged",$fault:"client",...e}),this.name="StatusUnchanged",this.$fault="client",Object.setPrototypeOf(this,ld.prototype)}}class ud extends Fl{constructor(e){super({name:"DocumentVersionLimitExceeded",$fault:"client",...e}),this.name="DocumentVersionLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,ud.prototype),this.Message=e.Message}}class pd extends Fl{constructor(e){super({name:"DuplicateDocumentContent",$fault:"client",...e}),this.name="DuplicateDocumentContent",this.$fault="client",Object.setPrototypeOf(this,pd.prototype),this.Message=e.Message}}class dd extends Fl{constructor(e){super({name:"DuplicateDocumentVersionName",$fault:"client",...e}),this.name="DuplicateDocumentVersionName",this.$fault="client",Object.setPrototypeOf(this,dd.prototype),this.Message=e.Message}}class md extends Fl{constructor(e){super({name:"OpsMetadataKeyLimitExceededException",$fault:"client",...e}),this.name="OpsMetadataKeyLimitExceededException",this.$fault="client",Object.setPrototypeOf(this,md.prototype)}}class hd extends Fl{constructor(e){super({name:"ResourceDataSyncConflictException",$fault:"client",...e}),this.name="ResourceDataSyncConflictException",this.$fault="client",Object.setPrototypeOf(this,hd.prototype),this.Message=e.Message}}const fd=async(e,t)=>{const n=Xh("GetParameter");let i;return i=JSON.stringify(Qn(e)),Jh(t,n,"/",void 0,i)},gd=async(e,t)=>{const n=Xh("GetParameters");let i;return i=JSON.stringify(Qn(e)),Jh(t,n,"/",void 0,i)},yd=async(e,t)=>{if(e.statusCode>=300)return bd(e,t);const n=await Bc(e.body,t);let i={};i=Vh(n);return{$metadata:Yh(e),...i}},vd=async(e,t)=>{if(e.statusCode>=300)return bd(e,t);const n=await Bc(e.body,t);let i={};i=Gh(n);return{$metadata:Yh(e),...i}},bd=async(e,t)=>{const n={...e,body:await Hc(e.body,t)},i=((e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},i=(r=e.headers,o="x-amzn-errortype",Object.keys(r).find((e=>e.toLowerCase()===o.toLowerCase())));var r,o;return void 0!==i?n(e.headers[i]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0})(e,n.body);switch(i){case"InternalServerError":case"com.amazonaws.ssm#InternalServerError":throw await Kd(n);case"InvalidResourceId":case"com.amazonaws.ssm#InvalidResourceId":throw await $m(n);case"InvalidResourceType":case"com.amazonaws.ssm#InvalidResourceType":throw await Nm(n);case"TooManyTagsError":case"com.amazonaws.ssm#TooManyTagsError":throw await $h(n);case"TooManyUpdates":case"com.amazonaws.ssm#TooManyUpdates":throw await Nh(n);case"OpsItemConflictException":case"com.amazonaws.ssm#OpsItemConflictException":throw await Xm(n);case"OpsItemInvalidParameterException":case"com.amazonaws.ssm#OpsItemInvalidParameterException":throw await Zm(n);case"OpsItemLimitExceededException":case"com.amazonaws.ssm#OpsItemLimitExceededException":throw await eh(n);case"OpsItemNotFoundException":case"com.amazonaws.ssm#OpsItemNotFoundException":throw await th(n);case"OpsItemRelatedItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemRelatedItemAlreadyExistsException":throw await nh(n);case"DuplicateInstanceId":case"com.amazonaws.ssm#DuplicateInstanceId":throw await Bd(n);case"InvalidCommandId":case"com.amazonaws.ssm#InvalidCommandId":throw await rm(n);case"InvalidInstanceId":case"com.amazonaws.ssm#InvalidInstanceId":throw await ym(n);case"DoesNotExistException":case"com.amazonaws.ssm#DoesNotExistException":throw await zd(n);case"InvalidParameters":case"com.amazonaws.ssm#InvalidParameters":throw await Am(n);case"AssociationAlreadyExists":case"com.amazonaws.ssm#AssociationAlreadyExists":throw await Ed(n);case"AssociationLimitExceeded":case"com.amazonaws.ssm#AssociationLimitExceeded":throw await Od(n);case"InvalidDocument":case"com.amazonaws.ssm#InvalidDocument":throw await am(n);case"InvalidDocumentVersion":case"com.amazonaws.ssm#InvalidDocumentVersion":throw await dm(n);case"InvalidOutputLocation":case"com.amazonaws.ssm#InvalidOutputLocation":throw await Pm(n);case"InvalidSchedule":case"com.amazonaws.ssm#InvalidSchedule":throw await zm(n);case"InvalidTag":case"com.amazonaws.ssm#InvalidTag":throw await Fm(n);case"InvalidTarget":case"com.amazonaws.ssm#InvalidTarget":throw await Um(n);case"InvalidTargetMaps":case"com.amazonaws.ssm#InvalidTargetMaps":throw await Bm(n);case"UnsupportedPlatformType":case"com.amazonaws.ssm#UnsupportedPlatformType":throw await qh(n);case"DocumentAlreadyExists":case"com.amazonaws.ssm#DocumentAlreadyExists":throw await $d(n);case"DocumentLimitExceeded":case"com.amazonaws.ssm#DocumentLimitExceeded":throw await Nd(n);case"InvalidDocumentContent":case"com.amazonaws.ssm#InvalidDocumentContent":throw await cm(n);case"InvalidDocumentSchemaVersion":case"com.amazonaws.ssm#InvalidDocumentSchemaVersion":throw await um(n);case"MaxDocumentSizeExceeded":case"com.amazonaws.ssm#MaxDocumentSizeExceeded":throw await Ym(n);case"IdempotentParameterMismatch":case"com.amazonaws.ssm#IdempotentParameterMismatch":throw await Gd(n);case"ResourceLimitExceededException":case"com.amazonaws.ssm#ResourceLimitExceededException":throw await _h(n);case"OpsItemAccessDeniedException":case"com.amazonaws.ssm#OpsItemAccessDeniedException":throw await Qm(n);case"OpsItemAlreadyExistsException":case"com.amazonaws.ssm#OpsItemAlreadyExistsException":throw await Jm(n);case"OpsMetadataAlreadyExistsException":case"com.amazonaws.ssm#OpsMetadataAlreadyExistsException":throw await rh(n);case"OpsMetadataInvalidArgumentException":case"com.amazonaws.ssm#OpsMetadataInvalidArgumentException":throw await oh(n);case"OpsMetadataLimitExceededException":case"com.amazonaws.ssm#OpsMetadataLimitExceededException":throw await ah(n);case"OpsMetadataTooManyUpdatesException":case"com.amazonaws.ssm#OpsMetadataTooManyUpdatesException":throw await lh(n);case"ResourceDataSyncAlreadyExistsException":case"com.amazonaws.ssm#ResourceDataSyncAlreadyExistsException":throw await vh(n);case"ResourceDataSyncCountExceededException":case"com.amazonaws.ssm#ResourceDataSyncCountExceededException":throw await xh(n);case"ResourceDataSyncInvalidConfigurationException":case"com.amazonaws.ssm#ResourceDataSyncInvalidConfigurationException":throw await wh(n);case"InvalidActivation":case"com.amazonaws.ssm#InvalidActivation":throw await Yd(n);case"InvalidActivationId":case"com.amazonaws.ssm#InvalidActivationId":throw await Qd(n);case"AssociationDoesNotExist":case"com.amazonaws.ssm#AssociationDoesNotExist":throw await Sd(n);case"AssociatedInstances":case"com.amazonaws.ssm#AssociatedInstances":throw await wd(n);case"InvalidDocumentOperation":case"com.amazonaws.ssm#InvalidDocumentOperation":throw await lm(n);case"InvalidDeleteInventoryParametersException":case"com.amazonaws.ssm#InvalidDeleteInventoryParametersException":throw await om(n);case"InvalidInventoryRequestException":case"com.amazonaws.ssm#InvalidInventoryRequestException":throw await Em(n);case"InvalidOptionException":case"com.amazonaws.ssm#InvalidOptionException":throw await km(n);case"InvalidTypeNameException":case"com.amazonaws.ssm#InvalidTypeNameException":throw await Hm(n);case"OpsMetadataNotFoundException":case"com.amazonaws.ssm#OpsMetadataNotFoundException":throw await ch(n);case"ParameterNotFound":case"com.amazonaws.ssm#ParameterNotFound":throw await mh(n);case"ResourceInUseException":case"com.amazonaws.ssm#ResourceInUseException":throw await Sh(n);case"ResourceDataSyncNotFoundException":case"com.amazonaws.ssm#ResourceDataSyncNotFoundException":throw await Eh(n);case"MalformedResourcePolicyDocumentException":case"com.amazonaws.ssm#MalformedResourcePolicyDocumentException":throw await Km(n);case"ResourceNotFoundException":case"com.amazonaws.ssm#ResourceNotFoundException":throw await Oh(n);case"ResourcePolicyConflictException":case"com.amazonaws.ssm#ResourcePolicyConflictException":throw await Ch(n);case"ResourcePolicyInvalidParameterException":case"com.amazonaws.ssm#ResourcePolicyInvalidParameterException":throw await kh(n);case"ResourcePolicyNotFoundException":case"com.amazonaws.ssm#ResourcePolicyNotFoundException":throw await Ph(n);case"TargetInUseException":case"com.amazonaws.ssm#TargetInUseException":throw await Mh(n);case"InvalidFilter":case"com.amazonaws.ssm#InvalidFilter":throw await mm(n);case"InvalidNextToken":case"com.amazonaws.ssm#InvalidNextToken":throw await Om(n);case"InvalidAssociationVersion":case"com.amazonaws.ssm#InvalidAssociationVersion":throw await em(n);case"AssociationExecutionDoesNotExist":case"com.amazonaws.ssm#AssociationExecutionDoesNotExist":throw await _d(n);case"InvalidFilterKey":case"com.amazonaws.ssm#InvalidFilterKey":throw await hm(n);case"InvalidFilterValue":case"com.amazonaws.ssm#InvalidFilterValue":throw await gm(n);case"AutomationExecutionNotFoundException":case"com.amazonaws.ssm#AutomationExecutionNotFoundException":throw await Id(n);case"InvalidPermissionType":case"com.amazonaws.ssm#InvalidPermissionType":throw await Im(n);case"UnsupportedOperatingSystem":case"com.amazonaws.ssm#UnsupportedOperatingSystem":throw await Bh(n);case"InvalidInstanceInformationFilterValue":case"com.amazonaws.ssm#InvalidInstanceInformationFilterValue":throw await vm(n);case"InvalidInstancePropertyFilterValue":case"com.amazonaws.ssm#InvalidInstancePropertyFilterValue":throw await bm(n);case"InvalidDeletionIdException":case"com.amazonaws.ssm#InvalidDeletionIdException":throw await sm(n);case"InvalidFilterOption":case"com.amazonaws.ssm#InvalidFilterOption":throw await fm(n);case"OpsItemRelatedItemAssociationNotFoundException":case"com.amazonaws.ssm#OpsItemRelatedItemAssociationNotFoundException":throw await ih(n);case"InvalidDocumentType":case"com.amazonaws.ssm#InvalidDocumentType":throw await pm(n);case"UnsupportedCalendarException":case"com.amazonaws.ssm#UnsupportedCalendarException":throw await Lh(n);case"InvalidPluginName":case"com.amazonaws.ssm#InvalidPluginName":throw await Rm(n);case"InvocationDoesNotExist":case"com.amazonaws.ssm#InvocationDoesNotExist":throw await Vm(n);case"UnsupportedFeatureRequiredException":case"com.amazonaws.ssm#UnsupportedFeatureRequiredException":throw await zh(n);case"InvalidAggregatorException":case"com.amazonaws.ssm#InvalidAggregatorException":throw await Jd(n);case"InvalidInventoryGroupException":case"com.amazonaws.ssm#InvalidInventoryGroupException":throw await xm(n);case"InvalidResultAttributeException":case"com.amazonaws.ssm#InvalidResultAttributeException":throw await Dm(n);case"InvalidKeyId":case"com.amazonaws.ssm#InvalidKeyId":throw await _m(n);case"ParameterVersionNotFound":case"com.amazonaws.ssm#ParameterVersionNotFound":throw await gh(n);case"ServiceSettingNotFound":case"com.amazonaws.ssm#ServiceSettingNotFound":throw await Ah(n);case"ParameterVersionLabelLimitExceeded":case"com.amazonaws.ssm#ParameterVersionLabelLimitExceeded":throw await fh(n);case"DocumentPermissionLimit":case"com.amazonaws.ssm#DocumentPermissionLimit":throw await Dd(n);case"ComplianceTypeCountLimitExceededException":case"com.amazonaws.ssm#ComplianceTypeCountLimitExceededException":throw await Md(n);case"InvalidItemContentException":case"com.amazonaws.ssm#InvalidItemContentException":throw await Sm(n);case"ItemSizeLimitExceededException":case"com.amazonaws.ssm#ItemSizeLimitExceededException":throw await Wm(n);case"TotalSizeLimitExceededException":case"com.amazonaws.ssm#TotalSizeLimitExceededException":throw await Dh(n);case"CustomSchemaCountLimitExceededException":case"com.amazonaws.ssm#CustomSchemaCountLimitExceededException":throw await jd(n);case"InvalidInventoryItemContextException":case"com.amazonaws.ssm#InvalidInventoryItemContextException":throw await wm(n);case"ItemContentMismatchException":case"com.amazonaws.ssm#ItemContentMismatchException":throw await Gm(n);case"SubTypeCountLimitExceededException":case"com.amazonaws.ssm#SubTypeCountLimitExceededException":throw await Rh(n);case"UnsupportedInventoryItemContextException":case"com.amazonaws.ssm#UnsupportedInventoryItemContextException":throw await Fh(n);case"UnsupportedInventorySchemaVersionException":case"com.amazonaws.ssm#UnsupportedInventorySchemaVersionException":throw await Uh(n);case"HierarchyLevelLimitExceededException":case"com.amazonaws.ssm#HierarchyLevelLimitExceededException":throw await qd(n);case"HierarchyTypeMismatchException":case"com.amazonaws.ssm#HierarchyTypeMismatchException":throw await Vd(n);case"IncompatiblePolicyException":case"com.amazonaws.ssm#IncompatiblePolicyException":throw await Wd(n);case"InvalidAllowedPatternException":case"com.amazonaws.ssm#InvalidAllowedPatternException":throw await Xd(n);case"InvalidPolicyAttributeException":case"com.amazonaws.ssm#InvalidPolicyAttributeException":throw await Mm(n);case"InvalidPolicyTypeException":case"com.amazonaws.ssm#InvalidPolicyTypeException":throw await jm(n);case"ParameterAlreadyExists":case"com.amazonaws.ssm#ParameterAlreadyExists":throw await uh(n);case"ParameterLimitExceeded":case"com.amazonaws.ssm#ParameterLimitExceeded":throw await ph(n);case"ParameterMaxVersionLimitExceeded":case"com.amazonaws.ssm#ParameterMaxVersionLimitExceeded":throw await dh(n);case"ParameterPatternMismatchException":case"com.amazonaws.ssm#ParameterPatternMismatchException":throw await hh(n);case"PoliciesLimitExceededException":case"com.amazonaws.ssm#PoliciesLimitExceededException":throw await yh(n);case"UnsupportedParameterType":case"com.amazonaws.ssm#UnsupportedParameterType":throw await Hh(n);case"ResourcePolicyLimitExceededException":case"com.amazonaws.ssm#ResourcePolicyLimitExceededException":throw await Th(n);case"AlreadyExistsException":case"com.amazonaws.ssm#AlreadyExistsException":throw await xd(n);case"FeatureNotAvailableException":case"com.amazonaws.ssm#FeatureNotAvailableException":throw await Hd(n);case"AutomationStepNotFoundException":case"com.amazonaws.ssm#AutomationStepNotFoundException":throw await Rd(n);case"InvalidAutomationSignalException":case"com.amazonaws.ssm#InvalidAutomationSignalException":throw await nm(n);case"InvalidNotificationConfig":case"com.amazonaws.ssm#InvalidNotificationConfig":throw await Cm(n);case"InvalidOutputFolder":case"com.amazonaws.ssm#InvalidOutputFolder":throw await Tm(n);case"InvalidRole":case"com.amazonaws.ssm#InvalidRole":throw await Lm(n);case"InvalidAssociation":case"com.amazonaws.ssm#InvalidAssociation":throw await Zd(n);case"AutomationDefinitionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionNotFoundException":throw await Td(n);case"AutomationDefinitionVersionNotFoundException":case"com.amazonaws.ssm#AutomationDefinitionVersionNotFoundException":throw await Pd(n);case"AutomationExecutionLimitExceededException":case"com.amazonaws.ssm#AutomationExecutionLimitExceededException":throw await Ad(n);case"InvalidAutomationExecutionParametersException":case"com.amazonaws.ssm#InvalidAutomationExecutionParametersException":throw await tm(n);case"AutomationDefinitionNotApprovedException":case"com.amazonaws.ssm#AutomationDefinitionNotApprovedException":throw await kd(n);case"TargetNotConnected":case"com.amazonaws.ssm#TargetNotConnected":throw await jh(n);case"InvalidAutomationStatusUpdateException":case"com.amazonaws.ssm#InvalidAutomationStatusUpdateException":throw await im(n);case"AssociationVersionLimitExceeded":case"com.amazonaws.ssm#AssociationVersionLimitExceeded":throw await Cd(n);case"InvalidUpdate":case"com.amazonaws.ssm#InvalidUpdate":throw await qm(n);case"StatusUnchanged":case"com.amazonaws.ssm#StatusUnchanged":throw await Ih(n);case"DocumentVersionLimitExceeded":case"com.amazonaws.ssm#DocumentVersionLimitExceeded":throw await Ld(n);case"DuplicateDocumentContent":case"com.amazonaws.ssm#DuplicateDocumentContent":throw await Fd(n);case"DuplicateDocumentVersionName":case"com.amazonaws.ssm#DuplicateDocumentVersionName":throw await Ud(n);case"OpsMetadataKeyLimitExceededException":case"com.amazonaws.ssm#OpsMetadataKeyLimitExceededException":throw await sh(n);case"ResourceDataSyncConflictException":case"com.amazonaws.ssm#ResourceDataSyncConflictException":throw await bh(n);default:const t=n.body;return Qh({output:e,parsedBody:t,errorCode:i})}},xd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Gl({$metadata:Yh(e),...i});return Tn(r,n)},wd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ru({$metadata:Yh(e),...i});return Tn(r,n)},Ed=async(e,t)=>{const n=e.body,i=Qn(n),r=new iu({$metadata:Yh(e),...i});return Tn(r,n)},Sd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Iu({$metadata:Yh(e),...i});return Tn(r,n)},_d=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ju({$metadata:Yh(e),...i});return Tn(r,n)},Od=async(e,t)=>{const n=e.body,i=Qn(n),r=new ru({$metadata:Yh(e),...i});return Tn(r,n)},Cd=async(e,t)=>{const n=e.body,i=Qn(n),r=new ad({$metadata:Yh(e),...i});return Tn(r,n)},kd=async(e,t)=>{const n=e.body,i=Qn(n),r=new rd({$metadata:Yh(e),...i});return Tn(r,n)},Td=async(e,t)=>{const n=e.body,i=Qn(n),r=new Jp({$metadata:Yh(e),...i});return Tn(r,n)},Pd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Xp({$metadata:Yh(e),...i});return Tn(r,n)},Ad=async(e,t)=>{const n=e.body,i=Qn(n),r=new Zp({$metadata:Yh(e),...i});return Tn(r,n)},Id=async(e,t)=>{const n=e.body,i=Qn(n),r=new ep({$metadata:Yh(e),...i});return Tn(r,n)},Rd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Vp({$metadata:Yh(e),...i});return Tn(r,n)},Md=async(e,t)=>{const n=e.body,i=Qn(n),r=new wp({$metadata:Yh(e),...i});return Tn(r,n)},jd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Op({$metadata:Yh(e),...i});return Tn(r,n)},$d=async(e,t)=>{const n=e.body,i=Qn(n),r=new mu({$metadata:Yh(e),...i});return Tn(r,n)},Nd=async(e,t)=>{const n=e.body,i=Qn(n),r=new hu({$metadata:Yh(e),...i});return Tn(r,n)},Dd=async(e,t)=>{const n=e.body,i=Qn(n),r=new xp({$metadata:Yh(e),...i});return Tn(r,n)},Ld=async(e,t)=>{const n=e.body,i=Qn(n),r=new ud({$metadata:Yh(e),...i});return Tn(r,n)},zd=async(e,t)=>{const n=e.body,i=Qn(n),r=new tu({$metadata:Yh(e),...i});return Tn(r,n)},Fd=async(e,t)=>{const n=e.body,i=Qn(n),r=new pd({$metadata:Yh(e),...i});return Tn(r,n)},Ud=async(e,t)=>{const n=e.body,i=Qn(n),r=new dd({$metadata:Yh(e),...i});return Tn(r,n)},Bd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Xl({$metadata:Yh(e),...i});return Tn(r,n)},Hd=async(e,t)=>{const n=e.body,i=Qn(n),r=new qp({$metadata:Yh(e),...i});return Tn(r,n)},qd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ip({$metadata:Yh(e),...i});return Tn(r,n)},Vd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Rp({$metadata:Yh(e),...i});return Tn(r,n)},Gd=async(e,t)=>{const n=e.body,i=Qn(n),r=new vu({$metadata:Yh(e),...i});return Tn(r,n)},Wd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Mp({$metadata:Yh(e),...i});return Tn(r,n)},Kd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ul({$metadata:Yh(e),...i});return Tn(r,n)},Yd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Pu({$metadata:Yh(e),...i});return Tn(r,n)},Qd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Au({$metadata:Yh(e),...i});return Tn(r,n)},Jd=async(e,t)=>{const n=e.body,i=Qn(n),r=new mp({$metadata:Yh(e),...i});return Tn(r,n)},Xd=async(e,t)=>{const n=e.body,i=Qn(n),r=new jp({$metadata:Yh(e),...i});return Tn(r,n)},Zd=async(e,t)=>{const n=e.body,i=Qn(n),r=new Qp({$metadata:Yh(e),...i});return Tn(r,n)},em=async(e,t)=>{const n=e.body,i=Qn(n),r=new Qu({$metadata:Yh(e),...i});return Tn(r,n)},tm=async(e,t)=>{const n=e.body,i=Qn(n),r=new ed({$metadata:Yh(e),...i});return Tn(r,n)},nm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Gp({$metadata:Yh(e),...i});return Tn(r,n)},im=async(e,t)=>{const n=e.body,i=Qn(n),r=new sd({$metadata:Yh(e),...i});return Tn(r,n)},rm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Zl({$metadata:Yh(e),...i});return Tn(r,n)},om=async(e,t)=>{const n=e.body,i=Qn(n),r=new ju({$metadata:Yh(e),...i});return Tn(r,n)},sm=async(e,t)=>{const n=e.body,i=Qn(n),r=new op({$metadata:Yh(e),...i});return Tn(r,n)},am=async(e,t)=>{const n=e.body,i=Qn(n),r=new ou({$metadata:Yh(e),...i});return Tn(r,n)},cm=async(e,t)=>{const n=e.body,i=Qn(n),r=new fu({$metadata:Yh(e),...i});return Tn(r,n)},lm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Mu({$metadata:Yh(e),...i});return Tn(r,n)},um=async(e,t)=>{const n=e.body,i=Qn(n),r=new gu({$metadata:Yh(e),...i});return Tn(r,n)},pm=async(e,t)=>{const n=e.body,i=Qn(n),r=new cp({$metadata:Yh(e),...i});return Tn(r,n)},dm=async(e,t)=>{const n=e.body,i=Qn(n),r=new su({$metadata:Yh(e),...i});return Tn(r,n)},mm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ku({$metadata:Yh(e),...i});return Tn(r,n)},hm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Xu({$metadata:Yh(e),...i});return Tn(r,n)},fm=async(e,t)=>{const n=e.body,i=Qn(n),r=new sp({$metadata:Yh(e),...i});return Tn(r,n)},gm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Zu({$metadata:Yh(e),...i});return Tn(r,n)},ym=async(e,t)=>{const n=e.body,i=Qn(n),r=new eu({$metadata:Yh(e),...i});return Tn(r,n)},vm=async(e,t)=>{const n=e.body,i=Qn(n),r=new ip({$metadata:Yh(e),...i});return Tn(r,n)},bm=async(e,t)=>{const n=e.body,i=Qn(n),r=new rp({$metadata:Yh(e),...i});return Tn(r,n)},xm=async(e,t)=>{const n=e.body,i=Qn(n),r=new hp({$metadata:Yh(e),...i});return Tn(r,n)},wm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Cp({$metadata:Yh(e),...i});return Tn(r,n)},Em=async(e,t)=>{const n=e.body,i=Qn(n),r=new $u({$metadata:Yh(e),...i});return Tn(r,n)},Sm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ep({$metadata:Yh(e),...i});return Tn(r,n)},_m=async(e,t)=>{const n=e.body,i=Qn(n),r=new gp({$metadata:Yh(e),...i});return Tn(r,n)},Om=async(e,t)=>{const n=e.body,i=Qn(n),r=new Yu({$metadata:Yh(e),...i});return Tn(r,n)},Cm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Wp({$metadata:Yh(e),...i});return Tn(r,n)},km=async(e,t)=>{const n=e.body,i=Qn(n),r=new Nu({$metadata:Yh(e),...i});return Tn(r,n)},Tm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Kp({$metadata:Yh(e),...i});return Tn(r,n)},Pm=async(e,t)=>{const n=e.body,i=Qn(n),r=new au({$metadata:Yh(e),...i});return Tn(r,n)},Am=async(e,t)=>{const n=e.body,i=Qn(n),r=new nu({$metadata:Yh(e),...i});return Tn(r,n)},Im=async(e,t)=>{const n=e.body,i=Qn(n),r=new tp({$metadata:Yh(e),...i});return Tn(r,n)},Rm=async(e,t)=>{const n=e.body,i=Qn(n),r=new up({$metadata:Yh(e),...i});return Tn(r,n)},Mm=async(e,t)=>{const n=e.body,i=Qn(n),r=new $p({$metadata:Yh(e),...i});return Tn(r,n)},jm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Np({$metadata:Yh(e),...i});return Tn(r,n)},$m=async(e,t)=>{const n=e.body,i=Qn(n),r=new Bl({$metadata:Yh(e),...i});return Tn(r,n)},Nm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Hl({$metadata:Yh(e),...i});return Tn(r,n)},Dm=async(e,t)=>{const n=e.body,i=Qn(n),r=new fp({$metadata:Yh(e),...i});return Tn(r,n)},Lm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Yp({$metadata:Yh(e),...i});return Tn(r,n)},zm=async(e,t)=>{const n=e.body,i=Qn(n),r=new cu({$metadata:Yh(e),...i});return Tn(r,n)},Fm=async(e,t)=>{const n=e.body,i=Qn(n),r=new lu({$metadata:Yh(e),...i});return Tn(r,n)},Um=async(e,t)=>{const n=e.body,i=Qn(n),r=new uu({$metadata:Yh(e),...i});return Tn(r,n)},Bm=async(e,t)=>{const n=e.body,i=Qn(n),r=new pu({$metadata:Yh(e),...i});return Tn(r,n)},Hm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Du({$metadata:Yh(e),...i});return Tn(r,n)},qm=async(e,t)=>{const n=e.body,i=Qn(n),r=new cd({$metadata:Yh(e),...i});return Tn(r,n)},Vm=async(e,t)=>{const n=e.body,i=Qn(n),r=new pp({$metadata:Yh(e),...i});return Tn(r,n)},Gm=async(e,t)=>{const n=e.body,i=Qn(n),r=new kp({$metadata:Yh(e),...i});return Tn(r,n)},Wm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Sp({$metadata:Yh(e),...i});return Tn(r,n)},Km=async(e,t)=>{const n=e.body,i=Qn(n),r=new Bu({$metadata:Yh(e),...i});return Tn(r,n)},Ym=async(e,t)=>{const n=e.body,i=Qn(n),r=new yu({$metadata:Yh(e),...i});return Tn(r,n)},Qm=async(e,t)=>{const n=e.body,i=Qn(n),r=new xu({$metadata:Yh(e),...i});return Tn(r,n)},Jm=async(e,t)=>{const n=e.body,i=Qn(n),r=new wu({$metadata:Yh(e),...i});return Tn(r,n)},Xm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Wl({$metadata:Yh(e),...i});return Tn(r,n)},Zm=async(e,t)=>{const n=e.body,i=Qn(n),r=new Kl({$metadata:Yh(e),...i});return Tn(r,n)},eh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Yl({$metadata:Yh(e),...i});return Tn(r,n)},th=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ql({$metadata:Yh(e),...i});return Tn(r,n)},nh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Jl({$metadata:Yh(e),...i});return Tn(r,n)},ih=async(e,t)=>{const n=e.body,i=Qn(n),r=new ap({$metadata:Yh(e),...i});return Tn(r,n)},rh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Eu({$metadata:Yh(e),...i});return Tn(r,n)},oh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Su({$metadata:Yh(e),...i});return Tn(r,n)},sh=async(e,t)=>{const n=e.body,i=Qn(n),r=new md({$metadata:Yh(e),...i});return Tn(r,n)},ah=async(e,t)=>{const n=e.body,i=Qn(n),r=new _u({$metadata:Yh(e),...i});return Tn(r,n)},ch=async(e,t)=>{const n=e.body,i=Qn(n),r=new Lu({$metadata:Yh(e),...i});return Tn(r,n)},lh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ou({$metadata:Yh(e),...i});return Tn(r,n)},uh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Dp({$metadata:Yh(e),...i});return Tn(r,n)},ph=async(e,t)=>{const n=e.body,i=Qn(n),r=new Lp({$metadata:Yh(e),...i});return Tn(r,n)},dh=async(e,t)=>{const n=e.body,i=Qn(n),r=new zp({$metadata:Yh(e),...i});return Tn(r,n)},mh=async(e,t)=>{const n=e.body,i=Qn(n),r=new zu({$metadata:Yh(e),...i});return Tn(r,n)},hh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Fp({$metadata:Yh(e),...i});return Tn(r,n)},fh=async(e,t)=>{const n=e.body,i=Qn(n),r=new bp({$metadata:Yh(e),...i});return Tn(r,n)},gh=async(e,t)=>{const n=e.body,i=Qn(n),r=new yp({$metadata:Yh(e),...i});return Tn(r,n)},yh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Up({$metadata:Yh(e),...i});return Tn(r,n)},vh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Cu({$metadata:Yh(e),...i});return Tn(r,n)},bh=async(e,t)=>{const n=e.body,i=Qn(n),r=new hd({$metadata:Yh(e),...i});return Tn(r,n)},xh=async(e,t)=>{const n=e.body,i=Qn(n),r=new ku({$metadata:Yh(e),...i});return Tn(r,n)},wh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Tu({$metadata:Yh(e),...i});return Tn(r,n)},Eh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Uu({$metadata:Yh(e),...i});return Tn(r,n)},Sh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Fu({$metadata:Yh(e),...i});return Tn(r,n)},_h=async(e,t)=>{const n=e.body,i=Qn(n),r=new bu({$metadata:Yh(e),...i});return Tn(r,n)},Oh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Hu({$metadata:Yh(e),...i});return Tn(r,n)},Ch=async(e,t)=>{const n=e.body,i=Qn(n),r=new qu({$metadata:Yh(e),...i});return Tn(r,n)},kh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Vu({$metadata:Yh(e),...i});return Tn(r,n)},Th=async(e,t)=>{const n=e.body,i=Qn(n),r=new Hp({$metadata:Yh(e),...i});return Tn(r,n)},Ph=async(e,t)=>{const n=e.body,i=Qn(n),r=new Gu({$metadata:Yh(e),...i});return Tn(r,n)},Ah=async(e,t)=>{const n=e.body,i=Qn(n),r=new vp({$metadata:Yh(e),...i});return Tn(r,n)},Ih=async(e,t)=>{const n=e.body,i=Qn(n),r=new ld({$metadata:Yh(e),...i});return Tn(r,n)},Rh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Tp({$metadata:Yh(e),...i});return Tn(r,n)},Mh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Wu({$metadata:Yh(e),...i});return Tn(r,n)},jh=async(e,t)=>{const n=e.body,i=Qn(n),r=new od({$metadata:Yh(e),...i});return Tn(r,n)},$h=async(e,t)=>{const n=e.body,i=Qn(n),r=new ql({$metadata:Yh(e),...i});return Tn(r,n)},Nh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Vl({$metadata:Yh(e),...i});return Tn(r,n)},Dh=async(e,t)=>{const n=e.body,i=Qn(n),r=new _p({$metadata:Yh(e),...i});return Tn(r,n)},Lh=async(e,t)=>{const n=e.body,i=Qn(n),r=new lp({$metadata:Yh(e),...i});return Tn(r,n)},zh=async(e,t)=>{const n=e.body,i=Qn(n),r=new dp({$metadata:Yh(e),...i});return Tn(r,n)},Fh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Pp({$metadata:Yh(e),...i});return Tn(r,n)},Uh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Ap({$metadata:Yh(e),...i});return Tn(r,n)},Bh=async(e,t)=>{const n=e.body,i=Qn(n),r=new np({$metadata:Yh(e),...i});return Tn(r,n)},Hh=async(e,t)=>{const n=e.body,i=Qn(n),r=new Bp({$metadata:Yh(e),...i});return Tn(r,n)},qh=async(e,t)=>{const n=e.body,i=Qn(n),r=new du({$metadata:Yh(e),...i});return Tn(r,n)},Vh=(e,t)=>qn(e,{Parameter:e=>Wh(e)}),Gh=(e,t)=>qn(e,{InvalidParameters:Qn,Parameters:e=>Kh(e)}),Wh=(e,t)=>qn(e,{ARN:cn,DataType:cn,LastModifiedDate:e=>an((e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=ln(e);else{if("object"!=typeof e||1!==e.tag)throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");t=e.value}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(1e3*t))})(Xt(e))),Name:cn,Selector:cn,SourceResult:cn,Type:cn,Value:cn,Version:tn}),Kh=(e,t)=>{const n=(e||[]).filter((e=>null!=e)).map((e=>Wh(e)));return n},Yh=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"]}),Qh=Pn(Fl),Jh=async(e,t,n,i,r)=>{const{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),l={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(l.body=r),new T(l)};function Xh(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AmazonSSM.${e}`}}class Zh extends(Kt.classBuilder().ep(tl).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameter",{}).n("SSMClient","GetParameterCommand").f(void 0,nd).ser(fd).de(yd).build()){}class ef extends(Kt.classBuilder().ep(tl).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("AmazonSSM","GetParameters",{}).n("SSMClient","GetParametersCommand").f(void 0,id).ser(gd).de(vd).build()){}const tf={clientConfig:Cc,onlyDefault:!1,prefix:process.env.SSM_PARAM_PATH},nf=async(e,t,n)=>({operation:D(t).operation,region:await L(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const rf=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ses",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},of={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var sf="3.687.0";const af="required",cf="fn",lf="argv",uf="ref",pf=!0,df="isSet",mf="booleanEquals",hf="error",ff="endpoint",gf="tree",yf="PartitionResult",vf={[af]:!1,type:"String"},bf={[af]:!0,default:!1,type:"Boolean"},xf={[uf]:"Endpoint"},wf={[cf]:mf,[lf]:[{[uf]:"UseFIPS"},!0]},Ef={[cf]:mf,[lf]:[{[uf]:"UseDualStack"},!0]},Sf={},_f={[cf]:"getAttr",[lf]:[{[uf]:yf},"supportsFIPS"]},Of={[cf]:mf,[lf]:[!0,{[cf]:"getAttr",[lf]:[{[uf]:yf},"supportsDualStack"]}]},Cf=[wf],kf=[Ef],Tf=[{[uf]:"Region"}],Pf={version:"1.0",parameters:{Region:vf,UseDualStack:bf,UseFIPS:bf,Endpoint:vf},rules:[{conditions:[{[cf]:df,[lf]:[xf]}],rules:[{conditions:Cf,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:hf},{conditions:kf,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:hf},{endpoint:{url:xf,properties:Sf,headers:Sf},type:ff}],type:gf},{conditions:[{[cf]:df,[lf]:Tf}],rules:[{conditions:[{[cf]:"aws.partition",[lf]:Tf,assign:yf}],rules:[{conditions:[wf,Ef],rules:[{conditions:[{[cf]:mf,[lf]:[pf,_f]},Of],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:hf}],type:gf},{conditions:Cf,rules:[{conditions:[{[cf]:mf,[lf]:[_f,pf]}],rules:[{endpoint:{url:"https://email-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf},{error:"FIPS is enabled but this partition does not support FIPS",type:hf}],type:gf},{conditions:kf,rules:[{conditions:[Of],rules:[{endpoint:{url:"https://email.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf},{error:"DualStack is enabled but this partition does not support DualStack",type:hf}],type:gf},{endpoint:{url:"https://email.{Region}.{PartitionResult#dnsSuffix}",properties:Sf,headers:Sf},type:ff}],type:gf}],type:gf},{error:"Invalid Configuration: Missing Region",type:hf}]},Af=new Te({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),If=(e,t={})=>Af.get(e,(()=>Ze(Pf,{endpointParams:e,logger:t.logger})));Me.aws=nt;const Rf=e=>{const t=ys(e),n=()=>t().then(In),i=(e=>({apiVersion:"2010-12-01",base64Decoder:e?.base64Decoder??te,base64Encoder:e?.base64Encoder??oe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??If,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??rf,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new ct}],logger:e?.logger??new Bn,serviceId:e?.serviceId??"SES",urlParser:e?.urlParser??ar,utf8Decoder:e?.utf8Decoder??ne,utf8Encoder:e?.utf8Encoder??re}))(e);return{...i,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qo,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??fo({serviceId:i.serviceId,clientVersion:sf}),maxAttempts:e?.maxAttempts??3,region:e?.region??Bo("Region is missing"),requestHandler:de.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||fr),sha256:e?.sha256??uo,streamCollector:e?.streamCollector??me,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Gi)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Wi))}},Mf=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,i=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){i=e},credentials:()=>i}},jf=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()});class $f extends Wt{constructor(...[e]){const t=Rf(e||{});var n;const i=ke((n=t,{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"ses"})),r=Rr(i),o=Qi(r),s=(e=>({...Ut(e)}))(mr(o)),a=((e,t)=>{const n={...xs(e),...Nn(e),...v(e),...Mf(e)};return t.forEach((e=>e.configure(n))),{...e,...ws(n),...Dn(n),...b(n),...jf(n)}})(s,e?.extensions||[]);super(a),this.config=a,this.middlewareStack.use(qi(this.config)),this.middlewareStack.use(Lr(this.config)),this.middlewareStack.use(Zi(this.config)),this.middlewareStack.use(I(this.config)),this.middlewareStack.use(M(this.config)),this.middlewareStack.use(N(this.config)),this.middlewareStack.use(U(this.config,{httpAuthSchemeParametersProvider:nf,identityProviderConfigProvider:async e=>new Ee({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(K(this.config))}destroy(){super.destroy()}}class Nf extends kn{constructor(e){super(e),Object.setPrototypeOf(this,Nf.prototype)}}class Df extends Nf{constructor(e){super({name:"AccountSendingPausedException",$fault:"client",...e}),this.name="AccountSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,Df.prototype)}}class Lf extends Nf{constructor(e){super({name:"AlreadyExistsException",$fault:"client",...e}),this.name="AlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Lf.prototype),this.Name=e.Name}}class zf extends Nf{constructor(e){super({name:"CannotDeleteException",$fault:"client",...e}),this.name="CannotDeleteException",this.$fault="client",Object.setPrototypeOf(this,zf.prototype),this.Name=e.Name}}class Ff extends Nf{constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),this.name="LimitExceededException",this.$fault="client",Object.setPrototypeOf(this,Ff.prototype)}}class Uf extends Nf{constructor(e){super({name:"RuleSetDoesNotExistException",$fault:"client",...e}),this.name="RuleSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Uf.prototype),this.Name=e.Name}}class Bf extends Nf{constructor(e){super({name:"ConfigurationSetAlreadyExistsException",$fault:"client",...e}),this.name="ConfigurationSetAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Bf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Hf extends Nf{constructor(e){super({name:"ConfigurationSetDoesNotExistException",$fault:"client",...e}),this.name="ConfigurationSetDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,Hf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class qf extends Nf{constructor(e){super({name:"ConfigurationSetSendingPausedException",$fault:"client",...e}),this.name="ConfigurationSetSendingPausedException",this.$fault="client",Object.setPrototypeOf(this,qf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Vf extends Nf{constructor(e){super({name:"InvalidConfigurationSetException",$fault:"client",...e}),this.name="InvalidConfigurationSetException",this.$fault="client",Object.setPrototypeOf(this,Vf.prototype)}}class Gf extends Nf{constructor(e){super({name:"EventDestinationAlreadyExistsException",$fault:"client",...e}),this.name="EventDestinationAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Gf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Wf extends Nf{constructor(e){super({name:"InvalidCloudWatchDestinationException",$fault:"client",...e}),this.name="InvalidCloudWatchDestinationException",this.$fault="client",Object.setPrototypeOf(this,Wf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Kf extends Nf{constructor(e){super({name:"InvalidFirehoseDestinationException",$fault:"client",...e}),this.name="InvalidFirehoseDestinationException",this.$fault="client",Object.setPrototypeOf(this,Kf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Yf extends Nf{constructor(e){super({name:"InvalidSNSDestinationException",$fault:"client",...e}),this.name="InvalidSNSDestinationException",this.$fault="client",Object.setPrototypeOf(this,Yf.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class Qf extends Nf{constructor(e){super({name:"InvalidTrackingOptionsException",$fault:"client",...e}),this.name="InvalidTrackingOptionsException",this.$fault="client",Object.setPrototypeOf(this,Qf.prototype)}}class Jf extends Nf{constructor(e){super({name:"TrackingOptionsAlreadyExistsException",$fault:"client",...e}),this.name="TrackingOptionsAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Jf.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class Xf extends Nf{constructor(e){super({name:"CustomVerificationEmailInvalidContentException",$fault:"client",...e}),this.name="CustomVerificationEmailInvalidContentException",this.$fault="client",Object.setPrototypeOf(this,Xf.prototype)}}class Zf extends Nf{constructor(e){super({name:"CustomVerificationEmailTemplateAlreadyExistsException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,Zf.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class eg extends Nf{constructor(e){super({name:"FromEmailAddressNotVerifiedException",$fault:"client",...e}),this.name="FromEmailAddressNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,eg.prototype),this.FromEmailAddress=e.FromEmailAddress}}class tg extends Nf{constructor(e){super({name:"InvalidLambdaFunctionException",$fault:"client",...e}),this.name="InvalidLambdaFunctionException",this.$fault="client",Object.setPrototypeOf(this,tg.prototype),this.FunctionArn=e.FunctionArn}}class ng extends Nf{constructor(e){super({name:"InvalidS3ConfigurationException",$fault:"client",...e}),this.name="InvalidS3ConfigurationException",this.$fault="client",Object.setPrototypeOf(this,ng.prototype),this.Bucket=e.Bucket}}class ig extends Nf{constructor(e){super({name:"InvalidSnsTopicException",$fault:"client",...e}),this.name="InvalidSnsTopicException",this.$fault="client",Object.setPrototypeOf(this,ig.prototype),this.Topic=e.Topic}}class rg extends Nf{constructor(e){super({name:"RuleDoesNotExistException",$fault:"client",...e}),this.name="RuleDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,rg.prototype),this.Name=e.Name}}class og extends Nf{constructor(e){super({name:"InvalidTemplateException",$fault:"client",...e}),this.name="InvalidTemplateException",this.$fault="client",Object.setPrototypeOf(this,og.prototype),this.TemplateName=e.TemplateName}}class sg extends Nf{constructor(e){super({name:"CustomVerificationEmailTemplateDoesNotExistException",$fault:"client",...e}),this.name="CustomVerificationEmailTemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,sg.prototype),this.CustomVerificationEmailTemplateName=e.CustomVerificationEmailTemplateName}}class ag extends Nf{constructor(e){super({name:"EventDestinationDoesNotExistException",$fault:"client",...e}),this.name="EventDestinationDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,ag.prototype),this.ConfigurationSetName=e.ConfigurationSetName,this.EventDestinationName=e.EventDestinationName}}class cg extends Nf{constructor(e){super({name:"TrackingOptionsDoesNotExistException",$fault:"client",...e}),this.name="TrackingOptionsDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,cg.prototype),this.ConfigurationSetName=e.ConfigurationSetName}}class lg extends Nf{constructor(e){super({name:"TemplateDoesNotExistException",$fault:"client",...e}),this.name="TemplateDoesNotExistException",this.$fault="client",Object.setPrototypeOf(this,lg.prototype),this.TemplateName=e.TemplateName}}class ug extends Nf{constructor(e){super({name:"InvalidDeliveryOptionsException",$fault:"client",...e}),this.name="InvalidDeliveryOptionsException",this.$fault="client",Object.setPrototypeOf(this,ug.prototype)}}class pg extends Nf{constructor(e){super({name:"InvalidPolicyException",$fault:"client",...e}),this.name="InvalidPolicyException",this.$fault="client",Object.setPrototypeOf(this,pg.prototype)}}class dg extends Nf{constructor(e){super({name:"InvalidRenderingParameterException",$fault:"client",...e}),this.name="InvalidRenderingParameterException",this.$fault="client",Object.setPrototypeOf(this,dg.prototype),this.TemplateName=e.TemplateName}}class mg extends Nf{constructor(e){super({name:"MailFromDomainNotVerifiedException",$fault:"client",...e}),this.name="MailFromDomainNotVerifiedException",this.$fault="client",Object.setPrototypeOf(this,mg.prototype)}}class hg extends Nf{constructor(e){super({name:"MessageRejected",$fault:"client",...e}),this.name="MessageRejected",this.$fault="client",Object.setPrototypeOf(this,hg.prototype)}}class fg extends Nf{constructor(e){super({name:"MissingRenderingAttributeException",$fault:"client",...e}),this.name="MissingRenderingAttributeException",this.$fault="client",Object.setPrototypeOf(this,fg.prototype),this.TemplateName=e.TemplateName}}class gg extends Nf{constructor(e){super({name:"ProductionAccessNotGrantedException",$fault:"client",...e}),this.name="ProductionAccessNotGrantedException",this.$fault="client",Object.setPrototypeOf(this,gg.prototype)}}const yg=async(e,t)=>{const n=GS;let i;return i=TT({...$b(e),[KS]:x_,[hT]:WS}),VS(t,n,"/",void 0,i)},vg=async(e,t)=>{const n=GS;let i;return i=TT({...Fb(e),[KS]:m_,[hT]:WS}),VS(t,n,"/",void 0,i)},bg=async(e,t)=>{const n=GS;let i;return i=TT({...zb(e),[KS]:h_,[hT]:WS}),VS(t,n,"/",void 0,i)},xg=async(e,t)=>{const n=GS;let i;return i=TT({...Ub(e),[KS]:f_,[hT]:WS}),VS(t,n,"/",void 0,i)},wg=async(e,t)=>{const n=GS;let i;return i=TT({...Bb(e),[KS]:g_,[hT]:WS}),VS(t,n,"/",void 0,i)},Eg=async(e,t)=>{const n=GS;let i;return i=TT({...Hb(e),[KS]:v_,[hT]:WS}),VS(t,n,"/",void 0,i)},Sg=async(e,t)=>{const n=GS;let i;return i=TT({...qb(e),[KS]:b_,[hT]:WS}),VS(t,n,"/",void 0,i)},_g=async(e,t)=>{const n=GS;let i;return i=TT({...Vb(e),[KS]:w_,[hT]:WS}),VS(t,n,"/",void 0,i)},Og=async(e,t)=>{const n=GS;let i;return i=TT({...Gb(e),[KS]:C_,[hT]:WS}),VS(t,n,"/",void 0,i)},Cg=async(e,t)=>{const n=GS;let i;return i=TT({...Kb(e),[KS]:z_,[hT]:WS}),VS(t,n,"/",void 0,i)},kg=async(e,t)=>{const n=GS;let i;return i=TT({...Wb(e),[KS]:F_,[hT]:WS}),VS(t,n,"/",void 0,i)},Tg=async(e,t)=>{const n=GS;let i;return i=TT({...Yb(e),[KS]:U_,[hT]:WS}),VS(t,n,"/",void 0,i)},Pg=async(e,t)=>{const n=GS;let i;return i=TT({...Qb(e),[KS]:H_,[hT]:WS}),VS(t,n,"/",void 0,i)},Ag=async(e,t)=>{const n=GS;let i;return i=TT({...Xb(e),[KS]:W_,[hT]:WS}),VS(t,n,"/",void 0,i)},Ig=async(e,t)=>{const n=GS;let i;return i=TT({...Jb(e),[KS]:K_,[hT]:WS}),VS(t,n,"/",void 0,i)},Rg=async(e,t)=>{const n=GS;let i;return i=TT({...Zb(e),[KS]:J_,[hT]:WS}),VS(t,n,"/",void 0,i)},Mg=async(e,t)=>{const n=GS;let i;return i=TT({...ex(e),[KS]:X_,[hT]:WS}),VS(t,n,"/",void 0,i)},jg=async(e,t)=>{const n=GS;let i;return i=TT({...tx(e),[KS]:Z_,[hT]:WS}),VS(t,n,"/",void 0,i)},$g=async(e,t)=>{const n=GS;let i;return i=TT({...nx(e),[KS]:iO,[hT]:WS}),VS(t,n,"/",void 0,i)},Ng=async(e,t)=>{const n=GS;let i;return i=TT({...ix(e),[KS]:cO,[hT]:WS}),VS(t,n,"/",void 0,i)},Dg=async(e,t)=>{const n=GS;let i;return i=TT({...rx(),[KS]:N_,[hT]:WS}),VS(t,n,"/",void 0,i)},Lg=async(e,t)=>{const n=GS;let i;return i=TT({...ox(e),[KS]:B_,[hT]:WS}),VS(t,n,"/",void 0,i)},zg=async(e,t)=>{const n=GS;let i;return i=TT({...sx(e),[KS]:tO,[hT]:WS}),VS(t,n,"/",void 0,i)},Fg=async(e,t)=>{const n=GS;let i;return i=TT({...ax(e),[KS]:eO,[hT]:WS}),VS(t,n,"/",void 0,i)},Ug=async(e,t)=>{const n=GS,i=TT({[KS]:RO,[hT]:WS});return VS(t,n,"/",void 0,i)},Bg=async(e,t)=>{const n=GS;let i;return i=TT({...mx(e),[KS]:MO,[hT]:WS}),VS(t,n,"/",void 0,i)},Hg=async(e,t)=>{const n=GS;let i;return i=TT({...hx(e),[KS]:jO,[hT]:WS}),VS(t,n,"/",void 0,i)},qg=async(e,t)=>{const n=GS;let i;return i=TT({...fx(e),[KS]:$O,[hT]:WS}),VS(t,n,"/",void 0,i)},Vg=async(e,t)=>{const n=GS;let i;return i=TT({...gx(e),[KS]:NO,[hT]:WS}),VS(t,n,"/",void 0,i)},Gg=async(e,t)=>{const n=GS;let i;return i=TT({...yx(e),[KS]:DO,[hT]:WS}),VS(t,n,"/",void 0,i)},Wg=async(e,t)=>{const n=GS;let i;return i=TT({...vx(e),[KS]:LO,[hT]:WS}),VS(t,n,"/",void 0,i)},Kg=async(e,t)=>{const n=GS,i=TT({[KS]:zO,[hT]:WS});return VS(t,n,"/",void 0,i)},Yg=async(e,t)=>{const n=GS,i=TT({[KS]:FO,[hT]:WS});return VS(t,n,"/",void 0,i)},Qg=async(e,t)=>{const n=GS;let i;return i=TT({...bx(e),[KS]:UO,[hT]:WS}),VS(t,n,"/",void 0,i)},Jg=async(e,t)=>{const n=GS;let i;return i=TT({...Ex(e),[KS]:sC,[hT]:WS}),VS(t,n,"/",void 0,i)},Xg=async(e,t)=>{const n=GS;let i;return i=TT({...Sx(e),[KS]:aC,[hT]:WS}),VS(t,n,"/",void 0,i)},Zg=async(e,t)=>{const n=GS;let i;return i=TT({..._x(e),[KS]:lC,[hT]:WS}),VS(t,n,"/",void 0,i)},ey=async(e,t)=>{const n=GS;let i;return i=TT({...Ox(e),[KS]:uC,[hT]:WS}),VS(t,n,"/",void 0,i)},ty=async(e,t)=>{const n=GS;let i;return i=TT({...Cx(),[KS]:pC,[hT]:WS}),VS(t,n,"/",void 0,i)},ny=async(e,t)=>{const n=GS;let i;return i=TT({...kx(e),[KS]:dC,[hT]:WS}),VS(t,n,"/",void 0,i)},iy=async(e,t)=>{const n=GS;let i;return i=TT({...Tx(e),[KS]:mC,[hT]:WS}),VS(t,n,"/",void 0,i)},ry=async(e,t)=>{const n=GS,i=TT({[KS]:hC,[hT]:WS});return VS(t,n,"/",void 0,i)},oy=async(e,t)=>{const n=GS;let i;return i=TT({...Mx(e),[KS]:NC,[hT]:WS}),VS(t,n,"/",void 0,i)},sy=async(e,t)=>{const n=GS;let i;return i=TT({...jx(e),[KS]:DC,[hT]:WS}),VS(t,n,"/",void 0,i)},ay=async(e,t)=>{const n=GS;let i;return i=TT({...Ux(e),[KS]:ZC,[hT]:WS}),VS(t,n,"/",void 0,i)},cy=async(e,t)=>{const n=GS;let i;return i=TT({...Hx(e),[KS]:fk,[hT]:WS}),VS(t,n,"/",void 0,i)},ly=async(e,t)=>{const n=GS;let i;return i=TT({...qx(e),[KS]:gk,[hT]:WS}),VS(t,n,"/",void 0,i)},uy=async(e,t)=>{const n=GS;let i;return i=TT({...Vx(e),[KS]:vk,[hT]:WS}),VS(t,n,"/",void 0,i)},py=async(e,t)=>{const n=GS;let i;return i=TT({...Gx(e),[KS]:xk,[hT]:WS}),VS(t,n,"/",void 0,i)},dy=async(e,t)=>{const n=GS;let i;return i=TT({...Wx(e,t),[KS]:Mk,[hT]:WS}),VS(t,n,"/",void 0,i)},my=async(e,t)=>{const n=GS;let i;return i=TT({...Kx(e),[KS]:Dk,[hT]:WS}),VS(t,n,"/",void 0,i)},hy=async(e,t)=>{const n=GS;let i;return i=TT({...Yx(e),[KS]:dk,[hT]:WS}),VS(t,n,"/",void 0,i)},fy=async(e,t)=>{const n=GS;let i;return i=TT({...Qx(e),[KS]:Sk,[hT]:WS}),VS(t,n,"/",void 0,i)},gy=async(e,t)=>{const n=GS;let i;return i=TT({...Jx(e),[KS]:_k,[hT]:WS}),VS(t,n,"/",void 0,i)},yy=async(e,t)=>{const n=GS;let i;return i=TT({...Xx(e),[KS]:Ok,[hT]:WS}),VS(t,n,"/",void 0,i)},vy=async(e,t)=>{const n=GS;let i;return i=TT({...Zx(e),[KS]:Ck,[hT]:WS}),VS(t,n,"/",void 0,i)},by=async(e,t)=>{const n=GS;let i;return i=TT({...ew(e),[KS]:kk,[hT]:WS}),VS(t,n,"/",void 0,i)},xy=async(e,t)=>{const n=GS;let i;return i=TT({...tw(e),[KS]:jk,[hT]:WS}),VS(t,n,"/",void 0,i)},wy=async(e,t)=>{const n=GS;let i;return i=TT({...sw(e),[KS]:eT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ey=async(e,t)=>{const n=GS;let i;return i=TT({...cw(e),[KS]:sT,[hT]:WS}),VS(t,n,"/",void 0,i)},Sy=async(e,t)=>{const n=GS;let i;return i=TT({...lw(e),[KS]:aT,[hT]:WS}),VS(t,n,"/",void 0,i)},_y=async(e,t)=>{const n=GS;let i;return i=TT({...uw(e),[KS]:cT,[hT]:WS}),VS(t,n,"/",void 0,i)},Oy=async(e,t)=>{const n=GS;let i;return i=TT({...pw(e),[KS]:lT,[hT]:WS}),VS(t,n,"/",void 0,i)},Cy=async(e,t)=>{const n=GS;let i;return i=TT({...dw(e),[KS]:uT,[hT]:WS}),VS(t,n,"/",void 0,i)},ky=async(e,t)=>{const n=GS;let i;return i=TT({...mw(e),[KS]:pT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ty=async(e,t)=>{const n=GS;let i;return i=TT({...hw(e),[KS]:dT,[hT]:WS}),VS(t,n,"/",void 0,i)},Py=async(e,t)=>{const n=GS;let i;return i=TT({...fw(e),[KS]:mT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ay=async(e,t)=>{const n=GS;let i;return i=TT({...gw(e),[KS]:gT,[hT]:WS}),VS(t,n,"/",void 0,i)},Iy=async(e,t)=>{const n=GS;let i;return i=TT({...yw(e),[KS]:yT,[hT]:WS}),VS(t,n,"/",void 0,i)},Ry=async(e,t)=>{const n=GS;let i;return i=TT({...vw(e),[KS]:vT,[hT]:WS}),VS(t,n,"/",void 0,i)},My=async(e,t)=>{const n=GS;let i;return i=TT({...bw(e),[KS]:xT,[hT]:WS}),VS(t,n,"/",void 0,i)},jy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Ow(n.CloneReceiptRuleSetResult);return{$metadata:HS(e),...i}},$y=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Rw(n.CreateConfigurationSetResult);return{$metadata:HS(e),...i}},Ny=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Iw(n.CreateConfigurationSetEventDestinationResult);return{$metadata:HS(e),...i}},Dy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Mw(n.CreateConfigurationSetTrackingOptionsResult);return{$metadata:HS(e),...i}},Ly=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},zy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=jw(n.CreateReceiptFilterResult);return{$metadata:HS(e),...i}},Fy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=$w(n.CreateReceiptRuleResult);return{$metadata:HS(e),...i}},Uy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Nw(n.CreateReceiptRuleSetResult);return{$metadata:HS(e),...i}},By=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Dw(n.CreateTemplateResult);return{$metadata:HS(e),...i}},Hy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Hw(n.DeleteConfigurationSetResult);return{$metadata:HS(e),...i}},qy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Bw(n.DeleteConfigurationSetEventDestinationResult);return{$metadata:HS(e),...i}},Vy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=qw(n.DeleteConfigurationSetTrackingOptionsResult);return{$metadata:HS(e),...i}},Gy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Wy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Gw(n.DeleteIdentityResult);return{$metadata:HS(e),...i}},Ky=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Vw(n.DeleteIdentityPolicyResult);return{$metadata:HS(e),...i}},Yy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Ww(n.DeleteReceiptFilterResult);return{$metadata:HS(e),...i}},Qy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Kw(n.DeleteReceiptRuleResult);return{$metadata:HS(e),...i}},Jy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Yw(n.DeleteReceiptRuleSetResult);return{$metadata:HS(e),...i}},Xy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Qw(n.DeleteTemplateResult);return{$metadata:HS(e),...i}},Zy=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},ev=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Jw(n.DescribeActiveReceiptRuleSetResult);return{$metadata:HS(e),...i}},tv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Xw(n.DescribeConfigurationSetResult);return{$metadata:HS(e),...i}},nv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=Zw(n.DescribeReceiptRuleResult);return{$metadata:HS(e),...i}},iv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=eE(n.DescribeReceiptRuleSetResult);return{$metadata:HS(e),...i}},rv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=aE(n.GetAccountSendingEnabledResult);return{$metadata:HS(e),...i}},ov=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=cE(n.GetCustomVerificationEmailTemplateResult);return{$metadata:HS(e),...i}},sv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=lE(n.GetIdentityDkimAttributesResult);return{$metadata:HS(e),...i}},av=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=uE(n.GetIdentityMailFromDomainAttributesResult);return{$metadata:HS(e),...i}},cv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=pE(n.GetIdentityNotificationAttributesResult);return{$metadata:HS(e),...i}},lv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=dE(n.GetIdentityPoliciesResult);return{$metadata:HS(e),...i}},uv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=mE(n.GetIdentityVerificationAttributesResult);return{$metadata:HS(e),...i}},pv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=hE(n.GetSendQuotaResult);return{$metadata:HS(e),...i}},dv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=fE(n.GetSendStatisticsResult);return{$metadata:HS(e),...i}},mv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=gE(n.GetTemplateResult);return{$metadata:HS(e),...i}},hv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=RE(n.ListConfigurationSetsResult);return{$metadata:HS(e),...i}},fv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=ME(n.ListCustomVerificationEmailTemplatesResult);return{$metadata:HS(e),...i}},gv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=jE(n.ListIdentitiesResult);return{$metadata:HS(e),...i}},yv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=$E(n.ListIdentityPoliciesResult);return{$metadata:HS(e),...i}},vv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=NE(n.ListReceiptFiltersResult);return{$metadata:HS(e),...i}},bv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=DE(n.ListReceiptRuleSetsResult);return{$metadata:HS(e),...i}},xv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=LE(n.ListTemplatesResult);return{$metadata:HS(e),...i}},wv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=zE(n.ListVerifiedEmailAddressesResult);return{$metadata:HS(e),...i}},Ev=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=KE(n.PutConfigurationSetDeliveryOptionsResult);return{$metadata:HS(e),...i}},Sv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=YE(n.PutIdentityPolicyResult);return{$metadata:HS(e),...i}},_v=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=rS(n.ReorderReceiptRuleSetResult);return{$metadata:HS(e),...i}},Ov=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=lS(n.SendBounceResult);return{$metadata:HS(e),...i}},Cv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=uS(n.SendBulkTemplatedEmailResult);return{$metadata:HS(e),...i}},kv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=pS(n.SendCustomVerificationEmailResult);return{$metadata:HS(e),...i}},Tv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=mS(n.SendEmailResult);return{$metadata:HS(e),...i}},Pv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=hS(n.SendRawEmailResult);return{$metadata:HS(e),...i}},Av=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=fS(n.SendTemplatedEmailResult);return{$metadata:HS(e),...i}},Iv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=gS(n.SetActiveReceiptRuleSetResult);return{$metadata:HS(e),...i}},Rv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=yS(n.SetIdentityDkimEnabledResult);return{$metadata:HS(e),...i}},Mv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=vS(n.SetIdentityFeedbackForwardingEnabledResult);return{$metadata:HS(e),...i}},jv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=bS(n.SetIdentityHeadersInNotificationsEnabledResult);return{$metadata:HS(e),...i}},$v=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=xS(n.SetIdentityMailFromDomainResult);return{$metadata:HS(e),...i}},Nv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=wS(n.SetIdentityNotificationTopicResult);return{$metadata:HS(e),...i}},Dv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=ES(n.SetReceiptRulePositionResult);return{$metadata:HS(e),...i}},Lv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=PS(n.TestRenderTemplateResult);return{$metadata:HS(e),...i}},zv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Fv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=MS(n.UpdateConfigurationSetEventDestinationResult);return{$metadata:HS(e),...i}},Uv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Bv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Hv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=jS(n.UpdateConfigurationSetTrackingOptionsResult);return{$metadata:HS(e),...i}},qv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Vv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=$S(n.UpdateReceiptRuleResult);return{$metadata:HS(e),...i}},Gv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=NS(n.UpdateTemplateResult);return{$metadata:HS(e),...i}},Wv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=zS(n.VerifyDomainDkimResult);return{$metadata:HS(e),...i}},Kv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=FS(n.VerifyDomainIdentityResult);return{$metadata:HS(e),...i}},Yv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);await ve(e.body,t);return{$metadata:HS(e)}},Qv=async(e,t)=>{if(e.statusCode>=300)return Jv(e,t);const n=await ji(e.body,t);let i={};i=US(n.VerifyEmailIdentityResult);return{$metadata:HS(e),...i}},Jv=async(e,t)=>{const n={...e,body:await $i(e.body,t)},i=PT(e,n.body);switch(i){case"AlreadyExists":case"com.amazonaws.ses#AlreadyExistsException":throw await Zv(n);case"LimitExceeded":case"com.amazonaws.ses#LimitExceededException":throw await Eb(n);case"RuleSetDoesNotExist":case"com.amazonaws.ses#RuleSetDoesNotExistException":throw await Tb(n);case"ConfigurationSetAlreadyExists":case"com.amazonaws.ses#ConfigurationSetAlreadyExistsException":throw await tb(n);case"InvalidConfigurationSet":case"com.amazonaws.ses#InvalidConfigurationSetException":throw await pb(n);case"ConfigurationSetDoesNotExist":case"com.amazonaws.ses#ConfigurationSetDoesNotExistException":throw await nb(n);case"EventDestinationAlreadyExists":case"com.amazonaws.ses#EventDestinationAlreadyExistsException":throw await ab(n);case"InvalidCloudWatchDestination":case"com.amazonaws.ses#InvalidCloudWatchDestinationException":throw await ub(n);case"InvalidFirehoseDestination":case"com.amazonaws.ses#InvalidFirehoseDestinationException":throw await mb(n);case"InvalidSNSDestination":case"com.amazonaws.ses#InvalidSNSDestinationException":throw await vb(n);case"InvalidTrackingOptions":case"com.amazonaws.ses#InvalidTrackingOptionsException":throw await wb(n);case"TrackingOptionsAlreadyExistsException":case"com.amazonaws.ses#TrackingOptionsAlreadyExistsException":throw await Ab(n);case"CustomVerificationEmailInvalidContent":case"com.amazonaws.ses#CustomVerificationEmailInvalidContentException":throw await rb(n);case"CustomVerificationEmailTemplateAlreadyExists":case"com.amazonaws.ses#CustomVerificationEmailTemplateAlreadyExistsException":throw await ob(n);case"FromEmailAddressNotVerified":case"com.amazonaws.ses#FromEmailAddressNotVerifiedException":throw await lb(n);case"InvalidLambdaFunction":case"com.amazonaws.ses#InvalidLambdaFunctionException":throw await hb(n);case"InvalidS3Configuration":case"com.amazonaws.ses#InvalidS3ConfigurationException":throw await yb(n);case"InvalidSnsTopic":case"com.amazonaws.ses#InvalidSnsTopicException":throw await bb(n);case"RuleDoesNotExist":case"com.amazonaws.ses#RuleDoesNotExistException":throw await kb(n);case"InvalidTemplate":case"com.amazonaws.ses#InvalidTemplateException":throw await xb(n);case"EventDestinationDoesNotExist":case"com.amazonaws.ses#EventDestinationDoesNotExistException":throw await cb(n);case"TrackingOptionsDoesNotExistException":case"com.amazonaws.ses#TrackingOptionsDoesNotExistException":throw await Ib(n);case"CannotDelete":case"com.amazonaws.ses#CannotDeleteException":throw await eb(n);case"CustomVerificationEmailTemplateDoesNotExist":case"com.amazonaws.ses#CustomVerificationEmailTemplateDoesNotExistException":throw await sb(n);case"TemplateDoesNotExist":case"com.amazonaws.ses#TemplateDoesNotExistException":throw await Pb(n);case"InvalidDeliveryOptions":case"com.amazonaws.ses#InvalidDeliveryOptionsException":throw await db(n);case"InvalidPolicy":case"com.amazonaws.ses#InvalidPolicyException":throw await fb(n);case"MessageRejected":case"com.amazonaws.ses#MessageRejected":throw await _b(n);case"AccountSendingPausedException":case"com.amazonaws.ses#AccountSendingPausedException":throw await Xv(n);case"ConfigurationSetSendingPausedException":case"com.amazonaws.ses#ConfigurationSetSendingPausedException":throw await ib(n);case"MailFromDomainNotVerifiedException":case"com.amazonaws.ses#MailFromDomainNotVerifiedException":throw await Sb(n);case"ProductionAccessNotGranted":case"com.amazonaws.ses#ProductionAccessNotGrantedException":throw await Cb(n);case"InvalidRenderingParameter":case"com.amazonaws.ses#InvalidRenderingParameterException":throw await gb(n);case"MissingRenderingAttribute":case"com.amazonaws.ses#MissingRenderingAttributeException":throw await Ob(n);default:const t=n.body;return qS({output:e,parsedBody:t.Error,errorCode:i})}},Xv=async(e,t)=>{const n=e.body,i=ww(n.Error),r=new Df({$metadata:HS(e),...i});return Tn(r,n)},Zv=async(e,t)=>{const n=e.body,i=Ew(n.Error),r=new Lf({$metadata:HS(e),...i});return Tn(r,n)},eb=async(e,t)=>{const n=e.body,i=_w(n.Error),r=new zf({$metadata:HS(e),...i});return Tn(r,n)},tb=async(e,t)=>{const n=e.body,i=Tw(n.Error),r=new Bf({$metadata:HS(e),...i});return Tn(r,n)},nb=async(e,t)=>{const n=e.body,i=Pw(n.Error),r=new Hf({$metadata:HS(e),...i});return Tn(r,n)},ib=async(e,t)=>{const n=e.body,i=Aw(n.Error),r=new qf({$metadata:HS(e),...i});return Tn(r,n)},rb=async(e,t)=>{const n=e.body,i=Lw(n.Error),r=new Xf({$metadata:HS(e),...i});return Tn(r,n)},ob=async(e,t)=>{const n=e.body,i=zw(n.Error),r=new Zf({$metadata:HS(e),...i});return Tn(r,n)},sb=async(e,t)=>{const n=e.body,i=Fw(n.Error),r=new sg({$metadata:HS(e),...i});return Tn(r,n)},ab=async(e,t)=>{const n=e.body,i=nE(n.Error),r=new Gf({$metadata:HS(e),...i});return Tn(r,n)},cb=async(e,t)=>{const n=e.body,i=iE(n.Error),r=new ag({$metadata:HS(e),...i});return Tn(r,n)},lb=async(e,t)=>{const n=e.body,i=sE(n.Error),r=new eg({$metadata:HS(e),...i});return Tn(r,n)},ub=async(e,t)=>{const n=e.body,i=vE(n.Error),r=new Wf({$metadata:HS(e),...i});return Tn(r,n)},pb=async(e,t)=>{const n=e.body,i=bE(n.Error),r=new Vf({$metadata:HS(e),...i});return Tn(r,n)},db=async(e,t)=>{const n=e.body,i=xE(n.Error),r=new ug({$metadata:HS(e),...i});return Tn(r,n)},mb=async(e,t)=>{const n=e.body,i=wE(n.Error),r=new Kf({$metadata:HS(e),...i});return Tn(r,n)},hb=async(e,t)=>{const n=e.body,i=EE(n.Error),r=new tg({$metadata:HS(e),...i});return Tn(r,n)},fb=async(e,t)=>{const n=e.body,i=SE(n.Error),r=new pg({$metadata:HS(e),...i});return Tn(r,n)},gb=async(e,t)=>{const n=e.body,i=_E(n.Error),r=new dg({$metadata:HS(e),...i});return Tn(r,n)},yb=async(e,t)=>{const n=e.body,i=OE(n.Error),r=new ng({$metadata:HS(e),...i});return Tn(r,n)},vb=async(e,t)=>{const n=e.body,i=CE(n.Error),r=new Yf({$metadata:HS(e),...i});return Tn(r,n)},bb=async(e,t)=>{const n=e.body,i=kE(n.Error),r=new ig({$metadata:HS(e),...i});return Tn(r,n)},xb=async(e,t)=>{const n=e.body,i=TE(n.Error),r=new og({$metadata:HS(e),...i});return Tn(r,n)},wb=async(e,t)=>{const n=e.body,i=PE(n.Error),r=new Qf({$metadata:HS(e),...i});return Tn(r,n)},Eb=async(e,t)=>{const n=e.body,i=IE(n.Error),r=new Ff({$metadata:HS(e),...i});return Tn(r,n)},Sb=async(e,t)=>{const n=e.body,i=UE(n.Error),r=new mg({$metadata:HS(e),...i});return Tn(r,n)},_b=async(e,t)=>{const n=e.body,i=BE(n.Error),r=new hg({$metadata:HS(e),...i});return Tn(r,n)},Ob=async(e,t)=>{const n=e.body,i=HE(n.Error),r=new fg({$metadata:HS(e),...i});return Tn(r,n)},Cb=async(e,t)=>{const n=e.body,i=WE(n.Error),r=new gg({$metadata:HS(e),...i});return Tn(r,n)},kb=async(e,t)=>{const n=e.body,i=sS(n.Error),r=new rg({$metadata:HS(e),...i});return Tn(r,n)},Tb=async(e,t)=>{const n=e.body,i=aS(n.Error),r=new Uf({$metadata:HS(e),...i});return Tn(r,n)},Pb=async(e,t)=>{const n=e.body,i=kS(n.Error),r=new lg({$metadata:HS(e),...i});return Tn(r,n)},Ab=async(e,t)=>{const n=e.body,i=IS(n.Error),r=new Jf({$metadata:HS(e),...i});return Tn(r,n)},Ib=async(e,t)=>{const n=e.body,i=RS(n.Error),r=new cg({$metadata:HS(e),...i});return Tn(r,n)},Rb=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},Mb=(e,t)=>{const n={};if(null!=e[UC]&&(n[UC]=e[UC]),null!=e[BC]&&(n[BC]=e[BC]),null!=e[a_]&&(n[a_]=e[a_]),null!=e[HC]){const t=zx(e[HC]);Object.entries(t).forEach((([e,t])=>{n[`RecipientDsnFields.${e}`]=t}))}return n},jb=(e,t)=>{const n={};if(null!=e[j_]){const t=cx(e[j_]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[nk]){const t=Ix(e[nk]);0===e[nk]?.length&&(n.ReplacementTags=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplacementTags.${e}`]=t}))}return null!=e[rk]&&(n[rk]=e[rk]),n},$b=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[jC]&&(n[jC]=e[jC]),n},Nb=(e,t)=>{const n={};return null!=e[Y_]&&(n[Y_]=e[Y_]),null!=e[lO]&&(n[lO]=e[lO]),null!=e[V_]&&(n[V_]=e[V_]),n},Db=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=Nb(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},Lb=(e,t)=>{const n={};return null!=e[pO]&&(n[pO]=e[pO]),null!=e[p_]&&(n[p_]=e[p_]),n},zb=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[gO]){const t=lx(e[gO]);Object.entries(t).forEach((([e,t])=>{n[`EventDestination.${e}`]=t}))}return n},Fb=(e,t)=>{const n={};if(null!=e[E_]){const t=(e=>{const t={};return null!=e[kC]&&(t[kC]=e[kC]),t})(e[E_]);Object.entries(t).forEach((([e,t])=>{n[`ConfigurationSet.${e}`]=t}))}return n},Ub=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[Jk]){const t=aw(e[Jk]);Object.entries(t).forEach((([e,t])=>{n[`TrackingOptions.${e}`]=t}))}return n},Bb=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[kO]&&(n[kO]=e[kO]),null!=e[tT]&&(n[tT]=e[tT]),null!=e[Wk]&&(n[Wk]=e[Wk]),null!=e[$k]&&(n[$k]=e[$k]),null!=e[AO]&&(n[AO]=e[AO]),n},Hb=(e,t)=>{const n={};if(null!=e[SO]){const t=Nx(e[SO]);Object.entries(t).forEach((([e,t])=>{n[`Filter.${e}`]=t}))}return n},qb=(e,t)=>{const n={};if(null!=e[tk]&&(n[tk]=e[tk]),null!=e[XS]&&(n[XS]=e[XS]),null!=e[ck]){const t=Lx(e[ck]);Object.entries(t).forEach((([e,t])=>{n[`Rule.${e}`]=t}))}return n},Vb=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},Gb=(e,t)=>{const n={};if(null!=e[iT]){const t=ow(e[iT]);Object.entries(t).forEach((([e,t])=>{n[`Template.${e}`]=t}))}return n},Wb=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),null!=e[yO]&&(n[yO]=e[yO]),n},Kb=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),n},Yb=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),n},Qb=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},Jb=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[LC]&&(n[LC]=e[LC]),n},Xb=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),n},Zb=(e,t)=>{const n={};return null!=e[TO]&&(n[TO]=e[TO]),n},ex=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[KC]&&(n[KC]=e[KC]),n},tx=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},nx=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},ix=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),n},rx=(e,t)=>({}),ox=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[S_]){const t=(e=>{const t={};let n=1;for(const i of e)null!==i&&(t[`member.${n}`]=i,n++);return t})(e[S_]);0===e[S_]?.length&&(n.ConfigurationSetAttributeNames=[]),Object.entries(t).forEach((([e,t])=>{n[`ConfigurationSetAttributeNames.${e}`]=t}))}return n},sx=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[KC]&&(n[KC]=e[KC]),n},ax=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},cx=(e,t)=>{const n={};if(null!=e[Gk]){const t=Rb(e[Gk]);0===e[Gk]?.length&&(n.ToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ToAddresses.${e}`]=t}))}if(null!=e[d_]){const t=Rb(e[d_]);0===e[d_]?.length&&(n.CcAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`CcAddresses.${e}`]=t}))}if(null!=e[e_]){const t=Rb(e[e_]);0===e[e_]?.length&&(n.BccAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`BccAddresses.${e}`]=t}))}return n},lx=(e,t)=>{const n={};if(null!=e[kC]&&(n[kC]=e[kC]),null!=e[hO]&&(n[hO]=e[hO]),null!=e[yC]){const t=ux(e[yC]);0===e[yC]?.length&&(n.MatchingEventTypes=[]),Object.entries(t).forEach((([e,t])=>{n[`MatchingEventTypes.${e}`]=t}))}if(null!=e[nC]){const t=wx(e[nC]);Object.entries(t).forEach((([e,t])=>{n[`KinesisFirehoseDestination.${e}`]=t}))}if(null!=e[I_]){const t=(e=>{const t={};if(null!=e[L_]){const n=Db(e[L_]);0===e[L_]?.length&&(t.DimensionConfigurations=[]),Object.entries(n).forEach((([e,n])=>{t[`DimensionConfigurations.${e}`]=n}))}return t})(e[I_]);Object.entries(t).forEach((([e,t])=>{n[`CloudWatchDestination.${e}`]=t}))}if(null!=e[Ak]){const t=iw(e[Ak]);Object.entries(t).forEach((([e,t])=>{n[`SNSDestination.${e}`]=t}))}return n},ux=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},px=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=e[kC]),null!=e[ST]&&(n[ST]=e[ST]),n},dx=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=px(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},mx=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},hx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},fx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},gx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},yx=(e,t)=>{const n={};if(null!=e[YO]&&(n[YO]=e[YO]),null!=e[zC]){const t=Rx(e[zC]);0===e[zC]?.length&&(n.PolicyNames=[]),Object.entries(t).forEach((([e,t])=>{n[`PolicyNames.${e}`]=t}))}return n},vx=(e,t)=>{const n={};if(null!=e[tC]){const t=xx(e[tC]);0===e[tC]?.length&&(n.Identities=[]),Object.entries(t).forEach((([e,t])=>{n[`Identities.${e}`]=t}))}return n},bx=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),n},xx=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},wx=(e,t)=>{const n={};return null!=e[QO]&&(n[QO]=e[QO]),null!=e[nO]&&(n[nO]=e[nO]),n},Ex=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),null!=e[EC]&&(n[EC]=e[EC]),n},Sx=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),null!=e[_C]&&(n[_C]=e[_C]),n},_x=(e,t)=>{const n={};return null!=e[eC]&&(n[eC]=e[eC]),null!=e[PC]&&(n[PC]=e[PC]),null!=e[EC]&&(n[EC]=e[EC]),n},Ox=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),n},Cx=(e,t)=>({}),kx=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),n},Tx=(e,t)=>{const n={};return null!=e[PC]&&(n[PC]=e[PC]),null!=e[EC]&&(n[EC]=e[EC]),n},Px=(e,t)=>{const n={};if(null!=e[Uk]){const t=Lb(e[Uk]);Object.entries(t).forEach((([e,t])=>{n[`Subject.${e}`]=t}))}if(null!=e[ZS]){const t=(e=>{const t={};if(null!=e[Bk]){const n=Lb(e[Bk]);Object.entries(n).forEach((([e,n])=>{t[`Text.${e}`]=n}))}if(null!=e[BO]){const n=Lb(e[BO]);Object.entries(n).forEach((([e,n])=>{t[`Html.${e}`]=n}))}return t})(e[ZS]);Object.entries(t).forEach((([e,t])=>{n[`Body.${e}`]=t}))}return n},Ax=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=e[kC]),null!=e[ST]&&(n[ST]=e[ST]),n},Ix=(e,t)=>{const n={};let i=1;for(const t of e){if(null===t)continue;const e=Ax(t);Object.entries(e).forEach((([e,t])=>{n[`member.${i}.${e}`]=t})),i++}return n},Rx=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},Mx=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[Q_]){const t=(e=>{const t={};return null!=e[Xk]&&(t[Xk]=e[Xk]),t})(e[Q_]);Object.entries(t).forEach((([e,t])=>{n[`DeliveryOptions.${e}`]=t}))}return n},jx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[LC]&&(n[LC]=e[LC]),null!=e[$C]&&(n[$C]=e[$C]),n},$x=(e,t)=>{const n={};if(null!=e[pk]){const t=Bx(e[pk]);Object.entries(t).forEach((([e,t])=>{n[`S3Action.${e}`]=t}))}if(null!=e[t_]){const t=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=e[Hk]),null!=e[Rk]&&(t[Rk]=e[Rk]),null!=e[yk]&&(t[yk]=e[yk]),null!=e[fC]&&(t[fC]=e[fC]),null!=e[uk]&&(t[uk]=e[uk]),t})(e[t_]);Object.entries(t).forEach((([e,t])=>{n[`BounceAction.${e}`]=t}))}if(null!=e[_T]){const t=xw(e[_T]);Object.entries(t).forEach((([e,t])=>{n[`WorkmailAction.${e}`]=t}))}if(null!=e[rC]){const t=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=e[Hk]),null!=e[_O]&&(t[_O]=e[_O]),null!=e[ZO]&&(t[ZO]=e[ZO]),t})(e[rC]);Object.entries(t).forEach((([e,t])=>{n[`LambdaAction.${e}`]=t}))}if(null!=e[hk]){const t=rw(e[hk]);Object.entries(t).forEach((([e,t])=>{n[`StopAction.${e}`]=t}))}if(null!=e[QS]){const t=(e=>{const t={};return null!=e[GO]&&(t[GO]=e[GO]),null!=e[KO]&&(t[KO]=e[KO]),t})(e[QS]);Object.entries(t).forEach((([e,t])=>{n[`AddHeaderAction.${e}`]=t}))}if(null!=e[Pk]){const t=nw(e[Pk]);Object.entries(t).forEach((([e,t])=>{n[`SNSAction.${e}`]=t}))}return n},Nx=(e,t)=>{const n={};if(null!=e[kC]&&(n[kC]=e[kC]),null!=e[JO]){const t=Dx(e[JO]);Object.entries(t).forEach((([e,t])=>{n[`IpFilter.${e}`]=t}))}return n},Dx=(e,t)=>{const n={};return null!=e[$C]&&(n[$C]=e[$C]),null!=e[R_]&&(n[R_]=e[R_]),n},Lx=(e,t)=>{const n={};if(null!=e[kC]&&(n[kC]=e[kC]),null!=e[hO]&&(n[hO]=e[hO]),null!=e[Xk]&&(n[Xk]=e[Xk]),null!=e[sk]){const t=Fx(e[sk]);0===e[sk]?.length&&(n.Recipients=[]),Object.entries(t).forEach((([e,t])=>{n[`Recipients.${e}`]=t}))}if(null!=e[JS]){const t=(e=>{const t={};let n=1;for(const i of e){if(null===i)continue;const e=$x(i);Object.entries(e).forEach((([e,i])=>{t[`member.${n}.${e}`]=i})),n++}return t})(e[JS]);0===e[JS]?.length&&(n.Actions=[]),Object.entries(t).forEach((([e,t])=>{n[`Actions.${e}`]=t}))}return null!=e[wk]&&(n[wk]=e[wk]),n},zx=(e,t)=>{const n={};if(null!=e[PO]&&(n[PO]=e[PO]),null!=e[KS]&&(n[KS]=e[KS]),null!=e[WC]&&(n[WC]=e[WC]),null!=e[Fk]&&(n[Fk]=e[Fk]),null!=e[q_]&&(n[q_]=e[q_]),null!=e[oC]&&(n[oC]=Yn(e[oC])),null!=e[bO]){const t=dx(e[bO]);0===e[bO]?.length&&(n.ExtensionFields=[]),Object.entries(t).forEach((([e,t])=>{n[`ExtensionFields.${e}`]=t}))}return n},Fx=(e,t)=>{const n={};let i=1;for(const t of e)null!==t&&(n[`member.${i}`]=t,i++);return n},Ux=(e,t)=>{const n={};if(null!=e[tk]&&(n[tk]=e[tk]),null!=e[YC]){const t=(e=>{const t={};let n=1;for(const i of e)null!==i&&(t[`member.${n}`]=i,n++);return t})(e[YC]);0===e[YC]?.length&&(n.RuleNames=[]),Object.entries(t).forEach((([e,t])=>{n[`RuleNames.${e}`]=t}))}return n},Bx=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=e[Hk]),null!=e[n_]&&(n[n_]=e[n_]),null!=e[RC]&&(n[RC]=e[RC]),null!=e[iC]&&(n[iC]=e[iC]),null!=e[XO]&&(n[XO]=e[XO]),n},Hx=(e,t)=>{const n={};if(null!=e[MC]&&(n[MC]=e[MC]),null!=e[o_]&&(n[o_]=e[o_]),null!=e[EO]&&(n[EO]=e[EO]),null!=e[gC]){const t=(e=>{const t={};if(null!=e[qC]&&(t[qC]=e[qC]),null!=e[YS]&&(t[YS]=Yn(e[YS])),null!=e[bO]){const n=dx(e[bO]);0===e[bO]?.length&&(t.ExtensionFields=[]),Object.entries(n).forEach((([e,n])=>{t[`ExtensionFields.${e}`]=n}))}return t})(e[gC]);Object.entries(t).forEach((([e,t])=>{n[`MessageDsn.${e}`]=t}))}if(null!=e[r_]){const t=(e=>{const t={};let n=1;for(const i of e){if(null===i)continue;const e=Mb(i);Object.entries(e).forEach((([e,i])=>{t[`member.${n}.${e}`]=i})),n++}return t})(e[r_]);0===e[r_]?.length&&(n.BouncedRecipientInfoList=[]),Object.entries(t).forEach((([e,t])=>{n[`BouncedRecipientInfoList.${e}`]=t}))}return null!=e[s_]&&(n[s_]=e[s_]),n},qx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[ik]){const t=Rb(e[ik]);0===e[ik]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[JC]&&(n[JC]=e[JC]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[__]&&(n[__]=e[__]),null!=e[oO]){const t=Ix(e[oO]);0===e[oO]?.length&&(n.DefaultTags=[]),Object.entries(t).forEach((([e,t])=>{n[`DefaultTags.${e}`]=t}))}if(null!=e[iT]&&(n[iT]=e[iT]),null!=e[Vk]&&(n[Vk]=e[Vk]),null!=e[rO]&&(n[rO]=e[rO]),null!=e[dO]){const t=(e=>{const t={};let n=1;for(const i of e){if(null===i)continue;const e=jb(i);Object.entries(e).forEach((([e,i])=>{t[`member.${n}.${e}`]=i})),n++}return t})(e[dO]);0===e[dO]?.length&&(n.Destinations=[]),Object.entries(t).forEach((([e,t])=>{n[`Destinations.${e}`]=t}))}return n},Vx=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[__]&&(n[__]=e[__]),n},Gx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[j_]){const t=cx(e[j_]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[fC]){const t=Px(e[fC]);Object.entries(t).forEach((([e,t])=>{n[`Message.${e}`]=t}))}if(null!=e[ik]){const t=Rb(e[ik]);0===e[ik]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[JC]&&(n[JC]=e[JC]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[nT]){const t=Ix(e[nT]);0===e[nT]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[__]&&(n[__]=e[__]),n},Wx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[dO]){const t=Rb(e[dO]);0===e[dO]?.length&&(n.Destinations=[]),Object.entries(t).forEach((([e,t])=>{n[`Destinations.${e}`]=t}))}if(null!=e[GC]){const i=((e,t)=>{const n={};return null!=e[pO]&&(n[pO]=t.base64Encoder(e[pO])),n})(e[GC],t);Object.entries(i).forEach((([e,t])=>{n[`RawMessage.${e}`]=t}))}if(null!=e[OO]&&(n[OO]=e[OO]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[nT]){const t=Ix(e[nT]);0===e[nT]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[__]&&(n[__]=e[__]),n},Kx=(e,t)=>{const n={};if(null!=e[zk]&&(n[zk]=e[zk]),null!=e[j_]){const t=cx(e[j_]);Object.entries(t).forEach((([e,t])=>{n[`Destination.${e}`]=t}))}if(null!=e[ik]){const t=Rb(e[ik]);0===e[ik]?.length&&(n.ReplyToAddresses=[]),Object.entries(t).forEach((([e,t])=>{n[`ReplyToAddresses.${e}`]=t}))}if(null!=e[JC]&&(n[JC]=e[JC]),null!=e[mk]&&(n[mk]=e[mk]),null!=e[XC]&&(n[XC]=e[XC]),null!=e[nT]){const t=Ix(e[nT]);0===e[nT]?.length&&(n.Tags=[]),Object.entries(t).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}return null!=e[__]&&(n[__]=e[__]),null!=e[iT]&&(n[iT]=e[iT]),null!=e[Vk]&&(n[Vk]=e[Vk]),null!=e[Kk]&&(n[Kk]=e[Kk]),n},Yx=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),n},Qx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[G_]&&(n[G_]=e[G_]),n},Jx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[CO]&&(n[CO]=e[CO]),n},Xx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[AC]&&(n[AC]=e[AC]),null!=e[hO]&&(n[hO]=e[hO]),n},Zx=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[vC]&&(n[vC]=e[vC]),null!=e[i_]&&(n[i_]=e[i_]),n},ew=(e,t)=>{const n={};return null!=e[YO]&&(n[YO]=e[YO]),null!=e[AC]&&(n[AC]=e[AC]),null!=e[Nk]&&(n[Nk]=e[Nk]),n},tw=(e,t)=>{const n={};return null!=e[tk]&&(n[tk]=e[tk]),null!=e[KC]&&(n[KC]=e[KC]),null!=e[XS]&&(n[XS]=e[XS]),n},nw=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=e[Hk]),null!=e[xO]&&(n[xO]=e[xO]),n},iw=(e,t)=>{const n={};return null!=e[qk]&&(n[qk]=e[qk]),n},rw=(e,t)=>{const n={};return null!=e[Lk]&&(n[Lk]=e[Lk]),null!=e[Hk]&&(n[Hk]=e[Hk]),n},ow=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[Ik]&&(n[Ik]=e[Ik]),null!=e[Zk]&&(n[Zk]=e[Zk]),null!=e[WO]&&(n[WO]=e[WO]),n},sw=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[Kk]&&(n[Kk]=e[Kk]),n},aw=(e,t)=>{const n={};return null!=e[y_]&&(n[y_]=e[y_]),n},cw=(e,t)=>{const n={};return null!=e[hO]&&(n[hO]=e[hO]),n},lw=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[gO]){const t=lx(e[gO]);Object.entries(t).forEach((([e,t])=>{n[`EventDestination.${e}`]=t}))}return n},uw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),null!=e[hO]&&(n[hO]=e[hO]),n},pw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=e[__]),null!=e[hO]&&(n[hO]=e[hO]),n},dw=(e,t)=>{const n={};if(null!=e[__]&&(n[__]=e[__]),null!=e[Jk]){const t=aw(e[Jk]);Object.entries(t).forEach((([e,t])=>{n[`TrackingOptions.${e}`]=t}))}return n},mw=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=e[Qk]),null!=e[kO]&&(n[kO]=e[kO]),null!=e[tT]&&(n[tT]=e[tT]),null!=e[Wk]&&(n[Wk]=e[Wk]),null!=e[$k]&&(n[$k]=e[$k]),null!=e[AO]&&(n[AO]=e[AO]),n},hw=(e,t)=>{const n={};if(null!=e[tk]&&(n[tk]=e[tk]),null!=e[ck]){const t=Lx(e[ck]);Object.entries(t).forEach((([e,t])=>{n[`Rule.${e}`]=t}))}return n},fw=(e,t)=>{const n={};if(null!=e[iT]){const t=ow(e[iT]);Object.entries(t).forEach((([e,t])=>{n[`Template.${e}`]=t}))}return n},gw=(e,t)=>{const n={};return null!=e[mO]&&(n[mO]=e[mO]),n},yw=(e,t)=>{const n={};return null!=e[mO]&&(n[mO]=e[mO]),n},vw=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),n},bw=(e,t)=>{const n={};return null!=e[fO]&&(n[fO]=e[fO]),n},xw=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=e[Hk]),null!=e[IC]&&(n[IC]=e[IC]),n},ww=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},Ew=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Sw=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Fk]&&(t[Fk]=cn(e[Fk])),null!=e[wO]&&(t[wO]=cn(e[wO])),null!=e[SC]&&(t[SC]=cn(e[SC])),t})(e))),_w=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Ow=(e,t)=>({}),Cw=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Y_]&&(t[Y_]=cn(e[Y_])),null!=e[lO]&&(t[lO]=cn(e[lO])),null!=e[V_]&&(t[V_]=cn(e[V_])),t})(e))),kw=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),n},Tw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Pw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Aw=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Iw=(e,t)=>({}),Rw=(e,t)=>({}),Mw=(e,t)=>({}),jw=(e,t)=>({}),$w=(e,t)=>({}),Nw=(e,t)=>({}),Dw=(e,t)=>({}),Lw=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},zw=(e,t)=>{const n={};return null!=e[A_]&&(n[A_]=cn(e[A_])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Fw=(e,t)=>{const n={};return null!=e[A_]&&(n[A_]=cn(e[A_])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},Uw=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Qk]&&(t[Qk]=cn(e[Qk])),null!=e[kO]&&(t[kO]=cn(e[kO])),null!=e[tT]&&(t[tT]=cn(e[tT])),null!=e[$k]&&(t[$k]=cn(e[$k])),null!=e[AO]&&(t[AO]=cn(e[AO])),t})(e))),Bw=(e,t)=>({}),Hw=(e,t)=>({}),qw=(e,t)=>({}),Vw=(e,t)=>({}),Gw=(e,t)=>({}),Ww=(e,t)=>({}),Kw=(e,t)=>({}),Yw=(e,t)=>({}),Qw=(e,t)=>({}),Jw=(e,t)=>{const n={};return null!=e[CC]&&(n[CC]=eS(e[CC])),""===e.Rules?n[lk]=[]:null!=e[lk]&&null!=e[lk][kT]&&(n[lk]=nS(Ln(e[lk][kT]))),n},Xw=(e,t)=>{const n={};return null!=e[E_]&&(n[E_]=kw(e[E_])),""===e.EventDestinations?n[vO]=[]:null!=e[vO]&&null!=e[vO][kT]&&(n[vO]=rE(Ln(e[vO][kT]))),null!=e[Jk]&&(n[Jk]=AS(e[Jk])),null!=e[Q_]&&(n[Q_]=(e=>{const t={};return null!=e[Xk]&&(t[Xk]=cn(e[Xk])),t})(e[Q_])),null!=e[QC]&&(n[QC]=oS(e[QC])),n},Zw=(e,t)=>{const n={};return null!=e[ck]&&(n[ck]=ZE(e[ck])),n},eE=(e,t)=>{const n={};return null!=e[CC]&&(n[CC]=eS(e[CC])),""===e.Rules?n[lk]=[]:null!=e[lk]&&null!=e[lk][kT]&&(n[lk]=nS(Ln(e[lk][kT]))),n},tE=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[hO]&&(n[hO]=Jt(e[hO])),""===e.MatchingEventTypes?n[yC]=[]:null!=e[yC]&&null!=e[yC][kT]&&(n[yC]=oE(Ln(e[yC][kT]))),null!=e[nC]&&(n[nC]=AE(e[nC])),null!=e[I_]&&(n[I_]=(e=>{const t={};return""===e.DimensionConfigurations?t[L_]=[]:null!=e[L_]&&null!=e[L_][kT]&&(t[L_]=Cw(Ln(e[L_][kT]))),t})(e[I_])),null!=e[Ak]&&(n[Ak]=_S(e[Ak])),n},nE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},iE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},rE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>tE(e))),oE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),sE=(e,t)=>{const n={};return null!=e[kO]&&(n[kO]=cn(e[kO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},aE=(e,t)=>{const n={};return null!=e[hO]&&(n[hO]=Jt(e[hO])),n},cE=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[kO]&&(n[kO]=cn(e[kO])),null!=e[tT]&&(n[tT]=cn(e[tT])),null!=e[Wk]&&(n[Wk]=cn(e[Wk])),null!=e[$k]&&(n[$k]=cn(e[$k])),null!=e[AO]&&(n[AO]=cn(e[AO])),n},lE=(e,t)=>{const n={};return""===e.DkimAttributes?n[$_]={}:null!=e[$_]&&null!=e[$_][OT]&&(n[$_]=(e=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=yE(t.value)),e)),{}))(Ln(e[$_][OT]))),n},uE=(e,t)=>{const n={};return""===e.MailFromDomainAttributes?n[bC]={}:null!=e[bC]&&null!=e[bC][OT]&&(n[bC]=FE(Ln(e[bC][OT]))),n},pE=(e,t)=>{const n={};return""===e.NotificationAttributes?n[TC]={}:null!=e[TC]&&null!=e[TC][OT]&&(n[TC]=qE(Ln(e[TC][OT]))),n},dE=(e,t)=>{const n={};return""===e.Policies?n[FC]={}:null!=e[FC]&&null!=e[FC][OT]&&(n[FC]=VE(Ln(e[FC][OT]))),n},mE=(e,t)=>{const n={};return""===e.VerificationAttributes?n[fT]={}:null!=e[fT]&&null!=e[fT][OT]&&(n[fT]=DS(Ln(e[fT][OT]))),n},hE=(e,t)=>{const n={};return null!=e[wC]&&(n[wC]=un(e[wC])),null!=e[OC]&&(n[OC]=un(e[OC])),null!=e[Tk]&&(n[Tk]=un(e[Tk])),n},fE=(e,t)=>{const n={};return""===e.SendDataPoints?n[bk]=[]:null!=e[bk]&&null!=e[bk][kT]&&(n[bk]=dS(Ln(e[bk][kT]))),n},gE=(e,t)=>{const n={};return null!=e[iT]&&(n[iT]=CS(e[iT])),n},yE=(e,t)=>{const n={};return null!=e[G_]&&(n[G_]=Jt(e[G_])),null!=e[uO]&&(n[uO]=cn(e[uO])),""===e.DkimTokens?n[aO]=[]:null!=e[aO]&&null!=e[aO][kT]&&(n[aO]=LS(Ln(e[aO][kT]))),n},vE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},bE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},xE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},wE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},EE=(e,t)=>{const n={};return null!=e[_O]&&(n[_O]=cn(e[_O])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},SE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},_E=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},OE=(e,t)=>{const n={};return null!=e[u_]&&(n[u_]=cn(e[u_])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},CE=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[yO]&&(n[yO]=cn(e[yO])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},kE=(e,t)=>{const n={};return null!=e[oT]&&(n[oT]=cn(e[oT])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},TE=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},PE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},AE=(e,t)=>{const n={};return null!=e[QO]&&(n[QO]=cn(e[QO])),null!=e[nO]&&(n[nO]=cn(e[nO])),n},IE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},RE=(e,t)=>{const n={};return""===e.ConfigurationSets?n[O_]=[]:null!=e[O_]&&null!=e[O_][kT]&&(n[O_]=(e=>(e||[]).filter((e=>null!=e)).map((e=>kw(e))))(Ln(e[O_][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},ME=(e,t)=>{const n={};return""===e.CustomVerificationEmailTemplates?n[P_]=[]:null!=e[P_]&&null!=e[P_][kT]&&(n[P_]=Uw(Ln(e[P_][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},jE=(e,t)=>{const n={};return""===e.Identities?n[tC]=[]:null!=e[tC]&&null!=e[tC][kT]&&(n[tC]=(e=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))))(Ln(e[tC][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},$E=(e,t)=>{const n={};return""===e.PolicyNames?n[zC]=[]:null!=e[zC]&&null!=e[zC][kT]&&(n[zC]=GE(Ln(e[zC][kT]))),n},NE=(e,t)=>{const n={};return""===e.Filters?n[IO]=[]:null!=e[IO]&&null!=e[IO][kT]&&(n[IO]=JE(Ln(e[IO][kT]))),n},DE=(e,t)=>{const n={};return""===e.RuleSets?n[ek]=[]:null!=e[ek]&&null!=e[ek][kT]&&(n[ek]=tS(Ln(e[ek][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},LE=(e,t)=>{const n={};return""===e.TemplatesMetadata?n[Yk]=[]:null!=e[Yk]&&null!=e[Yk][kT]&&(n[Yk]=TS(Ln(e[Yk][kT]))),null!=e[PC]&&(n[PC]=cn(e[PC])),n},zE=(e,t)=>{const n={};return""===e.VerifiedEmailAddresses?n[bT]=[]:null!=e[bT]&&null!=e[bT][kT]&&(n[bT]=(e=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))))(Ln(e[bT][kT]))),n},FE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[vC]&&(t[vC]=cn(e[vC])),null!=e[xC]&&(t[xC]=cn(e[xC])),null!=e[i_]&&(t[i_]=cn(e[i_])),t})(t.value)),e)),{}),UE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},BE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},HE=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},qE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[c_]&&(t[c_]=cn(e[c_])),null!=e[k_]&&(t[k_]=cn(e[k_])),null!=e[sO]&&(t[sO]=cn(e[sO])),null!=e[CO]&&(t[CO]=Jt(e[CO])),null!=e[HO]&&(t[HO]=Jt(e[HO])),null!=e[qO]&&(t[qO]=Jt(e[qO])),null!=e[VO]&&(t[VO]=Jt(e[VO])),t})(t.value)),e)),{}),VE=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=cn(t.value)),e)),{}),GE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),WE=(e,t)=>{const n={};return null!=e[CT]&&(n[CT]=cn(e[CT])),n},KE=(e,t)=>({}),YE=(e,t)=>({}),QE=(e,t)=>{const n={};return null!=e[pk]&&(n[pk]=cS(e[pk])),null!=e[t_]&&(n[t_]=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=cn(e[Hk])),null!=e[Rk]&&(t[Rk]=cn(e[Rk])),null!=e[yk]&&(t[yk]=cn(e[yk])),null!=e[fC]&&(t[fC]=cn(e[fC])),null!=e[uk]&&(t[uk]=cn(e[uk])),t})(e[t_])),null!=e[_T]&&(n[_T]=BS(e[_T])),null!=e[rC]&&(n[rC]=(e=>{const t={};return null!=e[Hk]&&(t[Hk]=cn(e[Hk])),null!=e[_O]&&(t[_O]=cn(e[_O])),null!=e[ZO]&&(t[ZO]=cn(e[ZO])),t})(e[rC])),null!=e[hk]&&(n[hk]=OS(e[hk])),null!=e[QS]&&(n[QS]=(e=>{const t={};return null!=e[GO]&&(t[GO]=cn(e[GO])),null!=e[KO]&&(t[KO]=cn(e[KO])),t})(e[QS])),null!=e[Pk]&&(n[Pk]=SS(e[Pk])),n},JE=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[kC]&&(t[kC]=cn(e[kC])),null!=e[JO]&&(t[JO]=XE(e[JO])),t})(e))),XE=(e,t)=>{const n={};return null!=e[$C]&&(n[$C]=cn(e[$C])),null!=e[R_]&&(n[R_]=cn(e[R_])),n},ZE=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[hO]&&(n[hO]=Jt(e[hO])),null!=e[Xk]&&(n[Xk]=cn(e[Xk])),""===e.Recipients?n[sk]=[]:null!=e[sk]&&null!=e[sk][kT]&&(n[sk]=iS(Ln(e[sk][kT]))),""===e.Actions?n[JS]=[]:null!=e[JS]&&null!=e[JS][kT]&&(n[JS]=(e=>(e||[]).filter((e=>null!=e)).map((e=>QE(e))))(Ln(e[JS][kT]))),null!=e[wk]&&(n[wk]=Jt(e[wk])),n},eS=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[T_]&&(n[T_]=an(vn(e[T_]))),n},tS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>eS(e))),nS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ZE(e))),iS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),rS=(e,t)=>({}),oS=(e,t)=>{const n={};return null!=e[Ek]&&(n[Ek]=Jt(e[Ek])),null!=e[VC]&&(n[VC]=Jt(e[VC])),null!=e[cC]&&(n[cC]=an(vn(e[cC]))),n},sS=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},aS=(e,t)=>{const n={};return null!=e[kC]&&(n[kC]=cn(e[kC])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},cS=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=cn(e[Hk])),null!=e[n_]&&(n[n_]=cn(e[n_])),null!=e[RC]&&(n[RC]=cn(e[RC])),null!=e[iC]&&(n[iC]=cn(e[iC])),null!=e[XO]&&(n[XO]=cn(e[XO])),n},lS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},uS=(e,t)=>{const n={};return""===e.Status?n[Fk]=[]:null!=e[Fk]&&null!=e[Fk][kT]&&(n[Fk]=Sw(Ln(e[Fk][kT]))),n},pS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},dS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[rT]&&(t[rT]=an(vn(e[rT]))),null!=e[D_]&&(t[D_]=mn(e[D_])),null!=e[l_]&&(t[l_]=mn(e[l_])),null!=e[M_]&&(t[M_]=mn(e[M_])),null!=e[ak]&&(t[ak]=mn(e[ak])),t})(e))),mS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},hS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},fS=(e,t)=>{const n={};return null!=e[SC]&&(n[SC]=cn(e[SC])),n},gS=(e,t)=>({}),yS=(e,t)=>({}),vS=(e,t)=>({}),bS=(e,t)=>({}),xS=(e,t)=>({}),wS=(e,t)=>({}),ES=(e,t)=>({}),SS=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=cn(e[Hk])),null!=e[xO]&&(n[xO]=cn(e[xO])),n},_S=(e,t)=>{const n={};return null!=e[qk]&&(n[qk]=cn(e[qk])),n},OS=(e,t)=>{const n={};return null!=e[Lk]&&(n[Lk]=cn(e[Lk])),null!=e[Hk]&&(n[Hk]=cn(e[Hk])),n},CS=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[Ik]&&(n[Ik]=cn(e[Ik])),null!=e[Zk]&&(n[Zk]=cn(e[Zk])),null!=e[WO]&&(n[WO]=cn(e[WO])),n},kS=(e,t)=>{const n={};return null!=e[Qk]&&(n[Qk]=cn(e[Qk])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},TS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[kC]&&(t[kC]=cn(e[kC])),null!=e[T_]&&(t[T_]=an(vn(e[T_]))),t})(e))),PS=(e,t)=>{const n={};return null!=e[ok]&&(n[ok]=cn(e[ok])),n},AS=(e,t)=>{const n={};return null!=e[y_]&&(n[y_]=cn(e[y_])),n},IS=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},RS=(e,t)=>{const n={};return null!=e[__]&&(n[__]=cn(e[__])),null!=e[CT]&&(n[CT]=cn(e[CT])),n},MS=(e,t)=>({}),jS=(e,t)=>({}),$S=(e,t)=>({}),NS=(e,t)=>({}),DS=(e,t)=>e.reduce(((e,t)=>(null===t.value||(e[t.key]=(e=>{const t={};return null!=e[wT]&&(t[wT]=cn(e[wT])),null!=e[ET]&&(t[ET]=cn(e[ET])),t})(t.value)),e)),{}),LS=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>cn(e))),zS=(e,t)=>{const n={};return""===e.DkimTokens?n[aO]=[]:null!=e[aO]&&null!=e[aO][kT]&&(n[aO]=LS(Ln(e[aO][kT]))),n},FS=(e,t)=>{const n={};return null!=e[ET]&&(n[ET]=cn(e[ET])),n},US=(e,t)=>({}),BS=(e,t)=>{const n={};return null!=e[Hk]&&(n[Hk]=cn(e[Hk])),null!=e[IC]&&(n[IC]=cn(e[IC])),n},HS=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"]}),qS=Pn(Nf),VS=async(e,t,n,i,r)=>{const{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),l={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(l.body=r),new T(l)},GS={"content-type":"application/x-www-form-urlencoded"},WS="2010-12-01",KS="Action",YS="ArrivalDate",QS="AddHeaderAction",JS="Actions",XS="After",ZS="Body",e_="BccAddresses",t_="BounceAction",n_="BucketName",i_="BehaviorOnMXFailure",r_="BouncedRecipientInfoList",o_="BounceSender",s_="BounceSenderArn",a_="BounceType",c_="BounceTopic",l_="Bounces",u_="Bucket",p_="Charset",d_="CcAddresses",m_="CreateConfigurationSet",h_="CreateConfigurationSetEventDestination",f_="CreateConfigurationSetTrackingOptions",g_="CreateCustomVerificationEmailTemplate",y_="CustomRedirectDomain",v_="CreateReceiptFilter",b_="CreateReceiptRule",x_="CloneReceiptRuleSet",w_="CreateReceiptRuleSet",E_="ConfigurationSet",S_="ConfigurationSetAttributeNames",__="ConfigurationSetName",O_="ConfigurationSets",C_="CreateTemplate",k_="ComplaintTopic",T_="CreatedTimestamp",P_="CustomVerificationEmailTemplates",A_="CustomVerificationEmailTemplateName",I_="CloudWatchDestination",R_="Cidr",M_="Complaints",j_="Destination",$_="DkimAttributes",N_="DescribeActiveReceiptRuleSet",D_="DeliveryAttempts",L_="DimensionConfigurations",z_="DeleteConfigurationSet",F_="DeleteConfigurationSetEventDestination",U_="DeleteConfigurationSetTrackingOptions",B_="DescribeConfigurationSet",H_="DeleteCustomVerificationEmailTemplate",q_="DiagnosticCode",V_="DefaultDimensionValue",G_="DkimEnabled",W_="DeleteIdentity",K_="DeleteIdentityPolicy",Y_="DimensionName",Q_="DeliveryOptions",J_="DeleteReceiptFilter",X_="DeleteReceiptRule",Z_="DeleteReceiptRuleSet",eO="DescribeReceiptRuleSet",tO="DescribeReceiptRule",nO="DeliveryStreamARN",iO="DeleteTemplate",rO="DefaultTemplateData",oO="DefaultTags",sO="DeliveryTopic",aO="DkimTokens",cO="DeleteVerifiedEmailAddress",lO="DimensionValueSource",uO="DkimVerificationStatus",pO="Data",dO="Destinations",mO="Domain",hO="Enabled",fO="EmailAddress",gO="EventDestination",yO="EventDestinationName",vO="EventDestinations",bO="ExtensionFields",xO="Encoding",wO="Error",EO="Explanation",SO="Filter",_O="FunctionArn",OO="FromArn",CO="ForwardingEnabled",kO="FromEmailAddress",TO="FilterName",PO="FinalRecipient",AO="FailureRedirectionURL",IO="Filters",RO="GetAccountSendingEnabled",MO="GetCustomVerificationEmailTemplate",jO="GetIdentityDkimAttributes",$O="GetIdentityMailFromDomainAttributes",NO="GetIdentityNotificationAttributes",DO="GetIdentityPolicies",LO="GetIdentityVerificationAttributes",zO="GetSendQuota",FO="GetSendStatistics",UO="GetTemplate",BO="Html",HO="HeadersInBounceNotificationsEnabled",qO="HeadersInComplaintNotificationsEnabled",VO="HeadersInDeliveryNotificationsEnabled",GO="HeaderName",WO="HtmlPart",KO="HeaderValue",YO="Identity",QO="IAMRoleARN",JO="IpFilter",XO="IamRoleArn",ZO="InvocationType",eC="IdentityType",tC="Identities",nC="KinesisFirehoseDestination",iC="KmsKeyArn",rC="LambdaAction",oC="LastAttemptDate",sC="ListConfigurationSets",aC="ListCustomVerificationEmailTemplates",cC="LastFreshStart",lC="ListIdentities",uC="ListIdentityPolicies",pC="ListReceiptFilters",dC="ListReceiptRuleSets",mC="ListTemplates",hC="ListVerifiedEmailAddresses",fC="Message",gC="MessageDsn",yC="MatchingEventTypes",vC="MailFromDomain",bC="MailFromDomainAttributes",xC="MailFromDomainStatus",wC="Max24HourSend",EC="MaxItems",SC="MessageId",_C="MaxResults",OC="MaxSendRate",CC="Metadata",kC="Name",TC="NotificationAttributes",PC="NextToken",AC="NotificationType",IC="OrganizationArn",RC="ObjectKeyPrefix",MC="OriginalMessageId",jC="OriginalRuleSetName",$C="Policy",NC="PutConfigurationSetDeliveryOptions",DC="PutIdentityPolicy",LC="PolicyName",zC="PolicyNames",FC="Policies",UC="Recipient",BC="RecipientArn",HC="RecipientDsnFields",qC="ReportingMta",VC="ReputationMetricsEnabled",GC="RawMessage",WC="RemoteMta",KC="RuleName",YC="RuleNames",QC="ReputationOptions",JC="ReturnPath",XC="ReturnPathArn",ZC="ReorderReceiptRuleSet",ek="RuleSets",tk="RuleSetName",nk="ReplacementTags",ik="ReplyToAddresses",rk="ReplacementTemplateData",ok="RenderedTemplate",sk="Recipients",ak="Rejects",ck="Rule",lk="Rules",uk="Sender",pk="S3Action",dk="SetActiveReceiptRuleSet",mk="SourceArn",hk="StopAction",fk="SendBounce",gk="SendBulkTemplatedEmail",yk="StatusCode",vk="SendCustomVerificationEmail",bk="SendDataPoints",xk="SendEmail",wk="ScanEnabled",Ek="SendingEnabled",Sk="SetIdentityDkimEnabled",_k="SetIdentityFeedbackForwardingEnabled",Ok="SetIdentityHeadersInNotificationsEnabled",Ck="SetIdentityMailFromDomain",kk="SetIdentityNotificationTopic",Tk="SentLast24Hours",Pk="SNSAction",Ak="SNSDestination",Ik="SubjectPart",Rk="SmtpReplyCode",Mk="SendRawEmail",jk="SetReceiptRulePosition",$k="SuccessRedirectionURL",Nk="SnsTopic",Dk="SendTemplatedEmail",Lk="Scope",zk="Source",Fk="Status",Uk="Subject",Bk="Text",Hk="TopicArn",qk="TopicARN",Vk="TemplateArn",Gk="ToAddresses",Wk="TemplateContent",Kk="TemplateData",Yk="TemplatesMetadata",Qk="TemplateName",Jk="TrackingOptions",Xk="TlsPolicy",Zk="TextPart",eT="TestRenderTemplate",tT="TemplateSubject",nT="Tags",iT="Template",rT="Timestamp",oT="Topic",sT="UpdateAccountSendingEnabled",aT="UpdateConfigurationSetEventDestination",cT="UpdateConfigurationSetReputationMetricsEnabled",lT="UpdateConfigurationSetSendingEnabled",uT="UpdateConfigurationSetTrackingOptions",pT="UpdateCustomVerificationEmailTemplate",dT="UpdateReceiptRule",mT="UpdateTemplate",hT="Version",fT="VerificationAttributes",gT="VerifyDomainDkim",yT="VerifyDomainIdentity",vT="VerifyEmailAddress",bT="VerifiedEmailAddresses",xT="VerifyEmailIdentity",wT="VerificationStatus",ET="VerificationToken",ST="Value",_T="WorkmailAction",OT="entry",CT="message",kT="member",TT=e=>Object.entries(e).map((([e,t])=>be(e)+"="+be(t))).join("&"),PT=(e,t)=>void 0!==t.Error?.Code?t.Error.Code:404==e.statusCode?"NotFound":void 0;class AT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CloneReceiptRuleSet",{}).n("SESClient","CloneReceiptRuleSetCommand").f(void 0,void 0).ser(yg).de(jy).build()){}class IT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSet",{}).n("SESClient","CreateConfigurationSetCommand").f(void 0,void 0).ser(vg).de($y).build()){}class RT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetEventDestination",{}).n("SESClient","CreateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(bg).de(Ny).build()){}class MT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateConfigurationSetTrackingOptions",{}).n("SESClient","CreateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(xg).de(Dy).build()){}class jT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateCustomVerificationEmailTemplate",{}).n("SESClient","CreateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(wg).de(Ly).build()){}class $T extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptFilter",{}).n("SESClient","CreateReceiptFilterCommand").f(void 0,void 0).ser(Eg).de(zy).build()){}class NT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRule",{}).n("SESClient","CreateReceiptRuleCommand").f(void 0,void 0).ser(Sg).de(Fy).build()){}class DT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateReceiptRuleSet",{}).n("SESClient","CreateReceiptRuleSetCommand").f(void 0,void 0).ser(_g).de(Uy).build()){}class LT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","CreateTemplate",{}).n("SESClient","CreateTemplateCommand").f(void 0,void 0).ser(Og).de(By).build()){}class zT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSet",{}).n("SESClient","DeleteConfigurationSetCommand").f(void 0,void 0).ser(Cg).de(Hy).build()){}class FT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetEventDestination",{}).n("SESClient","DeleteConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(kg).de(qy).build()){}class UT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteConfigurationSetTrackingOptions",{}).n("SESClient","DeleteConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(Tg).de(Vy).build()){}class BT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteCustomVerificationEmailTemplate",{}).n("SESClient","DeleteCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(Pg).de(Gy).build()){}class HT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentity",{}).n("SESClient","DeleteIdentityCommand").f(void 0,void 0).ser(Ag).de(Wy).build()){}class qT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteIdentityPolicy",{}).n("SESClient","DeleteIdentityPolicyCommand").f(void 0,void 0).ser(Ig).de(Ky).build()){}class VT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptFilter",{}).n("SESClient","DeleteReceiptFilterCommand").f(void 0,void 0).ser(Rg).de(Yy).build()){}class GT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRule",{}).n("SESClient","DeleteReceiptRuleCommand").f(void 0,void 0).ser(Mg).de(Qy).build()){}class WT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteReceiptRuleSet",{}).n("SESClient","DeleteReceiptRuleSetCommand").f(void 0,void 0).ser(jg).de(Jy).build()){}class KT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteTemplate",{}).n("SESClient","DeleteTemplateCommand").f(void 0,void 0).ser($g).de(Xy).build()){}class YT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DeleteVerifiedEmailAddress",{}).n("SESClient","DeleteVerifiedEmailAddressCommand").f(void 0,void 0).ser(Ng).de(Zy).build()){}class QT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeActiveReceiptRuleSet",{}).n("SESClient","DescribeActiveReceiptRuleSetCommand").f(void 0,void 0).ser(Dg).de(ev).build()){}class JT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeConfigurationSet",{}).n("SESClient","DescribeConfigurationSetCommand").f(void 0,void 0).ser(Lg).de(tv).build()){}class XT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRule",{}).n("SESClient","DescribeReceiptRuleCommand").f(void 0,void 0).ser(zg).de(nv).build()){}class ZT extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","DescribeReceiptRuleSet",{}).n("SESClient","DescribeReceiptRuleSetCommand").f(void 0,void 0).ser(Fg).de(iv).build()){}class eP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetAccountSendingEnabled",{}).n("SESClient","GetAccountSendingEnabledCommand").f(void 0,void 0).ser(Ug).de(rv).build()){}class tP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetCustomVerificationEmailTemplate",{}).n("SESClient","GetCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(Bg).de(ov).build()){}class nP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityDkimAttributes",{}).n("SESClient","GetIdentityDkimAttributesCommand").f(void 0,void 0).ser(Hg).de(sv).build()){}class iP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityMailFromDomainAttributes",{}).n("SESClient","GetIdentityMailFromDomainAttributesCommand").f(void 0,void 0).ser(qg).de(av).build()){}class rP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityNotificationAttributes",{}).n("SESClient","GetIdentityNotificationAttributesCommand").f(void 0,void 0).ser(Vg).de(cv).build()){}class oP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityPolicies",{}).n("SESClient","GetIdentityPoliciesCommand").f(void 0,void 0).ser(Gg).de(lv).build()){}class sP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetIdentityVerificationAttributes",{}).n("SESClient","GetIdentityVerificationAttributesCommand").f(void 0,void 0).ser(Wg).de(uv).build()){}class aP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendQuota",{}).n("SESClient","GetSendQuotaCommand").f(void 0,void 0).ser(Kg).de(pv).build()){}class cP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetSendStatistics",{}).n("SESClient","GetSendStatisticsCommand").f(void 0,void 0).ser(Yg).de(dv).build()){}class lP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","GetTemplate",{}).n("SESClient","GetTemplateCommand").f(void 0,void 0).ser(Qg).de(mv).build()){}class uP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListConfigurationSets",{}).n("SESClient","ListConfigurationSetsCommand").f(void 0,void 0).ser(Jg).de(hv).build()){}class pP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListCustomVerificationEmailTemplates",{}).n("SESClient","ListCustomVerificationEmailTemplatesCommand").f(void 0,void 0).ser(Xg).de(fv).build()){}class dP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentities",{}).n("SESClient","ListIdentitiesCommand").f(void 0,void 0).ser(Zg).de(gv).build()){}class mP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListIdentityPolicies",{}).n("SESClient","ListIdentityPoliciesCommand").f(void 0,void 0).ser(ey).de(yv).build()){}class hP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptFilters",{}).n("SESClient","ListReceiptFiltersCommand").f(void 0,void 0).ser(ty).de(vv).build()){}class fP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListReceiptRuleSets",{}).n("SESClient","ListReceiptRuleSetsCommand").f(void 0,void 0).ser(ny).de(bv).build()){}class gP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListTemplates",{}).n("SESClient","ListTemplatesCommand").f(void 0,void 0).ser(iy).de(xv).build()){}class yP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ListVerifiedEmailAddresses",{}).n("SESClient","ListVerifiedEmailAddressesCommand").f(void 0,void 0).ser(ry).de(wv).build()){}class vP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutConfigurationSetDeliveryOptions",{}).n("SESClient","PutConfigurationSetDeliveryOptionsCommand").f(void 0,void 0).ser(oy).de(Ev).build()){}class bP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","PutIdentityPolicy",{}).n("SESClient","PutIdentityPolicyCommand").f(void 0,void 0).ser(sy).de(Sv).build()){}class xP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","ReorderReceiptRuleSet",{}).n("SESClient","ReorderReceiptRuleSetCommand").f(void 0,void 0).ser(ay).de(_v).build()){}class wP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBounce",{}).n("SESClient","SendBounceCommand").f(void 0,void 0).ser(cy).de(Ov).build()){}class EP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendBulkTemplatedEmail",{}).n("SESClient","SendBulkTemplatedEmailCommand").f(void 0,void 0).ser(ly).de(Cv).build()){}class SP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendCustomVerificationEmail",{}).n("SESClient","SendCustomVerificationEmailCommand").f(void 0,void 0).ser(uy).de(kv).build()){}class _P extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendEmail",{}).n("SESClient","SendEmailCommand").f(void 0,void 0).ser(py).de(Tv).build()){}class OP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendRawEmail",{}).n("SESClient","SendRawEmailCommand").f(void 0,void 0).ser(dy).de(Pv).build()){}class CP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SendTemplatedEmail",{}).n("SESClient","SendTemplatedEmailCommand").f(void 0,void 0).ser(my).de(Av).build()){}class kP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetActiveReceiptRuleSet",{}).n("SESClient","SetActiveReceiptRuleSetCommand").f(void 0,void 0).ser(hy).de(Iv).build()){}class TP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityDkimEnabled",{}).n("SESClient","SetIdentityDkimEnabledCommand").f(void 0,void 0).ser(fy).de(Rv).build()){}class PP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityFeedbackForwardingEnabled",{}).n("SESClient","SetIdentityFeedbackForwardingEnabledCommand").f(void 0,void 0).ser(gy).de(Mv).build()){}class AP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityHeadersInNotificationsEnabled",{}).n("SESClient","SetIdentityHeadersInNotificationsEnabledCommand").f(void 0,void 0).ser(yy).de(jv).build()){}class IP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityMailFromDomain",{}).n("SESClient","SetIdentityMailFromDomainCommand").f(void 0,void 0).ser(vy).de($v).build()){}class RP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetIdentityNotificationTopic",{}).n("SESClient","SetIdentityNotificationTopicCommand").f(void 0,void 0).ser(by).de(Nv).build()){}class MP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","SetReceiptRulePosition",{}).n("SESClient","SetReceiptRulePositionCommand").f(void 0,void 0).ser(xy).de(Dv).build()){}class jP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","TestRenderTemplate",{}).n("SESClient","TestRenderTemplateCommand").f(void 0,void 0).ser(wy).de(Lv).build()){}class $P extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateAccountSendingEnabled",{}).n("SESClient","UpdateAccountSendingEnabledCommand").f(void 0,void 0).ser(Ey).de(zv).build()){}class NP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetEventDestination",{}).n("SESClient","UpdateConfigurationSetEventDestinationCommand").f(void 0,void 0).ser(Sy).de(Fv).build()){}class DP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetReputationMetricsEnabled",{}).n("SESClient","UpdateConfigurationSetReputationMetricsEnabledCommand").f(void 0,void 0).ser(_y).de(Uv).build()){}class LP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetSendingEnabled",{}).n("SESClient","UpdateConfigurationSetSendingEnabledCommand").f(void 0,void 0).ser(Oy).de(Bv).build()){}class zP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateConfigurationSetTrackingOptions",{}).n("SESClient","UpdateConfigurationSetTrackingOptionsCommand").f(void 0,void 0).ser(Cy).de(Hv).build()){}class FP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateCustomVerificationEmailTemplate",{}).n("SESClient","UpdateCustomVerificationEmailTemplateCommand").f(void 0,void 0).ser(ky).de(qv).build()){}class UP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateReceiptRule",{}).n("SESClient","UpdateReceiptRuleCommand").f(void 0,void 0).ser(Ty).de(Vv).build()){}class BP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","UpdateTemplate",{}).n("SESClient","UpdateTemplateCommand").f(void 0,void 0).ser(Py).de(Gv).build()){}class HP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainDkim",{}).n("SESClient","VerifyDomainDkimCommand").f(void 0,void 0).ser(Ay).de(Wv).build()){}class qP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyDomainIdentity",{}).n("SESClient","VerifyDomainIdentityCommand").f(void 0,void 0).ser(Iy).de(Kv).build()){}class VP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailAddress",{}).n("SESClient","VerifyEmailAddressCommand").f(void 0,void 0).ser(Ry).de(Yv).build()){}class GP extends(Kt.classBuilder().ep(of).m((function(e,t,n,i){return[q(n,this.serialize,this.deserialize),dr(n,e.getEndpointParameterInstructions())]})).s("SimpleEmailService","VerifyEmailIdentity",{}).n("SESClient","VerifyEmailIdentityCommand").f(void 0,void 0).ser(My).de(Qv).build()){}const WP={CloneReceiptRuleSetCommand:AT,CreateConfigurationSetCommand:IT,CreateConfigurationSetEventDestinationCommand:RT,CreateConfigurationSetTrackingOptionsCommand:MT,CreateCustomVerificationEmailTemplateCommand:jT,CreateReceiptFilterCommand:$T,CreateReceiptRuleCommand:NT,CreateReceiptRuleSetCommand:DT,CreateTemplateCommand:LT,DeleteConfigurationSetCommand:zT,DeleteConfigurationSetEventDestinationCommand:FT,DeleteConfigurationSetTrackingOptionsCommand:UT,DeleteCustomVerificationEmailTemplateCommand:BT,DeleteIdentityCommand:HT,DeleteIdentityPolicyCommand:qT,DeleteReceiptFilterCommand:VT,DeleteReceiptRuleCommand:GT,DeleteReceiptRuleSetCommand:WT,DeleteTemplateCommand:KT,DeleteVerifiedEmailAddressCommand:YT,DescribeActiveReceiptRuleSetCommand:QT,DescribeConfigurationSetCommand:JT,DescribeReceiptRuleCommand:XT,DescribeReceiptRuleSetCommand:ZT,GetAccountSendingEnabledCommand:eP,GetCustomVerificationEmailTemplateCommand:tP,GetIdentityDkimAttributesCommand:nP,GetIdentityMailFromDomainAttributesCommand:iP,GetIdentityNotificationAttributesCommand:rP,GetIdentityPoliciesCommand:oP,GetIdentityVerificationAttributesCommand:sP,GetSendQuotaCommand:aP,GetSendStatisticsCommand:cP,GetTemplateCommand:lP,ListConfigurationSetsCommand:uP,ListCustomVerificationEmailTemplatesCommand:pP,ListIdentitiesCommand:dP,ListIdentityPoliciesCommand:mP,ListReceiptFiltersCommand:hP,ListReceiptRuleSetsCommand:fP,ListTemplatesCommand:gP,ListVerifiedEmailAddressesCommand:yP,PutConfigurationSetDeliveryOptionsCommand:vP,PutIdentityPolicyCommand:bP,ReorderReceiptRuleSetCommand:xP,SendBounceCommand:wP,SendBulkTemplatedEmailCommand:EP,SendCustomVerificationEmailCommand:SP,SendEmailCommand:_P,SendRawEmailCommand:OP,SendTemplatedEmailCommand:CP,SetActiveReceiptRuleSetCommand:kP,SetIdentityDkimEnabledCommand:TP,SetIdentityFeedbackForwardingEnabledCommand:PP,SetIdentityHeadersInNotificationsEnabledCommand:AP,SetIdentityMailFromDomainCommand:IP,SetIdentityNotificationTopicCommand:RP,SetReceiptRulePositionCommand:MP,TestRenderTemplateCommand:jP,UpdateAccountSendingEnabledCommand:$P,UpdateConfigurationSetEventDestinationCommand:NP,UpdateConfigurationSetReputationMetricsEnabledCommand:DP,UpdateConfigurationSetSendingEnabledCommand:LP,UpdateConfigurationSetTrackingOptionsCommand:zP,UpdateCustomVerificationEmailTemplateCommand:FP,UpdateReceiptRuleCommand:UP,UpdateTemplateCommand:BP,VerifyDomainDkimCommand:HP,VerifyDomainIdentityCommand:qP,VerifyEmailAddressCommand:VP,VerifyEmailIdentityCommand:GP};let KP=class extends $f{};((e,t)=>{for(const n of Object.keys(e)){const i=e[n],r=async function(e,t,n){const r=new i(e);if("function"==typeof t)this.send(r,t);else{if("function"!=typeof n)return this.send(r,t);if("object"!=typeof t)throw new Error("Expected http options but got "+typeof t);this.send(r,t||{},n)}},o=(n[0].toLowerCase()+n.slice(1)).replace(/Command$/,"");t.prototype[o]=r}})(WP,KP);const YP=J($f,pP,"NextToken","NextToken","MaxResults"),QP=J($f,dP,"NextToken","NextToken","MaxItems"),JP=async(e,t)=>{let n;try{const i=await e.send(new sP(t));n=i;try{const e=()=>Object.values(i.VerificationAttributes).map((e=>e.VerificationStatus));let t=e().length>0;for(const n of e())t=t&&"Success"==n;if(t)return{state:xc.SUCCESS,reason:n}}catch(e){}}catch(e){n=e}return{state:xc.RETRY,reason:n}};var XP,ZP,eA=Object.freeze({__proto__:null,$Command:Kt,AccountSendingPausedException:Df,AlreadyExistsException:Lf,BehaviorOnMXFailure:{RejectMessage:"RejectMessage",UseDefaultValue:"UseDefaultValue"},BounceType:{ContentRejected:"ContentRejected",DoesNotExist:"DoesNotExist",ExceededQuota:"ExceededQuota",MessageTooLarge:"MessageTooLarge",TemporaryFailure:"TemporaryFailure",Undefined:"Undefined"},BulkEmailStatus:{AccountDailyQuotaExceeded:"AccountDailyQuotaExceeded",AccountSendingPaused:"AccountSendingPaused",AccountSuspended:"AccountSuspended",AccountThrottled:"AccountThrottled",ConfigurationSetDoesNotExist:"ConfigurationSetDoesNotExist",ConfigurationSetSendingPaused:"ConfigurationSetSendingPaused",Failed:"Failed",InvalidParameterValue:"InvalidParameterValue",InvalidSendingPoolName:"InvalidSendingPoolName",MailFromDomainNotVerified:"MailFromDomainNotVerified",MessageRejected:"MessageRejected",Success:"Success",TemplateDoesNotExist:"TemplateDoesNotExist",TransientFailure:"TransientFailure"},CannotDeleteException:zf,CloneReceiptRuleSetCommand:AT,ConfigurationSetAlreadyExistsException:Bf,ConfigurationSetAttribute:{DELIVERY_OPTIONS:"deliveryOptions",EVENT_DESTINATIONS:"eventDestinations",REPUTATION_OPTIONS:"reputationOptions",TRACKING_OPTIONS:"trackingOptions"},ConfigurationSetDoesNotExistException:Hf,ConfigurationSetSendingPausedException:qf,CreateConfigurationSetCommand:IT,CreateConfigurationSetEventDestinationCommand:RT,CreateConfigurationSetTrackingOptionsCommand:MT,CreateCustomVerificationEmailTemplateCommand:jT,CreateReceiptFilterCommand:$T,CreateReceiptRuleCommand:NT,CreateReceiptRuleSetCommand:DT,CreateTemplateCommand:LT,CustomMailFromStatus:{Failed:"Failed",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"},CustomVerificationEmailInvalidContentException:Xf,CustomVerificationEmailTemplateAlreadyExistsException:Zf,CustomVerificationEmailTemplateDoesNotExistException:sg,DeleteConfigurationSetCommand:zT,DeleteConfigurationSetEventDestinationCommand:FT,DeleteConfigurationSetTrackingOptionsCommand:UT,DeleteCustomVerificationEmailTemplateCommand:BT,DeleteIdentityCommand:HT,DeleteIdentityPolicyCommand:qT,DeleteReceiptFilterCommand:VT,DeleteReceiptRuleCommand:GT,DeleteReceiptRuleSetCommand:WT,DeleteTemplateCommand:KT,DeleteVerifiedEmailAddressCommand:YT,DescribeActiveReceiptRuleSetCommand:QT,DescribeConfigurationSetCommand:JT,DescribeReceiptRuleCommand:XT,DescribeReceiptRuleSetCommand:ZT,DimensionValueSource:{EMAIL_HEADER:"emailHeader",LINK_TAG:"linkTag",MESSAGE_TAG:"messageTag"},DsnAction:{DELAYED:"delayed",DELIVERED:"delivered",EXPANDED:"expanded",FAILED:"failed",RELAYED:"relayed"},EventDestinationAlreadyExistsException:Gf,EventDestinationDoesNotExistException:ag,EventType:{BOUNCE:"bounce",CLICK:"click",COMPLAINT:"complaint",DELIVERY:"delivery",OPEN:"open",REJECT:"reject",RENDERING_FAILURE:"renderingFailure",SEND:"send"},FromEmailAddressNotVerifiedException:eg,GetAccountSendingEnabledCommand:eP,GetCustomVerificationEmailTemplateCommand:tP,GetIdentityDkimAttributesCommand:nP,GetIdentityMailFromDomainAttributesCommand:iP,GetIdentityNotificationAttributesCommand:rP,GetIdentityPoliciesCommand:oP,GetIdentityVerificationAttributesCommand:sP,GetSendQuotaCommand:aP,GetSendStatisticsCommand:cP,GetTemplateCommand:lP,IdentityType:{Domain:"Domain",EmailAddress:"EmailAddress"},InvalidCloudWatchDestinationException:Wf,InvalidConfigurationSetException:Vf,InvalidDeliveryOptionsException:ug,InvalidFirehoseDestinationException:Kf,InvalidLambdaFunctionException:tg,InvalidPolicyException:pg,InvalidRenderingParameterException:dg,InvalidS3ConfigurationException:ng,InvalidSNSDestinationException:Yf,InvalidSnsTopicException:ig,InvalidTemplateException:og,InvalidTrackingOptionsException:Qf,InvocationType:{Event:"Event",RequestResponse:"RequestResponse"},LimitExceededException:Ff,ListConfigurationSetsCommand:uP,ListCustomVerificationEmailTemplatesCommand:pP,ListIdentitiesCommand:dP,ListIdentityPoliciesCommand:mP,ListReceiptFiltersCommand:hP,ListReceiptRuleSetsCommand:fP,ListTemplatesCommand:gP,ListVerifiedEmailAddressesCommand:yP,MailFromDomainNotVerifiedException:mg,MessageRejected:hg,MissingRenderingAttributeException:fg,NotificationType:{Bounce:"Bounce",Complaint:"Complaint",Delivery:"Delivery"},ProductionAccessNotGrantedException:gg,PutConfigurationSetDeliveryOptionsCommand:vP,PutIdentityPolicyCommand:bP,ReceiptFilterPolicy:{Allow:"Allow",Block:"Block"},ReorderReceiptRuleSetCommand:xP,RuleDoesNotExistException:rg,RuleSetDoesNotExistException:Uf,SES:KP,SESClient:$f,SESServiceException:Nf,SNSActionEncoding:{Base64:"Base64",UTF8:"UTF-8"},SendBounceCommand:wP,SendBulkTemplatedEmailCommand:EP,SendCustomVerificationEmailCommand:SP,SendEmailCommand:_P,SendRawEmailCommand:OP,SendTemplatedEmailCommand:CP,SetActiveReceiptRuleSetCommand:kP,SetIdentityDkimEnabledCommand:TP,SetIdentityFeedbackForwardingEnabledCommand:PP,SetIdentityHeadersInNotificationsEnabledCommand:AP,SetIdentityMailFromDomainCommand:IP,SetIdentityNotificationTopicCommand:RP,SetReceiptRulePositionCommand:MP,StopScope:{RULE_SET:"RuleSet"},TemplateDoesNotExistException:lg,TestRenderTemplateCommand:jP,TlsPolicy:{Optional:"Optional",Require:"Require"},TrackingOptionsAlreadyExistsException:Jf,TrackingOptionsDoesNotExistException:cg,UpdateAccountSendingEnabledCommand:$P,UpdateConfigurationSetEventDestinationCommand:NP,UpdateConfigurationSetReputationMetricsEnabledCommand:DP,UpdateConfigurationSetSendingEnabledCommand:LP,UpdateConfigurationSetTrackingOptionsCommand:zP,UpdateCustomVerificationEmailTemplateCommand:FP,UpdateReceiptRuleCommand:UP,UpdateTemplateCommand:BP,VerificationStatus:{Failed:"Failed",NotStarted:"NotStarted",Pending:"Pending",Success:"Success",TemporaryFailure:"TemporaryFailure"},VerifyDomainDkimCommand:HP,VerifyDomainIdentityCommand:qP,VerifyEmailAddressCommand:VP,VerifyEmailIdentityCommand:GP,__Client:Wt,paginateListCustomVerificationEmailTemplates:YP,paginateListIdentities:QP,waitForIdentityExists:async(e,t)=>Oc({minDelay:3,maxDelay:120,...e},t,JP),waitUntilIdentityExists:async(e,t)=>(e=>{if(e.state===xc.ABORTED){const t=new Error(`${JSON.stringify({...e,reason:"Request was aborted"})}`);throw t.name="AbortError",t}if(e.state===xc.TIMEOUT){const t=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"})}`);throw t.name="TimeoutError",t}if(e.state!==xc.SUCCESS)throw new Error(`${JSON.stringify(e)}`);return e})(await Oc({minDelay:3,maxDelay:120,...e},t,JP))}),tA={},nA={exports:{}},iA={exports:{}};var rA,oA,sA,aA,cA,lA,uA,pA,dA,mA,hA,fA,gA,yA,vA,bA,xA,wA,EA,SA,_A,OA,CA,kA,TA,PA,AA,IA,RA={name:"nodemailer",version:"6.9.16",description:"Easy as cake e-mail sending from your Node.js applications",main:"lib/nodemailer.js",scripts:{test:"node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js","test:coverage":"c8 node --test --test-concurrency=1 test/**/*.test.js test/**/*-test.js",lint:"eslint .",update:"rm -rf node_modules/ package-lock.json && ncu -u && npm install"},repository:{type:"git",url:"https://github.com/nodemailer/nodemailer.git"},keywords:["Nodemailer"],author:"Andris Reinman",license:"MIT-0",bugs:{url:"https://github.com/nodemailer/nodemailer/issues"},homepage:"https://nodemailer.com/",devDependencies:{"@aws-sdk/client-ses":"3.679.0",bunyan:"1.8.15",c8:"10.1.2",eslint:"8.57.0","eslint-config-nodemailer":"1.2.0","eslint-config-prettier":"9.1.0",libbase64:"1.3.0",libmime:"5.3.5",libqp:"2.1.0","nodemailer-ntlm-auth":"1.0.4",proxy:"1.0.2","proxy-test-server":"1.0.0","smtp-server":"3.13.6"},engines:{node:">=6.0.0"}};function MA(){if(rA)return iA.exports;rA=1;const e=o,t=s,i=n,r=a,u=c.PassThrough,p=function(){if(ZP)return XP;ZP=1;const e=n;return XP=class{constructor(e){this.options=e||{},this.cookies=[]}set(t,n){let i,r=e.parse(n||""),o=this.parse(t);return o.domain?(i=o.domain.replace(/^\./,""),(r.hostname.length<i.length||("."+r.hostname).substr(1-i.length)!=="."+i)&&(o.domain=r.hostname)):o.domain=r.hostname,o.path||(o.path=this.getPath(r.pathname)),o.expires||(o.expires=new Date(Date.now()+1e3*(Number(this.options.sessionTimeout||1800)||1800))),this.add(o)}get(e){return this.list(e).map((e=>e.name+"="+e.value)).join("; ")}list(e){let t,n,i=[];for(t=this.cookies.length-1;t>=0;t--)n=this.cookies[t],this.isExpired(n)?this.cookies.splice(t,t):this.match(n,e)&&i.unshift(n);return i}parse(e){let t={};return(e||"").toString().split(";").forEach((e=>{let n,i=e.split("="),r=i.shift().trim().toLowerCase(),o=i.join("=").trim();if(r)switch(r){case"expires":o=new Date(o),"Invalid Date"!==o.toString()&&(t.expires=o);break;case"path":t.path=o;break;case"domain":n=o.toLowerCase(),n.length&&"."!==n.charAt(0)&&(n="."+n),t.domain=n;break;case"max-age":t.expires=new Date(Date.now()+1e3*(Number(o)||0));break;case"secure":t.secure=!0;break;case"httponly":t.httponly=!0;break;default:t.name||(t.name=r,t.value=o)}})),t}match(t,n){let i=e.parse(n||"");return(i.hostname===t.domain||"."===t.domain.charAt(0)&&("."+i.hostname).substr(-t.domain.length)===t.domain)&&this.getPath(i.pathname).substr(0,t.path.length)===t.path&&(!t.secure||"https:"===i.protocol)}add(e){let t,n;if(!e||!e.name)return!1;for(t=0,n=this.cookies.length;t<n;t++)if(this.compare(this.cookies[t],e))return this.isExpired(e)?(this.cookies.splice(t,1),!1):(this.cookies[t]=e,!0);return this.isExpired(e)||this.cookies.push(e),!0}compare(e,t){return e.name===t.name&&e.path===t.path&&e.domain===t.domain&&e.secure===t.secure&&e.httponly==e.httponly}isExpired(e){return e.expires&&e.expires<new Date||!e.value}getPath(e){let t=(e||"/").split("/");return t.pop(),t=t.join("/").trim(),"/"!==t.charAt(0)&&(t="/"+t),"/"!==t.substr(-1)&&(t+="/"),t}},XP}(),d=RA,m=l;function h(n,o){(o=o||{}).fetchRes=o.fetchRes||new u,o.cookies=o.cookies||new p,o.redirects=o.redirects||0,o.maxRedirects=isNaN(o.maxRedirects)?5:o.maxRedirects,o.cookie&&([].concat(o.cookie||[]).forEach((e=>{o.cookies.set(e,n)})),o.cookie=!1);let s,a,c,l=o.fetchRes,f=i.parse(n),g=(o.method||"").toString().trim().toUpperCase()||"GET",y=!1,v="https:"===f.protocol?t:e,b={"accept-encoding":"gzip,deflate","user-agent":"nodemailer/"+d.version};if(Object.keys(o.headers||{}).forEach((e=>{b[e.toLowerCase().trim()]=o.headers[e]})),o.userAgent&&(b["user-agent"]=o.userAgent),f.auth&&(b.Authorization="Basic "+Buffer.from(f.auth).toString("base64")),(s=o.cookies.get(n))&&(b.cookie=s),o.body){if(!1!==o.contentType&&(b["Content-Type"]=o.contentType||"application/x-www-form-urlencoded"),"function"==typeof o.body.pipe)b["Transfer-Encoding"]="chunked",a=o.body,a.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e))}));else{if(o.body instanceof Buffer)a=o.body;else if("object"==typeof o.body)try{a=Buffer.from(Object.keys(o.body).map((e=>{let t=o.body[e].toString().trim();return encodeURIComponent(e)+"="+encodeURIComponent(t)})).join("&"))}catch(e){if(y)return;return y=!0,e.type="FETCH",e.sourceUrl=n,void l.emit("error",e)}else a=Buffer.from(o.body.toString().trim());b["Content-Type"]=o.contentType||"application/x-www-form-urlencoded",b["Content-Length"]=a.length}g=(o.method||"").toString().trim().toUpperCase()||"POST"}let x={method:g,host:f.hostname,path:f.path,port:f.port?f.port:"https:"===f.protocol?443:80,headers:b,rejectUnauthorized:!1,agent:!1};o.tls&&Object.keys(o.tls).forEach((e=>{x[e]=o.tls[e]})),"https:"!==f.protocol||!f.hostname||f.hostname===x.host||m.isIP(f.hostname)||x.servername||(x.servername=f.hostname);try{c=v.request(x)}catch(e){return y=!0,setImmediate((()=>{e.type="FETCH",e.sourceUrl=n,l.emit("error",e)})),l}return o.timeout&&c.setTimeout(o.timeout,(()=>{if(y)return;y=!0,c.abort();let e=new Error("Request Timeout");e.type="FETCH",e.sourceUrl=n,l.emit("error",e)})),c.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e))})),c.on("response",(e=>{let t;if(!y){switch(e.headers["content-encoding"]){case"gzip":case"deflate":t=r.createUnzip()}if(e.headers["set-cookie"]&&[].concat(e.headers["set-cookie"]||[]).forEach((e=>{o.cookies.set(e,n)})),[301,302,303,307,308].includes(e.statusCode)&&e.headers.location){if(o.redirects++,o.redirects>o.maxRedirects){y=!0;let e=new Error("Maximum redirect count exceeded");return e.type="FETCH",e.sourceUrl=n,l.emit("error",e),void c.abort()}return o.method="GET",o.body=!1,h(i.resolve(n,e.headers.location),o)}if(l.statusCode=e.statusCode,l.headers=e.headers,e.statusCode>=300&&!o.allowErrorResponse){y=!0;let t=new Error("Invalid status code "+e.statusCode);return t.type="FETCH",t.sourceUrl=n,l.emit("error",t),void c.abort()}e.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e),c.abort())})),t?(e.pipe(t).pipe(l),t.on("error",(e=>{y||(y=!0,e.type="FETCH",e.sourceUrl=n,l.emit("error",e),c.abort())}))):e.pipe(l)}})),setImmediate((()=>{if(a)try{if("function"==typeof a.pipe)return a.pipe(c);c.write(a)}catch(e){return y=!0,e.type="FETCH",e.sourceUrl=n,void l.emit("error",e)}c.end()})),l}return iA.exports=function(e,t){return h(e,t)},iA.exports.Cookies=p,iA.exports}function jA(){return oA||(oA=1,function(e){const t=n,o=i,s=r,a=MA(),c=u,d=l,m=p,h=3e5;let f;try{f=m.networkInterfaces()}catch(e){}e.exports.networkInterfaces=f;const g=(t,n)=>{let i=e.exports.networkInterfaces;if(!i)return!0;const r=Object.keys(i).map((e=>i[e])).reduce(((e,t)=>e.concat(t)),[]).filter((e=>!e.internal||n)).filter((e=>e.family==="IPv"+t||e.family===t)).length>0;return r},y=(e,t,n,i)=>{if(!g(e,(n=n||{}).allowInternalNetworkInterfaces))return i(null,[]);(c.Resolver?new c.Resolver(n):c)["resolve"+e](t,((e,t)=>{if(e){switch(e.code){case c.NODATA:case c.NOTFOUND:case c.NOTIMP:case c.SERVFAIL:case c.CONNREFUSED:case c.REFUSED:case"EAI_AGAIN":return i(null,[])}return i(e)}return i(null,Array.isArray(t)?t:[].concat(t||[]))}))},v=e.exports.dnsCache=new Map,b=(e,t)=>e?Object.assign({servername:e.servername,host:e.addresses&&e.addresses.length?1===e.addresses.length?e.addresses[0]:e.addresses[Math.floor(Math.random()*e.addresses.length)]:null},t||{}):Object.assign({},t||{});function x(e,t){let n=!1,i=[],r=0;e.on("error",(e=>{n||(n=!0,t(e))})),e.on("readable",(()=>{let t;for(;null!==(t=e.read());)i.push(t),r+=t.length})),e.on("end",(()=>{if(n)return;let e;n=!0;try{e=Buffer.concat(i,r)}catch(e){return t(e)}t(null,e)}))}e.exports.resolveHostname=(e,t)=>{if(!(e=e||{}).host&&e.servername&&(e.host=e.servername),!e.host||d.isIP(e.host)){let n={addresses:[e.host],servername:e.servername||!1};return t(null,b(n,{cached:!1}))}let n;if(v.has(e.host)&&(n=v.get(e.host),!n.expires||n.expires>=Date.now()))return t(null,b(n.value,{cached:!0}));y(4,e.host,e,((i,r)=>{if(i)return n?t(null,b(n.value,{cached:!0,error:i})):t(i);if(r&&r.length){let n={addresses:r,servername:e.servername||e.host};return v.set(e.host,{value:n,expires:Date.now()+(e.dnsTtl||h)}),t(null,b(n,{cached:!1}))}y(6,e.host,e,((i,r)=>{if(i)return n?t(null,b(n.value,{cached:!0,error:i})):t(i);if(r&&r.length){let n={addresses:r,servername:e.servername||e.host};return v.set(e.host,{value:n,expires:Date.now()+(e.dnsTtl||h)}),t(null,b(n,{cached:!1}))}try{c.lookup(e.host,{all:!0},((i,r)=>{if(i)return n?t(null,b(n.value,{cached:!0,error:i})):t(i);let o=!!r&&r.filter((e=>g(e.family))).map((e=>e.address)).shift();if(r&&r.length&&!o&&console.warn(`Failed to resolve IPv${r[0].family} addresses with current network`),!o&&n)return t(null,b(n.value,{cached:!0}));let s={addresses:o?[o]:[e.host],servername:e.servername||e.host};return v.set(e.host,{value:s,expires:Date.now()+(e.dnsTtl||h)}),t(null,b(s,{cached:!1}))}))}catch(i){return n?t(null,b(n.value,{cached:!0,error:i})):t(i)}}))}))},e.exports.parseConnectionUrl=e=>{e=e||"";let n={};return[t.parse(e,!0)].forEach((e=>{let t;switch(e.protocol){case"smtp:":n.secure=!1;break;case"smtps:":n.secure=!0;break;case"direct:":n.direct=!0}!isNaN(e.port)&&Number(e.port)&&(n.port=Number(e.port)),e.hostname&&(n.host=e.hostname),e.auth&&(t=e.auth.split(":"),n.auth||(n.auth={}),n.auth.user=t.shift(),n.auth.pass=t.join(":")),Object.keys(e.query||{}).forEach((t=>{let i=n,r=t,o=e.query[t];switch(isNaN(o)||(o=Number(o)),o){case"true":o=!0;break;case"false":o=!1}if(0===t.indexOf("tls."))r=t.substr(4),n.tls||(n.tls={}),i=n.tls;else if(t.indexOf(".")>=0)return;r in i||(i[r]=o)}))})),n},e.exports._logFunc=(e,t,n,i,r,...o)=>{let s={};Object.keys(n||{}).forEach((e=>{"level"!==e&&(s[e]=n[e])})),Object.keys(i||{}).forEach((e=>{"level"!==e&&(s[e]=i[e])})),e[t](s,r,...o)},e.exports.getLogger=(t,n)=>{let i={},r=["trace","debug","info","warn","error","fatal"];if(!(t=t||{}).logger)return r.forEach((e=>{i[e]=()=>!1})),i;let s=t.logger;return!0===t.logger&&(s=function(e){let t=0,n=new Map;e.forEach((e=>{e.length>t&&(t=e.length)})),e.forEach((e=>{let i=e.toUpperCase();i.length<t&&(i+=" ".repeat(t-i.length)),n.set(e,i)}));let i=(e,t,i,...r)=>{let s="";t&&("server"===t.tnx?s="S: ":"client"===t.tnx&&(s="C: "),t.sid&&(s="["+t.sid+"] "+s),t.cid&&(s="[#"+t.cid+"] "+s)),(i=o.format(i,...r)).split(/\r?\n/).forEach((t=>{console.log("[%s] %s %s",(new Date).toISOString().substr(0,19).replace(/T/," "),n.get(e),s+t)}))},r={};return e.forEach((e=>{r[e]=i.bind(null,e)})),r}(r)),r.forEach((t=>{i[t]=(i,r,...o)=>{e.exports._logFunc(s,t,n,i,r,...o)}})),i},e.exports.callbackPromise=(e,t)=>function(){let n=Array.from(arguments),i=n.shift();i?t(i):e(...n)},e.exports.parseDataURI=e=>{let t=e,n=t.indexOf(",");if(!n)return e;let i,r=t.substring(n+1),o=t.substring(5,n).split(";"),s=o.length>1&&o[o.length-1];s&&s.indexOf("=")<0&&(i=s.toLowerCase(),o.pop());let a=o.shift()||"application/octet-stream",c={};for(let e of o){let t=e.indexOf("=");if(t>=0){let n=e.substring(0,t),i=e.substring(t+1);c[n]=i}}switch(i){case"base64":r=Buffer.from(r,"base64");break;case"utf8":r=Buffer.from(r);break;default:try{r=Buffer.from(decodeURIComponent(r))}catch(e){r=Buffer.from(r)}r=Buffer.from(r)}return{data:r,encoding:i,contentType:a,params:c}},e.exports.resolveContent=(t,n,i)=>{let r;i||(r=new Promise(((t,n)=>{i=e.exports.callbackPromise(t,n)})));let o,c=t&&t[n]&&t[n].content||t[n],l=("object"==typeof t[n]&&t[n].encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");if(!c)return i(null,c);if("object"==typeof c){if("function"==typeof c.pipe)return x(c,((e,r)=>{if(e)return i(e);t[n].content?t[n].content=r:t[n]=r,i(null,r)}));if(/^https?:\/\//i.test(c.path||c.href))return o=a(c.path||c.href),x(o,i);if(/^data:/i.test(c.path||c.href)){let t=e.exports.parseDataURI(c.path||c.href);return t&&t.data?i(null,t.data):i(null,Buffer.from(0))}if(c.path)return x(s.createReadStream(c.path),i)}return"string"!=typeof t[n].content||["utf8","usascii","ascii"].includes(l)||(c=Buffer.from(t[n].content,l)),setImmediate((()=>i(null,c))),r},e.exports.assign=function(){let e=Array.from(arguments),t=e.shift()||{};return e.forEach((e=>{Object.keys(e||{}).forEach((n=>{["tls","auth"].includes(n)&&e[n]&&"object"==typeof e[n]?(t[n]||(t[n]={}),Object.keys(e[n]).forEach((i=>{t[n][i]=e[n][i]}))):t[n]=e[n]}))})),t},e.exports.encodeXText=e=>{if(!/[^\x21-\x2A\x2C-\x3C\x3E-\x7E]/.test(e))return e;let t=Buffer.from(e),n="";for(let e=0,i=t.length;e<i;e++){let i=t[e];n+=i<33||i>126||43===i||61===i?"+"+(i<16?"0":"")+i.toString(16).toUpperCase():String.fromCharCode(i)}return n}}(nA)),nA.exports}function $A(){if(aA)return sA;aA=1;const e=d,t="application/octet-stream",n=new Map([["application/acad","dwg"],["application/applixware","aw"],["application/arj","arj"],["application/atom+xml","xml"],["application/atomcat+xml","atomcat"],["application/atomsvc+xml","atomsvc"],["application/base64",["mm","mme"]],["application/binhex","hqx"],["application/binhex4","hqx"],["application/book",["book","boo"]],["application/ccxml+xml,","ccxml"],["application/cdf","cdf"],["application/cdmi-capability","cdmia"],["application/cdmi-container","cdmic"],["application/cdmi-domain","cdmid"],["application/cdmi-object","cdmio"],["application/cdmi-queue","cdmiq"],["application/clariscad","ccad"],["application/commonground","dp"],["application/cu-seeme","cu"],["application/davmount+xml","davmount"],["application/drafting","drw"],["application/dsptype","tsp"],["application/dssc+der","dssc"],["application/dssc+xml","xdssc"],["application/dxf","dxf"],["application/ecmascript",["js","es"]],["application/emma+xml","emma"],["application/envoy","evy"],["application/epub+zip","epub"],["application/excel",["xls","xl","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/exi","exi"],["application/font-tdpfr","pfr"],["application/fractals","fif"],["application/freeloader","frl"],["application/futuresplash","spl"],["application/geo+json","geojson"],["application/gnutar","tgz"],["application/groupwise","vew"],["application/hlp","hlp"],["application/hta","hta"],["application/hyperstudio","stk"],["application/i-deas","unv"],["application/iges",["iges","igs"]],["application/inf","inf"],["application/internet-property-stream","acx"],["application/ipfix","ipfix"],["application/java","class"],["application/java-archive","jar"],["application/java-byte-code","class"],["application/java-serialized-object","ser"],["application/java-vm","class"],["application/javascript","js"],["application/json","json"],["application/lha","lha"],["application/lzx","lzx"],["application/mac-binary","bin"],["application/mac-binhex","hqx"],["application/mac-binhex40","hqx"],["application/mac-compactpro","cpt"],["application/macbinary","bin"],["application/mads+xml","mads"],["application/marc","mrc"],["application/marcxml+xml","mrcx"],["application/mathematica","ma"],["application/mathml+xml","mathml"],["application/mbedlet","mbd"],["application/mbox","mbox"],["application/mcad","mcd"],["application/mediaservercontrol+xml","mscml"],["application/metalink4+xml","meta4"],["application/mets+xml","mets"],["application/mime","aps"],["application/mods+xml","mods"],["application/mp21","m21"],["application/mp4","mp4"],["application/mspowerpoint",["ppt","pot","pps","ppz"]],["application/msword",["doc","dot","w6w","wiz","word"]],["application/mswrite","wri"],["application/mxf","mxf"],["application/netmc","mcp"],["application/octet-stream",["*"]],["application/oda","oda"],["application/oebps-package+xml","opf"],["application/ogg","ogx"],["application/olescript","axs"],["application/onenote","onetoc"],["application/patch-ops-error+xml","xer"],["application/pdf","pdf"],["application/pgp-encrypted","asc"],["application/pgp-signature","pgp"],["application/pics-rules","prf"],["application/pkcs-12","p12"],["application/pkcs-crl","crl"],["application/pkcs10","p10"],["application/pkcs7-mime",["p7c","p7m"]],["application/pkcs7-signature","p7s"],["application/pkcs8","p8"],["application/pkix-attr-cert","ac"],["application/pkix-cert",["cer","crt"]],["application/pkix-crl","crl"],["application/pkix-pkipath","pkipath"],["application/pkixcmp","pki"],["application/plain","text"],["application/pls+xml","pls"],["application/postscript",["ps","ai","eps"]],["application/powerpoint","ppt"],["application/pro_eng",["part","prt"]],["application/prs.cww","cww"],["application/pskc+xml","pskcxml"],["application/rdf+xml","rdf"],["application/reginfo+xml","rif"],["application/relax-ng-compact-syntax","rnc"],["application/resource-lists+xml","rl"],["application/resource-lists-diff+xml","rld"],["application/ringing-tones","rng"],["application/rls-services+xml","rs"],["application/rsd+xml","rsd"],["application/rss+xml","xml"],["application/rtf",["rtf","rtx"]],["application/sbml+xml","sbml"],["application/scvp-cv-request","scq"],["application/scvp-cv-response","scs"],["application/scvp-vp-request","spq"],["application/scvp-vp-response","spp"],["application/sdp","sdp"],["application/sea","sea"],["application/set","set"],["application/set-payment-initiation","setpay"],["application/set-registration-initiation","setreg"],["application/shf+xml","shf"],["application/sla","stl"],["application/smil",["smi","smil"]],["application/smil+xml","smi"],["application/solids","sol"],["application/sounder","sdr"],["application/sparql-query","rq"],["application/sparql-results+xml","srx"],["application/srgs","gram"],["application/srgs+xml","grxml"],["application/sru+xml","sru"],["application/ssml+xml","ssml"],["application/step",["step","stp"]],["application/streamingmedia","ssm"],["application/tei+xml","tei"],["application/thraud+xml","tfi"],["application/timestamped-data","tsd"],["application/toolbook","tbk"],["application/vda","vda"],["application/vnd.3gpp.pic-bw-large","plb"],["application/vnd.3gpp.pic-bw-small","psb"],["application/vnd.3gpp.pic-bw-var","pvb"],["application/vnd.3gpp2.tcap","tcap"],["application/vnd.3m.post-it-notes","pwn"],["application/vnd.accpac.simply.aso","aso"],["application/vnd.accpac.simply.imp","imp"],["application/vnd.acucobol","acu"],["application/vnd.acucorp","atc"],["application/vnd.adobe.air-application-installer-package+zip","air"],["application/vnd.adobe.fxp","fxp"],["application/vnd.adobe.xdp+xml","xdp"],["application/vnd.adobe.xfdf","xfdf"],["application/vnd.ahead.space","ahead"],["application/vnd.airzip.filesecure.azf","azf"],["application/vnd.airzip.filesecure.azs","azs"],["application/vnd.amazon.ebook","azw"],["application/vnd.americandynamics.acc","acc"],["application/vnd.amiga.ami","ami"],["application/vnd.android.package-archive","apk"],["application/vnd.anser-web-certificate-issue-initiation","cii"],["application/vnd.anser-web-funds-transfer-initiation","fti"],["application/vnd.antix.game-component","atx"],["application/vnd.apple.installer+xml","mpkg"],["application/vnd.apple.mpegurl","m3u8"],["application/vnd.aristanetworks.swi","swi"],["application/vnd.audiograph","aep"],["application/vnd.blueice.multipass","mpm"],["application/vnd.bmi","bmi"],["application/vnd.businessobjects","rep"],["application/vnd.chemdraw+xml","cdxml"],["application/vnd.chipnuts.karaoke-mmd","mmd"],["application/vnd.cinderella","cdy"],["application/vnd.claymore","cla"],["application/vnd.cloanto.rp9","rp9"],["application/vnd.clonk.c4group","c4g"],["application/vnd.cluetrust.cartomobile-config","c11amc"],["application/vnd.cluetrust.cartomobile-config-pkg","c11amz"],["application/vnd.commonspace","csp"],["application/vnd.contact.cmsg","cdbcmsg"],["application/vnd.cosmocaller","cmc"],["application/vnd.crick.clicker","clkx"],["application/vnd.crick.clicker.keyboard","clkk"],["application/vnd.crick.clicker.palette","clkp"],["application/vnd.crick.clicker.template","clkt"],["application/vnd.crick.clicker.wordbank","clkw"],["application/vnd.criticaltools.wbs+xml","wbs"],["application/vnd.ctc-posml","pml"],["application/vnd.cups-ppd","ppd"],["application/vnd.curl.car","car"],["application/vnd.curl.pcurl","pcurl"],["application/vnd.data-vision.rdz","rdz"],["application/vnd.denovo.fcselayout-link","fe_launch"],["application/vnd.dna","dna"],["application/vnd.dolby.mlp","mlp"],["application/vnd.dpgraph","dpg"],["application/vnd.dreamfactory","dfac"],["application/vnd.dvb.ait","ait"],["application/vnd.dvb.service","svc"],["application/vnd.dynageo","geo"],["application/vnd.ecowin.chart","mag"],["application/vnd.enliven","nml"],["application/vnd.epson.esf","esf"],["application/vnd.epson.msf","msf"],["application/vnd.epson.quickanime","qam"],["application/vnd.epson.salt","slt"],["application/vnd.epson.ssf","ssf"],["application/vnd.eszigno3+xml","es3"],["application/vnd.ezpix-album","ez2"],["application/vnd.ezpix-package","ez3"],["application/vnd.fdf","fdf"],["application/vnd.fdsn.seed","seed"],["application/vnd.flographit","gph"],["application/vnd.fluxtime.clip","ftc"],["application/vnd.framemaker","fm"],["application/vnd.frogans.fnc","fnc"],["application/vnd.frogans.ltf","ltf"],["application/vnd.fsc.weblaunch","fsc"],["application/vnd.fujitsu.oasys","oas"],["application/vnd.fujitsu.oasys2","oa2"],["application/vnd.fujitsu.oasys3","oa3"],["application/vnd.fujitsu.oasysgp","fg5"],["application/vnd.fujitsu.oasysprs","bh2"],["application/vnd.fujixerox.ddd","ddd"],["application/vnd.fujixerox.docuworks","xdw"],["application/vnd.fujixerox.docuworks.binder","xbd"],["application/vnd.fuzzysheet","fzs"],["application/vnd.genomatix.tuxedo","txd"],["application/vnd.geogebra.file","ggb"],["application/vnd.geogebra.tool","ggt"],["application/vnd.geometry-explorer","gex"],["application/vnd.geonext","gxt"],["application/vnd.geoplan","g2w"],["application/vnd.geospace","g3w"],["application/vnd.gmx","gmx"],["application/vnd.google-earth.kml+xml","kml"],["application/vnd.google-earth.kmz","kmz"],["application/vnd.grafeq","gqf"],["application/vnd.groove-account","gac"],["application/vnd.groove-help","ghf"],["application/vnd.groove-identity-message","gim"],["application/vnd.groove-injector","grv"],["application/vnd.groove-tool-message","gtm"],["application/vnd.groove-tool-template","tpl"],["application/vnd.groove-vcard","vcg"],["application/vnd.hal+xml","hal"],["application/vnd.handheld-entertainment+xml","zmm"],["application/vnd.hbci","hbci"],["application/vnd.hhe.lesson-player","les"],["application/vnd.hp-hpgl",["hgl","hpg","hpgl"]],["application/vnd.hp-hpid","hpid"],["application/vnd.hp-hps","hps"],["application/vnd.hp-jlyt","jlt"],["application/vnd.hp-pcl","pcl"],["application/vnd.hp-pclxl","pclxl"],["application/vnd.hydrostatix.sof-data","sfd-hdstx"],["application/vnd.hzn-3d-crossword","x3d"],["application/vnd.ibm.minipay","mpy"],["application/vnd.ibm.modcap","afp"],["application/vnd.ibm.rights-management","irm"],["application/vnd.ibm.secure-container","sc"],["application/vnd.iccprofile","icc"],["application/vnd.igloader","igl"],["application/vnd.immervision-ivp","ivp"],["application/vnd.immervision-ivu","ivu"],["application/vnd.insors.igm","igm"],["application/vnd.intercon.formnet","xpw"],["application/vnd.intergeo","i2g"],["application/vnd.intu.qbo","qbo"],["application/vnd.intu.qfx","qfx"],["application/vnd.ipunplugged.rcprofile","rcprofile"],["application/vnd.irepository.package+xml","irp"],["application/vnd.is-xpr","xpr"],["application/vnd.isac.fcs","fcs"],["application/vnd.jam","jam"],["application/vnd.jcp.javame.midlet-rms","rms"],["application/vnd.jisp","jisp"],["application/vnd.joost.joda-archive","joda"],["application/vnd.kahootz","ktz"],["application/vnd.kde.karbon","karbon"],["application/vnd.kde.kchart","chrt"],["application/vnd.kde.kformula","kfo"],["application/vnd.kde.kivio","flw"],["application/vnd.kde.kontour","kon"],["application/vnd.kde.kpresenter","kpr"],["application/vnd.kde.kspread","ksp"],["application/vnd.kde.kword","kwd"],["application/vnd.kenameaapp","htke"],["application/vnd.kidspiration","kia"],["application/vnd.kinar","kne"],["application/vnd.koan","skp"],["application/vnd.kodak-descriptor","sse"],["application/vnd.las.las+xml","lasxml"],["application/vnd.llamagraphics.life-balance.desktop","lbd"],["application/vnd.llamagraphics.life-balance.exchange+xml","lbe"],["application/vnd.lotus-1-2-3","123"],["application/vnd.lotus-approach","apr"],["application/vnd.lotus-freelance","pre"],["application/vnd.lotus-notes","nsf"],["application/vnd.lotus-organizer","org"],["application/vnd.lotus-screencam","scm"],["application/vnd.lotus-wordpro","lwp"],["application/vnd.macports.portpkg","portpkg"],["application/vnd.mcd","mcd"],["application/vnd.medcalcdata","mc1"],["application/vnd.mediastation.cdkey","cdkey"],["application/vnd.mfer","mwf"],["application/vnd.mfmp","mfm"],["application/vnd.micrografx.flo","flo"],["application/vnd.micrografx.igx","igx"],["application/vnd.mif","mif"],["application/vnd.mobius.daf","daf"],["application/vnd.mobius.dis","dis"],["application/vnd.mobius.mbk","mbk"],["application/vnd.mobius.mqy","mqy"],["application/vnd.mobius.msl","msl"],["application/vnd.mobius.plc","plc"],["application/vnd.mobius.txf","txf"],["application/vnd.mophun.application","mpn"],["application/vnd.mophun.certificate","mpc"],["application/vnd.mozilla.xul+xml","xul"],["application/vnd.ms-artgalry","cil"],["application/vnd.ms-cab-compressed","cab"],["application/vnd.ms-excel",["xls","xla","xlc","xlm","xlt","xlw","xlb","xll"]],["application/vnd.ms-excel.addin.macroenabled.12","xlam"],["application/vnd.ms-excel.sheet.binary.macroenabled.12","xlsb"],["application/vnd.ms-excel.sheet.macroenabled.12","xlsm"],["application/vnd.ms-excel.template.macroenabled.12","xltm"],["application/vnd.ms-fontobject","eot"],["application/vnd.ms-htmlhelp","chm"],["application/vnd.ms-ims","ims"],["application/vnd.ms-lrm","lrm"],["application/vnd.ms-officetheme","thmx"],["application/vnd.ms-outlook","msg"],["application/vnd.ms-pki.certstore","sst"],["application/vnd.ms-pki.pko","pko"],["application/vnd.ms-pki.seccat","cat"],["application/vnd.ms-pki.stl","stl"],["application/vnd.ms-pkicertstore","sst"],["application/vnd.ms-pkiseccat","cat"],["application/vnd.ms-pkistl","stl"],["application/vnd.ms-powerpoint",["ppt","pot","pps","ppa","pwz"]],["application/vnd.ms-powerpoint.addin.macroenabled.12","ppam"],["application/vnd.ms-powerpoint.presentation.macroenabled.12","pptm"],["application/vnd.ms-powerpoint.slide.macroenabled.12","sldm"],["application/vnd.ms-powerpoint.slideshow.macroenabled.12","ppsm"],["application/vnd.ms-powerpoint.template.macroenabled.12","potm"],["application/vnd.ms-project","mpp"],["application/vnd.ms-word.document.macroenabled.12","docm"],["application/vnd.ms-word.template.macroenabled.12","dotm"],["application/vnd.ms-works",["wks","wcm","wdb","wps"]],["application/vnd.ms-wpl","wpl"],["application/vnd.ms-xpsdocument","xps"],["application/vnd.mseq","mseq"],["application/vnd.musician","mus"],["application/vnd.muvee.style","msty"],["application/vnd.neurolanguage.nlu","nlu"],["application/vnd.noblenet-directory","nnd"],["application/vnd.noblenet-sealer","nns"],["application/vnd.noblenet-web","nnw"],["application/vnd.nokia.configuration-message","ncm"],["application/vnd.nokia.n-gage.data","ngdat"],["application/vnd.nokia.n-gage.symbian.install","n-gage"],["application/vnd.nokia.radio-preset","rpst"],["application/vnd.nokia.radio-presets","rpss"],["application/vnd.nokia.ringing-tone","rng"],["application/vnd.novadigm.edm","edm"],["application/vnd.novadigm.edx","edx"],["application/vnd.novadigm.ext","ext"],["application/vnd.oasis.opendocument.chart","odc"],["application/vnd.oasis.opendocument.chart-template","otc"],["application/vnd.oasis.opendocument.database","odb"],["application/vnd.oasis.opendocument.formula","odf"],["application/vnd.oasis.opendocument.formula-template","odft"],["application/vnd.oasis.opendocument.graphics","odg"],["application/vnd.oasis.opendocument.graphics-template","otg"],["application/vnd.oasis.opendocument.image","odi"],["application/vnd.oasis.opendocument.image-template","oti"],["application/vnd.oasis.opendocument.presentation","odp"],["application/vnd.oasis.opendocument.presentation-template","otp"],["application/vnd.oasis.opendocument.spreadsheet","ods"],["application/vnd.oasis.opendocument.spreadsheet-template","ots"],["application/vnd.oasis.opendocument.text","odt"],["application/vnd.oasis.opendocument.text-master","odm"],["application/vnd.oasis.opendocument.text-template","ott"],["application/vnd.oasis.opendocument.text-web","oth"],["application/vnd.olpc-sugar","xo"],["application/vnd.oma.dd2+xml","dd2"],["application/vnd.openofficeorg.extension","oxt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","pptx"],["application/vnd.openxmlformats-officedocument.presentationml.slide","sldx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","ppsx"],["application/vnd.openxmlformats-officedocument.presentationml.template","potx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","xltx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","dotx"],["application/vnd.osgeo.mapguide.package","mgp"],["application/vnd.osgi.dp","dp"],["application/vnd.palm","pdb"],["application/vnd.pawaafile","paw"],["application/vnd.pg.format","str"],["application/vnd.pg.osasli","ei6"],["application/vnd.picsel","efif"],["application/vnd.pmi.widget","wg"],["application/vnd.pocketlearn","plf"],["application/vnd.powerbuilder6","pbd"],["application/vnd.previewsystems.box","box"],["application/vnd.proteus.magazine","mgz"],["application/vnd.publishare-delta-tree","qps"],["application/vnd.pvi.ptid1","ptid"],["application/vnd.quark.quarkxpress","qxd"],["application/vnd.realvnc.bed","bed"],["application/vnd.recordare.musicxml","mxl"],["application/vnd.recordare.musicxml+xml","musicxml"],["application/vnd.rig.cryptonote","cryptonote"],["application/vnd.rim.cod","cod"],["application/vnd.rn-realmedia","rm"],["application/vnd.rn-realplayer","rnx"],["application/vnd.route66.link66+xml","link66"],["application/vnd.sailingtracker.track","st"],["application/vnd.seemail","see"],["application/vnd.sema","sema"],["application/vnd.semd","semd"],["application/vnd.semf","semf"],["application/vnd.shana.informed.formdata","ifm"],["application/vnd.shana.informed.formtemplate","itp"],["application/vnd.shana.informed.interchange","iif"],["application/vnd.shana.informed.package","ipk"],["application/vnd.simtech-mindmapper","twd"],["application/vnd.smaf","mmf"],["application/vnd.smart.teacher","teacher"],["application/vnd.solent.sdkm+xml","sdkm"],["application/vnd.spotfire.dxp","dxp"],["application/vnd.spotfire.sfs","sfs"],["application/vnd.stardivision.calc","sdc"],["application/vnd.stardivision.draw","sda"],["application/vnd.stardivision.impress","sdd"],["application/vnd.stardivision.math","smf"],["application/vnd.stardivision.writer","sdw"],["application/vnd.stardivision.writer-global","sgl"],["application/vnd.stepmania.stepchart","sm"],["application/vnd.sun.xml.calc","sxc"],["application/vnd.sun.xml.calc.template","stc"],["application/vnd.sun.xml.draw","sxd"],["application/vnd.sun.xml.draw.template","std"],["application/vnd.sun.xml.impress","sxi"],["application/vnd.sun.xml.impress.template","sti"],["application/vnd.sun.xml.math","sxm"],["application/vnd.sun.xml.writer","sxw"],["application/vnd.sun.xml.writer.global","sxg"],["application/vnd.sun.xml.writer.template","stw"],["application/vnd.sus-calendar","sus"],["application/vnd.svd","svd"],["application/vnd.symbian.install","sis"],["application/vnd.syncml+xml","xsm"],["application/vnd.syncml.dm+wbxml","bdm"],["application/vnd.syncml.dm+xml","xdm"],["application/vnd.tao.intent-module-archive","tao"],["application/vnd.tmobile-livetv","tmo"],["application/vnd.trid.tpt","tpt"],["application/vnd.triscape.mxs","mxs"],["application/vnd.trueapp","tra"],["application/vnd.ufdl","ufd"],["application/vnd.uiq.theme","utz"],["application/vnd.umajin","umj"],["application/vnd.unity","unityweb"],["application/vnd.uoml+xml","uoml"],["application/vnd.vcx","vcx"],["application/vnd.visio","vsd"],["application/vnd.visionary","vis"],["application/vnd.vsf","vsf"],["application/vnd.wap.wbxml","wbxml"],["application/vnd.wap.wmlc","wmlc"],["application/vnd.wap.wmlscriptc","wmlsc"],["application/vnd.webturbo","wtb"],["application/vnd.wolfram.player","nbp"],["application/vnd.wordperfect","wpd"],["application/vnd.wqd","wqd"],["application/vnd.wt.stf","stf"],["application/vnd.xara",["web","xar"]],["application/vnd.xfdl","xfdl"],["application/vnd.yamaha.hv-dic","hvd"],["application/vnd.yamaha.hv-script","hvs"],["application/vnd.yamaha.hv-voice","hvp"],["application/vnd.yamaha.openscoreformat","osf"],["application/vnd.yamaha.openscoreformat.osfpvg+xml","osfpvg"],["application/vnd.yamaha.smaf-audio","saf"],["application/vnd.yamaha.smaf-phrase","spf"],["application/vnd.yellowriver-custom-menu","cmp"],["application/vnd.zul","zir"],["application/vnd.zzazz.deck+xml","zaz"],["application/vocaltec-media-desc","vmd"],["application/vocaltec-media-file","vmf"],["application/voicexml+xml","vxml"],["application/widget","wgt"],["application/winhlp","hlp"],["application/wordperfect",["wp","wp5","wp6","wpd"]],["application/wordperfect6.0",["w60","wp5"]],["application/wordperfect6.1","w61"],["application/wsdl+xml","wsdl"],["application/wspolicy+xml","wspolicy"],["application/x-123","wk1"],["application/x-7z-compressed","7z"],["application/x-abiword","abw"],["application/x-ace-compressed","ace"],["application/x-aim","aim"],["application/x-authorware-bin","aab"],["application/x-authorware-map","aam"],["application/x-authorware-seg","aas"],["application/x-bcpio","bcpio"],["application/x-binary","bin"],["application/x-binhex40","hqx"],["application/x-bittorrent","torrent"],["application/x-bsh",["bsh","sh","shar"]],["application/x-bytecode.elisp","elc"],["application/x-bytecode.python","pyc"],["application/x-bzip","bz"],["application/x-bzip2",["boz","bz2"]],["application/x-cdf","cdf"],["application/x-cdlink","vcd"],["application/x-chat",["cha","chat"]],["application/x-chess-pgn","pgn"],["application/x-cmu-raster","ras"],["application/x-cocoa","cco"],["application/x-compactpro","cpt"],["application/x-compress","z"],["application/x-compressed",["tgz","gz","z","zip"]],["application/x-conference","nsc"],["application/x-cpio","cpio"],["application/x-cpt","cpt"],["application/x-csh","csh"],["application/x-debian-package","deb"],["application/x-deepv","deepv"],["application/x-director",["dir","dcr","dxr"]],["application/x-doom","wad"],["application/x-dtbncx+xml","ncx"],["application/x-dtbook+xml","dtb"],["application/x-dtbresource+xml","res"],["application/x-dvi","dvi"],["application/x-elc","elc"],["application/x-envoy",["env","evy"]],["application/x-esrehber","es"],["application/x-excel",["xls","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/x-font-bdf","bdf"],["application/x-font-ghostscript","gsf"],["application/x-font-linux-psf","psf"],["application/x-font-otf","otf"],["application/x-font-pcf","pcf"],["application/x-font-snf","snf"],["application/x-font-ttf","ttf"],["application/x-font-type1","pfa"],["application/x-font-woff","woff"],["application/x-frame","mif"],["application/x-freelance","pre"],["application/x-futuresplash","spl"],["application/x-gnumeric","gnumeric"],["application/x-gsp","gsp"],["application/x-gss","gss"],["application/x-gtar","gtar"],["application/x-gzip",["gz","gzip"]],["application/x-hdf","hdf"],["application/x-helpfile",["help","hlp"]],["application/x-httpd-imap","imap"],["application/x-ima","ima"],["application/x-internet-signup",["ins","isp"]],["application/x-internett-signup","ins"],["application/x-inventor","iv"],["application/x-ip2","ip"],["application/x-iphone","iii"],["application/x-java-class","class"],["application/x-java-commerce","jcm"],["application/x-java-jnlp-file","jnlp"],["application/x-javascript","js"],["application/x-koan",["skd","skm","skp","skt"]],["application/x-ksh","ksh"],["application/x-latex",["latex","ltx"]],["application/x-lha","lha"],["application/x-lisp","lsp"],["application/x-livescreen","ivy"],["application/x-lotus","wq1"],["application/x-lotusscreencam","scm"],["application/x-lzh","lzh"],["application/x-lzx","lzx"],["application/x-mac-binhex40","hqx"],["application/x-macbinary","bin"],["application/x-magic-cap-package-1.0","mc$"],["application/x-mathcad","mcd"],["application/x-meme","mm"],["application/x-midi",["mid","midi"]],["application/x-mif","mif"],["application/x-mix-transfer","nix"],["application/x-mobipocket-ebook","prc"],["application/x-mplayer2","asx"],["application/x-ms-application","application"],["application/x-ms-wmd","wmd"],["application/x-ms-wmz","wmz"],["application/x-ms-xbap","xbap"],["application/x-msaccess","mdb"],["application/x-msbinder","obd"],["application/x-mscardfile","crd"],["application/x-msclip","clp"],["application/x-msdownload",["exe","dll"]],["application/x-msexcel",["xls","xla","xlw"]],["application/x-msmediaview",["mvb","m13","m14"]],["application/x-msmetafile","wmf"],["application/x-msmoney","mny"],["application/x-mspowerpoint","ppt"],["application/x-mspublisher","pub"],["application/x-msschedule","scd"],["application/x-msterminal","trm"],["application/x-mswrite","wri"],["application/x-navi-animation","ani"],["application/x-navidoc","nvd"],["application/x-navimap","map"],["application/x-navistyle","stl"],["application/x-netcdf",["cdf","nc"]],["application/x-newton-compatible-pkg","pkg"],["application/x-nokia-9000-communicator-add-on-software","aos"],["application/x-omc","omc"],["application/x-omcdatamaker","omcd"],["application/x-omcregerator","omcr"],["application/x-pagemaker",["pm4","pm5"]],["application/x-pcl","pcl"],["application/x-perfmon",["pma","pmc","pml","pmr","pmw"]],["application/x-pixclscript","plx"],["application/x-pkcs10","p10"],["application/x-pkcs12",["p12","pfx"]],["application/x-pkcs7-certificates",["p7b","spc"]],["application/x-pkcs7-certreqresp","p7r"],["application/x-pkcs7-mime",["p7m","p7c"]],["application/x-pkcs7-signature",["p7s","p7a"]],["application/x-pointplus","css"],["application/x-portable-anymap","pnm"],["application/x-project",["mpc","mpt","mpv","mpx"]],["application/x-qpro","wb1"],["application/x-rar-compressed","rar"],["application/x-rtf","rtf"],["application/x-sdp","sdp"],["application/x-sea","sea"],["application/x-seelogo","sl"],["application/x-sh","sh"],["application/x-shar",["shar","sh"]],["application/x-shockwave-flash","swf"],["application/x-silverlight-app","xap"],["application/x-sit","sit"],["application/x-sprite",["spr","sprite"]],["application/x-stuffit","sit"],["application/x-stuffitx","sitx"],["application/x-sv4cpio","sv4cpio"],["application/x-sv4crc","sv4crc"],["application/x-tar","tar"],["application/x-tbook",["sbk","tbk"]],["application/x-tcl","tcl"],["application/x-tex","tex"],["application/x-tex-tfm","tfm"],["application/x-texinfo",["texi","texinfo"]],["application/x-troff",["roff","t","tr"]],["application/x-troff-man","man"],["application/x-troff-me","me"],["application/x-troff-ms","ms"],["application/x-troff-msvideo","avi"],["application/x-ustar","ustar"],["application/x-visio",["vsd","vst","vsw"]],["application/x-vnd.audioexplosion.mzz","mzz"],["application/x-vnd.ls-xpix","xpix"],["application/x-vrml","vrml"],["application/x-wais-source",["src","wsrc"]],["application/x-winhelp","hlp"],["application/x-wintalk","wtk"],["application/x-world",["wrl","svr"]],["application/x-wpwin","wpd"],["application/x-wri","wri"],["application/x-x509-ca-cert",["cer","crt","der"]],["application/x-x509-user-cert","crt"],["application/x-xfig","fig"],["application/x-xpinstall","xpi"],["application/x-zip-compressed","zip"],["application/xcap-diff+xml","xdf"],["application/xenc+xml","xenc"],["application/xhtml+xml","xhtml"],["application/xml","xml"],["application/xml-dtd","dtd"],["application/xop+xml","xop"],["application/xslt+xml","xslt"],["application/xspf+xml","xspf"],["application/xv+xml","mxml"],["application/yang","yang"],["application/yin+xml","yin"],["application/ynd.ms-pkipko","pko"],["application/zip","zip"],["audio/adpcm","adp"],["audio/aiff",["aiff","aif","aifc"]],["audio/basic",["snd","au"]],["audio/it","it"],["audio/make",["funk","my","pfunk"]],["audio/make.my.funk","pfunk"],["audio/mid",["mid","rmi"]],["audio/midi",["midi","kar","mid"]],["audio/mod","mod"],["audio/mp4","mp4a"],["audio/mpeg",["mpga","mp3","m2a","mp2","mpa","mpg"]],["audio/mpeg3","mp3"],["audio/nspaudio",["la","lma"]],["audio/ogg","oga"],["audio/s3m","s3m"],["audio/tsp-audio","tsi"],["audio/tsplayer","tsp"],["audio/vnd.dece.audio","uva"],["audio/vnd.digital-winds","eol"],["audio/vnd.dra","dra"],["audio/vnd.dts","dts"],["audio/vnd.dts.hd","dtshd"],["audio/vnd.lucent.voice","lvp"],["audio/vnd.ms-playready.media.pya","pya"],["audio/vnd.nuera.ecelp4800","ecelp4800"],["audio/vnd.nuera.ecelp7470","ecelp7470"],["audio/vnd.nuera.ecelp9600","ecelp9600"],["audio/vnd.qcelp","qcp"],["audio/vnd.rip","rip"],["audio/voc","voc"],["audio/voxware","vox"],["audio/wav","wav"],["audio/webm","weba"],["audio/x-aac","aac"],["audio/x-adpcm","snd"],["audio/x-aiff",["aiff","aif","aifc"]],["audio/x-au","au"],["audio/x-gsm",["gsd","gsm"]],["audio/x-jam","jam"],["audio/x-liveaudio","lam"],["audio/x-mid",["mid","midi"]],["audio/x-midi",["midi","mid"]],["audio/x-mod","mod"],["audio/x-mpeg","mp2"],["audio/x-mpeg-3","mp3"],["audio/x-mpegurl","m3u"],["audio/x-mpequrl","m3u"],["audio/x-ms-wax","wax"],["audio/x-ms-wma","wma"],["audio/x-nspaudio",["la","lma"]],["audio/x-pn-realaudio",["ra","ram","rm","rmm","rmp"]],["audio/x-pn-realaudio-plugin",["ra","rmp","rpm"]],["audio/x-psid","sid"],["audio/x-realaudio","ra"],["audio/x-twinvq","vqf"],["audio/x-twinvq-plugin",["vqe","vql"]],["audio/x-vnd.audioexplosion.mjuicemediafile","mjf"],["audio/x-voc","voc"],["audio/x-wav","wav"],["audio/xm","xm"],["chemical/x-cdx","cdx"],["chemical/x-cif","cif"],["chemical/x-cmdf","cmdf"],["chemical/x-cml","cml"],["chemical/x-csml","csml"],["chemical/x-pdb",["pdb","xyz"]],["chemical/x-xyz","xyz"],["drawing/x-dwf","dwf"],["i-world/i-vrml","ivr"],["image/bmp",["bmp","bm"]],["image/cgm","cgm"],["image/cis-cod","cod"],["image/cmu-raster",["ras","rast"]],["image/fif","fif"],["image/florian",["flo","turbot"]],["image/g3fax","g3"],["image/gif","gif"],["image/ief",["ief","iefs"]],["image/jpeg",["jpeg","jpe","jpg","jfif","jfif-tbnl"]],["image/jutvision","jut"],["image/ktx","ktx"],["image/naplps",["nap","naplps"]],["image/pict",["pic","pict"]],["image/pipeg","jfif"],["image/pjpeg",["jfif","jpe","jpeg","jpg"]],["image/png",["png","x-png"]],["image/prs.btif","btif"],["image/svg+xml","svg"],["image/tiff",["tif","tiff"]],["image/vasa","mcf"],["image/vnd.adobe.photoshop","psd"],["image/vnd.dece.graphic","uvi"],["image/vnd.djvu","djvu"],["image/vnd.dvb.subtitle","sub"],["image/vnd.dwg",["dwg","dxf","svf"]],["image/vnd.dxf","dxf"],["image/vnd.fastbidsheet","fbs"],["image/vnd.fpx","fpx"],["image/vnd.fst","fst"],["image/vnd.fujixerox.edmics-mmr","mmr"],["image/vnd.fujixerox.edmics-rlc","rlc"],["image/vnd.ms-modi","mdi"],["image/vnd.net-fpx",["fpx","npx"]],["image/vnd.rn-realflash","rf"],["image/vnd.rn-realpix","rp"],["image/vnd.wap.wbmp","wbmp"],["image/vnd.xiff","xif"],["image/webp","webp"],["image/x-cmu-raster","ras"],["image/x-cmx","cmx"],["image/x-dwg",["dwg","dxf","svf"]],["image/x-freehand","fh"],["image/x-icon","ico"],["image/x-jg","art"],["image/x-jps","jps"],["image/x-niff",["niff","nif"]],["image/x-pcx","pcx"],["image/x-pict",["pct","pic"]],["image/x-portable-anymap","pnm"],["image/x-portable-bitmap","pbm"],["image/x-portable-graymap","pgm"],["image/x-portable-greymap","pgm"],["image/x-portable-pixmap","ppm"],["image/x-quicktime",["qif","qti","qtif"]],["image/x-rgb","rgb"],["image/x-tiff",["tif","tiff"]],["image/x-windows-bmp","bmp"],["image/x-xbitmap","xbm"],["image/x-xbm","xbm"],["image/x-xpixmap",["xpm","pm"]],["image/x-xwd","xwd"],["image/x-xwindowdump","xwd"],["image/xbm","xbm"],["image/xpm","xpm"],["message/rfc822",["eml","mht","mhtml","nws","mime"]],["model/iges",["iges","igs"]],["model/mesh","msh"],["model/vnd.collada+xml","dae"],["model/vnd.dwf","dwf"],["model/vnd.gdl","gdl"],["model/vnd.gtw","gtw"],["model/vnd.mts","mts"],["model/vnd.vtu","vtu"],["model/vrml",["vrml","wrl","wrz"]],["model/x-pov","pov"],["multipart/x-gzip","gzip"],["multipart/x-ustar","ustar"],["multipart/x-zip","zip"],["music/crescendo",["mid","midi"]],["music/x-karaoke","kar"],["paleovu/x-pv","pvu"],["text/asp","asp"],["text/calendar","ics"],["text/css","css"],["text/csv","csv"],["text/ecmascript","js"],["text/h323","323"],["text/html",["html","htm","stm","acgi","htmls","htx","shtml"]],["text/iuls","uls"],["text/javascript","js"],["text/mcf","mcf"],["text/n3","n3"],["text/pascal","pas"],["text/plain",["txt","bas","c","h","c++","cc","com","conf","cxx","def","f","f90","for","g","hh","idc","jav","java","list","log","lst","m","mar","pl","sdml","text"]],["text/plain-bas","par"],["text/prs.lines.tag","dsc"],["text/richtext",["rtx","rt","rtf"]],["text/scriplet","wsc"],["text/scriptlet","sct"],["text/sgml",["sgm","sgml"]],["text/tab-separated-values","tsv"],["text/troff","t"],["text/turtle","ttl"],["text/uri-list",["uni","unis","uri","uris"]],["text/vnd.abc","abc"],["text/vnd.curl","curl"],["text/vnd.curl.dcurl","dcurl"],["text/vnd.curl.mcurl","mcurl"],["text/vnd.curl.scurl","scurl"],["text/vnd.fly","fly"],["text/vnd.fmi.flexstor","flx"],["text/vnd.graphviz","gv"],["text/vnd.in3d.3dml","3dml"],["text/vnd.in3d.spot","spot"],["text/vnd.rn-realtext","rt"],["text/vnd.sun.j2me.app-descriptor","jad"],["text/vnd.wap.wml","wml"],["text/vnd.wap.wmlscript","wmls"],["text/webviewhtml","htt"],["text/x-asm",["asm","s"]],["text/x-audiosoft-intra","aip"],["text/x-c",["c","cc","cpp"]],["text/x-component","htc"],["text/x-fortran",["for","f","f77","f90"]],["text/x-h",["h","hh"]],["text/x-java-source",["java","jav"]],["text/x-java-source,java","java"],["text/x-la-asf","lsx"],["text/x-m","m"],["text/x-pascal","p"],["text/x-script","hlb"],["text/x-script.csh","csh"],["text/x-script.elisp","el"],["text/x-script.guile","scm"],["text/x-script.ksh","ksh"],["text/x-script.lisp","lsp"],["text/x-script.perl","pl"],["text/x-script.perl-module","pm"],["text/x-script.phyton","py"],["text/x-script.rexx","rexx"],["text/x-script.scheme","scm"],["text/x-script.sh","sh"],["text/x-script.tcl","tcl"],["text/x-script.tcsh","tcsh"],["text/x-script.zsh","zsh"],["text/x-server-parsed-html",["shtml","ssi"]],["text/x-setext","etx"],["text/x-sgml",["sgm","sgml"]],["text/x-speech",["spc","talk"]],["text/x-uil","uil"],["text/x-uuencode",["uu","uue"]],["text/x-vcalendar","vcs"],["text/x-vcard","vcf"],["text/xml","xml"],["video/3gpp","3gp"],["video/3gpp2","3g2"],["video/animaflex","afl"],["video/avi","avi"],["video/avs-video","avs"],["video/dl","dl"],["video/fli","fli"],["video/gl","gl"],["video/h261","h261"],["video/h263","h263"],["video/h264","h264"],["video/jpeg","jpgv"],["video/jpm","jpm"],["video/mj2","mj2"],["video/mp4","mp4"],["video/mpeg",["mpeg","mp2","mpa","mpe","mpg","mpv2","m1v","m2v","mp3"]],["video/msvideo","avi"],["video/ogg","ogv"],["video/quicktime",["mov","qt","moov"]],["video/vdo","vdo"],["video/vivo",["viv","vivo"]],["video/vnd.dece.hd","uvh"],["video/vnd.dece.mobile","uvm"],["video/vnd.dece.pd","uvp"],["video/vnd.dece.sd","uvs"],["video/vnd.dece.video","uvv"],["video/vnd.fvt","fvt"],["video/vnd.mpegurl","mxu"],["video/vnd.ms-playready.media.pyv","pyv"],["video/vnd.rn-realvideo","rv"],["video/vnd.uvvu.mp4","uvu"],["video/vnd.vivo",["viv","vivo"]],["video/vosaic","vos"],["video/webm","webm"],["video/x-amt-demorun","xdr"],["video/x-amt-showrun","xsr"],["video/x-atomic3d-feature","fmf"],["video/x-dl","dl"],["video/x-dv",["dif","dv"]],["video/x-f4v","f4v"],["video/x-fli","fli"],["video/x-flv","flv"],["video/x-gl","gl"],["video/x-isvideo","isu"],["video/x-la-asf",["lsf","lsx"]],["video/x-m4v","m4v"],["video/x-motion-jpeg","mjpg"],["video/x-mpeg",["mp3","mp2"]],["video/x-mpeq2a","mp2"],["video/x-ms-asf",["asf","asr","asx"]],["video/x-ms-asf-plugin","asx"],["video/x-ms-wm","wm"],["video/x-ms-wmv","wmv"],["video/x-ms-wmx","wmx"],["video/x-ms-wvx","wvx"],["video/x-msvideo","avi"],["video/x-qtc","qtc"],["video/x-scm","scm"],["video/x-sgi-movie",["movie","mv"]],["windows/metafile","wmf"],["www/mime","mime"],["x-conference/x-cooltalk","ice"],["x-music/x-midi",["mid","midi"]],["x-world/x-3dmf",["3dm","3dmf","qd3","qd3d"]],["x-world/x-svr","svr"],["x-world/x-vrml",["flr","vrml","wrl","wrz","xaf","xof"]],["x-world/x-vrt","vrt"],["xgl/drawing","xgz"],["xgl/movie","xmz"]]),i=new Map([["123","application/vnd.lotus-1-2-3"],["323","text/h323"],["*","application/octet-stream"],["3dm","x-world/x-3dmf"],["3dmf","x-world/x-3dmf"],["3dml","text/vnd.in3d.3dml"],["3g2","video/3gpp2"],["3gp","video/3gpp"],["7z","application/x-7z-compressed"],["a","application/octet-stream"],["aab","application/x-authorware-bin"],["aac","audio/x-aac"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abc","text/vnd.abc"],["abw","application/x-abiword"],["ac","application/pkix-attr-cert"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acgi","text/html"],["acu","application/vnd.acucobol"],["acx","application/internet-property-stream"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afl","video/animaflex"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/postscript"],["aif",["audio/aiff","audio/x-aiff"]],["aifc",["audio/aiff","audio/x-aiff"]],["aiff",["audio/aiff","audio/x-aiff"]],["aim","application/x-aim"],["aip","text/x-audiosoft-intra"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["ani","application/x-navi-animation"],["aos","application/x-nokia-9000-communicator-add-on-software"],["apk","application/vnd.android.package-archive"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["aps","application/mime"],["arc","application/octet-stream"],["arj",["application/arj","application/octet-stream"]],["art","image/x-jg"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asp","text/asp"],["asr","video/x-ms-asf"],["asx",["video/x-ms-asf","application/x-mplayer2","video/x-ms-asf-plugin"]],["atc","application/vnd.acucorp"],["atomcat","application/atomcat+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au",["audio/basic","audio/x-au"]],["avi",["video/avi","video/msvideo","application/x-troff-msvideo","video/x-msvideo"]],["avs","video/avs-video"],["aw","application/applixware"],["axs","application/olescript"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azw","application/vnd.amazon.ebook"],["bas","text/plain"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin",["application/octet-stream","application/mac-binary","application/macbinary","application/x-macbinary","application/x-binary"]],["bm","image/bmp"],["bmi","application/vnd.bmi"],["bmp",["image/bmp","image/x-windows-bmp"]],["boo","application/book"],["book","application/book"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bsh","application/x-bsh"],["btif","image/prs.btif"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c",["text/plain","text/x-c"]],["c++","text/plain"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["c4g","application/vnd.clonk.c4group"],["cab","application/vnd.ms-cab-compressed"],["car","application/vnd.curl.car"],["cat",["application/vnd.ms-pkiseccat","application/vnd.ms-pki.seccat"]],["cc",["text/plain","text/x-c"]],["ccad","application/clariscad"],["cco","application/x-cocoa"],["ccxml","application/ccxml+xml,"],["cdbcmsg","application/vnd.contact.cmsg"],["cdf",["application/cdf","application/x-cdf","application/x-netcdf"]],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer",["application/pkix-cert","application/x-x509-ca-cert"]],["cgm","image/cgm"],["cha","application/x-chat"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cla","application/vnd.claymore"],["class",["application/octet-stream","application/java","application/java-byte-code","application/java-vm","application/x-java-class"]],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod",["image/cis-cod","application/vnd.rim.cod"]],["com",["application/octet-stream","text/plain"]],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt",["application/mac-compactpro","application/x-compactpro","application/x-cpt"]],["crd","application/x-mscardfile"],["crl",["application/pkix-crl","application/pkcs-crl"]],["crt",["application/pkix-cert","application/x-x509-user-cert","application/x-x509-ca-cert"]],["cryptonote","application/vnd.rig.cryptonote"],["csh",["text/x-script.csh","application/x-csh"]],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["css",["text/css","application/x-pointplus"]],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxx","text/plain"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["davmount","application/davmount+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["deb","application/x-debian-package"],["deepv","application/x-deepv"],["def","text/plain"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dif","video/x-dv"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["djvu","image/vnd.djvu"],["dl",["video/dl","video/x-dl"]],["dll","application/x-msdownload"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.document.macroenabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroenabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp",["application/commonground","application/vnd.osgi.dp"]],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drw","application/drafting"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dv","video/x-dv"],["dvi","application/x-dvi"],["dwf",["model/vnd.dwf","drawing/x-dwf"]],["dwg",["application/acad","image/vnd.dwg","image/x-dwg"]],["dxf",["application/dxf","image/vnd.dwg","image/vnd.dxf","image/x-dwg"]],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["el","text/x-script.elisp"],["elc",["application/x-elc","application/x-bytecode.elisp"]],["eml","message/rfc822"],["emma","application/emma+xml"],["env","application/x-envoy"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es",["application/ecmascript","application/x-esrehber"]],["es3","application/vnd.eszigno3+xml"],["esf","application/vnd.epson.esf"],["etx","text/x-setext"],["evy",["application/envoy","application/x-envoy"]],["exe",["application/octet-stream","application/x-msdownload"]],["exi","application/exi"],["ext","application/vnd.novadigm.ext"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f",["text/plain","text/x-fortran"]],["f4v","video/x-f4v"],["f77","text/x-fortran"],["f90",["text/plain","text/x-fortran"]],["fbs","image/vnd.fastbidsheet"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fh","image/x-freehand"],["fif",["application/fractals","image/fif"]],["fig","application/x-xfig"],["fli",["video/fli","video/x-fli"]],["flo",["image/florian","application/vnd.micrografx.flo"]],["flr","x-world/x-vrml"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fmf","video/x-atomic3d-feature"],["fnc","application/vnd.frogans.fnc"],["for",["text/plain","text/x-fortran"]],["fpx",["image/vnd.fpx","image/vnd.net-fpx"]],["frl","application/freeloader"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["funk","audio/make"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g","text/plain"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gdl","model/vnd.gdl"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["gl",["video/gl","video/x-gl"]],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gph","application/vnd.flographit"],["gqf","application/vnd.grafeq"],["gram","application/srgs"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsd","audio/x-gsm"],["gsf","application/x-font-ghostscript"],["gsm","audio/x-gsm"],["gsp","application/x-gsp"],["gss","application/x-gss"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxt","application/vnd.geonext"],["gz",["application/x-gzip","application/x-compressed"]],["gzip",["multipart/x-gzip","application/x-gzip"]],["h",["text/plain","text/x-h"]],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hdf","application/x-hdf"],["help","application/x-helpfile"],["hgl","application/vnd.hp-hpgl"],["hh",["text/plain","text/x-h"]],["hlb","text/x-script"],["hlp",["application/winhlp","application/hlp","application/x-helpfile","application/x-winhelp"]],["hpg","application/vnd.hp-hpgl"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx",["application/mac-binhex40","application/binhex","application/binhex4","application/mac-binhex","application/x-binhex40","application/x-mac-binhex40"]],["hta","application/hta"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["htmls","text/html"],["htt","text/webviewhtml"],["htx","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["ico","image/x-icon"],["ics","text/calendar"],["idc","text/plain"],["ief","image/ief"],["iefs","image/ief"],["ifm","application/vnd.shana.informed.formdata"],["iges",["application/iges","model/iges"]],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs",["application/iges","model/iges"]],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["iii","application/x-iphone"],["ima","application/x-ima"],["imap","application/x-httpd-imap"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["inf","application/inf"],["ins",["application/x-internet-signup","application/x-internett-signup"]],["ip","application/x-ip2"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["isp","application/x-internet-signup"],["isu","video/x-isvideo"],["it","audio/it"],["itp","application/vnd.shana.informed.formtemplate"],["iv","application/x-inventor"],["ivp","application/vnd.immervision-ivp"],["ivr","i-world/i-vrml"],["ivu","application/vnd.immervision-ivu"],["ivy","application/x-livescreen"],["jad","text/vnd.sun.j2me.app-descriptor"],["jam",["application/vnd.jam","audio/x-jam"]],["jar","application/java-archive"],["jav",["text/plain","text/x-java-source"]],["java",["text/plain","text/x-java-source,java","text/x-java-source"]],["jcm","application/x-java-commerce"],["jfif",["image/pipeg","image/jpeg","image/pjpeg"]],["jfif-tbnl","image/jpeg"],["jisp","application/vnd.jisp"],["jlt","application/vnd.hp-jlyt"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jpe",["image/jpeg","image/pjpeg"]],["jpeg",["image/jpeg","image/pjpeg"]],["jpg",["image/jpeg","image/pjpeg"]],["jpgv","video/jpeg"],["jpm","video/jpm"],["jps","image/x-jps"],["js",["application/javascript","application/ecmascript","text/javascript","text/ecmascript","application/x-javascript"]],["json","application/json"],["jut","image/jutvision"],["kar",["audio/midi","music/x-karaoke"]],["karbon","application/vnd.kde.karbon"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["ksh",["application/x-ksh","text/x-script.ksh"]],["ksp","application/vnd.kde.kspread"],["ktx","image/ktx"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["la",["audio/nspaudio","audio/x-nspaudio"]],["lam","audio/x-liveaudio"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["lha",["application/octet-stream","application/lha","application/x-lha"]],["lhx","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["lma",["audio/nspaudio","audio/x-nspaudio"]],["log","text/plain"],["lrm","application/vnd.ms-lrm"],["lsf","video/x-la-asf"],["lsp",["application/x-lisp","text/x-script.lisp"]],["lst","text/plain"],["lsx",["video/x-la-asf","text/x-la-asf"]],["ltf","application/vnd.frogans.ltf"],["ltx","application/x-latex"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh",["application/octet-stream","application/x-lzh"]],["lzx",["application/lzx","application/octet-stream","application/x-lzx"]],["m",["text/plain","text/x-m"]],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m1v","video/mpeg"],["m21","application/mp21"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3u",["audio/x-mpegurl","audio/x-mpequrl"]],["m3u8","application/vnd.apple.mpegurl"],["m4v","video/x-m4v"],["ma","application/mathematica"],["mads","application/mads+xml"],["mag","application/vnd.ecowin.chart"],["man","application/x-troff-man"],["map","application/x-navimap"],["mar","text/plain"],["mathml","application/mathml+xml"],["mbd","application/mbedlet"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc$","application/x-magic-cap-package-1.0"],["mc1","application/vnd.medcalcdata"],["mcd",["application/mcad","application/vnd.mcd","application/x-mathcad"]],["mcf",["image/vasa","text/mcf"]],["mcp","application/netmc"],["mcurl","text/vnd.curl.mcurl"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["me","application/x-troff-me"],["meta4","application/metalink4+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mht","message/rfc822"],["mhtml","message/rfc822"],["mid",["audio/mid","audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["midi",["audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["mif",["application/vnd.mif","application/x-mif","application/x-frame"]],["mime",["message/rfc822","www/mime"]],["mj2","video/mj2"],["mjf","audio/x-vnd.audioexplosion.mjuicemediafile"],["mjpg","video/x-motion-jpeg"],["mlp","application/vnd.dolby.mlp"],["mm",["application/base64","application/x-meme"]],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mme","application/base64"],["mmf","application/vnd.smaf"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mny","application/x-msmoney"],["mod",["audio/mod","audio/x-mod"]],["mods","application/mods+xml"],["moov","video/quicktime"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2",["video/mpeg","audio/mpeg","video/x-mpeg","audio/x-mpeg","video/x-mpeq2a"]],["mp3",["audio/mpeg","audio/mpeg3","video/mpeg","audio/x-mpeg-3","video/x-mpeg"]],["mp4",["video/mp4","application/mp4"]],["mp4a","audio/mp4"],["mpa",["video/mpeg","audio/mpeg"]],["mpc",["application/vnd.mophun.certificate","application/x-project"]],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg",["video/mpeg","audio/mpeg"]],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/x-project"],["mpv","application/x-project"],["mpv2","video/mpeg"],["mpx","application/x-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","application/x-troff-ms"],["mscml","application/mediaservercontrol+xml"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msl","application/vnd.mobius.msl"],["msty","application/vnd.muvee.style"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musicxml","application/vnd.recordare.musicxml+xml"],["mv","video/x-sgi-movie"],["mvb","application/x-msmediaview"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["my","audio/make"],["mzz","application/x-vnd.audioexplosion.mzz"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nap","image/naplps"],["naplps","image/naplps"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncm","application/vnd.nokia.configuration-message"],["ncx","application/x-dtbncx+xml"],["ngdat","application/vnd.nokia.n-gage.data"],["nif","image/x-niff"],["niff","image/x-niff"],["nix","application/x-mix-transfer"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nvd","application/x-navidoc"],["nws","message/rfc822"],["o","application/octet-stream"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omc","application/x-omc"],["omcd","application/x-omcdatamaker"],["omcr","application/x-omcregerator"],["onetoc","application/onenote"],["opf","application/oebps-package+xml"],["org","application/vnd.lotus-organizer"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","application/x-font-otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p10",["application/pkcs10","application/x-pkcs10"]],["p12",["application/pkcs-12","application/x-pkcs12"]],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7m",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7r","application/x-pkcs7-certreqresp"],["p7s",["application/pkcs7-signature","application/x-pkcs7-signature"]],["p8","application/pkcs8"],["par","text/plain-bas"],["part","application/pro_eng"],["pas","text/pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcf","application/x-font-pcf"],["pcl",["application/vnd.hp-pcl","application/x-pcl"]],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb",["application/vnd.palm","chemical/x-pdb"]],["pdf","application/pdf"],["pfa","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfunk",["audio/make","audio/make.my.funk"]],["pfx","application/x-pkcs12"],["pgm",["image/x-portable-graymap","image/x-portable-greymap"]],["pgn","application/x-chess-pgn"],["pgp","application/pgp-signature"],["pic",["image/pict","image/x-pict"]],["pict","image/pict"],["pkg","application/x-newton-compatible-pkg"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pko",["application/ynd.ms-pkipko","application/vnd.ms-pki.pko"]],["pl",["text/plain","text/x-script.perl"]],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["plx","application/x-pixclscript"],["pm",["text/x-script.perl-module","image/x-xpixmap"]],["pm4","application/x-pagemaker"],["pm5","application/x-pagemaker"],["pma","application/x-perfmon"],["pmc","application/x-perfmon"],["pml",["application/vnd.ctc-posml","application/x-perfmon"]],["pmr","application/x-perfmon"],["pmw","application/x-perfmon"],["png","image/png"],["pnm",["application/x-portable-anymap","image/x-portable-anymap"]],["portpkg","application/vnd.macports.portpkg"],["pot",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["potm","application/vnd.ms-powerpoint.template.macroenabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["pov","model/x-pov"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroenabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["ppsm","application/vnd.ms-powerpoint.slideshow.macroenabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt",["application/vnd.ms-powerpoint","application/mspowerpoint","application/powerpoint","application/x-mspowerpoint"]],["pptm","application/vnd.ms-powerpoint.presentation.macroenabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["ppz","application/mspowerpoint"],["prc","application/x-mobipocket-ebook"],["pre",["application/vnd.lotus-freelance","application/x-freelance"]],["prf","application/pics-rules"],["prt","application/pro_eng"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd",["application/octet-stream","image/vnd.adobe.photoshop"]],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pvu","paleovu/x-pv"],["pwn","application/vnd.3m.post-it-notes"],["pwz","application/vnd.ms-powerpoint"],["py","text/x-script.phyton"],["pya","audio/vnd.ms-playready.media.pya"],["pyc","application/x-bytecode.python"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qcp","audio/vnd.qcelp"],["qd3","x-world/x-3dmf"],["qd3d","x-world/x-3dmf"],["qfx","application/vnd.intu.qfx"],["qif","image/x-quicktime"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qtc","video/x-qtc"],["qti","image/x-quicktime"],["qtif","image/x-quicktime"],["qxd","application/vnd.quark.quarkxpress"],["ra",["audio/x-realaudio","audio/x-pn-realaudio","audio/x-pn-realaudio-plugin"]],["ram","audio/x-pn-realaudio"],["rar","application/x-rar-compressed"],["ras",["image/cmu-raster","application/x-cmu-raster","image/x-cmu-raster"]],["rast","image/cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rexx","text/x-script.rexx"],["rf","image/vnd.rn-realflash"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm",["application/vnd.rn-realmedia","audio/x-pn-realaudio"]],["rmi","audio/mid"],["rmm","audio/x-pn-realaudio"],["rmp",["audio/x-pn-realaudio-plugin","audio/x-pn-realaudio"]],["rms","application/vnd.jcp.javame.midlet-rms"],["rnc","application/relax-ng-compact-syntax"],["rng",["application/ringing-tones","application/vnd.nokia.ringing-tone"]],["rnx","application/vnd.rn-realplayer"],["roff","application/x-troff"],["rp","image/vnd.rn-realpix"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsd","application/rsd+xml"],["rt",["text/richtext","text/vnd.rn-realtext"]],["rtf",["application/rtf","text/richtext","application/x-rtf"]],["rtx",["text/richtext","application/rtf"]],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["saveme","application/octet-stream"],["sbk","application/x-tbook"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm",["application/vnd.lotus-screencam","video/x-scm","text/x-script.guile","application/x-lotusscreencam","text/x-script.scheme"]],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["sct","text/scriptlet"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkm","application/vnd.solent.sdkm+xml"],["sdml","text/plain"],["sdp",["application/sdp","application/x-sdp"]],["sdr","application/sounder"],["sdw","application/vnd.stardivision.writer"],["sea",["application/sea","application/x-sea"]],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["ser","application/java-serialized-object"],["set","application/set"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sgl","application/vnd.stardivision.writer-global"],["sgm",["text/sgml","text/x-sgml"]],["sgml",["text/sgml","text/x-sgml"]],["sh",["application/x-shar","application/x-bsh","application/x-sh","text/x-script.sh"]],["shar",["application/x-bsh","application/x-shar"]],["shf","application/shf+xml"],["shtml",["text/html","text/x-server-parsed-html"]],["sid","audio/x-psid"],["sis","application/vnd.symbian.install"],["sit",["application/x-stuffit","application/x-sit"]],["sitx","application/x-stuffitx"],["skd","application/x-koan"],["skm","application/x-koan"],["skp",["application/vnd.koan","application/x-koan"]],["skt","application/x-koan"],["sl","application/x-seelogo"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi",["application/smil","application/smil+xml"]],["smil","application/smil"],["snd",["audio/basic","audio/x-adpcm"]],["snf","application/x-font-snf"],["sol","application/solids"],["spc",["text/x-speech","application/x-pkcs7-certificates"]],["spf","application/vnd.yamaha.smaf-phrase"],["spl",["application/futuresplash","application/x-futuresplash"]],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spr","application/x-sprite"],["sprite","application/x-sprite"],["src","application/x-wais-source"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssi","text/x-server-parsed-html"],["ssm","application/streamingmedia"],["ssml","application/ssml+xml"],["sst",["application/vnd.ms-pkicertstore","application/vnd.ms-pki.certstore"]],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["step","application/step"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl",["application/vnd.ms-pkistl","application/sla","application/vnd.ms-pki.stl","application/x-navistyle"]],["stm","text/html"],["stp","application/step"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["sub","image/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svf",["image/vnd.dwg","image/x-dwg"]],["svg","image/svg+xml"],["svr",["x-world/x-svr","application/x-world"]],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t",["text/troff","application/x-troff"]],["talk","text/x-speech"],["tao","application/vnd.tao.intent-module-archive"],["tar","application/x-tar"],["tbk",["application/toolbook","application/x-tbook"]],["tcap","application/vnd.3gpp2.tcap"],["tcl",["text/x-script.tcl","application/x-tcl"]],["tcsh","text/x-script.tcsh"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text",["application/plain","text/plain"]],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tgz",["application/gnutar","application/x-compressed"]],["thmx","application/vnd.ms-officetheme"],["tif",["image/tiff","image/x-tiff"]],["tiff",["image/tiff","image/x-tiff"]],["tmo","application/vnd.tmobile-livetv"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","application/x-troff"],["tra","application/vnd.trueapp"],["trm","application/x-msterminal"],["tsd","application/timestamped-data"],["tsi","audio/tsp-audio"],["tsp",["application/dsptype","audio/tsplayer"]],["tsv","text/tab-separated-values"],["ttf","application/x-font-ttf"],["ttl","text/turtle"],["turbot","image/florian"],["twd","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["ufd","application/vnd.ufdl"],["uil","text/x-uil"],["uls","text/iuls"],["umj","application/vnd.umajin"],["uni","text/uri-list"],["unis","text/uri-list"],["unityweb","application/vnd.unity"],["unv","application/i-deas"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["ustar",["application/x-ustar","multipart/x-ustar"]],["utz","application/vnd.uiq.theme"],["uu",["application/octet-stream","text/x-uuencode"]],["uue","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vda","application/vda"],["vdo","video/vdo"],["vew","application/groupwise"],["vis","application/vnd.visionary"],["viv",["video/vivo","video/vnd.vivo"]],["vivo",["video/vivo","video/vnd.vivo"]],["vmd","application/vocaltec-media-desc"],["vmf","application/vocaltec-media-file"],["voc",["audio/voc","audio/x-voc"]],["vos","video/vosaic"],["vox","audio/voxware"],["vqe","audio/x-twinvq-plugin"],["vqf","audio/x-twinvq"],["vql","audio/x-twinvq-plugin"],["vrml",["model/vrml","x-world/x-vrml","application/x-vrml"]],["vrt","x-world/x-vrt"],["vsd",["application/vnd.visio","application/x-visio"]],["vsf","application/vnd.vsf"],["vst","application/x-visio"],["vsw","application/x-visio"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w60","application/wordperfect6.0"],["w61","application/wordperfect6.1"],["w6w","application/msword"],["wad","application/x-doom"],["wav",["audio/wav","audio/x-wav"]],["wax","audio/x-ms-wax"],["wb1","application/x-qpro"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/vnd.wap.wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["web","application/vnd.xara"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wiz","application/msword"],["wk1","application/x-123"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf",["windows/metafile","application/x-msmetafile"]],["wml","text/vnd.wap.wml"],["wmlc","application/vnd.wap.wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-ms-wmz"],["woff","application/x-font-woff"],["word","application/msword"],["wp","application/wordperfect"],["wp5",["application/wordperfect","application/wordperfect6.0"]],["wp6","application/wordperfect"],["wpd",["application/wordperfect","application/vnd.wordperfect","application/x-wpwin"]],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wq1","application/x-lotus"],["wqd","application/vnd.wqd"],["wri",["application/mswrite","application/x-wri","application/x-mswrite"]],["wrl",["model/vrml","x-world/x-vrml","application/x-world"]],["wrz",["model/vrml","x-world/x-vrml"]],["wsc","text/scriplet"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wsrc","application/x-wais-source"],["wtb","application/vnd.webturbo"],["wtk","application/x-wintalk"],["wvx","video/x-ms-wvx"],["x-png","image/png"],["x3d","application/vnd.hzn-3d-crossword"],["xaf","x-world/x-vrml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm",["image/xbm","image/x-xbm","image/x-xbitmap"]],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdr","video/x-amt-demorun"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xgz","xgl/drawing"],["xhtml","application/xhtml+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlam","application/vnd.ms-excel.addin.macroenabled.12"],["xlb",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlc",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xld",["application/excel","application/x-excel"]],["xlk",["application/excel","application/x-excel"]],["xll",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlm",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xls",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlsb","application/vnd.ms-excel.sheet.binary.macroenabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroenabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xltm","application/vnd.ms-excel.template.macroenabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlv",["application/excel","application/x-excel"]],["xlw",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xm","audio/xm"],["xml",["application/xml","text/xml","application/atom+xml","application/rss+xml"]],["xmz","xgl/movie"],["xo","application/vnd.olpc-sugar"],["xof","x-world/x-vrml"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpix","application/x-vnd.ls-xpix"],["xpm",["image/xpm","image/x-xpixmap"]],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xsr","video/x-amt-showrun"],["xul","application/vnd.mozilla.xul+xml"],["xwd",["image/x-xwd","image/x-xwindowdump"]],["xyz",["chemical/x-xyz","chemical/x-pdb"]],["yang","application/yang"],["yin","application/yin+xml"],["z",["application/x-compressed","application/x-compress"]],["zaz","application/vnd.zzazz.deck+xml"],["zip",["application/zip","multipart/x-zip","application/x-zip-compressed","application/x-compressed"]],["zir","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zoo","application/octet-stream"],["zsh","text/x-script.zsh"]]);return sA={detectMimeType(n){if(!n)return t;let r=e.parse(n),o=(r.ext.substr(1)||r.name||"").split("?").shift().trim().toLowerCase(),s=t;return i.has(o)&&(s=i.get(o)),Array.isArray(s)?s[0]:s},detectExtension(e){if(!e)return"bin";let t=(e||"").toLowerCase().trim().split("/"),i=t.shift().trim(),r=t.join("/").trim();if(n.has(i+"/"+r)){let e=n.get(i+"/"+r);return Array.isArray(e)?e[0]:e}return"text"===i?"txt":"bin"}}}function NA(){if(lA)return cA;lA=1;const e=2147483647,t=36,n=/^xn--/,i=/[^\0-\x7F]/,r=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=Math.floor,a=String.fromCharCode;function c(e){throw new RangeError(o[e])}function l(e,t){const n=e.split("@");let i="";n.length>1&&(i=n[0]+"@",e=n[1]);const o=function(e,t){const n=[];let i=e.length;for(;i--;)n[i]=t(e[i]);return n}((e=e.replace(r,".")).split("."),t).join(".");return i+o}function u(e){const t=[];let n=0;const i=e.length;for(;n<i;){const r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){const i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&r)<<10)+(1023&i)+65536):(t.push(r),n--)}else t.push(r)}return t}const p=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},d=function(e,n,i){let r=0;for(e=i?s(e/700):e>>1,e+=s(e/n);e>455;r+=t)e=s(e/35);return s(r+36*e/(e+38))},m=function(n){const i=[],r=n.length;let o=0,a=128,l=72,u=n.lastIndexOf("-");u<0&&(u=0);for(let e=0;e<u;++e)n.charCodeAt(e)>=128&&c("not-basic"),i.push(n.charCodeAt(e));for(let m=u>0?u+1:0;m<r;){const u=o;for(let i=1,a=t;;a+=t){m>=r&&c("invalid-input");const u=(p=n.charCodeAt(m++))>=48&&p<58?p-48+26:p>=65&&p<91?p-65:p>=97&&p<123?p-97:t;u>=t&&c("invalid-input"),u>s((e-o)/i)&&c("overflow"),o+=u*i;const d=a<=l?1:a>=l+26?26:a-l;if(u<d)break;const h=t-d;i>s(e/h)&&c("overflow"),i*=h}const h=i.length+1;l=d(o-u,h,0==u),s(o/h)>e-a&&c("overflow"),a+=s(o/h),o%=h,i.splice(o++,0,a)}var p;return String.fromCodePoint(...i)},h=function(n){const i=[],r=(n=u(n)).length;let o=128,l=0,m=72;for(const e of n)e<128&&i.push(a(e));const h=i.length;let f=h;for(h&&i.push("-");f<r;){let r=e;for(const e of n)e>=o&&e<r&&(r=e);const u=f+1;r-o>s((e-l)/u)&&c("overflow"),l+=(r-o)*u,o=r;for(const r of n)if(r<o&&++l>e&&c("overflow"),r===o){let e=l;for(let n=t;;n+=t){const r=n<=m?1:n>=m+26?26:n-m;if(e<r)break;const o=e-r,c=t-r;i.push(a(p(r+o%c,0))),e=s(o/c)}i.push(a(p(e,0))),m=d(l,u,f===h),l=0,++f}++l,++o}return i.join("")};return cA={version:"2.3.1",ucs2:{decode:u,encode:e=>String.fromCodePoint(...e)},decode:m,encode:h,toASCII:function(e){return l(e,(function(e){return i.test(e)?"xn--"+h(e):e}))},toUnicode:function(e){return l(e,(function(e){return n.test(e)?m(e.slice(4).toLowerCase()):e}))}}}function DA(){if(pA)return uA;pA=1;const e=c.Transform;function t(e){return"string"==typeof e&&(e=Buffer.from(e,"utf-8")),e.toString("base64")}function n(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let n=[],i=0,r=1024*t;for(;i<e.length;){let o=e.substr(i,r).replace(new RegExp(".{"+t+"}","g"),"$&\r\n").trim();n.push(o),i+=r}return n.join("\r\n").trim()}return uA={encode:t,wrap:n,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this._remainingBytes=!1,this.inputBytes=0,this.outputBytes=0}_transform(e,i,r){if("buffer"!==i&&(e=Buffer.from(e,i)),!e||!e.length)return setImmediate(r);this.inputBytes+=e.length,this._remainingBytes&&this._remainingBytes.length&&(e=Buffer.concat([this._remainingBytes,e],this._remainingBytes.length+e.length),this._remainingBytes=!1),e.length%3?(this._remainingBytes=e.slice(e.length-e.length%3),e=e.slice(0,e.length-e.length%3)):this._remainingBytes=!1;let o=this._curLine+t(e);if(this.options.lineLength){o=n(o,this.options.lineLength);let e=o.lastIndexOf("\n");e<0?(this._curLine=o,o=""):e===o.length-1?this._curLine="":(this._curLine=o.substr(e+1),o=o.substr(0,e+1))}o&&(this.outputBytes+=o.length,this.push(Buffer.from(o,"ascii"))),setImmediate(r)}_flush(e){this._remainingBytes&&this._remainingBytes.length&&(this._curLine+=t(this._remainingBytes)),this._curLine&&(this._curLine=n(this._curLine,this.options.lineLength),this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii"),this._curLine=""),e()}}}}function LA(){if(mA)return dA;mA=1;const e=c.Transform;function t(e){"string"==typeof e&&(e=Buffer.from(e,"utf-8"));let t,n=[[9],[10],[13],[32,60],[62,126]],r="";for(let o=0,s=e.length;o<s;o++)t=e[o],i(t,n)&&(32!==t&&9!==t||o!==s-1&&10!==e[o+1]&&13!==e[o+1])?r+=String.fromCharCode(t):r+="="+(t<16?"0":"")+t.toString(16).toUpperCase();return r}function n(e,t){if(t=t||76,(e=(e||"").toString()).length<=t)return e;let n,i,r,o=0,s=e.length,a=Math.floor(t/3),c="";for(;o<s;)if(r=e.substr(o,t),n=r.match(/\r\n/))r=r.substr(0,n.index+n[0].length),c+=r,o+=r.length;else if("\n"!==r.substr(-1))if(n=r.substr(-a).match(/\n.*?$/))r=r.substr(0,r.length-(n[0].length-1)),c+=r,o+=r.length;else{if(r.length>t-a&&(n=r.substr(-a).match(/[ \t.,!?][^ \t.,!?]*$/)))r=r.substr(0,r.length-(n[0].length-1));else if(r.match(/[=][\da-f]{0,2}$/i))for((n=r.match(/[=][\da-f]{0,1}$/i))&&(r=r.substr(0,r.length-n[0].length));r.length>3&&r.length<s-o&&!r.match(/^(?:=[\da-f]{2}){1,4}$/i)&&(n=r.match(/[=][\da-f]{2}$/gi))&&(i=parseInt(n[0].substr(1,2),16),!(i<128))&&(r=r.substr(0,r.length-3),!(i>=192)););o+r.length<s&&"\n"!==r.substr(-1)?(r.length===t&&r.match(/[=][\da-f]{2}$/i)?r=r.substr(0,r.length-3):r.length===t&&(r=r.substr(0,r.length-1)),o+=r.length,r+="=\r\n"):o+=r.length,c+=r}else c+=r,o+=r.length;return c}function i(e,t){for(let n=t.length-1;n>=0;n--)if(t[n].length){if(1===t[n].length&&e===t[n][0])return!0;if(2===t[n].length&&e>=t[n][0]&&e<=t[n][1])return!0}return!1}return dA={encode:t,wrap:n,Encoder:class extends e{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this.inputBytes=0,this.outputBytes=0}_transform(e,i,r){let o;if("buffer"!==i&&(e=Buffer.from(e,i)),!e||!e.length)return r();this.inputBytes+=e.length,this.options.lineLength?(o=this._curLine+t(e),o=n(o,this.options.lineLength),o=o.replace(/(^|\n)([^\n]*)$/,((e,t,n)=>(this._curLine=n,t))),o&&(this.outputBytes+=o.length,this.push(o))):(o=t(e),this.outputBytes+=o.length,this.push(o,"ascii")),r()}_flush(e){this._curLine&&(this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii")),e()}}}}function zA(){if(fA)return hA;fA=1;const e=DA(),t=LA(),n=$A();return hA={isPlainText:(e,t)=>"string"==typeof e&&!(t?/[\x00-\x08\x0b\x0c\x0e-\x1f"\u0080-\uFFFF]/:/[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/).test(e),hasLongerLines:(e,t)=>e.length>131072||new RegExp("^.{"+(t+1)+",}","m").test(e),encodeWord(n,i,r){let o;if((r=r||0)&&r>12&&(r-=12),"Q"===(i=(i||"Q").toString().toUpperCase().trim().charAt(0))?o=t.encode(n).replace(/[^a-z0-9!*+\-/=]/gi,(e=>{let t=e.charCodeAt(0).toString(16).toUpperCase();return" "===e?"_":"="+(1===t.length?"0"+t:t)})):"B"===i&&(o="string"==typeof n?n:e.encode(n),r=r?Math.max(3,(r-r%4)/4*3):0),r&&("B"!==i?o:e.encode(n)).length>r)if("Q"===i)o=this.splitMimeEncodedString(o,r).join("?= =?UTF-8?"+i+"?");else{let t=[],n="";for(let i=0,s=o.length;i<s;i++){let a=o.charAt(i);/[\ud83c\ud83d\ud83e]/.test(a)&&i<s-1&&(a+=o.charAt(++i)),Buffer.byteLength(n+a)<=r||0===i?n+=a:(t.push(e.encode(n)),n=a)}n&&t.push(e.encode(n)),o=t.length>1?t.join("?= =?UTF-8?"+i+"?"):t.join("")}else"B"===i&&(o=e.encode(n));return"=?UTF-8?"+i+"?"+o+("?="===o.substr(-2)?"":"?=")},encodeWords(e,t,n,i){let r;n=n||0;let o=e.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);if(!o)return e;if(i)return this.encodeWord(e,t,n);let s=e.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);if(!s)return e;let a=o.index+(o[0].match(/[^\s]/)||{index:0}).index,c=s.index+(s[1]||"").length;return r=(a?e.substr(0,a):"")+this.encodeWord(e.substring(a,c),t||"Q",n)+(c<e.length?e.substr(c):""),r},buildHeaderValue(e){let t=[];return Object.keys(e.params||{}).forEach((n=>{let i=e.params[n];!this.isPlainText(i,!0)||i.length>=75?this.buildHeaderParam(n,i,50).forEach((e=>{/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(e.value)&&"*"!==e.key.substr(-1)?t.push(e.key+"="+JSON.stringify(e.value)):t.push(e.key+"="+e.value)})):/[\s'"\\;:/=(),<>@[\]?]|^-/.test(i)?t.push(n+"="+JSON.stringify(i)):t.push(n+"="+i)})),e.value+(t.length?"; "+t.join("; "):"")},buildHeaderParam(e,t,n){let i,r,o,s,a,c,l=[],u="string"==typeof t?t:(t||"").toString(),p=0;if(n=n||50,this.isPlainText(t,!0)){if(u.length<=n)return[{key:e,value:u}];u=u.replace(new RegExp(".{"+n+"}","g"),(e=>(l.push({line:e}),""))),u&&l.push({line:u})}else{if(/[\uD800-\uDBFF]/.test(u)){for(i=[],a=0,c=u.length;a<c;a++)r=u.charAt(a),o=r.charCodeAt(0),o>=55296&&o<=56319&&a<c-1?(r+=u.charAt(a+1),i.push(r),a++):i.push(r);u=i}s="utf-8''";let e=!0;for(p=0,a=0,c=u.length;a<c;a++){if(r=u[a],e)r=this.safeEncodeURIComponent(r);else if(r=" "===r?r:this.safeEncodeURIComponent(r),r!==u[a]){if(!((this.safeEncodeURIComponent(s)+r).length>=n)){e=!0,a=p,s="";continue}l.push({line:s,encoded:e}),s="",p=a-1}(s+r).length>=n?(l.push({line:s,encoded:e}),s=r=" "===u[a]?" ":this.safeEncodeURIComponent(u[a]),r===u[a]?(e=!1,p=a-1):e=!0):s+=r}s&&l.push({line:s,encoded:e})}return l.map(((t,n)=>({key:e+"*"+n+(t.encoded?"*":""),value:t.line})))},parseHeaderValue(e){let t,n={value:!1,params:{}},i=!1,r="",o="value",s=!1,a=!1;for(let c=0,l=e.length;c<l;c++)if(t=e.charAt(c),"key"===o){if("="===t){i=r.trim().toLowerCase(),o="value",r="";continue}r+=t}else{if(a)r+=t;else{if("\\"===t){a=!0;continue}s&&t===s?s=!1:s||'"'!==t?s||";"!==t?r+=t:(!1===i?n.value=r.trim():n.params[i]=r.trim(),o="key",r=""):s=t}a=!1}return"value"===o?!1===i?n.value=r.trim():n.params[i]=r.trim():r.trim()&&(n.params[r.trim().toLowerCase()]=""),Object.keys(n.params).forEach((e=>{let t,i,r,o;(r=e.match(/(\*(\d+)|\*(\d+)\*|\*)$/))&&(t=e.substr(0,r.index),i=Number(r[2]||r[3])||0,n.params[t]&&"object"==typeof n.params[t]||(n.params[t]={charset:!1,values:[]}),o=n.params[e],0===i&&"*"===r[0].substr(-1)&&(r=o.match(/^([^']*)'[^']*'(.*)$/))&&(n.params[t].charset=r[1]||"iso-8859-1",o=r[2]),n.params[t].values[i]=o,delete n.params[e])})),Object.keys(n.params).forEach((e=>{let t;n.params[e]&&Array.isArray(n.params[e].values)&&(t=n.params[e].values.map((e=>e||"")).join(""),n.params[e].charset?n.params[e]="=?"+n.params[e].charset+"?Q?"+t.replace(/[=?_\s]/g,(e=>{let t=e.charCodeAt(0).toString(16);return" "===e?"_":"%"+(t.length<2?"0":"")+t})).replace(/%/g,"=")+"?=":n.params[e]=t)})),n},detectExtension:e=>n.detectExtension(e),detectMimeType:e=>n.detectMimeType(e),foldLines(e,t,n){t=t||76;let i,r,o=0,s=(e=(e||"").toString()).length,a="";for(;o<s;){if(i=e.substr(o,t),i.length<t){a+=i;break}(r=i.match(/^[^\n\r]*(\r?\n|\r)/))?(i=r[0],a+=i,o+=i.length):((r=i.match(/(\s+)[^\s]*$/))&&r[0].length-(n?(r[1]||"").length:0)<i.length?i=i.substr(0,i.length-(r[0].length-(n?(r[1]||"").length:0))):(r=e.substr(o+i.length).match(/^[^\s]+(\s*)/))&&(i+=r[0].substr(0,r[0].length-(n?0:(r[1]||"").length))),a+=i,o+=i.length,o<s&&(a+="\r\n"))}return a},splitMimeEncodedString:(e,t)=>{let n,i,r,o,s=[];for(t=Math.max(t||0,12);e.length;){for(n=e.substr(0,t),(i=n.match(/[=][0-9A-F]?$/i))&&(n=n.substr(0,i.index)),o=!1;!o;)o=!0,(i=e.substr(n.length).match(/^[=]([0-9A-F]{2})/i))&&(r=parseInt(i[1],16),r<194&&r>127&&(n=n.substr(0,n.length-3),o=!1));n.length&&s.push(n),e=e.substr(n.length)}return s},encodeURICharComponent:e=>{let t="",n=e.charCodeAt(0).toString(16).toUpperCase();if(n.length%2&&(n="0"+n),n.length>2)for(let e=0,i=n.length/2;e<i;e++)t+="%"+n.substr(e,2);else t+="%"+n;return t},safeEncodeURIComponent(e){e=(e||"").toString();try{e=encodeURIComponent(e)}catch(t){return e.replace(/[^\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]+/g,"")}return e.replace(/[\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]/g,(e=>this.encodeURICharComponent(e)))}},hA}function FA(){if(yA)return gA;yA=1;class e{constructor(e){this.str=(e||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let e=[];for(let e=0,t=this.str.length;e<t;e++){let n=this.str.charAt(e),i=e<t-1?this.str.charAt(e+1):null;this.checkChar(n,i)}return this.list.forEach((t=>{t.value=(t.value||"").toString().trim(),t.value&&e.push(t)})),e}checkChar(e,t){if(this.escaped);else{if(e===this.operatorExpecting)return this.node={type:"operator",value:e},t&&![" ","\t","\r","\n",",",";"].includes(t)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,this.operatorExpecting="",void(this.escaped=!1);if(!this.operatorExpecting&&e in this.operators)return this.node={type:"operator",value:e},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[e],void(this.escaped=!1);if(['"',"'"].includes(this.operatorExpecting)&&"\\"===e)return void(this.escaped=!0)}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),"\n"===e&&(e=" "),(e.charCodeAt(0)>=33||[" ","\t"].includes(e))&&(this.node.value+=e),this.escaped=!1}}function t(n,i){i=i||{};let r=new e(n).tokenize(),o=[],s=[],a=[];if(r.forEach((e=>{"operator"!==e.type||","!==e.value&&";"!==e.value?s.push(e):(s.length&&o.push(s),s=[])})),s.length&&o.push(s),o.forEach((e=>{e=function(e){let n,i,r,o=!1,s="text",a=[],c={address:[],comment:[],group:[],text:[]};for(i=0,r=e.length;i<r;i++){let t=e[i],n=i?e[i-1]:null;if("operator"===t.type)switch(t.value){case"<":s="address";break;case"(":s="comment";break;case":":s="group",o=!0;break;default:s="text"}else t.value&&("address"===s&&(t.value=t.value.replace(/^[^<]*<\s*/,"")),n&&n.noBreak&&c[s].length?c[s][c[s].length-1]+=t.value:c[s].push(t.value))}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),o)c.text=c.text.join(" "),a.push({name:c.text||n&&n.name,group:c.group.length?t(c.group.join(",")):[]});else{if(!c.address.length&&c.text.length){for(i=c.text.length-1;i>=0;i--)if(c.text[i].match(/^[^@\s]+@[^@\s]+$/)){c.address=c.text.splice(i,1);break}let e=function(e){return c.address.length?e:(c.address=[e.trim()]," ")};if(!c.address.length)for(i=c.text.length-1;i>=0&&(c.text[i]=c.text[i].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,e).trim(),!c.address.length);i--);}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),c.address.length>1&&(c.text=c.text.concat(c.address.splice(1))),c.text=c.text.join(" "),c.address=c.address.join(" "),!c.address&&o)return[];n={address:c.address||c.text||"",name:c.text||c.address||""},n.address===n.name&&((n.address||"").match(/@/)?n.name="":n.address=""),a.push(n)}return a}(e),e.length&&(a=a.concat(e))})),i.flatten){let e=[],t=n=>{n.forEach((n=>{if(n.group)return t(n.group);e.push(n)}))};return t(a),e}return a}return gA=t}function UA(){if(wA)return xA;wA=1;const e=c.Transform;return xA=class extends e{constructor(e){super(e),this.options=e||{},this.lastByte=!1}_transform(e,t,n){let i,r=0;for(let t=0,n=e.length;t<n;t++)10===e[t]&&(t&&13!==e[t-1]||!t&&13!==this.lastByte)&&(t>r&&(i=e.slice(r,t),this.push(i)),this.push(Buffer.from("\r\n")),r=t+1);r&&r<e.length?(i=e.slice(r),this.push(i)):r||this.push(e),this.lastByte=e[e.length-1],n()}},xA}function BA(){if(OA)return _A;OA=1;const e=m,t=r,n=NA(),i=c.PassThrough,o=jA(),s=zA(),a=LA(),l=DA(),u=FA(),p=MA(),d=function(){if(bA)return vA;bA=1;const e=c.Transform;return vA=class extends e{constructor(){super(),this.lastByte=!1}_transform(e,t,n){e.length&&(this.lastByte=e[e.length-1]),this.push(e),n()}_flush(e){return 10===this.lastByte?e():13===this.lastByte?(this.push(Buffer.from("\n")),e()):(this.push(Buffer.from("\r\n")),e())}}}(),h=UA(),f=function(){if(SA)return EA;SA=1;const e=c.Transform;return EA=class extends e{constructor(e){super(e),this.options=e||{}}_transform(e,t,n){let i,r=0;for(let t=0,n=e.length;t<n;t++)13===e[t]&&(i=e.slice(r,t),r=t+1,this.push(i));r&&r<e.length?(i=e.slice(r),this.push(i)):r||this.push(e),n()}},EA}();class g{constructor(t,n){this.nodeCounter=0,n=n||{},this.baseBoundary=n.baseBoundary||e.randomBytes(8).toString("hex"),this.boundaryPrefix=n.boundaryPrefix||"--_NmP",this.disableFileAccess=!!n.disableFileAccess,this.disableUrlAccess=!!n.disableUrlAccess,this.normalizeHeaderKey=n.normalizeHeaderKey,this.date=new Date,this.rootNode=n.rootNode||this,this.keepBcc=!!n.keepBcc,n.filename&&(this.filename=n.filename,t||(t=s.detectMimeType(this.filename.split(".").pop()))),this.textEncoding=(n.textEncoding||"").toString().trim().charAt(0).toUpperCase(),this.parentNode=n.parentNode,this.hostname=n.hostname,this.newline=n.newline,this.childNodes=[],this._nodeId=++this.rootNode.nodeCounter,this._headers=[],this._isPlainText=!1,this._hasLongLines=!1,this._envelope=!1,this._raw=!1,this._transforms=[],this._processFuncs=[],t&&this.setHeader("Content-Type",t)}createChild(e,t){t||"object"!=typeof e||(t=e,e=void 0);let n=new g(e,t);return this.appendChild(n),n}appendChild(e){return e.rootNode!==this.rootNode&&(e.rootNode=this.rootNode,e._nodeId=++this.rootNode.nodeCounter),e.parentNode=this,this.childNodes.push(e),e}replace(e){return e===this?this:(this.parentNode.childNodes.forEach(((t,n)=>{t===this&&(e.rootNode=this.rootNode,e.parentNode=this.parentNode,e._nodeId=this._nodeId,this.rootNode=this,this.parentNode=void 0,e.parentNode.childNodes[n]=e)})),e)}remove(){if(!this.parentNode)return this;for(let e=this.parentNode.childNodes.length-1;e>=0;e--)if(this.parentNode.childNodes[e]===this)return this.parentNode.childNodes.splice(e,1),this.parentNode=void 0,this.rootNode=this,this}setHeader(e,t){let n,i=!1;if(!t&&e&&"object"==typeof e)return e.key&&"value"in e?this.setHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.setHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.setHeader(t,e[t])})),this;n={key:e=this._normalizeHeaderKey(e),value:t};for(let t=0,r=this._headers.length;t<r;t++)this._headers[t].key===e&&(i?(this._headers.splice(t,1),t--,r--):(this._headers[t]=n,i=!0));return i||this._headers.push(n),this}addHeader(e,t){return!t&&e&&"object"==typeof e?(e.key&&e.value?this.addHeader(e.key,e.value):Array.isArray(e)?e.forEach((e=>{this.addHeader(e.key,e.value)})):Object.keys(e).forEach((t=>{this.addHeader(t,e[t])})),this):Array.isArray(t)?(t.forEach((t=>{this.addHeader(e,t)})),this):(this._headers.push({key:this._normalizeHeaderKey(e),value:t}),this)}getHeader(e){e=this._normalizeHeaderKey(e);for(let t=0,n=this._headers.length;t<n;t++)if(this._headers[t].key===e)return this._headers[t].value}setContent(e){return this.content=e,"function"==typeof this.content.pipe?(this._contentErrorHandler=e=>{this.content.removeListener("error",this._contentErrorHandler),this.content=e},this.content.once("error",this._contentErrorHandler)):"string"==typeof this.content&&(this._isPlainText=s.isPlainText(this.content),this._isPlainText&&s.hasLongerLines(this.content,76)&&(this._hasLongLines=!0)),this}build(e){let t;e||(t=new Promise(((t,n)=>{e=o.callbackPromise(t,n)})));let n=this.createReadStream(),i=[],r=0,s=!1;return n.on("readable",(()=>{let e;for(;null!==(e=n.read());)i.push(e),r+=e.length})),n.once("error",(t=>{if(!s)return s=!0,e(t)})),n.once("end",(t=>{if(!s)return s=!0,t&&t.length&&(i.push(t),r+=t.length),e(null,Buffer.concat(i,r))})),t}getTransferEncoding(){let e=!1,t=(this.getHeader("Content-Type")||"").toString().toLowerCase().trim();return this.content&&(e=(this.getHeader("Content-Transfer-Encoding")||"").toString().toLowerCase().trim(),e&&["base64","quoted-printable"].includes(e)||(/^text\//i.test(t)?e=this._isPlainText&&!this._hasLongLines?"7bit":"string"==typeof this.content||this.content instanceof Buffer?"Q"===this._getTextEncoding(this.content)?"quoted-printable":"base64":"B"===this.textEncoding?"base64":"quoted-printable":/^(multipart|message)\//i.test(t)||(e=e||"base64"))),e}buildHeaders(){let e=this.getTransferEncoding(),t=[];if(e&&this.setHeader("Content-Transfer-Encoding",e),this.filename&&!this.getHeader("Content-Disposition")&&this.setHeader("Content-Disposition","attachment"),this.rootNode===this){this.getHeader("Date")||this.setHeader("Date",this.date.toUTCString().replace(/GMT/,"+0000")),this.messageId(),this.getHeader("MIME-Version")||this.setHeader("MIME-Version","1.0");for(let e=this._headers.length-2;e>=0;e--){let t=this._headers[e];"Content-Type"===t.key&&(this._headers.splice(e,1),this._headers.push(t))}}return this._headers.forEach((e=>{let n,i,r=e.key,o=e.value,a={};if(!o||"object"!=typeof o||["From","Sender","To","Cc","Bcc","Reply-To","Date","References"].includes(r)||(Object.keys(o).forEach((e=>{"value"!==e&&(a[e]=o[e])})),o=(o.value||"").toString(),o.trim()))if(a.prepared)a.foldLines?t.push(s.foldLines(r+": "+o)):t.push(r+": "+o);else{switch(e.key){case"Content-Disposition":n=s.parseHeaderValue(o),this.filename&&(n.params.filename=this.filename),o=s.buildHeaderValue(n);break;case"Content-Type":n=s.parseHeaderValue(o),this._handleContentType(n),n.value.match(/^text\/plain\b/)&&"string"==typeof this.content&&/[\u0080-\uFFFF]/.test(this.content)&&(n.params.charset="utf-8"),o=s.buildHeaderValue(n),this.filename&&(i=this._encodeWords(this.filename),(i!==this.filename||/[\s'"\\;:/=(),<>@[\]?]|^-/.test(i))&&(i='"'+i+'"'),o+="; name="+i);break;case"Bcc":if(!this.keepBcc)return}if(o=this._encodeHeaderValue(r,o),(o||"").toString().trim()){if("function"==typeof this.normalizeHeaderKey){let e=this.normalizeHeaderKey(r,o);e&&"string"==typeof e&&e.length&&(r=e)}t.push(s.foldLines(r+": "+o,76))}}})),t.join("\r\n")}createReadStream(e){let t,n=new i(e=e||{}),r=n;this.stream(n,e,(e=>{e?r.emit("error",e):n.end()}));for(let e=0,n=this._transforms.length;e<n;e++)t="function"==typeof this._transforms[e]?this._transforms[e]():this._transforms[e],r.once("error",(e=>{t.emit("error",e)})),r=r.pipe(t);t=new d,r.once("error",(e=>{t.emit("error",e)})),r=r.pipe(t);for(let e=0,n=this._processFuncs.length;e<n;e++)t=this._processFuncs[e],r=t(r);if(this.newline){const e=["win","windows","dos","\r\n"].includes(this.newline.toString().toLowerCase())?new h:new f,t=r.pipe(e);return r.on("error",(e=>t.emit("error",e))),t}return r}transform(e){this._transforms.push(e)}processFunc(e){this._processFuncs.push(e)}stream(e,t,n){let i,r,o=this.getTransferEncoding(),s=!1,c=e=>{s||(s=!0,n(e))},u=()=>{let n=0,i=()=>{if(n>=this.childNodes.length)return e.write("\r\n--"+this.boundary+"--\r\n"),c();let r=this.childNodes[n++];e.write((n>1?"\r\n":"")+"--"+this.boundary+"\r\n"),r.stream(e,t,(e=>{if(e)return c(e);setImmediate(i)}))};if(!this.multipart)return c();setImmediate(i)},p=()=>{if(!this.content)return setImmediate(u);{if("[object Error]"===Object.prototype.toString.call(this.content))return c(this.content);"function"==typeof this.content.pipe&&(this.content.removeListener("error",this._contentErrorHandler),this._contentErrorHandler=e=>c(e),this.content.once("error",this._contentErrorHandler));let n=()=>{["quoted-printable","base64"].includes(o)?(i=new("base64"===o?l:a).Encoder(t),i.pipe(e,{end:!1}),i.once("end",u),i.once("error",(e=>c(e))),r=this._getStream(this.content),r.pipe(i)):(r=this._getStream(this.content),r.pipe(e,{end:!1}),r.once("end",u)),r.once("error",(e=>c(e)))};if(this.content._resolve){let e=[],t=0,i=!1,r=this._getStream(this.content);r.on("error",(e=>{i||(i=!0,c(e))})),r.on("readable",(()=>{let n;for(;null!==(n=r.read());)e.push(n),t+=n.length})),r.on("end",(()=>{i||(i=!0,this.content._resolve=!1,this.content._resolvedValue=Buffer.concat(e,t),setImmediate(n))}))}else setImmediate(n)}};this._raw?setImmediate((()=>{if("[object Error]"===Object.prototype.toString.call(this._raw))return c(this._raw);"function"==typeof this._raw.pipe&&this._raw.removeListener("error",this._contentErrorHandler);let t=this._getStream(this._raw);t.pipe(e,{end:!1}),t.on("error",(t=>e.emit("error",t))),t.on("end",u)})):(e.write(this.buildHeaders()+"\r\n\r\n"),setImmediate(p))}setEnvelope(e){let t;this._envelope={from:!1,to:[]},e.from&&(t=[],this._convertAddresses(this._parseAddresses(e.from),t),t=t.filter((e=>e&&e.address)),t.length&&t[0]&&(this._envelope.from=t[0].address)),["to","cc","bcc"].forEach((t=>{e[t]&&this._convertAddresses(this._parseAddresses(e[t]),this._envelope.to)})),this._envelope.to=this._envelope.to.map((e=>e.address)).filter((e=>e));let n=["to","cc","bcc","from"];return Object.keys(e).forEach((t=>{n.includes(t)||(this._envelope[t]=e[t])})),this}getAddresses(){let e={};return this._headers.forEach((t=>{let n=t.key.toLowerCase();["from","sender","reply-to","to","cc","bcc"].includes(n)&&(Array.isArray(e[n])||(e[n]=[]),this._convertAddresses(this._parseAddresses(t.value),e[n]))})),e}getEnvelope(){if(this._envelope)return this._envelope;let e={from:!1,to:[]};return this._headers.forEach((t=>{let n=[];"From"===t.key||!e.from&&["Reply-To","Sender"].includes(t.key)?(this._convertAddresses(this._parseAddresses(t.value),n),n.length&&n[0]&&(e.from=n[0].address)):["To","Cc","Bcc"].includes(t.key)&&this._convertAddresses(this._parseAddresses(t.value),e.to)})),e.to=e.to.map((e=>e.address)),e}messageId(){let e=this.getHeader("Message-ID");return e||(e=this._generateMessageId(),this.setHeader("Message-ID",e)),e}setRaw(e){return this._raw=e,this._raw&&"function"==typeof this._raw.pipe&&(this._contentErrorHandler=e=>{this._raw.removeListener("error",this._contentErrorHandler),this._raw=e},this._raw.once("error",this._contentErrorHandler)),this}_getStream(e){let n;return e._resolvedValue?(n=new i,setImmediate((()=>{try{n.end(e._resolvedValue)}catch(e){n.emit("error",e)}})),n):"function"==typeof e.pipe?e:e&&"string"==typeof e.path&&!e.href?this.disableFileAccess?(n=new i,setImmediate((()=>n.emit("error",new Error("File access rejected for "+e.path)))),n):t.createReadStream(e.path):e&&"string"==typeof e.href?this.disableUrlAccess?(n=new i,setImmediate((()=>n.emit("error",new Error("Url access rejected for "+e.href)))),n):p(e.href,{headers:e.httpHeaders}):(n=new i,setImmediate((()=>{try{n.end(e||"")}catch(e){n.emit("error",e)}})),n)}_parseAddresses(e){return[].concat.apply([],[].concat(e).map((e=>e&&e.address?(e.address=this._normalizeAddress(e.address),e.name=e.name||"",[e]):u(e))))}_normalizeHeaderKey(e){return e=(e||"").toString().replace(/\r?\n|\r/g," ").trim().toLowerCase().replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi,(e=>e.toUpperCase())).replace(/^Content-Features$/i,"Content-features"),e}_handleContentType(e){this.contentType=e.value.trim().toLowerCase(),this.multipart=!!/^multipart\//i.test(this.contentType)&&this.contentType.substr(this.contentType.indexOf("/")+1),this.multipart?this.boundary=e.params.boundary=e.params.boundary||this.boundary||this._generateBoundary():this.boundary=!1}_generateBoundary(){return this.rootNode.boundaryPrefix+"-"+this.rootNode.baseBoundary+"-Part_"+this._nodeId}_encodeHeaderValue(e,t){switch(e=this._normalizeHeaderKey(e)){case"From":case"Sender":case"To":case"Cc":case"Bcc":case"Reply-To":return this._convertAddresses(this._parseAddresses(t));case"Message-ID":case"In-Reply-To":case"Content-Id":return"<"!==(t=(t||"").toString().replace(/\r?\n|\r/g," ")).charAt(0)&&(t="<"+t),">"!==t.charAt(t.length-1)&&(t+=">"),t;case"References":return(t=[].concat.apply([],[].concat(t||"").map((e=>(e=(e||"").toString().replace(/\r?\n|\r/g," ").trim()).replace(/<[^>]*>/g,(e=>e.replace(/\s/g,""))).split(/\s+/)))).map((e=>("<"!==e.charAt(0)&&(e="<"+e),">"!==e.charAt(e.length-1)&&(e+=">"),e)))).join(" ").trim();case"Date":return"[object Date]"===Object.prototype.toString.call(t)?t.toUTCString().replace(/GMT/,"+0000"):(t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t));case"Content-Type":case"Content-Disposition":return(t||"").toString().replace(/\r?\n|\r/g," ");default:return t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t)}}_convertAddresses(e,t){let n=[];return t=t||[],[].concat(e||[]).forEach((e=>{if(e.address)e.address=this._normalizeAddress(e.address),e.name?e.name&&n.push(`${this._encodeAddressName(e.name)} <${e.address}>`):n.push(e.address.indexOf(" ")>=0?`<${e.address}>`:`${e.address}`),e.address&&(t.filter((t=>t.address===e.address)).length||t.push(e));else if(e.group){let i=(e.group.length?this._convertAddresses(e.group,t):"").trim();n.push(`${this._encodeAddressName(e.name)}:${i};`)}})),n.join(", ")}_normalizeAddress(e){let t=(e=(e||"").toString().replace(/[\x00-\x1F<>]+/g," ").trim()).lastIndexOf("@");if(t<0)return e;let i,r=e.substr(0,t),o=e.substr(t+1);try{i=n.toASCII(o.toLowerCase())}catch(e){}return r.indexOf(" ")>=0&&('"'!==r.charAt(0)&&(r='"'+r),'"'!==r.substr(-1)&&(r+='"')),`${r}@${i}`}_encodeAddressName(e){return/^[\w ]*$/.test(e)?e:/^[\x20-\x7e]*$/.test(e)?'"'+e.replace(/([\\"])/g,"\\$1")+'"':s.encodeWord(e,this._getTextEncoding(e),52)}_encodeWords(e){return s.encodeWords(e,this._getTextEncoding(e),52,!0)}_getTextEncoding(e){e=(e||"").toString();let t,n,i=this.textEncoding;return i||(n=(e.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g)||[]).length,t=(e.match(/[a-z]/gi)||[]).length,i=n<t?"Q":"B"),i}_generateMessageId(){return"<"+[2,2,2,6].reduce(((t,n)=>t+"-"+e.randomBytes(n).toString("hex")),e.randomBytes(4).toString("hex"))+"@"+(this.getEnvelope().from||this.hostname||"localhost").split("@").pop()+">"}}return _A=g}var HA,qA,VA,GA,WA,KA,YA,QA,JA,XA,ZA,eI,tI,nI,iI,rI,oI,sI={exports:{}};function aI(){if(HA)return sI.exports;HA=1;const e=NA(),t=zA(),n=m;function i(e,t,n){let i=new Set,o=new Set,s=new Map;(n||"").toLowerCase().split(":").forEach((e=>{o.add(e.trim())})),(t||"").toLowerCase().split(":").filter((e=>!o.has(e.trim()))).forEach((e=>{i.add(e.trim())}));for(let t=e.length-1;t>=0;t--){let n=e[t];i.has(n.key)&&!s.has(n.key)&&s.set(n.key,r(n.line))}let a=[],c=[];return i.forEach((e=>{s.has(e)&&(c.push(e),a.push(e+":"+s.get(e)))})),{headers:a.join("\r\n")+"\r\n",fieldNames:c.join(":")}}function r(e){return e.substr(e.indexOf(":")+1).replace(/\r?\n/g,"").replace(/\s+/g," ").trim()}return sI.exports=(o,s,a,c)=>{let l,u,p=i(o,(c=c||{}).headerFieldNames||"From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive",c.skipFields),d=function(n,i,r,o,s){let a=["v=1","a=rsa-"+o,"c=relaxed/relaxed","d="+e.toASCII(n),"q=dns/txt","s="+i,"bh="+s,"h="+r].join("; ");return t.foldLines("DKIM-Signature: "+a,76)+";\r\n b="}(c.domainName,c.keySelector,p.fieldNames,s,a);p.headers+="dkim-signature:"+r(d),l=n.createSign(("rsa-"+s).toUpperCase()),l.update(p.headers);try{u=l.sign(c.privateKey,"base64")}catch(e){return!1}return d+u.replace(/(^.{73}|.{75}(?!\r?\n|\r))/g,"$&\r\n ").trim()},sI.exports.relaxedHeaders=i,sI.exports}function cI(){if(VA)return qA;VA=1;const e=function(){if(PA)return TA;PA=1;const e=c.Transform;return TA=class extends e{constructor(e){super(e),this.lastBytes=Buffer.alloc(4),this.headersParsed=!1,this.headerBytes=0,this.headerChunks=[],this.rawHeaders=!1,this.bodySize=0}updateLastBytes(e){let t=this.lastBytes.length,n=Math.min(e.length,t);for(let e=0,i=t-n;e<i;e++)this.lastBytes[e]=this.lastBytes[e+n];for(let i=1;i<=n;i++)this.lastBytes[t-i]=e[e.length-i]}checkHeaders(e){if(this.headersParsed)return!0;let t=this.lastBytes.length,n=0;this.curLinePos=0;for(let i=0,r=this.lastBytes.length+e.length;i<r;i++){let r;if(r=i<t?this.lastBytes[i]:e[i-t],10===r&&i){let r=i-1<t?this.lastBytes[i-1]:e[i-1-t],o=i>1&&(i-2<t?this.lastBytes[i-2]:e[i-2-t]);if(10===r){this.headersParsed=!0,n=i-t+1,this.headerBytes+=n;break}if(13===r&&10===o){this.headersParsed=!0,n=i-t+1,this.headerBytes+=n;break}}}if(this.headersParsed){if(this.headerChunks.push(e.slice(0,n)),this.rawHeaders=Buffer.concat(this.headerChunks,this.headerBytes),this.headerChunks=null,this.emit("headers",this.parseHeaders()),e.length-1>n){let t=e.slice(n);this.bodySize+=t.length,setImmediate((()=>this.push(t)))}return!1}return this.headerBytes+=e.length,this.headerChunks.push(e),this.updateLastBytes(e),!1}_transform(e,t,n){if(!e||!e.length)return n();let i;"string"==typeof e&&(e=Buffer.from(e,t));try{i=this.checkHeaders(e)}catch(e){return n(e)}i&&(this.bodySize+=e.length,this.push(e)),setImmediate(n)}_flush(e){if(this.headerChunks){let e=Buffer.concat(this.headerChunks,this.headerBytes);this.bodySize+=e.length,this.push(e),this.headerChunks=null}e()}parseHeaders(){let e=(this.rawHeaders||"").toString().split(/\r?\n/);for(let t=e.length-1;t>0;t--)/^\s/.test(e[t])&&(e[t-1]+="\n"+e[t],e.splice(t,1));return e.filter((e=>e.trim())).map((e=>({key:e.substr(0,e.indexOf(":")).trim().toLowerCase(),line:e})))}},TA}(),t=function(){if(IA)return AA;IA=1;const e=c.Transform,t=m;return AA=class extends e{constructor(e){super(),e=e||{},this.chunkBuffer=[],this.chunkBufferLen=0,this.bodyHash=t.createHash(e.hashAlgo||"sha1"),this.remainder="",this.byteLength=0,this.debug=e.debug,this._debugBody=!!e.debug&&[]}updateHash(e){let t,n="",i="file";for(let t=e.length-1;t>=0;t--){let r=e[t];if("file"!==i||10!==r&&13!==r)if("file"!==i||9!==r&&32!==r){if(("line"!==i||9!==r&&32!==r)&&("file"===i||"line"===i)&&(i="body",t===e.length-1))break}else i="line";if(0===t){if("file"===i&&(!this.remainder||/[\r\n]$/.test(this.remainder))||"line"===i&&(!this.remainder||/[ \t]$/.test(this.remainder)))return void(this.remainder+=e.toString("binary"));if("line"===i||"file"===i){n=e.toString("binary"),e=!1;break}}if("body"===i){n=e.slice(t+1).toString("binary"),e=e.slice(0,t+1);break}}let r=!!this.remainder;if(e&&!r)for(let t=0,n=e.length;t<n;t++){if(t&&10===e[t]&&13!==e[t-1]){r=!0;break}if(t&&13===e[t]&&32===e[t-1]){r=!0;break}if(t&&32===e[t]&&32===e[t-1]){r=!0;break}if(9===e[t]){r=!0;break}}r?(t=this.remainder+(e?e.toString("binary"):""),this.remainder=n,t=t.replace(/\r?\n/g,"\n").replace(/[ \t]*$/gm,"").replace(/[ \t]+/gm," ").replace(/\n/g,"\r\n"),e=Buffer.from(t,"binary")):n&&(this.remainder=n),this.debug&&this._debugBody.push(e),this.bodyHash.update(e)}_transform(e,t,n){if(!e||!e.length)return n();"string"==typeof e&&(e=Buffer.from(e,t)),this.updateHash(e),this.byteLength+=e.length,this.push(e),n()}_flush(e){/[\r\n]$/.test(this.remainder)&&this.byteLength>2&&this.bodyHash.update(Buffer.from("\r\n")),this.byteLength||this.push(Buffer.from("\r\n")),this.emit("hash",this.bodyHash.digest("base64"),!!this.debug&&Buffer.concat(this._debugBody)),e()}},AA}(),n=aI(),i=c.PassThrough,o=r,s=d,a=m;class l{constructor(e,t,n,i){this.options=e||{},this.keys=t,this.cacheTreshold=Number(this.options.cacheTreshold)||131072,this.hashAlgo=this.options.hashAlgo||"sha256",this.cacheDir=this.options.cacheDir||!1,this.chunks=[],this.chunklen=0,this.readPos=0,this.cachePath=!!this.cacheDir&&s.join(this.cacheDir,"message."+Date.now()+"-"+a.randomBytes(14).toString("hex")),this.cache=!1,this.headers=!1,this.bodyHash=!1,this.parser=!1,this.relaxedBody=!1,this.input=n,this.output=i,this.output.usingCache=!1,this.hasErrored=!1,this.input.on("error",(e=>{this.hasErrored=!0,this.cleanup(),i.emit("error",e)}))}cleanup(){this.cache&&this.cachePath&&o.unlink(this.cachePath,(()=>!1))}createReadCache(){this.cache=o.createReadStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.output.emit("error",e)})),this.cache.once("close",(()=>{this.cleanup()})),this.cache.pipe(this.output)}sendNextChunk(){if(this.hasErrored)return;if(this.readPos>=this.chunks.length)return this.cache?this.createReadCache():this.output.end();let e=this.chunks[this.readPos++];if(!1===this.output.write(e))return this.output.once("drain",(()=>{this.sendNextChunk()}));setImmediate((()=>this.sendNextChunk()))}sendSignedOutput(){let e=0,t=()=>{if(e>=this.keys.length)return this.output.write(this.parser.rawHeaders),setImmediate((()=>this.sendNextChunk()));let i=this.keys[e++],r=n(this.headers,this.hashAlgo,this.bodyHash,{domainName:i.domainName,keySelector:i.keySelector,privateKey:i.privateKey,headerFieldNames:this.options.headerFieldNames,skipFields:this.options.skipFields});return r&&this.output.write(Buffer.from(r+"\r\n")),setImmediate(t)};if(this.bodyHash&&this.headers)return t();this.output.write(this.parser.rawHeaders),this.sendNextChunk()}createWriteCache(){this.output.usingCache=!0,this.cache=o.createWriteStream(this.cachePath),this.cache.once("error",(e=>{this.cleanup(),this.relaxedBody.unpipe(this.cache),this.relaxedBody.on("readable",(()=>{for(;null!==this.relaxedBody.read(););})),this.hasErrored=!0,this.output.emit("error",e)})),this.cache.once("close",(()=>{this.sendSignedOutput()})),this.relaxedBody.removeAllListeners("readable"),this.relaxedBody.pipe(this.cache)}signStream(){this.parser=new e,this.relaxedBody=new t({hashAlgo:this.hashAlgo}),this.parser.on("headers",(e=>{this.headers=e})),this.relaxedBody.on("hash",(e=>{this.bodyHash=e})),this.relaxedBody.on("readable",(()=>{let e;if(!this.cache)for(;null!==(e=this.relaxedBody.read());)if(this.chunks.push(e),this.chunklen+=e.length,this.chunklen>=this.cacheTreshold&&this.cachePath)return this.createWriteCache()})),this.relaxedBody.on("end",(()=>{this.cache||this.sendSignedOutput()})),this.parser.pipe(this.relaxedBody),setImmediate((()=>this.input.pipe(this.parser)))}}return qA=class{constructor(e){this.options=e||{},this.keys=[].concat(this.options.keys||{domainName:e.domainName,keySelector:e.keySelector,privateKey:e.privateKey})}sign(e,t){let n=new i,r=e,o=!1;Buffer.isBuffer(e)?(o=e,r=new i):"string"==typeof e&&(o=Buffer.from(e),r=new i);let s=this.options;t&&Object.keys(t).length&&(s={},Object.keys(this.options||{}).forEach((e=>{s[e]=this.options[e]})),Object.keys(t||{}).forEach((e=>{e in s||(s[e]=t[e])})));let a=new l(s,this.keys,r,n);return setImmediate((()=>{a.signStream(),o&&setImmediate((()=>{r.end(o)}))})),n}}}function lI(){if(JA)return QA;JA=1;const e=t,r=jA(),o=$A(),s=function(){if(kA)return CA;kA=1;const e=BA(),t=zA(),n=jA().parseDataURI;return CA=class{constructor(e){this.mail=e||{},this.message=!1}compile(){return this._alternatives=this.getAlternatives(),this._htmlNode=this._alternatives.filter((e=>/^text\/html\b/i.test(e.contentType))).pop(),this._attachments=this.getAttachments(!!this._htmlNode),this._useRelated=!(!this._htmlNode||!this._attachments.related.length),this._useAlternative=this._alternatives.length>1,this._useMixed=this._attachments.attached.length>1||this._alternatives.length&&1===this._attachments.attached.length,this.mail.raw?this.message=new e("message/rfc822",{newline:this.mail.newline}).setRaw(this.mail.raw):this._useMixed?this.message=this._createMixed():this._useAlternative?this.message=this._createAlternative():this._useRelated?this.message=this._createRelated():this.message=this._createContentNode(!1,[].concat(this._alternatives||[]).concat(this._attachments.attached||[]).shift()||{contentType:"text/plain",content:""}),this.mail.headers&&this.message.addHeader(this.mail.headers),["from","sender","to","cc","bcc","reply-to","in-reply-to","references","subject","message-id","date"].forEach((e=>{let t=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase()));this.mail[t]&&this.message.setHeader(e,this.mail[t])})),this.mail.envelope&&this.message.setEnvelope(this.mail.envelope),this.message.messageId(),this.message}getAttachments(e){let n,i,r=[].concat(this.mail.attachments||[]).map(((e,n)=>{let i,r=/^message\//i.test(e.contentType);/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e));let o=e.contentType||t.detectMimeType(e.filename||e.path||e.href||"bin"),s=/^image\//i.test(o);return i={contentType:o,contentDisposition:e.contentDisposition||(r||s&&e.cid?"inline":"attachment"),contentTransferEncoding:"contentTransferEncoding"in e?e.contentTransferEncoding:"base64"},e.filename?i.filename=e.filename:r||!1===e.filename||(i.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(n+1),i.filename.indexOf(".")<0&&(i.filename+="."+t.detectExtension(i.contentType))),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.cid&&(i.cid=e.cid),e.raw?i.raw=e.raw:e.path?i.content={path:e.path}:e.href?i.content={href:e.href,httpHeaders:e.httpHeaders}:i.content=e.content||"",e.encoding&&(i.encoding=e.encoding),e.headers&&(i.headers=e.headers),i}));return this.mail.icalEvent&&(n="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},i={},Object.keys(n).forEach((e=>{i[e]=n[e]})),i.contentType="application/ics",i.headers||(i.headers={}),i.filename=i.filename||"invite.ics",i.headers["Content-Disposition"]="attachment",i.headers["Content-Transfer-Encoding"]="base64"),e?{attached:r.filter((e=>!e.cid)).concat(i||[]),related:r.filter((e=>!!e.cid))}:{attached:r.concat(i||[]),related:[]}}getAlternatives(){let e,n,i,r,o,s,a=[];return this.mail.text&&(e="object"==typeof this.mail.text&&(this.mail.text.content||this.mail.text.path||this.mail.text.href||this.mail.text.raw)?this.mail.text:{content:this.mail.text},e.contentType="text/plain; charset=utf-8"),this.mail.watchHtml&&(i="object"==typeof this.mail.watchHtml&&(this.mail.watchHtml.content||this.mail.watchHtml.path||this.mail.watchHtml.href||this.mail.watchHtml.raw)?this.mail.watchHtml:{content:this.mail.watchHtml},i.contentType="text/watch-html; charset=utf-8"),this.mail.amp&&(r="object"==typeof this.mail.amp&&(this.mail.amp.content||this.mail.amp.path||this.mail.amp.href||this.mail.amp.raw)?this.mail.amp:{content:this.mail.amp},r.contentType="text/x-amp-html; charset=utf-8"),this.mail.icalEvent&&(o="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},s={},Object.keys(o).forEach((e=>{s[e]=o[e]})),s.content&&"object"==typeof s.content&&(s.content._resolve=!0),s.filename=!1,s.contentType="text/calendar; charset=utf-8; method="+(s.method||"PUBLISH").toString().trim().toUpperCase(),s.headers||(s.headers={})),this.mail.html&&(n="object"==typeof this.mail.html&&(this.mail.html.content||this.mail.html.path||this.mail.html.href||this.mail.html.raw)?this.mail.html:{content:this.mail.html},n.contentType="text/html; charset=utf-8"),[].concat(e||[]).concat(i||[]).concat(r||[]).concat(n||[]).concat(s||[]).concat(this.mail.alternatives||[]).forEach((e=>{let n;/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e)),n={contentType:e.contentType||t.detectMimeType(e.filename||e.path||e.href||"txt"),contentTransferEncoding:e.contentTransferEncoding},e.filename&&(n.filename=e.filename),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.raw?n.raw=e.raw:e.path?n.content={path:e.path}:e.href?n.content={href:e.href}:n.content=e.content||"",e.encoding&&(n.encoding=e.encoding),e.headers&&(n.headers=e.headers),a.push(n)})),a}_createMixed(t){let n;return n=t?t.createChild("multipart/mixed",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/mixed",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._useAlternative?this._createAlternative(n):this._useRelated&&this._createRelated(n),[].concat(!this._useAlternative&&this._alternatives||[]).concat(this._attachments.attached||[]).forEach((e=>{this._useRelated&&e===this._htmlNode||this._createContentNode(n,e)})),n}_createAlternative(t){let n;return n=t?t.createChild("multipart/alternative",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e("multipart/alternative",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._alternatives.forEach((e=>{this._useRelated&&this._htmlNode===e?this._createRelated(n):this._createContentNode(n,e)})),n}_createRelated(t){let n;return n=t?t.createChild('multipart/related; type="text/html"',{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e('multipart/related; type="text/html"',{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._createContentNode(n,this._htmlNode),this._attachments.related.forEach((e=>this._createContentNode(n,e))),n}_createContentNode(t,n){let i;(n=n||{}).content=n.content||"";let r=(n.encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");return i=t?t.createChild(n.contentType,{filename:n.filename,textEncoding:this.mail.textEncoding,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new e(n.contentType,{filename:n.filename,baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),n.headers&&i.addHeader(n.headers),n.cid&&i.setHeader("Content-Id","<"+n.cid.replace(/[<>]/g,"")+">"),n.contentTransferEncoding?i.setHeader("Content-Transfer-Encoding",n.contentTransferEncoding):this.mail.encoding&&/^text\//i.test(n.contentType)&&i.setHeader("Content-Transfer-Encoding",this.mail.encoding),/^text\//i.test(n.contentType)&&!n.contentDisposition||i.setHeader("Content-Disposition",n.contentDisposition||(n.cid&&/^image\//i.test(n.contentType)?"inline":"attachment")),"string"!=typeof n.content||["utf8","usascii","ascii"].includes(r)||(n.content=Buffer.from(n.content,r)),n.raw?i.setRaw(n.raw):i.setContent(n.content),i}_processDataUrl(e){let t;return(e.path||e.href).match(/^data:/)&&(t=n(e.path||e.href)),t?(e.content=t.data,e.contentType=e.contentType||t.contentType,"path"in e&&(e.path=!1),"href"in e&&(e.href=!1),e):e}},CA}(),a=cI(),c=function(){if(WA)return GA;WA=1;const e=l,t=h,i=n;return GA=function n(r,o,s,a){let c,l,u,p=i.parse(r);c={host:p.hostname,port:Number(p.port)?Number(p.port):"https:"===p.protocol?443:80},"https:"===p.protocol?(c.rejectUnauthorized=!1,l=t.connect.bind(t)):l=e.connect.bind(e);let d=!1,m=e=>{if(!d){d=!0;try{u.destroy()}catch(e){}a(e)}},h=()=>{let e=new Error("Proxy socket timed out");e.code="ETIMEDOUT",m(e)};u=l(c,(()=>{if(d)return;let e={Host:s+":"+o,Connection:"close"};p.auth&&(e["Proxy-Authorization"]="Basic "+Buffer.from(p.auth).toString("base64")),u.write("CONNECT "+s+":"+o+" HTTP/1.1\r\n"+Object.keys(e).map((t=>t+": "+e[t])).join("\r\n")+"\r\n\r\n");let t="",n=e=>{let i,r;if(!d&&(t+=e.toString("binary"),i=t.match(/\r\n\r\n/))){if(u.removeListener("data",n),r=t.substr(i.index+i[0].length),t=t.substr(0,i.index),r&&u.unshift(Buffer.from(r,"binary")),d=!0,i=t.match(/^HTTP\/\d+\.\d+ (\d+)/i),!i||"2"!==(i[1]||"").charAt(0)){try{u.destroy()}catch(e){}return a(new Error("Invalid response from proxy"+(i&&": "+i[1]||"")))}return u.removeListener("error",m),u.removeListener("timeout",h),u.setTimeout(0),a(null,u)}};u.on("data",n)})),u.setTimeout(n.timeout||3e4),u.on("timeout",h),u.once("error",m)},GA}(),p=i,d=n,f=RA,g=function(){if(YA)return KA;YA=1;const e=jA(),t=BA(),n=zA();return KA=class{constructor(e,t){this.mailer=e,this.data={},this.message=null,t=t||{};let n=e.options||{},i=e._defaults||{};Object.keys(t).forEach((e=>{this.data[e]=t[e]})),this.data.headers=this.data.headers||{},Object.keys(i).forEach((e=>{e in this.data?"headers"===e&&Object.keys(i.headers).forEach((e=>{e in this.data.headers||(this.data.headers[e]=i.headers[e])})):this.data[e]=i[e]})),["disableFileAccess","disableUrlAccess","normalizeHeaderKey"].forEach((e=>{e in n&&(this.data[e]=n[e])}))}resolveContent(...t){return e.resolveContent(...t)}resolveAll(i){let r=[[this.data,"html"],[this.data,"text"],[this.data,"watchHtml"],[this.data,"amp"],[this.data,"icalEvent"]];this.data.alternatives&&this.data.alternatives.length&&this.data.alternatives.forEach(((e,t)=>{r.push([this.data.alternatives,t])})),this.data.attachments&&this.data.attachments.length&&this.data.attachments.forEach(((e,t)=>{e.filename||(e.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(t+1),e.filename.indexOf(".")<0&&(e.filename+="."+n.detectExtension(e.contentType))),e.contentType||(e.contentType=n.detectMimeType(e.filename||e.path||e.href||"bin")),r.push([this.data.attachments,t])}));let o=new t;["from","to","cc","bcc","sender","replyTo"].forEach((e=>{let t;this.message?t=[].concat(o._parseAddresses(this.message.getHeader("replyTo"===e?"reply-to":e))||[]):this.data[e]&&(t=[].concat(o._parseAddresses(this.data[e])||[])),t&&t.length?this.data[e]=t:e in this.data&&(this.data[e]=null)})),["from","sender"].forEach((e=>{this.data[e]&&(this.data[e]=this.data[e].shift())}));let s=0,a=()=>{if(s>=r.length)return i(null,this.data);let t=r[s++];if(!t[0]||!t[0][t[1]])return a();e.resolveContent(...t,((e,n)=>{if(e)return i(e);let r={content:n};t[0][t[1]]&&"object"==typeof t[0][t[1]]&&!Buffer.isBuffer(t[0][t[1]])&&Object.keys(t[0][t[1]]).forEach((e=>{e in r||["content","path","href","raw"].includes(e)||(r[e]=t[0][t[1]][e])})),t[0][t[1]]=r,a()}))};setImmediate((()=>a()))}normalize(e){let t=this.data.envelope||this.message.getEnvelope(),n=this.message.messageId();this.resolveAll(((i,r)=>i?e(i):(r.envelope=t,r.messageId=n,["html","text","watchHtml","amp"].forEach((e=>{r[e]&&r[e].content&&("string"==typeof r[e].content?r[e]=r[e].content:Buffer.isBuffer(r[e].content)&&(r[e]=r[e].content.toString()))})),r.icalEvent&&Buffer.isBuffer(r.icalEvent.content)&&(r.icalEvent.content=r.icalEvent.content.toString("base64"),r.icalEvent.encoding="base64"),r.alternatives&&r.alternatives.length&&r.alternatives.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),r.attachments&&r.attachments.length&&r.attachments.forEach((e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")})),r.normalizedHeaders={},Object.keys(r.headers||{}).forEach((e=>{let t=[].concat(r.headers[e]||[]).shift();t=t&&t.value||t,t&&(["references","in-reply-to","message-id","content-id"].includes(e)&&(t=this.message._encodeHeaderValue(e,t)),r.normalizedHeaders[e]=t)})),r.list&&"object"==typeof r.list&&this._getListHeaders(r.list).forEach((e=>{r.normalizedHeaders[e.key]=e.value.map((e=>e&&e.value||e)).join(", ")})),r.references&&(r.normalizedHeaders.references=this.message._encodeHeaderValue("references",r.references)),r.inReplyTo&&(r.normalizedHeaders["in-reply-to"]=this.message._encodeHeaderValue("in-reply-to",r.inReplyTo)),e(null,r))))}setMailerHeader(){this.message&&this.data.xMailer&&this.message.setHeader("X-Mailer",this.data.xMailer)}setPriorityHeaders(){if(this.message&&this.data.priority)switch((this.data.priority||"").toString().toLowerCase()){case"high":this.message.setHeader("X-Priority","1 (Highest)"),this.message.setHeader("X-MSMail-Priority","High"),this.message.setHeader("Importance","High");break;case"low":this.message.setHeader("X-Priority","5 (Lowest)"),this.message.setHeader("X-MSMail-Priority","Low"),this.message.setHeader("Importance","Low")}}setListHeaders(){this.message&&this.data.list&&"object"==typeof this.data.list&&this.data.list&&"object"==typeof this.data.list&&this._getListHeaders(this.data.list).forEach((e=>{e.value.forEach((t=>{this.message.addHeader(e.key,t)}))}))}_getListHeaders(e){return Object.keys(e).map((t=>({key:"list-"+t.toLowerCase().trim(),value:[].concat(e[t]||[]).map((e=>({prepared:!0,foldLines:!0,value:[].concat(e||[]).map((e=>{if("string"==typeof e&&(e={url:e}),e&&e.url){if("id"===t.toLowerCase().trim()){let t=e.comment||"";return t=n.isPlainText(t)?'"'+t+'"':n.encodeWord(t),(e.comment?t+" ":"")+this._formatListUrl(e.url).replace(/^<[^:]+\/{,2}/,"")}let i=e.comment||"";return n.isPlainText(i)||(i=n.encodeWord(i)),this._formatListUrl(e.url)+(e.comment?" ("+i+")":"")}return""})).filter((e=>e)).join(", ")})))})))}_formatListUrl(e){return e=e.replace(/[\s<]+|[\s>]+/g,""),/^(https?|mailto|ftp):/.test(e)?"<"+e+">":/^[^@]+@[^@]+$/.test(e)?"<mailto:"+e+">":"<http://"+e+">"}},KA}(),y=l,v=u,b=m;return QA=class extends e{constructor(e,t,n){super(),this.options=t||{},this._defaults=n||{},this._defaultPlugins={compile:[(...e)=>this._convertDataImages(...e)],stream:[]},this._userPlugins={compile:[],stream:[]},this.meta=new Map,this.dkim=!!this.options.dkim&&new a(this.options.dkim),this.transporter=e,this.transporter.mailer=this,this.logger=r.getLogger(this.options,{component:this.options.component||"mail"}),this.logger.debug({tnx:"create"},"Creating transport: %s",this.getVersionString()),"function"==typeof this.transporter.on&&(this.transporter.on("log",(e=>{this.logger.debug({tnx:"transport"},"%s: %s",e.type,e.message)})),this.transporter.on("error",(e=>{this.logger.error({err:e,tnx:"transport"},"Transport Error: %s",e.message),this.emit("error",e)})),this.transporter.on("idle",((...e)=>{this.emit("idle",...e)}))),["close","isIdle","verify"].forEach((e=>{this[e]=(...t)=>"function"==typeof this.transporter[e]?("verify"===e&&"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1),this.transporter[e](...t)):(this.logger.warn({tnx:"transport",methodName:e},"Non existing method %s called for transport",e),!1)})),this.options.proxy&&"string"==typeof this.options.proxy&&this.setupProxy(this.options.proxy)}use(e,t){return e=(e||"").toString(),this._userPlugins.hasOwnProperty(e)?this._userPlugins[e].push(t):this._userPlugins[e]=[t],this}sendMail(e,t=null){let n;t||(n=new Promise(((e,n)=>{t=r.callbackPromise(e,n)}))),"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1);let i=new g(this,e);return this.logger.debug({tnx:"transport",name:this.transporter.name,version:this.transporter.version,action:"send"},"Sending mail using %s/%s",this.transporter.name,this.transporter.version),this._processPlugins("compile",i,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"compile"},"PluginCompile Error: %s",e.message),t(e);i.message=new s(i.data).compile(),i.setMailerHeader(),i.setPriorityHeaders(),i.setListHeaders(),this._processPlugins("stream",i,(e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"stream"},"PluginStream Error: %s",e.message),t(e);(i.data.dkim||this.dkim)&&i.message.processFunc((e=>{let t=i.data.dkim?new a(i.data.dkim):this.dkim;return this.logger.debug({tnx:"DKIM",messageId:i.message.messageId(),dkimDomains:t.keys.map((e=>e.keySelector+"."+e.domainName)).join(", ")},"Signing outgoing message with %s keys",t.keys.length),t.sign(e,i.data._dkim)})),this.transporter.send(i,((...e)=>{e[0]&&this.logger.error({err:e[0],tnx:"transport",action:"send"},"Send Error: %s",e[0].message),t(...e)}))}))})),n}getVersionString(){return p.format("%s (%s; +%s; %s/%s)",f.name,f.version,f.homepage,this.transporter.name,this.transporter.version)}_processPlugins(e,t,n){if(e=(e||"").toString(),!this._userPlugins.hasOwnProperty(e))return n();let i=this._userPlugins[e]||[],r=this._defaultPlugins[e]||[];if(i.length&&this.logger.debug({tnx:"transaction",pluginCount:i.length,step:e},"Using %s plugins for %s",i.length,e),i.length+r.length===0)return n();let o=0,s="default",a=()=>{let e="default"===s?r:i;if(o>=e.length){if("default"!==s||!i.length)return n();s="user",o=0,e=i}(0,e[o++])(t,(e=>{if(e)return n(e);a()}))};a()}setupProxy(e){let t=d.parse(e);this.getSocket=(e,n)=>{let i=t.protocol.replace(/:$/,"").toLowerCase();if(this.meta.has("proxy_handler_"+i))return this.meta.get("proxy_handler_"+i)(t,e,n);switch(i){case"http":case"https":return void c(t.href,e.port,e.host,((e,t)=>e?n(e):n(null,{connection:t})));case"socks":case"socks5":case"socks4":case"socks4a":{if(!this.meta.has("proxy_socks_module"))return n(new Error("Socks module not loaded"));let i=i=>{let r=!!this.meta.get("proxy_socks_module").SocksClient,o=r?this.meta.get("proxy_socks_module").SocksClient:this.meta.get("proxy_socks_module"),s=Number(t.protocol.replace(/\D/g,""))||5,a={proxy:{ipaddress:i,port:Number(t.port),type:s},[r?"destination":"target"]:{host:e.host,port:e.port},command:"connect"};if(t.auth){let e=decodeURIComponent(t.auth.split(":").shift()),n=decodeURIComponent(t.auth.split(":").pop());r?(a.proxy.userId=e,a.proxy.password=n):4===s?a.userid=e:a.authentication={username:e,password:n}}o.createConnection(a,((e,t)=>e?n(e):n(null,{connection:t.socket||t})))};return y.isIP(t.hostname)?i(t.hostname):v.resolve(t.hostname,((e,t)=>{if(e)return n(e);i(Array.isArray(t)?t[0]:t)}))}}n(new Error("Unknown proxy configuration"))}}_convertDataImages(e,t){if(!this.options.attachDataUrls&&!e.data.attachDataUrls||!e.data.html)return t();e.resolveContent(e.data,"html",((n,i)=>{if(n)return t(n);let r=0;i=(i||"").toString().replace(/(<img\b[^<>]{0,1024} src\s{0,20}=[\s"']{0,20})(data:([^;]+);[^"'>\s]+)/gi,((t,n,i,s)=>{let a=b.randomBytes(10).toString("hex")+"@localhost";return e.data.attachments||(e.data.attachments=[]),Array.isArray(e.data.attachments)||(e.data.attachments=[].concat(e.data.attachments||[])),e.data.attachments.push({path:i,cid:a,filename:"image-"+ ++r+"."+o.detectExtension(s)}),n+"cid:"+a})),e.data.html=i,t()}))}set(e,t){return this.meta.set(e,t)}get(e){return this.meta.get(e)}},QA}function uI(){if(tI)return eI;tI=1;const e=RA,n=t.EventEmitter,i=l,r=h,o=p,s=m,a=function(){if(ZA)return XA;ZA=1;const e=c.Transform;return XA=class extends e{constructor(e){super(e),this.options=e||{},this._curLine="",this.inByteCount=0,this.outByteCount=0,this.lastByte=!1}_transform(e,t,n){let i,r,o,s=[],a=0,c=0;if(!e||!e.length)return n();for("string"==typeof e&&(e=Buffer.from(e)),this.inByteCount+=e.length,i=0,r=e.length;i<r;i++)46===e[i]?(i&&10===e[i-1]||!i&&(!this.lastByte||10===this.lastByte))&&(o=e.slice(c,i+1),s.push(o),s.push(Buffer.from(".")),a+=o.length+1,c=i+1):10===e[i]&&(i&&13!==e[i-1]||!i&&13!==this.lastByte)&&(i>c?(o=e.slice(c,i),s.push(o),a+=o.length+2):a+=2,s.push(Buffer.from("\r\n")),c=i+1);a?(c<e.length&&(o=e.slice(c),s.push(o),a+=o.length),this.outByteCount+=a,this.push(Buffer.concat(s,a))):(this.outByteCount+=e.length,this.push(e)),this.lastByte=e[e.length-1],n()}_flush(e){let t;t=10===this.lastByte?Buffer.from(".\r\n"):13===this.lastByte?Buffer.from("\n.\r\n"):Buffer.from("\r\n.\r\n"),this.outByteCount+=t.length,this.push(t),e()}},XA}(),u=c.PassThrough,d=jA(),f=6e5;return eI=class extends n{constructor(t){super(t),this.id=s.randomBytes(8).toString("base64").replace(/\W/g,""),this.stage="init",this.options=t||{},this.secureConnection=!!this.options.secure,this.alreadySecured=!!this.options.secured,this.port=Number(this.options.port)||(this.secureConnection?465:587),this.host=this.options.host||"localhost",this.servername=this.options.servername?this.options.servername:!i.isIP(this.host)&&this.host,this.allowInternalNetworkInterfaces=this.options.allowInternalNetworkInterfaces||!1,void 0===this.options.secure&&465===this.port&&(this.secureConnection=!0),this.name=this.options.name||this._getHostname(),this.logger=d.getLogger(this.options,{component:this.options.component||"smtp-connection",sid:this.id}),this.customAuth=new Map,Object.keys(this.options.customAuth||{}).forEach((e=>{let t=(e||"").toString().trim().toUpperCase();t&&this.customAuth.set(t,this.options.customAuth[e])})),this.version=e.version,this.authenticated=!1,this.destroyed=!1,this.secure=!!this.secureConnection,this._remainder="",this._responseQueue=[],this.lastServerResponse=!1,this._socket=!1,this._supportedAuth=[],this.allowsAuth=!1,this._envelope=!1,this._supportedExtensions=[],this._maxAllowedSize=0,this._responseActions=[],this._recipientQueue=[],this._greetingTimeout=!1,this._connectionTimeout=!1,this._destroyed=!1,this._closing=!1,this._onSocketData=e=>this._onData(e),this._onSocketError=e=>this._onError(e,"ESOCKET",!1,"CONN"),this._onSocketClose=()=>this._onClose(),this._onSocketEnd=()=>this._onEnd(),this._onSocketTimeout=()=>this._onTimeout()}connect(e){if("function"==typeof e){this.once("connect",(()=>{this.logger.debug({tnx:"smtp"},"SMTP handshake finished"),e()}));const t=this._isDestroyedMessage("connect");if(t)return e(this._formatError(t,"ECONNECTION",!1,"CONN"))}let t={port:this.port,host:this.host,allowInternalNetworkInterfaces:this.allowInternalNetworkInterfaces,timeout:this.options.dnsTimeout||3e4};this.options.localAddress&&(t.localAddress=this.options.localAddress);let n=()=>{this._connectionTimeout=setTimeout((()=>{this._onError("Connection timeout","ETIMEDOUT",!1,"CONN")}),this.options.connectionTimeout||12e4),this._socket.on("error",this._onSocketError)};return this.options.connection?(this._socket=this.options.connection,void(this.secureConnection&&!this.alreadySecured?setImmediate((()=>this._upgradeConnection((e=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"CONN"):this._onConnect()})))):setImmediate((()=>this._onConnect())))):this.options.socket?(this._socket=this.options.socket,d.resolveHostname(t,((e,i)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:i.host,cached:!!i.cached},"Resolved %s as %s [cache %s]",t.host,i.host,i.cached?"hit":"miss"),Object.keys(i).forEach((e=>{"_"!==e.charAt(0)&&i[e]&&(t[e]=i[e])}));try{this._socket.connect(this.port,this.host,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),n()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):this.secureConnection?(this.options.tls&&Object.keys(this.options.tls).forEach((e=>{t[e]=this.options.tls[e]})),this.servername&&!t.servername&&(t.servername=this.servername),d.resolveHostname(t,((e,i)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:i.host,cached:!!i.cached},"Resolved %s as %s [cache %s]",t.host,i.host,i.cached?"hit":"miss"),Object.keys(i).forEach((e=>{"_"!==e.charAt(0)&&i[e]&&(t[e]=i[e])}));try{this._socket=r.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),n()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))):d.resolveHostname(t,((e,r)=>{if(e)return setImmediate((()=>this._onError(e,"EDNS",!1,"CONN")));this.logger.debug({tnx:"dns",source:t.host,resolved:r.host,cached:!!r.cached},"Resolved %s as %s [cache %s]",t.host,r.host,r.cached?"hit":"miss"),Object.keys(r).forEach((e=>{"_"!==e.charAt(0)&&r[e]&&(t[e]=r[e])}));try{this._socket=i.connect(t,(()=>{this._socket.setKeepAlive(!0),this._onConnect()})),n()}catch(e){return setImmediate((()=>this._onError(e,"ECONNECTION",!1,"CONN")))}}))}quit(){this._sendCommand("QUIT"),this._responseActions.push(this.close)}close(){if(clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._responseActions=[],this._closing)return;this._closing=!0;let e="end";"init"===this.stage&&(e="destroy"),this.logger.debug({tnx:"smtp"},'Closing connection to the server using "%s"',e);let t=this._socket&&this._socket.socket||this._socket;if(t&&!t.destroyed)try{this._socket[e]()}catch(e){}this._destroy()}login(e,t){const n=this._isDestroyedMessage("login");if(n)return t(this._formatError(n,"ECONNECTION",!1,"API"));if(this._auth=e||{},this._authMethod=(this._auth.method||"").toString().trim().toUpperCase()||!1,this._authMethod||!this._auth.oauth2||this._auth.credentials?this._authMethod&&("XOAUTH2"!==this._authMethod||this._auth.oauth2)||(this._authMethod=(this._supportedAuth[0]||"PLAIN").toUpperCase().trim()):this._authMethod="XOAUTH2",!("XOAUTH2"===this._authMethod||this._auth.credentials&&this._auth.credentials.user&&this._auth.credentials.pass)){if(!(this._auth.user&&this._auth.pass||this.customAuth.has(this._authMethod)))return t(this._formatError('Missing credentials for "'+this._authMethod+'"',"EAUTH",!1,"API"));this._auth.credentials={user:this._auth.user,pass:this._auth.pass,options:this._auth.options}}if(!this.customAuth.has(this._authMethod)){switch(this._authMethod){case"XOAUTH2":return void this._handleXOauth2Token(!1,t);case"LOGIN":return this._responseActions.push((e=>{this._actionAUTH_LOGIN_USER(e,t)})),void this._sendCommand("AUTH LOGIN");case"PLAIN":return this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),void this._sendCommand("AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0"+this._auth.credentials.pass,"utf-8").toString("base64"),"AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0/* secret */","utf-8").toString("base64"));case"CRAM-MD5":return this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5(e,t)})),void this._sendCommand("AUTH CRAM-MD5")}return t(this._formatError('Unknown authentication method "'+this._authMethod+'"',"EAUTH",!1,"API"))}{let e,n=this.customAuth.get(this._authMethod),i=!1,r=()=>{i||(i=!0,this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0))},o=n=>{i||(i=!0,t(this._formatError(n,"EAUTH",e,"AUTH "+this._authMethod)))},s=n({auth:this._auth,method:this._authMethod,extensions:[].concat(this._supportedExtensions),authMethods:[].concat(this._supportedAuth),maxAllowedSize:this._maxAllowedSize||!1,sendCommand:(t,n)=>{let i;return n||(i=new Promise(((e,t)=>{n=d.callbackPromise(e,t)}))),this._responseActions.push((i=>{e=i;let r=i.match(/^(\d+)(?:\s(\d+\.\d+\.\d+))?\s/),o={command:t,response:i};r?(o.status=Number(r[1])||0,r[2]&&(o.code=r[2]),o.text=i.substr(r[0].length)):(o.text=i,o.status=0),n(null,o)})),setImmediate((()=>this._sendCommand(t))),i},resolve:r,reject:o});s&&"function"==typeof s.catch&&s.then(r).catch(o)}}send(e,t,n){if(!t)return n(this._formatError("Empty message","EMESSAGE",!1,"API"));const i=this._isDestroyedMessage("send message");if(i)return n(this._formatError(i,"ECONNECTION",!1,"API"));if(this._maxAllowedSize&&e.size>this._maxAllowedSize)return setImmediate((()=>{n(this._formatError("Message size larger than allowed "+this._maxAllowedSize,"EMESSAGE",!1,"MAIL FROM"))}));let r=!1,o=function(){r||(r=!0,n(...arguments))};"function"==typeof t.on&&t.on("error",(e=>o(this._formatError(e,"ESTREAM",!1,"API"))));let s=Date.now();this._setEnvelope(e,((e,n)=>{if(e){let n=new u;return"function"==typeof t.pipe?t.pipe(n):(n.write(t),n.end()),o(e)}let i=Date.now(),r=this._createSendStream(((e,t)=>e?o(e):(n.envelopeTime=i-s,n.messageTime=Date.now()-i,n.messageSize=r.outByteCount,n.response=t,o(null,n))));"function"==typeof t.pipe?t.pipe(r):(r.write(t),r.end())}))}reset(e){this._sendCommand("RSET"),this._responseActions.push((t=>"2"!==t.charAt(0)?e(this._formatError("Could not reset session state. response="+t,"EPROTOCOL",t,"RSET")):(this._envelope=!1,e(null,!0))))}_onConnect(){clearTimeout(this._connectionTimeout),this.logger.info({tnx:"network",localAddress:this._socket.localAddress,localPort:this._socket.localPort,remoteAddress:this._socket.remoteAddress,remotePort:this._socket.remotePort},"%s established to %s:%s",this.secure?"Secure connection":"Connection",this._socket.remoteAddress,this._socket.remotePort),this._destroyed?this.close():(this.stage="connected",this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout),this._socket.removeListener("close",this._onSocketClose),this._socket.removeListener("end",this._onSocketEnd),this._socket.on("data",this._onSocketData),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||f),this._socket.on("timeout",this._onSocketTimeout),this._greetingTimeout=setTimeout((()=>{this._socket&&!this._destroyed&&this._responseActions[0]===this._actionGreeting&&this._onError("Greeting never received","ETIMEDOUT",!1,"CONN")}),this.options.greetingTimeout||3e4),this._responseActions.push(this._actionGreeting),this._socket.resume())}_onData(e){if(this._destroyed||!e||!e.length)return;let t,n=(e||"").toString("binary"),i=(this._remainder+n).split(/\r?\n/);this._remainder=i.pop();for(let e=0,n=i.length;e<n;e++)this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))?this._responseQueue[this._responseQueue.length-1]+="\n"+i[e]:this._responseQueue.push(i[e]);this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))||this._processResponse()}_onError(e,t,n,i){clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._destroyed||(e=this._formatError(e,t,n,i),this.logger.error(n,e.message),this.emit("error",e),this.close())}_formatError(e,t,n,i){let r;r=/Error\]$/i.test(Object.prototype.toString.call(e))?e:new Error(e),t&&"Error"!==t&&(r.code=t),n&&(r.response=n,r.message+=": "+n);let o="string"==typeof n&&Number((n.match(/^\d+/)||[])[0])||!1;return o&&(r.responseCode=o),i&&(r.command=i),r}_onClose(){let e=!1;return this._remainder&&this._remainder.trim()&&((this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},this._remainder.replace(/\r?\n$/,"")),this.lastServerResponse=e=this._remainder.trim()),this.logger.info({tnx:"network"},"Connection closed"),this.upgrading&&!this._destroyed?this._onError(new Error("Connection closed unexpectedly"),"ETLS",e,"CONN"):[this._actionGreeting,this.close].includes(this._responseActions[0])||this._destroyed?/^[45]\d{2}\b/.test(e)?this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN"):void this._destroy():this._onError(new Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN")}_onEnd(){this._socket&&!this._socket.destroyed&&this._socket.destroy()}_onTimeout(){return this._onError(new Error("Timeout"),"ETIMEDOUT",!1,"CONN")}_destroy(){this._destroyed||(this._destroyed=!0,this.emit("end"))}_upgradeConnection(e){this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout);let t=this._socket,n={socket:this._socket,host:this.host};Object.keys(this.options.tls||{}).forEach((e=>{n[e]=this.options.tls[e]})),this.servername&&!n.servername&&(n.servername=this.servername),this.upgrading=!0;try{this._socket=r.connect(n,(()=>(this.secure=!0,this.upgrading=!1,this._socket.on("data",this._onSocketData),t.removeListener("close",this._onSocketClose),t.removeListener("end",this._onSocketEnd),e(null,!0))))}catch(t){return e(t)}this._socket.on("error",this._onSocketError),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||f),this._socket.on("timeout",this._onSocketTimeout),t.resume()}_processResponse(){if(!this._responseQueue.length)return!1;let e=this.lastServerResponse=(this._responseQueue.shift()||"").toString();if(/^\d+-/.test(e.split("\n").pop()))return;(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},e.replace(/\r?\n$/,"")),e.trim()||setImmediate((()=>this._processResponse()));let t=this._responseActions.shift();if("function"!=typeof t)return this._onError(new Error("Unexpected Response"),"EPROTOCOL",e,"CONN");t.call(this,e),setImmediate((()=>this._processResponse()))}_sendCommand(e,t){if(!this._destroyed){if(this._socket.destroyed)return this.close();(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"client"},(t||e||"").toString().replace(/\r?\n$/,"")),this._socket.write(Buffer.from(e+"\r\n","utf-8"))}}_setEnvelope(e,t){let n=[],i=!1;if(this._envelope=e||{},this._envelope.from=(this._envelope.from&&this._envelope.from.address||this._envelope.from||"").toString().trim(),this._envelope.to=[].concat(this._envelope.to||[]).map((e=>(e&&e.address||e||"").toString().trim())),!this._envelope.to.length)return t(this._formatError("No recipients defined","EENVELOPE",!1,"API"));if(this._envelope.from&&/[\r\n<>]/.test(this._envelope.from))return t(this._formatError("Invalid sender "+JSON.stringify(this._envelope.from),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.from)&&(i=!0);for(let e=0,n=this._envelope.to.length;e<n;e++){if(!this._envelope.to[e]||/[\r\n<>]/.test(this._envelope.to[e]))return t(this._formatError("Invalid recipient "+JSON.stringify(this._envelope.to[e]),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.to[e])&&(i=!0)}if(this._envelope.rcptQueue=JSON.parse(JSON.stringify(this._envelope.to||[])),this._envelope.rejected=[],this._envelope.rejectedErrors=[],this._envelope.accepted=[],this._envelope.dsn)try{this._envelope.dsn=this._setDsnEnvelope(this._envelope.dsn)}catch(e){return t(this._formatError("Invalid DSN "+e.message,"EENVELOPE",!1,"API"))}this._responseActions.push((e=>{this._actionMAIL(e,t)})),i&&this._supportedExtensions.includes("SMTPUTF8")&&(n.push("SMTPUTF8"),this._usingSmtpUtf8=!0),this._envelope.use8BitMime&&this._supportedExtensions.includes("8BITMIME")&&(n.push("BODY=8BITMIME"),this._using8BitMime=!0),this._envelope.size&&this._supportedExtensions.includes("SIZE")&&n.push("SIZE="+this._envelope.size),this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.ret&&n.push("RET="+d.encodeXText(this._envelope.dsn.ret)),this._envelope.dsn.envid&&n.push("ENVID="+d.encodeXText(this._envelope.dsn.envid))),this._sendCommand("MAIL FROM:<"+this._envelope.from+">"+(n.length?" "+n.join(" "):""))}_setDsnEnvelope(e){let t=(e.ret||e.return||"").toString().toUpperCase()||null;if(t)switch(t){case"HDRS":case"HEADERS":t="HDRS";break;case"FULL":case"BODY":t="FULL"}if(t&&!["FULL","HDRS"].includes(t))throw new Error("ret: "+JSON.stringify(t));let n=(e.envid||e.id||"").toString()||null,i=e.notify||null;if(i){"string"==typeof i&&(i=i.split(",")),i=i.map((e=>e.trim().toUpperCase()));let e=["NEVER","SUCCESS","FAILURE","DELAY"],t=i.filter((t=>!e.includes(t)));if(t.length||i.length>1&&i.includes("NEVER"))throw new Error("notify: "+JSON.stringify(i.join(",")));i=i.join(",")}let r=(e.recipient||e.orcpt||"").toString()||null;return r&&r.indexOf(";")<0&&(r="rfc822;"+r),{ret:t,envid:n,notify:i,orcpt:r}}_getDsnRcptToArgs(){let e=[];return this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.notify&&e.push("NOTIFY="+d.encodeXText(this._envelope.dsn.notify)),this._envelope.dsn.orcpt&&e.push("ORCPT="+d.encodeXText(this._envelope.dsn.orcpt))),e.length?" "+e.join(" "):""}_createSendStream(e){let t,n=new a;return this.options.lmtp?this._envelope.accepted.forEach(((t,n)=>{let i=n===this._envelope.accepted.length-1;this._responseActions.push((n=>{this._actionLMTPStream(t,i,n,e)}))})):this._responseActions.push((t=>{this._actionSMTPStream(t,e)})),n.pipe(this._socket,{end:!1}),this.options.debug&&(t=new u,t.on("readable",(()=>{let e;for(;e=t.read();)this.logger.debug({tnx:"message"},e.toString("binary").replace(/\r?\n$/,""))})),n.pipe(t)),n.once("end",(()=>{this.logger.info({tnx:"message",inByteCount:n.inByteCount,outByteCount:n.outByteCount},"<%s bytes encoded mime message (source size %s bytes)>",n.outByteCount,n.inByteCount)})),n}_actionGreeting(e){clearTimeout(this._greetingTimeout),"220"===e.substr(0,3)?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this._onError(new Error("Invalid greeting. response="+e),"EPROTOCOL",e,"CONN")}_actionLHLO(e){"2"===e.charAt(0)?this._actionEHLO(e):this._onError(new Error("Invalid LHLO. response="+e),"EPROTOCOL",e,"LHLO")}_actionEHLO(e){let t;if("421"!==e.substr(0,3)){if("2"!==e.charAt(0))return this.options.requireTLS?void this._onError(new Error("EHLO failed but HELO does not support required STARTTLS. response="+e),"ECONNECTION",e,"EHLO"):(this._responseActions.push(this._actionHELO),void this._sendCommand("HELO "+this.name));if(this._ehloLines=e.split(/\r?\n/).map((e=>e.replace(/^\d+[ -]/,"").trim())).filter((e=>e)).slice(1),!this.secure&&!this.options.ignoreTLS&&(/[ -]STARTTLS\b/im.test(e)||this.options.requireTLS))return this._sendCommand("STARTTLS"),void this._responseActions.push(this._actionSTARTTLS);/[ -]SMTPUTF8\b/im.test(e)&&this._supportedExtensions.push("SMTPUTF8"),/[ -]DSN\b/im.test(e)&&this._supportedExtensions.push("DSN"),/[ -]8BITMIME\b/im.test(e)&&this._supportedExtensions.push("8BITMIME"),/[ -]PIPELINING\b/im.test(e)&&this._supportedExtensions.push("PIPELINING"),/[ -]AUTH\b/i.test(e)&&(this.allowsAuth=!0),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)PLAIN/i.test(e)&&this._supportedAuth.push("PLAIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)LOGIN/i.test(e)&&this._supportedAuth.push("LOGIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)CRAM-MD5/i.test(e)&&this._supportedAuth.push("CRAM-MD5"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)XOAUTH2/i.test(e)&&this._supportedAuth.push("XOAUTH2"),(t=e.match(/[ -]SIZE(?:[ \t]+(\d+))?/im))&&(this._supportedExtensions.push("SIZE"),this._maxAllowedSize=Number(t[1])||0),this.emit("connect")}else this._onError(new Error("Server terminates connection. response="+e),"ECONNECTION",e,"EHLO")}_actionHELO(e){"2"===e.charAt(0)?(this.allowsAuth=!0,this.emit("connect")):this._onError(new Error("Invalid HELO. response="+e),"EPROTOCOL",e,"HELO")}_actionSTARTTLS(e){if("2"!==e.charAt(0))return this.options.opportunisticTLS?(this.logger.info({tnx:"smtp"},"Failed STARTTLS upgrade, continuing unencrypted"),this.emit("connect")):void this._onError(new Error("Error upgrading connection with STARTTLS"),"ETLS",e,"STARTTLS");this._upgradeConnection(((e,t)=>{e?this._onError(new Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"STARTTLS"):(this.logger.info({tnx:"smtp"},"Connection upgraded with STARTTLS"),t?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this.emit("connect"))}))}_actionAUTH_LOGIN_USER(e,t){/^334[ -]/.test(e)?(this._responseActions.push((e=>{this._actionAUTH_LOGIN_PASS(e,t)})),this._sendCommand(Buffer.from(this._auth.credentials.user+"","utf-8").toString("base64"))):t(this._formatError('Invalid login sequence while waiting for "334 VXNlcm5hbWU6"',"EAUTH",e,"AUTH LOGIN"))}_actionAUTH_CRAM_MD5(e,t){let n=e.match(/^334\s+(.+)$/),i="";if(!n)return t(this._formatError("Invalid login sequence while waiting for server challenge string","EAUTH",e,"AUTH CRAM-MD5"));i=n[1];let r=Buffer.from(i,"base64").toString("ascii"),o=s.createHmac("md5",this._auth.credentials.pass);o.update(r);let a=this._auth.credentials.user+" "+o.digest("hex");this._responseActions.push((e=>{this._actionAUTH_CRAM_MD5_PASS(e,t)})),this._sendCommand(Buffer.from(a).toString("base64"),Buffer.from(this._auth.credentials.user+" /* secret */").toString("base64"))}_actionAUTH_CRAM_MD5_PASS(e,t){if(!e.match(/^235\s+/))return t(this._formatError('Invalid login sequence while waiting for "235"',"EAUTH",e,"AUTH CRAM-MD5"));this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0)}_actionAUTH_LOGIN_PASS(e,t){if(!/^334[ -]/.test(e))return t(this._formatError('Invalid login sequence while waiting for "334 UGFzc3dvcmQ6"',"EAUTH",e,"AUTH LOGIN"));this._responseActions.push((e=>{this._actionAUTHComplete(e,t)})),this._sendCommand(Buffer.from((this._auth.credentials.pass||"").toString(),"utf-8").toString("base64"),Buffer.from("/* secret */","utf-8").toString("base64"))}_actionAUTHComplete(e,t,n){return n||"function"!=typeof t||(n=t,t=!1),"334"===e.substr(0,3)?(this._responseActions.push((e=>{t||"XOAUTH2"!==this._authMethod?this._actionAUTHComplete(e,!0,n):setImmediate((()=>this._handleXOauth2Token(!0,n)))})),void this._sendCommand("")):"2"!==e.charAt(0)?(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),n(this._formatError("Invalid login","EAUTH",e,"AUTH "+this._authMethod))):(this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,void n(null,!0))}_actionMAIL(e,t){let n,i;if(2!==Number(e.charAt(0)))return n=this._usingSmtpUtf8&&/^550 /.test(e)&&/[\x80-\uFFFF]/.test(this._envelope.from)?"Internationalized mailbox name not allowed":"Mail command failed",t(this._formatError(n,"EENVELOPE",e,"MAIL FROM"));if(!this._envelope.rcptQueue.length)return t(this._formatError("Can't send mail - no recipients defined","EENVELOPE",!1,"API"));if(this._recipientQueue=[],this._supportedExtensions.includes("PIPELINING"))for(;this._envelope.rcptQueue.length;)i=this._envelope.rcptQueue.shift(),this._recipientQueue.push(i),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+i+">"+this._getDsnRcptToArgs());else i=this._envelope.rcptQueue.shift(),this._recipientQueue.push(i),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+i+">"+this._getDsnRcptToArgs())}_actionRCPT(e,t){let n,i,r=this._recipientQueue.shift();if(2!==Number(e.charAt(0))?(n=this._usingSmtpUtf8&&/^553 /.test(e)&&/[\x80-\uFFFF]/.test(r)?"Internationalized mailbox name not allowed":"Recipient command failed",this._envelope.rejected.push(r),i=this._formatError(n,"EENVELOPE",e,"RCPT TO"),i.recipient=r,this._envelope.rejectedErrors.push(i)):this._envelope.accepted.push(r),this._envelope.rcptQueue.length||this._recipientQueue.length)this._envelope.rcptQueue.length&&(r=this._envelope.rcptQueue.shift(),this._recipientQueue.push(r),this._responseActions.push((e=>{this._actionRCPT(e,t)})),this._sendCommand("RCPT TO:<"+r+">"+this._getDsnRcptToArgs()));else{if(!(this._envelope.rejected.length<this._envelope.to.length))return i=this._formatError("Can't send mail - all recipients were rejected","EENVELOPE",e,"RCPT TO"),i.rejected=this._envelope.rejected,i.rejectedErrors=this._envelope.rejectedErrors,t(i);this._responseActions.push((e=>{this._actionDATA(e,t)})),this._sendCommand("DATA")}}_actionDATA(e,t){if(!/^[23]/.test(e))return t(this._formatError("Data command failed","EENVELOPE",e,"DATA"));let n={accepted:this._envelope.accepted,rejected:this._envelope.rejected};this._ehloLines&&this._ehloLines.length&&(n.ehlo=this._ehloLines),this._envelope.rejectedErrors.length&&(n.rejectedErrors=this._envelope.rejectedErrors),t(null,n)}_actionSMTPStream(e,t){return 2!==Number(e.charAt(0))?t(this._formatError("Message failed","EMESSAGE",e,"DATA")):t(null,e)}_actionLMTPStream(e,t,n,i){let r;if(2!==Number(n.charAt(0))){r=this._formatError("Message failed for recipient "+e,"EMESSAGE",n,"DATA"),r.recipient=e,this._envelope.rejected.push(e),this._envelope.rejectedErrors.push(r);for(let t=0,n=this._envelope.accepted.length;t<n;t++)this._envelope.accepted[t]===e&&this._envelope.accepted.splice(t,1)}if(t)return i(null,n)}_handleXOauth2Token(e,t){this._auth.oauth2.getToken(e,((n,i)=>{if(n)return this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),t(this._formatError(n,"EAUTH",!1,"AUTH XOAUTH2"));this._responseActions.push((n=>{this._actionAUTHComplete(n,e,t)})),this._sendCommand("AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token(i),"AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token("/* secret */"))}))}_isDestroyedMessage(e){if(this._destroyed)return"Cannot "+e+" - smtp connection is already destroyed.";if(this._socket){if(this._socket.destroyed)return"Cannot "+e+" - smtp connection socket is already destroyed.";if(!this._socket.writable)return"Cannot "+e+" - smtp connection socket is already half-closed."}}_getHostname(){let e;try{e=o.hostname()||""}catch(t){e="localhost"}return(!e||e.indexOf(".")<0)&&(e="[127.0.0.1]"),e.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)&&(e="["+e+"]"),e}},eI}function pI(){if(iI)return nI;iI=1;const e=c.Stream,t=MA(),n=m,i=jA();return nI=class extends e{constructor(e,t){if(super(),this.options=e||{},e&&e.serviceClient){if(!e.privateKey||!e.user)return void setImmediate((()=>this.emit("error",new Error('Options "privateKey" and "user" are required for service account!'))));let t=Math.min(Math.max(Number(this.options.serviceRequestTimeout)||0,0),3600);this.options.serviceRequestTimeout=t||300}if(this.logger=i.getLogger({logger:t},{component:this.options.component||"OAuth2"}),this.provisionCallback="function"==typeof this.options.provisionCallback&&this.options.provisionCallback,this.options.accessUrl=this.options.accessUrl||"https://accounts.google.com/o/oauth2/token",this.options.customHeaders=this.options.customHeaders||{},this.options.customParams=this.options.customParams||{},this.accessToken=this.options.accessToken||!1,this.options.expires&&Number(this.options.expires))this.expires=this.options.expires;else{let e=Math.max(Number(this.options.timeout)||0,0);this.expires=e&&Date.now()+1e3*e||0}}getToken(e,t){if(!e&&this.accessToken&&(!this.expires||this.expires>Date.now()))return t(null,this.accessToken);let n=(...e)=>{e[0]?this.logger.error({err:e[0],tnx:"OAUTH2",user:this.options.user,action:"renew"},"Failed generating new Access Token for %s",this.options.user):this.logger.info({tnx:"OAUTH2",user:this.options.user,action:"renew"},"Generated new Access Token for %s",this.options.user),t(...e)};this.provisionCallback?this.provisionCallback(this.options.user,!!e,((e,t,i)=>{!e&&t&&(this.accessToken=t,this.expires=i||0),n(e,t)})):this.generateToken(n)}updateToken(e,t){this.accessToken=e,t=Math.max(Number(t)||0,0),this.expires=t&&Date.now()+1e3*t||0,this.emit("token",{user:this.options.user,accessToken:e||"",expires:this.expires})}generateToken(e){let t,n;if(this.options.serviceClient){let i,r=Math.floor(Date.now()/1e3),o={iss:this.options.serviceClient,scope:this.options.scope||"https://mail.google.com/",sub:this.options.user,aud:this.options.accessUrl,iat:r,exp:r+this.options.serviceRequestTimeout};try{i=this.jwtSignRS256(o)}catch(t){return e(new Error("Can't generate token. Check your auth options"))}t={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:i},n={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:o}}else{if(!this.options.refreshToken)return e(new Error("Can't create new access token for user"));t={client_id:this.options.clientId||"",client_secret:this.options.clientSecret||"",refresh_token:this.options.refreshToken,grant_type:"refresh_token"},n={client_id:this.options.clientId||"",client_secret:(this.options.clientSecret||"").substr(0,6)+"...",refresh_token:(this.options.refreshToken||"").substr(0,6)+"...",grant_type:"refresh_token"}}Object.keys(this.options.customParams).forEach((e=>{t[e]=this.options.customParams[e],n[e]=this.options.customParams[e]})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"generate"},"Requesting token using: %s",JSON.stringify(n)),this.postRequest(this.options.accessUrl,t,this.options,((t,n)=>{let i;if(t)return e(t);try{i=JSON.parse(n.toString())}catch(t){return e(t)}if(!i||"object"!=typeof i)return this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",(n||"").toString()),e(new Error("Invalid authentication response"));let r={};if(Object.keys(i).forEach((e=>{r[e]="access_token"!==e?i[e]:(i[e]||"").toString().substr(0,6)+"..."})),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",JSON.stringify(r)),i.error){let t=i.error;return i.error_description&&(t+=": "+i.error_description),i.error_uri&&(t+=" ("+i.error_uri+")"),e(new Error(t))}return i.access_token?(this.updateToken(i.access_token,i.expires_in),e(null,this.accessToken)):e(new Error("No access token"))}))}buildXOAuth2Token(e){let t=["user="+(this.options.user||""),"auth=Bearer "+(e||this.accessToken),"",""];return Buffer.from(t.join(""),"utf-8").toString("base64")}postRequest(e,n,i,r){let o=!1,s=[],a=0,c=t(e,{method:"post",headers:i.customHeaders,body:n,allowErrorResponse:!0});c.on("readable",(()=>{let e;for(;null!==(e=c.read());)s.push(e),a+=e.length})),c.once("error",(e=>{if(!o)return o=!0,r(e)})),c.once("end",(()=>{if(!o)return o=!0,r(null,Buffer.concat(s,a))}))}toBase64URL(e){return"string"==typeof e&&(e=Buffer.from(e)),e.toString("base64").replace(/[=]+/g,"").replace(/\+/g,"-").replace(/\//g,"_")}jwtSignRS256(e){e=['{"alg":"RS256","typ":"JWT"}',JSON.stringify(e)].map((e=>this.toBase64URL(e))).join(".");let t=n.createSign("RSA-SHA256").update(e).sign(this.options.privateKey);return e+"."+this.toBase64URL(t)}},nI}var dI,mI,hI,fI,gI,yI,vI,bI,xI,wI,EI,SI,_I,OI,CI,kI={126:{host:"smtp.126.com",port:465,secure:!0},163:{host:"smtp.163.com",port:465,secure:!0},"1und1":{host:"smtp.1und1.de",port:465,secure:!0,authMethod:"LOGIN"},Aliyun:{domains:["aliyun.com"],host:"smtp.aliyun.com",port:465,secure:!0},AOL:{domains:["aol.com"],host:"smtp.aol.com",port:587},Bluewin:{host:"smtpauths.bluewin.ch",domains:["bluewin.ch"],port:465},DebugMail:{host:"debugmail.io",port:25},DynectEmail:{aliases:["Dynect"],host:"smtp.dynect.net",port:25},Ethereal:{aliases:["ethereal.email"],host:"smtp.ethereal.email",port:587},FastMail:{domains:["fastmail.fm"],host:"smtp.fastmail.com",port:465,secure:!0},"Forward Email":{aliases:["FE","ForwardEmail"],domains:["forwardemail.net"],host:"smtp.forwardemail.net",port:465,secure:!0},"Feishu Mail":{aliases:["Feishu","FeishuMail"],domains:["www.feishu.cn"],host:"smtp.feishu.cn",port:465,secure:!0},GandiMail:{aliases:["Gandi","Gandi Mail"],host:"mail.gandi.net",port:587},Gmail:{aliases:["Google Mail"],domains:["gmail.com","googlemail.com"],host:"smtp.gmail.com",port:465,secure:!0},Godaddy:{host:"smtpout.secureserver.net",port:25},GodaddyAsia:{host:"smtp.asia.secureserver.net",port:25},GodaddyEurope:{host:"smtp.europe.secureserver.net",port:25},"hot.ee":{host:"mail.hot.ee"},Hotmail:{aliases:["Outlook","Outlook.com","Hotmail.com"],domains:["hotmail.com","outlook.com"],host:"smtp-mail.outlook.com",port:587},iCloud:{aliases:["Me","Mac"],domains:["me.com","mac.com"],host:"smtp.mail.me.com",port:587},Infomaniak:{host:"mail.infomaniak.com",domains:["ik.me","ikmail.com","etik.com"],port:587},Loopia:{host:"mailcluster.loopia.se",port:465},"mail.ee":{host:"smtp.mail.ee"},"Mail.ru":{host:"smtp.mail.ru",port:465,secure:!0},"Mailcatch.app":{host:"sandbox-smtp.mailcatch.app",port:2525},Maildev:{port:1025,ignoreTLS:!0},Mailgun:{host:"smtp.mailgun.org",port:465,secure:!0},Mailjet:{host:"in.mailjet.com",port:587},Mailosaur:{host:"mailosaur.io",port:25},Mailtrap:{host:"live.smtp.mailtrap.io",port:587},Mandrill:{host:"smtp.mandrillapp.com",port:587},Naver:{host:"smtp.naver.com",port:587},One:{host:"send.one.com",port:465,secure:!0},OpenMailBox:{aliases:["OMB","openmailbox.org"],host:"smtp.openmailbox.org",port:465,secure:!0},Outlook365:{host:"smtp.office365.com",port:587,secure:!1},OhMySMTP:{host:"smtp.ohmysmtp.com",port:587,secure:!1},Postmark:{aliases:["PostmarkApp"],host:"smtp.postmarkapp.com",port:2525},"qiye.aliyun":{host:"smtp.mxhichina.com",port:"465",secure:!0},QQ:{domains:["qq.com"],host:"smtp.qq.com",port:465,secure:!0},QQex:{aliases:["QQ Enterprise"],domains:["exmail.qq.com"],host:"smtp.exmail.qq.com",port:465,secure:!0},SendCloud:{host:"smtp.sendcloud.net",port:2525},SendGrid:{host:"smtp.sendgrid.net",port:587},SendinBlue:{aliases:["Brevo"],host:"smtp-relay.brevo.com",port:587},SendPulse:{host:"smtp-pulse.com",port:465,secure:!0},SES:{host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},"SES-US-EAST-1":{host:"email-smtp.us-east-1.amazonaws.com",port:465,secure:!0},"SES-US-WEST-2":{host:"email-smtp.us-west-2.amazonaws.com",port:465,secure:!0},"SES-EU-WEST-1":{host:"email-smtp.eu-west-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTH-1":{host:"email-smtp.ap-south-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-1":{host:"email-smtp.ap-northeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-2":{host:"email-smtp.ap-northeast-2.amazonaws.com",port:465,secure:!0},"SES-AP-NORTHEAST-3":{host:"email-smtp.ap-northeast-3.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-1":{host:"email-smtp.ap-southeast-1.amazonaws.com",port:465,secure:!0},"SES-AP-SOUTHEAST-2":{host:"email-smtp.ap-southeast-2.amazonaws.com",port:465,secure:!0},Sparkpost:{aliases:["SparkPost","SparkPost Mail"],domains:["sparkpost.com"],host:"smtp.sparkpostmail.com",port:587,secure:!1},Tipimail:{host:"smtp.tipimail.com",port:587},Yahoo:{domains:["yahoo.com"],host:"smtp.mail.yahoo.com",port:465,secure:!0},Yandex:{domains:["yandex.ru"],host:"smtp.yandex.ru",port:465,secure:!0},Zoho:{host:"smtp.zoho.com",port:465,secure:!0,authMethod:"LOGIN"}};function TI(){if(mI)return dI;mI=1;const e=kI,t={};function n(e){return e.replace(/[^a-zA-Z0-9.-]/g,"").toLowerCase()}function i(e){let t=["domains","aliases"],n={};return Object.keys(e).forEach((i=>{t.indexOf(i)<0&&(n[i]=e[i])})),n}return Object.keys(e).forEach((r=>{let o=e[r];t[n(r)]=i(o),[].concat(o.aliases||[]).forEach((e=>{t[n(e)]=i(o)})),[].concat(o.domains||[]).forEach((e=>{t[n(e)]=i(o)}))})),dI=function(e){return e=n(e.split("@").pop()),t[e]||!1}}function PI(){if(fI)return hI;fI=1;const e=t,n=function(){if(oI)return rI;oI=1;const e=uI(),n=jA().assign,i=pI(),r=t;return rI=class extends r{constructor(e){if(super(),this.pool=e,this.options=e.options,this.logger=this.pool.logger,this.options.auth)switch((this.options.auth.type||"").toString().toUpperCase()){case"OAUTH2":{let e=new i(this.options.auth,this.logger);e.provisionCallback=this.pool.mailer&&this.pool.mailer.get("oauth2_provision_cb")||e.provisionCallback,this.auth={type:"OAUTH2",user:this.options.auth.user,oauth2:e,method:"XOAUTH2"},e.on("token",(e=>this.pool.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e)));break}default:if(!this.options.auth.user&&!this.options.auth.pass)break;this.auth={type:(this.options.auth.type||"").toString().toUpperCase()||"LOGIN",user:this.options.auth.user,credentials:{user:this.options.auth.user||"",pass:this.options.auth.pass,options:this.options.auth.options},method:(this.options.auth.method||"").trim().toUpperCase()||this.options.authMethod||!1}}this._connection=!1,this._connected=!1,this.messages=0,this.available=!0}connect(t){this.pool.getSocket(this.options,((i,r)=>{if(i)return t(i);let o=!1,s=this.options;r&&r.connection&&(this.logger.info({tnx:"proxy",remoteAddress:r.connection.remoteAddress,remotePort:r.connection.remotePort,destHost:s.host||"",destPort:s.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",r.connection.remoteAddress,r.connection.remotePort,s.host||"",s.port||""),s=n(!1,s),Object.keys(r).forEach((e=>{s[e]=r[e]}))),this.connection=new e(s),this.connection.once("error",(e=>{if(this.emit("error",e),!o)return o=!0,t(e)})),this.connection.once("end",(()=>{if(this.close(),o)return;o=!0;let e=setTimeout((()=>{if(o)return;let e=new Error("Unexpected socket close");this.connection&&this.connection._socket&&this.connection._socket.upgrading&&(e.code="ETLS"),t(e)}),1e3);try{e.unref()}catch(e){}})),this.connection.connect((()=>{if(!o)return this.auth&&(this.connection.allowsAuth||s.forceAuth)?void this.connection.login(this.auth,(e=>{if(!o){if(o=!0,e)return this.connection.close(),this.emit("error",e),t(e);this._connected=!0,t(null,!0)}})):(o=!0,this._connected=!0,t(null,!0))}))}))}send(e,t){if(!this._connected)return this.connect((n=>n?t(n):this.send(e,t)));let n=e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i,cid:this.id},"Sending message %s using #%s to <%s>",i,this.id,r.join(", ")),e.data.dsn&&(n.dsn=e.data.dsn),this.connection.send(n,e.message.createReadStream(),((e,r)=>{if(this.messages++,e)return this.connection.close(),this.emit("error",e),t(e);r.envelope={from:n.from,to:n.to},r.messageId=i,setImmediate((()=>{let e;this.messages>=this.options.maxMessages?(e=new Error("Resource exhausted"),e.code="EMAXLIMIT",this.connection.close(),this.emit("error",e)):this.pool._checkRateLimit((()=>{this.available=!0,this.emit("available")}))})),t(null,r)}))}close(){this._connected=!1,this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.connection&&this.connection.close(),this.emit("close")}},rI}(),i=uI(),r=TI(),o=jA(),s=RA;return hI=class extends e{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let n=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=o.parseConnectionUrl(e.url),n=n||t.service),this.options=o.assign(!1,e,t,n&&r(n)),this.options.maxConnections=this.options.maxConnections||5,this.options.maxMessages=this.options.maxMessages||100,this.logger=o.getLogger(this.options,{component:this.options.component||"smtp-pool"});let a=new i(this.options);this.name="SMTP (pool)",this.version=s.version+"[client:"+a.version+"]",this._rateLimit={counter:0,timeout:null,waiting:[],checkpoint:!1,delta:Number(this.options.rateDelta)||1e3,limit:Number(this.options.rateLimit)||0},this._closed=!1,this._queue=[],this._connections=[],this._connectionCounter=0,this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}send(e,t){return!this._closed&&(this._queue.push({mail:e,requeueAttempts:0,callback:t}),this.idling&&this._queue.length>=this.options.maxConnections&&(this.idling=!1),setImmediate((()=>this._processMessages())),!0)}close(){let e,t=this._connections.length;if(this._closed=!0,clearTimeout(this._rateLimit.timeout),!t&&!this._queue.length)return;for(let n=t-1;n>=0;n--)this._connections[n]&&this._connections[n].available&&(e=this._connections[n],e.close(),this.logger.info({tnx:"connection",cid:e.id,action:"removed"},"Connection #%s removed",e.id));if(t&&!this._connections.length&&this.logger.debug({tnx:"connection"},"All connections removed"),!this._queue.length)return;let n=()=>{if(!this._queue.length)return void this.logger.debug({tnx:"connection"},"Pending queue entries cleared");let t=this._queue.shift();if(t&&"function"==typeof t.callback)try{t.callback(new Error("Connection pool was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}setImmediate(n)};setImmediate(n)}_processMessages(){let e,t,n;if(this._closed)return;if(!this._queue.length)return void(this.idling||(this.idling=!0,this.emit("idle")));for(t=0,n=this._connections.length;t<n;t++)if(this._connections[t].available){e=this._connections[t];break}if(!e&&this._connections.length<this.options.maxConnections&&(e=this._createConnection()),!e)return void(this.idling=!1);!this.idling&&this._queue.length<this.options.maxConnections&&(this.idling=!0,this.emit("idle"));let i=e.queueEntry=this._queue.shift();i.messageId=(e.queueEntry.mail.message.getHeader("message-id")||"").replace(/[<>\s]/g,""),e.available=!1,this.logger.debug({tnx:"pool",cid:e.id,messageId:i.messageId,action:"assign"},"Assigned message <%s> to #%s (%s)",i.messageId,e.id,e.messages+1),this._rateLimit.limit&&(this._rateLimit.counter++,this._rateLimit.checkpoint||(this._rateLimit.checkpoint=Date.now())),e.send(i.mail,((t,n)=>{if(i===e.queueEntry){try{i.callback(t,n)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}))}_createConnection(){let e=new n(this);return e.id=++this._connectionCounter,this.logger.info({tnx:"pool",cid:e.id,action:"conection"},"Created new pool resource #%s",e.id),e.on("available",(()=>{this.logger.debug({tnx:"connection",cid:e.id,action:"available"},"Connection #%s became available",e.id),this._closed?this.close():this._processMessages()})),e.once("error",(t=>{if("EMAXLIMIT"!==t.code?this.logger.error({err:t,tnx:"pool",cid:e.id},"Pool Error for #%s: %s",e.id,t.message):this.logger.debug({tnx:"pool",cid:e.id,action:"maxlimit"},"Max messages limit exchausted for #%s",e.id),e.queueEntry){try{e.queueEntry.callback(t)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}this._removeConnection(e),this._continueProcessing()})),e.once("close",(()=>{this.logger.info({tnx:"connection",cid:e.id,action:"closed"},"Connection #%s was closed",e.id),this._removeConnection(e),e.queueEntry?setTimeout((()=>{e.queueEntry&&(this._shouldRequeuOnConnectionClose(e.queueEntry)?this._requeueEntryOnConnectionClose(e):this._failDeliveryOnConnectionClose(e)),this._continueProcessing()}),50):this._continueProcessing()})),this._connections.push(e),e}_shouldRequeuOnConnectionClose(e){return void 0===this.options.maxRequeues||this.options.maxRequeues<0||e.requeueAttempts<this.options.maxRequeues}_failDeliveryOnConnectionClose(e){if(e.queueEntry&&e.queueEntry.callback){try{e.queueEntry.callback(new Error("Reached maximum number of retries after connection was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",messageId:e.queueEntry.messageId,cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}_requeueEntryOnConnectionClose(e){e.queueEntry.requeueAttempts=e.queueEntry.requeueAttempts+1,this.logger.debug({tnx:"pool",cid:e.id,messageId:e.queueEntry.messageId,action:"requeue"},"Re-queued message <%s> for #%s. Attempt: #%s",e.queueEntry.messageId,e.id,e.queueEntry.requeueAttempts),this._queue.unshift(e.queueEntry),e.queueEntry=!1}_continueProcessing(){this._closed?this.close():setTimeout((()=>this._processMessages()),100)}_removeConnection(e){let t=this._connections.indexOf(e);-1!==t&&this._connections.splice(t,1)}_checkRateLimit(e){if(!this._rateLimit.limit)return e();let t=Date.now();return this._rateLimit.counter<this._rateLimit.limit?e():(this._rateLimit.waiting.push(e),this._rateLimit.checkpoint<=t-this._rateLimit.delta?this._clearRateLimit():void(this._rateLimit.timeout||(this._rateLimit.timeout=setTimeout((()=>this._clearRateLimit()),this._rateLimit.delta-(t-this._rateLimit.checkpoint)),this._rateLimit.checkpoint=t)))}_clearRateLimit(){for(clearTimeout(this._rateLimit.timeout),this._rateLimit.timeout=null,this._rateLimit.counter=0,this._rateLimit.checkpoint=!1;this._rateLimit.waiting.length;){let e=this._rateLimit.waiting.shift();setImmediate(e)}}isIdle(){return this.idling}verify(e){let t;e||(t=new Promise(((t,n)=>{e=o.callbackPromise(t,n)})));let r=new n(this).auth;return this.getSocket(this.options,((t,n)=>{if(t)return e(t);let s=this.options;n&&n.connection&&(this.logger.info({tnx:"proxy",remoteAddress:n.connection.remoteAddress,remotePort:n.connection.remotePort,destHost:s.host||"",destPort:s.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",n.connection.remoteAddress,n.connection.remotePort,s.host||"",s.port||""),s=o.assign(!1,s),Object.keys(n).forEach((e=>{s[e]=n[e]})));let a=new i(s),c=!1;a.once("error",(t=>{if(!c)return c=!0,a.close(),e(t)})),a.once("end",(()=>{if(!c)return c=!0,e(new Error("Connection closed"))}));let l=()=>{if(!c)return c=!0,a.quit(),e(null,!0)};a.connect((()=>{if(!c)if(r&&(a.allowsAuth||s.forceAuth))a.login(r,(t=>{if(!c)return t?(c=!0,a.close(),e(t)):void l()}));else{if(!r&&a.allowsAuth&&s.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",c=!0,a.close(),e(t)}l()}}))})),t}},hI}function AI(){if(OI)return _I;OI=1;const e=t,n=RA,i=jA(),r=UA();return _I=class extends e{constructor(e){super(),e=e||{},this.options=e||{},this.ses=this.options.SES,this.name="SESTransport",this.version=n.version,this.logger=i.getLogger(this.options,{component:this.options.component||"ses-transport"}),this.maxConnections=Number(this.options.maxConnections)||1/0,this.connections=0,this.sendingRate=Number(this.options.sendingRate)||1/0,this.sendingRateTTL=null,this.rateInterval=1e3,this.rateMessages=[],this.pending=[],this.idling=!0,setImmediate((()=>{this.idling&&this.emit("idle")}))}send(e,t){return this.connections>=this.maxConnections?(this.idling=!1,this.pending.push({mail:e,callback:t})):this._checkSendingRate()?void this._send(e,((...e)=>{setImmediate((()=>t(...e))),this._sent()})):(this.idling=!1,this.pending.push({mail:e,callback:t}))}_checkRatedQueue(){if(this.connections>=this.maxConnections||!this._checkSendingRate())return;if(!this.pending.length)return void(this.idling||(this.idling=!0,this.emit("idle")));let e=this.pending.shift();this._send(e.mail,((...t)=>{setImmediate((()=>e.callback(...t))),this._sent()}))}_checkSendingRate(){clearTimeout(this.sendingRateTTL);let e=Date.now(),t=!1;for(let n=this.rateMessages.length-1;n>=0;n--)this.rateMessages[n].ts>=e-this.rateInterval&&(!t||this.rateMessages[n].ts<t)&&(t=this.rateMessages[n].ts),this.rateMessages[n].ts<e-this.rateInterval&&!this.rateMessages[n].pending&&this.rateMessages.splice(n,1);if(this.rateMessages.length<this.sendingRate)return!0;let n=Math.max(t+1001,e+20);this.sendingRateTTL=setTimeout((()=>this._checkRatedQueue()),e-n);try{this.sendingRateTTL.unref()}catch(e){}return!1}_sent(){this.connections--,this._checkRatedQueue()}isIdle(){return this.idling}_send(e,t){let n={ts:Date.now(),pending:!0};this.connections++,this.rateMessages.push(n);let i=e.data.envelope||e.message.getEnvelope(),o=e.message.messageId(),s=[].concat(i.to||[]);s.length>3&&s.push("...and "+s.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:o},"Sending message %s to <%s>",o,s.join(", "));setImmediate((()=>(t=>{e.data._dkim||(e.data._dkim={}),e.data._dkim.skipFields&&"string"==typeof e.data._dkim.skipFields?e.data._dkim.skipFields+=":date:message-id":e.data._dkim.skipFields="date:message-id";let n=e.message.createReadStream(),i=n.pipe(new r),o=[],s=0;i.on("readable",(()=>{let e;for(;null!==(e=i.read());)o.push(e),s+=e.length})),n.once("error",(e=>i.emit("error",e))),i.once("error",(e=>{t(e)})),i.once("end",(()=>t(null,Buffer.concat(o,s))))})(((r,s)=>{if(r)return this.logger.error({err:r,tnx:"send",messageId:o},"Failed creating message for %s. %s",o,r.message),n.pending=!1,t(r);let a={RawMessage:{Data:s},Source:i.from,Destinations:i.to};Object.keys(e.data.ses||{}).forEach((t=>{a[t]=e.data.ses[t]}));let c=(this.ses.aws?this.ses.ses:this.ses)||{},l=this.ses.aws||{};var u;u=(e,r)=>{let u;!e&&r||(r="us-east-1"),u="function"==typeof c.send&&l.SendRawEmailCommand?c.send(new l.SendRawEmailCommand(a)):c.sendRawEmail(a).promise(),u.then((e=>{"us-east-1"===r&&(r="email"),n.pending=!1,t(null,{envelope:{from:i.from,to:i.to},messageId:"<"+e.MessageId+(/@/.test(e.MessageId)?"":"@"+r+".amazonses.com")+">",response:e.MessageId,raw:s})})).catch((e=>{this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",o,e.message),n.pending=!1,t(e)}))},c.config&&"function"==typeof c.config.region?c.config.region().then((e=>u(null,e))).catch((e=>u(e))):u(null,c.config&&c.config.region||"us-east-1")}))))}verify(e){let t,n=(this.ses.aws?this.ses.ses:this.ses)||{},r=this.ses.aws||{};const o={RawMessage:{Data:"From: invalid@invalid\r\nTo: invalid@invalid\r\n Subject: Invalid\r\n\r\nInvalid"},Source:"invalid@invalid",Destinations:["invalid@invalid"]};e||(t=new Promise(((t,n)=>{e=i.callbackPromise(t,n)})));const s=t=>t&&"InvalidParameterValue"!==(t.code||t.Code)?e(t):e(null,!0);return"function"==typeof n.send&&r.SendRawEmailCommand?(o.RawMessage.Data=Buffer.from(o.RawMessage.Data),n.send(new r.SendRawEmailCommand(o),s)):n.sendRawEmail(o,s),t}},_I}var II=function(){if(CI)return tA;CI=1;const e=lI(),n=jA(),i=PI(),r=function(){if(yI)return gI;yI=1;const e=t,n=uI(),i=TI(),r=jA(),o=pI(),s=RA;return gI=class extends e{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let o=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=r.parseConnectionUrl(e.url),o=o||t.service),this.options=r.assign(!1,e,t,o&&i(o)),this.logger=r.getLogger(this.options,{component:this.options.component||"smtp-transport"});let a=new n(this.options);this.name="SMTP",this.version=s.version+"[client:"+a.version+"]",this.options.auth&&(this.auth=this.getAuth({}))}getSocket(e,t){return setImmediate((()=>t(null,!1)))}getAuth(e){if(!e)return this.auth;let t=!1,n={};if(this.options.auth&&"object"==typeof this.options.auth&&Object.keys(this.options.auth).forEach((e=>{t=!0,n[e]=this.options.auth[e]})),e&&"object"==typeof e&&Object.keys(e).forEach((i=>{t=!0,n[i]=e[i]})),!t)return!1;if("OAUTH2"===(n.type||"").toString().toUpperCase()){if(!n.service&&!n.user)return!1;let e=new o(n,this.logger);return e.provisionCallback=this.mailer&&this.mailer.get("oauth2_provision_cb")||e.provisionCallback,e.on("token",(e=>this.mailer.emit("token",e))),e.on("error",(e=>this.emit("error",e))),{type:"OAUTH2",user:n.user,oauth2:e,method:"XOAUTH2"}}return{type:(n.type||"").toString().toUpperCase()||"LOGIN",user:n.user,credentials:{user:n.user||"",pass:n.pass,options:n.options},method:(n.method||"").trim().toUpperCase()||this.options.authMethod||!1}}send(e,t){this.getSocket(this.options,((i,o)=>{if(i)return t(i);let s=!1,a=this.options;o&&o.connection&&(this.logger.info({tnx:"proxy",remoteAddress:o.connection.remoteAddress,remotePort:o.connection.remotePort,destHost:a.host||"",destPort:a.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",o.connection.remoteAddress,o.connection.remotePort,a.host||"",a.port||""),a=r.assign(!1,a),Object.keys(o).forEach((e=>{a[e]=o[e]})));let c=new n(a);c.once("error",(e=>{if(!s)return s=!0,c.close(),t(e)})),c.once("end",(()=>{if(s)return;let e=setTimeout((()=>{if(s)return;s=!0;let e=new Error("Unexpected socket close");c&&c._socket&&c._socket.upgrading&&(e.code="ETLS"),t(e)}),1e3);try{e.unref()}catch(e){}}));let l=()=>{let n=e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),e.data.dsn&&(n.dsn=e.data.dsn),this.logger.info({tnx:"send",messageId:i},"Sending message %s to <%s>",i,r.join(", ")),c.send(n,e.message.createReadStream(),((e,r)=>{if(s=!0,c.close(),e)return this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",i,e.message),t(e);r.envelope={from:n.from,to:n.to},r.messageId=i;try{return t(null,r)}catch(e){this.logger.error({err:e,tnx:"callback"},"Callback error for %s: %s",i,e.message)}}))};c.connect((()=>{if(s)return;let n=this.getAuth(e.data.auth);n&&(c.allowsAuth||a.forceAuth)?c.login(n,(e=>{if(n&&n!==this.auth&&n.oauth2&&n.oauth2.removeAllListeners(),!s)return e?(s=!0,c.close(),t(e)):void l()})):l()}))}))}verify(e){let t;return e||(t=new Promise(((t,n)=>{e=r.callbackPromise(t,n)}))),this.getSocket(this.options,((t,i)=>{if(t)return e(t);let o=this.options;i&&i.connection&&(this.logger.info({tnx:"proxy",remoteAddress:i.connection.remoteAddress,remotePort:i.connection.remotePort,destHost:o.host||"",destPort:o.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",i.connection.remoteAddress,i.connection.remotePort,o.host||"",o.port||""),o=r.assign(!1,o),Object.keys(i).forEach((e=>{o[e]=i[e]})));let s=new n(o),a=!1;s.once("error",(t=>{if(!a)return a=!0,s.close(),e(t)})),s.once("end",(()=>{if(!a)return a=!0,e(new Error("Connection closed"))}));let c=()=>{if(!a)return a=!0,s.quit(),e(null,!0)};s.connect((()=>{if(a)return;let t=this.getAuth({});if(t&&(s.allowsAuth||o.forceAuth))s.login(t,(t=>{if(!a)return t?(a=!0,s.close(),e(t)):void c()}));else{if(!t&&s.allowsAuth&&o.forceAuth){let t=new Error("Authentication info was not provided");return t.code="NoAuth",a=!0,s.close(),e(t)}c()}}))})),t}close(){this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.emit("close")}},gI}(),o=function(){if(bI)return vI;bI=1;const e=f.spawn,t=RA,n=jA();return vI=class{constructor(i){i=i||{},this._spawn=e,this.options=i||{},this.name="Sendmail",this.version=t.version,this.path="sendmail",this.args=!1,this.winbreak=!1,this.logger=n.getLogger(this.options,{component:this.options.component||"sendmail"}),i&&("string"==typeof i?this.path=i:"object"==typeof i&&(i.path&&(this.path=i.path),Array.isArray(i.args)&&(this.args=i.args),this.winbreak=["win","windows","dos","\r\n"].includes((i.newline||"").toString().toLowerCase())))}send(e,t){e.message.keepBcc=!0;let n,i,r,o=e.data.envelope||e.message.getEnvelope(),s=e.message.messageId();if([].concat(o.from||[]).concat(o.to||[]).some((e=>/^-/.test(e))))return t(new Error("Can not send mail. Invalid envelope addresses."));n=this.args?["-i"].concat(this.args).concat(o.to):["-i"].concat(o.from?["-f",o.from]:[]).concat(o.to);let a=n=>{if(!r)return r=!0,"function"==typeof t?n?t(n):t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:s,response:"Messages queued for delivery"}):void 0};try{i=this._spawn(this.path,n)}catch(e){return this.logger.error({err:e,tnx:"spawn",messageId:s},"Error occurred while spawning sendmail. %s",e.message),a(e)}if(!i)return a(new Error("sendmail was not found"));{i.on("error",(e=>{this.logger.error({err:e,tnx:"spawn",messageId:s},"Error occurred when sending message %s. %s",s,e.message),a(e)})),i.once("exit",(e=>{if(!e)return a();let t;t=127===e?new Error("Sendmail command not found, process exited with code "+e):new Error("Sendmail exited with code "+e),this.logger.error({err:t,tnx:"stdin",messageId:s},"Error sending message %s to sendmail. %s",s,t.message),a(t)})),i.once("close",a),i.stdin.on("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:s},"Error occurred when piping message %s to sendmail. %s",s,e.message),a(e)}));let t=[].concat(o.to||[]);t.length>3&&t.push("...and "+t.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:s},"Sending message %s to <%s>",s,t.join(", "));let n=e.message.createReadStream();n.once("error",(e=>{this.logger.error({err:e,tnx:"stdin",messageId:s},"Error occurred when generating message %s. %s",s,e.message),i.kill("SIGINT"),a(e)})),n.pipe(i.stdin)}}}}(),s=function(){if(wI)return xI;wI=1;const e=RA,t=jA();return xI=class{constructor(n){n=n||{},this.options=n||{},this.name="StreamTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"stream-transport"}),this.winbreak=["win","windows","dos","\r\n"].includes((n.newline||"").toString().toLowerCase())}send(e,t){e.message.keepBcc=!0;let n=e.data.envelope||e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i},"Sending message %s to <%s> using %s line breaks",i,r.join(", "),this.winbreak?"<CR><LF>":"<LF>"),setImmediate((()=>{let n;try{n=e.message.createReadStream()}catch(e){return this.logger.error({err:e,tnx:"send",messageId:i},"Creating send stream failed for %s. %s",i,e.message),t(e)}if(!this.options.buffer)return n.once("error",(e=>{this.logger.error({err:e,tnx:"send",messageId:i},"Failed creating message for %s. %s",i,e.message)})),t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:i,message:n});let r=[],o=0;n.on("readable",(()=>{let e;for(;null!==(e=n.read());)r.push(e),o+=e.length})),n.once("error",(e=>(this.logger.error({err:e,tnx:"send",messageId:i},"Failed creating message for %s. %s",i,e.message),t(e)))),n.on("end",(()=>t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:i,message:Buffer.concat(r,o)})))}))}},xI}(),a=function(){if(SI)return EI;SI=1;const e=RA,t=jA();return EI=class{constructor(n){n=n||{},this.options=n||{},this.name="JSONTransport",this.version=e.version,this.logger=t.getLogger(this.options,{component:this.options.component||"json-transport"})}send(e,t){e.message.keepBcc=!0;let n=e.data.envelope||e.message.getEnvelope(),i=e.message.messageId(),r=[].concat(n.to||[]);r.length>3&&r.push("...and "+r.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:i},"Composing JSON structure of %s to <%s>",i,r.join(", ")),setImmediate((()=>{e.normalize(((e,r)=>e?(this.logger.error({err:e,tnx:"send",messageId:i},"Failed building JSON structure for %s. %s",i,e.message),t(e)):(delete r.envelope,delete r.normalizedHeaders,t(null,{envelope:n,messageId:i,message:this.options.skipEncoding?r:JSON.stringify(r)}))))}))}}}(),c=AI(),l=MA(),u=RA,p=(process.env.ETHEREAL_API||"https://api.nodemailer.com").replace(/\/+$/,""),d=(process.env.ETHEREAL_WEB||"https://ethereal.email").replace(/\/+$/,""),m=(process.env.ETHEREAL_API_KEY||"").replace(/\s*/g,"")||null,h=["true","yes","y","1"].includes((process.env.ETHEREAL_CACHE||"yes").toString().trim().toLowerCase());let g=!1;return tA.createTransport=function(t,l){let u,p,d;return("object"==typeof t&&"function"!=typeof t.send||"string"==typeof t&&/^(smtps?|direct):/i.test(t))&&(p=(u="string"==typeof t?t:t.url)?n.parseConnectionUrl(u):t,t=p.pool?new i(p):p.sendmail?new o(p):p.streamTransport?new s(p):p.jsonTransport?new a(p):p.SES?new c(p):new r(p)),d=new e(t,p,l),d},tA.createTestAccount=function(e,t){let i;if(t||"function"!=typeof e||(t=e,e=!1),t||(i=new Promise(((e,i)=>{t=n.callbackPromise(e,i)}))),h&&g)return setImmediate((()=>t(null,g))),i;e=e||p;let r=[],o=0,s={},a={requestor:u.name,version:u.version};m&&(s.Authorization="Bearer "+m);let c=l(e+"/user",{contentType:"application/json",method:"POST",headers:s,body:Buffer.from(JSON.stringify(a))});return c.on("readable",(()=>{let e;for(;null!==(e=c.read());)r.push(e),o+=e.length})),c.once("error",(e=>t(e))),c.once("end",(()=>{let e,n,i=Buffer.concat(r,o);try{e=JSON.parse(i.toString())}catch(e){n=e}return n?t(n):"success"!==e.status||e.error?t(new Error(e.error||"Request failed")):(delete e.status,g=e,void t(null,g))})),i},tA.getTestMessageUrl=function(e){if(!e||!e.response)return!1;let t=new Map;return e.response.replace(/\[([^\]]+)\]$/,((e,n)=>{n.replace(/\b([A-Z0-9]+)=([^\s]+)/g,((e,n,i)=>{t.set(n,i)}))})),!(!t.has("STATUS")||!t.has("MSGID"))&&(g.web||d)+"/message/"+t.get("MSGID")},tA}();const RI={clientConfig:{region:"eu-west-1"}};var MI,jI,$I={},NI={};function DI(){if(jI)return MI;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,r){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,i()?Reflect.construct(n,r||[],o(t).constructor):n.apply(t,r))}function n(e){var t="function"==typeof Map?new Map:void 0;return n=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(i())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var s=new(e.bind.apply(e,o));return n&&r(s,n.prototype),s}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),r(n,e)},n(e)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}jI=1;var s=function(e){function n(e){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),i=t(this,n,["Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ".concat(e.toString().split("\n")[0],"\n")]),Error.captureStackTrace(i,n),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}(n,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(n(Error));return MI=function(e){if(e.length>2)throw new s(e);function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=e}function n(e){return new t(e)}return t.prototype.transform=e,n.Format=t,n},MI}var LI,zI,FI,UI,BI,HI={exports:{}},qI={exports:{}},VI={exports:{}},GI={exports:{}};function WI(){return LI||(LI=1,function(e){var t={};e.exports=t;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach((function(e){var i=n[e],r=t[e]=[];r.open="["+i[0]+"m",r.close="["+i[1]+"m"}))}(GI)),GI.exports}function KI(){return FI?zI:(FI=1,zI=function(e,t){var n=(t=t||process.argv||[]).indexOf("--"),i=/^-{1,2}/.test(e)?"":"--",r=t.indexOf(i+e);return-1!==r&&(-1===n||r<n)})}function YI(){if(BI)return UI;BI=1;var e=p,t=KI(),n=[],i=void 0;function r(r){var o=function(r){if(!1===i)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(r&&!r.isTTY&&!0!==i)return 0;var o=i?1:0;if("win32"===process.platform){var s=e.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in n)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((function(e){return e in n}))||"codeship"===n.CI_NAME?1:o;if("TEAMCITY_VERSION"in n)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(n.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in n){var a=parseInt((n.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(n.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(n.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(n.TERM)||"COLORTERM"in n?1:o}(r);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(o)}return t("no-color")||t("no-colors")||t("color=false")?i=!1:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(i=!0),"FORCE_COLOR"in n&&(i=0===n.FORCE_COLOR.length||0!==parseInt(n.FORCE_COLOR,10)),UI={supportsColor:r,stdout:r(process.stdout),stderr:r(process.stderr)}}var QI,JI={exports:{}};var XI,ZI={exports:{}};var eR,tR={exports:{}};var nR,iR={exports:{}};var rR,oR={exports:{}};var sR,aR,cR,lR={exports:{}};function uR(){return aR||(aR=1,function(e){var t={};e.exports=t,t.themes={};var n=i,r=t.styles=WI(),o=Object.defineProperties,s=new RegExp(/[\r\n]+/g);t.supportsColor=YI().supportsColor,void 0===t.enabled&&(t.enabled=!1!==t.supportsColor()),t.enable=function(){t.enabled=!0},t.disable=function(){t.enabled=!1},t.stripColors=t.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")},t.stylize=function(e,n){if(!t.enabled)return e+"";var i=r[n];return!i&&n in t?t[n](e):i.open+e+i.close};var a=/[|\\{}()[\]^$+*?.]/g;function c(e){var t=function e(){return d.apply(e,arguments)};return t._styles=e,t.__proto__=p,t}var l,u=(l={},r.grey=r.gray,Object.keys(r).forEach((function(e){r[e].closeRe=new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(a,"\\$&")}(r[e].close),"g"),l[e]={get:function(){return c(this._styles.concat(e))}}})),l),p=o((function(){}),u);function d(){var e=Array.prototype.slice.call(arguments).map((function(e){return null!=e&&e.constructor===String?e:n.inspect(e)})).join(" ");if(!t.enabled||!e)return e;for(var i=-1!=e.indexOf("\n"),o=this._styles,a=o.length;a--;){var c=r[o[a]];e=c.open+e.replace(c.closeRe,c.open)+c.close,i&&(e=e.replace(s,(function(e){return c.close+e+c.open})))}return e}t.setTheme=function(e){if("string"!=typeof e)for(var n in e)!function(n){t[n]=function(i){if("object"==typeof e[n]){var r=i;for(var o in e[n])r=t[e[n][o]](r);return r}return t[e[n]](i)}}(n);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var m=function(e,t){var n=t.split("");return(n=n.map(e)).join("")};for(var h in t.trap=(QI||(QI=1,function(e){e.exports=function(e,t){var n="";e=(e=e||"Run the trap, drop the bass").split("");var i={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return e.forEach((function(e){e=e.toLowerCase();var t=i[e]||[" "],r=Math.floor(Math.random()*t.length);n+=void 0!==i[e]?i[e][r]:e})),n}}(JI)),JI.exports),t.zalgo=(XI||(XI=1,function(e){e.exports=function(e,t){e=e||" he is here ";var n={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},i=[].concat(n.up,n.down,n.mid);function r(e){return Math.floor(Math.random()*e)}function o(e){var t=!1;return i.filter((function(n){t=n===e})),t}return function(e,t){var i,s,a="";for(s in(t=t||{}).up=void 0===t.up||t.up,t.mid=void 0===t.mid||t.mid,t.down=void 0===t.down||t.down,t.size=void 0!==t.size?t.size:"maxi",e=e.split(""))if(!o(s)){switch(a+=e[s],i={up:0,down:0,mid:0},t.size){case"mini":i.up=r(8),i.mid=r(2),i.down=r(8);break;case"maxi":i.up=r(16)+3,i.mid=r(4)+1,i.down=r(64)+3;break;default:i.up=r(8)+1,i.mid=r(6)/2,i.down=r(8)+1}var c=["up","mid","down"];for(var l in c)for(var u=c[l],p=0;p<=i[u];p++)t[u]&&(a+=n[u][r(n[u].length)])}return a}(e,t)}}(ZI)),ZI.exports),t.maps={},t.maps.america=(eR||(eR=1,function(e){e.exports=function(e){return function(t,n,i){if(" "===t)return t;switch(n%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}}(tR)),tR.exports)(t),t.maps.zebra=(nR||(nR=1,function(e){e.exports=function(e){return function(t,n,i){return n%2==0?t:e.inverse(t)}}}(iR)),iR.exports)(t),t.maps.rainbow=(rR||(rR=1,function(e){e.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(n,i,r){return" "===n?n:e[t[i++%t.length]](n)}}}(oR)),oR.exports)(t),t.maps.random=(sR||(sR=1,function(e){e.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(n,i,r){return" "===n?n:e[t[Math.round(Math.random()*(t.length-2))]](n)}}}(lR)),lR.exports)(t),t.maps)!function(e){t[e]=function(n){return m(t.maps[e],n)}}(h);o(t,function(){var e={};return Object.keys(u).forEach((function(t){e[t]={get:function(){return c([t])}}})),e}())}(VI)),VI.exports}function pR(){return cR||(cR=1,function(e){var t=uR();e.exports=t}(qI)),qI.exports}var dR,mR={},hR={},fR={};var gR,yR={};var vR,bR,xR,wR,ER,SR,_R,OR,CR={};function kR(){return xR||(xR=1,function(e){Object.defineProperty(e,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(e,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(e,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(e,"configs",{value:(bR||(bR=1,function(e){Object.defineProperty(e,"cli",{value:(dR||(dR=1,fR.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},fR.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}),fR)}),Object.defineProperty(e,"npm",{value:(gR||(gR=1,yR.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},yR.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}),yR)}),Object.defineProperty(e,"syslog",{value:(vR||(vR=1,CR.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},CR.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}),CR)})}(hR)),hR)})}(mR)),mR}function TR(){if(wR)return HI.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}wR=1;var i=pR(),r=kR(),o=r.LEVEL,s=r.MESSAGE;i.enabled=!0;var a=/\s+/,c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.colors&&this.addColors(t.colors),this.options=t}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"addColors",value:function(t){return e.addColors(t)}},{key:"colorize",value:function(t,n,r){if(void 0===r&&(r=n),!Array.isArray(e.allColors[t]))return i[e.allColors[t]](r);for(var o=0,s=e.allColors[t].length;o<s;o++)r=i[e.allColors[t][o]](r);return r}},{key:"transform",value:function(e,t){return t.all&&"string"==typeof e[s]&&(e[s]=this.colorize(e[o],e.level,e[s])),(t.level||t.all||!t.message)&&(e.level=this.colorize(e[o],e.level)),(t.all||t.message)&&(e.message=this.colorize(e[o],e.level,e.message)),e}}],[{key:"addColors",value:function(t){var n=Object.keys(t).reduce((function(e,n){return e[n]=a.test(t[n])?t[n].split(a):t[n],e}),{});return e.allColors=Object.assign({},e.allColors||{},n),e.allColors}}])}();return HI.exports=function(e){return new c(e)},HI.exports.Colorizer=HI.exports.Format=c,HI.exports}function PR(){if(OR)return _R;OR=1;var e=DI();return _R=e((function(e){return e.message="\t".concat(e.message),e}))}var AR,IR,RR={exports:{}},MR={exports:{}};function jR(){if(AR)return MR.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}function r(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}AR=1;var o=kR(),s=o.configs,a=o.LEVEL,c=o.MESSAGE,l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{levels:s.npm.levels};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.paddings=e.paddingForLevels(t.levels,t.filler),this.options=t}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"transform",value:function(e,t){return e.message="".concat(this.paddings[e[a]]).concat(e.message),e[c]&&(e[c]="".concat(this.paddings[e[a]]).concat(e[c])),e}}],[{key:"getLongestLevel",value:function(e){var n=Object.keys(e).map((function(e){return e.length}));return Math.max.apply(Math,t(n))}},{key:"paddingForLevel",value:function(e,t,n){var i=n+1-e.length,r=Math.floor(i/t.length);return"".concat(t).concat(t.repeat(r)).slice(0,i)}},{key:"paddingForLevels",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",i=e.getLongestLevel(t);return Object.keys(t).reduce((function(t,r){return t[r]=e.paddingForLevel(r,n,i),t}),{})}}])}();return MR.exports=function(e){return new l(e)},MR.exports.Padder=MR.exports.Format=l,MR.exports}function $R(){if(IR)return RR.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}IR=1;var i=TR().Colorizer,r=jR().Padder,o=kR(),s=o.configs,a=o.MESSAGE,c=function(){return t((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.levels||(t.levels=s.cli.levels),this.colorizer=new i(t),this.padder=new r(t),this.options=t}),[{key:"transform",value:function(e,t){return this.colorizer.transform(this.padder.transform(e,t),t),e[a]="".concat(e.level,":").concat(e.message),e}}])}();return RR.exports=function(e){return new c(e)},RR.exports.Format=c,RR.exports}var NR,DR,LR,zR={exports:{}};function FR(){if(NR)return zR.exports;NR=1;var e=DI();function t(e){if(e.every(n))return function(t){for(var n=t,i=0;i<e.length;i++)if(!(n=e[i].transform(n,e[i].options)))return!1;return n}}function n(e){if("function"!=typeof e.transform)throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join("\n"));return!0}return zR.exports=function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=e(t(i)),s=o();return s.Format=o.Format,s},zR.exports.cascade=t,zR.exports}function UR(){if(LR)return DR;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,i){return(n=function(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}LR=1;var n=DI(),i=kR(),r=i.LEVEL,o=i.MESSAGE;return DR=n((function(e,n){var i=n.stack,s=n.cause;if(e instanceof Error){var a=Object.assign({},e,t(t(t({level:e.level},r,e[r]||e.level),"message",e.message),o,e[o]||e.message));return i&&(a.stack=e.stack),s&&(a.cause=e.cause),a}if(!(e.message instanceof Error))return e;var c=e.message;return Object.assign(e,c),e.message=c.message,e[o]=c.message,i&&(e.stack=c.stack),s&&(e.cause=c.cause),e}))}var BR,HR,qR,VR,GR,WR,KR,YR,QR,JR,XR,ZR,eM,tM,nM,iM={exports:{}};function rM(){return BR||(BR=1,function(e,t){const{hasOwnProperty:n}=Object.prototype,i=d();i.configure=d,i.stringify=i,i.default=i,t.stringify=i,t.configure=d,e.exports=i;const r=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function o(e){return e.length<5e3&&!r.test(e)?`"${e}"`:JSON.stringify(e)}function s(e,t){if(e.length>200||t)return e.sort(t);for(let t=1;t<e.length;t++){const n=e[t];let i=t;for(;0!==i&&e[i-1]>n;)e[i]=e[i-1],i--;e[i]=n}return e}const a=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function c(e){return void 0!==a.call(e)&&0!==e.length}function l(e,t,n){e.length<n&&(n=e.length);const i=","===t?"":" ";let r=`"0":${i}${e[0]}`;for(let o=1;o<n;o++)r+=`${t}"${o}":${i}${e[o]}`;return r}function u(e,t){let i;if(n.call(e,t)){if(i=e[t],"number"!=typeof i)throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(i))throw new TypeError(`The "${t}" argument must be an integer`);if(i<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return void 0===i?1/0:i}function p(e){return 1===e?"1 item":`${e} items`}function d(e){const t=function(e){if(n.call(e,"strict")){const t=e.strict;if("boolean"!=typeof t)throw new TypeError('The "strict" argument must be of type boolean');if(t)return e=>{let t="Object can not safely be stringified. Received type "+typeof e;throw"function"!=typeof e&&(t+=` (${e.toString()})`),new Error(t)}}}(e={...e});t&&(void 0===e.bigint&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));const i=function(e){if(n.call(e,"circularValue")){const t=e.circularValue;if("string"==typeof t)return`"${t}"`;if(null==t)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}(e),r=function(e,t){let i;if(n.call(e,t)&&(i=e[t],"boolean"!=typeof i))throw new TypeError(`The "${t}" argument must be of type boolean`);return void 0===i||i}(e,"bigint"),a=function(e){let t;if(n.call(e,"deterministic")&&(t=e.deterministic,"boolean"!=typeof t&&"function"!=typeof t))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return void 0===t||t}(e),d="function"==typeof a?a:void 0,m=u(e,"maximumDepth"),h=u(e,"maximumBreadth");function f(e,n,l,u,g,y){let v=n[e];switch("object"==typeof v&&null!==v&&"function"==typeof v.toJSON&&(v=v.toJSON(e)),v=u.call(n,e,v),typeof v){case"string":return o(v);case"object":{if(null===v)return"null";if(-1!==l.indexOf(v))return i;let e="",t=",";const n=y;if(Array.isArray(v)){if(0===v.length)return"[]";if(m<l.length+1)return'"[Array]"';l.push(v),""!==g&&(e+=`\n${y+=g}`,t=`,\n${y}`);const i=Math.min(v.length,h);let r=0;for(;r<i-1;r++){const n=f(String(r),v,l,u,g,y);e+=void 0!==n?n:"null",e+=t}const o=f(String(r),v,l,u,g,y);if(e+=void 0!==o?o:"null",v.length-1>h){e+=`${t}"... ${p(v.length-h-1)} not stringified"`}return""!==g&&(e+=`\n${n}`),l.pop(),`[${e}]`}let r=Object.keys(v);const b=r.length;if(0===b)return"{}";if(m<l.length+1)return'"[Object]"';let x="",w="";""!==g&&(t=`,\n${y+=g}`,x=" ");const E=Math.min(b,h);a&&!c(v)&&(r=s(r,d)),l.push(v);for(let n=0;n<E;n++){const i=r[n],s=f(i,v,l,u,g,y);void 0!==s&&(e+=`${w}${o(i)}:${x}${s}`,w=t)}if(b>h){e+=`${w}"...":${x}"${p(b-h)} not stringified"`,w=t}return""!==g&&w.length>1&&(e=`\n${y}${e}\n${n}`),l.pop(),`{${e}}`}case"number":return isFinite(v)?String(v):t?t(v):"null";case"boolean":return!0===v?"true":"false";case"undefined":return;case"bigint":if(r)return String(v);default:return t?t(v):void 0}}function g(e,n,s,a,c,l){switch("object"==typeof n&&null!==n&&"function"==typeof n.toJSON&&(n=n.toJSON(e)),typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if(-1!==s.indexOf(n))return i;const e=l;let t="",r=",";if(Array.isArray(n)){if(0===n.length)return"[]";if(m<s.length+1)return'"[Array]"';s.push(n),""!==c&&(t+=`\n${l+=c}`,r=`,\n${l}`);const i=Math.min(n.length,h);let o=0;for(;o<i-1;o++){const e=g(String(o),n[o],s,a,c,l);t+=void 0!==e?e:"null",t+=r}const u=g(String(o),n[o],s,a,c,l);if(t+=void 0!==u?u:"null",n.length-1>h){t+=`${r}"... ${p(n.length-h-1)} not stringified"`}return""!==c&&(t+=`\n${e}`),s.pop(),`[${t}]`}s.push(n);let u="";""!==c&&(r=`,\n${l+=c}`,u=" ");let d="";for(const e of a){const i=g(e,n[e],s,a,c,l);void 0!==i&&(t+=`${d}${o(e)}:${u}${i}`,d=r)}return""!==c&&d.length>1&&(t=`\n${l}${t}\n${e}`),s.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}function y(e,n,u,f,g){switch(typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return y(e,n,u,f,g);if(null===n)return"null"}if(-1!==u.indexOf(n))return i;const t=g;if(Array.isArray(n)){if(0===n.length)return"[]";if(m<u.length+1)return'"[Array]"';u.push(n);let e=`\n${g+=f}`;const i=`,\n${g}`,r=Math.min(n.length,h);let o=0;for(;o<r-1;o++){const t=y(String(o),n[o],u,f,g);e+=void 0!==t?t:"null",e+=i}const s=y(String(o),n[o],u,f,g);if(e+=void 0!==s?s:"null",n.length-1>h){e+=`${i}"... ${p(n.length-h-1)} not stringified"`}return e+=`\n${t}`,u.pop(),`[${e}]`}let r=Object.keys(n);const v=r.length;if(0===v)return"{}";if(m<u.length+1)return'"[Object]"';const b=`,\n${g+=f}`;let x="",w="",E=Math.min(v,h);c(n)&&(x+=l(n,b,h),r=r.slice(n.length),E-=n.length,w=b),a&&(r=s(r,d)),u.push(n);for(let e=0;e<E;e++){const t=r[e],i=y(t,n[t],u,f,g);void 0!==i&&(x+=`${w}${o(t)}: ${i}`,w=b)}if(v>h){x+=`${w}"...": "${p(v-h)} not stringified"`,w=b}return""!==w&&(x=`\n${g}${x}\n${t}`),u.pop(),`{${x}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}function v(e,n,u){switch(typeof n){case"string":return o(n);case"object":{if(null===n)return"null";if("function"==typeof n.toJSON){if("object"!=typeof(n=n.toJSON(e)))return v(e,n,u);if(null===n)return"null"}if(-1!==u.indexOf(n))return i;let t="";const r=void 0!==n.length;if(r&&Array.isArray(n)){if(0===n.length)return"[]";if(m<u.length+1)return'"[Array]"';u.push(n);const e=Math.min(n.length,h);let i=0;for(;i<e-1;i++){const e=v(String(i),n[i],u);t+=void 0!==e?e:"null",t+=","}const r=v(String(i),n[i],u);if(t+=void 0!==r?r:"null",n.length-1>h){t+=`,"... ${p(n.length-h-1)} not stringified"`}return u.pop(),`[${t}]`}let f=Object.keys(n);const g=f.length;if(0===g)return"{}";if(m<u.length+1)return'"[Object]"';let y="",b=Math.min(g,h);r&&c(n)&&(t+=l(n,",",h),f=f.slice(n.length),b-=n.length,y=","),a&&(f=s(f,d)),u.push(n);for(let e=0;e<b;e++){const i=f[e],r=v(i,n[i],u);void 0!==r&&(t+=`${y}${o(i)}:${r}`,y=",")}if(g>h){t+=`${y}"...":"${p(g-h)} not stringified"`}return u.pop(),`{${t}}`}case"number":return isFinite(n)?String(n):t?t(n):"null";case"boolean":return!0===n?"true":"false";case"undefined":return;case"bigint":if(r)return String(n);default:return t?t(n):void 0}}return function(e,t,n){if(arguments.length>1){let i="";if("number"==typeof n?i=" ".repeat(Math.min(n,10)):"string"==typeof n&&(i=n.slice(0,10)),null!=t){if("function"==typeof t)return f("",{"":e},[],t,i,"");if(Array.isArray(t))return g("",e,[],function(e){const t=new Set;for(const n of e)"string"!=typeof n&&"number"!=typeof n||t.add(String(n));return t}(t),i,"")}if(0!==i.length)return y("",e,[],i,"")}return v("",e,[])}}}(iM,iM.exports)),iM.exports}function oM(){if(qR)return HR;qR=1;var e=DI(),t=kR().MESSAGE,n=rM();function i(e,t){return"bigint"==typeof t?t.toString():t}return HR=e((function(e,r){var o=n.configure(r);return e[t]=o(e,r.replacer||i,r.space),e}))}function sM(){if(GR)return VR;GR=1;var e=DI();return VR=e((function(e,t){return t.message?(e.message="[".concat(t.label,"] ").concat(e.message),e):(e.label=t.label,e)}))}function aM(){if(KR)return WR;KR=1;var e=DI(),t=kR().MESSAGE,n=rM();return WR=e((function(e){var i={};return e.message&&(i["@message"]=e.message,delete e.message),e.timestamp&&(i["@timestamp"]=e.timestamp,delete e.timestamp),i["@fields"]=e,e[t]=n(i),e}))}function cM(){if(QR)return YR;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,n,i){return(n=function(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}QR=1;var n=DI();return YR=n((function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i="metadata";n.key&&(i=n.key);var r=[];return n.fillExcept||n.fillWith||(r.push("level"),r.push("message")),n.fillExcept&&(r=n.fillExcept),r.length>0?function(e,n,i){var r=n.reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{}),o=Object.keys(e).reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{});return Object.assign(e,r,t({},i,o)),e}(e,r,i):n.fillWith?function(e,t,n){return e[n]=t.reduce((function(t,n){return t[n]=e[n],delete e[n],t}),{}),e}(e,n.fillWith,i):e})),YR}function lM(){if(XR)return JR;XR=1;var e=1e3,t=60*e,n=60*t,i=24*n,r=7*i,o=365.25*i;function s(e,t,n,i){var r=t>=1.5*n;return Math.round(e/n)+" "+i+(r?"s":"")}return JR=function(a,c){c=c||{};var l=typeof a;if("string"===l&&a.length>0)return function(s){if((s=String(s)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*r;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(a);if("number"===l&&isFinite(a))return c.long?function(r){var o=Math.abs(r);if(o>=i)return s(r,o,i,"day");if(o>=n)return s(r,o,n,"hour");if(o>=t)return s(r,o,t,"minute");if(o>=e)return s(r,o,e,"second");return r+" ms"}(a):function(r){var o=Math.abs(r);if(o>=i)return Math.round(r/i)+"d";if(o>=n)return Math.round(r/n)+"h";if(o>=t)return Math.round(r/t)+"m";if(o>=e)return Math.round(r/e)+"s";return r+"ms"}(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))},JR}function uM(){if(eM)return ZR;eM=1;var e=void 0,t=DI(),n=lM();return ZR=t((function(t){var i=+new Date;return e.diff=i-(e.prevTime||i),e.prevTime=i,t.ms="+".concat(n(e.diff)),t}))}function pM(){if(nM)return tM;nM=1;var e=i.inspect,t=DI(),n=kR(),r=n.LEVEL,o=n.MESSAGE,s=n.SPLAT;return tM=t((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Object.assign({},t);return delete i[r],delete i[o],delete i[s],t[o]=e(i,!1,n.depth||null,n.colorize),t})),tM}var dM,mM,hM,fM,gM,yM={exports:{}};function vM(){if(dM)return yM.exports;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}dM=1;var i=kR().MESSAGE,r=function(){return t((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.template=t}),[{key:"transform",value:function(e){return e[i]=this.template(e),e}}])}();return yM.exports=function(e){return new r(e)},yM.exports.Printf=yM.exports.Format=r,yM.exports}function bM(){if(hM)return mM;hM=1;var e=DI(),t=kR().MESSAGE,n=rM();return mM=e((function(e){var i=n(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),r=e.padding&&e.padding[e.level]||"";return e[t]="{}"!==i?"".concat(e.level,":").concat(r," ").concat(e.message," ").concat(i):"".concat(e.level,":").concat(r," ").concat(e.message),e}))}function xM(){if(gM)return fM;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,o(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}gM=1;var s=i,a=kR().SPLAT,c=/%[scdjifoO%]/g,l=/%%/g,u=function(){return r((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t}),[{key:"_splat",value:function(e,n){var i=e.message,r=e[a]||e.splat||[],o=i.match(l),c=o&&o.length||0,u=n.length-c-r.length,p=u<0?r.splice(u,-1*u):[],d=p.length;if(d)for(var m=0;m<d;m++)Object.assign(e,p[m]);return e.message=s.format.apply(s,[i].concat(t(r))),e}},{key:"transform",value:function(e){var t=e.message,n=e[a]||e.splat;if(!n||!n.length)return e;var i=t&&t.match&&t.match(c);if(!i&&(n||n.length)){var r=n.length>1?n.splice(0):n,o=r.length;if(o)for(var s=0;s<o;s++)Object.assign(e,r[s]);return e}return i?this._splat(e,i):e}}])}();return fM=function(e){return new u(e)}}var wM=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,EM="\\d\\d?",SM="\\d\\d",_M="[^\\s]+",OM=/\[([^]*?)\]/gm;function CM(e,t){for(var n=[],i=0,r=e.length;i<r;i++)n.push(e[i].substr(0,t));return n}var kM=function(e){return function(t,n){var i=n[e].map((function(e){return e.toLowerCase()})),r=i.indexOf(t.toLowerCase());return r>-1?r:null}};function TM(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=0,r=t;i<r.length;i++){var o=r[i];for(var s in o)e[s]=o[s]}return e}var PM=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],AM=["January","February","March","April","May","June","July","August","September","October","November","December"],IM=CM(AM,3),RM={dayNamesShort:CM(PM,3),dayNames:PM,monthNamesShort:IM,monthNames:AM,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!=10?1:0)*e%10]}},MM=TM({},RM),jM=function(e){return MM=TM(MM,e)},$M=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},NM=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length<t;)e="0"+e;return e},DM={D:function(e){return String(e.getDate())},DD:function(e){return NM(e.getDate())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return NM(e.getDay())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return NM(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},YY:function(e){return NM(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return NM(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return NM(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return NM(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return NM(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return NM(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return NM(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return NM(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+NM(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+NM(Math.floor(Math.abs(t)/60),2)+":"+NM(Math.abs(t)%60,2)}},LM=function(e){return+e-1},zM=[null,EM],FM=[null,_M],UM=["isPm",_M,function(e,t){var n=e.toLowerCase();return n===t.amPm[0]?0:n===t.amPm[1]?1:null}],BM=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var n=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?n:-n}return 0}],HM={D:["day",EM],DD:["day",SM],Do:["day",EM+_M,function(e){return parseInt(e,10)}],M:["month",EM,LM],MM:["month",SM,LM],YY:["year",SM,function(e){var t=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+e>68?t-1:t)+e)}],h:["hour",EM,void 0,"isPm"],hh:["hour",SM,void 0,"isPm"],H:["hour",EM],HH:["hour",SM],m:["minute",EM],mm:["minute",SM],s:["second",EM],ss:["second",SM],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(e){return 100*+e}],SS:["millisecond",SM,function(e){return 10*+e}],SSS:["millisecond","\\d{3}"],d:zM,dd:zM,ddd:FM,dddd:FM,MMM:["month",_M,kM("monthNamesShort")],MMMM:["month",_M,kM("monthNames")],a:UM,A:UM,ZZ:BM,Z:BM},qM={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},VM=function(e){return TM(qM,e)},GM=function(e,t,n){if(void 0===t&&(t=qM.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var i=[];t=(t=qM[t]||t).replace(OM,(function(e,t){return i.push(t),"@@@"}));var r=TM(TM({},MM),n);return(t=t.replace(wM,(function(t){return DM[t](e,r)}))).replace(/@@@/g,(function(){return i.shift()}))};function WM(e,t,n){if(void 0===n&&(n={}),"string"!=typeof t)throw new Error("Invalid format in fecha parse");if(t=qM[t]||t,e.length>1e3)return null;var i={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],o=[],s=t.replace(OM,(function(e,t){return o.push($M(t)),"@@@"})),a={},c={};s=$M(s).replace(wM,(function(e){var t=HM[e],n=t[0],i=t[1],o=t[3];if(a[n])throw new Error("Invalid format. "+n+" specified twice in format");return a[n]=!0,o&&(c[o]=!0),r.push(t),"("+i+")"})),Object.keys(c).forEach((function(e){if(!a[e])throw new Error("Invalid format. "+e+" is required in specified format")})),s=s.replace(/@@@/g,(function(){return o.shift()}));var l=e.match(new RegExp(s,"i"));if(!l)return null;for(var u,p=TM(TM({},MM),n),d=1;d<l.length;d++){var m=r[d-1],h=m[0],f=m[2],g=f?f(l[d],p):+l[d];if(null==g)return null;i[h]=g}if(1===i.isPm&&null!=i.hour&&12!=+i.hour?i.hour=+i.hour+12:0===i.isPm&&12==+i.hour&&(i.hour=0),null==i.timezoneOffset){u=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var y=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],v=(d=0,y.length);d<v;d++)if(a[y[d][0]]&&i[y[d][0]]!==u[y[d][1]]())return null}else if(u=new Date(Date.UTC(i.year,i.month,i.day,i.hour,i.minute-i.timezoneOffset,i.second,i.millisecond)),i.month>11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return u}var KM,YM,QM,JM,XM,ZM={format:GM,parse:WM,defaultI18n:RM,setGlobalDateI18n:jM,setGlobalDateMasks:VM},ej=ti(Object.freeze({__proto__:null,assign:TM,default:ZM,defaultI18n:RM,format:GM,parse:WM,setGlobalDateI18n:jM,setGlobalDateMasks:VM}));function tj(){if(YM)return KM;YM=1;var e=ej,t=DI();return KM=t((function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.format&&(t.timestamp="function"==typeof n.format?n.format():e.format(new Date,n.format)),t.timestamp||(t.timestamp=(new Date).toISOString()),n.alias&&(t[n.alias]=t.timestamp),t})),KM}function nj(){if(JM)return QM;JM=1;var e=pR(),t=DI(),n=kR().MESSAGE;return QM=t((function(t,i){return!1!==i.level&&(t.level=e.strip(t.level)),!1!==i.message&&(t.message=e.strip(String(t.message))),!1!==i.raw&&t[n]&&(t[n]=e.strip(String(t[n]))),t}))}function ij(){if(XM)return NI;XM=1;var e=NI.format=DI();return NI.levels=function(){if(SR)return ER;SR=1;var e=TR().Colorizer;return ER=function(t){return e.addColors(t.colors||t),t},ER}(),Object.defineProperty(e,"align",{value:PR()}),Object.defineProperty(e,"cli",{value:$R()}),Object.defineProperty(e,"colorize",{value:TR()}),Object.defineProperty(e,"combine",{value:FR()}),Object.defineProperty(e,"errors",{value:UR()}),Object.defineProperty(e,"json",{value:oM()}),Object.defineProperty(e,"label",{value:sM()}),Object.defineProperty(e,"logstash",{value:aM()}),Object.defineProperty(e,"metadata",{value:cM()}),Object.defineProperty(e,"ms",{value:uM()}),Object.defineProperty(e,"padLevels",{value:jR()}),Object.defineProperty(e,"prettyPrint",{value:pM()}),Object.defineProperty(e,"printf",{value:vM()}),Object.defineProperty(e,"simple",{value:bM()}),Object.defineProperty(e,"splat",{value:xM()}),Object.defineProperty(e,"timestamp",{value:tj()}),Object.defineProperty(e,"uncolorize",{value:nj()}),NI}var rj,oj={};function sj(){return rj||(rj=1,function(e){var t=i.format;e.warn={deprecated:function(e){return function(){throw new Error(t("{ %s } was removed in winston@3.0.0.",e))}},useFormat:function(e){return function(){throw new Error([t("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join("\n"))}},forFunctions:function(t,n,i){i.forEach((function(i){t[i]=e.warn[n](i)}))},forProperties:function(t,n,i){i.forEach((function(i){var r=e.warn[n](i);Object.defineProperty(t,i,{get:r,set:r})}))}}}(oj)),oj}var aj,cj,lj,uj,pj,dj,mj="3.17.0",hj={},fj={exports:{}},gj={exports:{}};function yj(){if(cj)return aj;function e(e){try{if(!Zn.localStorage)return!1}catch(e){return!1}var t=Zn.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}return cj=1,aj=function(t,n){if(e("noDeprecation"))return t;var i=!1;return function(){if(!i){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}},aj}function vj(){return uj?lj:(uj=1,lj=t.EventEmitter)}function bj(){if(dj)return pj;function e(e,i){n(e,i),t(e)}function t(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}return dj=1,pj={destroy:function(i,r){var o=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(r?r(i):i&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,i)):process.nextTick(n,this,i)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(i||null,(function(n){!r&&n?o._writableState?o._writableState.errorEmitted?process.nextTick(t,o):(o._writableState.errorEmitted=!0,process.nextTick(e,o,n)):process.nextTick(e,o,n):r?(process.nextTick(t,o),r(n)):process.nextTick(t,o)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,i=e._writableState;n&&n.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}},pj}var xj,wj,Ej,Sj={};function _j(){if(xj)return Sj;xj=1;var e={};function t(t,n,i){i||(i=Error);var r=function(e){var t,i;function r(t,i,r){return e.call(this,function(e,t,i){return"string"==typeof n?n:n(e,t,i)}(t,i,r))||this}return i=e,(t=r).prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i,r}(i);r.prototype.name=i.name,r.prototype.code=t,e[t]=r}function n(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}return t("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),t("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,o,s;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(n(t,"type"));else{var a=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(a," ").concat(r," ").concat(n(t,"type"))}return s+=". Received type ".concat(typeof i)}),TypeError),t("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),t("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),t("ERR_STREAM_PREMATURE_CLOSE","Premature close"),t("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),t("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),t("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),t("ERR_STREAM_WRITE_AFTER_END","write after end"),t("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),t("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),t("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Sj.codes=e,Sj}function Oj(){if(Ej)return wj;Ej=1;var e=_j().codes.ERR_INVALID_OPT_VALUE;return wj={getHighWaterMark:function(t,n,i,r){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(n,r,i);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new e(r?i:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}}var Cj,kj={exports:{}};function Tj(){return Cj||(Cj=1,"function"==typeof Object.create?kj.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:kj.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),kj.exports}var Pj,Aj,Ij=ti(Object.freeze({__proto__:null,default:{}}));function Rj(){if(Aj)return Pj;function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function t(t){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?e(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}Aj=1;var o=g.Buffer,s=Ij.inspect,a=s&&s.custom||"inspect";return Pj=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return i(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return o.alloc(0);for(var t,n,i,r=o.allocUnsafe(e>>>0),s=this.head,a=0;s;)t=s.data,n=r,i=a,o.prototype.copy.call(t,n,i),a+=s.data.length,s=s.next;return r}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,i=t.data;for(e-=i.length;t=t.next;){var r=t.data,o=e>r.length?r.length:e;if(o===r.length?i+=r:i+=r.slice(0,e),0===(e-=o)){o===r.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=r.slice(o));break}++n}return this.length-=n,i}},{key:"_getBuffer",value:function(e){var t=o.allocUnsafe(e),n=this.head,i=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var r=n.data,s=e>r.length?r.length:e;if(r.copy(t,t.length-e,0,s),0===(e-=s)){s===r.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=r.slice(s));break}++i}return this.length-=i,t}},{key:a,value:function(e,n){return s(this,t(t({},n),{},{depth:0,customInspect:!1}))}}]),e}(),Pj}var Mj,jj,$j,Nj,Dj,Lj,zj,Fj,Uj,Bj,Hj,qj,Vj,Gj,Wj,Kj={},Yj={exports:{}};function Qj(){if(jj)return Kj;jj=1;var e=(Mj||(Mj=1,function(e,t){var n=g,i=n.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(r(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),r(i,o),o.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},o.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}}(Yj,Yj.exports)),Yj.exports).Buffer,t=e.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(n){var i;switch(this.encoding=function(n){var i=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(n);if("string"!=typeof i&&(e.isEncoding===t||!t(n)))throw new Error("Unknown encoding: "+n);return i||n}(n),this.encoding){case"utf16le":this.text=o,this.end=s,i=4;break;case"utf8":this.fillLast=r,i=4;break;case"base64":this.text=a,this.end=c,i=3;break;default:return this.write=l,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(i)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function r(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function o(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function a(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function l(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}return Kj.StringDecoder=n,n.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},n.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},n.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=i(t[r]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--r<n||-2===o)return 0;if(o=i(t[r]),o>=0)return o>0&&(e.lastNeed=o-2),o;if(--r<n||-2===o)return 0;if(o=i(t[r]),o>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length},Kj}function Jj(){if(Nj)return $j;Nj=1;var e=_j().codes.ERR_STREAM_PREMATURE_CLOSE;function t(){}return $j=function n(i,r,o){if("function"==typeof r)return n(i,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];e.apply(this,i)}}}(o||t);var s=r.readable||!1!==r.readable&&i.readable,a=r.writable||!1!==r.writable&&i.writable,c=function(){i.writable||u()},l=i._writableState&&i._writableState.finished,u=function(){a=!1,l=!0,s||o.call(i)},p=i._readableState&&i._readableState.endEmitted,d=function(){s=!1,p=!0,a||o.call(i)},m=function(e){o.call(i,e)},h=function(){var t;return s&&!p?(i._readableState&&i._readableState.ended||(t=new e),o.call(i,t)):a&&!l?(i._writableState&&i._writableState.ended||(t=new e),o.call(i,t)):void 0},f=function(){i.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(i)?a&&!i._writableState&&(i.on("end",c),i.on("close",c)):(i.on("complete",u),i.on("abort",h),i.req?f():i.on("request",f)),i.on("end",d),i.on("finish",u),!1!==r.error&&i.on("error",m),i.on("close",h),function(){i.removeListener("complete",u),i.removeListener("abort",h),i.removeListener("request",f),i.req&&i.req.removeListener("finish",u),i.removeListener("end",c),i.removeListener("close",c),i.removeListener("finish",u),i.removeListener("end",d),i.removeListener("error",m),i.removeListener("close",h)}},$j}function Xj(){if(Lj)return Dj;var e;function t(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Lj=1;var n=Jj(),i=Symbol("lastResolve"),r=Symbol("lastReject"),o=Symbol("error"),s=Symbol("ended"),a=Symbol("lastPromise"),c=Symbol("handlePromise"),l=Symbol("stream");function u(e,t){return{value:e,done:t}}function p(e){var t=e[i];if(null!==t){var n=e[l].read();null!==n&&(e[a]=null,e[i]=null,e[r]=null,t(u(n,!1)))}}function d(e){process.nextTick(p,e)}var m=Object.getPrototypeOf((function(){})),h=Object.setPrototypeOf((t(e={get stream(){return this[l]},next:function(){var e=this,t=this[o];if(null!==t)return Promise.reject(t);if(this[s])return Promise.resolve(u(void 0,!0));if(this[l].destroyed)return new Promise((function(t,n){process.nextTick((function(){e[o]?n(e[o]):t(u(void 0,!0))}))}));var n,i=this[a];if(i)n=new Promise(function(e,t){return function(n,i){e.then((function(){t[s]?n(u(void 0,!0)):t[c](n,i)}),i)}}(i,this));else{var r=this[l].read();if(null!==r)return Promise.resolve(u(r,!1));n=new Promise(this[c])}return this[a]=n,n}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,n){e[l].destroy(null,(function(e){e?n(e):t(u(void 0,!0))}))}))})),e),m);return Dj=function(e){var p,m=Object.create(h,(t(p={},l,{value:e,writable:!0}),t(p,i,{value:null,writable:!0}),t(p,r,{value:null,writable:!0}),t(p,o,{value:null,writable:!0}),t(p,s,{value:e._readableState.endEmitted,writable:!0}),t(p,c,{value:function(e,t){var n=m[l].read();n?(m[a]=null,m[i]=null,m[r]=null,e(u(n,!1))):(m[i]=e,m[r]=t)},writable:!0}),p));return m[a]=null,n(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=m[r];return null!==t&&(m[a]=null,m[i]=null,m[r]=null,t(e)),void(m[o]=e)}var n=m[i];null!==n&&(m[a]=null,m[i]=null,m[r]=null,n(u(void 0,!0))),m[s]=!0})),e.on("readable",d.bind(null,m)),m},Dj}function Zj(){if(Bj)return Uj;var e;Bj=1,Uj=S,S.ReadableState=E,t.EventEmitter;var n=function(e,t){return e.listeners(t).length},i=vj(),r=g.Buffer,o=(void 0!==Zn?Zn:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,a=Ij;s=a&&a.debuglog?a.debuglog("stream"):function(){};var c,l,u,p=Rj(),d=bj(),m=Oj().getHighWaterMark,h=_j().codes,f=h.ERR_INVALID_ARG_TYPE,y=h.ERR_STREAM_PUSH_AFTER_EOF,v=h.ERR_METHOD_NOT_IMPLEMENTED,b=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Tj()(S,i);var x=d.errorOrDestroy,w=["error","close","destroy","pause","resume"];function E(t,n,i){e=e||e$(),t=t||{},"boolean"!=typeof i&&(i=n instanceof e),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(c||(c=Qj().StringDecoder),this.decoder=new c(t.encoding),this.encoding=t.encoding)}function S(t){if(e=e||e$(),!(this instanceof S))return new S(t);var n=this instanceof e;this._readableState=new E(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),i.call(this)}function _(e,t,n,i,a){s("readableAddChunk",t);var c,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(s("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,P(e)))}(e,l);else if(a||(c=function(e,t){var n;i=t,r.isBuffer(i)||i instanceof o||"string"==typeof t||void 0===t||e.objectMode||(n=new f("chunk",["string","Buffer","Uint8Array"],t));var i;return n}(l,t)),c)x(e,c);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===r.prototype||(t=function(e){return r.from(e)}(t)),i)l.endEmitted?x(e,new b):O(e,l,t,!0);else if(l.ended)x(e,new y);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?O(e,l,t,!1):A(e,l)):O(e,l,t,!1)}else i||(l.reading=!1,A(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function O(e,t,n,i){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&T(e)),A(e,t)}Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),S.prototype.destroy=d.destroy,S.prototype._undestroy=d.undestroy,S.prototype._destroy=function(e,t){t(e)},S.prototype.push=function(e,t){var n,i=this._readableState;return i.objectMode?n=!0:"string"==typeof e&&((t=t||i.defaultEncoding)!==i.encoding&&(e=r.from(e,t),t=""),n=!0),_(this,e,t,!1,n)},S.prototype.unshift=function(e){return _(this,e,null,!0,!1)},S.prototype.isPaused=function(){return!1===this._readableState.flowing},S.prototype.setEncoding=function(e){c||(c=Qj().StringDecoder);var t=new c(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var C=1073741824;function k(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState;s("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(s("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(P,e))}function P(e){var t=e._readableState;s("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,$(e)}function A(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(s("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function R(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function M(e){s("readable nexttick read 0"),e.read(0)}function j(e,t){s("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),$(e),t.flowing&&!t.reading&&e.read(0)}function $(e){var t=e._readableState;for(s("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function D(e){var t=e._readableState;s("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(L,t,e))}function L(e,t){if(s("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function z(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1}return S.prototype.read=function(e){s("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return s("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):T(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&D(this),null;var i,r=t.needReadable;return s("need readable",r),(0===t.length||t.length-e<t.highWaterMark)&&s("length less than watermark",r=!0),t.ended||t.reading?s("reading or ended",r=!1):r&&(s("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=k(n,t))),null===(i=e>0?N(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&D(this)),null!==i&&this.emit("data",i),i},S.prototype._read=function(e){x(this,new v("_read()"))},S.prototype.pipe=function(e,t){var i=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,s("pipe count=%d opts=%j",r.pipesCount,t);var o=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?c:f;function a(t,n){s("onunpipe"),t===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,s("cleanup"),e.removeListener("close",m),e.removeListener("finish",h),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",a),i.removeListener("end",c),i.removeListener("end",f),i.removeListener("data",p),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function c(){s("onend"),e.end()}r.endEmitted?process.nextTick(o):i.once("end",o),e.on("unpipe",a);var l=function(e){return function(){var t=e._readableState;s("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&n(e,"data")&&(t.flowing=!0,$(e))}}(i);e.on("drain",l);var u=!1;function p(t){s("ondata");var n=e.write(t);s("dest.write",n),!1===n&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==z(r.pipes,e))&&!u&&(s("false write response, pause",r.awaitDrain),r.awaitDrain++),i.pause())}function d(t){s("onerror",t),f(),e.removeListener("error",d),0===n(e,"error")&&x(e,t)}function m(){e.removeListener("finish",h),f()}function h(){s("onfinish"),e.removeListener("close",m),f()}function f(){s("unpipe"),i.unpipe(e)}return i.on("data",p),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",d),e.once("close",m),e.once("finish",h),e.emit("pipe",i),r.flowing||(s("pipe resume"),i.resume()),e},S.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var i=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<r;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=z(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},S.prototype.on=function(e,t){var n=i.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,s("on readable",r.length,r.reading),r.length?T(this):r.reading||process.nextTick(M,this))),n},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(e,t){var n=i.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(R,this),n},S.prototype.removeAllListeners=function(e){var t=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(R,this),t},S.prototype.resume=function(){var e=this._readableState;return e.flowing||(s("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(j,e,t))}(this,e)),e.paused=!1,this},S.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(e){var t=this,n=this._readableState,i=!1;for(var r in e.on("end",(function(){if(s("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(r){(s("wrapped data"),n.decoder&&(r=n.decoder.write(r)),n.objectMode&&null==r)||(n.objectMode||r&&r.length)&&(t.push(r)||(i=!0,e.pause()))})),e)void 0===this[r]&&"function"==typeof e[r]&&(this[r]=function(t){return function(){return e[t].apply(e,arguments)}}(r));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){s("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(S.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=Xj()),l(this)}),Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(S.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(S.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),S._fromList=N,Object.defineProperty(S.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(S.from=function(e,t){return void 0===u&&(u=Fj?zj:(Fj=1,zj=function(){throw new Error("Readable.from is not available in the browser")})),u(S,e,t)}),Uj}function e$(){if(qj)return Hj;qj=1;var e=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};Hj=s;var t=Zj(),n=t$();Tj()(s,t);for(var i=e(n.prototype),r=0;r<i.length;r++){var o=i[r];s.prototype[o]||(s.prototype[o]=n.prototype[o])}function s(e){if(!(this instanceof s))return new s(e);t.call(this,e),n.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",a)))}function a(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}return Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(s.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(s.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),Hj}function t$(){if(Gj)return Vj;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var i=e.entry;e.entry=null;for(;i;){var r=i.callback;t.pendingcb--,r(n),i=i.next}t.corkedRequestsFree.next=e}(t,e)}}var t;Gj=1,Vj=E,E.WritableState=w;var n={deprecate:yj()},i=vj(),r=g.Buffer,o=(void 0!==Zn?Zn:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,a=bj(),c=Oj().getHighWaterMark,l=_j().codes,u=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,d=l.ERR_MULTIPLE_CALLBACK,m=l.ERR_STREAM_CANNOT_PIPE,h=l.ERR_STREAM_DESTROYED,f=l.ERR_STREAM_NULL_VALUES,y=l.ERR_STREAM_WRITE_AFTER_END,v=l.ERR_UNKNOWN_ENCODING,b=a.errorOrDestroy;function x(){}function w(n,i,r){t=t||e$(),n=n||{},"boolean"!=typeof r&&(r=i instanceof t),this.objectMode=!!n.objectMode,r&&(this.objectMode=this.objectMode||!!n.writableObjectMode),this.highWaterMark=c(this,n,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===n.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,i=n.sync,r=n.writecb;if("function"!=typeof r)throw new d;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,r){--t.pendingcb,n?(process.nextTick(r,i),process.nextTick(T,e,t),e._writableState.errorEmitted=!0,b(e,i)):(r(i),e._writableState.errorEmitted=!0,b(e,i),T(e,t))}(e,n,i,t,r);else{var o=C(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||O(e,n),i?process.nextTick(_,e,n,o,r):_(e,n,o,r)}}(i,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==n.emitClose,this.autoDestroy=!!n.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}function E(e){var n=this instanceof(t=t||e$());if(!n&&!s.call(E,this))return new E(e);this._writableState=new w(e,this,n),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),i.call(this)}function S(e,t,n,i,r,o,s){t.writelen=i,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new h("write")):n?e._writev(r,t.onwrite):e._write(r,o,t.onwrite),t.sync=!1}function _(e,t,n,i){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,i(),T(e,t)}function O(t,n){n.bufferProcessing=!0;var i=n.bufferedRequest;if(t._writev&&i&&i.next){var r=n.bufferedRequestCount,o=new Array(r),s=n.corkedRequestsFree;s.entry=i;for(var a=0,c=!0;i;)o[a]=i,i.isBuf||(c=!1),i=i.next,a+=1;o.allBuffers=c,S(t,n,!0,n.length,o,"",s.finish),n.pendingcb++,n.lastBufferedRequest=null,s.next?(n.corkedRequestsFree=s.next,s.next=null):n.corkedRequestsFree=new e(n),n.bufferedRequestCount=0}else{for(;i;){var l=i.chunk,u=i.encoding,p=i.callback;if(S(t,n,!1,n.objectMode?1:l.length,l,u,p),i=i.next,n.bufferedRequestCount--,n.writing)break}null===i&&(n.lastBufferedRequest=null)}n.bufferedRequest=i,n.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(n){t.pendingcb--,n&&b(e,n),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var n=C(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(k,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return n}return Tj()(E,i),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:n.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===E&&(e&&e._writableState instanceof w)}})):s=function(e){return e instanceof this},E.prototype.pipe=function(){b(this,new m)},E.prototype.write=function(e,t,n){var i,s=this._writableState,a=!1,c=!s.objectMode&&(i=e,r.isBuffer(i)||i instanceof o);return c&&!r.isBuffer(e)&&(e=function(e){return r.from(e)}(e)),"function"==typeof t&&(n=t,t=null),c?t="buffer":t||(t=s.defaultEncoding),"function"!=typeof n&&(n=x),s.ending?function(e,t){var n=new y;b(e,n),process.nextTick(t,n)}(this,n):(c||function(e,t,n,i){var r;return null===n?r=new f:"string"==typeof n||t.objectMode||(r=new u("chunk",["string","Buffer"],n)),!r||(b(e,r),process.nextTick(i,r),!1)}(this,s,e,n))&&(s.pendingcb++,a=function(e,t,n,i,o,s){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=r.from(t,n));return t}(t,i,o);i!==a&&(n=!0,o="buffer",i=a)}var c=t.objectMode?1:i.length;t.length+=c;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:o,isBuf:n,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,c,i,o,s);return l}(this,s,c,e,t,n)),a},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||O(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,n){n(new p("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,n){var i=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,T(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=a.destroy,E.prototype._undestroy=a.undestroy,E.prototype._destroy=function(e,t){t(e)},Vj}function n$(){if(Wj)return gj.exports;Wj=1;var e=i,t=t$(),n=kR().LEVEL,r=gj.exports=function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.call(this,{objectMode:!0,highWaterMark:n.highWaterMark}),this.format=n.format,this.level=n.level,this.handleExceptions=n.handleExceptions,this.handleRejections=n.handleRejections,this.silent=n.silent,n.log&&(this.log=n.log),n.logv&&(this.logv=n.logv),n.close&&(this.close=n.close),this.once("pipe",(function(t){e.levels=t.levels,e.parent=t})),this.once("unpipe",(function(t){t===e.parent&&(e.parent=null,e.close&&e.close())}))};return e.inherits(r,t),r.prototype._write=function(e,t,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);var r=this.level||this.parent&&this.parent.level;if(!r||this.levels[r]>=this.levels[e[n]]){if(e&&!this.format)return this.log(e,i);var o=void 0,s=void 0;try{s=this.format.transform(Object.assign({},e),this.format.options)}catch(e){o=e}if(o||!s){if(i(),o)throw o;return}return this.log(s,i)}return this._writableState.sync=!1,i(null)},r.prototype._writev=function(e,t){if(this.logv){var n=e.filter(this._accept,this);return n.length?this.logv(n,t):t(null)}for(var i=0;i<e.length;i++)if(this._accept(e[i]))if(!e[i].chunk||this.format){var r=void 0,o=void 0;try{o=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(e){r=e}if(r||!o){if(e[i].callback(),r)throw t(null),r}else this.log(o,e[i].callback)}else this.log(e[i].chunk,e[i].callback);return t(null)},r.prototype._accept=function(e){var t=e.chunk;if(this.silent)return!1;var i=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&i&&!(this.levels[i]>=this.levels[t[n]])||!this.handleExceptions&&!0===t.exception)},r.prototype._nop=function(){},gj.exports}var i$,r$,o$,s$,a$={exports:{}};function c$(){return r$||(r$=1,fj.exports=n$(),fj.exports.LegacyTransportStream=function(){if(i$)return a$.exports;i$=1;var e=i,t=kR().LEVEL,n=n$(),r=a$.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};return e.inherits(r,n),r.prototype._write=function(e,n,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[t]])&&this.transport.log(e[t],e.message,e,this._nop),i(null)},r.prototype._writev=function(e,n){for(var i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[t],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return n(null)},r.prototype._deprecated=function(){console.error([this.transport.name+" is a legacy winston transport. Consider upgrading: ","- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},r.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)},a$.exports}()),fj.exports}function l$(){if(s$)return o$;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}s$=1;var a=p,c=kR(),l=c.LEVEL,u=c.MESSAGE,d=c$();return o$=function(e){function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i(this,n,[t])).name=t.name||"console",e.stderrLevels=e._stringArrayToSet(t.stderrLevels),e.consoleWarnLevels=e._stringArrayToSet(t.consoleWarnLevels),e.eol="string"==typeof t.eol?t.eol:a.EOL,e.forceConsole=t.forceConsole||!1,e._consoleLog=console.log.bind(console),e._consoleWarn=console.warn.bind(console),e._consoleError=console.error.bind(console),e.setMaxListeners(30),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"log",value:function(e,t){var n=this;return setImmediate((function(){return n.emit("logged",e)})),this.stderrLevels[e[l]]?(console._stderr&&!this.forceConsole?console._stderr.write("".concat(e[u]).concat(this.eol)):this._consoleError(e[u]),void(t&&t())):this.consoleWarnLevels[e[l]]?(console._stderr&&!this.forceConsole?console._stderr.write("".concat(e[u]).concat(this.eol)):this._consoleWarn(e[u]),void(t&&t())):(console._stdout&&!this.forceConsole?console._stdout.write("".concat(e[u]).concat(this.eol)):this._consoleLog(e[u]),void(t&&t()))}},{key:"_stringArrayToSet",value:function(e,t){if(!e)return{};if(t=t||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(t);return e.reduce((function(e,n){if("string"!=typeof n)throw new Error(t);return e[n]=!0,e}),{})}}])}(d),o$}var u$,p$={exports:{}},d$={exports:{}},m$={exports:{}};function h$(){return u$||(u$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0},e.exports=t.default}(m$,m$.exports)),m$.exports}var f$,g$={},y$={exports:{}},v$={exports:{}};var b$,x$,w$,E$={};function S$(){return x$||(x$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.isAsync)(e))return function(...t){const n=t.pop();return a(e.apply(this,t),n)};return(0,i.default)((function(t,n){var i;try{i=e.apply(this,t)}catch(e){return n(e)}if(i&&"function"==typeof i.then)return a(i,n);n(null,i)}))};var n=(f$||(f$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){var n=t.pop();return e.call(this,t,n)}},e.exports=t.default}(v$,v$.exports)),v$.exports),i=s(n),r=s(function(){if(b$)return E$;b$=1,Object.defineProperty(E$,"__esModule",{value:!0}),E$.fallback=r,E$.wrap=o;var e,t=E$.hasQueueMicrotask="function"==typeof queueMicrotask&&queueMicrotask,n=E$.hasSetImmediate="function"==typeof setImmediate&&setImmediate,i=E$.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;function r(e){setTimeout(e,0)}function o(e){return(t,...n)=>e((()=>t(...n)))}return e=t?queueMicrotask:n?setImmediate:i?process.nextTick:r,E$.default=o(e),E$}()),o=_$();function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return e.then((e=>{c(t,null,e)}),(e=>{c(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function c(e,t,n){try{e(t,n)}catch(e){(0,r.default)((e=>{throw e}),e)}}e.exports=t.default}(y$,y$.exports)),y$.exports}function _$(){if(w$)return g$;w$=1,Object.defineProperty(g$,"__esModule",{value:!0}),g$.isAsyncIterable=g$.isAsyncGenerator=g$.isAsync=void 0;var e,t=S$(),n=(e=t)&&e.__esModule?e:{default:e};function i(e){return"AsyncFunction"===e[Symbol.toStringTag]}return g$.default=function(e){if("function"!=typeof e)throw new Error("expected a function");return i(e)?(0,n.default)(e):e},g$.isAsync=i,g$.isAsyncGenerator=function(e){return"AsyncGenerator"===e[Symbol.toStringTag]},g$.isAsyncIterable=function(e){return"function"==typeof e[Symbol.asyncIterator]},g$}var O$,C$,k$={exports:{}};function T$(){return O$||(O$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t||(t=e.length);if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((i,r)=>{n[t-1]=(e,...t)=>{if(e)return r(e);i(t.length>1?t:t[0])},e.apply(this,n)}))}},e.exports=t.default}(k$,k$.exports)),k$.exports}var P$,A$={exports:{}},I$={exports:{}},R$={exports:{}},M$={exports:{}};function j$(){return P$||(P$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t},e.exports=t.default}(M$,M$.exports)),M$.exports}var $$,N$,D$={exports:{}},L$={exports:{}};function z$(){return N$||(N$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,n.default)(e))return function(e){var t=-1,n=e.length;return function(){return++t<n?{value:e[t],key:t}:null}}(e);var t=(0,r.default)(e);return t?function(e){var t=-1;return function(){var n=e.next();return n.done?null:(t++,{value:n.value,key:t})}}(t):function(e){var t=e?Object.keys(e):[],n=-1,i=t.length;return function r(){var o=t[++n];return"__proto__"===o?r():n<i?{value:e[o],key:o}:null}}(e)};var n=o(h$()),i=($$||($$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()},e.exports=t.default}(L$,L$.exports)),L$.exports),r=o(i);function o(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(D$,D$.exports)),D$.exports}var F$,U$={exports:{}};function B$(){return F$||(F$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}},e.exports=t.default}(U$,U$.exports)),U$.exports}var H$,q$,V$,G$,W$,K$,Y$={exports:{}},Q$={exports:{}};function J$(){return H$||(H$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.default={},e.exports=t.default}(Q$,Q$.exports)),Q$.exports}function X$(){return V$||(V$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=l(j$()),i=l(z$()),r=l(B$()),o=_$(),s=(q$||(q$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r){let o=!1,s=!1,a=!1,c=0,l=0;function u(){c>=t||a||o||(a=!0,e.next().then((({value:e,done:t})=>{if(!s&&!o){if(a=!1,t)return o=!0,void(c<=0&&r(null));c++,n(e,l,p),l++,u()}})).catch(d))}function p(e,t){if(c-=1,!s)return e?d(e):!1===e?(o=!0,void(s=!0)):t===i.default||o&&c<=0?(o=!0,r(null)):void u()}function d(e){s||(a=!1,o=!0,r(e))}u()};var n,i=(n=J$())&&n.__esModule?n:{default:n};e.exports=t.default}(Y$,Y$.exports)),Y$.exports),a=l(s),c=l(J$());function l(e){return e&&e.__esModule?e:{default:e}}t.default=e=>(t,s,l)=>{if(l=(0,n.default)(l),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return l(null);if((0,o.isAsyncGenerator)(t))return(0,a.default)(t,e,s,l);if((0,o.isAsyncIterable)(t))return(0,a.default)(t[Symbol.asyncIterator](),e,s,l);var u=(0,i.default)(t),p=!1,d=!1,m=0,h=!1;function f(e,t){if(!d)if(m-=1,e)p=!0,l(e);else if(!1===e)p=!0,d=!0;else{if(t===c.default||p&&m<=0)return p=!0,l(null);h||g()}}function g(){for(h=!0;m<e&&!p;){var t=u();if(null===t)return p=!0,void(m<=0&&l(null));m+=1,s(t.value,t.key,(0,r.default)(f))}h=!1}g()},e.exports=t.default}(R$,R$.exports)),R$.exports}function Z$(){return G$||(G$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=o(X$()),i=o(_$()),r=o(T$());function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.default)((function(e,t,r,o){return(0,n.default)(t)(e,(0,i.default)(r),o)}),4),e.exports=t.default}(I$,I$.exports)),I$.exports}function eN(){return K$||(K$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,i.default)(o.default,e,t)};var n=(C$||(C$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=o(h$()),i=o(_$()),r=o(T$());function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,r.default)(((e,t,r)=>{var o=(0,n.default)(t)?[]:{};e(t,((e,t,n)=>{(0,i.default)(e)(((e,...i)=>{i.length<2&&([i]=i),o[t]=i,n(e)}))}),(e=>r(e,o)))}),3),e.exports=t.default}(d$,d$.exports)),d$.exports),i=s(n),r=(W$||(W$=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=r(Z$()),i=r(T$());function r(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)((function(e,t,i){return(0,n.default)(e,1,t,i)}),3),e.exports=t.default}(A$,A$.exports)),A$.exports),o=s(r);function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(p$,p$.exports)),p$.exports}var tN,nN,iN,rN,oN,sN,aN,cN={exports:{}};function lN(){if(nN)return tN;nN=1,tN=a;var e=_j().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,i=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,r=e.ERR_TRANSFORM_WITH_LENGTH_0,o=e$();function s(e,t){var i=this._transformState;i.transforming=!1;var r=i.writecb;if(null===r)return this.emit("error",new n);i.writechunk=null,i.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);o.call(this,e),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(t,n){l(e,t,n)}))}function l(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new r;if(e._transformState.transforming)throw new i;return e.push(null)}return Tj()(a,o),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,o.prototype.push.call(this,e,t)},a.prototype._transform=function(e,n,i){i(new t("_transform()"))},a.prototype._write=function(e,t,n){var i=this._transformState;if(i.writecb=n,i.writechunk=e,i.writeencoding=t,!i.transforming){var r=this._readableState;(i.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},a.prototype._destroy=function(e,t){o.prototype._destroy.call(this,e,(function(e){t(e)}))},tN}function uN(){if(sN)return oN;var e;sN=1;var t=_j().codes,n=t.ERR_MISSING_ARGS,i=t.ERR_STREAM_DESTROYED;function r(e){if(e)throw e}function o(e){e()}function s(e,t){return e.pipe(t)}return oN=function(){for(var t=arguments.length,a=new Array(t),c=0;c<t;c++)a[c]=arguments[c];var l,u=function(e){return e.length?"function"!=typeof e[e.length-1]?r:e.pop():r}(a);if(Array.isArray(a[0])&&(a=a[0]),a.length<2)throw new n("streams");var p=a.map((function(t,n){var r=n<a.length-1;return function(t,n,r,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;t.on("close",(function(){s=!0})),void 0===e&&(e=Jj()),e(t,{readable:n,writable:r},(function(e){if(e)return o(e);s=!0,o()}));var a=!1;return function(e){if(!s&&!a)return a=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new i("pipe"))}}(t,r,n>0,(function(e){l||(l=e),e&&p.forEach(o),r||(p.forEach(o),u(l))}))}));return a.reduce(s)},oN}function pN(){return aN||(aN=1,function(e,t){(t=e.exports=Zj()).Stream=t,t.Readable=t,t.Writable=t$(),t.Duplex=e$(),t.Transform=lN(),t.PassThrough=function(){if(rN)return iN;rN=1,iN=t;var e=lN();function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return Tj()(t,e),t.prototype._transform=function(e,t,n){n(null,e)},iN}(),t.finished=Jj(),t.pipeline=uN()}(cN,cN.exports)),cN.exports}var dN,mN,hN,fN,gN,yN,vN,bN,xN,wN,EN,SN,_N,ON,CN,kN,TN={exports:{}};function PN(){if(mN)return dN;mN=1;var e=[],t=[],n=function(){};function i(t){return!~e.indexOf(t)&&(e.push(t),!0)}function r(e){n=e}function o(t){for(var n=[],i=0;i<e.length;i++)if(e[i].async)n.push(e[i]);else if(e[i](t))return!0;return!!n.length&&new Promise((function(e){Promise.all(n.map((function(e){return e(t)}))).then((function(t){e(t.some(Boolean))}))}))}function s(e){return!~t.indexOf(e)&&(t.push(e),!0)}function a(){n.apply(n,arguments)}function c(e){for(var n=0;n<t.length;n++)e=t[n].apply(t[n],arguments);return e}function l(e,t){var n=Object.prototype.hasOwnProperty;for(var i in t)n.call(t,i)&&(e[i]=t[i]);return e}function u(e){return e.enabled=!1,e.modify=s,e.set=r,e.use=i,l((function(){return!1}),e)}function p(e){return e.enabled=!0,e.modify=s,e.set=r,e.use=i,l((function(){var t=Array.prototype.slice.call(arguments,0);return a.call(a,e,c(t,e)),!0}),e)}return dN=function(e){return e.introduce=l,e.enabled=o,e.process=c,e.modify=s,e.write=a,e.nope=u,e.yep=p,e.set=r,e.use=i,e}}function AN(){return gN||(gN=1,TN.exports=function(){if(fN)return hN;fN=1;var e=PN()((function e(t,n){return(n=n||{}).namespace=t,n.prod=!0,n.dev=!1,n.force||e.force?e.yep(n):e.nope(n)}));return hN=e}()),TN.exports}function IN(){if(vN)return yN;vN=1;var e=r,t=y.StringDecoder,n=pN().Stream;function i(){}return yN=function(r,o){var s=Buffer.alloc(65536),a=new t("utf8"),c=new n,l="",u=0,p=0;return-1===r.start&&delete r.start,c.readable=!0,c.destroy=function(){c.destroyed=!0,c.emit("end"),c.emit("close")},e.open(r.file,"a+","0644",(function(t,n){if(t)return o?o(t):c.emit("error",t),void c.destroy();!function t(){if(!c.destroyed)return e.read(n,s,0,s.length,u,(function(e,n){if(e)return o?o(e):c.emit("error",e),void c.destroy();if(!n)return l&&((null==r.start||p>r.start)&&(o?o(null,l):c.emit("line",l)),p++,l=""),setTimeout(t,1e3);var i=a.write(s.slice(0,n));o||c.emit("data",i);for(var d=(i=(l+i).split(/\n+/)).length-1,m=0;m<d;m++)(null==r.start||p>r.start)&&(o?o(null,i[m]):c.emit("line",i[m])),p++;return l=i[d],u+=n,t()}));e.close(n,i)}()})),o?c.destroy:c},yN}function RN(){if(xN)return bN;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=s(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,o()?Reflect.construct(n,i||[],s(t).constructor):n.apply(t,i))}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}xN=1;var l=r,u=d,m=eN(),h=a,f=kR().MESSAGE,g=pN(),y=g.Stream,v=g.PassThrough,b=c$(),x=AN()("winston:file"),w=p,E=IN();return bN=function(n){function r(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function n(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];i.slice(1).forEach((function(n){if(t[n])throw new Error("Cannot set ".concat(n," and ").concat(e," together"))}))}if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(e=i(this,r,[t])).name=t.name||"file",e._stream=new v,e._stream.setMaxListeners(30),e._onError=e._onError.bind(e),t.filename||t.dirname)n("filename or dirname","stream"),e._basename=e.filename=t.filename?u.basename(t.filename):"winston.log",e.dirname=t.dirname||u.dirname(t.filename),e.options=t.options||{flags:"a"};else{if(!t.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),n("stream","filename","maxsize"),e._dest=e._stream.pipe(e._setupStream(t.stream)),e.dirname=u.dirname(e._dest.path)}return e.maxsize=t.maxsize||null,e.rotationFormat=t.rotationFormat||!1,e.zippedArchive=t.zippedArchive||!1,e.maxFiles=t.maxFiles||null,e.eol="string"==typeof t.eol?t.eol:w.EOL,e.tailable=t.tailable||!1,e.lazy=t.lazy||!1,e._size=0,e._pendingSize=0,e._created=0,e._drain=!1,e._opening=!1,e._ending=!1,e._fileExist=!1,e.dirname&&e._createLogDirIfNotExist(e.dirname),e.lazy||e.open(),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(r,n),t(r,[{key:"finishIfEnding",value:function(){var e=this;this._ending&&(this._opening?this.once("open",(function(){e._stream.once("finish",(function(){return e.emit("finish")})),setImmediate((function(){return e._stream.end()}))})):(this._stream.once("finish",(function(){return e.emit("finish")})),setImmediate((function(){return e._stream.end()}))))}},{key:"log",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(this.silent)return n(),!0;if(this._drain)this._stream.once("drain",(function(){t._drain=!1,t.log(e,n)}));else{if(!this._rotate){if(this.lazy){if(!this._fileExist)return this._opening||this.open(),void this.once("open",(function(){t._fileExist=!0,t.log(e,n)}));if(this._needsNewFile(this._pendingSize))return void this._dest.once("close",(function(){t._opening||t.open(),t.once("open",(function(){t.log(e,n)}))}))}var i="".concat(e[f]).concat(this.eol),r=Buffer.byteLength(i);this._pendingSize+=r,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);var o=this._stream.write(i,function(){var t=this;this._size+=r,this._pendingSize-=r,x("logged %s %s",this._size,i),this.emit("logged",e),this._rotate||this._opening||this._needsNewFile()&&(this.lazy?this._endStream((function(){t.emit("fileclosed")})):(this._rotate=!0,this._endStream((function(){return t._rotateFile()}))))}.bind(this));return o?n():(this._drain=!0,this._stream.once("drain",(function(){t._drain=!1,n()}))),x("written",o,this._drain),this.finishIfEnding(),o}this._stream.once("rotate",(function(){t._rotate=!1,t.log(e,n)}))}}},{key:"query",value:function(t,n){"function"==typeof t&&(n=t,t={}),t=function(t){t=t||{},t.rows=t.rows||t.limit||10,t.start=t.start||0,t.until=t.until||new Date,"object"!==e(t.until)&&(t.until=new Date(t.until));t.from=t.from||t.until-864e5,"object"!==e(t.from)&&(t.from=new Date(t.from));return t.order=t.order||"desc",t}(t);var i=u.join(this.dirname,this.filename),r="",o=[],s=0,a=l.createReadStream(i,{encoding:"utf8"});function c(n,i){try{var r=JSON.parse(n);(function(n){if(!n)return;if("object"!==e(n))return;var i=new Date(n.timestamp);if(t.from&&i<t.from||t.until&&i>t.until||t.level&&t.level!==n.level)return;return!0})(r)&&function(e){if(t.rows&&o.length>=t.rows&&"desc"!==t.order)return void(a.readable&&a.destroy());t.fields&&(e=t.fields.reduce((function(t,n){return t[n]=e[n],t}),{}));"desc"===t.order&&o.length>=t.rows&&o.shift();o.push(e)}(r)}catch(e){i||a.emit("error",e)}}a.on("error",(function(e){if(a.readable&&a.destroy(),n)return"ENOENT"!==e.code?n(e):n(null,o)})),a.on("data",(function(e){for(var n=(e=(r+e).split(/\n+/)).length-1,i=0;i<n;i++)(!t.start||s>=t.start)&&c(e[i]),s++;r=e[n]})),a.on("close",(function(){r&&c(r,!0),"desc"===t.order&&(o=o.reverse()),n&&n(null,o)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=u.join(this.dirname,this.filename),n=new y,i={file:t,start:e.start};return n.destroy=E(i,(function(e,t){if(e)return n.emit("error",e);try{n.emit("data",t),t=JSON.parse(t),n.emit("log",t)}catch(e){n.emit("error",e)}})),n}},{key:"open",value:function(){var e=this;this.filename&&(this._opening||(this._opening=!0,this.stat((function(t,n){if(t)return e.emit("error",t);x("stat done: %s { size: %s }",e.filename,n),e._size=n,e._dest=e._createStream(e._stream),e._opening=!1,e.once("open",(function(){e._stream.emit("rotate")||(e._rotate=!1)}))}))))}},{key:"stat",value:function(e){var t=this,n=this._getFile(),i=u.join(this.dirname,n);l.stat(i,(function(r,o){return r&&"ENOENT"===r.code?(x("ENOENT ok",i),t.filename=n,e(null,0)):r?(x("err ".concat(r.code," ").concat(i)),e(r)):!o||t._needsNewFile(o.size)?t._incFile((function(){return t.stat(e)})):(t.filename=n,void e(null,o.size))}))}},{key:"close",value:function(e){var t=this;this._stream&&this._stream.end((function(){e&&e(),t.emit("flush"),t.emit("closed")}))}},{key:"_needsNewFile",value:function(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}},{key:"_onError",value:function(e){this.emit("error",e)}},{key:"_setupStream",value:function(e){return e.on("error",this._onError),e}},{key:"_cleanupStream",value:function(e){return e.removeListener("error",this._onError),e.destroy(),e}},{key:"_rotateFile",value:function(){var e=this;this._incFile((function(){return e.open()}))}},{key:"_endStream",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this._dest?(this._stream.unpipe(this._dest),this._dest.end((function(){e._cleanupStream(e._dest),t()}))):t()}},{key:"_createStream",value:function(e){var t=this,n=u.join(this.dirname,this.filename);x("create stream start",n,this.options);var i=l.createWriteStream(n,this.options).on("error",(function(e){return x(e)})).on("close",(function(){return x("close",i.path,i.bytesWritten)})).on("open",(function(){x("file open ok",n),t.emit("open",n),e.pipe(i),t.rotatedWhileOpening&&(t._stream=new v,t._stream.setMaxListeners(30),t._rotateFile(),t.rotatedWhileOpening=!1,t._cleanupStream(i),e.end())}));return x("create stream ok",n),i}},{key:"_incFile",value:function(e){x("_incFile",this.filename);var t=u.extname(this._basename),n=u.basename(this._basename,t),i=[];this.zippedArchive&&i.push(function(e){var i=this._created>0&&!this.tailable?this._created:"";this._compressFile(u.join(this.dirname,"".concat(n).concat(i).concat(t)),u.join(this.dirname,"".concat(n).concat(i).concat(t,".gz")),e)}.bind(this)),i.push(function(e){this.tailable?this._checkMaxFilesTailable(t,n,e):(this._created+=1,this._checkMaxFilesIncrementing(t,n,e))}.bind(this)),m(i,e)}},{key:"_getFile",value:function(){var e=u.extname(this._basename),t=u.basename(this._basename,e),n=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?"".concat(t).concat(n).concat(e):"".concat(t).concat(e)}},{key:"_checkMaxFilesIncrementing",value:function(e,t,n){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(n);var i=this._created-this.maxFiles,r=0!==i?i:"",o=this.zippedArchive?".gz":"",s="".concat(t).concat(r).concat(e).concat(o),a=u.join(this.dirname,s);l.unlink(a,n)}},{key:"_checkMaxFilesTailable",value:function(e,t,n){var i=this,r=[];if(this.maxFiles){for(var o=this.zippedArchive?".gz":"",s=this.maxFiles-1;s>1;s--)r.push(function(n,i){var r=this,s="".concat(t).concat(n-1).concat(e).concat(o),a=u.join(this.dirname,s);l.exists(a,(function(c){if(!c)return i(null);s="".concat(t).concat(n).concat(e).concat(o),l.rename(a,u.join(r.dirname,s),i)}))}.bind(this,s));m(r,(function(){l.rename(u.join(i.dirname,"".concat(t).concat(e).concat(o)),u.join(i.dirname,"".concat(t,"1").concat(e).concat(o)),n)}))}}},{key:"_compressFile",value:function(e,t,n){l.access(e,l.F_OK,(function(i){if(i)return n();var r=h.createGzip(),o=l.createReadStream(e),s=l.createWriteStream(t);s.on("finish",(function(){l.unlink(e,n)})),o.pipe(r).pipe(s)}))}},{key:"_createLogDirIfNotExist",value:function(e){l.existsSync(e)||l.mkdirSync(e,{recursive:!0})}}])}(b),bN}function MN(){if(EN)return wN;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function n(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,a(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function c(t,n,i){return n=u(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,l()?Reflect.construct(n,i||[],u(t).constructor):n.apply(t,i))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}EN=1;var d=o,m=s,h=pN().Stream,f=c$(),g=rM().configure;return wN=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=c(this,t,[n])).options=n,e.name=n.name||"http",e.ssl=!!n.ssl,e.host=n.host||"localhost",e.port=n.port,e.auth=n.auth,e.path=n.path||"",e.maximumDepth=n.maximumDepth,e.agent=n.agent,e.headers=n.headers||{},e.headers["content-type"]="application/json",e.batch=n.batch||!1,e.batchInterval=n.batchInterval||5e3,e.batchCount=n.batchCount||10,e.batchOptions=[],e.batchTimeoutID=-1,e.batchCallback={},e.port||(e.port=e.ssl?443:80),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r(t,[{key:"log",value:function(e,t){var n=this;this._request(e,null,null,(function(t,i){i&&200!==i.statusCode&&(t=new Error("Invalid HTTP Status Code: ".concat(i.statusCode))),t?n.emit("warn",t):n.emit("logged",e)})),t&&setImmediate(t)}},{key:"query",value:function(e,t){"function"==typeof e&&(t=e,e={});var n=(e={method:"query",params:this.normalizeQuery(e)}).params.auth||null;delete e.params.auth;var i=e.params.path||null;delete e.params.path,this._request(e,n,i,(function(e,n,i){if(n&&200!==n.statusCode&&(e=new Error("Invalid HTTP Status Code: ".concat(n.statusCode))),e)return t(e);if("string"==typeof i)try{i=JSON.parse(i)}catch(e){return t(e)}t(null,i)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new h,n=(e={method:"stream",params:e}).params.path||null;delete e.params.path;var i=e.params.auth||null;delete e.params.auth;var r="",o=this._request(e,i,n);return t.destroy=function(){return o.destroy()},o.on("data",(function(e){for(var n=(e=(r+e).split(/\n+/)).length-1,i=0;i<n;i++)try{t.emit("log",JSON.parse(e[i]))}catch(e){t.emit("error",e)}r=e[n]})),o.on("error",(function(e){return t.emit("error",e)})),t}},{key:"_request",value:function(e,t,n,i){e=e||{},t=t||this.auth,n=n||this.path||"",this.batch?this._doBatch(e,i,t,n):this._doRequest(e,i,t,n)}},{key:"_doBatch",value:function(e,t,n,i){if(this.batchOptions.push(e),1===this.batchOptions.length){var r=this;this.batchCallback=t,this.batchTimeoutID=setTimeout((function(){r.batchTimeoutID=-1,r._doBatchRequest(r.batchCallback,n,i)}),this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,i)}},{key:"_doBatchRequest",value:function(e,t,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);var i=this.batchOptions.slice();this.batchOptions=[],this._doRequest(i,e,t,n)}},{key:"_doRequest",value:function(e,t,i,r){var o=Object.assign({},this.headers);i&&i.bearer&&(o.Authorization="Bearer ".concat(i.bearer));var s=(this.ssl?m:d).request(n(n({},this.options),{},{method:"POST",host:this.host,port:this.port,path:"/".concat(r.replace(/^\//,"")),headers:o,auth:i&&i.username&&i.password?"".concat(i.username,":").concat(i.password):"",agent:this.agent}));s.on("error",t),s.on("response",(function(e){return e.on("end",(function(){return t(null,e)})).resume()}));var a=g(n({},this.maximumDepth&&{maximumDepth:this.maximumDepth}));s.end(Buffer.from(a(e,this.options.replacer),"utf8"))}}])}(f),wN}function jN(){if(_N)return SN;_N=1;const e=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;return e.writable=t=>e(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,e.readable=t=>e(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,e.duplex=t=>e.writable(t)&&e.readable(t),e.transform=t=>e.duplex(t)&&"function"==typeof t._transform,SN=e}function $N(){if(CN)return ON;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}CN=1;var a=jN(),c=kR().MESSAGE,l=p,u=c$();return ON=function(e){function n(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),e=i(this,n,[t]),!t.stream||!a(t.stream))throw new Error("options.stream is required.");return e._stream=t.stream,e._stream.setMaxListeners(1/0),e.isObjectMode=t.stream._writableState.objectMode,e.eol="string"==typeof t.eol?t.eol:l.EOL,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"log",value:function(e,t){var n=this;if(setImmediate((function(){return n.emit("logged",e)})),this.isObjectMode)return this._stream.write(e),void(t&&t());this._stream.write("".concat(e[c]).concat(this.eol)),t&&t()}}])}(u),ON}var NN,DN={};function LN(){if(NN)return DN;NN=1;var e=ij(),t=kR().configs;return DN.cli=e.levels(t.cli),DN.npm=e.levels(t.npm),DN.syslog=e.levels(t.syslog),DN.addColors=e.levels,DN}var zN,FN={exports:{}},UN={exports:{}};var BN,HN,qN,VN,GN,WN,KN={exports:{}};function YN(){return HN||(HN=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=(zN||(zN=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=l(h$()),i=l(J$()),r=l(Z$()),o=l(j$()),s=l(B$()),a=l(_$()),c=l(T$());function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){n=(0,o.default)(n);var r=0,a=0,{length:c}=e,l=!1;function u(e,t){!1===e&&(l=!0),!0!==l&&(e?n(e):++a!==c&&t!==i.default||n(null))}for(0===c&&n(null);r<c;r++)t(e[r],r,(0,s.default)(u))}function p(e,t,n){return(0,r.default)(e,1/0,t,n)}t.default=(0,c.default)((function(e,t,i){return((0,n.default)(e)?u:p)(e,(0,a.default)(t),i)}),3),e.exports=t.default}(UN,UN.exports)),UN.exports),i=c(n),r=(BN||(BN=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(t,n,i)=>e(t,i)},e.exports=t.default}(KN,KN.exports)),KN.exports),o=c(r),s=c(_$()),a=c(T$());function c(e){return e&&e.__esModule?e:{default:e}}t.default=(0,a.default)((function(e,t,n){return(0,i.default)(e,(0,o.default)((0,s.default)(t)),n)}),3),e.exports=t.default}(FN,FN.exports)),FN.exports}function QN(){if(WN)return GN;WN=1;var e=function(){if(VN)return qN;VN=1;var e=Object.prototype.toString;return qN=function(t){if("string"==typeof t.displayName&&t.constructor.name)return t.displayName;if("string"==typeof t.name&&t.name)return t.name;if("object"==typeof t&&t.constructor&&"string"==typeof t.constructor.name)return t.constructor.name;var n=t.toString(),i=e.call(t).slice(8,-1);return(n="Function"===i?n.substring(n.indexOf("(")+1,n.indexOf(")")):i)||"anonymous"}}();return GN=function(t){var n,i=0;function r(){return i||(i=1,n=t.apply(this,arguments),t=null),n}return r.displayName=e(t),r},GN}var JN,XN,ZN,eD,tD,nD,iD,rD,oD,sD={};function aD(){return JN||(JN=1,function(e){function t(e){for(var t in e)this[t]=e[t]}e.get=function(t){var n=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var i={},r=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t},Error.captureStackTrace(i,t||e.get);var o=i.stack;return Error.prepareStackTrace=r,Error.stackTraceLimit=n,o},e.parse=function(e){if(!e.stack)return[];var t=this;return e.stack.split("\n").slice(1).map((function(e){if(e.match(/^\s*[-]{4,}$/))return t._createParsedCallSite({fileName:e,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=e.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var i=null,r=null,o=null,s=null,a=null,c="native"===n[5];if(n[1]){var l=(o=n[1]).lastIndexOf(".");if("."==o[l-1]&&l--,l>0){i=o.substr(0,l),r=o.substr(l+1);var u=i.indexOf(".Module");u>0&&(o=o.substr(u+1),i=i.substr(0,u))}s=null}r&&(s=i,a=r),"<anonymous>"===r&&(a=null,o=null);var p={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:o,typeName:s,methodName:a,columnNumber:parseInt(n[4],10)||null,native:c};return t._createParsedCallSite(p)}})).filter((function(e){return!!e}))};["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach((function(e){t.prototype[e]=null,t.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),["topLevel","eval","native","constructor"].forEach((function(e){t.prototype[e]=!1,t.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),e._createParsedCallSite=function(e){return new t(e)}}(sD)),sD}function cD(){if(ZN)return XN;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}ZN=1;var a=pN().Writable;return XN=function(e){function n(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t=i(this,n,[{objectMode:!0}]),!e)throw new Error("ExceptionStream requires a TransportStream instance.");return t.handleExceptions=!0,t.transport=e,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"_write",value:function(e,t,n){return e.exception?this.transport.log(e,n):(n(),!0)}}])}(a),XN}function lD(){if(tD)return eD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}tD=1;var i=p,r=YN(),o=AN()("winston:exception"),s=QN(),a=aD(),c=cD();return eD=function(){return t((function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Logger is required to handle exceptions");this.logger=t,this.handlers=new Map}),[{key:"handle",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach((function(t){if(Array.isArray(t))return t.forEach((function(t){return e._addHandler(t)}));e._addHandler(t)})),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}},{key:"unhandle",value:function(){var e=this;this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(t){return e.logger.unpipe(t)})))}},{key:"getAllInfo",value:function(e){var t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:["uncaughtException: ".concat(t||"(no error message)"),e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,exception:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}},{key:"getProcessInfo",value:function(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:i.loadavg(),uptime:i.uptime()}}},{key:"getTrace",value:function(e){return(e?a.parse(e):a.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(e){if(!this.handlers.has(e)){e.handleExceptions=!0;var t=new c(e);this.handlers.set(e,t),this.logger.pipe(t)}}},{key:"_uncaughtException",value:function(e){var t,n=this.getAllInfo(e),i=this._getExceptionHandlers(),a="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function c(){o("doExit",a),o("process._exiting",process._exiting),a&&!process._exiting&&(t&&clearTimeout(t),process.exit(1))}if(!i.length&&a&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),a=!1),!i||0===i.length)return process.nextTick(c);r(i,(function(e,t){var n=s(t),i=e.transport||e;function r(e){return function(){o(e),n()}}i._ending=!0,i.once("finish",r("finished")),i.once("error",r("error"))}),(function(){return a&&c()})),this.logger.log(n),a&&(t=setTimeout(c,3e3))}},{key:"_getExceptionHandlers",value:function(){return this.logger.transports.filter((function(e){return(e.transport||e).handleExceptions}))}}])}(),eD}function uD(){if(iD)return nD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n,i){return n=o(n),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,r()?Reflect.construct(n,i||[],o(t).constructor):n.apply(t,i))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(r=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}iD=1;var a=pN().Writable;return nD=function(e){function n(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t=i(this,n,[{objectMode:!0}]),!e)throw new Error("RejectionStream requires a TransportStream instance.");return t.handleRejections=!0,t.transport=e,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(n,e),t(n,[{key:"_write",value:function(e,t,n){return e.rejection?this.transport.log(e,n):(n(),!0)}}])}(a),nD}function pD(){if(oD)return rD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}oD=1;var i=p,r=YN(),o=AN()("winston:rejection"),s=QN(),a=aD(),c=uD();return rD=function(){return t((function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("Logger is required to handle rejections");this.logger=t,this.handlers=new Map}),[{key:"handle",value:function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach((function(t){if(Array.isArray(t))return t.forEach((function(t){return e._addHandler(t)}));e._addHandler(t)})),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}},{key:"unhandle",value:function(){var e=this;this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((function(t){return e.logger.unpipe(t)})))}},{key:"getAllInfo",value:function(e){var t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:["unhandledRejection: ".concat(t||"(no error message)"),e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,rejection:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}},{key:"getProcessInfo",value:function(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}},{key:"getOsInfo",value:function(){return{loadavg:i.loadavg(),uptime:i.uptime()}}},{key:"getTrace",value:function(e){return(e?a.parse(e):a.get()).map((function(e){return{column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()}}))}},{key:"_addHandler",value:function(e){if(!this.handlers.has(e)){e.handleRejections=!0;var t=new c(e);this.handlers.set(e,t),this.logger.pipe(t)}}},{key:"_unhandledRejection",value:function(e){var t,n=this.getAllInfo(e),i=this._getRejectionHandlers(),a="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function c(){o("doExit",a),o("process._exiting",process._exiting),a&&!process._exiting&&(t&&clearTimeout(t),process.exit(1))}if(!i.length&&a&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),a=!1),!i||0===i.length)return process.nextTick(c);r(i,(function(e,t){var n=s(t),i=e.transport||e;function r(e){return function(){o(e),n()}}i._ending=!0,i.once("finish",r("finished")),i.once("error",r("error"))}),(function(){return a&&c()})),this.logger.log(n),a&&(t=setTimeout(c,3e3))}},{key:"_getRejectionHandlers",value:function(){return this.logger.transports.filter((function(e){return(e.transport||e).handleRejections}))}}])}(),rD}var dD,mD,hD,fD,gD,yD,vD,bD,xD,wD,ED,SD,_D,OD,CD,kD={exports:{}},TD={exports:{}};function PD(){if(mD)return kD.exports;mD=1;const e=i,{LEVEL:t}=kR(),n=function(){if(dD)return TD.exports;dD=1;const e=i,t=t$(),{LEVEL:n}=kR(),r=TD.exports=function(e={}){t.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",(e=>{this.levels=e.levels,this.parent=e})),this.once("unpipe",(e=>{e===this.parent&&(this.parent=null,this.close&&this.close())}))};return e.inherits(r,t),r.prototype._write=function(e,t,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);const r=this.level||this.parent&&this.parent.level;if(!r||this.levels[r]>=this.levels[e[n]]){if(e&&!this.format)return this.log(e,i);let t,n;try{n=this.format.transform(Object.assign({},e),this.format.options)}catch(e){t=e}if(t||!n){if(i(),t)throw t;return}return this.log(n,i)}return this._writableState.sync=!1,i(null)},r.prototype._writev=function(e,t){if(this.logv){const n=e.filter(this._accept,this);return n.length?this.logv(n,t):t(null)}for(let n=0;n<e.length;n++){if(!this._accept(e[n]))continue;if(e[n].chunk&&!this.format){this.log(e[n].chunk,e[n].callback);continue}let i,r;try{r=this.format.transform(Object.assign({},e[n].chunk),this.format.options)}catch(e){i=e}if(i||!r){if(e[n].callback(),i)throw t(null),i}else this.log(r,e[n].callback)}return t(null)},r.prototype._accept=function(e){const t=e.chunk;if(this.silent)return!1;const i=this.level||this.parent&&this.parent.level;return!(!0!==t.exception&&i&&!(this.levels[i]>=this.levels[t[n]])||!this.handleExceptions&&!0===t.exception)},r.prototype._nop=function(){},TD.exports}(),r=kD.exports=function(e={}){if(n.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};return e.inherits(r,n),r.prototype._write=function(e,n,i){if(this.silent||!0===e.exception&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[t]])&&this.transport.log(e[t],e.message,e,this._nop),i(null)},r.prototype._writev=function(e,n){for(let n=0;n<e.length;n++)this._accept(e[n])&&(this.transport.log(e[n].chunk[t],e[n].chunk.message,e[n].chunk,this._nop),e[n].callback());return n(null)},r.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join("\n"))},r.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)},kD.exports}function AD(){if(fD)return hD;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}fD=1;var i=function(){return t((function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=RD();if("object"!==e(n)||Array.isArray(n)||!(n instanceof i))throw new Error("Logger is required for profiling");this.logger=n,this.start=Date.now()}),[{key:"done",value:function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];"function"==typeof n[n.length-1]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),n.pop());var r="object"===e(n[n.length-1])?n.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}}])}();return hD=i}function ID(){if(yD)return gD;yD=1;class e extends Error{constructor(t){super(`Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ${t.toString().split("\n")[0]}\n`),Error.captureStackTrace(this,e)}}return gD=t=>{if(t.length>2)throw new e(t);function n(e={}){this.options=e}function i(e){return new n(e)}return n.prototype.transform=t,i.Format=n,i}}function RD(){if(wD)return xD;function e(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,n||"default");if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,n,i){return n=s(n),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,o()?Reflect.construct(n,i||[],s(e).constructor):n.apply(e,i))}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}wD=1;var c=pN(),l=c.Stream,u=c.Transform,p=YN(),d=kR(),m=d.LEVEL,h=d.SPLAT,f=jN(),g=lD(),y=pD(),v=PD(),b=AD(),x=sj().warn,w=LN(),E=/%[scdjifoO%]/g,S=function(i){function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r(this,o,[{objectMode:!0}])).configure(e),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(o,i),n(o,[{key:"child",value:function(e){var t=this;return Object.create(t,{write:{value:function(n){var i=Object.assign({},e,n);n instanceof Error&&(i.stack=n.stack,i.message=n.message),t.write(i)}}})}},{key:"configure",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.silent,i=t.format,r=t.defaultMeta,o=t.levels,s=t.level,a=void 0===s?"info":s,c=t.exitOnError,l=void 0===c||c,u=t.transports,p=t.colors,d=t.emitErrs,m=t.formatters,h=t.padLevels,f=t.rewriters,v=t.stripColors,b=t.exceptionHandlers,x=t.rejectionHandlers;if(this.transports.length&&this.clear(),this.silent=n,this.format=i||this.format||function(){if(bD)return vD;bD=1;const e=ID(),{MESSAGE:t}=kR(),n=rM();function i(e,t){return"bigint"==typeof t?t.toString():t}return vD=e(((e,r)=>{const o=n.configure(r);return e[t]=o(e,r.replacer||i,r.space),e}))}()(),this.defaultMeta=r||null,this.levels=o||this.levels||w.npm.levels,this.level=a,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new g(this),this.rejections=new y(this),this.profilers={},this.exitOnError=l,u&&(u=Array.isArray(u)?u:[u]).forEach((function(t){return e.add(t)})),p||d||m||h||f||v)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"));b&&this.exceptions.handle(b),x&&this.rejections.handle(x)}},{key:"isLevelEnabled",value:function(e){var t=this,n=_(this.levels,e);if(null===n)return!1;var i=_(this.levels,this.level);return null!==i&&(this.transports&&0!==this.transports.length?-1!==this.transports.findIndex((function(e){var r=_(t.levels,e.level);return null===r&&(r=i),r>=n})):i>=n)}},{key:"log",value:function(n,i){for(var r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];if(1===arguments.length)return n[m]=n.level,this._addDefaultMeta(n),this.write(n),this;if(2===arguments.length)return i&&"object"===t(i)?(i[m]=i.level=n,this._addDefaultMeta(i),this.write(i),this):(i=e(e(e({},m,n),"level",n),"message",i),this._addDefaultMeta(i),this.write(i),this);var a=o[0];if("object"===t(a)&&null!==a&&!(i&&i.match&&i.match(E))){var c=Object.assign({},this.defaultMeta,a,e(e(e(e({},m,n),h,o),"level",n),"message",i));return a.message&&(c.message="".concat(c.message," ").concat(a.message)),a.stack&&(c.stack=a.stack),a.cause&&(c.cause=a.cause),this.write(c),this}return this.write(Object.assign({},this.defaultMeta,e(e(e(e({},m,n),h,o),"level",n),"message",i))),this}},{key:"_transform",value:function(e,t,n){if(this.silent)return n();e[m]||(e[m]=e.level),this.levels[e[m]]||0===this.levels[e[m]]||console.error("[winston] Unknown logger level: %s",e[m]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}},{key:"_final",value:function(e){var t=this.transports.slice();p(t,(function(e,t){if(!e||e.finished)return setImmediate(t);e.once("finish",t),e.end()}),e)}},{key:"add",value:function(e){var t=!f(e)||e.log.length>2?new v({transport:e}):e;if(!t._writableState||!t._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",t),this._onEvent("warn",t),this.pipe(t),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}},{key:"remove",value:function(e){if(!e)return this;var t=e;return(!f(e)||e.log.length>2)&&(t=this.transports.filter((function(t){return t.transport===e}))[0]),t&&this.unpipe(t),this}},{key:"clear",value:function(){return this.unpipe(),this}},{key:"close",value:function(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}},{key:"setLevels",value:function(){x.deprecated("setLevels")}},{key:"query",value:function(e,t){"function"==typeof e&&(t=e,e={}),e=e||{};var n={},i=Object.assign({},e.query||{});p(this.transports.filter((function(e){return!!e.query})),(function(t,r){!function(t,n){e.query&&"function"==typeof t.formatQuery&&(e.query=t.formatQuery(i)),t.query(e,(function(i,r){if(i)return n(i);"function"==typeof t.formatResults&&(r=t.formatResults(r,e.format)),n(null,r)}))}(t,(function(e,i){r&&((i=e||i)&&(n[t.name]=i),r()),r=null}))}),(function(){return t(null,n)}))}},{key:"stream",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new l,n=[];return t._streams=n,t.destroy=function(){for(var e=n.length;e--;)n[e].destroy()},this.transports.filter((function(e){return!!e.stream})).forEach((function(i){var r=i.stream(e);r&&(n.push(r),r.on("log",(function(e){e.transport=e.transport||[],e.transport.push(i.name),t.emit("log",e)})),r.on("error",(function(e){e.transport=e.transport||[],e.transport.push(i.name),t.emit("error",e)})))})),t}},{key:"startTimer",value:function(){return new b(this)}},{key:"profile",value:function(e){var n=Date.now();if(this.profilers[e]){var i=this.profilers[e];delete this.profilers[e];for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];"function"==typeof o[o.length-2]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),o.pop());var a="object"===t(o[o.length-1])?o.pop():{};return a.level=a.level||"info",a.durationMs=n-i,a.message=a.message||e,this.write(a)}return this.profilers[e]=n,this}},{key:"handleExceptions",value:function(){var e;console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),(e=this.exceptions).handle.apply(e,arguments)}},{key:"unhandleExceptions",value:function(){var e;console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),(e=this.exceptions).unhandle.apply(e,arguments)}},{key:"cli",value:function(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"))}},{key:"_onEvent",value:function(e,t){t["__winston"+e]||(t["__winston"+e]=function(n){"error"!==e||this.transports.includes(t)||this.add(t),this.emit(e,n,t)}.bind(this),t.on(e,t["__winston"+e]))}},{key:"_addDefaultMeta",value:function(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}}])}(u);function _(e,t){var n=e[t];return n||0===n?n:null}return Object.defineProperty(S.prototype,"transports",{configurable:!1,enumerable:!0,get:function(){var e=this._readableState.pipes;return Array.isArray(e)?e:[e].filter(Boolean)}}),xD=S}function MD(){if(SD)return ED;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,r,o){return r=i(r),function(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,n()?Reflect.construct(r,o||[],i(t).constructor):r.apply(t,o))}function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(n=function(){return!!e})()}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}SD=1;var o=kR().LEVEL,s=LN(),a=RD(),c=AN()("winston:create-logger");return ED=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.levels=e.levels||s.npm.levels;var n=function(e){function n(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t(this,n,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}(n,e),function(e){return Object.defineProperty(e,"prototype",{writable:!1}),e}(n)}(a),i=new n(e);return Object.keys(e.levels).forEach((function(e){c('Define prototype method for "%s"',e),"log"!==e?(n.prototype[e]=function(){for(var t=this||i,n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];if(1===r.length){var a=r[0],c=a&&a.message&&a||{message:a};return c.level=c[o]=e,t._addDefaultMeta(c),t.write(c),this||i}return 0===r.length?(t.log(e,""),t):t.log.apply(t,[e].concat(r))},n.prototype[function(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}(e)]=function(){return(this||i).isLevelEnabled(e)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')})),i},ED}function jD(){if(OD)return _D;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t,i){return t&&function(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n);if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==e(n)?n:n+""}OD=1;var i=MD();return _D=function(){return t((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.loggers=new Map,this.options=t}),[{key:"add",value:function(e,t){var n=this;if(!this.loggers.has(e)){var r=(t=Object.assign({},t||this.options)).transports||this.options.transports;t.transports=r?Array.isArray(r)?r.slice():[r]:[];var o=i(t);o.on("close",(function(){return n._delete(e)})),this.loggers.set(e,o)}return this.loggers.get(e)}},{key:"get",value:function(e,t){return this.add(e,t)}},{key:"has",value:function(e){return!!this.loggers.has(e)}},{key:"close",value:function(e){var t=this;if(e)return this._removeLogger(e);this.loggers.forEach((function(e,n){return t._removeLogger(n)}))}},{key:"_removeLogger",value:function(e){this.loggers.has(e)&&(this.loggers.get(e).close(),this._delete(e))}},{key:"_delete",value:function(e){this.loggers.delete(e)}}])}(),_D}var $D=(CD||(CD=1,function(e){var t=ij(),n=sj().warn;e.version=mj,e.transports=(kN||(kN=1,function(e){Object.defineProperty(e,"Console",{configurable:!0,enumerable:!0,get:function(){return l$()}}),Object.defineProperty(e,"File",{configurable:!0,enumerable:!0,get:function(){return RN()}}),Object.defineProperty(e,"Http",{configurable:!0,enumerable:!0,get:function(){return MN()}}),Object.defineProperty(e,"Stream",{configurable:!0,enumerable:!0,get:function(){return $N()}})}(hj)),hj),e.config=LN(),e.addColors=t.levels,e.format=t.format,e.createLogger=MD(),e.Logger=RD(),e.ExceptionHandler=lD(),e.RejectionHandler=pD(),e.Container=jD(),e.Transport=c$(),e.loggers=new e.Container;var i=e.createLogger();Object.keys(e.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((function(t){return e[t]=function(){return i[t].apply(i,arguments)}})),Object.defineProperty(e,"level",{get:function(){return i.level},set:function(e){i.level=e}}),Object.defineProperty(e,"exceptions",{get:function(){return i.exceptions}}),Object.defineProperty(e,"rejections",{get:function(){return i.rejections}}),["exitOnError"].forEach((function(t){Object.defineProperty(e,t,{get:function(){return i[t]},set:function(e){i[t]=e}})})),Object.defineProperty(e,"default",{get:function(){return{exceptionHandlers:i.exceptionHandlers,rejectionHandlers:i.rejectionHandlers,transports:i.transports}}}),n.deprecated(e,"setLevels"),n.forFunctions(e,"useFormat",["cli"]),n.forProperties(e,"useFormat",["padLevels","stripColors"]),n.forFunctions(e,"deprecated",["addRewriter","addFilter","clone","extend"]),n.forProperties(e,"deprecated",["emitErrs","levelLength"])}($I)),$I);e.DEFAULT_PARAMETER_STORE_CLIENT_CONFIG=tf,e.DEFAULT_SES_CLIENT_CONFIG=RI,e.lambda=e=>{const{clientConfig:t,...n}={...Cc,...e},i=new _s(t);return{invokeLambda:(e,t)=>(async(e,t,n,i)=>{try{const r=new yc({FunctionName:t.functionName,InvocationType:n,Payload:Buffer.from(JSON.stringify(i))}),o=await e.send(r);return t.logger&&t.logger("info",JSON.stringify(o)),!0}catch(e){return t.logger&&t.logger("error",e),!1}})(i,n,e,t)}},e.logger=e=>{const t={defaultMeta:{...e.defaultLogInformation,deploymentStage:e.deploymentStage,service:e.service},format:$D.format.combine($D.format.timestamp({format:"DD-MM-YYYY HH:mm:ss"}),$D.format.json())};if(e.datadogApiKey){const n={host:"http-intake.logs.datadoghq.eu",path:`/api/v2/logs?dd-api-key=${e.datadogApiKey}&ddsource=nodejs&service=${e.service}`,port:443,ssl:!0};return $D.createLogger({...t,transports:[new $D.transports.Http(n)]})}return $D.createLogger({...t,transports:[new $D.transports.Console({forceConsole:!0})]})},e.parameterStore=e=>{const{clientConfig:t,...n}={...tf,...e},i=new zl(t);return{getSecret:(e,t="")=>(async(e,t,n,i)=>{if(t.onlyDefault)return i;try{const r=await e.send(new Zh({Name:`${t.prefix??""}${n}`,WithDecryption:!0}));return r?.Parameter?.Value??i}catch(e){return t.logger&&t.logger("error",e),i}})(i,n,e,t),getSecrets:(e,t=[])=>(async(e,t,n,i)=>{if(t.onlyDefault)return i;try{const r=new ef({Names:n.map((e=>`${t.prefix??""}${e}`)),WithDecryption:!0}),o=await e.send(r);return o?.Parameters?.map((e=>{const t=!e.Value&&e.Name?i.find((t=>t.name===e.Name)):i[0];return{name:e.Name??t?.name??"",value:e.Value??t?.value??""}}))??i}catch(e){return t.logger&&t.logger("error",e),i}})(i,n,e,t)}},e.ses=(e,t)=>{const{clientConfig:n,...i}={...RI,...t},r=new $f(n),o=II.createTransport(t.customSMTPConfig??{SES:{aws:eA,ses:r}});return{sendMail:t=>(async(e,t,n,i)=>{if(!n.html&&!n.text)return e.logger&&e.logger("error","The option text or html needs to be set."),!1;if(!n.to||!n.subject)return e.logger&&e.logger("error","The fields to and subject have to be set."),!1;const r=await t.sendMail({from:i,...n});return e.logger&&e.logger("info",`Transporter response: ${JSON.stringify(r)}`),!!r||(e.logger&&e.logger("error","Sending email failed!"),!1)})(i,o,t,e)}}}));