@aws/amazon-location-client 1.2.3 → 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):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amazonLocationClient={})}(this,(function(e){"use strict";const t=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}),n=e=>({httpHandler:e.httpHandler()});var r,i;!function(e){e.HTTP="http",e.HTTPS="https"}(r||(r={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(i||(i={}));const s="__smithy_context";class o{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new o({...e,headers:{...e.headers}});var n;return t.query&&(t.query=(n=t.query,Object.keys(n).reduce(((e,t)=>{const r=n[t];return{...e,[t]:Array.isArray(r)?[...r]:r}}),{}))),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 o.clone(this)}}class a{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const c={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},u=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!o.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),c)}}),l={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},d=e=>({applyToStack:e=>{e.add(((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,l=c??t.inputFilterSensitiveLog,d=u??t.outputFilterSensitiveLog,{$metadata:p,...h}=r.output;return o?.info?.({clientName:i,commandName:s,input:l(n.input),output:d(h),metadata:p}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}}),l)}}),p={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},h=e=>({applyToStack:e=>{e.add((e=>async t=>e(t)),p)}}),f=e=>e[s]||(e[s]={}),g=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const m=(e,t)=>(n,r)=>async i=>{const s=((e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find((({schemeId:e})=>e===t.schemeId))||n.push(t);return n})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=f(r),c=[];for(const n of s){const i=o.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:l={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},u),n.signingProperties=Object.assign(n.signingProperties||{},l),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)},y={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},S=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(m(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),y)}}),R=e=>e=>{throw e},w=(e,t)=>{},v={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},E=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async n=>{if(!o.isInstance(n.request))return e(n);const r=f(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:a}=r,c=await e({...n,request:await a.sign(n.request,s,i)}).catch((a.errorHandler||R)(i));return(a.successHandler||w)(c.response,i),c}),v)}}),C=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},b=async(e,t,n,r=e=>e,...i)=>{let s=new e(n);return s=r(s)??s,await t.send(s,...i)};function T(e,t,n,r,i){return async function*(s,o,...a){const c=o;let u,l=s.startingToken??c[n],d=!0;for(;d;){if(c[n]=l,c[i]=c[i]??s.pageSize,!(s.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);u=await b(t,s.client,o,s.withCommand,...a),yield u;const p=l;l=P(u,r),d=!(!l||s.stopOnSameToken&&l===p)}}}const P=(e,t)=>{let n=e;const r=t.split(".");for(const e of r){if(!n||"object"!=typeof n)return;n=n[e]}return n},A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",I=Object.entries(A).reduce(((e,[t,n])=>(e[n]=Number(t),e)),{}),x=A.split(""),O=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in I))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=I[e[r]]<<6*(s-r),i+=6}else n>>=6;const s=t/4*3;n>>=i%8;const o=Math.floor(i/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},D=e=>(new TextEncoder).encode(e),$=e=>"string"==typeof e?D(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),M=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 L(e){let t;t="string"==typeof e?D(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<8*(s-i-1),r+=8;const s=Math.ceil(r/6);n<<=6*s-r;for(let e=1;e<=s;e++){const t=6*(s-e);i+=x[(n&63<<t)>>t]}i+="==".slice(0,4-s)}return i}class k extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return"base64"===t?k.mutate(O(e)):k.mutate(D(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,k.prototype),e}transformToString(e="utf-8"){return"base64"===e?L(this):M(this)}}const N=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),_=e=>encodeURIComponent(e).replace(/[!'()*]/g,U),U=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function F(e,t){return new Request(e,t)}function G(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 B={supported:void 0};class H{config;configProvider;static create(e){return"function"==typeof e?.handle?e:new H(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===B.supported&&(B.supported=Boolean("undefined"!=typeof Request&&"keepalive"in F("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const r=n??this.config.requestTimeout,i=!0===this.config.keepAlive,s=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const c=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=_(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${_(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${_(r)}`),t.push(e)}}return t.join("&")}(e.query||{});c&&(o+=`?${c}`),e.fragment&&(o+=`#${e.fragment}`);let u="";if(null!=e.username||null!=e.password){u=`${e.username??""}:${e.password??""}@`}const{port:l,method:d}=e,p=`${e.protocol}//${u}${e.hostname}${l?`:${l}`:""}${o}`,h="GET"===d||"HEAD"===d?void 0:e.body,f={body:h,headers:new Headers(e.headers),method:d,credentials:s};this.config?.cache&&(f.cache=this.config.cache),h&&(f.duplex="half"),"undefined"!=typeof AbortController&&(f.signal=t),B.supported&&(f.keepalive=i),"function"==typeof this.config.requestInit&&Object.assign(f,this.config.requestInit(e));let g=()=>{};const m=F(p,f),y=[fetch(m).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new a({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new a({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),G(r)];return t&&y.push(new Promise(((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),g=()=>e.removeEventListener("abort",r)}else t.onabort=r}))),Promise.race(y).finally(g)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const z=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise(((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)}))}(e),n=O(t);return new Uint8Array(n)}(e):async function(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}(e);const j={},q={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),j[e]=t,q[t]=e}function V(e){let t="";for(let n=0;n<e.byteLength;n++)t+=j[e[n]];return t}const W="The stream has already been transformed.",K=e=>{if(!Q(e)&&!N(e)){throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const n=async()=>{if(t)throw new Error(W);return t=!0,await z(e)};return Object.assign(e,{transformToByteArray:n,transformToString:async e=>{const t=await n();if("base64"===e)return L(t);if("hex"===e)return V(t);if(void 0===e||"utf8"===e||"utf-8"===e)return M(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(W);if(t=!0,Q(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if(N(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},Q=e=>"function"==typeof Blob&&e instanceof Blob,Z=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return k.mutate(e);if(!e)return k.mutate(new Uint8Array);const n=t.streamCollector(e);return k.mutate(await n)};function Y(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}const J=e=>"function"==typeof e?e():e,X=(e,t,n,r,i)=>({name:t,namespace:e,traits:n,input:r,output:i}),ee=(e,t)=>(t.find((([t])=>t.match(e)))||[void 0,void 0])[1],te={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},ne={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function re(e){return{applyToStack:t=>{t.add((e=>(t,n)=>async r=>{const{operationSchema:i}=f(n),[,s,o,a,c,u]=i??[],l=n.endpointV2?.url&&e.urlParser?async()=>e.urlParser(n.endpointV2.url):e.endpoint,d=await e.protocol.serializeRequest(X(s,o,a,c,u),r.input,{...e,...n,endpoint:l});return t({...r,request:d})})(e),ne),t.add((e=>(t,n)=>async r=>{const{response:i}=await t(r),{operationSchema:s}=f(n),[,o,c,u,l,d]=s??[];try{return{response:i,output:await e.protocol.deserializeResponse(X(o,c,u,l,d),{...e,...n},i)}}catch(e){if(Object.defineProperty(e,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){n.logger&&"NoOpLogger"!==n.logger?.constructor?.name?n.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(a.isInstance(i)){const{headers:t={}}=i,n=Object.entries(t);e.$metadata={httpStatusCode:i.statusCode,requestId:ee(/^x-[\w-]+-request-?id$/,n),extendedRequestId:ee(/^x-[\w-]+-id-2$/,n),cfId:ee(/^x-[\w-]+-cf-id$/,n)}}}catch(e){}}throw e}})(e),te),e.protocol.setSerdeContext(e)}}}function ie(e){if("object"==typeof e)return e;e|=0;const t={};let n=0;for(const r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])1==(e>>n++&1)&&(t[r]=1);return t}const se=Symbol.for("@smithy/nor-struct-it");class oe{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=oe.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e,this.memberName=t;const n=[];let r=e,i=e;for(this._isMemberSchema=!1;ce(r);)n.push(r[1]),r=r[0],i=J(r),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let e=n.length-1;e>=0;--e){const t=n[e];Object.assign(this.memberTraits,ie(t))}}else this.memberTraits=0;if(i instanceof oe){const e=this.memberTraits;return Object.assign(this,i),this.memberTraits=Object.assign({},e,i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,void(this.memberName=t??i.memberName)}if(this.schema=J(i),ue(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(i),this.traits=0),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===this.symbol}return t}static of(e){const t=J(e);if(t instanceof oe)return t;if(ce(t)){const[n,r]=t;if(n instanceof oe)return Object.assign(n.getMergedTraits(),ie(r)),n;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new oe(t)}getSchema(){const e=this.schema;return Array.isArray(e)&&0===e[0]?e[4]:e}getName(e=!1){const{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=64&&e<128:1===e[0]}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=128&&e<=255:2===e[0]}isStructSchema(){const e=this.getSchema();if("object"!=typeof e)return!1;const t=e[0];return 3===t||-3===t||4===t}isUnionSchema(){const e=this.getSchema();return"object"==typeof e&&4===e[0]}isBlobSchema(){const e=this.getSchema();return 21===e||42===e}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=4&&e<=7}isUnitSchema(){return"unit"===this.getSchema()}isDocumentSchema(){return 15===this.getSchema()}isStringSchema(){return 0===this.getSchema()}isBooleanSchema(){return 2===this.getSchema()}isNumericSchema(){return 1===this.getSchema()}isBigIntegerSchema(){return 17===this.getSchema()}isBigDecimalSchema(){return 19===this.getSchema()}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||42===this.getSchema()}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return ie(this.memberTraits)}getOwnTraits(){return ie(this.traits)}getKeySchema(){const[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const n=this.getSchema();return ae([e?15:n[4]??0,0],"key")}getValueSchema(){const e=this.getSchema(),[t,n,r]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i="number"==typeof e?63&e:e&&"object"==typeof e&&(n||r)?e[3+e[0]]:t?15:void 0;if(null!=i)return ae([i,0],n?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){const n=t[4].indexOf(e),r=t[5][n];return ae(ce(r)?r:[r,0],e)}if(this.isDocumentSchema())return ae([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[t,n]of this.structIterator())e[t]=n}catch(e){}return e}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e;return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema(),t=e[4].length;let n=e[se];if(n&&t===n.length)yield*n;else{n=Array(t);for(let r=0;r<t;++r){const t=e[4][r],i=ae([e[5][r],0],t);yield n[r]=[t,i]}e[se]=n}}}function ae(e,t){if(e instanceof oe)return Object.assign(e,{memberName:t,_isMemberSchema:!0});return new oe(e,t)}const ce=e=>Array.isArray(e)&&2===e.length,ue=e=>Array.isArray(e)&&e.length>=5;class le{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,n=new Map){this.namespace=e,this.schemas=t,this.exceptions=n}static for(e){return le.registries.has(e)||le.registries.set(e,new le(e)),le.registries.get(e)}register(e,t){const n=this.normalizeShapeId(e);le.for(n.split("#")[0]).schemas.set(n,t)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}registerError(e,t){const n=e,r=le.for(n[1]);r.schemas.set(n[1]+"#"+n[2],n),r.exceptions.set(n,t)}getErrorCtor(e){const t=e;return le.for(t[1]).exceptions.get(t)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,t,n]=e,r=t+"#"+n;if(r.startsWith("smithy.ts.sdk.synthetic.")&&r.endsWith("ServiceException"))return e}}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}const de=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Ee.warn(ve(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},pe=Math.ceil(2**127*(2-2**-23)),he=e=>{const t=de(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>pe)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},fe=e=>me(e,16),ge=e=>me(e,8),me=(e,t)=>{const n=(e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}})(e);if(void 0!==n&&ye(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},ye=(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]}},Se=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Re=e=>{const t=e.match(Se);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},we=e=>fe("string"==typeof e?Re(e):e),ve=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),Ee={warn:console.warn},Ce=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],be=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Te(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),i=e.getUTCDate(),s=e.getUTCHours(),o=e.getUTCMinutes(),a=e.getUTCSeconds(),c=s<10?`0${s}`:`${s}`,u=o<10?`0${o}`:`${o}`,l=a<10?`0${a}`:`${a}`;return`${Ce[r]}, ${i<10?`0${i}`:`${i}`} ${be[n]} ${t} ${c}:${u}:${l} GMT`}const Pe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ae=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Pe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,r,i,s,o,a,c,u]=t,l=we(ze(r)),d=Ge(i,"month",1,12),p=Ge(s,"day",1,31);return Me(l,d,p,{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u})},Ie=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),xe=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Oe=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),De=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),$e=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=(e=>de("string"==typeof e?Re(e):e))(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))},Me=(e,t,n,r)=>{const i=t-1;return Ue(e,i,n),new Date(Date.UTC(e,i,n,Ge(r.hours,"hour",0,23),Ge(r.minutes,"minute",0,59),Ge(r.seconds,"seconds",0,60),Be(r.fractionalMilliseconds)))},Le=e=>{const t=(new Date).getUTCFullYear(),n=100*Math.floor(t/100)+we(ze(e));return n<t?n+100:n},ke=e=>e.getTime()-(new Date).getTime()>15768e8?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Ne=e=>{const t=be.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},_e=[31,28,31,30,31,30,31,31,30,31,30,31],Ue=(e,t,n)=>{let r=_e[t];if(1===t&&Fe(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${be[t]} in ${e}: ${n}`)},Fe=e=>e%4==0&&(e%100!=0||e%400==0),Ge=(e,t,n,r)=>{const i=(e=>ge("string"==typeof e?Re(e):e))(ze(e));if(i<n||i>r)throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);return i},Be=e=>null==e?0:1e3*(e=>he("string"==typeof e?Re(e):e))("0."+e),He=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},ze=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)},je="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),qe=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0"))),Ve=()=>{if(je)return je();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128,qe[e[0]]+qe[e[1]]+qe[e[2]]+qe[e[3]]+"-"+qe[e[4]]+qe[e[5]]+"-"+qe[e[6]]+qe[e[7]]+"-"+qe[e[8]]+qe[e[9]]+"-"+qe[e[10]]+qe[e[11]]+qe[e[12]]+qe[e[13]]+qe[e[14]]+qe[e[15]]},We=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};We.from=e=>e&&"object"==typeof e&&(e instanceof We||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?We(String(e)):We(JSON.stringify(e)),We.fromObject=We.from;const Ke="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Qe="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",Ze="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Ye="(\\d?\\d)",Je="(\\d{4})",Xe=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),et=new RegExp(`^${Ke}, ${Ye} ${Qe} ${Je} ${Ze} GMT$`),tt=new RegExp(`^${Ke}, ${Ye}-${Qe}-(\\d\\d) ${Ze} GMT$`),nt=new RegExp(`^${Ke} ${Qe} ( [1-9]|\\d\\d) ${Ze} ${Je}$`),rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function it(e,t,n){const r=Number(e);if(r<t||r>n)throw new Error(`Value ${r} out of range [${t}, ${n}]`)}function st(e,t,n){if(!Number.isInteger(n))throw new Error("Invalid number of delimiters ("+n+") for splitEvery.");const r=e.split(t),i=[];let s="";for(let e=0;e<r.length;e++)""===s?s=r[e]:s+=t+r[e],(e+1)%n==0&&(i.push(s),s="");return""!==s&&i.push(s),i}const ot=e=>{const t=e.length,n=[];let r,i=!1,s=0;for(let o=0;o<t;++o){const t=e[o];switch(t){case'"':"\\"!==r&&(i=!i);break;case",":i||(n.push(e.slice(s,o)),s=o+1)}r=t}return n.push(e.slice(s)),n.map((e=>{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))}))},at=/^-?\d*(\.\d+)?$/;class ct{string;type;constructor(e,t){if(this.string=e,this.type=t,!at.test(e))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||"object"!=typeof e)return!1;const t=e;return ct.prototype.isPrototypeOf(e)||"bigDecimal"===t.type&&at.test(t.string)}}class ut{serdeContext;setSerdeContext(e){this.serdeContext=e}}class lt extends ut{options;constructor(e){super(),this.options=e}getRequestType(){return o}getResponseType(){return a}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if("url"in t){e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,e.query||(e.query={});for(const[n,r]of t.url.searchParams.entries())e.query[n]=r;return e}return e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},e}setHostPrefix(e,t,n){if(this.serdeContext?.disableHostPrefix)return;const r=oe.of(t.input),i=ie(t.traits??{});if(i.endpoint){let t=i.endpoint?.[0];if("string"==typeof t){const i=[...r.structIterator()].filter((([,e])=>e.getMergedTraits().hostLabel));for(const[e]of i){const r=n[e];if("string"!=typeof r)throw new Error(`@smithy/core/schema - ${e} in input must be a string as hostLabel.`);t=t.replace(`{${e}}`,r)}e.hostname=t+e.hostname}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await Promise.resolve().then((function(){return V$}));return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,n,r,i){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class dt extends lt{async serializeRequest(e,t,n){const r={...t??{}},i=this.serializer,s={},a={},c=await n.endpoint(),u=oe.of(e?.input),l=u.getSchema();let d,p=!1;const h=new o({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:s,headers:a,body:void 0});if(c){this.updateServiceEndpoint(h,c),this.setHostPrefix(h,e,r);const t=ie(e.traits);if(t.http){h.method=t.http[0];const[e,n]=t.http[1].split("?");"/"==h.path?h.path=e:h.path+=e;const r=new URLSearchParams(n??"");Object.assign(s,Object.fromEntries(r))}}for(const[e,t]of u.structIterator()){const n=t.getMergedTraits()??{},o=r[e];if(null!=o||t.isIdempotencyToken())if(n.httpPayload){if(t.isStreaming()){t.isStructSchema()?r[e]&&(d=await this.serializeEventStream({eventStream:r[e],requestSchema:u})):d=o}else i.write(t,o),d=i.flush();delete r[e]}else if(n.httpLabel){i.write(t,o);const n=i.flush();h.path.includes(`{${e}+}`)?h.path=h.path.replace(`{${e}+}`,n.split("/").map(Y).join("/")):h.path.includes(`{${e}}`)&&(h.path=h.path.replace(`{${e}}`,Y(n))),delete r[e]}else if(n.httpHeader)i.write(t,o),a[n.httpHeader.toLowerCase()]=String(i.flush()),delete r[e];else if("string"==typeof n.httpPrefixHeaders){for(const[e,r]of Object.entries(o)){const s=n.httpPrefixHeaders+e;i.write([t.getValueSchema(),{httpHeader:s}],r),a[s.toLowerCase()]=i.flush()}delete r[e]}else n.httpQuery||n.httpQueryParams?(this.serializeQuery(t,o,s),delete r[e]):p=!0;else if(n.httpLabel&&(h.path.includes(`{${e}+}`)||h.path.includes(`{${e}}`)))throw new Error(`No value provided for input HTTP label: ${e}.`)}return p&&r&&(i.write(l,r),d=i.flush()),h.headers=a,h.query=s,h.body=d,h}serializeQuery(e,t,n){const r=this.serializer,i=e.getMergedTraits();if(i.httpQueryParams){for(const[r,s]of Object.entries(t))if(!(r in n)){const t=e.getValueSchema();Object.assign(t.getMergedTraits(),{...i,httpQuery:r,httpQueryParams:void 0}),this.serializeQuery(t,s,n)}}else if(e.isListSchema()){const s=!!e.getMergedTraits().sparse,o=[];for(const n of t){r.write([e.getValueSchema(),i],n);const t=r.flush();(s||void 0!==t)&&o.push(t)}n[i.httpQuery]=o}else r.write([e,i],t),n[i.httpQuery]=r.flush()}async deserializeResponse(e,t,n){const r=this.deserializer,i=oe.of(e.output),s={};if(n.statusCode>=300){const i=await Z(n.body,t);throw i.byteLength>0&&Object.assign(s,await r.read(15,i)),await this.handleError(e,t,n,s,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const e in n.headers){const t=n.headers[e];delete n.headers[e],n.headers[e.toLowerCase()]=t}const o=await this.deserializeHttpMessage(i,t,n,s);if(o.length){const e=await Z(n.body,t);if(e.byteLength>0){const t=await r.read(i,e);for(const e of o)s[e]=t[e]}}else o.discardResponseBody&&await Z(n.body,t);return s.$metadata=this.deserializeMetadata(n),s}async deserializeHttpMessage(e,t,n,r,i){let s;s=r instanceof Set?i:r;let o=!0;const a=this.deserializer,c=oe.of(e),u=[];for(const[e,r]of c.structIterator()){const i=r.getMemberTraits();if(i.httpPayload){o=!1;if(r.isStreaming()){const t=r.isStructSchema();s[e]=t?await this.deserializeEventStream({response:n,responseSchema:c}):K(n.body)}else if(n.body){const i=await Z(n.body,t);i.byteLength>0&&(s[e]=await a.read(r,i))}}else if(i.httpHeader){const t=String(i.httpHeader).toLowerCase(),o=n.headers[t];if(null!=o)if(r.isListSchema()){const n=r.getValueSchema();let i;n.getMergedTraits().httpHeader=t,i=n.isTimestampSchema()&&4===n.getSchema()?st(o,",",2):ot(o);const c=[];for(const e of i)c.push(await a.read(n,e.trim()));s[e]=c}else s[e]=await a.read(r,o)}else if(void 0!==i.httpPrefixHeaders){s[e]={};for(const[t,o]of Object.entries(n.headers))if(t.startsWith(i.httpPrefixHeaders)){const n=r.getValueSchema();n.getMergedTraits().httpHeader=t,s[e][t.slice(i.httpPrefixHeaders.length)]=await a.read(n,o)}}else i.httpResponseCode?s[e]=n.statusCode:u.push(e)}return u.discardResponseBody=o,u}}class pt extends lt{async serializeRequest(e,t,n){const r=this.serializer,i={},s={},a=await n.endpoint(),c=oe.of(e?.input),u=c.getSchema();let l;const d=new o({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:i,headers:s,body:void 0});a&&(this.updateServiceEndpoint(d,a),this.setHostPrefix(d,e,t));const p={...t};if(t){const e=c.getEventStreamMember();if(e){if(p[e]){const t={};for(const[n,i]of c.structIterator())n!==e&&p[n]&&(r.write(i,p[n]),t[n]=r.flush());l=await this.serializeEventStream({eventStream:p[e],requestSchema:c,initialRequest:t})}}else r.write(u,p),l=r.flush()}return d.headers=s,d.query=i,d.body=l,d.method="POST",d}async deserializeResponse(e,t,n){const r=this.deserializer,i=oe.of(e.output),s={};if(n.statusCode>=300){const i=await Z(n.body,t);throw i.byteLength>0&&Object.assign(s,await r.read(15,i)),await this.handleError(e,t,n,s,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const e in n.headers){const t=n.headers[e];delete n.headers[e],n.headers[e.toLowerCase()]=t}const o=i.getEventStreamMember();if(o)s[o]=await this.deserializeEventStream({response:n,responseSchema:i,initialResponseContainer:s});else{const e=await Z(n.body,t);e.byteLength>0&&Object.assign(s,await r.read(i,e))}return s.$metadata=this.deserializeMetadata(n),s}}function ht(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(5===e.getSchema()||6===e.getSchema()||7===e.getSchema()))return e.getSchema();const{httpLabel:n,httpPrefixHeaders:r,httpHeader:i,httpQuery:s}=e.getMergedTraits();return(t.httpBindings?"string"==typeof r||Boolean(i)?6:Boolean(s)||Boolean(n)?5:void 0:void 0)??t.timestampFormat.default}class ft extends ut{settings;constructor(e){super(),this.settings=e}read(e,t){const n=oe.of(e);if(n.isListSchema())return ot(t).map((e=>this.read(n.getValueSchema(),e)));if(n.isBlobSchema())return(this.serdeContext?.base64Decoder??O)(t);if(n.isTimestampSchema()){switch(ht(n,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC3339 timestamps must be strings");const t=Xe.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,n,r,i,s,o,a,,c,u]=t;it(r,1,12),it(i,1,31),it(s,0,23),it(o,0,59),it(a,0,60);const l=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(s),Number(o),Number(a),Number(c)?Math.round(1e3*parseFloat(`0.${c}`)):0));if(l.setUTCFullYear(Number(n)),"Z"!=u.toUpperCase()){const[,e,t,n]=/([+-])(\d\d):(\d\d)/.exec(u)||[void 0,"+",0,0],r="-"===e?1:-1;l.setTime(l.getTime()+r*(60*Number(t)*60*1e3+60*Number(n)*1e3))}return l})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC7231 timestamps must be strings.");let t,n,r,i,s,o,a,c;if((c=et.exec(e))?[,t,n,r,i,s,o,a]=c:(c=tt.exec(e))?([,t,n,r,i,s,o,a]=c,r=(Number(r)+1900).toString()):(c=nt.exec(e))&&([,n,t,i,s,o,a,r]=c),r&&o){const e=Date.UTC(Number(r),rt.indexOf(n),Number(t),Number(i),Number(s),Number(o),a?Math.round(1e3*parseFloat(`0.${a}`)):0);it(t,1,31),it(i,0,23),it(s,0,59),it(o,0,60);const c=new Date(e);return c.setUTCFullYear(Number(r)),c}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)})(t);case 7:return(e=>{if(null==e)return;let t=NaN;if("number"==typeof e)t=e;else if("string"==typeof e){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else"object"==typeof e&&1===e.tag&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(1e3*t))})(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}}if(n.isStringSchema()){const e=n.getMergedTraits().mediaType;let r=t;if(e){n.getMergedTraits().httpHeader&&(r=this.base64ToUtf8(r));return("application/json"===e||e.endsWith("+json"))&&(r=We.from(r)),r}}return n.isNumericSchema()?Number(t):n.isBigIntegerSchema()?BigInt(t):n.isBigDecimalSchema()?new ct(t,"bigDecimal"):n.isBooleanSchema()?"true"===String(t).toLowerCase():t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??M)((this.serdeContext?.base64Decoder??O)(e))}}class gt extends ut{codecDeserializer;stringDeserializer;constructor(e,t){super(),this.codecDeserializer=e,this.stringDeserializer=new ft(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){const n=oe.of(e),r=n.getMergedTraits(),i=this.serdeContext?.utf8Encoder??M;if(r.httpHeader||r.httpResponseCode)return this.stringDeserializer.read(n,i(t));if(r.httpPayload){if(n.isBlobSchema()){const e=this.serdeContext?.utf8Decoder??D;return"string"==typeof t?e(t):t}if(n.isStringSchema())return"byteLength"in t?i(t):t}return this.codecDeserializer.read(n,t)}}class mt extends ut{settings;stringBuffer="";constructor(e){super(),this.settings=e}write(e,t){const n=oe.of(e);switch(typeof t){case"object":if(null===t)return void(this.stringBuffer="null");if(n.isTimestampSchema()){if(!(t instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${n.getName(!0)}`);switch(ht(n,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=Te(t);break;case 7:this.stringBuffer=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",t),this.stringBuffer=String(t.getTime()/1e3)}return}if(n.isBlobSchema()&&"byteLength"in t)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??L)(t));if(n.isListSchema()&&Array.isArray(t)){let e="";for(const i of t){this.write([n.getValueSchema(),n.getMergedTraits()],i);const t=this.flush();""!==e&&(e+=", "),e+=n.getValueSchema().isTimestampSchema()?t:(((r=t).includes(",")||r.includes('"'))&&(r=`"${r.replace(/"/g,'\\"')}"`),r)}return void(this.stringBuffer=e)}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":const e=n.getMergedTraits().mediaType;let i=t;if(e){if(("application/json"===e||e.endsWith("+json"))&&(i=We.from(i)),n.getMergedTraits().httpHeader)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??L)(i.toString()))}this.stringBuffer=t;break;default:n.isIdempotencyToken()?this.stringBuffer=Ve():this.stringBuffer=String(t)}var r}flush(){const e=this.stringBuffer;return this.stringBuffer="",e}}class yt{codecSerializer;stringSerializer;buffer;constructor(e,t,n=new mt(t)){this.codecSerializer=e,this.stringSerializer=n}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){const n=oe.of(e),r=n.getMergedTraits();return r.httpHeader||r.httpLabel||r.httpQuery?(this.stringSerializer.write(n,t),void(this.buffer=this.stringSerializer.flush())):this.codecSerializer.write(n,t)}flush(){if(void 0!==this.buffer){const e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}}class St{authSchemes=new Map;constructor(e){for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class Rt{async sign(e,t,n){return e}}const wt=(vt=3e5,function(e){return Et(e)&&e.expiration.getTime()-Date.now()<vt});var vt;const Et=e=>void 0!==e.expiration;function Ct(e){const t=C(e.userAgentAppId??undefined),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,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 bt{capacity;data=new Map;parameters=[];constructor({size:e,params:t}){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:r}=e.next();if(this.data.delete(n),r||++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 r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}const Tt=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}$"),Pt=e=>Tt.test(e)||e.startsWith("[")&&e.endsWith("]"),At=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),It=(e,t=!1)=>{if(!t)return At.test(e);const n=e.split(".");for(const e of n)if(!It(e))return!1;return!0},xt={},Ot="endpoints";function Dt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${Dt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Dt).join(", ")})`:JSON.stringify(e,null,2)}class $t extends Error{constructor(e){super(e),this.name="EndpointError"}}const Mt=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new $t(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new $t(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce(((n,r)=>{if("object"!=typeof n)throw new $t(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]}),e),Lt={[r.HTTP]:80,[r.HTTPS]:443},kt={booleanEquals:(e,t)=>e===t,getAttr:Mt,isSet:e=>null!=e,isValidHostLabel:It,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:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map((([e,t])=>`${e}=${t}`)).join("&"),o}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:s,pathname:o,protocol:a,search:c}=t;if(c)return null;const u=a.slice(0,-1);if(!Object.values(r).includes(u))return null;const l=Pt(s);return{scheme:u,authority:`${i}${n.includes(`${i}:${Lt[u]}`)||"string"==typeof e&&e.includes(`${i}:${Lt[u]}`)?`:${Lt[u]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:l}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?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()}`))},Nt=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(Mt(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},_t=(e,t,n)=>{if("string"==typeof e)return Nt(e,n);if(e.fn)return Ft.callFunction(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new $t(`'${t}': ${String(e)} is not a string, function or reference.`)},Ut=({fn:e,argv:t},n)=>{const r=t.map((e=>["boolean","number"].includes(typeof e)?e:Ft.evaluateExpression(e,"arg",n))),i=e.split(".");return i[0]in xt&&null!=i[1]?xt[i[0]][i[1]](...r):kt[e](...r)},Ft={evaluateExpression:_t,callFunction:Ut},Gt=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new $t(`'${e}' is already defined in Reference Record.`);const r=Ut(t,n);return n.logger?.debug?.(`${Ot} evaluateCondition: ${Dt(t)} = ${Dt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Bt=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=Gt(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${Ot} assign: ${i.name} := ${Dt(i.value)}`))}return{result:!0,referenceRecord:n}},Ht=(e,t)=>Object.entries(e).reduce(((e,[n,r])=>({...e,[n]:r.map((e=>{const r=_t(e,"Header value entry",t);if("string"!=typeof r)throw new $t(`Header '${n}' value '${r}' is not a string`);return r}))})),{}),zt=(e,t)=>Object.entries(e).reduce(((e,[n,r])=>({...e,[n]:qt.getEndpointProperty(r,t)})),{}),jt=(e,t)=>{if(Array.isArray(e))return e.map((e=>jt(e,t)));switch(typeof e){case"string":return Nt(e,t);case"object":if(null===e)throw new $t(`Unexpected endpoint property: ${e}`);return qt.getEndpointProperties(e,t);case"boolean":return e;default:throw new $t("Unexpected endpoint property type: "+typeof e)}},qt={getEndpointProperty:jt,getEndpointProperties:zt},Vt=(e,t)=>{const n=_t(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 $t("Endpoint URL must be a string, got "+typeof n)},Wt=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Bt(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${Ot} Resolving endpoint from template: ${Dt(r)}`),{...null!=u&&{headers:Ht(u,o)},...null!=c&&{properties:zt(c,o)},url:Vt(a,o)}},Kt=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Bt(n,t);if(i)throw new $t(_t(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},Qt=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Wt(n,t);if(e)return e}else if("error"===n.type)Kt(n,t);else{if("tree"!==n.type)throw new $t(`Unknown endpoint rule: ${n}`);{const e=Zt.evaluateTreeRule(n,t);if(e)return e}}throw new $t("Rules evaluation failed")},Zt={evaluateRules:Qt,evaluateTreeRule:(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Bt(n,t);if(i)return Zt.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...s}})}},Yt=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${Ot} Initial EndpointParams: ${Dt(n)}`);const o=Object.entries(i).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==n[e])throw new $t(`Missing required parameter: '${e}'`);const c=Qt(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${Ot} Resolved endpoint: ${Dt(c)}`),c},Jt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Jt(t))return!1;return!0}return!!It(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let Xt={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-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const en={isVirtualHostableS3Bucket:Jt,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=Xt;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}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}}};xt.aws=en;const tn=e=>{if("string"==typeof e)return tn(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}};function nn(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function rn(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}const sn=e=>a.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,on=e=>new Date(Date.now()+e),an=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(on(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},cn=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class un{async sign(e,t,n){if(!o.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=cn("context",e.context),n=cn("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=cn("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:s,signingRegion:o,signingRegionSet:a,signingName:c}})(n),{config:i,signer:s}=r;let{signingRegion:a,signingName:c}=r;const u=n.context;if(u?.authSchemes?.length){const[e,t]=u.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(a=t?.signingRegion??a,c=t?.signingName??c)}return await s.sign(e,{signingDate:on(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return t=>{const n=t.ServerTime??sn(t.$response);if(n){const r=cn("config",e.config),i=r.systemClockOffset;r.systemClockOffset=an(n,r.systemClockOffset);r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=sn(e);if(n){const e=cn("config",t.config);e.systemClockOffset=an(n,e.systemClockOffset)}}}class ln extends Error{name="ProviderError";tryNextLink;constructor(e,t=!0){let n,r=!0;"boolean"==typeof t?(n=void 0,r=t):null!=t&&"object"==typeof t&&(n=t.logger,r=t.tryNextLink??!0),super(e),this.tryNextLink=r,Object.setPrototypeOf(this,ln.prototype),n?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${e}`)}static from(e,t=!0){return Object.assign(new this(e.message,t),e)}}class dn extends ln{name="CredentialsProviderError";constructor(e,t=!0){super(e,t),Object.setPrototypeOf(this,dn.prototype)}}const pn=(e,t,n)=>{let r,i,s,o=!1;return async t=>(s&&!t?.forceRefresh||(r=await(async()=>{i||(i=e());try{r=await i,s=!0,o=!1}finally{i=void 0}return r})()),r)},hn="X-Amz-Date",fn="X-Amz-Signature",gn="X-Amz-Security-Token",mn="authorization",yn=hn.toLowerCase(),Sn=[mn,yn,"date"],Rn=fn.toLowerCase(),wn="x-amz-content-sha256",vn=gn.toLowerCase(),En={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},Cn=/^proxy-/,bn=/^sec-/,Tn="AWS4-HMAC-SHA256",Pn="AWS4-HMAC-SHA256-PAYLOAD",An="aws4_request",In={},xn=[],On=(e,t,n)=>`${e}/${t}/${n}/${An}`,Dn=(e,t,n)=>{const r=new e(t);return r.update($(n)),r.digest()},$n=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const s=i.toLowerCase();(s in En||t?.has(s)||Cn.test(s)||bn.test(s))&&(!n||n&&!n.has(s))||(r[s]=e[i].trim().replace(/\s+/g," "))}return r},Mn=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===wn)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new n;return e.update($(t)),V(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ln{format(e){const t=[];for(const n of Object.keys(e)){const r=D(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=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 r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=D(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(_n.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Nn.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const l=new Uint8Array(17);return l[0]=9,l.set(function(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 r=e.slice(n,n+2).toLowerCase();if(!(r in q))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=q[r]}return t}(e.value.replace(/\-/g,"")),1),l}}}var kn;!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"}(kn||(kn={}));const Nn=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class _n{bytes;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,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Un(t),new _n(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Un(e),parseInt(V(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Un(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Fn=e=>{e=o.clone(e);for(const t of Object.keys(e.headers))Sn.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Gn=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Bn{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){this.service=r,this.sha256=i,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=g(n),this.credentialProvider=g(t)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===Rn)continue;const i=_(r);t.push(i);const s=e[r];"string"==typeof s?n[i]=`${i}=${_(s)}`:Array.isArray(s)&&(n[i]=s.slice(0).reduce(((e,t)=>e.concat([`${i}=${_(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>n[e])).filter((e=>e)).join("&")})(e)}\n${r.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;i.update($(n));return`${r}\n${e}\n${t}\n${V(await i.digest())}`}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 _(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(e=>Gn(e).toISOString().replace(/\.\d{3}Z$/,"Z"))(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Hn extends Bn{headerFormatter=new Ln;constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s=!0}){super({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:s})}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:a,hoistableHeaders:c,signingRegion:u,signingService:l}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const p=u??await this.regionProvider(),{longDate:h,shortDate:f}=this.formatDate(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const g=On(f,p,l??this.service),m=((e,t={})=>{const{headers:n,query:r={}}=o.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(Fn(e),{unhoistableHeaders:s,hoistableHeaders:c});d.sessionToken&&(m.query[gn]=d.sessionToken),m.query["X-Amz-Algorithm"]=Tn,m.query["X-Amz-Credential"]=`${d.accessKeyId}/${g}`,m.query[hn]=h,m.query["X-Amz-Expires"]=r.toString(10);const y=$n(m,i,a);return m.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(y),m.query[fn]=await this.getSignature(h,g,this.getSigningKey(d,p,f,l),this.createCanonicalRequest(m,y,await Mn(e,this.sha256))),m}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:r,signingRegion:i,signingService:s}){const o=i??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(n),u=On(a,o,s??this.service),l=await Mn({headers:{},body:t},this.sha256),d=new this.sha256;d.update(e);const p=V(await d.digest()),h=[Pn,c,u,r,p,l].join("\n");return this.signString(h,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update($(e)),V(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=Fn(e),{longDate:u,shortDate:l}=this.formatDate(t),d=On(l,a,s??this.service);c.headers[yn]=u,o.sessionToken&&(c.headers[vn]=o.sessionToken);const p=await Mn(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(wn,c.headers)&&this.applyChecksum&&(c.headers[wn]=p);const h=$n(c,r,n),f=await this.getSignature(u,d,this.getSigningKey(o,a,l,s),this.createCanonicalRequest(c,h,p));return c.headers[mn]=`${Tn} Credential=${o.accessKeyId}/${d}, SignedHeaders=${this.getCanonicalHeaderList(h)}, Signature=${f}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,Tn),s=new this.sha256(await n);return s.update($(i)),V(await s.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${V(await Dn(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in In)return In[s];for(xn.push(s);xn.length>50;)delete In[xn.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,An])o=await Dn(e,o,t);return In[s]=o})(this.sha256,e,n,t,r||this.service)}}const zn=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const s=function(e,{credentials:t,credentialDefaultProvider:n}){let r;r=t?t?.memoized?t:((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(t,wt,Et):n?C(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}(e,s);if(r&&!o.attributed){const e="object"==typeof n&&null!==n;t=async t=>{const n=await o(t);return!e||n.$source&&0!==Object.keys(n.$source).length?n:nn(n,"CREDENTIALS_CODE","e")},t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0}else t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;a=e.signer?C(e.signer):e.regionInfoProvider?()=>C(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([t,n])=>{const{signingRegion:r,signingService:s}=t;e.signingRegion=e.signingRegion||r||n,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Hn)(a)})):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await C(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||Hn)(s)};return Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};const jn="function"==typeof TextEncoder?new TextEncoder:null,qn=e=>{if("string"==typeof e){if(jn)return jn.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=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}`)},Vn=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},Wn=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Kn=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(a.identifyOnResolve()),n),s=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...s(e))})),t},o=(n=!1)=>{const r=[],i=[],o={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Vn(t.name,t.aliases))o[e]=t;r.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Vn(t.name,t.aliases))o[e]=t;i.push(t)})),i.forEach((e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${Wn(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=r,c.sort(((e,t)=>Qn[t.step]-Qn[e.step]||Zn[t.priority||"normal"]-Zn[e.priority||"normal"]))).map(s).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=Vn(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${Wn(i,o)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${Wn(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${Wn(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=Vn(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${Wn(i,o)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${Wn(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${Wn(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(Kn()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const s=e=>{const t=Vn(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n):(n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of Vn(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i})(n),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=Vn(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=i(Kn());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>o(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Wn(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of o().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},Qn={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Zn={high:3,normal:2,low:1};class Yn{config;middlewareStack=Kn();initConfig;handlers;constructor(e){this.config=e;const{protocol:t,protocolSettings:n}=e;n&&"function"==typeof t&&(e.protocol=new t(n))}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then((e=>e.output));s(e).then((e=>i(null,e.output)),(e=>i(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const Jn="***SensitiveInformation***";function Xn(e,t){if(null==t)return t;const n=oe.of(e);if(n.getMergedTraits().sensitive)return Jn;if(n.isListSchema()){if(!!n.getValueSchema().getMergedTraits().sensitive)return Jn}else if(n.isMapSchema()){if(!!n.getKeySchema().getMergedTraits().sensitive||!!n.getValueSchema().getMergedTraits().sensitive)return Jn}else if(n.isStructSchema()&&"object"==typeof t){const e=t,r={};for(const[t,i]of n.structIterator())null!=e[t]&&(r[t]=Xn(i,e[t]));return r}return t}class er{middlewareStack=Kn();schema;static classBuilder(){return new tr}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:l,CommandCtor:d}){for(const i of r.bind(this)(d,e,t,n))this.middlewareStack.use(i);const p=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[s]:{commandInstance:this,...u},...l},{requestHandler:g}=t;return p.resolve((e=>g.handle(e.request,n||{})),f)}}class tr{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;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}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends er{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,r,i){const s=e._operationSchema,o=s?.[4]??s?.input,a=s?.[5]??s?.output;return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(s?Xn.bind(null,o):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(s?Xn.bind(null,a):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}const nr=(e,t,n)=>{for(const[n,r]of Object.entries(e)){const e=async function(e,t,n){const i=new r(e);if("function"==typeof t)this.send(i,t);else{if("function"!=typeof n)return this.send(i,t);if("object"!=typeof t)throw new Error("Expected http options but got "+typeof t);this.send(i,t||{},n)}},i=(n[0].toLowerCase()+n.slice(1)).replace(/Command$/,"");t.prototype[i]=e}const{paginators:r={},waiters:i={}}=n??{};for(const[e,n]of Object.entries(r))void 0===t.prototype[e]&&(t.prototype[e]=function(e={},t,...r){return n({...t,client:this},e,...r)});for(const[e,n]of Object.entries(i))void 0===t.prototype[e]&&(t.prototype[e]=async function(e={},t,...r){let i=t;return"number"==typeof t&&(i={maxWaitTime:t}),n({...i,client:this},e,...r)})};class rr extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return rr.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===rr?rr.isInstance(e):!!rr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const ir=(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},sr=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{}}},or=e=>Object.assign((e=>{const t=[];for(const n in i){const r=i[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),ar=e=>Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t})(e),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(e)),cr=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]=cr(e[n]));return e};class ur{trace(){}debug(){}info(){}warn(){}error(){}}class lr{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){const n=t.getMemberSchemas(),r=Object.values(n).find((e=>!!e.getMergedTraits().httpPayload));if(r){const t=r.getMergedTraits().mediaType;return t||(r.isStringSchema()?"text/plain":r.isBlobSchema()?"application/octet-stream":e)}if(!t.isUnitSchema()){const t=Object.values(n).find((e=>{const{httpQuery:t,httpQueryParams:n,httpHeader:r,httpLabel:i,httpPrefixHeaders:s}=e.getMergedTraits();return!t&&!n&&!r&&!i&&void 0===s}));if(t)return e}}async getErrorSchemaOrThrowBaseException(e,t,n,r,i,s){let o=t,a=e;e.includes("#")&&([o,a]=e.split("#"));const c={$metadata:i,$fault:n.statusCode<500?"client":"server"},u=le.for(o);try{return{errorSchema:s?.(u,a)??u.getSchema(e),errorMetadata:c}}catch(e){r.message=r.message??r.Message??"UnknownError";const t=le.for("smithy.ts.sdk.synthetic."+o),n=t.getBaseException();if(n){const e=t.getErrorCtor(n)??Error;throw this.decorateServiceException(Object.assign(new e({name:a}),c),r)}throw this.decorateServiceException(Object.assign(new Error(a),c),r)}}decorateServiceException(e,t={}){if(this.queryCompat){const n=e.Message??t.Message,r=ir(e,t);n&&(r.message=n),r.Error={...r.Error,Type:r.Error.Type,Code:r.Error.Code,Message:r.Error.message??r.Error.Message??n};const i=r.$metadata.requestId;return i&&(r.RequestId=i),r}return ir(e,t)}setQueryCompatError(e,t){const n=t.headers?.["x-amzn-query-error"];if(void 0!==e&&null!=n){const[t,r]=n.split(";"),i=Object.entries(e),s={Code:t,Type:r};Object.assign(e,s);for(const[e,t]of i)s["message"===e?"Message":e]=t;delete s.__type,e.Error=s}}queryCompatOutput(e,t){e.Error&&(t.Error=e.Error),e.Type&&(t.Type=e.Type),e.Code&&(t.Code=e.Code)}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch(n){return e.find((e=>oe.of(e).getMergedTraits().awsQueryError?.[0]===t))}}}class dr{serdeContext;setSerdeContext(e){this.serdeContext=e}}class pr{from;to;keys;constructor(e,t){this.from=e,this.to=t,this.keys=new Set(Object.keys(this.from).filter((e=>"__type"!==e)))}mark(e){this.keys.delete(e)}hasUnknown(){return 1===this.keys.size&&0===Object.keys(this.to).length}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}function hr(e,t,n){if(n?.source){const e=n.source;if("number"==typeof t&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||e!==String(t))){return e.includes(".")?new ct(e,"bigDecimal"):BigInt(e)}}return t}const fr=(e,t)=>((e,t)=>Z(e,t).then((e=>(t?.utf8Encoder??M)(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{}})),gr=(e,t)=>{const n=(e,t)=>Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase())),r=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=n(e.headers,"x-amzn-errortype");if(void 0!==i)return r(e.headers[i]);if(t&&"object"==typeof t){const e=n(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}};class mr extends dr{settings;constructor(e){super(),this.settings=e}async read(e,t){return this._read(e,"string"==typeof t?JSON.parse(t,hr):await fr(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){const n=null!==t&&"object"==typeof t,r=oe.of(e);if(n){if(r.isStructSchema()){const e=t,n=r.isUnionSchema(),i={};let s;const{jsonName:o}=this.settings;let a;o&&(s={}),n&&(a=new pr(e,i));for(const[t,c]of r.structIterator()){let r=t;o&&(r=c.getMergedTraits().jsonName??r,s[r]=t),n&&a.mark(r),null!=e[r]&&(i[t]=this._read(c,e[r]))}if(n)a.writeUnknown();else if("string"==typeof e.__type)for(const[t,n]of Object.entries(e)){const e=o?s[t]??t:t;e in i||(i[e]=n)}return i}if(Array.isArray(t)&&r.isListSchema()){const e=r.getValueSchema(),n=[],i=!!r.getMergedTraits().sparse;for(const r of t)(i||null!=r)&&n.push(this._read(e,r));return n}if(r.isMapSchema()){const e=r.getValueSchema(),n={},i=!!r.getMergedTraits().sparse;for(const[r,s]of Object.entries(t))(i||null!=s)&&(n[r]=this._read(e,s));return n}}if(r.isBlobSchema()&&"string"==typeof t)return O(t);const i=r.getMergedTraits().mediaType;if(r.isStringSchema()&&"string"==typeof t&&i){return"application/json"===i||i.endsWith("+json")?We.from(t):t}if(r.isTimestampSchema()&&null!=t){switch(ht(r,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Ie.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,r,i,s,o,a,c,u,l]=t,d=we(ze(r)),p=Ge(i,"month",1,12),h=Ge(s,"day",1,31),f=Me(d,p,h,{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u});return"Z"!=l.toUpperCase()&&f.setTime(f.getTime()-He(l)),f})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=xe.exec(e);if(t){const[e,n,r,i,s,o,a,c]=t;return Me(we(ze(i)),Ne(r),Ge(n,"day",1,31),{hours:s,minutes:o,seconds:a,fractionalMilliseconds:c})}if(t=Oe.exec(e),t){const[e,n,r,i,s,o,a,c]=t;return ke(Me(Le(i),Ne(r),Ge(n,"day",1,31),{hours:s,minutes:o,seconds:a,fractionalMilliseconds:c}))}if(t=De.exec(e),t){const[e,n,r,i,s,o,a,c]=t;return Me(we(ze(c)),Ne(n),Ge(r.trimLeft(),"day",1,31),{hours:i,minutes:s,seconds:o,fractionalMilliseconds:a})}throw new TypeError("Invalid RFC-7231 date-time value")})(t);case 7:return $e(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}}if(r.isBigIntegerSchema()&&("number"==typeof t||"string"==typeof t))return BigInt(t);if(r.isBigDecimalSchema()&&null!=t){if(t instanceof ct)return t;const e=t;return"bigDecimal"===e.type&&"string"in e?new ct(e.string,e.type):new ct(String(t),"bigDecimal")}if(r.isNumericSchema()&&"string"==typeof t){switch(t){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return t}if(r.isDocumentSchema()){if(n){const e=Array.isArray(t)?[]:{};for(const[n,i]of Object.entries(t))e[n]=i instanceof ct?i:this._read(r,i);return e}return structuredClone(t)}return t}}const yr=String.fromCharCode(925);class Sr{values=new Map;counter=0;stage=0;createReplacer(){if(1===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(2===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,t)=>{if(t instanceof ct){const e=yr+"nv"+this.counter+++"_"+t.string;return this.values.set(`"${e}"`,t.string),e}if("bigint"==typeof t){const e=t.toString(),n=yr+"b"+this.counter+++"_"+e;return this.values.set(`"${n}"`,e),n}return t}}replaceInJson(e){if(0===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(2===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,0===this.counter)return e;for(const[t,n]of this.values)e=e.replace(t,n);return e}}class Rr extends dr{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,t){this.rootSchema=oe.of(e),this.buffer=this._write(this.rootSchema,t)}writeDiscriminatedDocument(e,t){this.write(e,t),"object"==typeof this.buffer&&(this.buffer.__type=oe.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:t}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!t)return JSON.stringify(this.buffer);const e=new Sr;return e.replaceInJson(JSON.stringify(this.buffer,e.createReplacer(),0))}return this.buffer}_write(e,t,n){const r=null!==t&&"object"==typeof t,i=oe.of(e);if(r){if(i.isStructSchema()){const e=t,n={},{jsonName:r}=this.settings;let s;r&&(s={});for(const[t,o]of i.structIterator()){const a=this._write(o,e[t],i);if(void 0!==a){let e=t;r&&(e=o.getMergedTraits().jsonName??t,s[t]=e),n[e]=a}}if(i.isUnionSchema()&&0===Object.keys(n).length){const{$unknown:t}=e;if(Array.isArray(t)){const[e,r]=t;n[e]=this._write(15,r)}}else if("string"==typeof e.__type)for(const[t,i]of Object.entries(e)){const e=r?s[t]??t:t;e in n||(n[e]=this._write(15,i))}return n}if(Array.isArray(t)&&i.isListSchema()){const e=i.getValueSchema(),n=[],r=!!i.getMergedTraits().sparse;for(const i of t)(r||null!=i)&&n.push(this._write(e,i));return n}if(i.isMapSchema()){const e=i.getValueSchema(),n={},r=!!i.getMergedTraits().sparse;for(const[i,s]of Object.entries(t))(r||null!=s)&&(n[i]=this._write(e,s));return n}if(t instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?t:(this.serdeContext?.base64Encoder??L)(t);if(t instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema())){switch(ht(i,this.settings)){case 5:return t.toISOString().replace(".000Z","Z");case 6:return Te(t);case 7:return t.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",t),t.getTime()/1e3}}t instanceof ct&&(this.useReplacer=!0)}if(null!==t||!n?.isStructSchema()){if(i.isStringSchema()){if(void 0===t&&i.isIdempotencyToken())return Ve();const e=i.getMergedTraits().mediaType;if(null!=t&&e){if("application/json"===e||e.endsWith("+json"))return We.from(t)}return t}if("number"==typeof t&&i.isNumericSchema())return Math.abs(t)===1/0||isNaN(t)?String(t):t;if("string"==typeof t&&i.isBlobSchema())return i===this.rootSchema?t:(this.serdeContext?.base64Encoder??L)(t);if("bigint"==typeof t&&(this.useReplacer=!0),i.isDocumentSchema()){if(r){const e=Array.isArray(t)?[]:{};for(const[n,r]of Object.entries(t))r instanceof ct?(this.useReplacer=!0,e[n]=r):e[n]=this._write(i,r);return e}return structuredClone(t)}return t}}}class wr extends dr{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Rr(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new mr(this.settings);return e.setSerdeContext(this.serdeContext),e}}class vr extends pt{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e}),this.serviceTarget=t,this.codec=r??new wr({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!n,this.mixin=new lr(this.awsQueryCompatible)}async serializeRequest(e,t,n){const r=await super.serializeRequest(e,t,n);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),"unit"!==J(e.input)&&r.body||(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(e,t,n,r,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,n);const s=gr(n,r)??"Unknown",{errorSchema:o,errorMetadata:a}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,r,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=oe.of(o),u=r.message??r.Message??"Unknown",l=new(le.for(o[1]).getErrorCtor(o)??Error)(u),d={};for(const[e,t]of c.structIterator())null!=r[e]&&(d[e]=this.codec.createDeserializer().readObject(t,r[e]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,d),this.mixin.decorateServiceException(Object.assign(l,a,{$fault:c.getMergedTraits().error,message:u},d),r)}}class Er extends vr{constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:r}){super({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:n,jsonCodec:r})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}class Cr extends dt{serializer;deserializer;codec;mixin=new lr;constructor({defaultNamespace:e}){super({defaultNamespace:e});const t={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new wr(t),this.serializer=new yt(this.codec.createSerializer(),t),this.deserializer=new gt(this.codec.createDeserializer(),t)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e),super.setSerdeContext(e)}async serializeRequest(e,t,n){const r=await super.serializeRequest(e,t,n),i=oe.of(e.input);if(!r.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),i);e&&(r.headers["content-type"]=e)}return null==r.body&&r.headers["content-type"]===this.getDefaultContentType()&&(r.body="{}"),r}async deserializeResponse(e,t,n){const r=await super.deserializeResponse(e,t,n),i=oe.of(e.output);for(const[e,t]of i.structIterator())t.getMemberTraits().httpPayload&&!(e in r)&&(r[e]=null);return r}async handleError(e,t,n,r,i){const s=gr(n,r)??"Unknown",{errorSchema:o,errorMetadata:a}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,r,i),c=oe.of(o),u=r.message??r.Message??"Unknown",l=new(le.for(o[1]).getErrorCtor(o)??Error)(u);await this.deserializeHttpMessage(o,t,n,r);const d={};for(const[e,t]of c.structIterator()){const n=t.getMergedTraits().jsonName??e;d[e]=this.codec.createDeserializer().readObject(t,r[n])}throw this.mixin.decorateServiceException(Object.assign(l,a,{$fault:c.getMergedTraits().error,message:u},d),r)}getDefaultContentType(){return"application/json"}}let br;class Tr extends dr{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new ft(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,n){const r=oe.of(e),i=r.getMemberSchemas();if(r.isStructSchema()&&r.isMemberSchema()&&!!Object.values(i).find((e=>!!e.getMemberTraits().eventPayload))){const e={},n=Object.keys(i)[0];return i[n].isBlobSchema()?e[n]=t:e[n]=this.read(i[n],t),e}const s=(this.serdeContext?.utf8Encoder??M)(t),o=this.parseXml(s);return this.readSchema(e,n?o[n]:o)}readSchema(e,t){const n=oe.of(e);if(n.isUnitSchema())return;const r=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(t))return this.readSchema(n,[t]);if(null==t)return t;if("object"==typeof t){const e=!!r.sparse,i=!!r.xmlFlattened;if(n.isListSchema()){const r=n.getValueSchema(),s=[],o=r.getMergedTraits().xmlName??"member",a=i?t:(t[0]??t)[o],c=Array.isArray(a)?a:[a];for(const t of c)(null!=t||e)&&s.push(this.readSchema(r,t));return s}const s={};if(n.isMapSchema()){const r=n.getKeySchema(),o=n.getValueSchema();let a;a=i?Array.isArray(t)?t:[t]:Array.isArray(t.entry)?t.entry:[t.entry];const c=r.getMergedTraits().xmlName??"key",u=o.getMergedTraits().xmlName??"value";for(const t of a){const n=t[c],r=t[u];(null!=r||e)&&(s[n]=this.readSchema(o,r))}return s}if(n.isStructSchema()){const e=n.isUnionSchema();let r;e&&(r=new pr(t,s));for(const[i,o]of n.structIterator()){const n=o.getMergedTraits(),a=n.httpPayload?n.xmlName??o.getName():o.getMemberTraits().xmlName??i;e&&r.mark(a),null!=t[a]&&(s[i]=this.readSchema(o,t[a]))}return e&&r.writeUnknown(),s}if(n.isDocumentSchema())return t;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(!0)}`)}return n.isListSchema()?[]:n.isMapSchema()||n.isStructSchema()?{}:this.stringDeserializer.read(n,t)}parseXml(e){if(e.length){let t;try{t=function(e){br||(br=new DOMParser);const t=br.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const n=e=>{if(e.nodeType===Node.TEXT_NODE&&e.textContent?.trim())return e.textContent;if(e.nodeType===Node.ELEMENT_NODE){const t=e;if(0===t.attributes.length&&0===t.childNodes.length)return"";const r={},i=Array.from(t.attributes);for(const e of i)r[`${e.name}`]=e.value;const s=Array.from(t.childNodes);for(const e of s){const o=n(e);if(null!=o){const t=e.nodeName;if(1===s.length&&0===i.length&&"#text"===t)return o;r[t]?Array.isArray(r[t])?r[t].push(o):r[t]=[r[t],o]:r[t]=o}else if(1===s.length&&0===i.length)return t.textContent}return r}return null};return{[t.documentElement.nodeName]:n(t.documentElement)}}(e)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const n="#text",r=Object.keys(t)[0],i=t[r];return i[n]&&(i[r]=i[n],delete i[n]),cr(i)}return{}}}class Pr extends dr{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,n=""){void 0===this.buffer&&(this.buffer="");const r=oe.of(e);if(n&&!n.endsWith(".")&&(n+="."),r.isBlobSchema())("string"==typeof t||t instanceof Uint8Array)&&(this.writeKey(n),this.writeValue((this.serdeContext?.base64Encoder??L)(t)));else if(r.isBooleanSchema()||r.isNumericSchema()||r.isStringSchema())null!=t?(this.writeKey(n),this.writeValue(String(t))):r.isIdempotencyToken()&&(this.writeKey(n),this.writeValue(Ve()));else if(r.isBigIntegerSchema())null!=t&&(this.writeKey(n),this.writeValue(String(t)));else if(r.isBigDecimalSchema())null!=t&&(this.writeKey(n),this.writeValue(t instanceof ct?t.string:String(t)));else if(r.isTimestampSchema()){if(t instanceof Date){this.writeKey(n);switch(ht(r,this.settings)){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(Te(t));break;case 7:this.writeValue(String(t.getTime()/1e3))}}}else if(r.isDocumentSchema())Array.isArray(t)?this.write(79,t,n):t instanceof Date?this.write(4,t,n):t instanceof Uint8Array?this.write(21,t,n):t&&"object"==typeof t?this.write(143,t,n):(this.writeKey(n),this.writeValue(String(t)));else if(r.isListSchema()){if(Array.isArray(t))if(0===t.length)this.settings.serializeEmptyLists&&(this.writeKey(n),this.writeValue(""));else{const e=r.getValueSchema(),i=this.settings.flattenLists||r.getMergedTraits().xmlFlattened;let s=1;for(const r of t){if(null==r)continue;const t=this.getKey("member",e.getMergedTraits().xmlName),o=i?`${n}${s}`:`${n}${t}.${s}`;this.write(e,r,o),++s}}}else if(r.isMapSchema()){if(t&&"object"==typeof t){const e=r.getKeySchema(),i=r.getValueSchema(),s=r.getMergedTraits().xmlFlattened;let o=1;for(const[r,a]of Object.entries(t)){if(null==a)continue;const t=this.getKey("key",e.getMergedTraits().xmlName),c=s?`${n}${o}.${t}`:`${n}entry.${o}.${t}`,u=this.getKey("value",i.getMergedTraits().xmlName),l=s?`${n}${o}.${u}`:`${n}entry.${o}.${u}`;this.write(e,r,c),this.write(i,a,l),++o}}}else if(r.isStructSchema()){if(t&&"object"==typeof t){let e=!1;for(const[i,s]of r.structIterator()){if(null==t[i]&&!s.isIdempotencyToken())continue;const r=`${n}${this.getKey(i,s.getMergedTraits().xmlName)}`;this.write(s,t[i],r),e=!0}if(!e&&r.isUnionSchema()){const{$unknown:e}=t;if(Array.isArray(e)){const[t,r]=e,i=`${n}${t}`;this.write(15,r,i)}}}}else if(!r.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${r.getName(!0)}`)}flush(){if(void 0===this.buffer)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const e=this.buffer;return delete this.buffer,e}getKey(e,t){const n=t??e;return this.settings.capitalizeKeys?n[0].toUpperCase()+n.slice(1):n}writeKey(e){e.endsWith(".")&&(e=e.slice(0,e.length-1)),this.buffer+=`&${Y(e)}=`}writeValue(e){this.buffer+=Y(e)}}class Ar extends pt{options;serializer;deserializer;mixin=new lr;constructor(e){super({defaultNamespace:e.defaultNamespace}),this.options=e;const t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new Pr(t),this.deserializer=new Tr(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,n){const r=await super.serializeRequest(e,t,n);r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":"application/x-www-form-urlencoded"}),"unit"!==J(e.input)&&r.body||(r.body="");const i=e.name.split("#")[1]??e.name;return r.body=`Action=${i}&Version=${this.options.version}`+r.body,r.body.endsWith("&")&&(r.body=r.body.slice(-1)),r}async deserializeResponse(e,t,n){const r=this.deserializer,i=oe.of(e.output),s={};if(n.statusCode>=300){const i=await Z(n.body,t);i.byteLength>0&&Object.assign(s,await r.read(15,i)),await this.handleError(e,t,n,s,this.deserializeMetadata(n))}for(const e in n.headers){const t=n.headers[e];delete n.headers[e],n.headers[e.toLowerCase()]=t}const o=e.name.split("#")[1]??e.name,a=i.isStructSchema()&&this.useNestedResult()?o+"Result":void 0,c=await Z(n.body,t);c.byteLength>0&&Object.assign(s,await r.read(i,c,a));return{$metadata:this.deserializeMetadata(n),...s}}useNestedResult(){return!0}async handleError(e,t,n,r,i){const s=this.loadQueryErrorCode(n,r)??"Unknown",o=this.loadQueryError(r),a=this.loadQueryErrorMessage(r);o.message=a,o.Error={Type:o.Type,Code:o.Code,Message:a};const{errorSchema:c,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,o,i,this.mixin.findQueryCompatibleError),l=oe.of(c),d=new(le.for(c[1]).getErrorCtor(c)??Error)(a),p={Type:o.Error.Type,Code:o.Error.Code,Error:o.Error};for(const[e,t]of l.structIterator()){const n=t.getMergedTraits().xmlName??e,i=o[n]??r[n];p[e]=this.deserializer.readSchema(t,i)}throw this.mixin.decorateServiceException(Object.assign(d,u,{$fault:l.getMergedTraits().error,message:a},p),r)}loadQueryErrorCode(e,t){const n=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;return void 0!==n?n:404==e.statusCode?"NotFound":void 0}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Ir=/\d{12}\.ddb/;const xr="user-agent",Or="x-amz-user-agent",Dr=/[^!$%&'*+\-.^_`|~\w]/g,$r=/[^!$%&'*+\-.^_`|~\w#]/g;const Mr=e=>(t,n)=>async r=>{const{request:i}=r;if(!o.isInstance(i))return t(r);const{headers:s}=i,a=n?.userAgent?.map(Lr)||[],c=(await e.defaultUserAgentProvider()).map(Lr);await async function(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&rn(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?rn(e,"RETRY_MODE_ADAPTIVE","F"):rn(e,"RETRY_MODE_STANDARD","E"):rn(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Ir)&&rn(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":rn(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":rn(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":rn(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&rn(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))rn(e,n,r)}}(n,e,r);const u=n;c.push(`m/${function(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},n.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(Lr)||[],d=await e.userAgentAppId();d&&c.push(Lr(["app",`${d}`]));const p=[].concat([...c,...a,...l]).join(" "),h=[...c.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(h&&(s[Or]=s[Or]?`${s[xr]} ${h}`:h),s[xr]=p):s[Or]=p,t({...r,request:i})},Lr=e=>{const t=e[0].split("/").map((e=>e.replace(Dr,"-"))).join("/"),n=e[1]?.replace($r,"-"),r=t.indexOf("/"),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,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}`}}),"")},kr={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Nr=e=>({applyToStack:t=>{t.add(Mr(e),kr)}}),_r=!1,Ur=!1,Fr=new Set,Gr=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Br=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const e=(e=>Gr(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e)("function"==typeof t?await t():t);return((e,t=It)=>{if(Fr.has(e)||t(e))Fr.add(e);else{if("*"!==e)throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.')}})(e),e},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Gr(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})},Hr="content-length";const zr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},jr=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(o.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Hr))try{const t=n(e);r.headers={...r.headers,[Hr]:String(t)}}catch(e){}}return e({...t,request:r})}),zr)}}),qr=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Vr=/(\d+\.){3}\d+/,Wr=/\.\./,Kr=e=>qr.test(e)&&!Vr.test(e)&&!Wr.test(e),Qr=e=>{const[t,n,r,,,i]=e.split(":"),s="arn"===t&&e.split(":").length>=6,o=Boolean(s&&n&&r&&i);if(s&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},Zr=(e,t,n,r=!1)=>{const i=async()=>{let i;if(r){const r=n.clientContextParams,s=r?.[e];i=s??n[e]??n[t]}else 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()=>{if(!1===n.isCustomEndpoint)return;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:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:i},Yr=async e=>{},Jr=e=>"object"==typeof e?"url"in e?tn(e.url):e:tn(e),Xr=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(i))switch(s.type){case"staticContextParams":r[t]=s.value;break;case"contextParams":r[t]=e[s.name];break;case"clientContextParams":case"builtInParams":r[t]=await Zr(s.name,t,n,"builtInParams"!==s.type)();break;case"operationContextParams":r[t]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(i).length&&Object.assign(r,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("?"))),Qr(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Kr(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})(r),r},ei=({config:e,instructions:t})=>(n,r)=>async i=>{e.isCustomEndpoint&&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}(r,"ENDPOINT_OVERRIDE","N");const s=await(async(e,t,n,r)=>{if(!n.isCustomEndpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await Yr(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(Jr(e)),n.isCustomEndpoint=!0)}const i=await Xr(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=f(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return n({...i})},ti={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},ni=(e,t)=>({applyToStack:n=>{n.addRelativeTo(ei({config:e,instructions:t}),ti)}}),ri=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>Jr(await g(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:g(r??!1),useFipsEndpoint:g(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=Yr(e.serviceId)),c),a};var ii;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(ii||(ii={}));const si=ii.STANDARD,oi=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],ai=["TimeoutError","RequestTimeout","RequestTimeoutException"],ci=[500,502,503,504],ui=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],li=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],di=e=>429===e.$metadata?.httpStatusCode||oi.includes(e.name)||1==e.$retryable?.throttling,pi=(e,t=0)=>(e=>void 0!==e?.$retryable)(e)||(e=>e.$metadata?.clockSkewCorrected)(e)||ai.includes(e.name)||ui.includes(e?.code||"")||li.includes(e?.code||"")||ci.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&pi(e.cause,t+1);class hi{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>hi.setTimeoutFn(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(),di(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 fi=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class gi{maxAttempts;mode=ii.STANDARD;capacity=500;retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})();maxAttemptsProvider;constructor(e){this.maxAttempts=e,this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return fi({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 r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,fi({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}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 mi{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=ii.ADAPTIVE;constructor(e,t){this.maxAttemptsProvider=e;const{rateLimiter:n}=t??{};this.rateLimiter=n??new hi,this.standardRetryStrategy=new gi(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)}}const yi=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=g(r??3);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>{if(t)return t;return await g(n)()===ii.ADAPTIVE?new mi(i):new gi(i)}})},Si=e=>e?.body instanceof ReadableStream,Ri=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,wi=e=>{const t={error:e,errorType:vi(e)},n=bi(e.$response);return n&&(t.retryAfterHint=n),t},vi=e=>di(e)?"THROTTLING":pi(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!pi(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Ei={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Ci=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!Ri(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),c=new Error,u=0,l=0;const{request:d}=r,p=o.isInstance(d);for(p&&(d.headers["amz-sdk-invocation-id"]=Ve());;)try{p&&(d.headers["amz-sdk-request"]=`attempt=${u+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=u+1,o.$metadata.totalRetryDelay=l,{response:n,output:o}}catch(t){const r=wi(t);if(c=(a=t)instanceof Error?a:a instanceof Object?Object.assign(new Error,a):"string"==typeof a?new Error(a):new Error(`AWS SDK error wrapper for ${a}`),p&&Si(d))throw(n.logger instanceof ur?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),c;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=u+1,c.$metadata.totalRetryDelay=l,c}u=e.getRetryCount();const s=e.getRetryDelay();l+=s,await new Promise((e=>setTimeout(e,s)))}}var a})(e),Ei)}}),bi=e=>{if(!a.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],r=Number(n);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(n)},Ti=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Pi=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Ai={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Ii="3.986.0";var xi="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function Oi(e){return e instanceof Uint8Array?e:"string"==typeof e?xi(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Di(e){return"string"==typeof e?0===e.length:0===e.byteLength}var $i={name:"SHA-256"},Mi={name:"HMAC",hash:$i},Li=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 ki={};function Ni(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:ki}var _i=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Di(e)){var t=Oi(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 Ni().crypto.subtle.sign(Mi,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Di(this.toHash)?Promise.resolve(Li):Promise.resolve().then((function(){return Ni().crypto.subtle.digest($i,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){Ni().crypto.subtle.importKey("raw",Oi(e.secret),Mi,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}();function Ui(e,t,n,r){return new(n||(n=Promise))((function(i,s){function o(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}function Fi(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=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 Gi=64,Bi=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]),Hi=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],zi=Math.pow(2,53)-1,ji=function(){function e(){this.state=Int32Array.from(Hi),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>zi)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===Gi&&(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%Gi>=56){for(var r=this.bufferLength;r<Gi;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(32);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,n=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],l=0;l<Gi;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(p+this.temp[l-7]|0)+(h+this.temp[l-16]|0)}var f=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&c)|0)+(u+(Bi[l]+this.temp[l]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&r^n&i^r&i)|0;u=c,c=a,a=o,o=s+f|0,s=i,i=r,r=n,n=f+g|0}t[0]+=n,t[1]+=r,t[2]+=i,t[3]+=s,t[4]+=o,t[5]+=a,t[6]+=c,t[7]+=u},e}(),qi=function(){function e(e){this.secret=e,this.hash=new ji,this.reset()}return e.prototype.update=function(e){if(!Di(e)&&!this.error)try{this.hash.update(Oi(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 Ui(this,void 0,void 0,(function(){return Fi(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new ji,this.secret){this.outer=new ji;var e=function(e){var t=Oi(e);if(t.byteLength>Gi){var n=new ji;n.update(t),t=n.digest()}var r=new Uint8Array(Gi);return r.set(t),r}(this.secret),t=new Uint8Array(Gi);t.set(e);for(var n=0;n<Gi;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 Vi=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Wi(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&&Vi.every((function(t){return"function"==typeof e[t]}))}(e.crypto.subtle)}var Ki=function(){function e(e){Wi(Ni())?this.hash=new _i(e):this.hash=new qi(e)}return e.prototype.update=function(e,t){this.hash.update(Oi(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();const Qi=({serviceId:e,clientVersion:t})=>async n=>{const r="undefined"!=typeof window?window.navigator:void 0,i=r?.userAgent??"",s=r?.userAgentData?.platform??Zi.os(i)??"other",o=r?.userAgentData?.brands??[],a=o[o.length-1],c=a?.brand??Zi.browser(i)??"unknown",u=[["aws-sdk-js",t],["ua","2.1"],[`os/${s}`,undefined],["lang/js"],["md/browser",`${c}_${a?.version??"unknown"}`]];e&&u.push([`api/${e}`,t]);const l=await(n?.userAgentAppId?.());return l&&u.push([`app/${l}`]),u},Zi={os:e=>/iPhone|iPad|iPod/.test(e)?"iOS":/Macintosh|Mac OS X/.test(e)?"macOS":/Windows NT/.test(e)?"Windows":/Android/.test(e)?"Android":/Linux/.test(e)?"Linux":void 0,browser:e=>/EdgiOS|EdgA|Edg\//.test(e)?"Microsoft Edge":/Firefox\//.test(e)?"Firefox":/Chrome\//.test(e)?"Chrome":/Safari\//.test(e)?"Safari":void 0},Yi=e=>()=>Promise.reject(e),Ji=["in-region","cross-region","mobile","standard","legacy"],Xi=({defaultsMode:e}={})=>pn((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(es()?"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 ${Ji.join(", ")}, got ${t}`)}})),es=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:n,downlink:r}=e?.connection;if("string"==typeof t&&"4g"!==t||Number(n)>100||Number(r)<10)return!0}return e?.userAgentData?.mobile||"number"==typeof e?.maxTouchPoints&&e?.maxTouchPoints>1},ts=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!ts(t))return!1;return!0}return!!It(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let ns={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-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const rs={isVirtualHostableS3Bucket:ts,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=ns;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}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}}};xt.aws=rs;const is="required",ss="fn",os="argv",as="ref",cs=!0,us="isSet",ls="booleanEquals",ds="error",ps="endpoint",hs="tree",fs="PartitionResult",gs={[is]:!1,type:"string"},ms={[is]:!0,default:!1,type:"boolean"},ys={[as]:"Endpoint"},Ss={[ss]:ls,[os]:[{[as]:"UseFIPS"},!0]},Rs={[ss]:ls,[os]:[{[as]:"UseDualStack"},!0]},ws={},vs={[ss]:"getAttr",[os]:[{[as]:fs},"supportsFIPS"]},Es={[ss]:ls,[os]:[!0,{[ss]:"getAttr",[os]:[{[as]:fs},"supportsDualStack"]}]},Cs=[Ss],bs=[Rs],Ts=[{[as]:"Region"}],Ps={parameters:{Region:gs,UseDualStack:ms,UseFIPS:ms,Endpoint:gs},rules:[{conditions:[{[ss]:us,[os]:[ys]}],rules:[{conditions:Cs,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:ds},{conditions:bs,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:ds},{endpoint:{url:ys,properties:ws,headers:ws},type:ps}],type:hs},{conditions:[{[ss]:us,[os]:Ts}],rules:[{conditions:[{[ss]:"aws.partition",[os]:Ts,assign:fs}],rules:[{conditions:[Ss,Rs],rules:[{conditions:[{[ss]:ls,[os]:[cs,vs]},Es],rules:[{endpoint:{url:"https://geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ws,headers:ws},type:ps}],type:hs},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:ds}],type:hs},{conditions:Cs,rules:[{conditions:[{[ss]:ls,[os]:[vs,cs]}],rules:[{endpoint:{url:"https://geo-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ws,headers:ws},type:ps}],type:hs},{error:"FIPS is enabled but this partition does not support FIPS",type:ds}],type:hs},{conditions:bs,rules:[{conditions:[Es],rules:[{endpoint:{url:"https://geo.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ws,headers:ws},type:ps}],type:hs},{error:"DualStack is enabled but this partition does not support DualStack",type:ds}],type:hs},{endpoint:{url:"https://geo.{Region}.{PartitionResult#dnsSuffix}",properties:ws,headers:ws},type:ps}],type:hs}],type:hs},{error:"Invalid Configuration: Missing Region",type:ds}]},As=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Is=(e,t={})=>As.get(e,(()=>Yt(Ps,{endpointParams:e,logger:t.logger})));xt.aws=rs;const xs=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Is,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Pi,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un}],logger:e?.logger??new ur,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.location",version:"2020-11-19",serviceTarget:"LocationService"},serviceId:e?.serviceId??"Location",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:Ii}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}},Os=e=>({setRegion(t){e.region=t},region:()=>e.region}),Ds=e=>({region:e.region()});class $s extends Yn{config;constructor(...[e]){const r=xs(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"geo"}))),o=yi(s),a=Br(o),c=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=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){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=zn(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(ri(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:Ti,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}}class Ms extends rr{constructor(e){super(e),Object.setPrototypeOf(this,Ms.prototype)}}let Ls=class e extends Ms{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class ks extends Ms{name="ConflictException";$fault="client";Message;constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,ks.prototype),this.Message=e.Message}}let Ns=class e extends Ms{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class _s extends Ms{name="ServiceQuotaExceededException";$fault="client";Message;constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,_s.prototype),this.Message=e.Message}}let Us=class e extends Ms{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Fs=class e extends Ms{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}},Gs=class e extends Ms{name="ResourceNotFoundException";$fault="client";Message;constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};const Bs="Accuracy",Hs="AvoidFerries",zs="AvoidTolls",js="Blob",qs="BiasPosition",Vs="Code",Ws="ConsumerArn",Ks="CalculatorArn",Qs="CollectionArn",Zs="Cache-Control",Ys="CacheControl",Js="CellId",Xs="CustomLayers",eo="CarModeOptions",to="CollectionName",no="CalculatorName",ro="CellSignals",io="CreateTime",so="Content-Type",oo="ContentType",ao="Categories",co="Circle",uo="Configuration",lo="Distance",po="DeviceId",ho="DeviceIds",fo="DepartNow",go="DevicePositions",mo="DataSource",yo="DataSourceConfiguration",So="DeviceState",Ro="DurationSeconds",wo="DepartureTime",vo="DistanceUnit",Eo="Description",Co="Error",bo="EventBridgeEnabled",To="EndPosition",Po="ExpireTime",Ao="Earfcn",Io="Entries",xo="Errors",Oo="FilterBBox",Do="FilterCountries",$o="FilterCategories",Mo="Geometry",Lo="GeofenceId",ko="GeofenceProperties",No="IndexArn",_o="IndexName",Uo="InferredState",Fo="Key",Go="KeyArn",Bo="KmsKeyEnableGeospatialQueries",Ho="KmsKeyId",zo="KeyName",jo="LteCellDetails",qo="LineString",Vo="Language",Wo="Message",Ko="MapArn",Qo="MapName",Zo="MaxResults",Yo="NoExpiry",Jo="NextToken",Xo="Name",ea="PositionFiltering",ta="PlaceId",na="PricingPlan",ra="PricingPlanDataSource",ia="PositionProperties",sa="PoliticalView",oa="Place",aa="Position",ca="Polygon",ua="ResourceArn",la="RouteMatrix",da="ReceivedTime",pa="Restrictions",ha="Results",fa="Rsrp",ga="Rsrq",ma="SupplementalCategories",ya="StartPosition",Sa="SampleTime",Ra="SpeedUnit",wa="Status",va="Summary",Ea="TrackerArn",Ca="TravelMode",ba="TruckModeOptions",Ta="TrackerName",Pa="TimeZone",Aa="Tags",Ia="Text",xa="UpdateTime",Oa="Unit",Da="client",$a="error",Ma="endpoint",La="http",ka="httpError",Na="httpHeader",_a="httpQuery",Ua="jsonName",Fa="key",Ga="message",Ba="smithy.ts.sdk.synthetic.com.amazonaws.location",Ha="com.amazonaws.location";var za=[0,Ha,"ApiKey",8,0],ja=[0,Ha,"Base64EncodedGeobuf",8,21],qa=[0,Ha,"CountryCode3",8,0],Va=[0,Ha,"CountryCode3OrEmpty",8,0],Wa=[0,Ha,"PlaceCategory",8,0],Ka=[0,Ha,ta,8,0],Qa=[0,Ha,"PlaceSupplementalCategory",8,0],Za=[0,Ha,"RefererPattern",8,0],Ya=[0,Ha,"SensitiveBoolean",8,2],Ja=[0,Ha,"SensitiveDouble",8,1],Xa=[0,Ha,"SensitiveInteger",8,1],ec=[0,Ha,"SensitiveString",8,0],tc=[0,Ha,"Timestamp",8,5],nc=[-3,Ha,"AccessDeniedException",{[$a]:Da,[ka]:403},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(nc,Ls);var rc=[3,Ha,"AndroidApp",0,["Package","CertificateFingerprint"],[0,0],2],ic=[3,Ha,"ApiKeyFilter",0,["KeyStatus"],[0]],sc=[3,Ha,"ApiKeyRestrictions",0,["AllowActions","AllowResources","AllowReferers","AllowAndroidApps","AllowAppleApps"],[64,64,[()=>up,0],()=>Id,()=>xd],2],oc=[3,Ha,"AppleApp",0,["BundleId"],[0],1],ac=[3,Ha,"AssociateTrackerConsumerRequest",0,[Ta,Ws],[[0,1],0],2],cc=[3,Ha,"AssociateTrackerConsumerResponse",0,[],[]],uc=[3,Ha,"BatchDeleteDevicePositionHistoryError",0,[po,Co],[0,()=>vc],2],lc=[3,Ha,"BatchDeleteDevicePositionHistoryRequest",0,[Ta,ho],[[0,1],64],2],dc=[3,Ha,"BatchDeleteDevicePositionHistoryResponse",0,[xo],[()=>Od],1],pc=[3,Ha,"BatchDeleteGeofenceError",0,[Lo,Co],[0,()=>vc],2],hc=[3,Ha,"BatchDeleteGeofenceRequest",0,[to,"GeofenceIds"],[[0,1],64],2],fc=[3,Ha,"BatchDeleteGeofenceResponse",0,[xo],[()=>Dd],1],gc=[3,Ha,"BatchEvaluateGeofencesError",0,[po,Sa,Co],[0,[()=>tc,0],()=>vc],3],mc=[3,Ha,"BatchEvaluateGeofencesRequest",0,[to,"DevicePositionUpdates"],[[0,1],[()=>Bd,0]],2],yc=[3,Ha,"BatchEvaluateGeofencesResponse",0,[xo],[[()=>$d,0]],1],Sc=[3,Ha,"BatchGetDevicePositionError",0,[po,Co],[0,()=>vc],2],Rc=[3,Ha,"BatchGetDevicePositionRequest",0,[Ta,ho],[[0,1],64],2],wc=[3,Ha,"BatchGetDevicePositionResponse",0,[xo,go],[()=>Md,[()=>Gd,0]],2],vc=[3,Ha,"BatchItemError",0,[Vs,Wo],[0,0]],Ec=[3,Ha,"BatchPutGeofenceError",0,[Lo,Co],[0,()=>vc],2],Cc=[3,Ha,"BatchPutGeofenceRequest",0,[to,Io],[[0,1],[()=>kd,0]],2],bc=[3,Ha,"BatchPutGeofenceRequestEntry",0,[Lo,Mo,ko],[0,[()=>Mu,0],[()=>wp,0]],2],Tc=[3,Ha,"BatchPutGeofenceResponse",0,["Successes",xo],[[()=>Nd,0],()=>Ld],2],Pc=[3,Ha,"BatchPutGeofenceSuccess",0,[Lo,io,xa],[0,[()=>tc,0],[()=>tc,0]],3],Ac=[3,Ha,"BatchUpdateDevicePositionError",0,[po,Sa,Co],[0,[()=>tc,0],()=>vc],3],Ic=[3,Ha,"BatchUpdateDevicePositionRequest",0,[Ta,"Updates"],[[0,1],[()=>Bd,0]],2],xc=[3,Ha,"BatchUpdateDevicePositionResponse",0,[xo],[[()=>_d,0]],1],Oc=[3,Ha,"CalculateRouteCarModeOptions",0,[Hs,zs],[[()=>Ya,0],[()=>Ya,0]]],Dc=[3,Ha,"CalculateRouteMatrixRequest",0,[no,"DeparturePositions","DestinationPositions",Ca,wo,fo,vo,eo,ba,Fo],[[0,1],[()=>cp,0],[()=>cp,0],0,[()=>tc,0],[()=>Ya,0],0,[()=>Oc,0],[()=>_c,0],[()=>za,{[_a]:Fa}]],3],$c=[3,Ha,"CalculateRouteMatrixResponse",0,[la,va,"SnappedDeparturePositions","SnappedDestinationPositions"],[[()=>lp,0],()=>Mc,[()=>cp,0],[()=>cp,0]],2],Mc=[3,Ha,"CalculateRouteMatrixSummary",0,[mo,"RouteCount","ErrorCount",vo],[0,1,1,0],4],Lc=[3,Ha,"CalculateRouteRequest",0,[no,"DeparturePosition","DestinationPosition","WaypointPositions",Ca,wo,fo,vo,"IncludeLegGeometry",eo,ba,"ArrivalTime","OptimizeFor",Fo],[[0,1],[()=>ap,0],[()=>ap,0],[()=>yp,0],0,[()=>tc,0],[()=>Ya,0],0,[()=>Ya,0],[()=>Oc,0],[()=>_c,0],[()=>tc,0],0,[()=>za,{[_a]:Fa}]],3],kc=[3,Ha,"CalculateRouteResponse",0,["Legs",va],[[()=>jd,0],[()=>Nc,0]],2],Nc=[3,Ha,"CalculateRouteSummary",0,["RouteBBox",mo,lo,Ro,vo],[[()=>Ud,0],0,[()=>Ja,0],[()=>Ja,0],0],5],_c=[3,Ha,"CalculateRouteTruckModeOptions",0,[Hs,zs,"Dimensions","Weight"],[[()=>Ya,0],[()=>Ya,0],[()=>od,0],[()=>ad,0]]],Uc=[3,Ha,ro,0,[jo],[()=>np],1],Fc=[3,Ha,co,8,["Center","Radius"],[[()=>ap,0],[()=>Ja,0]],2],Gc=[-3,Ha,"ConflictException",{[$a]:Da,[ka]:409},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(Gc,ks);var Bc=[3,Ha,"CreateGeofenceCollectionRequest",0,[to,na,ra,Eo,Aa,Ho],[0,0,0,0,128,0],1],Hc=[3,Ha,"CreateGeofenceCollectionResponse",0,[to,Qs,io],[0,0,[()=>tc,0]],3],zc=[3,Ha,"CreateKeyRequest",0,[zo,pa,Eo,Po,Yo,Aa],[0,[()=>sc,0],0,[()=>tc,0],2,128],2],jc=[3,Ha,"CreateKeyResponse",0,[Fo,Go,zo,io],[[()=>za,0],0,0,[()=>tc,0]],4],qc=[3,Ha,"CreateMapRequest",0,[Qo,uo,na,Eo,Aa],[0,[()=>Dl,0],0,0,128],2],Vc=[3,Ha,"CreateMapResponse",0,[Qo,Ko,io],[0,0,[()=>tc,0]],3],Wc=[3,Ha,"CreatePlaceIndexRequest",0,[_o,mo,na,Eo,yo,Aa],[0,0,0,0,()=>Xc,128],2],Kc=[3,Ha,"CreatePlaceIndexResponse",0,[_o,No,io],[0,0,[()=>tc,0]],3],Qc=[3,Ha,"CreateRouteCalculatorRequest",0,[no,mo,na,Eo,Aa],[0,0,0,0,128],2],Zc=[3,Ha,"CreateRouteCalculatorResponse",0,[no,Ks,io],[0,0,[()=>tc,0]],3],Yc=[3,Ha,"CreateTrackerRequest",0,[Ta,na,Ho,ra,Eo,Aa,ea,bo,Bo],[0,0,0,0,0,128,0,2,2],1],Jc=[3,Ha,"CreateTrackerResponse",0,[Ta,Ea,io],[0,0,[()=>tc,0]],3],Xc=[3,Ha,yo,0,["IntendedUse"],[0]],eu=[3,Ha,"DeleteGeofenceCollectionRequest",0,[to],[[0,1]],1],tu=[3,Ha,"DeleteGeofenceCollectionResponse",0,[],[]],nu=[3,Ha,"DeleteKeyRequest",0,[zo,"ForceDelete"],[[0,1],[2,{[_a]:"forceDelete"}]],1],ru=[3,Ha,"DeleteKeyResponse",0,[],[]],iu=[3,Ha,"DeleteMapRequest",0,[Qo],[[0,1]],1],su=[3,Ha,"DeleteMapResponse",0,[],[]],ou=[3,Ha,"DeletePlaceIndexRequest",0,[_o],[[0,1]],1],au=[3,Ha,"DeletePlaceIndexResponse",0,[],[]],cu=[3,Ha,"DeleteRouteCalculatorRequest",0,[no],[[0,1]],1],uu=[3,Ha,"DeleteRouteCalculatorResponse",0,[],[]],lu=[3,Ha,"DeleteTrackerRequest",0,[Ta],[[0,1]],1],du=[3,Ha,"DeleteTrackerResponse",0,[],[]],pu=[3,Ha,"DescribeGeofenceCollectionRequest",0,[to],[[0,1]],1],hu=[3,Ha,"DescribeGeofenceCollectionResponse",0,[to,Qs,Eo,io,xa,na,ra,Ho,Aa,"GeofenceCount"],[0,0,0,[()=>tc,0],[()=>tc,0],0,0,0,128,1],5],fu=[3,Ha,"DescribeKeyRequest",0,[zo],[[0,1]],1],gu=[3,Ha,"DescribeKeyResponse",0,[Fo,Go,zo,pa,io,Po,xa,Eo,Aa],[[()=>za,0],0,0,[()=>sc,0],[()=>tc,0],[()=>tc,0],[()=>tc,0],0,128],7],mu=[3,Ha,"DescribeMapRequest",0,[Qo],[[0,1]],1],yu=[3,Ha,"DescribeMapResponse",0,[Qo,Ko,mo,uo,Eo,io,xa,na,Aa],[0,0,0,[()=>Dl,0],0,[()=>tc,0],[()=>tc,0],0,128],7],Su=[3,Ha,"DescribePlaceIndexRequest",0,[_o],[[0,1]],1],Ru=[3,Ha,"DescribePlaceIndexResponse",0,[_o,No,Eo,io,xa,mo,yo,na,Aa],[0,0,0,[()=>tc,0],[()=>tc,0],0,()=>Xc,0,128],7],wu=[3,Ha,"DescribeRouteCalculatorRequest",0,[no],[[0,1]],1],vu=[3,Ha,"DescribeRouteCalculatorResponse",0,[no,Ks,Eo,io,xa,mo,na,Aa],[0,0,0,[()=>tc,0],[()=>tc,0],0,0,128],6],Eu=[3,Ha,"DescribeTrackerRequest",0,[Ta],[[0,1]],1],Cu=[3,Ha,"DescribeTrackerResponse",0,[Ta,Ea,Eo,io,xa,na,ra,Aa,Ho,ea,bo,Bo],[0,0,0,[()=>tc,0],[()=>tc,0],0,0,128,0,0,2,2],5],bu=[3,Ha,"DevicePosition",0,[Sa,da,aa,po,Bs,ia],[[()=>tc,0],[()=>tc,0],[()=>ap,0],0,[()=>kl,0],[()=>Rp,0]],3],Tu=[3,Ha,"DevicePositionUpdate",0,[po,Sa,aa,Bs,ia],[0,[()=>tc,0],[()=>ap,0],[()=>kl,0],[()=>Rp,0]],3],Pu=[3,Ha,So,0,[po,Sa,aa,Bs,"Ipv4Address","WiFiAccessPoints",ro],[0,[()=>tc,0],[()=>ap,0],[()=>kl,0],0,()=>Sp,()=>Uc],3],Au=[3,Ha,"DisassociateTrackerConsumerRequest",0,[Ta,Ws],[[0,1],[0,1]],2],Iu=[3,Ha,"DisassociateTrackerConsumerResponse",0,[],[]],xu=[3,Ha,"ForecastedEvent",0,["EventId",Lo,"IsDeviceInGeofence","NearestDistance","EventType","ForecastedBreachTime",ko],[0,0,2,1,0,[()=>tc,0],[()=>wp,0]],5],Ou=[3,Ha,"ForecastGeofenceEventsDeviceState",0,[aa,"Speed"],[[()=>ap,0],1],1],Du=[3,Ha,"ForecastGeofenceEventsRequest",0,[to,So,"TimeHorizonMinutes",vo,Ra,Jo,Zo],[[0,1],[()=>Ou,0],1,0,0,0,1],2],$u=[3,Ha,"ForecastGeofenceEventsResponse",0,["ForecastedEvents",vo,Ra,Jo],[[()=>zd,0],0,0,0],3],Mu=[3,Ha,"GeofenceGeometry",0,[ca,co,"Geobuf","MultiPolygon"],[[()=>Vd,0],[()=>Fc,0],[()=>ja,0],[()=>ip,0]]],Lu=[3,Ha,"GetDevicePositionHistoryRequest",0,[Ta,po,Jo,"StartTimeInclusive","EndTimeExclusive",Zo],[[0,1],[0,1],0,[()=>tc,0],[()=>tc,0],1],2],ku=[3,Ha,"GetDevicePositionHistoryResponse",0,[go,Jo],[[()=>Gd,0],0],1],Nu=[3,Ha,"GetDevicePositionRequest",0,[Ta,po],[[0,1],[0,1]],2],_u=[3,Ha,"GetDevicePositionResponse",0,[Sa,da,aa,po,Bs,ia],[[()=>tc,0],[()=>tc,0],[()=>ap,0],0,[()=>kl,0],[()=>Rp,0]],3],Uu=[3,Ha,"GetGeofenceRequest",0,[to,Lo],[[0,1],[0,1]],2],Fu=[3,Ha,"GetGeofenceResponse",0,[Lo,Mo,wa,io,xa,ko],[0,[()=>Mu,0],0,[()=>tc,0],[()=>tc,0],[()=>wp,0]],5],Gu=[3,Ha,"GetMapGlyphsRequest",0,[Qo,"FontStack","FontUnicodeRange",Fo],[[0,1],[0,1],[0,1],[()=>za,{[_a]:Fa}]],3],Bu=[3,Ha,"GetMapGlyphsResponse",0,[js,oo,Ys],[[21,16],[0,{[Na]:so}],[0,{[Na]:Zs}]]],Hu=[3,Ha,"GetMapSpritesRequest",0,[Qo,"FileName",Fo],[[0,1],[0,1],[()=>za,{[_a]:Fa}]],2],zu=[3,Ha,"GetMapSpritesResponse",0,[js,oo,Ys],[[21,16],[0,{[Na]:so}],[0,{[Na]:Zs}]]],ju=[3,Ha,"GetMapStyleDescriptorRequest",0,[Qo,Fo],[[0,1],[()=>za,{[_a]:Fa}]],1],qu=[3,Ha,"GetMapStyleDescriptorResponse",0,[js,oo,Ys],[[21,16],[0,{[Na]:so}],[0,{[Na]:Zs}]]],Vu=[3,Ha,"GetMapTileRequest",0,[Qo,"Z","X","Y",Fo],[[0,1],[()=>ec,1],[()=>ec,1],[()=>ec,1],[()=>za,{[_a]:Fa}]],4],Wu=[3,Ha,"GetMapTileResponse",0,[js,oo,Ys],[[21,16],[0,{[Na]:so}],[0,{[Na]:Zs}]]],Ku=[3,Ha,"GetPlaceRequest",0,[_o,ta,Vo,Fo],[[0,1],[()=>Ka,1],[0,{[_a]:"language"}],[()=>za,{[_a]:Fa}]],2],Qu=[3,Ha,"GetPlaceResponse",0,[oa],[[()=>Ml,0]],1],Zu=[3,Ha,Uo,0,["ProxyDetected",aa,Bs,"DeviationDistance"],[2,[()=>ap,0],[()=>kl,0],1],1],Yu=[-3,Ha,"InternalServerException",{[$a]:"server",[ka]:500},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(Yu,Ns);var Ju=[3,Ha,"Leg",0,[ya,To,lo,Ro,"Steps",Mo],[[()=>ap,0],[()=>ap,0],[()=>Ja,0],[()=>Ja,0],[()=>gp,0],[()=>Xu,0]],5],Xu=[3,Ha,"LegGeometry",0,[qo],[[()=>Wd,0]]],el=[3,Ha,"ListDevicePositionsRequest",0,[Ta,Zo,Jo,"FilterGeometry"],[[0,1],1,0,[()=>sd,0]],1],tl=[3,Ha,"ListDevicePositionsResponse",0,[Io,Jo],[[()=>Kd,0],0],1],nl=[3,Ha,"ListDevicePositionsResponseEntry",0,[po,Sa,aa,Bs,ia],[0,[()=>tc,0],[()=>ap,0],[()=>kl,0],[()=>Rp,0]],3],rl=[3,Ha,"ListGeofenceCollectionsRequest",0,[Zo,Jo],[1,0]],il=[3,Ha,"ListGeofenceCollectionsResponse",0,[Io,Jo],[[()=>Qd,0],0],1],sl=[3,Ha,"ListGeofenceCollectionsResponseEntry",0,[to,Eo,io,xa,na,ra],[0,0,[()=>tc,0],[()=>tc,0],0,0],4],ol=[3,Ha,"ListGeofenceResponseEntry",0,[Lo,Mo,wa,io,xa,ko],[0,[()=>Mu,0],0,[()=>tc,0],[()=>tc,0],[()=>wp,0]],5],al=[3,Ha,"ListGeofencesRequest",0,[to,Jo,Zo],[[0,1],0,1],1],cl=[3,Ha,"ListGeofencesResponse",0,[Io,Jo],[[()=>Zd,0],0],1],ul=[3,Ha,"ListKeysRequest",0,[Zo,Jo,"Filter"],[1,0,()=>ic]],ll=[3,Ha,"ListKeysResponse",0,[Io,Jo],[[()=>Yd,0],0],1],dl=[3,Ha,"ListKeysResponseEntry",0,[zo,Po,pa,io,xa,Eo],[0,[()=>tc,0],[()=>sc,0],[()=>tc,0],[()=>tc,0],0],5],pl=[3,Ha,"ListMapsRequest",0,[Zo,Jo],[1,0]],hl=[3,Ha,"ListMapsResponse",0,[Io,Jo],[[()=>Jd,0],0],1],fl=[3,Ha,"ListMapsResponseEntry",0,[Qo,Eo,mo,io,xa,na],[0,0,0,[()=>tc,0],[()=>tc,0],0],5],gl=[3,Ha,"ListPlaceIndexesRequest",0,[Zo,Jo],[1,0]],ml=[3,Ha,"ListPlaceIndexesResponse",0,[Io,Jo],[[()=>Xd,0],0],1],yl=[3,Ha,"ListPlaceIndexesResponseEntry",0,[_o,Eo,mo,io,xa,na],[0,0,0,[()=>tc,0],[()=>tc,0],0],5],Sl=[3,Ha,"ListRouteCalculatorsRequest",0,[Zo,Jo],[1,0]],Rl=[3,Ha,"ListRouteCalculatorsResponse",0,[Io,Jo],[[()=>ep,0],0],1],wl=[3,Ha,"ListRouteCalculatorsResponseEntry",0,[no,Eo,mo,io,xa,na],[0,0,0,[()=>tc,0],[()=>tc,0],0],5],vl=[3,Ha,"ListTagsForResourceRequest",0,[ua],[[0,1]],1],El=[3,Ha,"ListTagsForResourceResponse",0,[Aa],[128]],Cl=[3,Ha,"ListTrackerConsumersRequest",0,[Ta,Zo,Jo],[[0,1],1,0],1],bl=[3,Ha,"ListTrackerConsumersResponse",0,["ConsumerArns",Jo],[64,0],1],Tl=[3,Ha,"ListTrackersRequest",0,[Zo,Jo],[1,0]],Pl=[3,Ha,"ListTrackersResponse",0,[Io,Jo],[[()=>tp,0],0],1],Al=[3,Ha,"ListTrackersResponseEntry",0,[Ta,Eo,io,xa,na,ra],[0,0,[()=>tc,0],[()=>tc,0],0,0],4],Il=[3,Ha,jo,0,[Js,"Mcc","Mnc","LocalId","NetworkMeasurements","TimingAdvance","NrCapable",fa,ga,"Tac"],[1,1,1,()=>xl,()=>rp,1,2,1,1,1],3],xl=[3,Ha,"LteLocalId",0,[Ao,"Pci"],[1,1],2],Ol=[3,Ha,"LteNetworkMeasurements",0,[Ao,Js,"Pci",fa,ga],[1,1,1,1,1],3],Dl=[3,Ha,"MapConfiguration",0,["Style",sa,Xs],[0,[()=>qa,0],64],1],$l=[3,Ha,"MapConfigurationUpdate",0,[sa,Xs],[[()=>Va,0],64]],Ml=[3,Ha,oa,0,[Mo,"Label","AddressNumber","Street","Neighborhood","Municipality","SubRegion","Region","Country","PostalCode","Interpolated",Pa,"UnitType","UnitNumber",ao,ma,"SubMunicipality"],[[()=>Ll,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>ec,0],[()=>Ya,0],[()=>id,0],[()=>ec,0],[()=>ec,0],[()=>sp,0],[()=>op,0],[()=>ec,0]],1],Ll=[3,Ha,"PlaceGeometry",0,["Point"],[[()=>ap,0]]],kl=[3,Ha,"PositionalAccuracy",0,["Horizontal"],[[()=>Ja,0]],1],Nl=[3,Ha,"PutGeofenceRequest",0,[to,Lo,Mo,ko],[[0,1],[0,1],[()=>Mu,0],[()=>wp,0]],3],_l=[3,Ha,"PutGeofenceResponse",0,[Lo,io,xa],[0,[()=>tc,0],[()=>tc,0]],3],Ul=[-3,Ha,"ResourceNotFoundException",{[$a]:Da,[ka]:404},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(Ul,Gs);var Fl=[3,Ha,"RouteMatrixEntry",0,[lo,Ro,Co],[[()=>Ja,0],[()=>Ja,0],()=>Gl]],Gl=[3,Ha,"RouteMatrixEntryError",0,[Vs,Wo],[0,0],1],Bl=[3,Ha,"SearchForPositionResult",0,[oa,lo,ta],[[()=>Ml,0],[()=>Ja,0],[()=>Ka,0]],2],Hl=[3,Ha,"SearchForSuggestionsResult",0,[Ia,ta,ao,ma],[[()=>ec,0],[()=>Ka,0],[()=>sp,0],[()=>op,0]],1],zl=[3,Ha,"SearchForTextResult",0,[oa,lo,"Relevance",ta],[[()=>Ml,0],[()=>Ja,0],[()=>Ja,0],[()=>Ka,0]],1],jl=[3,Ha,"SearchPlaceIndexForPositionRequest",0,[_o,aa,Zo,Vo,Fo],[[0,1],[()=>ap,0],1,0,[()=>za,{[_a]:Fa}]],2],ql=[3,Ha,"SearchPlaceIndexForPositionResponse",0,[va,ha],[[()=>Vl,0],[()=>pp,0]],2],Vl=[3,Ha,"SearchPlaceIndexForPositionSummary",0,[aa,mo,Zo,Vo],[[()=>ap,0],0,1,0],2],Wl=[3,Ha,"SearchPlaceIndexForSuggestionsRequest",0,[_o,Ia,qs,Oo,Do,Zo,Vo,$o,Fo],[[0,1],[()=>ec,0],[()=>ap,0],[()=>Ud,0],[()=>Fd,0],1,0,[()=>Hd,0],[()=>za,{[_a]:Fa}]],2],Kl=[3,Ha,"SearchPlaceIndexForSuggestionsResponse",0,[va,ha],[[()=>Ql,0],[()=>hp,0]],2],Ql=[3,Ha,"SearchPlaceIndexForSuggestionsSummary",0,[Ia,mo,qs,Oo,Do,Zo,Vo,$o],[[()=>ec,0],0,[()=>ap,0],[()=>Ud,0],[()=>Fd,0],1,0,[()=>Hd,0]],2],Zl=[3,Ha,"SearchPlaceIndexForTextRequest",0,[_o,Ia,qs,Oo,Do,Zo,Vo,$o,Fo],[[0,1],[()=>ec,0],[()=>ap,0],[()=>Ud,0],[()=>Fd,0],1,0,[()=>Hd,0],[()=>za,{[_a]:Fa}]],2],Yl=[3,Ha,"SearchPlaceIndexForTextResponse",0,[va,ha],[[()=>Jl,0],[()=>fp,0]],2],Jl=[3,Ha,"SearchPlaceIndexForTextSummary",0,[Ia,mo,qs,Oo,Do,Zo,"ResultBBox",Vo,$o],[[()=>ec,0],0,[()=>ap,0],[()=>Ud,0],[()=>Fd,0],1,[()=>Ud,0],0,[()=>Hd,0]],2],Xl=[-3,Ha,"ServiceQuotaExceededException",{[$a]:Da,[ka]:402},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(Xl,_s);var ed=[3,Ha,"Step",0,[ya,To,lo,Ro,"GeometryOffset"],[[()=>ap,0],[()=>ap,0],[()=>Ja,0],[()=>Ja,0],1],4],td=[3,Ha,"TagResourceRequest",0,[ua,Aa],[[0,1],128],2],nd=[3,Ha,"TagResourceResponse",0,[],[]],rd=[-3,Ha,"ThrottlingException",{[$a]:Da,[ka]:429},[Wo],[[0,{[Ua]:Ga}]],1];le.for(Ha).registerError(rd,Us);var id=[3,Ha,Pa,0,[Xo,"Offset"],[[()=>ec,0],[()=>Xa,0]],1],sd=[3,Ha,"TrackingFilterGeometry",0,[ca],[[()=>Vd,0]]],od=[3,Ha,"TruckDimensions",0,["Length","Height","Width",Oa],[[()=>Ja,0],[()=>Ja,0],[()=>Ja,0],0]],ad=[3,Ha,"TruckWeight",0,["Total",Oa],[[()=>Ja,0],0]],cd=[3,Ha,"UntagResourceRequest",0,[ua,"TagKeys"],[[0,1],[64,{[_a]:"tagKeys"}]],2],ud=[3,Ha,"UntagResourceResponse",0,[],[]],ld=[3,Ha,"UpdateGeofenceCollectionRequest",0,[to,na,ra,Eo],[[0,1],0,0,0],1],dd=[3,Ha,"UpdateGeofenceCollectionResponse",0,[to,Qs,xa],[0,0,[()=>tc,0]],3],pd=[3,Ha,"UpdateKeyRequest",0,[zo,Eo,Po,Yo,"ForceUpdate",pa],[[0,1],0,[()=>tc,0],2,2,[()=>sc,0]],1],hd=[3,Ha,"UpdateKeyResponse",0,[Go,zo,xa],[0,0,[()=>tc,0]],3],fd=[3,Ha,"UpdateMapRequest",0,[Qo,na,Eo,"ConfigurationUpdate"],[[0,1],0,0,[()=>$l,0]],1],gd=[3,Ha,"UpdateMapResponse",0,[Qo,Ko,xa],[0,0,[()=>tc,0]],3],md=[3,Ha,"UpdatePlaceIndexRequest",0,[_o,na,Eo,yo],[[0,1],0,0,()=>Xc],1],yd=[3,Ha,"UpdatePlaceIndexResponse",0,[_o,No,xa],[0,0,[()=>tc,0]],3],Sd=[3,Ha,"UpdateRouteCalculatorRequest",0,[no,na,Eo],[[0,1],0,0],1],Rd=[3,Ha,"UpdateRouteCalculatorResponse",0,[no,Ks,xa],[0,0,[()=>tc,0]],3],wd=[3,Ha,"UpdateTrackerRequest",0,[Ta,na,ra,Eo,ea,bo,Bo],[[0,1],0,0,0,0,2,2],1],vd=[3,Ha,"UpdateTrackerResponse",0,[Ta,Ea,xa],[0,0,[()=>tc,0]],3],Ed=[-3,Ha,"ValidationException",{[$a]:Da,[ka]:400},[Wo,"Reason","FieldList"],[[0,{[Ua]:Ga}],[0,{[Ua]:"reason"}],[()=>mp,{[Ua]:"fieldList"}]],3];le.for(Ha).registerError(Ed,Fs);var Cd=[3,Ha,"ValidationExceptionField",0,[Xo,Wo],[[0,{[Ua]:"name"}],[0,{[Ua]:Ga}]],2],bd=[3,Ha,"VerifyDevicePositionRequest",0,[Ta,So,vo],[[0,1],[()=>Pu,0],0],2],Td=[3,Ha,"VerifyDevicePositionResponse",0,[Uo,po,Sa,da,vo],[[()=>Zu,0],0,[()=>tc,0],[()=>tc,0],0],5],Pd=[3,Ha,"WiFiAccessPoint",0,["MacAddress","Rss"],[0,1],2],Ad=[-3,Ba,"LocationServiceException",0,[],[]];le.for(Ba).registerError(Ad,Ms);var Id=[1,Ha,"AndroidAppList",0,()=>rc],xd=[1,Ha,"AppleAppList",0,()=>oc],Od=[1,Ha,"BatchDeleteDevicePositionHistoryErrorList",0,()=>uc],Dd=[1,Ha,"BatchDeleteGeofenceErrorList",0,()=>pc],$d=[1,Ha,"BatchEvaluateGeofencesErrorList",0,[()=>gc,0]],Md=[1,Ha,"BatchGetDevicePositionErrorList",0,()=>Sc],Ld=[1,Ha,"BatchPutGeofenceErrorList",0,()=>Ec],kd=[1,Ha,"BatchPutGeofenceRequestEntryList",0,[()=>bc,0]],Nd=[1,Ha,"BatchPutGeofenceSuccessList",0,[()=>Pc,0]],_d=[1,Ha,"BatchUpdateDevicePositionErrorList",0,[()=>Ac,0]],Ud=[1,Ha,"BoundingBox",8,1],Fd=[1,Ha,"CountryCodeList",0,[()=>qa,0]],Gd=[1,Ha,"DevicePositionList",0,[()=>bu,0]],Bd=[1,Ha,"DevicePositionUpdateList",0,[()=>Tu,0]],Hd=[1,Ha,"FilterPlaceCategoryList",0,[()=>Wa,0]],zd=[1,Ha,"ForecastedEventsList",0,[()=>xu,0]],jd=[1,Ha,"LegList",0,[()=>Ju,0]],qd=[1,Ha,"LinearRing",0,[()=>ap,0]],Vd=[1,Ha,"LinearRings",0,[()=>qd,0]],Wd=[1,Ha,qo,0,[()=>ap,0]],Kd=[1,Ha,"ListDevicePositionsResponseEntryList",0,[()=>nl,0]],Qd=[1,Ha,"ListGeofenceCollectionsResponseEntryList",0,[()=>sl,0]],Zd=[1,Ha,"ListGeofenceResponseEntryList",0,[()=>ol,0]],Yd=[1,Ha,"ListKeysResponseEntryList",0,[()=>dl,0]],Jd=[1,Ha,"ListMapsResponseEntryList",0,[()=>fl,0]],Xd=[1,Ha,"ListPlaceIndexesResponseEntryList",0,[()=>yl,0]],ep=[1,Ha,"ListRouteCalculatorsResponseEntryList",0,[()=>wl,0]],tp=[1,Ha,"ListTrackersResponseEntryList",0,[()=>Al,0]],np=[1,Ha,"LteCellDetailsList",0,()=>Il],rp=[1,Ha,"LteNetworkMeasurementsList",0,()=>Ol],ip=[1,Ha,"MultiLinearRings",0,[()=>Vd,0]],sp=[1,Ha,"PlaceCategoryList",0,[()=>Wa,0]],op=[1,Ha,"PlaceSupplementalCategoryList",0,[()=>Qa,0]],ap=[1,Ha,aa,8,1],cp=[1,Ha,"PositionList",0,[()=>ap,0]],up=[1,Ha,"RefererPatternList",0,[()=>Za,0]],lp=[1,Ha,la,0,[()=>dp,0]],dp=[1,Ha,"RouteMatrixRow",0,[()=>Fl,0]],pp=[1,Ha,"SearchForPositionResultList",0,[()=>Bl,0]],hp=[1,Ha,"SearchForSuggestionsResultList",0,[()=>Hl,0]],fp=[1,Ha,"SearchForTextResultList",0,[()=>zl,0]],gp=[1,Ha,"StepList",0,[()=>ed,0]],mp=[1,Ha,"ValidationExceptionFieldList",0,[()=>Cd,0]],yp=[1,Ha,"WaypointPositionList",0,[()=>ap,0]],Sp=[1,Ha,"WiFiAccessPointList",0,()=>Pd],Rp=[2,Ha,"PositionPropertyMap",8,0,0],wp=[2,Ha,"PropertyMap",8,0,0],vp=[9,Ha,"AssociateTrackerConsumer",{[Ma]:["cp.tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/consumers",200]},()=>ac,()=>cc],Ep=[9,Ha,"BatchDeleteDevicePositionHistory",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/delete-positions",200]},()=>lc,()=>dc],Cp=[9,Ha,"BatchDeleteGeofence",{[Ma]:["geofencing."],[La]:["POST","/geofencing/v0/collections/{CollectionName}/delete-geofences",200]},()=>hc,()=>fc],bp=[9,Ha,"BatchEvaluateGeofences",{[Ma]:["geofencing."],[La]:["POST","/geofencing/v0/collections/{CollectionName}/positions",200]},()=>mc,()=>yc],Tp=[9,Ha,"BatchGetDevicePosition",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/get-positions",200]},()=>Rc,()=>wc],Pp=[9,Ha,"BatchPutGeofence",{[Ma]:["geofencing."],[La]:["POST","/geofencing/v0/collections/{CollectionName}/put-geofences",200]},()=>Cc,()=>Tc],Ap=[9,Ha,"BatchUpdateDevicePosition",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/positions",200]},()=>Ic,()=>xc],Ip=[9,Ha,"CalculateRoute",{[Ma]:["routes."],[La]:["POST","/routes/v0/calculators/{CalculatorName}/calculate/route",200]},()=>Lc,()=>kc],xp=[9,Ha,"CalculateRouteMatrix",{[Ma]:["routes."],[La]:["POST","/routes/v0/calculators/{CalculatorName}/calculate/route-matrix",200]},()=>Dc,()=>$c],Op=[9,Ha,"CreateGeofenceCollection",{[Ma]:["cp.geofencing."],[La]:["POST","/geofencing/v0/collections",200]},()=>Bc,()=>Hc],Dp=[9,Ha,"CreateKey",{[Ma]:["cp.metadata."],[La]:["POST","/metadata/v0/keys",200]},()=>zc,()=>jc],$p=[9,Ha,"CreateMap",{[Ma]:["cp.maps."],[La]:["POST","/maps/v0/maps",200]},()=>qc,()=>Vc],Mp=[9,Ha,"CreatePlaceIndex",{[Ma]:["cp.places."],[La]:["POST","/places/v0/indexes",200]},()=>Wc,()=>Kc],Lp=[9,Ha,"CreateRouteCalculator",{[Ma]:["cp.routes."],[La]:["POST","/routes/v0/calculators",200]},()=>Qc,()=>Zc],kp=[9,Ha,"CreateTracker",{[Ma]:["cp.tracking."],[La]:["POST","/tracking/v0/trackers",200]},()=>Yc,()=>Jc],Np=[9,Ha,"DeleteGeofenceCollection",{[Ma]:["cp.geofencing."],[La]:["DELETE","/geofencing/v0/collections/{CollectionName}",200]},()=>eu,()=>tu],_p=[9,Ha,"DeleteKey",{[Ma]:["cp.metadata."],[La]:["DELETE","/metadata/v0/keys/{KeyName}",200]},()=>nu,()=>ru],Up=[9,Ha,"DeleteMap",{[Ma]:["cp.maps."],[La]:["DELETE","/maps/v0/maps/{MapName}",200]},()=>iu,()=>su],Fp=[9,Ha,"DeletePlaceIndex",{[Ma]:["cp.places."],[La]:["DELETE","/places/v0/indexes/{IndexName}",200]},()=>ou,()=>au],Gp=[9,Ha,"DeleteRouteCalculator",{[Ma]:["cp.routes."],[La]:["DELETE","/routes/v0/calculators/{CalculatorName}",200]},()=>cu,()=>uu],Bp=[9,Ha,"DeleteTracker",{[Ma]:["cp.tracking."],[La]:["DELETE","/tracking/v0/trackers/{TrackerName}",200]},()=>lu,()=>du],Hp=[9,Ha,"DescribeGeofenceCollection",{[Ma]:["cp.geofencing."],[La]:["GET","/geofencing/v0/collections/{CollectionName}",200]},()=>pu,()=>hu],zp=[9,Ha,"DescribeKey",{[Ma]:["cp.metadata."],[La]:["GET","/metadata/v0/keys/{KeyName}",200]},()=>fu,()=>gu],jp=[9,Ha,"DescribeMap",{[Ma]:["cp.maps."],[La]:["GET","/maps/v0/maps/{MapName}",200]},()=>mu,()=>yu],qp=[9,Ha,"DescribePlaceIndex",{[Ma]:["cp.places."],[La]:["GET","/places/v0/indexes/{IndexName}",200]},()=>Su,()=>Ru],Vp=[9,Ha,"DescribeRouteCalculator",{[Ma]:["cp.routes."],[La]:["GET","/routes/v0/calculators/{CalculatorName}",200]},()=>wu,()=>vu],Wp=[9,Ha,"DescribeTracker",{[Ma]:["cp.tracking."],[La]:["GET","/tracking/v0/trackers/{TrackerName}",200]},()=>Eu,()=>Cu],Kp=[9,Ha,"DisassociateTrackerConsumer",{[Ma]:["cp.tracking."],[La]:["DELETE","/tracking/v0/trackers/{TrackerName}/consumers/{ConsumerArn}",200]},()=>Au,()=>Iu],Qp=[9,Ha,"ForecastGeofenceEvents",{[Ma]:["geofencing."],[La]:["POST","/geofencing/v0/collections/{CollectionName}/forecast-geofence-events",200]},()=>Du,()=>$u],Zp=[9,Ha,"GetDevicePosition",{[Ma]:["tracking."],[La]:["GET","/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/positions/latest",200]},()=>Nu,()=>_u],Yp=[9,Ha,"GetDevicePositionHistory",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/list-positions",200]},()=>Lu,()=>ku],Jp=[9,Ha,"GetGeofence",{[Ma]:["geofencing."],[La]:["GET","/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}",200]},()=>Uu,()=>Fu],Xp=[9,Ha,"GetMapGlyphs",{[Ma]:["maps."],[La]:["GET","/maps/v0/maps/{MapName}/glyphs/{FontStack}/{FontUnicodeRange}",200]},()=>Gu,()=>Bu],eh=[9,Ha,"GetMapSprites",{[Ma]:["maps."],[La]:["GET","/maps/v0/maps/{MapName}/sprites/{FileName}",200]},()=>Hu,()=>zu],th=[9,Ha,"GetMapStyleDescriptor",{[Ma]:["maps."],[La]:["GET","/maps/v0/maps/{MapName}/style-descriptor",200]},()=>ju,()=>qu],nh=[9,Ha,"GetMapTile",{[Ma]:["maps."],[La]:["GET","/maps/v0/maps/{MapName}/tiles/{Z}/{X}/{Y}",200]},()=>Vu,()=>Wu],rh=[9,Ha,"GetPlace",{[Ma]:["places."],[La]:["GET","/places/v0/indexes/{IndexName}/places/{PlaceId}",200]},()=>Ku,()=>Qu],ih=[9,Ha,"ListDevicePositions",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/list-positions",200]},()=>el,()=>tl],sh=[9,Ha,"ListGeofenceCollections",{[Ma]:["cp.geofencing."],[La]:["POST","/geofencing/v0/list-collections",200]},()=>rl,()=>il],oh=[9,Ha,"ListGeofences",{[Ma]:["geofencing."],[La]:["POST","/geofencing/v0/collections/{CollectionName}/list-geofences",200]},()=>al,()=>cl],ah=[9,Ha,"ListKeys",{[Ma]:["cp.metadata."],[La]:["POST","/metadata/v0/list-keys",200]},()=>ul,()=>ll],ch=[9,Ha,"ListMaps",{[Ma]:["cp.maps."],[La]:["POST","/maps/v0/list-maps",200]},()=>pl,()=>hl],uh=[9,Ha,"ListPlaceIndexes",{[Ma]:["cp.places."],[La]:["POST","/places/v0/list-indexes",200]},()=>gl,()=>ml],lh=[9,Ha,"ListRouteCalculators",{[Ma]:["cp.routes."],[La]:["POST","/routes/v0/list-calculators",200]},()=>Sl,()=>Rl],dh=[9,Ha,"ListTagsForResource",{[Ma]:["cp.metadata."],[La]:["GET","/tags/{ResourceArn}",200]},()=>vl,()=>El],ph=[9,Ha,"ListTrackerConsumers",{[Ma]:["cp.tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/list-consumers",200]},()=>Cl,()=>bl],hh=[9,Ha,"ListTrackers",{[Ma]:["cp.tracking."],[La]:["POST","/tracking/v0/list-trackers",200]},()=>Tl,()=>Pl],fh=[9,Ha,"PutGeofence",{[Ma]:["geofencing."],[La]:["PUT","/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}",200]},()=>Nl,()=>_l],gh=[9,Ha,"SearchPlaceIndexForPosition",{[Ma]:["places."],[La]:["POST","/places/v0/indexes/{IndexName}/search/position",200]},()=>jl,()=>ql],mh=[9,Ha,"SearchPlaceIndexForSuggestions",{[Ma]:["places."],[La]:["POST","/places/v0/indexes/{IndexName}/search/suggestions",200]},()=>Wl,()=>Kl],yh=[9,Ha,"SearchPlaceIndexForText",{[Ma]:["places."],[La]:["POST","/places/v0/indexes/{IndexName}/search/text",200]},()=>Zl,()=>Yl],Sh=[9,Ha,"TagResource",{[Ma]:["cp.metadata."],[La]:["POST","/tags/{ResourceArn}",200]},()=>td,()=>nd],Rh=[9,Ha,"UntagResource",{[Ma]:["cp.metadata."],[La]:["DELETE","/tags/{ResourceArn}",200]},()=>cd,()=>ud],wh=[9,Ha,"UpdateGeofenceCollection",{[Ma]:["cp.geofencing."],[La]:["PATCH","/geofencing/v0/collections/{CollectionName}",200]},()=>ld,()=>dd],vh=[9,Ha,"UpdateKey",{[Ma]:["cp.metadata."],[La]:["PATCH","/metadata/v0/keys/{KeyName}",200]},()=>pd,()=>hd],Eh=[9,Ha,"UpdateMap",{[Ma]:["cp.maps."],[La]:["PATCH","/maps/v0/maps/{MapName}",200]},()=>fd,()=>gd],Ch=[9,Ha,"UpdatePlaceIndex",{[Ma]:["cp.places."],[La]:["PATCH","/places/v0/indexes/{IndexName}",200]},()=>md,()=>yd],bh=[9,Ha,"UpdateRouteCalculator",{[Ma]:["cp.routes."],[La]:["PATCH","/routes/v0/calculators/{CalculatorName}",200]},()=>Sd,()=>Rd],Th=[9,Ha,"UpdateTracker",{[Ma]:["cp.tracking."],[La]:["PATCH","/tracking/v0/trackers/{TrackerName}",200]},()=>wd,()=>vd],Ph=[9,Ha,"VerifyDevicePosition",{[Ma]:["tracking."],[La]:["POST","/tracking/v0/trackers/{TrackerName}/positions/verify",200]},()=>bd,()=>Td];class Ah extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","AssociateTrackerConsumer",{}).n("LocationClient","AssociateTrackerConsumerCommand").sc(vp).build()){}class Ih extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchDeleteDevicePositionHistory",{}).n("LocationClient","BatchDeleteDevicePositionHistoryCommand").sc(Ep).build()){}class xh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchDeleteGeofence",{}).n("LocationClient","BatchDeleteGeofenceCommand").sc(Cp).build()){}class Oh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchEvaluateGeofences",{}).n("LocationClient","BatchEvaluateGeofencesCommand").sc(bp).build()){}class Dh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchGetDevicePosition",{}).n("LocationClient","BatchGetDevicePositionCommand").sc(Tp).build()){}class $h extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchPutGeofence",{}).n("LocationClient","BatchPutGeofenceCommand").sc(Pp).build()){}class Mh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","BatchUpdateDevicePosition",{}).n("LocationClient","BatchUpdateDevicePositionCommand").sc(Ap).build()){}class Lh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CalculateRoute",{}).n("LocationClient","CalculateRouteCommand").sc(Ip).build()){}let kh=class extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CalculateRouteMatrix",{}).n("LocationClient","CalculateRouteMatrixCommand").sc(xp).build()){};class Nh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateGeofenceCollection",{}).n("LocationClient","CreateGeofenceCollectionCommand").sc(Op).build()){}class _h extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateKey",{}).n("LocationClient","CreateKeyCommand").sc(Dp).build()){}class Uh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateMap",{}).n("LocationClient","CreateMapCommand").sc($p).build()){}class Fh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreatePlaceIndex",{}).n("LocationClient","CreatePlaceIndexCommand").sc(Mp).build()){}class Gh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateRouteCalculator",{}).n("LocationClient","CreateRouteCalculatorCommand").sc(Lp).build()){}class Bh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","CreateTracker",{}).n("LocationClient","CreateTrackerCommand").sc(kp).build()){}class Hh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteGeofenceCollection",{}).n("LocationClient","DeleteGeofenceCollectionCommand").sc(Np).build()){}class zh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteKey",{}).n("LocationClient","DeleteKeyCommand").sc(_p).build()){}class jh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteMap",{}).n("LocationClient","DeleteMapCommand").sc(Up).build()){}class qh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeletePlaceIndex",{}).n("LocationClient","DeletePlaceIndexCommand").sc(Fp).build()){}class Vh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteRouteCalculator",{}).n("LocationClient","DeleteRouteCalculatorCommand").sc(Gp).build()){}class Wh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteTracker",{}).n("LocationClient","DeleteTrackerCommand").sc(Bp).build()){}class Kh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeGeofenceCollection",{}).n("LocationClient","DescribeGeofenceCollectionCommand").sc(Hp).build()){}class Qh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeKey",{}).n("LocationClient","DescribeKeyCommand").sc(zp).build()){}class Zh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeMap",{}).n("LocationClient","DescribeMapCommand").sc(jp).build()){}class Yh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribePlaceIndex",{}).n("LocationClient","DescribePlaceIndexCommand").sc(qp).build()){}class Jh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeRouteCalculator",{}).n("LocationClient","DescribeRouteCalculatorCommand").sc(Vp).build()){}class Xh extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeTracker",{}).n("LocationClient","DescribeTrackerCommand").sc(Wp).build()){}class ef extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","DisassociateTrackerConsumer",{}).n("LocationClient","DisassociateTrackerConsumerCommand").sc(Kp).build()){}class tf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ForecastGeofenceEvents",{}).n("LocationClient","ForecastGeofenceEventsCommand").sc(Qp).build()){}class nf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetDevicePosition",{}).n("LocationClient","GetDevicePositionCommand").sc(Zp).build()){}class rf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetDevicePositionHistory",{}).n("LocationClient","GetDevicePositionHistoryCommand").sc(Yp).build()){}class sf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetGeofence",{}).n("LocationClient","GetGeofenceCommand").sc(Jp).build()){}class of extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapGlyphs",{}).n("LocationClient","GetMapGlyphsCommand").sc(Xp).build()){}class af extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapSprites",{}).n("LocationClient","GetMapSpritesCommand").sc(eh).build()){}class cf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapStyleDescriptor",{}).n("LocationClient","GetMapStyleDescriptorCommand").sc(th).build()){}class uf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapTile",{}).n("LocationClient","GetMapTileCommand").sc(nh).build()){}let lf=class extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","GetPlace",{}).n("LocationClient","GetPlaceCommand").sc(rh).build()){};class df extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListDevicePositions",{}).n("LocationClient","ListDevicePositionsCommand").sc(ih).build()){}class pf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListGeofenceCollections",{}).n("LocationClient","ListGeofenceCollectionsCommand").sc(sh).build()){}class hf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListGeofences",{}).n("LocationClient","ListGeofencesCommand").sc(oh).build()){}class ff extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListKeys",{}).n("LocationClient","ListKeysCommand").sc(ah).build()){}class gf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListMaps",{}).n("LocationClient","ListMapsCommand").sc(ch).build()){}class mf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListPlaceIndexes",{}).n("LocationClient","ListPlaceIndexesCommand").sc(uh).build()){}class yf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListRouteCalculators",{}).n("LocationClient","ListRouteCalculatorsCommand").sc(lh).build()){}class Sf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListTagsForResource",{}).n("LocationClient","ListTagsForResourceCommand").sc(dh).build()){}class Rf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListTrackerConsumers",{}).n("LocationClient","ListTrackerConsumersCommand").sc(ph).build()){}class wf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","ListTrackers",{}).n("LocationClient","ListTrackersCommand").sc(hh).build()){}class vf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","PutGeofence",{}).n("LocationClient","PutGeofenceCommand").sc(fh).build()){}class Ef extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForPosition",{}).n("LocationClient","SearchPlaceIndexForPositionCommand").sc(gh).build()){}class Cf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForSuggestions",{}).n("LocationClient","SearchPlaceIndexForSuggestionsCommand").sc(mh).build()){}class bf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForText",{}).n("LocationClient","SearchPlaceIndexForTextCommand").sc(yh).build()){}class Tf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","TagResource",{}).n("LocationClient","TagResourceCommand").sc(Sh).build()){}class Pf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UntagResource",{}).n("LocationClient","UntagResourceCommand").sc(Rh).build()){}class Af extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateGeofenceCollection",{}).n("LocationClient","UpdateGeofenceCollectionCommand").sc(wh).build()){}class If extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateKey",{}).n("LocationClient","UpdateKeyCommand").sc(vh).build()){}class xf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateMap",{}).n("LocationClient","UpdateMapCommand").sc(Eh).build()){}class Of extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdatePlaceIndex",{}).n("LocationClient","UpdatePlaceIndexCommand").sc(Ch).build()){}class Df extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateRouteCalculator",{}).n("LocationClient","UpdateRouteCalculatorCommand").sc(bh).build()){}class $f extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateTracker",{}).n("LocationClient","UpdateTrackerCommand").sc(Th).build()){}class Mf extends(er.classBuilder().ep(Ai).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("LocationService","VerifyDevicePosition",{}).n("LocationClient","VerifyDevicePositionCommand").sc(Ph).build()){}const Lf=T($s,tf,"NextToken","NextToken","MaxResults"),kf=T($s,rf,"NextToken","NextToken","MaxResults"),Nf=T($s,df,"NextToken","NextToken","MaxResults"),_f=T($s,pf,"NextToken","NextToken","MaxResults"),Uf=T($s,hf,"NextToken","NextToken","MaxResults"),Ff=T($s,ff,"NextToken","NextToken","MaxResults"),Gf=T($s,gf,"NextToken","NextToken","MaxResults"),Bf=T($s,mf,"NextToken","NextToken","MaxResults"),Hf=T($s,yf,"NextToken","NextToken","MaxResults"),zf=T($s,Rf,"NextToken","NextToken","MaxResults"),jf=T($s,wf,"NextToken","NextToken","MaxResults"),qf={AssociateTrackerConsumerCommand:Ah,BatchDeleteDevicePositionHistoryCommand:Ih,BatchDeleteGeofenceCommand:xh,BatchEvaluateGeofencesCommand:Oh,BatchGetDevicePositionCommand:Dh,BatchPutGeofenceCommand:$h,BatchUpdateDevicePositionCommand:Mh,CalculateRouteCommand:Lh,CalculateRouteMatrixCommand:kh,CreateGeofenceCollectionCommand:Nh,CreateKeyCommand:_h,CreateMapCommand:Uh,CreatePlaceIndexCommand:Fh,CreateRouteCalculatorCommand:Gh,CreateTrackerCommand:Bh,DeleteGeofenceCollectionCommand:Hh,DeleteKeyCommand:zh,DeleteMapCommand:jh,DeletePlaceIndexCommand:qh,DeleteRouteCalculatorCommand:Vh,DeleteTrackerCommand:Wh,DescribeGeofenceCollectionCommand:Kh,DescribeKeyCommand:Qh,DescribeMapCommand:Zh,DescribePlaceIndexCommand:Yh,DescribeRouteCalculatorCommand:Jh,DescribeTrackerCommand:Xh,DisassociateTrackerConsumerCommand:ef,ForecastGeofenceEventsCommand:tf,GetDevicePositionCommand:nf,GetDevicePositionHistoryCommand:rf,GetGeofenceCommand:sf,GetMapGlyphsCommand:of,GetMapSpritesCommand:af,GetMapStyleDescriptorCommand:cf,GetMapTileCommand:uf,GetPlaceCommand:lf,ListDevicePositionsCommand:df,ListGeofenceCollectionsCommand:pf,ListGeofencesCommand:hf,ListKeysCommand:ff,ListMapsCommand:gf,ListPlaceIndexesCommand:mf,ListRouteCalculatorsCommand:yf,ListTagsForResourceCommand:Sf,ListTrackerConsumersCommand:Rf,ListTrackersCommand:wf,PutGeofenceCommand:vf,SearchPlaceIndexForPositionCommand:Ef,SearchPlaceIndexForSuggestionsCommand:Cf,SearchPlaceIndexForTextCommand:bf,TagResourceCommand:Tf,UntagResourceCommand:Pf,UpdateGeofenceCollectionCommand:Af,UpdateKeyCommand:If,UpdateMapCommand:xf,UpdatePlaceIndexCommand:Of,UpdateRouteCalculatorCommand:Df,UpdateTrackerCommand:$f,VerifyDevicePositionCommand:Mf},Vf={paginateForecastGeofenceEvents:Lf,paginateGetDevicePositionHistory:kf,paginateListDevicePositions:Nf,paginateListGeofenceCollections:_f,paginateListGeofences:Uf,paginateListKeys:Ff,paginateListMaps:Gf,paginateListPlaceIndexes:Bf,paginateListRouteCalculators:Hf,paginateListTrackerConsumers:zf,paginateListTrackers:jf};class Wf extends $s{}function Kf(e){return Promise.all(Object.keys(e).reduce(((t,n)=>{const r=e[n];return"string"==typeof r?t.push([n,r]):t.push(r().then((e=>[n,e]))),t}),[])).then((e=>e.reduce(((e,[t,n])=>(e[t]=n,e)),{})))}function Qf(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:n,CognitoIdentityClient:r}=await Promise.resolve().then((function(){return vL})),i=n=>e.clientConfig?.[n]??e.parentClientConfig?.[n]??t?.callerClientConfig?.[n],{Credentials:{AccessKeyId:s=Zf(e.logger),Expiration:o,SecretKey:a=Jf(e.logger),SessionToken:c}=Yf(e.logger)}=await(e.client??new r(Object.assign({},e.clientConfig??{},{region:i("region"),profile:i("profile"),userAgentAppId:i("userAgentAppId")}))).send(new n({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await Kf(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:s,secretAccessKey:a,sessionToken:c,expiration:o}}}function Zf(e){throw new dn("Response from Amazon Cognito contained no access key ID",{logger:e})}function Yf(e){throw new dn("Response from Amazon Cognito contained no credentials",{logger:e})}function Jf(e){throw new dn("Response from Amazon Cognito contained no secret key",{logger:e})}nr(qf,Wf,{paginators:Vf});const Xf="IdentityIds";class eg{dbName;constructor(e="aws:cognito-identity-ids"){this.dbName=e}getItem(e){return this.withObjectStore("readonly",(t=>{const n=t.get(e);return new Promise((e=>{n.onerror=()=>e(null),n.onsuccess=()=>e(n.result?n.result.value:null)}))})).catch((()=>null))}removeItem(e){return this.withObjectStore("readwrite",(t=>{const n=t.delete(e);return new Promise(((e,t)=>{n.onerror=()=>t(n.error),n.onsuccess=()=>e()}))}))}setItem(e,t){return this.withObjectStore("readwrite",(n=>{const r=n.put({id:e,value:t});return new Promise(((e,t)=>{r.onerror=()=>t(r.error),r.onsuccess=()=>e()}))}))}getDb(){const e=self.indexedDB.open(this.dbName,1);return new Promise(((t,n)=>{e.onsuccess=()=>{t(e.result)},e.onerror=()=>{n(e.error)},e.onblocked=()=>{n(new Error("Unable to access DB"))},e.onupgradeneeded=()=>{const t=e.result;t.onerror=()=>{n(new Error("Failed to create object store"))},t.createObjectStore(Xf,{keyPath:"id"})}}))}withObjectStore(e,t){return this.getDb().then((n=>{const r=n.transaction(Xf,e);return r.oncomplete=()=>n.close(),new Promise(((e,n)=>{r.onerror=()=>n(r.error),e(t(r.objectStore(Xf)))})).catch((e=>{throw n.close(),e}))}))}}const tg=new class{store;constructor(e={}){this.store=e}getItem(e){return e in this.store?this.store[e]:null}removeItem(e){delete this.store[e]}setItem(e,t){this.store[e]=t}};function ng(){return"object"==typeof self&&self.indexedDB?new eg:"object"==typeof window&&window.localStorage?window.localStorage:tg}function rg(e){throw new dn("Response from Amazon Cognito contained no identity ID",{logger:e})}const ig=e=>"h2"===e?.metadata?.handlerProtocol?void 0:e,sg=e=>{for(const t of e)if(void 0!==t)return t};var og,ag={};var cg=(og||(og=1,function(e){"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.withAPIKey=on,e.withIdentityPoolId=sn;class t extends Error{constructor(e){let n,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!0;"boolean"==typeof r?(n=void 0,i=r):null!=r&&"object"==typeof r&&(n=r.logger,i=r.tryNextLink??!0),super(e),this.name="ProviderError",this.tryNextLink=i,Object.setPrototypeOf(this,t.prototype),n?.debug?.(`@smithy/property-provider ${i?"->":"(!)"} ${e}`)}static from(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Object.assign(new this(e.message,t),e)}}class n extends t{constructor(e){super(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]),this.name="CredentialsProviderError",Object.setPrototypeOf(this,n.prototype)}}const r=(e,t,n)=>{let r,i,s,o=!1;const a=async()=>{i||(i=e());try{r=await i,s=!0,o=!1}finally{i=void 0}return r};return async e=>(s&&!e?.forceRefresh||(r=await a()),r)};function i(e){return Promise.all(Object.keys(e).reduce(((t,n)=>{const r=e[n];return"string"==typeof r?t.push([n,r]):t.push(r().then((e=>[n,e]))),t}),[])).then((e=>e.reduce(((e,t)=>{let[n,r]=t;return e[n]=r,e}),{})))}function s(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:n,CognitoIdentityClient:r}=await Promise.resolve().then((function(){return ic})),s=n=>e.clientConfig?.[n]??e.parentClientConfig?.[n]??t?.callerClientConfig?.[n],{Credentials:{AccessKeyId:u=o(e.logger),Expiration:l,SecretKey:d=c(e.logger),SessionToken:p}=a(e.logger)}=await(e.client??new r(Object.assign({},e.clientConfig??{},{region:s("region"),profile:s("profile")}))).send(new n({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await i(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:u,secretAccessKey:d,sessionToken:p,expiration:l}}}function o(e){throw new n("Response from Amazon Cognito contained no access key ID",{logger:e})}function a(e){throw new n("Response from Amazon Cognito contained no credentials",{logger:e})}function c(e){throw new n("Response from Amazon Cognito contained no secret key",{logger:e})}const u="IdentityIds";class l{dbName;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"aws:cognito-identity-ids";this.dbName=e}getItem(e){return this.withObjectStore("readonly",(t=>{const n=t.get(e);return new Promise((e=>{n.onerror=()=>e(null),n.onsuccess=()=>e(n.result?n.result.value:null)}))})).catch((()=>null))}removeItem(e){return this.withObjectStore("readwrite",(t=>{const n=t.delete(e);return new Promise(((e,t)=>{n.onerror=()=>t(n.error),n.onsuccess=()=>e()}))}))}setItem(e,t){return this.withObjectStore("readwrite",(n=>{const r=n.put({id:e,value:t});return new Promise(((e,t)=>{r.onerror=()=>t(r.error),r.onsuccess=()=>e()}))}))}getDb(){const e=self.indexedDB.open(this.dbName,1);return new Promise(((t,n)=>{e.onsuccess=()=>{t(e.result)},e.onerror=()=>{n(e.error)},e.onblocked=()=>{n(new Error("Unable to access DB"))},e.onupgradeneeded=()=>{const t=e.result;t.onerror=()=>{n(new Error("Failed to create object store"))},t.createObjectStore(u,{keyPath:"id"})}}))}withObjectStore(e,t){return this.getDb().then((n=>{const r=n.transaction(u,e);return r.oncomplete=()=>n.close(),new Promise(((e,n)=>{r.onerror=()=>n(r.error),e(t(r.objectStore(u)))})).catch((e=>{throw n.close(),e}))}))}}class d{store;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.store=e}getItem(e){return e in this.store?this.store[e]:null}removeItem(e){delete this.store[e]}setItem(e,t){this.store[e]=t}}const p=new d;function h(){return"object"==typeof self&&self.indexedDB?new l:"object"==typeof window&&window.localStorage?window.localStorage:p}function f(e){let{accountId:t,cache:n=h(),client:r,clientConfig:o,customRoleArn:a,identityPoolId:c,logins:u,userIdentifier:l=(u&&0!==Object.keys(u).length?void 0:"ANONYMOUS"),logger:d,parentClientConfig:p}=e;d?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const f=l?`aws:cognito-identity-credentials:${c}:${l}`:void 0;let m=async e=>{const{GetIdCommand:l,CognitoIdentityClient:h}=await Promise.resolve().then((function(){return ic})),y=t=>o?.[t]??p?.[t]??e?.callerClientConfig?.[t],S=r??new h(Object.assign({},o??{},{region:y("region"),profile:y("profile")}));let R=f&&await n.getItem(f);if(!R){const{IdentityId:e=g(d)}=await S.send(new l({AccountId:t,IdentityPoolId:c,Logins:u?await i(u):void 0}));R=e,f&&Promise.resolve(n.setItem(f,R)).catch((()=>{}))}return m=s({client:S,customRoleArn:a,logins:u,identityId:R}),m(e)};return e=>m(e).catch((async e=>{throw f&&Promise.resolve(n.removeItem(f)).catch((()=>{})),e}))}function g(e){throw new n("Response from Amazon Cognito contained no identity ID",{logger:e})}const m=e=>f({...e}),y=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}),S=e=>({httpHandler:e.httpHandler()});var R,w,v,E,C;(function(e){e.HEADER="header",e.QUERY="query"})(R||(R={})),function(e){e.HEADER="header",e.QUERY="query"}(w||(w={})),function(e){e.HTTP="http",e.HTTPS="https"}(v||(v={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(E||(E={})),function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"}(C||(C={}));const b="__smithy_context";var T,P;(function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"})(T||(T={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(P||(P={}));class A{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 A({...e,headers:{...e.headers}});return t.query&&(t.query=I(t.query)),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 A.clone(this)}}function I(e){return Object.keys(e).reduce(((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}}),{})}class x{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 O=e=>encodeURIComponent(e).replace(/[!'()*]/g,D),D=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function $(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=O(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${O(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${O(r)}`),t.push(e)}}return t.join("&")}function M(e,t){return new Request(e,t)}function L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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 k={supported:void 0};class N{static create(e){return"function"==typeof e?.handle?e:new N(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===k.supported&&(k.supported=Boolean("undefined"!=typeof Request&&"keepalive"in M("https://[::1]")))}destroy(){}async handle(e){let{abortSignal:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config||(this.config=await this.configProvider);const n=this.config.requestTimeout,r=!0===this.config.keepAlive,i=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let s=e.path;const o=$(e.query||{});o&&(s+=`?${o}`),e.fragment&&(s+=`#${e.fragment}`);let a="";null==e.username&&null==e.password||(a=`${e.username??""}:${e.password??""}@`);const{port:c,method:u}=e,l=`${e.protocol}//${a}${e.hostname}${c?`:${c}`:""}${s}`,d="GET"===u||"HEAD"===u?void 0:e.body,p={body:d,headers:new Headers(e.headers),method:u,credentials:i};this.config?.cache&&(p.cache=this.config.cache),d&&(p.duplex="half"),"undefined"!=typeof AbortController&&(p.signal=t),k.supported&&(p.keepalive=r),"function"==typeof this.config.requestInit&&Object.assign(p,this.config.requestInit(e));let h=()=>{};const f=M(l,p),g=[fetch(f).then((e=>{const t=e.headers,n={};for(const e of t.entries())n[e[0]]=e[1];return null!=e.body?{response:new x({headers:n,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new x({headers:n,reason:e.statusText,statusCode:e.status,body:t})})))})),L(n)];return t&&g.push(new Promise(((e,n)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",n(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),h=()=>e.removeEventListener("abort",r)}else t.onabort=r}))),Promise.race(g).finally(h)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>(n[e]=t,n)))}httpHandlerConfigs(){return this.config??{}}}const _={},U=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);_[n]=e,U[e]=n}for(let e=0,t="a".charCodeAt(0),n="z".charCodeAt(0);e+t<=n;e++){const n=String.fromCharCode(e+t),r=e+26;_[n]=r,U[r]=n}for(let e=0;e<10;e++){_[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;_[t]=n,U[n]=t}_["+"]=62,U[62]="+",_["/"]=63,U[63]="/";const F=6,G=8,B=63,H=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let t=0;t<e.length;t+=4){let n=0,i=0;for(let r=t,s=t+3;r<=s;r++)if("="!==e[r]){if(!(e[r]in _))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);n|=_[e[r]]<<(s-r)*F,i+=F}else n>>=F;const s=t/4*3;n>>=i%G;const o=Math.floor(i/G);for(let e=0;e<o;e++){const t=(o-e-1)*G;r.setUint8(s+e,(n&255<<t)>>t)}}return new Uint8Array(n)},z=e=>(new TextEncoder).encode(e);function j(e){let t;t="string"==typeof e?z(e):e;const n="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let n=0,r=0;for(let i=e,s=Math.min(e+3,t.length);i<s;i++)n|=t[i]<<(s-i-1)*G,r+=G;const s=Math.ceil(r/F);n<<=s*F-r;for(let e=1;e<=s;e++){const t=(s-e)*F;i+=U[(n&B<<t)>>t]}i+="==".slice(0,4-s)}return i}const q=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):V(e):W(e);async function V(e){const t=await K(e),n=H(t);return new Uint8Array(n)}async function W(e){const t=[],n=e.getReader();let r=!1,i=0;for(;!r;){const{done:e,value:s}=await n.read();s&&(t.push(s),i+=s.length),r=e}const s=new Uint8Array(i);let o=0;for(const e of t)s.set(e,o),o+=e.length;return s}function K(e){return new Promise(((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return n(new Error("Reader aborted too early"));const e=r.result??"",i=e.indexOf(","),s=i>-1?i+1:e.length;t(e.substring(s))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)}))}const Q=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},Z=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Y=()=>{let e=[],t=[],n=!1;const r=new Set,i=e=>e.sort(((e,t)=>J[t.step]-J[e.step]||X[t.priority||"normal"]-X[e.priority||"normal"])),s=n=>{let i=!1;const s=e=>{const t=Q(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(s),t=t.filter(s),i},o=n=>{let i=!1;const s=e=>{if(e.middleware===n){i=!0;for(const t of Q(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(s),t=t.filter(s),i},a=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(l.identifyOnResolve()),n),c=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t},u=function(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const r=[],s=[],o={};return e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Q(t.name,t.aliases))o[e]=t;r.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of Q(t.name,t.aliases))o[e]=t;s.push(t)})),s.forEach((e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${Z(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),i(r).map(c).reduce(((e,t)=>(e.push(...t),e)),[])},l={add:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{name:i,override:s,aliases:o}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=Q(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${Z(i,o)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${Z(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${Z(i,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:s,aliases:o}=n,a={middleware:e,...n},c=Q(i,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!s)throw new Error(`Duplicate middleware name '${Z(i,o)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${Z(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${Z(i,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>a(Y()),use:e=>{e.applyToStack(l)},remove:e=>"string"==typeof e?s(e):o(e),removeByTag:n=>{let i=!1;const s=e=>{const{tags:t,name:s,aliases:o}=e;if(t&&t.includes(n)){const e=Q(s,o);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(s),t=t.filter(s),i},concat:e=>{const t=a(Y());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:a,identify:()=>u(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Z(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of u().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(l.identify()),e}};return l},J={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},X={high:3,normal:2,low:1};class ee{constructor(e){this.config=e,this.middlewareStack=Y()}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n;let s;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?s=t.get(e.constructor):(s=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,s))}else delete this.handlers,s=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return s(e).then((e=>e.output));s(e).then((e=>i(null,e.output)),(e=>i(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const te=e=>(new TextEncoder).encode(e),ne=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 re(e){return"base64"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8")?j(e):ne(e)}function ie(e,t){return"base64"===t?se.mutate(H(e)):se.mutate(te(e))}class se extends Uint8Array{static fromString(e){if("string"==typeof e)return ie(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8");throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,se.prototype),e}transformToString(){return re(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"utf-8")}}const oe={},ae={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),oe[e]=t,ae[t]=e}function ce(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 r=e.slice(n,n+2).toLowerCase();if(!(r in ae))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=ae[r]}return t}function ue(e){let t="";for(let n=0;n<e.byteLength;n++)t+=oe[e[n]];return t}const le=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array,t=arguments.length>1?arguments[1]:void 0;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)};class de{constructor(){this.middlewareStack=Y()}static classBuilder(){return new pe}resolveMiddlewareWithContext(e,t,n,r){let{middlewareFn:i,clientName:s,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:l,CommandCtor:d}=r;for(const r of i.bind(this)(d,e,t,n))this.middlewareStack.use(r);const p=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:s,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[b]:{commandInstance:this,...u},...l},{requestHandler:g}=t;return p.resolve((e=>g.handle(e.request,n||{})),f)}}class pe{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){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._smithyContext={service:e,operation:t,...n},this}c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>e,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]: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 de{static getEndpointParameterInstructions(){return e._ep}constructor(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let[i]=n;super(),this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=i??{},e._init(this)}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const he="***SensitiveInformation***",fe=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&ve.warn(we(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},ge=(e,t)=>{if(null==e)throw new TypeError("Expected a non-null value");return e},me=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return ve.warn(we(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},ye=e=>fe("string"==typeof e?Re(e):e),Se=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Re=e=>{const t=e.match(Se);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},we=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),ve={warn:console.warn},Ee=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=ye(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))};class Ce extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Ce.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Ce?Ce.isInstance(e):!!Ce.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const be=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.entries(t).filter((e=>{let[,t]=e;return void 0!==t})).forEach((t=>{let[n,r]=t;null!=e[n]&&""!==e[n]||(e[n]=r)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Te=e=>{let{output:t,parsedBody:n,exceptionCtor:r,errorCode:i}=e;const s=Ae(t),o=s.httpStatusCode?s.httpStatusCode+"":void 0,a=new r({name:n?.code||n?.Code||i||o||"UnknownError",$fault:"client",$metadata:s});throw be(a,n)},Pe=e=>t=>{let{output:n,parsedBody:r,errorCode:i}=t;Te({output:n,parsedBody:r,exceptionCtor:e,errorCode:i})},Ae=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"]}),Ie=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{}}},xe=e=>{const t=[];for(const n in E){const r=E[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}},Oe=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},De=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}),$e=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},Me=e=>Object.assign(xe(e),De(e)),Le=e=>Object.assign(Oe(e),$e(e));class ke{trace(){}debug(){}info(){}warn(){}error(){}}const Ne=(e,t)=>{const n={};for(const r in t)_e(n,e,t,r);return n},_e=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[s=Ue,o=Fe,a=r]=i;return void(("function"==typeof s&&s(t[a])||"function"!=typeof s&&s)&&(e[r]=o(t[a])))}let[i,s]=n[r];if("function"==typeof s){let t;const n=void 0===i&&null!=(t=s()),o="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:o&&(e[r]=s())}else{const t=void 0===i&&null!=s,n="function"==typeof i&&!!i(s)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=s)}},Ue=e=>null!=e,Fe=e=>e,Ge=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(Ge);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=Ge(e[n]));return t}return e},Be=e=>e[b]||(e[b]={}),He=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},ze=(e,t)=>{if(!t||0===t.length)return e;const n=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&n.push(t);for(const t of e)n.find((e=>{let{schemeId:n}=e;return n===t.schemeId}))||n.push(t);return n};function je(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const qe=(e,t)=>(n,r)=>async i=>{const s=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),o=e.authSchemePreference?await e.authSchemePreference():[],a=ze(s,o),c=je(e.httpAuthSchemes),u=Be(r),l=[];for(const n of a){const i=c.get(n.schemeId);if(!i){l.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const s=i.identityProvider(await t.identityProviderConfigProvider(e));if(!s){l.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:o={},signingProperties:a={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},o),n.signingProperties=Object.assign(n.signingProperties||{},a),u.selectedHttpAuthScheme={httpAuthOption:n,identity:await s(n.identityProperties),signer:i.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(l.join("\n"));return n(i)},Ve={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},We=(e,t)=>{let{httpAuthSchemeParametersProvider:n,identityProviderConfigProvider:r}=t;return{applyToStack:t=>{t.addRelativeTo(qe(e,{httpAuthSchemeParametersProvider:n,identityProviderConfigProvider:r}),Ve)}}},Ke=(e,t)=>(n,r)=>async i=>{const{response:s}=await n(i);try{return{response:s,output:await t(s,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:s}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){r.logger&&"NoOpLogger"!==r.logger?.constructor?.name?r.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText)}throw e}},Qe=(e,t)=>(n,r)=>async i=>{const s=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint;if(!s)throw new Error("No valid endpoint provider available.");const o=await t(i.input,{...e,endpoint:s});return n({...i,request:o})},Ze={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Ye={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Je(e,t,n){return{applyToStack:r=>{r.add(Ke(e,n),Ze),r.add(Qe(e,t),Ye)}}}Ye.name;const Xe=e=>e=>{throw e},et=(e,t)=>{},tt=e=>(e,t)=>async n=>{if(!A.isInstance(n.request))return e(n);const r=Be(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:s,signer:o}=r,a=await e({...n,request:await o.sign(n.request,s,i)}).catch((o.errorHandler||Xe)(i));return(o.successHandler||et)(a.response,i),a},nt={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},rt=e=>({applyToStack:e=>{e.addRelativeTo(tt(),nt)}}),it=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};function st(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}class ot{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)}}class at{async sign(e,t,n){return e}}const ct=e=>t=>dt(t)&&t.expiration.getTime()-Date.now()<e,ut=3e5,lt=ct(ut),dt=e=>void 0!==e.expiration,pt=(e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,s,o,a=!1;const c=async e=>{s||(s=r(e));try{i=await s,o=!0,a=!1}finally{s=void 0}return i};return void 0===t?async e=>(o&&!e?.forceRefresh||(i=await c(e)),i):async e=>(o&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))};function ht(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(t,n){function s(e){try{a(r.next(e))}catch(e){n(e)}}function o(e){try{a(r.throw(e))}catch(e){n(e)}}function a(e){e.done?t(e.value):i(e.value).then(s,o)}a((r=r.apply(e,[])).next())}))}function ft(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}"function"==typeof SuppressedError&&SuppressedError;var gt=64,mt=32,yt=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]),St=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],Rt=Math.pow(2,53)-1,wt=function(){function e(){this.state=Int32Array.from(St),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>Rt)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===gt&&(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%gt>=gt-8){for(var r=this.bufferLength;r<gt;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<gt-8;r++)t.setUint8(r,0);t.setUint32(gt-8,Math.floor(e/4294967296),!0),t.setUint32(gt-4,e),this.hashBuffer(),this.finished=!0}var i=new Uint8Array(mt);for(r=0;r<8;r++)i[4*r]=this.state[r]>>>24&255,i[4*r+1]=this.state[r]>>>16&255,i[4*r+2]=this.state[r]>>>8&255,i[4*r+3]=this.state[r]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,n=e.state,r=n[0],i=n[1],s=n[2],o=n[3],a=n[4],c=n[5],u=n[6],l=n[7],d=0;d<gt;d++){if(d<16)this.temp[d]=(255&t[4*d])<<24|(255&t[4*d+1])<<16|(255&t[4*d+2])<<8|255&t[4*d+3];else{var p=this.temp[d-2],h=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,f=((p=this.temp[d-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(f+this.temp[d-16]|0)}var g=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&c^~a&u)|0)+(l+(yt[d]+this.temp[d]|0)|0)|0,m=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i^r&s^i&s)|0;l=u,u=c,c=a,a=o+g|0,o=s,s=i,i=r,r=g+m|0}n[0]+=r,n[1]+=i,n[2]+=s,n[3]+=o,n[4]+=a,n[5]+=c,n[6]+=u,n[7]+=l},e}();const vt=e=>(new TextEncoder).encode(e);var Et="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:vt;function Ct(e){return e instanceof Uint8Array?e:"string"==typeof e?Et(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function bt(e){return"string"==typeof e?0===e.length:0===e.byteLength}var Tt=function(){function e(e){this.secret=e,this.hash=new wt,this.reset()}return e.prototype.update=function(e){if(!bt(e)&&!this.error)try{this.hash.update(Ct(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 ht(this,void 0,void 0,(function(){return ft(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new wt,this.secret){this.outer=new wt;var e=Pt(this.secret),t=new Uint8Array(gt);t.set(e);for(var n=0;n<gt;n++)e[n]^=54,t[n]^=92;for(this.hash.update(e),this.outer.update(t),n=0;n<e.byteLength;n++)e[n]=0}},e}();function Pt(e){var t=Ct(e);if(t.byteLength>gt){var n=new wt;n.update(t),t=n.digest()}var r=new Uint8Array(gt);return r.set(t),r}var At=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const It="X-Amz-Algorithm",xt="X-Amz-Date",Ot="X-Amz-Credential",Dt="X-Amz-Signature",$t="X-Amz-SignedHeaders",Mt="X-Amz-Security-Token",Lt="host",kt="aws4_request",Nt="AWS4-HMAC-SHA256",_t="AWS4",Ut="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";class Ft{static signUrl(e,t,n,r){let i;const s={body:i,method:"GET",url:new URL(e)},o=Gt(e,t,n,r);return Bt(s,o).toString()}}const Gt=(e,t,n,r)=>{const{access_key:i,secret_key:s,session_token:o}=null!=r?r:{};return{credentials:{accessKeyId:i,secretAccessKey:s,sessionToken:o},signingDate:new Date,signingRegion:t,signingService:n}},Bt=(e,t)=>{let{body:n,method:r="GET",url:i}=e;var s=At(t,[]);const o=Ht(s),{accessKeyId:a,credentialScope:c,longDate:u,sessionToken:l}=o,d=new URL(i);Object.entries(Object.assign({[It]:Nt,[Ot]:`${a}/${c}`,[xt]:u,[$t]:Lt},l&&{[Mt]:l})).forEach((e=>{let[t,n]=e;d.searchParams.append(t,n)}));const p={body:n,headers:{[Lt]:i.host},method:r,url:d},h=qt(p,o);return d.searchParams.append(Dt,h),d},Ht=e=>{let{credentials:t,signingDate:n=new Date,signingRegion:r,signingService:i,uriEscapePath:s=!0}=e;const{accessKeyId:o,secretAccessKey:a,sessionToken:c}=t,{longDate:u,shortDate:l}=zt(n);return{accessKeyId:o,credentialScope:jt(l,r,i),longDate:u,secretAccessKey:a,sessionToken:c,shortDate:l,signingRegion:r,signingService:i,uriEscapePath:s}},zt=e=>{const t=e.toISOString().replace(/[:-]|\.\d{3}/g,"");return{longDate:t,shortDate:t.slice(0,8)}},jt=(e,t,n)=>`${e}/${t}/${n}/${kt}`,qt=(e,t)=>{let{credentialScope:n,longDate:r,secretAccessKey:i,shortDate:s,signingRegion:o,signingService:a,uriEscapePath:c}=t;const u=Vt(e,c),l=tn(null,u),d=nn(r,n,l);return tn(rn(i,s,o,a),d)},Vt=function(e){let{body:t,headers:n,method:r,url:i}=e,s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return[r,Wt(i.pathname,s),Kt(i.searchParams),Yt(n),Jt(n),Xt()].join("\n")},Wt=function(e){return e?arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:encodeURIComponent(e).replace(/%2F/g,"/"):"/"},Kt=e=>Array.from(e).sort(((e,t)=>{let[n,r]=e,[i,s]=t;return n===i?r<s?-1:1:n<i?-1:1})).map((e=>{let[t,n]=e;return`${Qt(t)}=${Qt(n)}`})).join("&"),Qt=e=>encodeURIComponent(e).replace(/[!'()*]/g,Zt),Zt=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,Yt=e=>Object.entries(e).map((e=>{let[t,n]=e;var r;return{key:t.toLowerCase(),value:null!==(r=null==n?void 0:n.trim().replace(/\s+/g," "))&&void 0!==r?r:""}})).sort(((e,t)=>e.key<t.key?-1:1)).map((e=>`${e.key}:${e.value}\n`)).join(""),Jt=e=>Object.keys(e).map((e=>e.toLowerCase())).sort().join(";"),Xt=e=>Ut,en=(e,t)=>{const n=new Tt(null!=e?e:void 0);return n.update(t),n.digestSync()},tn=(e,t)=>ue(en(e,t)),nn=(e,t,n)=>[Nt,e,t,n].join("\n"),rn=(e,t,n,r)=>{const i=en(`${_t}${e}`,t),s=en(i,n),o=en(s,r);return en(o,kt)};async function sn(e,t){const n=e.split(":")[0],r=m(Object.assign(Object.assign({},t||{}),{identityPoolId:e,clientConfig:Object.assign(Object.assign({},t&&t.clientConfig?t.clientConfig:{}),{region:n})}));let i;async function s(){i=await r();let e=36e5;i.expiration&&(e=i.expiration.getTime()-(new Date).getTime()),setTimeout(s,e-6e4)}await s();const o={credentials:r,region:n};return{getMapAuthenticationOptions:()=>({transformRequest:(e,t)=>{if(e.match(/^https:\/\/maps\.(geo|geo-fips)\.[a-z0-9-]+\.(amazonaws\.com|api\.aws)/)){const r=new URL(e).pathname.split("/").filter(Boolean);let s="geo-maps";if("v2"==(null==r?void 0:r[0])){if(!t||"Tile"!==t)return{url:e}}else s="geo";return{url:Ft.signUrl(e,n,s,{access_key:i.accessKeyId,secret_key:i.secretAccessKey,session_token:i.sessionToken})}}return{url:e}}}),getLocationClientConfig:()=>o,getClientConfig:()=>o,getCredentials:()=>i}}function on(e,t){const n={signer:{sign:async t=>{var n;return t.query=Object.assign({key:e},null!==(n=t.query)&&void 0!==n?n:{}),t}},credentials:async()=>({})};return t&&(n.region=t),{getLocationClientConfig:()=>n,getClientConfig:()=>n}}function an(e){return e}const cn=e=>t=>async n=>{if(!A.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)},un={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},ln=e=>({applyToStack:t=>{t.add(cn(e),un)}}),dn=()=>(e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:s,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,l=c??t.inputFilterSensitiveLog,d=u??t.outputFilterSensitiveLog,{$metadata:p,...h}=r.output;return o?.info?.({clientName:i,commandName:s,input:l(n.input),output:d(h),metadata:p}),r}catch(e){const{clientName:r,commandName:i,logger:s,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw s?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}},pn={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},hn=e=>({applyToStack:e=>{e.add(dn(),pn)}}),fn="X-Amzn-Trace-Id",gn="AWS_LAMBDA_FUNCTION_NAME",mn="_X_AMZN_TRACE_ID",yn=e=>t=>async n=>{const{request:r}=n;if(!A.isInstance(r)||"node"!==e.runtime)return t(n);const i=Object.keys(r.headers??{}).find((e=>e.toLowerCase()===fn.toLowerCase()))??fn;if(r.headers.hasOwnProperty(i))return t(n);const s=process.env[gn],o=process.env[mn],a=e=>"string"==typeof e&&e.length>0;return a(s)&&a(o)&&(r.headers[fn]=o),t({...n,request:r})},Sn={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Rn=e=>({applyToStack:t=>{t.add(yn(e),Sn)}}),wn=void 0;function vn(e){return void 0===e||"string"==typeof e&&e.length<=50}function En(e){const t=it(e.userAgentAppId??wn),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:"string"==typeof n?[[n]]:n,userAgentAppId:async()=>{const n=await t();if(!vn(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 Cn{constructor(e){let{size:t,params:n}=e;this.data=new Map,this.parameters=[],this.capacity=t??50,n&&(this.parameters=n)}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:r}=e.next();if(this.data.delete(n),r||++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 r of n){const n=String(e[r]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}const bn=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}$"),Tn=e=>bn.test(e)||e.startsWith("[")&&e.endsWith("]"),Pn=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),An=function(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return Pn.test(e);const t=e.split(".");for(const e of t)if(!An(e))return!1;return!0},In={},xn="endpoints";function On(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${On(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(On).join(", ")})`:JSON.stringify(e,null,2)}class Dn extends Error{constructor(e){super(e),this.name="EndpointError"}}const $n=(e,t)=>e===t,Mn=e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new Dn(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new Dn(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n},Ln=(e,t)=>Mn(t).reduce(((n,r)=>{if("object"!=typeof n)throw new Dn(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]}),e),kn=e=>null!=e,Nn=e=>!e,_n={[v.HTTP]:80,[v.HTTPS]:443},Un=e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:s={}}=e,o=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return o.search=Object.entries(s).map((e=>{let[t,n]=e;return`${t}=${n}`})).join("&"),o}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:r,hostname:i,pathname:s,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(v).includes(c))return null;const u=Tn(i);return{scheme:c,authority:`${r}${n.includes(`${r}:${_n[c]}`)||"string"==typeof e&&e.includes(`${r}:${_n[c]}`)?`:${_n[c]}`:""}`,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:u}},Fn=(e,t)=>e===t,Gn=(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),Bn=e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),Hn={booleanEquals:$n,getAttr:Ln,isSet:kn,isValidHostLabel:An,not:Nn,parseURL:Un,stringEquals:Fn,substring:Gn,uriEncode:Bn},zn=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const s=e.indexOf("}",t);if(-1===s){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[s+1]&&(n.push(e.slice(t+1,s)),i=s+2);const o=e.substring(t+1,s);if(o.includes("#")){const[e,t]=o.split("#");n.push(Ln(r[e],t))}else n.push(r[o]);i=s+1}return n.join("")},jn=(e,t)=>{let{ref:n}=e;return{...t.endpointParams,...t.referenceRecord}[n]},qn=(e,t,n)=>{if("string"==typeof e)return zn(e,n);if(e.fn)return Vn(e,n);if(e.ref)return jn(e,n);throw new Dn(`'${t}': ${String(e)} is not a string, function or reference.`)},Vn=(e,t)=>{let{fn:n,argv:r}=e;const i=r.map((e=>["boolean","number"].includes(typeof e)?e:qn(e,"arg",t))),s=n.split(".");return s[0]in In&&null!=s[1]?In[s[0]][s[1]](...i):Hn[n](...i)},Wn=(e,t)=>{let{assign:n,...r}=e;if(n&&n in t.referenceRecord)throw new Dn(`'${n}' is already defined in Reference Record.`);const i=Vn(r,t);return t.logger?.debug?.(`${xn} evaluateCondition: ${On(r)} = ${On(i)}`),{result:""===i||!!i,...null!=n&&{toAssign:{name:n,value:i}}}},Kn=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;const n={};for(const r of e){const{result:e,toAssign:i}=Wn(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(`${xn} assign: ${i.name} := ${On(i.value)}`))}return{result:!0,referenceRecord:n}},Qn=(e,t)=>Object.entries(e).reduce(((e,n)=>{let[r,i]=n;return{...e,[r]:i.map((e=>{const n=qn(e,"Header value entry",t);if("string"!=typeof n)throw new Dn(`Header '${r}' value '${n}' is not a string`);return n}))}}),{}),Zn=(e,t)=>{if(Array.isArray(e))return e.map((e=>Zn(e,t)));switch(typeof e){case"string":return zn(e,t);case"object":if(null===e)throw new Dn(`Unexpected endpoint property: ${e}`);return Yn(e,t);case"boolean":return e;default:throw new Dn("Unexpected endpoint property type: "+typeof e)}},Yn=(e,t)=>Object.entries(e).reduce(((e,n)=>{let[r,i]=n;return{...e,[r]:Zn(i,t)}}),{}),Jn=(e,t)=>{const n=qn(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 Dn("Endpoint URL must be a string, got "+typeof n)},Xn=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:s}=Kn(n,t);if(!i)return;const o={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${xn} Resolving endpoint from template: ${On(r)}`),{...null!=u&&{headers:Qn(u,o)},...null!=c&&{properties:Yn(c,o)},url:Jn(a,o)}},er=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:s}=Kn(n,t);if(i)throw new Dn(qn(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))},tr=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:s}=Kn(n,t);if(i)return nr(r,{...t,referenceRecord:{...t.referenceRecord,...s}})},nr=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=Xn(n,t);if(e)return e}else if("error"===n.type)er(n,t);else{if("tree"!==n.type)throw new Dn(`Unknown endpoint rule: ${n}`);{const e=tr(n,t);if(e)return e}}throw new Dn("Rules evaluation failed")},rr=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:s}=e;t.logger?.debug?.(`${xn} Initial EndpointParams: ${On(n)}`);const o=Object.entries(i).filter((e=>{let[,t]=e;return null!=t.default})).map((e=>{let[t,n]=e;return[t,n.default]}));if(o.length>0)for(const[e,t]of o)n[e]=n[e]??t;const a=Object.entries(i).filter((e=>{let[,t]=e;return t.required})).map((e=>{let[t]=e;return t}));for(const e of a)if(null==n[e])throw new Dn(`Missing required parameter: '${e}'`);const c=nr(s,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${xn} Resolved endpoint: ${On(c)}`),c},ir=function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){for(const t of e.split("."))if(!ir(t))return!1;return!0}return!(!An(e)||e.length<3||e.length>63||e!==e.toLowerCase()||Tn(e))},sr=":",or="/",ar=e=>{const t=e.split(sr);if(t.length<6)return null;const[n,r,i,s,o,...a]=t;return"arn"!==n||""===r||""===i||""===a.join(sr)?null:{partition:r,service:i,region:s,accountId:o,resourceId:a.map((e=>e.split(or))).flat()}};var cr=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"amazonaws.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}}],ur={partitions:cr};let lr=ur;const dr=e=>{const{partitions:t}=lr;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}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}},pr={isVirtualHostableS3Bucket:ir,parseArn:ar,partition:dr};function hr(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function fr(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}In.aws=pr;const gr=e=>x.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,mr=e=>new Date(Date.now()+e),yr=(e,t)=>Math.abs(mr(t).getTime()-e)>=3e5,Sr=(e,t)=>{const n=Date.parse(e);return yr(n,t)?n-Date.now():t},Rr=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},wr=async e=>{const t=Rr("context",e.context),n=Rr("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=Rr("signer",n.signer),s=await i(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:s,signingRegion:o,signingRegionSet:a,signingName:c}};class vr{async sign(e,t,n){if(!A.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await wr(n),{config:i,signer:s}=r;let{signingRegion:o,signingName:a}=r;const c=n.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,a=t?.signingName??a)}return await s.sign(e,{signingDate:mr(i.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const n=t.ServerTime??gr(t.$response);if(n){const r=Rr("config",e.config),i=r.systemClockOffset;r.systemClockOffset=Sr(n,r.systemClockOffset),r.systemClockOffset!==i&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=gr(e);if(n){const e=Rr("config",t.config);e.systemClockOffset=Sr(n,e.systemClockOffset)}}}const Er=e=>(new TextEncoder).encode(e),Cr=e=>"string"==typeof e?Er(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),br="X-Amz-Algorithm",Tr="X-Amz-Credential",Pr="X-Amz-Date",Ar="X-Amz-SignedHeaders",Ir="X-Amz-Expires",xr="X-Amz-Signature",Or="X-Amz-Security-Token",Dr="authorization",$r=Pr.toLowerCase(),Mr="date",Lr=[Dr,$r,Mr],kr=xr.toLowerCase(),Nr="x-amz-content-sha256",_r=Or.toLowerCase(),Ur={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},Fr=/^proxy-/,Gr=/^sec-/,Br="AWS4-HMAC-SHA256",Hr="AWS4-HMAC-SHA256-PAYLOAD",zr="UNSIGNED-PAYLOAD",jr=50,qr="aws4_request",Vr=604800,Wr={},Kr=[],Qr=(e,t,n)=>`${e}/${t}/${n}/${qr}`,Zr=async(e,t,n,r,i)=>{const s=`${n}:${r}:${i}:${ue(await Yr(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(s in Wr)return Wr[s];for(Kr.push(s);Kr.length>jr;)delete Wr[Kr.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,qr])o=await Yr(e,o,t);return Wr[s]=o},Yr=(e,t,n)=>{const r=new e(t);return r.update(Cr(n)),r.digest()},Jr=(e,t,n)=>{let{headers:r}=e;const i={};for(const e of Object.keys(r).sort()){if(null==r[e])continue;const s=e.toLowerCase();(s in Ur||t?.has(s)||Fr.test(s)||Gr.test(s))&&(!n||n&&!n.has(s))||(i[s]=r[e].trim().replace(/\s+/g," "))}return i},Xr=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),ei=async(e,t)=>{let{headers:n,body:r}=e;for(const e of Object.keys(n))if(e.toLowerCase()===Nr)return n[e];if(null==r)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof r||ArrayBuffer.isView(r)||Xr(r)){const e=new t;return e.update(Cr(r)),ue(await e.digest())}return zr};class ti{format(e){const t=[];for(const n of Object.keys(e)){const r=Er(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=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 r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(i.buffer);return s.set(e.value,3),s;case"string":const o=Er(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(ii.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!ri.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const l=new Uint8Array(17);return l[0]=9,l.set(ce(e.value.replace(/\-/g,"")),1),l}}}var ni;!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"}(ni||(ni={}));const ri=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class ii{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,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&si(t),new ii(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&si(e),parseInt(ue(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function si(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const oi=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},ai=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{headers:n,query:r={}}=A.clone(e);for(const e of Object.keys(n)){const i=e.toLowerCase();("x-amz-"===i.slice(0,6)&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}},ci=e=>{e=A.clone(e);for(const t of Object.keys(e.headers))Lr.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},ui=e=>{let{query:t={}}=e;const n=[],r={};for(const e of Object.keys(t)){if(e.toLowerCase()===kr)continue;const i=O(e);n.push(i);const s=t[e];"string"==typeof s?r[i]=`${i}=${O(s)}`:Array.isArray(s)&&(r[i]=s.slice(0).reduce(((e,t)=>e.concat([`${i}=${O(t)}`])),[]).sort().join("&"))}return n.sort().map((e=>r[e])).filter((e=>e)).join("&")},li=e=>di(e).toISOString().replace(/\.\d{3}Z$/,"Z"),di=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class pi{constructor(e){let{applyChecksum:t,credentials:n,region:r,service:i,sha256:s,uriEscapePath:o=!0}=e;this.service=i,this.sha256=s,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=He(r),this.credentialProvider=He(n)}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${ui(e)}\n${r.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n,r){const i=new this.sha256;return i.update(Cr(n)),`${r}\n${e}\n${t}\n${ue(await i.digest())}`}getCanonicalPath(e){let{path:t}=e;if(this.uriEscapePath){const e=[];for(const n of t.split("/"))0!==n?.length&&"."!==n&&(".."===n?e.pop():e.push(n));const n=`${t?.startsWith("/")?"/":""}${e.join("/")}${e.length>0&&t?.endsWith("/")?"/":""}`;return O(n).replace(/%2F/g,"/")}return t}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=li(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class hi extends pi{constructor(e){let{applyChecksum:t,credentials:n,region:r,service:i,sha256:s,uriEscapePath:o=!0}=e;super({applyChecksum:t,credentials:n,region:r,service:i,sha256:s,uriEscapePath:o}),this.headerFormatter=new ti}async presign(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:a,signingRegion:c,signingService:u}=t,l=await this.credentialProvider();this.validateResolvedCredentials(l);const d=c??await this.regionProvider(),{longDate:p,shortDate:h}=this.formatDate(n);if(r>Vr)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const f=Qr(h,d,u??this.service),g=ai(ci(e),{unhoistableHeaders:s,hoistableHeaders:a});l.sessionToken&&(g.query[Or]=l.sessionToken),g.query[br]=Br,g.query[Tr]=`${l.accessKeyId}/${f}`,g.query[Pr]=p,g.query[Ir]=r.toString(10);const m=Jr(g,i,o);return g.query[Ar]=this.getCanonicalHeaderList(m),g.query[xr]=await this.getSignature(p,f,this.getSigningKey(l,d,h,u),this.createCanonicalRequest(g,m,await ei(e,this.sha256))),g}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(e,t){let{headers:n,payload:r}=e,{signingDate:i=new Date,priorSignature:s,signingRegion:o,signingService:a}=t;const c=o??await this.regionProvider(),{shortDate:u,longDate:l}=this.formatDate(i),d=Qr(u,c,a??this.service),p=await ei({headers:{},body:r},this.sha256),h=new this.sha256;h.update(n);const f=ue(await h.digest()),g=[Hr,l,d,s,f,p].join("\n");return this.signString(g,{signingDate:i,signingRegion:c,signingService:a})}async signMessage(e,t){let{signingDate:n=new Date,signingRegion:r,signingService:i}=t;return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:n,signingRegion:r,signingService:i,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e){let{signingDate:t=new Date,signingRegion:n,signingService:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=await this.credentialProvider();this.validateResolvedCredentials(i);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(i,s,o,r));return a.update(Cr(e)),ue(await a.digest())}async signRequest(e){let{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=i??await this.regionProvider(),c=ci(e),{longDate:u,shortDate:l}=this.formatDate(t),d=Qr(l,a,s??this.service);c.headers[$r]=u,o.sessionToken&&(c.headers[_r]=o.sessionToken);const p=await ei(c,this.sha256);!oi(Nr,c.headers)&&this.applyChecksum&&(c.headers[Nr]=p);const h=Jr(c,r,n),f=await this.getSignature(u,d,this.getSigningKey(o,a,l,s),this.createCanonicalRequest(c,h,p));return c.headers[Dr]=`${Br} Credential=${o.accessKeyId}/${d}, SignedHeaders=${this.getCanonicalHeaderList(h)}, Signature=${f}`,c}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r,Br),s=new this.sha256(await n);return s.update(Cr(i)),ue(await s.digest())}getSigningKey(e,t,n,r){return Zr(this.sha256,e,n,t,r||this.service)}}const fi=e=>{let t,n=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(i){i&&i!==n&&i!==t&&(r=!0),n=i;const s=gi(e,{credentials:n,credentialDefaultProvider:e.credentialDefaultProvider}),o=mi(e,s);r&&!o.attributed?(t=async e=>o(e).then((e=>hr(e,"CREDENTIALS_CODE","e"))),t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0):t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=n;const{signingEscapePath:i=!0,systemClockOffset:s=e.systemClockOffset||0,sha256:o}=e;let a;return a=e.signer?it(e.signer):e.regionInfoProvider?()=>it(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((t=>{let[n,r]=t;const{signingRegion:s,signingService:a}=n;e.signingRegion=e.signingRegion||s||r,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||hi)(c)})):async t=>{const n=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await it(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||n,e.signingName=e.signingName||r||e.serviceId;const s={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:i};return new(e.signerConstructor||hi)(s)},Object.assign(e,{systemClockOffset:s,signingEscapePath:i,signer:a})};function gi(e,t){let n,{credentials:r,credentialDefaultProvider:i}=t;return n=r?r?.memoized?r:pt(r,lt,dt):i?it(i(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function mi(e,t){if(t.configBound)return t;const n=async n=>t({...n,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}const yi=(e,t)=>le(e,t).then((e=>t.utf8Encoder(e))),Si=(e,t)=>yi(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{}})),Ri=async(e,t)=>{const n=await Si(e,t);return n.message=n.message??n.Message,n},wi=(e,t)=>{const n=(e,t)=>Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase())),r=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=n(e.headers,"x-amzn-errortype");return void 0!==i?r(e.headers[i]):void 0!==t.code?r(t.code):void 0!==t.__type?r(t.__type):void 0};function vi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const Ei=/\d{12}\.ddb/;async function Ci(e,t,n){const r=n.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&fr(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const n=await t.retryStrategy();"function"==typeof n.acquireInitialRetryToken?n.constructor?.name?.includes("Adaptive")?fr(e,"RETRY_MODE_ADAPTIVE","F"):fr(e,"RETRY_MODE_STANDARD","E"):fr(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const n=e.endpointV2;switch(String(n?.url?.hostname).match(Ei)&&fr(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":fr(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":fr(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":fr(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const i=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const t=i;t.accountId&&fr(e,"RESOLVED_ACCOUNT_ID","T");for(const[n,r]of Object.entries(t.$source??{}))fr(e,n,r)}}const bi="user-agent",Ti="x-amz-user-agent",Pi=" ",Ai="/",Ii=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,xi=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,Oi="-",Di=1024;function $i(e){let t="";for(const n in e){const r=e[n];if(!(t.length+r.length+1<=Di))break;t.length?t+=","+r:t+=r}return t}const Mi=e=>(t,n)=>async r=>{const{request:i}=r;if(!A.isInstance(i))return t(r);const{headers:s}=i,o=n?.userAgent?.map(Li)||[],a=(await e.defaultUserAgentProvider()).map(Li);await Ci(n,e,r);const c=n;a.push(`m/${$i(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Li)||[],l=await e.userAgentAppId();l&&a.push(Li([`app/${l}`]));const d=[].concat([...a,...o,...u]).join(Pi),p=[...a.filter((e=>e.startsWith("aws-sdk-"))),...u].join(Pi);return"browser"!==e.runtime?(p&&(s[Ti]=s[Ti]?`${s[bi]} ${p}`:p),s[bi]=d):s[Ti]=d,t({...r,request:i})},Li=e=>{const t=e[0].split(Ai).map((e=>e.replace(Ii,Oi))).join(Ai),n=e[1]?.replace(xi,Oi),r=t.indexOf(Ai),i=t.substring(0,r);let s=t.substring(r+1);return"api"===i&&(s=s.toLowerCase()),[i,s,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}`}}),"")},ki={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Ni=e=>({applyToStack:t=>{t.add(Mi(e),ki)}});var _i;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(_i||(_i={}));const Ui=!1,Fi=!1,Gi=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Bi=e=>Gi(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Hi=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if("string"==typeof t)return Bi(t);const e=await t();return Bi(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Gi(e)||("function"!=typeof n?Promise.resolve(!!n):n())}})},zi="content-length";function ji(e){return t=>async n=>{const r=n.request;if(A.isInstance(r)){const{body:t,headers:n}=r;if(t&&-1===Object.keys(n).map((e=>e.toLowerCase())).indexOf(zi))try{const n=e(t);r.headers={...r.headers,[zi]:String(n)}}catch(e){}}return t({...n,request:r})}}const qi={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Vi=e=>({applyToStack:t=>{t.add(ji(e.bodyLengthChecker),qi)}}),Wi=async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Ji(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Yi(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},Ki=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Qi=/(\d+\.){3}\d+/,Zi=/\.\./,Yi=e=>Ki.test(e)&&!Qi.test(e)&&!Zi.test(e),Ji=e=>{const[t,n,r,,,i]=e.split(":"),s="arn"===t&&e.split(":").length>=6,o=Boolean(s&&n&&r&&i);if(s&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},Xi=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};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 r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r},es=async e=>{};function ts(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}const ns=e=>{if("string"==typeof e)return ns(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:s}=e;let o;return s&&(o=ts(s)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:o}},rs=e=>"object"==typeof e?"url"in e?ns(e.url):e:ns(e),is=async(e,t,n,r)=>{if(!n.endpoint){let e;e=n.serviceConfiguredEndpoint?await n.serviceConfiguredEndpoint():await es(n.serviceId),e&&(n.endpoint=()=>Promise.resolve(rs(e)))}const i=await ss(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)},ss=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,s]of Object.entries(i))switch(s.type){case"staticContextParams":r[t]=s.value;break;case"contextParams":r[t]=e[s.name];break;case"clientContextParams":case"builtInParams":r[t]=await Xi(s.name,t,n)();break;case"operationContextParams":r[t]=s.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await Wi(r),r},os=e=>{let{config:t,instructions:n}=e;return(e,r)=>async i=>{t.endpoint&&st(r,"ENDPOINT_OVERRIDE","N");const s=await is(i.input,{getEndpointParameterInstructions:()=>n},{...t},r);r.endpointV2=s,r.authSchemes=s.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=Be(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return e({...i})}},as={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Ye.name},cs=(e,t)=>({applyToStack:n=>{n.addRelativeTo(os({config:e,instructions:t}),as)}}),us=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:i}=e,s=null!=n?async()=>rs(await He(n)()):void 0,o=!!n,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:o,useDualstackEndpoint:He(r??!1),useFipsEndpoint:He(i??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=es(e.serviceId)),c),a};var ls;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(ls||(ls={}));const ds=3,ps=ls.STANDARD,hs=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],fs=["TimeoutError","RequestTimeout","RequestTimeoutException"],gs=[500,502,503,504],ms=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],ys=e=>e.$metadata?.clockSkewCorrected,Ss=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)},Rs=e=>429===e.$metadata?.httpStatusCode||hs.includes(e.name)||1==e.$retryable?.throttling,ws=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return ys(e)||fs.includes(e.name)||ms.includes(e?.code||"")||gs.includes(e.$metadata?.httpStatusCode||0)||Ss(e)||void 0!==e.cause&&t<=10&&ws(e.cause,t+1)},vs=e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!ws(e)}return!1};class Es{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=>Es.setTimeoutFn(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(),Rs(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))}}Es.setTimeoutFn=setTimeout;const Cs=100,bs=2e4,Ts=500,Ps=500,As=5,Is=10,xs=1,Os="amz-sdk-invocation-id",Ds="amz-sdk-request",$s=()=>{let e=Cs;return{computeNextBackoffDelay:t=>Math.floor(Math.min(bs,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}},Ms=e=>{let{retryDelay:t,retryCount:n,retryCost:r}=e;return{getRetryCount:()=>n,getRetryDelay:()=>Math.min(bs,t),getRetryCost:()=>r}};class Ls{constructor(e){this.maxAttempts=e,this.mode=ls.STANDARD,this.capacity=Ps,this.retryBackoffStrategy=$s(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Ms({retryDelay:Cs,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?Ts:Cs);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,s=this.getCapacityCost(n);return this.capacity-=s,Ms({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:s})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(Ps,this.capacity+(e.getRetryCost()??xs))}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 ${ds}`),ds}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?Is:As}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class ks{constructor(e,t){this.maxAttemptsProvider=e,this.mode=ls.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Es,this.standardRetryStrategy=new Ls(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 Ns;const _s=new Uint8Array(16);function Us(){if(!Ns&&(Ns="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ns))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ns(_s)}const Fs=[];for(let e=0;e<256;++e)Fs.push((e+256).toString(16).slice(1));function Gs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Fs[e[t+0]]+Fs[e[t+1]]+Fs[e[t+2]]+Fs[e[t+3]]+"-"+Fs[e[t+4]]+Fs[e[t+5]]+"-"+Fs[e[t+6]]+Fs[e[t+7]]+"-"+Fs[e[t+8]]+Fs[e[t+9]]+"-"+Fs[e[t+10]]+Fs[e[t+11]]+Fs[e[t+12]]+Fs[e[t+13]]+Fs[e[t+14]]+Fs[e[t+15]]}const Bs="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Hs={randomUUID:Bs};function zs(e,t,n){if(Hs.randomUUID&&!e)return Hs.randomUUID();const r=(e=e||{}).random||(e.rng||Us)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,Gs(r)}const js=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),qs=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,i=He(r??ds);return Object.assign(e,{maxAttempts:i,retryStrategy:async()=>t||(await He(n)()===ls.ADAPTIVE?new ks(i):new Ls(i))})},Vs=e=>e?.body instanceof ReadableStream,Ws=e=>(t,n)=>async r=>{let i=await e.retryStrategy();const s=await e.maxAttempts();if(!Ks(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),o=new Error,a=0,c=0;const{request:u}=r,l=A.isInstance(u);for(l&&(u.headers[Os]=zs());;)try{l&&(u.headers[Ds]=`attempt=${a+1}; max=${s}`);const{response:n,output:o}=await t(r);return i.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:n,output:o}}catch(t){const r=Qs(t);if(o=js(t),l&&Vs(u))throw(n.logger instanceof ke?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw o.$metadata||(o.$metadata={}),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,o}a=e.getRetryCount();const s=e.getRetryDelay();c+=s,await new Promise((e=>setTimeout(e,s)))}}},Ks=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Qs=e=>{const t={error:e,errorType:Zs(e)},n=Xs(e.$response);return n&&(t.retryAfterHint=n),t},Zs=e=>Rs(e)?"THROTTLING":ws(e)?"TRANSIENT":vs(e)?"SERVER_ERROR":"CLIENT_ERROR",Ys={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Js=e=>({applyToStack:t=>{t.add(Ws(e),Ys)}}),Xs=e=>{if(!x.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n):new Date(1e3*r)},eo=async(e,t,n)=>({operation:Be(t).operation,region:await He(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function to(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function no(e){return{schemeId:"smithy.api#noAuth"}}const ro=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":case"GetId":case"GetOpenIdToken":case"UnlinkIdentity":t.push(no());break;default:t.push(to(e))}return t},io=e=>{const t=fi(e);return Object.assign(t,{authSchemePreference:He(e.authSchemePreference??[])})},so=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),oo={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var ao="3.806.0",co={version:ao},uo={name:"SHA-256"},lo={name:"HMAC",hash:uo},po=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 ho={};function fo(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:ho}var go=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!bt(e)){var t=Ct(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 fo().crypto.subtle.sign(lo,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):bt(this.toHash)?Promise.resolve(po):Promise.resolve().then((function(){return fo().crypto.subtle.digest(uo,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){fo().crypto.subtle.importKey("raw",Ct(e.secret),lo,!1,["sign"]).then(t,n)})),this.key.catch((function(){})))},e}(),mo=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function yo(e){return!(!So(e)||"object"!=typeof e.crypto.subtle)&&Ro(e.crypto.subtle)}function So(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function Ro(e){return e&&mo.every((function(t){return"function"==typeof e[t]}))}var wo,vo=function(){function e(e){yo(fo())?this.hash=new go(e):this.hash=new Tt(e)}return e.prototype.update=function(e,t){this.hash.update(Ct(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),Eo={exports:{}};function Co(){return wo||(wo=1,function(e){!function(t,n){e.exports=n()}(0,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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 r=n(18),i=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,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(n),o=Math.max(i,s),a=0,c=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(a=o-Math.min(i,s)),o-=1;o>=a;){if(c[0][o]>c[1][o])return 1;if(c[0][o]===c[1][o]){if(o===a)return 0;o-=1}else if(c[0][o]<c[1][o])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var a=function(){var e=s[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){r[t]=e[t]}))};for(t=0,n=s.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,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 r,i=(r=n(91))&&r.__esModule?r:{default:r},s=n(18);function o(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,r.key,r)}}var a=function(){function e(){}var t,n,r;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 i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return s.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return s.ENGINE_MAP}},{key:"OS_MAP",get:function(){return s.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return s.PLATFORMS_MAP}}],(n=null)&&o(t.prototype,n),r&&o(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),s=c(n(94)),o=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var u=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(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.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(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.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(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.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(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.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={},r=0,i={},s=0;if(Object.keys(e).forEach((function(t){var o=e[t];"string"==typeof o?(i[t]=o,s+=1):"object"==typeof o&&(n[t]=o,r+=1)})),r>0){var o=Object.keys(n),c=a.default.find(o,(function(e){return t.isOS(e)}));if(c){var u=this.satisfies(n[c]);if(void 0!==u)return u}var l=a.default.find(o,(function(e){return t.isPlatform(e)}));if(l){var d=this.satisfies(n[l]);if(void 0!==d)return d}}if(s>0){var p=Object.keys(i),h=a.default.find(p,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-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=u,e.exports=t.default},92:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,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=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.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=i.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=i.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=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.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=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.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=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(s,e)||i.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=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.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=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.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=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.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=i.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=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(s,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:s.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:s.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:s.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=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:s.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:s.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:s.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.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=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:s.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:s.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},s=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},n=i.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:s.ENGINE_MAP.Presto},n=i.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:s.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})}))}(Eo)),Eo.exports}Eo.exports;var bo=vi(Co());const To=e=>{let{serviceId:t,clientVersion:n}=e;return async e=>{const r="undefined"!=typeof window&&window?.navigator?.userAgent?bo.parse(window.navigator.userAgent):void 0,i=[["aws-sdk-js",n],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];t&&i.push([`api/${t}`,n]);const s=await(e?.userAgentAppId?.());return s&&i.push([`app/${s}`]),i}},Po=e=>()=>Promise.reject(e),Ao="function"==typeof TextEncoder?new TextEncoder:null,Io=e=>{if("string"==typeof e){if(Ao)return Ao.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=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}`)},xo=e=>(new TextEncoder).encode(e),Oo=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)},Do="required",$o="fn",Mo="argv",Lo="ref",ko=!0,No="isSet",_o="booleanEquals",Uo="error",Fo="endpoint",Go="tree",Bo="PartitionResult",Ho="getAttr",zo="stringEquals",jo={[Do]:!1,type:"String"},qo={[Do]:!0,default:!1,type:"Boolean"},Vo={[Lo]:"Endpoint"},Wo={[$o]:_o,[Mo]:[{[Lo]:"UseFIPS"},!0]},Ko={[$o]:_o,[Mo]:[{[Lo]:"UseDualStack"},!0]},Qo={},Zo={[Lo]:"Region"},Yo={[$o]:Ho,[Mo]:[{[Lo]:Bo},"supportsFIPS"]},Jo={[Lo]:Bo},Xo={[$o]:_o,[Mo]:[!0,{[$o]:Ho,[Mo]:[Jo,"supportsDualStack"]}]},ea=[Wo],ta=[Ko],na=[Zo],ra={parameters:{Region:jo,UseDualStack:qo,UseFIPS:qo,Endpoint:jo},rules:[{conditions:[{[$o]:No,[Mo]:[Vo]}],rules:[{conditions:ea,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Uo},{conditions:ta,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Uo},{endpoint:{url:Vo,properties:Qo,headers:Qo},type:Fo}],type:Go},{conditions:[{[$o]:No,[Mo]:na}],rules:[{conditions:[{[$o]:"aws.partition",[Mo]:na,assign:Bo}],rules:[{conditions:[Wo,Ko],rules:[{conditions:[{[$o]:_o,[Mo]:[ko,Yo]},Xo],rules:[{conditions:[{[$o]:zo,[Mo]:[Zo,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:Qo,headers:Qo},type:Fo},{conditions:[{[$o]:zo,[Mo]:[Zo,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:Qo,headers:Qo},type:Fo},{conditions:[{[$o]:zo,[Mo]:[Zo,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:Qo,headers:Qo},type:Fo},{conditions:[{[$o]:zo,[Mo]:[Zo,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:Qo,headers:Qo},type:Fo},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qo,headers:Qo},type:Fo}],type:Go},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Uo}],type:Go},{conditions:ea,rules:[{conditions:[{[$o]:_o,[Mo]:[Yo,ko]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Qo,headers:Qo},type:Fo}],type:Go},{error:"FIPS is enabled but this partition does not support FIPS",type:Uo}],type:Go},{conditions:ta,rules:[{conditions:[Xo],rules:[{conditions:[{[$o]:zo,[Mo]:["aws",{[$o]:Ho,[Mo]:[Jo,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:Qo,headers:Qo},type:Fo},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Qo,headers:Qo},type:Fo}],type:Go},{error:"DualStack is enabled but this partition does not support DualStack",type:Uo}],type:Go},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:Qo,headers:Qo},type:Fo}],type:Go}],type:Go},{error:"Invalid Configuration: Missing Region",type:Uo}]},ia=ra,sa=new Cn({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),oa=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return sa.get(e,(()=>rr(ia,{endpointParams:e,logger:t.logger})))};In.aws=pr;const aa=e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??H,base64Encoder:e?.base64Encoder??j,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??oa,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ro,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new vr},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new at}],logger:e?.logger??new ke,serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??ns,utf8Decoder:e?.utf8Decoder??xo,utf8Encoder:e?.utf8Encoder??Oo}),ca=["in-region","cross-region","mobile","standard","legacy"],ua=function(){let{defaultsMode:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(la()?"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 ${ca.join(", ")}, got ${t}`)}}))},la=()=>{const e="undefined"!=typeof window&&window?.navigator?.userAgent?bo.parse(window.navigator.userAgent):void 0,t=e?.platform?.type;return"tablet"===t||"mobile"===t},da=e=>{const t=ua(e),n=()=>t().then(Ie),r=aa(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Io,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??To({serviceId:r.serviceId,clientVersion:co.version}),maxAttempts:e?.maxAttempts??ds,region:e?.region??Po("Region is missing"),requestHandler:N.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||ps),sha256:e?.sha256??vo,streamCollector:e?.streamCollector??q,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ui)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Fi))}},pa=e=>({setRegion(t){e.region=t},region:()=>e.region}),ha=e=>({region:e.region()}),fa=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=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){r=e},credentials:()=>r}},ga=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),ma=(e,t)=>{const n=Object.assign(pa(e),Me(e),y(e),fa(e));return t.forEach((e=>e.configure(n))),Object.assign(e,ha(n),Le(n),S(n),ga(n))};class ya extends ee{config;constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r]=t;const i=da(r||{});super(i),this.initConfig=i;const s=En(so(i)),o=qs(s),a=an(Hi(o)),c=us(a),u=io(c),l=ma(u,r?.extensions||[]);this.config=l,this.middlewareStack.use(Ni(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Vi(this.config)),this.middlewareStack.use(ln(this.config)),this.middlewareStack.use(hn(this.config)),this.middlewareStack.use(Rn(this.config)),this.middlewareStack.use(We(this.config,{httpAuthSchemeParametersProvider:eo,identityProviderConfigProvider:async e=>new ot({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(rt(this.config))}destroy(){super.destroy()}}class Sa extends Ce{constructor(e){super(e),Object.setPrototypeOf(this,Sa.prototype)}}class Ra extends Sa{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,Ra.prototype)}}class wa extends Sa{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,wa.prototype)}}class va extends Sa{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,va.prototype)}}class Ea extends Sa{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Ea.prototype)}}class Ca extends Sa{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Ca.prototype)}}class ba extends Sa{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,ba.prototype)}}class Ta extends Sa{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Ta.prototype)}}class Pa extends Sa{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,Pa.prototype)}}class Aa extends Sa{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,Aa.prototype)}}class Ia extends Sa{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,Ia.prototype)}}class xa extends Sa{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,xa.prototype)}}const Oa=e=>({...e,...e.Logins&&{Logins:he}}),Da=e=>({...e,...e.SecretKey&&{SecretKey:he}}),$a=e=>({...e,...e.Credentials&&{Credentials:Da(e.Credentials)}}),Ma=e=>({...e,...e.Logins&&{Logins:he}}),La=async(e,t)=>{const n=tc("GetCredentialsForIdentity");let r;return r=JSON.stringify(Ge(e)),ec(t,n,"/",void 0,r)},ka=async(e,t)=>{const n=tc("GetId");let r;return r=JSON.stringify(Ge(e)),ec(t,n,"/",void 0,r)},Na=async(e,t)=>{if(e.statusCode>=300)return Ua(e,t);const n=await Si(e.body,t);let r={};return r=Ya(n),{$metadata:Ja(e),...r}},_a=async(e,t)=>{if(e.statusCode>=300)return Ua(e,t);const n=await Si(e.body,t);let r={};return r=Ge(n),{$metadata:Ja(e),...r}},Ua=async(e,t)=>{const n={...e,body:await Ri(e.body,t)},r=wi(e,n.body);switch(r){case"InternalErrorException":case"com.amazonaws.cognitoidentity#InternalErrorException":throw await Ha(n);case"InvalidParameterException":case"com.amazonaws.cognitoidentity#InvalidParameterException":throw await ja(n);case"LimitExceededException":case"com.amazonaws.cognitoidentity#LimitExceededException":throw await qa(n);case"NotAuthorizedException":case"com.amazonaws.cognitoidentity#NotAuthorizedException":throw await Va(n);case"ResourceConflictException":case"com.amazonaws.cognitoidentity#ResourceConflictException":throw await Wa(n);case"TooManyRequestsException":case"com.amazonaws.cognitoidentity#TooManyRequestsException":throw await Qa(n);case"ResourceNotFoundException":case"com.amazonaws.cognitoidentity#ResourceNotFoundException":throw await Ka(n);case"ExternalServiceException":case"com.amazonaws.cognitoidentity#ExternalServiceException":throw await Ba(n);case"InvalidIdentityPoolConfigurationException":case"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException":throw await za(n);case"DeveloperUserAlreadyRegisteredException":case"com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException":throw await Ga(n);case"ConcurrentModificationException":case"com.amazonaws.cognitoidentity#ConcurrentModificationException":throw await Fa(n);default:const t=n.body;return Xa({output:e,parsedBody:t,errorCode:r})}},Fa=async(e,t)=>{const n=e.body,r=Ge(n),i=new xa({$metadata:Ja(e),...r});return be(i,n)},Ga=async(e,t)=>{const n=e.body,r=Ge(n),i=new Ia({$metadata:Ja(e),...r});return be(i,n)},Ba=async(e,t)=>{const n=e.body,r=Ge(n),i=new Pa({$metadata:Ja(e),...r});return be(i,n)},Ha=async(e,t)=>{const n=e.body,r=Ge(n),i=new Ra({$metadata:Ja(e),...r});return be(i,n)},za=async(e,t)=>{const n=e.body,r=Ge(n),i=new Aa({$metadata:Ja(e),...r});return be(i,n)},ja=async(e,t)=>{const n=e.body,r=Ge(n),i=new wa({$metadata:Ja(e),...r});return be(i,n)},qa=async(e,t)=>{const n=e.body,r=Ge(n),i=new va({$metadata:Ja(e),...r});return be(i,n)},Va=async(e,t)=>{const n=e.body,r=Ge(n),i=new Ea({$metadata:Ja(e),...r});return be(i,n)},Wa=async(e,t)=>{const n=e.body,r=Ge(n),i=new Ca({$metadata:Ja(e),...r});return be(i,n)},Ka=async(e,t)=>{const n=e.body,r=Ge(n),i=new Ta({$metadata:Ja(e),...r});return be(i,n)},Qa=async(e,t)=>{const n=e.body,r=Ge(n),i=new ba({$metadata:Ja(e),...r});return be(i,n)},Za=(e,t)=>Ne(e,{AccessKeyId:me,Expiration:e=>ge(Ee(fe(e))),SecretKey:me,SessionToken:me}),Ya=(e,t)=>Ne(e,{Credentials:e=>Za(e),IdentityId:me}),Ja=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"]}),Xa=Pe(Sa),ec=async(e,t,n,r,i)=>{const{hostname:s,protocol:o="https",port:a,path:c}=await e.endpoint(),u={protocol:o,hostname:s,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==i&&(u.body=i),new A(u)};function tc(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`AWSCognitoIdentityService.${e}`}}class nc extends(de.classBuilder().ep(oo).m((function(e,t,n,r){return[Je(n,this.serialize,this.deserialize),cs(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").f(Oa,$a).ser(La).de(Na).build()){}class rc extends(de.classBuilder().ep(oo).m((function(e,t,n,r){return[Je(n,this.serialize,this.deserialize),cs(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").f(Ma,void 0).ser(ka).de(_a).build()){}var ic=Object.freeze({__proto__:null,CognitoIdentityClient:ya,GetCredentialsForIdentityCommand:nc,GetIdCommand:rc})}(e)}(ag)),ag);const ug=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const lg=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-maps",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},dg={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var pg="3.986.0";const hg="required",fg="fn",gg="argv",mg="ref",yg="url",Sg="properties",Rg="headers",wg=!0,vg="isSet",Eg="booleanEquals",Cg="error",bg="endpoint",Tg="tree",Pg="PartitionResult",Ag={[hg]:!0,default:!1,type:"boolean"},Ig={[hg]:!1,type:"string"},xg={[mg]:"Endpoint"},Og={[fg]:Eg,[gg]:[{[mg]:"UseFIPS"},!0]},Dg={[fg]:Eg,[gg]:[{[mg]:"UseDualStack"},!0]},$g={},Mg={[fg]:"stringEquals",[gg]:[{[fg]:"getAttr",[gg]:[{[mg]:Pg},"name"]},"aws"]},Lg={[fg]:Eg,[gg]:[{[mg]:"UseFIPS"},!1]},kg={[fg]:Eg,[gg]:[{[mg]:"UseDualStack"},!1]},Ng={[yg]:"https://maps.geo.{Region}.{PartitionResult#dnsSuffix}/v2",[Sg]:{},[Rg]:{}},_g={[yg]:"https://maps.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[Sg]:{},[Rg]:{}},Ug={[yg]:"https://maps.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",[Sg]:{},[Rg]:{}},Fg={[yg]:"https://maps.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[Sg]:{},[Rg]:{}},Gg={[fg]:"stringEquals",[gg]:[{[fg]:"getAttr",[gg]:[{[mg]:Pg},"name"]},"aws-us-gov"]},Bg={[fg]:"getAttr",[gg]:[{[mg]:Pg},"supportsFIPS"]},Hg={[fg]:Eg,[gg]:[!0,{[fg]:"getAttr",[gg]:[{[mg]:Pg},"supportsDualStack"]}]},zg=[{[mg]:"Region"}],jg={parameters:{UseDualStack:Ag,UseFIPS:Ag,Endpoint:Ig,Region:Ig},rules:[{conditions:[{[fg]:vg,[gg]:[xg]}],rules:[{conditions:[Og],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Cg},{rules:[{conditions:[Dg],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Cg},{endpoint:{[yg]:xg,[Sg]:$g,[Rg]:$g},type:bg}],type:Tg}],type:Tg},{rules:[{conditions:[{[fg]:vg,[gg]:zg}],rules:[{conditions:[{[fg]:"aws.partition",[gg]:zg,assign:Pg}],rules:[{conditions:[Mg,Lg,kg],endpoint:Ng,type:bg},{conditions:[Mg,Og,Dg],endpoint:_g,type:bg},{conditions:[Mg,Og,kg],endpoint:Ug,type:bg},{conditions:[Mg,Lg,Dg],endpoint:Fg,type:bg},{conditions:[Gg,Lg,kg],endpoint:Ng,type:bg},{conditions:[Gg,Og,Dg],endpoint:_g,type:bg},{conditions:[Gg,Og,kg],endpoint:Ug,type:bg},{conditions:[Gg,Lg,Dg],endpoint:Fg,type:bg},{conditions:[Og,Dg],rules:[{conditions:[{[fg]:Eg,[gg]:[wg,Bg]},Hg],rules:[{endpoint:{[yg]:"https://geo-maps-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[Sg]:$g,[Rg]:$g},type:bg}],type:Tg},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Cg}],type:Tg},{conditions:[Og,kg],rules:[{conditions:[{[fg]:Eg,[gg]:[Bg,wg]}],rules:[{endpoint:{[yg]:"https://geo-maps-fips.{Region}.{PartitionResult#dnsSuffix}",[Sg]:$g,[Rg]:$g},type:bg}],type:Tg},{error:"FIPS is enabled but this partition does not support FIPS",type:Cg}],type:Tg},{conditions:[Lg,Dg],rules:[{conditions:[Hg],rules:[{endpoint:{[yg]:"https://geo-maps.{Region}.{PartitionResult#dualStackDnsSuffix}",[Sg]:$g,[Rg]:$g},type:bg}],type:Tg},{error:"DualStack is enabled but this partition does not support DualStack",type:Cg}],type:Tg},{endpoint:{[yg]:"https://geo-maps.{Region}.{PartitionResult#dnsSuffix}",[Sg]:$g,[Rg]:$g},type:bg}],type:Tg}],type:Tg},{error:"Invalid Configuration: Missing Region",type:Cg}],type:Tg}]},qg=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Vg=(e,t={})=>qg.get(e,(()=>Yt(jg,{endpointParams:e,logger:t.logger})));xt.aws=rs;const Wg=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Vg,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??lg,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un}],logger:e?.logger??new ur,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.geomaps",version:"2020-11-19",serviceTarget:"MapsService"},serviceId:e?.serviceId??"Geo Maps",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:pg}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class Kg extends Yn{config;constructor(...[e]){const r=Wg(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"geo-maps"}))),o=yi(s),a=Br(o),c=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=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){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=zn(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(ri(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:ug,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}}class Qg extends rr{constructor(e){super(e),Object.setPrototypeOf(this,Qg.prototype)}}let Zg=class e extends Qg{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Yg=class e extends Qg{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Jg=class e extends Qg{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Xg=class e extends Qg{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}},em=class e extends Qg{name="ResourceNotFoundException";$fault="client";Message;constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};const tm="Blob",nm="Cache-Control",rm="CacheControl",im="CompactOverlay",sm="ColorScheme",om="ContentType",am="Content-Type",cm="ETag",um="FileName",lm="GeoJsonOverlay",dm="Key",pm="Message",hm="PricingBucket",fm="PoliticalView",gm="Style",mm="client",ym="color-scheme",Sm="error",Rm="httpError",wm="httpHeader",vm="httpQuery",Em="http",Cm="jsonName",bm="key",Tm="message",Pm="political-view",Am="smithy.ts.sdk.synthetic.com.amazonaws.geomaps",Im="x-amz-geo-pricing-bucket",xm="com.amazonaws.geomaps";var Om=[0,xm,"ApiKey",8,0],Dm=[0,xm,im,8,0],$m=[0,xm,"CountryCode",8,0],Mm=[0,xm,"DistanceMeters",8,1],Lm=[0,xm,lm,8,0],km=[0,xm,"PositionListString",8,0],Nm=[0,xm,"PositionString",8,0],_m=[0,xm,"SensitiveFloat",8,1],Um=[0,xm,"SensitiveInteger",8,1],Fm=[0,xm,"SensitiveString",8,0],Gm=[-3,xm,"AccessDeniedException",{[Sm]:mm,[Rm]:403},[pm],[[0,{[Cm]:Tm}]],1];le.for(xm).registerError(Gm,Zg);var Bm=[3,xm,"GetGlyphsRequest",0,["FontStack","FontUnicodeRange"],[[0,1],[0,1]],2],Hm=[3,xm,"GetGlyphsResponse",0,[tm,om,rm,cm],[[21,16],[0,{[wm]:am}],[0,{[wm]:nm}],[0,{[wm]:cm}]]],zm=[3,xm,"GetSpritesRequest",0,[um,gm,sm,"Variant"],[[0,1],[0,1],[0,1],[0,1]],4],jm=[3,xm,"GetSpritesResponse",0,[tm,om,rm,cm],[[21,16],[0,{[wm]:am}],[0,{[wm]:nm}],[0,{[wm]:cm}]]],qm=[3,xm,"GetStaticMapRequest",0,["Height",um,"Width","BoundingBox","BoundedPositions","Center",sm,im,"CropLabels",lm,dm,"LabelSize","Language","Padding",fm,"PointsOfInterests","Radius","ScaleBarUnit",gm,"Zoom"],[[()=>Um,{[vm]:"height"}],[0,1],[()=>Um,{[vm]:"width"}],[()=>km,{[vm]:"bounding-box"}],[()=>km,{[vm]:"bounded-positions"}],[()=>Nm,{[vm]:"center"}],[0,{[vm]:ym}],[()=>Dm,{[vm]:"compact-overlay"}],[2,{[vm]:"crop-labels"}],[()=>Lm,{[vm]:"geojson-overlay"}],[()=>Om,{[vm]:bm}],[0,{[vm]:"label-size"}],[0,{[vm]:"lang"}],[()=>Um,{[vm]:"padding"}],[()=>$m,{[vm]:Pm}],[0,{[vm]:"pois"}],[()=>Mm,{[vm]:"radius"}],[0,{[vm]:"scale-unit"}],[0,{[vm]:"style"}],[()=>_m,{[vm]:"zoom"}]],3],Vm=[3,xm,"GetStaticMapResponse",0,[hm,tm,om,rm,cm],[[0,{[wm]:Im}],[21,16],[0,{[wm]:am}],[0,{[wm]:nm}],[0,{[wm]:cm}]],1],Wm=[3,xm,"GetStyleDescriptorRequest",0,[gm,sm,fm,"Terrain","ContourDensity","Traffic","TravelModes","Buildings",dm],[[0,1],[0,{[vm]:ym}],[()=>$m,{[vm]:Pm}],[0,{[vm]:"terrain"}],[0,{[vm]:"contour-density"}],[0,{[vm]:"traffic"}],[64,{[vm]:"travel-modes"}],[0,{[vm]:"buildings"}],[()=>Om,{[vm]:bm}]],1],Km=[3,xm,"GetStyleDescriptorResponse",0,[tm,om,rm,cm],[[21,16],[0,{[wm]:am}],[0,{[wm]:nm}],[0,{[wm]:cm}]]],Qm=[3,xm,"GetTileRequest",0,["Tileset","Z","X","Y","AdditionalFeatures",dm],[[0,1],[()=>Fm,1],[()=>Fm,1],[()=>Fm,1],[64,{[vm]:"additional-features"}],[()=>Om,{[vm]:bm}]],4],Zm=[3,xm,"GetTileResponse",0,[hm,tm,om,rm,cm],[[0,{[wm]:Im}],[21,16],[0,{[wm]:am}],[0,{[wm]:nm}],[0,{[wm]:cm}]],1],Ym=[-3,xm,"InternalServerException",{[Sm]:"server",[Rm]:500},[pm],[[0,{[Cm]:Tm}]],1];le.for(xm).registerError(Ym,Yg);var Jm=[-3,xm,"ResourceNotFoundException",{[Sm]:mm,[Rm]:404},[pm],[[0,{[Cm]:Tm}]],1];le.for(xm).registerError(Jm,em);var Xm=[-3,xm,"ThrottlingException",{[Sm]:mm,[Rm]:429},[pm],[[0,{[Cm]:Tm}]],1];le.for(xm).registerError(Xm,Jg);var ey=[-3,xm,"ValidationException",{[Sm]:mm,[Rm]:400},[pm,"Reason","FieldList"],[[0,{[Cm]:Tm}],[0,{[Cm]:"reason"}],[()=>ry,{[Cm]:"fieldList"}]],3];le.for(xm).registerError(ey,Xg);var ty=[3,xm,"ValidationExceptionField",0,["Name",pm],[[0,{[Cm]:"name"}],[0,{[Cm]:Tm}]],2],ny=[-3,Am,"GeoMapsServiceException",0,[],[]];le.for(Am).registerError(ny,Qg);var ry=[1,xm,"ValidationExceptionFieldList",0,[()=>ty,0]],iy=[9,xm,"GetGlyphs",{[Em]:["GET","/glyphs/{FontStack}/{FontUnicodeRange}",200]},()=>Bm,()=>Hm],sy=[9,xm,"GetSprites",{[Em]:["GET","/styles/{Style}/{ColorScheme}/{Variant}/sprites/{FileName}",200]},()=>zm,()=>jm],oy=[9,xm,"GetStaticMap",{[Em]:["GET","/static/{FileName}",200]},()=>qm,()=>Vm],ay=[9,xm,"GetStyleDescriptor",{[Em]:["GET","/styles/{Style}/descriptor",200]},()=>Wm,()=>Km],cy=[9,xm,"GetTile",{[Em]:["GET","/tiles/{Tileset}/{Z}/{X}/{Y}",200]},()=>Qm,()=>Zm];class uy extends(er.classBuilder().ep(dg).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetGlyphs",{}).n("GeoMapsClient","GetGlyphsCommand").sc(iy).build()){}class ly extends(er.classBuilder().ep(dg).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetSprites",{}).n("GeoMapsClient","GetSpritesCommand").sc(sy).build()){}class dy extends(er.classBuilder().ep(dg).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetStaticMap",{}).n("GeoMapsClient","GetStaticMapCommand").sc(oy).build()){}class py extends(er.classBuilder().ep(dg).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetStyleDescriptor",{}).n("GeoMapsClient","GetStyleDescriptorCommand").sc(ay).build()){}class hy extends(er.classBuilder().ep(dg).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("MapsService","GetTile",{}).n("GeoMapsClient","GetTileCommand").sc(cy).build()){}const fy={GetGlyphsCommand:uy,GetSpritesCommand:ly,GetStaticMapCommand:dy,GetStyleDescriptorCommand:py,GetTileCommand:hy};class gy extends Kg{}nr(fy,gy);var my=Object.freeze({__proto__:null,$Command:er,AccessDeniedException:Zg,AccessDeniedException$:Gm,Buildings:{BUILDINGS_3D:"Buildings3D"},ColorScheme:{DARK:"Dark",LIGHT:"Light"},ContourDensity:{MEDIUM:"Medium"},GeoMaps:gy,GeoMapsClient:Kg,GeoMapsServiceException:Qg,GeoMapsServiceException$:ny,GetGlyphs$:iy,GetGlyphsCommand:uy,GetGlyphsRequest$:Bm,GetGlyphsResponse$:Hm,GetSprites$:sy,GetSpritesCommand:ly,GetSpritesRequest$:zm,GetSpritesResponse$:jm,GetStaticMap$:oy,GetStaticMapCommand:dy,GetStaticMapRequest$:qm,GetStaticMapResponse$:Vm,GetStyleDescriptor$:ay,GetStyleDescriptorCommand:py,GetStyleDescriptorRequest$:Wm,GetStyleDescriptorResponse$:Km,GetTile$:cy,GetTileCommand:hy,GetTileRequest$:Qm,GetTileResponse$:Zm,InternalServerException:Yg,InternalServerException$:Ym,LabelSize:{LARGE:"Large",SMALL:"Small"},MapFeatureMode:{DISABLED:"Disabled",ENABLED:"Enabled"},MapStyle:{HYBRID:"Hybrid",MONOCHROME:"Monochrome",SATELLITE:"Satellite",STANDARD:"Standard"},ResourceNotFoundException:em,ResourceNotFoundException$:Jm,ScaleBarUnit:{KILOMETERS:"Kilometers",KILOMETERS_MILES:"KilometersMiles",MILES:"Miles",MILES_KILOMETERS:"MilesKilometers"},StaticMapStyle:{SATELLITE:"Satellite",STANDARD:"Standard"},Terrain:{HILLSHADE:"Hillshade",TERRAIN_3D:"Terrain3D"},ThrottlingException:Jg,ThrottlingException$:Xm,TileAdditionalFeature:{CONTOUR_LINES:"ContourLines",HILLSHADE:"Hillshade",LOGISTICS:"Logistics",TRANSIT:"Transit"},Traffic:{ALL:"All"},TravelMode:{TRANSIT:"Transit",TRUCK:"Truck"},ValidationException:Xg,ValidationException$:ey,ValidationExceptionField$:ty,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},Variant:{DEFAULT:"Default"},__Client:Yn});const yy=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Sy=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-places",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Ry={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var wy="3.986.0";const vy="required",Ey="fn",Cy="argv",by="ref",Ty="url",Py="properties",Ay="headers",Iy=!0,xy="isSet",Oy="booleanEquals",Dy="error",$y="endpoint",My="tree",Ly="PartitionResult",ky={[vy]:!0,default:!1,type:"boolean"},Ny={[vy]:!1,type:"string"},_y={[by]:"Endpoint"},Uy={[Ey]:Oy,[Cy]:[{[by]:"UseFIPS"},!0]},Fy={[Ey]:Oy,[Cy]:[{[by]:"UseDualStack"},!0]},Gy={},By={[Ey]:"stringEquals",[Cy]:[{[Ey]:"getAttr",[Cy]:[{[by]:Ly},"name"]},"aws"]},Hy={[Ey]:Oy,[Cy]:[{[by]:"UseFIPS"},!1]},zy={[Ey]:Oy,[Cy]:[{[by]:"UseDualStack"},!1]},jy={[Ty]:"https://places.geo.{Region}.{PartitionResult#dnsSuffix}/v2",[Py]:{},[Ay]:{}},qy={[Ty]:"https://places.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[Py]:{},[Ay]:{}},Vy={[Ty]:"https://places.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",[Py]:{},[Ay]:{}},Wy={[Ty]:"https://places.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[Py]:{},[Ay]:{}},Ky={[Ey]:"stringEquals",[Cy]:[{[Ey]:"getAttr",[Cy]:[{[by]:Ly},"name"]},"aws-us-gov"]},Qy={[Ey]:"getAttr",[Cy]:[{[by]:Ly},"supportsFIPS"]},Zy={[Ey]:Oy,[Cy]:[!0,{[Ey]:"getAttr",[Cy]:[{[by]:Ly},"supportsDualStack"]}]},Yy=[{[by]:"Region"}],Jy={parameters:{UseDualStack:ky,UseFIPS:ky,Endpoint:Ny,Region:Ny},rules:[{conditions:[{[Ey]:xy,[Cy]:[_y]}],rules:[{conditions:[Uy],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Dy},{rules:[{conditions:[Fy],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Dy},{endpoint:{[Ty]:_y,[Py]:Gy,[Ay]:Gy},type:$y}],type:My}],type:My},{rules:[{conditions:[{[Ey]:xy,[Cy]:Yy}],rules:[{conditions:[{[Ey]:"aws.partition",[Cy]:Yy,assign:Ly}],rules:[{conditions:[By,Hy,zy],endpoint:jy,type:$y},{conditions:[By,Uy,Fy],endpoint:qy,type:$y},{conditions:[By,Uy,zy],endpoint:Vy,type:$y},{conditions:[By,Hy,Fy],endpoint:Wy,type:$y},{conditions:[Ky,Hy,zy],endpoint:jy,type:$y},{conditions:[Ky,Uy,Fy],endpoint:qy,type:$y},{conditions:[Ky,Uy,zy],endpoint:Vy,type:$y},{conditions:[Ky,Hy,Fy],endpoint:Wy,type:$y},{conditions:[Uy,Fy],rules:[{conditions:[{[Ey]:Oy,[Cy]:[Iy,Qy]},Zy],rules:[{endpoint:{[Ty]:"https://geo-places-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[Py]:Gy,[Ay]:Gy},type:$y}],type:My},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Dy}],type:My},{conditions:[Uy,zy],rules:[{conditions:[{[Ey]:Oy,[Cy]:[Qy,Iy]}],rules:[{endpoint:{[Ty]:"https://geo-places-fips.{Region}.{PartitionResult#dnsSuffix}",[Py]:Gy,[Ay]:Gy},type:$y}],type:My},{error:"FIPS is enabled but this partition does not support FIPS",type:Dy}],type:My},{conditions:[Hy,Fy],rules:[{conditions:[Zy],rules:[{endpoint:{[Ty]:"https://geo-places.{Region}.{PartitionResult#dualStackDnsSuffix}",[Py]:Gy,[Ay]:Gy},type:$y}],type:My},{error:"DualStack is enabled but this partition does not support DualStack",type:Dy}],type:My},{endpoint:{[Ty]:"https://geo-places.{Region}.{PartitionResult#dnsSuffix}",[Py]:Gy,[Ay]:Gy},type:$y}],type:My}],type:My},{error:"Invalid Configuration: Missing Region",type:Dy}],type:My}]},Xy=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),eS=(e,t={})=>Xy.get(e,(()=>Yt(Jy,{endpointParams:e,logger:t.logger})));xt.aws=rs;const tS=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??eS,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Sy,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un}],logger:e?.logger??new ur,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.geoplaces",version:"2020-11-19",serviceTarget:"PlacesService"},serviceId:e?.serviceId??"Geo Places",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:wy}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class nS extends Yn{config;constructor(...[e]){const r=tS(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"geo-places"}))),o=yi(s),a=Br(o),c=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=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){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=zn(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(ri(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:yy,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}}class rS extends rr{constructor(e){super(e),Object.setPrototypeOf(this,rS.prototype)}}let iS=class e extends rS{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},sS=class e extends rS{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},oS=class e extends rS{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},aS=class e extends rS{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}};const cS="Address",uS="AdditionalFeatures",lS="AddressNumber",dS="AddressNumberCorrected",pS="AccessPoints",hS="AccessRestrictions",fS="Block",gS="BoundingBox",mS="BusinessChains",yS="BiasPosition",SS="Building",RS="Categories",wS="Circle",vS="Country",ES="Code",CS="Components",bS="Contacts",TS="District",PS="Designator",AS="Distance",IS="EndIndex",xS="Filter",OS="FoodTypes",DS="Heading",$S="Highlights",MS="Intersection",LS="IncludeCountries",kS="IncludePlaceTypes",NS="IntendedUse",_S="Id",US="Intersections",FS="Key",GS="Label",BS="LocalizedName",HS="Language",zS="Locality",jS="Message",qS="MainAddress",VS="MaxResults",WS="MapView",KS="Name",QS="NextToken",ZS="Number",YS="OpeningHours",JS="Position",XS="PostalAuthority",eR="PricingBucket",tR="PostalCode",nR="PostalCodeDetails",rR="PostalCodeType",iR="PlaceId",sR="PlaceType",oR="PoliticalView",aR="Phonemes",cR="Primary",uR="QueryId",lR="QueryPosition",dR="QueryRadius",pR="QueryText",hR="ResultItems",fR="RecordTypeCode",gR="Region",mR="Street",yR="SecondaryAddresses",SR="SecondaryAddressComponents",RR="SubBlock",wR="StreetComponents",vR="SubDistrict",ER="StartIndex",CR="SubRegion",bR="Title",TR="TimeZone",PR="UspsZip",AR="UspsZipPlus4",IR="Value",xR="ZipClassificationCode",OR="client",DR="error",$R="http",MR="httpError",LR="httpHeader",kR="httpQuery",NR="jsonName",_R="key",UR="message",FR="smithy.ts.sdk.synthetic.com.amazonaws.geoplaces",GR="x-amz-geo-pricing-bucket",BR="com.amazonaws.geoplaces";var HR=[0,BR,"ApiKey",8,0],zR=[0,BR,"CountryCode",8,0],jR=[0,BR,"CountryCode2",8,0],qR=[0,BR,"CountryCode3",8,0],VR=[0,BR,"DistanceMeters",8,1],WR=[0,BR,"DurationSeconds",8,1],KR=[0,BR,"GeocodeFilterPlaceType",8,0],QR=[0,BR,DS,8,1],ZR=[0,BR,"OpeningHoursDisplay",8,0],YR=[0,BR,sR,8,0],JR=[0,BR,XS,8,0],XR=[0,BR,rR,8,0],ew=[0,BR,fR,8,0],tw=[0,BR,"SensitiveBoolean",8,2],nw=[0,BR,"SensitiveString",8,0],rw=[0,BR,xR,8,0],iw=[-3,BR,"AccessDeniedException",{[DR]:OR,[MR]:403},[jS],[[0,{[NR]:UR}]],1];le.for(BR).registerError(iw,iS);var sw=[3,BR,"AccessPoint",0,[JS],[[()=>Zv,0]]],ow=[3,BR,"AccessRestriction",0,["Restricted",RS],[[()=>tw,0],[()=>$v,0]]],aw=[3,BR,cS,0,[GS,vS,gR,CR,zS,TS,vR,tR,fS,RR,MS,mR,wR,lS,SS,SR],[[()=>nw,0],[()=>vw,0],[()=>Vw,0],[()=>lv,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],64,[()=>nw,0],[()=>sE,0],[()=>nw,0],[()=>nw,0],[()=>rE,0]]],cw=[3,BR,"AddressComponentMatchScores",0,[vS,gR,CR,zS,TS,vR,tR,fS,RR,MS,lS,SS,SR],[1,1,1,1,1,1,1,1,1,65,1,1,()=>iE]],uw=[3,BR,"AddressComponentPhonemes",0,[vS,gR,CR,zS,TS,vR,fS,RR,mR],[[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0],[()=>Qv,0]]],lw=[3,BR,"AutocompleteAddressHighlights",0,[GS,vS,gR,CR,zS,TS,vR,mR,fS,RR,MS,tR,lS,SS],[[()=>Bv,0],[()=>Ew,0],[()=>Ww,0],[()=>dv,0],[()=>Bv,0],[()=>Bv,0],[()=>Bv,0],[()=>Bv,0],[()=>Bv,0],[()=>Bv,0],[()=>Hv,0],[()=>Bv,0],[()=>Bv,0],[()=>Bv,0]]],dw=[3,BR,"AutocompleteFilter",0,[gS,wS,LS,kS],[[()=>Ov,0],[()=>Cw,0],[()=>Lv,0],64]],pw=[3,BR,"AutocompleteHighlights",0,[bR,cS],[[()=>Bv,0],[()=>lw,0]]],hw=[3,BR,"AutocompleteRequest",0,[pR,VS,yS,xS,"PostalCodeMode",uS,HS,oR,NS,FS],[[()=>nw,0],1,[()=>Zv,0],[()=>dw,0],0,64,0,[()=>zR,0],0,[()=>HR,{[kR]:_R}]],1],fw=[3,BR,"AutocompleteResponse",0,[eR,hR],[[0,{[LR]:GR}],[()=>xv,0]],1],gw=[3,BR,"AutocompleteResultItem",0,[iR,sR,bR,cS,AS,HS,oR,$S],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>VR,0],0,[()=>qR,0],[()=>pw,0]],3],mw=[3,BR,"BusinessChain",0,[KS,_S],[[()=>nw,0],[()=>nw,0]]],yw=[3,BR,"Category",0,[_S,KS,BS,cR],[[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>tw,0]],2],Sw=[3,BR,"ComponentMatchScores",0,[bR,cS],[1,()=>cw]],Rw=[3,BR,"ContactDetails",0,[GS,IR,RS],[[()=>nw,0],[()=>nw,0],[()=>$v,0]]],ww=[3,BR,bS,0,["Phones","Faxes","Websites","Emails"],[[()=>Mv,0],[()=>Mv,0],[()=>Mv,0],[()=>Mv,0]]],vw=[3,BR,vS,0,["Code2","Code3",KS],[[()=>jR,0],[()=>qR,0],[()=>nw,0]]],Ew=[3,BR,"CountryHighlights",0,[ES,KS],[[()=>Bv,0],[()=>Bv,0]]],Cw=[3,BR,"FilterCircle",8,["Center","Radius"],[[()=>Zv,0],[()=>VR,0]],2],bw=[3,BR,"FoodType",0,[BS,_S,cR],[[()=>nw,0],[()=>nw,0],[()=>tw,0]],1],Tw=[3,BR,"GeocodeFilter",0,[LS,kS],[[()=>Lv,0],[()=>Fv,0]]],Pw=[3,BR,"GeocodeParsedQuery",0,[bR,cS],[[()=>Wv,0],[()=>Aw,0]]],Aw=[3,BR,"GeocodeParsedQueryAddressComponents",0,[vS,gR,CR,zS,TS,vR,tR,fS,RR,mR,lS,SS,SR],[[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Wv,0],[()=>Kv,0]]],Iw=[3,BR,"GeocodeQueryComponents",0,[vS,gR,CR,zS,TS,mR,lS,tR],[[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0],[()=>nw,0]]],xw=[3,BR,"GeocodeRequest",0,[pR,"QueryComponents",VS,yS,xS,uS,HS,oR,NS,FS],[[()=>nw,0],[()=>Iw,0],1,[()=>Zv,0],[()=>Tw,0],64,0,[()=>zR,0],0,[()=>HR,{[kR]:_R}]]],Ow=[3,BR,"GeocodeResponse",0,[eR,hR],[[0,{[LR]:GR}],[()=>Gv,0]],1],Dw=[3,BR,"GeocodeResultItem",0,[iR,sR,bR,cS,dS,nR,JS,AS,WS,RS,OS,pS,TR,oR,"MatchScores","ParsedQuery",US,qS,yR],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>tw,0],[()=>Yv,0],[()=>Zv,0],[()=>VR,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Av,0],[()=>vv,0],[()=>qR,0],()=>_w,[()=>Pw,0],[()=>zv,0],[()=>Kw,0],[()=>Xv,0]],3],$w=[3,BR,"GetPlaceRequest",0,[iR,uS,HS,oR,NS,FS],[[()=>nw,1],[64,{[kR]:"additional-features"}],[0,{[kR]:"language"}],[()=>zR,{[kR]:"political-view"}],[0,{[kR]:"intended-use"}],[()=>HR,{[kR]:_R}]],1],Mw=[3,BR,"GetPlaceResponse",0,[iR,sR,bR,eR,cS,dS,nR,JS,WS,RS,OS,mS,bS,YS,pS,hS,TR,oR,aR,qS,yR],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[0,{[LR]:GR}],[()=>aw,0],[()=>tw,0],[()=>Yv,0],[()=>Zv,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Dv,0],[()=>ww,0],[()=>Vv,0],[()=>Av,0],[()=>Iv,0],[()=>vv,0],[()=>qR,0],[()=>Hw,0],[()=>Kw,0],[()=>Xv,0]],4],Lw=[3,BR,"Highlight",0,[ER,IS,IR],[1,1,[()=>nw,0]]],kw=[-3,BR,"InternalServerException",{[DR]:"server",[MR]:500},[jS],[[0,{[NR]:UR}]],1];le.for(BR).registerError(kw,sS);var Nw=[3,BR,MS,0,[iR,bR,cS,JS,AS,"RouteDistance",WS,pS],[[()=>nw,0],[()=>nw,0],[()=>aw,0],[()=>Zv,0],[()=>VR,0],[()=>VR,0],[()=>Ov,0],[()=>Av,0]],2],_w=[3,BR,"MatchScoreDetails",0,["Overall",CS],[1,()=>Sw]],Uw=[3,BR,YS,0,["Display","OpenNow",CS,RS],[[()=>qv,0],[()=>tw,0],[()=>jv,0],[()=>$v,0]]],Fw=[3,BR,"OpeningHoursComponents",0,["OpenTime","OpenDuration","Recurrence"],[[()=>nw,0],[()=>nw,0],[()=>nw,0]]],Gw=[3,BR,"ParsedQueryComponent",0,[ER,IS,IR,"QueryComponent"],[1,1,[()=>nw,0],[()=>nw,0]]],Bw=[3,BR,"ParsedQuerySecondaryAddressComponent",0,[ER,IS,IR,ZS,PS],[1,1,[()=>nw,0],[()=>nw,0],[()=>nw,0]],5],Hw=[3,BR,"PhonemeDetails",0,[bR,cS],[[()=>Qv,0],[()=>uw,0]]],zw=[3,BR,"PhonemeTranscription",0,[IR,HS,"Preferred"],[[()=>nw,0],0,[()=>tw,0]]],jw=[3,BR,nR,0,[tR,XS,rR,PR,AR],[[()=>nw,0],[()=>JR,0],[()=>XR,0],[()=>Ev,0],[()=>Cv,0]]],qw=[3,BR,"QueryRefinement",0,["RefinedTerm","OriginalTerm",ER,IS],[[()=>nw,0],[()=>nw,0],1,1],4],Vw=[3,BR,gR,0,[ES,KS],[[()=>nw,0],[()=>nw,0]]],Ww=[3,BR,"RegionHighlights",0,[ES,KS],[[()=>Bv,0],[()=>Bv,0]]],Kw=[3,BR,"RelatedPlace",0,[iR,sR,bR,cS,JS,pS],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>Zv,0],[()=>Av,0]],3],Qw=[3,BR,"ReverseGeocodeFilter",0,[kS],[64]],Zw=[3,BR,"ReverseGeocodeRequest",0,[lR,dR,VS,xS,uS,HS,oR,NS,FS,DS],[[()=>Zv,0],[()=>VR,0],1,()=>Qw,64,0,[()=>zR,0],0,[()=>HR,{[kR]:_R}],[()=>QR,0]],1],Yw=[3,BR,"ReverseGeocodeResponse",0,[eR,hR],[[0,{[LR]:GR}],[()=>eE,0]],1],Jw=[3,BR,"ReverseGeocodeResultItem",0,[iR,sR,bR,cS,dS,nR,JS,AS,WS,RS,OS,pS,TR,oR,US],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>tw,0],[()=>Yv,0],[()=>Zv,0],[()=>VR,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Av,0],[()=>vv,0],[()=>qR,0],[()=>zv,0]],3],Xw=[3,BR,"SearchNearbyFilter",0,[gS,LS,"IncludeCategories","ExcludeCategories","IncludeBusinessChains","ExcludeBusinessChains","IncludeFoodTypes","ExcludeFoodTypes"],[[()=>Ov,0],[()=>Lv,0],[()=>Nv,0],[()=>Nv,0],[()=>kv,0],[()=>kv,0],[()=>_v,0],[()=>_v,0]]],ev=[3,BR,"SearchNearbyRequest",0,[lR,dR,VS,xS,uS,HS,oR,NS,QS,FS],[[()=>Zv,0],[()=>VR,0],1,[()=>Xw,0],64,0,[()=>zR,0],0,0,[()=>HR,{[kR]:_R}]],1],tv=[3,BR,"SearchNearbyResponse",0,[eR,hR,QS],[[0,{[LR]:GR}],[()=>tE,0],0],1],nv=[3,BR,"SearchNearbyResultItem",0,[iR,sR,bR,cS,dS,JS,AS,WS,RS,OS,mS,bS,YS,pS,hS,TR,oR,aR],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>tw,0],[()=>Zv,0],[()=>VR,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Dv,0],[()=>ww,0],[()=>Vv,0],[()=>Av,0],[()=>Iv,0],[()=>vv,0],[()=>qR,0],[()=>Hw,0]],3],rv=[3,BR,"SearchTextFilter",0,[gS,wS,LS],[[()=>Ov,0],[()=>Cw,0],[()=>Lv,0]]],iv=[3,BR,"SearchTextRequest",0,[pR,uR,VS,yS,xS,uS,HS,oR,NS,QS,FS],[[()=>nw,0],[()=>nw,0],1,[()=>Zv,0],[()=>rv,0],64,0,[()=>zR,0],0,0,[()=>HR,{[kR]:_R}]]],sv=[3,BR,"SearchTextResponse",0,[eR,hR,QS],[[0,{[LR]:GR}],[()=>nE,0],0],1],ov=[3,BR,"SearchTextResultItem",0,[iR,sR,bR,cS,dS,JS,AS,WS,RS,OS,mS,bS,YS,pS,hS,TR,oR,aR],[[()=>nw,0],[()=>YR,0],[()=>nw,0],[()=>aw,0],[()=>tw,0],[()=>Zv,0],[()=>VR,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Dv,0],[()=>ww,0],[()=>Vv,0],[()=>Av,0],[()=>Iv,0],[()=>vv,0],[()=>qR,0],[()=>Hw,0]],3],av=[3,BR,"SecondaryAddressComponent",0,[ZS,PS],[[()=>nw,0],[()=>nw,0]],1],cv=[3,BR,"SecondaryAddressComponentMatchScore",0,[ZS],[1]],uv=[3,BR,wR,0,["BaseName","Type","TypePlacement","TypeSeparator","Prefix","Suffix","Direction",HS],[[()=>nw,0],[()=>nw,0],0,0,[()=>nw,0],[()=>nw,0],[()=>nw,0],0]],lv=[3,BR,CR,0,[ES,KS],[[()=>nw,0],[()=>nw,0]]],dv=[3,BR,"SubRegionHighlights",0,[ES,KS],[[()=>Bv,0],[()=>Bv,0]]],pv=[3,BR,"SuggestAddressHighlights",0,[GS],[[()=>Bv,0]]],hv=[3,BR,"SuggestFilter",0,[gS,wS,LS],[[()=>Ov,0],[()=>Cw,0],[()=>Lv,0]]],fv=[3,BR,"SuggestHighlights",0,[bR,cS],[[()=>Bv,0],[()=>pv,0]]],gv=[3,BR,"SuggestPlaceResult",0,[iR,sR,cS,JS,AS,WS,RS,OS,mS,pS,hS,TR,oR,aR],[[()=>nw,0],[()=>YR,0],[()=>aw,0],[()=>Zv,0],[()=>VR,0],[()=>Ov,0],[()=>$v,0],[()=>Uv,0],[()=>Dv,0],[()=>Av,0],[()=>Iv,0],[()=>vv,0],[()=>qR,0],[()=>Hw,0]]],mv=[3,BR,"SuggestQueryResult",0,[uR,"QueryType"],[[()=>nw,0],0]],yv=[3,BR,"SuggestRequest",0,[pR,VS,"MaxQueryRefinements",yS,xS,uS,HS,oR,NS,FS],[[()=>nw,0],1,1,[()=>Zv,0],[()=>hv,0],64,0,[()=>zR,0],0,[()=>HR,{[kR]:_R}]],1],Sv=[3,BR,"SuggestResponse",0,[eR,hR,"QueryRefinements"],[[0,{[LR]:GR}],[()=>oE,0],[()=>Jv,0]],1],Rv=[3,BR,"SuggestResultItem",0,[bR,"SuggestResultItemType","Place","Query",$S],[[()=>nw,0],0,[()=>gv,0],[()=>mv,0],[()=>fv,0]],2],wv=[-3,BR,"ThrottlingException",{[DR]:OR,[MR]:429},[jS],[[0,{[NR]:UR}]],1];le.for(BR).registerError(wv,oS);var vv=[3,BR,TR,0,[KS,"Offset","OffsetSeconds"],[[()=>nw,0],[()=>nw,0],[()=>WR,0]],1],Ev=[3,BR,PR,0,[xR],[[()=>rw,0]]],Cv=[3,BR,AR,0,[fR],[[()=>ew,0]]],bv=[-3,BR,"ValidationException",{[DR]:OR,[MR]:400},[jS,"Reason","FieldList"],[[0,{[NR]:UR}],[0,{[NR]:"reason"}],[()=>aE,{[NR]:"fieldList"}]],3];le.for(BR).registerError(bv,aS);var Tv=[3,BR,"ValidationExceptionField",0,[KS,jS],[[0,{[NR]:"name"}],[0,{[NR]:UR}]],2],Pv=[-3,FR,"GeoPlacesServiceException",0,[],[]];le.for(FR).registerError(Pv,rS);var Av=[1,BR,"AccessPointList",0,[()=>sw,0]],Iv=[1,BR,"AccessRestrictionList",0,[()=>ow,0]],xv=[1,BR,"AutocompleteResultItemList",0,[()=>gw,0]],Ov=[1,BR,gS,8,1],Dv=[1,BR,"BusinessChainList",0,[()=>mw,0]],$v=[1,BR,"CategoryList",0,[()=>yw,0]],Mv=[1,BR,"ContactDetailsList",0,[()=>Rw,0]],Lv=[1,BR,"CountryCodeList",0,[()=>zR,0]],kv=[1,BR,"FilterBusinessChainList",0,[()=>nw,0]],Nv=[1,BR,"FilterCategoryList",0,[()=>nw,0]],_v=[1,BR,"FilterFoodTypeList",0,[()=>nw,0]],Uv=[1,BR,"FoodTypeList",0,[()=>bw,0]],Fv=[1,BR,"GeocodeFilterPlaceTypeList",0,[()=>KR,0]],Gv=[1,BR,"GeocodeResultItemList",0,[()=>Dw,0]],Bv=[1,BR,"HighlightList",0,[()=>Lw,0]],Hv=[1,BR,"IntersectionHighlightsList",0,[()=>Bv,0]],zv=[1,BR,"IntersectionList",0,[()=>Nw,0]],jv=[1,BR,"OpeningHoursComponentsList",0,[()=>Fw,0]],qv=[1,BR,"OpeningHoursDisplayList",0,[()=>ZR,0]],Vv=[1,BR,"OpeningHoursList",0,[()=>Uw,0]],Wv=[1,BR,"ParsedQueryComponentList",0,[()=>Gw,0]],Kv=[1,BR,"ParsedQuerySecondaryAddressComponentList",0,[()=>Bw,0]],Qv=[1,BR,"PhonemeTranscriptionList",0,[()=>zw,0]],Zv=[1,BR,JS,8,1],Yv=[1,BR,"PostalCodeDetailsList",0,[()=>jw,0]],Jv=[1,BR,"QueryRefinementList",0,[()=>qw,0]],Xv=[1,BR,"RelatedPlaceList",0,[()=>Kw,0]],eE=[1,BR,"ReverseGeocodeResultItemList",0,[()=>Jw,0]],tE=[1,BR,"SearchNearbyResultItemList",0,[()=>nv,0]],nE=[1,BR,"SearchTextResultItemList",0,[()=>ov,0]],rE=[1,BR,"SecondaryAddressComponentList",0,[()=>av,0]],iE=[1,BR,"SecondaryAddressComponentMatchScoreList",0,()=>cv],sE=[1,BR,"StreetComponentsList",0,[()=>uv,0]],oE=[1,BR,"SuggestResultItemList",0,[()=>Rv,0]],aE=[1,BR,"ValidationExceptionFieldList",0,[()=>Tv,0]],cE=[9,BR,"Autocomplete",{[$R]:["POST","/autocomplete",200]},()=>hw,()=>fw],uE=[9,BR,"Geocode",{[$R]:["POST","/geocode",200]},()=>xw,()=>Ow],lE=[9,BR,"GetPlace",{[$R]:["GET","/place/{PlaceId}",200]},()=>$w,()=>Mw],dE=[9,BR,"ReverseGeocode",{[$R]:["POST","/reverse-geocode",200]},()=>Zw,()=>Yw],pE=[9,BR,"SearchNearby",{[$R]:["POST","/search-nearby",200]},()=>ev,()=>tv],hE=[9,BR,"SearchText",{[$R]:["POST","/search-text",200]},()=>iv,()=>sv],fE=[9,BR,"Suggest",{[$R]:["POST","/suggest",200]},()=>yv,()=>Sv];class gE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","Autocomplete",{}).n("GeoPlacesClient","AutocompleteCommand").sc(cE).build()){}class mE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","Geocode",{}).n("GeoPlacesClient","GeocodeCommand").sc(uE).build()){}class yE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","GetPlace",{}).n("GeoPlacesClient","GetPlaceCommand").sc(lE).build()){}class SE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","ReverseGeocode",{}).n("GeoPlacesClient","ReverseGeocodeCommand").sc(dE).build()){}class RE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","SearchNearby",{}).n("GeoPlacesClient","SearchNearbyCommand").sc(pE).build()){}class wE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","SearchText",{}).n("GeoPlacesClient","SearchTextCommand").sc(hE).build()){}class vE extends(er.classBuilder().ep(Ry).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("PlacesService","Suggest",{}).n("GeoPlacesClient","SuggestCommand").sc(fE).build()){}const EE={AutocompleteCommand:gE,GeocodeCommand:mE,GetPlaceCommand:yE,ReverseGeocodeCommand:SE,SearchNearbyCommand:RE,SearchTextCommand:wE,SuggestCommand:vE};class CE extends nS{}nr(EE,CE);var bE=Object.freeze({__proto__:null,$Command:er,AccessDeniedException:iS,AccessDeniedException$:iw,AccessPoint$:sw,AccessRestriction$:ow,Address$:aw,AddressComponentMatchScores$:cw,AddressComponentPhonemes$:uw,Autocomplete$:cE,AutocompleteAdditionalFeature:{CORE:"Core"},AutocompleteAddressHighlights$:lw,AutocompleteCommand:gE,AutocompleteFilter$:dw,AutocompleteFilterPlaceType:{LOCALITY:"Locality",POSTAL_CODE:"PostalCode"},AutocompleteHighlights$:pw,AutocompleteIntendedUse:{SINGLE_USE:"SingleUse"},AutocompleteRequest$:hw,AutocompleteResponse$:fw,AutocompleteResultItem$:gw,BusinessChain$:mw,Category$:yw,ComponentMatchScores$:Sw,ContactDetails$:Rw,Contacts$:ww,Country$:vw,CountryHighlights$:Ew,FilterCircle$:Cw,FoodType$:bw,GeoPlaces:CE,GeoPlacesClient:nS,GeoPlacesServiceException:rS,GeoPlacesServiceException$:Pv,Geocode$:uE,GeocodeAdditionalFeature:{ACCESS:"Access",INTERSECTIONS:"Intersections",SECONDARY_ADDRESSES:"SecondaryAddresses",TIME_ZONE:"TimeZone"},GeocodeCommand:mE,GeocodeFilter$:Tw,GeocodeFilterPlaceType:{INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",POSTAL_CODE:"PostalCode",STREET:"Street"},GeocodeIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},GeocodeParsedQuery$:Pw,GeocodeParsedQueryAddressComponents$:Aw,GeocodeQueryComponents$:Iw,GeocodeRequest$:xw,GeocodeResponse$:Ow,GeocodeResultItem$:Dw,GetPlace$:lE,GetPlaceAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",SECONDARY_ADDRESSES:"SecondaryAddresses",TIME_ZONE:"TimeZone"},GetPlaceCommand:yE,GetPlaceIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},GetPlaceRequest$:$w,GetPlaceResponse$:Mw,Highlight$:Lw,InternalServerException:sS,InternalServerException$:kw,Intersection$:Nw,MatchScoreDetails$:_w,OpeningHours$:Uw,OpeningHoursComponents$:Fw,ParsedQueryComponent$:Gw,ParsedQuerySecondaryAddressComponent$:Bw,PhonemeDetails$:Hw,PhonemeTranscription$:zw,PlaceType:{BLOCK:"Block",COUNTRY:"Country",DISTRICT:"District",INFERRED_SECONDARY_ADDRESS:"InferredSecondaryAddress",INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",POINT_OF_INTEREST:"PointOfInterest",POSTAL_CODE:"PostalCode",REGION:"Region",SECONDARY_ADDRESS:"SecondaryAddress",STREET:"Street",SUB_BLOCK:"SubBlock",SUB_DISTRICT:"SubDistrict",SUB_REGION:"SubRegion"},PostalAuthority:{USPS:"Usps"},PostalCodeDetails$:jw,PostalCodeMode:{ENUMERATE_SPANNED_LOCALITIES:"EnumerateSpannedLocalities",MERGE_ALL_SPANNED_LOCALITIES:"MergeAllSpannedLocalities"},PostalCodeType:{USPS_ZIP:"UspsZip",USPS_ZIP_PLUS_4:"UspsZipPlus4"},QueryRefinement$:qw,QueryType:{BUSINESS_CHAIN:"BusinessChain",CATEGORY:"Category"},RecordTypeCode:{FIRM:"Firm",GENERAL:"General",HIGH_RISE:"HighRise",POST_OFFICE_BOX:"PostOfficeBox",RURAL:"Rural",STREET:"Street"},Region$:Vw,RegionHighlights$:Ww,RelatedPlace$:Kw,ReverseGeocode$:dE,ReverseGeocodeAdditionalFeature:{ACCESS:"Access",INTERSECTIONS:"Intersections",TIME_ZONE:"TimeZone"},ReverseGeocodeCommand:SE,ReverseGeocodeFilter$:Qw,ReverseGeocodeFilterPlaceType:{INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",STREET:"Street"},ReverseGeocodeIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},ReverseGeocodeRequest$:Zw,ReverseGeocodeResponse$:Yw,ReverseGeocodeResultItem$:Jw,SearchNearby$:pE,SearchNearbyAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SearchNearbyCommand:RE,SearchNearbyFilter$:Xw,SearchNearbyIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},SearchNearbyRequest$:ev,SearchNearbyResponse$:tv,SearchNearbyResultItem$:nv,SearchText$:hE,SearchTextAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SearchTextCommand:wE,SearchTextFilter$:rv,SearchTextIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},SearchTextRequest$:iv,SearchTextResponse$:sv,SearchTextResultItem$:ov,SecondaryAddressComponent$:av,SecondaryAddressComponentMatchScore$:cv,StreetComponents$:uv,SubRegion$:lv,SubRegionHighlights$:dv,Suggest$:fE,SuggestAdditionalFeature:{ACCESS:"Access",CORE:"Core",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SuggestAddressHighlights$:pv,SuggestCommand:vE,SuggestFilter$:hv,SuggestHighlights$:fv,SuggestIntendedUse:{SINGLE_USE:"SingleUse"},SuggestPlaceResult$:gv,SuggestQueryResult$:mv,SuggestRequest$:yv,SuggestResponse$:Sv,SuggestResultItem$:Rv,SuggestResultItemType:{PLACE:"Place",QUERY:"Query"},ThrottlingException:oS,ThrottlingException$:wv,TimeZone$:vv,TypePlacement:{AFTER_BASE_NAME:"AfterBaseName",BEFORE_BASE_NAME:"BeforeBaseName"},UspsZip$:Ev,UspsZipPlus4$:Cv,ValidationException:aS,ValidationException$:bv,ValidationExceptionField$:Tv,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},ZipClassificationCode:{MILITARY:"Military",POST_OFFICE_BOXES:"PostOfficeBoxes",UNIQUE:"Unique"},__Client:Yn});const TE=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const PE=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-routes",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},AE={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var IE="3.986.0";const xE="required",OE="fn",DE="argv",$E="ref",ME=!0,LE="isSet",kE="booleanEquals",NE="error",_E="endpoint",UE="tree",FE="PartitionResult",GE={[xE]:!0,default:!1,type:"boolean"},BE={[xE]:!1,type:"string"},HE={[$E]:"Endpoint"},zE={[OE]:kE,[DE]:[{[$E]:"UseFIPS"},!0]},jE={[OE]:kE,[DE]:[{[$E]:"UseDualStack"},!0]},qE={},VE={[OE]:"stringEquals",[DE]:[{[OE]:"getAttr",[DE]:[{[$E]:FE},"name"]},"aws"]},WE={[OE]:kE,[DE]:[{[$E]:"UseFIPS"},!1]},KE={[OE]:kE,[DE]:[{[$E]:"UseDualStack"},!1]},QE={[OE]:"stringEquals",[DE]:[{[OE]:"getAttr",[DE]:[{[$E]:FE},"name"]},"aws-us-gov"]},ZE={[OE]:"getAttr",[DE]:[{[$E]:FE},"supportsFIPS"]},YE={[OE]:kE,[DE]:[!0,{[OE]:"getAttr",[DE]:[{[$E]:FE},"supportsDualStack"]}]},JE=[{[$E]:"Region"}],XE={parameters:{UseDualStack:GE,UseFIPS:GE,Endpoint:BE,Region:BE},rules:[{conditions:[{[OE]:LE,[DE]:[HE]}],rules:[{conditions:[zE],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:NE},{rules:[{conditions:[jE],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:NE},{endpoint:{url:HE,properties:qE,headers:qE},type:_E}],type:UE}],type:UE},{rules:[{conditions:[{[OE]:LE,[DE]:JE}],rules:[{conditions:[{[OE]:"aws.partition",[DE]:JE,assign:FE}],rules:[{conditions:[VE,WE,KE],endpoint:{url:"https://routes.geo.{Region}.{PartitionResult#dnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[VE,zE,jE],endpoint:{url:"https://routes.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[VE,zE,KE],endpoint:{url:"https://routes.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[VE,WE,jE],endpoint:{url:"https://routes.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[QE,WE,KE],endpoint:{url:"https://routes.geo.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[QE,zE,jE],endpoint:{url:"https://routes.geo-fips.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[QE,zE,KE],endpoint:{url:"https://routes.geo-fips.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[QE,WE,jE],endpoint:{url:"https://routes.geo.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:qE,headers:qE},type:_E},{conditions:[zE,jE],rules:[{conditions:[{[OE]:kE,[DE]:[ME,ZE]},YE],rules:[{endpoint:{url:"https://geo-routes-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:qE,headers:qE},type:_E}],type:UE},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:NE}],type:UE},{conditions:[zE,KE],rules:[{conditions:[{[OE]:kE,[DE]:[ZE,ME]}],rules:[{endpoint:{url:"https://geo-routes-fips.{Region}.{PartitionResult#dnsSuffix}",properties:qE,headers:qE},type:_E}],type:UE},{error:"FIPS is enabled but this partition does not support FIPS",type:NE}],type:UE},{conditions:[WE,jE],rules:[{conditions:[YE],rules:[{endpoint:{url:"https://geo-routes.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:qE,headers:qE},type:_E}],type:UE},{error:"DualStack is enabled but this partition does not support DualStack",type:NE}],type:UE},{endpoint:{url:"https://geo-routes.{Region}.{PartitionResult#dnsSuffix}",properties:qE,headers:qE},type:_E}],type:UE}],type:UE},{error:"Invalid Configuration: Missing Region",type:NE}],type:UE}]},eC=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),tC=(e,t={})=>eC.get(e,(()=>Yt(XE,{endpointParams:e,logger:t.logger})));xt.aws=rs;const nC=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??tC,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??PE,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un}],logger:e?.logger??new ur,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.georoutes",version:"2020-11-19",serviceTarget:"RoutesService"},serviceId:e?.serviceId??"Geo Routes",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:IE}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class rC extends Yn{config;constructor(...[e]){const r=nC(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"geo-routes"}))),o=yi(s),a=Br(o),c=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=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){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=zn(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(ri(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:TE,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}}class iC extends rr{constructor(e){super(e),Object.setPrototypeOf(this,iC.prototype)}}class sC extends iC{name="AccessDeniedException";$fault="client";Message;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,sC.prototype),this.Message=e.Message}}class oC extends iC{name="InternalServerException";$fault="server";$retryable={};Message;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,oC.prototype),this.Message=e.Message}}class aC extends iC{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,aC.prototype),this.Message=e.Message}}class cC extends iC{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,cC.prototype),this.Message=e.Message,this.Reason=e.Reason,this.FieldList=e.FieldList}}const uC="Allow",lC="AvoidActionsForDistance",dC="AxleCount",pC="AccessHours",hC="ArrivalTime",fC="AppointmentTime",gC="AvoidUTurns",mC="Areas",yC="Arrival",SC="Avoid",RC="BoundingBox",wC="BestCaseDuration",vC="Circle",EC="ControlledAccessHighways",CC="CurrentRoad",bC="ContinueStepDetails",TC="CarShuttleTrains",PC="Category",AC="Car",IC="Corridor",xC="Code",OC="Connections",DC="Countries",$C="Country",MC="Currency",LC="Destination",kC="DepartNow",NC="DestinationOptions",_C="DayOfWeek",UC="DirtRoads",FC="DynamicSpeed",GC="DepartureTime",BC="Departure",HC="Distance",zC="Driver",jC="Duration",qC="Exclude",VC="ExitNumber",WC="EngineType",KC="Estimate",QC="Except",ZC="Ferries",YC="FunctionalClassification",JC="FlowEventThresholdOverride",XC="From",eb="GeometryOffset",tb="GrossWeight",nb="Geometry",rb="Heading",ib="HeightAboveFirstAxle",sb="HazardousCargos",ob="Height",ab="Hot",cb="Hov",ub="IsolineGeometryFormat",lb="Id",db="Impact",pb="Intersection",hb="Incidents",fb="Instruction",gb="Key",mb="KpraLength",yb="KeepStepDetails",Sb="LastCharacter",Rb="LegGeometryFormat",wb="LicensePlate",vb="LineString",Eb="Language",Cb="Length",bb="Message",Tb="MaxSpeed",Pb="Matching",Ab="Notices",Ib="NameHint",xb="NextRoad",Ob="Name",Db="Names",$b="Origin",Mb="OriginOptions",Lb="OriginalPosition",kb="OptimizeRoutingFor",Nb="OnRoadThreshold",_b="Occupancy",Ub="Options",Fb="Overview",Gb="Polyline",Bb="PricingBucket",Hb="PolylineCorridor",zb="PayloadCapacity",jb="PolylinePolygon",qb="PassThroughWaypoints",Vb="Pedestrian",Wb="Place",Kb="Polygon",Qb="Position",Zb="RoadAttributes",Yb="RoutingBoundary",Jb="RestDuration",Xb="RelativeExit",eT="RoundaboutEnterStepDetails",tT="RoundaboutExitStepDetails",nT="RouteMatrix",rT="RoadName",iT="RouteNumber",sT="RouteNumbers",oT="RoundaboutPassStepDetails",aT="RangeValue",cT="Radius",uT="Range",lT="Region",dT="Reason",pT="Strategy",hT="SeasonalClosure",fT="ServiceDuration",gT="SteeringDirection",mT="StopDuration",yT="SnappedGeometryFormat",ST="SpeedLimit",RT="SideOfStreet",wT="Scooter",vT="Signpost",ET="Speed",CT="Spans",bT="Summary",TT="TurnAngle",PT="TrailerCount",AT="TireCount",IT="TypicalDuration",xT="TravelDuration",OT="TurnIntensity",DT="TravelMode",$T="TravelModeOptions",MT="TravelOnly",LT="TimeOfDay",kT="TollRoads",NT="TunnelRestrictionCode",_T="TruckRoadType",UT="TruckRoadTypes",FT="TravelSteps",GT="TurnStepDetails",BT="TollSystems",HT="TollTransponders",zT="TruckType",jT="Time",qT="Title",VT="Tolls",WT="Traffic",KT="Trailer",QT="Truck",ZT="Tunnels",YT="Type",JT="Usage",XT="UTurns",eP="UseWith",tP="Value",nP="Waypoints",rP="WaitDuration",iP="WaypointIndex",sP="WeightPerAxle",oP="WeightPerAxleGroup",aP="Width",cP="Zones",uP="ZoneCategories",lP="client",dP="error",pP="http",hP="httpError",fP="httpHeader",gP="httpQuery",mP="jsonName",yP="key",SP="message",RP="smithy.ts.sdk.synthetic.com.amazonaws.georoutes",wP="x-amz-geo-pricing-bucket",vP="com.amazonaws.georoutes";var EP=[0,vP,"ApiKey",8,0],CP=[0,vP,"CountryCode",8,0],bP=[0,vP,"CountryCode3",8,0],TP=[0,vP,_C,8,0],PP=[0,vP,"DimensionCentimeters",8,1],AP=[0,vP,"DistanceMeters",8,1],IP=[0,vP,"DurationSeconds",8,1],xP=[0,vP,rb,8,1],OP=[0,vP,"IsolineEngineType",8,0],DP=[0,vP,"IsolineHazardousCargoType",8,0],$P=[0,vP,Gb,8,0],MP=[0,vP,"PolylineRing",8,0],LP=[0,vP,"RoadSnapHazardousCargoType",8,0],kP=[0,vP,"RoadSnapNoticeCode",8,0],NP=[0,vP,"RouteDirection",8,0],_P=[0,vP,"RouteEngineType",8,0],UP=[0,vP,"RouteFerryAfterTravelStepType",8,0],FP=[0,vP,"RouteFerryBeforeTravelStepType",8,0],GP=[0,vP,"RouteFerryTravelStepType",8,0],BP=[0,vP,"RouteHazardousCargoType",8,0],HP=[0,vP,"RouteLegAdditionalFeature",8,0],zP=[0,vP,"RouteLegTravelMode",8,0],jP=[0,vP,"RouteLegType",8,0],qP=[0,vP,"RouteMatrixHazardousCargoType",8,0],VP=[0,vP,"RouteMatrixTruckType",8,0],WP=[0,vP,"RouteMatrixZoneCategory",8,0],KP=[0,vP,"RoutePedestrianTravelStepType",8,0],QP=[0,vP,"RouteRoadType",8,0],ZP=[0,vP,"RouteSideOfStreet",8,0],YP=[0,vP,"RouteSpanCarAccessAttribute",8,0],JP=[0,vP,"RouteSpanGateAttribute",8,0],XP=[0,vP,"RouteSpanPedestrianAccessAttribute",8,0],eA=[0,vP,"RouteSpanRailwayCrossingAttribute",8,0],tA=[0,vP,"RouteSpanRoadAttribute",8,0],nA=[0,vP,"RouteSpanScooterAccessAttribute",8,0],rA=[0,vP,"RouteSpanTruckAccessAttribute",8,0],iA=[0,vP,"RouteSteeringDirection",8,0],sA=[0,vP,"RouteTollPassValidityPeriodType",8,0],oA=[0,vP,"RouteTollPaymentMethod",8,0],aA=[0,vP,"RouteTollVehicleCategory",8,0],cA=[0,vP,"RouteTruckType",8,0],uA=[0,vP,"RouteTurnIntensity",8,0],lA=[0,vP,"RouteVehicleIncidentSeverity",8,0],dA=[0,vP,"RouteVehicleIncidentType",8,0],pA=[0,vP,"RouteVehicleTravelStepType",8,0],hA=[0,vP,"RouteZoneCategory",8,0],fA=[0,vP,"SensitiveBoolean",8,2],gA=[0,vP,"SensitiveDouble",8,1],mA=[0,vP,"SensitiveInteger",8,1],yA=[0,vP,"SensitiveString",8,0],SA=[0,vP,"SpeedKilometersPerHour",8,1],RA=[0,vP,LT,8,0],wA=[0,vP,"TimestampWithTimezoneOffset",8,0],vA=[0,vP,_T,8,0],EA=[0,vP,NT,8,0],CA=[0,vP,"WaypointOptimizationClusteringAlgorithm",8,0],bA=[0,vP,"WaypointOptimizationConstraint",8,0],TA=[0,vP,"WaypointOptimizationHazardousCargoType",8,0],PA=[0,vP,"WaypointOptimizationServiceTimeTreatment",8,0],AA=[0,vP,"WaypointOptimizationTruckType",8,0],IA=[0,vP,"WeightKilograms",8,1],xA=[-3,vP,"AccessDeniedException",{[dP]:lP,[hP]:403},[bb],[[0,{[mP]:SP}]],1];le.for(vP).registerError(xA,sC);var OA=[3,vP,"CalculateIsolinesRequest",0,["Thresholds",uC,hC,SC,kC,GC,LC,NC,ub,"IsolineGranularity",gb,"OptimizeIsolineFor",kb,$b,Mb,WT,DT,$T],[[()=>tI,0],[()=>GA,0],[()=>wA,0],[()=>zA,0],[()=>fA,0],[()=>wA,0],[()=>bD,0],[()=>KA,0],0,[()=>QA,0],[()=>EP,{[gP]:yP}],0,0,[()=>bD,0],[()=>YA,0],[()=>nI,0],0,[()=>iI,0]],1],DA=[3,vP,"CalculateIsolinesResponse",0,[ub,"Isolines",Bb,hC,GC,"SnappedDestination","SnappedOrigin"],[0,[()=>yD,0],[0,{[fP]:wP}],[()=>wA,0],[()=>wA,0],[()=>bD,0],[()=>bD,0]],3],$A=[3,vP,"CalculateRouteMatrixRequest",0,["Destinations","Origins",Yb,uC,SC,kC,GC,qC,gb,kb,WT,DT,$T],[[()=>KD,0],[()=>ZD,0],[()=>rx,0],[()=>YI,0],[()=>tx,0],[()=>fA,0],[()=>wA,0],[()=>ux,0],[()=>EP,{[gP]:yP}],0,[()=>gx,0],0,[()=>yx,0]],3],MA=[3,vP,"CalculateRouteMatrixResponse",0,["ErrorCount",Bb,nT,Yb],[1,[0,{[fP]:wP}],[()=>qD,0],[()=>rx,0]],4],LA=[3,vP,"CalculateRoutesRequest",0,[LC,$b,uC,hC,SC,kC,GC,NC,zC,qC,"InstructionsMeasurementSystem",gb,"Languages","LegAdditionalFeatures",Rb,"MaxAlternatives",kb,Mb,"SpanAdditionalFeatures",VT,WT,DT,$T,"TravelStepType",nP],[[()=>bD,0],[()=>bD,0],[()=>RI,0],[()=>wA,0],[()=>EI,0],[()=>fA,0],[()=>wA,0],[()=>AI,0],[()=>II,0],[()=>$I,0],0,[()=>EP,{[gP]:yP}],64,[()=>BD,0],0,1,0,[()=>Ex,0],64,[()=>Zx,0],[()=>oO,0],0,[()=>uO,0],0,[()=>v$,0]],2],kA=[3,vP,"CalculateRoutesResponse",0,[Rb,Ab,Bb,"Routes"],[0,()=>r$,[0,{[fP]:wP}],[()=>zD,0]],4],NA=[3,vP,vC,8,["Center",cT],[[()=>bD,0],[()=>gA,0]],2],_A=[3,vP,IC,8,[vb,cT],[[()=>vD,0],1],2],UA=[-3,vP,"InternalServerException",{[dP]:"server",[hP]:500},[bb],[[0,{[mP]:SP}]],1];le.for(vP).registerError(UA,oC);var FA=[3,vP,"Isoline",0,[OC,"Geometries","DistanceThreshold","TimeThreshold"],[[()=>gD,0],[()=>SD,0],[()=>AP,0],[()=>IP,0]],2],GA=[3,vP,"IsolineAllowOptions",0,[ab,cb],[[()=>fA,0],[()=>fA,0]]],BA=[3,vP,"IsolineAvoidanceArea",0,[nb,QC],[[()=>HA,0],[()=>pD,0]],1],HA=[3,vP,"IsolineAvoidanceAreaGeometry",0,[RC,IC,Kb,Hb,jb],[[()=>uD,0],[()=>_A,0],[()=>wD,0],[()=>lI,0],[()=>CD,0]]],zA=[3,vP,"IsolineAvoidanceOptions",0,[mC,TC,EC,UC,ZC,hT,kT,HT,UT,ZT,XT,uP],[[()=>hD,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>b$,0],[()=>fA,0],[()=>fA,0],()=>fD]],jA=[3,vP,"IsolineAvoidanceZoneCategory",0,[PC],[0]],qA=[3,vP,"IsolineCarOptions",0,[WC,wb,Tb,_b],[[()=>OP,0],[()=>oI,0],[()=>SA,0],[()=>mA,0]]],VA=[3,vP,"IsolineConnection",0,["FromPolygonIndex",nb,"ToPolygonIndex"],[1,[()=>WA,0],1],3],WA=[3,vP,"IsolineConnectionGeometry",0,[vb,Gb],[[()=>vD,0],[()=>$P,0]]],KA=[3,vP,"IsolineDestinationOptions",0,[lC,rb,Pb,RT],[[()=>AP,0],[()=>xP,0],[()=>ZA,0],[()=>eI,0]]],QA=[3,vP,"IsolineGranularityOptions",0,["MaxPoints","MaxResolution"],[1,[()=>AP,0]]],ZA=[3,vP,"IsolineMatchingOptions",0,[Ib,Nb,cT,pT],[[()=>yA,0],[()=>AP,0],[()=>AP,0],0]],YA=[3,vP,"IsolineOriginOptions",0,[lC,rb,Pb,RT],[[()=>AP,0],[()=>xP,0],[()=>ZA,0],[()=>eI,0]]],JA=[3,vP,"IsolineScooterOptions",0,[WC,wb,Tb,_b],[[()=>OP,0],[()=>oI,0],[()=>SA,0],[()=>mA,0]]],XA=[3,vP,"IsolineShapeGeometry",0,[Kb,jb],[[()=>wD,0],[()=>CD,0]]],eI=[3,vP,"IsolineSideOfStreetOptions",0,[Qb,eP],[[()=>bD,0],0],1],tI=[3,vP,"IsolineThresholds",0,[HC,jT],[[()=>dD,0],[()=>C$,0]]],nI=[3,vP,"IsolineTrafficOptions",0,[JC,JT],[[()=>IP,0],0]],rI=[3,vP,"IsolineTrailerOptions",0,[dC,PT],[[()=>mA,0],[()=>mA,0]]],iI=[3,vP,"IsolineTravelModeOptions",0,[AC,wT,QT],[[()=>qA,0],[()=>JA,0],[()=>sI,0]]],sI=[3,vP,"IsolineTruckOptions",0,[dC,WC,tb,sb,ob,ib,mb,Cb,wb,Tb,_b,zb,AT,KT,zT,NT,sP,oP,aP],[[()=>mA,0],[()=>OP,0],[()=>IA,0],[()=>mD,0],[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>oI,0],[()=>SA,0],[()=>mA,0],[()=>IA,0],[()=>mA,0],[()=>rI,0],0,[()=>EA,0],[()=>IA,0],[()=>aD,0],[()=>PP,0]]],oI=[3,vP,"IsolineVehicleLicensePlate",8,[Sb],[0]],aI=[3,vP,"LocalizedString",0,[tP,Eb],[[()=>yA,0],0],1],cI=[3,vP,"OptimizeWaypointsRequest",0,[$b,SC,"Clustering",GC,LC,NC,zC,qC,gb,"OptimizeSequencingFor",Mb,WT,DT,$T,nP],[[()=>bD,0],[()=>FO,0],[()=>GO,0],[()=>wA,0],[()=>bD,0],[()=>HO,0],[()=>zO,0],[()=>qO,0],[()=>EP,{[gP]:yP}],0,()=>QO,()=>nD,0,[()=>iD,0],[()=>$$,0]],1],uI=[3,vP,"OptimizeWaypointsResponse",0,[OC,HC,jC,"ImpedingWaypoints","OptimizedWaypoints",Bb,"TimeBreakdown"],[[()=>A$,0],[()=>AP,0],[()=>IP,0],[()=>O$,0],[()=>D$,0],[0,{[fP]:wP}],[()=>tD,0]],7],lI=[3,vP,Hb,8,[Gb,cT],[[()=>$P,0],1],2],dI=[3,vP,"RoadSnapNotice",0,[xC,qT,"TracePointIndexes"],[[()=>kP,0],[()=>yA,0],[()=>xD,0]],3],pI=[3,vP,"RoadSnapSnappedGeometry",0,[vb,Gb],[[()=>vD,0],[()=>$P,0]]],hI=[3,vP,"RoadSnapSnappedTracePoint",0,["Confidence",Lb,"SnappedPosition"],[[()=>gA,0],[()=>bD,0],[()=>bD,0]],3],fI=[3,vP,"RoadSnapTracePoint",0,[Qb,rb,ET,"Timestamp"],[[()=>bD,0],[()=>xP,0],[()=>SA,0],[()=>wA,0]],1],gI=[3,vP,"RoadSnapTrailerOptions",0,[PT],[[()=>mA,0]]],mI=[3,vP,"RoadSnapTravelModeOptions",0,[QT],[[()=>yI,0]]],yI=[3,vP,"RoadSnapTruckOptions",0,[tb,sb,ob,Cb,KT,NT,aP],[[()=>IA,0],[()=>PD,0],[()=>PP,0],[()=>PP,0],[()=>gI,0],[()=>EA,0],[()=>PP,0]]],SI=[3,vP,"Route",0,["Legs","MajorRoadLabels",bT],[[()=>HD,0],[()=>jD,0],[()=>Kx,0]],2],RI=[3,vP,"RouteAllowOptions",0,[ab,cb],[[()=>fA,0],[()=>fA,0]]],wI=[3,vP,"RouteAvoidanceArea",0,[nb,QC],[[()=>vI,0],[()=>DD,0]],1],vI=[3,vP,"RouteAvoidanceAreaGeometry",0,[IC,RC,Kb,Hb,jb],[[()=>_A,0],[()=>uD,0],[()=>wD,0],[()=>lI,0],[()=>CD,0]]],EI=[3,vP,"RouteAvoidanceOptions",0,[mC,TC,EC,UC,ZC,hT,kT,HT,UT,ZT,XT,uP],[[()=>$D,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>b$,0],[()=>fA,0],[()=>fA,0],[()=>MD,0]]],CI=[3,vP,"RouteAvoidanceZoneCategory",0,[PC],[[()=>hA,0]],1],bI=[3,vP,"RouteCarOptions",0,[WC,wb,Tb,_b],[[()=>_P,0],[()=>yO,0],[()=>SA,0],[()=>mA,0]]],TI=[3,vP,"RouteContinueHighwayStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],PI=[3,vP,"RouteContinueStepDetails",0,[pb],[[()=>ED,0]],1],AI=[3,vP,"RouteDestinationOptions",0,[lC,gC,rb,Pb,RT,mT],[[()=>AP,0],[()=>fA,0],[()=>xP,0],[()=>ZI,0],[()=>zx,0],[()=>IP,0]]],II=[3,vP,"RouteDriverOptions",0,["Schedule"],[[()=>LD,0]]],xI=[3,vP,"RouteDriverScheduleInterval",0,["DriveDuration",Jb],[[()=>IP,0],[()=>IP,0]],2],OI=[3,vP,"RouteEmissionType",0,[YT,"Co2EmissionClass"],[[()=>yA,0],[()=>yA,0]],1],DI=[3,vP,"RouteEnterHighwayStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],$I=[3,vP,"RouteExclusionOptions",0,[DC],[[()=>lD,0]],1],MI=[3,vP,"RouteExitStepDetails",0,[pb,Xb,gT,TT,OT],[[()=>ED,0],[()=>mA,0],[()=>iA,0],1,[()=>uA,0]],1],LI=[3,vP,"RouteFerryAfterTravelStep",0,[jC,YT,fb],[[()=>IP,0],[()=>UP,0],[()=>yA,0]],2],kI=[3,vP,"RouteFerryArrival",0,[Wb,jT],[[()=>BI,0],[()=>wA,0]],1],NI=[3,vP,"RouteFerryBeforeTravelStep",0,[jC,YT,fb],[[()=>IP,0],[()=>FP,0],[()=>yA,0]],2],_I=[3,vP,"RouteFerryDeparture",0,[Wb,jT],[[()=>BI,0],[()=>wA,0]],1],UI=[3,vP,"RouteFerryLegDetails",0,["AfterTravelSteps",yC,"BeforeTravelSteps",BC,Ab,qb,CT,FT,"RouteName",bT],[[()=>kD,0],[()=>kI,0],[()=>ND,0],[()=>_I,0],()=>_D,[()=>XD,0],[()=>UD,0],[()=>FD,0],[()=>yA,0],[()=>zI,0]],8],FI=[3,vP,"RouteFerryNotice",0,[xC,db],[0,0],1],GI=[3,vP,"RouteFerryOverviewSummary",0,[HC,jC],[[()=>AP,0],[()=>IP,0]],2],BI=[3,vP,"RouteFerryPlace",0,[Qb,Ob,Lb,iP],[[()=>TD,0],[()=>yA,0],[()=>TD,0],[()=>mA,0]],1],HI=[3,vP,"RouteFerrySpan",0,[$C,HC,jC,eb,Db,lT],[[()=>bP,0],[()=>AP,0],[()=>IP,0],1,[()=>ED,0],[()=>yA,0]]],zI=[3,vP,"RouteFerrySummary",0,[Fb,MT],[[()=>GI,0],[()=>jI,0]]],jI=[3,vP,"RouteFerryTravelOnlySummary",0,[jC],[[()=>IP,0]],1],qI=[3,vP,"RouteFerryTravelStep",0,[jC,YT,HC,eb,fb],[[()=>IP,0],[()=>GP,0],[()=>AP,0],1,[()=>yA,0]],2],VI=[3,vP,"RouteKeepStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],WI=[3,vP,"RouteLeg",0,[nb,DT,YT,"FerryLegDetails",Eb,"PedestrianLegDetails","VehicleLegDetails"],[[()=>KI,0],[()=>zP,0],[()=>jP,0],[()=>UI,0],0,[()=>Ax,0],[()=>mO,0]],3],KI=[3,vP,"RouteLegGeometry",0,[vb,Gb],[[()=>vD,0],[()=>$P,0]]],QI=[3,vP,"RouteMajorRoadLabel",0,[rT,iT],[[()=>aI,0],[()=>vx,0]]],ZI=[3,vP,"RouteMatchingOptions",0,[Ib,Nb,cT,pT],[[()=>yA,0],[()=>AP,0],[()=>AP,0],0]],YI=[3,vP,"RouteMatrixAllowOptions",8,[ab,cb],[[()=>fA,0],[()=>fA,0]]],JI=[3,vP,"RouteMatrixAutoCircle",0,["Margin","MaxRadius"],[[()=>AP,0],[()=>AP,0]]],XI=[3,vP,"RouteMatrixAvoidanceArea",0,[nb],[[()=>ex,0]],1],ex=[3,vP,"RouteMatrixAvoidanceAreaGeometry",0,[RC,Kb,jb],[[()=>uD,0],[()=>wD,0],[()=>CD,0]]],tx=[3,vP,"RouteMatrixAvoidanceOptions",0,[mC,TC,EC,UC,ZC,kT,HT,UT,ZT,XT,uP],[[()=>VD,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>b$,0],[()=>fA,0],[()=>fA,0],[()=>WD,0]]],nx=[3,vP,"RouteMatrixAvoidanceZoneCategory",0,[PC],[[()=>WP,0]]],rx=[3,vP,"RouteMatrixBoundary",0,[nb,"Unbounded"],[[()=>ix,0],[()=>fA,0]]],ix=[3,vP,"RouteMatrixBoundaryGeometry",0,["AutoCircle",vC,RC,Kb],[[()=>JI,0],[()=>NA,0],[()=>uD,0],[()=>wD,0]]],sx=[3,vP,"RouteMatrixCarOptions",0,[wb,Tb,_b],[[()=>Rx,0],[()=>SA,0],[()=>mA,0]]],ox=[3,vP,"RouteMatrixDestination",0,[Qb,Ub],[[()=>bD,0],[()=>ax,0]],1],ax=[3,vP,"RouteMatrixDestinationOptions",0,[lC,rb,Pb,RT],[[()=>AP,0],[()=>xP,0],[()=>lx,0],[()=>fx,0]]],cx=[3,vP,"RouteMatrixEntry",0,[HC,jC,"Error"],[[()=>AP,0],[()=>IP,0],0],2],ux=[3,vP,"RouteMatrixExclusionOptions",0,[DC],[[()=>lD,0]],1],lx=[3,vP,"RouteMatrixMatchingOptions",0,[Ib,Nb,cT,pT],[[()=>yA,0],[()=>AP,0],[()=>AP,0],0]],dx=[3,vP,"RouteMatrixOrigin",0,[Qb,Ub],[[()=>bD,0],[()=>px,0]],1],px=[3,vP,"RouteMatrixOriginOptions",0,[lC,rb,Pb,RT],[[()=>AP,0],[()=>xP,0],[()=>lx,0],[()=>fx,0]]],hx=[3,vP,"RouteMatrixScooterOptions",0,[wb,Tb,_b],[[()=>Rx,0],[()=>SA,0],[()=>mA,0]]],fx=[3,vP,"RouteMatrixSideOfStreetOptions",0,[Qb,eP],[[()=>bD,0],0],1],gx=[3,vP,"RouteMatrixTrafficOptions",0,[JC,JT],[[()=>IP,0],0]],mx=[3,vP,"RouteMatrixTrailerOptions",0,[PT],[[()=>mA,0]]],yx=[3,vP,"RouteMatrixTravelModeOptions",0,[AC,wT,QT],[[()=>sx,0],[()=>hx,0],[()=>Sx,0]]],Sx=[3,vP,"RouteMatrixTruckOptions",0,[dC,tb,sb,ob,mb,Cb,wb,Tb,_b,zb,KT,zT,NT,sP,oP,aP],[[()=>mA,0],[()=>IA,0],[()=>QD,0],[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>Rx,0],[()=>SA,0],[()=>mA,0],[()=>IA,0],[()=>mx,0],[()=>VP,0],[()=>EA,0],[()=>IA,0],[()=>aD,0],[()=>PP,0]]],Rx=[3,vP,"RouteMatrixVehicleLicensePlate",8,[Sb],[0]],wx=[3,vP,"RouteNoticeDetailRange",0,["Min","Max"],[1,1]],vx=[3,vP,iT,0,[tP,"Direction",Eb],[[()=>yA,0],[()=>NP,0],0],1],Ex=[3,vP,"RouteOriginOptions",0,[lC,gC,rb,Pb,RT],[[()=>AP,0],[()=>fA,0],[()=>xP,0],[()=>ZI,0],[()=>zx,0]]],Cx=[3,vP,"RoutePassThroughPlace",0,[Qb,Lb,iP],[[()=>TD,0],[()=>TD,0],[()=>mA,0]],1],bx=[3,vP,"RoutePassThroughWaypoint",0,[Wb,eb],[[()=>Cx,0],1],1],Tx=[3,vP,"RoutePedestrianArrival",0,[Wb,jT],[[()=>Dx,0],[()=>wA,0]],1],Px=[3,vP,"RoutePedestrianDeparture",0,[Wb,jT],[[()=>Dx,0],[()=>wA,0]],1],Ax=[3,vP,"RoutePedestrianLegDetails",0,[yC,BC,Ab,qb,CT,FT,bT],[[()=>Tx,0],[()=>Px,0],()=>e$,[()=>XD,0],[()=>t$,0],[()=>n$,0],[()=>Mx,0]],6],Ix=[3,vP,"RoutePedestrianNotice",0,[xC,db],[0,0],1],xx=[3,vP,"RoutePedestrianOptions",0,[ET],[[()=>SA,0]]],Ox=[3,vP,"RoutePedestrianOverviewSummary",0,[HC,jC],[[()=>AP,0],[()=>IP,0]],2],Dx=[3,vP,"RoutePedestrianPlace",0,[Qb,Ob,Lb,RT,iP],[[()=>TD,0],[()=>yA,0],[()=>TD,0],[()=>ZP,0],[()=>mA,0]],1],$x=[3,vP,"RoutePedestrianSpan",0,[wC,$C,HC,jC,FC,YC,eb,hb,Db,"PedestrianAccess",lT,Zb,sT,ST,IT],[[()=>IP,0],[()=>bP,0],[()=>AP,0],[()=>IP,0],[()=>Vx,0],[()=>mA,0],1,65,[()=>ED,0],[()=>o$,0],[()=>yA,0],[()=>a$,0],[()=>JD,0],[()=>Wx,0],[()=>IP,0]]],Mx=[3,vP,"RoutePedestrianSummary",0,[Fb,MT],[[()=>Ox,0],[()=>Lx,0]]],Lx=[3,vP,"RoutePedestrianTravelOnlySummary",0,[jC],[[()=>IP,0]],1],kx=[3,vP,"RoutePedestrianTravelStep",0,[jC,YT,bC,CC,HC,VC,eb,fb,yb,xb,eT,tT,oT,vT,GT],[[()=>IP,0],[()=>KP,0],[()=>PI,0],[()=>Ux,0],[()=>AP,0],[()=>ED,0],1,[()=>yA,0],[()=>VI,0],[()=>Ux,0],[()=>Fx,0],[()=>Gx,0],[()=>Bx,0],[()=>jx,0],[()=>dO,0]],2],Nx=[3,vP,"RouteRampStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],_x=[3,vP,"RouteResponseNotice",0,[xC,db],[0,0],1],Ux=[3,vP,"RouteRoad",0,[rT,iT,"Towards",YT],[[()=>ED,0],[()=>JD,0],[()=>ED,0],[()=>QP,0]],3],Fx=[3,vP,"RouteRoundaboutEnterStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],Gx=[3,vP,"RouteRoundaboutExitStepDetails",0,[pb,Xb,"RoundaboutAngle",gT],[[()=>ED,0],[()=>mA,0],1,[()=>iA,0]],1],Bx=[3,vP,"RouteRoundaboutPassStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],Hx=[3,vP,"RouteScooterOptions",0,[WC,wb,Tb,_b],[[()=>_P,0],[()=>yO,0],[()=>SA,0],[()=>mA,0]]],zx=[3,vP,"RouteSideOfStreetOptions",0,[Qb,eP],[[()=>bD,0],0],1],jx=[3,vP,"RouteSignpost",0,["Labels"],[[()=>i$,0]],1],qx=[3,vP,"RouteSignpostLabel",0,[iT,"Text"],[[()=>vx,0],[()=>aI,0]]],Vx=[3,vP,"RouteSpanDynamicSpeedDetails",0,["BestCaseSpeed","TurnDuration","TypicalSpeed"],[[()=>SA,0],[()=>IP,0],[()=>SA,0]]],Wx=[3,vP,"RouteSpanSpeedLimitDetails",0,[Tb,"Unlimited"],[[()=>SA,0],[()=>fA,0]]],Kx=[3,vP,"RouteSummary",0,[HC,jC,VT],[[()=>AP,0],[()=>IP,0],[()=>iO,0]]],Qx=[3,vP,"RouteToll",0,["PaymentSites","Rates","Systems",$C],[[()=>p$,0],[()=>h$,0],65,[()=>bP,0]],3],Zx=[3,vP,"RouteTollOptions",0,["AllTransponders","AllVignettes",MC,"EmissionType","VehicleCategory"],[[()=>fA,0],[()=>fA,0],0,[()=>OI,0],[()=>aA,0]]],Yx=[3,vP,"RouteTollPass",0,["IncludesReturnTrip","SeniorPass","TransferCount","TripCount","ValidityPeriod"],[[()=>fA,0],[()=>fA,0],[()=>mA,0],[()=>mA,0],[()=>Jx,0]]],Jx=[3,vP,"RouteTollPassValidityPeriod",0,["Period","PeriodCount"],[[()=>sA,0],[()=>mA,0]],1],Xx=[3,vP,"RouteTollPaymentSite",0,[Qb,Ob],[[()=>TD,0],0],1],eO=[3,vP,"RouteTollPrice",0,[MC,KC,uT,tP,"PerDuration",aT],[0,[()=>fA,0],[()=>fA,0],[()=>gA,0],[()=>IP,0],[()=>nO,0]],4],tO=[3,vP,"RouteTollPriceSummary",0,[MC,KC,uT,tP,aT],[0,[()=>fA,0],[()=>fA,0],[()=>gA,0],[()=>nO,0]],4],nO=[3,vP,"RouteTollPriceValueRange",0,["Min","Max"],[[()=>gA,0],[()=>gA,0]],2],rO=[3,vP,"RouteTollRate",0,[lb,"LocalPrice",Ob,"PaymentMethods","Transponders","ApplicableTimes","ConvertedPrice","Pass"],[[()=>yA,0],[()=>eO,0],[()=>yA,0],[()=>d$,0],[()=>g$,0],[()=>yA,0],[()=>eO,0],[()=>Yx,0]],5],iO=[3,vP,"RouteTollSummary",0,["Total"],[[()=>tO,0]]],sO=[3,vP,"RouteTollSystem",0,[Ob],[[()=>yA,0]]],oO=[3,vP,"RouteTrafficOptions",0,[JC,JT],[[()=>IP,0],0]],aO=[3,vP,"RouteTrailerOptions",0,[dC,PT],[[()=>mA,0],[()=>mA,0]]],cO=[3,vP,"RouteTransponder",0,["SystemName"],[[()=>yA,0]]],uO=[3,vP,"RouteTravelModeOptions",0,[AC,Vb,wT,QT],[[()=>bI,0],[()=>xx,0],[()=>Hx,0],[()=>lO,0]]],lO=[3,vP,"RouteTruckOptions",0,[dC,WC,tb,sb,ob,ib,mb,Cb,wb,Tb,_b,zb,AT,KT,zT,NT,sP,oP,aP],[[()=>mA,0],[()=>_P,0],[()=>IA,0],[()=>GD,0],[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>yO,0],[()=>SA,0],[()=>mA,0],[()=>IA,0],[()=>mA,0],[()=>aO,0],[()=>cA,0],[()=>EA,0],[()=>IA,0],[()=>aD,0],[()=>PP,0]]],dO=[3,vP,"RouteTurnStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],pO=[3,vP,"RouteUTurnStepDetails",0,[pb,gT,TT,OT],[[()=>ED,0],[()=>iA,0],1,[()=>uA,0]],1],hO=[3,vP,"RouteVehicleArrival",0,[Wb,jT],[[()=>vO,0],[()=>wA,0]],1],fO=[3,vP,"RouteVehicleDeparture",0,[Wb,jT],[[()=>vO,0],[()=>wA,0]],1],gO=[3,vP,"RouteVehicleIncident",0,["Description","EndTime","Severity","StartTime",YT],[[()=>yA,0],[()=>wA,0],[()=>lA,0],[()=>wA,0],[()=>dA,0]]],mO=[3,vP,"RouteVehicleLegDetails",0,[yC,BC,hb,Ab,qb,CT,VT,BT,FT,UT,cP,bT],[[()=>hO,0],[()=>fO,0],[()=>m$,0],[()=>S$,0],[()=>XD,0],[()=>R$,0],[()=>l$,0],[()=>f$,0],[()=>w$,0],[()=>b$,0],[()=>E$,0],[()=>CO,0]],11],yO=[3,vP,"RouteVehicleLicensePlate",0,[Sb],[[()=>yA,0]]],SO=[3,vP,"RouteVehicleNotice",0,[xC,"Details",db],[0,[()=>y$,0],0],2],RO=[3,vP,"RouteVehicleNoticeDetail",0,[qT,"ViolatedConstraints"],[[()=>yA,0],[()=>PO,0]]],wO=[3,vP,"RouteVehicleOverviewSummary",0,[HC,jC,wC,IT],[[()=>AP,0],[()=>IP,0],[()=>IP,0],[()=>IP,0]],2],vO=[3,vP,"RouteVehiclePlace",0,[Qb,Ob,Lb,RT,iP],[[()=>TD,0],[()=>yA,0],[()=>TD,0],[()=>ZP,0],[()=>mA,0]],1],EO=[3,vP,"RouteVehicleSpan",0,[wC,"CarAccess",$C,HC,jC,FC,YC,"Gate",eb,hb,Db,Ab,"RailwayCrossing",lT,Zb,sT,"ScooterAccess",ST,BT,"TruckAccess",UT,IT,cP],[[()=>IP,0],[()=>s$,0],[()=>bP,0],[()=>AP,0],[()=>IP,0],[()=>Vx,0],[()=>mA,0],[()=>JP,0],1,65,[()=>ED,0],65,[()=>eA,0],[()=>yA,0],[()=>a$,0],[()=>JD,0],[()=>c$,0],[()=>Wx,0],65,[()=>u$,0],65,[()=>IP,0],65]],CO=[3,vP,"RouteVehicleSummary",0,[Fb,MT],[[()=>wO,0],[()=>bO,0]]],bO=[3,vP,"RouteVehicleTravelOnlySummary",0,[jC,wC,IT],[[()=>IP,0],[()=>IP,0],[()=>IP,0]],1],TO=[3,vP,"RouteVehicleTravelStep",0,[jC,YT,"ContinueHighwayStepDetails",bC,CC,HC,"EnterHighwayStepDetails",VC,"ExitStepDetails",eb,fb,yb,xb,"RampStepDetails",eT,tT,oT,vT,GT,"UTurnStepDetails"],[[()=>IP,0],[()=>pA,0],[()=>TI,0],[()=>PI,0],[()=>Ux,0],[()=>AP,0],[()=>DI,0],[()=>ED,0],[()=>MI,0],1,[()=>yA,0],[()=>VI,0],[()=>Ux,0],[()=>Nx,0],[()=>Fx,0],[()=>Gx,0],[()=>Bx,0],[()=>jx,0],[()=>dO,0],[()=>pO,0]],2],PO=[3,vP,"RouteViolatedConstraints",0,[sb,"AllHazardsRestricted",dC,"MaxHeight","MaxKpraLength","MaxLength","MaxPayloadCapacity","MaxWeight","MaxWeightPerAxle","MaxWeightPerAxleGroup","MaxWidth",_b,"RestrictedTimes","TimeDependent",PT,DT,_T,zT,NT],[[()=>GD,0],[()=>fA,0],()=>wx,[()=>PP,0],[()=>PP,0],[()=>PP,0],[()=>IA,0],[()=>IO,0],[()=>IA,0],[()=>aD,0],[()=>PP,0],()=>wx,0,[()=>fA,0],()=>wx,[()=>fA,0],0,[()=>cA,0],[()=>EA,0]],1],AO=[3,vP,"RouteWaypoint",0,[Qb,lC,gC,rb,Pb,"PassThrough",RT,mT],[[()=>bD,0],[()=>AP,0],[()=>fA,0],[()=>xP,0],[()=>ZI,0],[()=>fA,0],[()=>zx,0],[()=>IP,0]],1],IO=[3,vP,"RouteWeightConstraint",0,[YT,tP],[0,[()=>IA,0]],2],xO=[3,vP,"RouteZone",0,[PC,Ob],[[()=>hA,0],[()=>yA,0]]],OO=[3,vP,"SnapToRoadsRequest",0,["TracePoints",gb,yT,"SnapRadius",DT,$T],[[()=>OD,0],[()=>EP,{[gP]:yP}],0,[()=>AP,0],0,[()=>mI,0]],1],DO=[3,vP,"SnapToRoadsResponse",0,[Ab,Bb,yT,"SnappedTracePoints","SnappedGeometry"],[[()=>AD,0],[0,{[fP]:wP}],0,[()=>ID,0],[()=>pI,0]],4],$O=[-3,vP,"ThrottlingException",{[dP]:lP,[hP]:429},[bb],[[0,{[mP]:SP}]],1];le.for(vP).registerError($O,aC);var MO=[-3,vP,"ValidationException",{[dP]:lP,[hP]:400},[bb,dT,"FieldList"],[[0,{[mP]:SP}],[0,{[mP]:"reason"}],[()=>T$,{[mP]:"fieldList"}]],3];le.for(vP).registerError(MO,cC);var LO=[3,vP,"ValidationExceptionField",0,[Ob,bb],[[0,{[mP]:"name"}],[0,{[mP]:SP}]],2],kO=[3,vP,"WaypointOptimizationAccessHours",0,[XC,"To"],[[()=>NO,0],[()=>NO,0]],2],NO=[3,vP,"WaypointOptimizationAccessHoursEntry",0,[_C,LT],[[()=>TP,0],[()=>RA,0]],2],_O=[3,vP,"WaypointOptimizationAvoidanceArea",0,[nb],[[()=>UO,0]],1],UO=[3,vP,"WaypointOptimizationAvoidanceAreaGeometry",0,[RC],[[()=>uD,0]]],FO=[3,vP,"WaypointOptimizationAvoidanceOptions",0,[mC,TC,EC,UC,ZC,kT,ZT,XT],[[()=>P$,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0],[()=>fA,0]]],GO=[3,vP,"WaypointOptimizationClusteringOptions",0,["Algorithm","DrivingDistanceOptions"],[[()=>CA,0],[()=>jO,0]],1],BO=[3,vP,"WaypointOptimizationConnection",0,[HC,XC,Jb,"To",xT,rP],[[()=>AP,0],0,[()=>IP,0],0,[()=>IP,0],[()=>IP,0]],6],HO=[3,vP,"WaypointOptimizationDestinationOptions",0,[pC,fC,rb,lb,fT,RT],[[()=>kO,0],[()=>wA,0],[()=>xP,0],0,[()=>IP,0],[()=>eD,0]]],zO=[3,vP,"WaypointOptimizationDriverOptions",0,["RestCycles","RestProfile","TreatServiceTimeAs"],[[()=>JO,0],[()=>XO,0],[()=>PA,0]]],jO=[3,vP,"WaypointOptimizationDrivingDistanceOptions",0,["DrivingDistance"],[[()=>AP,0]],1],qO=[3,vP,"WaypointOptimizationExclusionOptions",0,[DC],[[()=>lD,0]],1],VO=[3,vP,"WaypointOptimizationFailedConstraint",0,["Constraint",dT],[[()=>bA,0],[()=>yA,0]]],WO=[3,vP,"WaypointOptimizationImpedingWaypoint",0,["FailedConstraints",lb,Qb],[[()=>I$,0],0,[()=>bD,0]],3],KO=[3,vP,"WaypointOptimizationOptimizedWaypoint",0,[GC,lb,Qb,hC,"ClusterIndex"],[[()=>wA,0],0,[()=>bD,0],[()=>wA,0],1],3],QO=[3,vP,"WaypointOptimizationOriginOptions",0,[lb],[0]],ZO=[3,vP,"WaypointOptimizationPedestrianOptions",0,[ET],[[()=>SA,0]]],YO=[3,vP,"WaypointOptimizationRestCycleDurations",0,[Jb,"WorkDuration"],[[()=>IP,0],[()=>IP,0]],2],JO=[3,vP,"WaypointOptimizationRestCycles",0,["LongCycle","ShortCycle"],[[()=>YO,0],[()=>YO,0]],2],XO=[3,vP,"WaypointOptimizationRestProfile",0,["Profile"],[[()=>yA,0]],1],eD=[3,vP,"WaypointOptimizationSideOfStreetOptions",0,[Qb,eP],[[()=>bD,0],0],1],tD=[3,vP,"WaypointOptimizationTimeBreakdown",0,[Jb,fT,xT,rP],[[()=>IP,0],[()=>IP,0],[()=>IP,0],[()=>IP,0]],4],nD=[3,vP,"WaypointOptimizationTrafficOptions",0,[JT],[0]],rD=[3,vP,"WaypointOptimizationTrailerOptions",0,[PT],[[()=>mA,0]]],iD=[3,vP,"WaypointOptimizationTravelModeOptions",0,[Vb,QT],[[()=>ZO,0],[()=>sD,0]]],sD=[3,vP,"WaypointOptimizationTruckOptions",0,[tb,sb,ob,Cb,KT,zT,NT,sP,aP],[[()=>IA,0],[()=>x$,0],[()=>PP,0],[()=>PP,0],[()=>rD,0],[()=>AA,0],[()=>EA,0],[()=>IA,0],[()=>PP,0]]],oD=[3,vP,"WaypointOptimizationWaypoint",0,[Qb,pC,fC,"Before",rb,lb,fT,RT],[[()=>bD,0],[()=>kO,0],[()=>wA,0],65,[()=>xP,0],0,[()=>IP,0],[()=>eD,0]],1],aD=[3,vP,oP,0,["Single","Tandem","Triple","Quad","Quint"],[[()=>IA,0],[()=>IA,0],[()=>IA,0],[()=>IA,0],[()=>IA,0]]],cD=[-3,RP,"GeoRoutesServiceException",0,[],[]];le.for(RP).registerError(cD,iC);var uD=[1,vP,RC,8,1],lD=[1,vP,"CountryCodeList",0,[()=>CP,0]],dD=[1,vP,"DistanceThresholdList",0,[()=>AP,0]],pD=[1,vP,"IsolineAvoidanceAreaGeometryList",0,[()=>HA,0]],hD=[1,vP,"IsolineAvoidanceAreaList",0,[()=>BA,0]],fD=[1,vP,"IsolineAvoidanceZoneCategoryList",0,()=>jA],gD=[1,vP,"IsolineConnectionList",0,[()=>VA,0]],mD=[1,vP,"IsolineHazardousCargoTypeList",0,[()=>DP,0]],yD=[1,vP,"IsolineList",0,[()=>FA,0]],SD=[1,vP,"IsolineShapeGeometryList",0,[()=>XA,0]],RD=[1,vP,"LinearRing",0,[()=>bD,0]],wD=[1,vP,"LinearRings",0,[()=>RD,0]],vD=[1,vP,vb,0,[()=>bD,0]],ED=[1,vP,"LocalizedStringList",0,[()=>aI,0]],CD=[1,vP,"PolylineRingList",0,[()=>MP,0]],bD=[1,vP,Qb,8,1],TD=[1,vP,"Position23",8,1],PD=[1,vP,"RoadSnapHazardousCargoTypeList",0,[()=>LP,0]],AD=[1,vP,"RoadSnapNoticeList",0,[()=>dI,0]],ID=[1,vP,"RoadSnapSnappedTracePointList",0,[()=>hI,0]],xD=[1,vP,"RoadSnapTracePointIndexList",8,1],OD=[1,vP,"RoadSnapTracePointList",0,[()=>fI,0]],DD=[1,vP,"RouteAvoidanceAreaGeometryList",0,[()=>vI,0]],$D=[1,vP,"RouteAvoidanceAreaList",0,[()=>wI,0]],MD=[1,vP,"RouteAvoidanceZoneCategoryList",0,[()=>CI,0]],LD=[1,vP,"RouteDriverScheduleIntervalList",0,[()=>xI,0]],kD=[1,vP,"RouteFerryAfterTravelStepList",0,[()=>LI,0]],ND=[1,vP,"RouteFerryBeforeTravelStepList",0,[()=>NI,0]],_D=[1,vP,"RouteFerryNoticeList",0,()=>FI],UD=[1,vP,"RouteFerrySpanList",0,[()=>HI,0]],FD=[1,vP,"RouteFerryTravelStepList",0,[()=>qI,0]],GD=[1,vP,"RouteHazardousCargoTypeList",0,[()=>BP,0]],BD=[1,vP,"RouteLegAdditionalFeatureList",0,[()=>HP,0]],HD=[1,vP,"RouteLegList",0,[()=>WI,0]],zD=[1,vP,"RouteList",0,[()=>SI,0]],jD=[1,vP,"RouteMajorRoadLabelList",0,[()=>QI,0]],qD=[1,vP,nT,0,[()=>YD,0]],VD=[1,vP,"RouteMatrixAvoidanceAreaList",0,[()=>XI,0]],WD=[1,vP,"RouteMatrixAvoidanceZoneCategoryList",0,[()=>nx,0]],KD=[1,vP,"RouteMatrixDestinationList",0,[()=>ox,0]],QD=[1,vP,"RouteMatrixHazardousCargoTypeList",0,[()=>qP,0]],ZD=[1,vP,"RouteMatrixOriginList",0,[()=>dx,0]],YD=[1,vP,"RouteMatrixRow",0,[()=>cx,0]],JD=[1,vP,"RouteNumberList",0,[()=>vx,0]],XD=[1,vP,"RoutePassThroughWaypointList",0,[()=>bx,0]],e$=[1,vP,"RoutePedestrianNoticeList",0,()=>Ix],t$=[1,vP,"RoutePedestrianSpanList",0,[()=>$x,0]],n$=[1,vP,"RoutePedestrianTravelStepList",0,[()=>kx,0]],r$=[1,vP,"RouteResponseNoticeList",0,()=>_x],i$=[1,vP,"RouteSignpostLabelList",0,[()=>qx,0]],s$=[1,vP,"RouteSpanCarAccessAttributeList",0,[()=>YP,0]],o$=[1,vP,"RouteSpanPedestrianAccessAttributeList",0,[()=>XP,0]],a$=[1,vP,"RouteSpanRoadAttributeList",0,[()=>tA,0]],c$=[1,vP,"RouteSpanScooterAccessAttributeList",0,[()=>nA,0]],u$=[1,vP,"RouteSpanTruckAccessAttributeList",0,[()=>rA,0]],l$=[1,vP,"RouteTollList",0,[()=>Qx,0]],d$=[1,vP,"RouteTollPaymentMethodList",0,[()=>oA,0]],p$=[1,vP,"RouteTollPaymentSiteList",0,[()=>Xx,0]],h$=[1,vP,"RouteTollRateList",0,[()=>rO,0]],f$=[1,vP,"RouteTollSystemList",0,[()=>sO,0]],g$=[1,vP,"RouteTransponderList",0,[()=>cO,0]],m$=[1,vP,"RouteVehicleIncidentList",0,[()=>gO,0]],y$=[1,vP,"RouteVehicleNoticeDetailList",0,[()=>RO,0]],S$=[1,vP,"RouteVehicleNoticeList",0,[()=>SO,0]],R$=[1,vP,"RouteVehicleSpanList",0,[()=>EO,0]],w$=[1,vP,"RouteVehicleTravelStepList",0,[()=>TO,0]],v$=[1,vP,"RouteWaypointList",0,[()=>AO,0]],E$=[1,vP,"RouteZoneList",0,[()=>xO,0]],C$=[1,vP,"TimeThresholdList",0,[()=>IP,0]],b$=[1,vP,"TruckRoadTypeList",0,[()=>vA,0]],T$=[1,vP,"ValidationExceptionFieldList",0,[()=>LO,0]],P$=[1,vP,"WaypointOptimizationAvoidanceAreaList",0,[()=>_O,0]],A$=[1,vP,"WaypointOptimizationConnectionList",0,[()=>BO,0]],I$=[1,vP,"WaypointOptimizationFailedConstraintList",0,[()=>VO,0]],x$=[1,vP,"WaypointOptimizationHazardousCargoTypeList",0,[()=>TA,0]],O$=[1,vP,"WaypointOptimizationImpedingWaypointList",0,[()=>WO,0]],D$=[1,vP,"WaypointOptimizationOptimizedWaypointList",0,[()=>KO,0]],$$=[1,vP,"WaypointOptimizationWaypointList",0,[()=>oD,0]],M$=[9,vP,"CalculateIsolines",{[pP]:["POST","/isolines",200]},()=>OA,()=>DA],L$=[9,vP,"CalculateRouteMatrix",{[pP]:["POST","/route-matrix",200]},()=>$A,()=>MA],k$=[9,vP,"CalculateRoutes",{[pP]:["POST","/routes",200]},()=>LA,()=>kA],N$=[9,vP,"OptimizeWaypoints",{[pP]:["POST","/optimize-waypoints",200]},()=>cI,()=>uI],_$=[9,vP,"SnapToRoads",{[pP]:["POST","/snap-to-roads",200]},()=>OO,()=>DO];class U$ extends(er.classBuilder().ep(AE).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateIsolines",{}).n("GeoRoutesClient","CalculateIsolinesCommand").sc(M$).build()){}class F$ extends(er.classBuilder().ep(AE).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateRouteMatrix",{}).n("GeoRoutesClient","CalculateRouteMatrixCommand").sc(L$).build()){}class G$ extends(er.classBuilder().ep(AE).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateRoutes",{}).n("GeoRoutesClient","CalculateRoutesCommand").sc(k$).build()){}class B$ extends(er.classBuilder().ep(AE).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("RoutesService","OptimizeWaypoints",{}).n("GeoRoutesClient","OptimizeWaypointsCommand").sc(N$).build()){}class H$ extends(er.classBuilder().ep(AE).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("RoutesService","SnapToRoads",{}).n("GeoRoutesClient","SnapToRoadsCommand").sc(_$).build()){}const z$={CalculateIsolinesCommand:U$,CalculateRouteMatrixCommand:F$,CalculateRoutesCommand:G$,OptimizeWaypointsCommand:B$,SnapToRoadsCommand:H$};class j$ extends rC{}nr(z$,j$);var q$=Object.freeze({__proto__:null,$Command:er,AccessDeniedException:sC,AccessDeniedException$:xA,CalculateIsolines$:M$,CalculateIsolinesCommand:U$,CalculateIsolinesRequest$:OA,CalculateIsolinesResponse$:DA,CalculateRouteMatrix$:L$,CalculateRouteMatrixCommand:F$,CalculateRouteMatrixRequest$:$A,CalculateRouteMatrixResponse$:MA,CalculateRoutes$:k$,CalculateRoutesCommand:G$,CalculateRoutesRequest$:LA,CalculateRoutesResponse$:kA,Circle$:NA,Corridor$:_A,DayOfWeek:{FRIDAY:"Friday",MONDAY:"Monday",SATURDAY:"Saturday",SUNDAY:"Sunday",THURSDAY:"Thursday",TUESDAY:"Tuesday",WEDNESDAY:"Wednesday"},GeoRoutes:j$,GeoRoutesClient:rC,GeoRoutesServiceException:iC,GeoRoutesServiceException$:cD,GeometryFormat:{FLEXIBLE_POLYLINE:"FlexiblePolyline",SIMPLE:"Simple"},InternalServerException:oC,InternalServerException$:UA,Isoline$:FA,IsolineAllowOptions$:GA,IsolineAvoidanceArea$:BA,IsolineAvoidanceAreaGeometry$:HA,IsolineAvoidanceOptions$:zA,IsolineAvoidanceZoneCategory$:jA,IsolineCarOptions$:qA,IsolineConnection$:VA,IsolineConnectionGeometry$:WA,IsolineDestinationOptions$:KA,IsolineEngineType:{ELECTRIC:"Electric",INTERNAL_COMBUSTION:"InternalCombustion",PLUGIN_HYBRID:"PluginHybrid"},IsolineGranularityOptions$:QA,IsolineHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},IsolineMatchingOptions$:ZA,IsolineOptimizationObjective:{ACCURATE_CALCULATION:"AccurateCalculation",BALANCED_CALCULATION:"BalancedCalculation",FAST_CALCULATION:"FastCalculation"},IsolineOriginOptions$:YA,IsolineScooterOptions$:JA,IsolineShapeGeometry$:XA,IsolineSideOfStreetOptions$:eI,IsolineThresholds$:tI,IsolineTrafficOptions$:nI,IsolineTrailerOptions$:rI,IsolineTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},IsolineTravelModeOptions$:iI,IsolineTruckOptions$:sI,IsolineTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},IsolineVehicleLicensePlate$:oI,IsolineZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},LocalizedString$:aI,MatchingStrategy:{MATCH_ANY:"MatchAny",MATCH_MOST_SIGNIFICANT_ROAD:"MatchMostSignificantRoad"},MeasurementSystem:{IMPERIAL:"Imperial",METRIC:"Metric"},OptimizeWaypoints$:N$,OptimizeWaypointsCommand:B$,OptimizeWaypointsRequest$:cI,OptimizeWaypointsResponse$:uI,PolylineCorridor$:lI,RoadSnapHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RoadSnapNotice$:dI,RoadSnapNoticeCode:{TRACE_POINTS_HEADING_IGNORED:"TracePointsHeadingIgnored",TRACE_POINTS_IGNORED:"TracePointsIgnored",TRACE_POINTS_MOVED_BY_LARGE_DISTANCE:"TracePointsMovedByLargeDistance",TRACE_POINTS_NOT_MATCHED:"TracePointsNotMatched",TRACE_POINTS_OUT_OF_SEQUENCE:"TracePointsOutOfSequence",TRACE_POINTS_SPEED_ESTIMATED:"TracePointsSpeedEstimated",TRACE_POINTS_SPEED_IGNORED:"TracePointsSpeedIgnored"},RoadSnapSnappedGeometry$:pI,RoadSnapSnappedTracePoint$:hI,RoadSnapTracePoint$:fI,RoadSnapTrailerOptions$:gI,RoadSnapTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RoadSnapTravelModeOptions$:mI,RoadSnapTruckOptions$:yI,Route$:SI,RouteAllowOptions$:RI,RouteAvoidanceArea$:wI,RouteAvoidanceAreaGeometry$:vI,RouteAvoidanceOptions$:EI,RouteAvoidanceZoneCategory$:CI,RouteCarOptions$:bI,RouteContinueHighwayStepDetails$:TI,RouteContinueStepDetails$:PI,RouteDestinationOptions$:AI,RouteDirection:{EAST:"East",NORTH:"North",SOUTH:"South",WEST:"West"},RouteDriverOptions$:II,RouteDriverScheduleInterval$:xI,RouteEmissionType$:OI,RouteEngineType:{ELECTRIC:"Electric",INTERNAL_COMBUSTION:"InternalCombustion",PLUGIN_HYBRID:"PluginHybrid"},RouteEnterHighwayStepDetails$:DI,RouteExclusionOptions$:$I,RouteExitStepDetails$:MI,RouteFerryAfterTravelStep$:LI,RouteFerryAfterTravelStepType:{DEBOARD:"Deboard"},RouteFerryArrival$:kI,RouteFerryBeforeTravelStep$:NI,RouteFerryBeforeTravelStepType:{BOARD:"Board"},RouteFerryDeparture$:_I,RouteFerryLegDetails$:UI,RouteFerryNotice$:FI,RouteFerryNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",NO_SCHEDULE:"NoSchedule",OTHER:"Other",POTENTIAL_VIOLATED_VEHICLE_RESTRICTION_USAGE:"PotentialViolatedVehicleRestrictionUsage",SEASONAL_CLOSURE:"SeasonalClosure",VIOLATED_AVOID_FERRY:"ViolatedAvoidFerry",VIOLATED_AVOID_RAIL_FERRY:"ViolatedAvoidRailFerry"},RouteFerryOverviewSummary$:GI,RouteFerryPlace$:BI,RouteFerrySpan$:HI,RouteFerrySummary$:zI,RouteFerryTravelOnlySummary$:jI,RouteFerryTravelStep$:qI,RouteFerryTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",DEPART:"Depart"},RouteHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RouteKeepStepDetails$:VI,RouteLeg$:WI,RouteLegAdditionalFeature:{ELEVATION:"Elevation",INCIDENTS:"Incidents",PASS_THROUGH_WAYPOINTS:"PassThroughWaypoints",SUMMARY:"Summary",TOLLS:"Tolls",TRAVEL_STEP_INSTRUCTIONS:"TravelStepInstructions",TRUCK_ROAD_TYPES:"TruckRoadTypes",TYPICAL_DURATION:"TypicalDuration",ZONES:"Zones"},RouteLegGeometry$:KI,RouteLegTravelMode:{CAR:"Car",CAR_SHUTTLE_TRAIN:"CarShuttleTrain",FERRY:"Ferry",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteLegType:{FERRY:"Ferry",PEDESTRIAN:"Pedestrian",VEHICLE:"Vehicle"},RouteMajorRoadLabel$:QI,RouteMatchingOptions$:ZI,RouteMatrixAllowOptions$:YI,RouteMatrixAutoCircle$:JI,RouteMatrixAvoidanceArea$:XI,RouteMatrixAvoidanceAreaGeometry$:ex,RouteMatrixAvoidanceOptions$:tx,RouteMatrixAvoidanceZoneCategory$:nx,RouteMatrixBoundary$:rx,RouteMatrixBoundaryGeometry$:ix,RouteMatrixCarOptions$:sx,RouteMatrixDestination$:ox,RouteMatrixDestinationOptions$:ax,RouteMatrixEntry$:cx,RouteMatrixErrorCode:{NO_MATCH:"NoMatch",NO_MATCH_DESTINATION:"NoMatchDestination",NO_MATCH_ORIGIN:"NoMatchOrigin",NO_ROUTE:"NoRoute",OTHER:"Other",OUT_OF_BOUNDS:"OutOfBounds",OUT_OF_BOUNDS_DESTINATION:"OutOfBoundsDestination",OUT_OF_BOUNDS_ORIGIN:"OutOfBoundsOrigin",VIOLATION:"Violation"},RouteMatrixExclusionOptions$:ux,RouteMatrixHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RouteMatrixMatchingOptions$:lx,RouteMatrixOrigin$:dx,RouteMatrixOriginOptions$:px,RouteMatrixScooterOptions$:hx,RouteMatrixSideOfStreetOptions$:fx,RouteMatrixTrafficOptions$:gx,RouteMatrixTrailerOptions$:mx,RouteMatrixTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteMatrixTravelModeOptions$:yx,RouteMatrixTruckOptions$:Sx,RouteMatrixTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},RouteMatrixVehicleLicensePlate$:Rx,RouteMatrixZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},RouteNoticeDetailRange$:wx,RouteNoticeImpact:{HIGH:"High",LOW:"Low"},RouteNumber$:vx,RouteOriginOptions$:Ex,RoutePassThroughPlace$:Cx,RoutePassThroughWaypoint$:bx,RoutePedestrianArrival$:Tx,RoutePedestrianDeparture$:Px,RoutePedestrianLegDetails$:Ax,RoutePedestrianNotice$:Ix,RoutePedestrianNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",OTHER:"Other",VIOLATED_AVOID_DIRT_ROAD:"ViolatedAvoidDirtRoad",VIOLATED_AVOID_TUNNEL:"ViolatedAvoidTunnel",VIOLATED_PEDESTRIAN_OPTION:"ViolatedPedestrianOption"},RoutePedestrianOptions$:xx,RoutePedestrianOverviewSummary$:Ox,RoutePedestrianPlace$:Dx,RoutePedestrianSpan$:$x,RoutePedestrianSummary$:Mx,RoutePedestrianTravelOnlySummary$:Lx,RoutePedestrianTravelStep$:kx,RoutePedestrianTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",DEPART:"Depart",EXIT:"Exit",KEEP:"Keep",RAMP:"Ramp",ROUNDABOUT_ENTER:"RoundaboutEnter",ROUNDABOUT_EXIT:"RoundaboutExit",ROUNDABOUT_PASS:"RoundaboutPass",TURN:"Turn",U_TURN:"UTurn"},RouteRampStepDetails$:Nx,RouteResponseNotice$:_x,RouteResponseNoticeCode:{MAIN_LANGUAGE_NOT_FOUND:"MainLanguageNotFound",OTHER:"Other",TRAVEL_TIME_EXCEEDS_DRIVER_WORK_HOURS:"TravelTimeExceedsDriverWorkHours"},RouteRoad$:Ux,RouteRoadType:{HIGHWAY:"Highway",RURAL:"Rural",URBAN:"Urban"},RouteRoundaboutEnterStepDetails$:Fx,RouteRoundaboutExitStepDetails$:Gx,RouteRoundaboutPassStepDetails$:Bx,RouteScooterOptions$:Hx,RouteSideOfStreet:{LEFT:"Left",RIGHT:"Right"},RouteSideOfStreetOptions$:zx,RouteSignpost$:jx,RouteSignpostLabel$:qx,RouteSpanAdditionalFeature:{BEST_CASE_DURATION:"BestCaseDuration",CAR_ACCESS:"CarAccess",CONSUMPTION:"Consumption",COUNTRY:"Country",DISTANCE:"Distance",DURATION:"Duration",DYNAMIC_SPEED:"DynamicSpeed",FUNCTIONAL_CLASSIFICATION:"FunctionalClassification",GATES:"Gates",INCIDENTS:"Incidents",NAMES:"Names",NOTICES:"Notices",PEDESTRIAN_ACCESS:"PedestrianAccess",RAILWAY_CROSSINGS:"RailwayCrossings",REGION:"Region",ROAD_ATTRIBUTES:"RoadAttributes",ROUTE_NUMBERS:"RouteNumbers",SCOOTER_ACCESS:"ScooterAccess",SPEED_LIMIT:"SpeedLimit",TOLL_SYSTEMS:"TollSystems",TRUCK_ACCESS:"TruckAccess",TRUCK_ROAD_TYPES:"TruckRoadTypes",TYPICAL_DURATION:"TypicalDuration",ZONES:"Zones"},RouteSpanCarAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSpanDynamicSpeedDetails$:Vx,RouteSpanGateAttribute:{EMERGENCY:"Emergency",KEY_ACCESS:"KeyAccess",PERMISSION_REQUIRED:"PermissionRequired"},RouteSpanPedestrianAccessAttribute:{ALLOWED:"Allowed",INDOORS:"Indoors",NO_THROUGH_TRAFFIC:"NoThroughTraffic",PARK:"Park",STAIRS:"Stairs",TOLL_ROAD:"TollRoad"},RouteSpanRailwayCrossingAttribute:{PROTECTED:"Protected",UNPROTECTED:"Unprotected"},RouteSpanRoadAttribute:{BRIDGE:"Bridge",BUILT_UP_AREA:"BuiltUpArea",CONTROLLED_ACCESS_HIGHWAY:"ControlledAccessHighway",DIRT_ROAD:"DirtRoad",DIVIDED_ROAD:"DividedRoad",MOTORWAY:"Motorway",PRIVATE_ROAD:"PrivateRoad",RAMP:"Ramp",RIGHT_HAND_TRAFFIC:"RightHandTraffic",ROUNDABOUT:"Roundabout",TUNNEL:"Tunnel",UNDER_CONSTRUCTION:"UnderConstruction"},RouteSpanScooterAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSpanSpeedLimitDetails$:Wx,RouteSpanTruckAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSteeringDirection:{LEFT:"Left",RIGHT:"Right",STRAIGHT:"Straight"},RouteSummary$:Kx,RouteToll$:Qx,RouteTollOptions$:Zx,RouteTollPass$:Yx,RouteTollPassValidityPeriod$:Jx,RouteTollPassValidityPeriodType:{ANNUAL:"Annual",DAYS:"Days",EXTENDED_ANNUAL:"ExtendedAnnual",MINUTES:"Minutes",MONTHS:"Months"},RouteTollPaymentMethod:{BANK_CARD:"BankCard",CASH:"Cash",CASH_EXACT:"CashExact",CREDIT_CARD:"CreditCard",PASS_SUBSCRIPTION:"PassSubscription",TRANSPONDER:"Transponder",TRAVEL_CARD:"TravelCard",VIDEO_TOLL:"VideoToll"},RouteTollPaymentSite$:Xx,RouteTollPrice$:eO,RouteTollPriceSummary$:tO,RouteTollPriceValueRange$:nO,RouteTollRate$:rO,RouteTollSummary$:iO,RouteTollSystem$:sO,RouteTollVehicleCategory:{MINIBUS:"Minibus"},RouteTrafficOptions$:oO,RouteTrailerOptions$:aO,RouteTransponder$:cO,RouteTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteTravelModeOptions$:uO,RouteTravelStepType:{DEFAULT:"Default",TURN_BY_TURN:"TurnByTurn"},RouteTruckOptions$:lO,RouteTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},RouteTurnIntensity:{SHARP:"Sharp",SLIGHT:"Slight",TYPICAL:"Typical"},RouteTurnStepDetails$:dO,RouteUTurnStepDetails$:pO,RouteVehicleArrival$:hO,RouteVehicleDeparture$:fO,RouteVehicleIncident$:gO,RouteVehicleIncidentSeverity:{CRITICAL:"Critical",HIGH:"High",LOW:"Low",MEDIUM:"Medium"},RouteVehicleIncidentType:{ACCIDENT:"Accident",CONGESTION:"Congestion",CONSTRUCTION:"Construction",DISABLED_VEHICLE:"DisabledVehicle",LANE_RESTRICTION:"LaneRestriction",MASS_TRANSIT:"MassTransit",OTHER:"Other",PLANNED_EVENT:"PlannedEvent",ROAD_CLOSURE:"RoadClosure",ROAD_HAZARD:"RoadHazard",WEATHER:"Weather"},RouteVehicleLegDetails$:mO,RouteVehicleLicensePlate$:yO,RouteVehicleNotice$:SO,RouteVehicleNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",OTHER:"Other",POTENTIAL_VIOLATED_AVOID_TOLL_ROAD_USAGE:"PotentialViolatedAvoidTollRoadUsage",POTENTIAL_VIOLATED_CARPOOL_USAGE:"PotentialViolatedCarpoolUsage",POTENTIAL_VIOLATED_TURN_RESTRICTION_USAGE:"PotentialViolatedTurnRestrictionUsage",POTENTIAL_VIOLATED_VEHICLE_RESTRICTION_USAGE:"PotentialViolatedVehicleRestrictionUsage",POTENTIAL_VIOLATED_ZONE_RESTRICTION_USAGE:"PotentialViolatedZoneRestrictionUsage",SEASONAL_CLOSURE:"SeasonalClosure",TOLLS_DATA_TEMPORARILY_UNAVAILABLE:"TollsDataTemporarilyUnavailable",TOLLS_DATA_UNAVAILABLE:"TollsDataUnavailable",TOLL_TRANSPONDER:"TollTransponder",VIOLATED_AVOID_CONTROLLED_ACCESS_HIGHWAY:"ViolatedAvoidControlledAccessHighway",VIOLATED_AVOID_DIFFICULT_TURNS:"ViolatedAvoidDifficultTurns",VIOLATED_AVOID_DIRT_ROAD:"ViolatedAvoidDirtRoad",VIOLATED_AVOID_SEASONAL_CLOSURE:"ViolatedAvoidSeasonalClosure",VIOLATED_AVOID_TOLL_ROAD:"ViolatedAvoidTollRoad",VIOLATED_AVOID_TOLL_TRANSPONDER:"ViolatedAvoidTollTransponder",VIOLATED_AVOID_TRUCK_ROAD_TYPE:"ViolatedAvoidTruckRoadType",VIOLATED_AVOID_TUNNEL:"ViolatedAvoidTunnel",VIOLATED_AVOID_U_TURNS:"ViolatedAvoidUTurns",VIOLATED_BLOCKED_ROAD:"ViolatedBlockedRoad",VIOLATED_CARPOOL:"ViolatedCarpool",VIOLATED_EMERGENCY_GATE:"ViolatedEmergencyGate",VIOLATED_START_DIRECTION:"ViolatedStartDirection",VIOLATED_TURN_RESTRICTION:"ViolatedTurnRestriction",VIOLATED_VEHICLE_RESTRICTION:"ViolatedVehicleRestriction",VIOLATED_ZONE_RESTRICTION:"ViolatedZoneRestriction"},RouteVehicleNoticeDetail$:RO,RouteVehicleOverviewSummary$:wO,RouteVehiclePlace$:vO,RouteVehicleSpan$:EO,RouteVehicleSummary$:CO,RouteVehicleTravelOnlySummary$:bO,RouteVehicleTravelStep$:TO,RouteVehicleTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",CONTINUE_HIGHWAY:"ContinueHighway",DEPART:"Depart",ENTER_HIGHWAY:"EnterHighway",EXIT:"Exit",KEEP:"Keep",RAMP:"Ramp",ROUNDABOUT_ENTER:"RoundaboutEnter",ROUNDABOUT_EXIT:"RoundaboutExit",ROUNDABOUT_PASS:"RoundaboutPass",TURN:"Turn",U_TURN:"UTurn"},RouteViolatedConstraints$:PO,RouteWaypoint$:AO,RouteWeightConstraint$:IO,RouteWeightConstraintType:{CURRENT:"Current",GROSS:"Gross",UNKNOWN:"Unknown"},RouteZone$:xO,RouteZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},RoutingObjective:{FASTEST_ROUTE:"FastestRoute",SHORTEST_ROUTE:"ShortestRoute"},SideOfStreetMatchingStrategy:{ANY_STREET:"AnyStreet",DIVIDED_STREET_ONLY:"DividedStreetOnly"},SnapToRoads$:_$,SnapToRoadsCommand:H$,SnapToRoadsRequest$:OO,SnapToRoadsResponse$:DO,ThrottlingException:aC,ThrottlingException$:$O,TrafficUsage:{IGNORE_TRAFFIC_DATA:"IgnoreTrafficData",USE_TRAFFIC_DATA:"UseTrafficData"},ValidationException:cC,ValidationException$:MO,ValidationExceptionField$:LO,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},WaypointOptimizationAccessHours$:kO,WaypointOptimizationAccessHoursEntry$:NO,WaypointOptimizationAvoidanceArea$:_O,WaypointOptimizationAvoidanceAreaGeometry$:UO,WaypointOptimizationAvoidanceOptions$:FO,WaypointOptimizationClusteringAlgorithm:{DRIVING_DISTANCE:"DrivingDistance",TOPOLOGY_SEGMENT:"TopologySegment"},WaypointOptimizationClusteringOptions$:GO,WaypointOptimizationConnection$:BO,WaypointOptimizationConstraint:{ACCESS_HOURS:"AccessHours",APPOINTMENT_TIME:"AppointmentTime",BEFORE:"Before",HEADING:"Heading",SERVICE_DURATION:"ServiceDuration",SIDE_OF_STREET:"SideOfStreet"},WaypointOptimizationDestinationOptions$:HO,WaypointOptimizationDriverOptions$:zO,WaypointOptimizationDrivingDistanceOptions$:jO,WaypointOptimizationExclusionOptions$:qO,WaypointOptimizationFailedConstraint$:VO,WaypointOptimizationHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},WaypointOptimizationImpedingWaypoint$:WO,WaypointOptimizationOptimizedWaypoint$:KO,WaypointOptimizationOriginOptions$:QO,WaypointOptimizationPedestrianOptions$:ZO,WaypointOptimizationRestCycleDurations$:YO,WaypointOptimizationRestCycles$:JO,WaypointOptimizationRestProfile$:XO,WaypointOptimizationSequencingObjective:{FASTEST_ROUTE:"FastestRoute",SHORTEST_ROUTE:"ShortestRoute"},WaypointOptimizationServiceTimeTreatment:{REST:"Rest",WORK:"Work"},WaypointOptimizationSideOfStreetOptions$:eD,WaypointOptimizationTimeBreakdown$:tD,WaypointOptimizationTrafficOptions$:nD,WaypointOptimizationTrailerOptions$:rD,WaypointOptimizationTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},WaypointOptimizationTravelModeOptions$:iD,WaypointOptimizationTruckOptions$:sD,WaypointOptimizationTruckType:{STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},WaypointOptimizationWaypoint$:oD,WeightPerAxleGroup$:aD,__Client:Yn});var V$=Object.freeze({__proto__:null,EventStreamSerde:class{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:n,serdeContext:r,defaultContentType:i}){this.marshaller=e,this.serializer=t,this.deserializer=n,this.serdeContext=r,this.defaultContentType=i}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){const r=this.marshaller,i=t.getEventStreamMember(),s=t.getMemberSchema(i),o=this.serializer,a=this.defaultContentType,c=Symbol("initialRequestMarker"),u={async*[Symbol.asyncIterator](){if(n){const e={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:a}};o.write(t,n);const r=o.flush();yield{[c]:!0,headers:e,body:r}}for await(const t of e)yield t}};return r.serialize(u,(e=>{if(e[c])return{headers:e.headers,body:e.body};const t=Object.keys(e).find((e=>"__type"!==e))??"",{additionalHeaders:n,body:r,eventType:i,explicitPayloadContentType:o}=this.writeEventBody(t,s,e);return{headers:{":event-type":{type:"string",value:i},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:o??a},...n},body:r}}))}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n}){const r=this.marshaller,i=t.getEventStreamMember(),s=t.getMemberSchema(i).getMemberSchemas(),o=Symbol("initialResponseMarker"),a=r.deserialize(e.body,(async e=>{const n=Object.keys(e).find((e=>"__type"!==e))??"",r=e[n].body;if("initial-response"===n){const e=await this.deserializer.read(t,r);return delete e[i],{[o]:!0,...e}}if(n in s){const t=s[n];if(t.isStructSchema()){const i={};let s=!1;for(const[o,a]of t.structIterator()){const{eventHeader:t,eventPayload:c}=a.getMergedTraits();if(s=s||Boolean(t||c),c)a.isBlobSchema()?i[o]=r:a.isStringSchema()?i[o]=(this.serdeContext?.utf8Encoder??M)(r):a.isStructSchema()&&(i[o]=await this.deserializer.read(a,r));else if(t){const t=e[n].headers[o]?.value;null!=t&&(a.isNumericSchema()?i[o]=t&&"object"==typeof t&&"bytes"in t?BigInt(t.toString()):Number(t):i[o]=t)}}if(s)return{[n]:i};if(0===r.byteLength)return{[n]:{}}}return{[n]:await this.deserializer.read(t,r)}}return{$unknown:e}})),c=a[Symbol.asyncIterator](),u=await c.next();if(u.done)return a;if(u.value?.[o]){if(!t)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[e,t]of Object.entries(u.value))n[e]=t}return{async*[Symbol.asyncIterator](){for(u?.value?.[o]||(yield u.value);;){const{done:e,value:t}=await c.next();if(e)break;yield t}}}}writeEventBody(e,t,n){const r=this.serializer;let i,s=e,o=null;const a={};if(t.getSchema()[4].includes(e)){const s=t.getMemberSchema(e);if(!s.isStructSchema())throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");for(const[t,r]of s.structIterator()){const{eventHeader:i,eventPayload:s}=r.getMergedTraits();if(s)o=t;else if(i){const i=n[e][t];let s="binary";r.isNumericSchema()?s=(-2)**31<=i&&i<=2**31-1?"integer":"long":r.isTimestampSchema()?s="timestamp":r.isStringSchema()?s="string":r.isBooleanSchema()&&(s="boolean"),null!=i&&(a[t]={type:s,value:i},delete n[e][t])}}if(null!==o){const t=s.getMemberSchema(o);t.isBlobSchema()?i="application/octet-stream":t.isStringSchema()&&(i="text/plain"),r.write(t,n[e][o])}else r.write(s,n[e])}else{const[t,i]=n[e];s=t,r.write(15,i)}const c=r.flush();return{body:"string"==typeof c?(this.serdeContext?.utf8Decoder??D)(c):c,eventType:s,explicitPayloadContentType:i,additionalHeaders:a}}}});const W$=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const K$=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":case"GetId":case"GetOpenIdToken":case"UnlinkIdentity":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t},Q$={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Z$="3.980.0";const Y$=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Y$(t))return!1;return!0}return!!It(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let J$={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-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const X$={isVirtualHostableS3Bucket:Y$,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=J$;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}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}}};xt.aws=X$;const eM="required",tM="fn",nM="argv",rM="ref",iM=!0,sM="isSet",oM="booleanEquals",aM="error",cM="endpoint",uM="tree",lM="PartitionResult",dM="getAttr",pM="stringEquals",hM={[eM]:!1,type:"string"},fM={[eM]:!0,default:!1,type:"boolean"},gM={[rM]:"Endpoint"},mM={[tM]:oM,[nM]:[{[rM]:"UseFIPS"},!0]},yM={[tM]:oM,[nM]:[{[rM]:"UseDualStack"},!0]},SM={},RM={[rM]:"Region"},wM={[tM]:dM,[nM]:[{[rM]:lM},"supportsFIPS"]},vM={[rM]:lM},EM={[tM]:oM,[nM]:[!0,{[tM]:dM,[nM]:[vM,"supportsDualStack"]}]},CM=[mM],bM=[yM],TM=[RM],PM={parameters:{Region:hM,UseDualStack:fM,UseFIPS:fM,Endpoint:hM},rules:[{conditions:[{[tM]:sM,[nM]:[gM]}],rules:[{conditions:CM,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:aM},{conditions:bM,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:aM},{endpoint:{url:gM,properties:SM,headers:SM},type:cM}],type:uM},{conditions:[{[tM]:sM,[nM]:TM}],rules:[{conditions:[{[tM]:"aws.partition",[nM]:TM,assign:lM}],rules:[{conditions:[mM,yM],rules:[{conditions:[{[tM]:oM,[nM]:[iM,wM]},EM],rules:[{conditions:[{[tM]:pM,[nM]:[RM,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:SM,headers:SM},type:cM},{conditions:[{[tM]:pM,[nM]:[RM,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:SM,headers:SM},type:cM},{conditions:[{[tM]:pM,[nM]:[RM,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:SM,headers:SM},type:cM},{conditions:[{[tM]:pM,[nM]:[RM,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:SM,headers:SM},type:cM},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:SM,headers:SM},type:cM}],type:uM},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:aM}],type:uM},{conditions:CM,rules:[{conditions:[{[tM]:oM,[nM]:[wM,iM]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:SM,headers:SM},type:cM}],type:uM},{error:"FIPS is enabled but this partition does not support FIPS",type:aM}],type:uM},{conditions:bM,rules:[{conditions:[EM],rules:[{conditions:[{[tM]:pM,[nM]:["aws",{[tM]:dM,[nM]:[vM,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:SM,headers:SM},type:cM},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:SM,headers:SM},type:cM}],type:uM},{error:"DualStack is enabled but this partition does not support DualStack",type:aM}],type:uM},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:SM,headers:SM},type:cM}],type:uM}],type:uM},{error:"Invalid Configuration: Missing Region",type:aM}]},AM=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),IM=(e,t={})=>AM.get(e,(()=>Yt(PM,{endpointParams:e,logger:t.logger})));xt.aws=X$;const xM=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??IM,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??K$,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rt}],logger:e?.logger??new ur,protocol:e?.protocol??Er,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:Z$}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class OM extends rr{constructor(e){super(e),Object.setPrototypeOf(this,OM.prototype)}}class DM extends OM{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,DM.prototype)}}class $M extends OM{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,$M.prototype)}}class MM extends OM{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,MM.prototype)}}class LM extends OM{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,LM.prototype)}}class kM extends OM{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,kM.prototype)}}class NM extends OM{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,NM.prototype)}}class _M extends OM{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,_M.prototype)}}class UM extends OM{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,UM.prototype)}}class FM extends OM{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,FM.prototype)}}class GM extends OM{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,GM.prototype)}}class BM extends OM{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,BM.prototype)}}const HM="Credentials",zM="IdentityId",jM="Logins",qM="client",VM="error",WM="httpError",KM="message",QM="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",ZM="com.amazonaws.cognitoidentity";var YM=[0,ZM,"IdentityProviderToken",8,0],JM=[0,ZM,"SecretKeyString",8,0],XM=[-3,ZM,"ConcurrentModificationException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(XM,BM);var eL=[3,ZM,HM,0,["AccessKeyId","SecretKey","SessionToken","Expiration"],[0,[()=>JM,0],0,4]],tL=[-3,ZM,"DeveloperUserAlreadyRegisteredException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(tL,GM);var nL=[-3,ZM,"ExternalServiceException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(nL,UM);var rL=[3,ZM,"GetCredentialsForIdentityInput",0,[zM,jM,"CustomRoleArn"],[0,[()=>mL,0],0],1],iL=[3,ZM,"GetCredentialsForIdentityResponse",0,[zM,HM],[0,[()=>eL,0]]],sL=[3,ZM,"GetIdInput",0,["IdentityPoolId","AccountId",jM],[0,0,[()=>mL,0]],1],oL=[3,ZM,"GetIdResponse",0,[zM],[0]],aL=[-3,ZM,"InternalErrorException",{[VM]:"server"},[KM],[0]];le.for(ZM).registerError(aL,DM);var cL=[-3,ZM,"InvalidIdentityPoolConfigurationException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(cL,FM);var uL=[-3,ZM,"InvalidParameterException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(uL,$M);var lL=[-3,ZM,"LimitExceededException",{[VM]:qM,[WM]:400},[KM],[0]];le.for(ZM).registerError(lL,MM);var dL=[-3,ZM,"NotAuthorizedException",{[VM]:qM,[WM]:403},[KM],[0]];le.for(ZM).registerError(dL,LM);var pL=[-3,ZM,"ResourceConflictException",{[VM]:qM,[WM]:409},[KM],[0]];le.for(ZM).registerError(pL,kM);var hL=[-3,ZM,"ResourceNotFoundException",{[VM]:qM,[WM]:404},[KM],[0]];le.for(ZM).registerError(hL,_M);var fL=[-3,ZM,"TooManyRequestsException",{[VM]:qM,[WM]:429},[KM],[0]];le.for(ZM).registerError(fL,NM);var gL=[-3,QM,"CognitoIdentityServiceException",0,[],[]];le.for(QM).registerError(gL,OM);var mL=[2,ZM,"LoginsMap",0,[0,0],[()=>YM,0]],yL=[9,ZM,"GetCredentialsForIdentity",0,()=>rL,()=>iL],SL=[9,ZM,"GetId",0,()=>sL,()=>oL];class RL extends(er.classBuilder().ep(Q$).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(yL).build()){}class wL extends(er.classBuilder().ep(Q$).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(SL).build()){}var vL=Object.freeze({__proto__:null,CognitoIdentityClient:class extends Yn{config;constructor(...[e]){const r=xM(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}))),o=yi(s),a=Br(o),c=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=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){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})((e=>{const t=zn(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(ri(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:W$,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}},GetCredentialsForIdentityCommand:RL,GetIdCommand:wL});const EL=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const CL=e=>{const t=[];if("AssumeRoleWithWebIdentity"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},bL=e=>{const t=(n=e,Object.assign(n,{stsClientCtor:pk}));var n;const r=zn(t);return Object.assign(r,{authSchemePreference:g(e.authSchemePreference??[])})},TL={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var PL="3.986.0";const AL="required",IL="type",xL="fn",OL="argv",DL="ref",$L=!1,ML=!0,LL="booleanEquals",kL="stringEquals",NL="sigv4",_L="us-east-1",UL="endpoint",FL="https://sts.{Region}.{PartitionResult#dnsSuffix}",GL="tree",BL="error",HL="getAttr",zL={[AL]:!1,[IL]:"string"},jL={[AL]:!0,default:!1,[IL]:"boolean"},qL={[DL]:"Endpoint"},VL={[xL]:"isSet",[OL]:[{[DL]:"Region"}]},WL={[DL]:"Region"},KL={[xL]:"aws.partition",[OL]:[WL],assign:"PartitionResult"},QL={[DL]:"UseFIPS"},ZL={[DL]:"UseDualStack"},YL={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:NL,signingName:"sts",signingRegion:_L}]},headers:{}},JL={},XL={conditions:[{[xL]:kL,[OL]:[WL,"aws-global"]}],[UL]:YL,[IL]:UL},ek={[xL]:LL,[OL]:[QL,!0]},tk={[xL]:LL,[OL]:[ZL,!0]},nk={[xL]:HL,[OL]:[{[DL]:"PartitionResult"},"supportsFIPS"]},rk={[DL]:"PartitionResult"},ik={[xL]:LL,[OL]:[!0,{[xL]:HL,[OL]:[rk,"supportsDualStack"]}]},sk=[{[xL]:"isSet",[OL]:[qL]}],ok=[ek],ak=[tk],ck={parameters:{Region:zL,UseDualStack:jL,UseFIPS:jL,Endpoint:zL,UseGlobalEndpoint:jL},rules:[{conditions:[{[xL]:LL,[OL]:[{[DL]:"UseGlobalEndpoint"},ML]},{[xL]:"not",[OL]:sk},VL,KL,{[xL]:LL,[OL]:[QL,$L]},{[xL]:LL,[OL]:[ZL,$L]}],rules:[{conditions:[{[xL]:kL,[OL]:[WL,"ap-northeast-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"ap-south-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"ap-southeast-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"ap-southeast-2"]}],endpoint:YL,[IL]:UL},XL,{conditions:[{[xL]:kL,[OL]:[WL,"ca-central-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"eu-central-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"eu-north-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"eu-west-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"eu-west-2"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"eu-west-3"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"sa-east-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,_L]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"us-east-2"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"us-west-1"]}],endpoint:YL,[IL]:UL},{conditions:[{[xL]:kL,[OL]:[WL,"us-west-2"]}],endpoint:YL,[IL]:UL},{endpoint:{url:FL,properties:{authSchemes:[{name:NL,signingName:"sts",signingRegion:"{Region}"}]},headers:JL},[IL]:UL}],[IL]:GL},{conditions:sk,rules:[{conditions:ok,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[IL]:BL},{conditions:ak,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[IL]:BL},{endpoint:{url:qL,properties:JL,headers:JL},[IL]:UL}],[IL]:GL},{conditions:[VL],rules:[{conditions:[KL],rules:[{conditions:[ek,tk],rules:[{conditions:[{[xL]:LL,[OL]:[ML,nk]},ik],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:JL,headers:JL},[IL]:UL}],[IL]:GL},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[IL]:BL}],[IL]:GL},{conditions:ok,rules:[{conditions:[{[xL]:LL,[OL]:[nk,ML]}],rules:[{conditions:[{[xL]:kL,[OL]:[{[xL]:HL,[OL]:[rk,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:JL,headers:JL},[IL]:UL},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:JL,headers:JL},[IL]:UL}],[IL]:GL},{error:"FIPS is enabled but this partition does not support FIPS",[IL]:BL}],[IL]:GL},{conditions:ak,rules:[{conditions:[ik],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:JL,headers:JL},[IL]:UL}],[IL]:GL},{error:"DualStack is enabled but this partition does not support DualStack",[IL]:BL}],[IL]:GL},XL,{endpoint:{url:FL,properties:JL,headers:JL},[IL]:UL}],[IL]:GL}],[IL]:GL},{error:"Invalid Configuration: Missing Region",[IL]:BL}]},uk=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),lk=(e,t={})=>uk.get(e,(()=>Yt(ck,{endpointParams:e,logger:t.logger})));xt.aws=rs;const dk=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??lk,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??CL,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rt}],logger:e?.logger??new ur,protocol:e?.protocol??Ar,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:PL}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};let pk=class extends Yn{config;constructor(...[e]){const r=dk(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,useGlobalEndpoint:i.useGlobalEndpoint??!1,defaultSigningName:"sts"}))),o=yi(s),a=Br(o),c=ri(a),l=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=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){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})(bL(c),e?.extensions||[]);this.config=l,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:EL,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}},hk=class e extends rr{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};const fk="AssumedRoleUser",gk="Credentials",mk="SourceIdentity",yk="awsQueryError",Sk="client",Rk="error",wk="httpError",vk="message",Ek="smithy.ts.sdk.synthetic.com.amazonaws.sts",Ck="com.amazonaws.sts";var bk=[0,Ck,"accessKeySecretType",8,0],Tk=[3,Ck,fk,0,["AssumedRoleId","Arn"],[0,0],2],Pk=[3,Ck,"AssumeRoleRequest",0,["RoleArn","RoleSessionName","PolicyArns","Policy","DurationSeconds","Tags","TransitiveTagKeys","ExternalId","SerialNumber","TokenCode",mk,"ProvidedContexts"],[0,0,()=>Gk,0,1,()=>Hk,64,0,0,0,0,()=>Bk],2],Ak=[3,Ck,"AssumeRoleResponse",0,[gk,fk,"PackedPolicySize",mk],[[()=>Ik,0],()=>Tk,1,0]],Ik=[3,Ck,gk,0,["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],[0,[()=>bk,0],0,4],4],xk=[-3,Ck,"ExpiredTokenException",{[yk]:["ExpiredTokenException",400],[Rk]:Sk,[wk]:400},[vk],[0]];le.for(Ck).registerError(xk,class e extends hk{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var Ok=[-3,Ck,"IDPCommunicationErrorException",{[yk]:["IDPCommunicationError",400],[Rk]:Sk,[wk]:400},[vk],[0]];le.for(Ck).registerError(Ok,class e extends hk{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var Dk=[-3,Ck,"IDPRejectedClaimException",{[yk]:["IDPRejectedClaim",403],[Rk]:Sk,[wk]:403},[vk],[0]];le.for(Ck).registerError(Dk,class e extends hk{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var $k=[-3,Ck,"InvalidIdentityTokenException",{[yk]:["InvalidIdentityToken",400],[Rk]:Sk,[wk]:400},[vk],[0]];le.for(Ck).registerError($k,class e extends hk{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var Mk=[-3,Ck,"MalformedPolicyDocumentException",{[yk]:["MalformedPolicyDocument",400],[Rk]:Sk,[wk]:400},[vk],[0]];le.for(Ck).registerError(Mk,class e extends hk{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var Lk=[-3,Ck,"PackedPolicyTooLargeException",{[yk]:["PackedPolicyTooLarge",400],[Rk]:Sk,[wk]:400},[vk],[0]];le.for(Ck).registerError(Lk,class e extends hk{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var kk=[3,Ck,"PolicyDescriptorType",0,["arn"],[0]],Nk=[3,Ck,"ProvidedContext",0,["ProviderArn","ContextAssertion"],[0,0]],_k=[-3,Ck,"RegionDisabledException",{[yk]:["RegionDisabledException",403],[Rk]:Sk,[wk]:403},[vk],[0]];le.for(Ck).registerError(_k,class e extends hk{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var Uk=[3,Ck,"Tag",0,["Key","Value"],[0,0],2],Fk=[-3,Ek,"STSServiceException",0,[],[]];le.for(Ek).registerError(Fk,hk);var Gk=[1,Ck,"policyDescriptorListType",0,()=>kk],Bk=[1,Ck,"ProvidedContextsListType",0,()=>Nk],Hk=[1,Ck,"tagListType",0,()=>Uk],zk=[9,Ck,"AssumeRole",0,()=>Pk,()=>Ak];class jk extends(er.classBuilder().ep(TL).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(zk).build()){}var qk=Object.freeze({__proto__:null,AssumeRoleCommand:jk,STSClient:pk});const Vk=async(e,t,n)=>({operation:f(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Wk=e=>{const t=[];if("AssumeRoleWithWebIdentity"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},Kk=e=>{const t=(n=e,Object.assign(n,{stsClientCtor:FN}));var n;const r=zn(t);return Object.assign(r,{authSchemePreference:g(e.authSchemePreference??[])})},Qk={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Zk="3.985.0";const Yk=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Yk(t))return!1;return!0}return!!It(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let Jk={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-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const Xk={isVirtualHostableS3Bucket:Yk,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,s,o,...a]=t;if("arn"!==n||""===r||""===i||""===a.join(":"))return null;return{partition:r,service:i,region:s,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=Jk;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}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}}};xt.aws=Xk;const eN="required",tN="type",nN="fn",rN="argv",iN="ref",sN=!1,oN=!0,aN="booleanEquals",cN="stringEquals",uN="sigv4",lN="us-east-1",dN="endpoint",pN="https://sts.{Region}.{PartitionResult#dnsSuffix}",hN="tree",fN="error",gN="getAttr",mN={[eN]:!1,[tN]:"string"},yN={[eN]:!0,default:!1,[tN]:"boolean"},SN={[iN]:"Endpoint"},RN={[nN]:"isSet",[rN]:[{[iN]:"Region"}]},wN={[iN]:"Region"},vN={[nN]:"aws.partition",[rN]:[wN],assign:"PartitionResult"},EN={[iN]:"UseFIPS"},CN={[iN]:"UseDualStack"},bN={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:uN,signingName:"sts",signingRegion:lN}]},headers:{}},TN={},PN={conditions:[{[nN]:cN,[rN]:[wN,"aws-global"]}],[dN]:bN,[tN]:dN},AN={[nN]:aN,[rN]:[EN,!0]},IN={[nN]:aN,[rN]:[CN,!0]},xN={[nN]:gN,[rN]:[{[iN]:"PartitionResult"},"supportsFIPS"]},ON={[iN]:"PartitionResult"},DN={[nN]:aN,[rN]:[!0,{[nN]:gN,[rN]:[ON,"supportsDualStack"]}]},$N=[{[nN]:"isSet",[rN]:[SN]}],MN=[AN],LN=[IN],kN={parameters:{Region:mN,UseDualStack:yN,UseFIPS:yN,Endpoint:mN,UseGlobalEndpoint:yN},rules:[{conditions:[{[nN]:aN,[rN]:[{[iN]:"UseGlobalEndpoint"},oN]},{[nN]:"not",[rN]:$N},RN,vN,{[nN]:aN,[rN]:[EN,sN]},{[nN]:aN,[rN]:[CN,sN]}],rules:[{conditions:[{[nN]:cN,[rN]:[wN,"ap-northeast-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"ap-south-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"ap-southeast-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"ap-southeast-2"]}],endpoint:bN,[tN]:dN},PN,{conditions:[{[nN]:cN,[rN]:[wN,"ca-central-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"eu-central-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"eu-north-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"eu-west-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"eu-west-2"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"eu-west-3"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"sa-east-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,lN]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"us-east-2"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"us-west-1"]}],endpoint:bN,[tN]:dN},{conditions:[{[nN]:cN,[rN]:[wN,"us-west-2"]}],endpoint:bN,[tN]:dN},{endpoint:{url:pN,properties:{authSchemes:[{name:uN,signingName:"sts",signingRegion:"{Region}"}]},headers:TN},[tN]:dN}],[tN]:hN},{conditions:$N,rules:[{conditions:MN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[tN]:fN},{conditions:LN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[tN]:fN},{endpoint:{url:SN,properties:TN,headers:TN},[tN]:dN}],[tN]:hN},{conditions:[RN],rules:[{conditions:[vN],rules:[{conditions:[AN,IN],rules:[{conditions:[{[nN]:aN,[rN]:[oN,xN]},DN],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:TN,headers:TN},[tN]:dN}],[tN]:hN},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[tN]:fN}],[tN]:hN},{conditions:MN,rules:[{conditions:[{[nN]:aN,[rN]:[xN,oN]}],rules:[{conditions:[{[nN]:cN,[rN]:[{[nN]:gN,[rN]:[ON,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:TN,headers:TN},[tN]:dN},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:TN,headers:TN},[tN]:dN}],[tN]:hN},{error:"FIPS is enabled but this partition does not support FIPS",[tN]:fN}],[tN]:hN},{conditions:LN,rules:[{conditions:[DN],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:TN,headers:TN},[tN]:dN}],[tN]:hN},{error:"DualStack is enabled but this partition does not support DualStack",[tN]:fN}],[tN]:hN},PN,{endpoint:{url:pN,properties:TN,headers:TN},[tN]:dN}],[tN]:hN}],[tN]:hN},{error:"Invalid Configuration: Missing Region",[tN]:fN}]},NN=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),_N=(e,t={})=>NN.get(e,(()=>Yt(kN,{endpointParams:e,logger:t.logger})));xt.aws=Xk;const UN=e=>{const t=Xi(e),n=()=>t().then(sr),r=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??L,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??_N,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Wk,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new un},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rt}],logger:e?.logger??new ur,protocol:e?.protocol??Ar,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??tn,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??M}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??qn,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qi({serviceId:r.serviceId,clientVersion:Zk}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yi("Region is missing"),requestHandler:H.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||si),sha256:e?.sha256??Ki,streamCollector:e?.streamCollector??z,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(_r)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class FN extends Yn{config;constructor(...[e]){const r=UN(e||{});super(r),this.initConfig=r;var i;const s=Ct((i=r,Object.assign(i,{useDualstackEndpoint:i.useDualstackEndpoint??!1,useFipsEndpoint:i.useFipsEndpoint??!1,useGlobalEndpoint:i.useGlobalEndpoint??!1,defaultSigningName:"sts"}))),o=yi(s),a=Br(o),c=ri(a),l=((e,r)=>{const i=Object.assign(Os(e),or(e),t(e),(e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=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){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(i))),Object.assign(e,Ds(i),ar(i),n(i),{httpAuthSchemes:(s=i).httpAuthSchemes(),httpAuthSchemeProvider:s.httpAuthSchemeProvider(),credentials:s.credentials()});var s})(Kk(c),e?.extensions||[]);this.config=l,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(Ci(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:Vk,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(E(this.config))}destroy(){super.destroy()}}class GN extends rr{constructor(e){super(e),Object.setPrototypeOf(this,GN.prototype)}}class BN extends GN{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,BN.prototype)}}class HN extends GN{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),Object.setPrototypeOf(this,HN.prototype)}}class zN extends GN{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e}),Object.setPrototypeOf(this,zN.prototype)}}class jN extends GN{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e}),Object.setPrototypeOf(this,jN.prototype)}}class qN extends GN{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e}),Object.setPrototypeOf(this,qN.prototype)}}class VN extends GN{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,VN.prototype)}}class WN extends GN{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,WN.prototype)}}const KN="AssumedRoleUser",QN="Credentials",ZN="awsQueryError",YN="client",JN="error",XN="httpError",e_="message",t_="smithy.ts.sdk.synthetic.com.amazonaws.sts",n_="com.amazonaws.sts";var r_=[0,n_,"accessKeySecretType",8,0],i_=[0,n_,"clientTokenType",8,0],s_=[3,n_,KN,0,["AssumedRoleId","Arn"],[0,0],2],o_=[3,n_,"AssumeRoleWithWebIdentityRequest",0,["RoleArn","RoleSessionName","WebIdentityToken","ProviderId","PolicyArns","Policy","DurationSeconds"],[0,0,[()=>i_,0],0,()=>S_,0,1],3],a_=[3,n_,"AssumeRoleWithWebIdentityResponse",0,[QN,"SubjectFromWebIdentityToken",KN,"PackedPolicySize","Provider","Audience","SourceIdentity"],[[()=>c_,0],0,()=>s_,1,0,0,0]],c_=[3,n_,QN,0,["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],[0,[()=>r_,0],0,4],4],u_=[-3,n_,"ExpiredTokenException",{[ZN]:["ExpiredTokenException",400],[JN]:YN,[XN]:400},[e_],[0]];le.for(n_).registerError(u_,BN);var l_=[-3,n_,"IDPCommunicationErrorException",{[ZN]:["IDPCommunicationError",400],[JN]:YN,[XN]:400},[e_],[0]];le.for(n_).registerError(l_,WN);var d_=[-3,n_,"IDPRejectedClaimException",{[ZN]:["IDPRejectedClaim",403],[JN]:YN,[XN]:403},[e_],[0]];le.for(n_).registerError(d_,qN);var p_=[-3,n_,"InvalidIdentityTokenException",{[ZN]:["InvalidIdentityToken",400],[JN]:YN,[XN]:400},[e_],[0]];le.for(n_).registerError(p_,VN);var h_=[-3,n_,"MalformedPolicyDocumentException",{[ZN]:["MalformedPolicyDocument",400],[JN]:YN,[XN]:400},[e_],[0]];le.for(n_).registerError(h_,HN);var f_=[-3,n_,"PackedPolicyTooLargeException",{[ZN]:["PackedPolicyTooLarge",400],[JN]:YN,[XN]:400},[e_],[0]];le.for(n_).registerError(f_,zN);var g_=[3,n_,"PolicyDescriptorType",0,["arn"],[0]],m_=[-3,n_,"RegionDisabledException",{[ZN]:["RegionDisabledException",403],[JN]:YN,[XN]:403},[e_],[0]];le.for(n_).registerError(m_,jN);var y_=[-3,t_,"STSServiceException",0,[],[]];le.for(t_).registerError(y_,GN);var S_=[1,n_,"policyDescriptorListType",0,()=>g_],R_=[9,n_,"AssumeRoleWithWebIdentity",0,()=>o_,()=>a_];class w_ extends(er.classBuilder().ep(Qk).m((function(e,t,n,r){return[ni(n,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(R_).build()){}const v_=e=>"h2"===e?.metadata?.handlerProtocol,E_=(e,t)=>t?class extends e{constructor(e){super(e);for(const e of t)this.middlewareStack.use(e)}}:e;var C_=Object.freeze({__proto__:null,$Command:er,AssumeRoleWithWebIdentity$:R_,AssumeRoleWithWebIdentityCommand:w_,AssumeRoleWithWebIdentityRequest$:o_,AssumeRoleWithWebIdentityResponse$:a_,AssumedRoleUser$:s_,Credentials$:c_,ExpiredTokenException:BN,ExpiredTokenException$:u_,IDPCommunicationErrorException:WN,IDPCommunicationErrorException$:l_,IDPRejectedClaimException:qN,IDPRejectedClaimException$:d_,InvalidIdentityTokenException:VN,InvalidIdentityTokenException$:p_,MalformedPolicyDocumentException:HN,MalformedPolicyDocumentException$:h_,PackedPolicyTooLargeException:zN,PackedPolicyTooLargeException$:f_,PolicyDescriptorType$:g_,RegionDisabledException:jN,RegionDisabledException$:m_,STSClient:FN,STSServiceException:GN,STSServiceException$:y_,__Client:Yn,getDefaultRoleAssumerWithWebIdentity:(e={},t)=>((e,t)=>{let n;return async r=>{if(!n){const{logger:r=e?.parentClientConfig?.logger,profile:i=e?.parentClientConfig?.profile,region:s,requestHandler:o=e?.parentClientConfig?.requestHandler,credentialProviderLogger:a,userAgentAppId:c=e?.parentClientConfig?.userAgentAppId}=e,u=await(async(e,t,n)=>{const r="function"==typeof e?await e():e,i="function"==typeof t?await t():t;let s="";const o=r??i??(s=await(async()=>"us-east-1")());return n?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${r} (credential provider clientConfig)`,`${i} (contextual client)`,`${s} (STS default: AWS_REGION, profile region, or us-east-1)`),o})(s,e?.parentClientConfig?.region,a),l=!v_(o);n=new t({...e,userAgentAppId:c,profile:i,region:u,requestHandler:l?o:void 0,logger:r})}const{Credentials:i,AssumedRoleUser:s}=await n.send(new w_(r));if(!i||!i.AccessKeyId||!i.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${r.RoleArn}`);const o=(e=>{if("string"==typeof e?.Arn){const t=e.Arn.split(":");if(t.length>4&&""!==t[4])return t[4]}})(s),a={accessKeyId:i.AccessKeyId,secretAccessKey:i.SecretAccessKey,sessionToken:i.SessionToken,expiration:i.Expiration,...i.CredentialScope&&{credentialScope:i.CredentialScope},...o&&{accountId:o}};return o&&nn(a,"RESOLVED_ACCOUNT_ID","T"),nn(a,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),a}})(e,E_(FN,t))});e.$Command=er,e.AccessDeniedException=Ls,e.AccessDeniedException$=nc,e.AndroidApp$=rc,e.ApiKeyFilter$=ic,e.ApiKeyRestrictions$=sc,e.AppleApp$=oc,e.AssociateTrackerConsumer$=vp,e.AssociateTrackerConsumerCommand=Ah,e.AssociateTrackerConsumerRequest$=ac,e.AssociateTrackerConsumerResponse$=cc,e.BatchDeleteDevicePositionHistory$=Ep,e.BatchDeleteDevicePositionHistoryCommand=Ih,e.BatchDeleteDevicePositionHistoryError$=uc,e.BatchDeleteDevicePositionHistoryRequest$=lc,e.BatchDeleteDevicePositionHistoryResponse$=dc,e.BatchDeleteGeofence$=Cp,e.BatchDeleteGeofenceCommand=xh,e.BatchDeleteGeofenceError$=pc,e.BatchDeleteGeofenceRequest$=hc,e.BatchDeleteGeofenceResponse$=fc,e.BatchEvaluateGeofences$=bp,e.BatchEvaluateGeofencesCommand=Oh,e.BatchEvaluateGeofencesError$=gc,e.BatchEvaluateGeofencesRequest$=mc,e.BatchEvaluateGeofencesResponse$=yc,e.BatchGetDevicePosition$=Tp,e.BatchGetDevicePositionCommand=Dh,e.BatchGetDevicePositionError$=Sc,e.BatchGetDevicePositionRequest$=Rc,e.BatchGetDevicePositionResponse$=wc,e.BatchItemError$=vc,e.BatchPutGeofence$=Pp,e.BatchPutGeofenceCommand=$h,e.BatchPutGeofenceError$=Ec,e.BatchPutGeofenceRequest$=Cc,e.BatchPutGeofenceRequestEntry$=bc,e.BatchPutGeofenceResponse$=Tc,e.BatchPutGeofenceSuccess$=Pc,e.BatchUpdateDevicePosition$=Ap,e.BatchUpdateDevicePositionCommand=Mh,e.BatchUpdateDevicePositionError$=Ac,e.BatchUpdateDevicePositionRequest$=Ic,e.BatchUpdateDevicePositionResponse$=xc,e.CalculateRoute$=Ip,e.CalculateRouteCarModeOptions$=Oc,e.CalculateRouteCommand=Lh,e.CalculateRouteMatrix$=xp,e.CalculateRouteMatrixCommand=kh,e.CalculateRouteMatrixRequest$=Dc,e.CalculateRouteMatrixResponse$=$c,e.CalculateRouteMatrixSummary$=Mc,e.CalculateRouteRequest$=Lc,e.CalculateRouteResponse$=kc,e.CalculateRouteSummary$=Nc,e.CalculateRouteTruckModeOptions$=_c,e.CellSignals$=Uc,e.Circle$=Fc,e.ConflictException=ks,e.ConflictException$=Gc,e.CreateGeofenceCollection$=Op,e.CreateGeofenceCollectionCommand=Nh,e.CreateGeofenceCollectionRequest$=Bc,e.CreateGeofenceCollectionResponse$=Hc,e.CreateKey$=Dp,e.CreateKeyCommand=_h,e.CreateKeyRequest$=zc,e.CreateKeyResponse$=jc,e.CreateMap$=$p,e.CreateMapCommand=Uh,e.CreateMapRequest$=qc,e.CreateMapResponse$=Vc,e.CreatePlaceIndex$=Mp,e.CreatePlaceIndexCommand=Fh,e.CreatePlaceIndexRequest$=Wc,e.CreatePlaceIndexResponse$=Kc,e.CreateRouteCalculator$=Lp,e.CreateRouteCalculatorCommand=Gh,e.CreateRouteCalculatorRequest$=Qc,e.CreateRouteCalculatorResponse$=Zc,e.CreateTracker$=kp,e.CreateTrackerCommand=Bh,e.CreateTrackerRequest$=Yc,e.CreateTrackerResponse$=Jc,e.DataSourceConfiguration$=Xc,e.DeleteGeofenceCollection$=Np,e.DeleteGeofenceCollectionCommand=Hh,e.DeleteGeofenceCollectionRequest$=eu,e.DeleteGeofenceCollectionResponse$=tu,e.DeleteKey$=_p,e.DeleteKeyCommand=zh,e.DeleteKeyRequest$=nu,e.DeleteKeyResponse$=ru,e.DeleteMap$=Up,e.DeleteMapCommand=jh,e.DeleteMapRequest$=iu,e.DeleteMapResponse$=su,e.DeletePlaceIndex$=Fp,e.DeletePlaceIndexCommand=qh,e.DeletePlaceIndexRequest$=ou,e.DeletePlaceIndexResponse$=au,e.DeleteRouteCalculator$=Gp,e.DeleteRouteCalculatorCommand=Vh,e.DeleteRouteCalculatorRequest$=cu,e.DeleteRouteCalculatorResponse$=uu,e.DeleteTracker$=Bp,e.DeleteTrackerCommand=Wh,e.DeleteTrackerRequest$=lu,e.DeleteTrackerResponse$=du,e.DescribeGeofenceCollection$=Hp,e.DescribeGeofenceCollectionCommand=Kh,e.DescribeGeofenceCollectionRequest$=pu,e.DescribeGeofenceCollectionResponse$=hu,e.DescribeKey$=zp,e.DescribeKeyCommand=Qh,e.DescribeKeyRequest$=fu,e.DescribeKeyResponse$=gu,e.DescribeMap$=jp,e.DescribeMapCommand=Zh,e.DescribeMapRequest$=mu,e.DescribeMapResponse$=yu,e.DescribePlaceIndex$=qp,e.DescribePlaceIndexCommand=Yh,e.DescribePlaceIndexRequest$=Su,e.DescribePlaceIndexResponse$=Ru,e.DescribeRouteCalculator$=Vp,e.DescribeRouteCalculatorCommand=Jh,e.DescribeRouteCalculatorRequest$=wu,e.DescribeRouteCalculatorResponse$=vu,e.DescribeTracker$=Wp,e.DescribeTrackerCommand=Xh,e.DescribeTrackerRequest$=Eu,e.DescribeTrackerResponse$=Cu,e.DevicePosition$=bu,e.DevicePositionUpdate$=Tu,e.DeviceState$=Pu,e.DisassociateTrackerConsumer$=Kp,e.DisassociateTrackerConsumerCommand=ef,e.DisassociateTrackerConsumerRequest$=Au,e.DisassociateTrackerConsumerResponse$=Iu,e.ForecastGeofenceEvents$=Qp,e.ForecastGeofenceEventsCommand=tf,e.ForecastGeofenceEventsDeviceState$=Ou,e.ForecastGeofenceEventsRequest$=Du,e.ForecastGeofenceEventsResponse$=$u,e.ForecastedEvent$=xu,e.GeoMapsClient=Kg,e.GeoPlacesClient=nS,e.GeoRoutesClient=rC,e.GeofenceGeometry$=Mu,e.GetDevicePosition$=Zp,e.GetDevicePositionCommand=nf,e.GetDevicePositionHistory$=Yp,e.GetDevicePositionHistoryCommand=rf,e.GetDevicePositionHistoryRequest$=Lu,e.GetDevicePositionHistoryResponse$=ku,e.GetDevicePositionRequest$=Nu,e.GetDevicePositionResponse$=_u,e.GetGeofence$=Jp,e.GetGeofenceCommand=sf,e.GetGeofenceRequest$=Uu,e.GetGeofenceResponse$=Fu,e.GetMapGlyphs$=Xp,e.GetMapGlyphsCommand=of,e.GetMapGlyphsRequest$=Gu,e.GetMapGlyphsResponse$=Bu,e.GetMapSprites$=eh,e.GetMapSpritesCommand=af,e.GetMapSpritesRequest$=Hu,e.GetMapSpritesResponse$=zu,e.GetMapStyleDescriptor$=th,e.GetMapStyleDescriptorCommand=cf,e.GetMapStyleDescriptorRequest$=ju,e.GetMapStyleDescriptorResponse$=qu,e.GetMapTile$=nh,e.GetMapTileCommand=uf,e.GetMapTileRequest$=Vu,e.GetMapTileResponse$=Wu,e.GetPlace$=rh,e.GetPlaceCommand=lf,e.GetPlaceRequest$=Ku,e.GetPlaceResponse$=Qu,e.InferredState$=Zu,e.InternalServerException=Ns,e.InternalServerException$=Yu,e.Leg$=Ju,e.LegGeometry$=Xu,e.ListDevicePositions$=ih,e.ListDevicePositionsCommand=df,e.ListDevicePositionsRequest$=el,e.ListDevicePositionsResponse$=tl,e.ListDevicePositionsResponseEntry$=nl,e.ListGeofenceCollections$=sh,e.ListGeofenceCollectionsCommand=pf,e.ListGeofenceCollectionsRequest$=rl,e.ListGeofenceCollectionsResponse$=il,e.ListGeofenceCollectionsResponseEntry$=sl,e.ListGeofenceResponseEntry$=ol,e.ListGeofences$=oh,e.ListGeofencesCommand=hf,e.ListGeofencesRequest$=al,e.ListGeofencesResponse$=cl,e.ListKeys$=ah,e.ListKeysCommand=ff,e.ListKeysRequest$=ul,e.ListKeysResponse$=ll,e.ListKeysResponseEntry$=dl,e.ListMaps$=ch,e.ListMapsCommand=gf,e.ListMapsRequest$=pl,e.ListMapsResponse$=hl,e.ListMapsResponseEntry$=fl,e.ListPlaceIndexes$=uh,e.ListPlaceIndexesCommand=mf,e.ListPlaceIndexesRequest$=gl,e.ListPlaceIndexesResponse$=ml,e.ListPlaceIndexesResponseEntry$=yl,e.ListRouteCalculators$=lh,e.ListRouteCalculatorsCommand=yf,e.ListRouteCalculatorsRequest$=Sl,e.ListRouteCalculatorsResponse$=Rl,e.ListRouteCalculatorsResponseEntry$=wl,e.ListTagsForResource$=dh,e.ListTagsForResourceCommand=Sf,e.ListTagsForResourceRequest$=vl,e.ListTagsForResourceResponse$=El,e.ListTrackerConsumers$=ph,e.ListTrackerConsumersCommand=Rf,e.ListTrackerConsumersRequest$=Cl,e.ListTrackerConsumersResponse$=bl,e.ListTrackers$=hh,e.ListTrackersCommand=wf,e.ListTrackersRequest$=Tl,e.ListTrackersResponse$=Pl,e.ListTrackersResponseEntry$=Al,e.Location=Wf,e.LocationClient=$s,e.LocationServiceException=Ms,e.LocationServiceException$=Ad,e.LteCellDetails$=Il,e.LteLocalId$=xl,e.LteNetworkMeasurements$=Ol,e.MapConfiguration$=Dl,e.MapConfigurationUpdate$=$l,e.Place$=Ml,e.PlaceGeometry$=Ll,e.PositionalAccuracy$=kl,e.PutGeofence$=fh,e.PutGeofenceCommand=vf,e.PutGeofenceRequest$=Nl,e.PutGeofenceResponse$=_l,e.ResourceNotFoundException=Gs,e.ResourceNotFoundException$=Ul,e.RouteMatrixEntry$=Fl,e.RouteMatrixEntryError$=Gl,e.SearchForPositionResult$=Bl,e.SearchForSuggestionsResult$=Hl,e.SearchForTextResult$=zl,e.SearchPlaceIndexForPosition$=gh,e.SearchPlaceIndexForPositionCommand=Ef,e.SearchPlaceIndexForPositionRequest$=jl,e.SearchPlaceIndexForPositionResponse$=ql,e.SearchPlaceIndexForPositionSummary$=Vl,e.SearchPlaceIndexForSuggestions$=mh,e.SearchPlaceIndexForSuggestionsCommand=Cf,e.SearchPlaceIndexForSuggestionsRequest$=Wl,e.SearchPlaceIndexForSuggestionsResponse$=Kl,e.SearchPlaceIndexForSuggestionsSummary$=Ql,e.SearchPlaceIndexForText$=yh,e.SearchPlaceIndexForTextCommand=bf,e.SearchPlaceIndexForTextRequest$=Zl,e.SearchPlaceIndexForTextResponse$=Yl,e.SearchPlaceIndexForTextSummary$=Jl,e.ServiceQuotaExceededException=_s,e.ServiceQuotaExceededException$=Xl,e.Step$=ed,e.TagResource$=Sh,e.TagResourceCommand=Tf,e.TagResourceRequest$=td,e.TagResourceResponse$=nd,e.ThrottlingException=Us,e.ThrottlingException$=rd,e.TimeZone$=id,e.TrackingFilterGeometry$=sd,e.TruckDimensions$=od,e.TruckWeight$=ad,e.UntagResource$=Rh,e.UntagResourceCommand=Pf,e.UntagResourceRequest$=cd,e.UntagResourceResponse$=ud,e.UpdateGeofenceCollection$=wh,e.UpdateGeofenceCollectionCommand=Af,e.UpdateGeofenceCollectionRequest$=ld,e.UpdateGeofenceCollectionResponse$=dd,e.UpdateKey$=vh,e.UpdateKeyCommand=If,e.UpdateKeyRequest$=pd,e.UpdateKeyResponse$=hd,e.UpdateMap$=Eh,e.UpdateMapCommand=xf,e.UpdateMapRequest$=fd,e.UpdateMapResponse$=gd,e.UpdatePlaceIndex$=Ch,e.UpdatePlaceIndexCommand=Of,e.UpdatePlaceIndexRequest$=md,e.UpdatePlaceIndexResponse$=yd,e.UpdateRouteCalculator$=bh,e.UpdateRouteCalculatorCommand=Df,e.UpdateRouteCalculatorRequest$=Sd,e.UpdateRouteCalculatorResponse$=Rd,e.UpdateTracker$=Th,e.UpdateTrackerCommand=$f,e.UpdateTrackerRequest$=wd,e.UpdateTrackerResponse$=vd,e.ValidationException=Fs,e.ValidationException$=Ed,e.ValidationExceptionField$=Cd,e.VerifyDevicePosition$=Ph,e.VerifyDevicePositionCommand=Mf,e.VerifyDevicePositionRequest$=bd,e.VerifyDevicePositionResponse$=Td,e.WiFiAccessPoint$=Pd,e.__Client=Yn,e.fromCognitoIdentity=e=>Qf({...e}),e.fromCognitoIdentityPool=e=>function({accountId:e,cache:t=ng(),client:n,clientConfig:r,customRoleArn:i,identityPoolId:s,logins:o,userIdentifier:a=(o&&0!==Object.keys(o).length?void 0:"ANONYMOUS"),logger:c,parentClientConfig:u}){c?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const l=a?`aws:cognito-identity-credentials:${s}:${a}`:void 0;let d=async a=>{const{GetIdCommand:p,CognitoIdentityClient:h}=await Promise.resolve().then((function(){return vL})),f=e=>r?.[e]??u?.[e]??a?.callerClientConfig?.[e],g=n??new h(Object.assign({},r??{},{region:f("region"),profile:f("profile"),userAgentAppId:f("userAgentAppId")}));let m=l&&await t.getItem(l);if(!m){const{IdentityId:n=rg(c)}=await g.send(new p({AccountId:e,IdentityPoolId:s,Logins:o?await Kf(o):void 0}));m=n,l&&Promise.resolve(t.setItem(l,m)).catch((()=>{}))}return d=Qf({client:g,customRoleArn:i,logins:o,identityId:m}),d(a)};return e=>d(e).catch((async e=>{throw l&&Promise.resolve(t.removeItem(l)).catch((()=>{})),e}))}({...e}),e.fromHttp=(e={})=>{let t;e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");const n=e.credentialsFullUri;if(!n)throw new dn("No HTTP credential provider host provided.",{logger:e.logger});t=n;const r=new URL(t);((e,t)=>{if("https:"!==e.protocol&&"169.254.170.2"!==e.hostname&&"169.254.170.23"!==e.hostname&&"[fd00:ec2::23]"!==e.hostname){if(e.hostname.includes("[")){if("[::1]"===e.hostname||"[0000:0000:0000:0000:0000:0000:0000:0001]"===e.hostname)return}else{if("localhost"===e.hostname)return;const t=e.hostname.split("."),n=e=>{const t=parseInt(e,10);return 0<=t&&t<=255};if("127"===t[0]&&n(t[1])&&n(t[2])&&n(t[3])&&4===t.length)return}throw new dn("URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]",{logger:t})}})(r,e.logger);const i=new H;return s=async()=>{const t=function(e){return new o({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce(((e,[t,n])=>(e[t]=n,e)),{}),fragment:e.hash})}(r);return e.authorizationToken&&(t.headers.Authorization=e.authorizationToken),async function(e,t){const n=K(e.body),r=await n.transformToString();if(200===e.statusCode){const e=JSON.parse(r);if("string"!=typeof e.AccessKeyId||"string"!=typeof e.SecretAccessKey||"string"!=typeof e.Token||"string"!=typeof e.Expiration)throw new dn("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:Ae(e.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let n={};try{n=JSON.parse(r)}catch(e){}throw Object.assign(new dn(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:n.Code,Message:n.Message})}throw new dn(`Server responded with status: ${e.statusCode}`,{logger:t})}((await i.handle(t)).response)},a=e.maxRetries??3,c=e.timeout??1e3,async()=>{for(let e=0;e<a;++e)try{return await s()}catch(e){await new Promise((e=>setTimeout(e,c)))}return await s()};var s,a,c},e.fromTemporaryCredentials=(e,t,n)=>{let r;return async(i={})=>{const{callerClientConfig:s}=i,o=e.clientConfig?.profile??s?.profile,a=e.logger??s?.logger;a?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");const c={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(c?.SerialNumber){if(!e.mfaCodeProvider)throw new dn("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:a});c.TokenCode=await e.mfaCodeProvider(c?.SerialNumber)}const{AssumeRoleCommand:u,STSClient:l}=await Promise.resolve().then((function(){return qk}));if(!r){const i="function"==typeof t?t():void 0,c=[e.masterCredentials,e.clientConfig?.credentials,void 0,s?.credentialDefaultProvider?.(),i];let u="STS client default credentials";if(c[0])u="options.masterCredentials";else if(c[1])u="options.clientConfig.credentials";else{if(c[2])throw u="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");c[3]?u="caller client's credentialDefaultProvider":c[4]&&(u="AWS SDK default credentials")}const d=[e.clientConfig?.region,s?.region,await(n?.({profile:o})),"us-east-1"];let p="default partition's default region";d[0]?p="options.clientConfig.region":d[1]?p="caller client's region":d[2]&&(p="file or env region");const h=[ig(e.clientConfig?.requestHandler),ig(s?.requestHandler)];let f="STS default requestHandler";h[0]?f="options.clientConfig.requestHandler":h[1]&&(f="caller client's requestHandler"),a?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${p}=${await C(sg(d))()}, ${u}, ${f}.`),r=new l({userAgentAppId:s?.userAgentAppId,...e.clientConfig,credentials:sg(c),logger:a,profile:o,region:sg(d),requestHandler:sg(h)})}if(e.clientPlugins)for(const t of e.clientPlugins)r.middlewareStack.use(t);const{Credentials:d}=await r.send(new u(c));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new dn(`Invalid response from STS.assumeRole call with role ${c.RoleArn}`,{logger:a});return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,credentialScope:d.CredentialScope}}},e.fromWebToken=e=>(e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:n,roleSessionName:r,webIdentityToken:i,providerId:s,policyArns:o,policy:a,durationSeconds:c}=e;let{roleAssumerWithWebIdentity:u}=e;if(!u){const{getDefaultRoleAssumerWithWebIdentity:n}=await Promise.resolve().then((function(){return C_}));u=n({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return u({RoleArn:n,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:i,ProviderId:s,PolicyArns:o,Policy:a,DurationSeconds:c})})({...e}),e.maps=my,e.paginateForecastGeofenceEvents=Lf,e.paginateGetDevicePositionHistory=kf,e.paginateListDevicePositions=Nf,e.paginateListGeofenceCollections=_f,e.paginateListGeofences=Uf,e.paginateListKeys=Ff,e.paginateListMaps=Gf,e.paginateListPlaceIndexes=Bf,e.paginateListRouteCalculators=Hf,e.paginateListTrackerConsumers=zf,e.paginateListTrackers=jf,e.places=bE,e.routes=q$,e.withAPIKey=cg.withAPIKey,e.withIdentityPoolId=cg.withIdentityPoolId}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amazonLocationClient={})}(this,(function(e){"use strict";const t=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,s){e.httpHandler?.updateHttpClientConfig(t,s)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}),s=e=>({httpHandler:e.httpHandler()});var r,n;!function(e){e.HTTP="http",e.HTTPS="https"}(r||(r={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(n||(n={}));const i="__smithy_context";class o{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new o({...e,headers:{...e.headers}});var s;return t.query&&(t.query=(s=t.query,Object.keys(s).reduce(((e,t)=>{const r=s[t];return{...e,[t]:Array.isArray(r)?[...r]:r}}),{}))),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 o.clone(this)}}class a{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const c={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},u=e=>({applyToStack:t=>{t.add((e=>t=>async s=>{if(!o.isInstance(s.request))return t(s);const{request:r}=s,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(s)})(e),c)}}),l={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},d=e=>({applyToStack:e=>{e.add(((e,t)=>async s=>{try{const r=await e(s),{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,l=c??t.inputFilterSensitiveLog,d=u??t.outputFilterSensitiveLog,{$metadata:p,...h}=r.output;return o?.info?.({clientName:n,commandName:i,input:l(s.input),output:d(h),metadata:p}),r}catch(e){const{clientName:r,commandName:n,logger:i,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw i?.error?.({clientName:r,commandName:n,input:c(s.input),error:e,metadata:e.$metadata}),e}}),l)}}),p={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},h=e=>({applyToStack:e=>{e.add((e=>async t=>e(t)),p)}}),m=e=>e[i]||(e[i]={}),g=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};const f=(e,t)=>(s,r)=>async n=>{const i=((e,t)=>{if(!t||0===t.length)return e;const s=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&s.push(t);for(const t of e)s.find((({schemeId:e})=>e===t.schemeId))||s.push(t);return s})(e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,n.input)),e.authSchemePreference?await e.authSchemePreference():[]),o=function(e){const t=new Map;for(const s of e)t.set(s.schemeId,s);return t}(e.httpAuthSchemes),a=m(r),c=[];for(const s of i){const n=o.get(s.schemeId);if(!n){c.push(`HttpAuthScheme \`${s.schemeId}\` was not enabled for this service.`);continue}const i=n.identityProvider(await t.identityProviderConfigProvider(e));if(!i){c.push(`HttpAuthScheme \`${s.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:u={},signingProperties:l={}}=s.propertiesExtractor?.(e,r)||{};s.identityProperties=Object.assign(s.identityProperties||{},u),s.signingProperties=Object.assign(s.signingProperties||{},l),a.selectedHttpAuthScheme={httpAuthOption:s,identity:await i(s.identityProperties),signer:n.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return s(n)},y={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},S=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:s})=>({applyToStack:r=>{r.addRelativeTo(f(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:s}),y)}}),R=e=>e=>{throw e},w=(e,t)=>{},E={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},C=e=>({applyToStack:e=>{e.addRelativeTo(((e,t)=>async s=>{if(!o.isInstance(s.request))return e(s);const r=m(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:n={}},identity:i,signer:a}=r,c=await e({...s,request:await a.sign(s.request,i,n)}).catch((a.errorHandler||R)(n));return(a.successHandler||w)(c.response,n),c}),E)}}),v=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},b=async(e,t,s,r=e=>e,...n)=>{let i=new e(s);return i=r(i)??i,await t.send(i,...n)};function T(e,t,s,r,n){return async function*(i,o,...a){const c=o;let u,l=i.startingToken??c[s],d=!0;for(;d;){if(c[s]=l,c[n]=c[n]??i.pageSize,!(i.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);u=await b(t,i.client,o,i.withCommand,...a),yield u;const p=l;l=P(u,r),d=!(!l||i.stopOnSameToken&&l===p)}}}const P=(e,t)=>{let s=e;const r=t.split(".");for(const e of r){if(!s||"object"!=typeof s)return;s=s[e]}return s},I="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=Object.entries(I).reduce(((e,[t,s])=>(e[s]=Number(t),e)),{}),x=I.split(""),O=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const s=new ArrayBuffer(t),r=new DataView(s);for(let t=0;t<e.length;t+=4){let s=0,n=0;for(let r=t,i=t+3;r<=i;r++)if("="!==e[r]){if(!(e[r]in A))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);s|=A[e[r]]<<6*(i-r),n+=6}else s>>=6;const i=t/4*3;s>>=n%8;const o=Math.floor(n/8);for(let e=0;e<o;e++){const t=8*(o-e-1);r.setUint8(i+e,(s&255<<t)>>t)}}return new Uint8Array(s)},D=e=>(new TextEncoder).encode(e),$=e=>"string"==typeof e?D(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),L=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 k(e){let t;t="string"==typeof e?D(e):e;const s="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!s&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let n="";for(let e=0;e<t.length;e+=3){let s=0,r=0;for(let n=e,i=Math.min(e+3,t.length);n<i;n++)s|=t[n]<<8*(i-n-1),r+=8;const i=Math.ceil(r/6);s<<=6*i-r;for(let e=1;e<=i;e++){const t=6*(i-e);n+=x[(s&63<<t)>>t]}n+="==".slice(0,4-i)}return n}class M extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return"base64"===t?M.mutate(O(e)):M.mutate(D(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,M.prototype),e}transformToString(e="utf-8"){return"base64"===e?k(this):L(this)}}const N=e=>"function"==typeof ReadableStream&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),U=e=>encodeURIComponent(e).replace(/[!'()*]/g,_),_=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function G(e,t){return new Request(e,t)}function F(e=0){return new Promise(((t,s)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",s(t)}),e)}))}const B={supported:void 0};class z{config;configProvider;static create(e){return"function"==typeof e?.handle?e:new z(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===B.supported&&(B.supported=Boolean("undefined"!=typeof Request&&"keepalive"in G("https://[::1]")))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:s}={}){this.config||(this.config=await this.configProvider);const r=s??this.config.requestTimeout,n=!0===this.config.keepAlive,i=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const c=function(e){const t=[];for(let s of Object.keys(e).sort()){const r=e[s];if(s=U(s),Array.isArray(r))for(let e=0,n=r.length;e<n;e++)t.push(`${s}=${U(r[e])}`);else{let e=s;(r||"string"==typeof r)&&(e+=`=${U(r)}`),t.push(e)}}return t.join("&")}(e.query||{});c&&(o+=`?${c}`),e.fragment&&(o+=`#${e.fragment}`);let u="";if(null!=e.username||null!=e.password){u=`${e.username??""}:${e.password??""}@`}const{port:l,method:d}=e,p=`${e.protocol}//${u}${e.hostname}${l?`:${l}`:""}${o}`,h="GET"===d||"HEAD"===d?void 0:e.body,m={body:h,headers:new Headers(e.headers),method:d,credentials:i};this.config?.cache&&(m.cache=this.config.cache),h&&(m.duplex="half"),"undefined"!=typeof AbortController&&(m.signal=t),B.supported&&(m.keepalive=n),"function"==typeof this.config.requestInit&&Object.assign(m,this.config.requestInit(e));let g=()=>{};const f=G(p,m),y=[fetch(f).then((e=>{const t=e.headers,s={};for(const e of t.entries())s[e[0]]=e[1];return null!=e.body?{response:new a({headers:s,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new a({headers:s,reason:e.statusText,statusCode:e.status,body:t})})))})),F(r)];return t&&y.push(new Promise(((e,s)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",s(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),g=()=>e.removeEventListener("abort",r)}else t.onabort=r}))),Promise.race(y).finally(g)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((s=>(s[e]=t,s)))}httpHandlerConfigs(){return this.config??{}}}const j=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):async function(e){const t=await function(e){return new Promise(((t,s)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return s(new Error("Reader aborted too early"));const e=r.result??"",n=e.indexOf(","),i=n>-1?n+1:e.length;t(e.substring(i))},r.onabort=()=>s(new Error("Read aborted")),r.onerror=()=>s(r.error),r.readAsDataURL(e)}))}(e),s=O(t);return new Uint8Array(s)}(e):async function(e){const t=[],s=e.getReader();let r=!1,n=0;for(;!r;){const{done:e,value:i}=await s.read();i&&(t.push(i),n+=i.length),r=e}const i=new Uint8Array(n);let o=0;for(const e of t)i.set(e,o),o+=e.length;return i}(e);const H={},q={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),H[e]=t,q[t]=e}function V(e){let t="";for(let s=0;s<e.byteLength;s++)t+=H[e[s]];return t}const W="The stream has already been transformed.",K=e=>{if(!Q(e)&&!N(e)){throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${e?.__proto__?.constructor?.name||e}`)}let t=!1;const s=async()=>{if(t)throw new Error(W);return t=!0,await j(e)};return Object.assign(e,{transformToByteArray:s,transformToString:async e=>{const t=await s();if("base64"===e)return k(t);if("hex"===e)return V(t);if(void 0===e||"utf8"===e||"utf-8"===e)return L(t);if("function"==typeof TextDecoder)return new TextDecoder(e).decode(t);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(W);if(t=!0,Q(e))return(e=>{if("function"!=typeof e.stream)throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return e.stream()})(e);if(N(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},Q=e=>"function"==typeof Blob&&e instanceof Blob,Z=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return M.mutate(e);if(!e)return M.mutate(new Uint8Array);const s=t.streamCollector(e);return M.mutate(await s)};function Y(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}const J=e=>"function"==typeof e?e():e,X=(e,t,s,r,n)=>({name:t,namespace:e,traits:s,input:r,output:n}),ee=(e,t)=>(t.find((([t])=>t.match(e)))||[void 0,void 0])[1],te={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},se={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function re(e){return{applyToStack:t=>{t.add((e=>(t,s)=>async r=>{const{operationSchema:n}=m(s),[,i,o,a,c,u]=n??[],l=s.endpointV2?.url&&e.urlParser?async()=>e.urlParser(s.endpointV2.url):e.endpoint,d=await e.protocol.serializeRequest(X(i,o,a,c,u),r.input,{...e,...s,endpoint:l});return t({...r,request:d})})(e),se),t.add((e=>(t,s)=>async r=>{const{response:n}=await t(r),{operationSchema:i}=m(s),[,o,c,u,l,d]=i??[];try{return{response:n,output:await e.protocol.deserializeResponse(X(o,c,u,l,d),{...e,...s},n)}}catch(e){if(Object.defineProperty(e,"$response",{value:n,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){s.logger&&"NoOpLogger"!==s.logger?.constructor?.name?s.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(a.isInstance(n)){const{headers:t={}}=n,s=Object.entries(t);e.$metadata={httpStatusCode:n.statusCode,requestId:ee(/^x-[\w-]+-request-?id$/,s),extendedRequestId:ee(/^x-[\w-]+-id-2$/,s),cfId:ee(/^x-[\w-]+-cf-id$/,s)}}}catch(e){}}throw e}})(e),te),e.protocol.setSerdeContext(e)}}}function ne(e){if("object"==typeof e)return e;e|=0;const t={};let s=0;for(const r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])1==(e>>s++&1)&&(t[r]=1);return t}const ie=Symbol.for("@smithy/nor-struct-it");class oe{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=oe.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e,this.memberName=t;const s=[];let r=e,n=e;for(this._isMemberSchema=!1;ce(r);)s.push(r[1]),r=r[0],n=J(r),this._isMemberSchema=!0;if(s.length>0){this.memberTraits={};for(let e=s.length-1;e>=0;--e){const t=s[e];Object.assign(this.memberTraits,ne(t))}}else this.memberTraits=0;if(n instanceof oe){const e=this.memberTraits;return Object.assign(this,n),this.memberTraits=Object.assign({},e,n.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,void(this.memberName=t??n.memberName)}if(this.schema=J(n),ue(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(n),this.traits=0),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===this.symbol}return t}static of(e){const t=J(e);if(t instanceof oe)return t;if(ce(t)){const[s,r]=t;if(s instanceof oe)return Object.assign(s.getMergedTraits(),ne(r)),s;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new oe(t)}getSchema(){const e=this.schema;return Array.isArray(e)&&0===e[0]?e[4]:e}getName(e=!1){const{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=64&&e<128:1===e[0]}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=128&&e<=255:2===e[0]}isStructSchema(){const e=this.getSchema();if("object"!=typeof e)return!1;const t=e[0];return 3===t||-3===t||4===t}isUnionSchema(){const e=this.getSchema();return"object"==typeof e&&4===e[0]}isBlobSchema(){const e=this.getSchema();return 21===e||42===e}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=4&&e<=7}isUnitSchema(){return"unit"===this.getSchema()}isDocumentSchema(){return 15===this.getSchema()}isStringSchema(){return 0===this.getSchema()}isBooleanSchema(){return 2===this.getSchema()}isNumericSchema(){return 1===this.getSchema()}isBigIntegerSchema(){return 17===this.getSchema()}isBigDecimalSchema(){return 19===this.getSchema()}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||42===this.getSchema()}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return ne(this.memberTraits)}getOwnTraits(){return ne(this.traits)}getKeySchema(){const[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const s=this.getSchema();return ae([e?15:s[4]??0,0],"key")}getValueSchema(){const e=this.getSchema(),[t,s,r]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],n="number"==typeof e?63&e:e&&"object"==typeof e&&(s||r)?e[3+e[0]]:t?15:void 0;if(null!=n)return ae([n,0],s?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){const s=t[4].indexOf(e),r=t[5][s];return ae(ce(r)?r:[r,0],e)}if(this.isDocumentSchema())return ae([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[t,s]of this.structIterator())e[t]=s}catch(e){}return e}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e;return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema(),t=e[4].length;let s=e[ie];if(s&&t===s.length)yield*s;else{s=Array(t);for(let r=0;r<t;++r){const t=e[4][r],n=ae([e[5][r],0],t);yield s[r]=[t,n]}e[ie]=s}}}function ae(e,t){if(e instanceof oe)return Object.assign(e,{memberName:t,_isMemberSchema:!0});return new oe(e,t)}const ce=e=>Array.isArray(e)&&2===e.length,ue=e=>Array.isArray(e)&&e.length>=5;class le{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,s=new Map){this.namespace=e,this.schemas=t,this.exceptions=s}static for(e){return le.registries.has(e)||le.registries.set(e,new le(e)),le.registries.get(e)}copyFrom(e){const{schemas:t,exceptions:s}=this;for(const[s,r]of e.schemas)t.has(s)||t.set(s,r);for(const[t,r]of e.exceptions)s.has(t)||s.set(t,r)}register(e,t){const s=this.normalizeShapeId(e);for(const e of[this,le.for(s.split("#")[0])])e.schemas.set(s,t)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}registerError(e,t){const s=e,r=s[1];for(const e of[this,le.for(r)])e.schemas.set(r+"#"+s[2],s),e.exceptions.set(s,t)}getErrorCtor(e){const t=e;if(this.exceptions.has(t))return this.exceptions.get(t);return le.for(t[1]).exceptions.get(t)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,t,s]=e,r=t+"#"+s;if(r.startsWith("smithy.ts.sdk.synthetic.")&&r.endsWith("ServiceException"))return e}}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}const de=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Ce.warn(Ee(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},pe=Math.ceil(2**127*(2-2**-23)),he=e=>{const t=de(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>pe)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},me=e=>fe(e,16),ge=e=>fe(e,8),fe=(e,t)=>{const s=(e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}})(e);if(void 0!==s&&ye(s,t)!==s)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return s},ye=(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]}},Se=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Re=e=>{const t=e.match(Se);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},we=e=>me("string"==typeof e?Re(e):e),Ee=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),Ce={warn:console.warn},ve=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],be=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Te(e){const t=e.getUTCFullYear(),s=e.getUTCMonth(),r=e.getUTCDay(),n=e.getUTCDate(),i=e.getUTCHours(),o=e.getUTCMinutes(),a=e.getUTCSeconds(),c=i<10?`0${i}`:`${i}`,u=o<10?`0${o}`:`${o}`,l=a<10?`0${a}`:`${a}`;return`${ve[r]}, ${n<10?`0${n}`:`${n}`} ${be[s]} ${t} ${c}:${u}:${l} GMT`}const Pe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Ie=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Pe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[s,r,n,i,o,a,c,u]=t,l=we(je(r)),d=Fe(n,"month",1,12),p=Fe(i,"day",1,31);return Le(l,d,p,{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u})},Ae=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),xe=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Oe=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),De=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),$e=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=(e=>de("string"==typeof e?Re(e):e))(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))},Le=(e,t,s,r)=>{const n=t-1;return _e(e,n,s),new Date(Date.UTC(e,n,s,Fe(r.hours,"hour",0,23),Fe(r.minutes,"minute",0,59),Fe(r.seconds,"seconds",0,60),Be(r.fractionalMilliseconds)))},ke=e=>{const t=(new Date).getUTCFullYear(),s=100*Math.floor(t/100)+we(je(e));return s<t?s+100:s},Me=e=>e.getTime()-(new Date).getTime()>15768e8?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Ne=e=>{const t=be.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Ue=[31,28,31,30,31,30,31,31,30,31,30,31],_e=(e,t,s)=>{let r=Ue[t];if(1===t&&Ge(e)&&(r=29),s>r)throw new TypeError(`Invalid day for ${be[t]} in ${e}: ${s}`)},Ge=e=>e%4==0&&(e%100!=0||e%400==0),Fe=(e,t,s,r)=>{const n=(e=>ge("string"==typeof e?Re(e):e))(je(e));if(n<s||n>r)throw new TypeError(`${t} must be between ${s} and ${r}, inclusive`);return n},Be=e=>null==e?0:1e3*(e=>he("string"==typeof e?Re(e):e))("0."+e),ze=e=>{const t=e[0];let s=1;if("+"==t)s=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);s=-1}return s*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},je=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)},He="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),qe=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0"))),Ve=()=>{if(He)return He();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128,qe[e[0]]+qe[e[1]]+qe[e[2]]+qe[e[3]]+"-"+qe[e[4]]+qe[e[5]]+"-"+qe[e[6]]+qe[e[7]]+"-"+qe[e[8]]+qe[e[9]]+"-"+qe[e[10]]+qe[e[11]]+qe[e[12]]+qe[e[13]]+qe[e[14]]+qe[e[15]]},We=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};We.from=e=>e&&"object"==typeof e&&(e instanceof We||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?We(String(e)):We(JSON.stringify(e)),We.fromObject=We.from;const Ke="(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:[ne|u?r]?s?day)?",Qe="(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)",Ze="(\\d?\\d):(\\d{2}):(\\d{2})(?:\\.(\\d+))?",Ye="(\\d?\\d)",Je="(\\d{4})",Xe=new RegExp(/^(\d{4})-(\d\d)-(\d\d)[tT](\d\d):(\d\d):(\d\d)(\.(\d+))?(([-+]\d\d:\d\d)|[zZ])$/),et=new RegExp(`^${Ke}, ${Ye} ${Qe} ${Je} ${Ze} GMT$`),tt=new RegExp(`^${Ke}, ${Ye}-${Qe}-(\\d\\d) ${Ze} GMT$`),st=new RegExp(`^${Ke} ${Qe} ( [1-9]|\\d\\d) ${Ze} ${Je}$`),rt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function nt(e,t,s){const r=Number(e);if(r<t||r>s)throw new Error(`Value ${r} out of range [${t}, ${s}]`)}function it(e,t,s){if(!Number.isInteger(s))throw new Error("Invalid number of delimiters ("+s+") for splitEvery.");const r=e.split(t),n=[];let i="";for(let e=0;e<r.length;e++)""===i?i=r[e]:i+=t+r[e],(e+1)%s==0&&(n.push(i),i="");return""!==i&&n.push(i),n}const ot=e=>{const t=e.length,s=[];let r,n=!1,i=0;for(let o=0;o<t;++o){const t=e[o];switch(t){case'"':"\\"!==r&&(n=!n);break;case",":n||(s.push(e.slice(i,o)),i=o+1)}r=t}return s.push(e.slice(i)),s.map((e=>{const t=(e=e.trim()).length;return t<2?e:('"'===e[0]&&'"'===e[t-1]&&(e=e.slice(1,t-1)),e.replace(/\\"/g,'"'))}))},at=/^-?\d*(\.\d+)?$/;class ct{string;type;constructor(e,t){if(this.string=e,this.type=t,!at.test(e))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||"object"!=typeof e)return!1;const t=e;return ct.prototype.isPrototypeOf(e)||"bigDecimal"===t.type&&at.test(t.string)}}class ut{serdeContext;setSerdeContext(e){this.serdeContext=e}}class lt extends ut{options;compositeErrorRegistry;constructor(e){super(),this.options=e,this.compositeErrorRegistry=le.for(e.defaultNamespace);for(const t of e.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(t)}getRequestType(){return o}getResponseType(){return a}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if("url"in t){e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,e.query||(e.query={});for(const[s,r]of t.url.searchParams.entries())e.query[s]=r;return e}return e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},e}setHostPrefix(e,t,s){if(this.serdeContext?.disableHostPrefix)return;const r=oe.of(t.input),n=ne(t.traits??{});if(n.endpoint){let t=n.endpoint?.[0];if("string"==typeof t){const n=[...r.structIterator()].filter((([,e])=>e.getMergedTraits().hostLabel));for(const[e]of n){const r=s[e];if("string"!=typeof r)throw new Error(`@smithy/core/schema - ${e} in input must be a string as hostLabel.`);t=t.replace(`{${e}}`,r)}e.hostname=t+e.hostname}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:s}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:t,initialRequest:s})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:s}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:s})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await Promise.resolve().then((function(){return nL}));return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,s,r,n){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class dt extends lt{async serializeRequest(e,t,s){const r={...t??{}},n=this.serializer,i={},a={},c=await s.endpoint(),u=oe.of(e?.input),l=u.getSchema();let d,p=!1;const h=new o({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query:i,headers:a,body:void 0});if(c){this.updateServiceEndpoint(h,c),this.setHostPrefix(h,e,r);const t=ne(e.traits);if(t.http){h.method=t.http[0];const[e,s]=t.http[1].split("?");"/"==h.path?h.path=e:h.path+=e;const r=new URLSearchParams(s??"");Object.assign(i,Object.fromEntries(r))}}for(const[e,t]of u.structIterator()){const s=t.getMergedTraits()??{},o=r[e];if(null!=o||t.isIdempotencyToken())if(s.httpPayload){if(t.isStreaming()){t.isStructSchema()?r[e]&&(d=await this.serializeEventStream({eventStream:r[e],requestSchema:u})):d=o}else n.write(t,o),d=n.flush();delete r[e]}else if(s.httpLabel){n.write(t,o);const s=n.flush();h.path.includes(`{${e}+}`)?h.path=h.path.replace(`{${e}+}`,s.split("/").map(Y).join("/")):h.path.includes(`{${e}}`)&&(h.path=h.path.replace(`{${e}}`,Y(s))),delete r[e]}else if(s.httpHeader)n.write(t,o),a[s.httpHeader.toLowerCase()]=String(n.flush()),delete r[e];else if("string"==typeof s.httpPrefixHeaders){for(const[e,r]of Object.entries(o)){const i=s.httpPrefixHeaders+e;n.write([t.getValueSchema(),{httpHeader:i}],r),a[i.toLowerCase()]=n.flush()}delete r[e]}else s.httpQuery||s.httpQueryParams?(this.serializeQuery(t,o,i),delete r[e]):p=!0;else if(s.httpLabel&&(h.path.includes(`{${e}+}`)||h.path.includes(`{${e}}`)))throw new Error(`No value provided for input HTTP label: ${e}.`)}return p&&r&&(n.write(l,r),d=n.flush()),h.headers=a,h.query=i,h.body=d,h}serializeQuery(e,t,s){const r=this.serializer,n=e.getMergedTraits();if(n.httpQueryParams){for(const[r,i]of Object.entries(t))if(!(r in s)){const t=e.getValueSchema();Object.assign(t.getMergedTraits(),{...n,httpQuery:r,httpQueryParams:void 0}),this.serializeQuery(t,i,s)}}else if(e.isListSchema()){const i=!!e.getMergedTraits().sparse,o=[];for(const s of t){r.write([e.getValueSchema(),n],s);const t=r.flush();(i||void 0!==t)&&o.push(t)}s[n.httpQuery]=o}else r.write([e,n],t),s[n.httpQuery]=r.flush()}async deserializeResponse(e,t,s){const r=this.deserializer,n=oe.of(e.output),i={};if(s.statusCode>=300){const n=await Z(s.body,t);throw n.byteLength>0&&Object.assign(i,await r.read(15,n)),await this.handleError(e,t,s,i,this.deserializeMetadata(s)),new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.")}for(const e in s.headers){const t=s.headers[e];delete s.headers[e],s.headers[e.toLowerCase()]=t}const o=await this.deserializeHttpMessage(n,t,s,i);if(o.length){const e=await Z(s.body,t);if(e.byteLength>0){const t=await r.read(n,e);for(const e of o)null!=t[e]&&(i[e]=t[e])}}else o.discardResponseBody&&await Z(s.body,t);return i.$metadata=this.deserializeMetadata(s),i}async deserializeHttpMessage(e,t,s,r,n){let i;i=r instanceof Set?n:r;let o=!0;const a=this.deserializer,c=oe.of(e),u=[];for(const[e,r]of c.structIterator()){const n=r.getMemberTraits();if(n.httpPayload){o=!1;if(r.isStreaming()){const t=r.isStructSchema();i[e]=t?await this.deserializeEventStream({response:s,responseSchema:c}):K(s.body)}else if(s.body){const n=await Z(s.body,t);n.byteLength>0&&(i[e]=await a.read(r,n))}}else if(n.httpHeader){const t=String(n.httpHeader).toLowerCase(),o=s.headers[t];if(null!=o)if(r.isListSchema()){const s=r.getValueSchema();let n;s.getMergedTraits().httpHeader=t,n=s.isTimestampSchema()&&4===s.getSchema()?it(o,",",2):ot(o);const c=[];for(const e of n)c.push(await a.read(s,e.trim()));i[e]=c}else i[e]=await a.read(r,o)}else if(void 0!==n.httpPrefixHeaders){i[e]={};for(const[t,o]of Object.entries(s.headers))if(t.startsWith(n.httpPrefixHeaders)){const s=r.getValueSchema();s.getMergedTraits().httpHeader=t,i[e][t.slice(n.httpPrefixHeaders.length)]=await a.read(s,o)}}else n.httpResponseCode?i[e]=s.statusCode:u.push(e)}return u.discardResponseBody=o,u}}class pt extends lt{async serializeRequest(e,t,s){const r=this.serializer,n={},i={},a=await s.endpoint(),c=oe.of(e?.input),u=c.getSchema();let l;const d=new o({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:n,headers:i,body:void 0});a&&(this.updateServiceEndpoint(d,a),this.setHostPrefix(d,e,t));const p={...t};if(t){const e=c.getEventStreamMember();if(e){if(p[e]){const t={};for(const[s,n]of c.structIterator())s!==e&&p[s]&&(r.write(n,p[s]),t[s]=r.flush());l=await this.serializeEventStream({eventStream:p[e],requestSchema:c,initialRequest:t})}}else r.write(u,p),l=r.flush()}return d.headers=i,d.query=n,d.body=l,d.method="POST",d}async deserializeResponse(e,t,s){const r=this.deserializer,n=oe.of(e.output),i={};if(s.statusCode>=300){const n=await Z(s.body,t);throw n.byteLength>0&&Object.assign(i,await r.read(15,n)),await this.handleError(e,t,s,i,this.deserializeMetadata(s)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const e in s.headers){const t=s.headers[e];delete s.headers[e],s.headers[e.toLowerCase()]=t}const o=n.getEventStreamMember();if(o)i[o]=await this.deserializeEventStream({response:s,responseSchema:n,initialResponseContainer:i});else{const e=await Z(s.body,t);e.byteLength>0&&Object.assign(i,await r.read(n,e))}return i.$metadata=this.deserializeMetadata(s),i}}function ht(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(5===e.getSchema()||6===e.getSchema()||7===e.getSchema()))return e.getSchema();const{httpLabel:s,httpPrefixHeaders:r,httpHeader:n,httpQuery:i}=e.getMergedTraits();return(t.httpBindings?"string"==typeof r||Boolean(n)?6:Boolean(i)||Boolean(s)?5:void 0:void 0)??t.timestampFormat.default}class mt extends ut{settings;constructor(e){super(),this.settings=e}read(e,t){const s=oe.of(e);if(s.isListSchema())return ot(t).map((e=>this.read(s.getValueSchema(),e)));if(s.isBlobSchema())return(this.serdeContext?.base64Decoder??O)(t);if(s.isTimestampSchema()){switch(ht(s,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC3339 timestamps must be strings");const t=Xe.exec(e);if(!t)throw new TypeError(`Invalid RFC3339 timestamp format ${e}`);const[,s,r,n,i,o,a,,c,u]=t;nt(r,1,12),nt(n,1,31),nt(i,0,23),nt(o,0,59),nt(a,0,60);const l=new Date(Date.UTC(Number(s),Number(r)-1,Number(n),Number(i),Number(o),Number(a),Number(c)?Math.round(1e3*parseFloat(`0.${c}`)):0));if(l.setUTCFullYear(Number(s)),"Z"!=u.toUpperCase()){const[,e,t,s]=/([+-])(\d\d):(\d\d)/.exec(u)||[void 0,"+",0,0],r="-"===e?1:-1;l.setTime(l.getTime()+r*(60*Number(t)*60*1e3+60*Number(s)*1e3))}return l})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC7231 timestamps must be strings.");let t,s,r,n,i,o,a,c;if((c=et.exec(e))?[,t,s,r,n,i,o,a]=c:(c=tt.exec(e))?([,t,s,r,n,i,o,a]=c,r=(Number(r)+1900).toString()):(c=st.exec(e))&&([,s,t,n,i,o,a,r]=c),r&&o){const e=Date.UTC(Number(r),rt.indexOf(s),Number(t),Number(n),Number(i),Number(o),a?Math.round(1e3*parseFloat(`0.${a}`)):0);nt(t,1,31),nt(n,0,23),nt(i,0,59),nt(o,0,60);const c=new Date(e);return c.setUTCFullYear(Number(r)),c}throw new TypeError(`Invalid RFC7231 date-time value ${e}.`)})(t);case 7:return(e=>{if(null==e)return;let t=NaN;if("number"==typeof e)t=e;else if("string"==typeof e){if(!/^-?\d*\.?\d+$/.test(e))throw new TypeError("parseEpochTimestamp - numeric string invalid.");t=Number.parseFloat(e)}else"object"==typeof e&&1===e.tag&&(t=e.value);if(isNaN(t)||Math.abs(t)===1/0)throw new TypeError("Epoch timestamps must be valid finite numbers.");return new Date(Math.round(1e3*t))})(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}}if(s.isStringSchema()){const e=s.getMergedTraits().mediaType;let r=t;if(e){s.getMergedTraits().httpHeader&&(r=this.base64ToUtf8(r));return("application/json"===e||e.endsWith("+json"))&&(r=We.from(r)),r}}return s.isNumericSchema()?Number(t):s.isBigIntegerSchema()?BigInt(t):s.isBigDecimalSchema()?new ct(t,"bigDecimal"):s.isBooleanSchema()?"true"===String(t).toLowerCase():t}base64ToUtf8(e){return(this.serdeContext?.utf8Encoder??L)((this.serdeContext?.base64Decoder??O)(e))}}class gt extends ut{codecDeserializer;stringDeserializer;constructor(e,t){super(),this.codecDeserializer=e,this.stringDeserializer=new mt(t)}setSerdeContext(e){this.stringDeserializer.setSerdeContext(e),this.codecDeserializer.setSerdeContext(e),this.serdeContext=e}read(e,t){const s=oe.of(e),r=s.getMergedTraits(),n=this.serdeContext?.utf8Encoder??L;if(r.httpHeader||r.httpResponseCode)return this.stringDeserializer.read(s,n(t));if(r.httpPayload){if(s.isBlobSchema()){const e=this.serdeContext?.utf8Decoder??D;return"string"==typeof t?e(t):t}if(s.isStringSchema())return"byteLength"in t?n(t):t}return this.codecDeserializer.read(s,t)}}class ft extends ut{settings;stringBuffer="";constructor(e){super(),this.settings=e}write(e,t){const s=oe.of(e);switch(typeof t){case"object":if(null===t)return void(this.stringBuffer="null");if(s.isTimestampSchema()){if(!(t instanceof Date))throw new Error(`@smithy/core/protocols - received non-Date value ${t} when schema expected Date in ${s.getName(!0)}`);switch(ht(s,this.settings)){case 5:this.stringBuffer=t.toISOString().replace(".000Z","Z");break;case 6:this.stringBuffer=Te(t);break;case 7:this.stringBuffer=String(t.getTime()/1e3);break;default:console.warn("Missing timestamp format, using epoch seconds",t),this.stringBuffer=String(t.getTime()/1e3)}return}if(s.isBlobSchema()&&"byteLength"in t)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??k)(t));if(s.isListSchema()&&Array.isArray(t)){let e="";for(const n of t){this.write([s.getValueSchema(),s.getMergedTraits()],n);const t=this.flush();""!==e&&(e+=", "),e+=s.getValueSchema().isTimestampSchema()?t:(((r=t).includes(",")||r.includes('"'))&&(r=`"${r.replace(/"/g,'\\"')}"`),r)}return void(this.stringBuffer=e)}this.stringBuffer=JSON.stringify(t,null,2);break;case"string":const e=s.getMergedTraits().mediaType;let n=t;if(e){if(("application/json"===e||e.endsWith("+json"))&&(n=We.from(n)),s.getMergedTraits().httpHeader)return void(this.stringBuffer=(this.serdeContext?.base64Encoder??k)(n.toString()))}this.stringBuffer=t;break;default:s.isIdempotencyToken()?this.stringBuffer=Ve():this.stringBuffer=String(t)}var r}flush(){const e=this.stringBuffer;return this.stringBuffer="",e}}class yt{codecSerializer;stringSerializer;buffer;constructor(e,t,s=new ft(t)){this.codecSerializer=e,this.stringSerializer=s}setSerdeContext(e){this.codecSerializer.setSerdeContext(e),this.stringSerializer.setSerdeContext(e)}write(e,t){const s=oe.of(e),r=s.getMergedTraits();return r.httpHeader||r.httpLabel||r.httpQuery?(this.stringSerializer.write(s,t),void(this.buffer=this.stringSerializer.flush())):this.codecSerializer.write(s,t)}flush(){if(void 0!==this.buffer){const e=this.buffer;return this.buffer=void 0,e}return this.codecSerializer.flush()}}class St{authSchemes=new Map;constructor(e){for(const[t,s]of Object.entries(e))void 0!==s&&this.authSchemes.set(t,s)}getIdentityProvider(e){return this.authSchemes.get(e)}}class Rt{async sign(e,t,s){return e}}const wt=(Et=3e5,function(e){return Ct(e)&&e.expiration.getTime()-Date.now()<Et});var Et;const Ct=e=>void 0!==e.expiration;function vt(e){const t=v(e.userAgentAppId??undefined),{customUserAgent:s}=e;return Object.assign(e,{customUserAgent:"string"==typeof s?[[s]]:s,userAgentAppId:async()=>{const s=await t();if(!function(e){return void 0===e||"string"==typeof e&&e.length<=50}(s)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof s?t?.warn("userAgentAppId must be a string or undefined."):s.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s}})}class bt{capacity;data=new Map;parameters=[];constructor({size:e,params:t}){this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const s=this.hash(e);if(!1===s)return t();if(!this.data.has(s)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:s,done:r}=e.next();if(this.data.delete(s),r||++t>10)break}}this.data.set(s,t())}return this.data.get(s)}size(){return this.data.size}hash(e){let t="";const{parameters:s}=this;if(0===s.length)return!1;for(const r of s){const s=String(e[r]??"");if(s.includes("|;"))return!1;t+=s+"|;"}return t}}const Tt=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}$"),Pt=e=>Tt.test(e)||e.startsWith("[")&&e.endsWith("]"),It=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),At=(e,t=!1)=>{if(!t)return It.test(e);const s=e.split(".");for(const e of s)if(!At(e))return!1;return!0},xt={},Ot="endpoints";function Dt(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${Dt(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Dt).join(", ")})`:JSON.stringify(e,null,2)}class $t extends Error{constructor(e){super(e),this.name="EndpointError"}}const Lt=(e,t)=>(e=>{const t=e.split("."),s=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new $t(`Path: '${e}' does not end with ']'`);const n=r.slice(t+1,-1);if(Number.isNaN(parseInt(n)))throw new $t(`Invalid array index: '${n}' in path: '${e}'`);0!==t&&s.push(r.slice(0,t)),s.push(n)}else s.push(r)}return s})(t).reduce(((s,r)=>{if("object"!=typeof s)throw new $t(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(s)?s[parseInt(r)]:s[r]}),e),kt={[r.HTTP]:80,[r.HTTPS]:443},Mt={booleanEquals:(e,t)=>e===t,getAttr:Lt,isSet:e=>null!=e,isValidHostLabel:At,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:s,protocol:r="",path:n="",query:i={}}=e,o=new URL(`${r}//${t}${s?`:${s}`:""}${n}`);return o.search=Object.entries(i).map((([e,t])=>`${e}=${t}`)).join("&"),o}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 s=t.href,{host:n,hostname:i,pathname:o,protocol:a,search:c}=t;if(c)return null;const u=a.slice(0,-1);if(!Object.values(r).includes(u))return null;const l=Pt(i);return{scheme:u,authority:`${n}${s.includes(`${n}:${kt[u]}`)||"string"==typeof e&&e.includes(`${n}:${kt[u]}`)?`:${kt[u]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:l}},stringEquals:(e,t)=>e===t,substring:(e,t,s,r)=>t>=s||e.length<s?null:r?e.substring(e.length-s,e.length-t):e.substring(t,s),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},Nt=(e,t)=>{const s=[],r={...t.endpointParams,...t.referenceRecord};let n=0;for(;n<e.length;){const t=e.indexOf("{",n);if(-1===t){s.push(e.slice(n));break}s.push(e.slice(n,t));const i=e.indexOf("}",t);if(-1===i){s.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[i+1]&&(s.push(e.slice(t+1,i)),n=i+2);const o=e.substring(t+1,i);if(o.includes("#")){const[e,t]=o.split("#");s.push(Lt(r[e],t))}else s.push(r[o]);n=i+1}return s.join("")},Ut=(e,t,s)=>{if("string"==typeof e)return Nt(e,s);if(e.fn)return Gt.callFunction(e,s);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,s);throw new $t(`'${t}': ${String(e)} is not a string, function or reference.`)},_t=({fn:e,argv:t},s)=>{const r=t.map((e=>["boolean","number"].includes(typeof e)?e:Gt.evaluateExpression(e,"arg",s))),n=e.split(".");return n[0]in xt&&null!=n[1]?xt[n[0]][n[1]](...r):Mt[e](...r)},Gt={evaluateExpression:Ut,callFunction:_t},Ft=({assign:e,...t},s)=>{if(e&&e in s.referenceRecord)throw new $t(`'${e}' is already defined in Reference Record.`);const r=_t(t,s);return s.logger?.debug?.(`${Ot} evaluateCondition: ${Dt(t)} = ${Dt(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},Bt=(e=[],t)=>{const s={};for(const r of e){const{result:e,toAssign:n}=Ft(r,{...t,referenceRecord:{...t.referenceRecord,...s}});if(!e)return{result:e};n&&(s[n.name]=n.value,t.logger?.debug?.(`${Ot} assign: ${n.name} := ${Dt(n.value)}`))}return{result:!0,referenceRecord:s}},zt=(e,t)=>Object.entries(e).reduce(((e,[s,r])=>({...e,[s]:r.map((e=>{const r=Ut(e,"Header value entry",t);if("string"!=typeof r)throw new $t(`Header '${s}' value '${r}' is not a string`);return r}))})),{}),jt=(e,t)=>Object.entries(e).reduce(((e,[s,r])=>({...e,[s]:qt.getEndpointProperty(r,t)})),{}),Ht=(e,t)=>{if(Array.isArray(e))return e.map((e=>Ht(e,t)));switch(typeof e){case"string":return Nt(e,t);case"object":if(null===e)throw new $t(`Unexpected endpoint property: ${e}`);return qt.getEndpointProperties(e,t);case"boolean":return e;default:throw new $t("Unexpected endpoint property type: "+typeof e)}},qt={getEndpointProperty:Ht,getEndpointProperties:jt},Vt=(e,t)=>{const s=Ut(e,"Endpoint URL",t);if("string"==typeof s)try{return new URL(s)}catch(e){throw console.error(`Failed to construct URL with ${s}`,e),e}throw new $t("Endpoint URL must be a string, got "+typeof s)},Wt=(e,t)=>{const{conditions:s,endpoint:r}=e,{result:n,referenceRecord:i}=Bt(s,t);if(!n)return;const o={...t,referenceRecord:{...t.referenceRecord,...i}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${Ot} Resolving endpoint from template: ${Dt(r)}`),{...null!=u&&{headers:zt(u,o)},...null!=c&&{properties:jt(c,o)},url:Vt(a,o)}},Kt=(e,t)=>{const{conditions:s,error:r}=e,{result:n,referenceRecord:i}=Bt(s,t);if(n)throw new $t(Ut(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...i}}))},Qt=(e,t)=>{for(const s of e)if("endpoint"===s.type){const e=Wt(s,t);if(e)return e}else if("error"===s.type)Kt(s,t);else{if("tree"!==s.type)throw new $t(`Unknown endpoint rule: ${s}`);{const e=Zt.evaluateTreeRule(s,t);if(e)return e}}throw new $t("Rules evaluation failed")},Zt={evaluateRules:Qt,evaluateTreeRule:(e,t)=>{const{conditions:s,rules:r}=e,{result:n,referenceRecord:i}=Bt(s,t);if(n)return Zt.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...i}})}},Yt=(e,t)=>{const{endpointParams:s,logger:r}=t,{parameters:n,rules:i}=e;t.logger?.debug?.(`${Ot} Initial EndpointParams: ${Dt(s)}`);const o=Object.entries(n).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(o.length>0)for(const[e,t]of o)s[e]=s[e]??t;const a=Object.entries(n).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==s[e])throw new $t(`Missing required parameter: '${e}'`);const c=Qt(i,{endpointParams:s,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${Ot} Resolved endpoint: ${Dt(c)}`),c},Jt=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!Jt(t))return!1;return!0}return!!At(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let Xt={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-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const es={isVirtualHostableS3Bucket:Jt,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[s,r,n,i,o,...a]=t;if("arn"!==s||""===r||""===n||""===a.join(":"))return null;return{partition:r,service:n,region:i,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=Xt;for(const s of t){const{regions:t,outputs:r}=s;for(const[s,n]of Object.entries(t))if(s===e)return{...r,...n}}for(const s of t){const{regionRegex:t,outputs:r}=s;if(new RegExp(t).test(e))return{...r}}const s=t.find((e=>"aws"===e.id));if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}}};xt.aws=es;const ts=e=>{if("string"==typeof e)return ts(new URL(e));const{hostname:t,pathname:s,port:r,protocol:n,search:i}=e;let o;return i&&(o=function(e){const t={};if(e=e.replace(/^\?/,""))for(const s of e.split("&")){let[e,r=null]=s.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(i)),{hostname:t,port:r?parseInt(r):void 0,protocol:n,path:s,query:o}};function ss(e,t,s){return e.$source||(e.$source={}),e.$source[t]=s,e}function rs(e,t,s){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]=s}const ns=e=>a.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,is=e=>new Date(Date.now()+e),os=(e,t)=>{const s=Date.parse(e);return((e,t)=>Math.abs(is(t).getTime()-e)>=3e5)(s,t)?s-Date.now():t},as=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class cs{async sign(e,t,s){if(!o.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await(async e=>{const t=as("context",e.context),s=as("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],n=as("signer",s.signer),i=await n(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:c}})(s),{config:n,signer:i}=r;let{signingRegion:a,signingName:c}=r;const u=s.context;if(u?.authSchemes?.length){const[e,t]=u.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(a=t?.signingRegion??a,c=t?.signingName??c)}return await i.sign(e,{signingDate:is(n.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return t=>{const s=t.ServerTime??ns(t.$response);if(s){const r=as("config",e.config),n=r.systemClockOffset;r.systemClockOffset=os(s,r.systemClockOffset);r.systemClockOffset!==n&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const s=ns(e);if(s){const e=as("config",t.config);e.systemClockOffset=os(s,e.systemClockOffset)}}}class us extends Error{name="ProviderError";tryNextLink;constructor(e,t=!0){let s,r=!0;"boolean"==typeof t?(s=void 0,r=t):null!=t&&"object"==typeof t&&(s=t.logger,r=t.tryNextLink??!0),super(e),this.tryNextLink=r,Object.setPrototypeOf(this,us.prototype),s?.debug?.(`@smithy/property-provider ${r?"->":"(!)"} ${e}`)}static from(e,t=!0){return Object.assign(new this(e.message,t),e)}}class ls extends us{name="CredentialsProviderError";constructor(e,t=!0){super(e,t),Object.setPrototypeOf(this,ls.prototype)}}const ds=(e,t,s)=>{let r,n,i,o=!1;return async t=>(i&&!t?.forceRefresh||(r=await(async()=>{n||(n=e());try{r=await n,i=!0,o=!1}finally{n=void 0}return r})()),r)},ps="X-Amz-Date",hs="X-Amz-Signature",ms="X-Amz-Security-Token",gs="authorization",fs=ps.toLowerCase(),ys=[gs,fs,"date"],Ss=hs.toLowerCase(),Rs="x-amz-content-sha256",ws=ms.toLowerCase(),Es={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},Cs=/^proxy-/,vs=/^sec-/,bs="AWS4-HMAC-SHA256",Ts="AWS4-HMAC-SHA256-PAYLOAD",Ps="aws4_request",Is={},As=[],xs=(e,t,s)=>`${e}/${t}/${s}/${Ps}`,Os=(e,t,s)=>{const r=new e(t);return r.update($(s)),r.digest()},Ds=({headers:e},t,s)=>{const r={};for(const n of Object.keys(e).sort()){if(null==e[n])continue;const i=n.toLowerCase();(i in Es||t?.has(i)||Cs.test(i)||vs.test(i))&&(!s||s&&!s.has(i))||(r[i]=e[n].trim().replace(/\s+/g," "))}return r},$s=async({headers:e,body:t},s)=>{for(const t of Object.keys(e))if(t.toLowerCase()===Rs)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||(r=t,"function"==typeof ArrayBuffer&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(r))){const e=new s;return e.update($(t)),V(await e.digest())}var r;return"UNSIGNED-PAYLOAD"};class Ls{format(e){const t=[];for(const s of Object.keys(e)){const r=D(s);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[s]))}const s=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)s.set(e,r),r+=e.byteLength;return s}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 s=new DataView(new ArrayBuffer(5));return s.setUint8(0,4),s.setInt32(1,e.value,!1),new Uint8Array(s.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const n=new DataView(new ArrayBuffer(3+e.value.byteLength));n.setUint8(0,6),n.setUint16(1,e.value.byteLength,!1);const i=new Uint8Array(n.buffer);return i.set(e.value,3),i;case"string":const o=D(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Ns.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Ms.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const l=new Uint8Array(17);return l[0]=9,l.set(function(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 s=0;s<e.length;s+=2){const r=e.slice(s,s+2).toLowerCase();if(!(r in q))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[s/2]=q[r]}return t}(e.value.replace(/\-/g,"")),1),l}}}var ks;!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"}(ks||(ks={}));const Ms=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Ns{bytes;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 s=7,r=Math.abs(Math.round(e));s>-1&&r>0;s--,r/=256)t[s]=r;return e<0&&Us(t),new Ns(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Us(e),parseInt(V(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Us(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const _s=e=>{e=o.clone(e);for(const t of Object.keys(e.headers))ys.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},Gs=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class Fs{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:t,region:s,service:r,sha256:n,uriEscapePath:i=!0}){this.service=r,this.sha256=n,this.uriEscapePath=i,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=g(s),this.credentialProvider=g(t)}createCanonicalRequest(e,t,s){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],s={};for(const r of Object.keys(e)){if(r.toLowerCase()===Ss)continue;const n=U(r);t.push(n);const i=e[r];"string"==typeof i?s[n]=`${n}=${U(i)}`:Array.isArray(i)&&(s[n]=i.slice(0).reduce(((e,t)=>e.concat([`${n}=${U(t)}`])),[]).sort().join("&"))}return t.sort().map((e=>s[e])).filter((e=>e)).join("&")})(e)}\n${r.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${r.join(";")}\n${s}`}async createStringToSign(e,t,s,r){const n=new this.sha256;n.update($(s));return`${r}\n${e}\n${t}\n${V(await n.digest())}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const s of e.split("/"))0!==s?.length&&"."!==s&&(".."===s?t.pop():t.push(s));const s=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return U(s).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=(e=>Gs(e).toISOString().replace(/\.\d{3}Z$/,"Z"))(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class Bs extends Fs{headerFormatter=new Ls;constructor({applyChecksum:e,credentials:t,region:s,service:r,sha256:n,uriEscapePath:i=!0}){super({applyChecksum:e,credentials:t,region:s,service:r,sha256:n,uriEscapePath:i})}async presign(e,t={}){const{signingDate:s=new Date,expiresIn:r=3600,unsignableHeaders:n,unhoistableHeaders:i,signableHeaders:a,hoistableHeaders:c,signingRegion:u,signingService:l}=t,d=await this.credentialProvider();this.validateResolvedCredentials(d);const p=u??await this.regionProvider(),{longDate:h,shortDate:m}=this.formatDate(s);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const g=xs(m,p,l??this.service),f=((e,t={})=>{const{headers:s,query:r={}}=o.clone(e);for(const e of Object.keys(s)){const n=e.toLowerCase();("x-amz-"===n.slice(0,6)&&!t.unhoistableHeaders?.has(n)||t.hoistableHeaders?.has(n))&&(r[e]=s[e],delete s[e])}return{...e,headers:s,query:r}})(_s(e),{unhoistableHeaders:i,hoistableHeaders:c});d.sessionToken&&(f.query[ms]=d.sessionToken),f.query["X-Amz-Algorithm"]=bs,f.query["X-Amz-Credential"]=`${d.accessKeyId}/${g}`,f.query[ps]=h,f.query["X-Amz-Expires"]=r.toString(10);const y=Ds(f,n,a);return f.query["X-Amz-SignedHeaders"]=this.getCanonicalHeaderList(y),f.query[hs]=await this.getSignature(h,g,this.getSigningKey(d,p,m,l),this.createCanonicalRequest(f,y,await $s(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:s=new Date,priorSignature:r,signingRegion:n,signingService:i}){const o=n??await this.regionProvider(),{shortDate:a,longDate:c}=this.formatDate(s),u=xs(a,o,i??this.service),l=await $s({headers:{},body:t},this.sha256),d=new this.sha256;d.update(e);const p=V(await d.digest()),h=[Ts,c,u,r,p,l].join("\n");return this.signString(h,{signingDate:s,signingRegion:o,signingService:i})}async signMessage(e,{signingDate:t=new Date,signingRegion:s,signingService:r}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:s,signingService:r,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:s,signingService:r}={}){const n=await this.credentialProvider();this.validateResolvedCredentials(n);const i=s??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(n,i,o,r));return a.update($(e)),V(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:s,unsignableHeaders:r,signingRegion:n,signingService:i}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=n??await this.regionProvider(),c=_s(e),{longDate:u,shortDate:l}=this.formatDate(t),d=xs(l,a,i??this.service);c.headers[fs]=u,o.sessionToken&&(c.headers[ws]=o.sessionToken);const p=await $s(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const s of Object.keys(t))if(e===s.toLowerCase())return!0;return!1})(Rs,c.headers)&&this.applyChecksum&&(c.headers[Rs]=p);const h=Ds(c,r,s),m=await this.getSignature(u,d,this.getSigningKey(o,a,l,i),this.createCanonicalRequest(c,h,p));return c.headers[gs]=`${bs} Credential=${o.accessKeyId}/${d}, SignedHeaders=${this.getCanonicalHeaderList(h)}, Signature=${m}`,c}async getSignature(e,t,s,r){const n=await this.createStringToSign(e,t,r,bs),i=new this.sha256(await s);return i.update($(n)),V(await i.digest())}getSigningKey(e,t,s,r){return(async(e,t,s,r,n)=>{const i=`${s}:${r}:${n}:${V(await Os(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(i in Is)return Is[i];for(As.push(i);As.length>50;)delete Is[As.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[s,r,n,Ps])o=await Os(e,o,t);return Is[i]=o})(this.sha256,e,s,t,r||this.service)}}const zs=e=>{let t,s=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(n){n&&n!==s&&n!==t&&(r=!0),s=n;const i=function(e,{credentials:t,credentialDefaultProvider:s}){let r;r=t?t?.memoized?t:((e,t,s)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let n,i,o,a=!1;const c=async e=>{i||(i=r(e));try{n=await i,o=!0,a=!1}finally{i=void 0}return n};return void 0===t?async e=>(o&&!e?.forceRefresh||(n=await c(e)),n):async e=>(o&&!e?.forceRefresh||(n=await c(e)),a?n:s(n)?t(n)?(await c(e),n):n:(a=!0,n))})(t,wt,Ct):s?v(s(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")};return r.memoized=!0,r}(e,{credentials:s,credentialDefaultProvider:e.credentialDefaultProvider}),o=function(e,t){if(t.configBound)return t;const s=async s=>t({...s,callerClientConfig:e});return s.memoized=t.memoized,s.configBound=!0,s}(e,i);if(r&&!o.attributed){const e="object"==typeof s&&null!==s;t=async t=>{const s=await o(t);return!e||s.$source&&0!==Object.keys(s.$source).length?s:ss(s,"CREDENTIALS_CODE","e")},t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0}else t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=s;const{signingEscapePath:n=!0,systemClockOffset:i=e.systemClockOffset||0,sha256:o}=e;let a;a=e.signer?v(e.signer):e.regionInfoProvider?()=>v(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([t,s])=>{const{signingRegion:r,signingService:i}=t;e.signingRegion=e.signingRegion||r||s,e.signingName=e.signingName||i||e.serviceId;const a={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:n};return new(e.signerConstructor||Bs)(a)})):async t=>{const s=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await v(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||s,e.signingName=e.signingName||r||e.serviceId;const i={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:n};return new(e.signerConstructor||Bs)(i)};return Object.assign(e,{systemClockOffset:i,signingEscapePath:n,signer:a})};const js="function"==typeof TextEncoder?new TextEncoder:null,Hs=e=>{if("string"==typeof e){if(js)return js.encode(e).byteLength;let t=e.length;for(let s=t-1;s>=0;s--){const r=e.charCodeAt(s);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&s--}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}`)},qs=(e,t)=>{const s=[];if(e&&s.push(e),t)for(const e of t)s.push(e);return s},Vs=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Ws=()=>{let e=[],t=[],s=!1;const r=new Set,n=s=>(e.forEach((e=>{s.add(e.middleware,{...e})})),t.forEach((e=>{s.addRelativeTo(e.middleware,{...e})})),s.identifyOnResolve?.(a.identifyOnResolve()),s),i=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...i(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...i(e))})),t},o=(s=!1)=>{const r=[],n=[],o={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of qs(t.name,t.aliases))o[e]=t;r.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of qs(t.name,t.aliases))o[e]=t;n.push(t)})),n.forEach((e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(s)return;throw new Error(`${e.toMiddleware} is not found when adding ${Vs(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=r,c.sort(((e,t)=>Ks[t.step]-Ks[e.step]||Qs[t.priority||"normal"]-Qs[e.priority||"normal"]))).map(i).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return a},a={add:(t,s={})=>{const{name:n,override:i,aliases:o}=s,a={step:"initialize",priority:"normal",middleware:t,...s},c=qs(n,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!i)throw new Error(`Duplicate middleware name '${Vs(n,o)}'`);for(const t of c){const s=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===s)continue;const r=e[s];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${Vs(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${Vs(n,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(s,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,s)=>{const{name:n,override:i,aliases:o}=s,a={middleware:e,...s},c=qs(n,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!i)throw new Error(`Duplicate middleware name '${Vs(n,o)}'`);for(const e of c){const s=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===s)continue;const r=t[s];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${Vs(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${Vs(n,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(s,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>n(Ws()),use:e=>{e.applyToStack(a)},remove:s=>"string"==typeof s?(s=>{let n=!1;const i=e=>{const t=qs(e.name,e.aliases);if(t.includes(s)){n=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(i),t=t.filter(i),n})(s):(s=>{let n=!1;const i=e=>{if(e.middleware===s){n=!0;for(const t of qs(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(i),t=t.filter(i),n})(s),removeByTag:s=>{let n=!1;const i=e=>{const{tags:t,name:i,aliases:o}=e;if(t&&t.includes(s)){const e=qs(i,o);for(const t of e)r.delete(t);return n=!0,!1}return!0};return e=e.filter(i),t=t.filter(i),n},concat:e=>{const t=n(Ws());return t.use(e),t.identifyOnResolve(s||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:n,identify:()=>o(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return Vs(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(s=e),s),resolve:(e,t)=>{for(const s of o().map((e=>e.middleware)).reverse())e=s(e,t);return s&&console.log(a.identify()),e}};return a},Ks={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Qs={high:3,normal:2,low:1};class Zs{config;middlewareStack=Ws();initConfig;handlers;constructor(e){this.config=e;const{protocol:t,protocolSettings:s}=e;s&&"function"==typeof t&&(e.protocol=new t(s))}send(e,t,s){const r="function"!=typeof t?t:void 0,n="function"==typeof t?t:s;let i;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?i=t.get(e.constructor):(i=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,i))}else delete this.handlers,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!n)return i(e).then((e=>e.output));i(e).then((e=>n(null,e.output)),(e=>n(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const Ys="***SensitiveInformation***";function Js(e,t){if(null==t)return t;const s=oe.of(e);if(s.getMergedTraits().sensitive)return Ys;if(s.isListSchema()){if(!!s.getValueSchema().getMergedTraits().sensitive)return Ys}else if(s.isMapSchema()){if(!!s.getKeySchema().getMergedTraits().sensitive||!!s.getValueSchema().getMergedTraits().sensitive)return Ys}else if(s.isStructSchema()&&"object"==typeof t){const e=t,r={};for(const[t,n]of s.structIterator())null!=e[t]&&(r[t]=Js(n,e[t]));return r}return t}class Xs{middlewareStack=Ws();schema;static classBuilder(){return new er}resolveMiddlewareWithContext(e,t,s,{middlewareFn:r,clientName:n,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:l,CommandCtor:d}){for(const n of r.bind(this)(d,e,t,s))this.middlewareStack.use(n);const p=e.concat(this.middlewareStack),{logger:h}=t,m={logger:h,clientName:n,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[i]:{commandInstance:this,...u},...l},{requestHandler:g}=t;return p.resolve((e=>g.handle(e.request,s||{})),m)}}class er{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,s={}){return this._smithyContext={service:e,operation:t,...s},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}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends Xs{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(s,r,n){const i=e._operationSchema,o=i?.[4]??i?.input,a=i?.[5]??i?.output;return this.resolveMiddlewareWithContext(s,r,n,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(i?Js.bind(null,o):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(i?Js.bind(null,a):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}const tr=(e,t,s)=>{for(const[s,r]of Object.entries(e)){const e=async function(e,t,s){const n=new r(e);if("function"==typeof t)this.send(n,t);else{if("function"!=typeof s)return this.send(n,t);if("object"!=typeof t)throw new Error("Expected http options but got "+typeof t);this.send(n,t||{},s)}},n=(s[0].toLowerCase()+s.slice(1)).replace(/Command$/,"");t.prototype[n]=e}const{paginators:r={},waiters:n={}}=s??{};for(const[e,s]of Object.entries(r))void 0===t.prototype[e]&&(t.prototype[e]=function(e={},t,...r){return s({...t,client:this},e,...r)});for(const[e,s]of Object.entries(n))void 0===t.prototype[e]&&(t.prototype[e]=async function(e={},t,...r){let n=t;return"number"==typeof t&&(n={maxWaitTime:t}),s({...n,client:this},e,...r)})};class sr extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return sr.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===sr?sr.isInstance(e):!!sr.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const rr=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,s])=>{null!=e[t]&&""!==e[t]||(e[t]=s)}));const s=e.message||e.Message||"UnknownError";return e.message=s,delete e.Message,e},nr=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{}}},ir=e=>Object.assign((e=>{const t=[];for(const s in n){const r=n[s];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}})(e),(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}))(e)),or=e=>Object.assign((e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t})(e),(e=>{const t={};return t.retryStrategy=e.retryStrategy(),t})(e)),ar=e=>{const t="#text";for(const s in e)e.hasOwnProperty(s)&&void 0!==e[s][t]?e[s]=e[s][t]:"object"==typeof e[s]&&null!==e[s]&&(e[s]=ar(e[s]));return e};class cr{trace(){}debug(){}info(){}warn(){}error(){}}class ur{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){const s=t.getMemberSchemas(),r=Object.values(s).find((e=>!!e.getMergedTraits().httpPayload));if(r){const t=r.getMergedTraits().mediaType;return t||(r.isStringSchema()?"text/plain":r.isBlobSchema()?"application/octet-stream":e)}if(!t.isUnitSchema()){const t=Object.values(s).find((e=>{const{httpQuery:t,httpQueryParams:s,httpHeader:r,httpLabel:n,httpPrefixHeaders:i}=e.getMergedTraits();return!t&&!s&&!r&&!n&&void 0===i}));if(t)return e}}async getErrorSchemaOrThrowBaseException(e,t,s,r,n,i){let o=t,a=e;e.includes("#")&&([o,a]=e.split("#"));const c={$metadata:n,$fault:s.statusCode<500?"client":"server"},u=le.for(o);try{return{errorSchema:i?.(u,a)??u.getSchema(e),errorMetadata:c}}catch(e){r.message=r.message??r.Message??"UnknownError";const t=le.for("smithy.ts.sdk.synthetic."+o),s=t.getBaseException();if(s){const e=t.getErrorCtor(s)??Error;throw this.decorateServiceException(Object.assign(new e({name:a}),c),r)}throw this.decorateServiceException(Object.assign(new Error(a),c),r)}}decorateServiceException(e,t={}){if(this.queryCompat){const s=e.Message??t.Message,r=rr(e,t);s&&(r.message=s),r.Error={...r.Error,Type:r.Error.Type,Code:r.Error.Code,Message:r.Error.message??r.Error.Message??s};const n=r.$metadata.requestId;return n&&(r.RequestId=n),r}return rr(e,t)}setQueryCompatError(e,t){const s=t.headers?.["x-amzn-query-error"];if(void 0!==e&&null!=s){const[t,r]=s.split(";"),n=Object.entries(e),i={Code:t,Type:r};Object.assign(e,i);for(const[e,t]of n)i["message"===e?"Message":e]=t;delete i.__type,e.Error=i}}queryCompatOutput(e,t){e.Error&&(t.Error=e.Error),e.Type&&(t.Type=e.Type),e.Code&&(t.Code=e.Code)}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch(s){return e.find((e=>oe.of(e).getMergedTraits().awsQueryError?.[0]===t))}}}class lr{serdeContext;setSerdeContext(e){this.serdeContext=e}}class dr{from;to;keys;constructor(e,t){this.from=e,this.to=t,this.keys=new Set(Object.keys(this.from).filter((e=>"__type"!==e)))}mark(e){this.keys.delete(e)}hasUnknown(){return 1===this.keys.size&&0===Object.keys(this.to).length}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}function pr(e,t,s){if(s?.source){const e=s.source;if("number"==typeof t&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||e!==String(t))){return e.includes(".")?new ct(e,"bigDecimal"):BigInt(e)}}return t}const hr=(e,t)=>((e,t)=>Z(e,t).then((e=>(t?.utf8Encoder??L)(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{}})),mr=(e,t)=>{const s=(e,t)=>Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase())),r=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},n=s(e.headers,"x-amzn-errortype");if(void 0!==n)return r(e.headers[n]);if(t&&"object"==typeof t){const e=s(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}};class gr extends lr{settings;constructor(e){super(),this.settings=e}async read(e,t){return this._read(e,"string"==typeof t?JSON.parse(t,pr):await hr(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){const s=null!==t&&"object"==typeof t,r=oe.of(e);if(s){if(r.isStructSchema()){const e=t,s=r.isUnionSchema(),n={};let i;const{jsonName:o}=this.settings;let a;o&&(i={}),s&&(a=new dr(e,n));for(const[t,c]of r.structIterator()){let r=t;o&&(r=c.getMergedTraits().jsonName??r,i[r]=t),s&&a.mark(r),null!=e[r]&&(n[t]=this._read(c,e[r]))}if(s)a.writeUnknown();else if("string"==typeof e.__type)for(const[t,s]of Object.entries(e)){const e=o?i[t]??t:t;e in n||(n[e]=s)}return n}if(Array.isArray(t)&&r.isListSchema()){const e=r.getValueSchema(),s=[],n=!!r.getMergedTraits().sparse;for(const r of t)(n||null!=r)&&s.push(this._read(e,r));return s}if(r.isMapSchema()){const e=r.getValueSchema(),s={},n=!!r.getMergedTraits().sparse;for(const[r,i]of Object.entries(t))(n||null!=i)&&(s[r]=this._read(e,i));return s}}if(r.isBlobSchema()&&"string"==typeof t)return O(t);const n=r.getMergedTraits().mediaType;if(r.isStringSchema()&&"string"==typeof t&&n){return"application/json"===n||n.endsWith("+json")?We.from(t):t}if(r.isTimestampSchema()&&null!=t){switch(ht(r,this.settings)){case 5:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Ae.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[s,r,n,i,o,a,c,u,l]=t,d=we(je(r)),p=Fe(n,"month",1,12),h=Fe(i,"day",1,31),m=Le(d,p,h,{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u});return"Z"!=l.toUpperCase()&&m.setTime(m.getTime()-ze(l)),m})(t);case 6:return(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=xe.exec(e);if(t){const[e,s,r,n,i,o,a,c]=t;return Le(we(je(n)),Ne(r),Fe(s,"day",1,31),{hours:i,minutes:o,seconds:a,fractionalMilliseconds:c})}if(t=Oe.exec(e),t){const[e,s,r,n,i,o,a,c]=t;return Me(Le(ke(n),Ne(r),Fe(s,"day",1,31),{hours:i,minutes:o,seconds:a,fractionalMilliseconds:c}))}if(t=De.exec(e),t){const[e,s,r,n,i,o,a,c]=t;return Le(we(je(c)),Ne(s),Fe(r.trimLeft(),"day",1,31),{hours:n,minutes:i,seconds:o,fractionalMilliseconds:a})}throw new TypeError("Invalid RFC-7231 date-time value")})(t);case 7:return $e(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}}if(r.isBigIntegerSchema()&&("number"==typeof t||"string"==typeof t))return BigInt(t);if(r.isBigDecimalSchema()&&null!=t){if(t instanceof ct)return t;const e=t;return"bigDecimal"===e.type&&"string"in e?new ct(e.string,e.type):new ct(String(t),"bigDecimal")}if(r.isNumericSchema()&&"string"==typeof t){switch(t){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return t}if(r.isDocumentSchema()){if(s){const e=Array.isArray(t)?[]:{};for(const[s,n]of Object.entries(t))e[s]=n instanceof ct?n:this._read(r,n);return e}return structuredClone(t)}return t}}const fr=String.fromCharCode(925);class yr{values=new Map;counter=0;stage=0;createReplacer(){if(1===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(2===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,t)=>{if(t instanceof ct){const e=fr+"nv"+this.counter+++"_"+t.string;return this.values.set(`"${e}"`,t.string),e}if("bigint"==typeof t){const e=t.toString(),s=fr+"b"+this.counter+++"_"+e;return this.values.set(`"${s}"`,e),s}return t}}replaceInJson(e){if(0===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(2===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,0===this.counter)return e;for(const[t,s]of this.values)e=e.replace(t,s);return e}}class Sr extends lr{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,t){this.rootSchema=oe.of(e),this.buffer=this._write(this.rootSchema,t)}writeDiscriminatedDocument(e,t){this.write(e,t),"object"==typeof this.buffer&&(this.buffer.__type=oe.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:t}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!t)return JSON.stringify(this.buffer);const e=new yr;return e.replaceInJson(JSON.stringify(this.buffer,e.createReplacer(),0))}return this.buffer}_write(e,t,s){const r=null!==t&&"object"==typeof t,n=oe.of(e);if(r){if(n.isStructSchema()){const e=t,s={},{jsonName:r}=this.settings;let i;r&&(i={});for(const[t,o]of n.structIterator()){const a=this._write(o,e[t],n);if(void 0!==a){let e=t;r&&(e=o.getMergedTraits().jsonName??t,i[t]=e),s[e]=a}}if(n.isUnionSchema()&&0===Object.keys(s).length){const{$unknown:t}=e;if(Array.isArray(t)){const[e,r]=t;s[e]=this._write(15,r)}}else if("string"==typeof e.__type)for(const[t,n]of Object.entries(e)){const e=r?i[t]??t:t;e in s||(s[e]=this._write(15,n))}return s}if(Array.isArray(t)&&n.isListSchema()){const e=n.getValueSchema(),s=[],r=!!n.getMergedTraits().sparse;for(const n of t)(r||null!=n)&&s.push(this._write(e,n));return s}if(n.isMapSchema()){const e=n.getValueSchema(),s={},r=!!n.getMergedTraits().sparse;for(const[n,i]of Object.entries(t))(r||null!=i)&&(s[n]=this._write(e,i));return s}if(t instanceof Uint8Array&&(n.isBlobSchema()||n.isDocumentSchema()))return n===this.rootSchema?t:(this.serdeContext?.base64Encoder??k)(t);if(t instanceof Date&&(n.isTimestampSchema()||n.isDocumentSchema())){switch(ht(n,this.settings)){case 5:return t.toISOString().replace(".000Z","Z");case 6:return Te(t);case 7:return t.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",t),t.getTime()/1e3}}t instanceof ct&&(this.useReplacer=!0)}if(null!==t||!s?.isStructSchema()){if(n.isStringSchema()){if(void 0===t&&n.isIdempotencyToken())return Ve();const e=n.getMergedTraits().mediaType;if(null!=t&&e){if("application/json"===e||e.endsWith("+json"))return We.from(t)}return t}if("number"==typeof t&&n.isNumericSchema())return Math.abs(t)===1/0||isNaN(t)?String(t):t;if("string"==typeof t&&n.isBlobSchema())return n===this.rootSchema?t:(this.serdeContext?.base64Encoder??k)(t);if("bigint"==typeof t&&(this.useReplacer=!0),n.isDocumentSchema()){if(r){const e=Array.isArray(t)?[]:{};for(const[s,r]of Object.entries(t))r instanceof ct?(this.useReplacer=!0,e[s]=r):e[s]=this._write(n,r);return e}return structuredClone(t)}return t}}}class Rr extends lr{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Sr(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new gr(this.settings);return e.setSerdeContext(this.serdeContext),e}}class wr extends pt{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:s,jsonCodec:r}){super({defaultNamespace:e}),this.serviceTarget=t,this.codec=r??new Rr({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!s,this.mixin=new ur(this.awsQueryCompatible)}async serializeRequest(e,t,s){const r=await super.serializeRequest(e,t,s);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),"unit"!==J(e.input)&&r.body||(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(e,t,s,r,n){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,s);const i=mr(s,r)??"Unknown",{errorSchema:o,errorMetadata:a}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,s,r,n,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=oe.of(o),u=r.message??r.Message??"Unknown",l=new(le.for(o[1]).getErrorCtor(o)??Error)(u),d={};for(const[e,t]of c.structIterator())null!=r[e]&&(d[e]=this.codec.createDeserializer().readObject(t,r[e]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,d),this.mixin.decorateServiceException(Object.assign(l,a,{$fault:c.getMergedTraits().error,message:u},d),r)}}class Er extends wr{constructor({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:s,jsonCodec:r}){super({defaultNamespace:e,serviceTarget:t,awsQueryCompatible:s,jsonCodec:r})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}class Cr extends dt{serializer;deserializer;codec;mixin=new ur;constructor({defaultNamespace:e}){super({defaultNamespace:e});const t={timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=new Rr(t),this.serializer=new yt(this.codec.createSerializer(),t),this.deserializer=new gt(this.codec.createDeserializer(),t)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(e){this.codec.setSerdeContext(e),super.setSerdeContext(e)}async serializeRequest(e,t,s){const r=await super.serializeRequest(e,t,s),n=oe.of(e.input);if(!r.headers["content-type"]){const e=this.mixin.resolveRestContentType(this.getDefaultContentType(),n);e&&(r.headers["content-type"]=e)}return null==r.body&&r.headers["content-type"]===this.getDefaultContentType()&&(r.body="{}"),r}async deserializeResponse(e,t,s){const r=await super.deserializeResponse(e,t,s),n=oe.of(e.output);for(const[e,t]of n.structIterator())t.getMemberTraits().httpPayload&&!(e in r)&&(r[e]=null);return r}async handleError(e,t,s,r,n){const i=mr(s,r)??"Unknown",{errorSchema:o,errorMetadata:a}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,s,r,n),c=oe.of(o),u=r.message??r.Message??"Unknown",l=new(le.for(o[1]).getErrorCtor(o)??Error)(u);await this.deserializeHttpMessage(o,t,s,r);const d={};for(const[e,t]of c.structIterator()){const s=t.getMergedTraits().jsonName??e;d[e]=this.codec.createDeserializer().readObject(t,r[s])}throw this.mixin.decorateServiceException(Object.assign(l,a,{$fault:c.getMergedTraits().error,message:u},d),r)}getDefaultContentType(){return"application/json"}}let vr;class br extends lr{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new mt(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,t,s){const r=oe.of(e),n=r.getMemberSchemas();if(r.isStructSchema()&&r.isMemberSchema()&&!!Object.values(n).find((e=>!!e.getMemberTraits().eventPayload))){const e={},s=Object.keys(n)[0];return n[s].isBlobSchema()?e[s]=t:e[s]=this.read(n[s],t),e}const i=(this.serdeContext?.utf8Encoder??L)(t),o=this.parseXml(i);return this.readSchema(e,s?o[s]:o)}readSchema(e,t){const s=oe.of(e);if(s.isUnitSchema())return;const r=s.getMergedTraits();if(s.isListSchema()&&!Array.isArray(t))return this.readSchema(s,[t]);if(null==t)return t;if("object"==typeof t){const e=!!r.sparse,n=!!r.xmlFlattened;if(s.isListSchema()){const r=s.getValueSchema(),i=[],o=r.getMergedTraits().xmlName??"member",a=n?t:(t[0]??t)[o],c=Array.isArray(a)?a:[a];for(const t of c)(null!=t||e)&&i.push(this.readSchema(r,t));return i}const i={};if(s.isMapSchema()){const r=s.getKeySchema(),o=s.getValueSchema();let a;a=n?Array.isArray(t)?t:[t]:Array.isArray(t.entry)?t.entry:[t.entry];const c=r.getMergedTraits().xmlName??"key",u=o.getMergedTraits().xmlName??"value";for(const t of a){const s=t[c],r=t[u];(null!=r||e)&&(i[s]=this.readSchema(o,r))}return i}if(s.isStructSchema()){const e=s.isUnionSchema();let r;e&&(r=new dr(t,i));for(const[n,o]of s.structIterator()){const s=o.getMergedTraits(),a=s.httpPayload?s.xmlName??o.getName():o.getMemberTraits().xmlName??n;e&&r.mark(a),null!=t[a]&&(i[n]=this.readSchema(o,t[a]))}return e&&r.writeUnknown(),i}if(s.isDocumentSchema())return t;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${s.getName(!0)}`)}return s.isListSchema()?[]:s.isMapSchema()||s.isStructSchema()?{}:this.stringDeserializer.read(s,t)}parseXml(e){if(e.length){let t;try{t=function(e){vr||(vr=new DOMParser);const t=vr.parseFromString(e,"application/xml");if(t.getElementsByTagName("parsererror").length>0)throw new Error("DOMParser XML parsing error.");const s=e=>{if(e.nodeType===Node.TEXT_NODE&&e.textContent?.trim())return e.textContent;if(e.nodeType===Node.ELEMENT_NODE){const t=e;if(0===t.attributes.length&&0===t.childNodes.length)return"";const r={},n=Array.from(t.attributes);for(const e of n)r[`${e.name}`]=e.value;const i=Array.from(t.childNodes);for(const e of i){const o=s(e);if(null!=o){const t=e.nodeName;if(1===i.length&&0===n.length&&"#text"===t)return o;r[t]?Array.isArray(r[t])?r[t].push(o):r[t]=[r[t],o]:r[t]=o}else if(1===i.length&&0===n.length)return t.textContent}return r}return null};return{[t.documentElement.nodeName]:s(t.documentElement)}}(e)}catch(t){throw t&&"object"==typeof t&&Object.defineProperty(t,"$responseBodyText",{value:e}),t}const s="#text",r=Object.keys(t)[0],n=t[r];return n[s]&&(n[r]=n[s],delete n[s]),ar(n)}return{}}}class Tr extends lr{settings;buffer;constructor(e){super(),this.settings=e}write(e,t,s=""){void 0===this.buffer&&(this.buffer="");const r=oe.of(e);if(s&&!s.endsWith(".")&&(s+="."),r.isBlobSchema())("string"==typeof t||t instanceof Uint8Array)&&(this.writeKey(s),this.writeValue((this.serdeContext?.base64Encoder??k)(t)));else if(r.isBooleanSchema()||r.isNumericSchema()||r.isStringSchema())null!=t?(this.writeKey(s),this.writeValue(String(t))):r.isIdempotencyToken()&&(this.writeKey(s),this.writeValue(Ve()));else if(r.isBigIntegerSchema())null!=t&&(this.writeKey(s),this.writeValue(String(t)));else if(r.isBigDecimalSchema())null!=t&&(this.writeKey(s),this.writeValue(t instanceof ct?t.string:String(t)));else if(r.isTimestampSchema()){if(t instanceof Date){this.writeKey(s);switch(ht(r,this.settings)){case 5:this.writeValue(t.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(Te(t));break;case 7:this.writeValue(String(t.getTime()/1e3))}}}else if(r.isDocumentSchema())Array.isArray(t)?this.write(79,t,s):t instanceof Date?this.write(4,t,s):t instanceof Uint8Array?this.write(21,t,s):t&&"object"==typeof t?this.write(143,t,s):(this.writeKey(s),this.writeValue(String(t)));else if(r.isListSchema()){if(Array.isArray(t))if(0===t.length)this.settings.serializeEmptyLists&&(this.writeKey(s),this.writeValue(""));else{const e=r.getValueSchema(),n=this.settings.flattenLists||r.getMergedTraits().xmlFlattened;let i=1;for(const r of t){if(null==r)continue;const t=e.getMergedTraits(),o=this.getKey("member",t.xmlName,t.ec2QueryName),a=n?`${s}${i}`:`${s}${o}.${i}`;this.write(e,r,a),++i}}}else if(r.isMapSchema()){if(t&&"object"==typeof t){const e=r.getKeySchema(),n=r.getValueSchema(),i=r.getMergedTraits().xmlFlattened;let o=1;for(const[r,a]of Object.entries(t)){if(null==a)continue;const t=e.getMergedTraits(),c=this.getKey("key",t.xmlName,t.ec2QueryName),u=i?`${s}${o}.${c}`:`${s}entry.${o}.${c}`,l=n.getMergedTraits(),d=this.getKey("value",l.xmlName,l.ec2QueryName),p=i?`${s}${o}.${d}`:`${s}entry.${o}.${d}`;this.write(e,r,u),this.write(n,a,p),++o}}}else if(r.isStructSchema()){if(t&&"object"==typeof t){let e=!1;for(const[n,i]of r.structIterator()){if(null==t[n]&&!i.isIdempotencyToken())continue;const r=i.getMergedTraits(),o=`${s}${this.getKey(n,r.xmlName,r.ec2QueryName,"struct")}`;this.write(i,t[n],o),e=!0}if(!e&&r.isUnionSchema()){const{$unknown:e}=t;if(Array.isArray(e)){const[t,r]=e,n=`${s}${t}`;this.write(15,r,n)}}}}else if(!r.isUnitSchema())throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${r.getName(!0)}`)}flush(){if(void 0===this.buffer)throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");const e=this.buffer;return delete this.buffer,e}getKey(e,t,s,r){const{ec2:n,capitalizeKeys:i}=this.settings;if(n&&s)return s;const o=t??e;return i&&"struct"===r?o[0].toUpperCase()+o.slice(1):o}writeKey(e){e.endsWith(".")&&(e=e.slice(0,e.length-1)),this.buffer+=`&${Y(e)}=`}writeValue(e){this.buffer+=Y(e)}}class Pr extends pt{options;serializer;deserializer;mixin=new ur;constructor(e){super({defaultNamespace:e.defaultNamespace}),this.options=e;const t={timestampFormat:{useTrait:!0,default:5},httpBindings:!1,xmlNamespace:e.xmlNamespace,serviceNamespace:e.defaultNamespace,serializeEmptyLists:!0};this.serializer=new Tr(t),this.deserializer=new br(t)}getShapeId(){return"aws.protocols#awsQuery"}setSerdeContext(e){this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e)}getPayloadCodec(){throw new Error("AWSQuery protocol has no payload codec.")}async serializeRequest(e,t,s){const r=await super.serializeRequest(e,t,s);r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":"application/x-www-form-urlencoded"}),"unit"!==J(e.input)&&r.body||(r.body="");const n=e.name.split("#")[1]??e.name;return r.body=`Action=${n}&Version=${this.options.version}`+r.body,r.body.endsWith("&")&&(r.body=r.body.slice(-1)),r}async deserializeResponse(e,t,s){const r=this.deserializer,n=oe.of(e.output),i={};if(s.statusCode>=300){const n=await Z(s.body,t);n.byteLength>0&&Object.assign(i,await r.read(15,n)),await this.handleError(e,t,s,i,this.deserializeMetadata(s))}for(const e in s.headers){const t=s.headers[e];delete s.headers[e],s.headers[e.toLowerCase()]=t}const o=e.name.split("#")[1]??e.name,a=n.isStructSchema()&&this.useNestedResult()?o+"Result":void 0,c=await Z(s.body,t);c.byteLength>0&&Object.assign(i,await r.read(n,c,a));return{$metadata:this.deserializeMetadata(s),...i}}useNestedResult(){return!0}async handleError(e,t,s,r,n){const i=this.loadQueryErrorCode(s,r)??"Unknown",o=this.loadQueryError(r),a=this.loadQueryErrorMessage(r);o.message=a,o.Error={Type:o.Type,Code:o.Code,Message:a};const{errorSchema:c,errorMetadata:u}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,s,o,n,this.mixin.findQueryCompatibleError),l=oe.of(c),d=new(le.for(c[1]).getErrorCtor(c)??Error)(a),p={Type:o.Error.Type,Code:o.Error.Code,Error:o.Error};for(const[e,t]of l.structIterator()){const s=t.getMergedTraits().xmlName??e,n=o[s]??r[s];p[e]=this.deserializer.readSchema(t,n)}throw this.mixin.decorateServiceException(Object.assign(d,u,{$fault:l.getMergedTraits().error,message:a},p),r)}loadQueryErrorCode(e,t){const s=(t.Errors?.[0]?.Error??t.Errors?.Error??t.Error)?.Code;return void 0!==s?s:404==e.statusCode?"NotFound":void 0}loadQueryError(e){return e.Errors?.[0]?.Error??e.Errors?.Error??e.Error}loadQueryErrorMessage(e){const t=this.loadQueryError(e);return t?.message??t?.Message??e.message??e.Message??"Unknown"}getDefaultContentType(){return"application/x-www-form-urlencoded"}}const Ir=/\d{12}\.ddb/;const Ar="user-agent",xr="x-amz-user-agent",Or=/[^!$%&'*+\-.^_`|~\w]/g,Dr=/[^!$%&'*+\-.^_`|~\w#]/g;const $r=e=>(t,s)=>async r=>{const{request:n}=r;if(!o.isInstance(n))return t(r);const{headers:i}=n,a=s?.userAgent?.map(Lr)||[],c=(await e.defaultUserAgentProvider()).map(Lr);await async function(e,t,s){const r=s.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&rs(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const s=await t.retryStrategy();"function"==typeof s.acquireInitialRetryToken?s.constructor?.name?.includes("Adaptive")?rs(e,"RETRY_MODE_ADAPTIVE","F"):rs(e,"RETRY_MODE_STANDARD","E"):rs(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const s=e.endpointV2;switch(String(s?.url?.hostname).match(Ir)&&rs(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":rs(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":rs(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":rs(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const t=n;t.accountId&&rs(e,"RESOLVED_ACCOUNT_ID","T");for(const[s,r]of Object.entries(t.$source??{}))rs(e,s,r)}}(s,e,r);const u=s;c.push(`m/${function(e){let t="";for(const s in e){const r=e[s];if(!(t.length+r.length+1<=1024))break;t.length?t+=","+r:t+=r}return t}(Object.assign({},s.__smithy_context?.features,u.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(Lr)||[],d=await e.userAgentAppId();d&&c.push(Lr(["app",`${d}`]));const p=[].concat([...c,...a,...l]).join(" "),h=[...c.filter((e=>e.startsWith("aws-sdk-"))),...l].join(" ");return"browser"!==e.runtime?(h&&(i[xr]=i[xr]?`${i[Ar]} ${h}`:h),i[Ar]=p):i[xr]=p,t({...r,request:n})},Lr=e=>{const t=e[0].split("/").map((e=>e.replace(Or,"-"))).join("/"),s=e[1]?.replace(Dr,"-"),r=t.indexOf("/"),n=t.substring(0,r);let i=t.substring(r+1);return"api"===n&&(i=i.toLowerCase()),[n,i,s].filter((e=>e&&e.length>0)).reduce(((e,t,s)=>{switch(s){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},kr={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Mr=e=>({applyToStack:t=>{t.add($r(e),kr)}}),Nr=!1,Ur=!1,_r=new Set,Gr=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Fr=e=>{const{region:t,useFipsEndpoint:s}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const e=(e=>Gr(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e)("function"==typeof t?await t():t);return((e,t=At)=>{if(_r.has(e)||t(e))_r.add(e);else{if("*"!==e)throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.')}})(e),e},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Gr(e)||("function"!=typeof s?Promise.resolve(!!s):s())}})},Br="content-length";const zr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},jr=e=>({applyToStack:t=>{var s;t.add((s=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(o.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Br))try{const t=s(e);r.headers={...r.headers,[Br]:String(t)}}catch(e){}}return e({...t,request:r})}),zr)}}),Hr=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,qr=/(\d+\.){3}\d+/,Vr=/\.\./,Wr=e=>Hr.test(e)&&!qr.test(e)&&!Vr.test(e),Kr=e=>{const[t,s,r,,,n]=e.split(":"),i="arn"===t&&e.split(":").length>=6,o=Boolean(i&&s&&r&&n);if(i&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},Qr=(e,t,s,r=!1)=>{const n=async()=>{let n;if(r){const r=s.clientContextParams,i=r?.[e];n=i??s[e]??s[t]}else n=s[e]??s[t];return"function"==typeof n?n():n};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof s.credentials?await s.credentials():s.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof s.credentials?await s.credentials():s.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===s.isCustomEndpoint)return;const e=await n();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:s,port:r,path:n}=e;return`${t}//${s}${r?":"+r:""}${n}`}}return e}:n},Zr=async e=>{},Yr=e=>"object"==typeof e?"url"in e?ts(e.url):e:ts(e),Jr=async(e,t,s)=>{const r={},n=t?.getEndpointParameterInstructions?.()||{};for(const[t,i]of Object.entries(n))switch(i.type){case"staticContextParams":r[t]=i.value;break;case"contextParams":r[t]=e[i.name];break;case"clientContextParams":case"builtInParams":r[t]=await Qr(i.name,t,s,"builtInParams"!==i.type)();break;case"operationContextParams":r[t]=i.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}return 0===Object.keys(n).length&&Object.assign(r,s),"s3"===String(s.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Kr(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Wr(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})(r),r},Xr=({config:e,instructions:t})=>(s,r)=>async n=>{e.isCustomEndpoint&&function(e,t,s){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=s}(r,"ENDPOINT_OVERRIDE","N");const i=await(async(e,t,s,r)=>{if(!s.isCustomEndpoint){let e;e=s.serviceConfiguredEndpoint?await s.serviceConfiguredEndpoint():await Zr(s.serviceId),e&&(s.endpoint=()=>Promise.resolve(Yr(e)),s.isCustomEndpoint=!0)}const n=await Jr(e,t,s);if("function"!=typeof s.endpointProvider)throw new Error("config.endpointProvider is not set.");return s.endpointProvider(n,r)})(n.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=i,r.authSchemes=i.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=m(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return s({...n})},en={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},tn=(e,t)=>({applyToStack:s=>{s.addRelativeTo(Xr({config:e,instructions:t}),en)}}),sn=e=>{const t=e.tls??!0,{endpoint:s,useDualstackEndpoint:r,useFipsEndpoint:n}=e,i=null!=s?async()=>Yr(await g(s)()):void 0,o=!!s,a=Object.assign(e,{endpoint:i,tls:t,isCustomEndpoint:o,useDualstackEndpoint:g(r??!1),useFipsEndpoint:g(n??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=Zr(e.serviceId)),c),a};var rn;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(rn||(rn={}));const nn=rn.STANDARD,on=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],an=["TimeoutError","RequestTimeout","RequestTimeoutException"],cn=[500,502,503,504],un=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],ln=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],dn=e=>429===e.$metadata?.httpStatusCode||on.includes(e.name)||1==e.$retryable?.throttling,pn=(e,t=0)=>(e=>void 0!==e?.$retryable)(e)||(e=>e.$metadata?.clockSkewCorrected)(e)||an.includes(e.name)||un.includes(e?.code||"")||ln.includes(e?.code||"")||cn.includes(e.$metadata?.httpStatusCode||0)||(e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)})(e)||void 0!==e.cause&&t<=10&&pn(e.cause,t+1);class hn{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>hn.setTimeoutFn(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(),dn(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 s=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(s)}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 mn=({retryDelay:e,retryCount:t,retryCost:s})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>s});class gn{maxAttempts;mode=rn.STANDARD;capacity=500;retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})();maxAttemptsProvider;constructor(e){this.maxAttempts=e,this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return mn({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const s=await this.getMaxAttempts();if(this.shouldRetry(e,t,s)){const s=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===s?500:100);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),n=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,i=this.getCapacityCost(s);return this.capacity-=i,mn({retryDelay:n,retryCount:e.getRetryCount()+1,retryCost:i})}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,s){return e.getRetryCount()+1<s&&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 fn{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=rn.ADAPTIVE;constructor(e,t){this.maxAttemptsProvider=e;const{rateLimiter:s}=t??{};this.rateLimiter=s??new hn,this.standardRetryStrategy=new gn(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)}}const yn=e=>{const{retryStrategy:t,retryMode:s,maxAttempts:r}=e,n=g(r??3);return Object.assign(e,{maxAttempts:n,retryStrategy:async()=>{if(t)return t;return await g(s)()===rn.ADAPTIVE?new fn(n):new gn(n)}})},Sn=e=>e?.body instanceof ReadableStream,Rn=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,wn=e=>{const t={error:e,errorType:En(e)},s=bn(e.$response);return s&&(t.retryAfterHint=s),t},En=e=>dn(e)?"THROTTLING":pn(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!pn(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Cn={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},vn=e=>({applyToStack:t=>{t.add((e=>(t,s)=>async r=>{let n=await e.retryStrategy();const i=await e.maxAttempts();if(!Rn(n))return n?.mode&&(s.userAgent=[...s.userAgent||[],["cfg/retry-mode",n.mode]]),n.retry(t,r);{let e=await n.acquireInitialRetryToken(s.partition_id),c=new Error,u=0,l=0;const{request:d}=r,p=o.isInstance(d);for(p&&(d.headers["amz-sdk-invocation-id"]=Ve());;)try{p&&(d.headers["amz-sdk-request"]=`attempt=${u+1}; max=${i}`);const{response:s,output:o}=await t(r);return n.recordSuccess(e),o.$metadata.attempts=u+1,o.$metadata.totalRetryDelay=l,{response:s,output:o}}catch(t){const r=wn(t);if(c=(a=t)instanceof Error?a:a instanceof Object?Object.assign(new Error,a):"string"==typeof a?new Error(a):new Error(`AWS SDK error wrapper for ${a}`),p&&Sn(d))throw(s.logger instanceof cr?console:s.logger)?.warn("An error was encountered in a non-retryable streaming request."),c;try{e=await n.refreshRetryTokenForRetry(e,r)}catch(e){throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=u+1,c.$metadata.totalRetryDelay=l,c}u=e.getRetryCount();const i=e.getRetryDelay();l+=i,await new Promise((e=>setTimeout(e,i)))}}var a})(e),Cn)}}),bn=e=>{if(!a.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const s=e.headers[t],r=Number(s);if(!Number.isNaN(r))return new Date(1e3*r);return new Date(s)},Tn=async(e,t,s)=>({operation:m(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Pn=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},In={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var An="3.992.0";var xn="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function On(e){return e instanceof Uint8Array?e:"string"==typeof e?xn(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Dn(e){return"string"==typeof e?0===e.length:0===e.byteLength}var $n={name:"SHA-256"},Ln={name:"HMAC",hash:$n},kn=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 Mn={};function Nn(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:Mn}var Un=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!Dn(e)){var t=On(e),s=new Uint8Array(this.toHash.byteLength+t.byteLength);s.set(this.toHash,0),s.set(t,this.toHash.byteLength),this.toHash=s}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return Nn().crypto.subtle.sign(Ln,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):Dn(this.toHash)?Promise.resolve(kn):Promise.resolve().then((function(){return Nn().crypto.subtle.digest($n,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,s){Nn().crypto.subtle.importKey("raw",On(e.secret),Ln,!1,["sign"]).then(t,s)})),this.key.catch((function(){})))},e}();function _n(e,t,s,r){return new(s||(s=Promise))((function(n,i){function o(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof s?t:new s((function(e){e(t)}))).then(o,a)}c((r=r.apply(e,t||[])).next())}))}function Gn(e,t){var s,r,n,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(i=0)),i;)try{if(s=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(6===a[0]&&i.label<n[1]){i.label=n[1],n=a;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(a);break}n[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{s=n=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 Fn=64,Bn=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]),zn=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],jn=Math.pow(2,53)-1,Hn=function(){function e(){this.state=Int32Array.from(zn),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,s=e.byteLength;if(this.bytesHashed+=s,8*this.bytesHashed>jn)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;s>0;)this.buffer[this.bufferLength++]=e[t++],s--,this.bufferLength===Fn&&(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),s=this.bufferLength;if(t.setUint8(this.bufferLength++,128),s%Fn>=56){for(var r=this.bufferLength;r<Fn;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<56;r++)t.setUint8(r,0);t.setUint32(56,Math.floor(e/4294967296),!0),t.setUint32(60,e),this.hashBuffer(),this.finished=!0}var n=new Uint8Array(32);for(r=0;r<8;r++)n[4*r]=this.state[r]>>>24&255,n[4*r+1]=this.state[r]>>>16&255,n[4*r+2]=this.state[r]>>>8&255,n[4*r+3]=this.state[r]>>>0&255;return n},e.prototype.hashBuffer=function(){for(var e=this.buffer,t=this.state,s=t[0],r=t[1],n=t[2],i=t[3],o=t[4],a=t[5],c=t[6],u=t[7],l=0;l<Fn;l++){if(l<16)this.temp[l]=(255&e[4*l])<<24|(255&e[4*l+1])<<16|(255&e[4*l+2])<<8|255&e[4*l+3];else{var d=this.temp[l-2],p=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,h=((d=this.temp[l-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[l]=(p+this.temp[l-7]|0)+(h+this.temp[l-16]|0)}var m=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&a^~o&c)|0)+(u+(Bn[l]+this.temp[l]|0)|0)|0,g=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&r^s&n^r&n)|0;u=c,c=a,a=o,o=i+m|0,i=n,n=r,r=s,s=m+g|0}t[0]+=s,t[1]+=r,t[2]+=n,t[3]+=i,t[4]+=o,t[5]+=a,t[6]+=c,t[7]+=u},e}(),qn=function(){function e(e){this.secret=e,this.hash=new Hn,this.reset()}return e.prototype.update=function(e){if(!Dn(e)&&!this.error)try{this.hash.update(On(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 _n(this,void 0,void 0,(function(){return Gn(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new Hn,this.secret){this.outer=new Hn;var e=function(e){var t=On(e);if(t.byteLength>Fn){var s=new Hn;s.update(t),t=s.digest()}var r=new Uint8Array(Fn);return r.set(t),r}(this.secret),t=new Uint8Array(Fn);t.set(e);for(var s=0;s<Fn;s++)e[s]^=54,t[s]^=92;this.hash.update(e),this.outer.update(t);for(s=0;s<e.byteLength;s++)e[s]=0}},e}();var Vn=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function Wn(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&&Vn.every((function(t){return"function"==typeof e[t]}))}(e.crypto.subtle)}var Kn=function(){function e(e){Wn(Nn())?this.hash=new Un(e):this.hash=new qn(e)}return e.prototype.update=function(e,t){this.hash.update(On(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();const Qn=({serviceId:e,clientVersion:t})=>async s=>{const r="undefined"!=typeof window?window.navigator:void 0,n=r?.userAgent??"",i=r?.userAgentData?.platform??Zn.os(n)??"other",o=r?.userAgentData?.brands??[],a=o[o.length-1],c=a?.brand??Zn.browser(n)??"unknown",u=[["aws-sdk-js",t],["ua","2.1"],[`os/${i}`,undefined],["lang/js"],["md/browser",`${c}_${a?.version??"unknown"}`]];e&&u.push([`api/${e}`,t]);const l=await(s?.userAgentAppId?.());return l&&u.push([`app/${l}`]),u},Zn={os:e=>/iPhone|iPad|iPod/.test(e)?"iOS":/Macintosh|Mac OS X/.test(e)?"macOS":/Windows NT/.test(e)?"Windows":/Android/.test(e)?"Android":/Linux/.test(e)?"Linux":void 0,browser:e=>/EdgiOS|EdgA|Edg\//.test(e)?"Microsoft Edge":/Firefox\//.test(e)?"Firefox":/Chrome\//.test(e)?"Chrome":/Safari\//.test(e)?"Safari":void 0},Yn=e=>()=>Promise.reject(e),Jn=["in-region","cross-region","mobile","standard","legacy"],Xn=({defaultsMode:e}={})=>ds((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(ei()?"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 ${Jn.join(", ")}, got ${t}`)}})),ei=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:s,downlink:r}=e?.connection;if("string"==typeof t&&"4g"!==t||Number(s)>100||Number(r)<10)return!0}return e?.userAgentData?.mobile||"number"==typeof e?.maxTouchPoints&&e?.maxTouchPoints>1},ti=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!ti(t))return!1;return!0}return!!At(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let si={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-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const ri={isVirtualHostableS3Bucket:ti,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[s,r,n,i,o,...a]=t;if("arn"!==s||""===r||""===n||""===a.join(":"))return null;return{partition:r,service:n,region:i,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=si;for(const s of t){const{regions:t,outputs:r}=s;for(const[s,n]of Object.entries(t))if(s===e)return{...r,...n}}for(const s of t){const{regionRegex:t,outputs:r}=s;if(new RegExp(t).test(e))return{...r}}const s=t.find((e=>"aws"===e.id));if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}}};xt.aws=ri;const ni="required",ii="fn",oi="argv",ai="ref",ci=!0,ui="isSet",li="booleanEquals",di="error",pi="endpoint",hi="tree",mi="PartitionResult",gi={[ni]:!1,type:"string"},fi={[ni]:!0,default:!1,type:"boolean"},yi={[ai]:"Endpoint"},Si={[ii]:li,[oi]:[{[ai]:"UseFIPS"},!0]},Ri={[ii]:li,[oi]:[{[ai]:"UseDualStack"},!0]},wi={},Ei={[ii]:"getAttr",[oi]:[{[ai]:mi},"supportsFIPS"]},Ci={[ii]:li,[oi]:[!0,{[ii]:"getAttr",[oi]:[{[ai]:mi},"supportsDualStack"]}]},vi=[Si],bi=[Ri],Ti=[{[ai]:"Region"}],Pi={parameters:{Region:gi,UseDualStack:fi,UseFIPS:fi,Endpoint:gi},rules:[{conditions:[{[ii]:ui,[oi]:[yi]}],rules:[{conditions:vi,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:di},{conditions:bi,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:di},{endpoint:{url:yi,properties:wi,headers:wi},type:pi}],type:hi},{conditions:[{[ii]:ui,[oi]:Ti}],rules:[{conditions:[{[ii]:"aws.partition",[oi]:Ti,assign:mi}],rules:[{conditions:[Si,Ri],rules:[{conditions:[{[ii]:li,[oi]:[ci,Ei]},Ci],rules:[{endpoint:{url:"https://geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:wi,headers:wi},type:pi}],type:hi},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:di}],type:hi},{conditions:vi,rules:[{conditions:[{[ii]:li,[oi]:[Ei,ci]}],rules:[{endpoint:{url:"https://geo-fips.{Region}.{PartitionResult#dnsSuffix}",properties:wi,headers:wi},type:pi}],type:hi},{error:"FIPS is enabled but this partition does not support FIPS",type:di}],type:hi},{conditions:bi,rules:[{conditions:[Ci],rules:[{endpoint:{url:"https://geo.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:wi,headers:wi},type:pi}],type:hi},{error:"DualStack is enabled but this partition does not support DualStack",type:di}],type:hi},{endpoint:{url:"https://geo.{Region}.{PartitionResult#dnsSuffix}",properties:wi,headers:wi},type:pi}],type:hi}],type:hi},{error:"Invalid Configuration: Missing Region",type:di}]},Ii=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Ai=(e,t={})=>Ii.get(e,(()=>Yt(Pi,{endpointParams:e,logger:t.logger})));xt.aws=ri;class xi extends sr{constructor(e){super(e),Object.setPrototypeOf(this,xi.prototype)}}let Oi=class e extends xi{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class Di extends xi{name="ConflictException";$fault="client";Message;constructor(e){super({name:"ConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,Di.prototype),this.Message=e.Message}}let $i=class e extends xi{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};class Li extends xi{name="ServiceQuotaExceededException";$fault="client";Message;constructor(e){super({name:"ServiceQuotaExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Li.prototype),this.Message=e.Message}}let ki=class e extends xi{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Mi=class e extends xi{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}},Ni=class e extends xi{name="ResourceNotFoundException";$fault="client";Message;constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};const Ui="Accuracy",_i="AvoidFerries",Gi="AvoidTolls",Fi="Blob",Bi="BiasPosition",zi="Code",ji="ConsumerArn",Hi="CalculatorArn",qi="CollectionArn",Vi="Cache-Control",Wi="CacheControl",Ki="CellId",Qi="CustomLayers",Zi="CarModeOptions",Yi="CollectionName",Ji="CalculatorName",Xi="CellSignals",eo="CreateTime",to="Content-Type",so="ContentType",ro="Categories",no="Circle",io="Configuration",oo="Distance",ao="DeviceId",co="DeviceIds",uo="DepartNow",lo="DevicePositions",po="DataSource",ho="DataSourceConfiguration",mo="DeviceState",go="DurationSeconds",fo="DepartureTime",yo="DistanceUnit",So="Description",Ro="Error",wo="EventBridgeEnabled",Eo="EndPosition",Co="ExpireTime",vo="Earfcn",bo="Entries",To="Errors",Po="FilterBBox",Io="FilterCountries",Ao="FilterCategories",xo="Geometry",Oo="GeofenceId",Do="GeofenceProperties",$o="IndexArn",Lo="IndexName",ko="InferredState",Mo="Key",No="KeyArn",Uo="KmsKeyEnableGeospatialQueries",_o="KmsKeyId",Go="KeyName",Fo="LteCellDetails",Bo="LineString",zo="Language",jo="Message",Ho="MapArn",qo="MapName",Vo="MaxResults",Wo="NoExpiry",Ko="NextToken",Qo="Name",Zo="PositionFiltering",Yo="PlaceId",Jo="PricingPlan",Xo="PricingPlanDataSource",ea="PositionProperties",ta="PoliticalView",sa="Place",ra="Position",na="Polygon",ia="ResourceArn",oa="RouteMatrix",aa="ReceivedTime",ca="Restrictions",ua="Results",la="Rsrp",da="Rsrq",pa="SupplementalCategories",ha="StartPosition",ma="SampleTime",ga="SpeedUnit",fa="Status",ya="Summary",Sa="TrackerArn",Ra="TravelMode",wa="TruckModeOptions",Ea="TrackerName",Ca="TimeZone",va="Tags",ba="Text",Ta="UpdateTime",Pa="Unit",Ia="client",Aa="error",xa="endpoint",Oa="http",Da="httpError",$a="httpHeader",La="httpQuery",ka="jsonName",Ma="key",Na="message",Ua="smithy.ts.sdk.synthetic.com.amazonaws.location",_a="com.amazonaws.location",Ga=le.for(Ua);var Fa=[-3,Ua,"LocationServiceException",0,[],[]];Ga.registerError(Fa,xi);const Ba=le.for(_a);var za=[-3,_a,"AccessDeniedException",{[Aa]:Ia,[Da]:403},[jo],[[0,{[ka]:Na}]],1];Ba.registerError(za,Oi);var ja=[-3,_a,"ConflictException",{[Aa]:Ia,[Da]:409},[jo],[[0,{[ka]:Na}]],1];Ba.registerError(ja,Di);var Ha=[-3,_a,"InternalServerException",{[Aa]:"server",[Da]:500},[jo],[[0,{[ka]:Na}]],1];Ba.registerError(Ha,$i);var qa=[-3,_a,"ResourceNotFoundException",{[Aa]:Ia,[Da]:404},[jo],[[0,{[ka]:Na}]],1];Ba.registerError(qa,Ni);var Va=[-3,_a,"ServiceQuotaExceededException",{[Aa]:Ia,[Da]:402},[jo],[[0,{[ka]:Na}]],1];Ba.registerError(Va,Li);var Wa=[-3,_a,"ThrottlingException",{[Aa]:Ia,[Da]:429},[jo],[[0,{[ka]:Na}]],1];Ba.registerError(Wa,ki);var Ka=[-3,_a,"ValidationException",{[Aa]:Ia,[Da]:400},[jo,"Reason","FieldList"],[[0,{[ka]:Na}],[0,{[ka]:"reason"}],[()=>gp,{[ka]:"fieldList"}]],3];Ba.registerError(Ka,Mi);const Qa=[Ga,Ba];var Za=[0,_a,"ApiKey",8,0],Ya=[0,_a,"Base64EncodedGeobuf",8,21],Ja=[0,_a,"CountryCode3",8,0],Xa=[0,_a,"CountryCode3OrEmpty",8,0],ec=[0,_a,"PlaceCategory",8,0],tc=[0,_a,Yo,8,0],sc=[0,_a,"PlaceSupplementalCategory",8,0],rc=[0,_a,"RefererPattern",8,0],nc=[0,_a,"SensitiveBoolean",8,2],ic=[0,_a,"SensitiveDouble",8,1],oc=[0,_a,"SensitiveInteger",8,1],ac=[0,_a,"SensitiveString",8,0],cc=[0,_a,"Timestamp",8,5],uc=[3,_a,"AndroidApp",0,["Package","CertificateFingerprint"],[0,0],2],lc=[3,_a,"ApiKeyFilter",0,["KeyStatus"],[0]],dc=[3,_a,"ApiKeyRestrictions",0,["AllowActions","AllowResources","AllowReferers","AllowAndroidApps","AllowAppleApps"],[64,64,[()=>cp,0],()=>Id,()=>Ad],2],pc=[3,_a,"AppleApp",0,["BundleId"],[0],1],hc=[3,_a,"AssociateTrackerConsumerRequest",0,[Ea,ji],[[0,1],0],2],mc=[3,_a,"AssociateTrackerConsumerResponse",0,[],[]],gc=[3,_a,"BatchDeleteDevicePositionHistoryError",0,[ao,Ro],[0,()=>Ic],2],fc=[3,_a,"BatchDeleteDevicePositionHistoryRequest",0,[Ea,co],[[0,1],64],2],yc=[3,_a,"BatchDeleteDevicePositionHistoryResponse",0,[To],[()=>xd],1],Sc=[3,_a,"BatchDeleteGeofenceError",0,[Oo,Ro],[0,()=>Ic],2],Rc=[3,_a,"BatchDeleteGeofenceRequest",0,[Yi,"GeofenceIds"],[[0,1],64],2],wc=[3,_a,"BatchDeleteGeofenceResponse",0,[To],[()=>Od],1],Ec=[3,_a,"BatchEvaluateGeofencesError",0,[ao,ma,Ro],[0,[()=>cc,0],()=>Ic],3],Cc=[3,_a,"BatchEvaluateGeofencesRequest",0,[Yi,"DevicePositionUpdates"],[[0,1],[()=>Fd,0]],2],vc=[3,_a,"BatchEvaluateGeofencesResponse",0,[To],[[()=>Dd,0]],1],bc=[3,_a,"BatchGetDevicePositionError",0,[ao,Ro],[0,()=>Ic],2],Tc=[3,_a,"BatchGetDevicePositionRequest",0,[Ea,co],[[0,1],64],2],Pc=[3,_a,"BatchGetDevicePositionResponse",0,[To,lo],[()=>$d,[()=>Gd,0]],2],Ic=[3,_a,"BatchItemError",0,[zi,jo],[0,0]],Ac=[3,_a,"BatchPutGeofenceError",0,[Oo,Ro],[0,()=>Ic],2],xc=[3,_a,"BatchPutGeofenceRequest",0,[Yi,bo],[[0,1],[()=>kd,0]],2],Oc=[3,_a,"BatchPutGeofenceRequestEntry",0,[Oo,xo,Do],[0,[()=>_u,0],[()=>Rp,0]],2],Dc=[3,_a,"BatchPutGeofenceResponse",0,["Successes",To],[[()=>Md,0],()=>Ld],2],$c=[3,_a,"BatchPutGeofenceSuccess",0,[Oo,eo,Ta],[0,[()=>cc,0],[()=>cc,0]],3],Lc=[3,_a,"BatchUpdateDevicePositionError",0,[ao,ma,Ro],[0,[()=>cc,0],()=>Ic],3],kc=[3,_a,"BatchUpdateDevicePositionRequest",0,[Ea,"Updates"],[[0,1],[()=>Fd,0]],2],Mc=[3,_a,"BatchUpdateDevicePositionResponse",0,[To],[[()=>Nd,0]],1],Nc=[3,_a,"CalculateRouteCarModeOptions",0,[_i,Gi],[[()=>nc,0],[()=>nc,0]]],Uc=[3,_a,"CalculateRouteMatrixRequest",0,[Ji,"DeparturePositions","DestinationPositions",Ra,fo,uo,yo,Zi,wa,Mo],[[0,1],[()=>ap,0],[()=>ap,0],0,[()=>cc,0],[()=>nc,0],0,[()=>Nc,0],[()=>jc,0],[()=>Za,{[La]:Ma}]],3],_c=[3,_a,"CalculateRouteMatrixResponse",0,[oa,ya,"SnappedDeparturePositions","SnappedDestinationPositions"],[[()=>up,0],()=>Gc,[()=>ap,0],[()=>ap,0]],2],Gc=[3,_a,"CalculateRouteMatrixSummary",0,[po,"RouteCount","ErrorCount",yo],[0,1,1,0],4],Fc=[3,_a,"CalculateRouteRequest",0,[Ji,"DeparturePosition","DestinationPosition","WaypointPositions",Ra,fo,uo,yo,"IncludeLegGeometry",Zi,wa,"ArrivalTime","OptimizeFor",Mo],[[0,1],[()=>op,0],[()=>op,0],[()=>fp,0],0,[()=>cc,0],[()=>nc,0],0,[()=>nc,0],[()=>Nc,0],[()=>jc,0],[()=>cc,0],0,[()=>Za,{[La]:Ma}]],3],Bc=[3,_a,"CalculateRouteResponse",0,["Legs",ya],[[()=>jd,0],[()=>zc,0]],2],zc=[3,_a,"CalculateRouteSummary",0,["RouteBBox",po,oo,go,yo],[[()=>Ud,0],0,[()=>ic,0],[()=>ic,0],0],5],jc=[3,_a,"CalculateRouteTruckModeOptions",0,[_i,Gi,"Dimensions","Weight"],[[()=>nc,0],[()=>nc,0],[()=>ad,0],[()=>cd,0]]],Hc=[3,_a,Xi,0,[Fo],[()=>tp],1],qc=[3,_a,no,8,["Center","Radius"],[[()=>op,0],[()=>ic,0]],2],Vc=[3,_a,"CreateGeofenceCollectionRequest",0,[Yi,Jo,Xo,So,va,_o],[0,0,0,0,128,0],1],Wc=[3,_a,"CreateGeofenceCollectionResponse",0,[Yi,qi,eo],[0,0,[()=>cc,0]],3],Kc=[3,_a,"CreateKeyRequest",0,[Go,ca,So,Co,Wo,va],[0,[()=>dc,0],0,[()=>cc,0],2,128],2],Qc=[3,_a,"CreateKeyResponse",0,[Mo,No,Go,eo],[[()=>Za,0],0,0,[()=>cc,0]],4],Zc=[3,_a,"CreateMapRequest",0,[qo,io,Jo,So,va],[0,[()=>Ml,0],0,0,128],2],Yc=[3,_a,"CreateMapResponse",0,[qo,Ho,eo],[0,0,[()=>cc,0]],3],Jc=[3,_a,"CreatePlaceIndexRequest",0,[Lo,po,Jo,So,ho,va],[0,0,0,0,()=>nu,128],2],Xc=[3,_a,"CreatePlaceIndexResponse",0,[Lo,$o,eo],[0,0,[()=>cc,0]],3],eu=[3,_a,"CreateRouteCalculatorRequest",0,[Ji,po,Jo,So,va],[0,0,0,0,128],2],tu=[3,_a,"CreateRouteCalculatorResponse",0,[Ji,Hi,eo],[0,0,[()=>cc,0]],3],su=[3,_a,"CreateTrackerRequest",0,[Ea,Jo,_o,Xo,So,va,Zo,wo,Uo],[0,0,0,0,0,128,0,2,2],1],ru=[3,_a,"CreateTrackerResponse",0,[Ea,Sa,eo],[0,0,[()=>cc,0]],3],nu=[3,_a,ho,0,["IntendedUse"],[0]],iu=[3,_a,"DeleteGeofenceCollectionRequest",0,[Yi],[[0,1]],1],ou=[3,_a,"DeleteGeofenceCollectionResponse",0,[],[]],au=[3,_a,"DeleteKeyRequest",0,[Go,"ForceDelete"],[[0,1],[2,{[La]:"forceDelete"}]],1],cu=[3,_a,"DeleteKeyResponse",0,[],[]],uu=[3,_a,"DeleteMapRequest",0,[qo],[[0,1]],1],lu=[3,_a,"DeleteMapResponse",0,[],[]],du=[3,_a,"DeletePlaceIndexRequest",0,[Lo],[[0,1]],1],pu=[3,_a,"DeletePlaceIndexResponse",0,[],[]],hu=[3,_a,"DeleteRouteCalculatorRequest",0,[Ji],[[0,1]],1],mu=[3,_a,"DeleteRouteCalculatorResponse",0,[],[]],gu=[3,_a,"DeleteTrackerRequest",0,[Ea],[[0,1]],1],fu=[3,_a,"DeleteTrackerResponse",0,[],[]],yu=[3,_a,"DescribeGeofenceCollectionRequest",0,[Yi],[[0,1]],1],Su=[3,_a,"DescribeGeofenceCollectionResponse",0,[Yi,qi,So,eo,Ta,Jo,Xo,_o,va,"GeofenceCount"],[0,0,0,[()=>cc,0],[()=>cc,0],0,0,0,128,1],5],Ru=[3,_a,"DescribeKeyRequest",0,[Go],[[0,1]],1],wu=[3,_a,"DescribeKeyResponse",0,[Mo,No,Go,ca,eo,Co,Ta,So,va],[[()=>Za,0],0,0,[()=>dc,0],[()=>cc,0],[()=>cc,0],[()=>cc,0],0,128],7],Eu=[3,_a,"DescribeMapRequest",0,[qo],[[0,1]],1],Cu=[3,_a,"DescribeMapResponse",0,[qo,Ho,po,io,So,eo,Ta,Jo,va],[0,0,0,[()=>Ml,0],0,[()=>cc,0],[()=>cc,0],0,128],7],vu=[3,_a,"DescribePlaceIndexRequest",0,[Lo],[[0,1]],1],bu=[3,_a,"DescribePlaceIndexResponse",0,[Lo,$o,So,eo,Ta,po,ho,Jo,va],[0,0,0,[()=>cc,0],[()=>cc,0],0,()=>nu,0,128],7],Tu=[3,_a,"DescribeRouteCalculatorRequest",0,[Ji],[[0,1]],1],Pu=[3,_a,"DescribeRouteCalculatorResponse",0,[Ji,Hi,So,eo,Ta,po,Jo,va],[0,0,0,[()=>cc,0],[()=>cc,0],0,0,128],6],Iu=[3,_a,"DescribeTrackerRequest",0,[Ea],[[0,1]],1],Au=[3,_a,"DescribeTrackerResponse",0,[Ea,Sa,So,eo,Ta,Jo,Xo,va,_o,Zo,wo,Uo],[0,0,0,[()=>cc,0],[()=>cc,0],0,0,128,0,0,2,2],5],xu=[3,_a,"DevicePosition",0,[ma,aa,ra,ao,Ui,ea],[[()=>cc,0],[()=>cc,0],[()=>op,0],0,[()=>Gl,0],[()=>Sp,0]],3],Ou=[3,_a,"DevicePositionUpdate",0,[ao,ma,ra,Ui,ea],[0,[()=>cc,0],[()=>op,0],[()=>Gl,0],[()=>Sp,0]],3],Du=[3,_a,mo,0,[ao,ma,ra,Ui,"Ipv4Address","WiFiAccessPoints",Xi],[0,[()=>cc,0],[()=>op,0],[()=>Gl,0],0,()=>yp,()=>Hc],3],$u=[3,_a,"DisassociateTrackerConsumerRequest",0,[Ea,ji],[[0,1],[0,1]],2],Lu=[3,_a,"DisassociateTrackerConsumerResponse",0,[],[]],ku=[3,_a,"ForecastedEvent",0,["EventId",Oo,"IsDeviceInGeofence","NearestDistance","EventType","ForecastedBreachTime",Do],[0,0,2,1,0,[()=>cc,0],[()=>Rp,0]],5],Mu=[3,_a,"ForecastGeofenceEventsDeviceState",0,[ra,"Speed"],[[()=>op,0],1],1],Nu=[3,_a,"ForecastGeofenceEventsRequest",0,[Yi,mo,"TimeHorizonMinutes",yo,ga,Ko,Vo],[[0,1],[()=>Mu,0],1,0,0,0,1],2],Uu=[3,_a,"ForecastGeofenceEventsResponse",0,["ForecastedEvents",yo,ga,Ko],[[()=>zd,0],0,0,0],3],_u=[3,_a,"GeofenceGeometry",0,[na,no,"Geobuf","MultiPolygon"],[[()=>qd,0],[()=>qc,0],[()=>Ya,0],[()=>rp,0]]],Gu=[3,_a,"GetDevicePositionHistoryRequest",0,[Ea,ao,Ko,"StartTimeInclusive","EndTimeExclusive",Vo],[[0,1],[0,1],0,[()=>cc,0],[()=>cc,0],1],2],Fu=[3,_a,"GetDevicePositionHistoryResponse",0,[lo,Ko],[[()=>Gd,0],0],1],Bu=[3,_a,"GetDevicePositionRequest",0,[Ea,ao],[[0,1],[0,1]],2],zu=[3,_a,"GetDevicePositionResponse",0,[ma,aa,ra,ao,Ui,ea],[[()=>cc,0],[()=>cc,0],[()=>op,0],0,[()=>Gl,0],[()=>Sp,0]],3],ju=[3,_a,"GetGeofenceRequest",0,[Yi,Oo],[[0,1],[0,1]],2],Hu=[3,_a,"GetGeofenceResponse",0,[Oo,xo,fa,eo,Ta,Do],[0,[()=>_u,0],0,[()=>cc,0],[()=>cc,0],[()=>Rp,0]],5],qu=[3,_a,"GetMapGlyphsRequest",0,[qo,"FontStack","FontUnicodeRange",Mo],[[0,1],[0,1],[0,1],[()=>Za,{[La]:Ma}]],3],Vu=[3,_a,"GetMapGlyphsResponse",0,[Fi,so,Wi],[[21,16],[0,{[$a]:to}],[0,{[$a]:Vi}]]],Wu=[3,_a,"GetMapSpritesRequest",0,[qo,"FileName",Mo],[[0,1],[0,1],[()=>Za,{[La]:Ma}]],2],Ku=[3,_a,"GetMapSpritesResponse",0,[Fi,so,Wi],[[21,16],[0,{[$a]:to}],[0,{[$a]:Vi}]]],Qu=[3,_a,"GetMapStyleDescriptorRequest",0,[qo,Mo],[[0,1],[()=>Za,{[La]:Ma}]],1],Zu=[3,_a,"GetMapStyleDescriptorResponse",0,[Fi,so,Wi],[[21,16],[0,{[$a]:to}],[0,{[$a]:Vi}]]],Yu=[3,_a,"GetMapTileRequest",0,[qo,"Z","X","Y",Mo],[[0,1],[()=>ac,1],[()=>ac,1],[()=>ac,1],[()=>Za,{[La]:Ma}]],4],Ju=[3,_a,"GetMapTileResponse",0,[Fi,so,Wi],[[21,16],[0,{[$a]:to}],[0,{[$a]:Vi}]]],Xu=[3,_a,"GetPlaceRequest",0,[Lo,Yo,zo,Mo],[[0,1],[()=>tc,1],[0,{[La]:"language"}],[()=>Za,{[La]:Ma}]],2],el=[3,_a,"GetPlaceResponse",0,[sa],[[()=>Ul,0]],1],tl=[3,_a,ko,0,["ProxyDetected",ra,Ui,"DeviationDistance"],[2,[()=>op,0],[()=>Gl,0],1],1],sl=[3,_a,"Leg",0,[ha,Eo,oo,go,"Steps",xo],[[()=>op,0],[()=>op,0],[()=>ic,0],[()=>ic,0],[()=>mp,0],[()=>rl,0]],5],rl=[3,_a,"LegGeometry",0,[Bo],[[()=>Vd,0]]],nl=[3,_a,"ListDevicePositionsRequest",0,[Ea,Vo,Ko,"FilterGeometry"],[[0,1],1,0,[()=>od,0]],1],il=[3,_a,"ListDevicePositionsResponse",0,[bo,Ko],[[()=>Wd,0],0],1],ol=[3,_a,"ListDevicePositionsResponseEntry",0,[ao,ma,ra,Ui,ea],[0,[()=>cc,0],[()=>op,0],[()=>Gl,0],[()=>Sp,0]],3],al=[3,_a,"ListGeofenceCollectionsRequest",0,[Vo,Ko],[1,0]],cl=[3,_a,"ListGeofenceCollectionsResponse",0,[bo,Ko],[[()=>Kd,0],0],1],ul=[3,_a,"ListGeofenceCollectionsResponseEntry",0,[Yi,So,eo,Ta,Jo,Xo],[0,0,[()=>cc,0],[()=>cc,0],0,0],4],ll=[3,_a,"ListGeofenceResponseEntry",0,[Oo,xo,fa,eo,Ta,Do],[0,[()=>_u,0],0,[()=>cc,0],[()=>cc,0],[()=>Rp,0]],5],dl=[3,_a,"ListGeofencesRequest",0,[Yi,Ko,Vo],[[0,1],0,1],1],pl=[3,_a,"ListGeofencesResponse",0,[bo,Ko],[[()=>Qd,0],0],1],hl=[3,_a,"ListKeysRequest",0,[Vo,Ko,"Filter"],[1,0,()=>lc]],ml=[3,_a,"ListKeysResponse",0,[bo,Ko],[[()=>Zd,0],0],1],gl=[3,_a,"ListKeysResponseEntry",0,[Go,Co,ca,eo,Ta,So],[0,[()=>cc,0],[()=>dc,0],[()=>cc,0],[()=>cc,0],0],5],fl=[3,_a,"ListMapsRequest",0,[Vo,Ko],[1,0]],yl=[3,_a,"ListMapsResponse",0,[bo,Ko],[[()=>Yd,0],0],1],Sl=[3,_a,"ListMapsResponseEntry",0,[qo,So,po,eo,Ta,Jo],[0,0,0,[()=>cc,0],[()=>cc,0],0],5],Rl=[3,_a,"ListPlaceIndexesRequest",0,[Vo,Ko],[1,0]],wl=[3,_a,"ListPlaceIndexesResponse",0,[bo,Ko],[[()=>Jd,0],0],1],El=[3,_a,"ListPlaceIndexesResponseEntry",0,[Lo,So,po,eo,Ta,Jo],[0,0,0,[()=>cc,0],[()=>cc,0],0],5],Cl=[3,_a,"ListRouteCalculatorsRequest",0,[Vo,Ko],[1,0]],vl=[3,_a,"ListRouteCalculatorsResponse",0,[bo,Ko],[[()=>Xd,0],0],1],bl=[3,_a,"ListRouteCalculatorsResponseEntry",0,[Ji,So,po,eo,Ta,Jo],[0,0,0,[()=>cc,0],[()=>cc,0],0],5],Tl=[3,_a,"ListTagsForResourceRequest",0,[ia],[[0,1]],1],Pl=[3,_a,"ListTagsForResourceResponse",0,[va],[128]],Il=[3,_a,"ListTrackerConsumersRequest",0,[Ea,Vo,Ko],[[0,1],1,0],1],Al=[3,_a,"ListTrackerConsumersResponse",0,["ConsumerArns",Ko],[64,0],1],xl=[3,_a,"ListTrackersRequest",0,[Vo,Ko],[1,0]],Ol=[3,_a,"ListTrackersResponse",0,[bo,Ko],[[()=>ep,0],0],1],Dl=[3,_a,"ListTrackersResponseEntry",0,[Ea,So,eo,Ta,Jo,Xo],[0,0,[()=>cc,0],[()=>cc,0],0,0],4],$l=[3,_a,Fo,0,[Ki,"Mcc","Mnc","LocalId","NetworkMeasurements","TimingAdvance","NrCapable",la,da,"Tac"],[1,1,1,()=>Ll,()=>sp,1,2,1,1,1],3],Ll=[3,_a,"LteLocalId",0,[vo,"Pci"],[1,1],2],kl=[3,_a,"LteNetworkMeasurements",0,[vo,Ki,"Pci",la,da],[1,1,1,1,1],3],Ml=[3,_a,"MapConfiguration",0,["Style",ta,Qi],[0,[()=>Ja,0],64],1],Nl=[3,_a,"MapConfigurationUpdate",0,[ta,Qi],[[()=>Xa,0],64]],Ul=[3,_a,sa,0,[xo,"Label","AddressNumber","Street","Neighborhood","Municipality","SubRegion","Region","Country","PostalCode","Interpolated",Ca,"UnitType","UnitNumber",ro,pa,"SubMunicipality"],[[()=>_l,0],[()=>ac,0],[()=>ac,0],[()=>ac,0],[()=>ac,0],[()=>ac,0],[()=>ac,0],[()=>ac,0],[()=>ac,0],[()=>ac,0],[()=>nc,0],[()=>id,0],[()=>ac,0],[()=>ac,0],[()=>np,0],[()=>ip,0],[()=>ac,0]],1],_l=[3,_a,"PlaceGeometry",0,["Point"],[[()=>op,0]]],Gl=[3,_a,"PositionalAccuracy",0,["Horizontal"],[[()=>ic,0]],1],Fl=[3,_a,"PutGeofenceRequest",0,[Yi,Oo,xo,Do],[[0,1],[0,1],[()=>_u,0],[()=>Rp,0]],3],Bl=[3,_a,"PutGeofenceResponse",0,[Oo,eo,Ta],[0,[()=>cc,0],[()=>cc,0]],3],zl=[3,_a,"RouteMatrixEntry",0,[oo,go,Ro],[[()=>ic,0],[()=>ic,0],()=>jl]],jl=[3,_a,"RouteMatrixEntryError",0,[zi,jo],[0,0],1],Hl=[3,_a,"SearchForPositionResult",0,[sa,oo,Yo],[[()=>Ul,0],[()=>ic,0],[()=>tc,0]],2],ql=[3,_a,"SearchForSuggestionsResult",0,[ba,Yo,ro,pa],[[()=>ac,0],[()=>tc,0],[()=>np,0],[()=>ip,0]],1],Vl=[3,_a,"SearchForTextResult",0,[sa,oo,"Relevance",Yo],[[()=>Ul,0],[()=>ic,0],[()=>ic,0],[()=>tc,0]],1],Wl=[3,_a,"SearchPlaceIndexForPositionRequest",0,[Lo,ra,Vo,zo,Mo],[[0,1],[()=>op,0],1,0,[()=>Za,{[La]:Ma}]],2],Kl=[3,_a,"SearchPlaceIndexForPositionResponse",0,[ya,ua],[[()=>Ql,0],[()=>dp,0]],2],Ql=[3,_a,"SearchPlaceIndexForPositionSummary",0,[ra,po,Vo,zo],[[()=>op,0],0,1,0],2],Zl=[3,_a,"SearchPlaceIndexForSuggestionsRequest",0,[Lo,ba,Bi,Po,Io,Vo,zo,Ao,Mo],[[0,1],[()=>ac,0],[()=>op,0],[()=>Ud,0],[()=>_d,0],1,0,[()=>Bd,0],[()=>Za,{[La]:Ma}]],2],Yl=[3,_a,"SearchPlaceIndexForSuggestionsResponse",0,[ya,ua],[[()=>Jl,0],[()=>pp,0]],2],Jl=[3,_a,"SearchPlaceIndexForSuggestionsSummary",0,[ba,po,Bi,Po,Io,Vo,zo,Ao],[[()=>ac,0],0,[()=>op,0],[()=>Ud,0],[()=>_d,0],1,0,[()=>Bd,0]],2],Xl=[3,_a,"SearchPlaceIndexForTextRequest",0,[Lo,ba,Bi,Po,Io,Vo,zo,Ao,Mo],[[0,1],[()=>ac,0],[()=>op,0],[()=>Ud,0],[()=>_d,0],1,0,[()=>Bd,0],[()=>Za,{[La]:Ma}]],2],ed=[3,_a,"SearchPlaceIndexForTextResponse",0,[ya,ua],[[()=>td,0],[()=>hp,0]],2],td=[3,_a,"SearchPlaceIndexForTextSummary",0,[ba,po,Bi,Po,Io,Vo,"ResultBBox",zo,Ao],[[()=>ac,0],0,[()=>op,0],[()=>Ud,0],[()=>_d,0],1,[()=>Ud,0],0,[()=>Bd,0]],2],sd=[3,_a,"Step",0,[ha,Eo,oo,go,"GeometryOffset"],[[()=>op,0],[()=>op,0],[()=>ic,0],[()=>ic,0],1],4],rd=[3,_a,"TagResourceRequest",0,[ia,va],[[0,1],128],2],nd=[3,_a,"TagResourceResponse",0,[],[]],id=[3,_a,Ca,0,[Qo,"Offset"],[[()=>ac,0],[()=>oc,0]],1],od=[3,_a,"TrackingFilterGeometry",0,[na],[[()=>qd,0]]],ad=[3,_a,"TruckDimensions",0,["Length","Height","Width",Pa],[[()=>ic,0],[()=>ic,0],[()=>ic,0],0]],cd=[3,_a,"TruckWeight",0,["Total",Pa],[[()=>ic,0],0]],ud=[3,_a,"UntagResourceRequest",0,[ia,"TagKeys"],[[0,1],[64,{[La]:"tagKeys"}]],2],ld=[3,_a,"UntagResourceResponse",0,[],[]],dd=[3,_a,"UpdateGeofenceCollectionRequest",0,[Yi,Jo,Xo,So],[[0,1],0,0,0],1],pd=[3,_a,"UpdateGeofenceCollectionResponse",0,[Yi,qi,Ta],[0,0,[()=>cc,0]],3],hd=[3,_a,"UpdateKeyRequest",0,[Go,So,Co,Wo,"ForceUpdate",ca],[[0,1],0,[()=>cc,0],2,2,[()=>dc,0]],1],md=[3,_a,"UpdateKeyResponse",0,[No,Go,Ta],[0,0,[()=>cc,0]],3],gd=[3,_a,"UpdateMapRequest",0,[qo,Jo,So,"ConfigurationUpdate"],[[0,1],0,0,[()=>Nl,0]],1],fd=[3,_a,"UpdateMapResponse",0,[qo,Ho,Ta],[0,0,[()=>cc,0]],3],yd=[3,_a,"UpdatePlaceIndexRequest",0,[Lo,Jo,So,ho],[[0,1],0,0,()=>nu],1],Sd=[3,_a,"UpdatePlaceIndexResponse",0,[Lo,$o,Ta],[0,0,[()=>cc,0]],3],Rd=[3,_a,"UpdateRouteCalculatorRequest",0,[Ji,Jo,So],[[0,1],0,0],1],wd=[3,_a,"UpdateRouteCalculatorResponse",0,[Ji,Hi,Ta],[0,0,[()=>cc,0]],3],Ed=[3,_a,"UpdateTrackerRequest",0,[Ea,Jo,Xo,So,Zo,wo,Uo],[[0,1],0,0,0,0,2,2],1],Cd=[3,_a,"UpdateTrackerResponse",0,[Ea,Sa,Ta],[0,0,[()=>cc,0]],3],vd=[3,_a,"ValidationExceptionField",0,[Qo,jo],[[0,{[ka]:"name"}],[0,{[ka]:Na}]],2],bd=[3,_a,"VerifyDevicePositionRequest",0,[Ea,mo,yo],[[0,1],[()=>Du,0],0],2],Td=[3,_a,"VerifyDevicePositionResponse",0,[ko,ao,ma,aa,yo],[[()=>tl,0],0,[()=>cc,0],[()=>cc,0],0],5],Pd=[3,_a,"WiFiAccessPoint",0,["MacAddress","Rss"],[0,1],2],Id=[1,_a,"AndroidAppList",0,()=>uc],Ad=[1,_a,"AppleAppList",0,()=>pc],xd=[1,_a,"BatchDeleteDevicePositionHistoryErrorList",0,()=>gc],Od=[1,_a,"BatchDeleteGeofenceErrorList",0,()=>Sc],Dd=[1,_a,"BatchEvaluateGeofencesErrorList",0,[()=>Ec,0]],$d=[1,_a,"BatchGetDevicePositionErrorList",0,()=>bc],Ld=[1,_a,"BatchPutGeofenceErrorList",0,()=>Ac],kd=[1,_a,"BatchPutGeofenceRequestEntryList",0,[()=>Oc,0]],Md=[1,_a,"BatchPutGeofenceSuccessList",0,[()=>$c,0]],Nd=[1,_a,"BatchUpdateDevicePositionErrorList",0,[()=>Lc,0]],Ud=[1,_a,"BoundingBox",8,1],_d=[1,_a,"CountryCodeList",0,[()=>Ja,0]],Gd=[1,_a,"DevicePositionList",0,[()=>xu,0]],Fd=[1,_a,"DevicePositionUpdateList",0,[()=>Ou,0]],Bd=[1,_a,"FilterPlaceCategoryList",0,[()=>ec,0]],zd=[1,_a,"ForecastedEventsList",0,[()=>ku,0]],jd=[1,_a,"LegList",0,[()=>sl,0]],Hd=[1,_a,"LinearRing",0,[()=>op,0]],qd=[1,_a,"LinearRings",0,[()=>Hd,0]],Vd=[1,_a,Bo,0,[()=>op,0]],Wd=[1,_a,"ListDevicePositionsResponseEntryList",0,[()=>ol,0]],Kd=[1,_a,"ListGeofenceCollectionsResponseEntryList",0,[()=>ul,0]],Qd=[1,_a,"ListGeofenceResponseEntryList",0,[()=>ll,0]],Zd=[1,_a,"ListKeysResponseEntryList",0,[()=>gl,0]],Yd=[1,_a,"ListMapsResponseEntryList",0,[()=>Sl,0]],Jd=[1,_a,"ListPlaceIndexesResponseEntryList",0,[()=>El,0]],Xd=[1,_a,"ListRouteCalculatorsResponseEntryList",0,[()=>bl,0]],ep=[1,_a,"ListTrackersResponseEntryList",0,[()=>Dl,0]],tp=[1,_a,"LteCellDetailsList",0,()=>$l],sp=[1,_a,"LteNetworkMeasurementsList",0,()=>kl],rp=[1,_a,"MultiLinearRings",0,[()=>qd,0]],np=[1,_a,"PlaceCategoryList",0,[()=>ec,0]],ip=[1,_a,"PlaceSupplementalCategoryList",0,[()=>sc,0]],op=[1,_a,ra,8,1],ap=[1,_a,"PositionList",0,[()=>op,0]],cp=[1,_a,"RefererPatternList",0,[()=>rc,0]],up=[1,_a,oa,0,[()=>lp,0]],lp=[1,_a,"RouteMatrixRow",0,[()=>zl,0]],dp=[1,_a,"SearchForPositionResultList",0,[()=>Hl,0]],pp=[1,_a,"SearchForSuggestionsResultList",0,[()=>ql,0]],hp=[1,_a,"SearchForTextResultList",0,[()=>Vl,0]],mp=[1,_a,"StepList",0,[()=>sd,0]],gp=[1,_a,"ValidationExceptionFieldList",0,[()=>vd,0]],fp=[1,_a,"WaypointPositionList",0,[()=>op,0]],yp=[1,_a,"WiFiAccessPointList",0,()=>Pd],Sp=[2,_a,"PositionPropertyMap",8,0,0],Rp=[2,_a,"PropertyMap",8,0,0],wp=[9,_a,"AssociateTrackerConsumer",{[xa]:["cp.tracking."],[Oa]:["POST","/tracking/v0/trackers/{TrackerName}/consumers",200]},()=>hc,()=>mc],Ep=[9,_a,"BatchDeleteDevicePositionHistory",{[xa]:["tracking."],[Oa]:["POST","/tracking/v0/trackers/{TrackerName}/delete-positions",200]},()=>fc,()=>yc],Cp=[9,_a,"BatchDeleteGeofence",{[xa]:["geofencing."],[Oa]:["POST","/geofencing/v0/collections/{CollectionName}/delete-geofences",200]},()=>Rc,()=>wc],vp=[9,_a,"BatchEvaluateGeofences",{[xa]:["geofencing."],[Oa]:["POST","/geofencing/v0/collections/{CollectionName}/positions",200]},()=>Cc,()=>vc],bp=[9,_a,"BatchGetDevicePosition",{[xa]:["tracking."],[Oa]:["POST","/tracking/v0/trackers/{TrackerName}/get-positions",200]},()=>Tc,()=>Pc],Tp=[9,_a,"BatchPutGeofence",{[xa]:["geofencing."],[Oa]:["POST","/geofencing/v0/collections/{CollectionName}/put-geofences",200]},()=>xc,()=>Dc],Pp=[9,_a,"BatchUpdateDevicePosition",{[xa]:["tracking."],[Oa]:["POST","/tracking/v0/trackers/{TrackerName}/positions",200]},()=>kc,()=>Mc],Ip=[9,_a,"CalculateRoute",{[xa]:["routes."],[Oa]:["POST","/routes/v0/calculators/{CalculatorName}/calculate/route",200]},()=>Fc,()=>Bc],Ap=[9,_a,"CalculateRouteMatrix",{[xa]:["routes."],[Oa]:["POST","/routes/v0/calculators/{CalculatorName}/calculate/route-matrix",200]},()=>Uc,()=>_c],xp=[9,_a,"CreateGeofenceCollection",{[xa]:["cp.geofencing."],[Oa]:["POST","/geofencing/v0/collections",200]},()=>Vc,()=>Wc],Op=[9,_a,"CreateKey",{[xa]:["cp.metadata."],[Oa]:["POST","/metadata/v0/keys",200]},()=>Kc,()=>Qc],Dp=[9,_a,"CreateMap",{[xa]:["cp.maps."],[Oa]:["POST","/maps/v0/maps",200]},()=>Zc,()=>Yc],$p=[9,_a,"CreatePlaceIndex",{[xa]:["cp.places."],[Oa]:["POST","/places/v0/indexes",200]},()=>Jc,()=>Xc],Lp=[9,_a,"CreateRouteCalculator",{[xa]:["cp.routes."],[Oa]:["POST","/routes/v0/calculators",200]},()=>eu,()=>tu],kp=[9,_a,"CreateTracker",{[xa]:["cp.tracking."],[Oa]:["POST","/tracking/v0/trackers",200]},()=>su,()=>ru],Mp=[9,_a,"DeleteGeofenceCollection",{[xa]:["cp.geofencing."],[Oa]:["DELETE","/geofencing/v0/collections/{CollectionName}",200]},()=>iu,()=>ou],Np=[9,_a,"DeleteKey",{[xa]:["cp.metadata."],[Oa]:["DELETE","/metadata/v0/keys/{KeyName}",200]},()=>au,()=>cu],Up=[9,_a,"DeleteMap",{[xa]:["cp.maps."],[Oa]:["DELETE","/maps/v0/maps/{MapName}",200]},()=>uu,()=>lu],_p=[9,_a,"DeletePlaceIndex",{[xa]:["cp.places."],[Oa]:["DELETE","/places/v0/indexes/{IndexName}",200]},()=>du,()=>pu],Gp=[9,_a,"DeleteRouteCalculator",{[xa]:["cp.routes."],[Oa]:["DELETE","/routes/v0/calculators/{CalculatorName}",200]},()=>hu,()=>mu],Fp=[9,_a,"DeleteTracker",{[xa]:["cp.tracking."],[Oa]:["DELETE","/tracking/v0/trackers/{TrackerName}",200]},()=>gu,()=>fu],Bp=[9,_a,"DescribeGeofenceCollection",{[xa]:["cp.geofencing."],[Oa]:["GET","/geofencing/v0/collections/{CollectionName}",200]},()=>yu,()=>Su],zp=[9,_a,"DescribeKey",{[xa]:["cp.metadata."],[Oa]:["GET","/metadata/v0/keys/{KeyName}",200]},()=>Ru,()=>wu],jp=[9,_a,"DescribeMap",{[xa]:["cp.maps."],[Oa]:["GET","/maps/v0/maps/{MapName}",200]},()=>Eu,()=>Cu],Hp=[9,_a,"DescribePlaceIndex",{[xa]:["cp.places."],[Oa]:["GET","/places/v0/indexes/{IndexName}",200]},()=>vu,()=>bu],qp=[9,_a,"DescribeRouteCalculator",{[xa]:["cp.routes."],[Oa]:["GET","/routes/v0/calculators/{CalculatorName}",200]},()=>Tu,()=>Pu],Vp=[9,_a,"DescribeTracker",{[xa]:["cp.tracking."],[Oa]:["GET","/tracking/v0/trackers/{TrackerName}",200]},()=>Iu,()=>Au],Wp=[9,_a,"DisassociateTrackerConsumer",{[xa]:["cp.tracking."],[Oa]:["DELETE","/tracking/v0/trackers/{TrackerName}/consumers/{ConsumerArn}",200]},()=>$u,()=>Lu],Kp=[9,_a,"ForecastGeofenceEvents",{[xa]:["geofencing."],[Oa]:["POST","/geofencing/v0/collections/{CollectionName}/forecast-geofence-events",200]},()=>Nu,()=>Uu],Qp=[9,_a,"GetDevicePosition",{[xa]:["tracking."],[Oa]:["GET","/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/positions/latest",200]},()=>Bu,()=>zu],Zp=[9,_a,"GetDevicePositionHistory",{[xa]:["tracking."],[Oa]:["POST","/tracking/v0/trackers/{TrackerName}/devices/{DeviceId}/list-positions",200]},()=>Gu,()=>Fu],Yp=[9,_a,"GetGeofence",{[xa]:["geofencing."],[Oa]:["GET","/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}",200]},()=>ju,()=>Hu],Jp=[9,_a,"GetMapGlyphs",{[xa]:["maps."],[Oa]:["GET","/maps/v0/maps/{MapName}/glyphs/{FontStack}/{FontUnicodeRange}",200]},()=>qu,()=>Vu],Xp=[9,_a,"GetMapSprites",{[xa]:["maps."],[Oa]:["GET","/maps/v0/maps/{MapName}/sprites/{FileName}",200]},()=>Wu,()=>Ku],eh=[9,_a,"GetMapStyleDescriptor",{[xa]:["maps."],[Oa]:["GET","/maps/v0/maps/{MapName}/style-descriptor",200]},()=>Qu,()=>Zu],th=[9,_a,"GetMapTile",{[xa]:["maps."],[Oa]:["GET","/maps/v0/maps/{MapName}/tiles/{Z}/{X}/{Y}",200]},()=>Yu,()=>Ju],sh=[9,_a,"GetPlace",{[xa]:["places."],[Oa]:["GET","/places/v0/indexes/{IndexName}/places/{PlaceId}",200]},()=>Xu,()=>el],rh=[9,_a,"ListDevicePositions",{[xa]:["tracking."],[Oa]:["POST","/tracking/v0/trackers/{TrackerName}/list-positions",200]},()=>nl,()=>il],nh=[9,_a,"ListGeofenceCollections",{[xa]:["cp.geofencing."],[Oa]:["POST","/geofencing/v0/list-collections",200]},()=>al,()=>cl],ih=[9,_a,"ListGeofences",{[xa]:["geofencing."],[Oa]:["POST","/geofencing/v0/collections/{CollectionName}/list-geofences",200]},()=>dl,()=>pl],oh=[9,_a,"ListKeys",{[xa]:["cp.metadata."],[Oa]:["POST","/metadata/v0/list-keys",200]},()=>hl,()=>ml],ah=[9,_a,"ListMaps",{[xa]:["cp.maps."],[Oa]:["POST","/maps/v0/list-maps",200]},()=>fl,()=>yl],ch=[9,_a,"ListPlaceIndexes",{[xa]:["cp.places."],[Oa]:["POST","/places/v0/list-indexes",200]},()=>Rl,()=>wl],uh=[9,_a,"ListRouteCalculators",{[xa]:["cp.routes."],[Oa]:["POST","/routes/v0/list-calculators",200]},()=>Cl,()=>vl],lh=[9,_a,"ListTagsForResource",{[xa]:["cp.metadata."],[Oa]:["GET","/tags/{ResourceArn}",200]},()=>Tl,()=>Pl],dh=[9,_a,"ListTrackerConsumers",{[xa]:["cp.tracking."],[Oa]:["POST","/tracking/v0/trackers/{TrackerName}/list-consumers",200]},()=>Il,()=>Al],ph=[9,_a,"ListTrackers",{[xa]:["cp.tracking."],[Oa]:["POST","/tracking/v0/list-trackers",200]},()=>xl,()=>Ol],hh=[9,_a,"PutGeofence",{[xa]:["geofencing."],[Oa]:["PUT","/geofencing/v0/collections/{CollectionName}/geofences/{GeofenceId}",200]},()=>Fl,()=>Bl],mh=[9,_a,"SearchPlaceIndexForPosition",{[xa]:["places."],[Oa]:["POST","/places/v0/indexes/{IndexName}/search/position",200]},()=>Wl,()=>Kl],gh=[9,_a,"SearchPlaceIndexForSuggestions",{[xa]:["places."],[Oa]:["POST","/places/v0/indexes/{IndexName}/search/suggestions",200]},()=>Zl,()=>Yl],fh=[9,_a,"SearchPlaceIndexForText",{[xa]:["places."],[Oa]:["POST","/places/v0/indexes/{IndexName}/search/text",200]},()=>Xl,()=>ed],yh=[9,_a,"TagResource",{[xa]:["cp.metadata."],[Oa]:["POST","/tags/{ResourceArn}",200]},()=>rd,()=>nd],Sh=[9,_a,"UntagResource",{[xa]:["cp.metadata."],[Oa]:["DELETE","/tags/{ResourceArn}",200]},()=>ud,()=>ld],Rh=[9,_a,"UpdateGeofenceCollection",{[xa]:["cp.geofencing."],[Oa]:["PATCH","/geofencing/v0/collections/{CollectionName}",200]},()=>dd,()=>pd],wh=[9,_a,"UpdateKey",{[xa]:["cp.metadata."],[Oa]:["PATCH","/metadata/v0/keys/{KeyName}",200]},()=>hd,()=>md],Eh=[9,_a,"UpdateMap",{[xa]:["cp.maps."],[Oa]:["PATCH","/maps/v0/maps/{MapName}",200]},()=>gd,()=>fd],Ch=[9,_a,"UpdatePlaceIndex",{[xa]:["cp.places."],[Oa]:["PATCH","/places/v0/indexes/{IndexName}",200]},()=>yd,()=>Sd],vh=[9,_a,"UpdateRouteCalculator",{[xa]:["cp.routes."],[Oa]:["PATCH","/routes/v0/calculators/{CalculatorName}",200]},()=>Rd,()=>wd],bh=[9,_a,"UpdateTracker",{[xa]:["cp.tracking."],[Oa]:["PATCH","/tracking/v0/trackers/{TrackerName}",200]},()=>Ed,()=>Cd],Th=[9,_a,"VerifyDevicePosition",{[xa]:["tracking."],[Oa]:["POST","/tracking/v0/trackers/{TrackerName}/positions/verify",200]},()=>bd,()=>Td];const Ph=e=>{const t=Xn(e),s=()=>t().then(nr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??k,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Ai,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Pn,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new cs}],logger:e?.logger??new cr,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.location",errorTypeRegistries:Qa,version:"2020-11-19",serviceTarget:"LocationService"},serviceId:e?.serviceId??"Location",urlParser:e?.urlParser??ts,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??L}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Hs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qn({serviceId:r.serviceId,clientVersion:An}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yn("Region is missing"),requestHandler:z.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||nn),sha256:e?.sha256??Kn,streamCollector:e?.streamCollector??j,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Nr)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}},Ih=e=>({setRegion(t){e.region=t},region:()=>e.region}),Ah=e=>({region:e.region()});class xh extends Zs{config;constructor(...[e]){const r=Ph(e||{});super(r),this.initConfig=r;var n;const i=vt((n=r,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"geo"}))),o=yn(i),a=Fr(o),c=((e,r)=>{const n=Object.assign(Ih(e),ir(e),t(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex((t=>t.schemeId===e.schemeId));-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(n))),Object.assign(e,Ah(n),or(n),s(n),{httpAuthSchemes:(i=n).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})((e=>{const t=zs(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(sn(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Mr(this.config)),this.middlewareStack.use(vn(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:Tn,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(C(this.config))}destroy(){super.destroy()}}class Oh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","AssociateTrackerConsumer",{}).n("LocationClient","AssociateTrackerConsumerCommand").sc(wp).build()){}class Dh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","BatchDeleteDevicePositionHistory",{}).n("LocationClient","BatchDeleteDevicePositionHistoryCommand").sc(Ep).build()){}class $h extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","BatchDeleteGeofence",{}).n("LocationClient","BatchDeleteGeofenceCommand").sc(Cp).build()){}class Lh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","BatchEvaluateGeofences",{}).n("LocationClient","BatchEvaluateGeofencesCommand").sc(vp).build()){}class kh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","BatchGetDevicePosition",{}).n("LocationClient","BatchGetDevicePositionCommand").sc(bp).build()){}class Mh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","BatchPutGeofence",{}).n("LocationClient","BatchPutGeofenceCommand").sc(Tp).build()){}class Nh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","BatchUpdateDevicePosition",{}).n("LocationClient","BatchUpdateDevicePositionCommand").sc(Pp).build()){}class Uh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","CalculateRoute",{}).n("LocationClient","CalculateRouteCommand").sc(Ip).build()){}let _h=class extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","CalculateRouteMatrix",{}).n("LocationClient","CalculateRouteMatrixCommand").sc(Ap).build()){};class Gh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","CreateGeofenceCollection",{}).n("LocationClient","CreateGeofenceCollectionCommand").sc(xp).build()){}class Fh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","CreateKey",{}).n("LocationClient","CreateKeyCommand").sc(Op).build()){}class Bh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","CreateMap",{}).n("LocationClient","CreateMapCommand").sc(Dp).build()){}class zh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","CreatePlaceIndex",{}).n("LocationClient","CreatePlaceIndexCommand").sc($p).build()){}class jh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","CreateRouteCalculator",{}).n("LocationClient","CreateRouteCalculatorCommand").sc(Lp).build()){}class Hh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","CreateTracker",{}).n("LocationClient","CreateTrackerCommand").sc(kp).build()){}class qh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteGeofenceCollection",{}).n("LocationClient","DeleteGeofenceCollectionCommand").sc(Mp).build()){}class Vh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteKey",{}).n("LocationClient","DeleteKeyCommand").sc(Np).build()){}class Wh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteMap",{}).n("LocationClient","DeleteMapCommand").sc(Up).build()){}class Kh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DeletePlaceIndex",{}).n("LocationClient","DeletePlaceIndexCommand").sc(_p).build()){}class Qh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteRouteCalculator",{}).n("LocationClient","DeleteRouteCalculatorCommand").sc(Gp).build()){}class Zh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DeleteTracker",{}).n("LocationClient","DeleteTrackerCommand").sc(Fp).build()){}class Yh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeGeofenceCollection",{}).n("LocationClient","DescribeGeofenceCollectionCommand").sc(Bp).build()){}class Jh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeKey",{}).n("LocationClient","DescribeKeyCommand").sc(zp).build()){}class Xh extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeMap",{}).n("LocationClient","DescribeMapCommand").sc(jp).build()){}class em extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DescribePlaceIndex",{}).n("LocationClient","DescribePlaceIndexCommand").sc(Hp).build()){}class tm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeRouteCalculator",{}).n("LocationClient","DescribeRouteCalculatorCommand").sc(qp).build()){}class sm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DescribeTracker",{}).n("LocationClient","DescribeTrackerCommand").sc(Vp).build()){}class rm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","DisassociateTrackerConsumer",{}).n("LocationClient","DisassociateTrackerConsumerCommand").sc(Wp).build()){}class nm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","ForecastGeofenceEvents",{}).n("LocationClient","ForecastGeofenceEventsCommand").sc(Kp).build()){}class im extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","GetDevicePosition",{}).n("LocationClient","GetDevicePositionCommand").sc(Qp).build()){}class om extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","GetDevicePositionHistory",{}).n("LocationClient","GetDevicePositionHistoryCommand").sc(Zp).build()){}class am extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","GetGeofence",{}).n("LocationClient","GetGeofenceCommand").sc(Yp).build()){}class cm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapGlyphs",{}).n("LocationClient","GetMapGlyphsCommand").sc(Jp).build()){}class um extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapSprites",{}).n("LocationClient","GetMapSpritesCommand").sc(Xp).build()){}class lm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapStyleDescriptor",{}).n("LocationClient","GetMapStyleDescriptorCommand").sc(eh).build()){}class dm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","GetMapTile",{}).n("LocationClient","GetMapTileCommand").sc(th).build()){}let pm=class extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","GetPlace",{}).n("LocationClient","GetPlaceCommand").sc(sh).build()){};class hm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","ListDevicePositions",{}).n("LocationClient","ListDevicePositionsCommand").sc(rh).build()){}class mm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","ListGeofenceCollections",{}).n("LocationClient","ListGeofenceCollectionsCommand").sc(nh).build()){}class gm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","ListGeofences",{}).n("LocationClient","ListGeofencesCommand").sc(ih).build()){}class fm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","ListKeys",{}).n("LocationClient","ListKeysCommand").sc(oh).build()){}class ym extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","ListMaps",{}).n("LocationClient","ListMapsCommand").sc(ah).build()){}class Sm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","ListPlaceIndexes",{}).n("LocationClient","ListPlaceIndexesCommand").sc(ch).build()){}class Rm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","ListRouteCalculators",{}).n("LocationClient","ListRouteCalculatorsCommand").sc(uh).build()){}class wm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","ListTagsForResource",{}).n("LocationClient","ListTagsForResourceCommand").sc(lh).build()){}class Em extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","ListTrackerConsumers",{}).n("LocationClient","ListTrackerConsumersCommand").sc(dh).build()){}class Cm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","ListTrackers",{}).n("LocationClient","ListTrackersCommand").sc(ph).build()){}class vm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","PutGeofence",{}).n("LocationClient","PutGeofenceCommand").sc(hh).build()){}class bm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForPosition",{}).n("LocationClient","SearchPlaceIndexForPositionCommand").sc(mh).build()){}class Tm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForSuggestions",{}).n("LocationClient","SearchPlaceIndexForSuggestionsCommand").sc(gh).build()){}class Pm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","SearchPlaceIndexForText",{}).n("LocationClient","SearchPlaceIndexForTextCommand").sc(fh).build()){}class Im extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","TagResource",{}).n("LocationClient","TagResourceCommand").sc(yh).build()){}class Am extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","UntagResource",{}).n("LocationClient","UntagResourceCommand").sc(Sh).build()){}class xm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateGeofenceCollection",{}).n("LocationClient","UpdateGeofenceCollectionCommand").sc(Rh).build()){}class Om extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateKey",{}).n("LocationClient","UpdateKeyCommand").sc(wh).build()){}class Dm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateMap",{}).n("LocationClient","UpdateMapCommand").sc(Eh).build()){}class $m extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","UpdatePlaceIndex",{}).n("LocationClient","UpdatePlaceIndexCommand").sc(Ch).build()){}class Lm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateRouteCalculator",{}).n("LocationClient","UpdateRouteCalculatorCommand").sc(vh).build()){}class km extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","UpdateTracker",{}).n("LocationClient","UpdateTrackerCommand").sc(bh).build()){}class Mm extends(Xs.classBuilder().ep(In).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("LocationService","VerifyDevicePosition",{}).n("LocationClient","VerifyDevicePositionCommand").sc(Th).build()){}const Nm=T(xh,nm,"NextToken","NextToken","MaxResults"),Um=T(xh,om,"NextToken","NextToken","MaxResults"),_m=T(xh,hm,"NextToken","NextToken","MaxResults"),Gm=T(xh,mm,"NextToken","NextToken","MaxResults"),Fm=T(xh,gm,"NextToken","NextToken","MaxResults"),Bm=T(xh,fm,"NextToken","NextToken","MaxResults"),zm=T(xh,ym,"NextToken","NextToken","MaxResults"),jm=T(xh,Sm,"NextToken","NextToken","MaxResults"),Hm=T(xh,Rm,"NextToken","NextToken","MaxResults"),qm=T(xh,Em,"NextToken","NextToken","MaxResults"),Vm=T(xh,Cm,"NextToken","NextToken","MaxResults"),Wm={AssociateTrackerConsumerCommand:Oh,BatchDeleteDevicePositionHistoryCommand:Dh,BatchDeleteGeofenceCommand:$h,BatchEvaluateGeofencesCommand:Lh,BatchGetDevicePositionCommand:kh,BatchPutGeofenceCommand:Mh,BatchUpdateDevicePositionCommand:Nh,CalculateRouteCommand:Uh,CalculateRouteMatrixCommand:_h,CreateGeofenceCollectionCommand:Gh,CreateKeyCommand:Fh,CreateMapCommand:Bh,CreatePlaceIndexCommand:zh,CreateRouteCalculatorCommand:jh,CreateTrackerCommand:Hh,DeleteGeofenceCollectionCommand:qh,DeleteKeyCommand:Vh,DeleteMapCommand:Wh,DeletePlaceIndexCommand:Kh,DeleteRouteCalculatorCommand:Qh,DeleteTrackerCommand:Zh,DescribeGeofenceCollectionCommand:Yh,DescribeKeyCommand:Jh,DescribeMapCommand:Xh,DescribePlaceIndexCommand:em,DescribeRouteCalculatorCommand:tm,DescribeTrackerCommand:sm,DisassociateTrackerConsumerCommand:rm,ForecastGeofenceEventsCommand:nm,GetDevicePositionCommand:im,GetDevicePositionHistoryCommand:om,GetGeofenceCommand:am,GetMapGlyphsCommand:cm,GetMapSpritesCommand:um,GetMapStyleDescriptorCommand:lm,GetMapTileCommand:dm,GetPlaceCommand:pm,ListDevicePositionsCommand:hm,ListGeofenceCollectionsCommand:mm,ListGeofencesCommand:gm,ListKeysCommand:fm,ListMapsCommand:ym,ListPlaceIndexesCommand:Sm,ListRouteCalculatorsCommand:Rm,ListTagsForResourceCommand:wm,ListTrackerConsumersCommand:Em,ListTrackersCommand:Cm,PutGeofenceCommand:vm,SearchPlaceIndexForPositionCommand:bm,SearchPlaceIndexForSuggestionsCommand:Tm,SearchPlaceIndexForTextCommand:Pm,TagResourceCommand:Im,UntagResourceCommand:Am,UpdateGeofenceCollectionCommand:xm,UpdateKeyCommand:Om,UpdateMapCommand:Dm,UpdatePlaceIndexCommand:$m,UpdateRouteCalculatorCommand:Lm,UpdateTrackerCommand:km,VerifyDevicePositionCommand:Mm},Km={paginateForecastGeofenceEvents:Nm,paginateGetDevicePositionHistory:Um,paginateListDevicePositions:_m,paginateListGeofenceCollections:Gm,paginateListGeofences:Fm,paginateListKeys:Bm,paginateListMaps:zm,paginateListPlaceIndexes:jm,paginateListRouteCalculators:Hm,paginateListTrackerConsumers:qm,paginateListTrackers:Vm};class Qm extends xh{}function Zm(e){return Promise.all(Object.keys(e).reduce(((t,s)=>{const r=e[s];return"string"==typeof r?t.push([s,r]):t.push(r().then((e=>[s,e]))),t}),[])).then((e=>e.reduce(((e,[t,s])=>(e[t]=s,e)),{})))}function Ym(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:s,CognitoIdentityClient:r}=await Promise.resolve().then((function(){return Lk})),n=s=>e.clientConfig?.[s]??e.parentClientConfig?.[s]??t?.callerClientConfig?.[s],{Credentials:{AccessKeyId:i=Jm(e.logger),Expiration:o,SecretKey:a=eg(e.logger),SessionToken:c}=Xm(e.logger)}=await(e.client??new r(Object.assign({},e.clientConfig??{},{region:n("region"),profile:n("profile"),userAgentAppId:n("userAgentAppId")}))).send(new s({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await Zm(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:i,secretAccessKey:a,sessionToken:c,expiration:o}}}function Jm(e){throw new ls("Response from Amazon Cognito contained no access key ID",{logger:e})}function Xm(e){throw new ls("Response from Amazon Cognito contained no credentials",{logger:e})}function eg(e){throw new ls("Response from Amazon Cognito contained no secret key",{logger:e})}tr(Wm,Qm,{paginators:Km});const tg="IdentityIds";class sg{dbName;constructor(e="aws:cognito-identity-ids"){this.dbName=e}getItem(e){return this.withObjectStore("readonly",(t=>{const s=t.get(e);return new Promise((e=>{s.onerror=()=>e(null),s.onsuccess=()=>e(s.result?s.result.value:null)}))})).catch((()=>null))}removeItem(e){return this.withObjectStore("readwrite",(t=>{const s=t.delete(e);return new Promise(((e,t)=>{s.onerror=()=>t(s.error),s.onsuccess=()=>e()}))}))}setItem(e,t){return this.withObjectStore("readwrite",(s=>{const r=s.put({id:e,value:t});return new Promise(((e,t)=>{r.onerror=()=>t(r.error),r.onsuccess=()=>e()}))}))}getDb(){const e=self.indexedDB.open(this.dbName,1);return new Promise(((t,s)=>{e.onsuccess=()=>{t(e.result)},e.onerror=()=>{s(e.error)},e.onblocked=()=>{s(new Error("Unable to access DB"))},e.onupgradeneeded=()=>{const t=e.result;t.onerror=()=>{s(new Error("Failed to create object store"))},t.createObjectStore(tg,{keyPath:"id"})}}))}withObjectStore(e,t){return this.getDb().then((s=>{const r=s.transaction(tg,e);return r.oncomplete=()=>s.close(),new Promise(((e,s)=>{r.onerror=()=>s(r.error),e(t(r.objectStore(tg)))})).catch((e=>{throw s.close(),e}))}))}}const rg=new class{store;constructor(e={}){this.store=e}getItem(e){return e in this.store?this.store[e]:null}removeItem(e){delete this.store[e]}setItem(e,t){this.store[e]=t}};function ng(){return"object"==typeof self&&self.indexedDB?new sg:"object"==typeof window&&window.localStorage?window.localStorage:rg}function ig(e){throw new ls("Response from Amazon Cognito contained no identity ID",{logger:e})}const og=e=>"h2"===e?.metadata?.handlerProtocol?void 0:e,ag=e=>{for(const t of e)if(void 0!==t)return t};var cg,ug={};var lg=(cg||(cg=1,function(e){"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.withAPIKey=Ws,e.withCredentialProvider=Ks,e.withIdentityPoolId=Vs;class t extends Error{name="ProviderError";tryNextLink;constructor(e){let s,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!0;"boolean"==typeof r?(s=void 0,n=r):null!=r&&"object"==typeof r&&(s=r.logger,n=r.tryNextLink??!0),super(e),this.tryNextLink=n,Object.setPrototypeOf(this,t.prototype),s?.debug?.(`@smithy/property-provider ${n?"->":"(!)"} ${e}`)}static from(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Object.assign(new this(e.message,t),e)}}class s extends t{name="CredentialsProviderError";constructor(e){super(e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]),Object.setPrototypeOf(this,s.prototype)}}const r=(e,t,s)=>{let r,n,i,o=!1;const a=async()=>{n||(n=e());try{r=await n,i=!0,o=!1}finally{n=void 0}return r};return async e=>(i&&!e?.forceRefresh||(r=await a()),r)};function n(e){return Promise.all(Object.keys(e).reduce(((t,s)=>{const r=e[s];return"string"==typeof r?t.push([s,r]):t.push(r().then((e=>[s,e]))),t}),[])).then((e=>e.reduce(((e,t)=>{let[s,r]=t;return e[s]=r,e}),{})))}function i(e){return async t=>{e.logger?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const{GetCredentialsForIdentityCommand:s,CognitoIdentityClient:r}=await Promise.resolve().then((function(){return Uu})),i=s=>e.clientConfig?.[s]??e.parentClientConfig?.[s]??t?.callerClientConfig?.[s],{Credentials:{AccessKeyId:u=o(e.logger),Expiration:l,SecretKey:d=c(e.logger),SessionToken:p}=a(e.logger)}=await(e.client??new r(Object.assign({},e.clientConfig??{},{region:i("region"),profile:i("profile"),userAgentAppId:i("userAgentAppId")}))).send(new s({CustomRoleArn:e.customRoleArn,IdentityId:e.identityId,Logins:e.logins?await n(e.logins):void 0}));return{identityId:e.identityId,accessKeyId:u,secretAccessKey:d,sessionToken:p,expiration:l}}}function o(e){throw new s("Response from Amazon Cognito contained no access key ID",{logger:e})}function a(e){throw new s("Response from Amazon Cognito contained no credentials",{logger:e})}function c(e){throw new s("Response from Amazon Cognito contained no secret key",{logger:e})}const u="IdentityIds";class l{dbName;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"aws:cognito-identity-ids";this.dbName=e}getItem(e){return this.withObjectStore("readonly",(t=>{const s=t.get(e);return new Promise((e=>{s.onerror=()=>e(null),s.onsuccess=()=>e(s.result?s.result.value:null)}))})).catch((()=>null))}removeItem(e){return this.withObjectStore("readwrite",(t=>{const s=t.delete(e);return new Promise(((e,t)=>{s.onerror=()=>t(s.error),s.onsuccess=()=>e()}))}))}setItem(e,t){return this.withObjectStore("readwrite",(s=>{const r=s.put({id:e,value:t});return new Promise(((e,t)=>{r.onerror=()=>t(r.error),r.onsuccess=()=>e()}))}))}getDb(){const e=self.indexedDB.open(this.dbName,1);return new Promise(((t,s)=>{e.onsuccess=()=>{t(e.result)},e.onerror=()=>{s(e.error)},e.onblocked=()=>{s(new Error("Unable to access DB"))},e.onupgradeneeded=()=>{const t=e.result;t.onerror=()=>{s(new Error("Failed to create object store"))},t.createObjectStore(u,{keyPath:"id"})}}))}withObjectStore(e,t){return this.getDb().then((s=>{const r=s.transaction(u,e);return r.oncomplete=()=>s.close(),new Promise(((e,s)=>{r.onerror=()=>s(r.error),e(t(r.objectStore(u)))})).catch((e=>{throw s.close(),e}))}))}}class d{store;constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.store=e}getItem(e){return e in this.store?this.store[e]:null}removeItem(e){delete this.store[e]}setItem(e,t){this.store[e]=t}}const p=new d;function h(){return"object"==typeof self&&self.indexedDB?new l:"object"==typeof window&&window.localStorage?window.localStorage:p}function m(e){let{accountId:t,cache:s=h(),client:r,clientConfig:o,customRoleArn:a,identityPoolId:c,logins:u,userIdentifier:l=(u&&0!==Object.keys(u).length?void 0:"ANONYMOUS"),logger:d,parentClientConfig:p}=e;d?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const m=l?`aws:cognito-identity-credentials:${c}:${l}`:void 0;let f=async e=>{const{GetIdCommand:l,CognitoIdentityClient:h}=await Promise.resolve().then((function(){return Uu})),y=t=>o?.[t]??p?.[t]??e?.callerClientConfig?.[t],S=r??new h(Object.assign({},o??{},{region:y("region"),profile:y("profile"),userAgentAppId:y("userAgentAppId")}));let R=m&&await s.getItem(m);if(!R){const{IdentityId:e=g(d)}=await S.send(new l({AccountId:t,IdentityPoolId:c,Logins:u?await n(u):void 0}));R=e,m&&Promise.resolve(s.setItem(m,R)).catch((()=>{}))}return f=i({client:S,customRoleArn:a,logins:u,identityId:R}),f(e)};return e=>f(e).catch((async e=>{throw m&&Promise.resolve(s.removeItem(m)).catch((()=>{})),e}))}function g(e){throw new s("Response from Amazon Cognito contained no identity ID",{logger:e})}const f=e=>m({...e}),y=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler:()=>e.httpHandler,updateHttpClientConfig(t,s){e.httpHandler?.updateHttpClientConfig(t,s)},httpHandlerConfigs:()=>e.httpHandler.httpHandlerConfigs()}),S=e=>({httpHandler:e.httpHandler()});var R,w;(function(e){e.HTTP="http",e.HTTPS="https"})(R||(R={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(w||(w={}));const E="__smithy_context";class C{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new C({...e,headers:{...e.headers}});return t.query&&(t.query=v(t.query)),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 C.clone(this)}}function v(e){return Object.keys(e).reduce(((t,s)=>{const r=e[s];return{...t,[s]:Array.isArray(r)?[...r]:r}}),{})}class b{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const T=e=>encodeURIComponent(e).replace(/[!'()*]/g,P),P=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function I(e){const t=[];for(let s of Object.keys(e).sort()){const r=e[s];if(s=T(s),Array.isArray(r))for(let e=0,n=r.length;e<n;e++)t.push(`${s}=${T(r[e])}`);else{let e=s;(r||"string"==typeof r)&&(e+=`=${T(r)}`),t.push(e)}}return t.join("&")}function A(e,t){return new Request(e,t)}function x(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(((t,s)=>{e&&setTimeout((()=>{const t=new Error(`Request did not complete within ${e} ms`);t.name="TimeoutError",s(t)}),e)}))}const O={supported:void 0};class D{config;configProvider;static create(e){return"function"==typeof e?.handle?e:new D(e)}constructor(e){"function"==typeof e?this.configProvider=e().then((e=>e||{})):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),void 0===O.supported&&(O.supported=Boolean("undefined"!=typeof Request&&"keepalive"in A("https://[::1]")))}destroy(){}async handle(e){let{abortSignal:t,requestTimeout:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config||(this.config=await this.configProvider);const r=s??this.config.requestTimeout,n=!0===this.config.keepAlive,i=this.config.credentials;if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",Promise.reject(e)}let o=e.path;const a=I(e.query||{});a&&(o+=`?${a}`),e.fragment&&(o+=`#${e.fragment}`);let c="";null==e.username&&null==e.password||(c=`${e.username??""}:${e.password??""}@`);const{port:u,method:l}=e,d=`${e.protocol}//${c}${e.hostname}${u?`:${u}`:""}${o}`,p="GET"===l||"HEAD"===l?void 0:e.body,h={body:p,headers:new Headers(e.headers),method:l,credentials:i};this.config?.cache&&(h.cache=this.config.cache),p&&(h.duplex="half"),"undefined"!=typeof AbortController&&(h.signal=t),O.supported&&(h.keepalive=n),"function"==typeof this.config.requestInit&&Object.assign(h,this.config.requestInit(e));let m=()=>{};const g=A(d,h),f=[fetch(g).then((e=>{const t=e.headers,s={};for(const e of t.entries())s[e[0]]=e[1];return null!=e.body?{response:new b({headers:s,reason:e.statusText,statusCode:e.status,body:e.body})}:e.blob().then((t=>({response:new b({headers:s,reason:e.statusText,statusCode:e.status,body:t})})))})),x(r)];return t&&f.push(new Promise(((e,s)=>{const r=()=>{const e=new Error("Request aborted");e.name="AbortError",s(e)};if("function"==typeof t.addEventListener){const e=t;e.addEventListener("abort",r,{once:!0}),m=()=>e.removeEventListener("abort",r)}else t.onabort=r}))),Promise.race(f).finally(m)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((s=>(s[e]=t,s)))}httpHandlerConfigs(){return this.config??{}}}const $="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L=Object.entries($).reduce(((e,t)=>{let[s,r]=t;return e[r]=Number(s),e}),{}),k=$.split(""),M=6,N=8,U=63,_=e=>{let t=e.length/4*3;"=="===e.slice(-2)?t-=2:"="===e.slice(-1)&&t--;const s=new ArrayBuffer(t),r=new DataView(s);for(let t=0;t<e.length;t+=4){let s=0,n=0;for(let r=t,i=t+3;r<=i;r++)if("="!==e[r]){if(!(e[r]in L))throw new TypeError(`Invalid character ${e[r]} in base64 string.`);s|=L[e[r]]<<(i-r)*M,n+=M}else s>>=M;const i=t/4*3;s>>=n%N;const o=Math.floor(n/N);for(let e=0;e<o;e++){const t=(o-e-1)*N;r.setUint8(i+e,(s&255<<t)>>t)}}return new Uint8Array(s)},G=e=>(new TextEncoder).encode(e);function F(e){let t;t="string"==typeof e?G(e):e;const s="object"==typeof t&&"number"==typeof t.length,r="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!s&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let n="";for(let e=0;e<t.length;e+=3){let s=0,r=0;for(let n=e,i=Math.min(e+3,t.length);n<i;n++)s|=t[n]<<(i-n-1)*N,r+=N;const i=Math.ceil(r/M);s<<=i*M-r;for(let e=1;e<=i;e++){const t=(i-e)*M;n+=k[(s&U<<t)>>t]}n+="==".slice(0,4-i)}return n}const B=async e=>"function"==typeof Blob&&e instanceof Blob||"Blob"===e.constructor?.name?void 0!==Blob.prototype.arrayBuffer?new Uint8Array(await e.arrayBuffer()):z(e):j(e);async function z(e){const t=await H(e),s=_(t);return new Uint8Array(s)}async function j(e){const t=[],s=e.getReader();let r=!1,n=0;for(;!r;){const{done:e,value:i}=await s.read();i&&(t.push(i),n+=i.length),r=e}const i=new Uint8Array(n);let o=0;for(const e of t)i.set(e,o),o+=e.length;return i}function H(e){return new Promise(((t,s)=>{const r=new FileReader;r.onloadend=()=>{if(2!==r.readyState)return s(new Error("Reader aborted too early"));const e=r.result??"",n=e.indexOf(","),i=n>-1?n+1:e.length;t(e.substring(i))},r.onabort=()=>s(new Error("Read aborted")),r.onerror=()=>s(r.error),r.readAsDataURL(e)}))}const q=(e,t)=>{const s=[];if(e&&s.push(e),t)for(const e of t)s.push(e);return s},V=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,W=()=>{let e=[],t=[],s=!1;const r=new Set,n=e=>e.sort(((e,t)=>K[t.step]-K[e.step]||Q[t.priority||"normal"]-Q[e.priority||"normal"])),i=s=>{let n=!1;const i=e=>{const t=q(e.name,e.aliases);if(t.includes(s)){n=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(i),t=t.filter(i),n},o=s=>{let n=!1;const i=e=>{if(e.middleware===s){n=!0;for(const t of q(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(i),t=t.filter(i),n},a=s=>(e.forEach((e=>{s.add(e.middleware,{...e})})),t.forEach((e=>{s.addRelativeTo(e.middleware,{...e})})),s.identifyOnResolve?.(l.identifyOnResolve()),s),c=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...c(e))})),t},u=function(){let s=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const r=[],i=[],o={};return e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of q(t.name,t.aliases))o[e]=t;r.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of q(t.name,t.aliases))o[e]=t;i.push(t)})),i.forEach((e=>{if(e.toMiddleware){const t=o[e.toMiddleware];if(void 0===t){if(s)return;throw new Error(`${e.toMiddleware} is not found when adding ${V(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}})),n(r).map(c).reduce(((e,t)=>(e.push(...t),e)),[])},l={add:function(t){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{name:n,override:i,aliases:o}=s,a={step:"initialize",priority:"normal",middleware:t,...s},c=q(n,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!i)throw new Error(`Duplicate middleware name '${V(n,o)}'`);for(const t of c){const s=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===s)continue;const r=e[s];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${V(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${V(n,o)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(s,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,s)=>{const{name:n,override:i,aliases:o}=s,a={middleware:e,...s},c=q(n,o);if(c.length>0){if(c.some((e=>r.has(e)))){if(!i)throw new Error(`Duplicate middleware name '${V(n,o)}'`);for(const e of c){const s=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===s)continue;const r=t[s];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${V(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${V(n,o)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(s,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>a(W()),use:e=>{e.applyToStack(l)},remove:e=>"string"==typeof e?i(e):o(e),removeByTag:s=>{let n=!1;const i=e=>{const{tags:t,name:i,aliases:o}=e;if(t&&t.includes(s)){const e=q(i,o);for(const t of e)r.delete(t);return n=!0,!1}return!0};return e=e.filter(i),t=t.filter(i),n},concat:e=>{const t=a(W());return t.use(e),t.identifyOnResolve(s||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:a,identify:()=>u(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return V(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(s=e),s),resolve:(e,t)=>{for(const s of u().map((e=>e.middleware)).reverse())e=s(e,t);return s&&console.log(l.identify()),e}};return l},K={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Q={high:3,normal:2,low:1};class Z{config;middlewareStack=(()=>W())();initConfig;handlers;constructor(e){this.config=e;const{protocol:t,protocolSettings:s}=e;s&&"function"==typeof t&&(e.protocol=new t(s))}send(e,t,s){const r="function"!=typeof t?t:void 0,n="function"==typeof t?t:s;let i;if(void 0===r&&!0===this.config.cacheMiddleware){this.handlers||(this.handlers=new WeakMap);const t=this.handlers;t.has(e.constructor)?i=t.get(e.constructor):(i=e.resolveMiddleware(this.middlewareStack,this.config,r),t.set(e.constructor,i))}else delete this.handlers,i=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!n)return i(e).then((e=>e.output));i(e).then((e=>n(null,e.output)),(e=>n(e))).catch((()=>{}))}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const Y=e=>(new TextEncoder).encode(e),J=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)};class X extends Uint8Array{static fromString(e){if("string"==typeof e)return"base64"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8")?X.mutate(_(e)):X.mutate(Y(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,X.prototype),e}transformToString(){return"base64"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"utf-8")?F(this):J(this)}}const ee={},te={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),ee[e]=t,te[t]=e}function se(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 s=0;s<e.length;s+=2){const r=e.slice(s,s+2).toLowerCase();if(!(r in te))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[s/2]=te[r]}return t}function re(e){let t="";for(let s=0;s<e.byteLength;s++)t+=ee[e[s]];return t}const ne=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array,t=arguments.length>1?arguments[1]:void 0;if(e instanceof Uint8Array)return X.mutate(e);if(!e)return X.mutate(new Uint8Array);const s=t.streamCollector(e);return X.mutate(await s)},ie=e=>"function"==typeof e?e():e,oe=e=>e[E]||(e[E]={}),ae=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},ce=(e,t,s,r,n)=>({name:t,namespace:e,traits:s,input:r,output:n}),ue=e=>(t,s)=>async r=>{const{response:n}=await t(r),{operationSchema:i}=oe(s),[,o,a,c,u,l]=i??[];try{return{response:n,output:await e.protocol.deserializeResponse(ce(o,a,c,u,l),{...e,...s},n)}}catch(e){if(Object.defineProperty(e,"$response",{value:n,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{e.message+="\n "+t}catch(e){s.logger&&"NoOpLogger"!==s.logger?.constructor?.name?s.logger?.warn?.(t):console.warn(t)}void 0!==e.$responseBodyText&&e.$response&&(e.$response.body=e.$responseBodyText);try{if(b.isInstance(n)){const{headers:t={}}=n,s=Object.entries(t);e.$metadata={httpStatusCode:n.statusCode,requestId:le(/^x-[\w-]+-request-?id$/,s),extendedRequestId:le(/^x-[\w-]+-id-2$/,s),cfId:le(/^x-[\w-]+-cf-id$/,s)}}}catch(e){}}throw e}},le=(e,t)=>(t.find((t=>{let[s]=t;return s.match(e)}))||[void 0,void 0])[1],de=e=>(t,s)=>async r=>{const{operationSchema:n}=oe(s),[,i,o,a,c,u]=n??[],l=s.endpointV2?.url&&e.urlParser?async()=>e.urlParser(s.endpointV2.url):e.endpoint,d=await e.protocol.serializeRequest(ce(i,o,a,c,u),r.input,{...e,...s,endpoint:l});return t({...r,request:d})},pe={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},he={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function me(e){return{applyToStack:t=>{t.add(de(e),he),t.add(ue(e),pe),e.protocol.setSerdeContext(e)}}}function ge(e){if("object"==typeof e)return e;e|=0;const t={};let s=0;for(const r of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])1==(e>>s++&1)&&(t[r]=1);return t}const fe={it:Symbol.for("@smithy/nor-struct-it")};class ye{ref;memberName;static symbol=(()=>Symbol.for("@smithy/nor"))();symbol=(()=>ye.symbol)();name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e,this.memberName=t;const s=[];let r=e,n=e;for(this._isMemberSchema=!1;Re(r);)s.push(r[1]),r=r[0],n=ie(r),this._isMemberSchema=!0;if(s.length>0){this.memberTraits={};for(let e=s.length-1;e>=0;--e){const t=s[e];Object.assign(this.memberTraits,ge(t))}}else this.memberTraits=0;if(n instanceof ye){const e=this.memberTraits;return Object.assign(this,n),this.memberTraits=Object.assign({},e,n.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,void(this.memberName=t??n.memberName)}if(this.schema=ie(n),we(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(n),this.traits=0),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);return t||"object"!=typeof e||null===e?t:e.symbol===this.symbol}static of(e){const t=ie(e);if(t instanceof ye)return t;if(Re(t)){const[s,r]=t;if(s instanceof ye)return Object.assign(s.getMergedTraits(),ge(r)),s;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new ye(t)}getSchema(){const e=this.schema;return Array.isArray(e)&&0===e[0]?e[4]:e}getName(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=64&&e<128:1===e[0]}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=128&&e<=255:2===e[0]}isStructSchema(){const e=this.getSchema();if("object"!=typeof e)return!1;const t=e[0];return 3===t||-3===t||4===t}isUnionSchema(){const e=this.getSchema();return"object"==typeof e&&4===e[0]}isBlobSchema(){const e=this.getSchema();return 21===e||42===e}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=4&&e<=7}isUnitSchema(){return"unit"===this.getSchema()}isDocumentSchema(){return 15===this.getSchema()}isStringSchema(){return 0===this.getSchema()}isBooleanSchema(){return 2===this.getSchema()}isNumericSchema(){return 1===this.getSchema()}isBigIntegerSchema(){return 17===this.getSchema()}isBigDecimalSchema(){return 19===this.getSchema()}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||42===this.getSchema()}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return ge(this.memberTraits)}getOwnTraits(){return ge(this.traits)}getKeySchema(){const[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const s=this.getSchema();return Se([e?15:s[4]??0,0],"key")}getValueSchema(){const e=this.getSchema(),[t,s,r]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],n="number"==typeof e?63&e:e&&"object"==typeof e&&(s||r)?e[3+e[0]]:t?15:void 0;if(null!=n)return Se([n,0],s?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){const s=t[4].indexOf(e),r=t[5][s];return Se(Re(r)?r:[r,0],e)}if(this.isDocumentSchema())return Se([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[t,s]of this.structIterator())e[t]=s}catch(e){}return e}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e;return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema(),t=e[4].length;let s=e[fe.it];if(s&&t===s.length)yield*s;else{s=Array(t);for(let r=0;r<t;++r){const t=e[4][r],n=Se([e[5][r],0],t);yield s[r]=[t,n]}e[fe.it]=s}}}function Se(e,t){return e instanceof ye?Object.assign(e,{memberName:t,_isMemberSchema:!0}):new ye(e,t)}const Re=e=>Array.isArray(e)&&2===e.length,we=e=>Array.isArray(e)&&e.length>=5;class Ee{namespace;schemas;exceptions;static registries=(()=>new Map)();constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Map,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map;this.namespace=e,this.schemas=t,this.exceptions=s}static for(e){return Ee.registries.has(e)||Ee.registries.set(e,new Ee(e)),Ee.registries.get(e)}register(e,t){const s=this.normalizeShapeId(e);Ee.for(s.split("#")[0]).schemas.set(s,t)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}registerError(e,t){const s=e,r=Ee.for(s[1]);r.schemas.set(s[1]+"#"+s[2],s),r.exceptions.set(s,t)}getErrorCtor(e){const t=e;return Ee.for(t[1]).exceptions.get(t)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,t,s]=e,r=t+"#"+s;if(r.startsWith("smithy.ts.sdk.synthetic.")&&r.endsWith("ServiceException"))return e}}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}const Ce=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Ue.warn(Ne(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},ve=Math.ceil(2**127*(2-2**-23)),be=e=>{const t=Ce(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>ve)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},Te=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},Pe=e=>Ae(e,16),Ie=e=>Ae(e,8),Ae=(e,t)=>{const s=Te(e);if(void 0!==s&&xe(s,t)!==s)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return s},xe=(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]}},Oe=e=>Ce("string"==typeof e?Le(e):e),De=e=>be("string"==typeof e?Le(e):e),$e=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Le=e=>{const t=e.match($e);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},ke=e=>Pe("string"==typeof e?Le(e):e),Me=e=>Ie("string"==typeof e?Le(e):e),Ne=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),Ue={warn:console.warn},_e=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Ge=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Fe(e){const t=e.getUTCFullYear(),s=e.getUTCMonth(),r=e.getUTCDay(),n=e.getUTCDate(),i=e.getUTCHours(),o=e.getUTCMinutes(),a=e.getUTCSeconds(),c=n<10?`0${n}`:`${n}`,u=i<10?`0${i}`:`${i}`,l=o<10?`0${o}`:`${o}`,d=a<10?`0${a}`:`${a}`;return`${_e[r]}, ${c} ${Ge[s]} ${t} ${u}:${l}:${d} GMT`}const Be=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),ze=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Be.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[s,r,n,i,o,a,c,u,l]=t,d=ke(it(r)),p=st(n,"month",1,12),h=st(i,"day",1,31),m=Ke(d,p,h,{hours:o,minutes:a,seconds:c,fractionalMilliseconds:u});return"Z"!=l.toUpperCase()&&m.setTime(m.getTime()-nt(l)),m},je=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),He=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),qe=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Ve=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=je.exec(e);if(t){const[e,s,r,n,i,o,a,c]=t;return Ke(ke(it(n)),Je(r),st(s,"day",1,31),{hours:i,minutes:o,seconds:a,fractionalMilliseconds:c})}if(t=He.exec(e),t){const[e,s,r,n,i,o,a,c]=t;return Ye(Ke(Qe(n),Je(r),st(s,"day",1,31),{hours:i,minutes:o,seconds:a,fractionalMilliseconds:c}))}if(t=qe.exec(e),t){const[e,s,r,n,i,o,a,c]=t;return Ke(ke(it(c)),Je(s),st(r.trimLeft(),"day",1,31),{hours:n,minutes:i,seconds:o,fractionalMilliseconds:a})}throw new TypeError("Invalid RFC-7231 date-time value")},We=e=>{if(null==e)return;let t;if("number"==typeof e)t=e;else if("string"==typeof e)t=Oe(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))},Ke=(e,t,s,r)=>{const n=t-1;return et(e,n,s),new Date(Date.UTC(e,n,s,st(r.hours,"hour",0,23),st(r.minutes,"minute",0,59),st(r.seconds,"seconds",0,60),rt(r.fractionalMilliseconds)))},Qe=e=>{const t=(new Date).getUTCFullYear(),s=100*Math.floor(t/100)+ke(it(e));return s<t?s+100:s},Ze=15768e8,Ye=e=>e.getTime()-(new Date).getTime()>Ze?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Je=e=>{const t=Ge.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Xe=[31,28,31,30,31,30,31,31,30,31,30,31],et=(e,t,s)=>{let r=Xe[t];if(1===t&&tt(e)&&(r=29),s>r)throw new TypeError(`Invalid day for ${Ge[t]} in ${e}: ${s}`)},tt=e=>e%4==0&&(e%100!=0||e%400==0),st=(e,t,s,r)=>{const n=Me(it(e));if(n<s||n>r)throw new TypeError(`${t} must be between ${s} and ${r}, inclusive`);return n},rt=e=>null==e?0:1e3*De("0."+e),nt=e=>{const t=e[0];let s=1;if("+"==t)s=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);s=-1}return s*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},it=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)},ot="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),at=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0"))),ct=()=>{if(ot)return ot();const e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128,at[e[0]]+at[e[1]]+at[e[2]]+at[e[3]]+"-"+at[e[4]]+at[e[5]]+"-"+at[e[6]]+at[e[7]]+"-"+at[e[8]]+at[e[9]]+"-"+at[e[10]]+at[e[11]]+at[e[12]]+at[e[13]]+at[e[14]]+at[e[15]]},ut=function(e){return Object.assign(new String(e),{deserializeJSON:()=>JSON.parse(String(e)),toString:()=>String(e),toJSON:()=>String(e)})};ut.from=e=>e&&"object"==typeof e&&(e instanceof ut||"deserializeJSON"in e)?e:"string"==typeof e||Object.getPrototypeOf(e)===String.prototype?ut(String(e)):ut(JSON.stringify(e)),ut.fromObject=ut.from;const lt=/^-?\d*(\.\d+)?$/;class dt{string;type;constructor(e,t){if(this.string=e,this.type=t,!lt.test(e))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||"object"!=typeof e)return!1;const t=e;return dt.prototype.isPrototypeOf(e)||"bigDecimal"===t.type&&lt.test(t.string)}}class pt{serdeContext;setSerdeContext(e){this.serdeContext=e}}class ht extends pt{options;constructor(e){super(),this.options=e}getRequestType(){return C}getResponseType(){return b}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if("url"in t){e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,e.query||(e.query={});for(const[s,r]of t.url.searchParams.entries())e.query[s]=r;return e}return e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},e}setHostPrefix(e,t,s){if(this.serdeContext?.disableHostPrefix)return;const r=ye.of(t.input),n=ge(t.traits??{});if(n.endpoint){let t=n.endpoint?.[0];if("string"==typeof t){const n=[...r.structIterator()].filter((e=>{let[,t]=e;return t.getMergedTraits().hostLabel}));for(const[e]of n){const r=s[e];if("string"!=typeof r)throw new Error(`@smithy/core/schema - ${e} in input must be a string as hostLabel.`);t=t.replace(`{${e}}`,r)}e.hostname=t+e.hostname}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}}async serializeEventStream(e){let{eventStream:t,requestSchema:s,initialRequest:r}=e;return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:t,requestSchema:s,initialRequest:r})}async deserializeEventStream(e){let{response:t,responseSchema:s,initialResponseContainer:r}=e;return(await this.loadEventStreamCapability()).deserializeEventStream({response:t,responseSchema:s,initialResponseContainer:r})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await Promise.resolve().then((function(){return Gu}));return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,s,r,n){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class mt extends ht{async serializeRequest(e,t,s){const r=this.serializer,n={},i={},o=await s.endpoint(),a=ye.of(e?.input),c=a.getSchema();let u;const l=new C({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:n,headers:i,body:void 0});o&&(this.updateServiceEndpoint(l,o),this.setHostPrefix(l,e,t));const d={...t};if(t){const e=a.getEventStreamMember();if(e){if(d[e]){const t={};for(const[s,n]of a.structIterator())s!==e&&d[s]&&(r.write(n,d[s]),t[s]=r.flush());u=await this.serializeEventStream({eventStream:d[e],requestSchema:a,initialRequest:t})}}else r.write(c,d),u=r.flush()}return l.headers=i,l.query=n,l.body=u,l.method="POST",l}async deserializeResponse(e,t,s){const r=this.deserializer,n=ye.of(e.output),i={};if(s.statusCode>=300){const n=await ne(s.body,t);throw n.byteLength>0&&Object.assign(i,await r.read(15,n)),await this.handleError(e,t,s,i,this.deserializeMetadata(s)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const e in s.headers){const t=s.headers[e];delete s.headers[e],s.headers[e.toLowerCase()]=t}const o=n.getEventStreamMember();if(o)i[o]=await this.deserializeEventStream({response:s,responseSchema:n,initialResponseContainer:i});else{const e=await ne(s.body,t);e.byteLength>0&&Object.assign(i,await r.read(n,e))}return i.$metadata=this.deserializeMetadata(s),i}}const gt=e=>(new TextEncoder).encode(e),ft=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 yt(e,t){if(t.timestampFormat.useTrait&&e.isTimestampSchema()&&(5===e.getSchema()||6===e.getSchema()||7===e.getSchema()))return e.getSchema();const{httpLabel:s,httpPrefixHeaders:r,httpHeader:n,httpQuery:i}=e.getMergedTraits();return(t.httpBindings?"string"==typeof r||Boolean(n)?6:Boolean(i)||Boolean(s)?5:void 0:void 0)??t.timestampFormat.default}const St="***SensitiveInformation***";function Rt(e,t){if(null==t)return t;const s=ye.of(e);if(s.getMergedTraits().sensitive)return St;if(s.isListSchema()){if(s.getValueSchema().getMergedTraits().sensitive)return St}else if(s.isMapSchema()){if(s.getKeySchema().getMergedTraits().sensitive||s.getValueSchema().getMergedTraits().sensitive)return St}else if(s.isStructSchema()&&"object"==typeof t){const e=t,r={};for(const[t,n]of s.structIterator())null!=e[t]&&(r[t]=Rt(n,e[t]));return r}return t}class wt{middlewareStack=(()=>W())();schema;static classBuilder(){return new Et}resolveMiddlewareWithContext(e,t,s,r){let{middlewareFn:n,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,smithyContext:u,additionalContext:l,CommandCtor:d}=r;for(const r of n.bind(this)(d,e,t,s))this.middlewareStack.use(r);const p=e.concat(this.middlewareStack),{logger:h}=t,m={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:a,outputFilterSensitiveLog:c,[E]:{commandInstance:this,...u},...l},{requestHandler:g}=t;return p.resolve((e=>g.handle(e.request,s||{})),m)}}class Et{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._smithyContext={service:e,operation:t,...s},this}c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>e,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends wt{input;static getEndpointParameterInstructions(){return e._ep}constructor(){for(var t=arguments.length,s=new Array(t),r=0;r<t;r++)s[r]=arguments[r];let[n]=s;super(),this.input=n??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(s,r,n){const i=e._operationSchema,o=i?.[4]??i?.input,a=i?.[5]??i?.output;return this.resolveMiddlewareWithContext(s,r,n,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(i?Rt.bind(null,o):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(i?Rt.bind(null,a):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=(()=>e._serializer)();deserialize=(()=>e._deserializer)()}}}class Ct extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Ct.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Ct?Ct.isInstance(e):!!Ct.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}const vt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.entries(t).filter((e=>{let[,t]=e;return void 0!==t})).forEach((t=>{let[s,r]=t;null!=e[s]&&""!==e[s]||(e[s]=r)}));const s=e.message||e.Message||"UnknownError";return e.message=s,delete e.Message,e},bt=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{}}},Tt=e=>{const t=[];for(const s in w){const r=w[s];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(e){t.push(e)},checksumAlgorithms:()=>t}},Pt=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},It=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy:()=>e.retryStrategy}),At=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},xt=e=>Object.assign(Tt(e),It(e)),Ot=e=>Object.assign(Pt(e),At(e));class Dt{trace(){}debug(){}info(){}warn(){}error(){}}const $t=(e,t)=>{if(!t||0===t.length)return e;const s=[];for(const r of t)for(const t of e)t.schemeId.split("#")[1]===r&&s.push(t);for(const t of e)s.find((e=>{let{schemeId:s}=e;return s===t.schemeId}))||s.push(t);return s};function Lt(e){const t=new Map;for(const s of e)t.set(s.schemeId,s);return t}const kt=(e,t)=>(s,r)=>async n=>{const i=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,n.input)),o=e.authSchemePreference?await e.authSchemePreference():[],a=$t(i,o),c=Lt(e.httpAuthSchemes),u=oe(r),l=[];for(const s of a){const n=c.get(s.schemeId);if(!n){l.push(`HttpAuthScheme \`${s.schemeId}\` was not enabled for this service.`);continue}const i=n.identityProvider(await t.identityProviderConfigProvider(e));if(!i){l.push(`HttpAuthScheme \`${s.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:o={},signingProperties:a={}}=s.propertiesExtractor?.(e,r)||{};s.identityProperties=Object.assign(s.identityProperties||{},o),s.signingProperties=Object.assign(s.signingProperties||{},a),u.selectedHttpAuthScheme={httpAuthOption:s,identity:await i(s.identityProperties),signer:n.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(l.join("\n"));return s(n)},Mt={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Nt=(e,t)=>{let{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:r}=t;return{applyToStack:t=>{t.addRelativeTo(kt(e,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:r}),Mt)}}},Ut={name:"serializerMiddleware"},_t=e=>e=>{throw e},Gt=(e,t)=>{},Ft=e=>(e,t)=>async s=>{if(!C.isInstance(s.request))return e(s);const r=oe(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:n={}},identity:i,signer:o}=r,a=await e({...s,request:await o.sign(s.request,i,n)}).catch((o.errorHandler||_t)(n));return(o.successHandler||Gt)(a.response,n),a},Bt={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},zt=e=>({applyToStack:e=>{e.addRelativeTo(Ft(),Bt)}}),jt=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};function Ht(e,t,s){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=s}class qt{authSchemes=(()=>new Map)();constructor(e){for(const[t,s]of Object.entries(e))void 0!==s&&this.authSchemes.set(t,s)}getIdentityProvider(e){return this.authSchemes.get(e)}}class Vt{async sign(e,t,s){return e}}const Wt=e=>function(t){return Zt(t)&&t.expiration.getTime()-Date.now()<e},Kt=3e5,Qt=Wt(Kt),Zt=e=>void 0!==e.expiration,Yt=(e,t,s)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let n,i,o,a=!1;const c=async e=>{i||(i=r(e));try{n=await i,o=!0,a=!1}finally{i=void 0}return n};return void 0===t?async e=>(o&&!e?.forceRefresh||(n=await c(e)),n):async e=>(o&&!e?.forceRefresh||(n=await c(e)),a?n:s(n)?t(n)?(await c(e),n):n:(a=!0,n))};function Jt(e,t,s,r){function n(e){return e instanceof s?e:new s((function(t){t(e)}))}return new(s||(s=Promise))((function(t,s){function i(e){try{a(r.next(e))}catch(e){s(e)}}function o(e){try{a(r.throw(e))}catch(e){s(e)}}function a(e){e.done?t(e.value):n(e.value).then(i,o)}a((r=r.apply(e,[])).next())}))}function Xt(e,t){var s,r,n,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(a){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(i=0)),i;)try{if(s=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!((n=(n=i.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){i.label=a[1];break}if(6===a[0]&&i.label<n[1]){i.label=n[1],n=a;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(a);break}n[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e],r=0}finally{s=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}"function"==typeof SuppressedError&&SuppressedError;var es=64,ts=32,ss=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]),rs=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],ns=Math.pow(2,53)-1,is=function(){function e(){this.state=Int32Array.from(rs),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,s=e.byteLength;if(this.bytesHashed+=s,8*this.bytesHashed>ns)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;s>0;)this.buffer[this.bufferLength++]=e[t++],s--,this.bufferLength===es&&(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),s=this.bufferLength;if(t.setUint8(this.bufferLength++,128),s%es>=es-8){for(var r=this.bufferLength;r<es;r++)t.setUint8(r,0);this.hashBuffer(),this.bufferLength=0}for(r=this.bufferLength;r<es-8;r++)t.setUint8(r,0);t.setUint32(es-8,Math.floor(e/4294967296),!0),t.setUint32(es-4,e),this.hashBuffer(),this.finished=!0}var n=new Uint8Array(ts);for(r=0;r<8;r++)n[4*r]=this.state[r]>>>24&255,n[4*r+1]=this.state[r]>>>16&255,n[4*r+2]=this.state[r]>>>8&255,n[4*r+3]=this.state[r]>>>0&255;return n},e.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,s=e.state,r=s[0],n=s[1],i=s[2],o=s[3],a=s[4],c=s[5],u=s[6],l=s[7],d=0;d<es;d++){if(d<16)this.temp[d]=(255&t[4*d])<<24|(255&t[4*d+1])<<16|(255&t[4*d+2])<<8|255&t[4*d+3];else{var p=this.temp[d-2],h=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,m=((p=this.temp[d-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;this.temp[d]=(h+this.temp[d-7]|0)+(m+this.temp[d-16]|0)}var g=(((a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7))+(a&c^~a&u)|0)+(l+(ss[d]+this.temp[d]|0)|0)|0,f=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&n^r&i^n&i)|0;l=u,u=c,c=a,a=o+g|0,o=i,i=n,n=r,r=g+f|0}s[0]+=r,s[1]+=n,s[2]+=i,s[3]+=o,s[4]+=a,s[5]+=c,s[6]+=u,s[7]+=l},e}();const os=e=>(new TextEncoder).encode(e);var as="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:os;function cs(e){return e instanceof Uint8Array?e:"string"==typeof e?as(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function us(e){return"string"==typeof e?0===e.length:0===e.byteLength}var ls=function(){function e(e){this.secret=e,this.hash=new is,this.reset()}return e.prototype.update=function(e){if(!us(e)&&!this.error)try{this.hash.update(cs(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 Jt(this,void 0,void 0,(function(){return Xt(this,(function(e){return[2,this.digestSync()]}))}))},e.prototype.reset=function(){if(this.hash=new is,this.secret){this.outer=new is;var e=ds(this.secret),t=new Uint8Array(es);t.set(e);for(var s=0;s<es;s++)e[s]^=54,t[s]^=92;for(this.hash.update(e),this.outer.update(t),s=0;s<e.byteLength;s++)e[s]=0}},e}();function ds(e){var t=cs(e);if(t.byteLength>es){var s=new is;s.update(t),t=s.digest()}var r=new Uint8Array(es);return r.set(t),r}var ps=function(e,t){var s={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(s[r[n]]=e[r[n]])}return s};const hs="X-Amz-Algorithm",ms="X-Amz-Date",gs="X-Amz-Credential",fs="X-Amz-Signature",ys="X-Amz-SignedHeaders",Ss="X-Amz-Security-Token",Rs="host",ws="aws4_request",Es="AWS4-HMAC-SHA256",Cs="AWS4",vs="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";class bs{static signUrl(e,t,s,r){let n;const i={body:n,method:"GET",url:new URL(e)},o=Ts(e,t,s,r);return Ps(i,o).toString()}}const Ts=(e,t,s,r)=>{const{access_key:n,secret_key:i,session_token:o}=null!=r?r:{};return{credentials:{accessKeyId:n,secretAccessKey:i,sessionToken:o},signingDate:new Date,signingRegion:t,signingService:s}},Ps=(e,t)=>{let{body:s,method:r="GET",url:n}=e;var i=ps(t,[]);const o=Is(i),{accessKeyId:a,credentialScope:c,longDate:u,sessionToken:l}=o,d=new URL(n);Object.entries(Object.assign({[hs]:Es,[gs]:`${a}/${c}`,[ms]:u,[ys]:Rs},l&&{[Ss]:l})).forEach((e=>{let[t,s]=e;d.searchParams.append(t,s)}));const p={body:s,headers:{[Rs]:n.host},method:r,url:d},h=Os(p,o);return d.searchParams.append(fs,h),d},Is=e=>{let{credentials:t,signingDate:s=new Date,signingRegion:r,signingService:n,uriEscapePath:i=!0}=e;const{accessKeyId:o,secretAccessKey:a,sessionToken:c}=t,{longDate:u,shortDate:l}=As(s);return{accessKeyId:o,credentialScope:xs(l,r,n),longDate:u,secretAccessKey:a,sessionToken:c,shortDate:l,signingRegion:r,signingService:n,uriEscapePath:i}},As=e=>{const t=e.toISOString().replace(/[:-]|\.\d{3}/g,"");return{longDate:t,shortDate:t.slice(0,8)}},xs=(e,t,s)=>`${e}/${t}/${s}/${ws}`,Os=(e,t)=>{let{credentialScope:s,longDate:r,secretAccessKey:n,shortDate:i,signingRegion:o,signingService:a,uriEscapePath:c}=t;const u=Ds(e,c),l=Fs(null,u),d=Bs(r,s,l);return Fs(zs(n,i,o,a),d)},Ds=function(e){let{body:t,headers:s,method:r,url:n}=e,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return[r,$s(n.pathname,i),Ls(n.searchParams),Ns(s),Us(s),_s()].join("\n")},$s=function(e){return e?arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?e:encodeURIComponent(e).replace(/%2F/g,"/"):"/"},Ls=e=>Array.from(e).sort(((e,t)=>{let[s,r]=e,[n,i]=t;return s===n?r<i?-1:1:s<n?-1:1})).map((e=>{let[t,s]=e;return`${ks(t)}=${ks(s)}`})).join("&"),ks=e=>encodeURIComponent(e).replace(/[!'()*]/g,Ms),Ms=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,Ns=e=>Object.entries(e).map((e=>{let[t,s]=e;var r;return{key:t.toLowerCase(),value:null!==(r=null==s?void 0:s.trim().replace(/\s+/g," "))&&void 0!==r?r:""}})).sort(((e,t)=>e.key<t.key?-1:1)).map((e=>`${e.key}:${e.value}\n`)).join(""),Us=e=>Object.keys(e).map((e=>e.toLowerCase())).sort().join(";"),_s=e=>vs,Gs=(e,t)=>{const s=new ls(null!=e?e:void 0);return s.update(t),s.digestSync()},Fs=(e,t)=>re(Gs(e,t)),Bs=(e,t,s)=>[Es,e,t,s].join("\n"),zs=(e,t,s,r)=>{const n=Gs(`${Cs}${e}`,t),i=Gs(n,s),o=Gs(i,r);return Gs(o,ws)};function js(e,t){return(s,r)=>{if(s.match(/^https:\/\/maps\.(geo|geo-fips)\.[a-z0-9-]+\.(amazonaws\.com|api\.aws)/)){const n=new URL(s).pathname.split("/").filter(Boolean);let i="geo-maps";if("v2"==(null==n?void 0:n[0])){if(!r||"Tile"!==r)return{url:s}}else i="geo";const o=t();return{url:bs.signUrl(s,e,i,{access_key:o.accessKeyId,secret_key:o.secretAccessKey,session_token:o.sessionToken})}}return{url:s}}}async function Hs(e){let t;async function s(){t=await e();let r=36e5;t.expiration&&(r=t.expiration.getTime()-(new Date).getTime()),setTimeout(s,r-6e4)}return await s(),()=>t}async function qs(e,t){const s=await Hs(e),r={credentials:e,region:t};return{getMapAuthenticationOptions:()=>({transformRequest:js(t,s)}),getLocationClientConfig:()=>r,getClientConfig:()=>r,getCredentials:s}}async function Vs(e,t){const s=e.split(":")[0];return qs(f(Object.assign(Object.assign({},t||{}),{identityPoolId:e,clientConfig:Object.assign(Object.assign({},t&&t.clientConfig?t.clientConfig:{}),{region:s})})),s)}function Ws(e,t){const s={signer:{sign:async t=>{var s;return t.query=Object.assign({key:e},null!==(s=t.query)&&void 0!==s?s:{}),t}},credentials:async()=>({})};return t&&(s.region=t),{getLocationClientConfig:()=>s,getClientConfig:()=>s}}async function Ks(e,t){return qs(e,t)}function Qs(e){return e}const Zs=e=>t=>async s=>{if(!C.isInstance(s.request))return t(s);const{request:r}=s,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(s)},Ys={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Js=e=>({applyToStack:t=>{t.add(Zs(e),Ys)}}),Xs=()=>(e,t)=>async s=>{try{const r=await e(s),{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,l=c??t.inputFilterSensitiveLog,d=u??t.outputFilterSensitiveLog,{$metadata:p,...h}=r.output;return o?.info?.({clientName:n,commandName:i,input:l(s.input),output:d(h),metadata:p}),r}catch(e){const{clientName:r,commandName:n,logger:i,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:a}=o,c=a??t.inputFilterSensitiveLog;throw i?.error?.({clientName:r,commandName:n,input:c(s.input),error:e,metadata:e.$metadata}),e}},er={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},tr=e=>({applyToStack:e=>{e.add(Xs(),er)}}),sr={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},rr=()=>e=>async t=>e(t),nr=e=>({applyToStack:e=>{e.add(rr(),sr)}}),ir=void 0;function or(e){return void 0===e||"string"==typeof e&&e.length<=50}function ar(e){const t=jt(e.userAgentAppId??ir),{customUserAgent:s}=e;return Object.assign(e,{customUserAgent:"string"==typeof s?[[s]]:s,userAgentAppId:async()=>{const s=await t();if(!or(s)){const t="NoOpLogger"!==e.logger?.constructor?.name&&e.logger?e.logger:console;"string"!=typeof s?t?.warn("userAgentAppId must be a string or undefined."):s.length>50&&t?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return s}})}class cr{capacity;data=(()=>new Map)();parameters=[];constructor(e){let{size:t,params:s}=e;this.capacity=t??50,s&&(this.parameters=s)}get(e,t){const s=this.hash(e);if(!1===s)return t();if(!this.data.has(s)){if(this.data.size>this.capacity+10){const e=this.data.keys();let t=0;for(;;){const{value:s,done:r}=e.next();if(this.data.delete(s),r||++t>10)break}}this.data.set(s,t())}return this.data.get(s)}size(){return this.data.size}hash(e){let t="";const{parameters:s}=this;if(0===s.length)return!1;for(const r of s){const s=String(e[r]??"");if(s.includes("|;"))return!1;t+=s+"|;"}return t}}const ur=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}$"),lr=e=>ur.test(e)||e.startsWith("[")&&e.endsWith("]"),dr=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),pr=function(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return dr.test(e);const t=e.split(".");for(const e of t)if(!pr(e))return!1;return!0},hr={},mr="endpoints";function gr(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${gr(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(gr).join(", ")})`:JSON.stringify(e,null,2)}class fr extends Error{constructor(e){super(e),this.name="EndpointError"}}const yr=(e,t)=>e===t,Sr=e=>{const t=e.split("."),s=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new fr(`Path: '${e}' does not end with ']'`);const n=r.slice(t+1,-1);if(Number.isNaN(parseInt(n)))throw new fr(`Invalid array index: '${n}' in path: '${e}'`);0!==t&&s.push(r.slice(0,t)),s.push(n)}else s.push(r)}return s},Rr=(e,t)=>Sr(t).reduce(((s,r)=>{if("object"!=typeof s)throw new fr(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(s)?s[parseInt(r)]:s[r]}),e),wr=e=>null!=e,Er=e=>!e,Cr={[R.HTTP]:80,[R.HTTPS]:443},vr=e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:s,protocol:r="",path:n="",query:i={}}=e,o=new URL(`${r}//${t}${s?`:${s}`:""}${n}`);return o.search=Object.entries(i).map((e=>{let[t,s]=e;return`${t}=${s}`})).join("&"),o}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 s=t.href,{host:r,hostname:n,pathname:i,protocol:o,search:a}=t;if(a)return null;const c=o.slice(0,-1);if(!Object.values(R).includes(c))return null;const u=lr(n);return{scheme:c,authority:`${r}${s.includes(`${r}:${Cr[c]}`)||"string"==typeof e&&e.includes(`${r}:${Cr[c]}`)?`:${Cr[c]}`:""}`,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:u}},br=(e,t)=>e===t,Tr=(e,t,s,r)=>t>=s||e.length<s?null:r?e.substring(e.length-s,e.length-t):e.substring(t,s),Pr=e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)),Ir={booleanEquals:yr,getAttr:Rr,isSet:wr,isValidHostLabel:pr,not:Er,parseURL:vr,stringEquals:br,substring:Tr,uriEncode:Pr},Ar=(e,t)=>{const s=[],r={...t.endpointParams,...t.referenceRecord};let n=0;for(;n<e.length;){const t=e.indexOf("{",n);if(-1===t){s.push(e.slice(n));break}s.push(e.slice(n,t));const i=e.indexOf("}",t);if(-1===i){s.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[i+1]&&(s.push(e.slice(t+1,i)),n=i+2);const o=e.substring(t+1,i);if(o.includes("#")){const[e,t]=o.split("#");s.push(Rr(r[e],t))}else s.push(r[o]);n=i+1}return s.join("")},xr=(e,t)=>{let{ref:s}=e;return{...t.endpointParams,...t.referenceRecord}[s]},Or=(e,t,s)=>{if("string"==typeof e)return Ar(e,s);if(e.fn)return $r.callFunction(e,s);if(e.ref)return xr(e,s);throw new fr(`'${t}': ${String(e)} is not a string, function or reference.`)},Dr=(e,t)=>{let{fn:s,argv:r}=e;const n=r.map((e=>["boolean","number"].includes(typeof e)?e:$r.evaluateExpression(e,"arg",t))),i=s.split(".");return i[0]in hr&&null!=i[1]?hr[i[0]][i[1]](...n):Ir[s](...n)},$r={evaluateExpression:Or,callFunction:Dr},Lr=(e,t)=>{let{assign:s,...r}=e;if(s&&s in t.referenceRecord)throw new fr(`'${s}' is already defined in Reference Record.`);const n=Dr(r,t);return t.logger?.debug?.(`${mr} evaluateCondition: ${gr(r)} = ${gr(n)}`),{result:""===n||!!n,...null!=s&&{toAssign:{name:s,value:n}}}},kr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;const s={};for(const r of e){const{result:e,toAssign:n}=Lr(r,{...t,referenceRecord:{...t.referenceRecord,...s}});if(!e)return{result:e};n&&(s[n.name]=n.value,t.logger?.debug?.(`${mr} assign: ${n.name} := ${gr(n.value)}`))}return{result:!0,referenceRecord:s}},Mr=(e,t)=>Object.entries(e).reduce(((e,s)=>{let[r,n]=s;return{...e,[r]:n.map((e=>{const s=Or(e,"Header value entry",t);if("string"!=typeof s)throw new fr(`Header '${r}' value '${s}' is not a string`);return s}))}}),{}),Nr=(e,t)=>Object.entries(e).reduce(((e,s)=>{let[r,n]=s;return{...e,[r]:_r.getEndpointProperty(n,t)}}),{}),Ur=(e,t)=>{if(Array.isArray(e))return e.map((e=>Ur(e,t)));switch(typeof e){case"string":return Ar(e,t);case"object":if(null===e)throw new fr(`Unexpected endpoint property: ${e}`);return _r.getEndpointProperties(e,t);case"boolean":return e;default:throw new fr("Unexpected endpoint property type: "+typeof e)}},_r={getEndpointProperty:Ur,getEndpointProperties:Nr},Gr=(e,t)=>{const s=Or(e,"Endpoint URL",t);if("string"==typeof s)try{return new URL(s)}catch(e){throw console.error(`Failed to construct URL with ${s}`,e),e}throw new fr("Endpoint URL must be a string, got "+typeof s)},Fr=(e,t)=>{const{conditions:s,endpoint:r}=e,{result:n,referenceRecord:i}=kr(s,t);if(!n)return;const o={...t,referenceRecord:{...t.referenceRecord,...i}},{url:a,properties:c,headers:u}=r;return t.logger?.debug?.(`${mr} Resolving endpoint from template: ${gr(r)}`),{...null!=u&&{headers:Mr(u,o)},...null!=c&&{properties:Nr(c,o)},url:Gr(a,o)}},Br=(e,t)=>{const{conditions:s,error:r}=e,{result:n,referenceRecord:i}=kr(s,t);if(n)throw new fr(Or(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...i}}))},zr=(e,t)=>{for(const s of e)if("endpoint"===s.type){const e=Fr(s,t);if(e)return e}else if("error"===s.type)Br(s,t);else{if("tree"!==s.type)throw new fr(`Unknown endpoint rule: ${s}`);{const e=Hr.evaluateTreeRule(s,t);if(e)return e}}throw new fr("Rules evaluation failed")},jr=(e,t)=>{const{conditions:s,rules:r}=e,{result:n,referenceRecord:i}=kr(s,t);if(n)return Hr.evaluateRules(r,{...t,referenceRecord:{...t.referenceRecord,...i}})},Hr={evaluateRules:zr,evaluateTreeRule:jr},qr=(e,t)=>{const{endpointParams:s,logger:r}=t,{parameters:n,rules:i}=e;t.logger?.debug?.(`${mr} Initial EndpointParams: ${gr(s)}`);const o=Object.entries(n).filter((e=>{let[,t]=e;return null!=t.default})).map((e=>{let[t,s]=e;return[t,s.default]}));if(o.length>0)for(const[e,t]of o)s[e]=s[e]??t;const a=Object.entries(n).filter((e=>{let[,t]=e;return t.required})).map((e=>{let[t]=e;return t}));for(const e of a)if(null==s[e])throw new fr(`Missing required parameter: '${e}'`);const c=zr(i,{endpointParams:s,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${mr} Resolved endpoint: ${gr(c)}`),c},Vr=function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){for(const t of e.split("."))if(!Vr(t))return!1;return!0}return!(!pr(e)||e.length<3||e.length>63||e!==e.toLowerCase()||lr(e))},Wr=":",Kr="/",Qr=e=>{const t=e.split(Wr);if(t.length<6)return null;const[s,r,n,i,o,...a]=t;return"arn"!==s||""===r||""===n||""===a.join(Wr)?null:{partition:r,service:n,region:i,accountId:o,resourceId:a.map((e=>e.split(Kr))).flat()}};var Zr=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Yr={partitions:Zr};let Jr=Yr;const Xr=e=>{const{partitions:t}=Jr;for(const s of t){const{regions:t,outputs:r}=s;for(const[s,n]of Object.entries(t))if(s===e)return{...r,...n}}for(const s of t){const{regionRegex:t,outputs:r}=s;if(new RegExp(t).test(e))return{...r}}const s=t.find((e=>"aws"===e.id));if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},en={isVirtualHostableS3Bucket:Vr,parseArn:Qr,partition:Xr};function tn(e){const t={};if(e=e.replace(/^\?/,""))for(const s of e.split("&")){let[e,r=null]=s.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}hr.aws=en;const sn=e=>{if("string"==typeof e)return sn(new URL(e));const{hostname:t,pathname:s,port:r,protocol:n,search:i}=e;let o;return i&&(o=tn(i)),{hostname:t,port:r?parseInt(r):void 0,protocol:n,path:s,query:o}};function rn(e,t,s){return e.$source||(e.$source={}),e.$source[t]=s,e}function nn(e,t,s){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]=s}const on=e=>b.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,an=e=>new Date(Date.now()+e),cn=(e,t)=>Math.abs(an(t).getTime()-e)>=3e5,un=(e,t)=>{const s=Date.parse(e);return cn(s,t)?s-Date.now():t},ln=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},dn=async e=>{const t=ln("context",e.context),s=ln("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],n=ln("signer",s.signer),i=await n(r),o=e?.signingRegion,a=e?.signingRegionSet,c=e?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:c}};class pn{async sign(e,t,s){if(!C.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const r=await dn(s),{config:n,signer:i}=r;let{signingRegion:o,signingName:a}=r;const c=s.context;if(c?.authSchemes?.length){const[e,t]=c.authSchemes;"sigv4a"===e?.name&&"sigv4"===t?.name&&(o=t?.signingRegion??o,a=t?.signingName??a)}return await i.sign(e,{signingDate:an(n.systemClockOffset),signingRegion:o,signingService:a})}errorHandler(e){return t=>{const s=t.ServerTime??on(t.$response);if(s){const r=ln("config",e.config),n=r.systemClockOffset;r.systemClockOffset=un(s,r.systemClockOffset),r.systemClockOffset!==n&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const s=on(e);if(s){const e=ln("config",t.config);e.systemClockOffset=un(s,e.systemClockOffset)}}}const hn=e=>(new TextEncoder).encode(e),mn=e=>"string"==typeof e?hn(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),gn="X-Amz-Algorithm",fn="X-Amz-Credential",yn="X-Amz-Date",Sn="X-Amz-SignedHeaders",Rn="X-Amz-Expires",wn="X-Amz-Signature",En="X-Amz-Security-Token",Cn="authorization",vn=yn.toLowerCase(),bn="date",Tn=[Cn,vn,bn],Pn=wn.toLowerCase(),In="x-amz-content-sha256",An=En.toLowerCase(),xn={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},On=/^proxy-/,Dn=/^sec-/,$n="AWS4-HMAC-SHA256",Ln="AWS4-HMAC-SHA256-PAYLOAD",kn="UNSIGNED-PAYLOAD",Mn=50,Nn="aws4_request",Un=604800,_n={},Gn=[],Fn=(e,t,s)=>`${e}/${t}/${s}/${Nn}`,Bn=async(e,t,s,r,n)=>{const i=`${s}:${r}:${n}:${re(await zn(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(i in _n)return _n[i];for(Gn.push(i);Gn.length>Mn;)delete _n[Gn.shift()];let o=`AWS4${t.secretAccessKey}`;for(const t of[s,r,n,Nn])o=await zn(e,o,t);return _n[i]=o},zn=(e,t,s)=>{const r=new e(t);return r.update(mn(s)),r.digest()},jn=(e,t,s)=>{let{headers:r}=e;const n={};for(const e of Object.keys(r).sort()){if(null==r[e])continue;const i=e.toLowerCase();(i in xn||t?.has(i)||On.test(i)||Dn.test(i))&&(!s||s&&!s.has(i))||(n[i]=r[e].trim().replace(/\s+/g," "))}return n},Hn=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e),qn=async(e,t)=>{let{headers:s,body:r}=e;for(const e of Object.keys(s))if(e.toLowerCase()===In)return s[e];if(null==r)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof r||ArrayBuffer.isView(r)||Hn(r)){const e=new t;return e.update(mn(r)),re(await e.digest())}return kn};class Vn{format(e){const t=[];for(const s of Object.keys(e)){const r=hn(s);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[s]))}const s=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)s.set(e,r),r+=e.byteLength;return s}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 s=new DataView(new ArrayBuffer(5));return s.setUint8(0,4),s.setInt32(1,e.value,!1),new Uint8Array(s.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const n=new DataView(new ArrayBuffer(3+e.value.byteLength));n.setUint8(0,6),n.setUint16(1,e.value.byteLength,!1);const i=new Uint8Array(n.buffer);return i.set(e.value,3),i;case"string":const o=hn(e.value),a=new DataView(new ArrayBuffer(3+o.byteLength));a.setUint8(0,7),a.setUint16(1,o.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(o,3),c;case"timestamp":const u=new Uint8Array(9);return u[0]=8,u.set(Qn.fromNumber(e.value.valueOf()).bytes,1),u;case"uuid":if(!Kn.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const l=new Uint8Array(17);return l[0]=9,l.set(se(e.value.replace(/\-/g,"")),1),l}}}var Wn;!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"}(Wn||(Wn={}));const Kn=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Qn{bytes;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 s=7,r=Math.abs(Math.round(e));s>-1&&r>0;s--,r/=256)t[s]=r;return e<0&&Zn(t),new Qn(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Zn(e),parseInt(re(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Zn(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}const Yn=(e,t)=>{e=e.toLowerCase();for(const s of Object.keys(t))if(e===s.toLowerCase())return!0;return!1},Jn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{headers:s,query:r={}}=C.clone(e);for(const e of Object.keys(s)){const n=e.toLowerCase();("x-amz-"===n.slice(0,6)&&!t.unhoistableHeaders?.has(n)||t.hoistableHeaders?.has(n))&&(r[e]=s[e],delete s[e])}return{...e,headers:s,query:r}},Xn=e=>{e=C.clone(e);for(const t of Object.keys(e.headers))Tn.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},ei=e=>{let{query:t={}}=e;const s=[],r={};for(const e of Object.keys(t)){if(e.toLowerCase()===Pn)continue;const n=T(e);s.push(n);const i=t[e];"string"==typeof i?r[n]=`${n}=${T(i)}`:Array.isArray(i)&&(r[n]=i.slice(0).reduce(((e,t)=>e.concat([`${n}=${T(t)}`])),[]).sort().join("&"))}return s.sort().map((e=>r[e])).filter((e=>e)).join("&")},ti=e=>si(e).toISOString().replace(/\.\d{3}Z$/,"Z"),si=e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e;class ri{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor(e){let{applyChecksum:t,credentials:s,region:r,service:n,sha256:i,uriEscapePath:o=!0}=e;this.service=n,this.sha256=i,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof t||t,this.regionProvider=ae(r),this.credentialProvider=ae(s)}createCanonicalRequest(e,t,s){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${ei(e)}\n${r.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${r.join(";")}\n${s}`}async createStringToSign(e,t,s,r){const n=new this.sha256;return n.update(mn(s)),`${r}\n${e}\n${t}\n${re(await n.digest())}`}getCanonicalPath(e){let{path:t}=e;if(this.uriEscapePath){const e=[];for(const s of t.split("/"))0!==s?.length&&"."!==s&&(".."===s?e.pop():e.push(s));const s=`${t?.startsWith("/")?"/":""}${e.join("/")}${e.length>0&&t?.endsWith("/")?"/":""}`;return T(s).replace(/%2F/g,"/")}return t}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}formatDate(e){const t=ti(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class ni extends ri{headerFormatter=(()=>new Vn)();constructor(e){let{applyChecksum:t,credentials:s,region:r,service:n,sha256:i,uriEscapePath:o=!0}=e;super({applyChecksum:t,credentials:s,region:r,service:n,sha256:i,uriEscapePath:o})}async presign(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{signingDate:s=new Date,expiresIn:r=3600,unsignableHeaders:n,unhoistableHeaders:i,signableHeaders:o,hoistableHeaders:a,signingRegion:c,signingService:u}=t,l=await this.credentialProvider();this.validateResolvedCredentials(l);const d=c??await this.regionProvider(),{longDate:p,shortDate:h}=this.formatDate(s);if(r>Un)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const m=Fn(h,d,u??this.service),g=Jn(Xn(e),{unhoistableHeaders:i,hoistableHeaders:a});l.sessionToken&&(g.query[En]=l.sessionToken),g.query[gn]=$n,g.query[fn]=`${l.accessKeyId}/${m}`,g.query[yn]=p,g.query[Rn]=r.toString(10);const f=jn(g,n,o);return g.query[Sn]=this.getCanonicalHeaderList(f),g.query[wn]=await this.getSignature(p,m,this.getSigningKey(l,d,h,u),this.createCanonicalRequest(g,f,await qn(e,this.sha256))),g}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(e,t){let{headers:s,payload:r}=e,{signingDate:n=new Date,priorSignature:i,signingRegion:o,signingService:a}=t;const c=o??await this.regionProvider(),{shortDate:u,longDate:l}=this.formatDate(n),d=Fn(u,c,a??this.service),p=await qn({headers:{},body:r},this.sha256),h=new this.sha256;h.update(s);const m=re(await h.digest()),g=[Ln,l,d,i,m,p].join("\n");return this.signString(g,{signingDate:n,signingRegion:c,signingService:a})}async signMessage(e,t){let{signingDate:s=new Date,signingRegion:r,signingService:n}=t;return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:s,signingRegion:r,signingService:n,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e){let{signingDate:t=new Date,signingRegion:s,signingService:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await this.credentialProvider();this.validateResolvedCredentials(n);const i=s??await this.regionProvider(),{shortDate:o}=this.formatDate(t),a=new this.sha256(await this.getSigningKey(n,i,o,r));return a.update(mn(e)),re(await a.digest())}async signRequest(e){let{signingDate:t=new Date,signableHeaders:s,unsignableHeaders:r,signingRegion:n,signingService:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=await this.credentialProvider();this.validateResolvedCredentials(o);const a=n??await this.regionProvider(),c=Xn(e),{longDate:u,shortDate:l}=this.formatDate(t),d=Fn(l,a,i??this.service);c.headers[vn]=u,o.sessionToken&&(c.headers[An]=o.sessionToken);const p=await qn(c,this.sha256);!Yn(In,c.headers)&&this.applyChecksum&&(c.headers[In]=p);const h=jn(c,r,s),m=await this.getSignature(u,d,this.getSigningKey(o,a,l,i),this.createCanonicalRequest(c,h,p));return c.headers[Cn]=`${$n} Credential=${o.accessKeyId}/${d}, SignedHeaders=${this.getCanonicalHeaderList(h)}, Signature=${m}`,c}async getSignature(e,t,s,r){const n=await this.createStringToSign(e,t,r,$n),i=new this.sha256(await s);return i.update(mn(n)),re(await i.digest())}getSigningKey(e,t,s,r){return Bn(this.sha256,e,s,t,r||this.service)}}const ii=e=>{let t,s=e.credentials,r=!!e.credentials;Object.defineProperty(e,"credentials",{set(n){n&&n!==s&&n!==t&&(r=!0),s=n;const i=oi(e,{credentials:s,credentialDefaultProvider:e.credentialDefaultProvider}),o=ai(e,i);if(r&&!o.attributed){const e="object"==typeof s&&null!==s;t=async t=>{const s=await o(t);return!e||s.$source&&0!==Object.keys(s.$source).length?s:rn(s,"CREDENTIALS_CODE","e")},t.memoized=o.memoized,t.configBound=o.configBound,t.attributed=!0}else t=o},get:()=>t,enumerable:!0,configurable:!0}),e.credentials=s;const{signingEscapePath:n=!0,systemClockOffset:i=e.systemClockOffset||0,sha256:o}=e;let a;return a=e.signer?jt(e.signer):e.regionInfoProvider?()=>jt(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((t=>{let[s,r]=t;const{signingRegion:i,signingService:a}=s;e.signingRegion=e.signingRegion||i||r,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:n};return new(e.signerConstructor||ni)(c)})):async t=>{const s=(t=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await jt(e.region)(),properties:{}},t)).signingRegion,r=t.signingName;e.signingRegion=e.signingRegion||s,e.signingName=e.signingName||r||e.serviceId;const i={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:o,uriEscapePath:n};return new(e.signerConstructor||ni)(i)},Object.assign(e,{systemClockOffset:i,signingEscapePath:n,signer:a})};function oi(e,t){let s,{credentials:r,credentialDefaultProvider:n}=t;return s=r?r?.memoized?r:Yt(r,Qt,Zt):n?jt(n(Object.assign({},e,{parentClientConfig:e}))):async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},s.memoized=!0,s}function ai(e,t){if(t.configBound)return t;const s=async s=>t({...s,callerClientConfig:e});return s.memoized=t.memoized,s.configBound=!0,s}const ci="function"==typeof TextEncoder?new TextEncoder:null,ui=e=>{if("string"==typeof e){if(ci)return ci.encode(e).byteLength;let t=e.length;for(let s=t-1;s>=0;s--){const r=e.charCodeAt(s);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&s--}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}`)};class li{queryCompat;constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.queryCompat=e}resolveRestContentType(e,t){const s=t.getMemberSchemas(),r=Object.values(s).find((e=>!!e.getMergedTraits().httpPayload));if(r){const t=r.getMergedTraits().mediaType;return t||(r.isStringSchema()?"text/plain":r.isBlobSchema()?"application/octet-stream":e)}if(!t.isUnitSchema()){const t=Object.values(s).find((e=>{const{httpQuery:t,httpQueryParams:s,httpHeader:r,httpLabel:n,httpPrefixHeaders:i}=e.getMergedTraits();return!(t||s||r||n||void 0!==i)}));if(t)return e}}async getErrorSchemaOrThrowBaseException(e,t,s,r,n,i){let o=t,a=e;e.includes("#")&&([o,a]=e.split("#"));const c={$metadata:n,$fault:s.statusCode<500?"client":"server"},u=Ee.for(o);try{return{errorSchema:i?.(u,a)??u.getSchema(e),errorMetadata:c}}catch(e){r.message=r.message??r.Message??"UnknownError";const t=Ee.for("smithy.ts.sdk.synthetic."+o),s=t.getBaseException();if(s){const e=t.getErrorCtor(s)??Error;throw this.decorateServiceException(Object.assign(new e({name:a}),c),r)}throw this.decorateServiceException(Object.assign(new Error(a),c),r)}}decorateServiceException(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.queryCompat){const s=e.Message??t.Message,r=vt(e,t);s&&(r.message=s),r.Error={...r.Error,Type:r.Error.Type,Code:r.Error.Code,Message:r.Error.message??r.Error.Message??s};const n=r.$metadata.requestId;return n&&(r.RequestId=n),r}return vt(e,t)}setQueryCompatError(e,t){const s=t.headers?.["x-amzn-query-error"];if(void 0!==e&&null!=s){const[t,r]=s.split(";"),n=Object.entries(e),i={Code:t,Type:r};Object.assign(e,i);for(const[e,t]of n)i["message"===e?"Message":e]=t;delete i.__type,e.Error=i}}queryCompatOutput(e,t){e.Error&&(t.Error=e.Error),e.Type&&(t.Type=e.Type),e.Code&&(t.Code=e.Code)}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch(s){return e.find((e=>ye.of(e).getMergedTraits().awsQueryError?.[0]===t))}}}class di{serdeContext;setSerdeContext(e){this.serdeContext=e}}class pi{from;to;keys;constructor(e,t){this.from=e,this.to=t,this.keys=new Set(Object.keys(this.from).filter((e=>"__type"!==e)))}mark(e){this.keys.delete(e)}hasUnknown(){return 1===this.keys.size&&0===Object.keys(this.to).length}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}function hi(e,t,s){if(s?.source){const e=s.source;if("number"==typeof t&&(t>Number.MAX_SAFE_INTEGER||t<Number.MIN_SAFE_INTEGER||e!==String(t)))return e.includes(".")?new dt(e,"bigDecimal"):BigInt(e)}return t}const mi=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)},gi=(e,t)=>ne(e,t).then((e=>(t?.utf8Encoder??mi)(e))),fi=(e,t)=>gi(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{}})),yi=(e,t)=>{const s=(e,t)=>Object.keys(e).find((e=>e.toLowerCase()===t.toLowerCase())),r=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},n=s(e.headers,"x-amzn-errortype");if(void 0!==n)return r(e.headers[n]);if(t&&"object"==typeof t){const e=s(t,"code");if(e&&void 0!==t[e])return r(t[e]);if(void 0!==t.__type)return r(t.__type)}};class Si extends di{settings;constructor(e){super(),this.settings=e}async read(e,t){return this._read(e,"string"==typeof t?JSON.parse(t,hi):await fi(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){const s=null!==t&&"object"==typeof t,r=ye.of(e);if(s){if(r.isStructSchema()){const e=t,s=r.isUnionSchema(),n={};let i;const{jsonName:o}=this.settings;let a;o&&(i={}),s&&(a=new pi(e,n));for(const[t,c]of r.structIterator()){let r=t;o&&(r=c.getMergedTraits().jsonName??r,i[r]=t),s&&a.mark(r),null!=e[r]&&(n[t]=this._read(c,e[r]))}if(s)a.writeUnknown();else if("string"==typeof e.__type)for(const[t,s]of Object.entries(e)){const e=o?i[t]??t:t;e in n||(n[e]=s)}return n}if(Array.isArray(t)&&r.isListSchema()){const e=r.getValueSchema(),s=[],n=!!r.getMergedTraits().sparse;for(const r of t)(n||null!=r)&&s.push(this._read(e,r));return s}if(r.isMapSchema()){const e=r.getValueSchema(),s={},n=!!r.getMergedTraits().sparse;for(const[r,i]of Object.entries(t))(n||null!=i)&&(s[r]=this._read(e,i));return s}}if(r.isBlobSchema()&&"string"==typeof t)return _(t);const n=r.getMergedTraits().mediaType;if(r.isStringSchema()&&"string"==typeof t&&n)return"application/json"===n||n.endsWith("+json")?ut.from(t):t;if(r.isTimestampSchema()&&null!=t)switch(yt(r,this.settings)){case 5:return ze(t);case 6:return Ve(t);case 7:return We(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(r.isBigIntegerSchema()&&("number"==typeof t||"string"==typeof t))return BigInt(t);if(r.isBigDecimalSchema()&&null!=t){if(t instanceof dt)return t;const e=t;return"bigDecimal"===e.type&&"string"in e?new dt(e.string,e.type):new dt(String(t),"bigDecimal")}if(r.isNumericSchema()&&"string"==typeof t){switch(t){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return t}if(r.isDocumentSchema()){if(s){const e=Array.isArray(t)?[]:{};for(const[s,n]of Object.entries(t))e[s]=n instanceof dt?n:this._read(r,n);return e}return structuredClone(t)}return t}}const Ri=String.fromCharCode(925);class wi{values=(()=>new Map)();counter=0;stage=0;createReplacer(){if(1===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(2===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,t)=>{if(t instanceof dt){const e=Ri+"nv"+this.counter+++"_"+t.string;return this.values.set(`"${e}"`,t.string),e}if("bigint"==typeof t){const e=t.toString(),s=Ri+"b"+this.counter+++"_"+e;return this.values.set(`"${s}"`,e),s}return t}}replaceInJson(e){if(0===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(2===this.stage)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,0===this.counter)return e;for(const[t,s]of this.values)e=e.replace(t,s);return e}}class Ei extends di{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,t){this.rootSchema=ye.of(e),this.buffer=this._write(this.rootSchema,t)}writeDiscriminatedDocument(e,t){this.write(e,t),"object"==typeof this.buffer&&(this.buffer.__type=ye.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:t}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!t)return JSON.stringify(this.buffer);const e=new wi;return e.replaceInJson(JSON.stringify(this.buffer,e.createReplacer(),0))}return this.buffer}_write(e,t,s){const r=null!==t&&"object"==typeof t,n=ye.of(e);if(r){if(n.isStructSchema()){const e=t,s={},{jsonName:r}=this.settings;let i;r&&(i={});for(const[t,o]of n.structIterator()){const a=this._write(o,e[t],n);if(void 0!==a){let e=t;r&&(e=o.getMergedTraits().jsonName??t,i[t]=e),s[e]=a}}if(n.isUnionSchema()&&0===Object.keys(s).length){const{$unknown:t}=e;if(Array.isArray(t)){const[e,r]=t;s[e]=this._write(15,r)}}else if("string"==typeof e.__type)for(const[t,n]of Object.entries(e)){const e=r?i[t]??t:t;e in s||(s[e]=this._write(15,n))}return s}if(Array.isArray(t)&&n.isListSchema()){const e=n.getValueSchema(),s=[],r=!!n.getMergedTraits().sparse;for(const n of t)(r||null!=n)&&s.push(this._write(e,n));return s}if(n.isMapSchema()){const e=n.getValueSchema(),s={},r=!!n.getMergedTraits().sparse;for(const[n,i]of Object.entries(t))(r||null!=i)&&(s[n]=this._write(e,i));return s}if(t instanceof Uint8Array&&(n.isBlobSchema()||n.isDocumentSchema()))return n===this.rootSchema?t:(this.serdeContext?.base64Encoder??F)(t);if(t instanceof Date&&(n.isTimestampSchema()||n.isDocumentSchema()))switch(yt(n,this.settings)){case 5:return t.toISOString().replace(".000Z","Z");case 6:return Fe(t);case 7:return t.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",t),t.getTime()/1e3}t instanceof dt&&(this.useReplacer=!0)}if(null!==t||!s?.isStructSchema()){if(n.isStringSchema()){if(void 0===t&&n.isIdempotencyToken())return ct();const e=n.getMergedTraits().mediaType;return null!=t&&e&&("application/json"===e||e.endsWith("+json"))?ut.from(t):t}if("number"==typeof t&&n.isNumericSchema())return Math.abs(t)===1/0||isNaN(t)?String(t):t;if("string"==typeof t&&n.isBlobSchema())return n===this.rootSchema?t:(this.serdeContext?.base64Encoder??F)(t);if("bigint"==typeof t&&(this.useReplacer=!0),n.isDocumentSchema()){if(r){const e=Array.isArray(t)?[]:{};for(const[s,r]of Object.entries(t))r instanceof dt?(this.useReplacer=!0,e[s]=r):e[s]=this._write(n,r);return e}return structuredClone(t)}return t}}}class Ci extends di{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Ei(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new Si(this.settings);return e.setSerdeContext(this.serdeContext),e}}class vi extends mt{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor(e){let{defaultNamespace:t,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}=e;super({defaultNamespace:t}),this.serviceTarget=s,this.codec=n??new Ci({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!r,this.mixin=new li(this.awsQueryCompatible)}async serializeRequest(e,t,s){const r=await super.serializeRequest(e,t,s);return r.path.endsWith("/")||(r.path+="/"),Object.assign(r.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(r.headers["x-amzn-query-mode"]="true"),"unit"!==ie(e.input)&&r.body||(r.body="{}"),r}getPayloadCodec(){return this.codec}async handleError(e,t,s,r,n){this.awsQueryCompatible&&this.mixin.setQueryCompatError(r,s);const i=yi(s,r)??"Unknown",{errorSchema:o,errorMetadata:a}=await this.mixin.getErrorSchemaOrThrowBaseException(i,this.options.defaultNamespace,s,r,n,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),c=ye.of(o),u=r.message??r.Message??"Unknown",l=new(Ee.for(o[1]).getErrorCtor(o)??Error)(u),d={};for(const[e,t]of c.structIterator())null!=r[e]&&(d[e]=this.codec.createDeserializer().readObject(t,r[e]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(r,d),this.mixin.decorateServiceException(Object.assign(l,a,{$fault:c.getMergedTraits().error,message:u},d),r)}}class bi extends vi{constructor(e){let{defaultNamespace:t,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}=e;super({defaultNamespace:t,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const Ti=/\d{12}\.ddb/;async function Pi(e,t,s){const r=s.request;if("rpc-v2-cbor"===r?.headers?.["smithy-protocol"]&&nn(e,"PROTOCOL_RPC_V2_CBOR","M"),"function"==typeof t.retryStrategy){const s=await t.retryStrategy();"function"==typeof s.acquireInitialRetryToken?s.constructor?.name?.includes("Adaptive")?nn(e,"RETRY_MODE_ADAPTIVE","F"):nn(e,"RETRY_MODE_STANDARD","E"):nn(e,"RETRY_MODE_LEGACY","D")}if("function"==typeof t.accountIdEndpointMode){const s=e.endpointV2;switch(String(s?.url?.hostname).match(Ti)&&nn(e,"ACCOUNT_ID_ENDPOINT","O"),await(t.accountIdEndpointMode?.())){case"disabled":nn(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":nn(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":nn(e,"ACCOUNT_ID_MODE_REQUIRED","R")}}const n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const t=n;t.accountId&&nn(e,"RESOLVED_ACCOUNT_ID","T");for(const[s,r]of Object.entries(t.$source??{}))nn(e,s,r)}}const Ii="user-agent",Ai="x-amz-user-agent",xi=" ",Oi="/",Di=/[^!$%&'*+\-.^_`|~\w]/g,$i=/[^!$%&'*+\-.^_`|~\w#]/g,Li="-",ki=1024;function Mi(e){let t="";for(const s in e){const r=e[s];if(!(t.length+r.length+1<=ki))break;t.length?t+=","+r:t+=r}return t}const Ni=e=>(t,s)=>async r=>{const{request:n}=r;if(!C.isInstance(n))return t(r);const{headers:i}=n,o=s?.userAgent?.map(Ui)||[],a=(await e.defaultUserAgentProvider()).map(Ui);await Pi(s,e,r);const c=s;a.push(`m/${Mi(Object.assign({},s.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=e?.customUserAgent?.map(Ui)||[],l=await e.userAgentAppId();l&&a.push(Ui(["app",`${l}`]));const d=[].concat([...a,...o,...u]).join(xi),p=[...a.filter((e=>e.startsWith("aws-sdk-"))),...u].join(xi);return"browser"!==e.runtime?(p&&(i[Ai]=i[Ai]?`${i[Ii]} ${p}`:p),i[Ii]=d):i[Ai]=d,t({...r,request:n})},Ui=e=>{const t=e[0].split(Oi).map((e=>e.replace(Di,Li))).join(Oi),s=e[1]?.replace($i,Li),r=t.indexOf(Oi),n=t.substring(0,r);let i=t.substring(r+1);return"api"===n&&(i=i.toLowerCase()),[n,i,s].filter((e=>e&&e.length>0)).reduce(((e,t,s)=>{switch(s){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},_i={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Gi=e=>({applyToStack:t=>{t.add(Ni(e),_i)}}),Fi=!1,Bi=!1,zi=new Set,ji=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pr;if(zi.has(e)||t(e))zi.add(e);else{if("*"!==e)throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.')}},Hi=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),qi=e=>Hi(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Vi=e=>{const{region:t,useFipsEndpoint:s}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{const e="function"==typeof t?await t():t,s=qi(e);return ji(s),s},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Hi(e)||("function"!=typeof s?Promise.resolve(!!s):s())}})},Wi="content-length";function Ki(e){return t=>async s=>{const r=s.request;if(C.isInstance(r)){const{body:t,headers:s}=r;if(t&&-1===Object.keys(s).map((e=>e.toLowerCase())).indexOf(Wi))try{const s=e(t);r.headers={...r.headers,[Wi]:String(s)}}catch(e){}}return t({...s,request:r})}}const Qi={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Zi=e=>({applyToStack:t=>{t.add(Ki(e.bodyLengthChecker),Qi)}}),Yi=async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),so(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!to(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},Ji=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Xi=/(\d+\.){3}\d+/,eo=/\.\./,to=e=>Ji.test(e)&&!Xi.test(e)&&!eo.test(e),so=e=>{const[t,s,r,,,n]=e.split(":"),i="arn"===t&&e.split(":").length>=6,o=Boolean(i&&s&&r&&n);if(i&&!o)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return o},ro=function(e,t,s){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n=async()=>{let n;if(r){const r=s.clientContextParams,i=r?.[e];n=i??s[e]??s[t]}else n=s[e]??s[t];return"function"==typeof n?n():n};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof s.credentials?await s.credentials():s.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof s.credentials?await s.credentials():s.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===s.isCustomEndpoint)return;const e=await n();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:s,port:r,path:n}=e;return`${t}//${s}${r?":"+r:""}${n}`}}return e}:n},no=async e=>{},io=e=>"object"==typeof e?"url"in e?sn(e.url):e:sn(e),oo=async(e,t,s,r)=>{if(!s.isCustomEndpoint){let e;e=s.serviceConfiguredEndpoint?await s.serviceConfiguredEndpoint():await no(s.serviceId),e&&(s.endpoint=()=>Promise.resolve(io(e)),s.isCustomEndpoint=!0)}const n=await ao(e,t,s);if("function"!=typeof s.endpointProvider)throw new Error("config.endpointProvider is not set.");return s.endpointProvider(n,r)},ao=async(e,t,s)=>{const r={},n=t?.getEndpointParameterInstructions?.()||{};for(const[t,i]of Object.entries(n))switch(i.type){case"staticContextParams":r[t]=i.value;break;case"contextParams":r[t]=e[i.name];break;case"clientContextParams":case"builtInParams":r[t]=await ro(i.name,t,s,"builtInParams"!==i.type)();break;case"operationContextParams":r[t]=i.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}return 0===Object.keys(n).length&&Object.assign(r,s),"s3"===String(s.serviceId).toLowerCase()&&await Yi(r),r},co=e=>{let{config:t,instructions:s}=e;return(e,r)=>async n=>{t.isCustomEndpoint&&Ht(r,"ENDPOINT_OVERRIDE","N");const i=await oo(n.input,{getEndpointParameterInstructions:()=>s},{...t},r);r.endpointV2=i,r.authSchemes=i.properties?.authSchemes;const o=r.authSchemes?.[0];if(o){r.signing_region=o.signingRegion,r.signing_service=o.signingName;const e=oe(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:o.signingRegion,signingRegion:o.signingRegion,signing_service:o.signingName,signingName:o.signingName,signingRegionSet:o.signingRegionSet},o.properties))}return e({...n})}},uo={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Ut.name},lo=(e,t)=>({applyToStack:s=>{s.addRelativeTo(co({config:e,instructions:t}),uo)}}),po=e=>{const t=e.tls??!0,{endpoint:s,useDualstackEndpoint:r,useFipsEndpoint:n}=e,i=null!=s?async()=>io(await ae(s)()):void 0,o=!!s,a=Object.assign(e,{endpoint:i,tls:t,isCustomEndpoint:o,useDualstackEndpoint:ae(r??!1),useFipsEndpoint:ae(n??!1)});let c;return a.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=no(e.serviceId)),c),a};var ho;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(ho||(ho={}));const mo=3,go=ho.STANDARD,fo=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],yo=["TimeoutError","RequestTimeout","RequestTimeoutException"],So=[500,502,503,504],Ro=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],wo=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],Eo=e=>void 0!==e?.$retryable,Co=e=>e.$metadata?.clockSkewCorrected,vo=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return!!(e&&e instanceof TypeError)&&t.has(e.message)},bo=e=>429===e.$metadata?.httpStatusCode||fo.includes(e.name)||1==e.$retryable?.throttling,To=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Eo(e)||Co(e)||yo.includes(e.name)||Ro.includes(e?.code||"")||wo.includes(e?.code||"")||So.includes(e.$metadata?.httpStatusCode||0)||vo(e)||void 0!==e.cause&&t<=10&&To(e.cause,t+1)},Po=e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!To(e)}return!1};class Io{static setTimeoutFn=(()=>setTimeout)();beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>Io.setTimeoutFn(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(),bo(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 s=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(s)}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 Ao=100,xo=2e4,Oo=500,Do=500,$o=5,Lo=10,ko=1,Mo="amz-sdk-invocation-id",No="amz-sdk-request",Uo=()=>{let e=Ao;return{computeNextBackoffDelay:t=>Math.floor(Math.min(xo,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}},_o=e=>{let{retryDelay:t,retryCount:s,retryCost:r}=e;return{getRetryCount:()=>s,getRetryDelay:()=>Math.min(xo,t),getRetryCost:()=>r}};class Go{maxAttempts;mode=(()=>ho.STANDARD)();capacity=(()=>Do)();retryBackoffStrategy=(()=>Uo())();maxAttemptsProvider;constructor(e){this.maxAttempts=e,this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return _o({retryDelay:Ao,retryCount:0})}async refreshRetryTokenForRetry(e,t){const s=await this.getMaxAttempts();if(this.shouldRetry(e,t,s)){const s=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===s?Oo:Ao);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),n=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,i=this.getCapacityCost(s);return this.capacity-=i,_o({retryDelay:n,retryCount:e.getRetryCount()+1,retryCost:i})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(Do,this.capacity+(e.getRetryCost()??ko))}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 ${mo}`),mo}}shouldRetry(e,t,s){return e.getRetryCount()+1<s&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?Lo:$o}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Fo{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=(()=>ho.ADAPTIVE)();constructor(e,t){this.maxAttemptsProvider=e;const{rateLimiter:s}=t??{};this.rateLimiter=s??new Io,this.standardRetryStrategy=new Go(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)}}const Bo=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):"string"==typeof e?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),zo=e=>{const{retryStrategy:t,retryMode:s,maxAttempts:r}=e,n=ae(r??mo);return Object.assign(e,{maxAttempts:n,retryStrategy:async()=>t||(await ae(s)()===ho.ADAPTIVE?new Fo(n):new Go(n))})},jo=e=>e?.body instanceof ReadableStream,Ho=e=>(t,s)=>async r=>{let n=await e.retryStrategy();const i=await e.maxAttempts();if(!qo(n))return n?.mode&&(s.userAgent=[...s.userAgent||[],["cfg/retry-mode",n.mode]]),n.retry(t,r);{let e=await n.acquireInitialRetryToken(s.partition_id),o=new Error,a=0,c=0;const{request:u}=r,l=C.isInstance(u);for(l&&(u.headers[Mo]=ct());;)try{l&&(u.headers[No]=`attempt=${a+1}; max=${i}`);const{response:s,output:o}=await t(r);return n.recordSuccess(e),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,{response:s,output:o}}catch(t){const r=Vo(t);if(o=Bo(t),l&&jo(u))throw(s.logger instanceof Dt?console:s.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{e=await n.refreshRetryTokenForRetry(e,r)}catch(e){throw o.$metadata||(o.$metadata={}),o.$metadata.attempts=a+1,o.$metadata.totalRetryDelay=c,o}a=e.getRetryCount();const i=e.getRetryDelay();c+=i,await new Promise((e=>setTimeout(e,i)))}}},qo=e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess,Vo=e=>{const t={error:e,errorType:Wo(e)},s=Zo(e.$response);return s&&(t.retryAfterHint=s),t},Wo=e=>bo(e)?"THROTTLING":To(e)?"TRANSIENT":Po(e)?"SERVER_ERROR":"CLIENT_ERROR",Ko={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Qo=e=>({applyToStack:t=>{t.add(Ho(e),Ko)}}),Zo=e=>{if(!b.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const s=e.headers[t],r=Number(s);return Number.isNaN(r)?new Date(s):new Date(1e3*r)},Yo=async(e,t,s)=>({operation:oe(t).operation,region:await ae(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Jo(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Xo(e){return{schemeId:"smithy.api#noAuth"}}const ea=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":case"GetId":case"GetOpenIdToken":case"UnlinkIdentity":t.push(Xo());break;default:t.push(Jo(e))}return t},ta=e=>{const t=ii(e);return Object.assign(t,{authSchemePreference:ae(e.authSchemePreference??[])})},sa=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),ra={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var na="3.980.0",ia={version:na},oa={name:"SHA-256"},aa={name:"HMAC",hash:oa},ca=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 ua={};function la(){return"undefined"!=typeof window?window:"undefined"!=typeof self?self:ua}var da=function(){function e(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return e.prototype.update=function(e){if(!us(e)){var t=cs(e),s=new Uint8Array(this.toHash.byteLength+t.byteLength);s.set(this.toHash,0),s.set(t,this.toHash.byteLength),this.toHash=s}},e.prototype.digest=function(){var e=this;return this.key?this.key.then((function(t){return la().crypto.subtle.sign(aa,t,e.toHash).then((function(e){return new Uint8Array(e)}))})):us(this.toHash)?Promise.resolve(ca):Promise.resolve().then((function(){return la().crypto.subtle.digest(oa,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,s){la().crypto.subtle.importKey("raw",cs(e.secret),aa,!1,["sign"]).then(t,s)})),this.key.catch((function(){})))},e}(),pa=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function ha(e){return!(!ma(e)||"object"!=typeof e.crypto.subtle)&&ga(e.crypto.subtle)}function ma(e){return"object"==typeof e&&"object"==typeof e.crypto&&"function"==typeof e.crypto.getRandomValues}function ga(e){return e&&pa.every((function(t){return"function"==typeof e[t]}))}var fa=function(){function e(e){ha(la())?this.hash=new da(e):this.hash=new ls(e)}return e.prototype.update=function(e,t){this.hash.update(cs(e))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();const ya=e=>{let{serviceId:t,clientVersion:s}=e;return async e=>{const r="undefined"!=typeof window?window.navigator:void 0,n=r?.userAgent??"",i=r?.userAgentData?.platform??Sa.os(n)??"other",o=void 0,a=r?.userAgentData?.brands??[],c=a[a.length-1],u=c?.brand??Sa.browser(n)??"unknown",l=[["aws-sdk-js",s],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${u}_${c?.version??"unknown"}`]];t&&l.push([`api/${t}`,s]);const d=await(e?.userAgentAppId?.());return d&&l.push([`app/${d}`]),l}},Sa={os:e=>/iPhone|iPad|iPod/.test(e)?"iOS":/Macintosh|Mac OS X/.test(e)?"macOS":/Windows NT/.test(e)?"Windows":/Android/.test(e)?"Android":/Linux/.test(e)?"Linux":void 0,browser:e=>/EdgiOS|EdgA|Edg\//.test(e)?"Microsoft Edge":/Firefox\//.test(e)?"Firefox":/Chrome\//.test(e)?"Chrome":/Safari\//.test(e)?"Safari":void 0},Ra=e=>()=>Promise.reject(e),wa=["in-region","cross-region","mobile","standard","legacy"],Ea=function(){let{defaultsMode:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r((async()=>{const t="function"==typeof e?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(Ca()?"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 ${wa.join(", ")}, got ${t}`)}}))},Ca=()=>{const e=window?.navigator;if(e?.connection){const{effectiveType:t,rtt:s,downlink:r}=e?.connection;if("string"==typeof t&&"4g"!==t||Number(s)>100||Number(r)<10)return!0}return e?.userAgentData?.mobile||"number"==typeof e?.maxTouchPoints&&e?.maxTouchPoints>1},va=e=>(new TextEncoder).encode(e),ba=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)},Ta=function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){for(const t of e.split("."))if(!Ta(t))return!1;return!0}return!(!pr(e)||e.length<3||e.length>63||e!==e.toLowerCase()||lr(e))},Pa=":",Ia="/",Aa=e=>{const t=e.split(Pa);if(t.length<6)return null;const[s,r,n,i,o,...a]=t;return"arn"!==s||""===r||""===n||""===a.join(Pa)?null:{partition:r,service:n,region:i,accountId:o,resourceId:a.map((e=>e.split(Ia))).flat()}};var xa=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Oa={partitions:xa};let Da=Oa;const $a=e=>{const{partitions:t}=Da;for(const s of t){const{regions:t,outputs:r}=s;for(const[s,n]of Object.entries(t))if(s===e)return{...r,...n}}for(const s of t){const{regionRegex:t,outputs:r}=s;if(new RegExp(t).test(e))return{...r}}const s=t.find((e=>"aws"===e.id));if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},La={isVirtualHostableS3Bucket:Ta,parseArn:Aa,partition:$a};hr.aws=La;const ka="required",Ma="fn",Na="argv",Ua="ref",_a=!0,Ga="isSet",Fa="booleanEquals",Ba="error",za="endpoint",ja="tree",Ha="PartitionResult",qa="getAttr",Va="stringEquals",Wa={[ka]:!1,type:"string"},Ka={[ka]:!0,default:!1,type:"boolean"},Qa={[Ua]:"Endpoint"},Za={[Ma]:Fa,[Na]:[{[Ua]:"UseFIPS"},!0]},Ya={[Ma]:Fa,[Na]:[{[Ua]:"UseDualStack"},!0]},Ja={},Xa={[Ua]:"Region"},ec={[Ma]:qa,[Na]:[{[Ua]:Ha},"supportsFIPS"]},tc={[Ua]:Ha},sc={[Ma]:Fa,[Na]:[!0,{[Ma]:qa,[Na]:[tc,"supportsDualStack"]}]},rc=[Za],nc=[Ya],ic=[Xa],oc={parameters:{Region:Wa,UseDualStack:Ka,UseFIPS:Ka,Endpoint:Wa},rules:[{conditions:[{[Ma]:Ga,[Na]:[Qa]}],rules:[{conditions:rc,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Ba},{conditions:nc,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Ba},{endpoint:{url:Qa,properties:Ja,headers:Ja},type:za}],type:ja},{conditions:[{[Ma]:Ga,[Na]:ic}],rules:[{conditions:[{[Ma]:"aws.partition",[Na]:ic,assign:Ha}],rules:[{conditions:[Za,Ya],rules:[{conditions:[{[Ma]:Fa,[Na]:[_a,ec]},sc],rules:[{conditions:[{[Ma]:Va,[Na]:[Xa,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:Ja,headers:Ja},type:za},{conditions:[{[Ma]:Va,[Na]:[Xa,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:Ja,headers:Ja},type:za},{conditions:[{[Ma]:Va,[Na]:[Xa,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:Ja,headers:Ja},type:za},{conditions:[{[Ma]:Va,[Na]:[Xa,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:Ja,headers:Ja},type:za},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ja,headers:Ja},type:za}],type:ja},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Ba}],type:ja},{conditions:rc,rules:[{conditions:[{[Ma]:Fa,[Na]:[ec,_a]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ja,headers:Ja},type:za}],type:ja},{error:"FIPS is enabled but this partition does not support FIPS",type:Ba}],type:ja},{conditions:nc,rules:[{conditions:[sc],rules:[{conditions:[{[Ma]:Va,[Na]:["aws",{[Ma]:qa,[Na]:[tc,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:Ja,headers:Ja},type:za},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ja,headers:Ja},type:za}],type:ja},{error:"DualStack is enabled but this partition does not support DualStack",type:Ba}],type:ja},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:Ja,headers:Ja},type:za}],type:ja}],type:ja},{error:"Invalid Configuration: Missing Region",type:Ba}]},ac=oc,cc=new cr({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),uc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return cc.get(e,(()=>qr(ac,{endpointParams:e,logger:t.logger})))};hr.aws=La;const lc=e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??_,base64Encoder:e?.base64Encoder??F,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??uc,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ea,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new pn},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Vt}],logger:e?.logger??new Dt,protocol:e?.protocol??bi,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??sn,utf8Decoder:e?.utf8Decoder??va,utf8Encoder:e?.utf8Encoder??ba}),dc=e=>{const t=Ea(e),s=()=>t().then(bt),r=lc(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??ui,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??ya({serviceId:r.serviceId,clientVersion:ia.version}),maxAttempts:e?.maxAttempts??mo,region:e?.region??Ra("Region is missing"),requestHandler:D.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||go),sha256:e?.sha256??fa,streamCollector:e?.streamCollector??B,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Fi)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Bi))}},pc=e=>({setRegion(t){e.region=t},region:()=>e.region}),hc=e=>({region:e.region()}),mc=e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex((t=>t.schemeId===e.schemeId));-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){r=e},credentials:()=>r}},gc=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),fc=(e,t)=>{const s=Object.assign(pc(e),xt(e),y(e),mc(e));return t.forEach((e=>e.configure(s))),Object.assign(e,hc(s),Ot(s),S(s),gc(s))};class yc extends Z{config;constructor(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];let[r]=t;const n=dc(r||{});super(n),this.initConfig=n;const i=ar(sa(n)),o=zo(i),a=Qs(Vi(o)),c=po(a),u=ta(c),l=fc(u,r?.extensions||[]);this.config=l,this.middlewareStack.use(me(this.config)),this.middlewareStack.use(Gi(this.config)),this.middlewareStack.use(Qo(this.config)),this.middlewareStack.use(Zi(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(tr(this.config)),this.middlewareStack.use(nr(this.config)),this.middlewareStack.use(Nt(this.config,{httpAuthSchemeParametersProvider:Yo,identityProviderConfigProvider:async e=>new qt({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(zt(this.config))}destroy(){super.destroy()}}class Sc extends Ct{constructor(e){super(e),Object.setPrototypeOf(this,Sc.prototype)}}class Rc extends Sc{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,Rc.prototype)}}class wc extends Sc{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,wc.prototype)}}class Ec extends Sc{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,Ec.prototype)}}class Cc extends Sc{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Cc.prototype)}}class vc extends Sc{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,vc.prototype)}}class bc extends Sc{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,bc.prototype)}}class Tc extends Sc{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Tc.prototype)}}class Pc extends Sc{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,Pc.prototype)}}class Ic extends Sc{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,Ic.prototype)}}class Ac extends Sc{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,Ac.prototype)}}class xc extends Sc{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,xc.prototype)}}const Oc="AccountId",Dc="AccessKeyId",$c="Credentials",Lc="ConcurrentModificationException",kc="CustomRoleArn",Mc="DeveloperUserAlreadyRegisteredException",Nc="Expiration",Uc="ExternalServiceException",_c="GetCredentialsForIdentity",Gc="GetCredentialsForIdentityInput",Fc="GetCredentialsForIdentityResponse",Bc="GetId",zc="GetIdInput",jc="GetIdResponse",Hc="InternalErrorException",qc="IdentityId",Vc="InvalidIdentityPoolConfigurationException",Wc="InvalidParameterException",Kc="IdentityPoolId",Qc="IdentityProviderToken",Zc="Logins",Yc="LimitExceededException",Jc="LoginsMap",Xc="NotAuthorizedException",eu="ResourceConflictException",tu="ResourceNotFoundException",su="SecretKey",ru="SecretKeyString",nu="SessionToken",iu="TooManyRequestsException",ou="client",au="error",cu="httpError",uu="message",lu="server",du="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",pu="com.amazonaws.cognitoidentity";var hu=[0,pu,Qc,8,0],mu=[0,pu,ru,8,0],gu=[-3,pu,Lc,{[au]:ou,[cu]:400},[uu],[0]];Ee.for(pu).registerError(gu,xc);var fu=[3,pu,$c,0,[Dc,su,nu,Nc],[0,[()=>mu,0],0,4]],yu=[-3,pu,Mc,{[au]:ou,[cu]:400},[uu],[0]];Ee.for(pu).registerError(yu,Ac);var Su=[-3,pu,Uc,{[au]:ou,[cu]:400},[uu],[0]];Ee.for(pu).registerError(Su,Pc);var Ru=[3,pu,Gc,0,[qc,Zc,kc],[0,[()=>$u,0],0],1],wu=[3,pu,Fc,0,[qc,$c],[0,[()=>fu,0]]],Eu=[3,pu,zc,0,[Kc,Oc,Zc],[0,0,[()=>$u,0]],1],Cu=[3,pu,jc,0,[qc],[0]],vu=[-3,pu,Hc,{[au]:lu},[uu],[0]];Ee.for(pu).registerError(vu,Rc);var bu=[-3,pu,Vc,{[au]:ou,[cu]:400},[uu],[0]];Ee.for(pu).registerError(bu,Ic);var Tu=[-3,pu,Wc,{[au]:ou,[cu]:400},[uu],[0]];Ee.for(pu).registerError(Tu,wc);var Pu=[-3,pu,Yc,{[au]:ou,[cu]:400},[uu],[0]];Ee.for(pu).registerError(Pu,Ec);var Iu=[-3,pu,Xc,{[au]:ou,[cu]:403},[uu],[0]];Ee.for(pu).registerError(Iu,Cc);var Au=[-3,pu,eu,{[au]:ou,[cu]:409},[uu],[0]];Ee.for(pu).registerError(Au,vc);var xu=[-3,pu,tu,{[au]:ou,[cu]:404},[uu],[0]];Ee.for(pu).registerError(xu,Tc);var Ou=[-3,pu,iu,{[au]:ou,[cu]:429},[uu],[0]];Ee.for(pu).registerError(Ou,bc);var Du=[-3,du,"CognitoIdentityServiceException",0,[],[]];Ee.for(du).registerError(Du,Sc);var $u=[2,pu,Jc,0,[0,0],[()=>hu,0]],Lu=[9,pu,_c,0,()=>Ru,()=>wu],ku=[9,pu,Bc,0,()=>Eu,()=>Cu];class Mu extends(wt.classBuilder().ep(ra).m((function(e,t,s,r){return[lo(s,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Lu).build()){}class Nu extends(wt.classBuilder().ep(ra).m((function(e,t,s,r){return[lo(s,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(ku).build()){}var Uu=Object.freeze({__proto__:null,CognitoIdentityClient:yc,GetCredentialsForIdentityCommand:Mu,GetIdCommand:Nu});class _u{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor(e){let{marshaller:t,serializer:s,deserializer:r,serdeContext:n,defaultContentType:i}=e;this.marshaller=t,this.serializer=s,this.deserializer=r,this.serdeContext=n,this.defaultContentType=i}async serializeEventStream(e){let{eventStream:t,requestSchema:s,initialRequest:r}=e;const n=this.marshaller,i=s.getEventStreamMember(),o=s.getMemberSchema(i),a=this.serializer,c=this.defaultContentType,u=Symbol("initialRequestMarker"),l={async*[Symbol.asyncIterator](){if(r){const e={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:c}};a.write(s,r);const t=a.flush();yield{[u]:!0,headers:e,body:t}}for await(const e of t)yield e}};return n.serialize(l,(e=>{if(e[u])return{headers:e.headers,body:e.body};const t=Object.keys(e).find((e=>"__type"!==e))??"",{additionalHeaders:s,body:r,eventType:n,explicitPayloadContentType:i}=this.writeEventBody(t,o,e);return{headers:{":event-type":{type:"string",value:n},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:i??c},...s},body:r}}))}async deserializeEventStream(e){let{response:t,responseSchema:s,initialResponseContainer:r}=e;const n=this.marshaller,i=s.getEventStreamMember(),o=s.getMemberSchema(i).getMemberSchemas(),a=Symbol("initialResponseMarker"),c=n.deserialize(t.body,(async e=>{const t=Object.keys(e).find((e=>"__type"!==e))??"",r=e[t].body;if("initial-response"===t){const e=await this.deserializer.read(s,r);return delete e[i],{[a]:!0,...e}}if(t in o){const s=o[t];if(s.isStructSchema()){const n={};let i=!1;for(const[o,a]of s.structIterator()){const{eventHeader:s,eventPayload:c}=a.getMergedTraits();if(i=i||Boolean(s||c),c)a.isBlobSchema()?n[o]=r:a.isStringSchema()?n[o]=(this.serdeContext?.utf8Encoder??ft)(r):a.isStructSchema()&&(n[o]=await this.deserializer.read(a,r));else if(s){const s=e[t].headers[o]?.value;null!=s&&(a.isNumericSchema()?n[o]=s&&"object"==typeof s&&"bytes"in s?BigInt(s.toString()):Number(s):n[o]=s)}}if(i)return{[t]:n};if(0===r.byteLength)return{[t]:{}}}return{[t]:await this.deserializer.read(s,r)}}return{$unknown:e}})),u=c[Symbol.asyncIterator](),l=await u.next();if(l.done)return c;if(l.value?.[a]){if(!s)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[e,t]of Object.entries(l.value))r[e]=t}return{async*[Symbol.asyncIterator](){for(l?.value?.[a]||(yield l.value);;){const{done:e,value:t}=await u.next();if(e)break;yield t}}}}writeEventBody(e,t,s){const r=this.serializer;let n,i=e,o=null;const a={};if(t.getSchema()[4].includes(e)){const i=t.getMemberSchema(e);if(!i.isStructSchema())throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");for(const[t,r]of i.structIterator()){const{eventHeader:n,eventPayload:i}=r.getMergedTraits();if(i)o=t;else if(n){const n=s[e][t];let i="binary";r.isNumericSchema()?i=(-2)**31<=n&&n<=2**31-1?"integer":"long":r.isTimestampSchema()?i="timestamp":r.isStringSchema()?i="string":r.isBooleanSchema()&&(i="boolean"),null!=n&&(a[t]={type:i,value:n},delete s[e][t])}}if(null!==o){const t=i.getMemberSchema(o);t.isBlobSchema()?n="application/octet-stream":t.isStringSchema()&&(n="text/plain"),r.write(t,s[e][o])}else r.write(i,s[e])}else{const[t,n]=s[e];i=t,r.write(15,n)}const c=r.flush();return{body:"string"==typeof c?(this.serdeContext?.utf8Decoder??gt)(c):c,eventType:i,explicitPayloadContentType:n,additionalHeaders:a}}}var Gu=Object.freeze({__proto__:null,EventStreamSerde:_u})}(e)}(ug)),ug);const dg=async(e,t,s)=>({operation:m(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const pg=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-maps",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},hg={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var mg="3.992.0";const gg="required",fg="fn",yg="argv",Sg="ref",Rg="url",wg="properties",Eg="headers",Cg=!0,vg="isSet",bg="booleanEquals",Tg="error",Pg="endpoint",Ig="tree",Ag="PartitionResult",xg={[gg]:!0,default:!1,type:"boolean"},Og={[gg]:!1,type:"string"},Dg={[Sg]:"Endpoint"},$g={[fg]:bg,[yg]:[{[Sg]:"UseFIPS"},!0]},Lg={[fg]:bg,[yg]:[{[Sg]:"UseDualStack"},!0]},kg={},Mg={[fg]:"stringEquals",[yg]:[{[fg]:"getAttr",[yg]:[{[Sg]:Ag},"name"]},"aws"]},Ng={[fg]:bg,[yg]:[{[Sg]:"UseFIPS"},!1]},Ug={[fg]:bg,[yg]:[{[Sg]:"UseDualStack"},!1]},_g={[Rg]:"https://maps.geo.{Region}.{PartitionResult#dnsSuffix}/v2",[wg]:{},[Eg]:{}},Gg={[Rg]:"https://maps.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[wg]:{},[Eg]:{}},Fg={[Rg]:"https://maps.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",[wg]:{},[Eg]:{}},Bg={[Rg]:"https://maps.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[wg]:{},[Eg]:{}},zg={[fg]:"stringEquals",[yg]:[{[fg]:"getAttr",[yg]:[{[Sg]:Ag},"name"]},"aws-us-gov"]},jg={[fg]:"getAttr",[yg]:[{[Sg]:Ag},"supportsFIPS"]},Hg={[fg]:bg,[yg]:[!0,{[fg]:"getAttr",[yg]:[{[Sg]:Ag},"supportsDualStack"]}]},qg=[{[Sg]:"Region"}],Vg={parameters:{UseDualStack:xg,UseFIPS:xg,Endpoint:Og,Region:Og},rules:[{conditions:[{[fg]:vg,[yg]:[Dg]}],rules:[{conditions:[$g],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Tg},{rules:[{conditions:[Lg],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Tg},{endpoint:{[Rg]:Dg,[wg]:kg,[Eg]:kg},type:Pg}],type:Ig}],type:Ig},{rules:[{conditions:[{[fg]:vg,[yg]:qg}],rules:[{conditions:[{[fg]:"aws.partition",[yg]:qg,assign:Ag}],rules:[{conditions:[Mg,Ng,Ug],endpoint:_g,type:Pg},{conditions:[Mg,$g,Lg],endpoint:Gg,type:Pg},{conditions:[Mg,$g,Ug],endpoint:Fg,type:Pg},{conditions:[Mg,Ng,Lg],endpoint:Bg,type:Pg},{conditions:[zg,Ng,Ug],endpoint:_g,type:Pg},{conditions:[zg,$g,Lg],endpoint:Gg,type:Pg},{conditions:[zg,$g,Ug],endpoint:Fg,type:Pg},{conditions:[zg,Ng,Lg],endpoint:Bg,type:Pg},{conditions:[$g,Lg],rules:[{conditions:[{[fg]:bg,[yg]:[Cg,jg]},Hg],rules:[{endpoint:{[Rg]:"https://geo-maps-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[wg]:kg,[Eg]:kg},type:Pg}],type:Ig},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Tg}],type:Ig},{conditions:[$g,Ug],rules:[{conditions:[{[fg]:bg,[yg]:[jg,Cg]}],rules:[{endpoint:{[Rg]:"https://geo-maps-fips.{Region}.{PartitionResult#dnsSuffix}",[wg]:kg,[Eg]:kg},type:Pg}],type:Ig},{error:"FIPS is enabled but this partition does not support FIPS",type:Tg}],type:Ig},{conditions:[Ng,Lg],rules:[{conditions:[Hg],rules:[{endpoint:{[Rg]:"https://geo-maps.{Region}.{PartitionResult#dualStackDnsSuffix}",[wg]:kg,[Eg]:kg},type:Pg}],type:Ig},{error:"DualStack is enabled but this partition does not support DualStack",type:Tg}],type:Ig},{endpoint:{[Rg]:"https://geo-maps.{Region}.{PartitionResult#dnsSuffix}",[wg]:kg,[Eg]:kg},type:Pg}],type:Ig}],type:Ig},{error:"Invalid Configuration: Missing Region",type:Tg}],type:Ig}]},Wg=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Kg=(e,t={})=>Wg.get(e,(()=>Yt(Vg,{endpointParams:e,logger:t.logger})));xt.aws=ri;class Qg extends sr{constructor(e){super(e),Object.setPrototypeOf(this,Qg.prototype)}}let Zg=class e extends Qg{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Yg=class e extends Qg{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Jg=class e extends Qg{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},Xg=class e extends Qg{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}},ef=class e extends Qg{name="ResourceNotFoundException";$fault="client";Message;constructor(t){super({name:"ResourceNotFoundException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}};const tf="Blob",sf="Cache-Control",rf="CacheControl",nf="CompactOverlay",of="ColorScheme",af="ContentType",cf="Content-Type",uf="ETag",lf="FileName",df="GeoJsonOverlay",pf="Key",hf="Message",mf="PricingBucket",gf="PoliticalView",ff="Style",yf="client",Sf="color-scheme",Rf="error",wf="httpError",Ef="httpHeader",Cf="httpQuery",vf="http",bf="jsonName",Tf="key",Pf="message",If="political-view",Af="smithy.ts.sdk.synthetic.com.amazonaws.geomaps",xf="x-amz-geo-pricing-bucket",Of="com.amazonaws.geomaps",Df=le.for(Af);var $f=[-3,Af,"GeoMapsServiceException",0,[],[]];Df.registerError($f,Qg);const Lf=le.for(Of);var kf=[-3,Of,"AccessDeniedException",{[Rf]:yf,[wf]:403},[hf],[[0,{[bf]:Pf}]],1];Lf.registerError(kf,Zg);var Mf=[-3,Of,"InternalServerException",{[Rf]:"server",[wf]:500},[hf],[[0,{[bf]:Pf}]],1];Lf.registerError(Mf,Yg);var Nf=[-3,Of,"ResourceNotFoundException",{[Rf]:yf,[wf]:404},[hf],[[0,{[bf]:Pf}]],1];Lf.registerError(Nf,ef);var Uf=[-3,Of,"ThrottlingException",{[Rf]:yf,[wf]:429},[hf],[[0,{[bf]:Pf}]],1];Lf.registerError(Uf,Jg);var _f=[-3,Of,"ValidationException",{[Rf]:yf,[wf]:400},[hf,"Reason","FieldList"],[[0,{[bf]:Pf}],[0,{[bf]:"reason"}],[()=>ay,{[bf]:"fieldList"}]],3];Lf.registerError(_f,Xg);const Gf=[Df,Lf];var Ff=[0,Of,"ApiKey",8,0],Bf=[0,Of,nf,8,0],zf=[0,Of,"CountryCode",8,0],jf=[0,Of,"DistanceMeters",8,1],Hf=[0,Of,df,8,0],qf=[0,Of,"PositionListString",8,0],Vf=[0,Of,"PositionString",8,0],Wf=[0,Of,"SensitiveFloat",8,1],Kf=[0,Of,"SensitiveInteger",8,1],Qf=[0,Of,"SensitiveString",8,0],Zf=[3,Of,"GetGlyphsRequest",0,["FontStack","FontUnicodeRange"],[[0,1],[0,1]],2],Yf=[3,Of,"GetGlyphsResponse",0,[tf,af,rf,uf],[[21,16],[0,{[Ef]:cf}],[0,{[Ef]:sf}],[0,{[Ef]:uf}]]],Jf=[3,Of,"GetSpritesRequest",0,[lf,ff,of,"Variant"],[[0,1],[0,1],[0,1],[0,1]],4],Xf=[3,Of,"GetSpritesResponse",0,[tf,af,rf,uf],[[21,16],[0,{[Ef]:cf}],[0,{[Ef]:sf}],[0,{[Ef]:uf}]]],ey=[3,Of,"GetStaticMapRequest",0,["Height",lf,"Width","BoundingBox","BoundedPositions","Center",of,nf,"CropLabels",df,pf,"LabelSize","Language","Padding",gf,"PointsOfInterests","Radius","ScaleBarUnit",ff,"Zoom"],[[()=>Kf,{[Cf]:"height"}],[0,1],[()=>Kf,{[Cf]:"width"}],[()=>qf,{[Cf]:"bounding-box"}],[()=>qf,{[Cf]:"bounded-positions"}],[()=>Vf,{[Cf]:"center"}],[0,{[Cf]:Sf}],[()=>Bf,{[Cf]:"compact-overlay"}],[2,{[Cf]:"crop-labels"}],[()=>Hf,{[Cf]:"geojson-overlay"}],[()=>Ff,{[Cf]:Tf}],[0,{[Cf]:"label-size"}],[0,{[Cf]:"lang"}],[()=>Kf,{[Cf]:"padding"}],[()=>zf,{[Cf]:If}],[0,{[Cf]:"pois"}],[()=>jf,{[Cf]:"radius"}],[0,{[Cf]:"scale-unit"}],[0,{[Cf]:"style"}],[()=>Wf,{[Cf]:"zoom"}]],3],ty=[3,Of,"GetStaticMapResponse",0,[mf,tf,af,rf,uf],[[0,{[Ef]:xf}],[21,16],[0,{[Ef]:cf}],[0,{[Ef]:sf}],[0,{[Ef]:uf}]],1],sy=[3,Of,"GetStyleDescriptorRequest",0,[ff,of,gf,"Terrain","ContourDensity","Traffic","TravelModes","Buildings",pf],[[0,1],[0,{[Cf]:Sf}],[()=>zf,{[Cf]:If}],[0,{[Cf]:"terrain"}],[0,{[Cf]:"contour-density"}],[0,{[Cf]:"traffic"}],[64,{[Cf]:"travel-modes"}],[0,{[Cf]:"buildings"}],[()=>Ff,{[Cf]:Tf}]],1],ry=[3,Of,"GetStyleDescriptorResponse",0,[tf,af,rf,uf],[[21,16],[0,{[Ef]:cf}],[0,{[Ef]:sf}],[0,{[Ef]:uf}]]],ny=[3,Of,"GetTileRequest",0,["Tileset","Z","X","Y","AdditionalFeatures",pf],[[0,1],[()=>Qf,1],[()=>Qf,1],[()=>Qf,1],[64,{[Cf]:"additional-features"}],[()=>Ff,{[Cf]:Tf}]],4],iy=[3,Of,"GetTileResponse",0,[mf,tf,af,rf,uf],[[0,{[Ef]:xf}],[21,16],[0,{[Ef]:cf}],[0,{[Ef]:sf}],[0,{[Ef]:uf}]],1],oy=[3,Of,"ValidationExceptionField",0,["Name",hf],[[0,{[bf]:"name"}],[0,{[bf]:Pf}]],2],ay=[1,Of,"ValidationExceptionFieldList",0,[()=>oy,0]],cy=[9,Of,"GetGlyphs",{[vf]:["GET","/glyphs/{FontStack}/{FontUnicodeRange}",200]},()=>Zf,()=>Yf],uy=[9,Of,"GetSprites",{[vf]:["GET","/styles/{Style}/{ColorScheme}/{Variant}/sprites/{FileName}",200]},()=>Jf,()=>Xf],ly=[9,Of,"GetStaticMap",{[vf]:["GET","/static/{FileName}",200]},()=>ey,()=>ty],dy=[9,Of,"GetStyleDescriptor",{[vf]:["GET","/styles/{Style}/descriptor",200]},()=>sy,()=>ry],py=[9,Of,"GetTile",{[vf]:["GET","/tiles/{Tileset}/{Z}/{X}/{Y}",200]},()=>ny,()=>iy];const hy=e=>{const t=Xn(e),s=()=>t().then(nr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??k,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Kg,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??pg,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new cs}],logger:e?.logger??new cr,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.geomaps",errorTypeRegistries:Gf,version:"2020-11-19",serviceTarget:"MapsService"},serviceId:e?.serviceId??"Geo Maps",urlParser:e?.urlParser??ts,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??L}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Hs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qn({serviceId:r.serviceId,clientVersion:mg}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yn("Region is missing"),requestHandler:z.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||nn),sha256:e?.sha256??Kn,streamCollector:e?.streamCollector??j,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Nr)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class my extends Zs{config;constructor(...[e]){const r=hy(e||{});super(r),this.initConfig=r;var n;const i=vt((n=r,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"geo-maps"}))),o=yn(i),a=Fr(o),c=((e,r)=>{const n=Object.assign(Ih(e),ir(e),t(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex((t=>t.schemeId===e.schemeId));-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(n))),Object.assign(e,Ah(n),or(n),s(n),{httpAuthSchemes:(i=n).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})((e=>{const t=zs(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(sn(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Mr(this.config)),this.middlewareStack.use(vn(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:dg,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(C(this.config))}destroy(){super.destroy()}}class gy extends(Xs.classBuilder().ep(hg).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("MapsService","GetGlyphs",{}).n("GeoMapsClient","GetGlyphsCommand").sc(cy).build()){}class fy extends(Xs.classBuilder().ep(hg).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("MapsService","GetSprites",{}).n("GeoMapsClient","GetSpritesCommand").sc(uy).build()){}class yy extends(Xs.classBuilder().ep(hg).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("MapsService","GetStaticMap",{}).n("GeoMapsClient","GetStaticMapCommand").sc(ly).build()){}class Sy extends(Xs.classBuilder().ep(hg).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("MapsService","GetStyleDescriptor",{}).n("GeoMapsClient","GetStyleDescriptorCommand").sc(dy).build()){}class Ry extends(Xs.classBuilder().ep(hg).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("MapsService","GetTile",{}).n("GeoMapsClient","GetTileCommand").sc(py).build()){}const wy={GetGlyphsCommand:gy,GetSpritesCommand:fy,GetStaticMapCommand:yy,GetStyleDescriptorCommand:Sy,GetTileCommand:Ry};class Ey extends my{}tr(wy,Ey);var Cy=Object.freeze({__proto__:null,$Command:Xs,AccessDeniedException:Zg,AccessDeniedException$:kf,Buildings:{BUILDINGS_3D:"Buildings3D"},ColorScheme:{DARK:"Dark",LIGHT:"Light"},ContourDensity:{MEDIUM:"Medium"},GeoMaps:Ey,GeoMapsClient:my,GeoMapsServiceException:Qg,GeoMapsServiceException$:$f,GetGlyphs$:cy,GetGlyphsCommand:gy,GetGlyphsRequest$:Zf,GetGlyphsResponse$:Yf,GetSprites$:uy,GetSpritesCommand:fy,GetSpritesRequest$:Jf,GetSpritesResponse$:Xf,GetStaticMap$:ly,GetStaticMapCommand:yy,GetStaticMapRequest$:ey,GetStaticMapResponse$:ty,GetStyleDescriptor$:dy,GetStyleDescriptorCommand:Sy,GetStyleDescriptorRequest$:sy,GetStyleDescriptorResponse$:ry,GetTile$:py,GetTileCommand:Ry,GetTileRequest$:ny,GetTileResponse$:iy,InternalServerException:Yg,InternalServerException$:Mf,LabelSize:{LARGE:"Large",SMALL:"Small"},MapFeatureMode:{DISABLED:"Disabled",ENABLED:"Enabled"},MapStyle:{HYBRID:"Hybrid",MONOCHROME:"Monochrome",SATELLITE:"Satellite",STANDARD:"Standard"},ResourceNotFoundException:ef,ResourceNotFoundException$:Nf,ScaleBarUnit:{KILOMETERS:"Kilometers",KILOMETERS_MILES:"KilometersMiles",MILES:"Miles",MILES_KILOMETERS:"MilesKilometers"},StaticMapStyle:{SATELLITE:"Satellite",STANDARD:"Standard"},Terrain:{HILLSHADE:"Hillshade",TERRAIN_3D:"Terrain3D"},ThrottlingException:Jg,ThrottlingException$:Uf,TileAdditionalFeature:{CONTOUR_LINES:"ContourLines",HILLSHADE:"Hillshade",LOGISTICS:"Logistics",TRANSIT:"Transit"},Traffic:{ALL:"All"},TravelMode:{TRANSIT:"Transit",TRUCK:"Truck"},ValidationException:Xg,ValidationException$:_f,ValidationExceptionField$:oy,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},Variant:{DEFAULT:"Default"},__Client:Zs,errorTypeRegistries:Gf});const vy=async(e,t,s)=>({operation:m(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const by=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-places",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},Ty={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var Py="3.992.0";const Iy="required",Ay="fn",xy="argv",Oy="ref",Dy="url",$y="properties",Ly="headers",ky=!0,My="isSet",Ny="booleanEquals",Uy="error",_y="endpoint",Gy="tree",Fy="PartitionResult",By={[Iy]:!0,default:!1,type:"boolean"},zy={[Iy]:!1,type:"string"},jy={[Oy]:"Endpoint"},Hy={[Ay]:Ny,[xy]:[{[Oy]:"UseFIPS"},!0]},qy={[Ay]:Ny,[xy]:[{[Oy]:"UseDualStack"},!0]},Vy={},Wy={[Ay]:"stringEquals",[xy]:[{[Ay]:"getAttr",[xy]:[{[Oy]:Fy},"name"]},"aws"]},Ky={[Ay]:Ny,[xy]:[{[Oy]:"UseFIPS"},!1]},Qy={[Ay]:Ny,[xy]:[{[Oy]:"UseDualStack"},!1]},Zy={[Dy]:"https://places.geo.{Region}.{PartitionResult#dnsSuffix}/v2",[$y]:{},[Ly]:{}},Yy={[Dy]:"https://places.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[$y]:{},[Ly]:{}},Jy={[Dy]:"https://places.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",[$y]:{},[Ly]:{}},Xy={[Dy]:"https://places.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",[$y]:{},[Ly]:{}},eS={[Ay]:"stringEquals",[xy]:[{[Ay]:"getAttr",[xy]:[{[Oy]:Fy},"name"]},"aws-us-gov"]},tS={[Ay]:"getAttr",[xy]:[{[Oy]:Fy},"supportsFIPS"]},sS={[Ay]:Ny,[xy]:[!0,{[Ay]:"getAttr",[xy]:[{[Oy]:Fy},"supportsDualStack"]}]},rS=[{[Oy]:"Region"}],nS={parameters:{UseDualStack:By,UseFIPS:By,Endpoint:zy,Region:zy},rules:[{conditions:[{[Ay]:My,[xy]:[jy]}],rules:[{conditions:[Hy],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Uy},{rules:[{conditions:[qy],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Uy},{endpoint:{[Dy]:jy,[$y]:Vy,[Ly]:Vy},type:_y}],type:Gy}],type:Gy},{rules:[{conditions:[{[Ay]:My,[xy]:rS}],rules:[{conditions:[{[Ay]:"aws.partition",[xy]:rS,assign:Fy}],rules:[{conditions:[Wy,Ky,Qy],endpoint:Zy,type:_y},{conditions:[Wy,Hy,qy],endpoint:Yy,type:_y},{conditions:[Wy,Hy,Qy],endpoint:Jy,type:_y},{conditions:[Wy,Ky,qy],endpoint:Xy,type:_y},{conditions:[eS,Ky,Qy],endpoint:Zy,type:_y},{conditions:[eS,Hy,qy],endpoint:Yy,type:_y},{conditions:[eS,Hy,Qy],endpoint:Jy,type:_y},{conditions:[eS,Ky,qy],endpoint:Xy,type:_y},{conditions:[Hy,qy],rules:[{conditions:[{[Ay]:Ny,[xy]:[ky,tS]},sS],rules:[{endpoint:{[Dy]:"https://geo-places-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[$y]:Vy,[Ly]:Vy},type:_y}],type:Gy},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Uy}],type:Gy},{conditions:[Hy,Qy],rules:[{conditions:[{[Ay]:Ny,[xy]:[tS,ky]}],rules:[{endpoint:{[Dy]:"https://geo-places-fips.{Region}.{PartitionResult#dnsSuffix}",[$y]:Vy,[Ly]:Vy},type:_y}],type:Gy},{error:"FIPS is enabled but this partition does not support FIPS",type:Uy}],type:Gy},{conditions:[Ky,qy],rules:[{conditions:[sS],rules:[{endpoint:{[Dy]:"https://geo-places.{Region}.{PartitionResult#dualStackDnsSuffix}",[$y]:Vy,[Ly]:Vy},type:_y}],type:Gy},{error:"DualStack is enabled but this partition does not support DualStack",type:Uy}],type:Gy},{endpoint:{[Dy]:"https://geo-places.{Region}.{PartitionResult#dnsSuffix}",[$y]:Vy,[Ly]:Vy},type:_y}],type:Gy}],type:Gy},{error:"Invalid Configuration: Missing Region",type:Uy}],type:Gy}]},iS=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),oS=(e,t={})=>iS.get(e,(()=>Yt(nS,{endpointParams:e,logger:t.logger})));xt.aws=ri;class aS extends sr{constructor(e){super(e),Object.setPrototypeOf(this,aS.prototype)}}let cS=class e extends aS{name="AccessDeniedException";$fault="client";Message;constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},uS=class e extends aS{name="InternalServerException";$fault="server";$retryable={};Message;constructor(t){super({name:"InternalServerException",$fault:"server",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},lS=class e extends aS{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(t){super({name:"ThrottlingException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message}},dS=class e extends aS{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(t){super({name:"ValidationException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype),this.Message=t.Message,this.Reason=t.Reason,this.FieldList=t.FieldList}};const pS="Address",hS="AdditionalFeatures",mS="AddressNumber",gS="AddressNumberCorrected",fS="AccessPoints",yS="AccessRestrictions",SS="Block",RS="BoundingBox",wS="BusinessChains",ES="BiasPosition",CS="Building",vS="Categories",bS="Circle",TS="Country",PS="Code",IS="Components",AS="Contacts",xS="District",OS="Designator",DS="Distance",$S="EndIndex",LS="Filter",kS="FoodTypes",MS="Heading",NS="Highlights",US="Intersection",_S="IncludeCountries",GS="IncludePlaceTypes",FS="IntendedUse",BS="Id",zS="Intersections",jS="Key",HS="Label",qS="LocalizedName",VS="Language",WS="Locality",KS="Message",QS="MainAddress",ZS="MaxResults",YS="MapView",JS="Name",XS="NextToken",eR="Number",tR="OpeningHours",sR="Position",rR="PostalAuthority",nR="PricingBucket",iR="PostalCode",oR="PostalCodeDetails",aR="PostalCodeType",cR="PlaceId",uR="PlaceType",lR="PoliticalView",dR="Phonemes",pR="Primary",hR="QueryId",mR="QueryPosition",gR="QueryRadius",fR="QueryText",yR="ResultItems",SR="RecordTypeCode",RR="Region",wR="Street",ER="SecondaryAddresses",CR="SecondaryAddressComponents",vR="SubBlock",bR="StreetComponents",TR="SubDistrict",PR="StartIndex",IR="SubRegion",AR="Title",xR="TimeZone",OR="UspsZip",DR="UspsZipPlus4",$R="Value",LR="ZipClassificationCode",kR="client",MR="error",NR="http",UR="httpError",_R="httpHeader",GR="httpQuery",FR="jsonName",BR="key",zR="message",jR="smithy.ts.sdk.synthetic.com.amazonaws.geoplaces",HR="x-amz-geo-pricing-bucket",qR="com.amazonaws.geoplaces",VR=le.for(jR);var WR=[-3,jR,"GeoPlacesServiceException",0,[],[]];VR.registerError(WR,aS);const KR=le.for(qR);var QR=[-3,qR,"AccessDeniedException",{[MR]:kR,[UR]:403},[KS],[[0,{[FR]:zR}]],1];KR.registerError(QR,cS);var ZR=[-3,qR,"InternalServerException",{[MR]:"server",[UR]:500},[KS],[[0,{[FR]:zR}]],1];KR.registerError(ZR,uS);var YR=[-3,qR,"ThrottlingException",{[MR]:kR,[UR]:429},[KS],[[0,{[FR]:zR}]],1];KR.registerError(YR,lS);var JR=[-3,qR,"ValidationException",{[MR]:kR,[UR]:400},[KS,"Reason","FieldList"],[[0,{[FR]:zR}],[0,{[FR]:"reason"}],[()=>mC,{[FR]:"fieldList"}]],3];KR.registerError(JR,dS);const XR=[VR,KR];var ew=[0,qR,"ApiKey",8,0],tw=[0,qR,"CountryCode",8,0],sw=[0,qR,"CountryCode2",8,0],rw=[0,qR,"CountryCode3",8,0],nw=[0,qR,"DistanceMeters",8,1],iw=[0,qR,"DurationSeconds",8,1],ow=[0,qR,"GeocodeFilterPlaceType",8,0],aw=[0,qR,MS,8,1],cw=[0,qR,"OpeningHoursDisplay",8,0],uw=[0,qR,uR,8,0],lw=[0,qR,rR,8,0],dw=[0,qR,aR,8,0],pw=[0,qR,SR,8,0],hw=[0,qR,"SensitiveBoolean",8,2],mw=[0,qR,"SensitiveString",8,0],gw=[0,qR,LR,8,0],fw=[3,qR,"AccessPoint",0,[sR],[[()=>rC,0]]],yw=[3,qR,"AccessRestriction",0,["Restricted",vS],[[()=>hw,0],[()=>GE,0]]],Sw=[3,qR,pS,0,[HS,TS,RR,IR,WS,xS,TR,iR,SS,vR,US,wR,bR,mS,CS,CR],[[()=>mw,0],[()=>$w,0],[()=>sE,0],[()=>wE,0],[()=>mw,0],[()=>mw,0],[()=>mw,0],[()=>mw,0],[()=>mw,0],[()=>mw,0],64,[()=>mw,0],[()=>pC,0],[()=>mw,0],[()=>mw,0],[()=>lC,0]]],Rw=[3,qR,"AddressComponentMatchScores",0,[TS,RR,IR,WS,xS,TR,iR,SS,vR,US,mS,CS,CR],[1,1,1,1,1,1,1,1,1,65,1,1,()=>dC]],ww=[3,qR,"AddressComponentPhonemes",0,[TS,RR,IR,WS,xS,TR,SS,vR,wR],[[()=>sC,0],[()=>sC,0],[()=>sC,0],[()=>sC,0],[()=>sC,0],[()=>sC,0],[()=>sC,0],[()=>sC,0],[()=>sC,0]]],Ew=[3,qR,"AutocompleteAddressHighlights",0,[HS,TS,RR,IR,WS,xS,TR,wR,SS,vR,US,iR,mS,CS],[[()=>KE,0],[()=>Lw,0],[()=>rE,0],[()=>EE,0],[()=>KE,0],[()=>KE,0],[()=>KE,0],[()=>KE,0],[()=>KE,0],[()=>KE,0],[()=>QE,0],[()=>KE,0],[()=>KE,0],[()=>KE,0]]],Cw=[3,qR,"AutocompleteFilter",0,[RS,bS,_S,GS],[[()=>UE,0],[()=>kw,0],[()=>BE,0],64]],vw=[3,qR,"AutocompleteHighlights",0,[AR,pS],[[()=>KE,0],[()=>Ew,0]]],bw=[3,qR,"AutocompleteRequest",0,[fR,ZS,ES,LS,"PostalCodeMode",hS,VS,lR,FS,jS],[[()=>mw,0],1,[()=>rC,0],[()=>Cw,0],0,64,0,[()=>tw,0],0,[()=>ew,{[GR]:BR}]],1],Tw=[3,qR,"AutocompleteResponse",0,[nR,yR],[[0,{[_R]:HR}],[()=>NE,0]],1],Pw=[3,qR,"AutocompleteResultItem",0,[cR,uR,AR,pS,DS,VS,lR,NS],[[()=>mw,0],[()=>uw,0],[()=>mw,0],[()=>Sw,0],[()=>nw,0],0,[()=>rw,0],[()=>vw,0]],3],Iw=[3,qR,"BusinessChain",0,[JS,BS],[[()=>mw,0],[()=>mw,0]]],Aw=[3,qR,"Category",0,[BS,JS,qS,pR],[[()=>mw,0],[()=>mw,0],[()=>mw,0],[()=>hw,0]],2],xw=[3,qR,"ComponentMatchScores",0,[AR,pS],[1,()=>Rw]],Ow=[3,qR,"ContactDetails",0,[HS,$R,vS],[[()=>mw,0],[()=>mw,0],[()=>GE,0]]],Dw=[3,qR,AS,0,["Phones","Faxes","Websites","Emails"],[[()=>FE,0],[()=>FE,0],[()=>FE,0],[()=>FE,0]]],$w=[3,qR,TS,0,["Code2","Code3",JS],[[()=>sw,0],[()=>rw,0],[()=>mw,0]]],Lw=[3,qR,"CountryHighlights",0,[PS,JS],[[()=>KE,0],[()=>KE,0]]],kw=[3,qR,"FilterCircle",8,["Center","Radius"],[[()=>rC,0],[()=>nw,0]],2],Mw=[3,qR,"FoodType",0,[qS,BS,pR],[[()=>mw,0],[()=>mw,0],[()=>hw,0]],1],Nw=[3,qR,"GeocodeFilter",0,[_S,GS],[[()=>BE,0],[()=>VE,0]]],Uw=[3,qR,"GeocodeParsedQuery",0,[AR,pS],[[()=>eC,0],[()=>_w,0]]],_w=[3,qR,"GeocodeParsedQueryAddressComponents",0,[TS,RR,IR,WS,xS,TR,iR,SS,vR,wR,mS,CS,CR],[[()=>eC,0],[()=>eC,0],[()=>eC,0],[()=>eC,0],[()=>eC,0],[()=>eC,0],[()=>eC,0],[()=>eC,0],[()=>eC,0],[()=>eC,0],[()=>eC,0],[()=>eC,0],[()=>tC,0]]],Gw=[3,qR,"GeocodeQueryComponents",0,[TS,RR,IR,WS,xS,wR,mS,iR],[[()=>mw,0],[()=>mw,0],[()=>mw,0],[()=>mw,0],[()=>mw,0],[()=>mw,0],[()=>mw,0],[()=>mw,0]]],Fw=[3,qR,"GeocodeRequest",0,[fR,"QueryComponents",ZS,ES,LS,hS,VS,lR,FS,jS],[[()=>mw,0],[()=>Gw,0],1,[()=>rC,0],[()=>Nw,0],64,0,[()=>tw,0],0,[()=>ew,{[GR]:BR}]]],Bw=[3,qR,"GeocodeResponse",0,[nR,yR],[[0,{[_R]:HR}],[()=>WE,0]],1],zw=[3,qR,"GeocodeResultItem",0,[cR,uR,AR,pS,gS,oR,sR,DS,YS,vS,kS,fS,xR,lR,"MatchScores","ParsedQuery",zS,QS,ER],[[()=>mw,0],[()=>uw,0],[()=>mw,0],[()=>Sw,0],[()=>hw,0],[()=>nC,0],[()=>rC,0],[()=>nw,0],[()=>UE,0],[()=>GE,0],[()=>qE,0],[()=>kE,0],[()=>OE,0],[()=>rw,0],()=>Ww,[()=>Uw,0],[()=>ZE,0],[()=>nE,0],[()=>oC,0]],3],jw=[3,qR,"GetPlaceRequest",0,[cR,hS,VS,lR,FS,jS],[[()=>mw,1],[64,{[GR]:"additional-features"}],[0,{[GR]:"language"}],[()=>tw,{[GR]:"political-view"}],[0,{[GR]:"intended-use"}],[()=>ew,{[GR]:BR}]],1],Hw=[3,qR,"GetPlaceResponse",0,[cR,uR,AR,nR,pS,gS,oR,sR,YS,vS,kS,wS,AS,tR,fS,yS,xR,lR,dR,QS,ER],[[()=>mw,0],[()=>uw,0],[()=>mw,0],[0,{[_R]:HR}],[()=>Sw,0],[()=>hw,0],[()=>nC,0],[()=>rC,0],[()=>UE,0],[()=>GE,0],[()=>qE,0],[()=>_E,0],[()=>Dw,0],[()=>XE,0],[()=>kE,0],[()=>ME,0],[()=>OE,0],[()=>rw,0],[()=>Jw,0],[()=>nE,0],[()=>oC,0]],4],qw=[3,qR,"Highlight",0,[PR,$S,$R],[1,1,[()=>mw,0]]],Vw=[3,qR,US,0,[cR,AR,pS,sR,DS,"RouteDistance",YS,fS],[[()=>mw,0],[()=>mw,0],[()=>Sw,0],[()=>rC,0],[()=>nw,0],[()=>nw,0],[()=>UE,0],[()=>kE,0]],2],Ww=[3,qR,"MatchScoreDetails",0,["Overall",IS],[1,()=>xw]],Kw=[3,qR,tR,0,["Display","OpenNow",IS,vS],[[()=>JE,0],[()=>hw,0],[()=>YE,0],[()=>GE,0]]],Qw=[3,qR,"OpeningHoursComponents",0,["OpenTime","OpenDuration","Recurrence"],[[()=>mw,0],[()=>mw,0],[()=>mw,0]]],Zw=[3,qR,"ParsedQueryComponent",0,[PR,$S,$R,"QueryComponent"],[1,1,[()=>mw,0],[()=>mw,0]]],Yw=[3,qR,"ParsedQuerySecondaryAddressComponent",0,[PR,$S,$R,eR,OS],[1,1,[()=>mw,0],[()=>mw,0],[()=>mw,0]],5],Jw=[3,qR,"PhonemeDetails",0,[AR,pS],[[()=>sC,0],[()=>ww,0]]],Xw=[3,qR,"PhonemeTranscription",0,[$R,VS,"Preferred"],[[()=>mw,0],0,[()=>hw,0]]],eE=[3,qR,oR,0,[iR,rR,aR,OR,DR],[[()=>mw,0],[()=>lw,0],[()=>dw,0],[()=>DE,0],[()=>$E,0]]],tE=[3,qR,"QueryRefinement",0,["RefinedTerm","OriginalTerm",PR,$S],[[()=>mw,0],[()=>mw,0],1,1],4],sE=[3,qR,RR,0,[PS,JS],[[()=>mw,0],[()=>mw,0]]],rE=[3,qR,"RegionHighlights",0,[PS,JS],[[()=>KE,0],[()=>KE,0]]],nE=[3,qR,"RelatedPlace",0,[cR,uR,AR,pS,sR,fS],[[()=>mw,0],[()=>uw,0],[()=>mw,0],[()=>Sw,0],[()=>rC,0],[()=>kE,0]],3],iE=[3,qR,"ReverseGeocodeFilter",0,[GS],[64]],oE=[3,qR,"ReverseGeocodeRequest",0,[mR,gR,ZS,LS,hS,VS,lR,FS,jS,MS],[[()=>rC,0],[()=>nw,0],1,()=>iE,64,0,[()=>tw,0],0,[()=>ew,{[GR]:BR}],[()=>aw,0]],1],aE=[3,qR,"ReverseGeocodeResponse",0,[nR,yR],[[0,{[_R]:HR}],[()=>aC,0]],1],cE=[3,qR,"ReverseGeocodeResultItem",0,[cR,uR,AR,pS,gS,oR,sR,DS,YS,vS,kS,fS,xR,lR,zS],[[()=>mw,0],[()=>uw,0],[()=>mw,0],[()=>Sw,0],[()=>hw,0],[()=>nC,0],[()=>rC,0],[()=>nw,0],[()=>UE,0],[()=>GE,0],[()=>qE,0],[()=>kE,0],[()=>OE,0],[()=>rw,0],[()=>ZE,0]],3],uE=[3,qR,"SearchNearbyFilter",0,[RS,_S,"IncludeCategories","ExcludeCategories","IncludeBusinessChains","ExcludeBusinessChains","IncludeFoodTypes","ExcludeFoodTypes"],[[()=>UE,0],[()=>BE,0],[()=>jE,0],[()=>jE,0],[()=>zE,0],[()=>zE,0],[()=>HE,0],[()=>HE,0]]],lE=[3,qR,"SearchNearbyRequest",0,[mR,gR,ZS,LS,hS,VS,lR,FS,XS,jS],[[()=>rC,0],[()=>nw,0],1,[()=>uE,0],64,0,[()=>tw,0],0,0,[()=>ew,{[GR]:BR}]],1],dE=[3,qR,"SearchNearbyResponse",0,[nR,yR,XS],[[0,{[_R]:HR}],[()=>cC,0],0],1],pE=[3,qR,"SearchNearbyResultItem",0,[cR,uR,AR,pS,gS,sR,DS,YS,vS,kS,wS,AS,tR,fS,yS,xR,lR,dR],[[()=>mw,0],[()=>uw,0],[()=>mw,0],[()=>Sw,0],[()=>hw,0],[()=>rC,0],[()=>nw,0],[()=>UE,0],[()=>GE,0],[()=>qE,0],[()=>_E,0],[()=>Dw,0],[()=>XE,0],[()=>kE,0],[()=>ME,0],[()=>OE,0],[()=>rw,0],[()=>Jw,0]],3],hE=[3,qR,"SearchTextFilter",0,[RS,bS,_S],[[()=>UE,0],[()=>kw,0],[()=>BE,0]]],mE=[3,qR,"SearchTextRequest",0,[fR,hR,ZS,ES,LS,hS,VS,lR,FS,XS,jS],[[()=>mw,0],[()=>mw,0],1,[()=>rC,0],[()=>hE,0],64,0,[()=>tw,0],0,0,[()=>ew,{[GR]:BR}]]],gE=[3,qR,"SearchTextResponse",0,[nR,yR,XS],[[0,{[_R]:HR}],[()=>uC,0],0],1],fE=[3,qR,"SearchTextResultItem",0,[cR,uR,AR,pS,gS,sR,DS,YS,vS,kS,wS,AS,tR,fS,yS,xR,lR,dR],[[()=>mw,0],[()=>uw,0],[()=>mw,0],[()=>Sw,0],[()=>hw,0],[()=>rC,0],[()=>nw,0],[()=>UE,0],[()=>GE,0],[()=>qE,0],[()=>_E,0],[()=>Dw,0],[()=>XE,0],[()=>kE,0],[()=>ME,0],[()=>OE,0],[()=>rw,0],[()=>Jw,0]],3],yE=[3,qR,"SecondaryAddressComponent",0,[eR,OS],[[()=>mw,0],[()=>mw,0]],1],SE=[3,qR,"SecondaryAddressComponentMatchScore",0,[eR],[1]],RE=[3,qR,bR,0,["BaseName","Type","TypePlacement","TypeSeparator","Prefix","Suffix","Direction",VS],[[()=>mw,0],[()=>mw,0],0,0,[()=>mw,0],[()=>mw,0],[()=>mw,0],0]],wE=[3,qR,IR,0,[PS,JS],[[()=>mw,0],[()=>mw,0]]],EE=[3,qR,"SubRegionHighlights",0,[PS,JS],[[()=>KE,0],[()=>KE,0]]],CE=[3,qR,"SuggestAddressHighlights",0,[HS],[[()=>KE,0]]],vE=[3,qR,"SuggestFilter",0,[RS,bS,_S],[[()=>UE,0],[()=>kw,0],[()=>BE,0]]],bE=[3,qR,"SuggestHighlights",0,[AR,pS],[[()=>KE,0],[()=>CE,0]]],TE=[3,qR,"SuggestPlaceResult",0,[cR,uR,pS,sR,DS,YS,vS,kS,wS,fS,yS,xR,lR,dR],[[()=>mw,0],[()=>uw,0],[()=>Sw,0],[()=>rC,0],[()=>nw,0],[()=>UE,0],[()=>GE,0],[()=>qE,0],[()=>_E,0],[()=>kE,0],[()=>ME,0],[()=>OE,0],[()=>rw,0],[()=>Jw,0]]],PE=[3,qR,"SuggestQueryResult",0,[hR,"QueryType"],[[()=>mw,0],0]],IE=[3,qR,"SuggestRequest",0,[fR,ZS,"MaxQueryRefinements",ES,LS,hS,VS,lR,FS,jS],[[()=>mw,0],1,1,[()=>rC,0],[()=>vE,0],64,0,[()=>tw,0],0,[()=>ew,{[GR]:BR}]],1],AE=[3,qR,"SuggestResponse",0,[nR,yR,"QueryRefinements"],[[0,{[_R]:HR}],[()=>hC,0],[()=>iC,0]],1],xE=[3,qR,"SuggestResultItem",0,[AR,"SuggestResultItemType","Place","Query",NS],[[()=>mw,0],0,[()=>TE,0],[()=>PE,0],[()=>bE,0]],2],OE=[3,qR,xR,0,[JS,"Offset","OffsetSeconds"],[[()=>mw,0],[()=>mw,0],[()=>iw,0]],1],DE=[3,qR,OR,0,[LR],[[()=>gw,0]]],$E=[3,qR,DR,0,[SR],[[()=>pw,0]]],LE=[3,qR,"ValidationExceptionField",0,[JS,KS],[[0,{[FR]:"name"}],[0,{[FR]:zR}]],2],kE=[1,qR,"AccessPointList",0,[()=>fw,0]],ME=[1,qR,"AccessRestrictionList",0,[()=>yw,0]],NE=[1,qR,"AutocompleteResultItemList",0,[()=>Pw,0]],UE=[1,qR,RS,8,1],_E=[1,qR,"BusinessChainList",0,[()=>Iw,0]],GE=[1,qR,"CategoryList",0,[()=>Aw,0]],FE=[1,qR,"ContactDetailsList",0,[()=>Ow,0]],BE=[1,qR,"CountryCodeList",0,[()=>tw,0]],zE=[1,qR,"FilterBusinessChainList",0,[()=>mw,0]],jE=[1,qR,"FilterCategoryList",0,[()=>mw,0]],HE=[1,qR,"FilterFoodTypeList",0,[()=>mw,0]],qE=[1,qR,"FoodTypeList",0,[()=>Mw,0]],VE=[1,qR,"GeocodeFilterPlaceTypeList",0,[()=>ow,0]],WE=[1,qR,"GeocodeResultItemList",0,[()=>zw,0]],KE=[1,qR,"HighlightList",0,[()=>qw,0]],QE=[1,qR,"IntersectionHighlightsList",0,[()=>KE,0]],ZE=[1,qR,"IntersectionList",0,[()=>Vw,0]],YE=[1,qR,"OpeningHoursComponentsList",0,[()=>Qw,0]],JE=[1,qR,"OpeningHoursDisplayList",0,[()=>cw,0]],XE=[1,qR,"OpeningHoursList",0,[()=>Kw,0]],eC=[1,qR,"ParsedQueryComponentList",0,[()=>Zw,0]],tC=[1,qR,"ParsedQuerySecondaryAddressComponentList",0,[()=>Yw,0]],sC=[1,qR,"PhonemeTranscriptionList",0,[()=>Xw,0]],rC=[1,qR,sR,8,1],nC=[1,qR,"PostalCodeDetailsList",0,[()=>eE,0]],iC=[1,qR,"QueryRefinementList",0,[()=>tE,0]],oC=[1,qR,"RelatedPlaceList",0,[()=>nE,0]],aC=[1,qR,"ReverseGeocodeResultItemList",0,[()=>cE,0]],cC=[1,qR,"SearchNearbyResultItemList",0,[()=>pE,0]],uC=[1,qR,"SearchTextResultItemList",0,[()=>fE,0]],lC=[1,qR,"SecondaryAddressComponentList",0,[()=>yE,0]],dC=[1,qR,"SecondaryAddressComponentMatchScoreList",0,()=>SE],pC=[1,qR,"StreetComponentsList",0,[()=>RE,0]],hC=[1,qR,"SuggestResultItemList",0,[()=>xE,0]],mC=[1,qR,"ValidationExceptionFieldList",0,[()=>LE,0]],gC=[9,qR,"Autocomplete",{[NR]:["POST","/autocomplete",200]},()=>bw,()=>Tw],fC=[9,qR,"Geocode",{[NR]:["POST","/geocode",200]},()=>Fw,()=>Bw],yC=[9,qR,"GetPlace",{[NR]:["GET","/place/{PlaceId}",200]},()=>jw,()=>Hw],SC=[9,qR,"ReverseGeocode",{[NR]:["POST","/reverse-geocode",200]},()=>oE,()=>aE],RC=[9,qR,"SearchNearby",{[NR]:["POST","/search-nearby",200]},()=>lE,()=>dE],wC=[9,qR,"SearchText",{[NR]:["POST","/search-text",200]},()=>mE,()=>gE],EC=[9,qR,"Suggest",{[NR]:["POST","/suggest",200]},()=>IE,()=>AE];const CC=e=>{const t=Xn(e),s=()=>t().then(nr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??k,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??oS,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??by,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new cs}],logger:e?.logger??new cr,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.geoplaces",errorTypeRegistries:XR,version:"2020-11-19",serviceTarget:"PlacesService"},serviceId:e?.serviceId??"Geo Places",urlParser:e?.urlParser??ts,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??L}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Hs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qn({serviceId:r.serviceId,clientVersion:Py}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yn("Region is missing"),requestHandler:z.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||nn),sha256:e?.sha256??Kn,streamCollector:e?.streamCollector??j,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Nr)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class vC extends Zs{config;constructor(...[e]){const r=CC(e||{});super(r),this.initConfig=r;var n;const i=vt((n=r,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"geo-places"}))),o=yn(i),a=Fr(o),c=((e,r)=>{const n=Object.assign(Ih(e),ir(e),t(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex((t=>t.schemeId===e.schemeId));-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(n))),Object.assign(e,Ah(n),or(n),s(n),{httpAuthSchemes:(i=n).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})((e=>{const t=zs(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(sn(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Mr(this.config)),this.middlewareStack.use(vn(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:vy,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(C(this.config))}destroy(){super.destroy()}}class bC extends(Xs.classBuilder().ep(Ty).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("PlacesService","Autocomplete",{}).n("GeoPlacesClient","AutocompleteCommand").sc(gC).build()){}class TC extends(Xs.classBuilder().ep(Ty).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("PlacesService","Geocode",{}).n("GeoPlacesClient","GeocodeCommand").sc(fC).build()){}class PC extends(Xs.classBuilder().ep(Ty).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("PlacesService","GetPlace",{}).n("GeoPlacesClient","GetPlaceCommand").sc(yC).build()){}class IC extends(Xs.classBuilder().ep(Ty).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("PlacesService","ReverseGeocode",{}).n("GeoPlacesClient","ReverseGeocodeCommand").sc(SC).build()){}class AC extends(Xs.classBuilder().ep(Ty).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("PlacesService","SearchNearby",{}).n("GeoPlacesClient","SearchNearbyCommand").sc(RC).build()){}class xC extends(Xs.classBuilder().ep(Ty).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("PlacesService","SearchText",{}).n("GeoPlacesClient","SearchTextCommand").sc(wC).build()){}class OC extends(Xs.classBuilder().ep(Ty).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("PlacesService","Suggest",{}).n("GeoPlacesClient","SuggestCommand").sc(EC).build()){}const DC={AutocompleteCommand:bC,GeocodeCommand:TC,GetPlaceCommand:PC,ReverseGeocodeCommand:IC,SearchNearbyCommand:AC,SearchTextCommand:xC,SuggestCommand:OC};class $C extends vC{}tr(DC,$C);var LC=Object.freeze({__proto__:null,$Command:Xs,AccessDeniedException:cS,AccessDeniedException$:QR,AccessPoint$:fw,AccessRestriction$:yw,Address$:Sw,AddressComponentMatchScores$:Rw,AddressComponentPhonemes$:ww,Autocomplete$:gC,AutocompleteAdditionalFeature:{CORE:"Core"},AutocompleteAddressHighlights$:Ew,AutocompleteCommand:bC,AutocompleteFilter$:Cw,AutocompleteFilterPlaceType:{LOCALITY:"Locality",POSTAL_CODE:"PostalCode"},AutocompleteHighlights$:vw,AutocompleteIntendedUse:{SINGLE_USE:"SingleUse"},AutocompleteRequest$:bw,AutocompleteResponse$:Tw,AutocompleteResultItem$:Pw,BusinessChain$:Iw,Category$:Aw,ComponentMatchScores$:xw,ContactDetails$:Ow,Contacts$:Dw,Country$:$w,CountryHighlights$:Lw,FilterCircle$:kw,FoodType$:Mw,GeoPlaces:$C,GeoPlacesClient:vC,GeoPlacesServiceException:aS,GeoPlacesServiceException$:WR,Geocode$:fC,GeocodeAdditionalFeature:{ACCESS:"Access",INTERSECTIONS:"Intersections",SECONDARY_ADDRESSES:"SecondaryAddresses",TIME_ZONE:"TimeZone"},GeocodeCommand:TC,GeocodeFilter$:Nw,GeocodeFilterPlaceType:{INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",POSTAL_CODE:"PostalCode",STREET:"Street"},GeocodeIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},GeocodeParsedQuery$:Uw,GeocodeParsedQueryAddressComponents$:_w,GeocodeQueryComponents$:Gw,GeocodeRequest$:Fw,GeocodeResponse$:Bw,GeocodeResultItem$:zw,GetPlace$:yC,GetPlaceAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",SECONDARY_ADDRESSES:"SecondaryAddresses",TIME_ZONE:"TimeZone"},GetPlaceCommand:PC,GetPlaceIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},GetPlaceRequest$:jw,GetPlaceResponse$:Hw,Highlight$:qw,InternalServerException:uS,InternalServerException$:ZR,Intersection$:Vw,MatchScoreDetails$:Ww,OpeningHours$:Kw,OpeningHoursComponents$:Qw,ParsedQueryComponent$:Zw,ParsedQuerySecondaryAddressComponent$:Yw,PhonemeDetails$:Jw,PhonemeTranscription$:Xw,PlaceType:{BLOCK:"Block",COUNTRY:"Country",DISTRICT:"District",INFERRED_SECONDARY_ADDRESS:"InferredSecondaryAddress",INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",POINT_OF_INTEREST:"PointOfInterest",POSTAL_CODE:"PostalCode",REGION:"Region",SECONDARY_ADDRESS:"SecondaryAddress",STREET:"Street",SUB_BLOCK:"SubBlock",SUB_DISTRICT:"SubDistrict",SUB_REGION:"SubRegion"},PostalAuthority:{USPS:"Usps"},PostalCodeDetails$:eE,PostalCodeMode:{ENUMERATE_SPANNED_LOCALITIES:"EnumerateSpannedLocalities",MERGE_ALL_SPANNED_LOCALITIES:"MergeAllSpannedLocalities"},PostalCodeType:{USPS_ZIP:"UspsZip",USPS_ZIP_PLUS_4:"UspsZipPlus4"},QueryRefinement$:tE,QueryType:{BUSINESS_CHAIN:"BusinessChain",CATEGORY:"Category"},RecordTypeCode:{FIRM:"Firm",GENERAL:"General",HIGH_RISE:"HighRise",POST_OFFICE_BOX:"PostOfficeBox",RURAL:"Rural",STREET:"Street"},Region$:sE,RegionHighlights$:rE,RelatedPlace$:nE,ReverseGeocode$:SC,ReverseGeocodeAdditionalFeature:{ACCESS:"Access",INTERSECTIONS:"Intersections",TIME_ZONE:"TimeZone"},ReverseGeocodeCommand:IC,ReverseGeocodeFilter$:iE,ReverseGeocodeFilterPlaceType:{INTERPOLATED_ADDRESS:"InterpolatedAddress",INTERSECTION:"Intersection",LOCALITY:"Locality",POINT_ADDRESS:"PointAddress",STREET:"Street"},ReverseGeocodeIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},ReverseGeocodeRequest$:oE,ReverseGeocodeResponse$:aE,ReverseGeocodeResultItem$:cE,SearchNearby$:RC,SearchNearbyAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SearchNearbyCommand:AC,SearchNearbyFilter$:uE,SearchNearbyIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},SearchNearbyRequest$:lE,SearchNearbyResponse$:dE,SearchNearbyResultItem$:pE,SearchText$:wC,SearchTextAdditionalFeature:{ACCESS:"Access",CONTACT:"Contact",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SearchTextCommand:xC,SearchTextFilter$:hE,SearchTextIntendedUse:{SINGLE_USE:"SingleUse",STORAGE:"Storage"},SearchTextRequest$:mE,SearchTextResponse$:gE,SearchTextResultItem$:fE,SecondaryAddressComponent$:yE,SecondaryAddressComponentMatchScore$:SE,StreetComponents$:RE,SubRegion$:wE,SubRegionHighlights$:EE,Suggest$:EC,SuggestAdditionalFeature:{ACCESS:"Access",CORE:"Core",PHONEMES:"Phonemes",TIME_ZONE:"TimeZone"},SuggestAddressHighlights$:CE,SuggestCommand:OC,SuggestFilter$:vE,SuggestHighlights$:bE,SuggestIntendedUse:{SINGLE_USE:"SingleUse"},SuggestPlaceResult$:TE,SuggestQueryResult$:PE,SuggestRequest$:IE,SuggestResponse$:AE,SuggestResultItem$:xE,SuggestResultItemType:{PLACE:"Place",QUERY:"Query"},ThrottlingException:lS,ThrottlingException$:YR,TimeZone$:OE,TypePlacement:{AFTER_BASE_NAME:"AfterBaseName",BEFORE_BASE_NAME:"BeforeBaseName"},UspsZip$:DE,UspsZipPlus4$:$E,ValidationException:dS,ValidationException$:JR,ValidationExceptionField$:LE,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},ZipClassificationCode:{MILITARY:"Military",POST_OFFICE_BOXES:"PostOfficeBoxes",UNIQUE:"Unique"},__Client:Zs,errorTypeRegistries:XR});const kC=async(e,t,s)=>({operation:m(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const MC=e=>{const t=[];return e.operation,t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"geo-routes",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e)),t},NC={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var UC="3.992.0";const _C="required",GC="fn",FC="argv",BC="ref",zC=!0,jC="isSet",HC="booleanEquals",qC="error",VC="endpoint",WC="tree",KC="PartitionResult",QC={[_C]:!0,default:!1,type:"boolean"},ZC={[_C]:!1,type:"string"},YC={[BC]:"Endpoint"},JC={[GC]:HC,[FC]:[{[BC]:"UseFIPS"},!0]},XC={[GC]:HC,[FC]:[{[BC]:"UseDualStack"},!0]},ev={},tv={[GC]:"stringEquals",[FC]:[{[GC]:"getAttr",[FC]:[{[BC]:KC},"name"]},"aws"]},sv={[GC]:HC,[FC]:[{[BC]:"UseFIPS"},!1]},rv={[GC]:HC,[FC]:[{[BC]:"UseDualStack"},!1]},nv={[GC]:"stringEquals",[FC]:[{[GC]:"getAttr",[FC]:[{[BC]:KC},"name"]},"aws-us-gov"]},iv={[GC]:"getAttr",[FC]:[{[BC]:KC},"supportsFIPS"]},ov={[GC]:HC,[FC]:[!0,{[GC]:"getAttr",[FC]:[{[BC]:KC},"supportsDualStack"]}]},av=[{[BC]:"Region"}],cv={parameters:{UseDualStack:QC,UseFIPS:QC,Endpoint:ZC,Region:ZC},rules:[{conditions:[{[GC]:jC,[FC]:[YC]}],rules:[{conditions:[JC],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:qC},{rules:[{conditions:[XC],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:qC},{endpoint:{url:YC,properties:ev,headers:ev},type:VC}],type:WC}],type:WC},{rules:[{conditions:[{[GC]:jC,[FC]:av}],rules:[{conditions:[{[GC]:"aws.partition",[FC]:av,assign:KC}],rules:[{conditions:[tv,sv,rv],endpoint:{url:"https://routes.geo.{Region}.{PartitionResult#dnsSuffix}/v2",properties:ev,headers:ev},type:VC},{conditions:[tv,JC,XC],endpoint:{url:"https://routes.geo-fips.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:ev,headers:ev},type:VC},{conditions:[tv,JC,rv],endpoint:{url:"https://routes.geo-fips.{Region}.{PartitionResult#dnsSuffix}/v2",properties:ev,headers:ev},type:VC},{conditions:[tv,sv,XC],endpoint:{url:"https://routes.geo.{Region}.{PartitionResult#dualStackDnsSuffix}/v2",properties:ev,headers:ev},type:VC},{conditions:[nv,sv,rv],endpoint:{url:"https://routes.geo.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:ev,headers:ev},type:VC},{conditions:[nv,JC,XC],endpoint:{url:"https://routes.geo-fips.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:ev,headers:ev},type:VC},{conditions:[nv,JC,rv],endpoint:{url:"https://routes.geo-fips.{Region}.us-gov.{PartitionResult#dnsSuffix}/v2",properties:ev,headers:ev},type:VC},{conditions:[nv,sv,XC],endpoint:{url:"https://routes.geo.{Region}.us-gov.{PartitionResult#dualStackDnsSuffix}/v2",properties:ev,headers:ev},type:VC},{conditions:[JC,XC],rules:[{conditions:[{[GC]:HC,[FC]:[zC,iv]},ov],rules:[{endpoint:{url:"https://geo-routes-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ev,headers:ev},type:VC}],type:WC},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:qC}],type:WC},{conditions:[JC,rv],rules:[{conditions:[{[GC]:HC,[FC]:[iv,zC]}],rules:[{endpoint:{url:"https://geo-routes-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ev,headers:ev},type:VC}],type:WC},{error:"FIPS is enabled but this partition does not support FIPS",type:qC}],type:WC},{conditions:[sv,XC],rules:[{conditions:[ov],rules:[{endpoint:{url:"https://geo-routes.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ev,headers:ev},type:VC}],type:WC},{error:"DualStack is enabled but this partition does not support DualStack",type:qC}],type:WC},{endpoint:{url:"https://geo-routes.{Region}.{PartitionResult#dnsSuffix}",properties:ev,headers:ev},type:VC}],type:WC}],type:WC},{error:"Invalid Configuration: Missing Region",type:qC}],type:WC}]},uv=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),lv=(e,t={})=>uv.get(e,(()=>Yt(cv,{endpointParams:e,logger:t.logger})));xt.aws=ri;class dv extends sr{constructor(e){super(e),Object.setPrototypeOf(this,dv.prototype)}}class pv extends dv{name="AccessDeniedException";$fault="client";Message;constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,pv.prototype),this.Message=e.Message}}class hv extends dv{name="InternalServerException";$fault="server";$retryable={};Message;constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,hv.prototype),this.Message=e.Message}}class mv extends dv{name="ThrottlingException";$fault="client";$retryable={};Message;constructor(e){super({name:"ThrottlingException",$fault:"client",...e}),Object.setPrototypeOf(this,mv.prototype),this.Message=e.Message}}class gv extends dv{name="ValidationException";$fault="client";Message;Reason;FieldList;constructor(e){super({name:"ValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,gv.prototype),this.Message=e.Message,this.Reason=e.Reason,this.FieldList=e.FieldList}}const fv="Allow",yv="AvoidActionsForDistance",Sv="AxleCount",Rv="AccessHours",wv="ArrivalTime",Ev="AppointmentTime",Cv="AvoidUTurns",vv="Areas",bv="Arrival",Tv="Avoid",Pv="BoundingBox",Iv="BestCaseDuration",Av="Circle",xv="ControlledAccessHighways",Ov="CurrentRoad",Dv="ContinueStepDetails",$v="CarShuttleTrains",Lv="Category",kv="Car",Mv="Corridor",Nv="Code",Uv="Connections",_v="Countries",Gv="Country",Fv="Currency",Bv="Destination",zv="DepartNow",jv="DestinationOptions",Hv="DayOfWeek",qv="DirtRoads",Vv="DynamicSpeed",Wv="DepartureTime",Kv="Departure",Qv="Distance",Zv="Driver",Yv="Duration",Jv="Exclude",Xv="ExitNumber",eb="EngineType",tb="Estimate",sb="Except",rb="Ferries",nb="FunctionalClassification",ib="FlowEventThresholdOverride",ob="From",ab="GeometryOffset",cb="GrossWeight",ub="Geometry",lb="Heading",db="HeightAboveFirstAxle",pb="HazardousCargos",hb="Height",mb="Hot",gb="Hov",fb="IsolineGeometryFormat",yb="Id",Sb="Impact",Rb="Intersection",wb="Incidents",Eb="Instruction",Cb="Key",vb="KpraLength",bb="KeepStepDetails",Tb="LastCharacter",Pb="LegGeometryFormat",Ib="LicensePlate",Ab="LineString",xb="Language",Ob="Length",Db="Message",$b="MaxSpeed",Lb="Matching",kb="Notices",Mb="NameHint",Nb="NextRoad",Ub="Name",_b="Names",Gb="Origin",Fb="OriginOptions",Bb="OriginalPosition",zb="OptimizeRoutingFor",jb="OnRoadThreshold",Hb="Occupancy",qb="Options",Vb="Overview",Wb="Polyline",Kb="PricingBucket",Qb="PolylineCorridor",Zb="PayloadCapacity",Yb="PolylinePolygon",Jb="PassThroughWaypoints",Xb="Pedestrian",eT="Place",tT="Polygon",sT="Position",rT="Reason",nT="RoadAttributes",iT="RoutingBoundary",oT="RestDuration",aT="RelativeExit",cT="RoundaboutEnterStepDetails",uT="RoundaboutExitStepDetails",lT="RouteMatrix",dT="RoadName",pT="RouteNumber",hT="RouteNumbers",mT="RoundaboutPassStepDetails",gT="RangeValue",fT="Radius",yT="Range",ST="Region",RT="Strategy",wT="SeasonalClosure",ET="ServiceDuration",CT="SteeringDirection",vT="StopDuration",bT="SnappedGeometryFormat",TT="SpeedLimit",PT="SideOfStreet",IT="Scooter",AT="Signpost",xT="Speed",OT="Spans",DT="Summary",$T="TurnAngle",LT="TrailerCount",kT="TireCount",MT="TypicalDuration",NT="TravelDuration",UT="TurnIntensity",_T="TravelMode",GT="TravelModeOptions",FT="TravelOnly",BT="TimeOfDay",zT="TollRoads",jT="TunnelRestrictionCode",HT="TruckRoadType",qT="TruckRoadTypes",VT="TravelSteps",WT="TurnStepDetails",KT="TollSystems",QT="TollTransponders",ZT="TruckType",YT="Time",JT="Title",XT="Tolls",eP="Traffic",tP="Trailer",sP="Truck",rP="Tunnels",nP="Type",iP="Usage",oP="UTurns",aP="UseWith",cP="Value",uP="Waypoints",lP="WaitDuration",dP="WaypointIndex",pP="WeightPerAxle",hP="WeightPerAxleGroup",mP="Width",gP="Zones",fP="ZoneCategories",yP="client",SP="error",RP="http",wP="httpError",EP="httpHeader",CP="httpQuery",vP="jsonName",bP="key",TP="message",PP="smithy.ts.sdk.synthetic.com.amazonaws.georoutes",IP="x-amz-geo-pricing-bucket",AP="com.amazonaws.georoutes",xP=le.for(PP);var OP=[-3,PP,"GeoRoutesServiceException",0,[],[]];xP.registerError(OP,dv);const DP=le.for(AP);var $P=[-3,AP,"AccessDeniedException",{[SP]:yP,[wP]:403},[Db],[[0,{[vP]:TP}]],1];DP.registerError($P,pv);var LP=[-3,AP,"InternalServerException",{[SP]:"server",[wP]:500},[Db],[[0,{[vP]:TP}]],1];DP.registerError(LP,hv);var kP=[-3,AP,"ThrottlingException",{[SP]:yP,[wP]:429},[Db],[[0,{[vP]:TP}]],1];DP.registerError(kP,mv);var MP=[-3,AP,"ValidationException",{[SP]:yP,[wP]:400},[Db,rT,"FieldList"],[[0,{[vP]:TP}],[0,{[vP]:"reason"}],[()=>M$,{[vP]:"fieldList"}]],3];DP.registerError(MP,gv);const NP=[xP,DP];var UP=[0,AP,"ApiKey",8,0],_P=[0,AP,"CountryCode",8,0],GP=[0,AP,"CountryCode3",8,0],FP=[0,AP,Hv,8,0],BP=[0,AP,"DimensionCentimeters",8,1],zP=[0,AP,"DistanceMeters",8,1],jP=[0,AP,"DurationSeconds",8,1],HP=[0,AP,lb,8,1],qP=[0,AP,"IsolineEngineType",8,0],VP=[0,AP,"IsolineHazardousCargoType",8,0],WP=[0,AP,Wb,8,0],KP=[0,AP,"PolylineRing",8,0],QP=[0,AP,"RoadSnapHazardousCargoType",8,0],ZP=[0,AP,"RoadSnapNoticeCode",8,0],YP=[0,AP,"RouteDirection",8,0],JP=[0,AP,"RouteEngineType",8,0],XP=[0,AP,"RouteFerryAfterTravelStepType",8,0],eI=[0,AP,"RouteFerryBeforeTravelStepType",8,0],tI=[0,AP,"RouteFerryTravelStepType",8,0],sI=[0,AP,"RouteHazardousCargoType",8,0],rI=[0,AP,"RouteLegAdditionalFeature",8,0],nI=[0,AP,"RouteLegTravelMode",8,0],iI=[0,AP,"RouteLegType",8,0],oI=[0,AP,"RouteMatrixHazardousCargoType",8,0],aI=[0,AP,"RouteMatrixTruckType",8,0],cI=[0,AP,"RouteMatrixZoneCategory",8,0],uI=[0,AP,"RoutePedestrianTravelStepType",8,0],lI=[0,AP,"RouteRoadType",8,0],dI=[0,AP,"RouteSideOfStreet",8,0],pI=[0,AP,"RouteSpanCarAccessAttribute",8,0],hI=[0,AP,"RouteSpanGateAttribute",8,0],mI=[0,AP,"RouteSpanPedestrianAccessAttribute",8,0],gI=[0,AP,"RouteSpanRailwayCrossingAttribute",8,0],fI=[0,AP,"RouteSpanRoadAttribute",8,0],yI=[0,AP,"RouteSpanScooterAccessAttribute",8,0],SI=[0,AP,"RouteSpanTruckAccessAttribute",8,0],RI=[0,AP,"RouteSteeringDirection",8,0],wI=[0,AP,"RouteTollPassValidityPeriodType",8,0],EI=[0,AP,"RouteTollPaymentMethod",8,0],CI=[0,AP,"RouteTollVehicleCategory",8,0],vI=[0,AP,"RouteTruckType",8,0],bI=[0,AP,"RouteTurnIntensity",8,0],TI=[0,AP,"RouteVehicleIncidentSeverity",8,0],PI=[0,AP,"RouteVehicleIncidentType",8,0],II=[0,AP,"RouteVehicleTravelStepType",8,0],AI=[0,AP,"RouteZoneCategory",8,0],xI=[0,AP,"SensitiveBoolean",8,2],OI=[0,AP,"SensitiveDouble",8,1],DI=[0,AP,"SensitiveInteger",8,1],$I=[0,AP,"SensitiveString",8,0],LI=[0,AP,"SpeedKilometersPerHour",8,1],kI=[0,AP,BT,8,0],MI=[0,AP,"TimestampWithTimezoneOffset",8,0],NI=[0,AP,HT,8,0],UI=[0,AP,jT,8,0],_I=[0,AP,"WaypointOptimizationClusteringAlgorithm",8,0],GI=[0,AP,"WaypointOptimizationConstraint",8,0],FI=[0,AP,"WaypointOptimizationHazardousCargoType",8,0],BI=[0,AP,"WaypointOptimizationServiceTimeTreatment",8,0],zI=[0,AP,"WaypointOptimizationTruckType",8,0],jI=[0,AP,"WeightKilograms",8,1],HI=[3,AP,"CalculateIsolinesRequest",0,["Thresholds",fv,wv,Tv,zv,Wv,Bv,jv,fb,"IsolineGranularity",Cb,"OptimizeIsolineFor",zb,Gb,Fb,eP,_T,GT],[[()=>mA,0],[()=>XI,0],[()=>MI,0],[()=>sA,0],[()=>xI,0],[()=>MI,0],[()=>kD,0],[()=>aA,0],0,[()=>cA,0],[()=>UP,{[CP]:bP}],0,0,[()=>kD,0],[()=>lA,0],[()=>gA,0],0,[()=>yA,0]],1],qI=[3,AP,"CalculateIsolinesResponse",0,[fb,"Isolines",Kb,wv,Wv,"SnappedDestination","SnappedOrigin"],[0,[()=>ID,0],[0,{[EP]:IP}],[()=>MI,0],[()=>MI,0],[()=>kD,0],[()=>kD,0]],3],VI=[3,AP,"CalculateRouteMatrixRequest",0,["Destinations","Origins",iT,fv,Tv,zv,Wv,Jv,Cb,zb,eP,_T,GT],[[()=>n$,0],[()=>o$,0],[()=>fx,0],[()=>lx,0],[()=>mx,0],[()=>xI,0],[()=>MI,0],[()=>Cx,0],[()=>UP,{[CP]:bP}],0,[()=>Ax,0],0,[()=>Ox,0]],3],WI=[3,AP,"CalculateRouteMatrixResponse",0,["ErrorCount",Kb,lT,iT],[1,[0,{[EP]:IP}],[()=>t$,0],[()=>fx,0]],4],KI=[3,AP,"CalculateRoutesRequest",0,[Bv,Gb,fv,wv,Tv,zv,Wv,jv,Zv,Jv,"InstructionsMeasurementSystem",Cb,"Languages","LegAdditionalFeatures",Pb,"MaxAlternatives",zb,Fb,"SpanAdditionalFeatures",XT,eP,_T,GT,"TravelStepType",uP],[[()=>kD,0],[()=>kD,0],[()=>$A,0],[()=>MI,0],[()=>MA,0],[()=>xI,0],[()=>MI,0],[()=>FA,0],[()=>BA,0],[()=>qA,0],0,[()=>UP,{[CP]:bP}],64,[()=>YD,0],0,1,0,[()=>Mx,0],64,[()=>uO,0],[()=>RO,0],0,[()=>CO,0],0,[()=>D$,0]],2],QI=[3,AP,"CalculateRoutesResponse",0,[Pb,kb,Kb,"Routes"],[0,()=>h$,[0,{[EP]:IP}],[()=>XD,0]],4],ZI=[3,AP,Av,8,["Center",fT],[[()=>kD,0],[()=>OI,0]],2],YI=[3,AP,Mv,8,[Ab,fT],[[()=>DD,0],1],2],JI=[3,AP,"Isoline",0,[Uv,"Geometries","DistanceThreshold","TimeThreshold"],[[()=>TD,0],[()=>AD,0],[()=>zP,0],[()=>jP,0]],2],XI=[3,AP,"IsolineAllowOptions",0,[mb,gb],[[()=>xI,0],[()=>xI,0]]],eA=[3,AP,"IsolineAvoidanceArea",0,[ub,sb],[[()=>tA,0],[()=>CD,0]],1],tA=[3,AP,"IsolineAvoidanceAreaGeometry",0,[Pv,Mv,tT,Qb,Yb],[[()=>RD,0],[()=>YI,0],[()=>OD,0],[()=>vA,0],[()=>LD,0]]],sA=[3,AP,"IsolineAvoidanceOptions",0,[vv,$v,xv,qv,rb,wT,zT,QT,qT,rP,oP,fP],[[()=>vD,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>k$,0],[()=>xI,0],[()=>xI,0],()=>bD]],rA=[3,AP,"IsolineAvoidanceZoneCategory",0,[Lv],[0]],nA=[3,AP,"IsolineCarOptions",0,[eb,Ib,$b,Hb],[[()=>qP,0],[()=>RA,0],[()=>LI,0],[()=>DI,0]]],iA=[3,AP,"IsolineConnection",0,["FromPolygonIndex",ub,"ToPolygonIndex"],[1,[()=>oA,0],1],3],oA=[3,AP,"IsolineConnectionGeometry",0,[Ab,Wb],[[()=>DD,0],[()=>WP,0]]],aA=[3,AP,"IsolineDestinationOptions",0,[yv,lb,Lb,PT],[[()=>zP,0],[()=>HP,0],[()=>uA,0],[()=>hA,0]]],cA=[3,AP,"IsolineGranularityOptions",0,["MaxPoints","MaxResolution"],[1,[()=>zP,0]]],uA=[3,AP,"IsolineMatchingOptions",0,[Mb,jb,fT,RT],[[()=>$I,0],[()=>zP,0],[()=>zP,0],0]],lA=[3,AP,"IsolineOriginOptions",0,[yv,lb,Lb,PT],[[()=>zP,0],[()=>HP,0],[()=>uA,0],[()=>hA,0]]],dA=[3,AP,"IsolineScooterOptions",0,[eb,Ib,$b,Hb],[[()=>qP,0],[()=>RA,0],[()=>LI,0],[()=>DI,0]]],pA=[3,AP,"IsolineShapeGeometry",0,[tT,Yb],[[()=>OD,0],[()=>LD,0]]],hA=[3,AP,"IsolineSideOfStreetOptions",0,[sT,aP],[[()=>kD,0],0],1],mA=[3,AP,"IsolineThresholds",0,[Qv,YT],[[()=>ED,0],[()=>L$,0]]],gA=[3,AP,"IsolineTrafficOptions",0,[ib,iP],[[()=>jP,0],0]],fA=[3,AP,"IsolineTrailerOptions",0,[Sv,LT],[[()=>DI,0],[()=>DI,0]]],yA=[3,AP,"IsolineTravelModeOptions",0,[kv,IT,sP],[[()=>nA,0],[()=>dA,0],[()=>SA,0]]],SA=[3,AP,"IsolineTruckOptions",0,[Sv,eb,cb,pb,hb,db,vb,Ob,Ib,$b,Hb,Zb,kT,tP,ZT,jT,pP,hP,mP],[[()=>DI,0],[()=>qP,0],[()=>jI,0],[()=>PD,0],[()=>BP,0],[()=>BP,0],[()=>BP,0],[()=>BP,0],[()=>RA,0],[()=>LI,0],[()=>DI,0],[()=>jI,0],[()=>DI,0],[()=>fA,0],0,[()=>UI,0],[()=>jI,0],[()=>SD,0],[()=>BP,0]]],RA=[3,AP,"IsolineVehicleLicensePlate",8,[Tb],[0]],wA=[3,AP,"LocalizedString",0,[cP,xb],[[()=>$I,0],0],1],EA=[3,AP,"OptimizeWaypointsRequest",0,[Gb,Tv,"Clustering",Wv,Bv,jv,Zv,Jv,Cb,"OptimizeSequencingFor",Fb,eP,_T,GT,uP],[[()=>kD,0],[()=>ZO,0],[()=>YO,0],[()=>MI,0],[()=>kD,0],[()=>XO,0],[()=>eD,0],[()=>sD,0],[()=>UP,{[CP]:bP}],0,()=>oD,()=>hD,0,[()=>gD,0],[()=>z$,0]],1],CA=[3,AP,"OptimizeWaypointsResponse",0,[Uv,Qv,Yv,"ImpedingWaypoints","OptimizedWaypoints",Kb,"TimeBreakdown"],[[()=>U$,0],[()=>zP,0],[()=>jP,0],[()=>F$,0],[()=>B$,0],[0,{[EP]:IP}],[()=>pD,0]],7],vA=[3,AP,Qb,8,[Wb,fT],[[()=>WP,0],1],2],bA=[3,AP,"RoadSnapNotice",0,[Nv,JT,"TracePointIndexes"],[[()=>ZP,0],[()=>$I,0],[()=>GD,0]],3],TA=[3,AP,"RoadSnapSnappedGeometry",0,[Ab,Wb],[[()=>DD,0],[()=>WP,0]]],PA=[3,AP,"RoadSnapSnappedTracePoint",0,["Confidence",Bb,"SnappedPosition"],[[()=>OI,0],[()=>kD,0],[()=>kD,0]],3],IA=[3,AP,"RoadSnapTracePoint",0,[sT,lb,xT,"Timestamp"],[[()=>kD,0],[()=>HP,0],[()=>LI,0],[()=>MI,0]],1],AA=[3,AP,"RoadSnapTrailerOptions",0,[LT],[[()=>DI,0]]],xA=[3,AP,"RoadSnapTravelModeOptions",0,[sP],[[()=>OA,0]]],OA=[3,AP,"RoadSnapTruckOptions",0,[cb,pb,hb,Ob,tP,jT,mP],[[()=>jI,0],[()=>ND,0],[()=>BP,0],[()=>BP,0],[()=>AA,0],[()=>UI,0],[()=>BP,0]]],DA=[3,AP,"Route",0,["Legs","MajorRoadLabels",DT],[[()=>JD,0],[()=>e$,0],[()=>aO,0]],2],$A=[3,AP,"RouteAllowOptions",0,[mb,gb],[[()=>xI,0],[()=>xI,0]]],LA=[3,AP,"RouteAvoidanceArea",0,[ub,sb],[[()=>kA,0],[()=>BD,0]],1],kA=[3,AP,"RouteAvoidanceAreaGeometry",0,[Mv,Pv,tT,Qb,Yb],[[()=>YI,0],[()=>RD,0],[()=>OD,0],[()=>vA,0],[()=>LD,0]]],MA=[3,AP,"RouteAvoidanceOptions",0,[vv,$v,xv,qv,rb,wT,zT,QT,qT,rP,oP,fP],[[()=>zD,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>k$,0],[()=>xI,0],[()=>xI,0],[()=>jD,0]]],NA=[3,AP,"RouteAvoidanceZoneCategory",0,[Lv],[[()=>AI,0]],1],UA=[3,AP,"RouteCarOptions",0,[eb,Ib,$b,Hb],[[()=>JP,0],[()=>OO,0],[()=>LI,0],[()=>DI,0]]],_A=[3,AP,"RouteContinueHighwayStepDetails",0,[Rb,CT,$T,UT],[[()=>$D,0],[()=>RI,0],1,[()=>bI,0]],1],GA=[3,AP,"RouteContinueStepDetails",0,[Rb],[[()=>$D,0]],1],FA=[3,AP,"RouteDestinationOptions",0,[yv,Cv,lb,Lb,PT,vT],[[()=>zP,0],[()=>xI,0],[()=>HP,0],[()=>ux,0],[()=>sO,0],[()=>jP,0]]],BA=[3,AP,"RouteDriverOptions",0,["Schedule"],[[()=>HD,0]]],zA=[3,AP,"RouteDriverScheduleInterval",0,["DriveDuration",oT],[[()=>jP,0],[()=>jP,0]],2],jA=[3,AP,"RouteEmissionType",0,[nP,"Co2EmissionClass"],[[()=>$I,0],[()=>$I,0]],1],HA=[3,AP,"RouteEnterHighwayStepDetails",0,[Rb,CT,$T,UT],[[()=>$D,0],[()=>RI,0],1,[()=>bI,0]],1],qA=[3,AP,"RouteExclusionOptions",0,[_v],[[()=>wD,0]],1],VA=[3,AP,"RouteExitStepDetails",0,[Rb,aT,CT,$T,UT],[[()=>$D,0],[()=>DI,0],[()=>RI,0],1,[()=>bI,0]],1],WA=[3,AP,"RouteFerryAfterTravelStep",0,[Yv,nP,Eb],[[()=>jP,0],[()=>XP,0],[()=>$I,0]],2],KA=[3,AP,"RouteFerryArrival",0,[eT,YT],[[()=>ex,0],[()=>MI,0]],1],QA=[3,AP,"RouteFerryBeforeTravelStep",0,[Yv,nP,Eb],[[()=>jP,0],[()=>eI,0],[()=>$I,0]],2],ZA=[3,AP,"RouteFerryDeparture",0,[eT,YT],[[()=>ex,0],[()=>MI,0]],1],YA=[3,AP,"RouteFerryLegDetails",0,["AfterTravelSteps",bv,"BeforeTravelSteps",Kv,kb,Jb,OT,VT,"RouteName",DT],[[()=>qD,0],[()=>KA,0],[()=>VD,0],[()=>ZA,0],()=>WD,[()=>u$,0],[()=>KD,0],[()=>QD,0],[()=>$I,0],[()=>sx,0]],8],JA=[3,AP,"RouteFerryNotice",0,[Nv,Sb],[0,0],1],XA=[3,AP,"RouteFerryOverviewSummary",0,[Qv,Yv],[[()=>zP,0],[()=>jP,0]],2],ex=[3,AP,"RouteFerryPlace",0,[sT,Ub,Bb,dP],[[()=>MD,0],[()=>$I,0],[()=>MD,0],[()=>DI,0]],1],tx=[3,AP,"RouteFerrySpan",0,[Gv,Qv,Yv,ab,_b,ST],[[()=>GP,0],[()=>zP,0],[()=>jP,0],1,[()=>$D,0],[()=>$I,0]]],sx=[3,AP,"RouteFerrySummary",0,[Vb,FT],[[()=>XA,0],[()=>rx,0]]],rx=[3,AP,"RouteFerryTravelOnlySummary",0,[Yv],[[()=>jP,0]],1],nx=[3,AP,"RouteFerryTravelStep",0,[Yv,nP,Qv,ab,Eb],[[()=>jP,0],[()=>tI,0],[()=>zP,0],1,[()=>$I,0]],2],ix=[3,AP,"RouteKeepStepDetails",0,[Rb,CT,$T,UT],[[()=>$D,0],[()=>RI,0],1,[()=>bI,0]],1],ox=[3,AP,"RouteLeg",0,[ub,_T,nP,"FerryLegDetails",xb,"PedestrianLegDetails","VehicleLegDetails"],[[()=>ax,0],[()=>nI,0],[()=>iI,0],[()=>YA,0],0,[()=>Fx,0],[()=>xO,0]],3],ax=[3,AP,"RouteLegGeometry",0,[Ab,Wb],[[()=>DD,0],[()=>WP,0]]],cx=[3,AP,"RouteMajorRoadLabel",0,[dT,pT],[[()=>wA,0],[()=>kx,0]]],ux=[3,AP,"RouteMatchingOptions",0,[Mb,jb,fT,RT],[[()=>$I,0],[()=>zP,0],[()=>zP,0],0]],lx=[3,AP,"RouteMatrixAllowOptions",8,[mb,gb],[[()=>xI,0],[()=>xI,0]]],dx=[3,AP,"RouteMatrixAutoCircle",0,["Margin","MaxRadius"],[[()=>zP,0],[()=>zP,0]]],px=[3,AP,"RouteMatrixAvoidanceArea",0,[ub],[[()=>hx,0]],1],hx=[3,AP,"RouteMatrixAvoidanceAreaGeometry",0,[Pv,tT,Yb],[[()=>RD,0],[()=>OD,0],[()=>LD,0]]],mx=[3,AP,"RouteMatrixAvoidanceOptions",0,[vv,$v,xv,qv,rb,zT,QT,qT,rP,oP,fP],[[()=>s$,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>k$,0],[()=>xI,0],[()=>xI,0],[()=>r$,0]]],gx=[3,AP,"RouteMatrixAvoidanceZoneCategory",0,[Lv],[[()=>cI,0]]],fx=[3,AP,"RouteMatrixBoundary",0,[ub,"Unbounded"],[[()=>yx,0],[()=>xI,0]]],yx=[3,AP,"RouteMatrixBoundaryGeometry",0,["AutoCircle",Av,Pv,tT],[[()=>dx,0],[()=>ZI,0],[()=>RD,0],[()=>OD,0]]],Sx=[3,AP,"RouteMatrixCarOptions",0,[Ib,$b,Hb],[[()=>$x,0],[()=>LI,0],[()=>DI,0]]],Rx=[3,AP,"RouteMatrixDestination",0,[sT,qb],[[()=>kD,0],[()=>wx,0]],1],wx=[3,AP,"RouteMatrixDestinationOptions",0,[yv,lb,Lb,PT],[[()=>zP,0],[()=>HP,0],[()=>vx,0],[()=>Ix,0]]],Ex=[3,AP,"RouteMatrixEntry",0,[Qv,Yv,"Error"],[[()=>zP,0],[()=>jP,0],0],2],Cx=[3,AP,"RouteMatrixExclusionOptions",0,[_v],[[()=>wD,0]],1],vx=[3,AP,"RouteMatrixMatchingOptions",0,[Mb,jb,fT,RT],[[()=>$I,0],[()=>zP,0],[()=>zP,0],0]],bx=[3,AP,"RouteMatrixOrigin",0,[sT,qb],[[()=>kD,0],[()=>Tx,0]],1],Tx=[3,AP,"RouteMatrixOriginOptions",0,[yv,lb,Lb,PT],[[()=>zP,0],[()=>HP,0],[()=>vx,0],[()=>Ix,0]]],Px=[3,AP,"RouteMatrixScooterOptions",0,[Ib,$b,Hb],[[()=>$x,0],[()=>LI,0],[()=>DI,0]]],Ix=[3,AP,"RouteMatrixSideOfStreetOptions",0,[sT,aP],[[()=>kD,0],0],1],Ax=[3,AP,"RouteMatrixTrafficOptions",0,[ib,iP],[[()=>jP,0],0]],xx=[3,AP,"RouteMatrixTrailerOptions",0,[LT],[[()=>DI,0]]],Ox=[3,AP,"RouteMatrixTravelModeOptions",0,[kv,IT,sP],[[()=>Sx,0],[()=>Px,0],[()=>Dx,0]]],Dx=[3,AP,"RouteMatrixTruckOptions",0,[Sv,cb,pb,hb,vb,Ob,Ib,$b,Hb,Zb,tP,ZT,jT,pP,hP,mP],[[()=>DI,0],[()=>jI,0],[()=>i$,0],[()=>BP,0],[()=>BP,0],[()=>BP,0],[()=>$x,0],[()=>LI,0],[()=>DI,0],[()=>jI,0],[()=>xx,0],[()=>aI,0],[()=>UI,0],[()=>jI,0],[()=>SD,0],[()=>BP,0]]],$x=[3,AP,"RouteMatrixVehicleLicensePlate",8,[Tb],[0]],Lx=[3,AP,"RouteNoticeDetailRange",0,["Min","Max"],[1,1]],kx=[3,AP,pT,0,[cP,"Direction",xb],[[()=>$I,0],[()=>YP,0],0],1],Mx=[3,AP,"RouteOriginOptions",0,[yv,Cv,lb,Lb,PT],[[()=>zP,0],[()=>xI,0],[()=>HP,0],[()=>ux,0],[()=>sO,0]]],Nx=[3,AP,"RoutePassThroughPlace",0,[sT,Bb,dP],[[()=>MD,0],[()=>MD,0],[()=>DI,0]],1],Ux=[3,AP,"RoutePassThroughWaypoint",0,[eT,ab],[[()=>Nx,0],1],1],_x=[3,AP,"RoutePedestrianArrival",0,[eT,YT],[[()=>Hx,0],[()=>MI,0]],1],Gx=[3,AP,"RoutePedestrianDeparture",0,[eT,YT],[[()=>Hx,0],[()=>MI,0]],1],Fx=[3,AP,"RoutePedestrianLegDetails",0,[bv,Kv,kb,Jb,OT,VT,DT],[[()=>_x,0],[()=>Gx,0],()=>l$,[()=>u$,0],[()=>d$,0],[()=>p$,0],[()=>Vx,0]],6],Bx=[3,AP,"RoutePedestrianNotice",0,[Nv,Sb],[0,0],1],zx=[3,AP,"RoutePedestrianOptions",0,[xT],[[()=>LI,0]]],jx=[3,AP,"RoutePedestrianOverviewSummary",0,[Qv,Yv],[[()=>zP,0],[()=>jP,0]],2],Hx=[3,AP,"RoutePedestrianPlace",0,[sT,Ub,Bb,PT,dP],[[()=>MD,0],[()=>$I,0],[()=>MD,0],[()=>dI,0],[()=>DI,0]],1],qx=[3,AP,"RoutePedestrianSpan",0,[Iv,Gv,Qv,Yv,Vv,nb,ab,wb,_b,"PedestrianAccess",ST,nT,hT,TT,MT],[[()=>jP,0],[()=>GP,0],[()=>zP,0],[()=>jP,0],[()=>iO,0],[()=>DI,0],1,65,[()=>$D,0],[()=>f$,0],[()=>$I,0],[()=>y$,0],[()=>c$,0],[()=>oO,0],[()=>jP,0]]],Vx=[3,AP,"RoutePedestrianSummary",0,[Vb,FT],[[()=>jx,0],[()=>Wx,0]]],Wx=[3,AP,"RoutePedestrianTravelOnlySummary",0,[Yv],[[()=>jP,0]],1],Kx=[3,AP,"RoutePedestrianTravelStep",0,[Yv,nP,Dv,Ov,Qv,Xv,ab,Eb,bb,Nb,cT,uT,mT,AT,WT],[[()=>jP,0],[()=>uI,0],[()=>GA,0],[()=>Yx,0],[()=>zP,0],[()=>$D,0],1,[()=>$I,0],[()=>ix,0],[()=>Yx,0],[()=>Jx,0],[()=>Xx,0],[()=>eO,0],[()=>rO,0],[()=>bO,0]],2],Qx=[3,AP,"RouteRampStepDetails",0,[Rb,CT,$T,UT],[[()=>$D,0],[()=>RI,0],1,[()=>bI,0]],1],Zx=[3,AP,"RouteResponseNotice",0,[Nv,Sb],[0,0],1],Yx=[3,AP,"RouteRoad",0,[dT,pT,"Towards",nP],[[()=>$D,0],[()=>c$,0],[()=>$D,0],[()=>lI,0]],3],Jx=[3,AP,"RouteRoundaboutEnterStepDetails",0,[Rb,CT,$T,UT],[[()=>$D,0],[()=>RI,0],1,[()=>bI,0]],1],Xx=[3,AP,"RouteRoundaboutExitStepDetails",0,[Rb,aT,"RoundaboutAngle",CT],[[()=>$D,0],[()=>DI,0],1,[()=>RI,0]],1],eO=[3,AP,"RouteRoundaboutPassStepDetails",0,[Rb,CT,$T,UT],[[()=>$D,0],[()=>RI,0],1,[()=>bI,0]],1],tO=[3,AP,"RouteScooterOptions",0,[eb,Ib,$b,Hb],[[()=>JP,0],[()=>OO,0],[()=>LI,0],[()=>DI,0]]],sO=[3,AP,"RouteSideOfStreetOptions",0,[sT,aP],[[()=>kD,0],0],1],rO=[3,AP,"RouteSignpost",0,["Labels"],[[()=>m$,0]],1],nO=[3,AP,"RouteSignpostLabel",0,[pT,"Text"],[[()=>kx,0],[()=>wA,0]]],iO=[3,AP,"RouteSpanDynamicSpeedDetails",0,["BestCaseSpeed","TurnDuration","TypicalSpeed"],[[()=>LI,0],[()=>jP,0],[()=>LI,0]]],oO=[3,AP,"RouteSpanSpeedLimitDetails",0,[$b,"Unlimited"],[[()=>LI,0],[()=>xI,0]]],aO=[3,AP,"RouteSummary",0,[Qv,Yv,XT],[[()=>zP,0],[()=>jP,0],[()=>yO,0]]],cO=[3,AP,"RouteToll",0,["PaymentSites","Rates","Systems",Gv],[[()=>C$,0],[()=>v$,0],65,[()=>GP,0]],3],uO=[3,AP,"RouteTollOptions",0,["AllTransponders","AllVignettes",Fv,"EmissionType","VehicleCategory"],[[()=>xI,0],[()=>xI,0],0,[()=>jA,0],[()=>CI,0]]],lO=[3,AP,"RouteTollPass",0,["IncludesReturnTrip","SeniorPass","TransferCount","TripCount","ValidityPeriod"],[[()=>xI,0],[()=>xI,0],[()=>DI,0],[()=>DI,0],[()=>dO,0]]],dO=[3,AP,"RouteTollPassValidityPeriod",0,["Period","PeriodCount"],[[()=>wI,0],[()=>DI,0]],1],pO=[3,AP,"RouteTollPaymentSite",0,[sT,Ub],[[()=>MD,0],0],1],hO=[3,AP,"RouteTollPrice",0,[Fv,tb,yT,cP,"PerDuration",gT],[0,[()=>xI,0],[()=>xI,0],[()=>OI,0],[()=>jP,0],[()=>gO,0]],4],mO=[3,AP,"RouteTollPriceSummary",0,[Fv,tb,yT,cP,gT],[0,[()=>xI,0],[()=>xI,0],[()=>OI,0],[()=>gO,0]],4],gO=[3,AP,"RouteTollPriceValueRange",0,["Min","Max"],[[()=>OI,0],[()=>OI,0]],2],fO=[3,AP,"RouteTollRate",0,[yb,"LocalPrice",Ub,"PaymentMethods","Transponders","ApplicableTimes","ConvertedPrice","Pass"],[[()=>$I,0],[()=>hO,0],[()=>$I,0],[()=>E$,0],[()=>T$,0],[()=>$I,0],[()=>hO,0],[()=>lO,0]],5],yO=[3,AP,"RouteTollSummary",0,["Total"],[[()=>mO,0]]],SO=[3,AP,"RouteTollSystem",0,[Ub],[[()=>$I,0]]],RO=[3,AP,"RouteTrafficOptions",0,[ib,iP],[[()=>jP,0],0]],wO=[3,AP,"RouteTrailerOptions",0,[Sv,LT],[[()=>DI,0],[()=>DI,0]]],EO=[3,AP,"RouteTransponder",0,["SystemName"],[[()=>$I,0]]],CO=[3,AP,"RouteTravelModeOptions",0,[kv,Xb,IT,sP],[[()=>UA,0],[()=>zx,0],[()=>tO,0],[()=>vO,0]]],vO=[3,AP,"RouteTruckOptions",0,[Sv,eb,cb,pb,hb,db,vb,Ob,Ib,$b,Hb,Zb,kT,tP,ZT,jT,pP,hP,mP],[[()=>DI,0],[()=>JP,0],[()=>jI,0],[()=>ZD,0],[()=>BP,0],[()=>BP,0],[()=>BP,0],[()=>BP,0],[()=>OO,0],[()=>LI,0],[()=>DI,0],[()=>jI,0],[()=>DI,0],[()=>wO,0],[()=>vI,0],[()=>UI,0],[()=>jI,0],[()=>SD,0],[()=>BP,0]]],bO=[3,AP,"RouteTurnStepDetails",0,[Rb,CT,$T,UT],[[()=>$D,0],[()=>RI,0],1,[()=>bI,0]],1],TO=[3,AP,"RouteUTurnStepDetails",0,[Rb,CT,$T,UT],[[()=>$D,0],[()=>RI,0],1,[()=>bI,0]],1],PO=[3,AP,"RouteVehicleArrival",0,[eT,YT],[[()=>kO,0],[()=>MI,0]],1],IO=[3,AP,"RouteVehicleDeparture",0,[eT,YT],[[()=>kO,0],[()=>MI,0]],1],AO=[3,AP,"RouteVehicleIncident",0,["Description","EndTime","Severity","StartTime",nP],[[()=>$I,0],[()=>MI,0],[()=>TI,0],[()=>MI,0],[()=>PI,0]]],xO=[3,AP,"RouteVehicleLegDetails",0,[bv,Kv,wb,kb,Jb,OT,XT,KT,VT,qT,gP,DT],[[()=>PO,0],[()=>IO,0],[()=>P$,0],[()=>A$,0],[()=>u$,0],[()=>x$,0],[()=>w$,0],[()=>b$,0],[()=>O$,0],[()=>k$,0],[()=>$$,0],[()=>NO,0]],11],OO=[3,AP,"RouteVehicleLicensePlate",0,[Tb],[[()=>$I,0]]],DO=[3,AP,"RouteVehicleNotice",0,[Nv,"Details",Sb],[0,[()=>I$,0],0],2],$O=[3,AP,"RouteVehicleNoticeDetail",0,[JT,"ViolatedConstraints"],[[()=>$I,0],[()=>GO,0]]],LO=[3,AP,"RouteVehicleOverviewSummary",0,[Qv,Yv,Iv,MT],[[()=>zP,0],[()=>jP,0],[()=>jP,0],[()=>jP,0]],2],kO=[3,AP,"RouteVehiclePlace",0,[sT,Ub,Bb,PT,dP],[[()=>MD,0],[()=>$I,0],[()=>MD,0],[()=>dI,0],[()=>DI,0]],1],MO=[3,AP,"RouteVehicleSpan",0,[Iv,"CarAccess",Gv,Qv,Yv,Vv,nb,"Gate",ab,wb,_b,kb,"RailwayCrossing",ST,nT,hT,"ScooterAccess",TT,KT,"TruckAccess",qT,MT,gP],[[()=>jP,0],[()=>g$,0],[()=>GP,0],[()=>zP,0],[()=>jP,0],[()=>iO,0],[()=>DI,0],[()=>hI,0],1,65,[()=>$D,0],65,[()=>gI,0],[()=>$I,0],[()=>y$,0],[()=>c$,0],[()=>S$,0],[()=>oO,0],65,[()=>R$,0],65,[()=>jP,0],65]],NO=[3,AP,"RouteVehicleSummary",0,[Vb,FT],[[()=>LO,0],[()=>UO,0]]],UO=[3,AP,"RouteVehicleTravelOnlySummary",0,[Yv,Iv,MT],[[()=>jP,0],[()=>jP,0],[()=>jP,0]],1],_O=[3,AP,"RouteVehicleTravelStep",0,[Yv,nP,"ContinueHighwayStepDetails",Dv,Ov,Qv,"EnterHighwayStepDetails",Xv,"ExitStepDetails",ab,Eb,bb,Nb,"RampStepDetails",cT,uT,mT,AT,WT,"UTurnStepDetails"],[[()=>jP,0],[()=>II,0],[()=>_A,0],[()=>GA,0],[()=>Yx,0],[()=>zP,0],[()=>HA,0],[()=>$D,0],[()=>VA,0],1,[()=>$I,0],[()=>ix,0],[()=>Yx,0],[()=>Qx,0],[()=>Jx,0],[()=>Xx,0],[()=>eO,0],[()=>rO,0],[()=>bO,0],[()=>TO,0]],2],GO=[3,AP,"RouteViolatedConstraints",0,[pb,"AllHazardsRestricted",Sv,"MaxHeight","MaxKpraLength","MaxLength","MaxPayloadCapacity","MaxWeight","MaxWeightPerAxle","MaxWeightPerAxleGroup","MaxWidth",Hb,"RestrictedTimes","TimeDependent",LT,_T,HT,ZT,jT],[[()=>ZD,0],[()=>xI,0],()=>Lx,[()=>BP,0],[()=>BP,0],[()=>BP,0],[()=>jI,0],[()=>BO,0],[()=>jI,0],[()=>SD,0],[()=>BP,0],()=>Lx,0,[()=>xI,0],()=>Lx,[()=>xI,0],0,[()=>vI,0],[()=>UI,0]],1],FO=[3,AP,"RouteWaypoint",0,[sT,yv,Cv,lb,Lb,"PassThrough",PT,vT],[[()=>kD,0],[()=>zP,0],[()=>xI,0],[()=>HP,0],[()=>ux,0],[()=>xI,0],[()=>sO,0],[()=>jP,0]],1],BO=[3,AP,"RouteWeightConstraint",0,[nP,cP],[0,[()=>jI,0]],2],zO=[3,AP,"RouteZone",0,[Lv,Ub],[[()=>AI,0],[()=>$I,0]]],jO=[3,AP,"SnapToRoadsRequest",0,["TracePoints",Cb,bT,"SnapRadius",_T,GT],[[()=>FD,0],[()=>UP,{[CP]:bP}],0,[()=>zP,0],0,[()=>xA,0]],1],HO=[3,AP,"SnapToRoadsResponse",0,[kb,Kb,bT,"SnappedTracePoints","SnappedGeometry"],[[()=>UD,0],[0,{[EP]:IP}],0,[()=>_D,0],[()=>TA,0]],4],qO=[3,AP,"ValidationExceptionField",0,[Ub,Db],[[0,{[vP]:"name"}],[0,{[vP]:TP}]],2],VO=[3,AP,"WaypointOptimizationAccessHours",0,[ob,"To"],[[()=>WO,0],[()=>WO,0]],2],WO=[3,AP,"WaypointOptimizationAccessHoursEntry",0,[Hv,BT],[[()=>FP,0],[()=>kI,0]],2],KO=[3,AP,"WaypointOptimizationAvoidanceArea",0,[ub],[[()=>QO,0]],1],QO=[3,AP,"WaypointOptimizationAvoidanceAreaGeometry",0,[Pv],[[()=>RD,0]]],ZO=[3,AP,"WaypointOptimizationAvoidanceOptions",0,[vv,$v,xv,qv,rb,zT,rP,oP],[[()=>N$,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0],[()=>xI,0]]],YO=[3,AP,"WaypointOptimizationClusteringOptions",0,["Algorithm","DrivingDistanceOptions"],[[()=>_I,0],[()=>tD,0]],1],JO=[3,AP,"WaypointOptimizationConnection",0,[Qv,ob,oT,"To",NT,lP],[[()=>zP,0],0,[()=>jP,0],0,[()=>jP,0],[()=>jP,0]],6],XO=[3,AP,"WaypointOptimizationDestinationOptions",0,[Rv,Ev,lb,yb,ET,PT],[[()=>VO,0],[()=>MI,0],[()=>HP,0],0,[()=>jP,0],[()=>dD,0]]],eD=[3,AP,"WaypointOptimizationDriverOptions",0,["RestCycles","RestProfile","TreatServiceTimeAs"],[[()=>uD,0],[()=>lD,0],[()=>BI,0]]],tD=[3,AP,"WaypointOptimizationDrivingDistanceOptions",0,["DrivingDistance"],[[()=>zP,0]],1],sD=[3,AP,"WaypointOptimizationExclusionOptions",0,[_v],[[()=>wD,0]],1],rD=[3,AP,"WaypointOptimizationFailedConstraint",0,["Constraint",rT],[[()=>GI,0],[()=>$I,0]]],nD=[3,AP,"WaypointOptimizationImpedingWaypoint",0,["FailedConstraints",yb,sT],[[()=>_$,0],0,[()=>kD,0]],3],iD=[3,AP,"WaypointOptimizationOptimizedWaypoint",0,[Wv,yb,sT,wv,"ClusterIndex"],[[()=>MI,0],0,[()=>kD,0],[()=>MI,0],1],3],oD=[3,AP,"WaypointOptimizationOriginOptions",0,[yb],[0]],aD=[3,AP,"WaypointOptimizationPedestrianOptions",0,[xT],[[()=>LI,0]]],cD=[3,AP,"WaypointOptimizationRestCycleDurations",0,[oT,"WorkDuration"],[[()=>jP,0],[()=>jP,0]],2],uD=[3,AP,"WaypointOptimizationRestCycles",0,["LongCycle","ShortCycle"],[[()=>cD,0],[()=>cD,0]],2],lD=[3,AP,"WaypointOptimizationRestProfile",0,["Profile"],[[()=>$I,0]],1],dD=[3,AP,"WaypointOptimizationSideOfStreetOptions",0,[sT,aP],[[()=>kD,0],0],1],pD=[3,AP,"WaypointOptimizationTimeBreakdown",0,[oT,ET,NT,lP],[[()=>jP,0],[()=>jP,0],[()=>jP,0],[()=>jP,0]],4],hD=[3,AP,"WaypointOptimizationTrafficOptions",0,[iP],[0]],mD=[3,AP,"WaypointOptimizationTrailerOptions",0,[LT],[[()=>DI,0]]],gD=[3,AP,"WaypointOptimizationTravelModeOptions",0,[Xb,sP],[[()=>aD,0],[()=>fD,0]]],fD=[3,AP,"WaypointOptimizationTruckOptions",0,[cb,pb,hb,Ob,tP,ZT,jT,pP,mP],[[()=>jI,0],[()=>G$,0],[()=>BP,0],[()=>BP,0],[()=>mD,0],[()=>zI,0],[()=>UI,0],[()=>jI,0],[()=>BP,0]]],yD=[3,AP,"WaypointOptimizationWaypoint",0,[sT,Rv,Ev,"Before",lb,yb,ET,PT],[[()=>kD,0],[()=>VO,0],[()=>MI,0],65,[()=>HP,0],0,[()=>jP,0],[()=>dD,0]],1],SD=[3,AP,hP,0,["Single","Tandem","Triple","Quad","Quint"],[[()=>jI,0],[()=>jI,0],[()=>jI,0],[()=>jI,0],[()=>jI,0]]],RD=[1,AP,Pv,8,1],wD=[1,AP,"CountryCodeList",0,[()=>_P,0]],ED=[1,AP,"DistanceThresholdList",0,[()=>zP,0]],CD=[1,AP,"IsolineAvoidanceAreaGeometryList",0,[()=>tA,0]],vD=[1,AP,"IsolineAvoidanceAreaList",0,[()=>eA,0]],bD=[1,AP,"IsolineAvoidanceZoneCategoryList",0,()=>rA],TD=[1,AP,"IsolineConnectionList",0,[()=>iA,0]],PD=[1,AP,"IsolineHazardousCargoTypeList",0,[()=>VP,0]],ID=[1,AP,"IsolineList",0,[()=>JI,0]],AD=[1,AP,"IsolineShapeGeometryList",0,[()=>pA,0]],xD=[1,AP,"LinearRing",0,[()=>kD,0]],OD=[1,AP,"LinearRings",0,[()=>xD,0]],DD=[1,AP,Ab,0,[()=>kD,0]],$D=[1,AP,"LocalizedStringList",0,[()=>wA,0]],LD=[1,AP,"PolylineRingList",0,[()=>KP,0]],kD=[1,AP,sT,8,1],MD=[1,AP,"Position23",8,1],ND=[1,AP,"RoadSnapHazardousCargoTypeList",0,[()=>QP,0]],UD=[1,AP,"RoadSnapNoticeList",0,[()=>bA,0]],_D=[1,AP,"RoadSnapSnappedTracePointList",0,[()=>PA,0]],GD=[1,AP,"RoadSnapTracePointIndexList",8,1],FD=[1,AP,"RoadSnapTracePointList",0,[()=>IA,0]],BD=[1,AP,"RouteAvoidanceAreaGeometryList",0,[()=>kA,0]],zD=[1,AP,"RouteAvoidanceAreaList",0,[()=>LA,0]],jD=[1,AP,"RouteAvoidanceZoneCategoryList",0,[()=>NA,0]],HD=[1,AP,"RouteDriverScheduleIntervalList",0,[()=>zA,0]],qD=[1,AP,"RouteFerryAfterTravelStepList",0,[()=>WA,0]],VD=[1,AP,"RouteFerryBeforeTravelStepList",0,[()=>QA,0]],WD=[1,AP,"RouteFerryNoticeList",0,()=>JA],KD=[1,AP,"RouteFerrySpanList",0,[()=>tx,0]],QD=[1,AP,"RouteFerryTravelStepList",0,[()=>nx,0]],ZD=[1,AP,"RouteHazardousCargoTypeList",0,[()=>sI,0]],YD=[1,AP,"RouteLegAdditionalFeatureList",0,[()=>rI,0]],JD=[1,AP,"RouteLegList",0,[()=>ox,0]],XD=[1,AP,"RouteList",0,[()=>DA,0]],e$=[1,AP,"RouteMajorRoadLabelList",0,[()=>cx,0]],t$=[1,AP,lT,0,[()=>a$,0]],s$=[1,AP,"RouteMatrixAvoidanceAreaList",0,[()=>px,0]],r$=[1,AP,"RouteMatrixAvoidanceZoneCategoryList",0,[()=>gx,0]],n$=[1,AP,"RouteMatrixDestinationList",0,[()=>Rx,0]],i$=[1,AP,"RouteMatrixHazardousCargoTypeList",0,[()=>oI,0]],o$=[1,AP,"RouteMatrixOriginList",0,[()=>bx,0]],a$=[1,AP,"RouteMatrixRow",0,[()=>Ex,0]],c$=[1,AP,"RouteNumberList",0,[()=>kx,0]],u$=[1,AP,"RoutePassThroughWaypointList",0,[()=>Ux,0]],l$=[1,AP,"RoutePedestrianNoticeList",0,()=>Bx],d$=[1,AP,"RoutePedestrianSpanList",0,[()=>qx,0]],p$=[1,AP,"RoutePedestrianTravelStepList",0,[()=>Kx,0]],h$=[1,AP,"RouteResponseNoticeList",0,()=>Zx],m$=[1,AP,"RouteSignpostLabelList",0,[()=>nO,0]],g$=[1,AP,"RouteSpanCarAccessAttributeList",0,[()=>pI,0]],f$=[1,AP,"RouteSpanPedestrianAccessAttributeList",0,[()=>mI,0]],y$=[1,AP,"RouteSpanRoadAttributeList",0,[()=>fI,0]],S$=[1,AP,"RouteSpanScooterAccessAttributeList",0,[()=>yI,0]],R$=[1,AP,"RouteSpanTruckAccessAttributeList",0,[()=>SI,0]],w$=[1,AP,"RouteTollList",0,[()=>cO,0]],E$=[1,AP,"RouteTollPaymentMethodList",0,[()=>EI,0]],C$=[1,AP,"RouteTollPaymentSiteList",0,[()=>pO,0]],v$=[1,AP,"RouteTollRateList",0,[()=>fO,0]],b$=[1,AP,"RouteTollSystemList",0,[()=>SO,0]],T$=[1,AP,"RouteTransponderList",0,[()=>EO,0]],P$=[1,AP,"RouteVehicleIncidentList",0,[()=>AO,0]],I$=[1,AP,"RouteVehicleNoticeDetailList",0,[()=>$O,0]],A$=[1,AP,"RouteVehicleNoticeList",0,[()=>DO,0]],x$=[1,AP,"RouteVehicleSpanList",0,[()=>MO,0]],O$=[1,AP,"RouteVehicleTravelStepList",0,[()=>_O,0]],D$=[1,AP,"RouteWaypointList",0,[()=>FO,0]],$$=[1,AP,"RouteZoneList",0,[()=>zO,0]],L$=[1,AP,"TimeThresholdList",0,[()=>jP,0]],k$=[1,AP,"TruckRoadTypeList",0,[()=>NI,0]],M$=[1,AP,"ValidationExceptionFieldList",0,[()=>qO,0]],N$=[1,AP,"WaypointOptimizationAvoidanceAreaList",0,[()=>KO,0]],U$=[1,AP,"WaypointOptimizationConnectionList",0,[()=>JO,0]],_$=[1,AP,"WaypointOptimizationFailedConstraintList",0,[()=>rD,0]],G$=[1,AP,"WaypointOptimizationHazardousCargoTypeList",0,[()=>FI,0]],F$=[1,AP,"WaypointOptimizationImpedingWaypointList",0,[()=>nD,0]],B$=[1,AP,"WaypointOptimizationOptimizedWaypointList",0,[()=>iD,0]],z$=[1,AP,"WaypointOptimizationWaypointList",0,[()=>yD,0]],j$=[9,AP,"CalculateIsolines",{[RP]:["POST","/isolines",200]},()=>HI,()=>qI],H$=[9,AP,"CalculateRouteMatrix",{[RP]:["POST","/route-matrix",200]},()=>VI,()=>WI],q$=[9,AP,"CalculateRoutes",{[RP]:["POST","/routes",200]},()=>KI,()=>QI],V$=[9,AP,"OptimizeWaypoints",{[RP]:["POST","/optimize-waypoints",200]},()=>EA,()=>CA],W$=[9,AP,"SnapToRoads",{[RP]:["POST","/snap-to-roads",200]},()=>jO,()=>HO];const K$=e=>{const t=Xn(e),s=()=>t().then(nr),r=(e=>({apiVersion:"2020-11-19",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??k,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??lv,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??MC,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new cs}],logger:e?.logger??new cr,protocol:e?.protocol??Cr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.georoutes",errorTypeRegistries:NP,version:"2020-11-19",serviceTarget:"RoutesService"},serviceId:e?.serviceId??"Geo Routes",urlParser:e?.urlParser??ts,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??L}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Hs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qn({serviceId:r.serviceId,clientVersion:UC}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yn("Region is missing"),requestHandler:z.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||nn),sha256:e?.sha256??Kn,streamCollector:e?.streamCollector??j,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Nr)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class Q$ extends Zs{config;constructor(...[e]){const r=K$(e||{});super(r),this.initConfig=r;var n;const i=vt((n=r,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"geo-routes"}))),o=yn(i),a=Fr(o),c=((e,r)=>{const n=Object.assign(Ih(e),ir(e),t(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex((t=>t.schemeId===e.schemeId));-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(n))),Object.assign(e,Ah(n),or(n),s(n),{httpAuthSchemes:(i=n).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})((e=>{const t=zs(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(sn(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Mr(this.config)),this.middlewareStack.use(vn(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:kC,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(C(this.config))}destroy(){super.destroy()}}class Z$ extends(Xs.classBuilder().ep(NC).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateIsolines",{}).n("GeoRoutesClient","CalculateIsolinesCommand").sc(j$).build()){}class Y$ extends(Xs.classBuilder().ep(NC).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateRouteMatrix",{}).n("GeoRoutesClient","CalculateRouteMatrixCommand").sc(H$).build()){}class J$ extends(Xs.classBuilder().ep(NC).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("RoutesService","CalculateRoutes",{}).n("GeoRoutesClient","CalculateRoutesCommand").sc(q$).build()){}class X$ extends(Xs.classBuilder().ep(NC).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("RoutesService","OptimizeWaypoints",{}).n("GeoRoutesClient","OptimizeWaypointsCommand").sc(V$).build()){}class eL extends(Xs.classBuilder().ep(NC).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("RoutesService","SnapToRoads",{}).n("GeoRoutesClient","SnapToRoadsCommand").sc(W$).build()){}const tL={CalculateIsolinesCommand:Z$,CalculateRouteMatrixCommand:Y$,CalculateRoutesCommand:J$,OptimizeWaypointsCommand:X$,SnapToRoadsCommand:eL};class sL extends Q${}tr(tL,sL);var rL=Object.freeze({__proto__:null,$Command:Xs,AccessDeniedException:pv,AccessDeniedException$:$P,CalculateIsolines$:j$,CalculateIsolinesCommand:Z$,CalculateIsolinesRequest$:HI,CalculateIsolinesResponse$:qI,CalculateRouteMatrix$:H$,CalculateRouteMatrixCommand:Y$,CalculateRouteMatrixRequest$:VI,CalculateRouteMatrixResponse$:WI,CalculateRoutes$:q$,CalculateRoutesCommand:J$,CalculateRoutesRequest$:KI,CalculateRoutesResponse$:QI,Circle$:ZI,Corridor$:YI,DayOfWeek:{FRIDAY:"Friday",MONDAY:"Monday",SATURDAY:"Saturday",SUNDAY:"Sunday",THURSDAY:"Thursday",TUESDAY:"Tuesday",WEDNESDAY:"Wednesday"},GeoRoutes:sL,GeoRoutesClient:Q$,GeoRoutesServiceException:dv,GeoRoutesServiceException$:OP,GeometryFormat:{FLEXIBLE_POLYLINE:"FlexiblePolyline",SIMPLE:"Simple"},InternalServerException:hv,InternalServerException$:LP,Isoline$:JI,IsolineAllowOptions$:XI,IsolineAvoidanceArea$:eA,IsolineAvoidanceAreaGeometry$:tA,IsolineAvoidanceOptions$:sA,IsolineAvoidanceZoneCategory$:rA,IsolineCarOptions$:nA,IsolineConnection$:iA,IsolineConnectionGeometry$:oA,IsolineDestinationOptions$:aA,IsolineEngineType:{ELECTRIC:"Electric",INTERNAL_COMBUSTION:"InternalCombustion",PLUGIN_HYBRID:"PluginHybrid"},IsolineGranularityOptions$:cA,IsolineHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},IsolineMatchingOptions$:uA,IsolineOptimizationObjective:{ACCURATE_CALCULATION:"AccurateCalculation",BALANCED_CALCULATION:"BalancedCalculation",FAST_CALCULATION:"FastCalculation"},IsolineOriginOptions$:lA,IsolineScooterOptions$:dA,IsolineShapeGeometry$:pA,IsolineSideOfStreetOptions$:hA,IsolineThresholds$:mA,IsolineTrafficOptions$:gA,IsolineTrailerOptions$:fA,IsolineTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},IsolineTravelModeOptions$:yA,IsolineTruckOptions$:SA,IsolineTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},IsolineVehicleLicensePlate$:RA,IsolineZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},LocalizedString$:wA,MatchingStrategy:{MATCH_ANY:"MatchAny",MATCH_MOST_SIGNIFICANT_ROAD:"MatchMostSignificantRoad"},MeasurementSystem:{IMPERIAL:"Imperial",METRIC:"Metric"},OptimizeWaypoints$:V$,OptimizeWaypointsCommand:X$,OptimizeWaypointsRequest$:EA,OptimizeWaypointsResponse$:CA,PolylineCorridor$:vA,RoadSnapHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RoadSnapNotice$:bA,RoadSnapNoticeCode:{TRACE_POINTS_HEADING_IGNORED:"TracePointsHeadingIgnored",TRACE_POINTS_IGNORED:"TracePointsIgnored",TRACE_POINTS_MOVED_BY_LARGE_DISTANCE:"TracePointsMovedByLargeDistance",TRACE_POINTS_NOT_MATCHED:"TracePointsNotMatched",TRACE_POINTS_OUT_OF_SEQUENCE:"TracePointsOutOfSequence",TRACE_POINTS_SPEED_ESTIMATED:"TracePointsSpeedEstimated",TRACE_POINTS_SPEED_IGNORED:"TracePointsSpeedIgnored"},RoadSnapSnappedGeometry$:TA,RoadSnapSnappedTracePoint$:PA,RoadSnapTracePoint$:IA,RoadSnapTrailerOptions$:AA,RoadSnapTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RoadSnapTravelModeOptions$:xA,RoadSnapTruckOptions$:OA,Route$:DA,RouteAllowOptions$:$A,RouteAvoidanceArea$:LA,RouteAvoidanceAreaGeometry$:kA,RouteAvoidanceOptions$:MA,RouteAvoidanceZoneCategory$:NA,RouteCarOptions$:UA,RouteContinueHighwayStepDetails$:_A,RouteContinueStepDetails$:GA,RouteDestinationOptions$:FA,RouteDirection:{EAST:"East",NORTH:"North",SOUTH:"South",WEST:"West"},RouteDriverOptions$:BA,RouteDriverScheduleInterval$:zA,RouteEmissionType$:jA,RouteEngineType:{ELECTRIC:"Electric",INTERNAL_COMBUSTION:"InternalCombustion",PLUGIN_HYBRID:"PluginHybrid"},RouteEnterHighwayStepDetails$:HA,RouteExclusionOptions$:qA,RouteExitStepDetails$:VA,RouteFerryAfterTravelStep$:WA,RouteFerryAfterTravelStepType:{DEBOARD:"Deboard"},RouteFerryArrival$:KA,RouteFerryBeforeTravelStep$:QA,RouteFerryBeforeTravelStepType:{BOARD:"Board"},RouteFerryDeparture$:ZA,RouteFerryLegDetails$:YA,RouteFerryNotice$:JA,RouteFerryNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",NO_SCHEDULE:"NoSchedule",OTHER:"Other",POTENTIAL_VIOLATED_VEHICLE_RESTRICTION_USAGE:"PotentialViolatedVehicleRestrictionUsage",SEASONAL_CLOSURE:"SeasonalClosure",VIOLATED_AVOID_FERRY:"ViolatedAvoidFerry",VIOLATED_AVOID_RAIL_FERRY:"ViolatedAvoidRailFerry"},RouteFerryOverviewSummary$:XA,RouteFerryPlace$:ex,RouteFerrySpan$:tx,RouteFerrySummary$:sx,RouteFerryTravelOnlySummary$:rx,RouteFerryTravelStep$:nx,RouteFerryTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",DEPART:"Depart"},RouteHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RouteKeepStepDetails$:ix,RouteLeg$:ox,RouteLegAdditionalFeature:{ELEVATION:"Elevation",INCIDENTS:"Incidents",PASS_THROUGH_WAYPOINTS:"PassThroughWaypoints",SUMMARY:"Summary",TOLLS:"Tolls",TRAVEL_STEP_INSTRUCTIONS:"TravelStepInstructions",TRUCK_ROAD_TYPES:"TruckRoadTypes",TYPICAL_DURATION:"TypicalDuration",ZONES:"Zones"},RouteLegGeometry$:ax,RouteLegTravelMode:{CAR:"Car",CAR_SHUTTLE_TRAIN:"CarShuttleTrain",FERRY:"Ferry",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteLegType:{FERRY:"Ferry",PEDESTRIAN:"Pedestrian",VEHICLE:"Vehicle"},RouteMajorRoadLabel$:cx,RouteMatchingOptions$:ux,RouteMatrixAllowOptions$:lx,RouteMatrixAutoCircle$:dx,RouteMatrixAvoidanceArea$:px,RouteMatrixAvoidanceAreaGeometry$:hx,RouteMatrixAvoidanceOptions$:mx,RouteMatrixAvoidanceZoneCategory$:gx,RouteMatrixBoundary$:fx,RouteMatrixBoundaryGeometry$:yx,RouteMatrixCarOptions$:Sx,RouteMatrixDestination$:Rx,RouteMatrixDestinationOptions$:wx,RouteMatrixEntry$:Ex,RouteMatrixErrorCode:{NO_MATCH:"NoMatch",NO_MATCH_DESTINATION:"NoMatchDestination",NO_MATCH_ORIGIN:"NoMatchOrigin",NO_ROUTE:"NoRoute",OTHER:"Other",OUT_OF_BOUNDS:"OutOfBounds",OUT_OF_BOUNDS_DESTINATION:"OutOfBoundsDestination",OUT_OF_BOUNDS_ORIGIN:"OutOfBoundsOrigin",VIOLATION:"Violation"},RouteMatrixExclusionOptions$:Cx,RouteMatrixHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},RouteMatrixMatchingOptions$:vx,RouteMatrixOrigin$:bx,RouteMatrixOriginOptions$:Tx,RouteMatrixScooterOptions$:Px,RouteMatrixSideOfStreetOptions$:Ix,RouteMatrixTrafficOptions$:Ax,RouteMatrixTrailerOptions$:xx,RouteMatrixTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteMatrixTravelModeOptions$:Ox,RouteMatrixTruckOptions$:Dx,RouteMatrixTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},RouteMatrixVehicleLicensePlate$:$x,RouteMatrixZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},RouteNoticeDetailRange$:Lx,RouteNoticeImpact:{HIGH:"High",LOW:"Low"},RouteNumber$:kx,RouteOriginOptions$:Mx,RoutePassThroughPlace$:Nx,RoutePassThroughWaypoint$:Ux,RoutePedestrianArrival$:_x,RoutePedestrianDeparture$:Gx,RoutePedestrianLegDetails$:Fx,RoutePedestrianNotice$:Bx,RoutePedestrianNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",OTHER:"Other",VIOLATED_AVOID_DIRT_ROAD:"ViolatedAvoidDirtRoad",VIOLATED_AVOID_TUNNEL:"ViolatedAvoidTunnel",VIOLATED_PEDESTRIAN_OPTION:"ViolatedPedestrianOption"},RoutePedestrianOptions$:zx,RoutePedestrianOverviewSummary$:jx,RoutePedestrianPlace$:Hx,RoutePedestrianSpan$:qx,RoutePedestrianSummary$:Vx,RoutePedestrianTravelOnlySummary$:Wx,RoutePedestrianTravelStep$:Kx,RoutePedestrianTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",DEPART:"Depart",EXIT:"Exit",KEEP:"Keep",RAMP:"Ramp",ROUNDABOUT_ENTER:"RoundaboutEnter",ROUNDABOUT_EXIT:"RoundaboutExit",ROUNDABOUT_PASS:"RoundaboutPass",TURN:"Turn",U_TURN:"UTurn"},RouteRampStepDetails$:Qx,RouteResponseNotice$:Zx,RouteResponseNoticeCode:{MAIN_LANGUAGE_NOT_FOUND:"MainLanguageNotFound",OTHER:"Other",TRAVEL_TIME_EXCEEDS_DRIVER_WORK_HOURS:"TravelTimeExceedsDriverWorkHours"},RouteRoad$:Yx,RouteRoadType:{HIGHWAY:"Highway",RURAL:"Rural",URBAN:"Urban"},RouteRoundaboutEnterStepDetails$:Jx,RouteRoundaboutExitStepDetails$:Xx,RouteRoundaboutPassStepDetails$:eO,RouteScooterOptions$:tO,RouteSideOfStreet:{LEFT:"Left",RIGHT:"Right"},RouteSideOfStreetOptions$:sO,RouteSignpost$:rO,RouteSignpostLabel$:nO,RouteSpanAdditionalFeature:{BEST_CASE_DURATION:"BestCaseDuration",CAR_ACCESS:"CarAccess",CONSUMPTION:"Consumption",COUNTRY:"Country",DISTANCE:"Distance",DURATION:"Duration",DYNAMIC_SPEED:"DynamicSpeed",FUNCTIONAL_CLASSIFICATION:"FunctionalClassification",GATES:"Gates",INCIDENTS:"Incidents",NAMES:"Names",NOTICES:"Notices",PEDESTRIAN_ACCESS:"PedestrianAccess",RAILWAY_CROSSINGS:"RailwayCrossings",REGION:"Region",ROAD_ATTRIBUTES:"RoadAttributes",ROUTE_NUMBERS:"RouteNumbers",SCOOTER_ACCESS:"ScooterAccess",SPEED_LIMIT:"SpeedLimit",TOLL_SYSTEMS:"TollSystems",TRUCK_ACCESS:"TruckAccess",TRUCK_ROAD_TYPES:"TruckRoadTypes",TYPICAL_DURATION:"TypicalDuration",ZONES:"Zones"},RouteSpanCarAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSpanDynamicSpeedDetails$:iO,RouteSpanGateAttribute:{EMERGENCY:"Emergency",KEY_ACCESS:"KeyAccess",PERMISSION_REQUIRED:"PermissionRequired"},RouteSpanPedestrianAccessAttribute:{ALLOWED:"Allowed",INDOORS:"Indoors",NO_THROUGH_TRAFFIC:"NoThroughTraffic",PARK:"Park",STAIRS:"Stairs",TOLL_ROAD:"TollRoad"},RouteSpanRailwayCrossingAttribute:{PROTECTED:"Protected",UNPROTECTED:"Unprotected"},RouteSpanRoadAttribute:{BRIDGE:"Bridge",BUILT_UP_AREA:"BuiltUpArea",CONTROLLED_ACCESS_HIGHWAY:"ControlledAccessHighway",DIRT_ROAD:"DirtRoad",DIVIDED_ROAD:"DividedRoad",MOTORWAY:"Motorway",PRIVATE_ROAD:"PrivateRoad",RAMP:"Ramp",RIGHT_HAND_TRAFFIC:"RightHandTraffic",ROUNDABOUT:"Roundabout",TUNNEL:"Tunnel",UNDER_CONSTRUCTION:"UnderConstruction"},RouteSpanScooterAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSpanSpeedLimitDetails$:oO,RouteSpanTruckAccessAttribute:{ALLOWED:"Allowed",NO_THROUGH_TRAFFIC:"NoThroughTraffic",TOLL_ROAD:"TollRoad"},RouteSteeringDirection:{LEFT:"Left",RIGHT:"Right",STRAIGHT:"Straight"},RouteSummary$:aO,RouteToll$:cO,RouteTollOptions$:uO,RouteTollPass$:lO,RouteTollPassValidityPeriod$:dO,RouteTollPassValidityPeriodType:{ANNUAL:"Annual",DAYS:"Days",EXTENDED_ANNUAL:"ExtendedAnnual",MINUTES:"Minutes",MONTHS:"Months"},RouteTollPaymentMethod:{BANK_CARD:"BankCard",CASH:"Cash",CASH_EXACT:"CashExact",CREDIT_CARD:"CreditCard",PASS_SUBSCRIPTION:"PassSubscription",TRANSPONDER:"Transponder",TRAVEL_CARD:"TravelCard",VIDEO_TOLL:"VideoToll"},RouteTollPaymentSite$:pO,RouteTollPrice$:hO,RouteTollPriceSummary$:mO,RouteTollPriceValueRange$:gO,RouteTollRate$:fO,RouteTollSummary$:yO,RouteTollSystem$:SO,RouteTollVehicleCategory:{MINIBUS:"Minibus"},RouteTrafficOptions$:RO,RouteTrailerOptions$:wO,RouteTransponder$:EO,RouteTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},RouteTravelModeOptions$:CO,RouteTravelStepType:{DEFAULT:"Default",TURN_BY_TURN:"TurnByTurn"},RouteTruckOptions$:vO,RouteTruckType:{LIGHT_TRUCK:"LightTruck",STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},RouteTurnIntensity:{SHARP:"Sharp",SLIGHT:"Slight",TYPICAL:"Typical"},RouteTurnStepDetails$:bO,RouteUTurnStepDetails$:TO,RouteVehicleArrival$:PO,RouteVehicleDeparture$:IO,RouteVehicleIncident$:AO,RouteVehicleIncidentSeverity:{CRITICAL:"Critical",HIGH:"High",LOW:"Low",MEDIUM:"Medium"},RouteVehicleIncidentType:{ACCIDENT:"Accident",CONGESTION:"Congestion",CONSTRUCTION:"Construction",DISABLED_VEHICLE:"DisabledVehicle",LANE_RESTRICTION:"LaneRestriction",MASS_TRANSIT:"MassTransit",OTHER:"Other",PLANNED_EVENT:"PlannedEvent",ROAD_CLOSURE:"RoadClosure",ROAD_HAZARD:"RoadHazard",WEATHER:"Weather"},RouteVehicleLegDetails$:xO,RouteVehicleLicensePlate$:OO,RouteVehicleNotice$:DO,RouteVehicleNoticeCode:{ACCURATE_POLYLINE_UNAVAILABLE:"AccuratePolylineUnavailable",OTHER:"Other",POTENTIAL_VIOLATED_AVOID_TOLL_ROAD_USAGE:"PotentialViolatedAvoidTollRoadUsage",POTENTIAL_VIOLATED_CARPOOL_USAGE:"PotentialViolatedCarpoolUsage",POTENTIAL_VIOLATED_TURN_RESTRICTION_USAGE:"PotentialViolatedTurnRestrictionUsage",POTENTIAL_VIOLATED_VEHICLE_RESTRICTION_USAGE:"PotentialViolatedVehicleRestrictionUsage",POTENTIAL_VIOLATED_ZONE_RESTRICTION_USAGE:"PotentialViolatedZoneRestrictionUsage",SEASONAL_CLOSURE:"SeasonalClosure",TOLLS_DATA_TEMPORARILY_UNAVAILABLE:"TollsDataTemporarilyUnavailable",TOLLS_DATA_UNAVAILABLE:"TollsDataUnavailable",TOLL_TRANSPONDER:"TollTransponder",VIOLATED_AVOID_CONTROLLED_ACCESS_HIGHWAY:"ViolatedAvoidControlledAccessHighway",VIOLATED_AVOID_DIFFICULT_TURNS:"ViolatedAvoidDifficultTurns",VIOLATED_AVOID_DIRT_ROAD:"ViolatedAvoidDirtRoad",VIOLATED_AVOID_SEASONAL_CLOSURE:"ViolatedAvoidSeasonalClosure",VIOLATED_AVOID_TOLL_ROAD:"ViolatedAvoidTollRoad",VIOLATED_AVOID_TOLL_TRANSPONDER:"ViolatedAvoidTollTransponder",VIOLATED_AVOID_TRUCK_ROAD_TYPE:"ViolatedAvoidTruckRoadType",VIOLATED_AVOID_TUNNEL:"ViolatedAvoidTunnel",VIOLATED_AVOID_U_TURNS:"ViolatedAvoidUTurns",VIOLATED_BLOCKED_ROAD:"ViolatedBlockedRoad",VIOLATED_CARPOOL:"ViolatedCarpool",VIOLATED_EMERGENCY_GATE:"ViolatedEmergencyGate",VIOLATED_START_DIRECTION:"ViolatedStartDirection",VIOLATED_TURN_RESTRICTION:"ViolatedTurnRestriction",VIOLATED_VEHICLE_RESTRICTION:"ViolatedVehicleRestriction",VIOLATED_ZONE_RESTRICTION:"ViolatedZoneRestriction"},RouteVehicleNoticeDetail$:$O,RouteVehicleOverviewSummary$:LO,RouteVehiclePlace$:kO,RouteVehicleSpan$:MO,RouteVehicleSummary$:NO,RouteVehicleTravelOnlySummary$:UO,RouteVehicleTravelStep$:_O,RouteVehicleTravelStepType:{ARRIVE:"Arrive",CONTINUE:"Continue",CONTINUE_HIGHWAY:"ContinueHighway",DEPART:"Depart",ENTER_HIGHWAY:"EnterHighway",EXIT:"Exit",KEEP:"Keep",RAMP:"Ramp",ROUNDABOUT_ENTER:"RoundaboutEnter",ROUNDABOUT_EXIT:"RoundaboutExit",ROUNDABOUT_PASS:"RoundaboutPass",TURN:"Turn",U_TURN:"UTurn"},RouteViolatedConstraints$:GO,RouteWaypoint$:FO,RouteWeightConstraint$:BO,RouteWeightConstraintType:{CURRENT:"Current",GROSS:"Gross",UNKNOWN:"Unknown"},RouteZone$:zO,RouteZoneCategory:{CONGESTION_PRICING:"CongestionPricing",ENVIRONMENTAL:"Environmental",VIGNETTE:"Vignette"},RoutingObjective:{FASTEST_ROUTE:"FastestRoute",SHORTEST_ROUTE:"ShortestRoute"},SideOfStreetMatchingStrategy:{ANY_STREET:"AnyStreet",DIVIDED_STREET_ONLY:"DividedStreetOnly"},SnapToRoads$:W$,SnapToRoadsCommand:eL,SnapToRoadsRequest$:jO,SnapToRoadsResponse$:HO,ThrottlingException:mv,ThrottlingException$:kP,TrafficUsage:{IGNORE_TRAFFIC_DATA:"IgnoreTrafficData",USE_TRAFFIC_DATA:"UseTrafficData"},ValidationException:gv,ValidationException$:MP,ValidationExceptionField$:qO,ValidationExceptionReason:{CANNOT_PARSE:"CannotParse",FIELD_VALIDATION_FAILED:"FieldValidationFailed",MISSING:"Missing",OTHER:"Other",UNKNOWN_FIELD:"UnknownField",UNKNOWN_OPERATION:"UnknownOperation"},WaypointOptimizationAccessHours$:VO,WaypointOptimizationAccessHoursEntry$:WO,WaypointOptimizationAvoidanceArea$:KO,WaypointOptimizationAvoidanceAreaGeometry$:QO,WaypointOptimizationAvoidanceOptions$:ZO,WaypointOptimizationClusteringAlgorithm:{DRIVING_DISTANCE:"DrivingDistance",TOPOLOGY_SEGMENT:"TopologySegment"},WaypointOptimizationClusteringOptions$:YO,WaypointOptimizationConnection$:JO,WaypointOptimizationConstraint:{ACCESS_HOURS:"AccessHours",APPOINTMENT_TIME:"AppointmentTime",BEFORE:"Before",HEADING:"Heading",SERVICE_DURATION:"ServiceDuration",SIDE_OF_STREET:"SideOfStreet"},WaypointOptimizationDestinationOptions$:XO,WaypointOptimizationDriverOptions$:eD,WaypointOptimizationDrivingDistanceOptions$:tD,WaypointOptimizationExclusionOptions$:sD,WaypointOptimizationFailedConstraint$:rD,WaypointOptimizationHazardousCargoType:{COMBUSTIBLE:"Combustible",CORROSIVE:"Corrosive",EXPLOSIVE:"Explosive",FLAMMABLE:"Flammable",GAS:"Gas",HARMFUL_TO_WATER:"HarmfulToWater",ORGANIC:"Organic",OTHER:"Other",POISON:"Poison",POISONOUS_INHALATION:"PoisonousInhalation",RADIOACTIVE:"Radioactive"},WaypointOptimizationImpedingWaypoint$:nD,WaypointOptimizationOptimizedWaypoint$:iD,WaypointOptimizationOriginOptions$:oD,WaypointOptimizationPedestrianOptions$:aD,WaypointOptimizationRestCycleDurations$:cD,WaypointOptimizationRestCycles$:uD,WaypointOptimizationRestProfile$:lD,WaypointOptimizationSequencingObjective:{FASTEST_ROUTE:"FastestRoute",SHORTEST_ROUTE:"ShortestRoute"},WaypointOptimizationServiceTimeTreatment:{REST:"Rest",WORK:"Work"},WaypointOptimizationSideOfStreetOptions$:dD,WaypointOptimizationTimeBreakdown$:pD,WaypointOptimizationTrafficOptions$:hD,WaypointOptimizationTrailerOptions$:mD,WaypointOptimizationTravelMode:{CAR:"Car",PEDESTRIAN:"Pedestrian",SCOOTER:"Scooter",TRUCK:"Truck"},WaypointOptimizationTravelModeOptions$:gD,WaypointOptimizationTruckOptions$:fD,WaypointOptimizationTruckType:{STRAIGHT_TRUCK:"StraightTruck",TRACTOR:"Tractor"},WaypointOptimizationWaypoint$:yD,WeightPerAxleGroup$:SD,__Client:Zs,errorTypeRegistries:NP});var nL=Object.freeze({__proto__:null,EventStreamSerde:class{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:s,serdeContext:r,defaultContentType:n}){this.marshaller=e,this.serializer=t,this.deserializer=s,this.serdeContext=r,this.defaultContentType=n}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:s}){const r=this.marshaller,n=t.getEventStreamMember(),i=t.getMemberSchema(n),o=this.serializer,a=this.defaultContentType,c=Symbol("initialRequestMarker"),u={async*[Symbol.asyncIterator](){if(s){const e={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:a}};o.write(t,s);const r=o.flush();yield{[c]:!0,headers:e,body:r}}for await(const t of e)yield t}};return r.serialize(u,(e=>{if(e[c])return{headers:e.headers,body:e.body};const t=Object.keys(e).find((e=>"__type"!==e))??"",{additionalHeaders:s,body:r,eventType:n,explicitPayloadContentType:o}=this.writeEventBody(t,i,e);return{headers:{":event-type":{type:"string",value:n},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:o??a},...s},body:r}}))}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:s}){const r=this.marshaller,n=t.getEventStreamMember(),i=t.getMemberSchema(n).getMemberSchemas(),o=Symbol("initialResponseMarker"),a=r.deserialize(e.body,(async e=>{const s=Object.keys(e).find((e=>"__type"!==e))??"",r=e[s].body;if("initial-response"===s){const e=await this.deserializer.read(t,r);return delete e[n],{[o]:!0,...e}}if(s in i){const t=i[s];if(t.isStructSchema()){const n={};let i=!1;for(const[o,a]of t.structIterator()){const{eventHeader:t,eventPayload:c}=a.getMergedTraits();if(i=i||Boolean(t||c),c)a.isBlobSchema()?n[o]=r:a.isStringSchema()?n[o]=(this.serdeContext?.utf8Encoder??L)(r):a.isStructSchema()&&(n[o]=await this.deserializer.read(a,r));else if(t){const t=e[s].headers[o]?.value;null!=t&&(a.isNumericSchema()?n[o]=t&&"object"==typeof t&&"bytes"in t?BigInt(t.toString()):Number(t):n[o]=t)}}if(i)return{[s]:n};if(0===r.byteLength)return{[s]:{}}}return{[s]:await this.deserializer.read(t,r)}}return{$unknown:e}})),c=a[Symbol.asyncIterator](),u=await c.next();if(u.done)return a;if(u.value?.[o]){if(!t)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[e,t]of Object.entries(u.value))s[e]=t}return{async*[Symbol.asyncIterator](){for(u?.value?.[o]||(yield u.value);;){const{done:e,value:t}=await c.next();if(e)break;yield t}}}}writeEventBody(e,t,s){const r=this.serializer;let n,i=e,o=null;const a={};if(t.getSchema()[4].includes(e)){const i=t.getMemberSchema(e);if(i.isStructSchema()){for(const[t,r]of i.structIterator()){const{eventHeader:n,eventPayload:i}=r.getMergedTraits();if(i)o=t;else if(n){const n=s[e][t];let i="binary";r.isNumericSchema()?i=(-2)**31<=n&&n<=2**31-1?"integer":"long":r.isTimestampSchema()?i="timestamp":r.isStringSchema()?i="string":r.isBooleanSchema()&&(i="boolean"),null!=n&&(a[t]={type:i,value:n},delete s[e][t])}}if(null!==o){const t=i.getMemberSchema(o);t.isBlobSchema()?n="application/octet-stream":t.isStringSchema()&&(n="text/plain"),r.write(t,s[e][o])}else r.write(i,s[e])}else{if(!i.isUnitSchema())throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.");r.write(i,{})}}else{const[t,n]=s[e];i=t,r.write(15,n)}const c=r.flush();return{body:"string"==typeof c?(this.serdeContext?.utf8Decoder??D)(c):c,eventType:i,explicitPayloadContentType:n,additionalHeaders:a}}}});const iL=async(e,t,s)=>({operation:m(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const oL=e=>{const t=[];switch(e.operation){case"GetCredentialsForIdentity":case"GetId":case"GetOpenIdToken":case"UnlinkIdentity":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t},aL={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var cL="3.980.0";const uL=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!uL(t))return!1;return!0}return!!At(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let lL={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-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const dL={isVirtualHostableS3Bucket:uL,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[s,r,n,i,o,...a]=t;if("arn"!==s||""===r||""===n||""===a.join(":"))return null;return{partition:r,service:n,region:i,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=lL;for(const s of t){const{regions:t,outputs:r}=s;for(const[s,n]of Object.entries(t))if(s===e)return{...r,...n}}for(const s of t){const{regionRegex:t,outputs:r}=s;if(new RegExp(t).test(e))return{...r}}const s=t.find((e=>"aws"===e.id));if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}}};xt.aws=dL;const pL="required",hL="fn",mL="argv",gL="ref",fL=!0,yL="isSet",SL="booleanEquals",RL="error",wL="endpoint",EL="tree",CL="PartitionResult",vL="getAttr",bL="stringEquals",TL={[pL]:!1,type:"string"},PL={[pL]:!0,default:!1,type:"boolean"},IL={[gL]:"Endpoint"},AL={[hL]:SL,[mL]:[{[gL]:"UseFIPS"},!0]},xL={[hL]:SL,[mL]:[{[gL]:"UseDualStack"},!0]},OL={},DL={[gL]:"Region"},$L={[hL]:vL,[mL]:[{[gL]:CL},"supportsFIPS"]},LL={[gL]:CL},kL={[hL]:SL,[mL]:[!0,{[hL]:vL,[mL]:[LL,"supportsDualStack"]}]},ML=[AL],NL=[xL],UL=[DL],_L={parameters:{Region:TL,UseDualStack:PL,UseFIPS:PL,Endpoint:TL},rules:[{conditions:[{[hL]:yL,[mL]:[IL]}],rules:[{conditions:ML,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:RL},{conditions:NL,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:RL},{endpoint:{url:IL,properties:OL,headers:OL},type:wL}],type:EL},{conditions:[{[hL]:yL,[mL]:UL}],rules:[{conditions:[{[hL]:"aws.partition",[mL]:UL,assign:CL}],rules:[{conditions:[AL,xL],rules:[{conditions:[{[hL]:SL,[mL]:[fL,$L]},kL],rules:[{conditions:[{[hL]:bL,[mL]:[DL,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:OL,headers:OL},type:wL},{conditions:[{[hL]:bL,[mL]:[DL,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:OL,headers:OL},type:wL},{conditions:[{[hL]:bL,[mL]:[DL,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:OL,headers:OL},type:wL},{conditions:[{[hL]:bL,[mL]:[DL,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:OL,headers:OL},type:wL},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:OL,headers:OL},type:wL}],type:EL},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:RL}],type:EL},{conditions:ML,rules:[{conditions:[{[hL]:SL,[mL]:[$L,fL]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:OL,headers:OL},type:wL}],type:EL},{error:"FIPS is enabled but this partition does not support FIPS",type:RL}],type:EL},{conditions:NL,rules:[{conditions:[kL],rules:[{conditions:[{[hL]:bL,[mL]:["aws",{[hL]:vL,[mL]:[LL,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:OL,headers:OL},type:wL},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:OL,headers:OL},type:wL}],type:EL},{error:"DualStack is enabled but this partition does not support DualStack",type:RL}],type:EL},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:OL,headers:OL},type:wL}],type:EL}],type:EL},{error:"Invalid Configuration: Missing Region",type:RL}]},GL=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),FL=(e,t={})=>GL.get(e,(()=>Yt(_L,{endpointParams:e,logger:t.logger})));xt.aws=dL;const BL=e=>{const t=Xn(e),s=()=>t().then(nr),r=(e=>({apiVersion:"2014-06-30",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??k,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??FL,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??oL,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new cs},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rt}],logger:e?.logger??new cr,protocol:e?.protocol??Er,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:e?.serviceId??"Cognito Identity",urlParser:e?.urlParser??ts,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??L}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Hs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qn({serviceId:r.serviceId,clientVersion:cL}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yn("Region is missing"),requestHandler:z.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||nn),sha256:e?.sha256??Kn,streamCollector:e?.streamCollector??j,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Nr)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class zL extends sr{constructor(e){super(e),Object.setPrototypeOf(this,zL.prototype)}}class jL extends zL{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,jL.prototype)}}class HL extends zL{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,HL.prototype)}}class qL extends zL{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,qL.prototype)}}class VL extends zL{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,VL.prototype)}}class WL extends zL{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,WL.prototype)}}class KL extends zL{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,KL.prototype)}}class QL extends zL{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,QL.prototype)}}class ZL extends zL{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,ZL.prototype)}}class YL extends zL{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,YL.prototype)}}class JL extends zL{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,JL.prototype)}}class XL extends zL{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,XL.prototype)}}const ek="Credentials",tk="IdentityId",sk="Logins",rk="client",nk="error",ik="httpError",ok="message",ak="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",ck="com.amazonaws.cognitoidentity";var uk=[0,ck,"IdentityProviderToken",8,0],lk=[0,ck,"SecretKeyString",8,0],dk=[-3,ck,"ConcurrentModificationException",{[nk]:rk,[ik]:400},[ok],[0]];le.for(ck).registerError(dk,XL);var pk=[3,ck,ek,0,["AccessKeyId","SecretKey","SessionToken","Expiration"],[0,[()=>lk,0],0,4]],hk=[-3,ck,"DeveloperUserAlreadyRegisteredException",{[nk]:rk,[ik]:400},[ok],[0]];le.for(ck).registerError(hk,JL);var mk=[-3,ck,"ExternalServiceException",{[nk]:rk,[ik]:400},[ok],[0]];le.for(ck).registerError(mk,ZL);var gk=[3,ck,"GetCredentialsForIdentityInput",0,[tk,sk,"CustomRoleArn"],[0,[()=>Ak,0],0],1],fk=[3,ck,"GetCredentialsForIdentityResponse",0,[tk,ek],[0,[()=>pk,0]]],yk=[3,ck,"GetIdInput",0,["IdentityPoolId","AccountId",sk],[0,0,[()=>Ak,0]],1],Sk=[3,ck,"GetIdResponse",0,[tk],[0]],Rk=[-3,ck,"InternalErrorException",{[nk]:"server"},[ok],[0]];le.for(ck).registerError(Rk,jL);var wk=[-3,ck,"InvalidIdentityPoolConfigurationException",{[nk]:rk,[ik]:400},[ok],[0]];le.for(ck).registerError(wk,YL);var Ek=[-3,ck,"InvalidParameterException",{[nk]:rk,[ik]:400},[ok],[0]];le.for(ck).registerError(Ek,HL);var Ck=[-3,ck,"LimitExceededException",{[nk]:rk,[ik]:400},[ok],[0]];le.for(ck).registerError(Ck,qL);var vk=[-3,ck,"NotAuthorizedException",{[nk]:rk,[ik]:403},[ok],[0]];le.for(ck).registerError(vk,VL);var bk=[-3,ck,"ResourceConflictException",{[nk]:rk,[ik]:409},[ok],[0]];le.for(ck).registerError(bk,WL);var Tk=[-3,ck,"ResourceNotFoundException",{[nk]:rk,[ik]:404},[ok],[0]];le.for(ck).registerError(Tk,QL);var Pk=[-3,ck,"TooManyRequestsException",{[nk]:rk,[ik]:429},[ok],[0]];le.for(ck).registerError(Pk,KL);var Ik=[-3,ak,"CognitoIdentityServiceException",0,[],[]];le.for(ak).registerError(Ik,zL);var Ak=[2,ck,"LoginsMap",0,[0,0],[()=>uk,0]],xk=[9,ck,"GetCredentialsForIdentity",0,()=>gk,()=>fk],Ok=[9,ck,"GetId",0,()=>yk,()=>Sk];class Dk extends(Xs.classBuilder().ep(aL).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(xk).build()){}class $k extends(Xs.classBuilder().ep(aL).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(Ok).build()){}var Lk=Object.freeze({__proto__:null,CognitoIdentityClient:class extends Zs{config;constructor(...[e]){const r=BL(e||{});super(r),this.initConfig=r;var n;const i=vt((n=r,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}))),o=yn(i),a=Fr(o),c=((e,r)=>{const n=Object.assign(Ih(e),ir(e),t(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex((t=>t.schemeId===e.schemeId));-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(n))),Object.assign(e,Ah(n),or(n),s(n),{httpAuthSchemes:(i=n).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})((e=>{const t=zs(e);return Object.assign(t,{authSchemePreference:g(e.authSchemePreference??[])})})(sn(a)),e?.extensions||[]);this.config=c,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Mr(this.config)),this.middlewareStack.use(vn(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:iL,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(C(this.config))}destroy(){super.destroy()}},GetCredentialsForIdentityCommand:Dk,GetIdCommand:$k});const kk=async(e,t,s)=>({operation:m(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const Mk=e=>{const t=[];if("AssumeRoleWithWebIdentity"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},Nk=e=>{const t=(s=e,Object.assign(s,{stsClientCtor:nN}));var s;const r=zs(t);return Object.assign(r,{authSchemePreference:g(e.authSchemePreference??[])})},Uk={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var _k="3.992.0";const Gk="required",Fk="type",Bk="fn",zk="argv",jk="ref",Hk=!1,qk=!0,Vk="booleanEquals",Wk="stringEquals",Kk="sigv4",Qk="us-east-1",Zk="endpoint",Yk="https://sts.{Region}.{PartitionResult#dnsSuffix}",Jk="tree",Xk="error",eM="getAttr",tM={[Gk]:!1,[Fk]:"string"},sM={[Gk]:!0,default:!1,[Fk]:"boolean"},rM={[jk]:"Endpoint"},nM={[Bk]:"isSet",[zk]:[{[jk]:"Region"}]},iM={[jk]:"Region"},oM={[Bk]:"aws.partition",[zk]:[iM],assign:"PartitionResult"},aM={[jk]:"UseFIPS"},cM={[jk]:"UseDualStack"},uM={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:Kk,signingName:"sts",signingRegion:Qk}]},headers:{}},lM={},dM={conditions:[{[Bk]:Wk,[zk]:[iM,"aws-global"]}],[Zk]:uM,[Fk]:Zk},pM={[Bk]:Vk,[zk]:[aM,!0]},hM={[Bk]:Vk,[zk]:[cM,!0]},mM={[Bk]:eM,[zk]:[{[jk]:"PartitionResult"},"supportsFIPS"]},gM={[jk]:"PartitionResult"},fM={[Bk]:Vk,[zk]:[!0,{[Bk]:eM,[zk]:[gM,"supportsDualStack"]}]},yM=[{[Bk]:"isSet",[zk]:[rM]}],SM=[pM],RM=[hM],wM={parameters:{Region:tM,UseDualStack:sM,UseFIPS:sM,Endpoint:tM,UseGlobalEndpoint:sM},rules:[{conditions:[{[Bk]:Vk,[zk]:[{[jk]:"UseGlobalEndpoint"},qk]},{[Bk]:"not",[zk]:yM},nM,oM,{[Bk]:Vk,[zk]:[aM,Hk]},{[Bk]:Vk,[zk]:[cM,Hk]}],rules:[{conditions:[{[Bk]:Wk,[zk]:[iM,"ap-northeast-1"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"ap-south-1"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"ap-southeast-1"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"ap-southeast-2"]}],endpoint:uM,[Fk]:Zk},dM,{conditions:[{[Bk]:Wk,[zk]:[iM,"ca-central-1"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"eu-central-1"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"eu-north-1"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"eu-west-1"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"eu-west-2"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"eu-west-3"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"sa-east-1"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,Qk]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"us-east-2"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"us-west-1"]}],endpoint:uM,[Fk]:Zk},{conditions:[{[Bk]:Wk,[zk]:[iM,"us-west-2"]}],endpoint:uM,[Fk]:Zk},{endpoint:{url:Yk,properties:{authSchemes:[{name:Kk,signingName:"sts",signingRegion:"{Region}"}]},headers:lM},[Fk]:Zk}],[Fk]:Jk},{conditions:yM,rules:[{conditions:SM,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[Fk]:Xk},{conditions:RM,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[Fk]:Xk},{endpoint:{url:rM,properties:lM,headers:lM},[Fk]:Zk}],[Fk]:Jk},{conditions:[nM],rules:[{conditions:[oM],rules:[{conditions:[pM,hM],rules:[{conditions:[{[Bk]:Vk,[zk]:[qk,mM]},fM],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lM,headers:lM},[Fk]:Zk}],[Fk]:Jk},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[Fk]:Xk}],[Fk]:Jk},{conditions:SM,rules:[{conditions:[{[Bk]:Vk,[zk]:[mM,qk]}],rules:[{conditions:[{[Bk]:Wk,[zk]:[{[Bk]:eM,[zk]:[gM,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:lM,headers:lM},[Fk]:Zk},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:lM,headers:lM},[Fk]:Zk}],[Fk]:Jk},{error:"FIPS is enabled but this partition does not support FIPS",[Fk]:Xk}],[Fk]:Jk},{conditions:RM,rules:[{conditions:[fM],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:lM,headers:lM},[Fk]:Zk}],[Fk]:Jk},{error:"DualStack is enabled but this partition does not support DualStack",[Fk]:Xk}],[Fk]:Jk},dM,{endpoint:{url:Yk,properties:lM,headers:lM},[Fk]:Zk}],[Fk]:Jk}],[Fk]:Jk},{error:"Invalid Configuration: Missing Region",[Fk]:Xk}]},EM=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),CM=(e,t={})=>EM.get(e,(()=>Yt(wM,{endpointParams:e,logger:t.logger})));xt.aws=ri;let vM=class e extends sr{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};const bM="AssumedRoleUser",TM="Credentials",PM="SourceIdentity",IM="awsQueryError",AM="client",xM="error",OM="httpError",DM="message",$M="smithy.ts.sdk.synthetic.com.amazonaws.sts",LM="com.amazonaws.sts",kM=le.for($M);var MM=[-3,$M,"STSServiceException",0,[],[]];kM.registerError(MM,vM);const NM=le.for(LM);var UM=[-3,LM,"ExpiredTokenException",{[IM]:["ExpiredTokenException",400],[xM]:AM,[OM]:400},[DM],[0]];NM.registerError(UM,class e extends vM{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var _M=[-3,LM,"IDPCommunicationErrorException",{[IM]:["IDPCommunicationError",400],[xM]:AM,[OM]:400},[DM],[0]];NM.registerError(_M,class e extends vM{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var GM=[-3,LM,"IDPRejectedClaimException",{[IM]:["IDPRejectedClaim",403],[xM]:AM,[OM]:403},[DM],[0]];NM.registerError(GM,class e extends vM{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var FM=[-3,LM,"InvalidIdentityTokenException",{[IM]:["InvalidIdentityToken",400],[xM]:AM,[OM]:400},[DM],[0]];NM.registerError(FM,class e extends vM{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var BM=[-3,LM,"MalformedPolicyDocumentException",{[IM]:["MalformedPolicyDocument",400],[xM]:AM,[OM]:400},[DM],[0]];NM.registerError(BM,class e extends vM{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var zM=[-3,LM,"PackedPolicyTooLargeException",{[IM]:["PackedPolicyTooLarge",400],[xM]:AM,[OM]:400},[DM],[0]];NM.registerError(zM,class e extends vM{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});var jM=[-3,LM,"RegionDisabledException",{[IM]:["RegionDisabledException",403],[xM]:AM,[OM]:403},[DM],[0]];NM.registerError(jM,class e extends vM{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,e.prototype)}});const HM=[kM,NM];var qM=[0,LM,"accessKeySecretType",8,0],VM=[3,LM,bM,0,["AssumedRoleId","Arn"],[0,0],2],WM=[3,LM,"AssumeRoleRequest",0,["RoleArn","RoleSessionName","PolicyArns","Policy","DurationSeconds","Tags","TransitiveTagKeys","ExternalId","SerialNumber","TokenCode",PM,"ProvidedContexts"],[0,0,()=>XM,0,1,()=>tN,64,0,0,0,0,()=>eN],2],KM=[3,LM,"AssumeRoleResponse",0,[TM,bM,"PackedPolicySize",PM],[[()=>QM,0],()=>VM,1,0]],QM=[3,LM,TM,0,["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],[0,[()=>qM,0],0,4],4],ZM=[3,LM,"PolicyDescriptorType",0,["arn"],[0]],YM=[3,LM,"ProvidedContext",0,["ProviderArn","ContextAssertion"],[0,0]],JM=[3,LM,"Tag",0,["Key","Value"],[0,0],2],XM=[1,LM,"policyDescriptorListType",0,()=>ZM],eN=[1,LM,"ProvidedContextsListType",0,()=>YM],tN=[1,LM,"tagListType",0,()=>JM],sN=[9,LM,"AssumeRole",0,()=>WM,()=>KM];const rN=e=>{const t=Xn(e),s=()=>t().then(nr),r=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??k,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??CM,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Mk,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new cs},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rt}],logger:e?.logger??new cr,protocol:e?.protocol??Pr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:HM,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??ts,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??L}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Hs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qn({serviceId:r.serviceId,clientVersion:_k}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yn("Region is missing"),requestHandler:z.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||nn),sha256:e?.sha256??Kn,streamCollector:e?.streamCollector??j,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Nr)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};let nN=class extends Zs{config;constructor(...[e]){const r=rN(e||{});super(r),this.initConfig=r;var n;const i=vt((n=r,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,useGlobalEndpoint:n.useGlobalEndpoint??!1,defaultSigningName:"sts"}))),o=yn(i),a=Fr(o),c=sn(a),l=((e,r)=>{const n=Object.assign(Ih(e),ir(e),t(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex((t=>t.schemeId===e.schemeId));-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(n))),Object.assign(e,Ah(n),or(n),s(n),{httpAuthSchemes:(i=n).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})(Nk(c),e?.extensions||[]);this.config=l,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Mr(this.config)),this.middlewareStack.use(vn(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:kk,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(C(this.config))}destroy(){super.destroy()}};class iN extends(Xs.classBuilder().ep(Uk).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(sN).build()){}var oN=Object.freeze({__proto__:null,AssumeRoleCommand:iN,STSClient:nN});const aN=async(e,t,s)=>({operation:m(t).operation,region:await g(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});const cN=e=>{const t=[];if("AssumeRoleWithWebIdentity"===e.operation)t.push({schemeId:"smithy.api#noAuth"});else t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e));return t},uN=e=>{const t=(s=e,Object.assign(s,{stsClientCtor:UU}));var s;const r=zs(t);return Object.assign(r,{authSchemePreference:g(e.authSchemePreference??[])})},lN={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var dN="3.990.0";const pN=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!pN(t))return!1;return!0}return!!At(e)&&(!(e.length<3||e.length>63)&&(e===e.toLowerCase()&&!Pt(e)))};let hN={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-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}]};const mN={isVirtualHostableS3Bucket:pN,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[s,r,n,i,o,...a]=t;if("arn"!==s||""===r||""===n||""===a.join(":"))return null;return{partition:r,service:n,region:i,accountId:o,resourceId:a.map((e=>e.split("/"))).flat()}},partition:e=>{const{partitions:t}=hN;for(const s of t){const{regions:t,outputs:r}=s;for(const[s,n]of Object.entries(t))if(s===e)return{...r,...n}}for(const s of t){const{regionRegex:t,outputs:r}=s;if(new RegExp(t).test(e))return{...r}}const s=t.find((e=>"aws"===e.id));if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}}};xt.aws=mN;const gN="required",fN="type",yN="fn",SN="argv",RN="ref",wN=!1,EN=!0,CN="booleanEquals",vN="stringEquals",bN="sigv4",TN="us-east-1",PN="endpoint",IN="https://sts.{Region}.{PartitionResult#dnsSuffix}",AN="tree",xN="error",ON="getAttr",DN={[gN]:!1,[fN]:"string"},$N={[gN]:!0,default:!1,[fN]:"boolean"},LN={[RN]:"Endpoint"},kN={[yN]:"isSet",[SN]:[{[RN]:"Region"}]},MN={[RN]:"Region"},NN={[yN]:"aws.partition",[SN]:[MN],assign:"PartitionResult"},UN={[RN]:"UseFIPS"},_N={[RN]:"UseDualStack"},GN={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:bN,signingName:"sts",signingRegion:TN}]},headers:{}},FN={},BN={conditions:[{[yN]:vN,[SN]:[MN,"aws-global"]}],[PN]:GN,[fN]:PN},zN={[yN]:CN,[SN]:[UN,!0]},jN={[yN]:CN,[SN]:[_N,!0]},HN={[yN]:ON,[SN]:[{[RN]:"PartitionResult"},"supportsFIPS"]},qN={[RN]:"PartitionResult"},VN={[yN]:CN,[SN]:[!0,{[yN]:ON,[SN]:[qN,"supportsDualStack"]}]},WN=[{[yN]:"isSet",[SN]:[LN]}],KN=[zN],QN=[jN],ZN={parameters:{Region:DN,UseDualStack:$N,UseFIPS:$N,Endpoint:DN,UseGlobalEndpoint:$N},rules:[{conditions:[{[yN]:CN,[SN]:[{[RN]:"UseGlobalEndpoint"},EN]},{[yN]:"not",[SN]:WN},kN,NN,{[yN]:CN,[SN]:[UN,wN]},{[yN]:CN,[SN]:[_N,wN]}],rules:[{conditions:[{[yN]:vN,[SN]:[MN,"ap-northeast-1"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"ap-south-1"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"ap-southeast-1"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"ap-southeast-2"]}],endpoint:GN,[fN]:PN},BN,{conditions:[{[yN]:vN,[SN]:[MN,"ca-central-1"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"eu-central-1"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"eu-north-1"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"eu-west-1"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"eu-west-2"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"eu-west-3"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"sa-east-1"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,TN]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"us-east-2"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"us-west-1"]}],endpoint:GN,[fN]:PN},{conditions:[{[yN]:vN,[SN]:[MN,"us-west-2"]}],endpoint:GN,[fN]:PN},{endpoint:{url:IN,properties:{authSchemes:[{name:bN,signingName:"sts",signingRegion:"{Region}"}]},headers:FN},[fN]:PN}],[fN]:AN},{conditions:WN,rules:[{conditions:KN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[fN]:xN},{conditions:QN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[fN]:xN},{endpoint:{url:LN,properties:FN,headers:FN},[fN]:PN}],[fN]:AN},{conditions:[kN],rules:[{conditions:[NN],rules:[{conditions:[zN,jN],rules:[{conditions:[{[yN]:CN,[SN]:[EN,HN]},VN],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:FN,headers:FN},[fN]:PN}],[fN]:AN},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[fN]:xN}],[fN]:AN},{conditions:KN,rules:[{conditions:[{[yN]:CN,[SN]:[HN,EN]}],rules:[{conditions:[{[yN]:vN,[SN]:[{[yN]:ON,[SN]:[qN,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:FN,headers:FN},[fN]:PN},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:FN,headers:FN},[fN]:PN}],[fN]:AN},{error:"FIPS is enabled but this partition does not support FIPS",[fN]:xN}],[fN]:AN},{conditions:QN,rules:[{conditions:[VN],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:FN,headers:FN},[fN]:PN}],[fN]:AN},{error:"DualStack is enabled but this partition does not support DualStack",[fN]:xN}],[fN]:AN},BN,{endpoint:{url:IN,properties:FN,headers:FN},[fN]:PN}],[fN]:AN}],[fN]:AN},{error:"Invalid Configuration: Missing Region",[fN]:xN}]},YN=new bt({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),JN=(e,t={})=>YN.get(e,(()=>Yt(ZN,{endpointParams:e,logger:t.logger})));xt.aws=mN;class XN extends sr{constructor(e){super(e),Object.setPrototypeOf(this,XN.prototype)}}class eU extends XN{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,eU.prototype)}}class tU extends XN{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),Object.setPrototypeOf(this,tU.prototype)}}class sU extends XN{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e}),Object.setPrototypeOf(this,sU.prototype)}}class rU extends XN{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e}),Object.setPrototypeOf(this,rU.prototype)}}class nU extends XN{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e}),Object.setPrototypeOf(this,nU.prototype)}}class iU extends XN{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e}),Object.setPrototypeOf(this,iU.prototype)}}class oU extends XN{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e}),Object.setPrototypeOf(this,oU.prototype)}}const aU="AssumedRoleUser",cU="Credentials",uU="awsQueryError",lU="client",dU="error",pU="httpError",hU="message",mU="smithy.ts.sdk.synthetic.com.amazonaws.sts",gU="com.amazonaws.sts",fU=le.for(mU);var yU=[-3,mU,"STSServiceException",0,[],[]];fU.registerError(yU,XN);const SU=le.for(gU);var RU=[-3,gU,"ExpiredTokenException",{[uU]:["ExpiredTokenException",400],[dU]:lU,[pU]:400},[hU],[0]];SU.registerError(RU,eU);var wU=[-3,gU,"IDPCommunicationErrorException",{[uU]:["IDPCommunicationError",400],[dU]:lU,[pU]:400},[hU],[0]];SU.registerError(wU,oU);var EU=[-3,gU,"IDPRejectedClaimException",{[uU]:["IDPRejectedClaim",403],[dU]:lU,[pU]:403},[hU],[0]];SU.registerError(EU,nU);var CU=[-3,gU,"InvalidIdentityTokenException",{[uU]:["InvalidIdentityToken",400],[dU]:lU,[pU]:400},[hU],[0]];SU.registerError(CU,iU);var vU=[-3,gU,"MalformedPolicyDocumentException",{[uU]:["MalformedPolicyDocument",400],[dU]:lU,[pU]:400},[hU],[0]];SU.registerError(vU,tU);var bU=[-3,gU,"PackedPolicyTooLargeException",{[uU]:["PackedPolicyTooLarge",400],[dU]:lU,[pU]:400},[hU],[0]];SU.registerError(bU,sU);var TU=[-3,gU,"RegionDisabledException",{[uU]:["RegionDisabledException",403],[dU]:lU,[pU]:403},[hU],[0]];SU.registerError(TU,rU);const PU=[fU,SU];var IU=[0,gU,"accessKeySecretType",8,0],AU=[0,gU,"clientTokenType",8,0],xU=[3,gU,aU,0,["AssumedRoleId","Arn"],[0,0],2],OU=[3,gU,"AssumeRoleWithWebIdentityRequest",0,["RoleArn","RoleSessionName","WebIdentityToken","ProviderId","PolicyArns","Policy","DurationSeconds"],[0,0,[()=>AU,0],0,()=>kU,0,1],3],DU=[3,gU,"AssumeRoleWithWebIdentityResponse",0,[cU,"SubjectFromWebIdentityToken",aU,"PackedPolicySize","Provider","Audience","SourceIdentity"],[[()=>$U,0],0,()=>xU,1,0,0,0]],$U=[3,gU,cU,0,["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],[0,[()=>IU,0],0,4],4],LU=[3,gU,"PolicyDescriptorType",0,["arn"],[0]],kU=[1,gU,"policyDescriptorListType",0,()=>LU],MU=[9,gU,"AssumeRoleWithWebIdentity",0,()=>OU,()=>DU];const NU=e=>{const t=Xn(e),s=()=>t().then(nr),r=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??O,base64Encoder:e?.base64Encoder??k,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??JN,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??cN,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new cs},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rt}],logger:e?.logger??new cr,protocol:e?.protocol??Pr,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:PU,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??ts,utf8Decoder:e?.utf8Decoder??D,utf8Encoder:e?.utf8Encoder??L}))(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Hs,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qn({serviceId:r.serviceId,clientVersion:dN}),maxAttempts:e?.maxAttempts??3,region:e?.region??Yn("Region is missing"),requestHandler:z.create(e?.requestHandler??s),retryMode:e?.retryMode??(async()=>(await s()).retryMode||nn),sha256:e?.sha256??Kn,streamCollector:e?.streamCollector??j,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Nr)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(Ur))}};class UU extends Zs{config;constructor(...[e]){const r=NU(e||{});super(r),this.initConfig=r;var n;const i=vt((n=r,Object.assign(n,{useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,useGlobalEndpoint:n.useGlobalEndpoint??!1,defaultSigningName:"sts"}))),o=yn(i),a=Fr(o),c=sn(a),l=((e,r)=>{const n=Object.assign(Ih(e),ir(e),t(e),(e=>{const t=e.httpAuthSchemes;let s=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const s=t.findIndex((t=>t.schemeId===e.schemeId));-1===s?t.push(e):t.splice(s,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){s=e},httpAuthSchemeProvider:()=>s,setCredentials(e){r=e},credentials:()=>r}})(e));return r.forEach((e=>e.configure(n))),Object.assign(e,Ah(n),or(n),s(n),{httpAuthSchemes:(i=n).httpAuthSchemes(),httpAuthSchemeProvider:i.httpAuthSchemeProvider(),credentials:i.credentials()});var i})(uN(c),e?.extensions||[]);this.config=l,this.middlewareStack.use(re(this.config)),this.middlewareStack.use(Mr(this.config)),this.middlewareStack.use(vn(this.config)),this.middlewareStack.use(jr(this.config)),this.middlewareStack.use(u(this.config)),this.middlewareStack.use(d(this.config)),this.middlewareStack.use(h(this.config)),this.middlewareStack.use(S(this.config,{httpAuthSchemeParametersProvider:aN,identityProviderConfigProvider:async e=>new St({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(C(this.config))}destroy(){super.destroy()}}class _U extends(Xs.classBuilder().ep(lN).m((function(e,t,s,r){return[tn(s,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(MU).build()){}const GU=e=>"h2"===e?.metadata?.handlerProtocol,FU=(e,t)=>t?class extends e{constructor(e){super(e);for(const e of t)this.middlewareStack.use(e)}}:e;var BU=Object.freeze({__proto__:null,$Command:Xs,AssumeRoleWithWebIdentity$:MU,AssumeRoleWithWebIdentityCommand:_U,AssumeRoleWithWebIdentityRequest$:OU,AssumeRoleWithWebIdentityResponse$:DU,AssumedRoleUser$:xU,Credentials$:$U,ExpiredTokenException:eU,ExpiredTokenException$:RU,IDPCommunicationErrorException:oU,IDPCommunicationErrorException$:wU,IDPRejectedClaimException:nU,IDPRejectedClaimException$:EU,InvalidIdentityTokenException:iU,InvalidIdentityTokenException$:CU,MalformedPolicyDocumentException:tU,MalformedPolicyDocumentException$:vU,PackedPolicyTooLargeException:sU,PackedPolicyTooLargeException$:bU,PolicyDescriptorType$:LU,RegionDisabledException:rU,RegionDisabledException$:TU,STSClient:UU,STSServiceException:XN,STSServiceException$:yU,__Client:Zs,errorTypeRegistries:PU,getDefaultRoleAssumerWithWebIdentity:(e={},t)=>((e,t)=>{let s;return async r=>{if(!s){const{logger:r=e?.parentClientConfig?.logger,profile:n=e?.parentClientConfig?.profile,region:i,requestHandler:o=e?.parentClientConfig?.requestHandler,credentialProviderLogger:a,userAgentAppId:c=e?.parentClientConfig?.userAgentAppId}=e,u=await(async(e,t,s)=>{const r="function"==typeof e?await e():e,n="function"==typeof t?await t():t;let i="";const o=r??n??(i=await(async()=>"us-east-1")());return s?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${r} (credential provider clientConfig)`,`${n} (contextual client)`,`${i} (STS default: AWS_REGION, profile region, or us-east-1)`),o})(i,e?.parentClientConfig?.region,a),l=!GU(o);s=new t({...e,userAgentAppId:c,profile:n,region:u,requestHandler:l?o:void 0,logger:r})}const{Credentials:n,AssumedRoleUser:i}=await s.send(new _U(r));if(!n||!n.AccessKeyId||!n.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${r.RoleArn}`);const o=(e=>{if("string"==typeof e?.Arn){const t=e.Arn.split(":");if(t.length>4&&""!==t[4])return t[4]}})(i),a={accessKeyId:n.AccessKeyId,secretAccessKey:n.SecretAccessKey,sessionToken:n.SessionToken,expiration:n.Expiration,...n.CredentialScope&&{credentialScope:n.CredentialScope},...o&&{accountId:o}};return o&&ss(a,"RESOLVED_ACCOUNT_ID","T"),ss(a,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),a}})(e,FU(UU,t))});e.$Command=Xs,e.AccessDeniedException=Oi,e.AccessDeniedException$=za,e.AndroidApp$=uc,e.ApiKeyFilter$=lc,e.ApiKeyRestrictions$=dc,e.AppleApp$=pc,e.AssociateTrackerConsumer$=wp,e.AssociateTrackerConsumerCommand=Oh,e.AssociateTrackerConsumerRequest$=hc,e.AssociateTrackerConsumerResponse$=mc,e.BatchDeleteDevicePositionHistory$=Ep,e.BatchDeleteDevicePositionHistoryCommand=Dh,e.BatchDeleteDevicePositionHistoryError$=gc,e.BatchDeleteDevicePositionHistoryRequest$=fc,e.BatchDeleteDevicePositionHistoryResponse$=yc,e.BatchDeleteGeofence$=Cp,e.BatchDeleteGeofenceCommand=$h,e.BatchDeleteGeofenceError$=Sc,e.BatchDeleteGeofenceRequest$=Rc,e.BatchDeleteGeofenceResponse$=wc,e.BatchEvaluateGeofences$=vp,e.BatchEvaluateGeofencesCommand=Lh,e.BatchEvaluateGeofencesError$=Ec,e.BatchEvaluateGeofencesRequest$=Cc,e.BatchEvaluateGeofencesResponse$=vc,e.BatchGetDevicePosition$=bp,e.BatchGetDevicePositionCommand=kh,e.BatchGetDevicePositionError$=bc,e.BatchGetDevicePositionRequest$=Tc,e.BatchGetDevicePositionResponse$=Pc,e.BatchItemError$=Ic,e.BatchPutGeofence$=Tp,e.BatchPutGeofenceCommand=Mh,e.BatchPutGeofenceError$=Ac,e.BatchPutGeofenceRequest$=xc,e.BatchPutGeofenceRequestEntry$=Oc,e.BatchPutGeofenceResponse$=Dc,e.BatchPutGeofenceSuccess$=$c,e.BatchUpdateDevicePosition$=Pp,e.BatchUpdateDevicePositionCommand=Nh,e.BatchUpdateDevicePositionError$=Lc,e.BatchUpdateDevicePositionRequest$=kc,e.BatchUpdateDevicePositionResponse$=Mc,e.CalculateRoute$=Ip,e.CalculateRouteCarModeOptions$=Nc,e.CalculateRouteCommand=Uh,e.CalculateRouteMatrix$=Ap,e.CalculateRouteMatrixCommand=_h,e.CalculateRouteMatrixRequest$=Uc,e.CalculateRouteMatrixResponse$=_c,e.CalculateRouteMatrixSummary$=Gc,e.CalculateRouteRequest$=Fc,e.CalculateRouteResponse$=Bc,e.CalculateRouteSummary$=zc,e.CalculateRouteTruckModeOptions$=jc,e.CellSignals$=Hc,e.Circle$=qc,e.ConflictException=Di,e.ConflictException$=ja,e.CreateGeofenceCollection$=xp,e.CreateGeofenceCollectionCommand=Gh,e.CreateGeofenceCollectionRequest$=Vc,e.CreateGeofenceCollectionResponse$=Wc,e.CreateKey$=Op,e.CreateKeyCommand=Fh,e.CreateKeyRequest$=Kc,e.CreateKeyResponse$=Qc,e.CreateMap$=Dp,e.CreateMapCommand=Bh,e.CreateMapRequest$=Zc,e.CreateMapResponse$=Yc,e.CreatePlaceIndex$=$p,e.CreatePlaceIndexCommand=zh,e.CreatePlaceIndexRequest$=Jc,e.CreatePlaceIndexResponse$=Xc,e.CreateRouteCalculator$=Lp,e.CreateRouteCalculatorCommand=jh,e.CreateRouteCalculatorRequest$=eu,e.CreateRouteCalculatorResponse$=tu,e.CreateTracker$=kp,e.CreateTrackerCommand=Hh,e.CreateTrackerRequest$=su,e.CreateTrackerResponse$=ru,e.DataSourceConfiguration$=nu,e.DeleteGeofenceCollection$=Mp,e.DeleteGeofenceCollectionCommand=qh,e.DeleteGeofenceCollectionRequest$=iu,e.DeleteGeofenceCollectionResponse$=ou,e.DeleteKey$=Np,e.DeleteKeyCommand=Vh,e.DeleteKeyRequest$=au,e.DeleteKeyResponse$=cu,e.DeleteMap$=Up,e.DeleteMapCommand=Wh,e.DeleteMapRequest$=uu,e.DeleteMapResponse$=lu,e.DeletePlaceIndex$=_p,e.DeletePlaceIndexCommand=Kh,e.DeletePlaceIndexRequest$=du,e.DeletePlaceIndexResponse$=pu,e.DeleteRouteCalculator$=Gp,e.DeleteRouteCalculatorCommand=Qh,e.DeleteRouteCalculatorRequest$=hu,e.DeleteRouteCalculatorResponse$=mu,e.DeleteTracker$=Fp,e.DeleteTrackerCommand=Zh,e.DeleteTrackerRequest$=gu,e.DeleteTrackerResponse$=fu,e.DescribeGeofenceCollection$=Bp,e.DescribeGeofenceCollectionCommand=Yh,e.DescribeGeofenceCollectionRequest$=yu,e.DescribeGeofenceCollectionResponse$=Su,e.DescribeKey$=zp,e.DescribeKeyCommand=Jh,e.DescribeKeyRequest$=Ru,e.DescribeKeyResponse$=wu,e.DescribeMap$=jp,e.DescribeMapCommand=Xh,e.DescribeMapRequest$=Eu,e.DescribeMapResponse$=Cu,e.DescribePlaceIndex$=Hp,e.DescribePlaceIndexCommand=em,e.DescribePlaceIndexRequest$=vu,e.DescribePlaceIndexResponse$=bu,e.DescribeRouteCalculator$=qp,e.DescribeRouteCalculatorCommand=tm,e.DescribeRouteCalculatorRequest$=Tu,e.DescribeRouteCalculatorResponse$=Pu,e.DescribeTracker$=Vp,e.DescribeTrackerCommand=sm,e.DescribeTrackerRequest$=Iu,e.DescribeTrackerResponse$=Au,e.DevicePosition$=xu,e.DevicePositionUpdate$=Ou,e.DeviceState$=Du,e.DisassociateTrackerConsumer$=Wp,e.DisassociateTrackerConsumerCommand=rm,e.DisassociateTrackerConsumerRequest$=$u,e.DisassociateTrackerConsumerResponse$=Lu,e.ForecastGeofenceEvents$=Kp,e.ForecastGeofenceEventsCommand=nm,e.ForecastGeofenceEventsDeviceState$=Mu,e.ForecastGeofenceEventsRequest$=Nu,e.ForecastGeofenceEventsResponse$=Uu,e.ForecastedEvent$=ku,e.GeoMapsClient=my,e.GeoPlacesClient=vC,e.GeoRoutesClient=Q$,e.GeofenceGeometry$=_u,e.GetDevicePosition$=Qp,e.GetDevicePositionCommand=im,e.GetDevicePositionHistory$=Zp,e.GetDevicePositionHistoryCommand=om,e.GetDevicePositionHistoryRequest$=Gu,e.GetDevicePositionHistoryResponse$=Fu,e.GetDevicePositionRequest$=Bu,e.GetDevicePositionResponse$=zu,e.GetGeofence$=Yp,e.GetGeofenceCommand=am,e.GetGeofenceRequest$=ju,e.GetGeofenceResponse$=Hu,e.GetMapGlyphs$=Jp,e.GetMapGlyphsCommand=cm,e.GetMapGlyphsRequest$=qu,e.GetMapGlyphsResponse$=Vu,e.GetMapSprites$=Xp,e.GetMapSpritesCommand=um,e.GetMapSpritesRequest$=Wu,e.GetMapSpritesResponse$=Ku,e.GetMapStyleDescriptor$=eh,e.GetMapStyleDescriptorCommand=lm,e.GetMapStyleDescriptorRequest$=Qu,e.GetMapStyleDescriptorResponse$=Zu,e.GetMapTile$=th,e.GetMapTileCommand=dm,e.GetMapTileRequest$=Yu,e.GetMapTileResponse$=Ju,e.GetPlace$=sh,e.GetPlaceCommand=pm,e.GetPlaceRequest$=Xu,e.GetPlaceResponse$=el,e.InferredState$=tl,e.InternalServerException=$i,e.InternalServerException$=Ha,e.Leg$=sl,e.LegGeometry$=rl,e.ListDevicePositions$=rh,e.ListDevicePositionsCommand=hm,e.ListDevicePositionsRequest$=nl,e.ListDevicePositionsResponse$=il,e.ListDevicePositionsResponseEntry$=ol,e.ListGeofenceCollections$=nh,e.ListGeofenceCollectionsCommand=mm,e.ListGeofenceCollectionsRequest$=al,e.ListGeofenceCollectionsResponse$=cl,e.ListGeofenceCollectionsResponseEntry$=ul,e.ListGeofenceResponseEntry$=ll,e.ListGeofences$=ih,e.ListGeofencesCommand=gm,e.ListGeofencesRequest$=dl,e.ListGeofencesResponse$=pl,e.ListKeys$=oh,e.ListKeysCommand=fm,e.ListKeysRequest$=hl,e.ListKeysResponse$=ml,e.ListKeysResponseEntry$=gl,e.ListMaps$=ah,e.ListMapsCommand=ym,e.ListMapsRequest$=fl,e.ListMapsResponse$=yl,e.ListMapsResponseEntry$=Sl,e.ListPlaceIndexes$=ch,e.ListPlaceIndexesCommand=Sm,e.ListPlaceIndexesRequest$=Rl,e.ListPlaceIndexesResponse$=wl,e.ListPlaceIndexesResponseEntry$=El,e.ListRouteCalculators$=uh,e.ListRouteCalculatorsCommand=Rm,e.ListRouteCalculatorsRequest$=Cl,e.ListRouteCalculatorsResponse$=vl,e.ListRouteCalculatorsResponseEntry$=bl,e.ListTagsForResource$=lh,e.ListTagsForResourceCommand=wm,e.ListTagsForResourceRequest$=Tl,e.ListTagsForResourceResponse$=Pl,e.ListTrackerConsumers$=dh,e.ListTrackerConsumersCommand=Em,e.ListTrackerConsumersRequest$=Il,e.ListTrackerConsumersResponse$=Al,e.ListTrackers$=ph,e.ListTrackersCommand=Cm,e.ListTrackersRequest$=xl,e.ListTrackersResponse$=Ol,e.ListTrackersResponseEntry$=Dl,e.Location=Qm,e.LocationClient=xh,e.LocationServiceException=xi,e.LocationServiceException$=Fa,e.LteCellDetails$=$l,e.LteLocalId$=Ll,e.LteNetworkMeasurements$=kl,e.MapConfiguration$=Ml,e.MapConfigurationUpdate$=Nl,e.Place$=Ul,e.PlaceGeometry$=_l,e.PositionalAccuracy$=Gl,e.PutGeofence$=hh,e.PutGeofenceCommand=vm,e.PutGeofenceRequest$=Fl,e.PutGeofenceResponse$=Bl,e.ResourceNotFoundException=Ni,e.ResourceNotFoundException$=qa,e.RouteMatrixEntry$=zl,e.RouteMatrixEntryError$=jl,e.SearchForPositionResult$=Hl,e.SearchForSuggestionsResult$=ql,e.SearchForTextResult$=Vl,e.SearchPlaceIndexForPosition$=mh,e.SearchPlaceIndexForPositionCommand=bm,e.SearchPlaceIndexForPositionRequest$=Wl,e.SearchPlaceIndexForPositionResponse$=Kl,e.SearchPlaceIndexForPositionSummary$=Ql,e.SearchPlaceIndexForSuggestions$=gh,e.SearchPlaceIndexForSuggestionsCommand=Tm,e.SearchPlaceIndexForSuggestionsRequest$=Zl,e.SearchPlaceIndexForSuggestionsResponse$=Yl,e.SearchPlaceIndexForSuggestionsSummary$=Jl,e.SearchPlaceIndexForText$=fh,e.SearchPlaceIndexForTextCommand=Pm,e.SearchPlaceIndexForTextRequest$=Xl,e.SearchPlaceIndexForTextResponse$=ed,e.SearchPlaceIndexForTextSummary$=td,e.ServiceQuotaExceededException=Li,e.ServiceQuotaExceededException$=Va,e.Step$=sd,e.TagResource$=yh,e.TagResourceCommand=Im,e.TagResourceRequest$=rd,e.TagResourceResponse$=nd,e.ThrottlingException=ki,e.ThrottlingException$=Wa,e.TimeZone$=id,e.TrackingFilterGeometry$=od,e.TruckDimensions$=ad,e.TruckWeight$=cd,e.UntagResource$=Sh,e.UntagResourceCommand=Am,e.UntagResourceRequest$=ud,e.UntagResourceResponse$=ld,e.UpdateGeofenceCollection$=Rh,e.UpdateGeofenceCollectionCommand=xm,e.UpdateGeofenceCollectionRequest$=dd,e.UpdateGeofenceCollectionResponse$=pd,e.UpdateKey$=wh,e.UpdateKeyCommand=Om,e.UpdateKeyRequest$=hd,e.UpdateKeyResponse$=md,e.UpdateMap$=Eh,e.UpdateMapCommand=Dm,e.UpdateMapRequest$=gd,e.UpdateMapResponse$=fd,e.UpdatePlaceIndex$=Ch,e.UpdatePlaceIndexCommand=$m,e.UpdatePlaceIndexRequest$=yd,e.UpdatePlaceIndexResponse$=Sd,e.UpdateRouteCalculator$=vh,e.UpdateRouteCalculatorCommand=Lm,e.UpdateRouteCalculatorRequest$=Rd,e.UpdateRouteCalculatorResponse$=wd,e.UpdateTracker$=bh,e.UpdateTrackerCommand=km,e.UpdateTrackerRequest$=Ed,e.UpdateTrackerResponse$=Cd,e.ValidationException=Mi,e.ValidationException$=Ka,e.ValidationExceptionField$=vd,e.VerifyDevicePosition$=Th,e.VerifyDevicePositionCommand=Mm,e.VerifyDevicePositionRequest$=bd,e.VerifyDevicePositionResponse$=Td,e.WiFiAccessPoint$=Pd,e.__Client=Zs,e.errorTypeRegistries=Qa,e.fromCognitoIdentity=e=>Ym({...e}),e.fromCognitoIdentityPool=e=>function({accountId:e,cache:t=ng(),client:s,clientConfig:r,customRoleArn:n,identityPoolId:i,logins:o,userIdentifier:a=(o&&0!==Object.keys(o).length?void 0:"ANONYMOUS"),logger:c,parentClientConfig:u}){c?.debug("@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity");const l=a?`aws:cognito-identity-credentials:${i}:${a}`:void 0;let d=async a=>{const{GetIdCommand:p,CognitoIdentityClient:h}=await Promise.resolve().then((function(){return Lk})),m=e=>r?.[e]??u?.[e]??a?.callerClientConfig?.[e],g=s??new h(Object.assign({},r??{},{region:m("region"),profile:m("profile"),userAgentAppId:m("userAgentAppId")}));let f=l&&await t.getItem(l);if(!f){const{IdentityId:s=ig(c)}=await g.send(new p({AccountId:e,IdentityPoolId:i,Logins:o?await Zm(o):void 0}));f=s,l&&Promise.resolve(t.setItem(l,f)).catch((()=>{}))}return d=Ym({client:g,customRoleArn:n,logins:o,identityId:f}),d(a)};return e=>d(e).catch((async e=>{throw l&&Promise.resolve(t.removeItem(l)).catch((()=>{})),e}))}({...e}),e.fromHttp=(e={})=>{let t;e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");const s=e.credentialsFullUri;if(!s)throw new ls("No HTTP credential provider host provided.",{logger:e.logger});t=s;const r=new URL(t);((e,t)=>{if("https:"!==e.protocol&&"169.254.170.2"!==e.hostname&&"169.254.170.23"!==e.hostname&&"[fd00:ec2::23]"!==e.hostname){if(e.hostname.includes("[")){if("[::1]"===e.hostname||"[0000:0000:0000:0000:0000:0000:0000:0001]"===e.hostname)return}else{if("localhost"===e.hostname)return;const t=e.hostname.split("."),s=e=>{const t=parseInt(e,10);return 0<=t&&t<=255};if("127"===t[0]&&s(t[1])&&s(t[2])&&s(t[3])&&4===t.length)return}throw new ls("URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]",{logger:t})}})(r,e.logger);const n=new z;return i=async()=>{const t=function(e){return new o({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce(((e,[t,s])=>(e[t]=s,e)),{}),fragment:e.hash})}(r);return e.authorizationToken&&(t.headers.Authorization=e.authorizationToken),async function(e,t){const s=K(e.body),r=await s.transformToString();if(200===e.statusCode){const e=JSON.parse(r);if("string"!=typeof e.AccessKeyId||"string"!=typeof e.SecretAccessKey||"string"!=typeof e.Token||"string"!=typeof e.Expiration)throw new ls("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:t});return{accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:Ie(e.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let s={};try{s=JSON.parse(r)}catch(e){}throw Object.assign(new ls(`Server responded with status: ${e.statusCode}`,{logger:t}),{Code:s.Code,Message:s.Message})}throw new ls(`Server responded with status: ${e.statusCode}`,{logger:t})}((await n.handle(t)).response)},a=e.maxRetries??3,c=e.timeout??1e3,async()=>{for(let e=0;e<a;++e)try{return await i()}catch(e){await new Promise((e=>setTimeout(e,c)))}return await i()};var i,a,c},e.fromTemporaryCredentials=(e,t,s)=>{let r;return async(n={})=>{const{callerClientConfig:i}=n,o=e.clientConfig?.profile??i?.profile,a=e.logger??i?.logger;a?.debug("@aws-sdk/credential-providers - fromTemporaryCredentials (STS)");const c={...e.params,RoleSessionName:e.params.RoleSessionName??"aws-sdk-js-"+Date.now()};if(c?.SerialNumber){if(!e.mfaCodeProvider)throw new ls("Temporary credential requires multi-factor authentication, but no MFA code callback was provided.",{tryNextLink:!1,logger:a});c.TokenCode=await e.mfaCodeProvider(c?.SerialNumber)}const{AssumeRoleCommand:u,STSClient:l}=await Promise.resolve().then((function(){return oN}));if(!r){const n="function"==typeof t?t():void 0,c=[e.masterCredentials,e.clientConfig?.credentials,void 0,i?.credentialDefaultProvider?.(),n];let u="STS client default credentials";if(c[0])u="options.masterCredentials";else if(c[1])u="options.clientConfig.credentials";else{if(c[2])throw u="caller client's credentials",new Error("fromTemporaryCredentials recursion in callerClientConfig.credentials");c[3]?u="caller client's credentialDefaultProvider":c[4]&&(u="AWS SDK default credentials")}const d=[e.clientConfig?.region,i?.region,await(s?.({profile:o})),"us-east-1"];let p="default partition's default region";d[0]?p="options.clientConfig.region":d[1]?p="caller client's region":d[2]&&(p="file or env region");const h=[og(e.clientConfig?.requestHandler),og(i?.requestHandler)];let m="STS default requestHandler";h[0]?m="options.clientConfig.requestHandler":h[1]&&(m="caller client's requestHandler"),a?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ${p}=${await v(ag(d))()}, ${u}, ${m}.`),r=new l({userAgentAppId:i?.userAgentAppId,...e.clientConfig,credentials:ag(c),logger:a,profile:o,region:ag(d),requestHandler:ag(h)})}if(e.clientPlugins)for(const t of e.clientPlugins)r.middlewareStack.use(t);const{Credentials:d}=await r.send(new u(c));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new ls(`Invalid response from STS.assumeRole call with role ${c.RoleArn}`,{logger:a});return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,credentialScope:d.CredentialScope}}},e.fromWebToken=e=>(e=>async t=>{e.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:s,roleSessionName:r,webIdentityToken:n,providerId:i,policyArns:o,policy:a,durationSeconds:c}=e;let{roleAssumerWithWebIdentity:u}=e;if(!u){const{getDefaultRoleAssumerWithWebIdentity:s}=await Promise.resolve().then((function(){return BU}));u=s({...e.clientConfig,credentialProviderLogger:e.logger,parentClientConfig:{...t?.callerClientConfig,...e.parentClientConfig}},e.clientPlugins)}return u({RoleArn:s,RoleSessionName:r??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:n,ProviderId:i,PolicyArns:o,Policy:a,DurationSeconds:c})})({...e}),e.maps=Cy,e.paginateForecastGeofenceEvents=Nm,e.paginateGetDevicePositionHistory=Um,e.paginateListDevicePositions=_m,e.paginateListGeofenceCollections=Gm,e.paginateListGeofences=Fm,e.paginateListKeys=Bm,e.paginateListMaps=zm,e.paginateListPlaceIndexes=jm,e.paginateListRouteCalculators=Hm,e.paginateListTrackerConsumers=qm,e.paginateListTrackers=Vm,e.places=LC,e.routes=rL,e.withAPIKey=lg.withAPIKey,e.withCredentialProvider=lg.withCredentialProvider,e.withIdentityPoolId=lg.withIdentityPoolId}));