@agentlang/lstudio 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -0
- package/{assets/index-cBigiEzZ.js → dist/assets/index-BQyk5g4a.js} +1 -1
- package/{assets/index-BVDalg8J.js → dist/assets/index-BUSNaVGD.js} +1 -1
- package/{assets/index-CzztApPS.js → dist/assets/index-Blq0zS4y.js} +718 -337
- package/{assets/index-CRBN_oZa.js → dist/assets/index-C2yyIBKa.js} +1 -1
- package/dist/assets/index-DUWxxpyn.css +1 -0
- package/{assets/index.browser-DJzU6L_M.js → dist/assets/index.browser-BPEAfrzQ.js} +3 -3
- package/{assets/loadCognitoIdentity-CJ88jpa8.js → dist/assets/loadCognitoIdentity-CoQHYqh2.js} +1 -1
- package/{assets/loadSts-C3D0kgNq.js → dist/assets/loadSts-C4WH6vaF.js} +1 -1
- package/{assets/replService-zmzywhSy.js → dist/assets/replService-8VoTmR2P.js} +1 -1
- package/{index.html → dist/index.html} +2 -2
- package/dist/package.json +19 -0
- package/package.json +21 -18
- package/assets/index-x3OTdjFX.css +0 -1
- /package/{assets → dist/assets}/__vite-browser-external-BDMct_Gn-FmFgRqLi.js +0 -0
- /package/{assets → dist/assets}/__vite-browser-external-DJy8wZt7.js +0 -0
- /package/{assets → dist/assets}/_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js +0 -0
- /package/{assets → dist/assets}/_commonjs-dynamic-modules-TDtrdbi3.js +0 -0
- /package/{assets → dist/assets}/_commonjsHelpers-B4e78b8K-W3E8ocG7.js +0 -0
- /package/{assets → dist/assets}/_commonjsHelpers-D6-XlEtG.js +0 -0
- /package/{assets → dist/assets}/artificial-intelligence.png +0 -0
- /package/{assets → dist/assets}/auth.png +0 -0
- /package/{assets → dist/assets}/bg-gradient.png +0 -0
- /package/{assets → dist/assets}/favicon.ico +0 -0
- /package/{assets → dist/assets}/fractl-logo-small.png +0 -0
- /package/{assets → dist/assets}/index-69shuAsh-DF18H7zf.js +0 -0
- /package/{assets → dist/assets}/index-6mKfgpcs-DsgiI2lM.js +0 -0
- /package/{assets → dist/assets}/index-BJBOx-Z---hbiLl7B.js +0 -0
- /package/{assets → dist/assets}/index-BOLaQ9_Z.js +0 -0
- /package/{assets → dist/assets}/index-BfpeqTCw.js +0 -0
- /package/{assets → dist/assets}/index-BoNKy6Ic.js +0 -0
- /package/{assets → dist/assets}/index-Bto-kj6R-C0A_3Pwb.js +0 -0
- /package/{assets → dist/assets}/index-Cgd01XOu-DZ3EXoBB.js +0 -0
- /package/{assets → dist/assets}/index-ChvoNxcO.js +0 -0
- /package/{assets → dist/assets}/index-D1jV2j2Y.js +0 -0
- /package/{assets → dist/assets}/index-DIt05veo.js +0 -0
- /package/{assets → dist/assets}/index-DSosZ5sh-Ceejs_jv.js +0 -0
- /package/{assets → dist/assets}/index-DdrtU5Ny-B6H3P3T_.js +0 -0
- /package/{assets → dist/assets}/index-DsIu-45t-Bejjlpz4.js +0 -0
- /package/{assets → dist/assets}/index-Dy4QD7s1-DSfoLCzX.js +0 -0
- /package/{assets → dist/assets}/index-KGBiLwKE-Doz2tX9S.js +0 -0
- /package/{assets → dist/assets}/index-Ynim4IDh.js +0 -0
- /package/{assets → dist/assets}/index.browser-BHPvGrwi-6Mh8eUw-.js +0 -0
- /package/{assets → dist/assets}/inherits_browser-5Fj3Mjxs.js +0 -0
- /package/{assets → dist/assets}/inherits_browser-nmOknR35-Bp0mvRSL.js +0 -0
- /package/{assets → dist/assets}/normalizeProvider-BrOPyH3l.js +0 -0
- /package/{assets → dist/assets}/preload-helper-BlTxHScW.js +0 -0
- /package/{assets → dist/assets}/util-CNqBjtt6-GUXK7Yxz.js +0 -0
- /package/{assets → dist/assets}/util-DZRIOW0Z-CproX86h.js +0 -0
- /package/{assets → dist/assets}/util-qaS8mbUT.js +0 -0
- /package/{assets → dist/assets}/winston-D0VJZ3P8-x1CFZMA0.js +0 -0
- /package/{assets → dist/assets}/winston-D1zwHYTY-CkaOApIk.js +0 -0
- /package/{assets → dist/assets}/winston-D8lBg2T-.js +0 -0
- /package/{assets → dist/assets}/winston-DaXMbKRs.js +0 -0
- /package/{fonts → dist/fonts}/red-hat.tff +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BoNKy6Ic.js","assets/normalizeProvider-BrOPyH3l.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{f as K,d as ht,a as ft,t as pt,c as ye,H as I,b as O,j as mt,k as W}from"./normalizeProvider-BrOPyH3l.js";import{_ as gt}from"./preload-helper-BlTxHScW.js";import{_ as yt,a as wt}from"./index-
|
|
2
|
+
import{f as K,d as ht,a as ft,t as pt,c as ye,H as I,b as O,j as mt,k as W}from"./normalizeProvider-BrOPyH3l.js";import{_ as gt}from"./preload-helper-BlTxHScW.js";import{_ as yt,a as wt}from"./index-Blq0zS4y.js";const St=(t,e,r)=>{let s,n,i,a=!1;const u=async()=>{n||(n=t());try{s=await n,i=!0,a=!1}finally{n=void 0}return s};return async o=>((!i||o?.forceRefresh)&&(s=await u()),s)},sn=t=>({setHttpHandler(e){t.httpHandler=e},httpHandler(){return t.httpHandler},updateHttpClientConfig(e,r){t.httpHandler?.updateHttpClientConfig(e,r)},httpHandlerConfigs(){return t.httpHandler.httpHandlerConfigs()}}),nn=t=>({httpHandler:t.httpHandler()});var U;(function(t){t.HTTP="http",t.HTTPS="https"})(U||(U={}));var X;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(X||(X={}));const ue="__smithy_context",z=t=>typeof t=="string"?K(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),M=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const s of e)r.push(s);return r},A=(t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,J=()=>{let t=[],e=[],r=!1;const s=new Set,n=c=>c.sort((d,h)=>Ee[h.step]-Ee[d.step]||ve[h.priority||"normal"]-ve[d.priority||"normal"]),i=c=>{let d=!1;const h=m=>{const g=M(m.name,m.aliases);if(g.includes(c)){d=!0;for(const f of g)s.delete(f);return!1}return!0};return t=t.filter(h),e=e.filter(h),d},a=c=>{let d=!1;const h=m=>{if(m.middleware===c){d=!0;for(const g of M(m.name,m.aliases))s.delete(g);return!1}return!0};return t=t.filter(h),e=e.filter(h),d},u=c=>(t.forEach(d=>{c.add(d.middleware,{...d})}),e.forEach(d=>{c.addRelativeTo(d.middleware,{...d})}),c.identifyOnResolve?.(p.identifyOnResolve()),c),o=c=>{const d=[];return c.before.forEach(h=>{h.before.length===0&&h.after.length===0?d.push(h):d.push(...o(h))}),d.push(c),c.after.reverse().forEach(h=>{h.before.length===0&&h.after.length===0?d.push(h):d.push(...o(h))}),d},l=(c=!1)=>{const d=[],h=[],m={};return t.forEach(f=>{const y={...f,before:[],after:[]};for(const w of M(y.name,y.aliases))m[w]=y;d.push(y)}),e.forEach(f=>{const y={...f,before:[],after:[]};for(const w of M(y.name,y.aliases))m[w]=y;h.push(y)}),h.forEach(f=>{if(f.toMiddleware){const y=m[f.toMiddleware];if(y===void 0){if(c)return;throw new Error(`${f.toMiddleware} is not found when adding ${A(f.name,f.aliases)} middleware ${f.relation} ${f.toMiddleware}`)}f.relation==="after"&&y.after.push(f),f.relation==="before"&&y.before.push(f)}}),n(d).map(o).reduce((f,y)=>(f.push(...y),f),[])},p={add:(c,d={})=>{const{name:h,override:m,aliases:g}=d,f={step:"initialize",priority:"normal",middleware:c,...d},y=M(h,g);if(y.length>0){if(y.some(w=>s.has(w))){if(!m)throw new Error(`Duplicate middleware name '${A(h,g)}'`);for(const w of y){const T=t.findIndex(k=>k.name===w||k.aliases?.some(Z=>Z===w));if(T===-1)continue;const b=t[T];if(b.step!==f.step||f.priority!==b.priority)throw new Error(`"${A(b.name,b.aliases)}" middleware with ${b.priority} priority in ${b.step} step cannot be overridden by "${A(h,g)}" middleware with ${f.priority} priority in ${f.step} step.`);t.splice(T,1)}}for(const w of y)s.add(w)}t.push(f)},addRelativeTo:(c,d)=>{const{name:h,override:m,aliases:g}=d,f={middleware:c,...d},y=M(h,g);if(y.length>0){if(y.some(w=>s.has(w))){if(!m)throw new Error(`Duplicate middleware name '${A(h,g)}'`);for(const w of y){const T=e.findIndex(k=>k.name===w||k.aliases?.some(Z=>Z===w));if(T===-1)continue;const b=e[T];if(b.toMiddleware!==f.toMiddleware||b.relation!==f.relation)throw new Error(`"${A(b.name,b.aliases)}" middleware ${b.relation} "${b.toMiddleware}" middleware cannot be overridden by "${A(h,g)}" middleware ${f.relation} "${f.toMiddleware}" middleware.`);e.splice(T,1)}}for(const w of y)s.add(w)}e.push(f)},clone:()=>u(J()),use:c=>{c.applyToStack(p)},remove:c=>typeof c=="string"?i(c):a(c),removeByTag:c=>{let d=!1;const h=m=>{const{tags:g,name:f,aliases:y}=m;if(g&&g.includes(c)){const w=M(f,y);for(const T of w)s.delete(T);return d=!0,!1}return!0};return t=t.filter(h),e=e.filter(h),d},concat:c=>{const d=u(J());return d.use(c),d.identifyOnResolve(r||d.identifyOnResolve()||(c.identifyOnResolve?.()??!1)),d},applyToStack:u,identify:()=>l(!0).map(c=>{const d=c.step??c.relation+" "+c.toMiddleware;return A(c.name,c.aliases)+" - "+d}),identifyOnResolve(c){return typeof c=="boolean"&&(r=c),r},resolve:(c,d)=>{for(const h of l().map(m=>m.middleware).reverse())c=h(c,d);return r&&console.log(p.identify()),c}};return p},Ee={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},ve={high:3,normal:2,low:1};class an{config;middlewareStack=J();initConfig;handlers;constructor(e){this.config=e}send(e,r,s){const n=typeof r!="function"?r:void 0,i=typeof r=="function"?r:s,a=n===void 0&&this.config.cacheMiddleware===!0;let u;if(a){this.handlers||(this.handlers=new WeakMap);const o=this.handlers;o.has(e.constructor)?u=o.get(e.constructor):(u=e.resolveMiddleware(this.middlewareStack,this.config,n),o.set(e.constructor,u))}else delete this.handlers,u=e.resolveMiddleware(this.middlewareStack,this.config,n);if(i)u(e).then(o=>i(null,o.output),o=>i(o)).catch(()=>{});else return u(e).then(o=>o.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class P extends Uint8Array{static fromString(e,r="utf-8"){if(typeof e=="string")return r==="base64"?P.mutate(ht(e)):P.mutate(K(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,P.prototype),e}transformToString(e="utf-8"){return e==="base64"?ft(this):pt(this)}}const Te=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return P.mutate(t);if(!t)return P.mutate(new Uint8Array);const r=e.streamCollector(t);return P.mutate(await r)},ee=t=>typeof t=="function"?t():t,j=t=>t[ue]||(t[ue]={}),$=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},ze=(t,e,r,s,n)=>({name:e,namespace:t,traits:r,input:s,output:n}),bt=t=>(e,r)=>async s=>{const{response:n}=await e(s),{operationSchema:i}=j(r),[,a,u,o,l,p]=i??[];try{const c=await t.protocol.deserializeResponse(ze(a,u,o,l,p),{...t,...r},n);return{response:n,output:c}}catch(c){if(Object.defineProperty(c,"$response",{value:n,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in c)){const d="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{c.message+=`
|
|
3
3
|
`+d}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(d):r.logger?.warn?.(d)}typeof c.$responseBodyText<"u"&&c.$response&&(c.$response.body=c.$responseBodyText);try{if(ye.isInstance(n)){const{headers:h={}}=n,m=Object.entries(h);c.$metadata={httpStatusCode:n.statusCode,requestId:te(/^x-[\w-]+-request-?id$/,m),extendedRequestId:te(/^x-[\w-]+-id-2$/,m),cfId:te(/^x-[\w-]+-cf-id$/,m)}}}catch{}}throw c}},te=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],Rt=t=>(e,r)=>async s=>{const{operationSchema:n}=j(r),[,i,a,u,o,l]=n??[],p=r.endpointV2?.url&&t.urlParser?async()=>t.urlParser(r.endpointV2.url):t.endpoint,c=await t.protocol.serializeRequest(ze(i,a,u,o,l),s.input,{...t,...r,endpoint:p});return e({...s,request:c})},Et={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},vt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function on(t){return{applyToStack:e=>{e.add(Rt(t),vt),e.add(bt(t),Et),t.protocol.setSerdeContext(t)}}}function L(t){if(typeof t=="object")return t;t=t|0;const e={};let r=0;for(const s of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(t>>r++&1)===1&&(e[s]=1);return e}class v{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=v.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,r){this.ref=e,this.memberName=r;const s=[];let n=e,i=e;for(this._isMemberSchema=!1;re(n);)s.push(n[1]),n=n[0],i=ee(n),this._isMemberSchema=!0;if(s.length>0){this.memberTraits={};for(let a=s.length-1;a>=0;--a){const u=s[a];Object.assign(this.memberTraits,L(u))}}else this.memberTraits=0;if(i instanceof v){const a=this.memberTraits;Object.assign(this,i),this.memberTraits=Object.assign({},a,i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??i.memberName;return}if(this.schema=ee(i),Tt(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(i),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const r=this.prototype.isPrototypeOf(e);return!r&&typeof e=="object"&&e!==null?e.symbol===this.symbol:r}static of(e){const r=ee(e);if(r instanceof v)return r;if(re(r)){const[s,n]=r;if(s instanceof v)return Object.assign(s.getMergedTraits(),L(n)),s;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}return new v(r)}getSchema(){const e=this.schema;return e[0]===0?e[4]:e}getName(e=!1){const{name:r}=this;return!e&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return typeof e=="number"?e>=64&&e<128:e[0]===1}isMapSchema(){const e=this.getSchema();return typeof e=="number"?e>=128&&e<=255:e[0]===2}isStructSchema(){const e=this.getSchema();return e[0]===3||e[0]===-3}isBlobSchema(){const e=this.getSchema();return e===21||e===42}isTimestampSchema(){const e=this.getSchema();return typeof e=="number"&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){const e=i=>(i&4)===4||!!i?.idempotencyToken,{normalizedTraits:r,traits:s,memberTraits:n}=this;return e(r)||e(s)||e(n)}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return L(this.memberTraits)}getOwnTraits(){return L(this.traits)}getKeySchema(){const[e,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const s=this.getSchema(),n=e?15:s[4]??0;return _([n,0],"key")}getValueSchema(){const e=this.getSchema(),[r,s,n]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i=typeof e=="number"?63&e:e&&typeof e=="object"&&(s||n)?e[3+e[0]]:r?15:void 0;if(i!=null)return _([i,0],s?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const r=this.getSchema();if(this.isStructSchema()&&r[4].includes(e)){const s=r[4].indexOf(e),n=r[5][s];return _(re(n)?n:[n,0],e)}if(this.isDocumentSchema())return _([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[r,s]of this.structIterator())e[r]=s}catch{}return e}getEventStreamMember(){if(this.isStructSchema()){for(const[e,r]of this.structIterator())if(r.isStreaming()&&r.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();for(let r=0;r<e[4].length;++r)yield[e[4][r],_([e[5][r],0],e[4][r])]}}function _(t,e){if(t instanceof v)return Object.assign(t,{memberName:e,_isMemberSchema:!0});const r=v;return new r(t,e)}const re=t=>Array.isArray(t)&&t.length===2,Tt=t=>Array.isArray(t)&&t.length>=5;class x{namespace;schemas;exceptions;static registries=new Map;constructor(e,r=new Map,s=new Map){this.namespace=e,this.schemas=r,this.exceptions=s}static for(e){return x.registries.has(e)||x.registries.set(e,new x(e)),x.registries.get(e)}register(e,r){const s=this.normalizeShapeId(e);x.for(s.split("#")[0]).schemas.set(s,r)}getSchema(e){const r=this.normalizeShapeId(e);if(!this.schemas.has(r))throw new Error(`@smithy/core/schema - schema not found for ${r}`);return this.schemas.get(r)}registerError(e,r){const s=e,n=x.for(s[1]);n.schemas.set(s[1]+"#"+s[2],s),n.exceptions.set(s,r)}getErrorCtor(e){const r=e;return x.for(r[1]).exceptions.get(r)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,r,s]=e,n=r+"#"+s;if(n.startsWith("smithy.ts.sdk.synthetic.")&&n.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 Ae=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),S=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0")),At=()=>{if(Ae)return Ae();const t=new Uint8Array(16);return crypto.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128,S[t[0]]+S[t[1]]+S[t[2]]+S[t[3]]+"-"+S[t[4]]+S[t[5]]+"-"+S[t[6]]+S[t[7]]+"-"+S[t[8]]+S[t[9]]+"-"+S[t[10]]+S[t[11]]+S[t[12]]+S[t[13]]+S[t[14]]+S[t[15]]},N=function(e){return Object.assign(new String(e),{deserializeJSON(){return JSON.parse(String(e))},toString(){return String(e)},toJSON(){return String(e)}})};N.from=t=>t&&typeof t=="object"&&(t instanceof N||"deserializeJSON"in t)?t:typeof t=="string"||Object.getPrototypeOf(t)===String.prototype?N(String(t)):N(JSON.stringify(t));N.fromObject=N.from;const xe=/^-?\d*(\.\d+)?$/;class Be{string;type;constructor(e,r){if(this.string=e,this.type=r,!xe.test(e))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||typeof e!="object")return!1;const r=e;return Be.prototype.isPrototypeOf(e)||r.type==="bigDecimal"&&xe.test(r.string)}}class xt{serdeContext;setSerdeContext(e){this.serdeContext=e}}class Ct extends xt{options;constructor(e){super(),this.options=e}getRequestType(){return I}getResponseType(){return ye}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,r){if("url"in r){e.protocol=r.url.protocol,e.hostname=r.url.hostname,e.port=r.url.port?Number(r.url.port):void 0,e.path=r.url.pathname,e.fragment=r.url.hash||void 0,e.username=r.url.username||void 0,e.password=r.url.password||void 0,e.query||(e.query={});for(const[s,n]of r.url.searchParams.entries())e.query[s]=n;return e}else return e.protocol=r.protocol,e.hostname=r.hostname,e.port=r.port?Number(r.port):void 0,e.path=r.path,e.query={...r.query},e}setHostPrefix(e,r,s){const n=v.of(r.input),i=L(r.traits??{});if(i.endpoint){let a=i.endpoint?.[0];if(typeof a=="string"){const u=[...n.structIterator()].filter(([,o])=>o.getMergedTraits().hostLabel);for(const[o]of u){const l=s[o];if(typeof l!="string")throw new Error(`@smithy/core/schema - ${o} in input must be a string as hostLabel.`);a=a.replace(`{${o}}`,l)}e.hostname=a+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:r,initialRequest:s}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:r,initialRequest:s})}async deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:s}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:r,initialResponseContainer:s})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await gt(async()=>{const{EventStreamSerde:r}=await import("./index-BoNKy6Ic.js");return{EventStreamSerde:r}},__vite__mapDeps([0,1]));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,r,s,n,i){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class cn extends Ct{async serializeRequest(e,r,s){const n=this.serializer,i={},a={},u=await s.endpoint(),o=v.of(e?.input),l=o.getSchema();let p;const c=new I({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:i,headers:a,body:void 0});u&&(this.updateServiceEndpoint(c,u),this.setHostPrefix(c,e,r));const d={...r};if(r){const h=o.getEventStreamMember();if(h){if(d[h]){const m={};for(const[g,f]of o.structIterator())g!==h&&d[g]&&(n.write(f,d[g]),m[g]=n.flush());p=await this.serializeEventStream({eventStream:d[h],requestSchema:o,initialRequest:m})}}else n.write(l,d),p=n.flush()}return c.headers=a,c.query=i,c.body=p,c.method="POST",c}async deserializeResponse(e,r,s){const n=this.deserializer,i=v.of(e.output),a={};if(s.statusCode>=300){const o=await Te(s.body,r);throw o.byteLength>0&&Object.assign(a,await n.read(15,o)),await this.handleError(e,r,s,a,this.deserializeMetadata(s)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const o in s.headers){const l=s.headers[o];delete s.headers[o],s.headers[o.toLowerCase()]=l}const u=i.getEventStreamMember();if(u)a[u]=await this.deserializeEventStream({response:s,responseSchema:i,initialResponseContainer:a});else{const o=await Te(s.body,r);o.byteLength>0&&Object.assign(a,await n.read(i,o))}return a.$metadata=this.deserializeMetadata(s),a}}function un(t,e){if(e.timestampFormat.useTrait&&t.isTimestampSchema()&&(t.getSchema()===5||t.getSchema()===6||t.getSchema()===7))return t.getSchema();const{httpLabel:r,httpPrefixHeaders:s,httpHeader:n,httpQuery:i}=t.getMergedTraits();return(e.httpBindings?typeof s=="string"||n?6:i||r?5:void 0:void 0)??e.timestampFormat.default}const se="***SensitiveInformation***";function de(t,e){if(e==null)return e;const r=v.of(t);if(r.getMergedTraits().sensitive)return se;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return se}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return se}else if(r.isStructSchema()&&typeof e=="object"){const s=e,n={};for(const[i,a]of r.structIterator())s[i]!=null&&(n[i]=de(a,s[i]));return n}return e}class It{middlewareStack=J();schema;static classBuilder(){return new Mt}resolveMiddlewareWithContext(e,r,s,{middlewareFn:n,clientName:i,commandName:a,inputFilterSensitiveLog:u,outputFilterSensitiveLog:o,smithyContext:l,additionalContext:p,CommandCtor:c}){for(const f of n.bind(this)(c,e,r,s))this.middlewareStack.use(f);const d=e.concat(this.middlewareStack),{logger:h}=r,m={logger:h,clientName:i,commandName:a,inputFilterSensitiveLog:u,outputFilterSensitiveLog:o,[ue]:{commandInstance:this,...l},...p},{requestHandler:g}=r;return d.resolve(f=>g.handle(f.request,s||{}),m)}}class Mt{_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,r,s={}){return this._smithyContext={service:e,operation:r,...s},this}c(e={}){return this._additionalContext=e,this}n(e,r){return this._clientName=e,this._commandName=r,this}f(e=s=>s,r=s=>s){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=r,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 r;return r=class extends It{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[s]){super(),this.input=s??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(s,n,i){const a=e._operationSchema,u=a?.[4]??a?.input,o=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(s,n,i,{CommandCtor:r,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(a?de.bind(null,u):l=>l),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(a?de.bind(null,o):l=>l),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}class H 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 r=e;return H.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;const r=e;return this===H?H.isInstance(e):H.isInstance(e)?r.name&&this.name?this.prototype.isPrototypeOf(e)||r.name===this.name:this.prototype.isPrototypeOf(e):!1}}const dn=(t,e={})=>{Object.entries(e).filter(([,s])=>s!==void 0).forEach(([s,n])=>{(t[s]==null||t[s]==="")&&(t[s]=n)});const r=t.message||t.Message||"UnknownError";return t.message=r,delete t.Message,t},ln=t=>{switch(t){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},Ot=t=>{const e=[];for(const r in X){const s=X[r];t[s]!==void 0&&e.push({algorithmId:()=>s,checksumConstructor:()=>t[s]})}return{addChecksumAlgorithm(r){e.push(r)},checksumAlgorithms(){return e}}},Pt=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},$t=t=>({setRetryStrategy(e){t.retryStrategy=e},retryStrategy(){return t.retryStrategy}}),Nt=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},hn=t=>Object.assign(Ot(t),$t(t)),fn=t=>Object.assign(Pt(t),Nt(t));class Dt{trace(){}debug(){}info(){}warn(){}error(){}}const kt=(t,e)=>{if(!e||e.length===0)return t;const r=[];for(const s of e)for(const n of t)n.schemeId.split("#")[1]===s&&r.push(n);for(const s of t)r.find(({schemeId:n})=>n===s.schemeId)||r.push(s);return r};function _t(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const Lt=(t,e)=>(r,s)=>async n=>{const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,s,n.input)),a=t.authSchemePreference?await t.authSchemePreference():[],u=kt(i,a),o=_t(t.httpAuthSchemes),l=j(s),p=[];for(const c of u){const d=o.get(c.schemeId);if(!d){p.push(`HttpAuthScheme \`${c.schemeId}\` was not enabled for this service.`);continue}const h=d.identityProvider(await e.identityProviderConfigProvider(t));if(!h){p.push(`HttpAuthScheme \`${c.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:m={},signingProperties:g={}}=c.propertiesExtractor?.(t,s)||{};c.identityProperties=Object.assign(c.identityProperties||{},m),c.signingProperties=Object.assign(c.signingProperties||{},g),l.selectedHttpAuthScheme={httpAuthOption:c,identity:await h(c.identityProperties),signer:d.signer};break}if(!l.selectedHttpAuthScheme)throw new Error(p.join(`
|
|
4
4
|
`));return r(n)},Ht={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},pn=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:s=>{s.addRelativeTo(Lt(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Ht)}}),Ut={name:"serializerMiddleware"},zt=t=>e=>{throw e},Bt=(t,e)=>{},Ft=t=>(e,r)=>async s=>{if(!I.isInstance(s.request))return e(s);const i=j(r).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:u,signer:o}=i,l=await e({...s,request:await o.sign(s.request,u,a)}).catch((o.errorHandler||zt)(a));return(o.successHandler||Bt)(l.response,a),l},jt={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},mn=t=>({applyToStack:e=>{e.addRelativeTo(Ft(),jt)}});function qt(t,e,r){t.__smithy_context?t.__smithy_context.features||(t.__smithy_context.features={}):t.__smithy_context={features:{}},t.__smithy_context.features[e]=r}class gn{authSchemes=new Map;constructor(e){for(const[r,s]of Object.entries(e))s!==void 0&&this.authSchemes.set(r,s)}getIdentityProvider(e){return this.authSchemes.get(e)}}class yn{async sign(e,r,s){return e}}const Wt=t=>function(r){return Vt(r)&&r.expiration.getTime()-Date.now()<t},Gt=3e5,wn=Wt(Gt),Vt=t=>t.expiration!==void 0,Sn=(t,e,r)=>{if(t===void 0)return;const s=typeof t!="function"?async()=>Promise.resolve(t):t;let n,i,a,u=!1;const o=async l=>{i||(i=s(l));try{n=await i,a=!0,u=!1}finally{i=void 0}return n};return e===void 0?async l=>((!a||l?.forceRefresh)&&(n=await o(l)),n):async l=>((!a||l?.forceRefresh)&&(n=await o(l)),u?n:r(n)?(e(n)&&await o(l),n):(u=!0,n))};function bn(t){return t}const Kt=t=>e=>async r=>{if(!I.isInstance(r.request))return e(r);const{request:s}=r,{handlerProtocol:n=""}=t.requestHandler.metadata||{};if(n.indexOf("h2")>=0&&!s.headers[":authority"])delete s.headers.host,s.headers[":authority"]=s.hostname+(s.port?":"+s.port:"");else if(!s.headers.host){let i=s.hostname;s.port!=null&&(i+=`:${s.port}`),s.headers.host=i}return e(r)},Xt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Rn=t=>({applyToStack:e=>{e.add(Kt(t),Xt)}}),Jt=()=>(t,e)=>async r=>{try{const s=await t(r),{clientName:n,commandName:i,logger:a,dynamoDbDocumentClientOptions:u={}}=e,{overrideInputFilterSensitiveLog:o,overrideOutputFilterSensitiveLog:l}=u,p=o??e.inputFilterSensitiveLog,c=l??e.outputFilterSensitiveLog,{$metadata:d,...h}=s.output;return a?.info?.({clientName:n,commandName:i,input:p(r.input),output:c(h),metadata:d}),s}catch(s){const{clientName:n,commandName:i,logger:a,dynamoDbDocumentClientOptions:u={}}=e,{overrideInputFilterSensitiveLog:o}=u,l=o??e.inputFilterSensitiveLog;throw a?.error?.({clientName:n,commandName:i,input:l(r.input),error:s,metadata:s.$metadata}),s}},Qt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},En=t=>({applyToStack:e=>{e.add(Jt(),Qt)}}),Yt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},Zt=()=>t=>async e=>t(e),vn=t=>({applyToStack:e=>{e.add(Zt(),Yt)}});class Tn{capacity;data=new Map;parameters=[];constructor({size:e,params:r}){this.capacity=e??50,r&&(this.parameters=r)}get(e,r){const s=this.hash(e);if(s===!1)return r();if(!this.data.has(s)){if(this.data.size>this.capacity+10){const n=this.data.keys();let i=0;for(;;){const{value:a,done:u}=n.next();if(this.data.delete(a),u||++i>10)break}}this.data.set(s,r())}return this.data.get(s)}size(){return this.data.size}hash(e){let r="";const{parameters:s}=this;if(s.length===0)return!1;for(const n of s){const i=String(e[n]??"");if(i.includes("|;"))return!1;r+=i+"|;"}return r}}const er=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}$"),Fe=t=>er.test(t)||t.startsWith("[")&&t.endsWith("]"),tr=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Q=(t,e=!1)=>{if(!e)return tr.test(t);const r=t.split(".");for(const s of r)if(!Q(s))return!1;return!0},le={},B="endpoints";function C(t){return typeof t!="object"||t==null?t:"ref"in t?`$${C(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(C).join(", ")})`:JSON.stringify(t,null,2)}class R extends Error{constructor(e){super(e),this.name="EndpointError"}}const rr=(t,e)=>t===e,sr=t=>{const e=t.split("."),r=[];for(const s of e){const n=s.indexOf("[");if(n!==-1){if(s.indexOf("]")!==s.length-1)throw new R(`Path: '${t}' does not end with ']'`);const i=s.slice(n+1,-1);if(Number.isNaN(parseInt(i)))throw new R(`Invalid array index: '${i}' in path: '${t}'`);n!==0&&r.push(s.slice(0,n)),r.push(i)}else r.push(s)}return r},je=(t,e)=>sr(e).reduce((r,s)=>{if(typeof r!="object")throw new R(`Index '${s}' in '${e}' not found in '${JSON.stringify(t)}'`);return Array.isArray(r)?r[parseInt(s)]:r[s]},t),nr=t=>t!=null,ir=t=>!t,ne={[U.HTTP]:80,[U.HTTPS]:443},ar=t=>{const e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){const{hostname:d,port:h,protocol:m="",path:g="",query:f={}}=t,y=new URL(`${m}//${d}${h?`:${h}`:""}${g}`);return y.search=Object.entries(f).map(([w,T])=>`${w}=${T}`).join("&"),y}return new URL(t)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(t)} as a whatwg URL.`),null;const r=e.href,{host:s,hostname:n,pathname:i,protocol:a,search:u}=e;if(u)return null;const o=a.slice(0,-1);if(!Object.values(U).includes(o))return null;const l=Fe(n),p=r.includes(`${s}:${ne[o]}`)||typeof t=="string"&&t.includes(`${s}:${ne[o]}`),c=`${s}${p?`:${ne[o]}`:""}`;return{scheme:o,authority:c,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:l}},or=(t,e)=>t===e,cr=(t,e,r,s)=>e>=r||t.length<r?null:s?t.substring(t.length-r,t.length-e):t.substring(e,r),ur=t=>encodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),dr={booleanEquals:rr,getAttr:je,isSet:nr,isValidHostLabel:Q,not:ir,parseURL:ar,stringEquals:or,substring:cr,uriEncode:ur},qe=(t,e)=>{const r=[],s={...e.endpointParams,...e.referenceRecord};let n=0;for(;n<t.length;){const i=t.indexOf("{",n);if(i===-1){r.push(t.slice(n));break}r.push(t.slice(n,i));const a=t.indexOf("}",i);if(a===-1){r.push(t.slice(i));break}t[i+1]==="{"&&t[a+1]==="}"&&(r.push(t.slice(i+1,a)),n=a+2);const u=t.substring(i+1,a);if(u.includes("#")){const[o,l]=u.split("#");r.push(je(s[o],l))}else r.push(s[u]);n=a+1}return r.join("")},lr=({ref:t},e)=>({...e.endpointParams,...e.referenceRecord})[t],Y=(t,e,r)=>{if(typeof t=="string")return qe(t,r);if(t.fn)return Ge.callFunction(t,r);if(t.ref)return lr(t,r);throw new R(`'${e}': ${String(t)} is not a string, function or reference.`)},We=({fn:t,argv:e},r)=>{const s=e.map(i=>["boolean","number"].includes(typeof i)?i:Ge.evaluateExpression(i,"arg",r)),n=t.split(".");return n[0]in le&&n[1]!=null?le[n[0]][n[1]](...s):dr[t](...s)},Ge={evaluateExpression:Y,callFunction:We},hr=({assign:t,...e},r)=>{if(t&&t in r.referenceRecord)throw new R(`'${t}' is already defined in Reference Record.`);const s=We(e,r);return r.logger?.debug?.(`${B} evaluateCondition: ${C(e)} = ${C(s)}`),{result:s===""?!0:!!s,...t!=null&&{toAssign:{name:t,value:s}}}},we=(t=[],e)=>{const r={};for(const s of t){const{result:n,toAssign:i}=hr(s,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!n)return{result:n};i&&(r[i.name]=i.value,e.logger?.debug?.(`${B} assign: ${i.name} := ${C(i.value)}`))}return{result:!0,referenceRecord:r}},fr=(t,e)=>Object.entries(t).reduce((r,[s,n])=>({...r,[s]:n.map(i=>{const a=Y(i,"Header value entry",e);if(typeof a!="string")throw new R(`Header '${s}' value '${a}' is not a string`);return a})}),{}),Ve=(t,e)=>Object.entries(t).reduce((r,[s,n])=>({...r,[s]:Xe.getEndpointProperty(n,e)}),{}),Ke=(t,e)=>{if(Array.isArray(t))return t.map(r=>Ke(r,e));switch(typeof t){case"string":return qe(t,e);case"object":if(t===null)throw new R(`Unexpected endpoint property: ${t}`);return Xe.getEndpointProperties(t,e);case"boolean":return t;default:throw new R(`Unexpected endpoint property type: ${typeof t}`)}},Xe={getEndpointProperty:Ke,getEndpointProperties:Ve},pr=(t,e)=>{const r=Y(t,"Endpoint URL",e);if(typeof r=="string")try{return new URL(r)}catch(s){throw console.error(`Failed to construct URL with ${r}`,s),s}throw new R(`Endpoint URL must be a string, got ${typeof r}`)},mr=(t,e)=>{const{conditions:r,endpoint:s}=t,{result:n,referenceRecord:i}=we(r,e);if(!n)return;const a={...e,referenceRecord:{...e.referenceRecord,...i}},{url:u,properties:o,headers:l}=s;return e.logger?.debug?.(`${B} Resolving endpoint from template: ${C(s)}`),{...l!=null&&{headers:fr(l,a)},...o!=null&&{properties:Ve(o,a)},url:pr(u,a)}},gr=(t,e)=>{const{conditions:r,error:s}=t,{result:n,referenceRecord:i}=we(r,e);if(n)throw new R(Y(s,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},Je=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const s=mr(r,e);if(s)return s}else if(r.type==="error")gr(r,e);else if(r.type==="tree"){const s=Qe.evaluateTreeRule(r,e);if(s)return s}else throw new R(`Unknown endpoint rule: ${r}`);throw new R("Rules evaluation failed")},yr=(t,e)=>{const{conditions:r,rules:s}=t,{result:n,referenceRecord:i}=we(r,e);if(n)return Qe.evaluateRules(s,{...e,referenceRecord:{...e.referenceRecord,...i}})},Qe={evaluateRules:Je,evaluateTreeRule:yr},An=(t,e)=>{const{endpointParams:r,logger:s}=e,{parameters:n,rules:i}=t;e.logger?.debug?.(`${B} Initial EndpointParams: ${C(r)}`);const a=Object.entries(n).filter(([,l])=>l.default!=null).map(([l,p])=>[l,p.default]);if(a.length>0)for(const[l,p]of a)r[l]=r[l]??p;const u=Object.entries(n).filter(([,l])=>l.required).map(([l])=>l);for(const l of u)if(r[l]==null)throw new R(`Missing required parameter: '${l}'`);const o=Je(i,{endpointParams:r,logger:s,referenceRecord:{}});return e.logger?.debug?.(`${B} Resolved endpoint: ${C(o)}`),o},Ye=(t,e=!1)=>{if(e){for(const r of t.split("."))if(!Ye(r))return!1;return!0}return!(!Q(t)||t.length<3||t.length>63||t!==t.toLowerCase()||Fe(t))},Ce=":",wr="/",Sr=t=>{const e=t.split(Ce);if(e.length<6)return null;const[r,s,n,i,a,...u]=e;if(r!=="arn"||s===""||n===""||u.join(Ce)==="")return null;const o=u.map(l=>l.split(wr)).flat();return{partition:s,service:n,region:i,accountId:a,resourceId:o}},br=[{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:"EU (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)"}}}],Rr={partitions:br};let Er=Rr;const vr=t=>{const{partitions:e}=Er;for(const s of e){const{regions:n,outputs:i}=s;for(const[a,u]of Object.entries(n))if(a===t)return{...i,...u}}for(const s of e){const{regionRegex:n,outputs:i}=s;if(new RegExp(n).test(t))return{...i}}const r=e.find(s=>s.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},Tr={isVirtualHostableS3Bucket:Ye,parseArn:Sr,partition:vr};le.aws=Tr;function Ar(t){const e={};if(t=t.replace(/^\?/,""),t)for(const r of t.split("&")){let[s,n=null]=r.split("=");s=decodeURIComponent(s),n&&(n=decodeURIComponent(n)),s in e?Array.isArray(e[s])?e[s].push(n):e[s]=[e[s],n]:e[s]=n}return e}const he=t=>{if(typeof t=="string")return he(new URL(t));const{hostname:e,pathname:r,port:s,protocol:n,search:i}=t;let a;return i&&(a=Ar(i)),{hostname:e,port:s?parseInt(s):void 0,protocol:n,path:r,query:a}},xr="X-Amz-Algorithm",Cr="X-Amz-Credential",Ze="X-Amz-Date",Ir="X-Amz-SignedHeaders",Mr="X-Amz-Expires",et="X-Amz-Signature",tt="X-Amz-Security-Token",rt="authorization",st=Ze.toLowerCase(),Or="date",Pr=[rt,st,Or],$r=et.toLowerCase(),fe="x-amz-content-sha256",Nr=tt.toLowerCase(),Dr={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},kr=/^proxy-/,_r=/^sec-/,ie="AWS4-HMAC-SHA256",Lr="AWS4-HMAC-SHA256-PAYLOAD",Hr="UNSIGNED-PAYLOAD",Ur=50,nt="aws4_request",zr=3600*24*7,q={},ae=[],oe=(t,e,r)=>`${t}/${e}/${r}/${nt}`,Br=async(t,e,r,s,n)=>{const i=await Ie(t,e.secretAccessKey,e.accessKeyId),a=`${r}:${s}:${n}:${O(i)}:${e.sessionToken}`;if(a in q)return q[a];for(ae.push(a);ae.length>Ur;)delete q[ae.shift()];let u=`AWS4${e.secretAccessKey}`;for(const o of[r,s,n,nt])u=await Ie(t,u,o);return q[a]=u},Ie=(t,e,r)=>{const s=new t(e);return s.update(z(r)),s.digest()},Me=({headers:t},e,r)=>{const s={};for(const n of Object.keys(t).sort()){if(t[n]==null)continue;const i=n.toLowerCase();(i in Dr||e?.has(i)||kr.test(i)||_r.test(i))&&(!r||r&&!r.has(i))||(s[i]=t[n].trim().replace(/\s+/g," "))}return s},Fr=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",ce=async({headers:t,body:e},r)=>{for(const s of Object.keys(t))if(s.toLowerCase()===fe)return t[s];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||Fr(e)){const s=new r;return s.update(z(e)),O(await s.digest())}return Hr};class jr{format(e){const r=[];for(const i of Object.keys(e)){const a=K(i);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(e[i]))}const s=new Uint8Array(r.reduce((i,a)=>i+a.byteLength,0));let n=0;for(const i of r)s.set(i,n),n+=i.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 r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,e.value,!1),new Uint8Array(r.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 n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const a=new Uint8Array(i.buffer);return a.set(e.value,3),a;case"string":const u=K(e.value),o=new DataView(new ArrayBuffer(3+u.byteLength));o.setUint8(0,7),o.setUint16(1,u.byteLength,!1);const l=new Uint8Array(o.buffer);return l.set(u,3),l;case"timestamp":const p=new Uint8Array(9);return p[0]=8,p.set(Se.fromNumber(e.value.valueOf()).bytes,1),p;case"uuid":if(!qr.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const c=new Uint8Array(17);return c[0]=9,c.set(mt(e.value.replace(/\-/g,"")),1),c}}}var Oe;(function(t){t[t.boolTrue=0]="boolTrue",t[t.boolFalse=1]="boolFalse",t[t.byte=2]="byte",t[t.short=3]="short",t[t.integer=4]="integer",t[t.long=5]="long",t[t.byteArray=6]="byteArray",t[t.string=7]="string",t[t.timestamp=8]="timestamp",t[t.uuid=9]="uuid"})(Oe||(Oe={}));const qr=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Se{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const r=new Uint8Array(8);for(let s=7,n=Math.abs(Math.round(e));s>-1&&n>0;s--,n/=256)r[s]=n;return e<0&&Pe(r),new Se(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&Pe(e),parseInt(O(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function Pe(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const Wr=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},Gr=(t,e={})=>{const{headers:r,query:s={}}=I.clone(t);for(const n of Object.keys(r)){const i=n.toLowerCase();(i.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(i)||e.hoistableHeaders?.has(i))&&(s[n]=r[n],delete r[n])}return{...t,headers:r,query:s}},$e=t=>{t=I.clone(t);for(const e of Object.keys(t.headers))Pr.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},Vr=({query:t={}})=>{const e=[],r={};for(const s of Object.keys(t)){if(s.toLowerCase()===$r)continue;const n=W(s);e.push(n);const i=t[s];typeof i=="string"?r[n]=`${n}=${W(i)}`:Array.isArray(i)&&(r[n]=i.slice(0).reduce((a,u)=>a.concat([`${n}=${W(u)}`]),[]).sort().join("&"))}return e.sort().map(s=>r[s]).filter(s=>s).join("&")},Kr=t=>Xr(t).toISOString().replace(/\.\d{3}Z$/,"Z"),Xr=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class Jr{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:r,region:s,service:n,sha256:i,uriEscapePath:a=!0}){this.service=n,this.sha256=i,this.uriEscapePath=a,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=$(s),this.credentialProvider=$(r)}createCanonicalRequest(e,r,s){const n=Object.keys(r).sort();return`${e.method}
|
|
5
5
|
${this.getCanonicalPath(e)}
|