@agentlang/lstudio 0.5.6 → 0.5.7
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/assets/AwsJson1_1Protocol-BPKAibNb.js +1 -0
- package/assets/AwsQueryProtocol-gcsdfhfo.js +1 -0
- package/assets/XmlShapeDeserializer-yfMUWnPw.js +1 -0
- package/assets/_commonjs-dynamic-modules-B90KZyeo-MqqgM5Sj.js +1 -0
- package/assets/_commonjs-dynamic-modules-D244begT.js +1 -0
- package/assets/aws-BDH7ihg3.js +1 -0
- package/assets/documentFetcher-DXduTBqD-jqdP0czN.js +67 -0
- package/assets/documentFetcher-Ds-FwFaK.js +8 -0
- package/assets/index-BTpRe6xv-w-5JgxLH.js +1 -0
- package/assets/index-BWkXARMt.js +1 -0
- package/assets/index-BhYX3qBc.js +1 -0
- package/assets/{index-BFv-M3PX.js → index-BvJIpPZM.js} +14 -14
- package/assets/{index-BT-B0wMw.js → index-Bxvbin5N.js} +1837 -10339
- package/assets/index-CDKpgEyj-tyrSWl01.js +8753 -0
- package/assets/index-CZHYN75I.css +1 -0
- package/assets/index-Cv6PsiG7.js +1 -0
- package/assets/{index-KGBiLwKE-Doz2tX9S.js → index-D9hvpHrT-D460pOJZ.js} +7 -7
- package/assets/index-DGSGqHDe.js +1 -0
- package/assets/index-DRgW1--O-Be3NpfgF.js +17 -0
- package/assets/index-Dk98TczE-BtSqF03o.js +1 -0
- package/assets/{index-DYmn2gQ6-CnjFa625.js → index-DuUQBJXO-gNsOEp1C.js} +1 -1
- package/assets/{index-BitrXVkV.js → index-DzXvkWz5.js} +1 -1
- package/assets/{index-CAsiSxeK.js → index-QhSmQuQt.js} +9 -9
- package/assets/index-_duzuPdC.js +15 -0
- package/assets/{index-D4z_hbl0-CD1MieBA.js → index-ruSRuF6L-BjzIBLlQ.js} +9 -9
- package/assets/index.browser-DC-BI9vG.js +5 -0
- package/assets/index.browser-yI_W1hK0-C1Oinehc.js +1 -0
- package/assets/loadCognitoIdentity-C6X581JO.js +1 -0
- package/assets/loadSts-BLVzhgX4.js +1 -0
- package/assets/noAuth-Cp7LDRaC.js +1 -0
- package/assets/{normalizeProvider-CtDY37Q6.js → normalizeProvider-Cd9_AiS_.js} +1 -1
- package/assets/pdf-parse.es-Bg6uvNNe-3L3fe-Mc.js +26 -0
- package/assets/pdf-parse.es-CO6QlkPs.js +26 -0
- package/assets/replService-CPKXCVUs.js +1 -0
- package/assets/sdk-stream-mixin.browser-Dycc9CbH.js +2 -0
- package/assets/{winston-DA9FnRtM.js → winston-BWsrMlta.js} +27 -27
- package/assets/{winston-fLGSL0tu.js → winston-BvOMKj10.js} +1 -1
- package/assets/winston-CnOlwptw-BXt6VwZK.js +1 -0
- package/assets/{winston-1qzyIKCb-DfRv1PO8.js → winston-Dk1WXlDf--OwDrr6q.js} +27 -27
- package/index.html +6 -12
- package/package.json +1 -1
- package/assets/__vite-browser-external-BDMct_Gn-FmFgRqLi.js +0 -1
- package/assets/__vite-browser-external-DLjrMatA.js +0 -1
- package/assets/_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js +0 -1
- package/assets/_commonjs-dynamic-modules-DkOKMH7F.js +0 -1
- package/assets/index-69shuAsh-DF18H7zf.js +0 -1
- package/assets/index-6mr3sa6o.js +0 -1
- package/assets/index-B0dS78d1.js +0 -1
- package/assets/index-BJBOx-Z---hbiLl7B.js +0 -5
- package/assets/index-BXMy9UIl.js +0 -1
- package/assets/index-Bto-kj6R-C0A_3Pwb.js +0 -1
- package/assets/index-ChvoNxcO.js +0 -5
- package/assets/index-CpjrEQ_o.css +0 -1
- package/assets/index-DSosZ5sh-Ceejs_jv.js +0 -1
- package/assets/index-DTNuphFO-Bf5Ad1xs.js +0 -17
- package/assets/index-Dlh-KIx4.js +0 -1
- package/assets/index-DsIu-45t-Bejjlpz4.js +0 -6
- package/assets/index.browser-1cO3jWRU.js +0 -6
- package/assets/index.browser-BHPvGrwi-6Mh8eUw-.js +0 -1
- package/assets/inherits_browser-nmOknR35-Bp0mvRSL.js +0 -1
- package/assets/loadCognitoIdentity-DbqOiF04.js +0 -1
- package/assets/loadSts-D8r_UqTz.js +0 -1
- package/assets/replService-CZE13KTw.js +0 -1
- package/assets/resolveDefaultsModeConfig-BaVgVWbD.js +0 -15
- package/assets/util-B4ZV5RJW.js +0 -10
- package/assets/util-CNqBjtt6-GUXK7Yxz.js +0 -10
- package/assets/util-DZRIOW0Z-CproX86h.js +0 -1
- package/assets/winston-CtxF18qc-B_oJRj0X.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as G,n as N,c as qe,b as _e,f as xe,d as Ve,e as Je,g as We,t as H,h as Ke,i as Qe,s as Xe,F as Ye}from"./normalizeProvider-CtDY37Q6.js";import{i as Ze,a as et,c as Pe,S as ie,m as tt,d as st,b as rt,T as E,e as oe,N as k,f as R,g as nt,L as Re,h as ke,v as it,R as ot,j as at,n as ve,k as ct,E as ut,r as dt,p as pt,l as lt,o as gt,q as ft,s as mt,D as ht,t as yt,u as St,w as Et,x as wt,y as Ct,z as It,A as bt,B as At,C as _t,F as xt,G as Pt,H as Rt,I as kt,J as vt,K as Ot,M as Dt,O as Tt,P as Mt,Q as Nt,U as Ut,V as $t,W as Oe,X as De}from"./resolveDefaultsModeConfig-BaVgVWbD.js";import"./preload-helper-BlTxHScW.js";import"./index-BT-B0wMw.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-DkOKMH7F.js";const Ft=t=>e=>async s=>{if(!G.isInstance(s.request))return e(s);const{request:r}=s,{handlerProtocol:n=""}=t.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 i=r.hostname;r.port!=null&&(i+=`:${r.port}`),r.headers.host=i}return e(s)},zt={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},jt=t=>({applyToStack:e=>{e.add(Ft(t),zt)}}),Lt=()=>(t,e)=>async s=>{try{const r=await t(s),{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:u}=a,d=c??e.inputFilterSensitiveLog,l=u??e.outputFilterSensitiveLog,{$metadata:p,...f}=r.output;return o?.info?.({clientName:n,commandName:i,input:d(s.input),output:l(f),metadata:p}),r}catch(r){const{clientName:n,commandName:i,logger:o,dynamoDbDocumentClientOptions:a={}}=e,{overrideInputFilterSensitiveLog:c}=a,u=c??e.inputFilterSensitiveLog;throw o?.error?.({clientName:n,commandName:i,input:u(s.input),error:r,metadata:r.$metadata}),r}},Ht={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Gt=t=>({applyToStack:e=>{e.add(Lt(),Ht)}}),Bt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},qt=()=>t=>async e=>t(e),Vt=t=>({applyToStack:e=>{e.add(qt(),Bt)}}),Jt=void 0;function Wt(t){return t===void 0?!0:typeof t=="string"&&t.length<=50}function Kt(t){const e=N(t.userAgentAppId??Jt),{customUserAgent:s}=t;return Object.assign(t,{customUserAgent:typeof s=="string"?[[s]]:s,userAgentAppId:async()=>{const r=await e();if(!Wt(r)){const n=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?console:t.logger;typeof r!="string"?n?.warn("userAgentAppId must be a string or undefined."):r.length>50&&n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}const Te=(t,e=!1)=>{if(e){for(const s of t.split("."))if(!Te(s))return!1;return!0}return!(!Ze(t)||t.length<3||t.length>63||t!==t.toLowerCase()||et(t))},ae=":",Qt="/",Xt=t=>{const e=t.split(ae);if(e.length<6)return null;const[s,r,n,i,o,...a]=e;if(s!=="arn"||r===""||n===""||a.join(ae)==="")return null;const c=a.map(u=>u.split(Qt)).flat();return{partition:r,service:n,region:i,accountId:o,resourceId:c}},Yt=[{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)"}}}],Zt={partitions:Yt};let es=Zt;const ts=t=>{const{partitions:e}=es;for(const r of e){const{regions:n,outputs:i}=r;for(const[o,a]of Object.entries(n))if(o===t)return{...i,...a}}for(const r of e){const{regionRegex:n,outputs:i}=r;if(new RegExp(n).test(t))return{...i}}const s=e.find(r=>r.id==="aws");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}},Me={isVirtualHostableS3Bucket:Te,parseArn:Xt,partition:ts};Pe.aws=Me;function ss(t,e,s){return t.$source||(t.$source={}),t.$source[e]=s,t}function b(t,e,s){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=s}const ce=t=>qe.isInstance(t)?t.headers?.date??t.headers?.Date:void 0,Ne=t=>new Date(Date.now()+t),rs=(t,e)=>Math.abs(Ne(e).getTime()-t)>=3e5,ue=(t,e)=>{const s=Date.parse(t);return rs(s,e)?s-Date.now():e},U=(t,e)=>{if(!e)throw new Error(`Property \`${t}\` is not resolved for AWS SDK SigV4Auth`);return e},ns=async t=>{const e=U("context",t.context),s=U("config",t.config),r=e.endpointV2?.properties?.authSchemes?.[0],i=await U("signer",s.signer)(r),o=t?.signingRegion,a=t?.signingRegionSet,c=t?.signingName;return{config:s,signer:i,signingRegion:o,signingRegionSet:a,signingName:c}};class is{async sign(e,s,r){if(!G.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const n=await ns(r),{config:i,signer:o}=n;let{signingRegion:a,signingName:c}=n;const u=r.context;if(u?.authSchemes?.length??!1){const[l,p]=u.authSchemes;l?.name==="sigv4a"&&p?.name==="sigv4"&&(a=p?.signingRegion??a,c=p?.signingName??c)}return await o.sign(e,{signingDate:Ne(i.systemClockOffset),signingRegion:a,signingService:c})}errorHandler(e){return s=>{const r=s.ServerTime??ce(s.$response);if(r){const n=U("config",e.config),i=n.systemClockOffset;n.systemClockOffset=ue(r,n.systemClockOffset),n.systemClockOffset!==i&&s.$metadata&&(s.$metadata.clockSkewCorrected=!0)}throw s}}successHandler(e,s){const r=ce(e);if(r){const n=U("config",s.config);n.systemClockOffset=ue(r,n.systemClockOffset)}}}const os=t=>{let e=t.credentials,s=!!t.credentials,r;Object.defineProperty(t,"credentials",{set(u){u&&u!==e&&u!==r&&(s=!0),e=u;const d=as(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),l=cs(t,d);if(s&&!l.attributed){const p=typeof e=="object"&&e!==null;r=async f=>{const v=await l(f);return p&&(!v.$source||Object.keys(v.$source).length===0)?ss(v,"CREDENTIALS_CODE","e"):v},r.memoized=l.memoized,r.configBound=l.configBound,r.attributed=!0}else r=l},get(){return r},enumerable:!0,configurable:!0}),t.credentials=e;const{signingEscapePath:n=!0,systemClockOffset:i=t.systemClockOffset||0,sha256:o}=t;let a;return t.signer?a=N(t.signer):t.regionInfoProvider?a=()=>N(t.region)().then(async u=>[await t.regionInfoProvider(u,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},u]).then(([u,d])=>{const{signingRegion:l,signingService:p}=u;t.signingRegion=t.signingRegion||l||d,t.signingName=t.signingName||p||t.serviceId;const f={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},h=t.signerConstructor||ie;return new h(f)}):a=async u=>{u=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await N(t.region)(),properties:{}},u);const d=u.signingRegion,l=u.signingName;t.signingRegion=t.signingRegion||d,t.signingName=t.signingName||l||t.serviceId;const p={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:o,uriEscapePath:n},f=t.signerConstructor||ie;return new f(p)},Object.assign(t,{systemClockOffset:i,signingEscapePath:n,signer:a})};function as(t,{credentials:e,credentialDefaultProvider:s}){let r;return e?e?.memoized?r=e:r=tt(e,rt,st):s?r=N(s(Object.assign({},t,{parentClientConfig:t}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function cs(t,e){if(e.configBound)return e;const s=async r=>e({...r,callerClientConfig:t});return s.memoized=e.memoized,s.configBound=!0,s}class us{queryCompat;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,s){const r=s.getMemberSchemas(),n=Object.values(r).find(i=>!!i.getMergedTraits().httpPayload);if(n){const i=n.getMergedTraits().mediaType;return i||(n.isStringSchema()?"text/plain":n.isBlobSchema()?"application/octet-stream":e)}else if(!s.isUnitSchema()&&Object.values(r).find(o=>{const{httpQuery:a,httpQueryParams:c,httpHeader:u,httpLabel:d,httpPrefixHeaders:l}=o.getMergedTraits();return!a&&!c&&!u&&!d&&l===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,s,r,n,i,o){let a=s,c=e;e.includes("#")&&([a,c]=e.split("#"));const u={$metadata:i,$fault:r.statusCode<500?"client":"server"},d=E.for(a);try{return{errorSchema:o?.(d,c)??d.getSchema(e),errorMetadata:u}}catch{n.message=n.message??n.Message??"UnknownError";const p=E.for("smithy.ts.sdk.synthetic."+a),f=p.getBaseException();if(f){const h=p.getErrorCtor(f)??Error;throw this.decorateServiceException(Object.assign(new h({name:c}),u),n)}throw this.decorateServiceException(Object.assign(new Error(c),u),n)}}decorateServiceException(e,s={}){if(this.queryCompat){const r=e.Message??s.Message,n=oe(e,s);r&&(n.message=r),n.Error={...n.Error,Type:n.Error.Type,Code:n.Error.Code,Message:n.Error.message??n.Error.Message??r};const i=n.$metadata.requestId;return i&&(n.RequestId=i),n}return oe(e,s)}setQueryCompatError(e,s){const r=s.headers?.["x-amzn-query-error"];if(e!==void 0&&r!=null){const[n,i]=r.split(";"),o=Object.entries(e),a={Code:n,Type:i};Object.assign(e,a);for(const[c,u]of o)a[c==="message"?"Message":c]=u;delete a.__type,e.Error=a}}queryCompatOutput(e,s){e.Error&&(s.Error=e.Error),e.Type&&(s.Type=e.Type),e.Code&&(s.Code=e.Code)}findQueryCompatibleError(e,s){try{return e.getSchema(s)}catch{return e.find(n=>k.of(n).getMergedTraits().awsQueryError?.[0]===s)}}}class B{serdeContext;setSerdeContext(e){this.serdeContext=e}}function*ds(t,e){if(t.isUnitSchema())return;const s=t.getSchema();for(let r=0;r<s[4].length;++r){const n=s[4][r],i=s[5][r],o=new k([i,0],n);!(n in e)&&!o.isIdempotencyToken()||(yield[n,o])}}function*ps(t,e,s){if(t.isUnitSchema())return;const r=t.getSchema();let n=Object.keys(e).filter(i=>i!=="__type").length;for(let i=0;i<r[4].length&&n!==0;++i){const o=r[4][i],a=r[5][i],c=new k([a,0],o);let u=o;s&&(u=c.getMergedTraits()[s]??o),u in e&&(yield[o,c],n-=1)}}class ls{from;to;keys;constructor(e,s){this.from=e,this.to=s,this.keys=new Set(Object.keys(this.from).filter(r=>r!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,s=this.from[e];this.to.$unknown=[e,s]}}}function gs(t,e,s){if(s?.source){const r=s.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||r!==String(e)))return r.includes(".")?new R(r,"bigDecimal"):BigInt(r)}return e}const fs=(t,e)=>nt(t,e).then(s=>(e?.utf8Encoder??_e)(s)),ms=(t,e)=>fs(t,e).then(s=>{if(s.length)try{return JSON.parse(s)}catch(r){throw r?.name==="SyntaxError"&&Object.defineProperty(r,"$responseBodyText",{value:s}),r}return{}}),hs=(t,e)=>{const s=(i,o)=>Object.keys(i).find(a=>a.toLowerCase()===o.toLowerCase()),r=i=>{let o=i;return typeof o=="number"&&(o=o.toString()),o.indexOf(",")>=0&&(o=o.split(",")[0]),o.indexOf(":")>=0&&(o=o.split(":")[0]),o.indexOf("#")>=0&&(o=o.split("#")[1]),o},n=s(t.headers,"x-amzn-errortype");if(n!==void 0)return r(t.headers[n]);if(e&&typeof e=="object"){const i=s(e,"code");if(i&&e[i]!==void 0)return r(e[i]);if(e.__type!==void 0)return r(e.__type)}};class ys extends B{settings;constructor(e){super(),this.settings=e}async read(e,s){return this._read(e,typeof s=="string"?JSON.parse(s,gs):await ms(s,this.serdeContext))}readObject(e,s){return this._read(e,s)}_read(e,s){const r=s!==null&&typeof s=="object",n=k.of(e);if(r){if(n.isStructSchema()){const o=s,a=n.isUnionSchema(),c={};let u;const{jsonName:d}=this.settings;d&&(u={});let l;a&&(l=new ls(o,c));for(const[p,f]of ps(n,o,d?"jsonName":!1)){let h=p;d&&(h=f.getMergedTraits().jsonName??h,u[h]=p),a&&l.mark(h),o[h]!=null&&(c[p]=this._read(f,o[h]))}if(a)l.writeUnknown();else if(typeof o.__type=="string")for(const[p,f]of Object.entries(o)){const h=d?u[p]??p:p;h in c||(c[h]=f)}return c}if(Array.isArray(s)&&n.isListSchema()){const o=n.getValueSchema(),a=[],c=!!n.getMergedTraits().sparse;for(const u of s)(c||u!=null)&&a.push(this._read(o,u));return a}if(n.isMapSchema()){const o=n.getValueSchema(),a={},c=!!n.getMergedTraits().sparse;for(const[u,d]of Object.entries(s))(c||d!=null)&&(a[u]=this._read(o,d));return a}}if(n.isBlobSchema()&&typeof s=="string")return xe(s);const i=n.getMergedTraits().mediaType;if(n.isStringSchema()&&typeof s=="string"&&i)return i==="application/json"||i.endsWith("+json")?Re.from(s):s;if(n.isTimestampSchema()&&s!=null)switch(ke(n,this.settings)){case 5:return We(s);case 6:return Je(s);case 7:return Ve(s);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",s),new Date(s)}if(n.isBigIntegerSchema()&&(typeof s=="number"||typeof s=="string"))return BigInt(s);if(n.isBigDecimalSchema()&&s!=null){if(s instanceof R)return s;const o=s;return o.type==="bigDecimal"&&"string"in o?new R(o.string,o.type):new R(String(s),"bigDecimal")}if(n.isNumericSchema()&&typeof s=="string"){switch(s){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return s}if(n.isDocumentSchema())if(r){const o=Array.isArray(s)?[]:{};for(const[a,c]of Object.entries(s))c instanceof R?o[a]=c:o[a]=this._read(n,c);return o}else return structuredClone(s);return s}}const de="Ν";class Ss{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,s)=>{if(s instanceof R){const r=`${de+"nv"+this.counter++}_`+s.string;return this.values.set(`"${r}"`,s.string),r}if(typeof s=="bigint"){const r=s.toString(),n=`${de+"b"+this.counter++}_`+r;return this.values.set(`"${n}"`,r),n}return s}}replaceInJson(e){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return e;for(const[s,r]of this.values)e=e.replace(s,r);return e}}class Es extends B{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,s){this.rootSchema=k.of(e),this.buffer=this._write(this.rootSchema,s)}writeDiscriminatedDocument(e,s){this.write(e,s),typeof this.buffer=="object"&&(this.buffer.__type=k.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:s}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!s)return JSON.stringify(this.buffer);const r=new Ss;return r.replaceInJson(JSON.stringify(this.buffer,r.createReplacer(),0))}return this.buffer}_write(e,s,r){const n=s!==null&&typeof s=="object",i=k.of(e);if(n){if(i.isStructSchema()){const o=s,a={},{jsonName:c}=this.settings;let u;c&&(u={});for(const[d,l]of ds(i,o)){const p=this._write(l,o[d],i);if(p!==void 0){let f=d;c&&(f=l.getMergedTraits().jsonName??d,u[d]=f),a[f]=p}}if(i.isUnionSchema()&&Object.keys(a).length===0){const{$unknown:d}=o;if(Array.isArray(d)){const[l,p]=d;a[l]=this._write(15,p)}}else if(typeof o.__type=="string")for(const[d,l]of Object.entries(o)){const p=c?u[d]??d:d;p in a||(a[p]=this._write(15,l))}return a}if(Array.isArray(s)&&i.isListSchema()){const o=i.getValueSchema(),a=[],c=!!i.getMergedTraits().sparse;for(const u of s)(c||u!=null)&&a.push(this._write(o,u));return a}if(i.isMapSchema()){const o=i.getValueSchema(),a={},c=!!i.getMergedTraits().sparse;for(const[u,d]of Object.entries(s))(c||d!=null)&&(a[u]=this._write(o,d));return a}if(s instanceof Uint8Array&&(i.isBlobSchema()||i.isDocumentSchema()))return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(s instanceof Date&&(i.isTimestampSchema()||i.isDocumentSchema()))switch(ke(i,this.settings)){case 5:return s.toISOString().replace(".000Z","Z");case 6:return Ke(s);case 7:return s.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",s),s.getTime()/1e3}s instanceof R&&(this.useReplacer=!0)}if(!(s===null&&r?.isStructSchema())){if(i.isStringSchema()){if(typeof s>"u"&&i.isIdempotencyToken())return it();const o=i.getMergedTraits().mediaType;return s!=null&&o&&(o==="application/json"||o.endsWith("+json"))?Re.from(s):s}if(typeof s=="number"&&i.isNumericSchema())return Math.abs(s)===1/0||isNaN(s)?String(s):s;if(typeof s=="string"&&i.isBlobSchema())return i===this.rootSchema?s:(this.serdeContext?.base64Encoder??H)(s);if(typeof s=="bigint"&&(this.useReplacer=!0),i.isDocumentSchema())if(n){const o=Array.isArray(s)?[]:{};for(const[a,c]of Object.entries(s))c instanceof R?(this.useReplacer=!0,o[a]=c):o[a]=this._write(i,c);return o}else return structuredClone(s);return s}}}class ws extends B{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new Es(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new ys(this.settings);return e.setSerdeContext(this.serdeContext),e}}class Cs extends ot{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}){super({defaultNamespace:e}),this.serviceTarget=s,this.codec=n??new ws({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!r,this.mixin=new us(this.awsQueryCompatible)}async serializeRequest(e,s,r){const n=await super.serializeRequest(e,s,r);return n.path.endsWith("/")||(n.path+="/"),Object.assign(n.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(n.headers["x-amzn-query-mode"]="true"),(at(e.input)==="unit"||!n.body)&&(n.body="{}"),n}getPayloadCodec(){return this.codec}async handleError(e,s,r,n,i){this.awsQueryCompatible&&this.mixin.setQueryCompatError(n,r);const o=hs(r,n)??"Unknown",{errorSchema:a,errorMetadata:c}=await this.mixin.getErrorSchemaOrThrowBaseException(o,this.options.defaultNamespace,r,n,i,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=k.of(a),d=n.message??n.Message??"Unknown",l=E.for(a[1]).getErrorCtor(a)??Error,p=new l(d),f={};for(const[h,v]of u.structIterator())n[h]!=null&&(f[h]=this.codec.createDeserializer().readObject(v,n[h]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(n,f),this.mixin.decorateServiceException(Object.assign(p,c,{$fault:u.getMergedTraits().error,message:d},f),n)}}class Is extends Cs{constructor({defaultNamespace:e,serviceTarget:s,awsQueryCompatible:r,jsonCodec:n}){super({defaultNamespace:e,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 bs=/\d{12}\.ddb/;async function As(t,e,s){if(s.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&b(t,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const i=await e.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?b(t,"RETRY_MODE_ADAPTIVE","F"):b(t,"RETRY_MODE_STANDARD","E"):b(t,"RETRY_MODE_LEGACY","D")}if(typeof e.accountIdEndpointMode=="function"){const i=t.endpointV2;switch(String(i?.url?.hostname).match(bs)&&b(t,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":b(t,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":b(t,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":b(t,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const n=t.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){const i=n;i.accountId&&b(t,"RESOLVED_ACCOUNT_ID","T");for(const[o,a]of Object.entries(i.$source??{}))b(t,o,a)}}const pe="user-agent",j="x-amz-user-agent",le=" ",L="/",_s=/[^!$%&'*+\-.^_`|~\w]/g,xs=/[^!$%&'*+\-.^_`|~\w#]/g,ge="-",Ps=1024;function Rs(t){let e="";for(const s in t){const r=t[s];if(e.length+r.length+1<=Ps){e.length?e+=","+r:e+=r;continue}break}return e}const ks=t=>(e,s)=>async r=>{const{request:n}=r;if(!G.isInstance(n))return e(r);const{headers:i}=n,o=s?.userAgent?.map(F)||[],a=(await t.defaultUserAgentProvider()).map(F);await As(s,t,r);const c=s;a.push(`m/${Rs(Object.assign({},s.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const u=t?.customUserAgent?.map(F)||[],d=await t.userAgentAppId();d&&a.push(F(["app",`${d}`]));const l=[].concat([...a,...o,...u]).join(le),p=[...a.filter(f=>f.startsWith("aws-sdk-")),...u].join(le);return t.runtime!=="browser"?(p&&(i[j]=i[j]?`${i[pe]} ${p}`:p),i[pe]=l):i[j]=l,e({...r,request:n})},F=t=>{const e=t[0].split(L).map(o=>o.replace(_s,ge)).join(L),s=t[1]?.replace(xs,ge),r=e.indexOf(L),n=e.substring(0,r);let i=e.substring(r+1);return n==="api"&&(i=i.toLowerCase()),[n,i,s].filter(o=>o&&o.length>0).reduce((o,a,c)=>{switch(c){case 0:return a;case 1:return`${o}/${a}`;default:return`${o}#${a}`}},"")},vs={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Os=t=>({applyToStack:e=>{e.add(ks(t),vs)}}),Ds=async(t,e,s)=>({operation:ct(e).operation,region:await ve(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Ts(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-identity",region:t.region},propertiesExtractor:(e,s)=>({signingProperties:{config:e,context:s}})}}function z(t){return{schemeId:"smithy.api#noAuth"}}const Ms=t=>{const e=[];switch(t.operation){case"GetCredentialsForIdentity":{e.push(z());break}case"GetId":{e.push(z());break}case"GetOpenIdToken":{e.push(z());break}case"UnlinkIdentity":{e.push(z());break}default:e.push(Ts(t))}return e},Ns=t=>{const e=os(t);return Object.assign(e,{authSchemePreference:ve(t.authSchemePreference??[])})},Us=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"cognito-identity"}),Ue={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$s="3.974.0",Fs={version:$s},zs=({serviceId:t,clientVersion:e})=>async s=>{const r=typeof window<"u"?window.navigator:void 0,n=r?.userAgent??"",i=r?.userAgentData?.platform??fe.os(n)??"other",o=void 0,a=r?.userAgentData?.brands??[],c=a[a.length-1],u=c?.brand??fe.browser(n)??"unknown",d=c?.version??"unknown",l=[["aws-sdk-js",e],["ua","2.1"],[`os/${i}`,o],["lang/js"],["md/browser",`${u}_${d}`]];t&&l.push([`api/${t}`,e]);const p=await s?.userAgentAppId?.();return p&&l.push([`app/${p}`]),l},fe={os(t){if(/iPhone|iPad|iPod/.test(t))return"iOS";if(/Macintosh|Mac OS X/.test(t))return"macOS";if(/Windows NT/.test(t))return"Windows";if(/Android/.test(t))return"Android";if(/Linux/.test(t))return"Linux"},browser(t){if(/EdgiOS|EdgA|Edg\//.test(t))return"Microsoft Edge";if(/Firefox\//.test(t))return"Firefox";if(/Chrome\//.test(t))return"Chrome";if(/Safari\//.test(t))return"Safari"}},$e="required",y="fn",S="argv",D="ref",me=!0,he="isSet",$="booleanEquals",O="error",A="endpoint",P="tree",q="PartitionResult",V="getAttr",T="stringEquals",ye={[$e]:!1,type:"string"},Se={[$e]:!0,default:!1,type:"boolean"},Ee={[D]:"Endpoint"},Fe={[y]:$,[S]:[{[D]:"UseFIPS"},!0]},ze={[y]:$,[S]:[{[D]:"UseDualStack"},!0]},m={},M={[D]:"Region"},we={[y]:V,[S]:[{[D]:q},"supportsFIPS"]},je={[D]:q},Ce={[y]:$,[S]:[!0,{[y]:V,[S]:[je,"supportsDualStack"]}]},Ie=[Fe],be=[ze],Ae=[M],js={parameters:{Region:ye,UseDualStack:Se,UseFIPS:Se,Endpoint:ye},rules:[{conditions:[{[y]:he,[S]:[Ee]}],rules:[{conditions:Ie,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:O},{conditions:be,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:O},{endpoint:{url:Ee,properties:m,headers:m},type:A}],type:P},{conditions:[{[y]:he,[S]:Ae}],rules:[{conditions:[{[y]:"aws.partition",[S]:Ae,assign:q}],rules:[{conditions:[Fe,ze],rules:[{conditions:[{[y]:$,[S]:[me,we]},Ce],rules:[{conditions:[{[y]:T,[S]:[M,"us-east-1"]}],endpoint:{url:"https://cognito-identity-fips.us-east-1.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-east-2"]}],endpoint:{url:"https://cognito-identity-fips.us-east-2.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-west-1"]}],endpoint:{url:"https://cognito-identity-fips.us-west-1.amazonaws.com",properties:m,headers:m},type:A},{conditions:[{[y]:T,[S]:[M,"us-west-2"]}],endpoint:{url:"https://cognito-identity-fips.us-west-2.amazonaws.com",properties:m,headers:m},type:A},{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:O}],type:P},{conditions:Ie,rules:[{conditions:[{[y]:$,[S]:[we,me]}],rules:[{endpoint:{url:"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"FIPS is enabled but this partition does not support FIPS",type:O}],type:P},{conditions:be,rules:[{conditions:[Ce],rules:[{conditions:[{[y]:T,[S]:["aws",{[y]:V,[S]:[je,"name"]}]}],endpoint:{url:"https://cognito-identity.{Region}.amazonaws.com",properties:m,headers:m},type:A},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:A}],type:P},{error:"DualStack is enabled but this partition does not support DualStack",type:O}],type:P},{endpoint:{url:"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:A}],type:P}],type:P},{error:"Invalid Configuration: Missing Region",type:O}]},Ls=js,Hs=new ut({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),Gs=(t,e={})=>Hs.get(t,()=>dt(Ls,{endpointParams:t,logger:e.logger}));Pe.aws=Me;const Bs=t=>({apiVersion:"2014-06-30",base64Decoder:t?.base64Decoder??xe,base64Encoder:t?.base64Encoder??H,disableHostPrefix:t?.disableHostPrefix??!1,endpointProvider:t?.endpointProvider??Gs,extensions:t?.extensions??[],httpAuthSchemeProvider:t?.httpAuthSchemeProvider??Ms,httpAuthSchemes:t?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new is},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new gt}],logger:t?.logger??new lt,protocol:t?.protocol??Is,protocolSettings:t?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentity",xmlNamespace:"http://cognito-identity.amazonaws.com/doc/2014-06-30/",version:"2014-06-30",serviceTarget:"AWSCognitoIdentityService"},serviceId:t?.serviceId??"Cognito Identity",urlParser:t?.urlParser??pt,utf8Decoder:t?.utf8Decoder??Qe,utf8Encoder:t?.utf8Encoder??_e}),qs=t=>{const e=ft(t),s=()=>e().then(It),r=Bs(t);return{...r,...t,runtime:"browser",defaultsMode:e,bodyLengthChecker:t?.bodyLengthChecker??Et,credentialDefaultProvider:t?.credentialDefaultProvider??(n=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:t?.defaultUserAgentProvider??zs({serviceId:r.serviceId,clientVersion:Fs.version}),maxAttempts:t?.maxAttempts??St,region:t?.region??yt("Region is missing"),requestHandler:Ye.create(t?.requestHandler??s),retryMode:t?.retryMode??(async()=>(await s()).retryMode||ht),sha256:t?.sha256??mt,streamCollector:t?.streamCollector??Xe,useDualstackEndpoint:t?.useDualstackEndpoint??(()=>Promise.resolve(Ct)),useFipsEndpoint:t?.useFipsEndpoint??(()=>Promise.resolve(wt))}},Vs=t=>({setRegion(e){t.region=e},region(){return t.region}}),Js=t=>({region:t.region()}),Ws=t=>{const e=t.httpAuthSchemes;let s=t.httpAuthSchemeProvider,r=t.credentials;return{setHttpAuthScheme(n){const i=e.findIndex(o=>o.schemeId===n.schemeId);i===-1?e.push(n):e.splice(i,1,n)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(n){s=n},httpAuthSchemeProvider(){return s},setCredentials(n){r=n},credentials(){return r}}},Ks=t=>({httpAuthSchemes:t.httpAuthSchemes(),httpAuthSchemeProvider:t.httpAuthSchemeProvider(),credentials:t.credentials()}),Qs=(t,e)=>{const s=Object.assign(Vs(t),bt(t),At(t),Ws(t));return e.forEach(r=>r.configure(s)),Object.assign(t,Js(s),_t(s),xt(s),Ks(s))};class dn extends Pt{config;constructor(...[e]){const s=qs(e||{});super(s),this.initConfig=s;const r=Us(s),n=Kt(r),i=Rt(n),o=kt(i),a=o,c=vt(a),u=Ns(c),d=Qs(u,e?.extensions||[]);this.config=d,this.middlewareStack.use(Ot(this.config)),this.middlewareStack.use(Os(this.config)),this.middlewareStack.use(Dt(this.config)),this.middlewareStack.use(Tt(this.config)),this.middlewareStack.use(jt(this.config)),this.middlewareStack.use(Gt(this.config)),this.middlewareStack.use(Vt(this.config)),this.middlewareStack.use(Mt(this.config,{httpAuthSchemeParametersProvider:Ds,identityProviderConfigProvider:async l=>new Ut({"aws.auth#sigv4":l.credentials})})),this.middlewareStack.use(Nt(this.config))}destroy(){super.destroy()}}class w extends $t{constructor(e){super(e),Object.setPrototypeOf(this,w.prototype)}}class J extends w{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,J.prototype)}}class W extends w{name="InvalidParameterException";$fault="client";constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,W.prototype)}}class K extends w{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,K.prototype)}}class Q extends w{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,Q.prototype)}}class X extends w{name="ResourceConflictException";$fault="client";constructor(e){super({name:"ResourceConflictException",$fault:"client",...e}),Object.setPrototypeOf(this,X.prototype)}}class Y extends w{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,Y.prototype)}}class Z extends w{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,Z.prototype)}}class ee extends w{name="ExternalServiceException";$fault="client";constructor(e){super({name:"ExternalServiceException",$fault:"client",...e}),Object.setPrototypeOf(this,ee.prototype)}}class te extends w{name="InvalidIdentityPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidIdentityPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,te.prototype)}}class se extends w{name="DeveloperUserAlreadyRegisteredException";$fault="client";constructor(e){super({name:"DeveloperUserAlreadyRegisteredException",$fault:"client",...e}),Object.setPrototypeOf(this,se.prototype)}}class re extends w{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,re.prototype)}}const Xs="AccountId",Ys="AccessKeyId",Le="Credentials",Zs="ConcurrentModificationException",er="CustomRoleArn",tr="DeveloperUserAlreadyRegisteredException",sr="Expiration",rr="ExternalServiceException",nr="GetCredentialsForIdentity",ir="GetCredentialsForIdentityInput",or="GetCredentialsForIdentityResponse",ar="GetId",cr="GetIdInput",ur="GetIdResponse",dr="InternalErrorException",ne="IdentityId",pr="InvalidIdentityPoolConfigurationException",lr="InvalidParameterException",gr="IdentityPoolId",fr="IdentityProviderToken",He="Logins",mr="LimitExceededException",hr="LoginsMap",yr="NotAuthorizedException",Sr="ResourceConflictException",Er="ResourceNotFoundException",wr="SecretKey",Cr="SecretKeyString",Ir="SessionToken",br="TooManyRequestsException",_="client",C="error",x="httpError",I="message",Ar="server",Ge="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentity",g="com.amazonaws.cognitoidentity";var _r=[0,g,fr,8,0],xr=[0,g,Cr,8,0],Pr=[-3,g,Zs,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Pr,re);var Rr=[3,g,Le,0,[Ys,wr,Ir,sr],[0,[()=>xr,0],0,4]],kr=[-3,g,tr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(kr,se);var vr=[-3,g,rr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(vr,ee);var Or=[3,g,ir,0,[ne,He,er],[0,[()=>Be,0],0],1],Dr=[3,g,or,0,[ne,Le],[0,[()=>Rr,0]]],Tr=[3,g,cr,0,[gr,Xs,He],[0,0,[()=>Be,0]],1],Mr=[3,g,ur,0,[ne],[0]],Nr=[-3,g,dr,{[C]:Ar},[I],[0]];E.for(g).registerError(Nr,J);var Ur=[-3,g,pr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Ur,te);var $r=[-3,g,lr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError($r,W);var Fr=[-3,g,mr,{[C]:_,[x]:400},[I],[0]];E.for(g).registerError(Fr,K);var zr=[-3,g,yr,{[C]:_,[x]:403},[I],[0]];E.for(g).registerError(zr,Q);var jr=[-3,g,Sr,{[C]:_,[x]:409},[I],[0]];E.for(g).registerError(jr,X);var Lr=[-3,g,Er,{[C]:_,[x]:404},[I],[0]];E.for(g).registerError(Lr,Z);var Hr=[-3,g,br,{[C]:_,[x]:429},[I],[0]];E.for(g).registerError(Hr,Y);var Gr=[-3,Ge,"CognitoIdentityServiceException",0,[],[]];E.for(Ge).registerError(Gr,w);var Be=[2,g,hr,0,[0,0],[()=>_r,0]],Br=[9,g,nr,0,()=>Or,()=>Dr],qr=[9,g,ar,0,()=>Tr,()=>Mr];class pn extends Oe.classBuilder().ep(Ue).m(function(e,s,r,n){return[De(r,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetCredentialsForIdentity",{}).n("CognitoIdentityClient","GetCredentialsForIdentityCommand").sc(Br).build(){}class ln extends Oe.classBuilder().ep(Ue).m(function(e,s,r,n){return[De(r,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityService","GetId",{}).n("CognitoIdentityClient","GetIdCommand").sc(qr).build(){}export{dn as CognitoIdentityClient,pn as GetCredentialsForIdentityCommand,ln as GetIdCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as W,k as ge,E as he,r as Pe,c as Ee,p as Se,l as fe,o as ve,q as ye,s as Ae,D as xe,t as Re,u as _e,w as Ce,x as De,y as Ie,z as Te,A as be,B as ke,C as we,F as Ue,G as $e,H as Oe,I as He,J as Fe,K as Le,M as je,O as Me,P as Ne,Q as Ke,U as ze,V as Ve,T as E,W as qe,X as Ge}from"./resolveDefaultsModeConfig-BaVgVWbD.js";import{r as Be,a as We,A as Qe,b as Je,c as Xe,g as Ye,d as Ze,e as et,f as tt,h as ot,i as st,j as nt,k as it}from"./index-6mr3sa6o.js";import{b as rt,i as at,t as ct,f as dt,s as lt,F as ut}from"./normalizeProvider-CtDY37Q6.js";import"./preload-helper-BlTxHScW.js";import"./index-BT-B0wMw.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-DkOKMH7F.js";const pt=async(e,t,a)=>({operation:ge(t).operation,region:await W(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function mt(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,a)=>({signingProperties:{config:t,context:a}})}}function gt(e){return{schemeId:"smithy.api#noAuth"}}const ht=e=>{const t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(gt());break}default:t.push(mt(e))}return t},Pt=e=>Object.assign(e,{stsClientCtor:kt}),Et=e=>{const t=Pt(e),a=Be(t);return Object.assign(a,{authSchemePreference:W(e.authSchemePreference??[])})},St=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"}),ft={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"}},vt="3.975.0",yt={version:vt},Q="required",o="type",s="fn",n="argv",S="ref",F=!1,D=!0,P="booleanEquals",c="stringEquals",J="sigv4",X="sts",Y="us-east-1",r="endpoint",L="https://sts.{Region}.{PartitionResult#dnsSuffix}",g="tree",R="error",T="getAttr",j={[Q]:!1,[o]:"string"},I={[Q]:!0,default:!1,[o]:"boolean"},Z={[S]:"Endpoint"},M={[s]:"isSet",[n]:[{[S]:"Region"}]},d={[S]:"Region"},N={[s]:"aws.partition",[n]:[d],assign:"PartitionResult"},ee={[S]:"UseFIPS"},te={[S]:"UseDualStack"},l={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:J,signingName:X,signingRegion:Y}]},headers:{}},u={},K={conditions:[{[s]:c,[n]:[d,"aws-global"]}],[r]:l,[o]:r},oe={[s]:P,[n]:[ee,!0]},se={[s]:P,[n]:[te,!0]},z={[s]:T,[n]:[{[S]:"PartitionResult"},"supportsFIPS"]},ne={[S]:"PartitionResult"},V={[s]:P,[n]:[!0,{[s]:T,[n]:[ne,"supportsDualStack"]}]},q=[{[s]:"isSet",[n]:[Z]}],G=[oe],B=[se],At={parameters:{Region:j,UseDualStack:I,UseFIPS:I,Endpoint:j,UseGlobalEndpoint:I},rules:[{conditions:[{[s]:P,[n]:[{[S]:"UseGlobalEndpoint"},D]},{[s]:"not",[n]:q},M,N,{[s]:P,[n]:[ee,F]},{[s]:P,[n]:[te,F]}],rules:[{conditions:[{[s]:c,[n]:[d,"ap-northeast-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"ap-south-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"ap-southeast-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"ap-southeast-2"]}],endpoint:l,[o]:r},K,{conditions:[{[s]:c,[n]:[d,"ca-central-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"eu-central-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"eu-north-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"eu-west-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"eu-west-2"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"eu-west-3"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"sa-east-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,Y]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"us-east-2"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"us-west-1"]}],endpoint:l,[o]:r},{conditions:[{[s]:c,[n]:[d,"us-west-2"]}],endpoint:l,[o]:r},{endpoint:{url:L,properties:{authSchemes:[{name:J,signingName:X,signingRegion:"{Region}"}]},headers:u},[o]:r}],[o]:g},{conditions:q,rules:[{conditions:G,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[o]:R},{conditions:B,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[o]:R},{endpoint:{url:Z,properties:u,headers:u},[o]:r}],[o]:g},{conditions:[M],rules:[{conditions:[N],rules:[{conditions:[oe,se],rules:[{conditions:[{[s]:P,[n]:[D,z]},V],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:u,headers:u},[o]:r}],[o]:g},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[o]:R}],[o]:g},{conditions:G,rules:[{conditions:[{[s]:P,[n]:[z,D]}],rules:[{conditions:[{[s]:c,[n]:[{[s]:T,[n]:[ne,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:u,headers:u},[o]:r},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:u,headers:u},[o]:r}],[o]:g},{error:"FIPS is enabled but this partition does not support FIPS",[o]:R}],[o]:g},{conditions:B,rules:[{conditions:[V],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:u,headers:u},[o]:r}],[o]:g},{error:"DualStack is enabled but this partition does not support DualStack",[o]:R}],[o]:g},K,{endpoint:{url:L,properties:u,headers:u},[o]:r}],[o]:g}],[o]:g},{error:"Invalid Configuration: Missing Region",[o]:R}]},xt=At,Rt=new he({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),_t=(e,t={})=>Rt.get(e,()=>Pe(xt,{endpointParams:e,logger:t.logger}));Ee.aws=We;const Ct=e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??dt,base64Encoder:e?.base64Encoder??ct,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??_t,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??ht,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Je},{schemeId:"smithy.api#noAuth",identityProvider:t=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ve}],logger:e?.logger??new fe,protocol:e?.protocol??Qe,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??Se,utf8Decoder:e?.utf8Decoder??at,utf8Encoder:e?.utf8Encoder??rt}),Dt=e=>{const t=ye(e),a=()=>t().then(Te),p=Ct(e);return{...p,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Ce,credentialDefaultProvider:e?.credentialDefaultProvider??(m=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Xe({serviceId:p.serviceId,clientVersion:yt.version}),maxAttempts:e?.maxAttempts??_e,region:e?.region??Re("Region is missing"),requestHandler:ut.create(e?.requestHandler??a),retryMode:e?.retryMode??(async()=>(await a()).retryMode||xe),sha256:e?.sha256??Ae,streamCollector:e?.streamCollector??lt,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(Ie)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(De))}},It=e=>{const t=e.httpAuthSchemes;let a=e.httpAuthSchemeProvider,p=e.credentials;return{setHttpAuthScheme(m){const _=t.findIndex(C=>C.schemeId===m.schemeId);_===-1?t.push(m):t.splice(_,1,m)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(m){a=m},httpAuthSchemeProvider(){return a},setCredentials(m){p=m},credentials(){return p}}},Tt=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),bt=(e,t)=>{const a=Object.assign(Ye(e),be(e),ke(e),It(e));return t.forEach(p=>p.configure(a)),Object.assign(e,Ze(a),we(a),Ue(a),Tt(a))};class kt extends $e{config;constructor(...[t]){const a=Dt(t||{});super(a),this.initConfig=a;const p=St(a),m=et(p),_=Oe(m),C=He(_),de=it(C),le=Fe(de),ue=Et(le),pe=bt(ue,t?.extensions||[]);this.config=pe,this.middlewareStack.use(Le(this.config)),this.middlewareStack.use(tt(this.config)),this.middlewareStack.use(je(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(ot(this.config)),this.middlewareStack.use(st(this.config)),this.middlewareStack.use(nt(this.config)),this.middlewareStack.use(Ne(this.config,{httpAuthSchemeParametersProvider:pt,identityProviderConfigProvider:async me=>new ze({"aws.auth#sigv4":me.credentials})})),this.middlewareStack.use(Ke(this.config))}destroy(){super.destroy()}}class h extends Ve{constructor(t){super(t),Object.setPrototypeOf(this,h.prototype)}}class b extends h{name="ExpiredTokenException";$fault="client";constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,b.prototype)}}class k extends h{name="MalformedPolicyDocumentException";$fault="client";constructor(t){super({name:"MalformedPolicyDocumentException",$fault:"client",...t}),Object.setPrototypeOf(this,k.prototype)}}class w extends h{name="PackedPolicyTooLargeException";$fault="client";constructor(t){super({name:"PackedPolicyTooLargeException",$fault:"client",...t}),Object.setPrototypeOf(this,w.prototype)}}class U extends h{name="RegionDisabledException";$fault="client";constructor(t){super({name:"RegionDisabledException",$fault:"client",...t}),Object.setPrototypeOf(this,U.prototype)}}class $ extends h{name="IDPRejectedClaimException";$fault="client";constructor(t){super({name:"IDPRejectedClaimException",$fault:"client",...t}),Object.setPrototypeOf(this,$.prototype)}}class O extends h{name="InvalidIdentityTokenException";$fault="client";constructor(t){super({name:"InvalidIdentityTokenException",$fault:"client",...t}),Object.setPrototypeOf(this,O.prototype)}}class H extends h{name="IDPCommunicationErrorException";$fault="client";constructor(t){super({name:"IDPCommunicationErrorException",$fault:"client",...t}),Object.setPrototypeOf(this,H.prototype)}}const wt="Arn",Ut="AccessKeyId",$t="AssumeRole",Ot="AssumedRoleId",Ht="AssumeRoleRequest",Ft="AssumeRoleResponse",ie="AssumedRoleUser",re="Credentials",Lt="ContextAssertion",jt="DurationSeconds",Mt="Expiration",Nt="ExternalId",Kt="ExpiredTokenException",zt="IDPCommunicationErrorException",Vt="IDPRejectedClaimException",qt="InvalidIdentityTokenException",Gt="Key",Bt="MalformedPolicyDocumentException",Wt="Policy",Qt="PolicyArns",Jt="ProviderArn",Xt="ProvidedContexts",Yt="ProvidedContextsListType",Zt="ProvidedContext",eo="PolicyDescriptorType",to="PackedPolicySize",oo="PackedPolicyTooLargeException",so="RoleArn",no="RegionDisabledException",io="RoleSessionName",ro="SecretAccessKey",ae="SourceIdentity",ao="SerialNumber",co="SessionToken",lo="Tags",uo="TokenCode",po="TransitiveTagKeys",mo="Tag",go="Value",ho="arn",Po="accessKeySecretType",f="awsQueryError",v="client",y="error",A="httpError",x="message",Eo="policyDescriptorListType",ce="smithy.ts.sdk.synthetic.com.amazonaws.sts",So="tagListType",i="com.amazonaws.sts";var fo=[0,i,Po,8,0],vo=[3,i,ie,0,[Ot,wt],[0,0],2],yo=[3,i,Ht,0,[so,io,Qt,Wt,jt,lo,po,Nt,ao,uo,ae,Xt],[0,0,()=>Oo,0,1,()=>Fo,64,0,0,0,0,()=>Ho],2],Ao=[3,i,Ft,0,[re,ie,to,ae],[[()=>xo,0],()=>vo,1,0]],xo=[3,i,re,0,[Ut,ro,co,Mt],[0,[()=>fo,0],0,4],4],Ro=[-3,i,Kt,{[f]:["ExpiredTokenException",400],[y]:v,[A]:400},[x],[0]];E.for(i).registerError(Ro,b);var _o=[-3,i,zt,{[f]:["IDPCommunicationError",400],[y]:v,[A]:400},[x],[0]];E.for(i).registerError(_o,H);var Co=[-3,i,Vt,{[f]:["IDPRejectedClaim",403],[y]:v,[A]:403},[x],[0]];E.for(i).registerError(Co,$);var Do=[-3,i,qt,{[f]:["InvalidIdentityToken",400],[y]:v,[A]:400},[x],[0]];E.for(i).registerError(Do,O);var Io=[-3,i,Bt,{[f]:["MalformedPolicyDocument",400],[y]:v,[A]:400},[x],[0]];E.for(i).registerError(Io,k);var To=[-3,i,oo,{[f]:["PackedPolicyTooLarge",400],[y]:v,[A]:400},[x],[0]];E.for(i).registerError(To,w);var bo=[3,i,eo,0,[ho],[0]],ko=[3,i,Zt,0,[Jt,Lt],[0,0]],wo=[-3,i,no,{[f]:["RegionDisabledException",403],[y]:v,[A]:403},[x],[0]];E.for(i).registerError(wo,U);var Uo=[3,i,mo,0,[Gt,go],[0,0],2],$o=[-3,ce,"STSServiceException",0,[],[]];E.for(ce).registerError($o,h);var Oo=[1,i,Eo,0,()=>bo],Ho=[1,i,Yt,0,()=>ko],Fo=[1,i,So,0,()=>Uo],Lo=[9,i,$t,0,()=>yo,()=>Ao];class ss extends qe.classBuilder().ep(ft).m(function(t,a,p,m){return[Ge(p,t.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(Lo).build(){}export{ss as AssumeRoleCommand,kt as STSClient};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o}from"./index-BT-B0wMw.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-ChvoNxcO.js";import"./preload-helper-BlTxHScW.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-DkOKMH7F.js";export{o as default};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BitrXVkV.js","assets/normalizeProvider-CtDY37Q6.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as K,f as ut,t as ht,b as dt,c as pe,H as P,a as M,j as lt,k as V}from"./normalizeProvider-CtDY37Q6.js";import{_ as ft}from"./preload-helper-BlTxHScW.js";import{_ as mt,m as pt}from"./index-BT-B0wMw.js";const yt=(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)},Fs=t=>({setHttpHandler(e){t.httpHandler=e},httpHandler(){return t.httpHandler},updateHttpClientConfig(e,r){t.httpHandler?.updateHttpClientConfig(e,r)},httpHandlerConfigs(){return t.httpHandler.httpHandlerConfigs()}}),js=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 ce="__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),I=(t,e)=>{const r=[];if(t&&r.push(t),e)for(const s of e)r.push(s);return r},C=(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((h,l)=>Re[l.step]-Re[h.step]||Ee[l.priority||"normal"]-Ee[h.priority||"normal"]),i=c=>{let h=!1;const l=p=>{const y=I(p.name,p.aliases);if(y.includes(c)){h=!0;for(const f of y)s.delete(f);return!1}return!0};return t=t.filter(l),e=e.filter(l),h},a=c=>{let h=!1;const l=p=>{if(p.middleware===c){h=!0;for(const y of I(p.name,p.aliases))s.delete(y);return!1}return!0};return t=t.filter(l),e=e.filter(l),h},u=c=>(t.forEach(h=>{c.add(h.middleware,{...h})}),e.forEach(h=>{c.addRelativeTo(h.middleware,{...h})}),c.identifyOnResolve?.(m.identifyOnResolve()),c),o=c=>{const h=[];return c.before.forEach(l=>{l.before.length===0&&l.after.length===0?h.push(l):h.push(...o(l))}),h.push(c),c.after.reverse().forEach(l=>{l.before.length===0&&l.after.length===0?h.push(l):h.push(...o(l))}),h},d=(c=!1)=>{const h=[],l=[],p={};return t.forEach(f=>{const g={...f,before:[],after:[]};for(const w of I(g.name,g.aliases))p[w]=g;h.push(g)}),e.forEach(f=>{const g={...f,before:[],after:[]};for(const w of I(g.name,g.aliases))p[w]=g;l.push(g)}),l.forEach(f=>{if(f.toMiddleware){const g=p[f.toMiddleware];if(g===void 0){if(c)return;throw new Error(`${f.toMiddleware} is not found when adding ${C(f.name,f.aliases)} middleware ${f.relation} ${f.toMiddleware}`)}f.relation==="after"&&g.after.push(f),f.relation==="before"&&g.before.push(f)}}),n(h).map(o).reduce((f,g)=>(f.push(...g),f),[])},m={add:(c,h={})=>{const{name:l,override:p,aliases:y}=h,f={step:"initialize",priority:"normal",middleware:c,...h},g=I(l,y);if(g.length>0){if(g.some(w=>s.has(w))){if(!p)throw new Error(`Duplicate middleware name '${C(l,y)}'`);for(const w of g){const v=t.findIndex(D=>D.name===w||D.aliases?.some(Y=>Y===w));if(v===-1)continue;const b=t[v];if(b.step!==f.step||f.priority!==b.priority)throw new Error(`"${C(b.name,b.aliases)}" middleware with ${b.priority} priority in ${b.step} step cannot be overridden by "${C(l,y)}" middleware with ${f.priority} priority in ${f.step} step.`);t.splice(v,1)}}for(const w of g)s.add(w)}t.push(f)},addRelativeTo:(c,h)=>{const{name:l,override:p,aliases:y}=h,f={middleware:c,...h},g=I(l,y);if(g.length>0){if(g.some(w=>s.has(w))){if(!p)throw new Error(`Duplicate middleware name '${C(l,y)}'`);for(const w of g){const v=e.findIndex(D=>D.name===w||D.aliases?.some(Y=>Y===w));if(v===-1)continue;const b=e[v];if(b.toMiddleware!==f.toMiddleware||b.relation!==f.relation)throw new Error(`"${C(b.name,b.aliases)}" middleware ${b.relation} "${b.toMiddleware}" middleware cannot be overridden by "${C(l,y)}" middleware ${f.relation} "${f.toMiddleware}" middleware.`);e.splice(v,1)}}for(const w of g)s.add(w)}e.push(f)},clone:()=>u(J()),use:c=>{c.applyToStack(m)},remove:c=>typeof c=="string"?i(c):a(c),removeByTag:c=>{let h=!1;const l=p=>{const{tags:y,name:f,aliases:g}=p;if(y&&y.includes(c)){const w=I(f,g);for(const v of w)s.delete(v);return h=!0,!1}return!0};return t=t.filter(l),e=e.filter(l),h},concat:c=>{const h=u(J());return h.use(c),h.identifyOnResolve(r||h.identifyOnResolve()||(c.identifyOnResolve?.()??!1)),h},applyToStack:u,identify:()=>d(!0).map(c=>{const h=c.step??c.relation+" "+c.toMiddleware;return C(c.name,c.aliases)+" - "+h}),identifyOnResolve(c){return typeof c=="boolean"&&(r=c),r},resolve:(c,h)=>{for(const l of d().map(p=>p.middleware).reverse())c=l(c,h);return r&&console.log(m.identify()),c}};return m},Re={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},Ee={high:3,normal:2,low:1};class qs{config;middlewareStack=J();initConfig;handlers;constructor(e){this.config=e;const{protocol:r,protocolSettings:s}=e;s&&typeof r=="function"&&(e.protocol=new r(s))}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 $ extends Uint8Array{static fromString(e,r="utf-8"){if(typeof e=="string")return r==="base64"?$.mutate(ut(e)):$.mutate(K(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,$.prototype),e}transformToString(e="utf-8"){return e==="base64"?ht(this):dt(this)}}const Te=async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return $.mutate(t);if(!t)return $.mutate(new Uint8Array);const r=e.streamCollector(t);return $.mutate(await r)},Z=t=>typeof t=="function"?t():t,j=t=>t[ce]||(t[ce]={}),O=t=>{if(typeof t=="function")return t;const e=Promise.resolve(t);return()=>e},Ue=(t,e,r,s,n)=>({name:e,namespace:t,traits:r,input:s,output:n}),gt=t=>(e,r)=>async s=>{const{response:n}=await e(s),{operationSchema:i}=j(r),[,a,u,o,d,m]=i??[];try{const c=await t.protocol.deserializeResponse(Ue(a,u,o,d,m),{...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 h="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{c.message+=`
|
|
3
|
-
`+h}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(h):r.logger?.warn?.(h)}typeof c.$responseBodyText<"u"&&c.$response&&(c.$response.body=c.$responseBodyText);try{if(pe.isInstance(n)){const{headers:l={}}=n,p=Object.entries(l);c.$metadata={httpStatusCode:n.statusCode,requestId:ee(/^x-[\w-]+-request-?id$/,p),extendedRequestId:ee(/^x-[\w-]+-id-2$/,p),cfId:ee(/^x-[\w-]+-cf-id$/,p)}}}catch{}}throw c}},ee=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],wt=t=>(e,r)=>async s=>{const{operationSchema:n}=j(r),[,i,a,u,o,d]=n??[],m=r.endpointV2?.url&&t.urlParser?async()=>t.urlParser(r.endpointV2.url):t.endpoint,c=await t.protocol.serializeRequest(Ue(i,a,u,o,d),s.input,{...t,...r,endpoint:m});return e({...s,request:c})},St={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},bt={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Vs(t){return{applyToStack:e=>{e.add(wt(t),bt),e.add(gt(t),St),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}const ve={it:Symbol.for("@smithy/nor-struct-it")};class T{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=T.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;te(n);)s.push(n[1]),n=n[0],i=Z(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 T){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=Z(i),Rt(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=Z(e);if(r instanceof T)return r;if(te(r)){const[s,n]=r;if(s instanceof T)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 T(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 r=this.getSchema()[0];return r===3||r===-3||r===4}isUnionSchema(){return this.getSchema()[0]===4}isBlobSchema(){const e=this.getSchema();return e===21||e===42}isTimestampSchema(){const e=this.getSchema();return typeof e=="number"&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return 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 k([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 k([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 k(te(n)?n:[n,0],e)}if(this.isDocumentSchema())return k([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(),r=e[4].length;let s=e[ve.it];if(s&&r===s.length){yield*s;return}s=Array(r);for(let n=0;n<r;++n){const i=e[4][n],a=k([e[5][n],0],i);yield s[n]=[i,a]}e[ve.it]=s}}function k(t,e){if(t instanceof T)return Object.assign(t,{memberName:e,_isMemberSchema:!0});const r=T;return new r(t,e)}const te=t=>Array.isArray(t)&&t.length===2,Rt=t=>Array.isArray(t)&&t.length>=5;class A{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 A.registries.has(e)||A.registries.set(e,new A(e)),A.registries.get(e)}register(e,r){const s=this.normalizeShapeId(e);A.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=A.for(s[1]);n.schemas.set(s[1]+"#"+s[2],s),n.exceptions.set(s,r)}getErrorCtor(e){const r=e;return A.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 Ce=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),S=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0")),Et=()=>{if(Ce)return Ce();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 Ae=/^-?\d*(\.\d+)?$/;class ze{string;type;constructor(e,r){if(this.string=e,this.type=r,!Ae.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 ze.prototype.isPrototypeOf(e)||r.type==="bigDecimal"&&Ae.test(r.string)}}class Tt{serdeContext;setSerdeContext(e){this.serdeContext=e}}class vt extends Tt{options;constructor(e){super(),this.options=e}getRequestType(){return P}getResponseType(){return pe}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){if(this.serdeContext?.disableHostPrefix)return;const n=T.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 d=s[o];if(typeof d!="string")throw new Error(`@smithy/core/schema - ${o} in input must be a string as hostLabel.`);a=a.replace(`{${o}}`,d)}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 ft(async()=>{const{EventStreamSerde:r}=await import("./index-BitrXVkV.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 Ws extends vt{async serializeRequest(e,r,s){const n=this.serializer,i={},a={},u=await s.endpoint(),o=T.of(e?.input),d=o.getSchema();let m;const c=new P({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 h={...r};if(r){const l=o.getEventStreamMember();if(l){if(h[l]){const p={};for(const[y,f]of o.structIterator())y!==l&&h[y]&&(n.write(f,h[y]),p[y]=n.flush());m=await this.serializeEventStream({eventStream:h[l],requestSchema:o,initialRequest:p})}}else n.write(d,h),m=n.flush()}return c.headers=a,c.query=i,c.body=m,c.method="POST",c}async deserializeResponse(e,r,s){const n=this.deserializer,i=T.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 d=s.headers[o];delete s.headers[o],s.headers[o.toLowerCase()]=d}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 Gs(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 re="***SensitiveInformation***";function ue(t,e){if(e==null)return e;const r=T.of(t);if(r.getMergedTraits().sensitive)return re;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return re}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return re}else if(r.isStructSchema()&&typeof e=="object"){const s=e,n={};for(const[i,a]of r.structIterator())s[i]!=null&&(n[i]=ue(a,s[i]));return n}return e}class Ct{middlewareStack=J();schema;static classBuilder(){return new At}resolveMiddlewareWithContext(e,r,s,{middlewareFn:n,clientName:i,commandName:a,inputFilterSensitiveLog:u,outputFilterSensitiveLog:o,smithyContext:d,additionalContext:m,CommandCtor:c}){for(const f of n.bind(this)(c,e,r,s))this.middlewareStack.use(f);const h=e.concat(this.middlewareStack),{logger:l}=r,p={logger:l,clientName:i,commandName:a,inputFilterSensitiveLog:u,outputFilterSensitiveLog:o,[ce]:{commandInstance:this,...d},...m},{requestHandler:y}=r;return h.resolve(f=>y.handle(f.request,s||{}),p)}}class At{_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 Ct{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?ue.bind(null,u):d=>d),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(a?ue.bind(null,o):d=>d),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 Ks=(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},Xs=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{}}},xt=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}}},It=t=>{const e={};return t.checksumAlgorithms().forEach(r=>{e[r.algorithmId()]=r.checksumConstructor()}),e},Mt=t=>({setRetryStrategy(e){t.retryStrategy=e},retryStrategy(){return t.retryStrategy}}),$t=t=>{const e={};return e.retryStrategy=t.retryStrategy(),e},Js=t=>Object.assign(xt(t),Mt(t)),Qs=t=>Object.assign(It(t),$t(t));class Ot{trace(){}debug(){}info(){}warn(){}error(){}}const Pt=(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 Nt(t){const e=new Map;for(const r of t)e.set(r.schemeId,r);return e}const _t=(t,e)=>(r,s)=>async n=>{const i=t.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(t,s,n.input)),a=t.authSchemePreference?await t.authSchemePreference():[],u=Pt(i,a),o=Nt(t.httpAuthSchemes),d=j(s),m=[];for(const c of u){const h=o.get(c.schemeId);if(!h){m.push(`HttpAuthScheme \`${c.schemeId}\` was not enabled for this service.`);continue}const l=h.identityProvider(await e.identityProviderConfigProvider(t));if(!l){m.push(`HttpAuthScheme \`${c.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:p={},signingProperties:y={}}=c.propertiesExtractor?.(t,s)||{};c.identityProperties=Object.assign(c.identityProperties||{},p),c.signingProperties=Object.assign(c.signingProperties||{},y),d.selectedHttpAuthScheme={httpAuthOption:c,identity:await l(c.identityProperties),signer:h.signer};break}if(!d.selectedHttpAuthScheme)throw new Error(m.join(`
|
|
4
|
-
`));return r(n)},Dt={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},Ys=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:s=>{s.addRelativeTo(_t(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),Dt)}}),kt={name:"serializerMiddleware"},Lt=t=>e=>{throw e},Ht=(t,e)=>{},Ut=t=>(e,r)=>async s=>{if(!P.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,d=await e({...s,request:await o.sign(s.request,u,a)}).catch((o.errorHandler||Lt)(a));return(o.successHandler||Ht)(d.response,a),d},zt={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Zs=t=>({applyToStack:e=>{e.addRelativeTo(Ut(),zt)}});function Bt(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 en{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 tn{async sign(e,r,s){return e}}const Ft=t=>function(r){return qt(r)&&r.expiration.getTime()-Date.now()<t},jt=3e5,rn=Ft(jt),qt=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 d=>{i||(i=s(d));try{n=await i,a=!0,u=!1}finally{i=void 0}return n};return e===void 0?async d=>((!a||d?.forceRefresh)&&(n=await o(d)),n):async d=>((!a||d?.forceRefresh)&&(n=await o(d)),u?n:r(n)?(e(n)&&await o(d),n):(u=!0,n))};class nn{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 Vt=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}$"),Wt=t=>Vt.test(t)||t.startsWith("[")&&t.endsWith("]"),Gt=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ye=(t,e=!1)=>{if(!e)return Gt.test(t);const r=t.split(".");for(const s of r)if(!ye(s))return!1;return!0},xe={},B="endpoints";function x(t){return typeof t!="object"||t==null?t:"ref"in t?`$${x(t.ref)}`:"fn"in t?`${t.fn}(${(t.argv||[]).map(x).join(", ")})`:JSON.stringify(t,null,2)}class R extends Error{constructor(e){super(e),this.name="EndpointError"}}const Kt=(t,e)=>t===e,Xt=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},Be=(t,e)=>Xt(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),Jt=t=>t!=null,Qt=t=>!t,se={[U.HTTP]:80,[U.HTTPS]:443},Yt=t=>{const e=(()=>{try{if(t instanceof URL)return t;if(typeof t=="object"&&"hostname"in t){const{hostname:h,port:l,protocol:p="",path:y="",query:f={}}=t,g=new URL(`${p}//${h}${l?`:${l}`:""}${y}`);return g.search=Object.entries(f).map(([w,v])=>`${w}=${v}`).join("&"),g}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 d=Wt(n),m=r.includes(`${s}:${se[o]}`)||typeof t=="string"&&t.includes(`${s}:${se[o]}`),c=`${s}${m?`:${se[o]}`:""}`;return{scheme:o,authority:c,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:d}},Zt=(t,e)=>t===e,er=(t,e,r,s)=>e>=r||t.length<r?null:s?t.substring(t.length-r,t.length-e):t.substring(e,r),tr=t=>encodeURIComponent(t).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),rr={booleanEquals:Kt,getAttr:Be,isSet:Jt,isValidHostLabel:ye,not:Qt,parseURL:Yt,stringEquals:Zt,substring:er,uriEncode:tr},Fe=(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,d]=u.split("#");r.push(Be(s[o],d))}else r.push(s[u]);n=a+1}return r.join("")},sr=({ref:t},e)=>({...e.endpointParams,...e.referenceRecord})[t],Q=(t,e,r)=>{if(typeof t=="string")return Fe(t,r);if(t.fn)return qe.callFunction(t,r);if(t.ref)return sr(t,r);throw new R(`'${e}': ${String(t)} is not a string, function or reference.`)},je=({fn:t,argv:e},r)=>{const s=e.map(i=>["boolean","number"].includes(typeof i)?i:qe.evaluateExpression(i,"arg",r)),n=t.split(".");return n[0]in xe&&n[1]!=null?xe[n[0]][n[1]](...s):rr[t](...s)},qe={evaluateExpression:Q,callFunction:je},nr=({assign:t,...e},r)=>{if(t&&t in r.referenceRecord)throw new R(`'${t}' is already defined in Reference Record.`);const s=je(e,r);return r.logger?.debug?.(`${B} evaluateCondition: ${x(e)} = ${x(s)}`),{result:s===""?!0:!!s,...t!=null&&{toAssign:{name:t,value:s}}}},ge=(t=[],e)=>{const r={};for(const s of t){const{result:n,toAssign:i}=nr(s,{...e,referenceRecord:{...e.referenceRecord,...r}});if(!n)return{result:n};i&&(r[i.name]=i.value,e.logger?.debug?.(`${B} assign: ${i.name} := ${x(i.value)}`))}return{result:!0,referenceRecord:r}},ir=(t,e)=>Object.entries(t).reduce((r,[s,n])=>({...r,[s]:n.map(i=>{const a=Q(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]:Ge.getEndpointProperty(n,e)}),{}),We=(t,e)=>{if(Array.isArray(t))return t.map(r=>We(r,e));switch(typeof t){case"string":return Fe(t,e);case"object":if(t===null)throw new R(`Unexpected endpoint property: ${t}`);return Ge.getEndpointProperties(t,e);case"boolean":return t;default:throw new R(`Unexpected endpoint property type: ${typeof t}`)}},Ge={getEndpointProperty:We,getEndpointProperties:Ve},ar=(t,e)=>{const r=Q(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}`)},or=(t,e)=>{const{conditions:r,endpoint:s}=t,{result:n,referenceRecord:i}=ge(r,e);if(!n)return;const a={...e,referenceRecord:{...e.referenceRecord,...i}},{url:u,properties:o,headers:d}=s;return e.logger?.debug?.(`${B} Resolving endpoint from template: ${x(s)}`),{...d!=null&&{headers:ir(d,a)},...o!=null&&{properties:Ve(o,a)},url:ar(u,a)}},cr=(t,e)=>{const{conditions:r,error:s}=t,{result:n,referenceRecord:i}=ge(r,e);if(n)throw new R(Q(s,"Error",{...e,referenceRecord:{...e.referenceRecord,...i}}))},Ke=(t,e)=>{for(const r of t)if(r.type==="endpoint"){const s=or(r,e);if(s)return s}else if(r.type==="error")cr(r,e);else if(r.type==="tree"){const s=Xe.evaluateTreeRule(r,e);if(s)return s}else throw new R(`Unknown endpoint rule: ${r}`);throw new R("Rules evaluation failed")},ur=(t,e)=>{const{conditions:r,rules:s}=t,{result:n,referenceRecord:i}=ge(r,e);if(n)return Xe.evaluateRules(s,{...e,referenceRecord:{...e.referenceRecord,...i}})},Xe={evaluateRules:Ke,evaluateTreeRule:ur},an=(t,e)=>{const{endpointParams:r,logger:s}=e,{parameters:n,rules:i}=t;e.logger?.debug?.(`${B} Initial EndpointParams: ${x(r)}`);const a=Object.entries(n).filter(([,d])=>d.default!=null).map(([d,m])=>[d,m.default]);if(a.length>0)for(const[d,m]of a)r[d]=r[d]??m;const u=Object.entries(n).filter(([,d])=>d.required).map(([d])=>d);for(const d of u)if(r[d]==null)throw new R(`Missing required parameter: '${d}'`);const o=Ke(i,{endpointParams:r,logger:s,referenceRecord:{}});return e.logger?.debug?.(`${B} Resolved endpoint: ${x(o)}`),o};function hr(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=hr(i)),{hostname:e,port:s?parseInt(s):void 0,protocol:n,path:r,query:a}},dr="X-Amz-Algorithm",lr="X-Amz-Credential",Je="X-Amz-Date",fr="X-Amz-SignedHeaders",mr="X-Amz-Expires",Qe="X-Amz-Signature",Ye="X-Amz-Security-Token",Ze="authorization",et=Je.toLowerCase(),pr="date",yr=[Ze,et,pr],gr=Qe.toLowerCase(),de="x-amz-content-sha256",wr=Ye.toLowerCase(),Sr={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},br=/^proxy-/,Rr=/^sec-/,ne="AWS4-HMAC-SHA256",Er="AWS4-HMAC-SHA256-PAYLOAD",Tr="UNSIGNED-PAYLOAD",vr=50,tt="aws4_request",Cr=3600*24*7,q={},ie=[],ae=(t,e,r)=>`${t}/${e}/${r}/${tt}`,Ar=async(t,e,r,s,n)=>{const i=await Ie(t,e.secretAccessKey,e.accessKeyId),a=`${r}:${s}:${n}:${M(i)}:${e.sessionToken}`;if(a in q)return q[a];for(ie.push(a);ie.length>vr;)delete q[ie.shift()];let u=`AWS4${e.secretAccessKey}`;for(const o of[r,s,n,tt])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 Sr||e?.has(i)||br.test(i)||Rr.test(i))&&(!r||r&&!r.has(i))||(s[i]=t[n].trim().replace(/\s+/g," "))}return s},xr=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]",oe=async({headers:t,body:e},r)=>{for(const s of Object.keys(t))if(s.toLowerCase()===de)return t[s];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||xr(e)){const s=new r;return s.update(z(e)),M(await s.digest())}return Tr};class Ir{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 d=new Uint8Array(o.buffer);return d.set(u,3),d;case"timestamp":const m=new Uint8Array(9);return m[0]=8,m.set(we.fromNumber(e.value.valueOf()).bytes,1),m;case"uuid":if(!Mr.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const c=new Uint8Array(17);return c[0]=9,c.set(lt(e.value.replace(/\-/g,"")),1),c}}}var $e;(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"})($e||($e={}));const Mr=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class we{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&&Oe(r),new we(r)}valueOf(){const e=this.bytes.slice(0),r=e[0]&128;return r&&Oe(e),parseInt(M(e),16)*(r?-1:1)}toString(){return String(this.valueOf())}}function Oe(t){for(let e=0;e<8;e++)t[e]^=255;for(let e=7;e>-1&&(t[e]++,t[e]===0);e--);}const $r=(t,e)=>{t=t.toLowerCase();for(const r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},Or=(t,e={})=>{const{headers:r,query:s={}}=P.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}},Pe=t=>{t=P.clone(t);for(const e of Object.keys(t.headers))yr.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},Pr=({query:t={}})=>{const e=[],r={};for(const s of Object.keys(t)){if(s.toLowerCase()===gr)continue;const n=V(s);e.push(n);const i=t[s];typeof i=="string"?r[n]=`${n}=${V(i)}`:Array.isArray(i)&&(r[n]=i.slice(0).reduce((a,u)=>a.concat([`${n}=${V(u)}`]),[]).sort().join("&"))}return e.sort().map(s=>r[s]).filter(s=>s).join("&")},Nr=t=>_r(t).toISOString().replace(/\.\d{3}Z$/,"Z"),_r=t=>typeof t=="number"?new Date(t*1e3):typeof t=="string"?Number(t)?new Date(Number(t)*1e3):new Date(t):t;class Dr{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=O(s),this.credentialProvider=O(r)}createCanonicalRequest(e,r,s){const n=Object.keys(r).sort();return`${e.method}
|
|
5
|
-
${this.getCanonicalPath(e)}
|
|
6
|
-
${Pr(e)}
|
|
7
|
-
${n.map(i=>`${i}:${r[i]}`).join(`
|
|
8
|
-
`)}
|
|
9
|
-
|
|
10
|
-
${n.join(";")}
|
|
11
|
-
${s}`}async createStringToSign(e,r,s,n){const i=new this.sha256;i.update(z(s));const a=await i.digest();return`${n}
|
|
12
|
-
${e}
|
|
13
|
-
${r}
|
|
14
|
-
${M(a)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const r=[];for(const i of e.split("/"))i?.length!==0&&i!=="."&&(i===".."?r.pop():r.push(i));const s=`${e?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&e?.endsWith("/")?"/":""}`;return V(s).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){const r=Nr(e).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class on extends Dr{headerFormatter=new Ir;constructor({applyChecksum:e,credentials:r,region:s,service:n,sha256:i,uriEscapePath:a=!0}){super({applyChecksum:e,credentials:r,region:s,service:n,sha256:i,uriEscapePath:a})}async presign(e,r={}){const{signingDate:s=new Date,expiresIn:n=3600,unsignableHeaders:i,unhoistableHeaders:a,signableHeaders:u,hoistableHeaders:o,signingRegion:d,signingService:m}=r,c=await this.credentialProvider();this.validateResolvedCredentials(c);const h=d??await this.regionProvider(),{longDate:l,shortDate:p}=this.formatDate(s);if(n>Cr)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const y=ae(p,h,m??this.service),f=Or(Pe(e),{unhoistableHeaders:a,hoistableHeaders:o});c.sessionToken&&(f.query[Ye]=c.sessionToken),f.query[dr]=ne,f.query[lr]=`${c.accessKeyId}/${y}`,f.query[Je]=l,f.query[mr]=n.toString(10);const g=Me(f,i,u);return f.query[fr]=this.getCanonicalHeaderList(g),f.query[Qe]=await this.getSignature(l,y,this.getSigningKey(c,h,p,m),this.createCanonicalRequest(f,g,await oe(e,this.sha256))),f}async sign(e,r){return typeof e=="string"?this.signString(e,r):e.headers&&e.payload?this.signEvent(e,r):e.message?this.signMessage(e,r):this.signRequest(e,r)}async signEvent({headers:e,payload:r},{signingDate:s=new Date,priorSignature:n,signingRegion:i,signingService:a}){const u=i??await this.regionProvider(),{shortDate:o,longDate:d}=this.formatDate(s),m=ae(o,u,a??this.service),c=await oe({headers:{},body:r},this.sha256),h=new this.sha256;h.update(e);const l=M(await h.digest()),p=[Er,d,m,n,l,c].join(`
|
|
15
|
-
`);return this.signString(p,{signingDate:s,signingRegion:u,signingService:a})}async signMessage(e,{signingDate:r=new Date,signingRegion:s,signingService:n}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:r,signingRegion:s,signingService:n,priorSignature:e.priorSignature}).then(a=>({message:e.message,signature:a}))}async signString(e,{signingDate:r=new Date,signingRegion:s,signingService:n}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const a=s??await this.regionProvider(),{shortDate:u}=this.formatDate(r),o=new this.sha256(await this.getSigningKey(i,a,u,n));return o.update(z(e)),M(await o.digest())}async signRequest(e,{signingDate:r=new Date,signableHeaders:s,unsignableHeaders:n,signingRegion:i,signingService:a}={}){const u=await this.credentialProvider();this.validateResolvedCredentials(u);const o=i??await this.regionProvider(),d=Pe(e),{longDate:m,shortDate:c}=this.formatDate(r),h=ae(c,o,a??this.service);d.headers[et]=m,u.sessionToken&&(d.headers[wr]=u.sessionToken);const l=await oe(d,this.sha256);!$r(de,d.headers)&&this.applyChecksum&&(d.headers[de]=l);const p=Me(d,n,s),y=await this.getSignature(m,h,this.getSigningKey(u,o,c,a),this.createCanonicalRequest(d,p,l));return d.headers[Ze]=`${ne} Credential=${u.accessKeyId}/${h}, SignedHeaders=${this.getCanonicalHeaderList(p)}, Signature=${y}`,d}async getSignature(e,r,s,n){const i=await this.createStringToSign(e,r,n,ne),a=new this.sha256(await s);return a.update(z(i)),M(await a.digest())}getSigningKey(e,r,s,n){return Ar(this.sha256,e,s,r,n||this.service)}}const Ne=typeof TextEncoder=="function"?new TextEncoder:null,cn=t=>{if(typeof t=="string"){if(Ne)return Ne.encode(t).byteLength;let e=t.length;for(let r=e-1;r>=0;r--){const s=t.charCodeAt(r);s>127&&s<=2047?e++:s>2047&&s<=65535&&(e+=2),s>=56320&&s<=57343&&r--}return e}else{if(typeof t.byteLength=="number")return t.byteLength;if(typeof t.size=="number")return t.size}throw new Error(`Body Length computation failed for ${t}`)},un=!1,hn=!1,_e=new Set,kr=(t,e=ye)=>{if(!_e.has(t)&&!e(t))if(t==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${t}" is not a valid hostname component.`);else _e.add(t)},rt=t=>typeof t=="string"&&(t.startsWith("fips-")||t.endsWith("-fips")),Lr=t=>rt(t)?["fips-aws-global","aws-fips"].includes(t)?"us-east-1":t.replace(/fips-(dkr-|prod-)?|-fips/,""):t,dn=t=>{const{region:e,useFipsEndpoint:r}=t;if(!e)throw new Error("Region is missing");return Object.assign(t,{region:async()=>{const s=typeof e=="function"?await e():e,n=Lr(s);return kr(n),n},useFipsEndpoint:async()=>{const s=typeof e=="string"?e:await e();return rt(s)?!0:typeof r!="function"?Promise.resolve(!!r):r()}})},De="content-length";function Hr(t){return e=>async r=>{const s=r.request;if(P.isInstance(s)){const{body:n,headers:i}=s;if(n&&Object.keys(i).map(a=>a.toLowerCase()).indexOf(De)===-1)try{const a=t(n);s.headers={...s.headers,[De]:String(a)}}catch{}}return e({...r,request:s})}}const Ur={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ln=t=>({applyToStack:e=>{e.add(Hr(t.bodyLengthChecker),Ur)}}),zr=async t=>{const e=t?.Bucket||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Vr(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!qr(e)||e.indexOf(".")!==-1&&!String(t.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(t.ForcePathStyle=!0);return t.DisableMultiRegionAccessPoints&&(t.disableMultiRegionAccessPoints=!0,t.DisableMRAP=!0),t},Br=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Fr=/(\d+\.){3}\d+/,jr=/\.\./,qr=t=>Br.test(t)&&!Fr.test(t)&&!jr.test(t),Vr=t=>{const[e,r,s,,,n]=t.split(":"),i=e==="arn"&&t.split(":").length>=6,a=!!(i&&r&&s&&n);if(i&&!a)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return a},Wr=(t,e,r,s=!1)=>{const n=async()=>{let i;return s?i=r.clientContextParams?.[t]??r[t]??r[e]:i=r[t]??r[e],typeof i=="function"?i():i};return t==="credentialScope"||e==="CredentialScope"?async()=>{const i=typeof r.credentials=="function"?await r.credentials():r.credentials;return i?.credentialScope??i?.CredentialScope}:t==="accountId"||e==="AccountId"?async()=>{const i=typeof r.credentials=="function"?await r.credentials():r.credentials;return i?.accountId??i?.AccountId}:t==="endpoint"||e==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;const i=await n();if(i&&typeof i=="object"){if("url"in i)return i.url.href;if("hostname"in i){const{protocol:a,hostname:u,port:o,path:d}=i;return`${a}//${u}${o?":"+o:""}${d}`}}return i}:n},st=async t=>{},nt=t=>typeof t=="object"?"url"in t?he(t.url):t:he(t),Gr=async(t,e,r,s)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await st(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(nt(a)),r.isCustomEndpoint=!0)}const n=await Kr(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(n,s)},Kr=async(t,e,r)=>{const s={},n=e?.getEndpointParameterInstructions?.()||{};for(const[i,a]of Object.entries(n))switch(a.type){case"staticContextParams":s[i]=a.value;break;case"contextParams":s[i]=t[a.name];break;case"clientContextParams":case"builtInParams":s[i]=await Wr(a.name,i,r,a.type!=="builtInParams")();break;case"operationContextParams":s[i]=a.get(t);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(n).length===0&&Object.assign(s,r),String(r.serviceId).toLowerCase()==="s3"&&await zr(s),s},Xr=({config:t,instructions:e})=>(r,s)=>async n=>{t.isCustomEndpoint&&Bt(s,"ENDPOINT_OVERRIDE","N");const i=await Gr(n.input,{getEndpointParameterInstructions(){return e}},{...t},s);s.endpointV2=i,s.authSchemes=i.properties?.authSchemes;const a=s.authSchemes?.[0];if(a){s.signing_region=a.signingRegion,s.signing_service=a.signingName;const o=j(s)?.selectedHttpAuthScheme?.httpAuthOption;o&&(o.signingProperties=Object.assign(o.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...n})},Jr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:kt.name},fn=(t,e)=>({applyToStack:r=>{r.addRelativeTo(Xr({config:t,instructions:e}),Jr)}}),mn=t=>{const e=t.tls??!0,{endpoint:r,useDualstackEndpoint:s,useFipsEndpoint:n}=t,i=r!=null?async()=>nt(await O(r)()):void 0,u=Object.assign(t,{endpoint:i,tls:e,isCustomEndpoint:!!r,useDualstackEndpoint:O(s??!1),useFipsEndpoint:O(n??!1)});let o;return u.serviceConfiguredEndpoint=async()=>(t.serviceId&&!o&&(o=st(t.serviceId)),o),u};var _;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(_||(_={}));const le=3,pn=_.STANDARD,Qr=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Yr=["TimeoutError","RequestTimeout","RequestTimeoutException"],Zr=[500,502,503,504],es=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],ts=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],rs=t=>t?.$retryable!==void 0,ss=t=>t.$metadata?.clockSkewCorrected,ns=t=>{const e=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return t&&t instanceof TypeError?e.has(t.message):!1},it=t=>t.$metadata?.httpStatusCode===429||Qr.includes(t.name)||t.$retryable?.throttling==!0,Se=(t,e=0)=>rs(t)||ss(t)||Yr.includes(t.name)||es.includes(t?.code||"")||ts.includes(t?.code||"")||Zr.includes(t.$metadata?.httpStatusCode||0)||ns(t)||t.cause!==void 0&&e<=10&&Se(t.cause,e+1),is=t=>{if(t.$metadata?.httpStatusCode!==void 0){const e=t.$metadata.httpStatusCode;return 500<=e&&e<=599&&!Se(t)}return!1};class be{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 r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const r=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise(s=>be.setTimeoutFn(s,r))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}const r=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+r),this.lastTimestamp=e}updateClientSendingRate(e){let r;if(this.updateMeasuredRate(),it(e)){const n=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=n,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(n),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());const s=Math.min(r,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(),r=Math.floor(e*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){const s=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(e){return parseFloat(e.toFixed(8))}}const fe=100,at=20*1e3,as=500,ke=500,os=5,cs=10,us=1,hs="amz-sdk-invocation-id",ds="amz-sdk-request",ls=()=>{let t=fe;return{computeNextBackoffDelay:s=>Math.floor(Math.min(at,Math.random()*2**s*t)),setDelayBase:s=>{t=s}}},Le=({retryDelay:t,retryCount:e,retryCost:r})=>({getRetryCount:()=>e,getRetryDelay:()=>Math.min(at,t),getRetryCost:()=>r});class ot{maxAttempts;mode=_.STANDARD;capacity=ke;retryBackoffStrategy=ls();maxAttemptsProvider;constructor(e){this.maxAttempts=e,this.maxAttemptsProvider=typeof e=="function"?e:async()=>e}async acquireInitialRetryToken(e){return Le({retryDelay:fe,retryCount:0})}async refreshRetryTokenForRetry(e,r){const s=await this.getMaxAttempts();if(this.shouldRetry(e,r,s)){const n=r.errorType;this.retryBackoffStrategy.setDelayBase(n==="THROTTLING"?as:fe);const i=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),a=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,i):i,u=this.getCapacityCost(n);return this.capacity-=u,Le({retryDelay:a,retryCount:e.getRetryCount()+1,retryCost:u})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(ke,this.capacity+(e.getRetryCost()??us))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${le}`),le}}shouldRetry(e,r,s){return e.getRetryCount()+1<s&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(e){return e==="TRANSIENT"?cs:os}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class fs{maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=_.ADAPTIVE;constructor(e,r){this.maxAttemptsProvider=e;const{rateLimiter:s}=r??{};this.rateLimiter=s??new be,this.standardRetryStrategy=new ot(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(e,r)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const ms=t=>t instanceof Error?t:t instanceof Object?Object.assign(new Error,t):typeof t=="string"?new Error(t):new Error(`AWS SDK error wrapper for ${t}`),yn=t=>{const{retryStrategy:e,retryMode:r,maxAttempts:s}=t,n=O(s??le);return Object.assign(t,{maxAttempts:n,retryStrategy:async()=>e||(await O(r)()===_.ADAPTIVE?new fs(n):new ot(n))})},ps=t=>t?.body instanceof ReadableStream,ys=t=>(e,r)=>async s=>{let n=await t.retryStrategy();const i=await t.maxAttempts();if(gs(n)){n=n;let a=await n.acquireInitialRetryToken(r.partition_id),u=new Error,o=0,d=0;const{request:m}=s,c=P.isInstance(m);for(c&&(m.headers[hs]=Et());;)try{c&&(m.headers[ds]=`attempt=${o+1}; max=${i}`);const{response:h,output:l}=await e(s);return n.recordSuccess(a),l.$metadata.attempts=o+1,l.$metadata.totalRetryDelay=d,{response:h,output:l}}catch(h){const l=ws(h);if(u=ms(h),c&&ps(m))throw(r.logger instanceof Ot?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),u;try{a=await n.refreshRetryTokenForRetry(a,l)}catch{throw u.$metadata||(u.$metadata={}),u.$metadata.attempts=o+1,u.$metadata.totalRetryDelay=d,u}o=a.getRetryCount();const p=a.getRetryDelay();d+=p,await new Promise(y=>setTimeout(y,p))}}else return n=n,n?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",n.mode]]),n.retry(e,s)},gs=t=>typeof t.acquireInitialRetryToken<"u"&&typeof t.refreshRetryTokenForRetry<"u"&&typeof t.recordSuccess<"u",ws=t=>{const e={error:t,errorType:Ss(t)},r=Rs(t.$response);return r&&(e.retryAfterHint=r),e},Ss=t=>it(t)?"THROTTLING":Se(t)?"TRANSIENT":is(t)?"SERVER_ERROR":"CLIENT_ERROR",bs={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},gn=t=>({applyToStack:e=>{e.add(ys(t),bs)}}),Rs=t=>{if(!pe.isInstance(t))return;const e=Object.keys(t.headers).find(i=>i.toLowerCase()==="retry-after");if(!e)return;const r=t.headers[e],s=Number(r);return Number.isNaN(s)?new Date(r):new Date(s*1e3)},Es=t=>new TextEncoder().encode(t);var Ts=typeof Buffer<"u"&&Buffer.from?function(t){return Buffer.from(t,"utf8")}:Es;function F(t){return t instanceof Uint8Array?t:typeof t=="string"?Ts(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}function me(t){return typeof t=="string"?t.length===0:t.byteLength===0}var ct={name:"SHA-256"},He={name:"HMAC",hash:ct},vs=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 Cs={};function W(){return typeof window<"u"?window:typeof self<"u"?self:Cs}var As=(function(){function t(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return t.prototype.update=function(e){if(!me(e)){var r=F(e),s=new Uint8Array(this.toHash.byteLength+r.byteLength);s.set(this.toHash,0),s.set(r,this.toHash.byteLength),this.toHash=s}},t.prototype.digest=function(){var e=this;return this.key?this.key.then(function(r){return W().crypto.subtle.sign(He,r,e.toHash).then(function(s){return new Uint8Array(s)})}):me(this.toHash)?Promise.resolve(vs):Promise.resolve().then(function(){return W().crypto.subtle.digest(ct,e.toHash)}).then(function(r){return Promise.resolve(new Uint8Array(r))})},t.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(r,s){W().crypto.subtle.importKey("raw",F(e.secret),He,!1,["sign"]).then(r,s)}),this.key.catch(function(){}))},t})(),E=64,xs=32,Is=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]),Ms=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],$s=Math.pow(2,53)-1,G=(function(){function t(){this.state=Int32Array.from(Ms),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return t.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var r=0,s=e.byteLength;if(this.bytesHashed+=s,this.bytesHashed*8>$s)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;s>0;)this.buffer[this.bufferLength++]=e[r++],s--,this.bufferLength===E&&(this.hashBuffer(),this.bufferLength=0)},t.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,r=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),s=this.bufferLength;if(r.setUint8(this.bufferLength++,128),s%E>=E-8){for(var n=this.bufferLength;n<E;n++)r.setUint8(n,0);this.hashBuffer(),this.bufferLength=0}for(var n=this.bufferLength;n<E-8;n++)r.setUint8(n,0);r.setUint32(E-8,Math.floor(e/4294967296),!0),r.setUint32(E-4,e),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(xs),n=0;n<8;n++)i[n*4]=this.state[n]>>>24&255,i[n*4+1]=this.state[n]>>>16&255,i[n*4+2]=this.state[n]>>>8&255,i[n*4+3]=this.state[n]>>>0&255;return i},t.prototype.hashBuffer=function(){for(var e=this,r=e.buffer,s=e.state,n=s[0],i=s[1],a=s[2],u=s[3],o=s[4],d=s[5],m=s[6],c=s[7],h=0;h<E;h++){if(h<16)this.temp[h]=(r[h*4]&255)<<24|(r[h*4+1]&255)<<16|(r[h*4+2]&255)<<8|r[h*4+3]&255;else{var l=this.temp[h-2],p=(l>>>17|l<<15)^(l>>>19|l<<13)^l>>>10;l=this.temp[h-15];var y=(l>>>7|l<<25)^(l>>>18|l<<14)^l>>>3;this.temp[h]=(p+this.temp[h-7]|0)+(y+this.temp[h-16]|0)}var f=(((o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7))+(o&d^~o&m)|0)+(c+(Is[h]+this.temp[h]|0)|0)|0,g=((n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10))+(n&i^n&a^i&a)|0;c=m,m=d,d=o,o=u+f|0,u=a,a=i,i=n,n=f+g|0}s[0]+=n,s[1]+=i,s[2]+=a,s[3]+=u,s[4]+=o,s[5]+=d,s[6]+=m,s[7]+=c},t})(),Os=(function(){function t(e){this.secret=e,this.hash=new G,this.reset()}return t.prototype.update=function(e){if(!(me(e)||this.error))try{this.hash.update(F(e))}catch(r){this.error=r}},t.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()},t.prototype.digest=function(){return mt(this,void 0,void 0,function(){return pt(this,function(e){return[2,this.digestSync()]})})},t.prototype.reset=function(){if(this.hash=new G,this.secret){this.outer=new G;var e=Ps(this.secret),r=new Uint8Array(E);r.set(e);for(var s=0;s<E;s++)e[s]^=54,r[s]^=92;this.hash.update(e),this.outer.update(r);for(var s=0;s<e.byteLength;s++)e[s]=0}},t})();function Ps(t){var e=F(t);if(e.byteLength>E){var r=new G;r.update(e),e=r.digest()}var s=new Uint8Array(E);return s.set(e),s}var Ns=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function _s(t){if(Ds(t)&&typeof t.crypto.subtle=="object"){var e=t.crypto.subtle;return ks(e)}return!1}function Ds(t){if(typeof t=="object"&&typeof t.crypto=="object"){var e=t.crypto.getRandomValues;return typeof e=="function"}return!1}function ks(t){return t&&Ns.every(function(e){return typeof t[e]=="function"})}var wn=(function(){function t(e){_s(W())?this.hash=new As(e):this.hash=new Os(e)}return t.prototype.update=function(e,r){this.hash.update(F(e))},t.prototype.digest=function(){return this.hash.digest()},t.prototype.reset=function(){this.hash.reset()},t})();const Sn=t=>()=>Promise.reject(t),Ls=["in-region","cross-region","mobile","standard","legacy"],bn=({defaultsMode:t}={})=>yt(async()=>{const e=typeof t=="function"?await t():t;switch(e?.toLowerCase()){case"auto":return Promise.resolve(Hs()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(e?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${Ls.join(", ")}, got ${e}`)}}),Hs=()=>{const t=window?.navigator;if(t?.connection){const{effectiveType:e,rtt:r,downlink:s}=t?.connection;if(typeof e=="string"&&e!=="4g"||Number(r)>100||Number(s)<10)return!0}return t?.userAgentData?.mobile||typeof t?.maxTouchPoints=="number"&&t?.maxTouchPoints>1};export{Js as A,Fs as B,Qs as C,pn as D,nn as E,js as F,qs as G,yn as H,dn as I,mn as J,Vs as K,N as L,gn as M,T as N,ln as O,Ys as P,Zs as Q,Ws as R,on as S,A as T,en as U,H as V,Ct as W,fn as X,Tt as Y,Wt as a,rn as b,xe as c,qt as d,Ks as e,ze as f,Te as g,Gs as h,ye as i,Z as j,j as k,Ot as l,sn as m,O as n,tn as o,he as p,bn as q,an as r,wn as s,Sn as t,le as u,Et as v,cn as w,hn as x,un as y,Xs as z};
|
package/assets/util-B4ZV5RJW.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{d as sr,e as X,f as jr,g as wr,h as Or,i as vr,j as Br,k as Tr,c as Ir}from"./index-BT-B0wMw.js";var er={},nr={},tr,cr;function Pr(){if(cr)return tr;cr=1;var i=sr()(),p=X(),h=p("Object.prototype.toString"),l=function(u){return i&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:h(u)==="[object Arguments]"},g=function(u){return l(u)?!0:u!==null&&typeof u=="object"&&"length"in u&&typeof u.length=="number"&&u.length>=0&&h(u)!=="[object Array]"&&"callee"in u&&h(u.callee)==="[object Function]"},d=(function(){return l(arguments)})();return l.isLegacyArguments=g,tr=d?l:g,tr}var ir,yr;function kr(){if(yr)return ir;yr=1;var i=X(),p=sr()(),h=wr(),l=jr(),g;if(p){var d=i("RegExp.prototype.exec"),A={},u=function(){throw A},m={toString:u,valueOf:u};typeof Symbol.toPrimitive=="symbol"&&(m[Symbol.toPrimitive]=u),g=function(S){if(!S||typeof S!="object")return!1;var I=l(S,"lastIndex"),B=I&&h(I,"value");if(!B)return!1;try{d(S,m)}catch(F){return F===A}}}else{var O=i("Object.prototype.toString"),E="[object RegExp]";g=function(S){return!S||typeof S!="object"&&typeof S!="function"?!1:O(S)===E}}return ir=g,ir}var or,lr;function Er(){if(lr)return or;lr=1;var i=X(),p=kr(),h=i("RegExp.prototype.exec"),l=Or();return or=function(d){if(!p(d))throw new l("`regex` must be a RegExp");return function(u){return h(d,u)!==null}},or}var fr,pr;function Fr(){if(pr)return fr;pr=1;const i=function*(){}.constructor;return fr=()=>i,fr}var ur,gr;function Rr(){if(gr)return ur;gr=1;var i=X(),p=Er(),h=p(/^\s*(?:function)?\*/),l=sr()(),g=vr(),d=i("Object.prototype.toString"),A=i("Function.prototype.toString"),u=Fr();return ur=function(O){if(typeof O!="function")return!1;if(h(A(O)))return!0;if(!l){var E=d(O);return E==="[object GeneratorFunction]"}if(!g)return!1;var w=u();return w&&g(O)===w.prototype},ur}var dr;function Dr(){return dr||(dr=1,(function(i){var p=Pr(),h=Rr(),l=Tr(),g=Br();function d(n){return n.call.bind(n)}var A=typeof BigInt<"u",u=typeof Symbol<"u",m=d(Object.prototype.toString),O=d(Number.prototype.valueOf),E=d(String.prototype.valueOf),w=d(Boolean.prototype.valueOf);if(A)var S=d(BigInt.prototype.valueOf);if(u)var I=d(Symbol.prototype.valueOf);function B(n,Sr){if(typeof n!="object")return!1;try{return Sr(n),!0}catch{return!1}}i.isArgumentsObject=p,i.isGeneratorFunction=h,i.isTypedArray=g;function F(n){return typeof Promise<"u"&&n instanceof Promise||n!==null&&typeof n=="object"&&typeof n.then=="function"&&typeof n.catch=="function"}i.isPromise=F;function Y(n){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(n):g(n)||r(n)}i.isArrayBufferView=Y;function H(n){return l(n)==="Uint8Array"}i.isUint8Array=H;function C(n){return l(n)==="Uint8ClampedArray"}i.isUint8ClampedArray=C;function U(n){return l(n)==="Uint16Array"}i.isUint16Array=U;function x(n){return l(n)==="Uint32Array"}i.isUint32Array=x;function J(n){return l(n)==="Int8Array"}i.isInt8Array=J;function q(n){return l(n)==="Int16Array"}i.isInt16Array=q;function $(n){return l(n)==="Int32Array"}i.isInt32Array=$;function T(n){return l(n)==="Float32Array"}i.isFloat32Array=T;function R(n){return l(n)==="Float64Array"}i.isFloat64Array=R;function P(n){return l(n)==="BigInt64Array"}i.isBigInt64Array=P;function M(n){return l(n)==="BigUint64Array"}i.isBigUint64Array=M;function v(n){return m(n)==="[object Map]"}v.working=typeof Map<"u"&&v(new Map);function z(n){return typeof Map>"u"?!1:v.working?v(n):n instanceof Map}i.isMap=z;function G(n){return m(n)==="[object Set]"}G.working=typeof Set<"u"&&G(new Set);function V(n){return typeof Set>"u"?!1:G.working?G(n):n instanceof Set}i.isSet=V;function k(n){return m(n)==="[object WeakMap]"}k.working=typeof WeakMap<"u"&&k(new WeakMap);function rr(n){return typeof WeakMap>"u"?!1:k.working?k(n):n instanceof WeakMap}i.isWeakMap=rr;function _(n){return m(n)==="[object WeakSet]"}_.working=typeof WeakSet<"u"&&_(new WeakSet);function L(n){return _(n)}i.isWeakSet=L;function j(n){return m(n)==="[object ArrayBuffer]"}j.working=typeof ArrayBuffer<"u"&&j(new ArrayBuffer);function Z(n){return typeof ArrayBuffer>"u"?!1:j.working?j(n):n instanceof ArrayBuffer}i.isArrayBuffer=Z;function N(n){return m(n)==="[object DataView]"}N.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&N(new DataView(new ArrayBuffer(1),0,1));function r(n){return typeof DataView>"u"?!1:N.working?N(n):n instanceof DataView}i.isDataView=r;var e=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function t(n){return m(n)==="[object SharedArrayBuffer]"}function o(n){return typeof e>"u"?!1:(typeof t.working>"u"&&(t.working=t(new e)),t.working?t(n):n instanceof e)}i.isSharedArrayBuffer=o;function s(n){return m(n)==="[object AsyncFunction]"}i.isAsyncFunction=s;function c(n){return m(n)==="[object Map Iterator]"}i.isMapIterator=c;function f(n){return m(n)==="[object Set Iterator]"}i.isSetIterator=f;function a(n){return m(n)==="[object Generator]"}i.isGeneratorObject=a;function y(n){return m(n)==="[object WebAssembly.Module]"}i.isWebAssemblyCompiledModule=y;function b(n){return B(n,O)}i.isNumberObject=b;function D(n){return B(n,E)}i.isStringObject=D;function K(n){return B(n,w)}i.isBooleanObject=K;function W(n){return A&&B(n,S)}i.isBigIntObject=W;function Q(n){return u&&B(n,I)}i.isSymbolObject=Q;function hr(n){return b(n)||D(n)||K(n)||W(n)||Q(n)}i.isBoxedPrimitive=hr;function Ar(n){return typeof Uint8Array<"u"&&(Z(n)||o(n))}i.isAnyArrayBuffer=Ar,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(n){Object.defineProperty(i,n,{enumerable:!1,value:function(){throw new Error(n+" is not supported in userland")}})})})(nr)),nr}var ar,mr;function Ur(){return mr||(mr=1,ar=function(p){return p&&typeof p=="object"&&typeof p.copy=="function"&&typeof p.fill=="function"&&typeof p.readUInt8=="function"}),ar}var br;function zr(){return br||(br=1,(function(i){var p={},h=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),o={},s=0;s<t.length;s++)o[t[s]]=Object.getOwnPropertyDescriptor(e,t[s]);return o},l=/%[sdj%]/g;i.format=function(r){if(!q(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(u(arguments[t]));return e.join(" ")}for(var t=1,o=arguments,s=o.length,c=String(r).replace(l,function(a){if(a==="%%")return"%";if(t>=s)return a;switch(a){case"%s":return String(o[t++]);case"%d":return Number(o[t++]);case"%j":try{return JSON.stringify(o[t++])}catch{return"[Circular]"}default:return a}}),f=o[t];t<s;f=o[++t])U(f)||!P(f)?c+=" "+f:c+=" "+u(f);return c},i.deprecate=function(r,e){if(typeof process<"u"&&process.noDeprecation===!0)return r;if(typeof process>"u")return function(){return i.deprecate(r,e).apply(this,arguments)};var t=!1;function o(){if(!t){if(process.throwDeprecation)throw new Error(e);process.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return o};var g={},d=/^$/;if(p.NODE_DEBUG){var A=p.NODE_DEBUG;A=A.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),d=new RegExp("^"+A+"$","i")}i.debuglog=function(r){if(r=r.toUpperCase(),!g[r])if(d.test(r)){var e=process.pid;g[r]=function(){var t=i.format.apply(i,arguments);console.error("%s %d: %s",r,e,t)}}else g[r]=function(){};return g[r]};function u(r,e){var t={seen:[],stylize:O};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),C(e)?t.showHidden=e:e&&i._extend(t,e),T(t.showHidden)&&(t.showHidden=!1),T(t.depth)&&(t.depth=2),T(t.colors)&&(t.colors=!1),T(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=m),w(t,r,t.depth)}i.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function m(r,e){var t=u.styles[e];return t?"\x1B["+u.colors[t][0]+"m"+r+"\x1B["+u.colors[t][1]+"m":r}function O(r,e){return r}function E(r){var e={};return r.forEach(function(t,o){e[t]=!0}),e}function w(r,e,t){if(r.customInspect&&e&&z(e.inspect)&&e.inspect!==i.inspect&&!(e.constructor&&e.constructor.prototype===e)){var o=e.inspect(t,r);return q(o)||(o=w(r,o,t)),o}var s=S(r,e);if(s)return s;var c=Object.keys(e),f=E(c);if(r.showHidden&&(c=Object.getOwnPropertyNames(e)),v(e)&&(c.indexOf("message")>=0||c.indexOf("description")>=0))return I(e);if(c.length===0){if(z(e)){var a=e.name?": "+e.name:"";return r.stylize("[Function"+a+"]","special")}if(R(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(M(e))return r.stylize(Date.prototype.toString.call(e),"date");if(v(e))return I(e)}var y="",b=!1,D=["{","}"];if(H(e)&&(b=!0,D=["[","]"]),z(e)){var K=e.name?": "+e.name:"";y=" [Function"+K+"]"}if(R(e)&&(y=" "+RegExp.prototype.toString.call(e)),M(e)&&(y=" "+Date.prototype.toUTCString.call(e)),v(e)&&(y=" "+I(e)),c.length===0&&(!b||e.length==0))return D[0]+y+D[1];if(t<0)return R(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var W;return b?W=B(r,e,t,f,c):W=c.map(function(Q){return F(r,e,t,f,Q,b)}),r.seen.pop(),Y(W,y,D)}function S(r,e){if(T(e))return r.stylize("undefined","undefined");if(q(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(J(e))return r.stylize(""+e,"number");if(C(e))return r.stylize(""+e,"boolean");if(U(e))return r.stylize("null","null")}function I(r){return"["+Error.prototype.toString.call(r)+"]"}function B(r,e,t,o,s){for(var c=[],f=0,a=e.length;f<a;++f)L(e,String(f))?c.push(F(r,e,t,o,String(f),!0)):c.push("");return s.forEach(function(y){y.match(/^\d+$/)||c.push(F(r,e,t,o,y,!0))}),c}function F(r,e,t,o,s,c){var f,a,y;if(y=Object.getOwnPropertyDescriptor(e,s)||{value:e[s]},y.get?y.set?a=r.stylize("[Getter/Setter]","special"):a=r.stylize("[Getter]","special"):y.set&&(a=r.stylize("[Setter]","special")),L(o,s)||(f="["+s+"]"),a||(r.seen.indexOf(y.value)<0?(U(t)?a=w(r,y.value,null):a=w(r,y.value,t-1),a.indexOf(`
|
|
2
|
-
`)>-1&&(c?a=a.split(`
|
|
3
|
-
`).map(function(b){return" "+b}).join(`
|
|
4
|
-
`).slice(2):a=`
|
|
5
|
-
`+a.split(`
|
|
6
|
-
`).map(function(b){return" "+b}).join(`
|
|
7
|
-
`))):a=r.stylize("[Circular]","special")),T(f)){if(c&&s.match(/^\d+$/))return a;f=JSON.stringify(""+s),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.slice(1,-1),f=r.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=r.stylize(f,"string"))}return f+": "+a}function Y(r,e,t){var o=r.reduce(function(s,c){return c.indexOf(`
|
|
8
|
-
`)>=0,s+c.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?t[0]+(e===""?"":e+`
|
|
9
|
-
`)+" "+r.join(`,
|
|
10
|
-
`)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}i.types=Dr();function H(r){return Array.isArray(r)}i.isArray=H;function C(r){return typeof r=="boolean"}i.isBoolean=C;function U(r){return r===null}i.isNull=U;function x(r){return r==null}i.isNullOrUndefined=x;function J(r){return typeof r=="number"}i.isNumber=J;function q(r){return typeof r=="string"}i.isString=q;function $(r){return typeof r=="symbol"}i.isSymbol=$;function T(r){return r===void 0}i.isUndefined=T;function R(r){return P(r)&&V(r)==="[object RegExp]"}i.isRegExp=R,i.types.isRegExp=R;function P(r){return typeof r=="object"&&r!==null}i.isObject=P;function M(r){return P(r)&&V(r)==="[object Date]"}i.isDate=M,i.types.isDate=M;function v(r){return P(r)&&(V(r)==="[object Error]"||r instanceof Error)}i.isError=v,i.types.isNativeError=v;function z(r){return typeof r=="function"}i.isFunction=z;function G(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}i.isPrimitive=G,i.isBuffer=Ur();function V(r){return Object.prototype.toString.call(r)}function k(r){return r<10?"0"+r.toString(10):r.toString(10)}var rr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(){var r=new Date,e=[k(r.getHours()),k(r.getMinutes()),k(r.getSeconds())].join(":");return[r.getDate(),rr[r.getMonth()],e].join(" ")}i.log=function(){console.log("%s - %s",_(),i.format.apply(i,arguments))},i.inherits=Ir(),i._extend=function(r,e){if(!e||!P(e))return r;for(var t=Object.keys(e),o=t.length;o--;)r[t[o]]=e[t[o]];return r};function L(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var j=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;i.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(j&&e[j]){var t=e[j];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var o,s,c=new Promise(function(y,b){o=y,s=b}),f=[],a=0;a<arguments.length;a++)f.push(arguments[a]);f.push(function(y,b){y?s(y):o(b)});try{e.apply(this,f)}catch(y){s(y)}return c}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),j&&Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,h(e))},i.promisify.custom=j;function Z(r,e){if(!r){var t=new Error("Promise was rejected with a falsy value");t.reason=r,r=t}return e(r)}function N(r){if(typeof r!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var t=[],o=0;o<arguments.length;o++)t.push(arguments[o]);var s=t.pop();if(typeof s!="function")throw new TypeError("The last argument must be of type Function");var c=this,f=function(){return s.apply(c,arguments)};r.apply(this,t).then(function(a){process.nextTick(f.bind(null,null,a))},function(a){process.nextTick(Z.bind(null,a,f))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(r)),Object.defineProperties(e,h(r)),e}i.callbackify=N})(er)),er}export{zr as r};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{E as O,L as St}from"./inherits_browser-nmOknR35-Bp0mvRSL.js";import{G as Ot,U as it,Y as At,F as Z,N as xt,J as Bt,D as Et,w as kt}from"./index-69shuAsh-DF18H7zf.js";var at={},ct={},et,st;function Dt(){if(st)return et;st=1;var n=it()(),v=Z(),m=v("Object.prototype.toString"),p=function(f){return n&&f&&typeof f=="object"&&Symbol.toStringTag in f?!1:m(f)==="[object Arguments]"},g=function(f){return p(f)?!0:f!==null&&typeof f=="object"&&"length"in f&&typeof f.length=="number"&&f.length>=0&&m(f)!=="[object Array]"&&"callee"in f&&m(f.callee)==="[object Function]"},b=(function(){return p(arguments)})();return p.isLegacyArguments=g,et=b?p:g,et}var rt,pt;function Pt(){if(pt)return rt;pt=1;var n=Z(),v=it()(),m=kt(),p=Et(),g;if(v){var b=n("RegExp.prototype.exec"),f={},j=function(){throw f},y={toString:j,valueOf:j};typeof Symbol.toPrimitive=="symbol"&&(y[Symbol.toPrimitive]=j),g=function(d){if(!d||typeof d!="object")return!1;var E=p(d,"lastIndex"),G=E&&m(E,"value");if(!G)return!1;try{b(d,y)}catch(h){return h===f}}}else{var P=n("Object.prototype.toString"),w="[object RegExp]";g=function(d){return!d||typeof d!="object"&&typeof d!="function"?!1:P(d)===w}}return rt=g,rt}var nt,lt;function Ut(){if(lt)return nt;lt=1;var n=Z(),v=Pt(),m=n("RegExp.prototype.exec"),p=Bt();return nt=function(g){if(!v(g))throw new p("`regex` must be a RegExp");return function(b){return m(g,b)!==null}},nt}var ot,yt;function Ft(){if(yt)return ot;yt=1;const n=function*(){}.constructor;return ot=()=>n,ot}var ut,gt;function Mt(){if(gt)return ut;gt=1;var n=Z(),v=Ut(),m=v(/^\s*(?:function)?\*/),p=it()(),g=At(),b=n("Object.prototype.toString"),f=n("Function.prototype.toString"),j=Ft();return ut=function(y){if(typeof y!="function")return!1;if(m(f(y)))return!0;if(!p){var P=b(y);return P==="[object GeneratorFunction]"}if(!g)return!1;var w=j();return w&&g(y)===w.prototype},ut}var bt;function zt(){return bt||(bt=1,(function(n){var v=Dt(),m=Mt(),p=xt(),g=Ot();function b(r){return r.call.bind(r)}var f=typeof BigInt<"u",j=typeof Symbol<"u",y=b(Object.prototype.toString),P=b(Number.prototype.valueOf),w=b(String.prototype.valueOf),d=b(Boolean.prototype.valueOf);if(f)var E=b(BigInt.prototype.valueOf);if(j)var G=b(Symbol.prototype.valueOf);function h(r,jt){if(typeof r!="object")return!1;try{return jt(r),!0}catch{return!1}}n.isArgumentsObject=v,n.isGeneratorFunction=m,n.isTypedArray=g;function q(r){return typeof Promise<"u"&&r instanceof Promise||r!==null&&typeof r=="object"&&typeof r.then=="function"&&typeof r.catch=="function"}n.isPromise=q;function J(r){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(r):g(r)||e(r)}n.isArrayBufferView=J;function V(r){return p(r)==="Uint8Array"}n.isUint8Array=V;function z(r){return p(r)==="Uint8ClampedArray"}n.isUint8ClampedArray=z;function K(r){return p(r)==="Uint16Array"}n.isUint16Array=K;function _(r){return p(r)==="Uint32Array"}n.isUint32Array=_;function I(r){return p(r)==="Int8Array"}n.isInt8Array=I;function Q(r){return p(r)==="Int16Array"}n.isInt16Array=Q;function A(r){return p(r)==="Int32Array"}n.isInt32Array=A;function U(r){return p(r)==="Float32Array"}n.isFloat32Array=U;function k(r){return p(r)==="Float64Array"}n.isFloat64Array=k;function N(r){return p(r)==="BigInt64Array"}n.isBigInt64Array=N;function F(r){return p(r)==="BigUint64Array"}n.isBigUint64Array=F;function x(r){return y(r)==="[object Map]"}x.working=typeof Map<"u"&&x(new Map);function X(r){return typeof Map>"u"?!1:x.working?x(r):r instanceof Map}n.isMap=X;function D(r){return y(r)==="[object Set]"}D.working=typeof Set<"u"&&D(new Set);function C(r){return typeof Set>"u"?!1:D.working?D(r):r instanceof Set}n.isSet=C;function T(r){return y(r)==="[object WeakMap]"}T.working=typeof WeakMap<"u"&&T(new WeakMap);function tt(r){return typeof WeakMap>"u"?!1:T.working?T(r):r instanceof WeakMap}n.isWeakMap=tt;function R(r){return y(r)==="[object WeakSet]"}R.working=typeof WeakSet<"u"&&R(new WeakSet);function B(r){return R(r)}n.isWeakSet=B;function W(r){return y(r)==="[object ArrayBuffer]"}W.working=typeof ArrayBuffer<"u"&&W(new ArrayBuffer);function H(r){return typeof ArrayBuffer>"u"?!1:W.working?W(r):r instanceof ArrayBuffer}n.isArrayBuffer=H;function t(r){return y(r)==="[object DataView]"}t.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&t(new DataView(new ArrayBuffer(1),0,1));function e(r){return typeof DataView>"u"?!1:t.working?t(r):r instanceof DataView}n.isDataView=e;var o=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function u(r){return y(r)==="[object SharedArrayBuffer]"}function l(r){return typeof o>"u"?!1:(typeof u.working>"u"&&(u.working=u(new o)),u.working?u(r):r instanceof o)}n.isSharedArrayBuffer=l;function a(r){return y(r)==="[object AsyncFunction]"}n.isAsyncFunction=a;function i(r){return y(r)==="[object Map Iterator]"}n.isMapIterator=i;function c(r){return y(r)==="[object Set Iterator]"}n.isSetIterator=c;function s(r){return y(r)==="[object Generator]"}n.isGeneratorObject=s;function S(r){return y(r)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=S;function M(r){return h(r,P)}n.isNumberObject=M;function L(r){return h(r,w)}n.isStringObject=L;function $(r){return h(r,d)}n.isBooleanObject=$;function Y(r){return f&&h(r,E)}n.isBigIntObject=Y;function ft(r){return j&&h(r,G)}n.isSymbolObject=ft;function wt(r){return M(r)||L(r)||$(r)||Y(r)||ft(r)}n.isBoxedPrimitive=wt;function ht(r){return typeof Uint8Array<"u"&&(H(r)||l(r))}n.isAnyArrayBuffer=ht,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(r){Object.defineProperty(n,r,{enumerable:!1,value:function(){throw new Error(r+" is not supported in userland")}})})})(ct)),ct}var mt,dt;function It(){return dt||(dt=1,mt=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}),mt}var vt;function Rt(){return vt||(vt=1,(function(n){var v=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),o={},u=0;u<e.length;u++)o[e[u]]=Object.getOwnPropertyDescriptor(t,e[u]);return o},m=/%[sdj%]/g;n.format=function(t){if(!I(t)){for(var e=[],o=0;o<arguments.length;o++)e.push(f(arguments[o]));return e.join(" ")}for(var o=1,u=arguments,l=u.length,a=String(t).replace(m,function(s){if(s==="%%")return"%";if(o>=l)return s;switch(s){case"%s":return String(u[o++]);case"%d":return Number(u[o++]);case"%j":try{return JSON.stringify(u[o++])}catch{return"[Circular]"}default:return s}}),i=u[o];o<l;i=u[++o])z(i)||!k(i)?a+=" "+i:a+=" "+f(i);return a},n.deprecate=function(t,e){if(typeof O<"u"&&O.noDeprecation===!0)return t;if(typeof O>"u")return function(){return n.deprecate(t,e).apply(this,arguments)};var o=!1;function u(){if(!o){if(O.throwDeprecation)throw new Error(e);O.traceDeprecation?console.trace(e):console.error(e),o=!0}return t.apply(this,arguments)}return u};var p={},g=/^$/;if(O.env.NODE_DEBUG){var b=O.env.NODE_DEBUG;b=b.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),g=new RegExp("^"+b+"$","i")}n.debuglog=function(t){if(t=t.toUpperCase(),!p[t])if(g.test(t)){var e=O.pid;p[t]=function(){var o=n.format.apply(n,arguments);console.error("%s %d: %s",t,e,o)}}else p[t]=function(){};return p[t]};function f(t,e){var o={seen:[],stylize:y};return arguments.length>=3&&(o.depth=arguments[2]),arguments.length>=4&&(o.colors=arguments[3]),V(e)?o.showHidden=e:e&&n._extend(o,e),A(o.showHidden)&&(o.showHidden=!1),A(o.depth)&&(o.depth=2),A(o.colors)&&(o.colors=!1),A(o.customInspect)&&(o.customInspect=!0),o.colors&&(o.stylize=j),w(o,t,o.depth)}n.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function j(t,e){var o=f.styles[e];return o?"\x1B["+f.colors[o][0]+"m"+t+"\x1B["+f.colors[o][1]+"m":t}function y(t,e){return t}function P(t){var e={};return t.forEach(function(o,u){e[o]=!0}),e}function w(t,e,o){if(t.customInspect&&e&&x(e.inspect)&&e.inspect!==n.inspect&&!(e.constructor&&e.constructor.prototype===e)){var u=e.inspect(o,t);return I(u)||(u=w(t,u,o)),u}var l=d(t,e);if(l)return l;var a=Object.keys(e),i=P(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),F(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return E(e);if(a.length===0){if(x(e)){var c=e.name?": "+e.name:"";return t.stylize("[Function"+c+"]","special")}if(U(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(N(e))return t.stylize(Date.prototype.toString.call(e),"date");if(F(e))return E(e)}var s="",S=!1,M=["{","}"];if(J(e)&&(S=!0,M=["[","]"]),x(e)){var L=e.name?": "+e.name:"";s=" [Function"+L+"]"}if(U(e)&&(s=" "+RegExp.prototype.toString.call(e)),N(e)&&(s=" "+Date.prototype.toUTCString.call(e)),F(e)&&(s=" "+E(e)),a.length===0&&(!S||e.length==0))return M[0]+s+M[1];if(o<0)return U(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var $;return S?$=G(t,e,o,i,a):$=a.map(function(Y){return h(t,e,o,i,Y,S)}),t.seen.pop(),q($,s,M)}function d(t,e){if(A(e))return t.stylize("undefined","undefined");if(I(e)){var o="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(o,"string")}if(_(e))return t.stylize(""+e,"number");if(V(e))return t.stylize(""+e,"boolean");if(z(e))return t.stylize("null","null")}function E(t){return"["+Error.prototype.toString.call(t)+"]"}function G(t,e,o,u,l){for(var a=[],i=0,c=e.length;i<c;++i)R(e,String(i))?a.push(h(t,e,o,u,String(i),!0)):a.push("");return l.forEach(function(s){s.match(/^\d+$/)||a.push(h(t,e,o,u,s,!0))}),a}function h(t,e,o,u,l,a){var i,c,s;if(s=Object.getOwnPropertyDescriptor(e,l)||{value:e[l]},s.get?s.set?c=t.stylize("[Getter/Setter]","special"):c=t.stylize("[Getter]","special"):s.set&&(c=t.stylize("[Setter]","special")),R(u,l)||(i="["+l+"]"),c||(t.seen.indexOf(s.value)<0?(z(o)?c=w(t,s.value,null):c=w(t,s.value,o-1),c.indexOf(`
|
|
2
|
-
`)>-1&&(a?c=c.split(`
|
|
3
|
-
`).map(function(S){return" "+S}).join(`
|
|
4
|
-
`).slice(2):c=`
|
|
5
|
-
`+c.split(`
|
|
6
|
-
`).map(function(S){return" "+S}).join(`
|
|
7
|
-
`))):c=t.stylize("[Circular]","special")),A(i)){if(a&&l.match(/^\d+$/))return c;i=JSON.stringify(""+l),i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.slice(1,-1),i=t.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=t.stylize(i,"string"))}return i+": "+c}function q(t,e,o){var u=t.reduce(function(l,a){return a.indexOf(`
|
|
8
|
-
`)>=0,l+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return u>60?o[0]+(e===""?"":e+`
|
|
9
|
-
`)+" "+t.join(`,
|
|
10
|
-
`)+" "+o[1]:o[0]+e+" "+t.join(", ")+" "+o[1]}n.types=zt();function J(t){return Array.isArray(t)}n.isArray=J;function V(t){return typeof t=="boolean"}n.isBoolean=V;function z(t){return t===null}n.isNull=z;function K(t){return t==null}n.isNullOrUndefined=K;function _(t){return typeof t=="number"}n.isNumber=_;function I(t){return typeof t=="string"}n.isString=I;function Q(t){return typeof t=="symbol"}n.isSymbol=Q;function A(t){return t===void 0}n.isUndefined=A;function U(t){return k(t)&&D(t)==="[object RegExp]"}n.isRegExp=U,n.types.isRegExp=U;function k(t){return typeof t=="object"&&t!==null}n.isObject=k;function N(t){return k(t)&&D(t)==="[object Date]"}n.isDate=N,n.types.isDate=N;function F(t){return k(t)&&(D(t)==="[object Error]"||t instanceof Error)}n.isError=F,n.types.isNativeError=F;function x(t){return typeof t=="function"}n.isFunction=x;function X(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}n.isPrimitive=X,n.isBuffer=It();function D(t){return Object.prototype.toString.call(t)}function C(t){return t<10?"0"+t.toString(10):t.toString(10)}var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function tt(){var t=new Date,e=[C(t.getHours()),C(t.getMinutes()),C(t.getSeconds())].join(":");return[t.getDate(),T[t.getMonth()],e].join(" ")}n.log=function(){console.log("%s - %s",tt(),n.format.apply(n,arguments))},n.inherits=St(),n._extend=function(t,e){if(!e||!k(e))return t;for(var o=Object.keys(e),u=o.length;u--;)t[o[u]]=e[o[u]];return t};function R(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var B=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(B&&t[B]){var e=t[B];if(typeof e!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,B,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var o,u,l=new Promise(function(c,s){o=c,u=s}),a=[],i=0;i<arguments.length;i++)a.push(arguments[i]);a.push(function(c,s){c?u(c):o(s)});try{t.apply(this,a)}catch(c){u(c)}return l}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),B&&Object.defineProperty(e,B,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,v(t))},n.promisify.custom=B;function W(t,e){if(!t){var o=new Error("Promise was rejected with a falsy value");o.reason=t,t=o}return e(t)}function H(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var o=[],u=0;u<arguments.length;u++)o.push(arguments[u]);var l=o.pop();if(typeof l!="function")throw new TypeError("The last argument must be of type Function");var a=this,i=function(){return l.apply(a,arguments)};t.apply(this,o).then(function(c){O.nextTick(i.bind(null,null,c))},function(c){O.nextTick(W.bind(null,c,i))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,v(t)),e}n.callbackify=H})(at)),at}export{Rt as N};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{N as f}from"./util-CNqBjtt6-GUXK7Yxz.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-69shuAsh-DF18H7zf.js";import"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";function c(t,n){for(var o=0;o<n.length;o++){const r=n[o];if(typeof r!="string"&&!Array.isArray(r)){for(const e in r)if(e!=="default"&&!(e in t)){const i=Object.getOwnPropertyDescriptor(r,e);i&&Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:()=>r[e]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var p=f();const g=c({__proto__:null},[p]);export{g as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as n}from"./_commonjsHelpers-B4e78b8K-W3E8ocG7.js";import{y as f}from"./winston-1qzyIKCb-DfRv1PO8.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./util-B4ZV5RJW.js";import"./index-BT-B0wMw.js";import"./index-ChvoNxcO.js";import"./preload-helper-BlTxHScW.js";import"./__vite-browser-external-DLjrMatA.js";import"./inherits_browser-nmOknR35-Bp0mvRSL.js";import"./index-6mKfgpcs-DsgiI2lM.js";import"./index-DsIu-45t-Bejjlpz4.js";import"./index-DSosZ5sh-Ceejs_jv.js";import"./index-69shuAsh-DF18H7zf.js";import"./index-BJBOx-Z---hbiLl7B.js";import"./index.browser-BHPvGrwi-6Mh8eUw-.js";import"./_commonjs-dynamic-modules-BpilXLfW-DfYEAvWy.js";import"./_commonjs-dynamic-modules-DkOKMH7F.js";function a(o,p){for(var e=0;e<p.length;e++){const t=p[e];if(typeof t!="string"&&!Array.isArray(t)){for(const r in t)if(r!=="default"&&!(r in o)){const i=Object.getOwnPropertyDescriptor(t,r);i&&Object.defineProperty(o,r,i.get?i:{enumerable:!0,get:()=>t[r]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}var m=f();const c=n(m),z=a({__proto__:null,default:c},[m]);export{z as w};
|