gemi 0.36.0 → 0.36.2

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.
@@ -0,0 +1,48 @@
1
+ // @bun
2
+ import{Ba as CB,va as EB,wa as OB}from"./chunk-txk5dr5r.js";import{Ca as I5,Da as O5,Ea as Y0,Fa as uS,Ga as DS,Ha as BS,Ia as H5,Ja as bh,Ka as jh,La as nK,Ma as AS,Na as sB,Oa as wS,Pa as U0,Qa as tB,Ra as aK,Sa as sK,Ta as tK,Ua as oK,Va as rK,Wa as eK}from"./chunk-bwd327vf.js";import{Xa as pK}from"./chunk-69wrnjjn.js";import{Ya as EK}from"./chunk-yhrk5bfy.js";import{Za as pD,_a as lK,ab as iK,bb as TB,cb as iu,eb as zB,ib as k2}from"./chunk-xak5xspk.js";import{jb as m2}from"./chunk-xdm3d6a3.js";import{lb as wh,nb as iD}from"./chunk-1sdckzzr.js";import{ob as dK}from"./chunk-ghy6gn4g.js";import{qb as UB}from"./chunk-pp10jse0.js";import{rb as YY}from"./chunk-m5g0mh9n.js";import{vb as nY,wb as j}from"./chunk-07keqpsw.js";import{zb as Fh}from"./chunk-haenvmrp.js";import{Ab as X,Bb as v,Db as l2}from"./chunk-2vpsbhpm.js";var i1=v((P6)=>{Object.defineProperty(P6,"__esModule",{value:!0});P6.ApplicationInSerializer=void 0;P6.ApplicationInSerializer={_fromJsonObject(u){return{metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid}},_toJsonObject(u){return{metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid}}}});var i3=v((y6)=>{Object.defineProperty(y6,"__esModule",{value:!0});y6.ApplicationOutSerializer=void 0;y6.ApplicationOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),id:u.id,metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{createdAt:u.createdAt,id:u.id,metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,updatedAt:u.updatedAt}}}});var q6=v((T6)=>{Object.defineProperty(T6,"__esModule",{value:!0});T6.ApplicationPatchSerializer=void 0;T6.ApplicationPatchSerializer={_fromJsonObject(u){return{metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,uid:u.uid}},_toJsonObject(u){return{metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,uid:u.uid}}}});var f6=v((g6)=>{Object.defineProperty(g6,"__esModule",{value:!0});g6.ListResponseApplicationOutSerializer=void 0;var m6=i3();g6.ListResponseApplicationOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>m6.ApplicationOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>m6.ApplicationOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var n3=v((j6)=>{Object.defineProperty(j6,"__esModule",{value:!0});j6.ApiException=void 0;class b6 extends Error{constructor(u,D,B){super(`HTTP-Code: ${u}
3
+ Headers: ${JSON.stringify(B)}`);this.code=u,this.body=D,this.headers={},B.forEach((A,w)=>{this.headers[w]=A})}}j6.ApiException=b6});var g=v((U2)=>{var xu=U2&&U2.__awaiter||function(u,D,B,A){function w(F){return F instanceof B?F:new B(function(N){N(F)})}return new(B||(B=Promise))(function(F,N){function G(Q){try{z(A.next(Q))}catch(Z){N(Z)}}function $(Q){try{z(A.throw(Q))}catch(Z){N(Z)}}function z(Q){Q.done?F(Q.value):w(Q.value).then(G,$)}z((A=A.apply(u,D||[])).next())})};Object.defineProperty(U2,"__esModule",{value:!0});U2.SvixRequest=U2.HttpMethod=U2.LIB_VERSION=void 0;var p3=n3();U2.LIB_VERSION="1.92.2";var RS=`svix-libs/${U2.LIB_VERSION}/javascript`,HS;(function(u){u.GET="GET",u.HEAD="HEAD",u.POST="POST",u.PUT="PUT",u.DELETE="DELETE",u.CONNECT="CONNECT",u.OPTIONS="OPTIONS",u.TRACE="TRACE",u.PATCH="PATCH"})(HS=U2.HttpMethod||(U2.HttpMethod={}));class d6{constructor(u,D){this.method=u,this.path=D,this.queryParams={},this.headerParams={}}setPathParam(u,D){let B=this.path.replace(`{${u}}`,encodeURIComponent(D));if(this.path===B)throw Error(`path parameter ${u} not found`);this.path=B}setQueryParams(u){for(let[D,B]of Object.entries(u))this.setQueryParam(D,B)}setQueryParam(u,D){if(D===void 0||D===null)return;if(typeof D==="string")this.queryParams[u]=D;else if(typeof D==="boolean"||typeof D==="number")this.queryParams[u]=D.toString();else if(D instanceof Date)this.queryParams[u]=D.toISOString();else if(Array.isArray(D)){if(D.length>0)this.queryParams[u]=D.join(",")}else{let B=D;throw Error(`query parameter ${u} has unsupported type`)}}setHeaderParam(u,D){if(D===void 0)return;this.headerParams[u]=D}setBody(u){this.body=JSON.stringify(u)}send(u,D){return xu(this,void 0,void 0,function*(){let B=yield this.sendInner(u);if(B.status===204)return null;let A=yield B.text();return D(JSON.parse(A))})}sendNoResponseBody(u){return xu(this,void 0,void 0,function*(){yield this.sendInner(u)})}sendInner(u){var D,B;return xu(this,void 0,void 0,function*(){let A=new URL(u.baseUrl+this.path);for(let[G,$]of Object.entries(this.queryParams))A.searchParams.set(G,$);if(this.headerParams["idempotency-key"]===void 0&&this.method.toUpperCase()==="POST")this.headerParams["idempotency-key"]=`auto_${crypto.randomUUID()}`;let w=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER);if(this.body!=null)this.headerParams["content-type"]="application/json";let F="credentials"in Request.prototype,N=yield r6(A,{method:this.method.toString(),body:this.body,headers:Object.assign({accept:"application/json, */*;q=0.8",authorization:`Bearer ${u.token}`,"user-agent":RS,"svix-req-id":w.toString()},this.headerParams),credentials:F?"same-origin":void 0,signal:u.timeout!==void 0?AbortSignal.timeout(u.timeout):void 0},u.retryScheduleInMs,(D=u.retryScheduleInMs)===null||D===void 0?void 0:D[0],((B=u.retryScheduleInMs)===null||B===void 0?void 0:B.length)||u.numRetries,u.fetch);return US(N)})}}U2.SvixRequest=d6;function US(u){return xu(this,void 0,void 0,function*(){if(u.status<300)return u;let D=yield u.text();if(u.status===422)throw new p3.ApiException(u.status,JSON.parse(D),u.headers);if(u.status>=400&&u.status<=499)throw new p3.ApiException(u.status,JSON.parse(D),u.headers);throw new p3.ApiException(u.status,D,u.headers)})}function r6(u,D,B,A=50,w=2,F=fetch,N=1){return xu(this,void 0,void 0,function*(){let G=($)=>new Promise((z)=>setTimeout(z,$));try{let $=yield F(u,D);if(w<=0||$.status<500)return $}catch($){if(w<=0)throw $}return yield G(A),D.headers["svix-retry-count"]=N.toString(),A=(B===null||B===void 0?void 0:B[N])||A*2,yield r6(u,D,B,A,--w,F,++N)})}});var a6=v((n6)=>{Object.defineProperty(n6,"__esModule",{value:!0});n6.Application=void 0;var a3=i1(),Ru=i3(),cS=q6(),MS=f6(),Z2=g();class i6{constructor(u){this.requestCtx=u}list(u){let D=new Z2.SvixRequest(Z2.HttpMethod.GET,"/api/v1/app");return D.setQueryParams({exclude_apps_with_no_endpoints:u===null||u===void 0?void 0:u.excludeAppsWithNoEndpoints,exclude_apps_with_disabled_endpoints:u===null||u===void 0?void 0:u.excludeAppsWithDisabledEndpoints,exclude_apps_with_svix_play_endpoints:u===null||u===void 0?void 0:u.excludeAppsWithSvixPlayEndpoints,limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order}),D.send(this.requestCtx,MS.ListResponseApplicationOutSerializer._fromJsonObject)}create(u,D){let B=new Z2.SvixRequest(Z2.HttpMethod.POST,"/api/v1/app");return B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.setBody(a3.ApplicationInSerializer._toJsonObject(u)),B.send(this.requestCtx,Ru.ApplicationOutSerializer._fromJsonObject)}getOrCreate(u,D){let B=new Z2.SvixRequest(Z2.HttpMethod.POST,"/api/v1/app");return B.setQueryParam("get_if_exists",!0),B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.setBody(a3.ApplicationInSerializer._toJsonObject(u)),B.send(this.requestCtx,Ru.ApplicationOutSerializer._fromJsonObject)}get(u){let D=new Z2.SvixRequest(Z2.HttpMethod.GET,"/api/v1/app/{app_id}");return D.setPathParam("app_id",u),D.send(this.requestCtx,Ru.ApplicationOutSerializer._fromJsonObject)}update(u,D){let B=new Z2.SvixRequest(Z2.HttpMethod.PUT,"/api/v1/app/{app_id}");return B.setPathParam("app_id",u),B.setBody(a3.ApplicationInSerializer._toJsonObject(D)),B.send(this.requestCtx,Ru.ApplicationOutSerializer._fromJsonObject)}delete(u){let D=new Z2.SvixRequest(Z2.HttpMethod.DELETE,"/api/v1/app/{app_id}");return D.setPathParam("app_id",u),D.sendNoResponseBody(this.requestCtx)}patch(u,D){let B=new Z2.SvixRequest(Z2.HttpMethod.PATCH,"/api/v1/app/{app_id}");return B.setPathParam("app_id",u),B.setBody(cS.ApplicationPatchSerializer._toJsonObject(D)),B.send(this.requestCtx,Ru.ApplicationOutSerializer._fromJsonObject)}}n6.Application=i6});var o6=v((s6)=>{Object.defineProperty(s6,"__esModule",{value:!0});s6.ApiTokenOutSerializer=void 0;s6.ApiTokenOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),expiresAt:u.expiresAt?new Date(u.expiresAt):null,id:u.id,name:u.name,scopes:u.scopes,token:u.token}},_toJsonObject(u){return{createdAt:u.createdAt,expiresAt:u.expiresAt,id:u.id,name:u.name,scopes:u.scopes,token:u.token}}}});var s3=v((uA)=>{Object.defineProperty(uA,"__esModule",{value:!0});uA.AppPortalCapabilitySerializer=uA.AppPortalCapability=void 0;var LS;(function(u){u.ViewBase="ViewBase",u.ViewEndpointSecret="ViewEndpointSecret",u.ManageEndpointSecret="ManageEndpointSecret",u.ManageTransformations="ManageTransformations",u.CreateAttempts="CreateAttempts",u.ManageEndpoint="ManageEndpoint"})(LS=uA.AppPortalCapability||(uA.AppPortalCapability={}));uA.AppPortalCapabilitySerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var NA=v((wA)=>{Object.defineProperty(wA,"__esModule",{value:!0});wA.AppPortalAccessInSerializer=void 0;var BA=s3(),AA=i1();wA.AppPortalAccessInSerializer={_fromJsonObject(u){var D;return{application:u.application!=null?AA.ApplicationInSerializer._fromJsonObject(u.application):void 0,capabilities:(D=u.capabilities)===null||D===void 0?void 0:D.map((B)=>BA.AppPortalCapabilitySerializer._fromJsonObject(B)),expiry:u.expiry,featureFlags:u.featureFlags,readOnly:u.readOnly,sessionId:u.sessionId}},_toJsonObject(u){var D;return{application:u.application!=null?AA.ApplicationInSerializer._toJsonObject(u.application):void 0,capabilities:(D=u.capabilities)===null||D===void 0?void 0:D.map((B)=>BA.AppPortalCapabilitySerializer._toJsonObject(B)),expiry:u.expiry,featureFlags:u.featureFlags,readOnly:u.readOnly,sessionId:u.sessionId}}}});var $A=v((GA)=>{Object.defineProperty(GA,"__esModule",{value:!0});GA.AppPortalAccessOutSerializer=void 0;GA.AppPortalAccessOutSerializer={_fromJsonObject(u){return{token:u.token,url:u.url}},_toJsonObject(u){return{token:u.token,url:u.url}}}});var JA=v((zA)=>{Object.defineProperty(zA,"__esModule",{value:!0});zA.ApplicationTokenExpireInSerializer=void 0;zA.ApplicationTokenExpireInSerializer={_fromJsonObject(u){return{expiry:u.expiry,sessionIds:u.sessionIds}},_toJsonObject(u){return{expiry:u.expiry,sessionIds:u.sessionIds}}}});var XA=v((QA)=>{Object.defineProperty(QA,"__esModule",{value:!0});QA.RotatePollerTokenInSerializer=void 0;QA.RotatePollerTokenInSerializer={_fromJsonObject(u){return{expiry:u.expiry,oldTokenExpiry:u.oldTokenExpiry}},_toJsonObject(u){return{expiry:u.expiry,oldTokenExpiry:u.oldTokenExpiry}}}});var KA=v((YA)=>{Object.defineProperty(YA,"__esModule",{value:!0});YA.StreamPortalAccessInSerializer=void 0;YA.StreamPortalAccessInSerializer={_fromJsonObject(u){return{expiry:u.expiry,featureFlags:u.featureFlags,sessionId:u.sessionId}},_toJsonObject(u){return{expiry:u.expiry,featureFlags:u.featureFlags,sessionId:u.sessionId}}}});var RA=v((SA)=>{Object.defineProperty(SA,"__esModule",{value:!0});SA.StreamTokenExpireInSerializer=void 0;SA.StreamTokenExpireInSerializer={_fromJsonObject(u){return{expiry:u.expiry,sessionIds:u.sessionIds}},_toJsonObject(u){return{expiry:u.expiry,sessionIds:u.sessionIds}}}});var t3=v((HA)=>{Object.defineProperty(HA,"__esModule",{value:!0});HA.DashboardAccessOutSerializer=void 0;HA.DashboardAccessOutSerializer={_fromJsonObject(u){return{token:u.token,url:u.url}},_toJsonObject(u){return{token:u.token,url:u.url}}}});var CA=v((EA)=>{Object.defineProperty(EA,"__esModule",{value:!0});EA.Authentication=void 0;var cA=o6(),ES=NA(),MA=$A(),OS=JA(),CS=XA(),PS=KA(),kS=RA(),yS=t3(),u2=g();class LA{constructor(u){this.requestCtx=u}appPortalAccess(u,D,B){let A=new u2.SvixRequest(u2.HttpMethod.POST,"/api/v1/auth/app-portal-access/{app_id}");return A.setPathParam("app_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(ES.AppPortalAccessInSerializer._toJsonObject(D)),A.send(this.requestCtx,MA.AppPortalAccessOutSerializer._fromJsonObject)}expireAll(u,D,B){let A=new u2.SvixRequest(u2.HttpMethod.POST,"/api/v1/auth/app/{app_id}/expire-all");return A.setPathParam("app_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(OS.ApplicationTokenExpireInSerializer._toJsonObject(D)),A.sendNoResponseBody(this.requestCtx)}dashboardAccess(u,D){let B=new u2.SvixRequest(u2.HttpMethod.POST,"/api/v1/auth/dashboard-access/{app_id}");return B.setPathParam("app_id",u),B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.send(this.requestCtx,yS.DashboardAccessOutSerializer._fromJsonObject)}logout(u){let D=new u2.SvixRequest(u2.HttpMethod.POST,"/api/v1/auth/logout");return D.setHeaderParam("idempotency-key",u===null||u===void 0?void 0:u.idempotencyKey),D.sendNoResponseBody(this.requestCtx)}streamLogout(u){let D=new u2.SvixRequest(u2.HttpMethod.POST,"/api/v1/auth/stream-logout");return D.setHeaderParam("idempotency-key",u===null||u===void 0?void 0:u.idempotencyKey),D.sendNoResponseBody(this.requestCtx)}streamPortalAccess(u,D,B){let A=new u2.SvixRequest(u2.HttpMethod.POST,"/api/v1/auth/stream-portal-access/{stream_id}");return A.setPathParam("stream_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(PS.StreamPortalAccessInSerializer._toJsonObject(D)),A.send(this.requestCtx,MA.AppPortalAccessOutSerializer._fromJsonObject)}streamExpireAll(u,D,B){let A=new u2.SvixRequest(u2.HttpMethod.POST,"/api/v1/auth/stream/{stream_id}/expire-all");return A.setPathParam("stream_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(kS.StreamTokenExpireInSerializer._toJsonObject(D)),A.sendNoResponseBody(this.requestCtx)}getStreamPollerToken(u,D){let B=new u2.SvixRequest(u2.HttpMethod.GET,"/api/v1/auth/stream/{stream_id}/sink/{sink_id}/poller/token");return B.setPathParam("stream_id",u),B.setPathParam("sink_id",D),B.send(this.requestCtx,cA.ApiTokenOutSerializer._fromJsonObject)}rotateStreamPollerToken(u,D,B,A){let w=new u2.SvixRequest(u2.HttpMethod.POST,"/api/v1/auth/stream/{stream_id}/sink/{sink_id}/poller/token/rotate");return w.setPathParam("stream_id",u),w.setPathParam("sink_id",D),w.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),w.setBody(CS.RotatePollerTokenInSerializer._toJsonObject(B)),w.send(this.requestCtx,cA.ApiTokenOutSerializer._fromJsonObject)}}EA.Authentication=LA});var a2=v((kA)=>{Object.defineProperty(kA,"__esModule",{value:!0});kA.BackgroundTaskStatusSerializer=kA.BackgroundTaskStatus=void 0;var VS;(function(u){u.Running="running",u.Finished="finished",u.Failed="failed"})(VS=kA.BackgroundTaskStatus||(kA.BackgroundTaskStatus={}));kA.BackgroundTaskStatusSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var s2=v((TA)=>{Object.defineProperty(TA,"__esModule",{value:!0});TA.BackgroundTaskTypeSerializer=TA.BackgroundTaskType=void 0;var TS;(function(u){u.EndpointReplay="endpoint.replay",u.EndpointRecover="endpoint.recover",u.ApplicationStats="application.stats",u.MessageBroadcast="message.broadcast",u.SdkGenerate="sdk.generate",u.EventTypeAggregate="event-type.aggregate",u.ApplicationPurgeContent="application.purge_content",u.EndpointBulkReplay="endpoint.bulk-replay"})(TS=TA.BackgroundTaskType||(TA.BackgroundTaskType={}));TA.BackgroundTaskTypeSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var o3=v((gA)=>{Object.defineProperty(gA,"__esModule",{value:!0});gA.BackgroundTaskOutSerializer=void 0;var qA=a2(),mA=s2();gA.BackgroundTaskOutSerializer={_fromJsonObject(u){return{data:u.data,id:u.id,status:qA.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:mA.BackgroundTaskTypeSerializer._fromJsonObject(u.task),updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{data:u.data,id:u.id,status:qA.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:mA.BackgroundTaskTypeSerializer._toJsonObject(u.task),updatedAt:u.updatedAt}}}});var lA=v((bA)=>{Object.defineProperty(bA,"__esModule",{value:!0});bA.ListResponseBackgroundTaskOutSerializer=void 0;var fA=o3();bA.ListResponseBackgroundTaskOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>fA.BackgroundTaskOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>fA.BackgroundTaskOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var nA=v((rA)=>{Object.defineProperty(rA,"__esModule",{value:!0});rA.BackgroundTask=void 0;var IS=o3(),qS=lA(),n1=g();class dA{constructor(u){this.requestCtx=u}list(u){let D=new n1.SvixRequest(n1.HttpMethod.GET,"/api/v1/background-task");return D.setQueryParams({status:u===null||u===void 0?void 0:u.status,task:u===null||u===void 0?void 0:u.task,limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order}),D.send(this.requestCtx,qS.ListResponseBackgroundTaskOutSerializer._fromJsonObject)}listByEndpoint(u){return this.list(u)}get(u){let D=new n1.SvixRequest(n1.HttpMethod.GET,"/api/v1/background-task/{task_id}");return D.setPathParam("task_id",u),D.send(this.requestCtx,IS.BackgroundTaskOutSerializer._fromJsonObject)}}rA.BackgroundTask=dA});var k0=v((aA)=>{Object.defineProperty(aA,"__esModule",{value:!0});aA.ConnectorKindSerializer=aA.ConnectorKind=void 0;var mS;(function(u){u.Custom="Custom",u.AgenticCommerceProtocol="AgenticCommerceProtocol",u.CloseCrm="CloseCRM",u.CustomerIo="CustomerIO",u.Discord="Discord",u.Hubspot="Hubspot",u.Inngest="Inngest",u.Loops="Loops",u.Otel="Otel",u.Resend="Resend",u.Salesforce="Salesforce",u.Segment="Segment",u.Sendgrid="Sendgrid",u.Slack="Slack",u.Teams="Teams",u.TriggerDev="TriggerDev",u.Windmill="Windmill",u.Zapier="Zapier"})(mS=aA.ConnectorKind||(aA.ConnectorKind={}));aA.ConnectorKindSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var p1=v((oA)=>{Object.defineProperty(oA,"__esModule",{value:!0});oA.ConnectorProductSerializer=oA.ConnectorProduct=void 0;var gS;(function(u){u.Dispatch="Dispatch",u.Stream="Stream"})(gS=oA.ConnectorProduct||(oA.ConnectorProduct={}));oA.ConnectorProductSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var e3=v((Bw)=>{Object.defineProperty(Bw,"__esModule",{value:!0});Bw.ConnectorInSerializer=void 0;var uw=k0(),Dw=p1();Bw.ConnectorInSerializer={_fromJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?uw.ConnectorKindSerializer._fromJsonObject(u.kind):void 0,logo:u.logo,name:u.name,productType:u.productType!=null?Dw.ConnectorProductSerializer._fromJsonObject(u.productType):void 0,transformation:u.transformation,uid:u.uid}},_toJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?uw.ConnectorKindSerializer._toJsonObject(u.kind):void 0,logo:u.logo,name:u.name,productType:u.productType!=null?Dw.ConnectorProductSerializer._toJsonObject(u.productType):void 0,transformation:u.transformation,uid:u.uid}}}});var a1=v((Nw)=>{Object.defineProperty(Nw,"__esModule",{value:!0});Nw.ConnectorOutSerializer=void 0;var ww=k0(),Fw=p1();Nw.ConnectorOutSerializer={_fromJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,createdAt:new Date(u.createdAt),description:u.description,featureFlags:u.featureFlags,id:u.id,instructions:u.instructions,kind:ww.ConnectorKindSerializer._fromJsonObject(u.kind),logo:u.logo,name:u.name,orgId:u.orgId,productType:Fw.ConnectorProductSerializer._fromJsonObject(u.productType),transformation:u.transformation,transformationUpdatedAt:new Date(u.transformationUpdatedAt),uid:u.uid,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,createdAt:u.createdAt,description:u.description,featureFlags:u.featureFlags,id:u.id,instructions:u.instructions,kind:ww.ConnectorKindSerializer._toJsonObject(u.kind),logo:u.logo,name:u.name,orgId:u.orgId,productType:Fw.ConnectorProductSerializer._toJsonObject(u.productType),transformation:u.transformation,transformationUpdatedAt:u.transformationUpdatedAt,uid:u.uid,updatedAt:u.updatedAt}}}});var Zw=v(($w)=>{Object.defineProperty($w,"__esModule",{value:!0});$w.ConnectorPatchSerializer=void 0;var vw=k0();$w.ConnectorPatchSerializer={_fromJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?vw.ConnectorKindSerializer._fromJsonObject(u.kind):void 0,logo:u.logo,name:u.name,transformation:u.transformation}},_toJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?vw.ConnectorKindSerializer._toJsonObject(u.kind):void 0,logo:u.logo,name:u.name,transformation:u.transformation}}}});var Xw=v((Qw)=>{Object.defineProperty(Qw,"__esModule",{value:!0});Qw.ConnectorUpdateSerializer=void 0;var Jw=k0();Qw.ConnectorUpdateSerializer={_fromJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?Jw.ConnectorKindSerializer._fromJsonObject(u.kind):void 0,logo:u.logo,name:u.name,transformation:u.transformation}},_toJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?Jw.ConnectorKindSerializer._toJsonObject(u.kind):void 0,logo:u.logo,name:u.name,transformation:u.transformation}}}});var Sw=v((hw)=>{Object.defineProperty(hw,"__esModule",{value:!0});hw.ListResponseConnectorOutSerializer=void 0;var Yw=a1();hw.ListResponseConnectorOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>Yw.ConnectorOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>Yw.ConnectorOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var Uw=v((Rw)=>{Object.defineProperty(Rw,"__esModule",{value:!0});Rw.Connector=void 0;var _S=e3(),s1=a1(),fS=Zw(),bS=Xw(),jS=Sw(),c2=g();class xw{constructor(u){this.requestCtx=u}list(u){let D=new c2.SvixRequest(c2.HttpMethod.GET,"/api/v1/connector");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order,product_type:u===null||u===void 0?void 0:u.productType}),D.send(this.requestCtx,jS.ListResponseConnectorOutSerializer._fromJsonObject)}create(u,D){let B=new c2.SvixRequest(c2.HttpMethod.POST,"/api/v1/connector");return B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.setBody(_S.ConnectorInSerializer._toJsonObject(u)),B.send(this.requestCtx,s1.ConnectorOutSerializer._fromJsonObject)}get(u){let D=new c2.SvixRequest(c2.HttpMethod.GET,"/api/v1/connector/{connector_id}");return D.setPathParam("connector_id",u),D.send(this.requestCtx,s1.ConnectorOutSerializer._fromJsonObject)}update(u,D){let B=new c2.SvixRequest(c2.HttpMethod.PUT,"/api/v1/connector/{connector_id}");return B.setPathParam("connector_id",u),B.setBody(bS.ConnectorUpdateSerializer._toJsonObject(D)),B.send(this.requestCtx,s1.ConnectorOutSerializer._fromJsonObject)}delete(u){let D=new c2.SvixRequest(c2.HttpMethod.DELETE,"/api/v1/connector/{connector_id}");return D.setPathParam("connector_id",u),D.sendNoResponseBody(this.requestCtx)}patch(u,D){let B=new c2.SvixRequest(c2.HttpMethod.PATCH,"/api/v1/connector/{connector_id}");return B.setPathParam("connector_id",u),B.setBody(fS.ConnectorPatchSerializer._toJsonObject(D)),B.send(this.requestCtx,s1.ConnectorOutSerializer._fromJsonObject)}}Rw.Connector=xw});var y0=v((Mw)=>{Object.defineProperty(Mw,"__esModule",{value:!0});Mw.MessageStatusSerializer=Mw.MessageStatus=void 0;var lS;(function(u){u[u.Success=0]="Success",u[u.Pending=1]="Pending",u[u.Fail=2]="Fail",u[u.Sending=3]="Sending"})(lS=Mw.MessageStatus||(Mw.MessageStatus={}));Mw.MessageStatusSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var u8=v((Ow)=>{Object.defineProperty(Ow,"__esModule",{value:!0});Ow.StatusCodeClassSerializer=Ow.StatusCodeClass=void 0;var dS;(function(u){u[u.CodeNone=0]="CodeNone",u[u.Code1xx=100]="Code1xx",u[u.Code2xx=200]="Code2xx",u[u.Code3xx=300]="Code3xx",u[u.Code4xx=400]="Code4xx",u[u.Code5xx=500]="Code5xx"})(dS=Ow.StatusCodeClass||(Ow.StatusCodeClass={}));Ow.StatusCodeClassSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var Tw=v((yw)=>{Object.defineProperty(yw,"__esModule",{value:!0});yw.BulkReplayInSerializer=void 0;var Pw=y0(),kw=u8();yw.BulkReplayInSerializer={_fromJsonObject(u){return{channel:u.channel,eventTypes:u.eventTypes,since:new Date(u.since),status:u.status!=null?Pw.MessageStatusSerializer._fromJsonObject(u.status):void 0,statusCodeClass:u.statusCodeClass!=null?kw.StatusCodeClassSerializer._fromJsonObject(u.statusCodeClass):void 0,tag:u.tag,until:u.until?new Date(u.until):null}},_toJsonObject(u){return{channel:u.channel,eventTypes:u.eventTypes,since:u.since,status:u.status!=null?Pw.MessageStatusSerializer._toJsonObject(u.status):void 0,statusCodeClass:u.statusCodeClass!=null?kw.StatusCodeClassSerializer._toJsonObject(u.statusCodeClass):void 0,tag:u.tag,until:u.until}}}});var mw=v((Iw)=>{Object.defineProperty(Iw,"__esModule",{value:!0});Iw.EndpointHeadersInSerializer=void 0;Iw.EndpointHeadersInSerializer={_fromJsonObject(u){return{headers:u.headers}},_toJsonObject(u){return{headers:u.headers}}}});var D8=v((gw)=>{Object.defineProperty(gw,"__esModule",{value:!0});gw.EndpointHeadersOutSerializer=void 0;gw.EndpointHeadersOutSerializer={_fromJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}},_toJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}}}});var jw=v((fw)=>{Object.defineProperty(fw,"__esModule",{value:!0});fw.EndpointHeadersPatchInSerializer=void 0;fw.EndpointHeadersPatchInSerializer={_fromJsonObject(u){return{deleteHeaders:u.deleteHeaders,headers:u.headers}},_toJsonObject(u){return{deleteHeaders:u.deleteHeaders,headers:u.headers}}}});var rw=v((lw)=>{Object.defineProperty(lw,"__esModule",{value:!0});lw.EndpointInSerializer=void 0;lw.EndpointInSerializer={_fromJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,headers:u.headers,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}},_toJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,headers:u.headers,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}}}});var B8=v((iw)=>{Object.defineProperty(iw,"__esModule",{value:!0});iw.EndpointOutSerializer=void 0;iw.EndpointOutSerializer={_fromJsonObject(u){return{channels:u.channels,createdAt:new Date(u.createdAt),description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,updatedAt:new Date(u.updatedAt),url:u.url,version:u.version}},_toJsonObject(u){return{channels:u.channels,createdAt:u.createdAt,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,updatedAt:u.updatedAt,url:u.url,version:u.version}}}});var sw=v((pw)=>{Object.defineProperty(pw,"__esModule",{value:!0});pw.EndpointPatchSerializer=void 0;pw.EndpointPatchSerializer={_fromJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}},_toJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}}}});var ew=v((tw)=>{Object.defineProperty(tw,"__esModule",{value:!0});tw.EndpointSecretOutSerializer=void 0;tw.EndpointSecretOutSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var A8=v((uF)=>{Object.defineProperty(uF,"__esModule",{value:!0});uF.EndpointSecretRotateInSerializer=void 0;uF.EndpointSecretRotateInSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var wF=v((BF)=>{Object.defineProperty(BF,"__esModule",{value:!0});BF.EndpointStatsSerializer=void 0;BF.EndpointStatsSerializer={_fromJsonObject(u){return{fail:u.fail,pending:u.pending,sending:u.sending,success:u.success}},_toJsonObject(u){return{fail:u.fail,pending:u.pending,sending:u.sending,success:u.success}}}});var GF=v((FF)=>{Object.defineProperty(FF,"__esModule",{value:!0});FF.EndpointTransformationInSerializer=void 0;FF.EndpointTransformationInSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled}},_toJsonObject(u){return{code:u.code,enabled:u.enabled}}}});var zF=v((vF)=>{Object.defineProperty(vF,"__esModule",{value:!0});vF.EndpointTransformationOutSerializer=void 0;vF.EndpointTransformationOutSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled,updatedAt:u.updatedAt?new Date(u.updatedAt):null}},_toJsonObject(u){return{code:u.code,enabled:u.enabled,updatedAt:u.updatedAt}}}});var QF=v((ZF)=>{Object.defineProperty(ZF,"__esModule",{value:!0});ZF.EndpointTransformationPatchSerializer=void 0;ZF.EndpointTransformationPatchSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled}},_toJsonObject(u){return{code:u.code,enabled:u.enabled}}}});var YF=v((WF)=>{Object.defineProperty(WF,"__esModule",{value:!0});WF.EndpointUpdateSerializer=void 0;WF.EndpointUpdateSerializer={_fromJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}},_toJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}}}});var SF=v((hF)=>{Object.defineProperty(hF,"__esModule",{value:!0});hF.EventExampleInSerializer=void 0;hF.EventExampleInSerializer={_fromJsonObject(u){return{eventType:u.eventType,exampleIndex:u.exampleIndex}},_toJsonObject(u){return{eventType:u.eventType,exampleIndex:u.exampleIndex}}}});var UF=v((RF)=>{Object.defineProperty(RF,"__esModule",{value:!0});RF.ListResponseEndpointOutSerializer=void 0;var xF=B8();RF.ListResponseEndpointOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>xF.EndpointOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>xF.EndpointOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var Hu=v((cF)=>{Object.defineProperty(cF,"__esModule",{value:!0});cF.MessageOutSerializer=void 0;cF.MessageOutSerializer={_fromJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt?new Date(u.deliverAt):null,eventId:u.eventId,eventType:u.eventType,id:u.id,payload:u.payload,tags:u.tags,timestamp:new Date(u.timestamp)}},_toJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt,eventId:u.eventId,eventType:u.eventType,id:u.id,payload:u.payload,tags:u.tags,timestamp:u.timestamp}}}});var OF=v((LF)=>{Object.defineProperty(LF,"__esModule",{value:!0});LF.RecoverInSerializer=void 0;LF.RecoverInSerializer={_fromJsonObject(u){return{since:new Date(u.since),until:u.until?new Date(u.until):null}},_toJsonObject(u){return{since:u.since,until:u.until}}}});var VF=v((kF)=>{Object.defineProperty(kF,"__esModule",{value:!0});kF.RecoverOutSerializer=void 0;var CF=a2(),PF=s2();kF.RecoverOutSerializer={_fromJsonObject(u){return{id:u.id,status:CF.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:PF.BackgroundTaskTypeSerializer._fromJsonObject(u.task),updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{id:u.id,status:CF.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:PF.BackgroundTaskTypeSerializer._toJsonObject(u.task),updatedAt:u.updatedAt}}}});var qF=v((TF)=>{Object.defineProperty(TF,"__esModule",{value:!0});TF.ReplayInSerializer=void 0;TF.ReplayInSerializer={_fromJsonObject(u){return{since:new Date(u.since),until:u.until?new Date(u.until):null}},_toJsonObject(u){return{since:u.since,until:u.until}}}});var bF=v((_F)=>{Object.defineProperty(_F,"__esModule",{value:!0});_F.ReplayOutSerializer=void 0;var mF=a2(),gF=s2();_F.ReplayOutSerializer={_fromJsonObject(u){return{id:u.id,status:mF.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:gF.BackgroundTaskTypeSerializer._fromJsonObject(u.task),updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{id:u.id,status:mF.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:gF.BackgroundTaskTypeSerializer._toJsonObject(u.task),updatedAt:u.updatedAt}}}});var iF=v((dF)=>{Object.defineProperty(dF,"__esModule",{value:!0});dF.Endpoint=void 0;var rS=Tw(),iS=mw(),nS=D8(),pS=jw(),aS=rw(),t1=B8(),sS=sw(),tS=ew(),oS=A8(),eS=wF(),ux=GF(),Dx=zF(),Bx=QF(),Ax=YF(),wx=SF(),Fx=UF(),Nx=Hu(),Gx=OF(),vx=VF(),$x=qF(),jF=bF(),H=g();class lF{constructor(u){this.requestCtx=u}list(u,D){let B=new H.SvixRequest(H.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint");return B.setPathParam("app_id",u),B.setQueryParams({limit:D===null||D===void 0?void 0:D.limit,iterator:D===null||D===void 0?void 0:D.iterator,order:D===null||D===void 0?void 0:D.order}),B.send(this.requestCtx,Fx.ListResponseEndpointOutSerializer._fromJsonObject)}create(u,D,B){let A=new H.SvixRequest(H.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint");return A.setPathParam("app_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(aS.EndpointInSerializer._toJsonObject(D)),A.send(this.requestCtx,t1.EndpointOutSerializer._fromJsonObject)}get(u,D){let B=new H.SvixRequest(H.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.send(this.requestCtx,t1.EndpointOutSerializer._fromJsonObject)}update(u,D,B){let A=new H.SvixRequest(H.HttpMethod.PUT,"/api/v1/app/{app_id}/endpoint/{endpoint_id}");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.setBody(Ax.EndpointUpdateSerializer._toJsonObject(B)),A.send(this.requestCtx,t1.EndpointOutSerializer._fromJsonObject)}delete(u,D){let B=new H.SvixRequest(H.HttpMethod.DELETE,"/api/v1/app/{app_id}/endpoint/{endpoint_id}");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.sendNoResponseBody(this.requestCtx)}patch(u,D,B){let A=new H.SvixRequest(H.HttpMethod.PATCH,"/api/v1/app/{app_id}/endpoint/{endpoint_id}");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.setBody(sS.EndpointPatchSerializer._toJsonObject(B)),A.send(this.requestCtx,t1.EndpointOutSerializer._fromJsonObject)}bulkReplay(u,D,B,A){let w=new H.SvixRequest(H.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/bulk-replay");return w.setPathParam("app_id",u),w.setPathParam("endpoint_id",D),w.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),w.setBody(rS.BulkReplayInSerializer._toJsonObject(B)),w.send(this.requestCtx,jF.ReplayOutSerializer._fromJsonObject)}getHeaders(u,D){let B=new H.SvixRequest(H.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.send(this.requestCtx,nS.EndpointHeadersOutSerializer._fromJsonObject)}updateHeaders(u,D,B){let A=new H.SvixRequest(H.HttpMethod.PUT,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.setBody(iS.EndpointHeadersInSerializer._toJsonObject(B)),A.sendNoResponseBody(this.requestCtx)}headersUpdate(u,D,B){return this.updateHeaders(u,D,B)}patchHeaders(u,D,B){let A=new H.SvixRequest(H.HttpMethod.PATCH,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.setBody(pS.EndpointHeadersPatchInSerializer._toJsonObject(B)),A.sendNoResponseBody(this.requestCtx)}headersPatch(u,D,B){return this.patchHeaders(u,D,B)}recover(u,D,B,A){let w=new H.SvixRequest(H.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover");return w.setPathParam("app_id",u),w.setPathParam("endpoint_id",D),w.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),w.setBody(Gx.RecoverInSerializer._toJsonObject(B)),w.send(this.requestCtx,vx.RecoverOutSerializer._fromJsonObject)}replayMissing(u,D,B,A){let w=new H.SvixRequest(H.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing");return w.setPathParam("app_id",u),w.setPathParam("endpoint_id",D),w.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),w.setBody($x.ReplayInSerializer._toJsonObject(B)),w.send(this.requestCtx,jF.ReplayOutSerializer._fromJsonObject)}getSecret(u,D){let B=new H.SvixRequest(H.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.send(this.requestCtx,tS.EndpointSecretOutSerializer._fromJsonObject)}rotateSecret(u,D,B,A){let w=new H.SvixRequest(H.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate");return w.setPathParam("app_id",u),w.setPathParam("endpoint_id",D),w.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),w.setBody(oS.EndpointSecretRotateInSerializer._toJsonObject(B)),w.sendNoResponseBody(this.requestCtx)}sendExample(u,D,B,A){let w=new H.SvixRequest(H.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example");return w.setPathParam("app_id",u),w.setPathParam("endpoint_id",D),w.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),w.setBody(wx.EventExampleInSerializer._toJsonObject(B)),w.send(this.requestCtx,Nx.MessageOutSerializer._fromJsonObject)}getStats(u,D,B){let A=new H.SvixRequest(H.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.setQueryParams({since:B===null||B===void 0?void 0:B.since,until:B===null||B===void 0?void 0:B.until}),A.send(this.requestCtx,eS.EndpointStatsSerializer._fromJsonObject)}transformationGet(u,D){let B=new H.SvixRequest(H.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.send(this.requestCtx,Dx.EndpointTransformationOutSerializer._fromJsonObject)}patchTransformation(u,D,B){let A=new H.SvixRequest(H.HttpMethod.PATCH,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.setBody(Bx.EndpointTransformationPatchSerializer._toJsonObject(B)),A.sendNoResponseBody(this.requestCtx)}transformationPartialUpdate(u,D,B){let A=new H.SvixRequest(H.HttpMethod.PATCH,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.setBody(ux.EndpointTransformationInSerializer._toJsonObject(B)),A.sendNoResponseBody(this.requestCtx)}}dF.Endpoint=lF});var w8=v((nF)=>{Object.defineProperty(nF,"__esModule",{value:!0});nF.EventTypeInSerializer=void 0;nF.EventTypeInSerializer={_fromJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas}},_toJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas}}}});var eF=v((tF)=>{Object.defineProperty(tF,"__esModule",{value:!0});tF.EnvironmentInSerializer=void 0;var aF=e3(),sF=w8();tF.EnvironmentInSerializer={_fromJsonObject(u){var D,B;return{connectors:(D=u.connectors)===null||D===void 0?void 0:D.map((A)=>aF.ConnectorInSerializer._fromJsonObject(A)),eventTypes:(B=u.eventTypes)===null||B===void 0?void 0:B.map((A)=>sF.EventTypeInSerializer._fromJsonObject(A)),settings:u.settings}},_toJsonObject(u){var D,B;return{connectors:(D=u.connectors)===null||D===void 0?void 0:D.map((A)=>aF.ConnectorInSerializer._toJsonObject(A)),eventTypes:(B=u.eventTypes)===null||B===void 0?void 0:B.map((A)=>sF.EventTypeInSerializer._toJsonObject(A)),settings:u.settings}}}});var o1=v((u7)=>{Object.defineProperty(u7,"__esModule",{value:!0});u7.EventTypeOutSerializer=void 0;u7.EventTypeOutSerializer={_fromJsonObject(u){return{archived:u.archived,createdAt:new Date(u.createdAt),deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{archived:u.archived,createdAt:u.createdAt,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas,updatedAt:u.updatedAt}}}});var N7=v((w7)=>{Object.defineProperty(w7,"__esModule",{value:!0});w7.EnvironmentOutSerializer=void 0;var B7=a1(),A7=o1();w7.EnvironmentOutSerializer={_fromJsonObject(u){return{connectors:u.connectors.map((D)=>B7.ConnectorOutSerializer._fromJsonObject(D)),createdAt:new Date(u.createdAt),eventTypes:u.eventTypes.map((D)=>A7.EventTypeOutSerializer._fromJsonObject(D)),settings:u.settings,version:u.version}},_toJsonObject(u){return{connectors:u.connectors.map((D)=>B7.ConnectorOutSerializer._toJsonObject(D)),createdAt:u.createdAt,eventTypes:u.eventTypes.map((D)=>A7.EventTypeOutSerializer._toJsonObject(D)),settings:u.settings,version:u.version}}}});var z7=v((v7)=>{Object.defineProperty(v7,"__esModule",{value:!0});v7.Environment=void 0;var zx=eF(),Zx=N7(),e1=g();class G7{constructor(u){this.requestCtx=u}export(u){let D=new e1.SvixRequest(e1.HttpMethod.POST,"/api/v1/environment/export");return D.setHeaderParam("idempotency-key",u===null||u===void 0?void 0:u.idempotencyKey),D.send(this.requestCtx,Zx.EnvironmentOutSerializer._fromJsonObject)}import(u,D){let B=new e1.SvixRequest(e1.HttpMethod.POST,"/api/v1/environment/import");return B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.setBody(zx.EnvironmentInSerializer._toJsonObject(u)),B.sendNoResponseBody(this.requestCtx)}}v7.Environment=G7});var Q7=v((Z7)=>{Object.defineProperty(Z7,"__esModule",{value:!0});Z7.EventTypeImportOpenApiInSerializer=void 0;Z7.EventTypeImportOpenApiInSerializer={_fromJsonObject(u){return{dryRun:u.dryRun,replaceAll:u.replaceAll,spec:u.spec,specRaw:u.specRaw}},_toJsonObject(u){return{dryRun:u.dryRun,replaceAll:u.replaceAll,spec:u.spec,specRaw:u.specRaw}}}});var Y7=v((W7)=>{Object.defineProperty(W7,"__esModule",{value:!0});W7.EventTypeFromOpenApiSerializer=void 0;W7.EventTypeFromOpenApiSerializer={_fromJsonObject(u){return{deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas}},_toJsonObject(u){return{deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas}}}});var x7=v((K7)=>{Object.defineProperty(K7,"__esModule",{value:!0});K7.EventTypeImportOpenApiOutDataSerializer=void 0;var h7=Y7();K7.EventTypeImportOpenApiOutDataSerializer={_fromJsonObject(u){var D;return{modified:u.modified,toModify:(D=u.to_modify)===null||D===void 0?void 0:D.map((B)=>h7.EventTypeFromOpenApiSerializer._fromJsonObject(B))}},_toJsonObject(u){var D;return{modified:u.modified,to_modify:(D=u.toModify)===null||D===void 0?void 0:D.map((B)=>h7.EventTypeFromOpenApiSerializer._toJsonObject(B))}}}});var c7=v((H7)=>{Object.defineProperty(H7,"__esModule",{value:!0});H7.EventTypeImportOpenApiOutSerializer=void 0;var R7=x7();H7.EventTypeImportOpenApiOutSerializer={_fromJsonObject(u){return{data:R7.EventTypeImportOpenApiOutDataSerializer._fromJsonObject(u.data)}},_toJsonObject(u){return{data:R7.EventTypeImportOpenApiOutDataSerializer._toJsonObject(u.data)}}}});var E7=v((M7)=>{Object.defineProperty(M7,"__esModule",{value:!0});M7.EventTypePatchSerializer=void 0;M7.EventTypePatchSerializer={_fromJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,schemas:u.schemas}},_toJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,schemas:u.schemas}}}});var P7=v((O7)=>{Object.defineProperty(O7,"__esModule",{value:!0});O7.EventTypeUpdateSerializer=void 0;O7.EventTypeUpdateSerializer={_fromJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,schemas:u.schemas}},_toJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,schemas:u.schemas}}}});var T7=v((y7)=>{Object.defineProperty(y7,"__esModule",{value:!0});y7.ListResponseEventTypeOutSerializer=void 0;var k7=o1();y7.ListResponseEventTypeOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>k7.EventTypeOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>k7.EventTypeOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var g7=v((q7)=>{Object.defineProperty(q7,"__esModule",{value:!0});q7.EventType=void 0;var Jx=Q7(),Qx=c7(),Wx=w8(),uD=o1(),Xx=E7(),Yx=P7(),hx=T7(),J2=g();class I7{constructor(u){this.requestCtx=u}list(u){let D=new J2.SvixRequest(J2.HttpMethod.GET,"/api/v1/event-type");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order,include_archived:u===null||u===void 0?void 0:u.includeArchived,with_content:u===null||u===void 0?void 0:u.withContent}),D.send(this.requestCtx,hx.ListResponseEventTypeOutSerializer._fromJsonObject)}create(u,D){let B=new J2.SvixRequest(J2.HttpMethod.POST,"/api/v1/event-type");return B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.setBody(Wx.EventTypeInSerializer._toJsonObject(u)),B.send(this.requestCtx,uD.EventTypeOutSerializer._fromJsonObject)}importOpenapi(u,D){let B=new J2.SvixRequest(J2.HttpMethod.POST,"/api/v1/event-type/import/openapi");return B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.setBody(Jx.EventTypeImportOpenApiInSerializer._toJsonObject(u)),B.send(this.requestCtx,Qx.EventTypeImportOpenApiOutSerializer._fromJsonObject)}get(u){let D=new J2.SvixRequest(J2.HttpMethod.GET,"/api/v1/event-type/{event_type_name}");return D.setPathParam("event_type_name",u),D.send(this.requestCtx,uD.EventTypeOutSerializer._fromJsonObject)}update(u,D){let B=new J2.SvixRequest(J2.HttpMethod.PUT,"/api/v1/event-type/{event_type_name}");return B.setPathParam("event_type_name",u),B.setBody(Yx.EventTypeUpdateSerializer._toJsonObject(D)),B.send(this.requestCtx,uD.EventTypeOutSerializer._fromJsonObject)}delete(u,D){let B=new J2.SvixRequest(J2.HttpMethod.DELETE,"/api/v1/event-type/{event_type_name}");return B.setPathParam("event_type_name",u),B.setQueryParams({expunge:D===null||D===void 0?void 0:D.expunge}),B.sendNoResponseBody(this.requestCtx)}patch(u,D){let B=new J2.SvixRequest(J2.HttpMethod.PATCH,"/api/v1/event-type/{event_type_name}");return B.setPathParam("event_type_name",u),B.setBody(Xx.EventTypePatchSerializer._toJsonObject(D)),B.send(this.requestCtx,uD.EventTypeOutSerializer._fromJsonObject)}}q7.EventType=I7});var l7=v((b7)=>{Object.defineProperty(b7,"__esModule",{value:!0});b7.Health=void 0;var _7=g();class f7{constructor(u){this.requestCtx=u}get(){return new _7.SvixRequest(_7.HttpMethod.GET,"/api/v1/health").sendNoResponseBody(this.requestCtx)}}b7.Health=f7});var i7=v((d7)=>{Object.defineProperty(d7,"__esModule",{value:!0});d7.IngestSourceConsumerPortalAccessInSerializer=void 0;d7.IngestSourceConsumerPortalAccessInSerializer={_fromJsonObject(u){return{expiry:u.expiry,readOnly:u.readOnly}},_toJsonObject(u){return{expiry:u.expiry,readOnly:u.readOnly}}}});var a7=v((n7)=>{Object.defineProperty(n7,"__esModule",{value:!0});n7.IngestEndpointHeadersInSerializer=void 0;n7.IngestEndpointHeadersInSerializer={_fromJsonObject(u){return{headers:u.headers}},_toJsonObject(u){return{headers:u.headers}}}});var o7=v((s7)=>{Object.defineProperty(s7,"__esModule",{value:!0});s7.IngestEndpointHeadersOutSerializer=void 0;s7.IngestEndpointHeadersOutSerializer={_fromJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}},_toJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}}}});var DN=v((e7)=>{Object.defineProperty(e7,"__esModule",{value:!0});e7.IngestEndpointInSerializer=void 0;e7.IngestEndpointInSerializer={_fromJsonObject(u){return{description:u.description,disabled:u.disabled,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,uid:u.uid,url:u.url}},_toJsonObject(u){return{description:u.description,disabled:u.disabled,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,uid:u.uid,url:u.url}}}});var F8=v((BN)=>{Object.defineProperty(BN,"__esModule",{value:!0});BN.IngestEndpointOutSerializer=void 0;BN.IngestEndpointOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),description:u.description,disabled:u.disabled,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,updatedAt:new Date(u.updatedAt),url:u.url}},_toJsonObject(u){return{createdAt:u.createdAt,description:u.description,disabled:u.disabled,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,updatedAt:u.updatedAt,url:u.url}}}});var NN=v((wN)=>{Object.defineProperty(wN,"__esModule",{value:!0});wN.IngestEndpointSecretInSerializer=void 0;wN.IngestEndpointSecretInSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var $N=v((GN)=>{Object.defineProperty(GN,"__esModule",{value:!0});GN.IngestEndpointSecretOutSerializer=void 0;GN.IngestEndpointSecretOutSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var JN=v((zN)=>{Object.defineProperty(zN,"__esModule",{value:!0});zN.IngestEndpointTransformationOutSerializer=void 0;zN.IngestEndpointTransformationOutSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled}},_toJsonObject(u){return{code:u.code,enabled:u.enabled}}}});var XN=v((QN)=>{Object.defineProperty(QN,"__esModule",{value:!0});QN.IngestEndpointTransformationPatchSerializer=void 0;QN.IngestEndpointTransformationPatchSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled}},_toJsonObject(u){return{code:u.code,enabled:u.enabled}}}});var KN=v((YN)=>{Object.defineProperty(YN,"__esModule",{value:!0});YN.IngestEndpointUpdateSerializer=void 0;YN.IngestEndpointUpdateSerializer={_fromJsonObject(u){return{description:u.description,disabled:u.disabled,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,url:u.url}},_toJsonObject(u){return{description:u.description,disabled:u.disabled,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,url:u.url}}}});var HN=v((xN)=>{Object.defineProperty(xN,"__esModule",{value:!0});xN.ListResponseIngestEndpointOutSerializer=void 0;var SN=F8();xN.ListResponseIngestEndpointOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>SN.IngestEndpointOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>SN.IngestEndpointOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var LN=v((cN)=>{Object.defineProperty(cN,"__esModule",{value:!0});cN.IngestEndpoint=void 0;var Kx=a7(),Sx=o7(),xx=DN(),N8=F8(),Rx=NN(),Hx=$N(),Ux=JN(),cx=XN(),Mx=KN(),Lx=HN(),f=g();class UN{constructor(u){this.requestCtx=u}list(u,D){let B=new f.SvixRequest(f.HttpMethod.GET,"/ingest/api/v1/source/{source_id}/endpoint");return B.setPathParam("source_id",u),B.setQueryParams({limit:D===null||D===void 0?void 0:D.limit,iterator:D===null||D===void 0?void 0:D.iterator,order:D===null||D===void 0?void 0:D.order}),B.send(this.requestCtx,Lx.ListResponseIngestEndpointOutSerializer._fromJsonObject)}create(u,D,B){let A=new f.SvixRequest(f.HttpMethod.POST,"/ingest/api/v1/source/{source_id}/endpoint");return A.setPathParam("source_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(xx.IngestEndpointInSerializer._toJsonObject(D)),A.send(this.requestCtx,N8.IngestEndpointOutSerializer._fromJsonObject)}get(u,D){let B=new f.SvixRequest(f.HttpMethod.GET,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}");return B.setPathParam("source_id",u),B.setPathParam("endpoint_id",D),B.send(this.requestCtx,N8.IngestEndpointOutSerializer._fromJsonObject)}update(u,D,B){let A=new f.SvixRequest(f.HttpMethod.PUT,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}");return A.setPathParam("source_id",u),A.setPathParam("endpoint_id",D),A.setBody(Mx.IngestEndpointUpdateSerializer._toJsonObject(B)),A.send(this.requestCtx,N8.IngestEndpointOutSerializer._fromJsonObject)}delete(u,D){let B=new f.SvixRequest(f.HttpMethod.DELETE,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}");return B.setPathParam("source_id",u),B.setPathParam("endpoint_id",D),B.sendNoResponseBody(this.requestCtx)}getHeaders(u,D){let B=new f.SvixRequest(f.HttpMethod.GET,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers");return B.setPathParam("source_id",u),B.setPathParam("endpoint_id",D),B.send(this.requestCtx,Sx.IngestEndpointHeadersOutSerializer._fromJsonObject)}updateHeaders(u,D,B){let A=new f.SvixRequest(f.HttpMethod.PUT,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers");return A.setPathParam("source_id",u),A.setPathParam("endpoint_id",D),A.setBody(Kx.IngestEndpointHeadersInSerializer._toJsonObject(B)),A.sendNoResponseBody(this.requestCtx)}getSecret(u,D){let B=new f.SvixRequest(f.HttpMethod.GET,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret");return B.setPathParam("source_id",u),B.setPathParam("endpoint_id",D),B.send(this.requestCtx,Hx.IngestEndpointSecretOutSerializer._fromJsonObject)}rotateSecret(u,D,B,A){let w=new f.SvixRequest(f.HttpMethod.POST,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret/rotate");return w.setPathParam("source_id",u),w.setPathParam("endpoint_id",D),w.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),w.setBody(Rx.IngestEndpointSecretInSerializer._toJsonObject(B)),w.sendNoResponseBody(this.requestCtx)}getTransformation(u,D){let B=new f.SvixRequest(f.HttpMethod.GET,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/transformation");return B.setPathParam("source_id",u),B.setPathParam("endpoint_id",D),B.send(this.requestCtx,Ux.IngestEndpointTransformationOutSerializer._fromJsonObject)}setTransformation(u,D,B){let A=new f.SvixRequest(f.HttpMethod.PATCH,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/transformation");return A.setPathParam("source_id",u),A.setPathParam("endpoint_id",D),A.setBody(cx.IngestEndpointTransformationPatchSerializer._toJsonObject(B)),A.sendNoResponseBody(this.requestCtx)}}cN.IngestEndpoint=UN});var CN=v((EN)=>{Object.defineProperty(EN,"__esModule",{value:!0});EN.AdobeSignConfigSerializer=void 0;EN.AdobeSignConfigSerializer={_fromJsonObject(u){return{clientId:u.clientId}},_toJsonObject(u){return{clientId:u.clientId}}}});var yN=v((PN)=>{Object.defineProperty(PN,"__esModule",{value:!0});PN.AirwallexConfigSerializer=void 0;PN.AirwallexConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var IN=v((VN)=>{Object.defineProperty(VN,"__esModule",{value:!0});VN.CheckbookConfigSerializer=void 0;VN.CheckbookConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var G8=v((qN)=>{Object.defineProperty(qN,"__esModule",{value:!0});qN.CronConfigSerializer=void 0;qN.CronConfigSerializer={_fromJsonObject(u){return{contentType:u.contentType,payload:u.payload,schedule:u.schedule}},_toJsonObject(u){return{contentType:u.contentType,payload:u.payload,schedule:u.schedule}}}});var fN=v((gN)=>{Object.defineProperty(gN,"__esModule",{value:!0});gN.DocusignConfigSerializer=void 0;gN.DocusignConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var lN=v((bN)=>{Object.defineProperty(bN,"__esModule",{value:!0});bN.EasypostConfigSerializer=void 0;bN.EasypostConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var iN=v((dN)=>{Object.defineProperty(dN,"__esModule",{value:!0});dN.GithubConfigSerializer=void 0;dN.GithubConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var aN=v((nN)=>{Object.defineProperty(nN,"__esModule",{value:!0});nN.HubspotConfigSerializer=void 0;nN.HubspotConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var oN=v((sN)=>{Object.defineProperty(sN,"__esModule",{value:!0});sN.MetaConfigSerializer=void 0;sN.MetaConfigSerializer={_fromJsonObject(u){return{secret:u.secret,verifyToken:u.verifyToken}},_toJsonObject(u){return{secret:u.secret,verifyToken:u.verifyToken}}}});var DG=v((eN)=>{Object.defineProperty(eN,"__esModule",{value:!0});eN.OrumIoConfigSerializer=void 0;eN.OrumIoConfigSerializer={_fromJsonObject(u){return{publicKey:u.publicKey}},_toJsonObject(u){return{publicKey:u.publicKey}}}});var wG=v((BG)=>{Object.defineProperty(BG,"__esModule",{value:!0});BG.PandaDocConfigSerializer=void 0;BG.PandaDocConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var GG=v((FG)=>{Object.defineProperty(FG,"__esModule",{value:!0});FG.PortIoConfigSerializer=void 0;FG.PortIoConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var zG=v((vG)=>{Object.defineProperty(vG,"__esModule",{value:!0});vG.RutterConfigSerializer=void 0;vG.RutterConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var QG=v((ZG)=>{Object.defineProperty(ZG,"__esModule",{value:!0});ZG.SegmentConfigSerializer=void 0;ZG.SegmentConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var YG=v((WG)=>{Object.defineProperty(WG,"__esModule",{value:!0});WG.ShopifyConfigSerializer=void 0;WG.ShopifyConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var SG=v((hG)=>{Object.defineProperty(hG,"__esModule",{value:!0});hG.SlackConfigSerializer=void 0;hG.SlackConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var HG=v((xG)=>{Object.defineProperty(xG,"__esModule",{value:!0});xG.StripeConfigSerializer=void 0;xG.StripeConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var MG=v((UG)=>{Object.defineProperty(UG,"__esModule",{value:!0});UG.SvixConfigSerializer=void 0;UG.SvixConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var OG=v((LG)=>{Object.defineProperty(LG,"__esModule",{value:!0});LG.TelnyxConfigSerializer=void 0;LG.TelnyxConfigSerializer={_fromJsonObject(u){return{publicKey:u.publicKey}},_toJsonObject(u){return{publicKey:u.publicKey}}}});var kG=v((CG)=>{Object.defineProperty(CG,"__esModule",{value:!0});CG.VapiConfigSerializer=void 0;CG.VapiConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var TG=v((yG)=>{Object.defineProperty(yG,"__esModule",{value:!0});yG.VeriffConfigSerializer=void 0;yG.VeriffConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var mG=v((IG)=>{Object.defineProperty(IG,"__esModule",{value:!0});IG.ZoomConfigSerializer=void 0;IG.ZoomConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var Gv=v((Fv)=>{Object.defineProperty(Fv,"__esModule",{value:!0});Fv.IngestSourceInSerializer=void 0;var gG=CN(),_G=yN(),fG=IN(),bG=G8(),jG=fN(),lG=lN(),dG=iN(),rG=aN(),iG=oN(),nG=DG(),pG=wG(),aG=GG(),sG=zG(),tG=QG(),oG=YG(),eG=SG(),uv=HG(),C=MG(),Dv=OG(),Bv=kG(),Av=TG(),wv=mG();Fv.IngestSourceInSerializer={_fromJsonObject(u){let D=u.type;function B(A){switch(A){case"generic-webhook":return{};case"cron":return bG.CronConfigSerializer._fromJsonObject(u.config);case"adobe-sign":return gG.AdobeSignConfigSerializer._fromJsonObject(u.config);case"beehiiv":return C.SvixConfigSerializer._fromJsonObject(u.config);case"brex":return C.SvixConfigSerializer._fromJsonObject(u.config);case"checkbook":return fG.CheckbookConfigSerializer._fromJsonObject(u.config);case"clerk":return C.SvixConfigSerializer._fromJsonObject(u.config);case"docusign":return jG.DocusignConfigSerializer._fromJsonObject(u.config);case"easypost":return lG.EasypostConfigSerializer._fromJsonObject(u.config);case"github":return dG.GithubConfigSerializer._fromJsonObject(u.config);case"guesty":return C.SvixConfigSerializer._fromJsonObject(u.config);case"hubspot":return rG.HubspotConfigSerializer._fromJsonObject(u.config);case"incident-io":return C.SvixConfigSerializer._fromJsonObject(u.config);case"lithic":return C.SvixConfigSerializer._fromJsonObject(u.config);case"meta":return iG.MetaConfigSerializer._fromJsonObject(u.config);case"nash":return C.SvixConfigSerializer._fromJsonObject(u.config);case"orum-io":return nG.OrumIoConfigSerializer._fromJsonObject(u.config);case"panda-doc":return pG.PandaDocConfigSerializer._fromJsonObject(u.config);case"port-io":return aG.PortIoConfigSerializer._fromJsonObject(u.config);case"pleo":return C.SvixConfigSerializer._fromJsonObject(u.config);case"psi-fi":return C.SvixConfigSerializer._fromJsonObject(u.config);case"replicate":return C.SvixConfigSerializer._fromJsonObject(u.config);case"resend":return C.SvixConfigSerializer._fromJsonObject(u.config);case"rutter":return sG.RutterConfigSerializer._fromJsonObject(u.config);case"safebase":return C.SvixConfigSerializer._fromJsonObject(u.config);case"sardine":return C.SvixConfigSerializer._fromJsonObject(u.config);case"segment":return tG.SegmentConfigSerializer._fromJsonObject(u.config);case"shopify":return oG.ShopifyConfigSerializer._fromJsonObject(u.config);case"slack":return eG.SlackConfigSerializer._fromJsonObject(u.config);case"stripe":return uv.StripeConfigSerializer._fromJsonObject(u.config);case"stych":return C.SvixConfigSerializer._fromJsonObject(u.config);case"svix":return C.SvixConfigSerializer._fromJsonObject(u.config);case"zoom":return wv.ZoomConfigSerializer._fromJsonObject(u.config);case"telnyx":return Dv.TelnyxConfigSerializer._fromJsonObject(u.config);case"vapi":return Bv.VapiConfigSerializer._fromJsonObject(u.config);case"open-ai":return C.SvixConfigSerializer._fromJsonObject(u.config);case"render":return C.SvixConfigSerializer._fromJsonObject(u.config);case"veriff":return Av.VeriffConfigSerializer._fromJsonObject(u.config);case"airwallex":return _G.AirwallexConfigSerializer._fromJsonObject(u.config);default:throw Error(`Unexpected type: ${A}`)}}return{type:D,config:B(D),metadata:u.metadata,name:u.name,uid:u.uid}},_toJsonObject(u){let D;switch(u.type){case"generic-webhook":D={};break;case"cron":D=bG.CronConfigSerializer._toJsonObject(u.config);break;case"adobe-sign":D=gG.AdobeSignConfigSerializer._toJsonObject(u.config);break;case"beehiiv":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"brex":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"checkbook":D=fG.CheckbookConfigSerializer._toJsonObject(u.config);break;case"clerk":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"docusign":D=jG.DocusignConfigSerializer._toJsonObject(u.config);break;case"easypost":D=lG.EasypostConfigSerializer._toJsonObject(u.config);break;case"github":D=dG.GithubConfigSerializer._toJsonObject(u.config);break;case"guesty":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"hubspot":D=rG.HubspotConfigSerializer._toJsonObject(u.config);break;case"incident-io":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"lithic":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"meta":D=iG.MetaConfigSerializer._toJsonObject(u.config);break;case"nash":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"orum-io":D=nG.OrumIoConfigSerializer._toJsonObject(u.config);break;case"panda-doc":D=pG.PandaDocConfigSerializer._toJsonObject(u.config);break;case"port-io":D=aG.PortIoConfigSerializer._toJsonObject(u.config);break;case"pleo":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"psi-fi":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"replicate":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"resend":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"rutter":D=sG.RutterConfigSerializer._toJsonObject(u.config);break;case"safebase":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"sardine":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"segment":D=tG.SegmentConfigSerializer._toJsonObject(u.config);break;case"shopify":D=oG.ShopifyConfigSerializer._toJsonObject(u.config);break;case"slack":D=eG.SlackConfigSerializer._toJsonObject(u.config);break;case"stripe":D=uv.StripeConfigSerializer._toJsonObject(u.config);break;case"stych":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"svix":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"zoom":D=wv.ZoomConfigSerializer._toJsonObject(u.config);break;case"telnyx":D=Dv.TelnyxConfigSerializer._toJsonObject(u.config);break;case"vapi":D=Bv.VapiConfigSerializer._toJsonObject(u.config);break;case"open-ai":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"render":D=C.SvixConfigSerializer._toJsonObject(u.config);break;case"veriff":D=Av.VeriffConfigSerializer._toJsonObject(u.config);break;case"airwallex":D=_G.AirwallexConfigSerializer._toJsonObject(u.config);break}return{type:u.type,config:D,metadata:u.metadata,name:u.name,uid:u.uid}}}});var zv=v((vv)=>{Object.defineProperty(vv,"__esModule",{value:!0});vv.AdobeSignConfigOutSerializer=void 0;vv.AdobeSignConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Qv=v((Zv)=>{Object.defineProperty(Zv,"__esModule",{value:!0});Zv.AirwallexConfigOutSerializer=void 0;Zv.AirwallexConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Yv=v((Wv)=>{Object.defineProperty(Wv,"__esModule",{value:!0});Wv.CheckbookConfigOutSerializer=void 0;Wv.CheckbookConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Sv=v((hv)=>{Object.defineProperty(hv,"__esModule",{value:!0});hv.DocusignConfigOutSerializer=void 0;hv.DocusignConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Hv=v((xv)=>{Object.defineProperty(xv,"__esModule",{value:!0});xv.EasypostConfigOutSerializer=void 0;xv.EasypostConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Mv=v((Uv)=>{Object.defineProperty(Uv,"__esModule",{value:!0});Uv.GithubConfigOutSerializer=void 0;Uv.GithubConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Ov=v((Lv)=>{Object.defineProperty(Lv,"__esModule",{value:!0});Lv.HubspotConfigOutSerializer=void 0;Lv.HubspotConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var kv=v((Cv)=>{Object.defineProperty(Cv,"__esModule",{value:!0});Cv.MetaConfigOutSerializer=void 0;Cv.MetaConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Tv=v((yv)=>{Object.defineProperty(yv,"__esModule",{value:!0});yv.OrumIoConfigOutSerializer=void 0;yv.OrumIoConfigOutSerializer={_fromJsonObject(u){return{publicKey:u.publicKey}},_toJsonObject(u){return{publicKey:u.publicKey}}}});var mv=v((Iv)=>{Object.defineProperty(Iv,"__esModule",{value:!0});Iv.PandaDocConfigOutSerializer=void 0;Iv.PandaDocConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var fv=v((gv)=>{Object.defineProperty(gv,"__esModule",{value:!0});gv.PortIoConfigOutSerializer=void 0;gv.PortIoConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var lv=v((bv)=>{Object.defineProperty(bv,"__esModule",{value:!0});bv.RutterConfigOutSerializer=void 0;bv.RutterConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var iv=v((dv)=>{Object.defineProperty(dv,"__esModule",{value:!0});dv.SegmentConfigOutSerializer=void 0;dv.SegmentConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var av=v((nv)=>{Object.defineProperty(nv,"__esModule",{value:!0});nv.ShopifyConfigOutSerializer=void 0;nv.ShopifyConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var ov=v((sv)=>{Object.defineProperty(sv,"__esModule",{value:!0});sv.SlackConfigOutSerializer=void 0;sv.SlackConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var D$=v((ev)=>{Object.defineProperty(ev,"__esModule",{value:!0});ev.StripeConfigOutSerializer=void 0;ev.StripeConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var w$=v((B$)=>{Object.defineProperty(B$,"__esModule",{value:!0});B$.SvixConfigOutSerializer=void 0;B$.SvixConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var G$=v((F$)=>{Object.defineProperty(F$,"__esModule",{value:!0});F$.TelnyxConfigOutSerializer=void 0;F$.TelnyxConfigOutSerializer={_fromJsonObject(u){return{publicKey:u.publicKey}},_toJsonObject(u){return{publicKey:u.publicKey}}}});var z$=v((v$)=>{Object.defineProperty(v$,"__esModule",{value:!0});v$.VapiConfigOutSerializer=void 0;v$.VapiConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Q$=v((Z$)=>{Object.defineProperty(Z$,"__esModule",{value:!0});Z$.VeriffConfigOutSerializer=void 0;Z$.VeriffConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Y$=v((W$)=>{Object.defineProperty(W$,"__esModule",{value:!0});W$.ZoomConfigOutSerializer=void 0;W$.ZoomConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var v8=v((g$)=>{Object.defineProperty(g$,"__esModule",{value:!0});g$.IngestSourceOutSerializer=void 0;var h$=zv(),K$=Qv(),S$=Yv(),x$=G8(),R$=Sv(),H$=Hv(),U$=Mv(),c$=Ov(),M$=kv(),L$=Tv(),E$=mv(),O$=fv(),C$=lv(),P$=iv(),k$=av(),y$=ov(),V$=D$(),P=w$(),T$=G$(),I$=z$(),q$=Q$(),m$=Y$();g$.IngestSourceOutSerializer={_fromJsonObject(u){let D=u.type;function B(A){switch(A){case"generic-webhook":return{};case"cron":return x$.CronConfigSerializer._fromJsonObject(u.config);case"adobe-sign":return h$.AdobeSignConfigOutSerializer._fromJsonObject(u.config);case"beehiiv":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"brex":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"checkbook":return S$.CheckbookConfigOutSerializer._fromJsonObject(u.config);case"clerk":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"docusign":return R$.DocusignConfigOutSerializer._fromJsonObject(u.config);case"easypost":return H$.EasypostConfigOutSerializer._fromJsonObject(u.config);case"github":return U$.GithubConfigOutSerializer._fromJsonObject(u.config);case"guesty":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"hubspot":return c$.HubspotConfigOutSerializer._fromJsonObject(u.config);case"incident-io":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"lithic":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"meta":return M$.MetaConfigOutSerializer._fromJsonObject(u.config);case"nash":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"orum-io":return L$.OrumIoConfigOutSerializer._fromJsonObject(u.config);case"panda-doc":return E$.PandaDocConfigOutSerializer._fromJsonObject(u.config);case"port-io":return O$.PortIoConfigOutSerializer._fromJsonObject(u.config);case"psi-fi":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"pleo":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"replicate":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"resend":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"rutter":return C$.RutterConfigOutSerializer._fromJsonObject(u.config);case"safebase":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"sardine":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"segment":return P$.SegmentConfigOutSerializer._fromJsonObject(u.config);case"shopify":return k$.ShopifyConfigOutSerializer._fromJsonObject(u.config);case"slack":return y$.SlackConfigOutSerializer._fromJsonObject(u.config);case"stripe":return V$.StripeConfigOutSerializer._fromJsonObject(u.config);case"stych":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"svix":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"zoom":return m$.ZoomConfigOutSerializer._fromJsonObject(u.config);case"telnyx":return T$.TelnyxConfigOutSerializer._fromJsonObject(u.config);case"vapi":return I$.VapiConfigOutSerializer._fromJsonObject(u.config);case"open-ai":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"render":return P.SvixConfigOutSerializer._fromJsonObject(u.config);case"veriff":return q$.VeriffConfigOutSerializer._fromJsonObject(u.config);case"airwallex":return K$.AirwallexConfigOutSerializer._fromJsonObject(u.config);default:throw Error(`Unexpected type: ${A}`)}}return{type:D,config:B(D),createdAt:new Date(u.createdAt),id:u.id,ingestUrl:u.ingestUrl,metadata:u.metadata,name:u.name,uid:u.uid,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){let D;switch(u.type){case"generic-webhook":D={};break;case"cron":D=x$.CronConfigSerializer._toJsonObject(u.config);break;case"adobe-sign":D=h$.AdobeSignConfigOutSerializer._toJsonObject(u.config);break;case"beehiiv":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"brex":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"checkbook":D=S$.CheckbookConfigOutSerializer._toJsonObject(u.config);break;case"clerk":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"docusign":D=R$.DocusignConfigOutSerializer._toJsonObject(u.config);break;case"easypost":D=H$.EasypostConfigOutSerializer._toJsonObject(u.config);break;case"github":D=U$.GithubConfigOutSerializer._toJsonObject(u.config);break;case"guesty":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"hubspot":D=c$.HubspotConfigOutSerializer._toJsonObject(u.config);break;case"incident-io":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"lithic":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"meta":D=M$.MetaConfigOutSerializer._toJsonObject(u.config);break;case"nash":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"orum-io":D=L$.OrumIoConfigOutSerializer._toJsonObject(u.config);break;case"panda-doc":D=E$.PandaDocConfigOutSerializer._toJsonObject(u.config);break;case"port-io":D=O$.PortIoConfigOutSerializer._toJsonObject(u.config);break;case"psi-fi":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"pleo":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"replicate":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"resend":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"rutter":D=C$.RutterConfigOutSerializer._toJsonObject(u.config);break;case"safebase":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"sardine":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"segment":D=P$.SegmentConfigOutSerializer._toJsonObject(u.config);break;case"shopify":D=k$.ShopifyConfigOutSerializer._toJsonObject(u.config);break;case"slack":D=y$.SlackConfigOutSerializer._toJsonObject(u.config);break;case"stripe":D=V$.StripeConfigOutSerializer._toJsonObject(u.config);break;case"stych":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"svix":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"zoom":D=m$.ZoomConfigOutSerializer._toJsonObject(u.config);break;case"telnyx":D=T$.TelnyxConfigOutSerializer._toJsonObject(u.config);break;case"vapi":D=I$.VapiConfigOutSerializer._toJsonObject(u.config);break;case"open-ai":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"render":D=P.SvixConfigOutSerializer._toJsonObject(u.config);break;case"veriff":D=q$.VeriffConfigOutSerializer._toJsonObject(u.config);break;case"airwallex":D=K$.AirwallexConfigOutSerializer._toJsonObject(u.config);break}return{type:u.type,config:D,createdAt:u.createdAt,id:u.id,ingestUrl:u.ingestUrl,metadata:u.metadata,name:u.name,uid:u.uid,updatedAt:u.updatedAt}}}});var l$=v((b$)=>{Object.defineProperty(b$,"__esModule",{value:!0});b$.ListResponseIngestSourceOutSerializer=void 0;var f$=v8();b$.ListResponseIngestSourceOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>f$.IngestSourceOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>f$.IngestSourceOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var i$=v((d$)=>{Object.defineProperty(d$,"__esModule",{value:!0});d$.RotateTokenOutSerializer=void 0;d$.RotateTokenOutSerializer={_fromJsonObject(u){return{ingestUrl:u.ingestUrl}},_toJsonObject(u){return{ingestUrl:u.ingestUrl}}}});var t$=v((a$)=>{Object.defineProperty(a$,"__esModule",{value:!0});a$.IngestSource=void 0;var n$=Gv(),$8=v8(),Ex=l$(),Ox=i$(),M2=g();class p${constructor(u){this.requestCtx=u}list(u){let D=new M2.SvixRequest(M2.HttpMethod.GET,"/ingest/api/v1/source");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order}),D.send(this.requestCtx,Ex.ListResponseIngestSourceOutSerializer._fromJsonObject)}create(u,D){let B=new M2.SvixRequest(M2.HttpMethod.POST,"/ingest/api/v1/source");return B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.setBody(n$.IngestSourceInSerializer._toJsonObject(u)),B.send(this.requestCtx,$8.IngestSourceOutSerializer._fromJsonObject)}get(u){let D=new M2.SvixRequest(M2.HttpMethod.GET,"/ingest/api/v1/source/{source_id}");return D.setPathParam("source_id",u),D.send(this.requestCtx,$8.IngestSourceOutSerializer._fromJsonObject)}update(u,D){let B=new M2.SvixRequest(M2.HttpMethod.PUT,"/ingest/api/v1/source/{source_id}");return B.setPathParam("source_id",u),B.setBody(n$.IngestSourceInSerializer._toJsonObject(D)),B.send(this.requestCtx,$8.IngestSourceOutSerializer._fromJsonObject)}delete(u){let D=new M2.SvixRequest(M2.HttpMethod.DELETE,"/ingest/api/v1/source/{source_id}");return D.setPathParam("source_id",u),D.sendNoResponseBody(this.requestCtx)}rotateToken(u,D){let B=new M2.SvixRequest(M2.HttpMethod.POST,"/ingest/api/v1/source/{source_id}/token/rotate");return B.setPathParam("source_id",u),B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.send(this.requestCtx,Ox.RotateTokenOutSerializer._fromJsonObject)}}a$.IngestSource=p$});var Bz=v((uz)=>{Object.defineProperty(uz,"__esModule",{value:!0});uz.Ingest=void 0;var Cx=t3(),Px=i7(),kx=LN(),yx=t$(),o$=g();class e${constructor(u){this.requestCtx=u}get endpoint(){return new kx.IngestEndpoint(this.requestCtx)}get source(){return new yx.IngestSource(this.requestCtx)}dashboard(u,D,B){let A=new o$.SvixRequest(o$.HttpMethod.POST,"/ingest/api/v1/source/{source_id}/dashboard");return A.setPathParam("source_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(Px.IngestSourceConsumerPortalAccessInSerializer._toJsonObject(D)),A.send(this.requestCtx,Cx.DashboardAccessOutSerializer._fromJsonObject)}}uz.Ingest=e$});var Fz=v((Az)=>{Object.defineProperty(Az,"__esModule",{value:!0});Az.IntegrationInSerializer=void 0;Az.IntegrationInSerializer={_fromJsonObject(u){return{featureFlags:u.featureFlags,name:u.name}},_toJsonObject(u){return{featureFlags:u.featureFlags,name:u.name}}}});var vz=v((Nz)=>{Object.defineProperty(Nz,"__esModule",{value:!0});Nz.IntegrationKeyOutSerializer=void 0;Nz.IntegrationKeyOutSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var z8=v(($z)=>{Object.defineProperty($z,"__esModule",{value:!0});$z.IntegrationOutSerializer=void 0;$z.IntegrationOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),featureFlags:u.featureFlags,id:u.id,name:u.name,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{createdAt:u.createdAt,featureFlags:u.featureFlags,id:u.id,name:u.name,updatedAt:u.updatedAt}}}});var Qz=v((Zz)=>{Object.defineProperty(Zz,"__esModule",{value:!0});Zz.IntegrationUpdateSerializer=void 0;Zz.IntegrationUpdateSerializer={_fromJsonObject(u){return{featureFlags:u.featureFlags,name:u.name}},_toJsonObject(u){return{featureFlags:u.featureFlags,name:u.name}}}});var hz=v((Xz)=>{Object.defineProperty(Xz,"__esModule",{value:!0});Xz.ListResponseIntegrationOutSerializer=void 0;var Wz=z8();Xz.ListResponseIntegrationOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>Wz.IntegrationOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>Wz.IntegrationOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var Hz=v((xz)=>{Object.defineProperty(xz,"__esModule",{value:!0});xz.Integration=void 0;var Vx=Fz(),Kz=vz(),Z8=z8(),Tx=Qz(),Ix=hz(),Q2=g();class Sz{constructor(u){this.requestCtx=u}list(u,D){let B=new Q2.SvixRequest(Q2.HttpMethod.GET,"/api/v1/app/{app_id}/integration");return B.setPathParam("app_id",u),B.setQueryParams({limit:D===null||D===void 0?void 0:D.limit,iterator:D===null||D===void 0?void 0:D.iterator,order:D===null||D===void 0?void 0:D.order}),B.send(this.requestCtx,Ix.ListResponseIntegrationOutSerializer._fromJsonObject)}create(u,D,B){let A=new Q2.SvixRequest(Q2.HttpMethod.POST,"/api/v1/app/{app_id}/integration");return A.setPathParam("app_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(Vx.IntegrationInSerializer._toJsonObject(D)),A.send(this.requestCtx,Z8.IntegrationOutSerializer._fromJsonObject)}get(u,D){let B=new Q2.SvixRequest(Q2.HttpMethod.GET,"/api/v1/app/{app_id}/integration/{integ_id}");return B.setPathParam("app_id",u),B.setPathParam("integ_id",D),B.send(this.requestCtx,Z8.IntegrationOutSerializer._fromJsonObject)}update(u,D,B){let A=new Q2.SvixRequest(Q2.HttpMethod.PUT,"/api/v1/app/{app_id}/integration/{integ_id}");return A.setPathParam("app_id",u),A.setPathParam("integ_id",D),A.setBody(Tx.IntegrationUpdateSerializer._toJsonObject(B)),A.send(this.requestCtx,Z8.IntegrationOutSerializer._fromJsonObject)}delete(u,D){let B=new Q2.SvixRequest(Q2.HttpMethod.DELETE,"/api/v1/app/{app_id}/integration/{integ_id}");return B.setPathParam("app_id",u),B.setPathParam("integ_id",D),B.sendNoResponseBody(this.requestCtx)}getKey(u,D){let B=new Q2.SvixRequest(Q2.HttpMethod.GET,"/api/v1/app/{app_id}/integration/{integ_id}/key");return B.setPathParam("app_id",u),B.setPathParam("integ_id",D),B.send(this.requestCtx,Kz.IntegrationKeyOutSerializer._fromJsonObject)}rotateKey(u,D,B){let A=new Q2.SvixRequest(Q2.HttpMethod.POST,"/api/v1/app/{app_id}/integration/{integ_id}/key/rotate");return A.setPathParam("app_id",u),A.setPathParam("integ_id",D),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.send(this.requestCtx,Kz.IntegrationKeyOutSerializer._fromJsonObject)}}xz.Integration=Sz});var Ez=v((Mz)=>{Object.defineProperty(Mz,"__esModule",{value:!0});Mz.ExpungeAllContentsOutSerializer=void 0;var Uz=a2(),cz=s2();Mz.ExpungeAllContentsOutSerializer={_fromJsonObject(u){return{id:u.id,status:Uz.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:cz.BackgroundTaskTypeSerializer._fromJsonObject(u.task),updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{id:u.id,status:Uz.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:cz.BackgroundTaskTypeSerializer._toJsonObject(u.task),updatedAt:u.updatedAt}}}});var kz=v((Cz)=>{Object.defineProperty(Cz,"__esModule",{value:!0});Cz.ListResponseMessageOutSerializer=void 0;var Oz=Hu();Cz.ListResponseMessageOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>Oz.MessageOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>Oz.MessageOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var Tz=v((yz)=>{Object.defineProperty(yz,"__esModule",{value:!0});yz.MessagePrecheckInSerializer=void 0;yz.MessagePrecheckInSerializer={_fromJsonObject(u){return{channels:u.channels,eventType:u.eventType}},_toJsonObject(u){return{channels:u.channels,eventType:u.eventType}}}});var mz=v((Iz)=>{Object.defineProperty(Iz,"__esModule",{value:!0});Iz.MessagePrecheckOutSerializer=void 0;Iz.MessagePrecheckOutSerializer={_fromJsonObject(u){return{active:u.active}},_toJsonObject(u){return{active:u.active}}}});var fz=v((gz)=>{Object.defineProperty(gz,"__esModule",{value:!0});gz.PollingEndpointConsumerSeekInSerializer=void 0;gz.PollingEndpointConsumerSeekInSerializer={_fromJsonObject(u){return{after:new Date(u.after)}},_toJsonObject(u){return{after:u.after}}}});var lz=v((bz)=>{Object.defineProperty(bz,"__esModule",{value:!0});bz.PollingEndpointConsumerSeekOutSerializer=void 0;bz.PollingEndpointConsumerSeekOutSerializer={_fromJsonObject(u){return{iterator:u.iterator}},_toJsonObject(u){return{iterator:u.iterator}}}});var iz=v((dz)=>{Object.defineProperty(dz,"__esModule",{value:!0});dz.PollingEndpointMessageOutSerializer=void 0;dz.PollingEndpointMessageOutSerializer={_fromJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt?new Date(u.deliverAt):null,eventId:u.eventId,eventType:u.eventType,headers:u.headers,id:u.id,payload:u.payload,tags:u.tags,timestamp:new Date(u.timestamp)}},_toJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt,eventId:u.eventId,eventType:u.eventType,headers:u.headers,id:u.id,payload:u.payload,tags:u.tags,timestamp:u.timestamp}}}});var sz=v((pz)=>{Object.defineProperty(pz,"__esModule",{value:!0});pz.PollingEndpointOutSerializer=void 0;var nz=iz();pz.PollingEndpointOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>nz.PollingEndpointMessageOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator}},_toJsonObject(u){return{data:u.data.map((D)=>nz.PollingEndpointMessageOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator}}}});var DZ=v((ez)=>{Object.defineProperty(ez,"__esModule",{value:!0});ez.MessagePoller=void 0;var qx=fz(),mx=lz(),tz=sz(),V0=g();class oz{constructor(u){this.requestCtx=u}poll(u,D,B){let A=new V0.SvixRequest(V0.HttpMethod.GET,"/api/v1/app/{app_id}/poller/{sink_id}");return A.setPathParam("app_id",u),A.setPathParam("sink_id",D),A.setQueryParams({limit:B===null||B===void 0?void 0:B.limit,iterator:B===null||B===void 0?void 0:B.iterator,event_type:B===null||B===void 0?void 0:B.eventType,channel:B===null||B===void 0?void 0:B.channel,after:B===null||B===void 0?void 0:B.after}),A.send(this.requestCtx,tz.PollingEndpointOutSerializer._fromJsonObject)}consumerPoll(u,D,B,A){let w=new V0.SvixRequest(V0.HttpMethod.GET,"/api/v1/app/{app_id}/poller/{sink_id}/consumer/{consumer_id}");return w.setPathParam("app_id",u),w.setPathParam("sink_id",D),w.setPathParam("consumer_id",B),w.setQueryParams({limit:A===null||A===void 0?void 0:A.limit,iterator:A===null||A===void 0?void 0:A.iterator}),w.send(this.requestCtx,tz.PollingEndpointOutSerializer._fromJsonObject)}consumerSeek(u,D,B,A,w){let F=new V0.SvixRequest(V0.HttpMethod.POST,"/api/v1/app/{app_id}/poller/{sink_id}/consumer/{consumer_id}/seek");return F.setPathParam("app_id",u),F.setPathParam("sink_id",D),F.setPathParam("consumer_id",B),F.setHeaderParam("idempotency-key",w===null||w===void 0?void 0:w.idempotencyKey),F.setBody(qx.PollingEndpointConsumerSeekInSerializer._toJsonObject(A)),F.send(this.requestCtx,mx.PollingEndpointConsumerSeekOutSerializer._fromJsonObject)}}ez.MessagePoller=oz});var FZ=v((AZ)=>{Object.defineProperty(AZ,"__esModule",{value:!0});AZ.MessageInSerializer=void 0;var BZ=i1();AZ.MessageInSerializer={_fromJsonObject(u){return{application:u.application!=null?BZ.ApplicationInSerializer._fromJsonObject(u.application):void 0,channels:u.channels,deliverAt:u.deliverAt?new Date(u.deliverAt):null,eventId:u.eventId,eventType:u.eventType,payload:u.payload,payloadRetentionHours:u.payloadRetentionHours,payloadRetentionPeriod:u.payloadRetentionPeriod,tags:u.tags,transformationsParams:u.transformationsParams}},_toJsonObject(u){return{application:u.application!=null?BZ.ApplicationInSerializer._toJsonObject(u.application):void 0,channels:u.channels,deliverAt:u.deliverAt,eventId:u.eventId,eventType:u.eventType,payload:u.payload,payloadRetentionHours:u.payloadRetentionHours,payloadRetentionPeriod:u.payloadRetentionPeriod,tags:u.tags,transformationsParams:u.transformationsParams}}}});var J8=v((vZ)=>{Object.defineProperty(vZ,"__esModule",{value:!0});vZ.messageInRaw=vZ.Message=void 0;var gx=Ez(),_x=kz(),NZ=Hu(),fx=Tz(),bx=mz(),jx=DZ(),L2=g(),lx=FZ();class GZ{constructor(u){this.requestCtx=u}get poller(){return new jx.MessagePoller(this.requestCtx)}list(u,D){let B=new L2.SvixRequest(L2.HttpMethod.GET,"/api/v1/app/{app_id}/msg");return B.setPathParam("app_id",u),B.setQueryParams({limit:D===null||D===void 0?void 0:D.limit,iterator:D===null||D===void 0?void 0:D.iterator,channel:D===null||D===void 0?void 0:D.channel,before:D===null||D===void 0?void 0:D.before,after:D===null||D===void 0?void 0:D.after,with_content:D===null||D===void 0?void 0:D.withContent,tag:D===null||D===void 0?void 0:D.tag,event_types:D===null||D===void 0?void 0:D.eventTypes}),B.send(this.requestCtx,_x.ListResponseMessageOutSerializer._fromJsonObject)}create(u,D,B){let A=new L2.SvixRequest(L2.HttpMethod.POST,"/api/v1/app/{app_id}/msg");return A.setPathParam("app_id",u),A.setQueryParams({with_content:B===null||B===void 0?void 0:B.withContent}),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(lx.MessageInSerializer._toJsonObject(D)),A.send(this.requestCtx,NZ.MessageOutSerializer._fromJsonObject)}expungeAllContents(u,D){let B=new L2.SvixRequest(L2.HttpMethod.POST,"/api/v1/app/{app_id}/msg/expunge-all-contents");return B.setPathParam("app_id",u),B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.send(this.requestCtx,gx.ExpungeAllContentsOutSerializer._fromJsonObject)}precheck(u,D,B){let A=new L2.SvixRequest(L2.HttpMethod.POST,"/api/v1/app/{app_id}/msg/precheck/active");return A.setPathParam("app_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(fx.MessagePrecheckInSerializer._toJsonObject(D)),A.send(this.requestCtx,bx.MessagePrecheckOutSerializer._fromJsonObject)}get(u,D,B){let A=new L2.SvixRequest(L2.HttpMethod.GET,"/api/v1/app/{app_id}/msg/{msg_id}");return A.setPathParam("app_id",u),A.setPathParam("msg_id",D),A.setQueryParams({with_content:B===null||B===void 0?void 0:B.withContent}),A.send(this.requestCtx,NZ.MessageOutSerializer._fromJsonObject)}expungeContent(u,D){let B=new L2.SvixRequest(L2.HttpMethod.DELETE,"/api/v1/app/{app_id}/msg/{msg_id}/content");return B.setPathParam("app_id",u),B.setPathParam("msg_id",D),B.sendNoResponseBody(this.requestCtx)}}vZ.Message=GZ;function dx(u,D,B){return{eventType:u,payload:{},transformationsParams:{rawPayload:D,headers:B?{"content-type":B}:void 0}}}vZ.messageInRaw=dx});var Q8=v((zZ)=>{Object.defineProperty(zZ,"__esModule",{value:!0});zZ.EmptyResponseSerializer=void 0;zZ.EmptyResponseSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Uu=v((QZ)=>{Object.defineProperty(QZ,"__esModule",{value:!0});QZ.MessageStatusTextSerializer=QZ.MessageStatusText=void 0;var ix;(function(u){u.Success="success",u.Pending="pending",u.Fail="fail",u.Sending="sending"})(ix=QZ.MessageStatusText||(QZ.MessageStatusText={}));QZ.MessageStatusTextSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var SZ=v((hZ)=>{Object.defineProperty(hZ,"__esModule",{value:!0});hZ.EndpointMessageOutSerializer=void 0;var XZ=y0(),YZ=Uu();hZ.EndpointMessageOutSerializer={_fromJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt?new Date(u.deliverAt):null,eventId:u.eventId,eventType:u.eventType,id:u.id,nextAttempt:u.nextAttempt?new Date(u.nextAttempt):null,payload:u.payload,status:XZ.MessageStatusSerializer._fromJsonObject(u.status),statusText:YZ.MessageStatusTextSerializer._fromJsonObject(u.statusText),tags:u.tags,timestamp:new Date(u.timestamp)}},_toJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt,eventId:u.eventId,eventType:u.eventType,id:u.id,nextAttempt:u.nextAttempt,payload:u.payload,status:XZ.MessageStatusSerializer._toJsonObject(u.status),statusText:YZ.MessageStatusTextSerializer._toJsonObject(u.statusText),tags:u.tags,timestamp:u.timestamp}}}});var UZ=v((RZ)=>{Object.defineProperty(RZ,"__esModule",{value:!0});RZ.ListResponseEndpointMessageOutSerializer=void 0;var xZ=SZ();RZ.ListResponseEndpointMessageOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>xZ.EndpointMessageOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>xZ.EndpointMessageOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var W8=v((MZ)=>{Object.defineProperty(MZ,"__esModule",{value:!0});MZ.MessageAttemptTriggerTypeSerializer=MZ.MessageAttemptTriggerType=void 0;var nx;(function(u){u[u.Scheduled=0]="Scheduled",u[u.Manual=1]="Manual"})(nx=MZ.MessageAttemptTriggerType||(MZ.MessageAttemptTriggerType={}));MZ.MessageAttemptTriggerTypeSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var X8=v((kZ)=>{Object.defineProperty(kZ,"__esModule",{value:!0});kZ.MessageAttemptOutSerializer=void 0;var EZ=W8(),OZ=Hu(),CZ=y0(),PZ=Uu();kZ.MessageAttemptOutSerializer={_fromJsonObject(u){return{endpointId:u.endpointId,id:u.id,msg:u.msg!=null?OZ.MessageOutSerializer._fromJsonObject(u.msg):void 0,msgId:u.msgId,response:u.response,responseDurationMs:u.responseDurationMs,responseStatusCode:u.responseStatusCode,status:CZ.MessageStatusSerializer._fromJsonObject(u.status),statusText:PZ.MessageStatusTextSerializer._fromJsonObject(u.statusText),timestamp:new Date(u.timestamp),triggerType:EZ.MessageAttemptTriggerTypeSerializer._fromJsonObject(u.triggerType),url:u.url}},_toJsonObject(u){return{endpointId:u.endpointId,id:u.id,msg:u.msg!=null?OZ.MessageOutSerializer._toJsonObject(u.msg):void 0,msgId:u.msgId,response:u.response,responseDurationMs:u.responseDurationMs,responseStatusCode:u.responseStatusCode,status:CZ.MessageStatusSerializer._toJsonObject(u.status),statusText:PZ.MessageStatusTextSerializer._toJsonObject(u.statusText),timestamp:u.timestamp,triggerType:EZ.MessageAttemptTriggerTypeSerializer._toJsonObject(u.triggerType),url:u.url}}}});var qZ=v((TZ)=>{Object.defineProperty(TZ,"__esModule",{value:!0});TZ.ListResponseMessageAttemptOutSerializer=void 0;var VZ=X8();TZ.ListResponseMessageAttemptOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>VZ.MessageAttemptOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>VZ.MessageAttemptOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var bZ=v((_Z)=>{Object.defineProperty(_Z,"__esModule",{value:!0});_Z.MessageEndpointOutSerializer=void 0;var mZ=y0(),gZ=Uu();_Z.MessageEndpointOutSerializer={_fromJsonObject(u){return{channels:u.channels,createdAt:new Date(u.createdAt),description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,nextAttempt:u.nextAttempt?new Date(u.nextAttempt):null,rateLimit:u.rateLimit,status:mZ.MessageStatusSerializer._fromJsonObject(u.status),statusText:gZ.MessageStatusTextSerializer._fromJsonObject(u.statusText),throttleRate:u.throttleRate,uid:u.uid,updatedAt:new Date(u.updatedAt),url:u.url,version:u.version}},_toJsonObject(u){return{channels:u.channels,createdAt:u.createdAt,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,nextAttempt:u.nextAttempt,rateLimit:u.rateLimit,status:mZ.MessageStatusSerializer._toJsonObject(u.status),statusText:gZ.MessageStatusTextSerializer._toJsonObject(u.statusText),throttleRate:u.throttleRate,uid:u.uid,updatedAt:u.updatedAt,url:u.url,version:u.version}}}});var rZ=v((lZ)=>{Object.defineProperty(lZ,"__esModule",{value:!0});lZ.ListResponseMessageEndpointOutSerializer=void 0;var jZ=bZ();lZ.ListResponseMessageEndpointOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>jZ.MessageEndpointOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>jZ.MessageEndpointOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var sZ=v((pZ)=>{Object.defineProperty(pZ,"__esModule",{value:!0});pZ.MessageAttempt=void 0;var px=Q8(),ax=UZ(),iZ=qZ(),sx=rZ(),tx=X8(),W2=g();class nZ{constructor(u){this.requestCtx=u}listByEndpoint(u,D,B){let A=new W2.SvixRequest(W2.HttpMethod.GET,"/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.setQueryParams({limit:B===null||B===void 0?void 0:B.limit,iterator:B===null||B===void 0?void 0:B.iterator,status:B===null||B===void 0?void 0:B.status,status_code_class:B===null||B===void 0?void 0:B.statusCodeClass,channel:B===null||B===void 0?void 0:B.channel,tag:B===null||B===void 0?void 0:B.tag,before:B===null||B===void 0?void 0:B.before,after:B===null||B===void 0?void 0:B.after,with_content:B===null||B===void 0?void 0:B.withContent,with_msg:B===null||B===void 0?void 0:B.withMsg,event_types:B===null||B===void 0?void 0:B.eventTypes}),A.send(this.requestCtx,iZ.ListResponseMessageAttemptOutSerializer._fromJsonObject)}listByMsg(u,D,B){let A=new W2.SvixRequest(W2.HttpMethod.GET,"/api/v1/app/{app_id}/attempt/msg/{msg_id}");return A.setPathParam("app_id",u),A.setPathParam("msg_id",D),A.setQueryParams({limit:B===null||B===void 0?void 0:B.limit,iterator:B===null||B===void 0?void 0:B.iterator,status:B===null||B===void 0?void 0:B.status,status_code_class:B===null||B===void 0?void 0:B.statusCodeClass,channel:B===null||B===void 0?void 0:B.channel,tag:B===null||B===void 0?void 0:B.tag,endpoint_id:B===null||B===void 0?void 0:B.endpointId,before:B===null||B===void 0?void 0:B.before,after:B===null||B===void 0?void 0:B.after,with_content:B===null||B===void 0?void 0:B.withContent,event_types:B===null||B===void 0?void 0:B.eventTypes}),A.send(this.requestCtx,iZ.ListResponseMessageAttemptOutSerializer._fromJsonObject)}listAttemptedMessages(u,D,B){let A=new W2.SvixRequest(W2.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.setQueryParams({limit:B===null||B===void 0?void 0:B.limit,iterator:B===null||B===void 0?void 0:B.iterator,channel:B===null||B===void 0?void 0:B.channel,tag:B===null||B===void 0?void 0:B.tag,status:B===null||B===void 0?void 0:B.status,before:B===null||B===void 0?void 0:B.before,after:B===null||B===void 0?void 0:B.after,with_content:B===null||B===void 0?void 0:B.withContent,event_types:B===null||B===void 0?void 0:B.eventTypes}),A.send(this.requestCtx,ax.ListResponseEndpointMessageOutSerializer._fromJsonObject)}get(u,D,B){let A=new W2.SvixRequest(W2.HttpMethod.GET,"/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}");return A.setPathParam("app_id",u),A.setPathParam("msg_id",D),A.setPathParam("attempt_id",B),A.send(this.requestCtx,tx.MessageAttemptOutSerializer._fromJsonObject)}expungeContent(u,D,B){let A=new W2.SvixRequest(W2.HttpMethod.DELETE,"/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content");return A.setPathParam("app_id",u),A.setPathParam("msg_id",D),A.setPathParam("attempt_id",B),A.sendNoResponseBody(this.requestCtx)}listAttemptedDestinations(u,D,B){let A=new W2.SvixRequest(W2.HttpMethod.GET,"/api/v1/app/{app_id}/msg/{msg_id}/endpoint");return A.setPathParam("app_id",u),A.setPathParam("msg_id",D),A.setQueryParams({limit:B===null||B===void 0?void 0:B.limit,iterator:B===null||B===void 0?void 0:B.iterator}),A.send(this.requestCtx,sx.ListResponseMessageEndpointOutSerializer._fromJsonObject)}resend(u,D,B,A){let w=new W2.SvixRequest(W2.HttpMethod.POST,"/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend");return w.setPathParam("app_id",u),w.setPathParam("msg_id",D),w.setPathParam("endpoint_id",B),w.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),w.send(this.requestCtx,px.EmptyResponseSerializer._fromJsonObject)}}pZ.MessageAttempt=nZ});var Y8=v((tZ)=>{Object.defineProperty(tZ,"__esModule",{value:!0});tZ.OperationalWebhookEndpointOutSerializer=void 0;tZ.OperationalWebhookEndpointOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,updatedAt:new Date(u.updatedAt),url:u.url}},_toJsonObject(u){return{createdAt:u.createdAt,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,updatedAt:u.updatedAt,url:u.url}}}});var BJ=v((uJ)=>{Object.defineProperty(uJ,"__esModule",{value:!0});uJ.ListResponseOperationalWebhookEndpointOutSerializer=void 0;var eZ=Y8();uJ.ListResponseOperationalWebhookEndpointOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>eZ.OperationalWebhookEndpointOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>eZ.OperationalWebhookEndpointOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var FJ=v((AJ)=>{Object.defineProperty(AJ,"__esModule",{value:!0});AJ.OperationalWebhookEndpointHeadersInSerializer=void 0;AJ.OperationalWebhookEndpointHeadersInSerializer={_fromJsonObject(u){return{headers:u.headers}},_toJsonObject(u){return{headers:u.headers}}}});var vJ=v((NJ)=>{Object.defineProperty(NJ,"__esModule",{value:!0});NJ.OperationalWebhookEndpointHeadersOutSerializer=void 0;NJ.OperationalWebhookEndpointHeadersOutSerializer={_fromJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}},_toJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}}}});var ZJ=v(($J)=>{Object.defineProperty($J,"__esModule",{value:!0});$J.OperationalWebhookEndpointInSerializer=void 0;$J.OperationalWebhookEndpointInSerializer={_fromJsonObject(u){return{description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,uid:u.uid,url:u.url}},_toJsonObject(u){return{description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,uid:u.uid,url:u.url}}}});var WJ=v((JJ)=>{Object.defineProperty(JJ,"__esModule",{value:!0});JJ.OperationalWebhookEndpointSecretInSerializer=void 0;JJ.OperationalWebhookEndpointSecretInSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var hJ=v((XJ)=>{Object.defineProperty(XJ,"__esModule",{value:!0});XJ.OperationalWebhookEndpointSecretOutSerializer=void 0;XJ.OperationalWebhookEndpointSecretOutSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var xJ=v((KJ)=>{Object.defineProperty(KJ,"__esModule",{value:!0});KJ.OperationalWebhookEndpointUpdateSerializer=void 0;KJ.OperationalWebhookEndpointUpdateSerializer={_fromJsonObject(u){return{description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,url:u.url}},_toJsonObject(u){return{description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,url:u.url}}}});var K8=v((HJ)=>{Object.defineProperty(HJ,"__esModule",{value:!0});HJ.OperationalWebhookEndpoint=void 0;var ox=BJ(),ex=FJ(),uR=vJ(),DR=ZJ(),h8=Y8(),BR=WJ(),AR=hJ(),wR=xJ(),D2=g();class RJ{constructor(u){this.requestCtx=u}list(u){let D=new D2.SvixRequest(D2.HttpMethod.GET,"/api/v1/operational-webhook/endpoint");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order}),D.send(this.requestCtx,ox.ListResponseOperationalWebhookEndpointOutSerializer._fromJsonObject)}create(u,D){let B=new D2.SvixRequest(D2.HttpMethod.POST,"/api/v1/operational-webhook/endpoint");return B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.setBody(DR.OperationalWebhookEndpointInSerializer._toJsonObject(u)),B.send(this.requestCtx,h8.OperationalWebhookEndpointOutSerializer._fromJsonObject)}get(u){let D=new D2.SvixRequest(D2.HttpMethod.GET,"/api/v1/operational-webhook/endpoint/{endpoint_id}");return D.setPathParam("endpoint_id",u),D.send(this.requestCtx,h8.OperationalWebhookEndpointOutSerializer._fromJsonObject)}update(u,D){let B=new D2.SvixRequest(D2.HttpMethod.PUT,"/api/v1/operational-webhook/endpoint/{endpoint_id}");return B.setPathParam("endpoint_id",u),B.setBody(wR.OperationalWebhookEndpointUpdateSerializer._toJsonObject(D)),B.send(this.requestCtx,h8.OperationalWebhookEndpointOutSerializer._fromJsonObject)}delete(u){let D=new D2.SvixRequest(D2.HttpMethod.DELETE,"/api/v1/operational-webhook/endpoint/{endpoint_id}");return D.setPathParam("endpoint_id",u),D.sendNoResponseBody(this.requestCtx)}getHeaders(u){let D=new D2.SvixRequest(D2.HttpMethod.GET,"/api/v1/operational-webhook/endpoint/{endpoint_id}/headers");return D.setPathParam("endpoint_id",u),D.send(this.requestCtx,uR.OperationalWebhookEndpointHeadersOutSerializer._fromJsonObject)}updateHeaders(u,D){let B=new D2.SvixRequest(D2.HttpMethod.PUT,"/api/v1/operational-webhook/endpoint/{endpoint_id}/headers");return B.setPathParam("endpoint_id",u),B.setBody(ex.OperationalWebhookEndpointHeadersInSerializer._toJsonObject(D)),B.sendNoResponseBody(this.requestCtx)}getSecret(u){let D=new D2.SvixRequest(D2.HttpMethod.GET,"/api/v1/operational-webhook/endpoint/{endpoint_id}/secret");return D.setPathParam("endpoint_id",u),D.send(this.requestCtx,AR.OperationalWebhookEndpointSecretOutSerializer._fromJsonObject)}rotateSecret(u,D,B){let A=new D2.SvixRequest(D2.HttpMethod.POST,"/api/v1/operational-webhook/endpoint/{endpoint_id}/secret/rotate");return A.setPathParam("endpoint_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(BR.OperationalWebhookEndpointSecretInSerializer._toJsonObject(D)),A.sendNoResponseBody(this.requestCtx)}}HJ.OperationalWebhookEndpoint=RJ});var EJ=v((MJ)=>{Object.defineProperty(MJ,"__esModule",{value:!0});MJ.OperationalWebhook=void 0;var FR=K8();class cJ{constructor(u){this.requestCtx=u}get endpoint(){return new FR.OperationalWebhookEndpoint(this.requestCtx)}}MJ.OperationalWebhook=cJ});var yJ=v((PJ)=>{Object.defineProperty(PJ,"__esModule",{value:!0});PJ.AggregateEventTypesOutSerializer=void 0;var OJ=a2(),CJ=s2();PJ.AggregateEventTypesOutSerializer={_fromJsonObject(u){return{id:u.id,status:OJ.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:CJ.BackgroundTaskTypeSerializer._fromJsonObject(u.task),updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{id:u.id,status:OJ.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:CJ.BackgroundTaskTypeSerializer._toJsonObject(u.task),updatedAt:u.updatedAt}}}});var IJ=v((VJ)=>{Object.defineProperty(VJ,"__esModule",{value:!0});VJ.AppUsageStatsInSerializer=void 0;VJ.AppUsageStatsInSerializer={_fromJsonObject(u){return{appIds:u.appIds,since:new Date(u.since),until:new Date(u.until)}},_toJsonObject(u){return{appIds:u.appIds,since:u.since,until:u.until}}}});var fJ=v((gJ)=>{Object.defineProperty(gJ,"__esModule",{value:!0});gJ.AppUsageStatsOutSerializer=void 0;var qJ=a2(),mJ=s2();gJ.AppUsageStatsOutSerializer={_fromJsonObject(u){return{id:u.id,status:qJ.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:mJ.BackgroundTaskTypeSerializer._fromJsonObject(u.task),unresolvedAppIds:u.unresolvedAppIds,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{id:u.id,status:qJ.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:mJ.BackgroundTaskTypeSerializer._toJsonObject(u.task),unresolvedAppIds:u.unresolvedAppIds,updatedAt:u.updatedAt}}}});var dJ=v((jJ)=>{Object.defineProperty(jJ,"__esModule",{value:!0});jJ.Statistics=void 0;var NR=yJ(),GR=IJ(),vR=fJ(),DD=g();class bJ{constructor(u){this.requestCtx=u}aggregateAppStats(u,D){let B=new DD.SvixRequest(DD.HttpMethod.POST,"/api/v1/stats/usage/app");return B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.setBody(GR.AppUsageStatsInSerializer._toJsonObject(u)),B.send(this.requestCtx,vR.AppUsageStatsOutSerializer._fromJsonObject)}aggregateEventTypes(){return new DD.SvixRequest(DD.HttpMethod.PUT,"/api/v1/stats/usage/event-types").send(this.requestCtx,NR.AggregateEventTypesOutSerializer._fromJsonObject)}}jJ.Statistics=bJ});var nJ=v((rJ)=>{Object.defineProperty(rJ,"__esModule",{value:!0});rJ.HttpSinkHeadersPatchInSerializer=void 0;rJ.HttpSinkHeadersPatchInSerializer={_fromJsonObject(u){return{headers:u.headers}},_toJsonObject(u){return{headers:u.headers}}}});var sJ=v((pJ)=>{Object.defineProperty(pJ,"__esModule",{value:!0});pJ.SinkTransformationOutSerializer=void 0;pJ.SinkTransformationOutSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled}},_toJsonObject(u){return{code:u.code,enabled:u.enabled}}}});var S8=v((tJ)=>{Object.defineProperty(tJ,"__esModule",{value:!0});tJ.StreamEventTypeOutSerializer=void 0;tJ.StreamEventTypeOutSerializer={_fromJsonObject(u){return{archived:u.archived,createdAt:new Date(u.createdAt),deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{archived:u.archived,createdAt:u.createdAt,deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name,updatedAt:u.updatedAt}}}});var BQ=v((uQ)=>{Object.defineProperty(uQ,"__esModule",{value:!0});uQ.ListResponseStreamEventTypeOutSerializer=void 0;var eJ=S8();uQ.ListResponseStreamEventTypeOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>eJ.StreamEventTypeOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>eJ.StreamEventTypeOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var FQ=v((AQ)=>{Object.defineProperty(AQ,"__esModule",{value:!0});AQ.StreamEventTypeInSerializer=void 0;AQ.StreamEventTypeInSerializer={_fromJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name}},_toJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name}}}});var vQ=v((NQ)=>{Object.defineProperty(NQ,"__esModule",{value:!0});NQ.StreamEventTypePatchSerializer=void 0;NQ.StreamEventTypePatchSerializer={_fromJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name}},_toJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name}}}});var QQ=v((ZQ)=>{Object.defineProperty(ZQ,"__esModule",{value:!0});ZQ.StreamingEventType=void 0;var $R=BQ(),$Q=FQ(),BD=S8(),zR=vQ(),E2=g();class zQ{constructor(u){this.requestCtx=u}list(u){let D=new E2.SvixRequest(E2.HttpMethod.GET,"/api/v1/stream/event-type");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order,include_archived:u===null||u===void 0?void 0:u.includeArchived}),D.send(this.requestCtx,$R.ListResponseStreamEventTypeOutSerializer._fromJsonObject)}create(u,D){let B=new E2.SvixRequest(E2.HttpMethod.POST,"/api/v1/stream/event-type");return B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.setBody($Q.StreamEventTypeInSerializer._toJsonObject(u)),B.send(this.requestCtx,BD.StreamEventTypeOutSerializer._fromJsonObject)}get(u){let D=new E2.SvixRequest(E2.HttpMethod.GET,"/api/v1/stream/event-type/{name}");return D.setPathParam("name",u),D.send(this.requestCtx,BD.StreamEventTypeOutSerializer._fromJsonObject)}update(u,D){let B=new E2.SvixRequest(E2.HttpMethod.PUT,"/api/v1/stream/event-type/{name}");return B.setPathParam("name",u),B.setBody($Q.StreamEventTypeInSerializer._toJsonObject(D)),B.send(this.requestCtx,BD.StreamEventTypeOutSerializer._fromJsonObject)}delete(u,D){let B=new E2.SvixRequest(E2.HttpMethod.DELETE,"/api/v1/stream/event-type/{name}");return B.setPathParam("name",u),B.setQueryParams({expunge:D===null||D===void 0?void 0:D.expunge}),B.sendNoResponseBody(this.requestCtx)}patch(u,D){let B=new E2.SvixRequest(E2.HttpMethod.PATCH,"/api/v1/stream/event-type/{name}");return B.setPathParam("name",u),B.setBody(zR.StreamEventTypePatchSerializer._toJsonObject(D)),B.send(this.requestCtx,BD.StreamEventTypeOutSerializer._fromJsonObject)}}ZQ.StreamingEventType=zQ});var YQ=v((WQ)=>{Object.defineProperty(WQ,"__esModule",{value:!0});WQ.EventInSerializer=void 0;WQ.EventInSerializer={_fromJsonObject(u){return{eventType:u.eventType,payload:u.payload}},_toJsonObject(u){return{eventType:u.eventType,payload:u.payload}}}});var x8=v((hQ)=>{Object.defineProperty(hQ,"__esModule",{value:!0});hQ.StreamInSerializer=void 0;hQ.StreamInSerializer={_fromJsonObject(u){return{metadata:u.metadata,name:u.name,uid:u.uid}},_toJsonObject(u){return{metadata:u.metadata,name:u.name,uid:u.uid}}}});var UQ=v((RQ)=>{Object.defineProperty(RQ,"__esModule",{value:!0});RQ.CreateStreamEventsInSerializer=void 0;var SQ=YQ(),xQ=x8();RQ.CreateStreamEventsInSerializer={_fromJsonObject(u){return{events:u.events.map((D)=>SQ.EventInSerializer._fromJsonObject(D)),stream:u.stream!=null?xQ.StreamInSerializer._fromJsonObject(u.stream):void 0}},_toJsonObject(u){return{events:u.events.map((D)=>SQ.EventInSerializer._toJsonObject(D)),stream:u.stream!=null?xQ.StreamInSerializer._toJsonObject(u.stream):void 0}}}});var LQ=v((cQ)=>{Object.defineProperty(cQ,"__esModule",{value:!0});cQ.CreateStreamEventsOutSerializer=void 0;cQ.CreateStreamEventsOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var CQ=v((EQ)=>{Object.defineProperty(EQ,"__esModule",{value:!0});EQ.EventOutSerializer=void 0;EQ.EventOutSerializer={_fromJsonObject(u){return{eventType:u.eventType,payload:u.payload,timestamp:new Date(u.timestamp)}},_toJsonObject(u){return{eventType:u.eventType,payload:u.payload,timestamp:u.timestamp}}}});var VQ=v((kQ)=>{Object.defineProperty(kQ,"__esModule",{value:!0});kQ.EventStreamOutSerializer=void 0;var PQ=CQ();kQ.EventStreamOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>PQ.EventOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator}},_toJsonObject(u){return{data:u.data.map((D)=>PQ.EventOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator}}}});var mQ=v((IQ)=>{Object.defineProperty(IQ,"__esModule",{value:!0});IQ.StreamingEvents=void 0;var ZR=UQ(),JR=LQ(),QR=VQ(),AD=g();class TQ{constructor(u){this.requestCtx=u}create(u,D,B){let A=new AD.SvixRequest(AD.HttpMethod.POST,"/api/v1/stream/{stream_id}/events");return A.setPathParam("stream_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(ZR.CreateStreamEventsInSerializer._toJsonObject(D)),A.send(this.requestCtx,JR.CreateStreamEventsOutSerializer._fromJsonObject)}get(u,D,B){let A=new AD.SvixRequest(AD.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink/{sink_id}/events");return A.setPathParam("stream_id",u),A.setPathParam("sink_id",D),A.setQueryParams({limit:B===null||B===void 0?void 0:B.limit,iterator:B===null||B===void 0?void 0:B.iterator,after:B===null||B===void 0?void 0:B.after}),A.send(this.requestCtx,QR.EventStreamOutSerializer._fromJsonObject)}}IQ.StreamingEvents=TQ});var R8=v((gQ)=>{Object.defineProperty(gQ,"__esModule",{value:!0});gQ.AzureBlobStorageConfigSerializer=void 0;gQ.AzureBlobStorageConfigSerializer={_fromJsonObject(u){return{accessKey:u.accessKey,account:u.account,container:u.container}},_toJsonObject(u){return{accessKey:u.accessKey,account:u.account,container:u.container}}}});var H8=v((fQ)=>{Object.defineProperty(fQ,"__esModule",{value:!0});fQ.GoogleCloudStorageConfigSerializer=void 0;fQ.GoogleCloudStorageConfigSerializer={_fromJsonObject(u){return{bucket:u.bucket,credentials:u.credentials}},_toJsonObject(u){return{bucket:u.bucket,credentials:u.credentials}}}});var U8=v((jQ)=>{Object.defineProperty(jQ,"__esModule",{value:!0});jQ.S3ConfigSerializer=void 0;jQ.S3ConfigSerializer={_fromJsonObject(u){return{accessKeyId:u.accessKeyId,bucket:u.bucket,endpointUrl:u.endpointUrl,region:u.region,secretAccessKey:u.secretAccessKey}},_toJsonObject(u){return{accessKeyId:u.accessKeyId,bucket:u.bucket,endpointUrl:u.endpointUrl,region:u.region,secretAccessKey:u.secretAccessKey}}}});var c8=v((dQ)=>{Object.defineProperty(dQ,"__esModule",{value:!0});dQ.SinkHttpConfigSerializer=void 0;dQ.SinkHttpConfigSerializer={_fromJsonObject(u){return{headers:u.headers,key:u.key,url:u.url}},_toJsonObject(u){return{headers:u.headers,key:u.key,url:u.url}}}});var M8=v((iQ)=>{Object.defineProperty(iQ,"__esModule",{value:!0});iQ.SinkOtelV1ConfigSerializer=void 0;iQ.SinkOtelV1ConfigSerializer={_fromJsonObject(u){return{headers:u.headers,url:u.url}},_toJsonObject(u){return{headers:u.headers,url:u.url}}}});var L8=v((aQ)=>{Object.defineProperty(aQ,"__esModule",{value:!0});aQ.SinkStatusSerializer=aQ.SinkStatus=void 0;var WR;(function(u){u.Enabled="enabled",u.Paused="paused",u.Disabled="disabled",u.Retrying="retrying"})(WR=aQ.SinkStatus||(aQ.SinkStatus={}));aQ.SinkStatusSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var E8=v((AW)=>{Object.defineProperty(AW,"__esModule",{value:!0});AW.StreamSinkOutSerializer=void 0;var tQ=R8(),oQ=H8(),eQ=U8(),uW=c8(),DW=M8(),BW=L8();AW.StreamSinkOutSerializer={_fromJsonObject(u){let D=u.type;function B(A){switch(A){case"poller":return{};case"azureBlobStorage":return tQ.AzureBlobStorageConfigSerializer._fromJsonObject(u.config);case"otelTracing":return DW.SinkOtelV1ConfigSerializer._fromJsonObject(u.config);case"http":return uW.SinkHttpConfigSerializer._fromJsonObject(u.config);case"amazonS3":return eQ.S3ConfigSerializer._fromJsonObject(u.config);case"googleCloudStorage":return oQ.GoogleCloudStorageConfigSerializer._fromJsonObject(u.config);default:throw Error(`Unexpected type: ${A}`)}}return{type:D,config:B(D),batchSize:u.batchSize,createdAt:new Date(u.createdAt),currentIterator:u.currentIterator,eventTypes:u.eventTypes,failureReason:u.failureReason,id:u.id,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,nextRetryAt:u.nextRetryAt?new Date(u.nextRetryAt):null,status:BW.SinkStatusSerializer._fromJsonObject(u.status),uid:u.uid,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){let D;switch(u.type){case"poller":D={};break;case"azureBlobStorage":D=tQ.AzureBlobStorageConfigSerializer._toJsonObject(u.config);break;case"otelTracing":D=DW.SinkOtelV1ConfigSerializer._toJsonObject(u.config);break;case"http":D=uW.SinkHttpConfigSerializer._toJsonObject(u.config);break;case"amazonS3":D=eQ.S3ConfigSerializer._toJsonObject(u.config);break;case"googleCloudStorage":D=oQ.GoogleCloudStorageConfigSerializer._toJsonObject(u.config);break}return{type:u.type,config:D,batchSize:u.batchSize,createdAt:u.createdAt,currentIterator:u.currentIterator,eventTypes:u.eventTypes,failureReason:u.failureReason,id:u.id,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,nextRetryAt:u.nextRetryAt,status:BW.SinkStatusSerializer._toJsonObject(u.status),uid:u.uid,updatedAt:u.updatedAt}}}});var vW=v((NW)=>{Object.defineProperty(NW,"__esModule",{value:!0});NW.ListResponseStreamSinkOutSerializer=void 0;var FW=E8();NW.ListResponseStreamSinkOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>FW.StreamSinkOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>FW.StreamSinkOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var ZW=v(($W)=>{Object.defineProperty($W,"__esModule",{value:!0});$W.SinkSecretOutSerializer=void 0;$W.SinkSecretOutSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var WW=v((JW)=>{Object.defineProperty(JW,"__esModule",{value:!0});JW.SinkTransformInSerializer=void 0;JW.SinkTransformInSerializer={_fromJsonObject(u){return{code:u.code}},_toJsonObject(u){return{code:u.code}}}});var wD=v((YW)=>{Object.defineProperty(YW,"__esModule",{value:!0});YW.SinkStatusInSerializer=YW.SinkStatusIn=void 0;var XR;(function(u){u.Enabled="enabled",u.Disabled="disabled"})(XR=YW.SinkStatusIn||(YW.SinkStatusIn={}));YW.SinkStatusInSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var LW=v((cW)=>{Object.defineProperty(cW,"__esModule",{value:!0});cW.StreamSinkInSerializer=void 0;var KW=R8(),SW=H8(),xW=U8(),RW=c8(),HW=M8(),UW=wD();cW.StreamSinkInSerializer={_fromJsonObject(u){let D=u.type;function B(A){switch(A){case"poller":return{};case"azureBlobStorage":return KW.AzureBlobStorageConfigSerializer._fromJsonObject(u.config);case"otelTracing":return HW.SinkOtelV1ConfigSerializer._fromJsonObject(u.config);case"http":return RW.SinkHttpConfigSerializer._fromJsonObject(u.config);case"amazonS3":return xW.S3ConfigSerializer._fromJsonObject(u.config);case"googleCloudStorage":return SW.GoogleCloudStorageConfigSerializer._fromJsonObject(u.config);default:throw Error(`Unexpected type: ${A}`)}}return{type:D,config:B(D),batchSize:u.batchSize,eventTypes:u.eventTypes,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,status:u.status!=null?UW.SinkStatusInSerializer._fromJsonObject(u.status):void 0,uid:u.uid}},_toJsonObject(u){let D;switch(u.type){case"poller":D={};break;case"azureBlobStorage":D=KW.AzureBlobStorageConfigSerializer._toJsonObject(u.config);break;case"otelTracing":D=HW.SinkOtelV1ConfigSerializer._toJsonObject(u.config);break;case"http":D=RW.SinkHttpConfigSerializer._toJsonObject(u.config);break;case"amazonS3":D=xW.S3ConfigSerializer._toJsonObject(u.config);break;case"googleCloudStorage":D=SW.GoogleCloudStorageConfigSerializer._toJsonObject(u.config);break}return{type:u.type,config:D,batchSize:u.batchSize,eventTypes:u.eventTypes,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,status:u.status!=null?UW.SinkStatusInSerializer._toJsonObject(u.status):void 0,uid:u.uid}}}});var CW=v((EW)=>{Object.defineProperty(EW,"__esModule",{value:!0});EW.AmazonS3PatchConfigSerializer=void 0;EW.AmazonS3PatchConfigSerializer={_fromJsonObject(u){return{accessKeyId:u.accessKeyId,bucket:u.bucket,endpointUrl:u.endpointUrl,region:u.region,secretAccessKey:u.secretAccessKey}},_toJsonObject(u){return{accessKeyId:u.accessKeyId,bucket:u.bucket,endpointUrl:u.endpointUrl,region:u.region,secretAccessKey:u.secretAccessKey}}}});var yW=v((PW)=>{Object.defineProperty(PW,"__esModule",{value:!0});PW.AzureBlobStoragePatchConfigSerializer=void 0;PW.AzureBlobStoragePatchConfigSerializer={_fromJsonObject(u){return{accessKey:u.accessKey,account:u.account,container:u.container}},_toJsonObject(u){return{accessKey:u.accessKey,account:u.account,container:u.container}}}});var IW=v((VW)=>{Object.defineProperty(VW,"__esModule",{value:!0});VW.GoogleCloudStoragePatchConfigSerializer=void 0;VW.GoogleCloudStoragePatchConfigSerializer={_fromJsonObject(u){return{bucket:u.bucket,credentials:u.credentials}},_toJsonObject(u){return{bucket:u.bucket,credentials:u.credentials}}}});var gW=v((qW)=>{Object.defineProperty(qW,"__esModule",{value:!0});qW.HttpPatchConfigSerializer=void 0;qW.HttpPatchConfigSerializer={_fromJsonObject(u){return{url:u.url}},_toJsonObject(u){return{url:u.url}}}});var bW=v((_W)=>{Object.defineProperty(_W,"__esModule",{value:!0});_W.OtelTracingPatchConfigSerializer=void 0;_W.OtelTracingPatchConfigSerializer={_fromJsonObject(u){return{url:u.url}},_toJsonObject(u){return{url:u.url}}}});var sW=v((pW)=>{Object.defineProperty(pW,"__esModule",{value:!0});pW.StreamSinkPatchSerializer=void 0;var jW=CW(),lW=yW(),dW=IW(),rW=gW(),iW=bW(),nW=wD();pW.StreamSinkPatchSerializer={_fromJsonObject(u){let D=u.type;function B(A){switch(A){case"poller":return{};case"azureBlobStorage":return lW.AzureBlobStoragePatchConfigSerializer._fromJsonObject(u.config);case"otelTracing":return iW.OtelTracingPatchConfigSerializer._fromJsonObject(u.config);case"http":return rW.HttpPatchConfigSerializer._fromJsonObject(u.config);case"amazonS3":return jW.AmazonS3PatchConfigSerializer._fromJsonObject(u.config);case"googleCloudStorage":return dW.GoogleCloudStoragePatchConfigSerializer._fromJsonObject(u.config);default:throw Error(`Unexpected type: ${A}`)}}return{type:D,config:B(D),batchSize:u.batchSize,eventTypes:u.eventTypes,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,status:u.status!=null?nW.SinkStatusInSerializer._fromJsonObject(u.status):void 0,uid:u.uid}},_toJsonObject(u){let D;switch(u.type){case"poller":D={};break;case"azureBlobStorage":D=lW.AzureBlobStoragePatchConfigSerializer._toJsonObject(u.config);break;case"otelTracing":D=iW.OtelTracingPatchConfigSerializer._toJsonObject(u.config);break;case"http":D=rW.HttpPatchConfigSerializer._toJsonObject(u.config);break;case"amazonS3":D=jW.AmazonS3PatchConfigSerializer._toJsonObject(u.config);break;case"googleCloudStorage":D=dW.GoogleCloudStoragePatchConfigSerializer._toJsonObject(u.config);break}return{type:u.type,config:D,batchSize:u.batchSize,eventTypes:u.eventTypes,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,status:u.status!=null?nW.SinkStatusInSerializer._toJsonObject(u.status):void 0,uid:u.uid}}}});var BX=v((uX)=>{Object.defineProperty(uX,"__esModule",{value:!0});uX.StreamingSink=void 0;var tW=Q8(),YR=A8(),hR=vW(),KR=ZW(),SR=WW(),oW=LW(),FD=E8(),xR=sW(),B2=g();class eW{constructor(u){this.requestCtx=u}list(u,D){let B=new B2.SvixRequest(B2.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink");return B.setPathParam("stream_id",u),B.setQueryParams({limit:D===null||D===void 0?void 0:D.limit,iterator:D===null||D===void 0?void 0:D.iterator,order:D===null||D===void 0?void 0:D.order}),B.send(this.requestCtx,hR.ListResponseStreamSinkOutSerializer._fromJsonObject)}create(u,D,B){let A=new B2.SvixRequest(B2.HttpMethod.POST,"/api/v1/stream/{stream_id}/sink");return A.setPathParam("stream_id",u),A.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),A.setBody(oW.StreamSinkInSerializer._toJsonObject(D)),A.send(this.requestCtx,FD.StreamSinkOutSerializer._fromJsonObject)}get(u,D){let B=new B2.SvixRequest(B2.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink/{sink_id}");return B.setPathParam("stream_id",u),B.setPathParam("sink_id",D),B.send(this.requestCtx,FD.StreamSinkOutSerializer._fromJsonObject)}update(u,D,B){let A=new B2.SvixRequest(B2.HttpMethod.PUT,"/api/v1/stream/{stream_id}/sink/{sink_id}");return A.setPathParam("stream_id",u),A.setPathParam("sink_id",D),A.setBody(oW.StreamSinkInSerializer._toJsonObject(B)),A.send(this.requestCtx,FD.StreamSinkOutSerializer._fromJsonObject)}delete(u,D){let B=new B2.SvixRequest(B2.HttpMethod.DELETE,"/api/v1/stream/{stream_id}/sink/{sink_id}");return B.setPathParam("stream_id",u),B.setPathParam("sink_id",D),B.sendNoResponseBody(this.requestCtx)}patch(u,D,B){let A=new B2.SvixRequest(B2.HttpMethod.PATCH,"/api/v1/stream/{stream_id}/sink/{sink_id}");return A.setPathParam("stream_id",u),A.setPathParam("sink_id",D),A.setBody(xR.StreamSinkPatchSerializer._toJsonObject(B)),A.send(this.requestCtx,FD.StreamSinkOutSerializer._fromJsonObject)}getSecret(u,D){let B=new B2.SvixRequest(B2.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink/{sink_id}/secret");return B.setPathParam("stream_id",u),B.setPathParam("sink_id",D),B.send(this.requestCtx,KR.SinkSecretOutSerializer._fromJsonObject)}rotateSecret(u,D,B,A){let w=new B2.SvixRequest(B2.HttpMethod.POST,"/api/v1/stream/{stream_id}/sink/{sink_id}/secret/rotate");return w.setPathParam("stream_id",u),w.setPathParam("sink_id",D),w.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),w.setBody(YR.EndpointSecretRotateInSerializer._toJsonObject(B)),w.send(this.requestCtx,tW.EmptyResponseSerializer._fromJsonObject)}transformationPartialUpdate(u,D,B){let A=new B2.SvixRequest(B2.HttpMethod.PATCH,"/api/v1/stream/{stream_id}/sink/{sink_id}/transformation");return A.setPathParam("stream_id",u),A.setPathParam("sink_id",D),A.setBody(SR.SinkTransformInSerializer._toJsonObject(B)),A.send(this.requestCtx,tW.EmptyResponseSerializer._fromJsonObject)}}uX.StreamingSink=eW});var O8=v((AX)=>{Object.defineProperty(AX,"__esModule",{value:!0});AX.StreamOutSerializer=void 0;AX.StreamOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),id:u.id,metadata:u.metadata,name:u.name,uid:u.uid,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{createdAt:u.createdAt,id:u.id,metadata:u.metadata,name:u.name,uid:u.uid,updatedAt:u.updatedAt}}}});var vX=v((NX)=>{Object.defineProperty(NX,"__esModule",{value:!0});NX.ListResponseStreamOutSerializer=void 0;var FX=O8();NX.ListResponseStreamOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>FX.StreamOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>FX.StreamOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var ZX=v(($X)=>{Object.defineProperty($X,"__esModule",{value:!0});$X.StreamPatchSerializer=void 0;$X.StreamPatchSerializer={_fromJsonObject(u){return{description:u.description,metadata:u.metadata,uid:u.uid}},_toJsonObject(u){return{description:u.description,metadata:u.metadata,uid:u.uid}}}});var YX=v((WX)=>{Object.defineProperty(WX,"__esModule",{value:!0});WX.StreamingStream=void 0;var RR=vX(),JX=x8(),ND=O8(),HR=ZX(),O2=g();class QX{constructor(u){this.requestCtx=u}list(u){let D=new O2.SvixRequest(O2.HttpMethod.GET,"/api/v1/stream");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order}),D.send(this.requestCtx,RR.ListResponseStreamOutSerializer._fromJsonObject)}create(u,D){let B=new O2.SvixRequest(O2.HttpMethod.POST,"/api/v1/stream");return B.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),B.setBody(JX.StreamInSerializer._toJsonObject(u)),B.send(this.requestCtx,ND.StreamOutSerializer._fromJsonObject)}get(u){let D=new O2.SvixRequest(O2.HttpMethod.GET,"/api/v1/stream/{stream_id}");return D.setPathParam("stream_id",u),D.send(this.requestCtx,ND.StreamOutSerializer._fromJsonObject)}update(u,D){let B=new O2.SvixRequest(O2.HttpMethod.PUT,"/api/v1/stream/{stream_id}");return B.setPathParam("stream_id",u),B.setBody(JX.StreamInSerializer._toJsonObject(D)),B.send(this.requestCtx,ND.StreamOutSerializer._fromJsonObject)}delete(u){let D=new O2.SvixRequest(O2.HttpMethod.DELETE,"/api/v1/stream/{stream_id}");return D.setPathParam("stream_id",u),D.sendNoResponseBody(this.requestCtx)}patch(u,D){let B=new O2.SvixRequest(O2.HttpMethod.PATCH,"/api/v1/stream/{stream_id}");return B.setPathParam("stream_id",u),B.setBody(HR.StreamPatchSerializer._toJsonObject(D)),B.send(this.requestCtx,ND.StreamOutSerializer._fromJsonObject)}}WX.StreamingStream=QX});var RX=v((SX)=>{Object.defineProperty(SX,"__esModule",{value:!0});SX.Streaming=void 0;var hX=D8(),UR=nJ(),cR=sJ(),MR=QQ(),LR=mQ(),ER=BX(),OR=YX(),T0=g();class KX{constructor(u){this.requestCtx=u}get event_type(){return new MR.StreamingEventType(this.requestCtx)}get events(){return new LR.StreamingEvents(this.requestCtx)}get sink(){return new ER.StreamingSink(this.requestCtx)}get stream(){return new OR.StreamingStream(this.requestCtx)}sinkHeadersGet(u,D){let B=new T0.SvixRequest(T0.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink/{sink_id}/headers");return B.setPathParam("stream_id",u),B.setPathParam("sink_id",D),B.send(this.requestCtx,hX.EndpointHeadersOutSerializer._fromJsonObject)}sinkHeadersPatch(u,D,B){let A=new T0.SvixRequest(T0.HttpMethod.PATCH,"/api/v1/stream/{stream_id}/sink/{sink_id}/headers");return A.setPathParam("stream_id",u),A.setPathParam("sink_id",D),A.setBody(UR.HttpSinkHeadersPatchInSerializer._toJsonObject(B)),A.send(this.requestCtx,hX.EndpointHeadersOutSerializer._fromJsonObject)}sinkTransformationGet(u,D){let B=new T0.SvixRequest(T0.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink/{sink_id}/transformation");return B.setPathParam("stream_id",u),B.setPathParam("sink_id",D),B.send(this.requestCtx,cR.SinkTransformationOutSerializer._fromJsonObject)}}SX.Streaming=KX});var cX=v((HX)=>{Object.defineProperty(HX,"__esModule",{value:!0});HX.HTTPValidationError=HX.ValidationError=HX.HttpErrorOut=void 0;class I0{static getAttributeTypeMap(){return I0.attributeTypeMap}}HX.HttpErrorOut=I0;I0.discriminator=void 0;I0.mapping=void 0;I0.attributeTypeMap=[{name:"code",baseName:"code",type:"string",format:""},{name:"detail",baseName:"detail",type:"string",format:""}];class q0{static getAttributeTypeMap(){return q0.attributeTypeMap}}HX.ValidationError=q0;q0.discriminator=void 0;q0.mapping=void 0;q0.attributeTypeMap=[{name:"loc",baseName:"loc",type:"Array<string>",format:""},{name:"msg",baseName:"msg",type:"string",format:""},{name:"type",baseName:"type",type:"string",format:""}];class m0{static getAttributeTypeMap(){return m0.attributeTypeMap}}HX.HTTPValidationError=m0;m0.discriminator=void 0;m0.mapping=void 0;m0.attributeTypeMap=[{name:"detail",baseName:"detail",type:"Array<ValidationError>",format:""}]});var OX=v((LX)=>{Object.defineProperty(LX,"__esModule",{value:!0});LX.timingSafeEqual=void 0;function MX(u,D=""){if(!u)throw Error(D)}function kR(u,D){if(u.byteLength!==D.byteLength)return!1;if(!(u instanceof DataView))u=new DataView(ArrayBuffer.isView(u)?u.buffer:u);if(!(D instanceof DataView))D=new DataView(ArrayBuffer.isView(D)?D.buffer:D);MX(u instanceof DataView),MX(D instanceof DataView);let B=u.byteLength,A=0,w=-1;while(++w<B)A|=u.getUint8(w)^D.getUint8(w);return A===0}LX.timingSafeEqual=kR});var kX=v((h2)=>{var yR=h2&&h2.__extends||function(){var u=function(D,B){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,w){A.__proto__=w}||function(A,w){for(var F in w)if(w.hasOwnProperty(F))A[F]=w[F]},u(D,B)};return function(D,B){u(D,B);function A(){this.constructor=D}D.prototype=B===null?Object.create(B):(A.prototype=B.prototype,new A)}}();Object.defineProperty(h2,"__esModule",{value:!0});var i=256,C8=function(){function u(D){if(D===void 0)D="=";this._paddingCharacter=D}return u.prototype.encodedLength=function(D){if(!this._paddingCharacter)return(D*8+5)/6|0;return(D+2)/3*4|0},u.prototype.encode=function(D){var B="",A=0;for(;A<D.length-2;A+=3){var w=D[A]<<16|D[A+1]<<8|D[A+2];B+=this._encodeByte(w>>>18&63),B+=this._encodeByte(w>>>12&63),B+=this._encodeByte(w>>>6&63),B+=this._encodeByte(w>>>0&63)}var F=D.length-A;if(F>0){var w=D[A]<<16|(F===2?D[A+1]<<8:0);if(B+=this._encodeByte(w>>>18&63),B+=this._encodeByte(w>>>12&63),F===2)B+=this._encodeByte(w>>>6&63);else B+=this._paddingCharacter||"";B+=this._paddingCharacter||""}return B},u.prototype.maxDecodedLength=function(D){if(!this._paddingCharacter)return(D*6+7)/8|0;return D/4*3|0},u.prototype.decodedLength=function(D){return this.maxDecodedLength(D.length-this._getPaddingLength(D))},u.prototype.decode=function(D){if(D.length===0)return new Uint8Array(0);var B=this._getPaddingLength(D),A=D.length-B,w=new Uint8Array(this.maxDecodedLength(A)),F=0,N=0,G=0,$=0,z=0,Q=0,Z=0;for(;N<A-4;N+=4)$=this._decodeChar(D.charCodeAt(N+0)),z=this._decodeChar(D.charCodeAt(N+1)),Q=this._decodeChar(D.charCodeAt(N+2)),Z=this._decodeChar(D.charCodeAt(N+3)),w[F++]=$<<2|z>>>4,w[F++]=z<<4|Q>>>2,w[F++]=Q<<6|Z,G|=$&i,G|=z&i,G|=Q&i,G|=Z&i;if(N<A-1)$=this._decodeChar(D.charCodeAt(N)),z=this._decodeChar(D.charCodeAt(N+1)),w[F++]=$<<2|z>>>4,G|=$&i,G|=z&i;if(N<A-2)Q=this._decodeChar(D.charCodeAt(N+2)),w[F++]=z<<4|Q>>>2,G|=Q&i;if(N<A-3)Z=this._decodeChar(D.charCodeAt(N+3)),w[F++]=Q<<6|Z,G|=Z&i;if(G!==0)throw Error("Base64Coder: incorrect characters for decoding");return w},u.prototype._encodeByte=function(D){var B=D;return B+=65,B+=25-D>>>8&6,B+=51-D>>>8&-75,B+=61-D>>>8&-15,B+=62-D>>>8&3,String.fromCharCode(B)},u.prototype._decodeChar=function(D){var B=i;return B+=(42-D&D-44)>>>8&-i+D-43+62,B+=(46-D&D-48)>>>8&-i+D-47+63,B+=(47-D&D-58)>>>8&-i+D-48+52,B+=(64-D&D-91)>>>8&-i+D-65+0,B+=(96-D&D-123)>>>8&-i+D-97+26,B},u.prototype._getPaddingLength=function(D){var B=0;if(this._paddingCharacter){for(var A=D.length-1;A>=0;A--){if(D[A]!==this._paddingCharacter)break;B++}if(D.length<4||B>2)throw Error("Base64Coder: incorrect padding")}return B},u}();h2.Coder=C8;var cu=new C8;function VR(u){return cu.encode(u)}h2.encode=VR;function TR(u){return cu.decode(u)}h2.decode=TR;var CX=function(u){yR(D,u);function D(){return u!==null&&u.apply(this,arguments)||this}return D.prototype._encodeByte=function(B){var A=B;return A+=65,A+=25-B>>>8&6,A+=51-B>>>8&-75,A+=61-B>>>8&-13,A+=62-B>>>8&49,String.fromCharCode(A)},D.prototype._decodeChar=function(B){var A=i;return A+=(44-B&B-46)>>>8&-i+B-45+62,A+=(94-B&B-96)>>>8&-i+B-95+63,A+=(47-B&B-58)>>>8&-i+B-48+52,A+=(64-B&B-91)>>>8&-i+B-65+0,A+=(96-B&B-123)>>>8&-i+B-97+26,A},D}(C8);h2.URLSafeCoder=CX;var PX=new CX;function IR(u){return PX.encode(u)}h2.encodeURLSafe=IR;function qR(u){return PX.decode(u)}h2.decodeURLSafe=qR;h2.encodedLength=function(u){return cu.encodedLength(u)};h2.maxDecodedLength=function(u){return cu.maxDecodedLength(u)};h2.decodedLength=function(u){return cu.decodedLength(u)}});var VX=v((yX,GD)=>{(function(u,D){var B={};D(B);var A=B.default;for(var w in B)A[w]=B[w];if(typeof GD==="object"&&typeof GD.exports==="object")GD.exports=A;else if(typeof define==="function"&&define.amd)define(function(){return A});else u.sha256=A})(yX,function(u){u.__esModule=!0,u.digestLength=32,u.blockSize=64;var D=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]);function B(Z,J,W,Y,M){var S,L,x,y,_,V,S2,a,F2,s,o0,e0,qu;while(M>=64){S=J[0],L=J[1],x=J[2],y=J[3],_=J[4],V=J[5],S2=J[6],a=J[7];for(s=0;s<16;s++)o0=Y+s*4,Z[s]=(W[o0]&255)<<24|(W[o0+1]&255)<<16|(W[o0+2]&255)<<8|W[o0+3]&255;for(s=16;s<64;s++)F2=Z[s-2],e0=(F2>>>17|F2<<15)^(F2>>>19|F2<<13)^F2>>>10,F2=Z[s-15],qu=(F2>>>7|F2<<25)^(F2>>>18|F2<<14)^F2>>>3,Z[s]=(e0+Z[s-7]|0)+(qu+Z[s-16]|0);for(s=0;s<64;s++)e0=(((_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7))+(_&V^~_&S2)|0)+(a+(D[s]+Z[s]|0)|0)|0,qu=((S>>>2|S<<30)^(S>>>13|S<<19)^(S>>>22|S<<10))+(S&L^S&x^L&x)|0,a=S2,S2=V,V=_,_=y+e0|0,y=x,x=L,L=S,S=e0+qu|0;J[0]+=S,J[1]+=L,J[2]+=x,J[3]+=y,J[4]+=_,J[5]+=V,J[6]+=S2,J[7]+=a,Y+=64,M-=64}return Y}var A=function(){function Z(){this.digestLength=u.digestLength,this.blockSize=u.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return Z.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},Z.prototype.clean=function(){for(var J=0;J<this.buffer.length;J++)this.buffer[J]=0;for(var J=0;J<this.temp.length;J++)this.temp[J]=0;this.reset()},Z.prototype.update=function(J,W){if(W===void 0)W=J.length;if(this.finished)throw Error("SHA256: can't update because hash was finished.");var Y=0;if(this.bytesHashed+=W,this.bufferLength>0){while(this.bufferLength<64&&W>0)this.buffer[this.bufferLength++]=J[Y++],W--;if(this.bufferLength===64)B(this.temp,this.state,this.buffer,0,64),this.bufferLength=0}if(W>=64)Y=B(this.temp,this.state,J,Y,W),W%=64;while(W>0)this.buffer[this.bufferLength++]=J[Y++],W--;return this},Z.prototype.finish=function(J){if(!this.finished){var W=this.bytesHashed,Y=this.bufferLength,M=W/536870912|0,S=W<<3,L=W%64<56?64:128;this.buffer[Y]=128;for(var x=Y+1;x<L-8;x++)this.buffer[x]=0;this.buffer[L-8]=M>>>24&255,this.buffer[L-7]=M>>>16&255,this.buffer[L-6]=M>>>8&255,this.buffer[L-5]=M>>>0&255,this.buffer[L-4]=S>>>24&255,this.buffer[L-3]=S>>>16&255,this.buffer[L-2]=S>>>8&255,this.buffer[L-1]=S>>>0&255,B(this.temp,this.state,this.buffer,0,L),this.finished=!0}for(var x=0;x<8;x++)J[x*4+0]=this.state[x]>>>24&255,J[x*4+1]=this.state[x]>>>16&255,J[x*4+2]=this.state[x]>>>8&255,J[x*4+3]=this.state[x]>>>0&255;return this},Z.prototype.digest=function(){var J=new Uint8Array(this.digestLength);return this.finish(J),J},Z.prototype._saveState=function(J){for(var W=0;W<this.state.length;W++)J[W]=this.state[W]},Z.prototype._restoreState=function(J,W){for(var Y=0;Y<this.state.length;Y++)this.state[Y]=J[Y];this.bytesHashed=W,this.finished=!1,this.bufferLength=0},Z}();u.Hash=A;var w=function(){function Z(J){this.inner=new A,this.outer=new A,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var W=new Uint8Array(this.blockSize);if(J.length>this.blockSize)new A().update(J).finish(W).clean();else for(var Y=0;Y<J.length;Y++)W[Y]=J[Y];for(var Y=0;Y<W.length;Y++)W[Y]^=54;this.inner.update(W);for(var Y=0;Y<W.length;Y++)W[Y]^=106;this.outer.update(W),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var Y=0;Y<W.length;Y++)W[Y]=0}return Z.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},Z.prototype.clean=function(){for(var J=0;J<this.istate.length;J++)this.ostate[J]=this.istate[J]=0;this.inner.clean(),this.outer.clean()},Z.prototype.update=function(J){return this.inner.update(J),this},Z.prototype.finish=function(J){if(this.outer.finished)this.outer.finish(J);else this.inner.finish(J),this.outer.update(J,this.digestLength).finish(J);return this},Z.prototype.digest=function(){var J=new Uint8Array(this.digestLength);return this.finish(J),J},Z}();u.HMAC=w;function F(Z){var J=new A().update(Z),W=J.digest();return J.clean(),W}u.hash=F,u.default=F;function N(Z,J){var W=new w(Z).update(J),Y=W.digest();return W.clean(),Y}u.hmac=N;function G(Z,J,W,Y){var M=Y[0];if(M===0)throw Error("hkdf: cannot expand more");if(J.reset(),M>1)J.update(Z);if(W)J.update(W);J.update(Y),J.finish(Z),Y[0]++}var $=new Uint8Array(u.digestLength);function z(Z,J,W,Y){if(J===void 0)J=$;if(Y===void 0)Y=32;var M=new Uint8Array([1]),S=N(J,Z),L=new w(S),x=new Uint8Array(L.digestLength),y=x.length,_=new Uint8Array(Y);for(var V=0;V<Y;V++){if(y===x.length)G(x,L,W,M),y=0;_[V]=x[y++]}return L.clean(),x.fill(0),M.fill(0),_}u.hkdf=z;function Q(Z,J,W,Y){var M=new w(Z),S=M.digestLength,L=new Uint8Array(4),x=new Uint8Array(S),y=new Uint8Array(S),_=new Uint8Array(Y);for(var V=0;V*S<Y;V++){var S2=V+1;L[0]=S2>>>24&255,L[1]=S2>>>16&255,L[2]=S2>>>8&255,L[3]=S2>>>0&255,M.reset(),M.update(J),M.update(L),M.finish(y);for(var a=0;a<S;a++)x[a]=y[a];for(var a=2;a<=W;a++){M.reset(),M.update(y).finish(y);for(var F2=0;F2<S;F2++)x[F2]^=y[F2]}for(var a=0;a<S&&V*S+a<Y;a++)_[V*S+a]=x[a]}for(var V=0;V<S;V++)x[V]=y[V]=0;for(var V=0;V<4;V++)L[V]=0;return M.clean(),_}u.pbkdf2=Q})});var k8=v((qX)=>{Object.defineProperty(qX,"__esModule",{value:!0});qX.Webhook=qX.WebhookVerificationError=void 0;var mR=OX(),TX=kX(),gR=VX(),IX=300;class P8 extends Error{constructor(u){super(u);Object.setPrototypeOf(this,P8.prototype),this.name="ExtendableError",this.stack=Error(u).stack}}class t2 extends P8{constructor(u){super(u);Object.setPrototypeOf(this,t2.prototype),this.name="WebhookVerificationError"}}qX.WebhookVerificationError=t2;class Mu{constructor(u,D){if(!u)throw Error("Secret can't be empty.");if((D===null||D===void 0?void 0:D.format)==="raw")if(u instanceof Uint8Array)this.key=u;else this.key=Uint8Array.from(u,(B)=>B.charCodeAt(0));else{if(typeof u!=="string")throw Error("Expected secret to be of type string");if(u.startsWith(Mu.prefix))u=u.substring(Mu.prefix.length);this.key=TX.decode(u)}}verify(u,D){let B={};for(let Z of Object.keys(D))B[Z.toLowerCase()]=D[Z];let A=B["webhook-id"],w=B["webhook-signature"],F=B["webhook-timestamp"];if(!w||!A||!F)throw new t2("Missing required headers");let N=this.verifyTimestamp(F),$=this.sign(A,N,u).split(",")[1],z=w.split(" "),Q=new globalThis.TextEncoder;for(let Z of z){let[J,W]=Z.split(",");if(J!=="v1")continue;if((0,mR.timingSafeEqual)(Q.encode(W),Q.encode($)))return JSON.parse(u.toString())}throw new t2("No matching signature found")}sign(u,D,B){if(typeof B==="string");else if(B.constructor.name==="Buffer")B=B.toString();else throw Error("Expected payload to be of type string or Buffer.");let A=new TextEncoder,w=Math.floor(D.getTime()/1000),F=A.encode(`${u}.${w}.${B}`);return`v1,${TX.encode(gR.hmac(this.key,F))}`}verifyTimestamp(u){let D=Math.floor(Date.now()/1000),B=parseInt(u,10);if(isNaN(B))throw new t2("Invalid Signature Headers");if(D-B>IX)throw new t2("Message timestamp too old");if(B>D+IX)throw new t2("Message timestamp too new");return new Date(B*1000)}}qX.Webhook=Mu;Mu.prefix="whsec_"});var fX=v((y8)=>{Object.defineProperty(y8,"__esModule",{value:!0});y8.Webhook=y8.WebhookVerificationError=void 0;var fR=k8(),bR=k8();Object.defineProperty(y8,"WebhookVerificationError",{enumerable:!0,get:function(){return bR.WebhookVerificationError}});class gX{constructor(u,D){this.inner=new fR.Webhook(u,D)}verify(u,D){var B,A,w,F,N,G;let $={};for(let z of Object.keys(D))$[z.toLowerCase()]=D[z];return $["webhook-id"]=(A=(B=$["svix-id"])!==null&&B!==void 0?B:$["webhook-id"])!==null&&A!==void 0?A:"",$["webhook-signature"]=(F=(w=$["svix-signature"])!==null&&w!==void 0?w:$["webhook-signature"])!==null&&F!==void 0?F:"",$["webhook-timestamp"]=(G=(N=$["svix-timestamp"])!==null&&N!==void 0?N:$["webhook-timestamp"])!==null&&G!==void 0?G:"",this.inner.verify(u,$)}sign(u,D,B){return this.inner.sign(u,D,B)}}y8.Webhook=gX});var dX=v((jX)=>{Object.defineProperty(jX,"__esModule",{value:!0});jX.EndpointDisabledTriggerSerializer=jX.EndpointDisabledTrigger=void 0;var jR;(function(u){u.Manual="manual",u.Automatic="automatic"})(jR=jX.EndpointDisabledTrigger||(jX.EndpointDisabledTrigger={}));jX.EndpointDisabledTriggerSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var pX=v((iX)=>{Object.defineProperty(iX,"__esModule",{value:!0});iX.OrderingSerializer=iX.Ordering=void 0;var lR;(function(u){u.Ascending="ascending",u.Descending="descending"})(lR=iX.Ordering||(iX.Ordering={}));iX.OrderingSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var aX=v(($2)=>{Object.defineProperty($2,"__esModule",{value:!0});$2.StatusCodeClass=$2.SinkStatusIn=$2.SinkStatus=$2.Ordering=$2.MessageStatusText=$2.MessageStatus=$2.MessageAttemptTriggerType=$2.EndpointDisabledTrigger=$2.ConnectorProduct=$2.ConnectorKind=$2.BackgroundTaskType=$2.BackgroundTaskStatus=$2.AppPortalCapability=void 0;var dR=s3();Object.defineProperty($2,"AppPortalCapability",{enumerable:!0,get:function(){return dR.AppPortalCapability}});var rR=a2();Object.defineProperty($2,"BackgroundTaskStatus",{enumerable:!0,get:function(){return rR.BackgroundTaskStatus}});var iR=s2();Object.defineProperty($2,"BackgroundTaskType",{enumerable:!0,get:function(){return iR.BackgroundTaskType}});var nR=k0();Object.defineProperty($2,"ConnectorKind",{enumerable:!0,get:function(){return nR.ConnectorKind}});var pR=p1();Object.defineProperty($2,"ConnectorProduct",{enumerable:!0,get:function(){return pR.ConnectorProduct}});var aR=dX();Object.defineProperty($2,"EndpointDisabledTrigger",{enumerable:!0,get:function(){return aR.EndpointDisabledTrigger}});var sR=W8();Object.defineProperty($2,"MessageAttemptTriggerType",{enumerable:!0,get:function(){return sR.MessageAttemptTriggerType}});var tR=y0();Object.defineProperty($2,"MessageStatus",{enumerable:!0,get:function(){return tR.MessageStatus}});var oR=Uu();Object.defineProperty($2,"MessageStatusText",{enumerable:!0,get:function(){return oR.MessageStatusText}});var eR=pX();Object.defineProperty($2,"Ordering",{enumerable:!0,get:function(){return eR.Ordering}});var uH=L8();Object.defineProperty($2,"SinkStatus",{enumerable:!0,get:function(){return uH.SinkStatus}});var DH=wD();Object.defineProperty($2,"SinkStatusIn",{enumerable:!0,get:function(){return DH.SinkStatusIn}});var BH=u8();Object.defineProperty($2,"StatusCodeClass",{enumerable:!0,get:function(){return BH.StatusCodeClass}})});var oX=v((n)=>{var wH=n&&n.__createBinding||(Object.create?function(u,D,B,A){if(A===void 0)A=B;var w=Object.getOwnPropertyDescriptor(D,B);if(!w||("get"in w?!D.__esModule:w.writable||w.configurable))w={enumerable:!0,get:function(){return D[B]}};Object.defineProperty(u,A,w)}:function(u,D,B,A){if(A===void 0)A=B;u[A]=D[B]}),sX=n&&n.__exportStar||function(u,D){for(var B in u)if(B!=="default"&&!Object.prototype.hasOwnProperty.call(D,B))wH(D,u,B)};Object.defineProperty(n,"__esModule",{value:!0});n.Svix=n.messageInRaw=n.ValidationError=n.HttpErrorOut=n.HTTPValidationError=n.ApiException=void 0;var FH=a6(),NH=CA(),GH=nA(),vH=Uw(),$H=iF(),zH=z7(),ZH=g7(),JH=l7(),QH=Bz(),WH=Hz(),XH=J8(),YH=sZ(),hH=EJ(),KH=dJ(),SH=RX(),xH=K8(),RH=n3();Object.defineProperty(n,"ApiException",{enumerable:!0,get:function(){return RH.ApiException}});var V8=cX();Object.defineProperty(n,"HTTPValidationError",{enumerable:!0,get:function(){return V8.HTTPValidationError}});Object.defineProperty(n,"HttpErrorOut",{enumerable:!0,get:function(){return V8.HttpErrorOut}});Object.defineProperty(n,"ValidationError",{enumerable:!0,get:function(){return V8.ValidationError}});sX(fX(),n);sX(aX(),n);var HH=J8();Object.defineProperty(n,"messageInRaw",{enumerable:!0,get:function(){return HH.messageInRaw}});var UH=[{region:"us",url:"https://api.us.svix.com"},{region:"eu",url:"https://api.eu.svix.com"},{region:"in",url:"https://api.in.svix.com"},{region:"ca",url:"https://api.ca.svix.com"},{region:"au",url:"https://api.au.svix.com"}];class tX{constructor(u,D={}){var B,A,w;let F=(B=UH.find((G)=>G.region===u.split(".")[1]))===null||B===void 0?void 0:B.url,N=(w=(A=D.serverUrl)!==null&&A!==void 0?A:F)!==null&&w!==void 0?w:"https://api.svix.com";if(D.retryScheduleInMs){this.requestCtx={baseUrl:N,token:u,timeout:D.requestTimeout,retryScheduleInMs:D.retryScheduleInMs,fetch:D.fetch};return}if(D.numRetries){this.requestCtx={baseUrl:N,token:u,timeout:D.requestTimeout,numRetries:D.numRetries,fetch:D.fetch};return}this.requestCtx={baseUrl:N,token:u,timeout:D.requestTimeout,fetch:D.fetch}}get application(){return new FH.Application(this.requestCtx)}get authentication(){return new NH.Authentication(this.requestCtx)}get backgroundTask(){return new GH.BackgroundTask(this.requestCtx)}get connector(){return new vH.Connector(this.requestCtx)}get endpoint(){return new $H.Endpoint(this.requestCtx)}get environment(){return new zH.Environment(this.requestCtx)}get eventType(){return new ZH.EventType(this.requestCtx)}get health(){return new JH.Health(this.requestCtx)}get ingest(){return new QH.Ingest(this.requestCtx)}get integration(){return new WH.Integration(this.requestCtx)}get message(){return new XH.Message(this.requestCtx)}get messageAttempt(){return new YH.MessageAttempt(this.requestCtx)}get operationalWebhook(){return new hH.OperationalWebhook(this.requestCtx)}get statistics(){return new KH.Statistics(this.requestCtx)}get streaming(){return new SH.Streaming(this.requestCtx)}get operationalWebhookEndpoint(){return new xH.OperationalWebhookEndpoint(this.requestCtx)}}n.Svix=tX});class Q0{}import{readdir as tY}from"fs/promises";class mu extends Q0{folderPath;constructor(u=`${process.env.ROOT_DIR}/storage`){super();this.folderPath=u}async put(u){let D,B;if(u instanceof Blob)D=u,B=`${Bun.randomUUIDv7()}.${u.type.split("/")[1].split(";")[0]}`;else D=u.body,B=u.name;let A=D instanceof Buffer?D:D instanceof Blob||D instanceof File?Buffer.from(await D.arrayBuffer()):"",w=`${this.folderPath}/${B}`;return await Bun.write(w,A),B}async fetch(u){let D=process.env.BUCKET_NAME,B;if(typeof u==="string")B=u;else D=u.bucket??D,B=u.name;if(!B)throw Error("Object name has to be specified");let A=`${this.folderPath}/${B}`,w=Bun.file(A),F=Bun.file(A).stream(),N=new Date(w.lastModified).toUTCString();return new Response(F,{headers:{"Content-Type":w.type,"Content-Length":String(w.size),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":N}})}async list(){return await tY(this.folderPath)}}class q4 extends j{driver=new mu;boot(){}}var m4=X(m2(),1);function oY(u){return(D)=>async(B)=>{let{request:A}=B;if(u.expectContinueHeader!==!1&&m4.HttpRequest.isInstance(A)&&A.body&&u.runtime==="node"&&u.requestHandler?.constructor?.name!=="FetchHttpHandler"){let w=!0;if(typeof u.expectContinueHeader==="number")try{w=(Number(A.headers?.["content-length"])??u.bodyLengthChecker?.(A.body)??1/0)>=u.expectContinueHeader}catch(F){}else w=!!u.expectContinueHeader;if(w)A.headers.Expect="100-continue"}return D({...B,request:A})}}var eY={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},g4=(u)=>({applyToStack:(D)=>{D.add(oY(u),eY)}});var x2={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},gu=x2.WHEN_SUPPORTED,A0={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},_u=x2.WHEN_SUPPORTED,k;(function(u){u.MD5="MD5",u.CRC32="CRC32",u.CRC32C="CRC32C",u.CRC64NVME="CRC64NVME",u.SHA1="SHA1",u.SHA256="SHA256"})(k||(k={}));var _4;(function(u){u.HEADER="header",u.TRAILER="trailer"})(_4||(_4={}));var uu=k.CRC32;var f2;(function(u){u.ENV="env",u.CONFIG="shared config entry"})(f2||(f2={}));var W0=(u,D,B,A)=>{if(!(D in u))return;let w=u[D].toUpperCase();if(!Object.values(B).includes(w))throw TypeError(`Cannot load ${A} '${D}'. Expected one of ${Object.values(B)}, got '${u[D]}'.`);return w};var uh="AWS_REQUEST_CHECKSUM_CALCULATION",Dh="request_checksum_calculation",f4={environmentVariableSelector:(u)=>W0(u,uh,x2,f2.ENV),configFileSelector:(u)=>W0(u,Dh,x2,f2.CONFIG),default:gu};var Bh="AWS_RESPONSE_CHECKSUM_VALIDATION",Ah="response_checksum_validation",b4={environmentVariableSelector:(u)=>W0(u,Bh,A0,f2.ENV),configFileSelector:(u)=>W0(u,Ah,A0,f2.CONFIG),default:_u};var X0=X(Y0(),1),e4=X(m2(),1),u5=X(iu(),1);var j4=(u,{requestChecksumRequired:D,requestAlgorithmMember:B,requestChecksumCalculation:A})=>{if(!B)return A===x2.WHEN_SUPPORTED||D?uu:void 0;if(!u[B])return;return u[B]};var w0=(u)=>u===k.MD5?"content-md5":`x-amz-checksum-${u.toLowerCase()}`;var l4=(u,D)=>{let B=u.toLowerCase();for(let A of Object.keys(D))if(B===A.toLowerCase())return!0;return!1};var d4=(u,D)=>{let B=u.toLowerCase();for(let A of Object.keys(D))if(A.toLowerCase().startsWith(B))return!0;return!1};var r4=X(wh(),1),fu=(u)=>u!==void 0&&typeof u!=="string"&&!ArrayBuffer.isView(u)&&!r4.isArrayBuffer(u);var i4=X(Fh(),1),{__extends:qU,__assign:mU,__rest:gU,__decorate:_U,__param:fU,__esDecorate:bU,__runInitializers:jU,__propKey:lU,__setFunctionName:dU,__metadata:rU,__awaiter:bu,__generator:ju,__exportStar:iU,__createBinding:nU,__values:lu,__read:pU,__spread:aU,__spreadArrays:sU,__spreadArray:tU,__await:oU,__asyncGenerator:eU,__asyncDelegator:uc,__asyncValues:Dc,__makeTemplateObject:Bc,__importStar:Ac,__importDefault:wc,__classPrivateFieldGet:Fc,__classPrivateFieldSet:Nc,__classPrivateFieldIn:Gc,__addDisposableResource:vc,__disposeResources:$c,__rewriteRelativeImportExtension:zc}=i4.default;import{Buffer as n4}from"buffer";var p4=(u,D)=>{if(typeof u!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof u} (${u})`);return D?n4.from(u,D):n4.from(u)};var PD=(u)=>{let D=p4(u,"utf8");return new Uint8Array(D.buffer,D.byteOffset,D.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var Nh=typeof Buffer<"u"&&Buffer.from?function(u){return Buffer.from(u,"utf8")}:PD;function Du(u){if(u instanceof Uint8Array)return u;if(typeof u==="string")return Nh(u);if(ArrayBuffer.isView(u))return new Uint8Array(u.buffer,u.byteOffset,u.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(u)}function Bu(u){if(typeof u==="string")return u.length===0;return u.byteLength===0}function F0(u){return new Uint8Array([(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255])}function Au(u){if(!Uint32Array.from){var D=new Uint32Array(u.length),B=0;while(B<u.length)D[B]=u[B],B+=1;return D}return Uint32Array.from(u)}var yD=function(){function u(){this.crc32c=new kD}return u.prototype.update=function(D){if(Bu(D))return;this.crc32c.update(Du(D))},u.prototype.digest=function(){return bu(this,void 0,void 0,function(){return ju(this,function(D){return[2,F0(this.crc32c.digest())]})})},u.prototype.reset=function(){this.crc32c=new kD},u}();var kD=function(){function u(){this.checksum=4294967295}return u.prototype.update=function(D){var B,A;try{for(var w=lu(D),F=w.next();!F.done;F=w.next()){var N=F.value;this.checksum=this.checksum>>>8^vh[(this.checksum^N)&255]}}catch(G){B={error:G}}finally{try{if(F&&!F.done&&(A=w.return))A.call(w)}finally{if(B)throw B.error}}return this},u.prototype.digest=function(){return(this.checksum^4294967295)>>>0},u}();var Gh=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],vh=Au(Gh);var $h=()=>{let D=[,,,,,,,,];for(let B=0;B<8;B++){let A=Array(512);for(let w=0;w<256;w++){let F=BigInt(w);for(let N=0;N<8*(B+1);N++)if(F&1n)F=F>>1n^0x9a6c9329ac4bc9b5n;else F=F>>1n;A[w*2]=Number(F>>32n&0xffffffffn),A[w*2+1]=Number(F&0xffffffffn)}D[B]=new Uint32Array(A)}return D},VD,wu,TD,ID,qD,mD,gD,_D,fD,zh=()=>{if(!VD)VD=$h(),[wu,TD,ID,qD,mD,gD,_D,fD]=VD};class bD{c1=0;c2=0;constructor(){zh(),this.reset()}update(u){let D=u.length,B=0,A=this.c1,w=this.c2;while(B+8<=D){let F=((w^u[B++])&255)<<1,N=((w>>>8^u[B++])&255)<<1,G=((w>>>16^u[B++])&255)<<1,$=((w>>>24^u[B++])&255)<<1,z=((A^u[B++])&255)<<1,Q=((A>>>8^u[B++])&255)<<1,Z=((A>>>16^u[B++])&255)<<1,J=((A>>>24^u[B++])&255)<<1;A=fD[F]^_D[N]^gD[G]^mD[$]^qD[z]^ID[Q]^TD[Z]^wu[J],w=fD[F+1]^_D[N+1]^gD[G+1]^mD[$+1]^qD[z+1]^ID[Q+1]^TD[Z+1]^wu[J+1]}while(B<D){let F=((w^u[B])&255)<<1;w=(w>>>8|(A&255)<<24)>>>0,A=A>>>8^wu[F],w^=wu[F+1],B++}this.c1=A,this.c2=w}async digest(){let u=this.c1^4294967295,D=this.c2^4294967295;return new Uint8Array([u>>>24,u>>>16&255,u>>>8&255,u&255,D>>>24,D>>>16&255,D>>>8&255,D&255])}reset(){this.c1=4294967295,this.c2=4294967295}}var jD={CrtCrc64Nvme:null};var lD=function(){function u(){this.crc32=new N0}return u.prototype.update=function(D){if(Bu(D))return;this.crc32.update(Du(D))},u.prototype.digest=function(){return bu(this,void 0,void 0,function(){return ju(this,function(D){return[2,F0(this.crc32.digest())]})})},u.prototype.reset=function(){this.crc32=new N0},u}();var N0=function(){function u(){this.checksum=4294967295}return u.prototype.update=function(D){var B,A;try{for(var w=lu(D),F=w.next();!F.done;F=w.next()){var N=F.value;this.checksum=this.checksum>>>8^Jh[(this.checksum^N)&255]}}catch(G){B={error:G}}finally{try{if(F&&!F.done&&(A=w.return))A.call(w)}finally{if(B)throw B.error}}return this},u.prototype.digest=function(){return(this.checksum^4294967295)>>>0},u}();var Zh=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],Jh=Au(Zh);import*as dD from"zlib";class a4{checksum=0;update(u){this.checksum=dD.crc32(u,this.checksum)}async digest(){return F0(this.checksum)}reset(){this.checksum=0}}var s4=()=>{if(typeof dD.crc32>"u")return lD;return a4};var t4=[k.CRC32,k.CRC32C,k.CRC64NVME,k.SHA1,k.SHA256],rD=[k.SHA256,k.SHA1,k.CRC32,k.CRC32C,k.CRC64NVME];var du=(u,D)=>{let{checksumAlgorithms:B={}}=D;switch(u){case k.MD5:return B?.MD5??D.md5;case k.CRC32:return B?.CRC32??s4();case k.CRC32C:return B?.CRC32C??yD;case k.CRC64NVME:if(typeof jD.CrtCrc64Nvme!=="function")return B?.CRC64NVME??bD;return B?.CRC64NVME??jD.CrtCrc64Nvme;case k.SHA1:return B?.SHA1??D.sha1;case k.SHA256:return B?.SHA256??D.sha256;default:if(B?.[u])return B[u];throw Error(`The checksum algorithm "${u}" is not supported by the client. Select one of ${t4}, or provide an implementation to the client constructor checksums field.`)}};var o4=X(iD(),1),ru=(u,D)=>{let B=new u;return B.update(o4.toUint8Array(D||"")),B.digest()};var D5={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},B5=(u,D)=>(B,A)=>async(w)=>{if(!e4.HttpRequest.isInstance(w.request))return B(w);if(d4("x-amz-checksum-",w.request.headers))return B(w);let{request:F,input:N}=w,{body:G,headers:$}=F,{base64Encoder:z,streamHasher:Q}=u,{requestChecksumRequired:Z,requestAlgorithmMember:J}=D,W=await u.requestChecksumCalculation(),Y=J?.name,M=J?.httpHeader;if(Y&&!N[Y]){if(W===x2.WHEN_SUPPORTED||Z){if(N[Y]=uu,M)$[M]=uu}}let S=j4(N,{requestChecksumRequired:Z,requestAlgorithmMember:J?.name,requestChecksumCalculation:W}),L=G,x=$;if(S){switch(S){case k.CRC32:X0.setFeature(A,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case k.CRC32C:X0.setFeature(A,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case k.CRC64NVME:X0.setFeature(A,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case k.SHA1:X0.setFeature(A,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case k.SHA256:X0.setFeature(A,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}let y=w0(S),_=du(S,u);if(fu(G)){let{getAwsChunkedEncodingStream:V,bodyLengthChecker:S2}=u;L=V(typeof u.requestStreamBufferSize==="number"&&u.requestStreamBufferSize>=8192?u5.createBufferedReadable(G,u.requestStreamBufferSize,A.logger):G,{base64Encoder:z,bodyLengthChecker:S2,checksumLocationName:y,checksumAlgorithmFn:_,streamHasher:Q}),x={...$,"content-encoding":$["content-encoding"]?`${$["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":$["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":y},delete x["content-length"]}else if(!l4(y,$)){let V=await ru(_,G);x={...$,[y]:z(V)}}}try{return await B({...w,request:{...F,headers:x,body:L}})}catch(y){if(y instanceof Error&&y.name==="InvalidChunkSizeError")try{if(!y.message.endsWith("."))y.message+=".";y.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch(_){}throw y}};var Fu=X(Y0(),1);var A5={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},w5=(u,D)=>(B,A)=>async(w)=>{let F=w.input,{requestValidationModeMember:N}=D,G=await u.requestChecksumCalculation(),$=await u.responseChecksumValidation();switch(G){case x2.WHEN_REQUIRED:Fu.setFeature(A,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case x2.WHEN_SUPPORTED:Fu.setFeature(A,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch($){case A0.WHEN_REQUIRED:Fu.setFeature(A,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case A0.WHEN_SUPPORTED:Fu.setFeature(A,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}if(N&&!F[N]){if($===A0.WHEN_SUPPORTED)F[N]="ENABLED"}return B(w)};var $5=X(m2(),1);var nu=(u=[])=>{let D=[],B=rD.length;for(let A of u){let w=rD.indexOf(A);if(w!==-1)D[w]=A;else D[B++]=A}return D.filter(Boolean)};var F5=(u)=>{let D=u.lastIndexOf("-");if(D!==-1){let B=u.slice(D+1);if(!B.startsWith("0")){let A=parseInt(B,10);if(!isNaN(A)&&A>=1&&A<=1e4)return!0}}return!1};var G5=X(iu(),1);var N5=async(u,{checksumAlgorithmFn:D,base64Encoder:B})=>B(await ru(D,u));var v5=async(u,{config:D,responseAlgorithms:B,logger:A})=>{let w=nu(B),{body:F,headers:N}=u;for(let G of w){let $=w0(G),z=N[$];if(z){let Q;try{Q=du(G,D)}catch(W){if(G===k.CRC64NVME){A?.warn(`Skipping ${k.CRC64NVME} checksum validation: ${W.message}`);continue}throw W}let{base64Encoder:Z}=D;if(fu(F)){u.body=G5.createChecksumStream({expectedChecksum:z,checksumSourceLocation:$,checksum:new Q,source:F,base64Encoder:Z});return}let J=await N5(F,{checksumAlgorithmFn:Q,base64Encoder:Z});if(J===z)break;throw Error(`Checksum mismatch: expected "${J}" but received "${z}" in response header "${$}".`)}}};var z5={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},Z5=(u,D)=>(B,A)=>async(w)=>{if(!$5.HttpRequest.isInstance(w.request))return B(w);let F=w.input,N=await B(w),G=N.response,{requestValidationModeMember:$,responseAlgorithms:z}=D;if($&&F[$]==="ENABLED"){let{clientName:Q,commandName:Z}=A,J=Object.keys(u.checksumAlgorithms??{}).filter((M)=>{let S=w0(M);return G.headers[S]!==void 0}),W=nu([...z??[],...J]);if(Q==="S3Client"&&Z==="GetObjectCommand"&&W.every((M)=>{let S=w0(M),L=G.headers[S];return!L||F5(L)}))return N;await v5(G,{config:u,responseAlgorithms:W,logger:A.logger})}return N};var pu=(u,D)=>({applyToStack:(B)=>{B.add(B5(u,D),D5),B.addRelativeTo(w5(u,D),A5),B.addRelativeTo(Z5(u,D),z5)}});var nD=X(pD(),1);var J5=(u)=>{let{requestChecksumCalculation:D,responseChecksumValidation:B,requestStreamBufferSize:A}=u;return Object.assign(u,{requestChecksumCalculation:nD.normalizeProvider(D??gu),responseChecksumValidation:nD.normalizeProvider(B??_u),requestStreamBufferSize:Number(A??0),checksumAlgorithms:u.checksumAlgorithms??{}})};var I1=X(uS(),1),F6=X(DS(),1),N6=X(BS(),1);var Q5=X(m2(),1),W5=X(k2(),1),Qh="content-length",Wh="x-amz-decoded-content-length";function Xh(){return(u,D)=>async(B)=>{let{request:A}=B;if(Q5.HttpRequest.isInstance(A)){if(!(Qh in A.headers)&&!(Wh in A.headers))if(typeof D?.logger?.warn==="function"&&!(D.logger instanceof W5.NoOpLogger))D.logger.warn("Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.");else console.warn("Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.")}return u({...B})}}var Yh={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},X5=(u)=>({applyToStack:(D)=>{D.add(Xh(),Yh)}});var Y5=(u)=>{return(D,B)=>async(A)=>{let w=await u.region(),F=u.region,N=()=>{};if(B.__s3RegionRedirect)Object.defineProperty(u,"region",{writable:!1,value:async()=>{return B.__s3RegionRedirect}}),N=()=>Object.defineProperty(u,"region",{writable:!0,value:F});try{let G=await D(A);if(B.__s3RegionRedirect){N();let $=await u.region();if(w!==$)throw Error("Region was not restored following S3 region redirect.")}return G}catch(G){throw N(),G}}},h5={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function hh(u){return(D,B)=>async(A)=>{try{return await D(A)}catch(w){if(u.followRegionRedirects){let F=w?.$metadata?.httpStatusCode,N=B.commandName==="HeadBucketCommand",G=w?.$response?.headers?.["x-amz-bucket-region"];if(G){if(F===301||F===400&&(w?.name==="IllegalLocationConstraintException"||N)){try{let $=G;B.logger?.debug(`Redirecting from ${await u.region()} to ${$}`),B.__s3RegionRedirect=$}catch($){throw Error("Region redirect failed: "+$)}return D(A)}}}throw w}}}var Kh={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},K5=(u)=>({applyToStack:(D)=>{D.add(hh(u),Kh),D.addRelativeTo(Y5(u),h5)}});var S5=X(m2(),1),x5=X(k2(),1),Sh=(u)=>{return(D,B)=>async(A)=>{let w=await D(A),{response:F}=w;if(S5.HttpResponse.isInstance(F)){if(F.headers.expires){F.headers.expiresstring=F.headers.expires;try{x5.parseRfc7231DateTime(F.headers.expires)}catch(N){B.logger?.warn(`AWS SDK Warning for ${B.clientName}::${B.commandName} response parsing (${F.headers.expires}): ${N}`),delete F.headers.expires}}}return w}},xh={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},R5=(u)=>({applyToStack:(D)=>{D.addRelativeTo(Sh(u),xh)}});class au{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=30000;constructor(u={}){this.data=u}get(u){let D=this.data[u];if(!D)return;return D}set(u,D){return this.data[u]=D,D}delete(u){delete this.data[u]}async purgeExpired(){let u=Date.now();if(this.lastPurgeTime+au.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>u)return;for(let D in this.data){let B=this.data[D];if(!B.isRefreshing){let A=await B.identity;if(A.expiration){if(A.expiration.getTime()<u)delete this.data[D]}}}}}class Nu{_identity;isRefreshing;accessed;constructor(u,D=!1,B=Date.now()){this._identity=u,this.isRefreshing=D,this.accessed=B}get identity(){return this.accessed=Date.now(),this._identity}}class Gu{createSessionFn;cache;static REFRESH_WINDOW_MS=60000;constructor(u,D=new au){this.createSessionFn=u,this.cache=D}async getS3ExpressIdentity(u,D){let B=D.Bucket,{cache:A}=this,w=A.get(B);if(w)return w.identity.then((F)=>{if((F.expiration?.getTime()??0)<Date.now())return A.set(B,new Nu(this.getIdentity(B))).identity;if((F.expiration?.getTime()??0)<Date.now()+Gu.REFRESH_WINDOW_MS&&!w.isRefreshing)w.isRefreshing=!0,this.getIdentity(B).then(($)=>{A.set(B,new Nu(Promise.resolve($)))});return F});return A.set(B,new Nu(this.getIdentity(B))).identity}async getIdentity(u){await this.cache.purgeExpired().catch((A)=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache:
4
+ `+A)});let D=await this.createSessionFn(u);if(!D.Credentials?.AccessKeyId||!D.Credentials?.SecretAccessKey)throw Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:D.Credentials.AccessKeyId,secretAccessKey:D.Credentials.SecretAccessKey,sessionToken:D.Credentials.SessionToken,expiration:D.Credentials.Expiration?new Date(D.Credentials.Expiration):void 0}}}var C5=X(O5(),1);var h0=X(H5(),1),U5="Directory",c5="S3Express",M5="sigv4-s3express",su="X-Amz-S3session-Token",vu=su.toLowerCase(),Rh="AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",Hh="s3_disable_express_session_auth",aD={environmentVariableSelector:(u)=>h0.booleanSelector(u,Rh,h0.SelectorType.ENV),configFileSelector:(u)=>h0.booleanSelector(u,Hh,h0.SelectorType.CONFIG),default:!1};class tu extends C5.SignatureV4{async signWithCredentials(u,D,B){let A=L5(D);u.headers[vu]=D.sessionToken;let w=this;return E5(w,A),w.signRequest(u,B??{})}async presignWithCredentials(u,D,B){let A=L5(D);return delete u.headers[vu],u.headers[su]=D.sessionToken,u.query=u.query??{},u.query[su]=D.sessionToken,E5(this,A),this.presign(u,B)}}function L5(u){return{accessKeyId:u.accessKeyId,secretAccessKey:u.secretAccessKey,expiration:u.expiration}}function E5(u,D){let B=setTimeout(()=>{throw Error("SignatureV4S3Express credential override was created but not called.")},10),A=u.credentialProvider,w=()=>{return clearTimeout(B),u.credentialProvider=A,Promise.resolve(D)};u.credentialProvider=w}var P5=X(Y0(),1),k5=X(m2(),1);var y5=(u)=>{return(D,B)=>async(A)=>{if(B.endpointV2){let w=B.endpointV2,F=w.properties?.authSchemes?.[0]?.name===M5;if(w.properties?.backend===c5||w.properties?.bucketType===U5)P5.setFeature(B,"S3_EXPRESS_BUCKET","J"),B.isS3ExpressBucket=!0;if(F){let G=A.input.Bucket;if(G){let $=await u.s3ExpressIdentityProvider.getS3ExpressIdentity(await u.credentials(),{Bucket:G});if(B.s3ExpressIdentity=$,k5.HttpRequest.isInstance(A.request)&&$.sessionToken)A.request.headers[vu]=$.sessionToken}}}return D(A)}},V5={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},sD=(u)=>({applyToStack:(D)=>{D.add(y5(u),V5)}});var q5=X(I5(),1),m5=X(m2(),1),g5=X(pD(),1);var T5=async(u,D,B,A)=>{let w=await A.signWithCredentials(B,u,{});if(w.headers["X-Amz-Security-Token"]||w.headers["x-amz-security-token"])throw Error("X-Amz-Security-Token must not be set for s3-express requests.");return w};var Uh=(u)=>(D)=>{throw D},ch=(u,D)=>{};var _5=(u)=>(D,B)=>async(A)=>{if(!m5.HttpRequest.isInstance(A.request))return D(A);let F=g5.getSmithyContext(B).selectedHttpAuthScheme;if(!F)throw Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:N={}},identity:G,signer:$}=F,z;if(B.s3ExpressIdentity)z=await T5(B.s3ExpressIdentity,N,A.request,await u.signer());else z=await $.sign(A.request,G,N);let Q=await D({...A,request:z}).catch(($.errorHandler||Uh)(N));return($.successHandler||ch)(Q.response,N),Q},tD=(u)=>({applyToStack:(D)=>{D.addRelativeTo(_5(u),q5.httpSigningMiddlewareOptions)}});var f5=(u,{session:D})=>{let[B,A]=D,{forcePathStyle:w,useAccelerateEndpoint:F,disableMultiregionAccessPoints:N,followRegionRedirects:G,s3ExpressIdentityProvider:$,bucketEndpoint:z,expectContinueHeader:Q}=u;return Object.assign(u,{forcePathStyle:w??!1,useAccelerateEndpoint:F??!1,disableMultiregionAccessPoints:N??!1,followRegionRedirects:G??!1,s3ExpressIdentityProvider:$??new Gu(async(Z)=>B().send(new A({Bucket:Z}))),bucketEndpoint:z??!1,expectContinueHeader:Q??2097152})};var b5=X(m2(),1),ou=X(iu(),1),Mh={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Lh=3000,Eh=(u)=>(D,B)=>async(A)=>{let w=await D(A),{response:F}=w;if(!b5.HttpResponse.isInstance(F))return w;let{statusCode:N,body:G}=F;if(N<200||N>=300)return w;if(!(typeof G?.stream==="function"||typeof G?.pipe==="function"||typeof G?.tee==="function"))return w;let z=G,Q=G;if(G&&typeof G==="object"&&!(G instanceof Uint8Array))[z,Q]=await ou.splitStream(G);F.body=Q;let Z=await Oh(z,{streamCollector:async(W)=>{return ou.headStream(W,Lh)}});if(typeof z?.destroy==="function")z.destroy();let J=u.utf8Encoder(Z.subarray(Z.length-16));if(Z.length===0&&Mh[B.commandName]){let W=Error("S3 aborted request");throw W.name="InternalError",W}if(J&&J.endsWith("</Error>"))F.statusCode=400;return w},Oh=(u=new Uint8Array,D)=>{if(u instanceof Uint8Array)return Promise.resolve(u);return D.streamCollector(u)||Promise.resolve(new Uint8Array)},Ch={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},K0=(u)=>({applyToStack:(D)=>{D.addRelativeTo(Eh(u),Ch)}});var j5=(u)=>typeof u==="string"&&u.indexOf("arn:")===0&&u.split(":").length>=6;function l5(u){return(D,B)=>async(A)=>{if(u.bucketEndpoint){let w=B.endpointV2;if(w){let F=A.input.Bucket;if(typeof F==="string")try{let N=new URL(F);B.endpointV2={...w,url:N}}catch(N){let G=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${F} could not be parsed as URL.`;if(B.logger?.constructor?.name==="NoOpLogger")console.warn(G);else B.logger?.warn?.(G);throw N}}}return D(A)}}var d5={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function Ph({bucketEndpoint:u}){return(D)=>async(B)=>{let{input:{Bucket:A}}=B;if(!u&&typeof A==="string"&&!j5(A)&&A.indexOf("/")>=0){let w=Error(`Bucket name shouldn't contain '/', received '${A}'`);throw w.name="InvalidBucketName",w}return D({...B})}}var kh={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},r5=(u)=>({applyToStack:(D)=>{D.add(Ph(u),kh),D.addRelativeTo(l5(u),d5)}});var q1=X(AS(),1),G6=X(sB(),1),O0=X(I5(),1),v6=X(zB(),1);var i5=(u)=>Object.assign(u,{eventStreamMarshaller:u.eventStreamSerdeProvider(u)});var $6=X(wS(),1),z6=X(U0(),1),m1=X(tB(),1),Z6=X(k2(),1);var w1=X(Y0(),1);var oD=X(O5(),1);var $u={CrtSignerV4:null};class zu{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){if(typeof $u.CrtSignerV4==="function")return"crt";else if(typeof oD.signatureV4aContainer.SignatureV4a==="function")return"js";return"none"}constructor(u){this.sigv4Signer=new tu(u),this.signerOptions=u}async sign(u,D={}){if(D.signingRegion==="*")return this.getSigv4aSigner().sign(u,D);return this.sigv4Signer.sign(u,D)}async signWithCredentials(u,D,B={}){if(B.signingRegion==="*"){let A=this.getSigv4aSigner(),w=$u.CrtSignerV4;if(w&&A instanceof w)return A.signWithCredentials(u,D,B);else throw Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.signWithCredentials(u,D,B)}async presign(u,D={}){if(D.signingRegion==="*"){let B=this.getSigv4aSigner(),A=$u.CrtSignerV4;if(A&&B instanceof A)return B.presign(u,D);else throw Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.presign(u,D)}async presignWithCredentials(u,D,B={}){if(B.signingRegion==="*")throw Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(u,D,B)}getSigv4aSigner(){if(!this.sigv4aSigner){let u=$u.CrtSignerV4,D=oD.signatureV4aContainer.SignatureV4a;if(this.signerOptions.runtime==="node"){if(!u&&!D)throw Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt");if(u&&typeof u==="function")this.sigv4aSigner=new u({...this.signerOptions,signingAlgorithm:1});else if(D&&typeof D==="function")this.sigv4aSigner=new D({...this.signerOptions});else throw Error("Available SigV4a implementation is not a valid constructor. Please ensure you've properly imported @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a.For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt")}else{if(!D||typeof D!=="function")throw Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");this.sigv4aSigner=new D({...this.signerOptions})}}return this.sigv4aSigner}}var DB=X(U0(),1),c0=X(pD(),1);var uB=X(jh(),1),H0=X(bh(),1);var S0={["required"]:!1,["type"]:"string"},x0={["required"]:!0,default:!1,["type"]:"boolean"},Zu={["required"]:!1,["type"]:"boolean"},H2={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!0]},I={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},b={["fn"]:"isSet",["argv"]:[{["ref"]:"Endpoint"}]},i9={["fn"]:"aws.partition",["argv"]:[{["ref"]:"Region"}],["assign"]:"partitionResult"},n5={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]},"aws-cn"]},Qu={["fn"]:"isSet",["argv"]:[{["ref"]:"Bucket"}]},O={["ref"]:"Bucket"},p5={["conditions"]:[H2],["error"]:"S3Express does not support S3 Accelerate.",["type"]:"error"},a5={["conditions"]:[b,{["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"}],["rules"]:[{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"uriEncode",["argv"]:[O],["assign"]:"uri_encoded_bucket"}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[O,!1]}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"},{["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]}],["rules"]:[{["conditions"]:[{["fn"]:"uriEncode",["argv"]:[O],["assign"]:"uri_encoded_bucket"}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[O,!1]}],["rules"]:[{["endpoint"]:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],["type"]:"tree"},{["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"}],["type"]:"tree"},v2={["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"},eD={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]},n9={["ref"]:"url"},p9={["fn"]:"uriEncode",["argv"]:[O],["assign"]:"uri_encoded_bucket"},X2={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},h={},a9={["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[O,!1]},s5={["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"},t5={["fn"]:"isSet",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"}]},o5={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"},!0]},K={["fn"]:"not",["argv"]:[b]},U={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},R={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},eu={["error"]:"Unrecognized S3Express bucket name format.",["type"]:"error"},e5={["fn"]:"not",["argv"]:[Qu]},u9={["ref"]:"hardwareType"},D9={["conditions"]:[K],["error"]:"Expected a endpoint to be specified but no endpoint was found",["type"]:"error"},u1={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{Region}"}]},u3={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"ForcePathStyle"},!1]},yh={["ref"]:"ForcePathStyle"},l={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!1]},p={["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"aws-global"]},t={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"us-east-1"}]},E={["fn"]:"not",["argv"]:[p]},o={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},B9={["url"]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},["headers"]:{}},d={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},e={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!1]},A9={["url"]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:d,["headers"]:{}},w9={["url"]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",["properties"]:d,["headers"]:{}},F9={["url"]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:d,["headers"]:{}},D3={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[n9,"isIp"]},!1]},B3={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:d,["headers"]:{}},H3={["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:d,["headers"]:{}},N9={["endpoint"]:H3,["type"]:"endpoint"},A3={["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:d,["headers"]:{}},G9={["url"]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:d,["headers"]:{}},D1={["error"]:"Invalid region: region was not a valid DNS name.",["type"]:"error"},z2={["ref"]:"bucketArn"},s9={["ref"]:"arnType"},w3={["fn"]:"getAttr",["argv"]:[z2,"service"]},U3={["ref"]:"accessPointName"},v9={["conditions"]:[T],["error"]:"S3 Object Lambda does not support Dual-stack",["type"]:"error"},$9={["conditions"]:[H2],["error"]:"S3 Object Lambda does not support S3 Accelerate",["type"]:"error"},z9={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableAccessPoints"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableAccessPoints"},!0]}],["error"]:"Access points are not supported for this operation",["type"]:"error"},F3={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"UseArnRegion"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseArnRegion"},!1]},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[z2,"region"]},"{Region}"]}]}],["error"]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",["type"]:"error"},t9={["fn"]:"getAttr",["argv"]:[{["ref"]:"bucketPartition"},"name"]},o9={["fn"]:"getAttr",["argv"]:[z2,"accountId"]},N3={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{bucketArn#region}"}]},Z9={["error"]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",["type"]:"error"},G3={["error"]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",["type"]:"error"},v3={["error"]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",["type"]:"error"},$3={["error"]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",["type"]:"error"},J9={["error"]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",["type"]:"error"},Q9={["error"]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",["type"]:"error"},Ju={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{bucketArn#region}"}]},W9={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{bucketArn#region}"}]},X9={["fn"]:"aws.parseArn",["argv"]:[O]},Y9={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:d,["headers"]:{}},h9={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:d,["headers"]:{}},K9={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:d,["headers"]:{}},z3={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:d,["headers"]:{}},S9={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:d,["headers"]:{}},x9={["ref"]:"UseObjectLambdaEndpoint"},Z3={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{Region}"}]},R9={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:d,["headers"]:{}},H9={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:d,["headers"]:{}},U9={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:d,["headers"]:{}},J3={["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:d,["headers"]:{}},c9={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:d,["headers"]:{}},Q3=[{["ref"]:"Region"}],Vh=[{["ref"]:"Endpoint"}],Th=[O],W3=[H2],R0=[b,v2],M9=[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],Ih=[p9],X3=[a9],R2=[i9],Y3=[I,T],Wu=[I,U],Xu=[R,T],Yu=[R,U],L9=[{["fn"]:"substring",["argv"]:[O,6,14,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[O,14,16,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],T2=[{["conditions"]:[I,T],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:X2,["headers"]:{}},["type"]:"endpoint"},{["conditions"]:Wu,["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:X2,["headers"]:{}},["type"]:"endpoint"},{["conditions"]:Xu,["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:X2,["headers"]:{}},["type"]:"endpoint"},{["conditions"]:Yu,["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:X2,["headers"]:{}},["type"]:"endpoint"}],E9=[{["fn"]:"substring",["argv"]:[O,6,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[O,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],O9=[{["fn"]:"substring",["argv"]:[O,6,19,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[O,19,21,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],C9=[{["fn"]:"substring",["argv"]:[O,6,20,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[O,20,22,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],P9=[{["fn"]:"substring",["argv"]:[O,6,26,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[O,26,28,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],I2=[{["conditions"]:[I,T],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"},{["conditions"]:Wu,["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"},{["conditions"]:Xu,["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"},{["conditions"]:Yu,["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},["headers"]:{}},["type"]:"endpoint"}],k9=[O,0,7,!0],y9=[{["fn"]:"substring",["argv"]:[O,7,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[O,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],V9=[{["fn"]:"substring",["argv"]:[O,7,16,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[O,16,18,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],T9=[{["fn"]:"substring",["argv"]:[O,7,20,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[O,20,22,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],I9=[{["fn"]:"substring",["argv"]:[O,7,21,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[O,21,23,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],q9=[{["fn"]:"substring",["argv"]:[O,7,27,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[O,27,29,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],qh=[Qu],m9=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"outpostId"},!1]}],g9=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"regionPrefix"},"beta"]}],mh=["*"],_9=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!1]}],b2=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"us-east-1"]}],h3=[{["fn"]:"stringEquals",["argv"]:[s9,"accesspoint"]}],f9=[{["fn"]:"getAttr",["argv"]:[z2,"resourceId[1]"],["assign"]:"accessPointName"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[U3,""]}]}],gh=[z2,"resourceId[1]"],b9=[T],K3=[{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[z2,"region"]},""]}]}],j9=[{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[z2,"resourceId[2]"]}]}]}],_h=[z2,"resourceId[2]"],S3=[{["fn"]:"aws.partition",["argv"]:[{["fn"]:"getAttr",["argv"]:[z2,"region"]}],["assign"]:"bucketPartition"}],l9=[{["fn"]:"stringEquals",["argv"]:[t9,{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]}]}],x3=[{["fn"]:"isValidHostLabel",["argv"]:[{["fn"]:"getAttr",["argv"]:[z2,"region"]},!0]}],R3=[{["fn"]:"isValidHostLabel",["argv"]:[o9,!1]}],d9=[{["fn"]:"isValidHostLabel",["argv"]:[U3,!1]}],B1=[I],r9=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!0]}],fh={version:"1.0",parameters:{Bucket:S0,Region:S0,UseFIPS:x0,UseDualStack:x0,Endpoint:S0,ForcePathStyle:x0,Accelerate:x0,UseGlobalEndpoint:x0,UseObjectLambdaEndpoint:Zu,Key:S0,Prefix:S0,CopySource:S0,DisableAccessPoints:Zu,DisableMultiRegionAccessPoints:x0,UseArnRegion:Zu,UseS3ExpressControlEndpoint:Zu,DisableS3ExpressSessionAuth:Zu},["rules"]:[{["conditions"]:[{["fn"]:"isSet",["argv"]:Q3}],["rules"]:[{["conditions"]:[H2,I],error:"Accelerate cannot be used with FIPS",["type"]:"error"},{["conditions"]:[T,b],error:"Cannot set dual-stack in combination with a custom endpoint.",["type"]:"error"},{["conditions"]:[b,I],error:"A custom endpoint cannot be combined with FIPS",["type"]:"error"},{["conditions"]:[b,H2],error:"A custom endpoint cannot be combined with S3 Accelerate",["type"]:"error"},{["conditions"]:[I,i9,n5],error:"Partition does not support FIPS",["type"]:"error"},{["conditions"]:[Qu,{["fn"]:"substring",["argv"]:[O,0,6,!0],["assign"]:"bucketSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketSuffix"},"--x-s3"]}],["rules"]:[p5,a5,{["conditions"]:[t5,o5],["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:[p9,K],["rules"]:[{["conditions"]:Y3,endpoint:{["url"]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:X2,["headers"]:h},["type"]:"endpoint"},{["conditions"]:Wu,endpoint:{["url"]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:X2,["headers"]:h},["type"]:"endpoint"},{["conditions"]:Xu,endpoint:{["url"]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:X2,["headers"]:h},["type"]:"endpoint"},{["conditions"]:Yu,endpoint:{["url"]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:X2,["headers"]:h},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:X3,["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:M9,["rules"]:[{["conditions"]:L9,["rules"]:T2,["type"]:"tree"},{["conditions"]:E9,["rules"]:T2,["type"]:"tree"},{["conditions"]:O9,["rules"]:T2,["type"]:"tree"},{["conditions"]:C9,["rules"]:T2,["type"]:"tree"},{["conditions"]:P9,["rules"]:T2,["type"]:"tree"},eu],["type"]:"tree"},{["conditions"]:L9,["rules"]:I2,["type"]:"tree"},{["conditions"]:E9,["rules"]:I2,["type"]:"tree"},{["conditions"]:O9,["rules"]:I2,["type"]:"tree"},{["conditions"]:C9,["rules"]:I2,["type"]:"tree"},{["conditions"]:P9,["rules"]:I2,["type"]:"tree"},eu],["type"]:"tree"}],["type"]:"tree"},s5],["type"]:"tree"},{["conditions"]:[Qu,{["fn"]:"substring",["argv"]:k9,["assign"]:"accessPointSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"accessPointSuffix"},"--xa-s3"]}],["rules"]:[p5,a5,{["conditions"]:X3,["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:M9,["rules"]:[{["conditions"]:y9,["rules"]:T2,["type"]:"tree"},{["conditions"]:V9,["rules"]:T2,["type"]:"tree"},{["conditions"]:T9,["rules"]:T2,["type"]:"tree"},{["conditions"]:I9,["rules"]:T2,["type"]:"tree"},{["conditions"]:q9,["rules"]:T2,["type"]:"tree"},eu],["type"]:"tree"},{["conditions"]:y9,["rules"]:I2,["type"]:"tree"},{["conditions"]:V9,["rules"]:I2,["type"]:"tree"},{["conditions"]:T9,["rules"]:I2,["type"]:"tree"},{["conditions"]:I9,["rules"]:I2,["type"]:"tree"},{["conditions"]:q9,["rules"]:I2,["type"]:"tree"},eu],["type"]:"tree"}],["type"]:"tree"},s5],["type"]:"tree"},{["conditions"]:[e5,t5,o5],["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:R0,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:X2,["headers"]:h},["type"]:"endpoint"},{["conditions"]:Y3,endpoint:{["url"]:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:X2,["headers"]:h},["type"]:"endpoint"},{["conditions"]:Wu,endpoint:{["url"]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:X2,["headers"]:h},["type"]:"endpoint"},{["conditions"]:Xu,endpoint:{["url"]:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:X2,["headers"]:h},["type"]:"endpoint"},{["conditions"]:Yu,endpoint:{["url"]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",["properties"]:X2,["headers"]:h},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[Qu,{["fn"]:"substring",["argv"]:[O,49,50,!0],["assign"]:"hardwareType"},{["fn"]:"substring",["argv"]:[O,8,12,!0],["assign"]:"regionPrefix"},{["fn"]:"substring",["argv"]:k9,["assign"]:"bucketAliasSuffix"},{["fn"]:"substring",["argv"]:[O,32,49,!0],["assign"]:"outpostId"},{["fn"]:"aws.partition",["argv"]:Q3,["assign"]:"regionPartition"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketAliasSuffix"},"--op-s3"]}],["rules"]:[{["conditions"]:m9,["rules"]:[{["conditions"]:X3,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[u9,"e"]}],["rules"]:[{["conditions"]:g9,["rules"]:[D9,{["conditions"]:R0,endpoint:{["url"]:"https://{Bucket}.ec2.{url#authority}",["properties"]:u1,["headers"]:h},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:u1,["headers"]:h},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[u9,"o"]}],["rules"]:[{["conditions"]:g9,["rules"]:[D9,{["conditions"]:R0,endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.{url#authority}",["properties"]:u1,["headers"]:h},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:u1,["headers"]:h},["type"]:"endpoint"}],["type"]:"tree"},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',["type"]:"error"}],["type"]:"tree"},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:qh,["rules"]:[{["conditions"]:[b,{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"parseURL",["argv"]:Vh}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",["type"]:"error"},{["conditions"]:[u3,a9],["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:_9,["rules"]:[{["conditions"]:[H2,n5],error:"S3 Accelerate cannot be used in this region",["type"]:"error"},{["conditions"]:[T,I,l,K,p],endpoint:{["url"]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[T,I,l,K,E,o],["rules"]:[{endpoint:B9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[T,I,l,K,E,e],endpoint:B9,["type"]:"endpoint"},{["conditions"]:[U,I,l,K,p],endpoint:{["url"]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[U,I,l,K,E,o],["rules"]:[{endpoint:A9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[U,I,l,K,E,e],endpoint:A9,["type"]:"endpoint"},{["conditions"]:[T,R,H2,K,p],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[T,R,H2,K,E,o],["rules"]:[{endpoint:w9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[T,R,H2,K,E,e],endpoint:w9,["type"]:"endpoint"},{["conditions"]:[T,R,l,K,p],endpoint:{["url"]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[T,R,l,K,E,o],["rules"]:[{endpoint:F9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[T,R,l,K,E,e],endpoint:F9,["type"]:"endpoint"},{["conditions"]:[U,R,l,b,v2,eD,p],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[U,R,l,b,v2,D3,p],endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[U,R,l,b,v2,eD,E,o],["rules"]:[{["conditions"]:b2,endpoint:B3,["type"]:"endpoint"},{endpoint:B3,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[U,R,l,b,v2,D3,E,o],["rules"]:[{["conditions"]:b2,endpoint:H3,["type"]:"endpoint"},N9],["type"]:"tree"},{["conditions"]:[U,R,l,b,v2,eD,E,e],endpoint:B3,["type"]:"endpoint"},{["conditions"]:[U,R,l,b,v2,D3,E,e],endpoint:H3,["type"]:"endpoint"},{["conditions"]:[U,R,H2,K,p],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[U,R,H2,K,E,o],["rules"]:[{["conditions"]:b2,endpoint:A3,["type"]:"endpoint"},{endpoint:A3,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[U,R,H2,K,E,e],endpoint:A3,["type"]:"endpoint"},{["conditions"]:[U,R,l,K,p],endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[U,R,l,K,E,o],["rules"]:[{["conditions"]:b2,endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:d,["headers"]:h},["type"]:"endpoint"},{endpoint:G9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[U,R,l,K,E,e],endpoint:G9,["type"]:"endpoint"}],["type"]:"tree"},D1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[b,v2,{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[n9,"scheme"]},"http"]},{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[O,!0]},u3,R,U,l],["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:_9,["rules"]:[N9],["type"]:"tree"},D1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[u3,{["fn"]:"aws.parseArn",["argv"]:Th,["assign"]:"bucketArn"}],["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[z2,"resourceId[0]"],["assign"]:"arnType"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[s9,""]}]}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[w3,"s3-object-lambda"]}],["rules"]:[{["conditions"]:h3,["rules"]:[{["conditions"]:f9,["rules"]:[v9,$9,{["conditions"]:K3,["rules"]:[z9,{["conditions"]:j9,["rules"]:[F3,{["conditions"]:S3,["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:l9,["rules"]:[{["conditions"]:x3,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[o9,""]}],error:"Invalid ARN: Missing account id",["type"]:"error"},{["conditions"]:R3,["rules"]:[{["conditions"]:d9,["rules"]:[{["conditions"]:R0,endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:N3,["headers"]:h},["type"]:"endpoint"},{["conditions"]:B1,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:N3,["headers"]:h},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:N3,["headers"]:h},["type"]:"endpoint"}],["type"]:"tree"},Z9],["type"]:"tree"},G3],["type"]:"tree"},v3],["type"]:"tree"},$3],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},J9],["type"]:"tree"},{error:"Invalid ARN: bucket ARN is missing a region",["type"]:"error"}],["type"]:"tree"},Q9],["type"]:"tree"},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",["type"]:"error"}],["type"]:"tree"},{["conditions"]:h3,["rules"]:[{["conditions"]:f9,["rules"]:[{["conditions"]:K3,["rules"]:[{["conditions"]:h3,["rules"]:[{["conditions"]:K3,["rules"]:[z9,{["conditions"]:j9,["rules"]:[F3,{["conditions"]:S3,["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[t9,"{partitionResult#name}"]}],["rules"]:[{["conditions"]:x3,["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[w3,"s3"]}],["rules"]:[{["conditions"]:R3,["rules"]:[{["conditions"]:d9,["rules"]:[{["conditions"]:W3,error:"Access Points do not support S3 Accelerate",["type"]:"error"},{["conditions"]:Y3,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ju,["headers"]:h},["type"]:"endpoint"},{["conditions"]:Wu,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ju,["headers"]:h},["type"]:"endpoint"},{["conditions"]:Xu,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ju,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[R,U,b,v2],endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:Ju,["headers"]:h},["type"]:"endpoint"},{["conditions"]:Yu,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ju,["headers"]:h},["type"]:"endpoint"}],["type"]:"tree"},Z9],["type"]:"tree"},G3],["type"]:"tree"},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",["type"]:"error"}],["type"]:"tree"},v3],["type"]:"tree"},$3],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},J9],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isValidHostLabel",["argv"]:[U3,!0]}],["rules"]:[{["conditions"]:b9,error:"S3 MRAP does not support dual-stack",["type"]:"error"},{["conditions"]:B1,error:"S3 MRAP does not support FIPS",["type"]:"error"},{["conditions"]:W3,error:"S3 MRAP does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableMultiRegionAccessPoints"},!0]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",["type"]:"error"},{["conditions"]:[{["fn"]:"aws.partition",["argv"]:Q3,["assign"]:"mrapPartition"}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"mrapPartition"},"name"]},{["fn"]:"getAttr",["argv"]:[z2,"partition"]}]}],["rules"]:[{endpoint:{["url"]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,name:"sigv4a",["signingName"]:"s3",["signingRegionSet"]:mh}]},["headers"]:h},["type"]:"endpoint"}],["type"]:"tree"},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Access Point Name",["type"]:"error"}],["type"]:"tree"},Q9],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[w3,"s3-outposts"]}],["rules"]:[{["conditions"]:b9,error:"S3 Outposts does not support Dual-stack",["type"]:"error"},{["conditions"]:B1,error:"S3 Outposts does not support FIPS",["type"]:"error"},{["conditions"]:W3,error:"S3 Outposts does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[z2,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",["type"]:"error"},{["conditions"]:[{["fn"]:"getAttr",["argv"]:gh,["assign"]:"outpostId"}],["rules"]:[{["conditions"]:m9,["rules"]:[F3,{["conditions"]:S3,["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:l9,["rules"]:[{["conditions"]:x3,["rules"]:[{["conditions"]:R3,["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:_h,["assign"]:"outpostType"}],["rules"]:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[z2,"resourceId[3]"],["assign"]:"accessPointName"}],["rules"]:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"outpostType"},"accesspoint"]}],["rules"]:[{["conditions"]:R0,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",["properties"]:W9,["headers"]:h},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:W9,["headers"]:h},["type"]:"endpoint"}],["type"]:"tree"},{error:"Expected an outpost type `accesspoint`, found {outpostType}",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: expected an access point name",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Expected a 4-component resource",["type"]:"error"}],["type"]:"tree"},G3],["type"]:"tree"},v3],["type"]:"tree"},$3],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The Outpost Id was not set",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: No ARN type specified",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"substring",["argv"]:[O,0,4,!1],["assign"]:"arnPrefix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"arnPrefix"},"arn:"]},{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[X9]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[yh,!0]},X9],error:"Path-style addressing cannot be used with ARN buckets",["type"]:"error"},{["conditions"]:Ih,["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:[l],["rules"]:[{["conditions"]:[T,K,I,p],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[T,K,I,E,o],["rules"]:[{endpoint:Y9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[T,K,I,E,e],endpoint:Y9,["type"]:"endpoint"},{["conditions"]:[U,K,I,p],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[U,K,I,E,o],["rules"]:[{endpoint:h9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[U,K,I,E,e],endpoint:h9,["type"]:"endpoint"},{["conditions"]:[T,K,R,p],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[T,K,R,E,o],["rules"]:[{endpoint:K9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[T,K,R,E,e],endpoint:K9,["type"]:"endpoint"},{["conditions"]:[U,b,v2,R,p],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[U,b,v2,R,E,o],["rules"]:[{["conditions"]:b2,endpoint:z3,["type"]:"endpoint"},{endpoint:z3,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[U,b,v2,R,E,e],endpoint:z3,["type"]:"endpoint"},{["conditions"]:[U,K,R,p],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[U,K,R,E,o],["rules"]:[{["conditions"]:b2,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:d,["headers"]:h},["type"]:"endpoint"},{endpoint:S9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[U,K,R,E,e],endpoint:S9,["type"]:"endpoint"}],["type"]:"tree"},{error:"Path-style addressing cannot be used with S3 Accelerate",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[x9]},{["fn"]:"booleanEquals",["argv"]:[x9,!0]}],["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:r9,["rules"]:[v9,$9,{["conditions"]:R0,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:Z3,["headers"]:h},["type"]:"endpoint"},{["conditions"]:B1,endpoint:{["url"]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:Z3,["headers"]:h},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",["properties"]:Z3,["headers"]:h},["type"]:"endpoint"}],["type"]:"tree"},D1],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[e5],["rules"]:[{["conditions"]:R2,["rules"]:[{["conditions"]:r9,["rules"]:[{["conditions"]:[I,T,K,p],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[I,T,K,E,o],["rules"]:[{endpoint:R9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,T,K,E,e],endpoint:R9,["type"]:"endpoint"},{["conditions"]:[I,U,K,p],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[I,U,K,E,o],["rules"]:[{endpoint:H9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,U,K,E,e],endpoint:H9,["type"]:"endpoint"},{["conditions"]:[R,T,K,p],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[R,T,K,E,o],["rules"]:[{endpoint:U9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,T,K,E,e],endpoint:U9,["type"]:"endpoint"},{["conditions"]:[R,U,b,v2,p],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[R,U,b,v2,E,o],["rules"]:[{["conditions"]:b2,endpoint:J3,["type"]:"endpoint"},{endpoint:J3,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,U,b,v2,E,e],endpoint:J3,["type"]:"endpoint"},{["conditions"]:[R,U,K,p],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:t,["headers"]:h},["type"]:"endpoint"},{["conditions"]:[R,U,K,E,o],["rules"]:[{["conditions"]:b2,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:d,["headers"]:h},["type"]:"endpoint"},{endpoint:c9,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,U,K,E,e],endpoint:c9,["type"]:"endpoint"}],["type"]:"tree"},D1],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"A region must be set when sending requests to S3.",["type"]:"error"}]},e9=fh;var lh=new H0.EndpointCache({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),A1=(u,D={})=>{return lh.get(u,()=>H0.resolveEndpoint(e9,{endpointParams:u,logger:D.logger}))};H0.customEndpointFunctions.aws=uB.awsEndpointFunctions;var dh=(u)=>async(D,B,A)=>{if(!A)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let w=await u(D,B,A),F=c0.getSmithyContext(B)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!F)throw Error(`getEndpointParameterInstructions() is not defined on '${B.commandName}'`);let N=await DB.resolveParams(A,{getEndpointParameterInstructions:F},D);return Object.assign(w,N)},rh=async(u,D,B)=>{return{operation:c0.getSmithyContext(D).operation,region:await c0.normalizeProvider(u.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},BB=dh(rh);function AB(u){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:u.region},propertiesExtractor:(D,B)=>({signingProperties:{config:D,context:B}})}}function wB(u){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:u.region},propertiesExtractor:(D,B)=>({signingProperties:{config:D,context:B}})}}var ih=(u,D,B)=>{return(w)=>{let N=u(w).properties?.authSchemes;if(!N)return D(w);let G=[];for(let $ of N){let{name:z,properties:Q={},...Z}=$,J=z.toLowerCase();if(z!==J)console.warn(`HttpAuthScheme has been normalized with lowercasing: '${z}' to '${J}'`);let W;if(J==="sigv4a"){W="aws.auth#sigv4a";let S=N.find((L)=>{let x=L.name.toLowerCase();return x!=="sigv4a"&&x.startsWith("sigv4")});if(zu.sigv4aDependency()==="none"&&S)continue}else if(J.startsWith("sigv4"))W="aws.auth#sigv4";else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${J}'`);let Y=B[W];if(!Y)throw Error(`Could not find HttpAuthOption create function for '${W}'`);let M=Y(w);M.schemeId=W,M.signingProperties={...M.signingProperties||{},...Z,...Q},G.push(M)}return G}},nh=(u)=>{let D=[];switch(u.operation){default:D.push(AB(u)),D.push(wB(u))}return D},FB=ih(A1,nh,{"aws.auth#sigv4":AB,"aws.auth#sigv4a":wB}),NB=(u)=>{let D=w1.resolveAwsSdkSigV4Config(u),B=w1.resolveAwsSdkSigV4AConfig(D);return Object.assign(B,{authSchemePreference:c0.normalizeProvider(u.authSchemePreference??[])})};var SB=X(U0(),1),xB=X(k2(),1);var GB=(u)=>{return Object.assign(u,{useFipsEndpoint:u.useFipsEndpoint??!1,useDualstackEndpoint:u.useDualstackEndpoint??!1,forcePathStyle:u.forcePathStyle??!1,useAccelerateEndpoint:u.useAccelerateEndpoint??!1,useGlobalEndpoint:u.useGlobalEndpoint??!1,disableMultiregionAccessPoints:u.disableMultiregionAccessPoints??!1,defaultSigningName:"s3",clientContextParams:u.clientContextParams??{}})},j2={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var c3=X(zB(),1);var vB=X(k2(),1);class r extends vB.ServiceException{constructor(u){super(u);Object.setPrototypeOf(this,r.prototype)}}class F1 extends r{name="NoSuchUpload";$fault="client";constructor(u){super({name:"NoSuchUpload",$fault:"client",...u});Object.setPrototypeOf(this,F1.prototype)}}class N1 extends r{name="AccessDenied";$fault="client";constructor(u){super({name:"AccessDenied",$fault:"client",...u});Object.setPrototypeOf(this,N1.prototype)}}class G1 extends r{name="ObjectNotInActiveTierError";$fault="client";constructor(u){super({name:"ObjectNotInActiveTierError",$fault:"client",...u});Object.setPrototypeOf(this,G1.prototype)}}class v1 extends r{name="BucketAlreadyExists";$fault="client";constructor(u){super({name:"BucketAlreadyExists",$fault:"client",...u});Object.setPrototypeOf(this,v1.prototype)}}class $1 extends r{name="BucketAlreadyOwnedByYou";$fault="client";constructor(u){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...u});Object.setPrototypeOf(this,$1.prototype)}}class z1 extends r{name="NoSuchBucket";$fault="client";constructor(u){super({name:"NoSuchBucket",$fault:"client",...u});Object.setPrototypeOf(this,z1.prototype)}}class Z1 extends r{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(u){super({name:"InvalidObjectState",$fault:"client",...u});Object.setPrototypeOf(this,Z1.prototype),this.StorageClass=u.StorageClass,this.AccessTier=u.AccessTier}}class J1 extends r{name="NoSuchKey";$fault="client";constructor(u){super({name:"NoSuchKey",$fault:"client",...u});Object.setPrototypeOf(this,J1.prototype)}}class Q1 extends r{name="NotFound";$fault="client";constructor(u){super({name:"NotFound",$fault:"client",...u});Object.setPrototypeOf(this,Q1.prototype)}}class W1 extends r{name="EncryptionTypeMismatch";$fault="client";constructor(u){super({name:"EncryptionTypeMismatch",$fault:"client",...u});Object.setPrototypeOf(this,W1.prototype)}}class X1 extends r{name="InvalidRequest";$fault="client";constructor(u){super({name:"InvalidRequest",$fault:"client",...u});Object.setPrototypeOf(this,X1.prototype)}}class Y1 extends r{name="InvalidWriteOffset";$fault="client";constructor(u){super({name:"InvalidWriteOffset",$fault:"client",...u});Object.setPrototypeOf(this,Y1.prototype)}}class h1 extends r{name="TooManyParts";$fault="client";constructor(u){super({name:"TooManyParts",$fault:"client",...u});Object.setPrototypeOf(this,h1.prototype)}}class K1 extends r{name="IdempotencyParameterMismatch";$fault="client";constructor(u){super({name:"IdempotencyParameterMismatch",$fault:"client",...u});Object.setPrototypeOf(this,K1.prototype)}}class S1 extends r{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(u){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...u});Object.setPrototypeOf(this,S1.prototype)}}var ZB=c3.TypeRegistry.for("smithy.ts.sdk.synthetic.com.amazonaws.s3"),ph=[-3,"smithy.ts.sdk.synthetic.com.amazonaws.s3","S3ServiceException",0,[],[]];ZB.registerError(ph,r);var G2=c3.TypeRegistry.for("com.amazonaws.s3"),ah=[-3,"com.amazonaws.s3","AccessDenied",{["error"]:"client",["httpError"]:403},[],[]];G2.registerError(ah,N1);var sh=[-3,"com.amazonaws.s3","BucketAlreadyExists",{["error"]:"client",["httpError"]:409},[],[]];G2.registerError(sh,v1);var th=[-3,"com.amazonaws.s3","BucketAlreadyOwnedByYou",{["error"]:"client",["httpError"]:409},[],[]];G2.registerError(th,$1);var oh=[-3,"com.amazonaws.s3","EncryptionTypeMismatch",{["error"]:"client",["httpError"]:400},[],[]];G2.registerError(oh,W1);var eh=[-3,"com.amazonaws.s3","IdempotencyParameterMismatch",{["error"]:"client",["httpError"]:400},[],[]];G2.registerError(eh,K1);var uK=[-3,"com.amazonaws.s3","InvalidObjectState",{["error"]:"client",["httpError"]:403},["StorageClass","AccessTier"],[0,0]];G2.registerError(uK,Z1);var DK=[-3,"com.amazonaws.s3","InvalidRequest",{["error"]:"client",["httpError"]:400},[],[]];G2.registerError(DK,X1);var BK=[-3,"com.amazonaws.s3","InvalidWriteOffset",{["error"]:"client",["httpError"]:400},[],[]];G2.registerError(BK,Y1);var AK=[-3,"com.amazonaws.s3","NoSuchBucket",{["error"]:"client",["httpError"]:404},[],[]];G2.registerError(AK,z1);var wK=[-3,"com.amazonaws.s3","NoSuchKey",{["error"]:"client",["httpError"]:404},[],[]];G2.registerError(wK,J1);var FK=[-3,"com.amazonaws.s3","NoSuchUpload",{["error"]:"client",["httpError"]:404},[],[]];G2.registerError(FK,F1);var NK=[-3,"com.amazonaws.s3","NotFound",{["error"]:"client"},[],[]];G2.registerError(NK,Q1);var GK=[-3,"com.amazonaws.s3","ObjectAlreadyInActiveTierError",{["error"]:"client",["httpError"]:403},[],[]];G2.registerError(GK,S1);var vK=[-3,"com.amazonaws.s3","ObjectNotInActiveTierError",{["error"]:"client",["httpError"]:403},[],[]];G2.registerError(vK,G1);var $K=[-3,"com.amazonaws.s3","TooManyParts",{["error"]:"client",["httpError"]:400},[],[]];G2.registerError($K,h1);var JB=[ZB,G2];var $B=[0,"com.amazonaws.s3","SessionCredentialValue",8,0],QB=[0,"com.amazonaws.s3","SSECustomerKey",8,0],x1=[0,"com.amazonaws.s3","SSEKMSEncryptionContext",8,0],hu=[0,"com.amazonaws.s3","SSEKMSKeyId",8,0],WB=[0,"com.amazonaws.s3","StreamingBlob",{["streaming"]:1},42];var zK=[3,"com.amazonaws.s3","CommonPrefix",0,["Prefix"],[0]];var ZK=[3,"com.amazonaws.s3","CreateSessionOutput",{["xmlName"]:"CreateSessionResult"},["Credentials","ServerSideEncryption","SSEKMSKeyId","SSEKMSEncryptionContext","BucketKeyEnabled"],[[()=>HK,{["xmlName"]:"Credentials"}],[0,{["httpHeader"]:"x-amz-server-side-encryption"}],[()=>hu,{["httpHeader"]:"x-amz-server-side-encryption-aws-kms-key-id"}],[()=>x1,{["httpHeader"]:"x-amz-server-side-encryption-context"}],[2,{["httpHeader"]:"x-amz-server-side-encryption-bucket-key-enabled"}]],1],JK=[3,"com.amazonaws.s3","CreateSessionRequest",0,["Bucket","SessionMode","ServerSideEncryption","SSEKMSKeyId","SSEKMSEncryptionContext","BucketKeyEnabled"],[[0,1],[0,{["httpHeader"]:"x-amz-create-session-mode"}],[0,{["httpHeader"]:"x-amz-server-side-encryption"}],[()=>hu,{["httpHeader"]:"x-amz-server-side-encryption-aws-kms-key-id"}],[()=>x1,{["httpHeader"]:"x-amz-server-side-encryption-context"}],[2,{["httpHeader"]:"x-amz-server-side-encryption-bucket-key-enabled"}]],1];var QK=[3,"com.amazonaws.s3","GetObjectOutput",0,["Body","DeleteMarker","AcceptRanges","Expiration","Restore","LastModified","ContentLength","ETag","ChecksumCRC32","ChecksumCRC32C","ChecksumCRC64NVME","ChecksumSHA1","ChecksumSHA256","ChecksumType","MissingMeta","VersionId","CacheControl","ContentDisposition","ContentEncoding","ContentLanguage","ContentRange","ContentType","Expires","ExpiresString","WebsiteRedirectLocation","ServerSideEncryption","Metadata","SSECustomerAlgorithm","SSECustomerKeyMD5","SSEKMSKeyId","BucketKeyEnabled","StorageClass","RequestCharged","ReplicationStatus","PartsCount","TagCount","ObjectLockMode","ObjectLockRetainUntilDate","ObjectLockLegalHoldStatus"],[[()=>WB,16],[2,{["httpHeader"]:"x-amz-delete-marker"}],[0,{["httpHeader"]:"accept-ranges"}],[0,{["httpHeader"]:"x-amz-expiration"}],[0,{["httpHeader"]:"x-amz-restore"}],[4,{["httpHeader"]:"Last-Modified"}],[1,{["httpHeader"]:"Content-Length"}],[0,{["httpHeader"]:"ETag"}],[0,{["httpHeader"]:"x-amz-checksum-crc32"}],[0,{["httpHeader"]:"x-amz-checksum-crc32c"}],[0,{["httpHeader"]:"x-amz-checksum-crc64nvme"}],[0,{["httpHeader"]:"x-amz-checksum-sha1"}],[0,{["httpHeader"]:"x-amz-checksum-sha256"}],[0,{["httpHeader"]:"x-amz-checksum-type"}],[1,{["httpHeader"]:"x-amz-missing-meta"}],[0,{["httpHeader"]:"x-amz-version-id"}],[0,{["httpHeader"]:"Cache-Control"}],[0,{["httpHeader"]:"Content-Disposition"}],[0,{["httpHeader"]:"Content-Encoding"}],[0,{["httpHeader"]:"Content-Language"}],[0,{["httpHeader"]:"Content-Range"}],[0,{["httpHeader"]:"Content-Type"}],[4,{["httpHeader"]:"Expires"}],[0,{["httpHeader"]:"ExpiresString"}],[0,{["httpHeader"]:"x-amz-website-redirect-location"}],[0,{["httpHeader"]:"x-amz-server-side-encryption"}],[128,{["httpPrefixHeaders"]:"x-amz-meta-"}],[0,{["httpHeader"]:"x-amz-server-side-encryption-customer-algorithm"}],[0,{["httpHeader"]:"x-amz-server-side-encryption-customer-key-MD5"}],[()=>hu,{["httpHeader"]:"x-amz-server-side-encryption-aws-kms-key-id"}],[2,{["httpHeader"]:"x-amz-server-side-encryption-bucket-key-enabled"}],[0,{["httpHeader"]:"x-amz-storage-class"}],[0,{["httpHeader"]:"x-amz-request-charged"}],[0,{["httpHeader"]:"x-amz-replication-status"}],[1,{["httpHeader"]:"x-amz-mp-parts-count"}],[1,{["httpHeader"]:"x-amz-tagging-count"}],[0,{["httpHeader"]:"x-amz-object-lock-mode"}],[5,{["httpHeader"]:"x-amz-object-lock-retain-until-date"}],[0,{["httpHeader"]:"x-amz-object-lock-legal-hold"}]]],WK=[3,"com.amazonaws.s3","GetObjectRequest",0,["Bucket","Key","IfMatch","IfModifiedSince","IfNoneMatch","IfUnmodifiedSince","Range","ResponseCacheControl","ResponseContentDisposition","ResponseContentEncoding","ResponseContentLanguage","ResponseContentType","ResponseExpires","VersionId","SSECustomerAlgorithm","SSECustomerKey","SSECustomerKeyMD5","RequestPayer","PartNumber","ExpectedBucketOwner","ChecksumMode"],[[0,1],[0,1],[0,{["httpHeader"]:"If-Match"}],[4,{["httpHeader"]:"If-Modified-Since"}],[0,{["httpHeader"]:"If-None-Match"}],[4,{["httpHeader"]:"If-Unmodified-Since"}],[0,{["httpHeader"]:"Range"}],[0,{["httpQuery"]:"response-cache-control"}],[0,{["httpQuery"]:"response-content-disposition"}],[0,{["httpQuery"]:"response-content-encoding"}],[0,{["httpQuery"]:"response-content-language"}],[0,{["httpQuery"]:"response-content-type"}],[6,{["httpQuery"]:"response-expires"}],[0,{["httpQuery"]:"versionId"}],[0,{["httpHeader"]:"x-amz-server-side-encryption-customer-algorithm"}],[()=>QB,{["httpHeader"]:"x-amz-server-side-encryption-customer-key"}],[0,{["httpHeader"]:"x-amz-server-side-encryption-customer-key-MD5"}],[0,{["httpHeader"]:"x-amz-request-payer"}],[1,{["httpQuery"]:"partNumber"}],[0,{["httpHeader"]:"x-amz-expected-bucket-owner"}],[0,{["httpHeader"]:"x-amz-checksum-mode"}]],2];var XK=[3,"com.amazonaws.s3","ListObjectsV2Output",{["xmlName"]:"ListBucketResult"},["IsTruncated","Contents","Name","Prefix","Delimiter","MaxKeys","CommonPrefixes","EncodingType","KeyCount","ContinuationToken","NextContinuationToken","StartAfter","RequestCharged"],[2,[()=>cK,{["xmlFlattened"]:1}],0,0,0,1,[()=>UK,{["xmlFlattened"]:1}],0,1,0,0,0,[0,{["httpHeader"]:"x-amz-request-charged"}]]],YK=[3,"com.amazonaws.s3","ListObjectsV2Request",0,["Bucket","Delimiter","EncodingType","MaxKeys","Prefix","ContinuationToken","FetchOwner","StartAfter","RequestPayer","ExpectedBucketOwner","OptionalObjectAttributes"],[[0,1],[0,{["httpQuery"]:"delimiter"}],[0,{["httpQuery"]:"encoding-type"}],[1,{["httpQuery"]:"max-keys"}],[0,{["httpQuery"]:"prefix"}],[0,{["httpQuery"]:"continuation-token"}],[2,{["httpQuery"]:"fetch-owner"}],[0,{["httpQuery"]:"start-after"}],[0,{["httpHeader"]:"x-amz-request-payer"}],[0,{["httpHeader"]:"x-amz-expected-bucket-owner"}],[64,{["httpHeader"]:"x-amz-optional-object-attributes"}]],1];var hK=[3,"com.amazonaws.s3","Object",0,["Key","LastModified","ETag","ChecksumAlgorithm","ChecksumType","Size","StorageClass","Owner","RestoreStatus"],[0,4,0,[64,{["xmlFlattened"]:1}],0,1,0,()=>KK,()=>RK]];var KK=[3,"com.amazonaws.s3","Owner",0,["DisplayName","ID"],[0,0]];var SK=[3,"com.amazonaws.s3","PutObjectOutput",0,["Expiration","ETag","ChecksumCRC32","ChecksumCRC32C","ChecksumCRC64NVME","ChecksumSHA1","ChecksumSHA256","ChecksumType","ServerSideEncryption","VersionId","SSECustomerAlgorithm","SSECustomerKeyMD5","SSEKMSKeyId","SSEKMSEncryptionContext","BucketKeyEnabled","Size","RequestCharged"],[[0,{["httpHeader"]:"x-amz-expiration"}],[0,{["httpHeader"]:"ETag"}],[0,{["httpHeader"]:"x-amz-checksum-crc32"}],[0,{["httpHeader"]:"x-amz-checksum-crc32c"}],[0,{["httpHeader"]:"x-amz-checksum-crc64nvme"}],[0,{["httpHeader"]:"x-amz-checksum-sha1"}],[0,{["httpHeader"]:"x-amz-checksum-sha256"}],[0,{["httpHeader"]:"x-amz-checksum-type"}],[0,{["httpHeader"]:"x-amz-server-side-encryption"}],[0,{["httpHeader"]:"x-amz-version-id"}],[0,{["httpHeader"]:"x-amz-server-side-encryption-customer-algorithm"}],[0,{["httpHeader"]:"x-amz-server-side-encryption-customer-key-MD5"}],[()=>hu,{["httpHeader"]:"x-amz-server-side-encryption-aws-kms-key-id"}],[()=>x1,{["httpHeader"]:"x-amz-server-side-encryption-context"}],[2,{["httpHeader"]:"x-amz-server-side-encryption-bucket-key-enabled"}],[1,{["httpHeader"]:"x-amz-object-size"}],[0,{["httpHeader"]:"x-amz-request-charged"}]]],xK=[3,"com.amazonaws.s3","PutObjectRequest",0,["Bucket","Key","ACL","Body","CacheControl","ContentDisposition","ContentEncoding","ContentLanguage","ContentLength","ContentMD5","ContentType","ChecksumAlgorithm","ChecksumCRC32","ChecksumCRC32C","ChecksumCRC64NVME","ChecksumSHA1","ChecksumSHA256","Expires","IfMatch","IfNoneMatch","GrantFullControl","GrantRead","GrantReadACP","GrantWriteACP","WriteOffsetBytes","Metadata","ServerSideEncryption","StorageClass","WebsiteRedirectLocation","SSECustomerAlgorithm","SSECustomerKey","SSECustomerKeyMD5","SSEKMSKeyId","SSEKMSEncryptionContext","BucketKeyEnabled","RequestPayer","Tagging","ObjectLockMode","ObjectLockRetainUntilDate","ObjectLockLegalHoldStatus","ExpectedBucketOwner"],[[0,1],[0,1],[0,{["httpHeader"]:"x-amz-acl"}],[()=>WB,16],[0,{["httpHeader"]:"Cache-Control"}],[0,{["httpHeader"]:"Content-Disposition"}],[0,{["httpHeader"]:"Content-Encoding"}],[0,{["httpHeader"]:"Content-Language"}],[1,{["httpHeader"]:"Content-Length"}],[0,{["httpHeader"]:"Content-MD5"}],[0,{["httpHeader"]:"Content-Type"}],[0,{["httpHeader"]:"x-amz-sdk-checksum-algorithm"}],[0,{["httpHeader"]:"x-amz-checksum-crc32"}],[0,{["httpHeader"]:"x-amz-checksum-crc32c"}],[0,{["httpHeader"]:"x-amz-checksum-crc64nvme"}],[0,{["httpHeader"]:"x-amz-checksum-sha1"}],[0,{["httpHeader"]:"x-amz-checksum-sha256"}],[4,{["httpHeader"]:"Expires"}],[0,{["httpHeader"]:"If-Match"}],[0,{["httpHeader"]:"If-None-Match"}],[0,{["httpHeader"]:"x-amz-grant-full-control"}],[0,{["httpHeader"]:"x-amz-grant-read"}],[0,{["httpHeader"]:"x-amz-grant-read-acp"}],[0,{["httpHeader"]:"x-amz-grant-write-acp"}],[1,{["httpHeader"]:"x-amz-write-offset-bytes"}],[128,{["httpPrefixHeaders"]:"x-amz-meta-"}],[0,{["httpHeader"]:"x-amz-server-side-encryption"}],[0,{["httpHeader"]:"x-amz-storage-class"}],[0,{["httpHeader"]:"x-amz-website-redirect-location"}],[0,{["httpHeader"]:"x-amz-server-side-encryption-customer-algorithm"}],[()=>QB,{["httpHeader"]:"x-amz-server-side-encryption-customer-key"}],[0,{["httpHeader"]:"x-amz-server-side-encryption-customer-key-MD5"}],[()=>hu,{["httpHeader"]:"x-amz-server-side-encryption-aws-kms-key-id"}],[()=>x1,{["httpHeader"]:"x-amz-server-side-encryption-context"}],[2,{["httpHeader"]:"x-amz-server-side-encryption-bucket-key-enabled"}],[0,{["httpHeader"]:"x-amz-request-payer"}],[0,{["httpHeader"]:"x-amz-tagging"}],[0,{["httpHeader"]:"x-amz-object-lock-mode"}],[5,{["httpHeader"]:"x-amz-object-lock-retain-until-date"}],[0,{["httpHeader"]:"x-amz-object-lock-legal-hold"}],[0,{["httpHeader"]:"x-amz-expected-bucket-owner"}]],2];var RK=[3,"com.amazonaws.s3","RestoreStatus",0,["IsRestoreInProgress","RestoreExpiryDate"],[2,4]];var HK=[3,"com.amazonaws.s3","SessionCredentials",0,["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],[[0,{["xmlName"]:"AccessKeyId"}],[()=>$B,{["xmlName"]:"SecretAccessKey"}],[()=>$B,{["xmlName"]:"SessionToken"}],[4,{["xmlName"]:"Expiration"}]],4];var UK=[1,"com.amazonaws.s3","CommonPrefixList",0,()=>zK];var cK=[1,"com.amazonaws.s3","ObjectList",0,[()=>hK,0]];var XB=[9,"com.amazonaws.s3","CreateSession",{["http"]:["GET","/?session",200]},()=>JK,()=>ZK];var YB=[9,"com.amazonaws.s3","GetObject",{["httpChecksum"]:"-",["http"]:["GET","/{Key+}?x-id=GetObject",200]},()=>WK,()=>QK];var hB=[9,"com.amazonaws.s3","ListObjectsV2",{["http"]:["GET","/?list-type=2",200]},()=>YK,()=>XK];var KB=[9,"com.amazonaws.s3","PutObject",{["httpChecksum"]:"-",["http"]:["PUT","/{Key+}?x-id=PutObject",200]},()=>xK,()=>SK];class M3 extends xB.Command.classBuilder().ep({...j2,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(u,D,B,A){return[SB.getEndpointPlugin(B,u.getEndpointParameterInstructions()),K0(B)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(XB).build(){}var RB={name:"@aws-sdk/client-s3",description:"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",version:"3.1015.0",scripts:{build:"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_package_name"',"build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3",test:"yarn g:vitest run","test:browser":"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.mts","test:browser:watch":"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.mts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.mts && yarn test:browser","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.mts","test:index":"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs","test:integration":"yarn g:vitest run -c vitest.config.integ.mts","test:integration:watch":"yarn g:vitest watch -c vitest.config.integ.mts","test:watch":"yarn g:vitest watch"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.24","@aws-sdk/credential-provider-node":"^3.972.25","@aws-sdk/middleware-bucket-endpoint":"^3.972.8","@aws-sdk/middleware-expect-continue":"^3.972.8","@aws-sdk/middleware-flexible-checksums":"^3.974.4","@aws-sdk/middleware-host-header":"^3.972.8","@aws-sdk/middleware-location-constraint":"^3.972.8","@aws-sdk/middleware-logger":"^3.972.8","@aws-sdk/middleware-recursion-detection":"^3.972.8","@aws-sdk/middleware-sdk-s3":"^3.972.24","@aws-sdk/middleware-ssec":"^3.972.8","@aws-sdk/middleware-user-agent":"^3.972.25","@aws-sdk/region-config-resolver":"^3.972.9","@aws-sdk/signature-v4-multi-region":"^3.996.12","@aws-sdk/types":"^3.973.6","@aws-sdk/util-endpoints":"^3.996.5","@aws-sdk/util-user-agent-browser":"^3.972.8","@aws-sdk/util-user-agent-node":"^3.973.11","@smithy/config-resolver":"^4.4.13","@smithy/core":"^3.23.12","@smithy/eventstream-serde-browser":"^4.2.12","@smithy/eventstream-serde-config-resolver":"^4.3.12","@smithy/eventstream-serde-node":"^4.2.12","@smithy/fetch-http-handler":"^5.3.15","@smithy/hash-blob-browser":"^4.2.13","@smithy/hash-node":"^4.2.12","@smithy/hash-stream-node":"^4.2.12","@smithy/invalid-dependency":"^4.2.12","@smithy/md5-js":"^4.2.12","@smithy/middleware-content-length":"^4.2.12","@smithy/middleware-endpoint":"^4.4.27","@smithy/middleware-retry":"^4.4.44","@smithy/middleware-serde":"^4.2.15","@smithy/middleware-stack":"^4.2.12","@smithy/node-config-provider":"^4.3.12","@smithy/node-http-handler":"^4.5.0","@smithy/protocol-http":"^5.3.12","@smithy/smithy-client":"^4.12.7","@smithy/types":"^4.13.1","@smithy/url-parser":"^4.2.12","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/util-body-length-node":"^4.2.3","@smithy/util-defaults-mode-browser":"^4.3.43","@smithy/util-defaults-mode-node":"^4.2.47","@smithy/util-endpoints":"^3.3.3","@smithy/util-middleware":"^4.2.12","@smithy/util-retry":"^4.2.12","@smithy/util-stream":"^4.5.20","@smithy/util-utf8":"^4.2.2","@smithy/util-waiter":"^4.2.13",tslib:"^2.6.2"},devDependencies:{"@aws-sdk/signature-v4-crt":"3.1015.0","@smithy/snapshot-testing":"^2.0.3","@tsconfig/node20":"20.1.8","@types/node":"^20.14.8",concurrently:"7.0.0","downlevel-dts":"0.10.1",premove:"4.0.0",typescript:"~5.8.3",vitest:"^4.0.17"},engines:{node:">=20.0.0"},typesVersions:{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-s3"}};var E0=X(Y0(),1);var H1=X(UB(),1),PB=X(EK(),1);var R1=X(UB(),1),HB="AWS_EC2_METADATA_DISABLED",cB=async(u)=>{let{ENV_CMDS_FULL_URI:D,ENV_CMDS_RELATIVE_URI:B,fromContainerMetadata:A,fromInstanceMetadata:w}=await import("./chunk-6g2bsmwf.js");if(process.env[B]||process.env[D]){u.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:F}=await import("./chunk-gj2setdy.js");return R1.chain(F(u),A(u))}if(process.env[HB]&&process.env[HB]!=="false")return async()=>{throw new R1.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:u.logger})};return u.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),w(u)};function MB(u,D){let B=LK(u),A,w,F,N=async(G)=>{if(G?.forceRefresh)return await B(G);if(F?.expiration){if(F?.expiration?.getTime()<Date.now())F=void 0}if(A)await A;else if(!F||D?.(F))if(F){if(!w)w=B(G).then(($)=>{F=$}).finally(()=>{w=void 0})}else return A=B(G).then(($)=>{F=$}).finally(()=>{A=void 0}),N(G);return F};return N}var LK=(u)=>async(D)=>{let B;for(let A of u)try{return await A(D)}catch(w){if(B=w,w?.tryNextLink)continue;throw w}throw B};var LB=!1,kB=(u={})=>MB([async()=>{if(u.profile??process.env[PB.ENV_PROFILE]){if(process.env[EB]&&process.env[OB]){if(!LB)(u.logger?.warn&&u.logger?.constructor?.name!=="NoOpLogger"?u.logger.warn.bind(u.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
5
+ Multiple credential sources detected:
6
+ Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
7
+ This SDK will proceed with the AWS_PROFILE value.
8
+
9
+ However, a future version may change this behavior to prefer the ENV static credentials.
10
+ Please ensure that your environment only sets either the AWS_PROFILE or the
11
+ AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
12
+ `),LB=!0}throw new H1.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:u.logger,tryNextLink:!0})}return u.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),CB(u)()},async(D)=>{u.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:B,ssoAccountId:A,ssoRegion:w,ssoRoleName:F,ssoSession:N}=u;if(!B&&!A&&!w&&!F&&!N)throw new H1.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:u.logger});let{fromSSO:G}=await import("./chunk-513mekrd.js");return G(u)(D)},async(D)=>{u.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:B}=await import("./chunk-fjqa7s60.js");return B(u)(D)},async(D)=>{u.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:B}=await import("./chunk-mnvzewf8.js");return B(u)(D)},async(D)=>{u.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:B}=await import("./chunk-1gd1fyth.js");return B(u)(D)},async()=>{return u.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await cB(u))()},async()=>{throw new H1.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:u.logger})}],OK);var OK=(u)=>u?.expiration!==void 0&&u.expiration.getTime()-Date.now()<300000;var M0=X(H5(),1),CK="AWS_S3_USE_ARN_REGION",PK="s3_use_arn_region",yB={environmentVariableSelector:(u)=>M0.booleanSelector(u,CK,M0.SelectorType.ENV),configFileSelector:(u)=>M0.booleanSelector(u,PK,M0.SelectorType.CONFIG),default:void 0};var O1=X(aK(),1),i2=X(sB(),1);var d2=X(TB(),1);var IB=X(TB(),1);class L0{bytes;constructor(u){if(this.bytes=u,u.byteLength!==8)throw Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(u){if(u>9223372036854776000||u<-9223372036854776000)throw Error(`${u} is too large (or, if negative, too small) to represent as an Int64`);let D=new Uint8Array(8);for(let B=7,A=Math.abs(Math.round(u));B>-1&&A>0;B--,A/=256)D[B]=A;if(u<0)VB(D);return new L0(D)}valueOf(){let u=this.bytes.slice(0),D=u[0]&128;if(D)VB(u);return parseInt(IB.toHex(u),16)*(D?-1:1)}toString(){return String(this.valueOf())}}function VB(u){for(let D=0;D<8;D++)u[D]^=255;for(let D=7;D>-1;D--)if(u[D]++,u[D]!==0)break}class L3{toUtf8;fromUtf8;constructor(u,D){this.toUtf8=u,this.fromUtf8=D}format(u){let D=[];for(let w of Object.keys(u)){let F=this.fromUtf8(w);D.push(Uint8Array.from([F.byteLength]),F,this.formatHeaderValue(u[w]))}let B=new Uint8Array(D.reduce((w,F)=>w+F.byteLength,0)),A=0;for(let w of D)B.set(w,A),A+=w.byteLength;return B}formatHeaderValue(u){switch(u.type){case"boolean":return Uint8Array.from([u.value?0:1]);case"byte":return Uint8Array.from([2,u.value]);case"short":let D=new DataView(new ArrayBuffer(3));return D.setUint8(0,3),D.setInt16(1,u.value,!1),new Uint8Array(D.buffer);case"integer":let B=new DataView(new ArrayBuffer(5));return B.setUint8(0,4),B.setInt32(1,u.value,!1),new Uint8Array(B.buffer);case"long":let A=new Uint8Array(9);return A[0]=5,A.set(u.value.bytes,1),A;case"binary":let w=new DataView(new ArrayBuffer(3+u.value.byteLength));w.setUint8(0,6),w.setUint16(1,u.value.byteLength,!1);let F=new Uint8Array(w.buffer);return F.set(u.value,3),F;case"string":let N=this.fromUtf8(u.value),G=new DataView(new ArrayBuffer(3+N.byteLength));G.setUint8(0,7),G.setUint16(1,N.byteLength,!1);let $=new Uint8Array(G.buffer);return $.set(N,3),$;case"timestamp":let z=new Uint8Array(9);return z[0]=8,z.set(L0.fromNumber(u.value.valueOf()).bytes,1),z;case"uuid":if(!_K.test(u.value))throw Error(`Invalid UUID received: ${u.value}`);let Q=new Uint8Array(17);return Q[0]=9,Q.set(d2.fromHex(u.value.replace(/\-/g,"")),1),Q}}parse(u){let D={},B=0;while(B<u.byteLength){let A=u.getUint8(B++),w=this.toUtf8(new Uint8Array(u.buffer,u.byteOffset+B,A));switch(B+=A,u.getUint8(B++)){case 0:D[w]={type:mB,value:!0};break;case 1:D[w]={type:mB,value:!1};break;case 2:D[w]={type:kK,value:u.getInt8(B++)};break;case 3:D[w]={type:yK,value:u.getInt16(B,!1)},B+=2;break;case 4:D[w]={type:VK,value:u.getInt32(B,!1)},B+=4;break;case 5:D[w]={type:TK,value:new L0(new Uint8Array(u.buffer,u.byteOffset+B,8))},B+=8;break;case 6:let F=u.getUint16(B,!1);B+=2,D[w]={type:IK,value:new Uint8Array(u.buffer,u.byteOffset+B,F)},B+=F;break;case 7:let N=u.getUint16(B,!1);B+=2,D[w]={type:qK,value:this.toUtf8(new Uint8Array(u.buffer,u.byteOffset+B,N))},B+=N;break;case 8:D[w]={type:mK,value:new Date(new L0(new Uint8Array(u.buffer,u.byteOffset+B,8)).valueOf())},B+=8;break;case 9:let G=new Uint8Array(u.buffer,u.byteOffset+B,16);B+=16,D[w]={type:gK,value:`${d2.toHex(G.subarray(0,4))}-${d2.toHex(G.subarray(4,6))}-${d2.toHex(G.subarray(6,8))}-${d2.toHex(G.subarray(8,10))}-${d2.toHex(G.subarray(10))}`};break;default:throw Error("Unrecognized header type tag")}}return D}}var qB;(function(u){u[u.boolTrue=0]="boolTrue",u[u.boolFalse=1]="boolFalse",u[u.byte=2]="byte",u[u.short=3]="short",u[u.integer=4]="integer",u[u.long=5]="long",u[u.byteArray=6]="byteArray",u[u.string=7]="string",u[u.timestamp=8]="timestamp",u[u.uuid=9]="uuid"})(qB||(qB={}));var mB="boolean",kK="byte",yK="short",VK="integer",TK="long",IK="binary",qK="string",mK="timestamp",gK="uuid",_K=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;var gB=4,r2=gB*2,G0=4,fK=r2+G0*2;function _B({byteLength:u,byteOffset:D,buffer:B}){if(u<fK)throw Error("Provided message too short to accommodate event stream message overhead");let A=new DataView(B,D,u),w=A.getUint32(0,!1);if(u!==w)throw Error("Reported message length does not match received message length");let F=A.getUint32(gB,!1),N=A.getUint32(r2,!1),G=A.getUint32(u-G0,!1),$=new N0().update(new Uint8Array(B,D,r2));if(N!==$.digest())throw Error(`The prelude checksum specified in the message (${N}) does not match the calculated CRC32 checksum (${$.digest()})`);if($.update(new Uint8Array(B,D+r2,u-(r2+G0))),G!==$.digest())throw Error(`The message checksum (${$.digest()}) did not match the expected value of ${G}`);return{headers:new DataView(B,D+r2+G0,F),body:new Uint8Array(B,D+r2+G0+F,w-F-(r2+G0+G0))}}class E3{headerMarshaller;messageBuffer;isEndOfStream;constructor(u,D){this.headerMarshaller=new L3(u,D),this.messageBuffer=[],this.isEndOfStream=!1}feed(u){this.messageBuffer.push(this.decode(u))}endOfStream(){this.isEndOfStream=!0}getMessage(){let u=this.messageBuffer.pop(),D=this.isEndOfStream;return{getMessage(){return u},isEndOfStream(){return D}}}getAvailableMessages(){let u=this.messageBuffer;this.messageBuffer=[];let D=this.isEndOfStream;return{getMessages(){return u},isEndOfStream(){return D}}}encode({headers:u,body:D}){let B=this.headerMarshaller.format(u),A=B.byteLength+D.byteLength+16,w=new Uint8Array(A),F=new DataView(w.buffer,w.byteOffset,w.byteLength),N=new N0;return F.setUint32(0,A,!1),F.setUint32(4,B.byteLength,!1),F.setUint32(8,N.update(w.subarray(0,8)).digest(),!1),w.set(B,12),w.set(D,B.byteLength+12),F.setUint32(A-4,N.update(w.subarray(8,A-4)).digest(),!1),w}decode(u){let{headers:D,body:B}=_B(u);return{headers:this.headerMarshaller.parse(D),body:B}}formatHeaders(u){return this.headerMarshaller.format(u)}}class O3{options;constructor(u){this.options=u}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let u of this.options.inputStream)yield this.options.decoder.decode(u)}}class C3{options;constructor(u){this.options=u}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let u of this.options.messageStream)yield this.options.encoder.encode(u);if(this.options.includeEndFrame)yield new Uint8Array(0)}}class P3{options;constructor(u){this.options=u}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let u of this.options.messageStream){let D=await this.options.deserializer(u);if(D===void 0)continue;yield D}}}class k3{options;constructor(u){this.options=u}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let u of this.options.inputStream)yield this.options.serializer(u)}}function fB(u){let D=0,B=0,A=null,w=null,F=(G)=>{if(typeof G!=="number")throw Error("Attempted to allocate an event message where size was not a number: "+G);D=G,B=4,A=new Uint8Array(G),new DataView(A.buffer).setUint32(0,G,!1)},N=async function*(){let G=u[Symbol.asyncIterator]();while(!0){let{value:$,done:z}=await G.next();if(z){if(!D)return;else if(D===B)yield A;else throw Error("Truncated event message received.");return}let Q=$.length,Z=0;while(Z<Q){if(!A){let W=Q-Z;if(!w)w=new Uint8Array(4);let Y=Math.min(4-B,W);if(w.set($.slice(Z,Z+Y),B),B+=Y,Z+=Y,B<4)break;F(new DataView(w.buffer).getUint32(0,!1)),w=null}let J=Math.min(D-B,Q-Z);if(A.set($.slice(Z,Z+J),B),B+=J,Z+=J,D&&D===B)yield A,A=null,D=0,B=0}}};return{[Symbol.asyncIterator]:N}}function bB(u,D){return async function(B){let{value:A}=B.headers[":message-type"];if(A==="error"){let w=Error(B.headers[":error-message"].value||"UnknownError");throw w.name=B.headers[":error-code"].value,w}else if(A==="exception"){let w=B.headers[":exception-type"].value,F={[w]:B},N=await u(F);if(N.$unknown){let G=Error(D(B.body));throw G.name=w,G}throw N[w]}else if(A==="event"){let w={[B.headers[":event-type"].value]:B},F=await u(w);if(F.$unknown)return;return F}else throw Error(`Unrecognizable event type: ${B.headers[":event-type"].value}`)}}class y3{eventStreamCodec;utfEncoder;constructor({utf8Encoder:u,utf8Decoder:D}){this.eventStreamCodec=new E3(u,D),this.utfEncoder=u}deserialize(u,D){let B=fB(u);return new P3({messageStream:new O3({inputStream:B,decoder:this.eventStreamCodec}),deserializer:bB(D,this.utfEncoder)})}serialize(u,D){return new C3({messageStream:new k3({inputStream:u,serializer:D}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}import{Readable as bK}from"stream";async function*jB(u){let D=!1,B=!1,A=[];u.on("error",(w)=>{if(!D)D=!0;if(w)throw w}),u.on("data",(w)=>{A.push(w)}),u.on("end",()=>{D=!0});while(!B){let w=await new Promise((F)=>setTimeout(()=>F(A.shift()),0));if(w)yield w;B=D&&A.length===0}}class V3{universalMarshaller;constructor({utf8Encoder:u,utf8Decoder:D}){this.universalMarshaller=new y3({utf8Decoder:D,utf8Encoder:u})}deserialize(u,D){let B=typeof u[Symbol.asyncIterator]==="function"?u:jB(u);return this.universalMarshaller.deserialize(B,D)}serialize(u,D){return bK.from(this.universalMarshaller.serialize(u,D))}}var lB=(u)=>new V3(u);var E1=X(sK(),1);var dB=X(iD(),1);import{Writable as jK}from"stream";class T3 extends jK{hash;constructor(u,D){super(D);this.hash=u}_write(u,D,B){try{this.hash.update(dB.toUint8Array(u))}catch(A){return B(A)}B()}}var rB=(u,D)=>{if(D.readableFlowing!==null)throw Error("Unable to calculate hash for flowing readable stream");let B=new u,A=new T3(B);return D.pipe(A),new Promise((w,F)=>{D.on("error",(N)=>{A.end(),F(N)}),A.on("error",F),A.on("finish",()=>{B.digest().then(w).catch(F)})})};var C1=X(tB(),1),Y2=X(pK(),1),P1=X(iK(),1),k1=X(k2(),1),oB=X(tK(),1),eB=X(oK(),1),u6=X(nK(),1);var U1=X(Y0(),1),iB=X(rK(),1);var nB=X(k2(),1),pB=X(dK(),1),c1=X(lK(),1),M1=X(iu(),1),L1=X(iD(),1);var aB=(u)=>{return{apiVersion:"2006-03-01",base64Decoder:u?.base64Decoder??c1.fromBase64,base64Encoder:u?.base64Encoder??c1.toBase64,disableHostPrefix:u?.disableHostPrefix??!1,endpointProvider:u?.endpointProvider??A1,extensions:u?.extensions??[],getAwsChunkedEncodingStream:u?.getAwsChunkedEncodingStream??M1.getAwsChunkedEncodingStream,httpAuthSchemeProvider:u?.httpAuthSchemeProvider??FB,httpAuthSchemes:u?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(D)=>D.getIdentityProvider("aws.auth#sigv4"),signer:new U1.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(D)=>D.getIdentityProvider("aws.auth#sigv4a"),signer:new U1.AwsSdkSigV4ASigner}],logger:u?.logger??new nB.NoOpLogger,protocol:u?.protocol??iB.AwsRestXmlProtocol,protocolSettings:u?.protocolSettings??{defaultNamespace:"com.amazonaws.s3",errorTypeRegistries:JB,xmlNamespace:"http://s3.amazonaws.com/doc/2006-03-01/",version:"2006-03-01",serviceTarget:"AmazonS3"},sdkStreamMixin:u?.sdkStreamMixin??M1.sdkStreamMixin,serviceId:u?.serviceId??"S3",signerConstructor:u?.signerConstructor??zu,signingEscapePath:u?.signingEscapePath??!1,urlParser:u?.urlParser??pB.parseUrl,useArnRegion:u?.useArnRegion??void 0,utf8Decoder:u?.utf8Decoder??L1.fromUtf8,utf8Encoder:u?.utf8Encoder??L1.toUtf8}};var D6=(u)=>{k1.emitWarningIfUnsupportedVersion(process.version);let D=eB.resolveDefaultsModeConfig(u),B=()=>D().then(k1.loadConfigsForDefaultMode),A=aB(u);E0.emitWarningIfUnsupportedVersion(process.version);let w={profile:u?.profile,logger:A.logger};return{...A,...u,runtime:"node",defaultsMode:D,authSchemePreference:u?.authSchemePreference??Y2.loadConfig(E0.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,w),bodyLengthChecker:u?.bodyLengthChecker??oB.calculateBodyLength,credentialDefaultProvider:u?.credentialDefaultProvider??kB,defaultUserAgentProvider:u?.defaultUserAgentProvider??O1.createDefaultUserAgentProvider({serviceId:A.serviceId,clientVersion:RB.version}),disableS3ExpressSessionAuth:u?.disableS3ExpressSessionAuth??Y2.loadConfig(aD,w),eventStreamSerdeProvider:u?.eventStreamSerdeProvider??lB,maxAttempts:u?.maxAttempts??Y2.loadConfig(C1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,u),md5:u?.md5??E1.Hash.bind(null,"md5"),region:u?.region??Y2.loadConfig(i2.NODE_REGION_CONFIG_OPTIONS,{...i2.NODE_REGION_CONFIG_FILE_OPTIONS,...w}),requestChecksumCalculation:u?.requestChecksumCalculation??Y2.loadConfig(f4,w),requestHandler:P1.NodeHttpHandler.create(u?.requestHandler??B),responseChecksumValidation:u?.responseChecksumValidation??Y2.loadConfig(b4,w),retryMode:u?.retryMode??Y2.loadConfig({...C1.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await B()).retryMode||u6.DEFAULT_RETRY_MODE},u),sha1:u?.sha1??E1.Hash.bind(null,"sha1"),sha256:u?.sha256??E1.Hash.bind(null,"sha256"),sigv4aSigningRegionSet:u?.sigv4aSigningRegionSet??Y2.loadConfig(E0.NODE_SIGV4A_CONFIG_OPTIONS,w),streamCollector:u?.streamCollector??P1.streamCollector,streamHasher:u?.streamHasher??rB,useArnRegion:u?.useArnRegion??Y2.loadConfig(yB,w),useDualstackEndpoint:u?.useDualstackEndpoint??Y2.loadConfig(i2.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,w),useFipsEndpoint:u?.useFipsEndpoint??Y2.loadConfig(i2.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,w),userAgentAppId:u?.userAgentAppId??Y2.loadConfig(O1.NODE_APP_ID_CONFIG_OPTIONS,w)}};var y1=X(eK(),1),V1=X(m2(),1),T1=X(k2(),1);var B6=(u)=>{let{httpAuthSchemes:D,httpAuthSchemeProvider:B,credentials:A}=u;return{setHttpAuthScheme(w){let F=D.findIndex((N)=>N.schemeId===w.schemeId);if(F===-1)D.push(w);else D.splice(F,1,w)},httpAuthSchemes(){return D},setHttpAuthSchemeProvider(w){B=w},httpAuthSchemeProvider(){return B},setCredentials(w){A=w},credentials(){return A}}},A6=(u)=>{return{httpAuthSchemes:u.httpAuthSchemes(),httpAuthSchemeProvider:u.httpAuthSchemeProvider(),credentials:u.credentials()}};var w6=(u,D)=>{let B=Object.assign(y1.getAwsRegionExtensionConfiguration(u),T1.getDefaultExtensionConfiguration(u),V1.getHttpHandlerExtensionConfiguration(u),B6(u));return D.forEach((A)=>A.configure(B)),Object.assign(u,y1.resolveAwsRegionExtensionConfiguration(B),T1.resolveDefaultRuntimeConfig(B),V1.resolveHttpHandlerRuntimeConfig(B),A6(B))};class I3 extends Z6.Client{config;constructor(...[u]){let D=D6(u||{});super(D);this.initConfig=D;let B=GB(D),A=q1.resolveUserAgentConfig(B),w=J5(A),F=m1.resolveRetryConfig(w),N=G6.resolveRegionConfig(F),G=I1.resolveHostHeaderConfig(N),$=z6.resolveEndpointConfig(G),z=i5($),Q=NB(z),Z=f5(Q,{session:[()=>this,M3]}),J=w6(Z,u?.extensions||[]);this.config=J,this.middlewareStack.use(v6.getSchemaSerdePlugin(this.config)),this.middlewareStack.use(q1.getUserAgentPlugin(this.config)),this.middlewareStack.use(m1.getRetryPlugin(this.config)),this.middlewareStack.use($6.getContentLengthPlugin(this.config)),this.middlewareStack.use(I1.getHostHeaderPlugin(this.config)),this.middlewareStack.use(F6.getLoggerPlugin(this.config)),this.middlewareStack.use(N6.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(O0.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:BB,identityProviderConfigProvider:async(W)=>new O0.DefaultIdentityProviderConfig({"aws.auth#sigv4":W.credentials,"aws.auth#sigv4a":W.credentials})})),this.middlewareStack.use(O0.getHttpSigningPlugin(this.config)),this.middlewareStack.use(r5(this.config)),this.middlewareStack.use(g4(this.config)),this.middlewareStack.use(K5(this.config)),this.middlewareStack.use(sD(this.config)),this.middlewareStack.use(tD(this.config))}destroy(){super.destroy()}}function FS(u){return(D)=>async(B)=>{let A={...B.input},w=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(let F of w){let N=A[F.target];if(N){let G;if(typeof N==="string")if(GS(N,u))G=u.base64Decoder(N);else G=u.utf8Decoder(N),A[F.target]=u.base64Encoder(G);else G=ArrayBuffer.isView(N)?new Uint8Array(N.buffer,N.byteOffset,N.byteLength):new Uint8Array(N),A[F.target]=u.base64Encoder(G);let $=new u.md5;$.update(G),A[F.hash]=u.base64Encoder(await $.digest())}}return D({...B,input:A})}}var NS={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},g1=(u)=>({applyToStack:(D)=>{D.add(FS(u),NS)}});function GS(u,D){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(u))return!1;try{return D.base64Decoder(u).length===32}catch{return!1}}var J6=X(U0(),1),Q6=X(k2(),1);class q3 extends Q6.Command.classBuilder().ep({...j2,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(u,D,B,A){return[J6.getEndpointPlugin(B,u.getEndpointParameterInstructions()),pu(B,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),g1(B),R5(B)]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(YB).build(){}var W6=X(U0(),1),X6=X(k2(),1);class m3 extends X6.Command.classBuilder().ep({...j2,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(u,D,B,A){return[W6.getEndpointPlugin(B,u.getEndpointParameterInstructions()),K0(B)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").sc(hB).build(){}var Y6=X(U0(),1),h6=X(k2(),1);class g3 extends h6.Command.classBuilder().ep({...j2,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(u,D,B,A){return[Y6.getEndpointPlugin(B,u.getEndpointParameterInstructions()),pu(B,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),X5(B),K0(B),g1(B)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").sc(KB).build(){}import{Buffer as K6}from"buffer";class S6 extends Q0{client;constructor(...u){super();this.client=new I3(...u)}async put(u){let D,B,A,w=process.env.BUCKET_NAME;if(u instanceof Blob)D=u,A=`${Bun.randomUUIDv7()}.${u.type.split("/")[1].split(";")[0]}`,B=u.type;else D=u.body,A=u.name,w=u.bucket??w,B=u.contentType;B=D instanceof Blob||D instanceof File?D.type:void 0;let F=D instanceof K6?D:D instanceof Blob||D instanceof File?K6.from(await D.arrayBuffer()):"";return await this.client.send(new g3({Bucket:w,Key:A,Body:F,ContentType:B})),A}async list(u){return await this.client.send(new m3({Bucket:process.env.BUCKET_NAME,Prefix:u}))}async fetch(u){let D=process.env.BUCKET_NAME,B;if(typeof u==="string")B=u;else D=u.bucket??D,B=u.name;if(!B)throw Error("Object name has to be specified");let A=await this.client.send(new q3({Bucket:D,Key:B}));return new Response(A.Body.transformToWebStream(),{headers:{"Content-Type":A.ContentType,"Content-Length":A.ContentLength.toString(),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":A.LastModified?.toUTCString()||"",ETag:A.ETag||""}})}}class _1{}class f1 extends _1{requests=new Map;consume(u,D){if(!this.requests.has(u))this.requests.set(u,{date:Date.now(),count:1});else{let B=this.requests.get(u),A=Date.now();if(A-B.date>=60000)this.requests.set(u,{date:A,count:1});else this.requests.set(u,{date:B.date,count:B.count+1})}return this.requests.get(u).count}}class x6 extends j{driver=new f1;boot(){}}var n2=new TextEncoder;var Ku=new Uint8Array(256);for(let u=0;u<64;u++)Ku["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(u)]=u;function b1(u){let D=Math.ceil(u.length/4)*3,B=u.length,A=0;if(u.length%4===3)D--;else if(u.length%4===2)D-=2;else if(u[u.length-1]==="="){if(D--,u[u.length-2]==="=")D--}let w=new ArrayBuffer(D),F=new Uint8Array(w);for(let N=0;N<B;N+=4){let G=Ku[u.charCodeAt(N)],$=Ku[u.charCodeAt(N+1)],z=Ku[u.charCodeAt(N+2)],Q=Ku[u.charCodeAt(N+3)];F[A++]=G<<2|$>>4,F[A++]=($&15)<<4|z>>2,F[A++]=(z&3)<<6|Q&63}return w}function C0(u){u=u||"utf8";let D;try{D=new TextDecoder(u)}catch(B){D=new TextDecoder("windows-1252")}return D}async function p2(u){if("arrayBuffer"in u)return await u.arrayBuffer();let D=new FileReader;return new Promise((B,A)=>{D.onload=function(w){B(w.target.result)},D.onerror=function(w){A(D.error)},D.readAsArrayBuffer(u)})}function R6(u){if(u>=48&&u<=57||u>=97&&u<=102||u>=65&&u<=70)return String.fromCharCode(u);return!1}function vS(u,D,B){let A=u.indexOf("*");if(A>=0)u=u.substr(0,A);D=D.toUpperCase();let w;if(D==="Q"){B=B.replace(/=\s+([0-9a-fA-F])/g,"=$1").replace(/[_\s]/g," ");let F=n2.encode(B),N=[];for(let $=0,z=F.length;$<z;$++){let Q=F[$];if($<=z-2&&Q===61){let Z=R6(F[$+1]),J=R6(F[$+2]);if(Z&&J){let W=parseInt(Z+J,16);N.push(W),$+=2;continue}}N.push(Q)}w=new ArrayBuffer(N.length);let G=new DataView(w);for(let $=0,z=N.length;$<z;$++)G.setUint8($,N[$])}else if(D==="B")w=b1(B.replace(/[^a-zA-Z0-9\+\/=]+/g,""));else w=n2.encode(B);return C0(u).decode(w)}function v0(u){let D=!0,B=!1;while(!B){let A=(u||"").toString().replace(/(=\?([^?]+)\?[Bb]\?([^?]*)\?=)\s*(?==\?([^?]+)\?[Bb]\?[^?]*\?=)/g,(w,F,N,G,$)=>{if(!D)return w;if(N===$&&G.length%4===0&&!/=$/.test(G))return F+"__\x00JOIN\x00__";return w}).replace(/(=\?([^?]+)\?[Qq]\?[^?]*\?=)\s*(?==\?([^?]+)\?[Qq]\?[^?]*\?=)/g,(w,F,N,G)=>{if(!D)return w;if(N===G)return F+"__\x00JOIN\x00__";return w}).replace(/(\?=)?__\x00JOIN\x00__(=\?([^?]+)\?[QqBb]\?)?/g,"").replace(/(=\?[^?]+\?[QqBb]\?[^?]*\?=)\s+(?==\?[^?]+\?[QqBb]\?[^?]*\?=)/g,"$1").replace(/=\?([\w_\-*]+)\?([QqBb])\?([^?]*)\?=/g,(w,F,N,G)=>vS(F,N,G));if(D&&A.indexOf("\uFFFD")>=0)D=!1;else return A}}function $S(u,D){D=D||"utf-8";let B=[];for(let F=0;F<u.length;F++){let N=u.charAt(F);if(N==="%"&&/^[a-f0-9]{2}/i.test(u.substr(F+1,2))){let G=u.substr(F+1,2);F+=2,B.push(parseInt(G,16))}else if(N.charCodeAt(0)>126){N=n2.encode(N);for(let G=0;G<N.length;G++)B.push(N[G])}else B.push(N.charCodeAt(0))}let A=new ArrayBuffer(B.length),w=new DataView(A);for(let F=0,N=B.length;F<N;F++)w.setUint8(F,B[F]);return C0(D).decode(A)}function H6(u){let D=new Map;Object.keys(u.params).forEach((B)=>{let A=B.match(/\*((\d+)\*?)?$/);if(!A)return;let w=B.substr(0,A.index).toLowerCase(),F=Number(A[2])||0,N;if(!D.has(w))N={charset:!1,values:[]},D.set(w,N);else N=D.get(w);let G=u.params[B];if(F===0&&A[0].charAt(A[0].length-1)==="*"&&(A=G.match(/^([^']*)'[^']*'(.*)$/)))N.charset=A[1]||"utf-8",G=A[2];N.values.push({nr:F,value:G}),delete u.params[B]}),D.forEach((B,A)=>{u.params[A]=$S(B.values.sort((w,F)=>w.nr-F.nr).map((w)=>w.value).join(""),B.charset)})}class j1{constructor(){this.chunks=[]}update(u){this.chunks.push(u),this.chunks.push(`
13
+ `)}finalize(){return p2(new Blob(this.chunks,{type:"application/octet-stream"}))}}class l1{constructor(u){u=u||{},this.decoder=u.decoder||new TextDecoder,this.maxChunkSize=102400,this.chunks=[],this.remainder=""}update(u){let D=this.decoder.decode(u);if(D=D.replace(/[^a-zA-Z0-9+\/]+/g,""),this.remainder+=D,this.remainder.length>=this.maxChunkSize){let B=Math.floor(this.remainder.length/4)*4,A;if(B===this.remainder.length)A=this.remainder,this.remainder="";else A=this.remainder.substr(0,B),this.remainder=this.remainder.substr(B);if(A.length)this.chunks.push(b1(A))}}finalize(){if(this.remainder&&!/^=+$/.test(this.remainder))this.chunks.push(b1(this.remainder));return p2(new Blob(this.chunks,{type:"application/octet-stream"}))}}var U6=/^=[a-f0-9]{2}$/i,zS=/(?==[a-f0-9]{2})/i,ZS=/=\r?\n/g,JS=/=[a-fA-F0-9]?$/;class d1{constructor(u){u=u||{},this.decoder=u.decoder||new TextDecoder,this.maxChunkSize=102400,this.remainder="",this.chunks=[]}decodeQPBytes(u){let D=new ArrayBuffer(u.length),B=new DataView(D);for(let A=0,w=u.length;A<w;A++)B.setUint8(A,parseInt(u[A],16));return D}decodeChunks(u){u=u.replace(ZS,"");let D=u.split(zS),B=[];for(let A of D){if(A.charAt(0)!=="="){if(B.length)this.chunks.push(this.decodeQPBytes(B)),B=[];this.chunks.push(A);continue}if(A.length===3){if(U6.test(A))B.push(A.substr(1));else{if(B.length)this.chunks.push(this.decodeQPBytes(B)),B=[];this.chunks.push(A)}continue}if(A.length>3){let w=A.substr(0,3);if(U6.test(w))B.push(A.substr(1,2)),this.chunks.push(this.decodeQPBytes(B)),B=[],A=A.substr(3),this.chunks.push(A);else{if(B.length)this.chunks.push(this.decodeQPBytes(B)),B=[];this.chunks.push(A)}}}if(B.length)this.chunks.push(this.decodeQPBytes(B))}update(u){let D=this.decoder.decode(u)+`
14
+ `;if(D=this.remainder+D,D.length<this.maxChunkSize){this.remainder=D;return}this.remainder="";let B=D.match(JS);if(B){if(B.index===0){this.remainder=D;return}this.remainder=D.substr(B.index),D=D.substr(0,B.index)}this.decodeChunks(D)}finalize(){if(this.remainder.length)this.decodeChunks(this.remainder),this.remainder="";return p2(new Blob(this.chunks,{type:"application/octet-stream"}))}}var QS=C0();class Su{constructor(u){if(this.options=u||{},this.postalMime=this.options.postalMime,this.root=!!this.options.parentNode,this.childNodes=[],this.options.parentNode){if(this.parentNode=this.options.parentNode,this.depth=this.parentNode.depth+1,this.depth>this.options.maxNestingDepth)throw Error(`Maximum MIME nesting depth of ${this.options.maxNestingDepth} levels exceeded`);this.options.parentNode.childNodes.push(this)}else this.depth=0;this.state="header",this.headerLines=[],this.headerSize=0;let B=(this.options.parentMultipartType||null)==="digest"?"message/rfc822":"text/plain";this.contentType={value:B,default:!0},this.contentTransferEncoding={value:"8bit"},this.contentDisposition={value:""},this.headers=[],this.contentDecoder=!1}setupContentDecoder(u){if(/base64/i.test(u))this.contentDecoder=new l1;else if(/quoted-printable/i.test(u))this.contentDecoder=new d1({decoder:C0(this.contentType.parsed.params.charset)});else this.contentDecoder=new j1}async finalize(){if(this.state==="finished")return;if(this.state==="header")this.processHeaders();let u=this.postalMime.boundaries;for(let D=u.length-1;D>=0;D--)if(u[D].node===this){u.splice(D,1);break}await this.finalizeChildNodes(),this.content=this.contentDecoder?await this.contentDecoder.finalize():null,this.state="finished"}async finalizeChildNodes(){for(let u of this.childNodes)await u.finalize()}stripComments(u){let D="",B=0,A=!1,w=!1;for(let F=0;F<u.length;F++){let N=u.charAt(F);if(A){if(B===0)D+=N;A=!1;continue}if(N==="\\"){if(A=!0,B===0)D+=N;continue}if(N==='"'&&B===0){w=!w,D+=N;continue}if(!w){if(N==="("){B++;continue}if(N===")"&&B>0){B--;continue}}if(B===0)D+=N}return D}parseStructuredHeader(u){u=this.stripComments(u);let D={value:!1,params:{}},B=!1,A="",w="value",F=!1,N=!1,G;for(let $=0,z=u.length;$<z;$++)switch(G=u.charAt($),w){case"key":if(G==="="){B=A.trim().toLowerCase(),w="value",A="";break}A+=G;break;case"value":if(N)A+=G;else if(G==="\\"){N=!0;continue}else if(F&&G===F)F=!1;else if(!F&&G==='"')F=G;else if(!F&&G===";"){if(B===!1)D.value=A.trim();else D.params[B]=A.trim();w="key",A=""}else A+=G;N=!1;break}if(A=A.trim(),w==="value")if(B===!1)D.value=A;else D.params[B]=A;else if(A)D.params[A.toLowerCase()]="";if(D.value)D.value=D.value.toLowerCase();return H6(D),D}decodeFlowedText(u,D){return u.split(/\r?\n/).reduce((B,A)=>{if(B.endsWith(" ")&&B!=="-- "&&!B.endsWith(`
15
+ -- `))if(D)return B.slice(0,-1)+A;else return B+A;else return B+`
16
+ `+A}).replace(/^ /gm,"")}getTextContent(){if(!this.content)return"";let u=C0(this.contentType.parsed.params.charset).decode(this.content);if(/^flowed$/i.test(this.contentType.parsed.params.format))u=this.decodeFlowedText(u,/^yes$/i.test(this.contentType.parsed.params.delsp));return u}processHeaders(){for(let u=this.headerLines.length-1;u>=0;u--){let D=this.headerLines[u];if(u&&/^\s/.test(D))this.headerLines[u-1]+=`
17
+ `+D,this.headerLines.splice(u,1)}this.rawHeaderLines=[];for(let u=this.headerLines.length-1;u>=0;u--){let D=this.headerLines[u],B=D.indexOf(":"),A=B<0?D.trim():D.substr(0,B).trim();this.rawHeaderLines.push({key:A.toLowerCase(),line:D});let w=D.replace(/\s+/g," ");B=w.indexOf(":");let F=B<0?w.trim():w.substr(0,B).trim(),N=B<0?"":w.substr(B+1).trim();switch(this.headers.push({key:F.toLowerCase(),originalKey:F,value:N}),F.toLowerCase()){case"content-type":if(this.contentType.default)this.contentType={value:N,parsed:{}};break;case"content-transfer-encoding":this.contentTransferEncoding={value:N,parsed:{}};break;case"content-disposition":this.contentDisposition={value:N,parsed:{}};break;case"content-id":this.contentId=N;break;case"content-description":this.contentDescription=N;break}}if(this.contentType.parsed=this.parseStructuredHeader(this.contentType.value),this.contentType.multipart=/^multipart\//i.test(this.contentType.parsed.value)?this.contentType.parsed.value.substr(this.contentType.parsed.value.indexOf("/")+1):!1,this.contentType.multipart&&this.contentType.parsed.params.boundary)this.postalMime.boundaries.push({value:n2.encode(this.contentType.parsed.params.boundary),node:this});this.contentDisposition.parsed=this.parseStructuredHeader(this.contentDisposition.value),this.contentTransferEncoding.encoding=this.contentTransferEncoding.value.toLowerCase().split(/[^\w-]/).shift(),this.setupContentDecoder(this.contentTransferEncoding.encoding)}feed(u){switch(this.state){case"header":if(!u.length)return this.state="body",this.processHeaders();if(this.headerSize+=u.length,this.headerSize>this.options.maxHeadersSize)throw Error(`Maximum header size of ${this.options.maxHeadersSize} bytes exceeded`);this.headerLines.push(QS.decode(u));break;case"body":this.contentDecoder.update(u)}}}var WS={"&AElig":"\xC6","&AElig;":"\xC6","&AMP":"&","&AMP;":"&","&Aacute":"\xC1","&Aacute;":"\xC1","&Abreve;":"\u0102","&Acirc":"\xC2","&Acirc;":"\xC2","&Acy;":"\u0410","&Afr;":"\uD835\uDD04","&Agrave":"\xC0","&Agrave;":"\xC0","&Alpha;":"\u0391","&Amacr;":"\u0100","&And;":"\u2A53","&Aogon;":"\u0104","&Aopf;":"\uD835\uDD38","&ApplyFunction;":"\u2061","&Aring":"\xC5","&Aring;":"\xC5","&Ascr;":"\uD835\uDC9C","&Assign;":"\u2254","&Atilde":"\xC3","&Atilde;":"\xC3","&Auml":"\xC4","&Auml;":"\xC4","&Backslash;":"\u2216","&Barv;":"\u2AE7","&Barwed;":"\u2306","&Bcy;":"\u0411","&Because;":"\u2235","&Bernoullis;":"\u212C","&Beta;":"\u0392","&Bfr;":"\uD835\uDD05","&Bopf;":"\uD835\uDD39","&Breve;":"\u02D8","&Bscr;":"\u212C","&Bumpeq;":"\u224E","&CHcy;":"\u0427","&COPY":"\xA9","&COPY;":"\xA9","&Cacute;":"\u0106","&Cap;":"\u22D2","&CapitalDifferentialD;":"\u2145","&Cayleys;":"\u212D","&Ccaron;":"\u010C","&Ccedil":"\xC7","&Ccedil;":"\xC7","&Ccirc;":"\u0108","&Cconint;":"\u2230","&Cdot;":"\u010A","&Cedilla;":"\xB8","&CenterDot;":"\xB7","&Cfr;":"\u212D","&Chi;":"\u03A7","&CircleDot;":"\u2299","&CircleMinus;":"\u2296","&CirclePlus;":"\u2295","&CircleTimes;":"\u2297","&ClockwiseContourIntegral;":"\u2232","&CloseCurlyDoubleQuote;":"\u201D","&CloseCurlyQuote;":"\u2019","&Colon;":"\u2237","&Colone;":"\u2A74","&Congruent;":"\u2261","&Conint;":"\u222F","&ContourIntegral;":"\u222E","&Copf;":"\u2102","&Coproduct;":"\u2210","&CounterClockwiseContourIntegral;":"\u2233","&Cross;":"\u2A2F","&Cscr;":"\uD835\uDC9E","&Cup;":"\u22D3","&CupCap;":"\u224D","&DD;":"\u2145","&DDotrahd;":"\u2911","&DJcy;":"\u0402","&DScy;":"\u0405","&DZcy;":"\u040F","&Dagger;":"\u2021","&Darr;":"\u21A1","&Dashv;":"\u2AE4","&Dcaron;":"\u010E","&Dcy;":"\u0414","&Del;":"\u2207","&Delta;":"\u0394","&Dfr;":"\uD835\uDD07","&DiacriticalAcute;":"\xB4","&DiacriticalDot;":"\u02D9","&DiacriticalDoubleAcute;":"\u02DD","&DiacriticalGrave;":"`","&DiacriticalTilde;":"\u02DC","&Diamond;":"\u22C4","&DifferentialD;":"\u2146","&Dopf;":"\uD835\uDD3B","&Dot;":"\xA8","&DotDot;":"\u20DC","&DotEqual;":"\u2250","&DoubleContourIntegral;":"\u222F","&DoubleDot;":"\xA8","&DoubleDownArrow;":"\u21D3","&DoubleLeftArrow;":"\u21D0","&DoubleLeftRightArrow;":"\u21D4","&DoubleLeftTee;":"\u2AE4","&DoubleLongLeftArrow;":"\u27F8","&DoubleLongLeftRightArrow;":"\u27FA","&DoubleLongRightArrow;":"\u27F9","&DoubleRightArrow;":"\u21D2","&DoubleRightTee;":"\u22A8","&DoubleUpArrow;":"\u21D1","&DoubleUpDownArrow;":"\u21D5","&DoubleVerticalBar;":"\u2225","&DownArrow;":"\u2193","&DownArrowBar;":"\u2913","&DownArrowUpArrow;":"\u21F5","&DownBreve;":"\u0311","&DownLeftRightVector;":"\u2950","&DownLeftTeeVector;":"\u295E","&DownLeftVector;":"\u21BD","&DownLeftVectorBar;":"\u2956","&DownRightTeeVector;":"\u295F","&DownRightVector;":"\u21C1","&DownRightVectorBar;":"\u2957","&DownTee;":"\u22A4","&DownTeeArrow;":"\u21A7","&Downarrow;":"\u21D3","&Dscr;":"\uD835\uDC9F","&Dstrok;":"\u0110","&ENG;":"\u014A","&ETH":"\xD0","&ETH;":"\xD0","&Eacute":"\xC9","&Eacute;":"\xC9","&Ecaron;":"\u011A","&Ecirc":"\xCA","&Ecirc;":"\xCA","&Ecy;":"\u042D","&Edot;":"\u0116","&Efr;":"\uD835\uDD08","&Egrave":"\xC8","&Egrave;":"\xC8","&Element;":"\u2208","&Emacr;":"\u0112","&EmptySmallSquare;":"\u25FB","&EmptyVerySmallSquare;":"\u25AB","&Eogon;":"\u0118","&Eopf;":"\uD835\uDD3C","&Epsilon;":"\u0395","&Equal;":"\u2A75","&EqualTilde;":"\u2242","&Equilibrium;":"\u21CC","&Escr;":"\u2130","&Esim;":"\u2A73","&Eta;":"\u0397","&Euml":"\xCB","&Euml;":"\xCB","&Exists;":"\u2203","&ExponentialE;":"\u2147","&Fcy;":"\u0424","&Ffr;":"\uD835\uDD09","&FilledSmallSquare;":"\u25FC","&FilledVerySmallSquare;":"\u25AA","&Fopf;":"\uD835\uDD3D","&ForAll;":"\u2200","&Fouriertrf;":"\u2131","&Fscr;":"\u2131","&GJcy;":"\u0403","&GT":">","&GT;":">","&Gamma;":"\u0393","&Gammad;":"\u03DC","&Gbreve;":"\u011E","&Gcedil;":"\u0122","&Gcirc;":"\u011C","&Gcy;":"\u0413","&Gdot;":"\u0120","&Gfr;":"\uD835\uDD0A","&Gg;":"\u22D9","&Gopf;":"\uD835\uDD3E","&GreaterEqual;":"\u2265","&GreaterEqualLess;":"\u22DB","&GreaterFullEqual;":"\u2267","&GreaterGreater;":"\u2AA2","&GreaterLess;":"\u2277","&GreaterSlantEqual;":"\u2A7E","&GreaterTilde;":"\u2273","&Gscr;":"\uD835\uDCA2","&Gt;":"\u226B","&HARDcy;":"\u042A","&Hacek;":"\u02C7","&Hat;":"^","&Hcirc;":"\u0124","&Hfr;":"\u210C","&HilbertSpace;":"\u210B","&Hopf;":"\u210D","&HorizontalLine;":"\u2500","&Hscr;":"\u210B","&Hstrok;":"\u0126","&HumpDownHump;":"\u224E","&HumpEqual;":"\u224F","&IEcy;":"\u0415","&IJlig;":"\u0132","&IOcy;":"\u0401","&Iacute":"\xCD","&Iacute;":"\xCD","&Icirc":"\xCE","&Icirc;":"\xCE","&Icy;":"\u0418","&Idot;":"\u0130","&Ifr;":"\u2111","&Igrave":"\xCC","&Igrave;":"\xCC","&Im;":"\u2111","&Imacr;":"\u012A","&ImaginaryI;":"\u2148","&Implies;":"\u21D2","&Int;":"\u222C","&Integral;":"\u222B","&Intersection;":"\u22C2","&InvisibleComma;":"\u2063","&InvisibleTimes;":"\u2062","&Iogon;":"\u012E","&Iopf;":"\uD835\uDD40","&Iota;":"\u0399","&Iscr;":"\u2110","&Itilde;":"\u0128","&Iukcy;":"\u0406","&Iuml":"\xCF","&Iuml;":"\xCF","&Jcirc;":"\u0134","&Jcy;":"\u0419","&Jfr;":"\uD835\uDD0D","&Jopf;":"\uD835\uDD41","&Jscr;":"\uD835\uDCA5","&Jsercy;":"\u0408","&Jukcy;":"\u0404","&KHcy;":"\u0425","&KJcy;":"\u040C","&Kappa;":"\u039A","&Kcedil;":"\u0136","&Kcy;":"\u041A","&Kfr;":"\uD835\uDD0E","&Kopf;":"\uD835\uDD42","&Kscr;":"\uD835\uDCA6","&LJcy;":"\u0409","&LT":"<","&LT;":"<","&Lacute;":"\u0139","&Lambda;":"\u039B","&Lang;":"\u27EA","&Laplacetrf;":"\u2112","&Larr;":"\u219E","&Lcaron;":"\u013D","&Lcedil;":"\u013B","&Lcy;":"\u041B","&LeftAngleBracket;":"\u27E8","&LeftArrow;":"\u2190","&LeftArrowBar;":"\u21E4","&LeftArrowRightArrow;":"\u21C6","&LeftCeiling;":"\u2308","&LeftDoubleBracket;":"\u27E6","&LeftDownTeeVector;":"\u2961","&LeftDownVector;":"\u21C3","&LeftDownVectorBar;":"\u2959","&LeftFloor;":"\u230A","&LeftRightArrow;":"\u2194","&LeftRightVector;":"\u294E","&LeftTee;":"\u22A3","&LeftTeeArrow;":"\u21A4","&LeftTeeVector;":"\u295A","&LeftTriangle;":"\u22B2","&LeftTriangleBar;":"\u29CF","&LeftTriangleEqual;":"\u22B4","&LeftUpDownVector;":"\u2951","&LeftUpTeeVector;":"\u2960","&LeftUpVector;":"\u21BF","&LeftUpVectorBar;":"\u2958","&LeftVector;":"\u21BC","&LeftVectorBar;":"\u2952","&Leftarrow;":"\u21D0","&Leftrightarrow;":"\u21D4","&LessEqualGreater;":"\u22DA","&LessFullEqual;":"\u2266","&LessGreater;":"\u2276","&LessLess;":"\u2AA1","&LessSlantEqual;":"\u2A7D","&LessTilde;":"\u2272","&Lfr;":"\uD835\uDD0F","&Ll;":"\u22D8","&Lleftarrow;":"\u21DA","&Lmidot;":"\u013F","&LongLeftArrow;":"\u27F5","&LongLeftRightArrow;":"\u27F7","&LongRightArrow;":"\u27F6","&Longleftarrow;":"\u27F8","&Longleftrightarrow;":"\u27FA","&Longrightarrow;":"\u27F9","&Lopf;":"\uD835\uDD43","&LowerLeftArrow;":"\u2199","&LowerRightArrow;":"\u2198","&Lscr;":"\u2112","&Lsh;":"\u21B0","&Lstrok;":"\u0141","&Lt;":"\u226A","&Map;":"\u2905","&Mcy;":"\u041C","&MediumSpace;":"\u205F","&Mellintrf;":"\u2133","&Mfr;":"\uD835\uDD10","&MinusPlus;":"\u2213","&Mopf;":"\uD835\uDD44","&Mscr;":"\u2133","&Mu;":"\u039C","&NJcy;":"\u040A","&Nacute;":"\u0143","&Ncaron;":"\u0147","&Ncedil;":"\u0145","&Ncy;":"\u041D","&NegativeMediumSpace;":"\u200B","&NegativeThickSpace;":"\u200B","&NegativeThinSpace;":"\u200B","&NegativeVeryThinSpace;":"\u200B","&NestedGreaterGreater;":"\u226B","&NestedLessLess;":"\u226A","&NewLine;":`
18
+ `,"&Nfr;":"\uD835\uDD11","&NoBreak;":"\u2060","&NonBreakingSpace;":"\xA0","&Nopf;":"\u2115","&Not;":"\u2AEC","&NotCongruent;":"\u2262","&NotCupCap;":"\u226D","&NotDoubleVerticalBar;":"\u2226","&NotElement;":"\u2209","&NotEqual;":"\u2260","&NotEqualTilde;":"\u2242\u0338","&NotExists;":"\u2204","&NotGreater;":"\u226F","&NotGreaterEqual;":"\u2271","&NotGreaterFullEqual;":"\u2267\u0338","&NotGreaterGreater;":"\u226B\u0338","&NotGreaterLess;":"\u2279","&NotGreaterSlantEqual;":"\u2A7E\u0338","&NotGreaterTilde;":"\u2275","&NotHumpDownHump;":"\u224E\u0338","&NotHumpEqual;":"\u224F\u0338","&NotLeftTriangle;":"\u22EA","&NotLeftTriangleBar;":"\u29CF\u0338","&NotLeftTriangleEqual;":"\u22EC","&NotLess;":"\u226E","&NotLessEqual;":"\u2270","&NotLessGreater;":"\u2278","&NotLessLess;":"\u226A\u0338","&NotLessSlantEqual;":"\u2A7D\u0338","&NotLessTilde;":"\u2274","&NotNestedGreaterGreater;":"\u2AA2\u0338","&NotNestedLessLess;":"\u2AA1\u0338","&NotPrecedes;":"\u2280","&NotPrecedesEqual;":"\u2AAF\u0338","&NotPrecedesSlantEqual;":"\u22E0","&NotReverseElement;":"\u220C","&NotRightTriangle;":"\u22EB","&NotRightTriangleBar;":"\u29D0\u0338","&NotRightTriangleEqual;":"\u22ED","&NotSquareSubset;":"\u228F\u0338","&NotSquareSubsetEqual;":"\u22E2","&NotSquareSuperset;":"\u2290\u0338","&NotSquareSupersetEqual;":"\u22E3","&NotSubset;":"\u2282\u20D2","&NotSubsetEqual;":"\u2288","&NotSucceeds;":"\u2281","&NotSucceedsEqual;":"\u2AB0\u0338","&NotSucceedsSlantEqual;":"\u22E1","&NotSucceedsTilde;":"\u227F\u0338","&NotSuperset;":"\u2283\u20D2","&NotSupersetEqual;":"\u2289","&NotTilde;":"\u2241","&NotTildeEqual;":"\u2244","&NotTildeFullEqual;":"\u2247","&NotTildeTilde;":"\u2249","&NotVerticalBar;":"\u2224","&Nscr;":"\uD835\uDCA9","&Ntilde":"\xD1","&Ntilde;":"\xD1","&Nu;":"\u039D","&OElig;":"\u0152","&Oacute":"\xD3","&Oacute;":"\xD3","&Ocirc":"\xD4","&Ocirc;":"\xD4","&Ocy;":"\u041E","&Odblac;":"\u0150","&Ofr;":"\uD835\uDD12","&Ograve":"\xD2","&Ograve;":"\xD2","&Omacr;":"\u014C","&Omega;":"\u03A9","&Omicron;":"\u039F","&Oopf;":"\uD835\uDD46","&OpenCurlyDoubleQuote;":"\u201C","&OpenCurlyQuote;":"\u2018","&Or;":"\u2A54","&Oscr;":"\uD835\uDCAA","&Oslash":"\xD8","&Oslash;":"\xD8","&Otilde":"\xD5","&Otilde;":"\xD5","&Otimes;":"\u2A37","&Ouml":"\xD6","&Ouml;":"\xD6","&OverBar;":"\u203E","&OverBrace;":"\u23DE","&OverBracket;":"\u23B4","&OverParenthesis;":"\u23DC","&PartialD;":"\u2202","&Pcy;":"\u041F","&Pfr;":"\uD835\uDD13","&Phi;":"\u03A6","&Pi;":"\u03A0","&PlusMinus;":"\xB1","&Poincareplane;":"\u210C","&Popf;":"\u2119","&Pr;":"\u2ABB","&Precedes;":"\u227A","&PrecedesEqual;":"\u2AAF","&PrecedesSlantEqual;":"\u227C","&PrecedesTilde;":"\u227E","&Prime;":"\u2033","&Product;":"\u220F","&Proportion;":"\u2237","&Proportional;":"\u221D","&Pscr;":"\uD835\uDCAB","&Psi;":"\u03A8","&QUOT":'"',"&QUOT;":'"',"&Qfr;":"\uD835\uDD14","&Qopf;":"\u211A","&Qscr;":"\uD835\uDCAC","&RBarr;":"\u2910","&REG":"\xAE","&REG;":"\xAE","&Racute;":"\u0154","&Rang;":"\u27EB","&Rarr;":"\u21A0","&Rarrtl;":"\u2916","&Rcaron;":"\u0158","&Rcedil;":"\u0156","&Rcy;":"\u0420","&Re;":"\u211C","&ReverseElement;":"\u220B","&ReverseEquilibrium;":"\u21CB","&ReverseUpEquilibrium;":"\u296F","&Rfr;":"\u211C","&Rho;":"\u03A1","&RightAngleBracket;":"\u27E9","&RightArrow;":"\u2192","&RightArrowBar;":"\u21E5","&RightArrowLeftArrow;":"\u21C4","&RightCeiling;":"\u2309","&RightDoubleBracket;":"\u27E7","&RightDownTeeVector;":"\u295D","&RightDownVector;":"\u21C2","&RightDownVectorBar;":"\u2955","&RightFloor;":"\u230B","&RightTee;":"\u22A2","&RightTeeArrow;":"\u21A6","&RightTeeVector;":"\u295B","&RightTriangle;":"\u22B3","&RightTriangleBar;":"\u29D0","&RightTriangleEqual;":"\u22B5","&RightUpDownVector;":"\u294F","&RightUpTeeVector;":"\u295C","&RightUpVector;":"\u21BE","&RightUpVectorBar;":"\u2954","&RightVector;":"\u21C0","&RightVectorBar;":"\u2953","&Rightarrow;":"\u21D2","&Ropf;":"\u211D","&RoundImplies;":"\u2970","&Rrightarrow;":"\u21DB","&Rscr;":"\u211B","&Rsh;":"\u21B1","&RuleDelayed;":"\u29F4","&SHCHcy;":"\u0429","&SHcy;":"\u0428","&SOFTcy;":"\u042C","&Sacute;":"\u015A","&Sc;":"\u2ABC","&Scaron;":"\u0160","&Scedil;":"\u015E","&Scirc;":"\u015C","&Scy;":"\u0421","&Sfr;":"\uD835\uDD16","&ShortDownArrow;":"\u2193","&ShortLeftArrow;":"\u2190","&ShortRightArrow;":"\u2192","&ShortUpArrow;":"\u2191","&Sigma;":"\u03A3","&SmallCircle;":"\u2218","&Sopf;":"\uD835\uDD4A","&Sqrt;":"\u221A","&Square;":"\u25A1","&SquareIntersection;":"\u2293","&SquareSubset;":"\u228F","&SquareSubsetEqual;":"\u2291","&SquareSuperset;":"\u2290","&SquareSupersetEqual;":"\u2292","&SquareUnion;":"\u2294","&Sscr;":"\uD835\uDCAE","&Star;":"\u22C6","&Sub;":"\u22D0","&Subset;":"\u22D0","&SubsetEqual;":"\u2286","&Succeeds;":"\u227B","&SucceedsEqual;":"\u2AB0","&SucceedsSlantEqual;":"\u227D","&SucceedsTilde;":"\u227F","&SuchThat;":"\u220B","&Sum;":"\u2211","&Sup;":"\u22D1","&Superset;":"\u2283","&SupersetEqual;":"\u2287","&Supset;":"\u22D1","&THORN":"\xDE","&THORN;":"\xDE","&TRADE;":"\u2122","&TSHcy;":"\u040B","&TScy;":"\u0426","&Tab;":"\t","&Tau;":"\u03A4","&Tcaron;":"\u0164","&Tcedil;":"\u0162","&Tcy;":"\u0422","&Tfr;":"\uD835\uDD17","&Therefore;":"\u2234","&Theta;":"\u0398","&ThickSpace;":"\u205F\u200A","&ThinSpace;":"\u2009","&Tilde;":"\u223C","&TildeEqual;":"\u2243","&TildeFullEqual;":"\u2245","&TildeTilde;":"\u2248","&Topf;":"\uD835\uDD4B","&TripleDot;":"\u20DB","&Tscr;":"\uD835\uDCAF","&Tstrok;":"\u0166","&Uacute":"\xDA","&Uacute;":"\xDA","&Uarr;":"\u219F","&Uarrocir;":"\u2949","&Ubrcy;":"\u040E","&Ubreve;":"\u016C","&Ucirc":"\xDB","&Ucirc;":"\xDB","&Ucy;":"\u0423","&Udblac;":"\u0170","&Ufr;":"\uD835\uDD18","&Ugrave":"\xD9","&Ugrave;":"\xD9","&Umacr;":"\u016A","&UnderBar;":"_","&UnderBrace;":"\u23DF","&UnderBracket;":"\u23B5","&UnderParenthesis;":"\u23DD","&Union;":"\u22C3","&UnionPlus;":"\u228E","&Uogon;":"\u0172","&Uopf;":"\uD835\uDD4C","&UpArrow;":"\u2191","&UpArrowBar;":"\u2912","&UpArrowDownArrow;":"\u21C5","&UpDownArrow;":"\u2195","&UpEquilibrium;":"\u296E","&UpTee;":"\u22A5","&UpTeeArrow;":"\u21A5","&Uparrow;":"\u21D1","&Updownarrow;":"\u21D5","&UpperLeftArrow;":"\u2196","&UpperRightArrow;":"\u2197","&Upsi;":"\u03D2","&Upsilon;":"\u03A5","&Uring;":"\u016E","&Uscr;":"\uD835\uDCB0","&Utilde;":"\u0168","&Uuml":"\xDC","&Uuml;":"\xDC","&VDash;":"\u22AB","&Vbar;":"\u2AEB","&Vcy;":"\u0412","&Vdash;":"\u22A9","&Vdashl;":"\u2AE6","&Vee;":"\u22C1","&Verbar;":"\u2016","&Vert;":"\u2016","&VerticalBar;":"\u2223","&VerticalLine;":"|","&VerticalSeparator;":"\u2758","&VerticalTilde;":"\u2240","&VeryThinSpace;":"\u200A","&Vfr;":"\uD835\uDD19","&Vopf;":"\uD835\uDD4D","&Vscr;":"\uD835\uDCB1","&Vvdash;":"\u22AA","&Wcirc;":"\u0174","&Wedge;":"\u22C0","&Wfr;":"\uD835\uDD1A","&Wopf;":"\uD835\uDD4E","&Wscr;":"\uD835\uDCB2","&Xfr;":"\uD835\uDD1B","&Xi;":"\u039E","&Xopf;":"\uD835\uDD4F","&Xscr;":"\uD835\uDCB3","&YAcy;":"\u042F","&YIcy;":"\u0407","&YUcy;":"\u042E","&Yacute":"\xDD","&Yacute;":"\xDD","&Ycirc;":"\u0176","&Ycy;":"\u042B","&Yfr;":"\uD835\uDD1C","&Yopf;":"\uD835\uDD50","&Yscr;":"\uD835\uDCB4","&Yuml;":"\u0178","&ZHcy;":"\u0416","&Zacute;":"\u0179","&Zcaron;":"\u017D","&Zcy;":"\u0417","&Zdot;":"\u017B","&ZeroWidthSpace;":"\u200B","&Zeta;":"\u0396","&Zfr;":"\u2128","&Zopf;":"\u2124","&Zscr;":"\uD835\uDCB5","&aacute":"\xE1","&aacute;":"\xE1","&abreve;":"\u0103","&ac;":"\u223E","&acE;":"\u223E\u0333","&acd;":"\u223F","&acirc":"\xE2","&acirc;":"\xE2","&acute":"\xB4","&acute;":"\xB4","&acy;":"\u0430","&aelig":"\xE6","&aelig;":"\xE6","&af;":"\u2061","&afr;":"\uD835\uDD1E","&agrave":"\xE0","&agrave;":"\xE0","&alefsym;":"\u2135","&aleph;":"\u2135","&alpha;":"\u03B1","&amacr;":"\u0101","&amalg;":"\u2A3F","&amp":"&","&amp;":"&","&and;":"\u2227","&andand;":"\u2A55","&andd;":"\u2A5C","&andslope;":"\u2A58","&andv;":"\u2A5A","&ang;":"\u2220","&ange;":"\u29A4","&angle;":"\u2220","&angmsd;":"\u2221","&angmsdaa;":"\u29A8","&angmsdab;":"\u29A9","&angmsdac;":"\u29AA","&angmsdad;":"\u29AB","&angmsdae;":"\u29AC","&angmsdaf;":"\u29AD","&angmsdag;":"\u29AE","&angmsdah;":"\u29AF","&angrt;":"\u221F","&angrtvb;":"\u22BE","&angrtvbd;":"\u299D","&angsph;":"\u2222","&angst;":"\xC5","&angzarr;":"\u237C","&aogon;":"\u0105","&aopf;":"\uD835\uDD52","&ap;":"\u2248","&apE;":"\u2A70","&apacir;":"\u2A6F","&ape;":"\u224A","&apid;":"\u224B","&apos;":"'","&approx;":"\u2248","&approxeq;":"\u224A","&aring":"\xE5","&aring;":"\xE5","&ascr;":"\uD835\uDCB6","&ast;":"*","&asymp;":"\u2248","&asympeq;":"\u224D","&atilde":"\xE3","&atilde;":"\xE3","&auml":"\xE4","&auml;":"\xE4","&awconint;":"\u2233","&awint;":"\u2A11","&bNot;":"\u2AED","&backcong;":"\u224C","&backepsilon;":"\u03F6","&backprime;":"\u2035","&backsim;":"\u223D","&backsimeq;":"\u22CD","&barvee;":"\u22BD","&barwed;":"\u2305","&barwedge;":"\u2305","&bbrk;":"\u23B5","&bbrktbrk;":"\u23B6","&bcong;":"\u224C","&bcy;":"\u0431","&bdquo;":"\u201E","&becaus;":"\u2235","&because;":"\u2235","&bemptyv;":"\u29B0","&bepsi;":"\u03F6","&bernou;":"\u212C","&beta;":"\u03B2","&beth;":"\u2136","&between;":"\u226C","&bfr;":"\uD835\uDD1F","&bigcap;":"\u22C2","&bigcirc;":"\u25EF","&bigcup;":"\u22C3","&bigodot;":"\u2A00","&bigoplus;":"\u2A01","&bigotimes;":"\u2A02","&bigsqcup;":"\u2A06","&bigstar;":"\u2605","&bigtriangledown;":"\u25BD","&bigtriangleup;":"\u25B3","&biguplus;":"\u2A04","&bigvee;":"\u22C1","&bigwedge;":"\u22C0","&bkarow;":"\u290D","&blacklozenge;":"\u29EB","&blacksquare;":"\u25AA","&blacktriangle;":"\u25B4","&blacktriangledown;":"\u25BE","&blacktriangleleft;":"\u25C2","&blacktriangleright;":"\u25B8","&blank;":"\u2423","&blk12;":"\u2592","&blk14;":"\u2591","&blk34;":"\u2593","&block;":"\u2588","&bne;":"=\u20E5","&bnequiv;":"\u2261\u20E5","&bnot;":"\u2310","&bopf;":"\uD835\uDD53","&bot;":"\u22A5","&bottom;":"\u22A5","&bowtie;":"\u22C8","&boxDL;":"\u2557","&boxDR;":"\u2554","&boxDl;":"\u2556","&boxDr;":"\u2553","&boxH;":"\u2550","&boxHD;":"\u2566","&boxHU;":"\u2569","&boxHd;":"\u2564","&boxHu;":"\u2567","&boxUL;":"\u255D","&boxUR;":"\u255A","&boxUl;":"\u255C","&boxUr;":"\u2559","&boxV;":"\u2551","&boxVH;":"\u256C","&boxVL;":"\u2563","&boxVR;":"\u2560","&boxVh;":"\u256B","&boxVl;":"\u2562","&boxVr;":"\u255F","&boxbox;":"\u29C9","&boxdL;":"\u2555","&boxdR;":"\u2552","&boxdl;":"\u2510","&boxdr;":"\u250C","&boxh;":"\u2500","&boxhD;":"\u2565","&boxhU;":"\u2568","&boxhd;":"\u252C","&boxhu;":"\u2534","&boxminus;":"\u229F","&boxplus;":"\u229E","&boxtimes;":"\u22A0","&boxuL;":"\u255B","&boxuR;":"\u2558","&boxul;":"\u2518","&boxur;":"\u2514","&boxv;":"\u2502","&boxvH;":"\u256A","&boxvL;":"\u2561","&boxvR;":"\u255E","&boxvh;":"\u253C","&boxvl;":"\u2524","&boxvr;":"\u251C","&bprime;":"\u2035","&breve;":"\u02D8","&brvbar":"\xA6","&brvbar;":"\xA6","&bscr;":"\uD835\uDCB7","&bsemi;":"\u204F","&bsim;":"\u223D","&bsime;":"\u22CD","&bsol;":"\\","&bsolb;":"\u29C5","&bsolhsub;":"\u27C8","&bull;":"\u2022","&bullet;":"\u2022","&bump;":"\u224E","&bumpE;":"\u2AAE","&bumpe;":"\u224F","&bumpeq;":"\u224F","&cacute;":"\u0107","&cap;":"\u2229","&capand;":"\u2A44","&capbrcup;":"\u2A49","&capcap;":"\u2A4B","&capcup;":"\u2A47","&capdot;":"\u2A40","&caps;":"\u2229\uFE00","&caret;":"\u2041","&caron;":"\u02C7","&ccaps;":"\u2A4D","&ccaron;":"\u010D","&ccedil":"\xE7","&ccedil;":"\xE7","&ccirc;":"\u0109","&ccups;":"\u2A4C","&ccupssm;":"\u2A50","&cdot;":"\u010B","&cedil":"\xB8","&cedil;":"\xB8","&cemptyv;":"\u29B2","&cent":"\xA2","&cent;":"\xA2","&centerdot;":"\xB7","&cfr;":"\uD835\uDD20","&chcy;":"\u0447","&check;":"\u2713","&checkmark;":"\u2713","&chi;":"\u03C7","&cir;":"\u25CB","&cirE;":"\u29C3","&circ;":"\u02C6","&circeq;":"\u2257","&circlearrowleft;":"\u21BA","&circlearrowright;":"\u21BB","&circledR;":"\xAE","&circledS;":"\u24C8","&circledast;":"\u229B","&circledcirc;":"\u229A","&circleddash;":"\u229D","&cire;":"\u2257","&cirfnint;":"\u2A10","&cirmid;":"\u2AEF","&cirscir;":"\u29C2","&clubs;":"\u2663","&clubsuit;":"\u2663","&colon;":":","&colone;":"\u2254","&coloneq;":"\u2254","&comma;":",","&commat;":"@","&comp;":"\u2201","&compfn;":"\u2218","&complement;":"\u2201","&complexes;":"\u2102","&cong;":"\u2245","&congdot;":"\u2A6D","&conint;":"\u222E","&copf;":"\uD835\uDD54","&coprod;":"\u2210","&copy":"\xA9","&copy;":"\xA9","&copysr;":"\u2117","&crarr;":"\u21B5","&cross;":"\u2717","&cscr;":"\uD835\uDCB8","&csub;":"\u2ACF","&csube;":"\u2AD1","&csup;":"\u2AD0","&csupe;":"\u2AD2","&ctdot;":"\u22EF","&cudarrl;":"\u2938","&cudarrr;":"\u2935","&cuepr;":"\u22DE","&cuesc;":"\u22DF","&cularr;":"\u21B6","&cularrp;":"\u293D","&cup;":"\u222A","&cupbrcap;":"\u2A48","&cupcap;":"\u2A46","&cupcup;":"\u2A4A","&cupdot;":"\u228D","&cupor;":"\u2A45","&cups;":"\u222A\uFE00","&curarr;":"\u21B7","&curarrm;":"\u293C","&curlyeqprec;":"\u22DE","&curlyeqsucc;":"\u22DF","&curlyvee;":"\u22CE","&curlywedge;":"\u22CF","&curren":"\xA4","&curren;":"\xA4","&curvearrowleft;":"\u21B6","&curvearrowright;":"\u21B7","&cuvee;":"\u22CE","&cuwed;":"\u22CF","&cwconint;":"\u2232","&cwint;":"\u2231","&cylcty;":"\u232D","&dArr;":"\u21D3","&dHar;":"\u2965","&dagger;":"\u2020","&daleth;":"\u2138","&darr;":"\u2193","&dash;":"\u2010","&dashv;":"\u22A3","&dbkarow;":"\u290F","&dblac;":"\u02DD","&dcaron;":"\u010F","&dcy;":"\u0434","&dd;":"\u2146","&ddagger;":"\u2021","&ddarr;":"\u21CA","&ddotseq;":"\u2A77","&deg":"\xB0","&deg;":"\xB0","&delta;":"\u03B4","&demptyv;":"\u29B1","&dfisht;":"\u297F","&dfr;":"\uD835\uDD21","&dharl;":"\u21C3","&dharr;":"\u21C2","&diam;":"\u22C4","&diamond;":"\u22C4","&diamondsuit;":"\u2666","&diams;":"\u2666","&die;":"\xA8","&digamma;":"\u03DD","&disin;":"\u22F2","&div;":"\xF7","&divide":"\xF7","&divide;":"\xF7","&divideontimes;":"\u22C7","&divonx;":"\u22C7","&djcy;":"\u0452","&dlcorn;":"\u231E","&dlcrop;":"\u230D","&dollar;":"$","&dopf;":"\uD835\uDD55","&dot;":"\u02D9","&doteq;":"\u2250","&doteqdot;":"\u2251","&dotminus;":"\u2238","&dotplus;":"\u2214","&dotsquare;":"\u22A1","&doublebarwedge;":"\u2306","&downarrow;":"\u2193","&downdownarrows;":"\u21CA","&downharpoonleft;":"\u21C3","&downharpoonright;":"\u21C2","&drbkarow;":"\u2910","&drcorn;":"\u231F","&drcrop;":"\u230C","&dscr;":"\uD835\uDCB9","&dscy;":"\u0455","&dsol;":"\u29F6","&dstrok;":"\u0111","&dtdot;":"\u22F1","&dtri;":"\u25BF","&dtrif;":"\u25BE","&duarr;":"\u21F5","&duhar;":"\u296F","&dwangle;":"\u29A6","&dzcy;":"\u045F","&dzigrarr;":"\u27FF","&eDDot;":"\u2A77","&eDot;":"\u2251","&eacute":"\xE9","&eacute;":"\xE9","&easter;":"\u2A6E","&ecaron;":"\u011B","&ecir;":"\u2256","&ecirc":"\xEA","&ecirc;":"\xEA","&ecolon;":"\u2255","&ecy;":"\u044D","&edot;":"\u0117","&ee;":"\u2147","&efDot;":"\u2252","&efr;":"\uD835\uDD22","&eg;":"\u2A9A","&egrave":"\xE8","&egrave;":"\xE8","&egs;":"\u2A96","&egsdot;":"\u2A98","&el;":"\u2A99","&elinters;":"\u23E7","&ell;":"\u2113","&els;":"\u2A95","&elsdot;":"\u2A97","&emacr;":"\u0113","&empty;":"\u2205","&emptyset;":"\u2205","&emptyv;":"\u2205","&emsp13;":"\u2004","&emsp14;":"\u2005","&emsp;":"\u2003","&eng;":"\u014B","&ensp;":"\u2002","&eogon;":"\u0119","&eopf;":"\uD835\uDD56","&epar;":"\u22D5","&eparsl;":"\u29E3","&eplus;":"\u2A71","&epsi;":"\u03B5","&epsilon;":"\u03B5","&epsiv;":"\u03F5","&eqcirc;":"\u2256","&eqcolon;":"\u2255","&eqsim;":"\u2242","&eqslantgtr;":"\u2A96","&eqslantless;":"\u2A95","&equals;":"=","&equest;":"\u225F","&equiv;":"\u2261","&equivDD;":"\u2A78","&eqvparsl;":"\u29E5","&erDot;":"\u2253","&erarr;":"\u2971","&escr;":"\u212F","&esdot;":"\u2250","&esim;":"\u2242","&eta;":"\u03B7","&eth":"\xF0","&eth;":"\xF0","&euml":"\xEB","&euml;":"\xEB","&euro;":"\u20AC","&excl;":"!","&exist;":"\u2203","&expectation;":"\u2130","&exponentiale;":"\u2147","&fallingdotseq;":"\u2252","&fcy;":"\u0444","&female;":"\u2640","&ffilig;":"\uFB03","&fflig;":"\uFB00","&ffllig;":"\uFB04","&ffr;":"\uD835\uDD23","&filig;":"\uFB01","&fjlig;":"fj","&flat;":"\u266D","&fllig;":"\uFB02","&fltns;":"\u25B1","&fnof;":"\u0192","&fopf;":"\uD835\uDD57","&forall;":"\u2200","&fork;":"\u22D4","&forkv;":"\u2AD9","&fpartint;":"\u2A0D","&frac12":"\xBD","&frac12;":"\xBD","&frac13;":"\u2153","&frac14":"\xBC","&frac14;":"\xBC","&frac15;":"\u2155","&frac16;":"\u2159","&frac18;":"\u215B","&frac23;":"\u2154","&frac25;":"\u2156","&frac34":"\xBE","&frac34;":"\xBE","&frac35;":"\u2157","&frac38;":"\u215C","&frac45;":"\u2158","&frac56;":"\u215A","&frac58;":"\u215D","&frac78;":"\u215E","&frasl;":"\u2044","&frown;":"\u2322","&fscr;":"\uD835\uDCBB","&gE;":"\u2267","&gEl;":"\u2A8C","&gacute;":"\u01F5","&gamma;":"\u03B3","&gammad;":"\u03DD","&gap;":"\u2A86","&gbreve;":"\u011F","&gcirc;":"\u011D","&gcy;":"\u0433","&gdot;":"\u0121","&ge;":"\u2265","&gel;":"\u22DB","&geq;":"\u2265","&geqq;":"\u2267","&geqslant;":"\u2A7E","&ges;":"\u2A7E","&gescc;":"\u2AA9","&gesdot;":"\u2A80","&gesdoto;":"\u2A82","&gesdotol;":"\u2A84","&gesl;":"\u22DB\uFE00","&gesles;":"\u2A94","&gfr;":"\uD835\uDD24","&gg;":"\u226B","&ggg;":"\u22D9","&gimel;":"\u2137","&gjcy;":"\u0453","&gl;":"\u2277","&glE;":"\u2A92","&gla;":"\u2AA5","&glj;":"\u2AA4","&gnE;":"\u2269","&gnap;":"\u2A8A","&gnapprox;":"\u2A8A","&gne;":"\u2A88","&gneq;":"\u2A88","&gneqq;":"\u2269","&gnsim;":"\u22E7","&gopf;":"\uD835\uDD58","&grave;":"`","&gscr;":"\u210A","&gsim;":"\u2273","&gsime;":"\u2A8E","&gsiml;":"\u2A90","&gt":">","&gt;":">","&gtcc;":"\u2AA7","&gtcir;":"\u2A7A","&gtdot;":"\u22D7","&gtlPar;":"\u2995","&gtquest;":"\u2A7C","&gtrapprox;":"\u2A86","&gtrarr;":"\u2978","&gtrdot;":"\u22D7","&gtreqless;":"\u22DB","&gtreqqless;":"\u2A8C","&gtrless;":"\u2277","&gtrsim;":"\u2273","&gvertneqq;":"\u2269\uFE00","&gvnE;":"\u2269\uFE00","&hArr;":"\u21D4","&hairsp;":"\u200A","&half;":"\xBD","&hamilt;":"\u210B","&hardcy;":"\u044A","&harr;":"\u2194","&harrcir;":"\u2948","&harrw;":"\u21AD","&hbar;":"\u210F","&hcirc;":"\u0125","&hearts;":"\u2665","&heartsuit;":"\u2665","&hellip;":"\u2026","&hercon;":"\u22B9","&hfr;":"\uD835\uDD25","&hksearow;":"\u2925","&hkswarow;":"\u2926","&hoarr;":"\u21FF","&homtht;":"\u223B","&hookleftarrow;":"\u21A9","&hookrightarrow;":"\u21AA","&hopf;":"\uD835\uDD59","&horbar;":"\u2015","&hscr;":"\uD835\uDCBD","&hslash;":"\u210F","&hstrok;":"\u0127","&hybull;":"\u2043","&hyphen;":"\u2010","&iacute":"\xED","&iacute;":"\xED","&ic;":"\u2063","&icirc":"\xEE","&icirc;":"\xEE","&icy;":"\u0438","&iecy;":"\u0435","&iexcl":"\xA1","&iexcl;":"\xA1","&iff;":"\u21D4","&ifr;":"\uD835\uDD26","&igrave":"\xEC","&igrave;":"\xEC","&ii;":"\u2148","&iiiint;":"\u2A0C","&iiint;":"\u222D","&iinfin;":"\u29DC","&iiota;":"\u2129","&ijlig;":"\u0133","&imacr;":"\u012B","&image;":"\u2111","&imagline;":"\u2110","&imagpart;":"\u2111","&imath;":"\u0131","&imof;":"\u22B7","&imped;":"\u01B5","&in;":"\u2208","&incare;":"\u2105","&infin;":"\u221E","&infintie;":"\u29DD","&inodot;":"\u0131","&int;":"\u222B","&intcal;":"\u22BA","&integers;":"\u2124","&intercal;":"\u22BA","&intlarhk;":"\u2A17","&intprod;":"\u2A3C","&iocy;":"\u0451","&iogon;":"\u012F","&iopf;":"\uD835\uDD5A","&iota;":"\u03B9","&iprod;":"\u2A3C","&iquest":"\xBF","&iquest;":"\xBF","&iscr;":"\uD835\uDCBE","&isin;":"\u2208","&isinE;":"\u22F9","&isindot;":"\u22F5","&isins;":"\u22F4","&isinsv;":"\u22F3","&isinv;":"\u2208","&it;":"\u2062","&itilde;":"\u0129","&iukcy;":"\u0456","&iuml":"\xEF","&iuml;":"\xEF","&jcirc;":"\u0135","&jcy;":"\u0439","&jfr;":"\uD835\uDD27","&jmath;":"\u0237","&jopf;":"\uD835\uDD5B","&jscr;":"\uD835\uDCBF","&jsercy;":"\u0458","&jukcy;":"\u0454","&kappa;":"\u03BA","&kappav;":"\u03F0","&kcedil;":"\u0137","&kcy;":"\u043A","&kfr;":"\uD835\uDD28","&kgreen;":"\u0138","&khcy;":"\u0445","&kjcy;":"\u045C","&kopf;":"\uD835\uDD5C","&kscr;":"\uD835\uDCC0","&lAarr;":"\u21DA","&lArr;":"\u21D0","&lAtail;":"\u291B","&lBarr;":"\u290E","&lE;":"\u2266","&lEg;":"\u2A8B","&lHar;":"\u2962","&lacute;":"\u013A","&laemptyv;":"\u29B4","&lagran;":"\u2112","&lambda;":"\u03BB","&lang;":"\u27E8","&langd;":"\u2991","&langle;":"\u27E8","&lap;":"\u2A85","&laquo":"\xAB","&laquo;":"\xAB","&larr;":"\u2190","&larrb;":"\u21E4","&larrbfs;":"\u291F","&larrfs;":"\u291D","&larrhk;":"\u21A9","&larrlp;":"\u21AB","&larrpl;":"\u2939","&larrsim;":"\u2973","&larrtl;":"\u21A2","&lat;":"\u2AAB","&latail;":"\u2919","&late;":"\u2AAD","&lates;":"\u2AAD\uFE00","&lbarr;":"\u290C","&lbbrk;":"\u2772","&lbrace;":"{","&lbrack;":"[","&lbrke;":"\u298B","&lbrksld;":"\u298F","&lbrkslu;":"\u298D","&lcaron;":"\u013E","&lcedil;":"\u013C","&lceil;":"\u2308","&lcub;":"{","&lcy;":"\u043B","&ldca;":"\u2936","&ldquo;":"\u201C","&ldquor;":"\u201E","&ldrdhar;":"\u2967","&ldrushar;":"\u294B","&ldsh;":"\u21B2","&le;":"\u2264","&leftarrow;":"\u2190","&leftarrowtail;":"\u21A2","&leftharpoondown;":"\u21BD","&leftharpoonup;":"\u21BC","&leftleftarrows;":"\u21C7","&leftrightarrow;":"\u2194","&leftrightarrows;":"\u21C6","&leftrightharpoons;":"\u21CB","&leftrightsquigarrow;":"\u21AD","&leftthreetimes;":"\u22CB","&leg;":"\u22DA","&leq;":"\u2264","&leqq;":"\u2266","&leqslant;":"\u2A7D","&les;":"\u2A7D","&lescc;":"\u2AA8","&lesdot;":"\u2A7F","&lesdoto;":"\u2A81","&lesdotor;":"\u2A83","&lesg;":"\u22DA\uFE00","&lesges;":"\u2A93","&lessapprox;":"\u2A85","&lessdot;":"\u22D6","&lesseqgtr;":"\u22DA","&lesseqqgtr;":"\u2A8B","&lessgtr;":"\u2276","&lesssim;":"\u2272","&lfisht;":"\u297C","&lfloor;":"\u230A","&lfr;":"\uD835\uDD29","&lg;":"\u2276","&lgE;":"\u2A91","&lhard;":"\u21BD","&lharu;":"\u21BC","&lharul;":"\u296A","&lhblk;":"\u2584","&ljcy;":"\u0459","&ll;":"\u226A","&llarr;":"\u21C7","&llcorner;":"\u231E","&llhard;":"\u296B","&lltri;":"\u25FA","&lmidot;":"\u0140","&lmoust;":"\u23B0","&lmoustache;":"\u23B0","&lnE;":"\u2268","&lnap;":"\u2A89","&lnapprox;":"\u2A89","&lne;":"\u2A87","&lneq;":"\u2A87","&lneqq;":"\u2268","&lnsim;":"\u22E6","&loang;":"\u27EC","&loarr;":"\u21FD","&lobrk;":"\u27E6","&longleftarrow;":"\u27F5","&longleftrightarrow;":"\u27F7","&longmapsto;":"\u27FC","&longrightarrow;":"\u27F6","&looparrowleft;":"\u21AB","&looparrowright;":"\u21AC","&lopar;":"\u2985","&lopf;":"\uD835\uDD5D","&loplus;":"\u2A2D","&lotimes;":"\u2A34","&lowast;":"\u2217","&lowbar;":"_","&loz;":"\u25CA","&lozenge;":"\u25CA","&lozf;":"\u29EB","&lpar;":"(","&lparlt;":"\u2993","&lrarr;":"\u21C6","&lrcorner;":"\u231F","&lrhar;":"\u21CB","&lrhard;":"\u296D","&lrm;":"\u200E","&lrtri;":"\u22BF","&lsaquo;":"\u2039","&lscr;":"\uD835\uDCC1","&lsh;":"\u21B0","&lsim;":"\u2272","&lsime;":"\u2A8D","&lsimg;":"\u2A8F","&lsqb;":"[","&lsquo;":"\u2018","&lsquor;":"\u201A","&lstrok;":"\u0142","&lt":"<","&lt;":"<","&ltcc;":"\u2AA6","&ltcir;":"\u2A79","&ltdot;":"\u22D6","&lthree;":"\u22CB","&ltimes;":"\u22C9","&ltlarr;":"\u2976","&ltquest;":"\u2A7B","&ltrPar;":"\u2996","&ltri;":"\u25C3","&ltrie;":"\u22B4","&ltrif;":"\u25C2","&lurdshar;":"\u294A","&luruhar;":"\u2966","&lvertneqq;":"\u2268\uFE00","&lvnE;":"\u2268\uFE00","&mDDot;":"\u223A","&macr":"\xAF","&macr;":"\xAF","&male;":"\u2642","&malt;":"\u2720","&maltese;":"\u2720","&map;":"\u21A6","&mapsto;":"\u21A6","&mapstodown;":"\u21A7","&mapstoleft;":"\u21A4","&mapstoup;":"\u21A5","&marker;":"\u25AE","&mcomma;":"\u2A29","&mcy;":"\u043C","&mdash;":"\u2014","&measuredangle;":"\u2221","&mfr;":"\uD835\uDD2A","&mho;":"\u2127","&micro":"\xB5","&micro;":"\xB5","&mid;":"\u2223","&midast;":"*","&midcir;":"\u2AF0","&middot":"\xB7","&middot;":"\xB7","&minus;":"\u2212","&minusb;":"\u229F","&minusd;":"\u2238","&minusdu;":"\u2A2A","&mlcp;":"\u2ADB","&mldr;":"\u2026","&mnplus;":"\u2213","&models;":"\u22A7","&mopf;":"\uD835\uDD5E","&mp;":"\u2213","&mscr;":"\uD835\uDCC2","&mstpos;":"\u223E","&mu;":"\u03BC","&multimap;":"\u22B8","&mumap;":"\u22B8","&nGg;":"\u22D9\u0338","&nGt;":"\u226B\u20D2","&nGtv;":"\u226B\u0338","&nLeftarrow;":"\u21CD","&nLeftrightarrow;":"\u21CE","&nLl;":"\u22D8\u0338","&nLt;":"\u226A\u20D2","&nLtv;":"\u226A\u0338","&nRightarrow;":"\u21CF","&nVDash;":"\u22AF","&nVdash;":"\u22AE","&nabla;":"\u2207","&nacute;":"\u0144","&nang;":"\u2220\u20D2","&nap;":"\u2249","&napE;":"\u2A70\u0338","&napid;":"\u224B\u0338","&napos;":"\u0149","&napprox;":"\u2249","&natur;":"\u266E","&natural;":"\u266E","&naturals;":"\u2115","&nbsp":"\xA0","&nbsp;":"\xA0","&nbump;":"\u224E\u0338","&nbumpe;":"\u224F\u0338","&ncap;":"\u2A43","&ncaron;":"\u0148","&ncedil;":"\u0146","&ncong;":"\u2247","&ncongdot;":"\u2A6D\u0338","&ncup;":"\u2A42","&ncy;":"\u043D","&ndash;":"\u2013","&ne;":"\u2260","&neArr;":"\u21D7","&nearhk;":"\u2924","&nearr;":"\u2197","&nearrow;":"\u2197","&nedot;":"\u2250\u0338","&nequiv;":"\u2262","&nesear;":"\u2928","&nesim;":"\u2242\u0338","&nexist;":"\u2204","&nexists;":"\u2204","&nfr;":"\uD835\uDD2B","&ngE;":"\u2267\u0338","&nge;":"\u2271","&ngeq;":"\u2271","&ngeqq;":"\u2267\u0338","&ngeqslant;":"\u2A7E\u0338","&nges;":"\u2A7E\u0338","&ngsim;":"\u2275","&ngt;":"\u226F","&ngtr;":"\u226F","&nhArr;":"\u21CE","&nharr;":"\u21AE","&nhpar;":"\u2AF2","&ni;":"\u220B","&nis;":"\u22FC","&nisd;":"\u22FA","&niv;":"\u220B","&njcy;":"\u045A","&nlArr;":"\u21CD","&nlE;":"\u2266\u0338","&nlarr;":"\u219A","&nldr;":"\u2025","&nle;":"\u2270","&nleftarrow;":"\u219A","&nleftrightarrow;":"\u21AE","&nleq;":"\u2270","&nleqq;":"\u2266\u0338","&nleqslant;":"\u2A7D\u0338","&nles;":"\u2A7D\u0338","&nless;":"\u226E","&nlsim;":"\u2274","&nlt;":"\u226E","&nltri;":"\u22EA","&nltrie;":"\u22EC","&nmid;":"\u2224","&nopf;":"\uD835\uDD5F","&not":"\xAC","&not;":"\xAC","&notin;":"\u2209","&notinE;":"\u22F9\u0338","&notindot;":"\u22F5\u0338","&notinva;":"\u2209","&notinvb;":"\u22F7","&notinvc;":"\u22F6","&notni;":"\u220C","&notniva;":"\u220C","&notnivb;":"\u22FE","&notnivc;":"\u22FD","&npar;":"\u2226","&nparallel;":"\u2226","&nparsl;":"\u2AFD\u20E5","&npart;":"\u2202\u0338","&npolint;":"\u2A14","&npr;":"\u2280","&nprcue;":"\u22E0","&npre;":"\u2AAF\u0338","&nprec;":"\u2280","&npreceq;":"\u2AAF\u0338","&nrArr;":"\u21CF","&nrarr;":"\u219B","&nrarrc;":"\u2933\u0338","&nrarrw;":"\u219D\u0338","&nrightarrow;":"\u219B","&nrtri;":"\u22EB","&nrtrie;":"\u22ED","&nsc;":"\u2281","&nsccue;":"\u22E1","&nsce;":"\u2AB0\u0338","&nscr;":"\uD835\uDCC3","&nshortmid;":"\u2224","&nshortparallel;":"\u2226","&nsim;":"\u2241","&nsime;":"\u2244","&nsimeq;":"\u2244","&nsmid;":"\u2224","&nspar;":"\u2226","&nsqsube;":"\u22E2","&nsqsupe;":"\u22E3","&nsub;":"\u2284","&nsubE;":"\u2AC5\u0338","&nsube;":"\u2288","&nsubset;":"\u2282\u20D2","&nsubseteq;":"\u2288","&nsubseteqq;":"\u2AC5\u0338","&nsucc;":"\u2281","&nsucceq;":"\u2AB0\u0338","&nsup;":"\u2285","&nsupE;":"\u2AC6\u0338","&nsupe;":"\u2289","&nsupset;":"\u2283\u20D2","&nsupseteq;":"\u2289","&nsupseteqq;":"\u2AC6\u0338","&ntgl;":"\u2279","&ntilde":"\xF1","&ntilde;":"\xF1","&ntlg;":"\u2278","&ntriangleleft;":"\u22EA","&ntrianglelefteq;":"\u22EC","&ntriangleright;":"\u22EB","&ntrianglerighteq;":"\u22ED","&nu;":"\u03BD","&num;":"#","&numero;":"\u2116","&numsp;":"\u2007","&nvDash;":"\u22AD","&nvHarr;":"\u2904","&nvap;":"\u224D\u20D2","&nvdash;":"\u22AC","&nvge;":"\u2265\u20D2","&nvgt;":">\u20D2","&nvinfin;":"\u29DE","&nvlArr;":"\u2902","&nvle;":"\u2264\u20D2","&nvlt;":"<\u20D2","&nvltrie;":"\u22B4\u20D2","&nvrArr;":"\u2903","&nvrtrie;":"\u22B5\u20D2","&nvsim;":"\u223C\u20D2","&nwArr;":"\u21D6","&nwarhk;":"\u2923","&nwarr;":"\u2196","&nwarrow;":"\u2196","&nwnear;":"\u2927","&oS;":"\u24C8","&oacute":"\xF3","&oacute;":"\xF3","&oast;":"\u229B","&ocir;":"\u229A","&ocirc":"\xF4","&ocirc;":"\xF4","&ocy;":"\u043E","&odash;":"\u229D","&odblac;":"\u0151","&odiv;":"\u2A38","&odot;":"\u2299","&odsold;":"\u29BC","&oelig;":"\u0153","&ofcir;":"\u29BF","&ofr;":"\uD835\uDD2C","&ogon;":"\u02DB","&ograve":"\xF2","&ograve;":"\xF2","&ogt;":"\u29C1","&ohbar;":"\u29B5","&ohm;":"\u03A9","&oint;":"\u222E","&olarr;":"\u21BA","&olcir;":"\u29BE","&olcross;":"\u29BB","&oline;":"\u203E","&olt;":"\u29C0","&omacr;":"\u014D","&omega;":"\u03C9","&omicron;":"\u03BF","&omid;":"\u29B6","&ominus;":"\u2296","&oopf;":"\uD835\uDD60","&opar;":"\u29B7","&operp;":"\u29B9","&oplus;":"\u2295","&or;":"\u2228","&orarr;":"\u21BB","&ord;":"\u2A5D","&order;":"\u2134","&orderof;":"\u2134","&ordf":"\xAA","&ordf;":"\xAA","&ordm":"\xBA","&ordm;":"\xBA","&origof;":"\u22B6","&oror;":"\u2A56","&orslope;":"\u2A57","&orv;":"\u2A5B","&oscr;":"\u2134","&oslash":"\xF8","&oslash;":"\xF8","&osol;":"\u2298","&otilde":"\xF5","&otilde;":"\xF5","&otimes;":"\u2297","&otimesas;":"\u2A36","&ouml":"\xF6","&ouml;":"\xF6","&ovbar;":"\u233D","&par;":"\u2225","&para":"\xB6","&para;":"\xB6","&parallel;":"\u2225","&parsim;":"\u2AF3","&parsl;":"\u2AFD","&part;":"\u2202","&pcy;":"\u043F","&percnt;":"%","&period;":".","&permil;":"\u2030","&perp;":"\u22A5","&pertenk;":"\u2031","&pfr;":"\uD835\uDD2D","&phi;":"\u03C6","&phiv;":"\u03D5","&phmmat;":"\u2133","&phone;":"\u260E","&pi;":"\u03C0","&pitchfork;":"\u22D4","&piv;":"\u03D6","&planck;":"\u210F","&planckh;":"\u210E","&plankv;":"\u210F","&plus;":"+","&plusacir;":"\u2A23","&plusb;":"\u229E","&pluscir;":"\u2A22","&plusdo;":"\u2214","&plusdu;":"\u2A25","&pluse;":"\u2A72","&plusmn":"\xB1","&plusmn;":"\xB1","&plussim;":"\u2A26","&plustwo;":"\u2A27","&pm;":"\xB1","&pointint;":"\u2A15","&popf;":"\uD835\uDD61","&pound":"\xA3","&pound;":"\xA3","&pr;":"\u227A","&prE;":"\u2AB3","&prap;":"\u2AB7","&prcue;":"\u227C","&pre;":"\u2AAF","&prec;":"\u227A","&precapprox;":"\u2AB7","&preccurlyeq;":"\u227C","&preceq;":"\u2AAF","&precnapprox;":"\u2AB9","&precneqq;":"\u2AB5","&precnsim;":"\u22E8","&precsim;":"\u227E","&prime;":"\u2032","&primes;":"\u2119","&prnE;":"\u2AB5","&prnap;":"\u2AB9","&prnsim;":"\u22E8","&prod;":"\u220F","&profalar;":"\u232E","&profline;":"\u2312","&profsurf;":"\u2313","&prop;":"\u221D","&propto;":"\u221D","&prsim;":"\u227E","&prurel;":"\u22B0","&pscr;":"\uD835\uDCC5","&psi;":"\u03C8","&puncsp;":"\u2008","&qfr;":"\uD835\uDD2E","&qint;":"\u2A0C","&qopf;":"\uD835\uDD62","&qprime;":"\u2057","&qscr;":"\uD835\uDCC6","&quaternions;":"\u210D","&quatint;":"\u2A16","&quest;":"?","&questeq;":"\u225F","&quot":'"',"&quot;":'"',"&rAarr;":"\u21DB","&rArr;":"\u21D2","&rAtail;":"\u291C","&rBarr;":"\u290F","&rHar;":"\u2964","&race;":"\u223D\u0331","&racute;":"\u0155","&radic;":"\u221A","&raemptyv;":"\u29B3","&rang;":"\u27E9","&rangd;":"\u2992","&range;":"\u29A5","&rangle;":"\u27E9","&raquo":"\xBB","&raquo;":"\xBB","&rarr;":"\u2192","&rarrap;":"\u2975","&rarrb;":"\u21E5","&rarrbfs;":"\u2920","&rarrc;":"\u2933","&rarrfs;":"\u291E","&rarrhk;":"\u21AA","&rarrlp;":"\u21AC","&rarrpl;":"\u2945","&rarrsim;":"\u2974","&rarrtl;":"\u21A3","&rarrw;":"\u219D","&ratail;":"\u291A","&ratio;":"\u2236","&rationals;":"\u211A","&rbarr;":"\u290D","&rbbrk;":"\u2773","&rbrace;":"}","&rbrack;":"]","&rbrke;":"\u298C","&rbrksld;":"\u298E","&rbrkslu;":"\u2990","&rcaron;":"\u0159","&rcedil;":"\u0157","&rceil;":"\u2309","&rcub;":"}","&rcy;":"\u0440","&rdca;":"\u2937","&rdldhar;":"\u2969","&rdquo;":"\u201D","&rdquor;":"\u201D","&rdsh;":"\u21B3","&real;":"\u211C","&realine;":"\u211B","&realpart;":"\u211C","&reals;":"\u211D","&rect;":"\u25AD","&reg":"\xAE","&reg;":"\xAE","&rfisht;":"\u297D","&rfloor;":"\u230B","&rfr;":"\uD835\uDD2F","&rhard;":"\u21C1","&rharu;":"\u21C0","&rharul;":"\u296C","&rho;":"\u03C1","&rhov;":"\u03F1","&rightarrow;":"\u2192","&rightarrowtail;":"\u21A3","&rightharpoondown;":"\u21C1","&rightharpoonup;":"\u21C0","&rightleftarrows;":"\u21C4","&rightleftharpoons;":"\u21CC","&rightrightarrows;":"\u21C9","&rightsquigarrow;":"\u219D","&rightthreetimes;":"\u22CC","&ring;":"\u02DA","&risingdotseq;":"\u2253","&rlarr;":"\u21C4","&rlhar;":"\u21CC","&rlm;":"\u200F","&rmoust;":"\u23B1","&rmoustache;":"\u23B1","&rnmid;":"\u2AEE","&roang;":"\u27ED","&roarr;":"\u21FE","&robrk;":"\u27E7","&ropar;":"\u2986","&ropf;":"\uD835\uDD63","&roplus;":"\u2A2E","&rotimes;":"\u2A35","&rpar;":")","&rpargt;":"\u2994","&rppolint;":"\u2A12","&rrarr;":"\u21C9","&rsaquo;":"\u203A","&rscr;":"\uD835\uDCC7","&rsh;":"\u21B1","&rsqb;":"]","&rsquo;":"\u2019","&rsquor;":"\u2019","&rthree;":"\u22CC","&rtimes;":"\u22CA","&rtri;":"\u25B9","&rtrie;":"\u22B5","&rtrif;":"\u25B8","&rtriltri;":"\u29CE","&ruluhar;":"\u2968","&rx;":"\u211E","&sacute;":"\u015B","&sbquo;":"\u201A","&sc;":"\u227B","&scE;":"\u2AB4","&scap;":"\u2AB8","&scaron;":"\u0161","&sccue;":"\u227D","&sce;":"\u2AB0","&scedil;":"\u015F","&scirc;":"\u015D","&scnE;":"\u2AB6","&scnap;":"\u2ABA","&scnsim;":"\u22E9","&scpolint;":"\u2A13","&scsim;":"\u227F","&scy;":"\u0441","&sdot;":"\u22C5","&sdotb;":"\u22A1","&sdote;":"\u2A66","&seArr;":"\u21D8","&searhk;":"\u2925","&searr;":"\u2198","&searrow;":"\u2198","&sect":"\xA7","&sect;":"\xA7","&semi;":";","&seswar;":"\u2929","&setminus;":"\u2216","&setmn;":"\u2216","&sext;":"\u2736","&sfr;":"\uD835\uDD30","&sfrown;":"\u2322","&sharp;":"\u266F","&shchcy;":"\u0449","&shcy;":"\u0448","&shortmid;":"\u2223","&shortparallel;":"\u2225","&shy":"\xAD","&shy;":"\xAD","&sigma;":"\u03C3","&sigmaf;":"\u03C2","&sigmav;":"\u03C2","&sim;":"\u223C","&simdot;":"\u2A6A","&sime;":"\u2243","&simeq;":"\u2243","&simg;":"\u2A9E","&simgE;":"\u2AA0","&siml;":"\u2A9D","&simlE;":"\u2A9F","&simne;":"\u2246","&simplus;":"\u2A24","&simrarr;":"\u2972","&slarr;":"\u2190","&smallsetminus;":"\u2216","&smashp;":"\u2A33","&smeparsl;":"\u29E4","&smid;":"\u2223","&smile;":"\u2323","&smt;":"\u2AAA","&smte;":"\u2AAC","&smtes;":"\u2AAC\uFE00","&softcy;":"\u044C","&sol;":"/","&solb;":"\u29C4","&solbar;":"\u233F","&sopf;":"\uD835\uDD64","&spades;":"\u2660","&spadesuit;":"\u2660","&spar;":"\u2225","&sqcap;":"\u2293","&sqcaps;":"\u2293\uFE00","&sqcup;":"\u2294","&sqcups;":"\u2294\uFE00","&sqsub;":"\u228F","&sqsube;":"\u2291","&sqsubset;":"\u228F","&sqsubseteq;":"\u2291","&sqsup;":"\u2290","&sqsupe;":"\u2292","&sqsupset;":"\u2290","&sqsupseteq;":"\u2292","&squ;":"\u25A1","&square;":"\u25A1","&squarf;":"\u25AA","&squf;":"\u25AA","&srarr;":"\u2192","&sscr;":"\uD835\uDCC8","&ssetmn;":"\u2216","&ssmile;":"\u2323","&sstarf;":"\u22C6","&star;":"\u2606","&starf;":"\u2605","&straightepsilon;":"\u03F5","&straightphi;":"\u03D5","&strns;":"\xAF","&sub;":"\u2282","&subE;":"\u2AC5","&subdot;":"\u2ABD","&sube;":"\u2286","&subedot;":"\u2AC3","&submult;":"\u2AC1","&subnE;":"\u2ACB","&subne;":"\u228A","&subplus;":"\u2ABF","&subrarr;":"\u2979","&subset;":"\u2282","&subseteq;":"\u2286","&subseteqq;":"\u2AC5","&subsetneq;":"\u228A","&subsetneqq;":"\u2ACB","&subsim;":"\u2AC7","&subsub;":"\u2AD5","&subsup;":"\u2AD3","&succ;":"\u227B","&succapprox;":"\u2AB8","&succcurlyeq;":"\u227D","&succeq;":"\u2AB0","&succnapprox;":"\u2ABA","&succneqq;":"\u2AB6","&succnsim;":"\u22E9","&succsim;":"\u227F","&sum;":"\u2211","&sung;":"\u266A","&sup1":"\xB9","&sup1;":"\xB9","&sup2":"\xB2","&sup2;":"\xB2","&sup3":"\xB3","&sup3;":"\xB3","&sup;":"\u2283","&supE;":"\u2AC6","&supdot;":"\u2ABE","&supdsub;":"\u2AD8","&supe;":"\u2287","&supedot;":"\u2AC4","&suphsol;":"\u27C9","&suphsub;":"\u2AD7","&suplarr;":"\u297B","&supmult;":"\u2AC2","&supnE;":"\u2ACC","&supne;":"\u228B","&supplus;":"\u2AC0","&supset;":"\u2283","&supseteq;":"\u2287","&supseteqq;":"\u2AC6","&supsetneq;":"\u228B","&supsetneqq;":"\u2ACC","&supsim;":"\u2AC8","&supsub;":"\u2AD4","&supsup;":"\u2AD6","&swArr;":"\u21D9","&swarhk;":"\u2926","&swarr;":"\u2199","&swarrow;":"\u2199","&swnwar;":"\u292A","&szlig":"\xDF","&szlig;":"\xDF","&target;":"\u2316","&tau;":"\u03C4","&tbrk;":"\u23B4","&tcaron;":"\u0165","&tcedil;":"\u0163","&tcy;":"\u0442","&tdot;":"\u20DB","&telrec;":"\u2315","&tfr;":"\uD835\uDD31","&there4;":"\u2234","&therefore;":"\u2234","&theta;":"\u03B8","&thetasym;":"\u03D1","&thetav;":"\u03D1","&thickapprox;":"\u2248","&thicksim;":"\u223C","&thinsp;":"\u2009","&thkap;":"\u2248","&thksim;":"\u223C","&thorn":"\xFE","&thorn;":"\xFE","&tilde;":"\u02DC","&times":"\xD7","&times;":"\xD7","&timesb;":"\u22A0","&timesbar;":"\u2A31","&timesd;":"\u2A30","&tint;":"\u222D","&toea;":"\u2928","&top;":"\u22A4","&topbot;":"\u2336","&topcir;":"\u2AF1","&topf;":"\uD835\uDD65","&topfork;":"\u2ADA","&tosa;":"\u2929","&tprime;":"\u2034","&trade;":"\u2122","&triangle;":"\u25B5","&triangledown;":"\u25BF","&triangleleft;":"\u25C3","&trianglelefteq;":"\u22B4","&triangleq;":"\u225C","&triangleright;":"\u25B9","&trianglerighteq;":"\u22B5","&tridot;":"\u25EC","&trie;":"\u225C","&triminus;":"\u2A3A","&triplus;":"\u2A39","&trisb;":"\u29CD","&tritime;":"\u2A3B","&trpezium;":"\u23E2","&tscr;":"\uD835\uDCC9","&tscy;":"\u0446","&tshcy;":"\u045B","&tstrok;":"\u0167","&twixt;":"\u226C","&twoheadleftarrow;":"\u219E","&twoheadrightarrow;":"\u21A0","&uArr;":"\u21D1","&uHar;":"\u2963","&uacute":"\xFA","&uacute;":"\xFA","&uarr;":"\u2191","&ubrcy;":"\u045E","&ubreve;":"\u016D","&ucirc":"\xFB","&ucirc;":"\xFB","&ucy;":"\u0443","&udarr;":"\u21C5","&udblac;":"\u0171","&udhar;":"\u296E","&ufisht;":"\u297E","&ufr;":"\uD835\uDD32","&ugrave":"\xF9","&ugrave;":"\xF9","&uharl;":"\u21BF","&uharr;":"\u21BE","&uhblk;":"\u2580","&ulcorn;":"\u231C","&ulcorner;":"\u231C","&ulcrop;":"\u230F","&ultri;":"\u25F8","&umacr;":"\u016B","&uml":"\xA8","&uml;":"\xA8","&uogon;":"\u0173","&uopf;":"\uD835\uDD66","&uparrow;":"\u2191","&updownarrow;":"\u2195","&upharpoonleft;":"\u21BF","&upharpoonright;":"\u21BE","&uplus;":"\u228E","&upsi;":"\u03C5","&upsih;":"\u03D2","&upsilon;":"\u03C5","&upuparrows;":"\u21C8","&urcorn;":"\u231D","&urcorner;":"\u231D","&urcrop;":"\u230E","&uring;":"\u016F","&urtri;":"\u25F9","&uscr;":"\uD835\uDCCA","&utdot;":"\u22F0","&utilde;":"\u0169","&utri;":"\u25B5","&utrif;":"\u25B4","&uuarr;":"\u21C8","&uuml":"\xFC","&uuml;":"\xFC","&uwangle;":"\u29A7","&vArr;":"\u21D5","&vBar;":"\u2AE8","&vBarv;":"\u2AE9","&vDash;":"\u22A8","&vangrt;":"\u299C","&varepsilon;":"\u03F5","&varkappa;":"\u03F0","&varnothing;":"\u2205","&varphi;":"\u03D5","&varpi;":"\u03D6","&varpropto;":"\u221D","&varr;":"\u2195","&varrho;":"\u03F1","&varsigma;":"\u03C2","&varsubsetneq;":"\u228A\uFE00","&varsubsetneqq;":"\u2ACB\uFE00","&varsupsetneq;":"\u228B\uFE00","&varsupsetneqq;":"\u2ACC\uFE00","&vartheta;":"\u03D1","&vartriangleleft;":"\u22B2","&vartriangleright;":"\u22B3","&vcy;":"\u0432","&vdash;":"\u22A2","&vee;":"\u2228","&veebar;":"\u22BB","&veeeq;":"\u225A","&vellip;":"\u22EE","&verbar;":"|","&vert;":"|","&vfr;":"\uD835\uDD33","&vltri;":"\u22B2","&vnsub;":"\u2282\u20D2","&vnsup;":"\u2283\u20D2","&vopf;":"\uD835\uDD67","&vprop;":"\u221D","&vrtri;":"\u22B3","&vscr;":"\uD835\uDCCB","&vsubnE;":"\u2ACB\uFE00","&vsubne;":"\u228A\uFE00","&vsupnE;":"\u2ACC\uFE00","&vsupne;":"\u228B\uFE00","&vzigzag;":"\u299A","&wcirc;":"\u0175","&wedbar;":"\u2A5F","&wedge;":"\u2227","&wedgeq;":"\u2259","&weierp;":"\u2118","&wfr;":"\uD835\uDD34","&wopf;":"\uD835\uDD68","&wp;":"\u2118","&wr;":"\u2240","&wreath;":"\u2240","&wscr;":"\uD835\uDCCC","&xcap;":"\u22C2","&xcirc;":"\u25EF","&xcup;":"\u22C3","&xdtri;":"\u25BD","&xfr;":"\uD835\uDD35","&xhArr;":"\u27FA","&xharr;":"\u27F7","&xi;":"\u03BE","&xlArr;":"\u27F8","&xlarr;":"\u27F5","&xmap;":"\u27FC","&xnis;":"\u22FB","&xodot;":"\u2A00","&xopf;":"\uD835\uDD69","&xoplus;":"\u2A01","&xotime;":"\u2A02","&xrArr;":"\u27F9","&xrarr;":"\u27F6","&xscr;":"\uD835\uDCCD","&xsqcup;":"\u2A06","&xuplus;":"\u2A04","&xutri;":"\u25B3","&xvee;":"\u22C1","&xwedge;":"\u22C0","&yacute":"\xFD","&yacute;":"\xFD","&yacy;":"\u044F","&ycirc;":"\u0177","&ycy;":"\u044B","&yen":"\xA5","&yen;":"\xA5","&yfr;":"\uD835\uDD36","&yicy;":"\u0457","&yopf;":"\uD835\uDD6A","&yscr;":"\uD835\uDCCE","&yucy;":"\u044E","&yuml":"\xFF","&yuml;":"\xFF","&zacute;":"\u017A","&zcaron;":"\u017E","&zcy;":"\u0437","&zdot;":"\u017C","&zeetrf;":"\u2128","&zeta;":"\u03B6","&zfr;":"\uD835\uDD37","&zhcy;":"\u0436","&zigrarr;":"\u21DD","&zopf;":"\uD835\uDD6B","&zscr;":"\uD835\uDCCF","&zwj;":"\u200D","&zwnj;":"\u200C"},_3=WS;function XS(u){return u.replace(/&(#\d+|#x[a-f0-9]+|[a-z]+\d*);?/gi,(D,B)=>{if(typeof _3[D]==="string")return _3[D];if(B.charAt(0)!=="#"||D.charAt(D.length-1)!==";")return D;let A;if(B.charAt(1)==="x")A=parseInt(B.substr(2),16);else A=parseInt(B.substr(1),10);let w="";if(A>=55296&&A<=57343||A>1114111)return"\uFFFD";if(A>65535)A-=65536,w+=String.fromCharCode(A>>>10&1023|55296),A=56320|A&1023;return w+=String.fromCharCode(A),w})}function $0(u){return u.trim().replace(/[<>"'?&]/g,(D)=>{let B=D.charCodeAt(0).toString(16);if(B.length<2)B="0"+B;return"&#x"+B.toUpperCase()+";"})}function c6(u){return"<div>"+$0(u).replace(/\n/g,"<br />")+"</div>"}function M6(u){return u=u.replace(/\r?\n/g,"\x01").replace(/<\!\-\-.*?\-\->/gi," ").replace(/<br\b[^>]*>/gi,`
19
+ `).replace(/<\/?(p|div|table|tr|td|th)\b[^>]*>/gi,`
20
+
21
+ `).replace(/<script\b[^>]*>.*?<\/script\b[^>]*>/gi," ").replace(/^.*<body\b[^>]*>/i,"").replace(/^.*<\/head\b[^>]*>/i,"").replace(/^.*<\!doctype\b[^>]*>/i,"").replace(/<\/body\b[^>]*>.*$/i,"").replace(/<\/html\b[^>]*>.*$/i,"").replace(/<a\b[^>]*href\s*=\s*["']?([^\s"']+)[^>]*>/gi," ($1) ").replace(/<\/?(span|em|i|strong|b|u|a)\b[^>]*>/gi,"").replace(/<li\b[^>]*>[\n\u0001\s]*/gi,"* ").replace(/<hr\b[^>]*>/g,`
22
+ -------------
23
+ `).replace(/<[^>]*>/g," ").replace(/\u0001/g,`
24
+ `).replace(/[ \t]+/g," ").replace(/^\s+$/gm,"").replace(/\n\n+/g,`
25
+
26
+ `).replace(/^\n+/,`
27
+ `).replace(/\n+$/,`
28
+ `),u=XS(u),u}function L6(u){return[].concat(u.name||[]).concat(u.name?`<${u.address}>`:u.address).join(" ")}function f3(u){let D=[],B=(A,w)=>{if(w)D.push(", ");if(A.group){let F=`${A.name}:`,N=";";D.push(F),A.group.forEach(B),D.push(N)}else D.push(L6(A))};return u.forEach(B),D.join("")}function E6(u){return`<a href="mailto:${$0(u.address)}" class="postal-email-address">${$0(u.name||`<${u.address}>`)}</a>`}function b3(u){let D=[],B=(A,w)=>{if(w)D.push('<span class="postal-email-address-separator">, </span>');if(A.group){let F=`<span class="postal-email-address-group">${$0(A.name)}:</span>`,N='<span class="postal-email-address-group">;</span>';D.push(F),A.group.forEach(B),D.push(N)}else D.push(E6(A))};return u.forEach(B),D.join(" ")}function YS(u,D,B){u=(u||"").toString(),D=D||76;let A=0,w=u.length,F="",N,G;while(A<w){if(N=u.substr(A,D),N.length<D){F+=N;break}if(G=N.match(/^[^\n\r]*(\r?\n|\r)/)){N=G[0],F+=N,A+=N.length;continue}else if((G=N.match(/(\s+)[^\s]*$/))&&G[0].length-(B?(G[1]||"").length:0)<N.length)N=N.substr(0,N.length-(G[0].length-(B?(G[1]||"").length:0)));else if(G=u.substr(A+N.length).match(/^[^\s]+(\s*)/))N=N+G[0].substr(0,G[0].length-(!B?(G[1]||"").length:0));if(F+=N,A+=N.length,A<w)F+=`\r
29
+ `}return F}function j3(u){let D=[];if(u.from)D.push({key:"From",val:L6(u.from)});if(u.subject)D.push({key:"Subject",val:u.subject});if(u.date){let N={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},G=typeof Intl>"u"?u.date:new Intl.DateTimeFormat("default",N).format(new Date(u.date));D.push({key:"Date",val:G})}if(u.to&&u.to.length)D.push({key:"To",val:f3(u.to)});if(u.cc&&u.cc.length)D.push({key:"Cc",val:f3(u.cc)});if(u.bcc&&u.bcc.length)D.push({key:"Bcc",val:f3(u.bcc)});let B=D.map((N)=>N.key.length).reduce((N,G)=>{return G>N?G:N},0);D=D.flatMap((N)=>{let G=B-N.key.length,$=`${N.key}: ${" ".repeat(G)}`,z=`${" ".repeat(N.key.length+1)} ${" ".repeat(G)}`;return YS(N.val,80,!0).split(/\r?\n/).map((Z)=>Z.trim()).map((Z,J)=>`${J?z:$}${Z}`)});let A=D.map((N)=>N.length).reduce((N,G)=>{return G>N?G:N},0),w="-".repeat(A);return`
30
+ ${w}
31
+ ${D.join(`
32
+ `)}
33
+ ${w}
34
+ `}function l3(u){let D=[];if(u.from)D.push(`<div class="postal-email-header-key">From</div><div class="postal-email-header-value">${E6(u.from)}</div>`);if(u.subject)D.push(`<div class="postal-email-header-key">Subject</div><div class="postal-email-header-value postal-email-header-subject">${$0(u.subject)}</div>`);if(u.date){let A={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1},w=typeof Intl>"u"?u.date:new Intl.DateTimeFormat("default",A).format(new Date(u.date));D.push(`<div class="postal-email-header-key">Date</div><div class="postal-email-header-value postal-email-header-date" data-date="${$0(u.date)}">${$0(w)}</div>`)}if(u.to&&u.to.length)D.push(`<div class="postal-email-header-key">To</div><div class="postal-email-header-value">${b3(u.to)}</div>`);if(u.cc&&u.cc.length)D.push(`<div class="postal-email-header-key">Cc</div><div class="postal-email-header-value">${b3(u.cc)}</div>`);if(u.bcc&&u.bcc.length)D.push(`<div class="postal-email-header-key">Bcc</div><div class="postal-email-header-value">${b3(u.bcc)}</div>`);return`<div class="postal-email-header">${D.length?'<div class="postal-email-header-row">':""}${D.join(`</div>
35
+ <div class="postal-email-header-row">`)}${D.length?"</div>":""}</div>`}function hS(u,D){let B=!1,A="text",w,F=[],N={address:[],comment:[],group:[],text:[],textWasQuoted:[]},G,$,z=!1;for(G=0,$=u.length;G<$;G++){let Q=u[G],Z=G?u[G-1]:null;if(Q.type==="operator")switch(Q.value){case"<":A="address",z=!1;break;case"(":A="comment",z=!1;break;case":":A="group",B=!0,z=!1;break;case'"':z=!z,A="text";break;default:A="text",z=!1;break}else if(Q.value){if(A==="address")Q.value=Q.value.replace(/^[^<]*<\s*/,"");if(Z&&Z.noBreak&&N[A].length){if(N[A][N[A].length-1]+=Q.value,A==="text"&&z)N.textWasQuoted[N.textWasQuoted.length-1]=!0}else if(N[A].push(Q.value),A==="text")N.textWasQuoted.push(z)}}if(!N.text.length&&N.comment.length)N.text=N.comment,N.comment=[];if(B){N.text=N.text.join(" ");let Q=[];if(N.group.length)d3(N.group.join(","),{_depth:D+1}).forEach((J)=>{if(J.group)Q=Q.concat(J.group);else Q.push(J)});F.push({name:v0(N.text||w&&w.name),group:Q})}else{if(!N.address.length&&N.text.length){for(G=N.text.length-1;G>=0;G--)if(!N.textWasQuoted[G]&&N.text[G].match(/^[^@\s]+@[^@\s]+$/)){N.address=N.text.splice(G,1),N.textWasQuoted.splice(G,1);break}let Q=function(Z){if(!N.address.length)return N.address=[Z.trim()]," ";else return Z};if(!N.address.length){for(G=N.text.length-1;G>=0;G--)if(!N.textWasQuoted[G]){if(N.text[G]=N.text[G].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,Q).trim(),N.address.length)break}}}if(!N.text.length&&N.comment.length)N.text=N.comment,N.comment=[];if(N.address.length>1)N.text=N.text.concat(N.address.splice(1));if(N.text=N.text.join(" "),N.address=N.address.join(" "),!N.address&&/^=\?[^=]+?=$/.test(N.text.trim())){let Q=v0(N.text);if(/<[^<>]+@[^<>]+>/.test(Q)){let Z=d3(Q);if(Z&&Z.length)return Z}return[{address:"",name:Q}]}if(w={address:N.address||N.text||"",name:v0(N.text||N.address||"")},w.address===w.name)if((w.address||"").match(/@/))w.name="";else w.address="";F.push(w)}return F}class O6{constructor(u){this.str=(u||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let u=[];for(let D=0,B=this.str.length;D<B;D++){let A=this.str.charAt(D),w=D<B-1?this.str.charAt(D+1):null;this.checkChar(A,w)}return this.list.forEach((D)=>{if(D.value=(D.value||"").toString().trim(),D.value)u.push(D)}),u}checkChar(u,D){if(this.escaped);else if(u===this.operatorExpecting){if(this.node={type:"operator",value:u},D&&![" ","\t","\r",`
36
+ `,",",";"].includes(D))this.node.noBreak=!0;this.list.push(this.node),this.node=null,this.operatorExpecting="",this.escaped=!1;return}else if(!this.operatorExpecting&&u in this.operators){this.node={type:"operator",value:u},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[u],this.escaped=!1;return}else if(this.operatorExpecting==='"'&&u==="\\"){this.escaped=!0;return}if(!this.node)this.node={type:"text",value:""},this.list.push(this.node);if(u===`
37
+ `)u=" ";if(u.charCodeAt(0)>=33||[" ","\t"].includes(u))this.node.value+=u;this.escaped=!1}}var KS=50;function d3(u,D){D=D||{};let B=D._depth||0;if(B>KS)return[];let w=new O6(u).tokenize(),F=[],N=[],G=[];if(w.forEach(($)=>{if($.type==="operator"&&($.value===","||$.value===";")){if(N.length)F.push(N);N=[]}else N.push($)}),N.length)F.push(N);if(F.forEach(($)=>{if($=hS($,B),$.length)G=G.concat($)}),D.flatten){let $=[],z=(Q)=>{Q.forEach((Z)=>{if(Z.group)return z(Z.group);else $.push(Z)})};return z(G),$}return G}var r1=d3;function C6(u){var D="",B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=new Uint8Array(u),w=A.byteLength,F=w%3,N=w-F,G,$,z,Q,Z;for(var J=0;J<N;J=J+3)Z=A[J]<<16|A[J+1]<<8|A[J+2],G=(Z&16515072)>>18,$=(Z&258048)>>12,z=(Z&4032)>>6,Q=Z&63,D+=B[G]+B[$]+B[z]+B[Q];if(F==1)Z=A[N],G=(Z&252)>>2,$=(Z&3)<<4,D+=B[G]+B[$]+"==";else if(F==2)Z=A[N]<<8|A[N+1],G=(Z&64512)>>10,$=(Z&1008)>>4,z=(Z&15)<<2,D+=B[G]+B[$]+B[z]+"=";return D}var SS=256,xS=2097152;function r3(u){return u.replace(/-(.)/g,(D,B)=>B.toUpperCase())}class P0{static parse(u,D){return new P0(D).parse(u)}constructor(u){this.options=u||{},this.mimeOptions={maxNestingDepth:this.options.maxNestingDepth||SS,maxHeadersSize:this.options.maxHeadersSize||xS},this.root=this.currentNode=new Su({postalMime:this,...this.mimeOptions}),this.boundaries=[],this.textContent={},this.attachments=[],this.attachmentEncoding=(this.options.attachmentEncoding||"").toString().replace(/[-_\s]/g,"").trim().toLowerCase()||"arraybuffer",this.started=!1}async finalize(){await this.root.finalize()}async processLine(u,D){let B=this.boundaries;if(B.length&&u.length>2&&u[0]===45&&u[1]===45)for(let A=B.length-1;A>=0;A--){let w=B[A];if(u.length<w.value.length+2)continue;let F=!0;for(let z=0;z<w.value.length;z++)if(u[z+2]!==w.value[z]){F=!1;break}if(!F)continue;let N=w.value.length+2,G=!1;if(u.length>=w.value.length+4&&u[w.value.length+2]===45&&u[w.value.length+3]===45)G=!0,N=w.value.length+4;let $=!0;for(let z=N;z<u.length;z++)if(u[z]!==32&&u[z]!==9){$=!1;break}if(!$)continue;if(G)await w.node.finalize(),this.currentNode=w.node.parentNode||this.root;else await w.node.finalizeChildNodes(),this.currentNode=new Su({postalMime:this,parentNode:w.node,parentMultipartType:w.node.contentType.multipart,...this.mimeOptions});if(D)return this.finalize();return}if(this.currentNode.feed(u),D)return this.finalize()}readLine(){let u=this.readPos,D=this.readPos;while(this.readPos<this.av.length){let B=this.av[this.readPos++];if(B!==13&&B!==10)D=this.readPos;if(B===10)return{bytes:new Uint8Array(this.buf,u,D-u),done:this.readPos>=this.av.length}}return{bytes:new Uint8Array(this.buf,u,D-u),done:this.readPos>=this.av.length}}async processNodeTree(){let u={},D=new Set,B=this.textMap=new Map,A=this.forceRfc822Attachments(),w=async(F,N,G)=>{if(N=N||!1,G=G||!1,!F.contentType.multipart){if(this.isInlineMessageRfc822(F)&&!A){let $=new P0;if(F.subMessage=await $.parse(F.content),!B.has(F))B.set(F,{});let z=B.get(F);if(F.subMessage.text||!F.subMessage.html)z.plain=z.plain||[],z.plain.push({type:"subMessage",value:F.subMessage}),D.add("plain");if(F.subMessage.html)z.html=z.html||[],z.html.push({type:"subMessage",value:F.subMessage}),D.add("html");if($.textMap)$.textMap.forEach((Q,Z)=>{B.set(Z,Q)});for(let Q of F.subMessage.attachments||[])this.attachments.push(Q)}else if(this.isInlineTextNode(F)){let $=F.contentType.parsed.value.substr(F.contentType.parsed.value.indexOf("/")+1),z=N||F;if(!B.has(z))B.set(z,{});let Q=B.get(z);Q[$]=Q[$]||[],Q[$].push({type:"text",value:F.getTextContent()}),D.add($)}else if(F.content){let $=F.contentDisposition?.parsed?.params?.filename||F.contentType.parsed.params.name||null,z={filename:$?v0($):null,mimeType:F.contentType.parsed.value,disposition:F.contentDisposition?.parsed?.value||null};if(G&&F.contentId)z.related=!0;if(F.contentDescription)z.description=F.contentDescription;if(F.contentId)z.contentId=F.contentId;switch(F.contentType.parsed.value){case"text/calendar":case"application/ics":{if(F.contentType.parsed.params.method)z.method=F.contentType.parsed.params.method.toString().toUpperCase().trim();let Q=F.getTextContent().replace(/\r?\n/g,`
38
+ `).replace(/\n*$/,`
39
+ `);z.content=n2.encode(Q);break}default:z.content=F.content}this.attachments.push(z)}}else if(F.contentType.multipart==="alternative")N=F;else if(F.contentType.multipart==="related")G=F;for(let $ of F.childNodes)await w($,N,G)};await w(this.root,!1,!1),B.forEach((F)=>{D.forEach((N)=>{if(!u[N])u[N]=[];if(F[N])F[N].forEach((G)=>{switch(G.type){case"text":u[N].push(G.value);break;case"subMessage":switch(N){case"html":u[N].push(l3(G.value));break;case"plain":u[N].push(j3(G.value));break}break}});else{let G;switch(N){case"html":G="plain";break;case"plain":G="html";break}(F[G]||[]).forEach(($)=>{switch($.type){case"text":switch(N){case"html":u[N].push(c6($.value));break;case"plain":u[N].push(M6($.value));break}break;case"subMessage":switch(N){case"html":u[N].push(l3($.value));break;case"plain":u[N].push(j3($.value));break}break}})}})}),Object.keys(u).forEach((F)=>{u[F]=u[F].join(`
40
+ `)}),this.textContent=u}isInlineTextNode(u){if(u.contentDisposition?.parsed?.value==="attachment")return!1;switch(u.contentType.parsed?.value){case"text/html":case"text/plain":return!0;case"text/calendar":case"text/csv":default:return!1}}isInlineMessageRfc822(u){if(u.contentType.parsed?.value!=="message/rfc822")return!1;return(u.contentDisposition?.parsed?.value||(this.options.rfc822Attachments?"attachment":"inline"))==="inline"}forceRfc822Attachments(){if(this.options.forceRfc822Attachments)return!0;let u=!1,D=(B)=>{if(!B.contentType.multipart){if(B.contentType.parsed&&["message/delivery-status","message/feedback-report"].includes(B.contentType.parsed.value))u=!0}for(let A of B.childNodes)D(A)};return D(this.root),u}async resolveStream(u){let D=0,B=[],A=u.getReader();while(!0){let{done:N,value:G}=await A.read();if(N)break;B.push(G),D+=G.length}let w=new Uint8Array(D),F=0;for(let N of B)w.set(N,F),F+=N.length;return w}async parse(u){if(this.started)throw Error("Can not reuse parser, create a new PostalMime object");if(this.started=!0,u&&typeof u.getReader==="function")u=await this.resolveStream(u);if(u=u||new ArrayBuffer(0),typeof u==="string")u=n2.encode(u);if(u instanceof Blob||Object.prototype.toString.call(u)==="[object Blob]")u=await p2(u);if(u.buffer instanceof ArrayBuffer)u=new Uint8Array(u).buffer;this.buf=u,this.av=new Uint8Array(u),this.readPos=0;while(this.readPos<this.av.length){let A=this.readLine();await this.processLine(A.bytes,A.done)}await this.processNodeTree();let D={headers:this.root.headers.map((A)=>({key:A.key,originalKey:A.originalKey,value:A.value})).reverse()};for(let A of["from","sender"]){let w=this.root.headers.find((F)=>F.key===A);if(w&&w.value){let F=r1(w.value);if(F&&F.length)D[A]=F[0]}}for(let A of["delivered-to","return-path"]){let w=this.root.headers.find((F)=>F.key===A);if(w&&w.value){let F=r1(w.value);if(F&&F.length&&F[0].address){let N=r3(A);D[N]=F[0].address}}}for(let A of["to","cc","bcc","reply-to"]){let w=this.root.headers.filter((N)=>N.key===A),F=[];if(w.filter((N)=>N&&N.value).map((N)=>r1(N.value)).forEach((N)=>F=F.concat(N||[])),F&&F.length){let N=r3(A);D[N]=F}}for(let A of["subject","message-id","in-reply-to","references"]){let w=this.root.headers.find((F)=>F.key===A);if(w&&w.value){let F=r3(A);D[F]=v0(w.value)}}let B=this.root.headers.find((A)=>A.key==="date");if(B){let A=new Date(B.value);if(A.toString()==="Invalid Date")A=B.value;else A=A.toISOString();D.date=A}if(this.textContent?.html)D.html=this.textContent.html;if(this.textContent?.plain)D.text=this.textContent.plain;switch(D.attachments=this.attachments,D.headerLines=(this.root.rawHeaderLines||[]).slice().reverse(),this.attachmentEncoding){case"arraybuffer":break;case"base64":for(let w of D.attachments||[])if(w?.content)w.content=C6(w.content),w.encoding="base64";break;case"utf8":let A=new TextDecoder("utf8");for(let w of D.attachments||[])if(w?.content)w.content=A.decode(w.content),w.encoding="utf8";break;default:throw Error("Unknown attachment encoding")}return D}}var FY=X(oX(),1),cH="6.12.3";function A2(u){let D=new URLSearchParams;if(u.limit!==void 0)D.set("limit",u.limit.toString());if("after"in u&&u.after!==void 0)D.set("after",u.after);if("before"in u&&u.before!==void 0)D.set("before",u.before);return D.toString()}var MH=class{constructor(u){this.resend=u}async create(u,D={}){return await this.resend.post("/api-keys",u,D)}async list(u={}){let D=A2(u),B=D?`/api-keys?${D}`:"/api-keys";return await this.resend.get(B)}async remove(u){return await this.resend.delete(`/api-keys/${u}`)}},LH=class{constructor(u){this.resend=u}async get(u){return await this.resend.get(`/automations/${u.automationId}/runs/${u.runId}`)}async list(u){let D=A2(u),B=new URLSearchParams(D);if(u.status){let F=Array.isArray(u.status)?u.status.join(","):u.status;B.set("status",F)}let A=B.toString(),w=A?`/automations/${u.automationId}/runs?${A}`:`/automations/${u.automationId}/runs`;return await this.resend.get(w)}};function NY(u){switch(u.type){case"trigger":return{key:u.key,type:u.type,config:{event_name:u.config.eventName}};case"delay":return{key:u.key,type:u.type,config:u.config};case"send_email":return{key:u.key,type:u.type,config:{template:u.config.template,subject:u.config.subject,from:u.config.from,reply_to:u.config.replyTo}};case"wait_for_event":return{key:u.key,type:u.type,config:{event_name:u.config.eventName,timeout:u.config.timeout,filter_rule:u.config.filterRule}};case"condition":return{key:u.key,type:u.type,config:u.config};case"contact_update":return{key:u.key,type:u.type,config:{first_name:u.config.firstName,last_name:u.config.lastName,unsubscribed:u.config.unsubscribed,properties:u.config.properties}};case"contact_delete":return{key:u.key,type:u.type,config:u.config};case"add_to_segment":return{key:u.key,type:u.type,config:{segment_id:u.config.segmentId}}}}function GY(u){return{from:u.from,to:u.to,type:u.type}}function EH(u){return{name:u.name,status:u.status,steps:u.steps.map(NY),connections:u.connections.map(GY)}}function OH(u){return{event:u.event,contact_id:u.contactId,email:u.email,payload:u.payload}}var CH=class{constructor(u){this.resend=u,this.runs=new LH(this.resend)}async create(u){return await this.resend.post("/automations",EH(u))}async list(u={}){let D=[A2(u)];if(u.status)D.push(`status=${encodeURIComponent(u.status)}`);let B=D.filter(Boolean).join("&"),A=B?`/automations?${B}`:"/automations";return await this.resend.get(A)}async get(u){return await this.resend.get(`/automations/${u}`)}async remove(u){return await this.resend.delete(`/automations/${u}`)}async update(u,D){let B={};if(D.name!==void 0)B.name=D.name;if(D.status!==void 0)B.status=D.status;if(D.steps!==void 0)B.steps=D.steps.map(NY);if(D.connections!==void 0)B.connections=D.connections.map(GY);return await this.resend.patch(`/automations/${u}`,B)}async stop(u){return await this.resend.post(`/automations/${u}/stop`)}};function PH(u){return u?.map((D)=>({content:D.content,filename:D.filename,path:D.path,content_type:D.contentType,content_id:D.contentId}))}function vY(u){return{attachments:PH(u.attachments),bcc:u.bcc,cc:u.cc,from:u.from,headers:u.headers,html:u.html,reply_to:u.replyTo,scheduled_at:u.scheduledAt,subject:u.subject,tags:u.tags,text:u.text,to:u.to,template:u.template?{id:u.template.id,variables:u.template.variables}:void 0,topic_id:u.topicId}}async function vD(u){let D;try{({render:D}=await import("./chunk-abmx623n.js"))}catch{throw Error("Failed to render React component. Make sure to install `@react-email/render` or `@react-email/components`.")}return D(u)}var kH=class{constructor(u){this.resend=u}async send(u,D){return this.create(u,D)}async create(u,D){let B=[];for(let A of u){if(A.react)A.html=await vD(A.react),A.react=void 0;B.push(vY(A))}return await this.resend.post("/emails/batch",B,{...D,headers:{"x-batch-validation":D?.batchValidation??"strict",...D?.headers}})}},yH=class{constructor(u){this.resend=u}async create(u,D={}){if(u.react)u.html=await vD(u.react);return await this.resend.post("/broadcasts",{name:u.name,segment_id:u.segmentId,audience_id:u.audienceId,preview_text:u.previewText,from:u.from,html:u.html,reply_to:u.replyTo,subject:u.subject,text:u.text,topic_id:u.topicId,send:u.send,scheduled_at:u.scheduledAt},D)}async send(u,D){return await this.resend.post(`/broadcasts/${u}/send`,{scheduled_at:D?.scheduledAt})}async list(u={}){let D=A2(u),B=D?`/broadcasts?${D}`:"/broadcasts";return await this.resend.get(B)}async get(u){return await this.resend.get(`/broadcasts/${u}`)}async remove(u){return await this.resend.delete(`/broadcasts/${u}`)}async update(u,D){if(D.react)D.html=await vD(D.react);return await this.resend.patch(`/broadcasts/${u}`,{name:D.name,segment_id:D.segmentId,audience_id:D.audienceId,from:D.from,html:D.html,text:D.text,subject:D.subject,reply_to:D.replyTo,preview_text:D.previewText,topic_id:D.topicId})}};function eX(u){return{id:u.id,key:u.key,createdAt:u.created_at,type:u.type,fallbackValue:u.fallback_value}}function uY(u){if("key"in u)return{key:u.key,type:u.type,fallback_value:u.fallbackValue};return{fallback_value:u.fallbackValue}}var VH=class{constructor(u){this.resend=u}async create(u){let D=uY(u);return await this.resend.post("/contact-properties",D)}async list(u={}){let D=A2(u),B=D?`/contact-properties?${D}`:"/contact-properties",A=await this.resend.get(B);if(A.data)return{data:{...A.data,data:A.data.data.map((w)=>eX(w))},headers:A.headers,error:null};return A}async get(u){if(!u)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let D=await this.resend.get(`/contact-properties/${u}`);if(D.data)return{data:{object:"contact_property",...eX(D.data)},headers:D.headers,error:null};return D}async update(u){if(!u.id)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let D=uY(u);return await this.resend.patch(`/contact-properties/${u.id}`,D)}async remove(u){if(!u)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};return await this.resend.delete(`/contact-properties/${u}`)}},TH=class{constructor(u){this.resend=u}async list(u){if(!u.contactId&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let D=u.email?u.email:u.contactId,B=A2(u),A=B?`/contacts/${D}/segments?${B}`:`/contacts/${D}/segments`;return await this.resend.get(A)}async add(u){if(!u.contactId&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let D=u.email?u.email:u.contactId;return this.resend.post(`/contacts/${D}/segments/${u.segmentId}`)}async remove(u){if(!u.contactId&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let D=u.email?u.email:u.contactId;return this.resend.delete(`/contacts/${D}/segments/${u.segmentId}`)}},IH=class{constructor(u){this.resend=u}async update(u){if(!u.id&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let D=u.email?u.email:u.id;return this.resend.patch(`/contacts/${D}/topics`,u.topics)}async list(u){if(!u.id&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let D=u.email?u.email:u.id,B=A2(u),A=B?`/contacts/${D}/topics?${B}`:`/contacts/${D}/topics`;return this.resend.get(A)}},qH=class{constructor(u){this.resend=u,this.topics=new IH(this.resend),this.segments=new TH(this.resend)}async create(u,D={}){if("audienceId"in u){if("segments"in u||"topics"in u)return{data:null,headers:null,error:{message:"`audienceId` is deprecated, and cannot be used together with `segments` or `topics`. Use `segments` instead to add one or more segments to the new contact.",statusCode:null,name:"invalid_parameter"}};return await this.resend.post(`/audiences/${u.audienceId}/contacts`,{unsubscribed:u.unsubscribed,email:u.email,first_name:u.firstName,last_name:u.lastName,properties:u.properties},D)}return await this.resend.post("/contacts",{unsubscribed:u.unsubscribed,email:u.email,first_name:u.firstName,last_name:u.lastName,properties:u.properties,segments:u.segments,topics:u.topics},D)}async list(u={}){let D=u.segmentId??u.audienceId;if(!D){let w=A2(u),F=w?`/contacts?${w}`:"/contacts";return await this.resend.get(F)}let B=A2(u),A=B?`/segments/${D}/contacts?${B}`:`/segments/${D}/contacts`;return await this.resend.get(A)}async get(u){if(typeof u==="string")return this.resend.get(`/contacts/${u}`);if(!u.id&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};if(!u.audienceId)return this.resend.get(`/contacts/${u?.email?u?.email:u?.id}`);return this.resend.get(`/audiences/${u.audienceId}/contacts/${u?.email?u?.email:u?.id}`)}async update(u){if(!u.id&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};if(!u.audienceId)return await this.resend.patch(`/contacts/${u?.email?u?.email:u?.id}`,{unsubscribed:u.unsubscribed,first_name:u.firstName,last_name:u.lastName,properties:u.properties});return await this.resend.patch(`/audiences/${u.audienceId}/contacts/${u?.email?u?.email:u?.id}`,{unsubscribed:u.unsubscribed,first_name:u.firstName,last_name:u.lastName,properties:u.properties})}async remove(u){if(typeof u==="string")return this.resend.delete(`/contacts/${u}`);if(!u.id&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};if(!u.audienceId)return this.resend.delete(`/contacts/${u?.email?u?.email:u?.id}`);return this.resend.delete(`/audiences/${u.audienceId}/contacts/${u?.email?u?.email:u?.id}`)}};function mH(u){return{name:u.name,region:u.region,custom_return_path:u.customReturnPath,capabilities:u.capabilities,open_tracking:u.openTracking,click_tracking:u.clickTracking,tls:u.tls,tracking_subdomain:u.trackingSubdomain}}var gH=class{constructor(u){this.resend=u}async create(u,D={}){return await this.resend.post("/domains",mH(u),D)}async list(u={}){let D=A2(u),B=D?`/domains?${D}`:"/domains";return await this.resend.get(B)}async get(u){return await this.resend.get(`/domains/${u}`)}async update(u){return await this.resend.patch(`/domains/${u.id}`,{click_tracking:u.clickTracking,open_tracking:u.openTracking,tls:u.tls,capabilities:u.capabilities,tracking_subdomain:u.trackingSubdomain})}async remove(u){return await this.resend.delete(`/domains/${u}`)}async verify(u){return await this.resend.post(`/domains/${u}/verify`)}},_H=class{constructor(u){this.resend=u}async get(u){let{emailId:D,id:B}=u;return await this.resend.get(`/emails/${D}/attachments/${B}`)}async list(u){let{emailId:D}=u,B=A2(u),A=B?`/emails/${D}/attachments?${B}`:`/emails/${D}/attachments`;return await this.resend.get(A)}},fH=class{constructor(u){this.resend=u}async get(u){let{emailId:D,id:B}=u;return await this.resend.get(`/emails/receiving/${D}/attachments/${B}`)}async list(u){let{emailId:D}=u,B=A2(u),A=B?`/emails/receiving/${D}/attachments?${B}`:`/emails/receiving/${D}/attachments`;return await this.resend.get(A)}},bH=class{constructor(u){this.resend=u,this.attachments=new fH(u)}async get(u){return await this.resend.get(`/emails/receiving/${u}`)}async list(u={}){let D=A2(u),B=D?`/emails/receiving?${D}`:"/emails/receiving";return await this.resend.get(B)}async forward(u){let{emailId:D,to:B,from:A}=u,w=u.passthrough!==!1,F=await this.get(D);if(F.error)return{data:null,error:F.error,headers:F.headers};let N=F.data,G=N.subject||"(no subject)";if(w)return this.forwardPassthrough(N,{to:B,from:A,subject:G});let $=G.startsWith("Fwd:")?G:`Fwd: ${G}`;return this.forwardWrapped(N,{to:B,from:A,subject:$,text:"text"in u?u.text:void 0,html:"html"in u?u.html:void 0})}async forwardPassthrough(u,D){let{to:B,from:A,subject:w}=D;if(!u.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let F=await fetch(u.raw.download_url);if(!F.ok)return{data:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:F.status},headers:null};let N=await F.text(),G=await P0.parse(N,{attachmentEncoding:"base64"}),$=G.attachments.map((z)=>{let Q=z.contentId?z.contentId.replace(/^<|>$/g,""):void 0;return{filename:z.filename,content:z.content.toString(),content_type:z.mimeType,content_id:Q||void 0}});return await this.resend.post("/emails",{from:A,to:B,subject:w,text:G.text||void 0,html:G.html||void 0,attachments:$.length>0?$:void 0})}async forwardWrapped(u,D){let{to:B,from:A,subject:w,text:F,html:N}=D;if(!u.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let G=await fetch(u.raw.download_url);if(!G.ok)return{data:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:G.status},headers:null};let $=await G.text();return await this.resend.post("/emails",{from:A,to:B,subject:w,text:F,html:N,attachments:[{filename:"forwarded_message.eml",content:Buffer.from($).toString("base64"),content_type:"message/rfc822"}]})}},jH=class{constructor(u){this.resend=u,this.attachments=new _H(u),this.receiving=new bH(u)}async send(u,D={}){return this.create(u,D)}async create(u,D={}){if(u.react)u.html=await vD(u.react);return await this.resend.post("/emails",vY(u),D)}async get(u){return await this.resend.get(`/emails/${u}`)}async list(u={}){let D=A2(u),B=D?`/emails?${D}`:"/emails";return await this.resend.get(B)}async update(u){return await this.resend.patch(`/emails/${u.id}`,{scheduled_at:u.scheduledAt})}async cancel(u){return await this.resend.post(`/emails/${u}/cancel`)}},lH=class{constructor(u){this.resend=u}async send(u){return await this.resend.post("/events/send",OH(u))}async create(u){return await this.resend.post("/events",u)}async get(u){return await this.resend.get(`/events/${encodeURIComponent(u)}`)}async list(u={}){let D=A2(u),B=D?`/events?${D}`:"/events";return await this.resend.get(B)}async update(u,D){return await this.resend.patch(`/events/${encodeURIComponent(u)}`,D)}async remove(u){return await this.resend.delete(`/events/${encodeURIComponent(u)}`)}},dH=class{constructor(u){this.resend=u}async list(u={}){let D=A2(u),B=D?`/logs?${D}`:"/logs";return await this.resend.get(B)}async get(u){return await this.resend.get(`/logs/${u}`)}},rH=class{constructor(u){this.resend=u}async create(u,D={}){return await this.resend.post("/segments",u,D)}async list(u={}){let D=A2(u),B=D?`/segments?${D}`:"/segments";return await this.resend.get(B)}async get(u){return await this.resend.get(`/segments/${u}`)}async remove(u){return await this.resend.delete(`/segments/${u}`)}};function iH(u={}){let D=new URLSearchParams;if(u.before)D.set("before",u.before);if(u.after)D.set("after",u.after);if(u.limit)D.set("limit",u.limit.toString());return D.size>0?`?${D.toString()}`:""}function nH(u){return u?.map((D)=>({key:D.key,type:D.type,fallback_value:D.fallbackValue}))}function DY(u){return{name:"name"in u?u.name:void 0,subject:u.subject,html:u.html,text:u.text,alias:u.alias,from:u.from,reply_to:u.replyTo,variables:nH(u.variables)}}var BY=class{constructor(u,D){this.promise=u,this.publishFn=D}then(u,D){return this.promise.then(u,D)}async publish(){let{data:u,error:D}=await this.promise;if(D)return{data:null,headers:null,error:D};return this.publishFn(u.id)}},pH=class{constructor(u){this.resend=u}create(u){return new BY(this.performCreate(u),this.publish.bind(this))}async performCreate(u){if(u.react){if(!this.renderAsync)try{let{renderAsync:D}=await import("./chunk-abmx623n.js");this.renderAsync=D}catch{throw Error("Failed to render React component. Make sure to install `@react-email/render`")}u.html=await this.renderAsync(u.react)}return this.resend.post("/templates",DY(u))}async remove(u){return await this.resend.delete(`/templates/${u}`)}async get(u){return await this.resend.get(`/templates/${u}`)}async list(u={}){return this.resend.get(`/templates${iH(u)}`)}duplicate(u){return new BY(this.resend.post(`/templates/${u}/duplicate`),this.publish.bind(this))}async publish(u){return await this.resend.post(`/templates/${u}/publish`)}async update(u,D){return await this.resend.patch(`/templates/${u}`,DY(D))}},aH=class{constructor(u){this.resend=u}async create(u){let{defaultSubscription:D,...B}=u;return await this.resend.post("/topics",{...B,default_subscription:D})}async list(){return await this.resend.get("/topics")}async get(u){if(!u)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};return await this.resend.get(`/topics/${u}`)}async update(u){if(!u.id)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};return await this.resend.patch(`/topics/${u.id}`,u)}async remove(u){if(!u)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};return await this.resend.delete(`/topics/${u}`)}},sH=class{constructor(u){this.resend=u}async create(u,D={}){return await this.resend.post("/webhooks",u,D)}async get(u){return await this.resend.get(`/webhooks/${u}`)}async list(u={}){let D=A2(u),B=D?`/webhooks?${D}`:"/webhooks";return await this.resend.get(B)}async update(u,D){return await this.resend.patch(`/webhooks/${u}`,D)}async remove(u){return await this.resend.delete(`/webhooks/${u}`)}verify(u){return new FY.Webhook(u.webhookSecret).verify(u.payload,{"svix-id":u.headers.id,"svix-timestamp":u.headers.timestamp,"svix-signature":u.headers.signature})}},AY="https://api.resend.com",wY=`resend-node:${cH}`,tH=typeof process<"u"&&process.env?process.env.RESEND_BASE_URL||AY:AY,oH=typeof process<"u"&&process.env?process.env.RESEND_USER_AGENT||wY:wY,$Y=class{constructor(u){if(this.key=u,this.segments=new rH(this),this.apiKeys=new MH(this),this.audiences=this.segments,this.automations=new CH(this),this.batch=new kH(this),this.broadcasts=new yH(this),this.contactProperties=new VH(this),this.contacts=new qH(this),this.domains=new gH(this),this.emails=new jH(this),this.events=new lH(this),this.logs=new dH(this),this.templates=new pH(this),this.topics=new aH(this),this.webhooks=new sH(this),!u){if(typeof process<"u"&&process.env)this.key=process.env.RESEND_API_KEY;if(!this.key)throw Error('Missing API key. Pass it to the constructor `new Resend("re_123")`')}this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":oH,"Content-Type":"application/json"})}async fetchRequest(u,D={}){try{let B=await fetch(`${tH}${u}`,D);if(!B.ok)try{let A=await B.text();return{data:null,error:JSON.parse(A),headers:Object.fromEntries(B.headers.entries())}}catch(A){if(A instanceof SyntaxError)return{data:null,error:{name:"application_error",statusCode:B.status,message:"Internal server error. We are unable to process your request right now, please try again later."},headers:Object.fromEntries(B.headers.entries())};let w={message:B.statusText,statusCode:B.status,name:"application_error"};if(A instanceof Error)return{data:null,error:{...w,message:A.message},headers:Object.fromEntries(B.headers.entries())};return{data:null,error:w,headers:Object.fromEntries(B.headers.entries())}}return{data:await B.json(),error:null,headers:Object.fromEntries(B.headers.entries())}}catch{return{data:null,error:{name:"application_error",statusCode:null,message:"Unable to fetch data. The request could not be resolved."},headers:null}}}async post(u,D,B={}){let A=new Headers(this.headers);if(B.headers)for(let[F,N]of new Headers(B.headers).entries())A.set(F,N);if(B.idempotencyKey)A.set("Idempotency-Key",B.idempotencyKey);let w={method:"POST",body:JSON.stringify(D),...B,headers:A};return this.fetchRequest(u,w)}async get(u,D={}){let B=new Headers(this.headers);if(D.headers)for(let[w,F]of new Headers(D.headers).entries())B.set(w,F);let A={method:"GET",...D,headers:B};return this.fetchRequest(u,A)}async put(u,D,B={}){let A=new Headers(this.headers);if(B.headers)for(let[F,N]of new Headers(B.headers).entries())A.set(F,N);let w={method:"PUT",body:JSON.stringify(D),...B,headers:A};return this.fetchRequest(u,w)}async patch(u,D,B={}){let A=new Headers(this.headers);if(B.headers)for(let[F,N]of new Headers(B.headers).entries())A.set(F,N);let w={method:"PATCH",body:JSON.stringify(D),...B,headers:A};return this.fetchRequest(u,w)}async delete(u,D){let B={method:"DELETE",body:JSON.stringify(D),headers:this.headers};return this.fetchRequest(u,B)}};class $D{}class zD extends $D{apiKey;constructor(u=process.env.RESEND_API_KEY){super();this.apiKey=u}async send(u){let D=new $Y(this.apiKey),{data:B,error:A}=await D.emails.send({...u});if(A)return console.error(A),!1;if(B)return!0;return!1}}class zY extends j{driver=new zD;headers={};boot(){}filterRecipients(u){return u}}class ZY extends j{channels={};boot(){}}class JY extends j{root;rootRouter;boot(){}onRequestStart(u){}onRequestEnd(u){}onRequestFail(u,D){}}class QY extends j{rootRouter;boot(){}onRequestStart(u){}onRequestEnd(u){}onRequestFail(u,D){}}class WY extends j{maxFileSize=10485760;boot(){}onLogFileClosed(u){}onLogCreated(u){}}class XY extends j{jobs=[];concurrency=1;boot(){}}class hY{static name="unset";worker=!1;maxAttempts=3;run(...u){}onFail(u,...D){}onSuccess(u,...D){}onDeadletter(u,...D){}static dispatch(...u){if(this.name==="unset")throw Error("Cannot dispatch a job with no name");YY.use().push(this,JSON.stringify(u))}}import eH from"sharp";class ZD{}class JD extends ZD{async resize(u,D){let{height:B,width:A,quality:w,fit:F}=D;return await eH(u).resize(A>0?A:void 0,B>0?B:void 0,{fit:F}).webp({quality:w>0?w:80,force:!0}).toBuffer()}}class KY extends j{driver=new JD;boot(){}}class g0{}var uU={clientId:process.env.GOOGLE_CLIENT_ID,clientSecret:process.env.GOOGLE_CLIENT_SECRET,redirectPath:"/auth/oauth/google/callback",scope:"https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email"};class SY extends g0{config;constructor(u={}){super();this.config={...uU,...u}}getRedirectUrl(){let u=this.config.scope,D=this.config.clientId,B=new URL("https://accounts.google.com/o/oauth2/v2/auth"),A={scope:u,include_granted_scopes:"true",response_type:"code",state:"state_parameter_passthrough_value",redirect_uri:`${process.env.HOST_NAME}/auth/oauth/google/callback`,client_id:D};for(let[F,N]of Object.entries(A))B.searchParams.append(F,N);return B.toString()}async onCallback(u){let D=new URL("https://oauth2.googleapis.com/token");D.searchParams.append("code",u.search.get("code")),D.searchParams.append("client_id",this.config.clientId),D.searchParams.append("client_secret",this.config.clientSecret),D.searchParams.append("grant_type","authorization_code"),D.searchParams.append("redirect_uri",`${process.env.HOST_NAME}${this.config.redirectPath}`);let B=await fetch(D.toString(),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}}),{access_token:A}=await B.json(),F=await(await fetch(`https://www.googleapis.com/oauth2/v3/userinfo?access_token=${A}`)).json();if(!F.email)console.error("Google OAuth error: email not found in user info response",F);return{name:F.name,email:F.email}}}var o2="https://api.x.com/2/",_0="https://api.x.com/labs/2/",e2="https://api.x.com/1.1/",g2="https://upload.x.com/1.1/",xY="https://stream.x.com/1.1/",f0="https://ads-api.x.com/12/",b0="https://ads-api-sandbox.twitter.com/12/";class T8{constructor({realData:u,rateLimit:D,instance:B,queryParams:A,sharedParams:w}){this._maxResultsWhenFetchLast=100,this._realData=u,this._rateLimit=D,this._instance=B,this._queryParams=A,this._sharedParams=w}get _isRateLimitOk(){if(!this._rateLimit)return!0;if(this._rateLimit.reset*1000<Date.now())return!0;return this._rateLimit.remaining>0}makeRequest(u){return this._instance.get(this.getEndpoint(),u,{fullResponse:!0,params:this._sharedParams})}makeNewInstanceFromResult(u,D){return new this.constructor({realData:u.data,rateLimit:u.rateLimit,instance:this._instance,queryParams:D,sharedParams:this._sharedParams})}getEndpoint(){return this._endpoint}injectQueryParams(u){return{...u?{max_results:u}:{},...this._queryParams}}async next(u){let D=this.getNextQueryParams(u),B=await this.makeRequest(D);return this.makeNewInstanceFromResult(B,D)}async fetchNext(u){let D=this.getNextQueryParams(u),B=await this.makeRequest(D);return await this.refreshInstanceFromResult(B,!0),this}async fetchLast(u=1/0){let D=this.getNextQueryParams(this._maxResultsWhenFetchLast),B=0;while(B<u&&this._isRateLimitOk){let A=await this.makeRequest(D);if(await this.refreshInstanceFromResult(A,!0),B+=this.getPageLengthFromRequest(A),this.isFetchLastOver(A))break;D=this.getNextQueryParams(this._maxResultsWhenFetchLast)}return this}get rateLimit(){var u;return{...(u=this._rateLimit)!==null&&u!==void 0?u:{}}}get data(){return this._realData}get done(){return!this.canFetchNextPage(this._realData)}*[Symbol.iterator](){yield*this.getItemArray()}async*[Symbol.asyncIterator](){yield*this.getItemArray();let u=this,D=this.canFetchNextPage(this._realData);while(D&&this._isRateLimitOk&&u.getItemArray().length>0){let B=await u.next(this._maxResultsWhenFetchLast);this.refreshInstanceFromResult({data:B._realData,headers:{},rateLimit:B._rateLimit},!0),D=this.canFetchNextPage(B._realData),yield*B.getItemArray(),u=B}}async*fetchAndIterate(){for(let B of this.getItemArray())yield[B,this];let u=this,D=this.canFetchNextPage(this._realData);while(D&&this._isRateLimitOk&&u.getItemArray().length>0){let B=await u.next(this._maxResultsWhenFetchLast);this.refreshInstanceFromResult({data:B._realData,headers:{},rateLimit:B._rateLimit},!0),D=this.canFetchNextPage(B._realData);for(let A of B.getItemArray())yield[A,B];this._rateLimit=B._rateLimit,u=B}}}class I8 extends T8{async previous(u){let D=this.getPreviousQueryParams(u),B=await this.makeRequest(D);return this.makeNewInstanceFromResult(B,D)}async fetchPrevious(u){let D=this.getPreviousQueryParams(u),B=await this.makeRequest(D);return await this.refreshInstanceFromResult(B,!1),this}}var j0=T8;class w2 extends j0{getNextQueryParams(u){var D;return{...this._queryParams,cursor:(D=this._realData.next_cursor_str)!==null&&D!==void 0?D:this._realData.next_cursor,...u?{count:u}:{}}}isFetchLastOver(u){return!this.canFetchNextPage(u.data)}canFetchNextPage(u){return!this.isNextCursorInvalid(u.next_cursor)||!this.isNextCursorInvalid(u.next_cursor_str)}isNextCursorInvalid(u){return u===void 0||u===0||u===-1||u==="0"||u==="-1"}}class q8 extends w2{constructor(){super(...arguments);this._endpoint="direct_messages/events/list.json"}refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.events.push(...B.events),this._realData.next_cursor=B.next_cursor}getPageLengthFromRequest(u){return u.data.events.length}getItemArray(){return this.events}get events(){return this._realData.events}}class m8 extends w2{constructor(){super(...arguments);this._endpoint="direct_messages/welcome_messages/list.json"}refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.welcome_messages.push(...B.welcome_messages),this._realData.next_cursor=B.next_cursor}getPageLengthFromRequest(u){return u.data.welcome_messages.length}getItemArray(){return this.welcomeMessages}get welcomeMessages(){return this._realData.welcome_messages}}var m;(function(u){u.Jpeg="image/jpeg",u.Mp4="video/mp4",u.Mov="video/quicktime",u.Gif="image/gif",u.Png="image/png",u.Srt="text/plain",u.Webp="image/webp"})(m||(m={}));var u0;(function(u){u.Create="message_create",u.WelcomeCreate="welcome_message"})(u0||(u0={}));var Lu;(function(u){u.Request="request",u.PartialResponse="partial-response",u.Response="response"})(Lu||(Lu={}));class QD extends Error{constructor(){super(...arguments);this.error=!0}}class Eu extends QD{constructor(u,D){super(u);this.type=Lu.Request,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:D})}get request(){return this._options.request}get requestError(){return this._options.requestError}toJSON(){return{type:this.type,error:this.requestError}}}class Ou extends QD{constructor(u,D){super(u);this.type=Lu.PartialResponse,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:D})}get request(){return this._options.request}get response(){return this._options.response}get responseError(){return this._options.responseError}get rawContent(){return this._options.rawContent}toJSON(){return{type:this.type,error:this.responseError}}}class Cu extends QD{constructor(u,D){super(u);if(this.type=Lu.Response,Error.captureStackTrace(this,this.constructor),Object.defineProperty(this,"_options",{value:D}),this.code=D.code,this.headers=D.headers,this.rateLimit=D.rateLimit,D.data&&typeof D.data==="object"&&"error"in D.data&&!D.data.errors){let B={...D.data};B.errors=[{code:z0.InternalError,message:B.error}],this.data=B}else this.data=D.data}get request(){return this._options.request}get response(){return this._options.response}hasErrorCode(...u){let D=this.errors;if(!(D===null||D===void 0?void 0:D.length))return!1;if("code"in D[0])return D.some((w)=>u.includes(w.code));let B=this.data;return u.includes(B.type)}get errors(){var u;return(u=this.data)===null||u===void 0?void 0:u.errors}get rateLimitError(){return this.code===420||this.code===429}get isAuthError(){if(this.code===401)return!0;return this.hasErrorCode(z0.AuthTimestampInvalid,z0.AuthenticationFail,z0.BadAuthenticationData,z0.InvalidOrExpiredToken)}toJSON(){return{type:this.type,code:this.code,error:this.data,rateLimit:this.rateLimit,headers:this.headers}}}var z0;(function(u){u[u.InvalidCoordinates=3]="InvalidCoordinates",u[u.NoLocationFound=13]="NoLocationFound",u[u.AuthenticationFail=32]="AuthenticationFail",u[u.InvalidOrExpiredToken=89]="InvalidOrExpiredToken",u[u.UnableToVerifyCredentials=99]="UnableToVerifyCredentials",u[u.AuthTimestampInvalid=135]="AuthTimestampInvalid",u[u.BadAuthenticationData=215]="BadAuthenticationData",u[u.NoUserMatch=17]="NoUserMatch",u[u.UserNotFound=50]="UserNotFound",u[u.ResourceNotFound=34]="ResourceNotFound",u[u.TweetNotFound=144]="TweetNotFound",u[u.TweetNotVisible=179]="TweetNotVisible",u[u.NotAllowedResource=220]="NotAllowedResource",u[u.MediaIdNotFound=325]="MediaIdNotFound",u[u.TweetNoLongerAvailable=421]="TweetNoLongerAvailable",u[u.TweetViolatedRules=422]="TweetViolatedRules",u[u.TargetUserSuspended=63]="TargetUserSuspended",u[u.YouAreSuspended=64]="YouAreSuspended",u[u.AccountUpdateFailed=120]="AccountUpdateFailed",u[u.NoSelfSpamReport=36]="NoSelfSpamReport",u[u.NoSelfMute=271]="NoSelfMute",u[u.AccountLocked=326]="AccountLocked",u[u.RateLimitExceeded=88]="RateLimitExceeded",u[u.NoDMRightForApp=93]="NoDMRightForApp",u[u.OverCapacity=130]="OverCapacity",u[u.InternalError=131]="InternalError",u[u.TooManyFollowings=161]="TooManyFollowings",u[u.TweetLimitExceeded=185]="TweetLimitExceeded",u[u.DuplicatedTweet=187]="DuplicatedTweet",u[u.TooManySpamReports=205]="TooManySpamReports",u[u.RequestLooksLikeSpam=226]="RequestLooksLikeSpam",u[u.NoWriteRightForApp=261]="NoWriteRightForApp",u[u.TweetActionsDisabled=425]="TweetActionsDisabled",u[u.TweetRepliesRestricted=433]="TweetRepliesRestricted",u[u.NamedParameterMissing=38]="NamedParameterMissing",u[u.InvalidAttachmentUrl=44]="InvalidAttachmentUrl",u[u.TweetTextTooLong=186]="TweetTextTooLong",u[u.MissingUrlParameter=195]="MissingUrlParameter",u[u.NoMultipleGifs=323]="NoMultipleGifs",u[u.InvalidMediaIds=324]="InvalidMediaIds",u[u.InvalidUrl=407]="InvalidUrl",u[u.TooManyTweetAttachments=386]="TooManyTweetAttachments",u[u.StatusAlreadyFavorited=139]="StatusAlreadyFavorited",u[u.FollowRequestAlreadySent=160]="FollowRequestAlreadySent",u[u.CannotUnmuteANonMutedAccount=272]="CannotUnmuteANonMutedAccount",u[u.TweetAlreadyRetweeted=327]="TweetAlreadyRetweeted",u[u.ReplyToDeletedTweet=385]="ReplyToDeletedTweet",u[u.DMReceiverNotFollowingYou=150]="DMReceiverNotFollowingYou",u[u.UnableToSendDM=151]="UnableToSendDM",u[u.MustAllowDMFromAnyone=214]="MustAllowDMFromAnyone",u[u.CannotSendDMToThisUser=349]="CannotSendDMToThisUser",u[u.DMTextTooLong=354]="DMTextTooLong",u[u.SubscriptionAlreadyExists=355]="SubscriptionAlreadyExists",u[u.CallbackUrlNotApproved=415]="CallbackUrlNotApproved",u[u.SuspendedApplication=416]="SuspendedApplication",u[u.OobOauthIsNotAllowed=417]="OobOauthIsNotAllowed"})(z0||(z0={}));var RY;(function(u){u.InvalidRequest="https://developer.x.com/en/support/x-api/error-troubleshooting#invalid-request",u.ClientForbidden="https://developer.x.com/en/support/x-api/error-troubleshooting#client-forbidden",u.UnsupportedAuthentication="https://developer.x.com/en/support/x-api/error-troubleshooting#unsupported-authentication",u.InvalidRules="https://developer.x.com/en/support/x-api/error-troubleshooting#invalid-rules",u.TooManyRules="https://developer.x.com/en/support/x-api/error-troubleshooting#rule-cap",u.DuplicatedRules="https://developer.x.com/en/support/x-api/error-troubleshooting#duplicate-rules",u.RateLimitExceeded="https://developer.x.com/en/support/x-api/error-troubleshooting#usage-capped",u.ConnectionError="https://developer.x.com/en/support/x-api/error-troubleshooting#streaming-connection",u.ClientDisconnected="https://developer.x.com/en/support/x-api/error-troubleshooting#client-disconnected",u.TwitterDisconnectedYou="https://developer.x.com/en/support/x-api/error-troubleshooting#operational-disconnect",u.ResourceNotFound="https://developer.x.com/en/support/x-api/error-troubleshooting#resource-not-found",u.ResourceUnauthorized="https://developer.x.com/en/support/x-api/error-troubleshooting#not-authorized-for-resource",u.DisallowedResource="https://developer.x.com/en/support/x-api/error-troubleshooting#disallowed-resource"})(RY||(RY={}));var c;(function(u){u.Connected="connected",u.ConnectError="connect error",u.ConnectionError="connection error",u.ConnectionClosed="connection closed",u.ConnectionLost="connection lost",u.ReconnectAttempt="reconnect attempt",u.Reconnected="reconnected",u.ReconnectError="reconnect error",u.ReconnectLimitExceeded="reconnect limit exceeded",u.DataKeepAlive="data keep-alive",u.Data="data event content",u.DataError="data twitter error",u.TweetParseError="data tweet parse error",u.Error="stream error"})(c||(c={}));class Pu{constructor(u){this.value=u}}import*as $4 from"fs";var N2={debug:!1,deprecationWarnings:!0,logger:{log:console.log.bind(console)}};function g8(u){let D={value:void 0,promise:u().then((B)=>{return D.value=B,B})};return D}function WD(u){if(Array.isArray(u))return u;return[u]}function UY(u){for(let D of Object.keys(u))if(u[D]===void 0)delete u[D]}function XD(u){return typeof u==="object"&&"errors"in u&&!("data"in u)}function ku(u){if(Array.isArray(u)&&u.length>1)return!0;return u.toString().includes(",")}var HY=new Set;function _8(u){if(typeof console>"u"||!console.warn||!N2.deprecationWarnings)return;let D=`${u.instance}-${u.method}-${u.problem}`;if(HY.has(D))return;let B=`[twitter-api-v2] Deprecation warning: In ${u.instance}.${u.method}() call, ${u.problem}.
41
+ ${u.resolution}.`;console.warn(B),console.warn("To disable this message, import variable TwitterApiV2Settings from twitter-api-v2 and set TwitterApiV2Settings.deprecationWarnings to false."),HY.add(D)}import{EventEmitter as FU}from"events";import{request as DU}from"https";import*as K2 from"zlib";import{EventEmitter as BU}from"events";class cY{constructor(u){this.requestData=u,this.requestErrorHandled=!1,this.responseData=[]}get hrefPathname(){let u=this.requestData.url;return u.hostname+u.pathname}isCompressionDisabled(){return!this.requestData.compression||this.requestData.compression==="identity"}isFormEncodedEndpoint(){return this.requestData.url.href.startsWith("https://api.x.com/oauth/")}createRequestError(u){if(N2.debug)N2.logger.log("Request error:",u);return new Eu("Request failed.",{request:this.req,error:u})}createPartialResponseError(u,D){let A=`Request failed with partial response with HTTP code ${this.res.statusCode}`;if(D)A+=" (connection abruptly closed)";else A+=" (parse error)";return new Ou(A,{request:this.req,response:this.res,responseError:u,rawContent:Buffer.concat(this.responseData).toString()})}formatV1Errors(u){return u.map(({code:D,message:B})=>`${B} (Twitter code ${D})`).join(", ")}formatV2Error(u){return`${u.title}: ${u.detail} (see ${u.type})`}createResponseError({res:u,data:D,rateLimit:B,code:A}){var w;if(N2.debug)N2.logger.log(`Request failed with code ${A}, data:`,D),N2.logger.log("Response headers:",u.headers);let F=`Request failed with code ${A}`;if((w=D===null||D===void 0?void 0:D.errors)===null||w===void 0?void 0:w.length){let N=D.errors;if(typeof N[0]==="object"&&"code"in N[0])F+=" - "+this.formatV1Errors(N);else F+=" - "+this.formatV2Error(D)}return new Cu(F,{code:A,data:D,headers:u.headers,request:this.req,response:u,rateLimit:B})}getResponseDataStream(u){if(this.isCompressionDisabled())return u;let D=(u.headers["content-encoding"]||"identity").trim().toLowerCase();if(D==="br"){let B=K2.createBrotliDecompress({flush:K2.constants.BROTLI_OPERATION_FLUSH,finishFlush:K2.constants.BROTLI_OPERATION_FLUSH});return u.pipe(B),B}if(D==="gzip"){let B=K2.createGunzip({flush:K2.constants.Z_SYNC_FLUSH,finishFlush:K2.constants.Z_SYNC_FLUSH});return u.pipe(B),B}if(D==="deflate"){let B=K2.createInflate({flush:K2.constants.Z_SYNC_FLUSH,finishFlush:K2.constants.Z_SYNC_FLUSH});return u.pipe(B),B}return u}detectResponseType(u){var D,B;if(((D=u.headers["content-type"])===null||D===void 0?void 0:D.includes("application/json"))||((B=u.headers["content-type"])===null||B===void 0?void 0:B.includes("application/problem+json")))return"json";else if(this.isFormEncodedEndpoint())return"url";return"text"}getParsedResponse(u){let D=this.responseData,B=this.requestData.forceParseMode||this.detectResponseType(u);if(B==="buffer")return Buffer.concat(D);else if(B==="text")return Buffer.concat(D).toString();else if(B==="json"){let A=Buffer.concat(D).toString();return A.length?JSON.parse(A):void 0}else if(B==="url"){let A=Buffer.concat(D).toString(),w={};for(let[F,N]of new URLSearchParams(A))w[F]=N;return w}else return}getRateLimitFromResponse(u){let D=void 0;if(u.headers["x-rate-limit-limit"]){if(D={limit:Number(u.headers["x-rate-limit-limit"]),remaining:Number(u.headers["x-rate-limit-remaining"]),reset:Number(u.headers["x-rate-limit-reset"])},u.headers["x-app-limit-24hour-limit"])D.day={limit:Number(u.headers["x-app-limit-24hour-limit"]),remaining:Number(u.headers["x-app-limit-24hour-remaining"]),reset:Number(u.headers["x-app-limit-24hour-reset"])};if(u.headers["x-user-limit-24hour-limit"])D.userDay={limit:Number(u.headers["x-user-limit-24hour-limit"]),remaining:Number(u.headers["x-user-limit-24hour-remaining"]),reset:Number(u.headers["x-user-limit-24hour-reset"])};if(this.requestData.rateLimitSaver)this.requestData.rateLimitSaver(D)}return D}onSocketEventHandler(u,D,B){let A=this.onSocketCloseHandler.bind(this,u);B.on("close",A),D.on("complete",()=>B.off("close",A))}onSocketCloseHandler(u){if(this.req.removeAllListeners("timeout"),this.res)return;if(!this.requestErrorHandled)return u(this.createRequestError(Error("Socket closed without any information.")))}requestErrorHandler(u,D){var B,A;(A=(B=this.requestData).requestEventDebugHandler)===null||A===void 0||A.call(B,"request-error",{requestError:D}),this.requestErrorHandled=!0,u(this.createRequestError(D))}timeoutErrorHandler(){this.requestErrorHandled=!0,this.req.destroy(Error("Request timeout."))}classicResponseHandler(u,D,B){this.res=B;let A=this.getResponseDataStream(B);if(A.on("data",(w)=>this.responseData.push(w)),A.on("end",this.onResponseEndHandler.bind(this,u,D)),A.on("close",this.onResponseCloseHandler.bind(this,u,D)),this.requestData.requestEventDebugHandler)this.requestData.requestEventDebugHandler("response",{res:B}),B.on("aborted",(w)=>this.requestData.requestEventDebugHandler("response-aborted",{error:w})),B.on("error",(w)=>this.requestData.requestEventDebugHandler("response-error",{error:w})),B.on("close",()=>this.requestData.requestEventDebugHandler("response-close",{data:this.responseData})),B.on("end",()=>this.requestData.requestEventDebugHandler("response-end"))}onResponseEndHandler(u,D){let B=this.getRateLimitFromResponse(this.res),A;try{A=this.getParsedResponse(this.res)}catch(F){D(this.createPartialResponseError(F,!1));return}let w=this.res.statusCode;if(w>=400){D(this.createResponseError({data:A,res:this.res,rateLimit:B,code:w}));return}if(N2.debug)N2.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]: Request succeeds with code ${this.res.statusCode}`),N2.logger.log("Response body:",A);u({data:A,headers:this.res.headers,rateLimit:B})}onResponseCloseHandler(u,D){let B=this.res;if(B.aborted)try{return this.getParsedResponse(this.res),this.onResponseEndHandler(u,D)}catch(A){return D(this.createPartialResponseError(A,!0))}if(!B.complete)return D(this.createPartialResponseError(Error("Response has been interrupted before response could be parsed."),!0))}streamResponseHandler(u,D,B){if(B.statusCode<400){if(N2.debug)N2.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]: Request succeeds with code ${B.statusCode} (starting stream)`);let w=this.getResponseDataStream(B);u({req:this.req,res:w,originalResponse:B,requestData:this.requestData})}else this.classicResponseHandler(()=>{return},D,B)}debugRequest(){let u=this.requestData.url;if(N2.logger.log(`[${this.requestData.options.method} ${this.hrefPathname}]`,this.requestData.options),u.search)N2.logger.log("Request parameters:",[...u.searchParams.entries()].map(([D,B])=>`${D}: ${B}`));if(this.requestData.body)N2.logger.log("Request body:",this.requestData.body)}buildRequest(){var u;let D=this.requestData.url,B=D.username?`${D.username}:${D.password}`:void 0,A=(u=this.requestData.options.headers)!==null&&u!==void 0?u:{};if(this.requestData.compression===!0||this.requestData.compression==="brotli")A["accept-encoding"]="br;q=1.0, gzip;q=0.8, deflate;q=0.5, *;q=0.1";else if(this.requestData.compression==="gzip")A["accept-encoding"]="gzip;q=1, deflate;q=0.5, *;q=0.1";else if(this.requestData.compression==="deflate")A["accept-encoding"]="deflate;q=1, *;q=0.1";if(N2.debug)this.debugRequest();this.req=DU({...this.requestData.options,host:D.hostname,port:D.port||void 0,path:D.pathname+D.search,protocol:D.protocol,auth:B,headers:A})}registerRequestEventDebugHandlers(u){u.on("close",()=>this.requestData.requestEventDebugHandler("close")),u.on("abort",()=>this.requestData.requestEventDebugHandler("abort")),u.on("socket",(D)=>{this.requestData.requestEventDebugHandler("socket",{socket:D}),D.on("error",(B)=>this.requestData.requestEventDebugHandler("socket-error",{socket:D,error:B})),D.on("connect",()=>this.requestData.requestEventDebugHandler("socket-connect",{socket:D})),D.on("close",(B)=>this.requestData.requestEventDebugHandler("socket-close",{socket:D,withError:B})),D.on("end",()=>this.requestData.requestEventDebugHandler("socket-end",{socket:D})),D.on("lookup",(...B)=>this.requestData.requestEventDebugHandler("socket-lookup",{socket:D,data:B})),D.on("timeout",()=>this.requestData.requestEventDebugHandler("socket-timeout",{socket:D}))})}makeRequest(){return this.buildRequest(),new Promise((u,D)=>{let B=(N)=>{w.emit("complete"),u(N)},A=(N)=>{w.emit("complete"),D(N)},w=new BU,F=this.req;if(F.on("error",this.requestErrorHandler.bind(this,A)),F.on("socket",this.onSocketEventHandler.bind(this,A,w)),F.on("response",this.classicResponseHandler.bind(this,B,A)),this.requestData.options.timeout)F.on("timeout",this.timeoutErrorHandler.bind(this));if(this.requestData.requestEventDebugHandler)this.registerRequestEventDebugHandlers(F);if(this.requestData.body)F.write(this.requestData.body);F.end()})}async makeRequestAsStream(){let{req:u,res:D,requestData:B,originalResponse:A}=await this.makeRequestAndResolveWhenReady();return new YD(B,{req:u,res:D,originalResponse:A})}makeRequestAndResolveWhenReady(){return this.buildRequest(),new Promise((u,D)=>{let B=this.req;if(B.on("error",this.requestErrorHandler.bind(this,D)),B.on("response",this.streamResponseHandler.bind(this,u,D)),this.requestData.body)B.write(this.requestData.body);B.end()})}}var yu=cY;import{EventEmitter as AU}from"events";class MY extends AU{constructor(u){super();this.stream=u,this.stack=[],this.onStreamData=this.onStreamData.bind(this),this.onStreamError=this.onStreamError.bind(this),this.onceNewEvent=this.once.bind(this,"event"),u.on(c.Data,this.onStreamData),u.on(c.ConnectionError,this.onStreamError),u.on(c.TweetParseError,this.onStreamError),u.on(c.ConnectionClosed,this.onStreamError)}nextEvent(){return new Promise(this.onceNewEvent)}hasStack(){return this.stack.length>0}popStack(){let u=this.stack;return this.stack=[],u}destroy(){this.removeAllListeners(),this.stream.off(c.Data,this.onStreamData),this.stream.off(c.ConnectionError,this.onStreamError),this.stream.off(c.TweetParseError,this.onStreamError),this.stream.off(c.ConnectionClosed,this.onStreamError)}emitEvent(u,D){this.emit("event",{type:u,payload:D})}onStreamError(u){this.emitEvent("error",u)}onStreamData(u){this.stack.push(u),this.emitEvent("data",u)}}var LY=MY;import{EventEmitter as wU}from"events";class hD extends wU{constructor(){super(...arguments);this.currentMessage=""}push(u){this.currentMessage+=u,u=this.currentMessage;let D=u.length,B=0,A=0;while(A<D){if(u.slice(A,A+2)===`\r
42
+ `){let w=u.slice(B,A);if(B=A+=2,!w.length)continue;try{let F=JSON.parse(w);if(F){this.emit(Z0.ParsedData,F);continue}}catch(F){this.emit(Z0.ParseError,F)}}A++}this.currentMessage=u.slice(B,D)}reset(){this.currentMessage=""}}var Z0;(function(u){u.ParsedData="parsed data",u.ParseError="parse error"})(Z0||(Z0={}));var EY=[5,15,30,60,90,120,180,300,600,900],NU=(u)=>u>EY.length?901000:EY[u-1]*1000;class OY extends FU{constructor(u,D){super();if(this.requestData=u,this.autoReconnect=!1,this.autoReconnectRetries=5,this.keepAliveTimeoutMs=120000,this.nextRetryTimeout=NU,this.parser=new hD,this.connectionProcessRunning=!1,this.onKeepAliveTimeout=this.onKeepAliveTimeout.bind(this),this.initEventsFromParser(),D)this.req=D.req,this.res=D.res,this.originalResponse=D.originalResponse,this.initEventsFromRequest()}on(u,D){return super.on(u,D)}initEventsFromRequest(){if(!this.req||!this.res)throw Error("TweetStream error: You cannot init TweetStream without a request and response object.");let u=(D)=>{this.emit(c.ConnectionError,D),this.emit(c.Error,{type:c.ConnectionError,error:D,message:"Connection lost or closed by Twitter."}),this.onConnectionError()};this.req.on("error",u),this.res.on("error",u),this.res.on("close",()=>u(Error("Connection closed by Twitter."))),this.res.on("data",(D)=>{if(this.resetKeepAliveTimeout(),D.toString()===`\r
43
+ `)return this.emit(c.DataKeepAlive);this.parser.push(D.toString())}),this.resetKeepAliveTimeout()}initEventsFromParser(){let u=this.requestData.payloadIsError;this.parser.on(Z0.ParsedData,(D)=>{if(u&&u(D))this.emit(c.DataError,D),this.emit(c.Error,{type:c.DataError,error:D,message:"Twitter sent a payload that is detected as an error payload."});else this.emit(c.Data,D)}),this.parser.on(Z0.ParseError,(D)=>{this.emit(c.TweetParseError,D),this.emit(c.Error,{type:c.TweetParseError,error:D,message:"Failed to parse stream data."})})}resetKeepAliveTimeout(){if(this.unbindKeepAliveTimeout(),this.keepAliveTimeoutMs!==1/0)this.keepAliveTimeout=setTimeout(this.onKeepAliveTimeout,this.keepAliveTimeoutMs)}onKeepAliveTimeout(){this.emit(c.ConnectionLost),this.onConnectionError()}unbindTimeouts(){this.unbindRetryTimeout(),this.unbindKeepAliveTimeout()}unbindKeepAliveTimeout(){if(this.keepAliveTimeout)clearTimeout(this.keepAliveTimeout),this.keepAliveTimeout=void 0}unbindRetryTimeout(){if(this.retryTimeout)clearTimeout(this.retryTimeout),this.retryTimeout=void 0}closeWithoutEmit(){if(this.unbindTimeouts(),this.res)this.res.removeAllListeners(),this.res.destroy();if(this.req)this.req.removeAllListeners(),this.req.destroy()}close(){this.emit(c.ConnectionClosed),this.closeWithoutEmit()}destroy(){this.removeAllListeners(),this.close()}async clone(){let D=await new yu(this.requestData).makeRequestAsStream(),B=this.eventNames();for(let A of B){let w=this.listeners(A);for(let F of w)D.on(A,F)}return D}async connect(u={}){if(typeof u.autoReconnect<"u")this.autoReconnect=u.autoReconnect;if(typeof u.autoReconnectRetries<"u")this.autoReconnectRetries=u.autoReconnectRetries==="unlimited"?1/0:u.autoReconnectRetries;if(typeof u.keepAliveTimeout<"u")this.keepAliveTimeoutMs=u.keepAliveTimeout==="disable"?1/0:u.keepAliveTimeout;if(typeof u.nextRetryTimeout<"u")this.nextRetryTimeout=u.nextRetryTimeout;this.unbindTimeouts();try{await this.reconnect()}catch(D){if(this.emit(c.ConnectError,0),this.emit(c.Error,{type:c.ConnectError,error:D,message:"Connect error - Initial connection just failed."}),this.autoReconnect)this.makeAutoReconnectRetry(0,D);else throw D}return this}async reconnect(){if(this.connectionProcessRunning)throw Error("Connection process is already running.");this.connectionProcessRunning=!0;try{let u=!0;if(this.req)u=!1,this.closeWithoutEmit();let{req:D,res:B,originalResponse:A}=await new yu(this.requestData).makeRequestAndResolveWhenReady();this.req=D,this.res=B,this.originalResponse=A,this.emit(u?c.Connected:c.Reconnected),this.parser.reset(),this.initEventsFromRequest()}finally{this.connectionProcessRunning=!1}}async onConnectionError(u=0){if(this.unbindTimeouts(),this.closeWithoutEmit(),!this.autoReconnect){this.emit(c.ConnectionClosed);return}if(u>=this.autoReconnectRetries){this.emit(c.ReconnectLimitExceeded),this.emit(c.ConnectionClosed);return}try{this.emit(c.ReconnectAttempt,u),await this.reconnect()}catch(D){this.emit(c.ReconnectError,u),this.emit(c.Error,{type:c.ReconnectError,error:D,message:`Reconnect error - ${u+1} attempts made yet.`}),this.makeAutoReconnectRetry(u,D)}}makeAutoReconnectRetry(u,D){let B=this.nextRetryTimeout(u+1,D);this.retryTimeout=setTimeout(()=>{this.onConnectionError(u+1)},B)}async*[Symbol.asyncIterator](){let u=new LY(this);try{while(!0){if(!this.req||this.req.aborted)throw Error("Connection closed");if(u.hasStack())yield*u.popStack();let{type:D,payload:B}=await u.nextEvent();if(D==="error")throw B}}finally{u.destroy()}}}var YD=OY;function CY(u){var D;if(!((D=u.clientSettings.plugins)===null||D===void 0?void 0:D.length))return!1;for(let B of u.clientSettings.plugins)if(B.onRequestError||B.onResponseError)return!0;return!1}async function PY(u,D,B,A){let w;if(A instanceof Eu||A instanceof Ou)w=await this.applyPluginMethod("onRequestError",{client:this,url:this.getUrlObjectFromUrlString(u.url),params:u,computedParams:D,requestOptions:B,error:A});else if(A instanceof Cu)w=await this.applyPluginMethod("onResponseError",{client:this,url:this.getUrlObjectFromUrlString(u.url),params:u,computedParams:D,requestOptions:B,error:A});if(w&&w instanceof Pu)return w.value;return Promise.reject(A)}import*as VY from"crypto";class y2{constructor(u){this.nonceLength=32,this.consumerKeys=u.consumerKeys}static percentEncode(u){return encodeURIComponent(u).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")}hash(u,D){return VY.createHmac("sha1",D).update(u).digest("base64")}authorize(u,D={}){let B={oauth_consumer_key:this.consumerKeys.key,oauth_nonce:this.getNonce(),oauth_signature_method:"HMAC-SHA1",oauth_timestamp:this.getTimestamp(),oauth_version:"1.0"};if(D.key!==void 0)B.oauth_token=D.key;if(!u.data)u.data={};return B.oauth_signature=this.getSignature(u,D.secret,B),B}toHeader(u){let D=yY(u),B="OAuth ";for(let A of D){if(A.key.indexOf("oauth_")!==0)continue;B+=y2.percentEncode(A.key)+'="'+y2.percentEncode(A.value)+'",'}return{Authorization:B.slice(0,B.length-1)}}getNonce(){let D="";for(let B=0;B<this.nonceLength;B++)D+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[Math.trunc(Math.random()*62)];return D}getTimestamp(){return Math.trunc(new Date().getTime()/1000)}getSignature(u,D,B){return this.hash(this.getBaseString(u,B),this.getSigningKey(D))}getSigningKey(u){return y2.percentEncode(this.consumerKeys.secret)+"&"+y2.percentEncode(u||"")}getBaseString(u,D){return u.method.toUpperCase()+"&"+y2.percentEncode(this.getBaseUrl(u.url))+"&"+y2.percentEncode(this.getParameterString(u,D))}getParameterString(u,D){let B=yY($U(kY(D,kY(u.data,vU(u.url))))),A="";for(let{key:w,value:F}of B)if(F&&Array.isArray(F)){F.sort();let N="";F.forEach((G,$)=>{if(N+=w+"="+G,$<F.length)N+="&"}),A+=N}else A+=w+"="+F+"&";return A.slice(0,A.length-1)}getBaseUrl(u){return u.split("?")[0]}}var Vu=y2;function kY(u,D){return{...u||{},...D||{}}}function yY(u){return Object.keys(u).sort().map((D)=>({key:D,value:u[D]}))}function GU(u){let D=u.split("&"),B={};for(let A of D){let[w,F=""]=A.split("=");if(B[w]){if(!Array.isArray(B[w]))B[w]=[B[w]];B[w].push(decodeURIComponent(F))}else B[w]=decodeURIComponent(F)}return B}function vU(u){let D=u.split("?");if(D.length===1)return{};return GU(D[1])}function $U(u){let D={};for(let B in u){let A=u[B];if(A&&Array.isArray(A))A=A.map((w)=>y2.percentEncode(w));else A=y2.percentEncode(A);D[y2.percentEncode(B)]=A}return D}class V2{constructor(){this._boundary="",this._chunks=[]}bodyAppend(...u){let D=u.map((B)=>B instanceof Buffer?B:Buffer.from(B));this._chunks.push(...D)}append(u,D,B){let A=D instanceof Buffer?D:D.toString(),w=this.getMultipartHeader(u,A,B);this.bodyAppend(w,A,V2.LINE_BREAK)}getHeaders(){return{"content-type":"multipart/form-data; boundary="+this.getBoundary()}}getLength(){return this._chunks.reduce((u,D)=>u+D.length,this.getMultipartFooter().length)}getBuffer(){let u=[...this._chunks,this.getMultipartFooter()],D=Buffer.alloc(this.getLength()),B=0;for(let A of u)for(let w=0;w<A.length;B++,w++)D[B]=A[w];return D}getBoundary(){if(!this._boundary)this.generateBoundary();return this._boundary}generateBoundary(){let u="--------------------------";for(let D=0;D<24;D++)u+=Math.floor(Math.random()*10).toString(16);this._boundary=u}getMultipartHeader(u,D,B){if(!B)B=D instanceof Buffer?V2.DEFAULT_CONTENT_TYPE:"";let A={"Content-Disposition":["form-data",`name="${u}"`],"Content-Type":B},w="";for(let[F,N]of Object.entries(A)){if(!N.length)continue;w+=F+": "+WD(N).join("; ")+V2.LINE_BREAK}return"--"+this.getBoundary()+V2.LINE_BREAK+w+V2.LINE_BREAK}getMultipartFooter(){if(this._footerChunk)return this._footerChunk;return this._footerChunk=Buffer.from("--"+this.getBoundary()+"--"+V2.LINE_BREAK)}}V2.LINE_BREAK=`\r
44
+ `;V2.DEFAULT_CONTENT_TYPE="application/octet-stream";class f8{static formatQueryToString(u){let D={};for(let B in u)if(typeof u[B]==="string")D[B]=u[B];else if(typeof u[B]<"u")D[B]=String(u[B]);return D}static autoDetectBodyType(u){if(u.pathname.startsWith("/2/")||u.pathname.startsWith("/labs/2/")){if(u.password.startsWith("/2/oauth2"))return"url";return"json"}if(u.hostname==="upload.x.com"){if(u.pathname==="/1.1/media/upload.json")return"form-data";return"json"}let D=u.pathname.split("/1.1/",2)[1];if(this.JSON_1_1_ENDPOINTS.has(D))return"json";return"url"}static addQueryParamsToUrl(u,D){let B=Object.entries(D);if(B.length){let A="";for(let[w,F]of B)A+=(A.length?"&":"?")+`${Vu.percentEncode(w)}=${Vu.percentEncode(F)}`;u.search=A}}static constructBodyParams(u,D,B){if(u instanceof Buffer)return u;if(B==="json"){if(!D["content-type"])D["content-type"]="application/json;charset=UTF-8";return JSON.stringify(u)}else if(B==="url"){if(!D["content-type"])D["content-type"]="application/x-www-form-urlencoded;charset=UTF-8";if(Object.keys(u).length)return new URLSearchParams(u).toString().replace(/\*/g,"%2A");return""}else if(B==="raw")throw Error("You can only use raw body mode with Buffers. To give a string, use Buffer.from(str).");else{let A=new V2;for(let w in u)A.append(w,u[w]);if(!D["content-type"]){let w=A.getHeaders();D["content-type"]=w["content-type"]}return A.getBuffer()}}static setBodyLengthHeader(u,D){var B;if(u.headers=(B=u.headers)!==null&&B!==void 0?B:{},typeof D==="string")u.headers["content-length"]=Buffer.byteLength(D);else u.headers["content-length"]=D.length}static isOAuthSerializable(u){return!(u instanceof Buffer)}static mergeQueryAndBodyForOAuth(u,D){let B={};for(let A in u)B[A]=u[A];if(this.isOAuthSerializable(D))for(let A in D){let w=D[A];if(this.isOAuthSerializable(w))B[A]=typeof w==="object"&&w!==null&&"toString"in w?w.toString():w}return B}static moveUrlQueryParamsIntoObject(u,D){for(let[B,A]of u.searchParams)D[B]=A;return u.search="",u}static applyRequestParametersToUrl(u,D){return u.pathname=u.pathname.replace(/:([A-Z_-]+)/ig,(B,A)=>{if(D[A]!==void 0)return String(D[A]);return B}),u}}f8.JSON_1_1_ENDPOINTS=new Set(["direct_messages/events/new.json","direct_messages/welcome_messages/new.json","direct_messages/welcome_messages/rules/new.json","media/metadata/create.json","collections/entries/curate.json"]);var C2=f8;import*as TY from"crypto";class J0{static getCodeVerifier(){return this.generateRandomString(128)}static getCodeChallengeFromVerifier(u){return this.escapeBase64Url(TY.createHash("sha256").update(u).digest("base64"))}static getAuthHeader(u,D){let B=encodeURIComponent(u)+":"+encodeURIComponent(D);return Buffer.from(B).toString("base64")}static generateRandomString(u){let D="",B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~";for(let A=0;A<u;A++)D+=B[Math.floor(Math.random()*B.length)];return D}static escapeBase64Url(u){return u.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}class l0{constructor(u){if(this.rateLimits={},this.clientSettings={},u)this.clientSettings=u}getRateLimits(){return this.rateLimits}saveRateLimit(u,D){this.rateLimits[u]=D}async send(u){var D,B,A,w,F;if((D=this.clientSettings.plugins)===null||D===void 0?void 0:D.length){let Z=await this.applyPreRequestConfigHooks(u);if(Z)return Z}let N=this.getHttpRequestArgs(u),G={method:N.method,headers:N.headers,timeout:u.timeout,agent:this.clientSettings.httpAgent},$=u.enableRateLimitSave!==!1;if(N.body)C2.setBodyLengthHeader(G,N.body);if((B=this.clientSettings.plugins)===null||B===void 0?void 0:B.length)await this.applyPreRequestHooks(u,N,G);let z=new yu({url:N.url,options:G,body:N.body,rateLimitSaver:$?this.saveRateLimit.bind(this,N.rawUrl):void 0,requestEventDebugHandler:u.requestEventDebugHandler,compression:(w=(A=u.compression)!==null&&A!==void 0?A:this.clientSettings.compression)!==null&&w!==void 0?w:!0,forceParseMode:u.forceParseMode}).makeRequest();if(CY(this))z=this.applyResponseErrorHooks(u,N,G,z);let Q=await z;if((F=this.clientSettings.plugins)===null||F===void 0?void 0:F.length){let Z=await this.applyPostRequestHooks(u,N,G,Q);if(Z)return Z.value}return Q}sendStream(u){var D,B;if(this.clientSettings.plugins)this.applyPreStreamRequestConfigHooks(u);let A=this.getHttpRequestArgs(u),w={method:A.method,headers:A.headers,agent:this.clientSettings.httpAgent},F=u.enableRateLimitSave!==!1,N=u.autoConnect!==!1;if(A.body)C2.setBodyLengthHeader(w,A.body);let G={url:A.url,options:w,body:A.body,rateLimitSaver:F?this.saveRateLimit.bind(this,A.rawUrl):void 0,payloadIsError:u.payloadIsError,compression:(B=(D=u.compression)!==null&&D!==void 0?D:this.clientSettings.compression)!==null&&B!==void 0?B:!0},$=new YD(G);if(!N)return $;return $.connect()}initializeToken(u){if(typeof u==="string")this.bearerToken=u;else if(typeof u==="object"&&"appKey"in u){if(this.consumerToken=u.appKey,this.consumerSecret=u.appSecret,u.accessToken&&u.accessSecret)this.accessToken=u.accessToken,this.accessSecret=u.accessSecret;this._oauth=this.buildOAuth()}else if(typeof u==="object"&&"username"in u){let D=encodeURIComponent(u.username)+":"+encodeURIComponent(u.password);this.basicToken=Buffer.from(D).toString("base64")}else if(typeof u==="object"&&"clientId"in u)this.clientId=u.clientId,this.clientSecret=u.clientSecret}getActiveTokens(){if(this.bearerToken)return{type:"oauth2",bearerToken:this.bearerToken};else if(this.basicToken)return{type:"basic",token:this.basicToken};else if(this.consumerSecret&&this._oauth)return{type:"oauth-1.0a",appKey:this.consumerToken,appSecret:this.consumerSecret,accessToken:this.accessToken,accessSecret:this.accessSecret};else if(this.clientId)return{type:"oauth2-user",clientId:this.clientId};return{type:"none"}}buildOAuth(){if(!this.consumerSecret||!this.consumerToken)throw Error("Invalid consumer tokens");return new Vu({consumerKeys:{key:this.consumerToken,secret:this.consumerSecret}})}getOAuthAccessTokens(){if(!this.accessSecret||!this.accessToken)return;return{key:this.accessToken,secret:this.accessSecret}}getPlugins(){var u;return(u=this.clientSettings.plugins)!==null&&u!==void 0?u:[]}hasPlugins(){var u;return!!((u=this.clientSettings.plugins)===null||u===void 0?void 0:u.length)}async applyPluginMethod(u,D){var B;let A;for(let w of this.getPlugins()){let F=await((B=w[u])===null||B===void 0?void 0:B.call(w,D));if(F&&F instanceof Pu)A=F}return A}writeAuthHeaders({headers:u,bodyInSignature:D,url:B,method:A,query:w,body:F}){if(u={...u},this.bearerToken)u.Authorization="Bearer "+this.bearerToken;else if(this.basicToken)u.Authorization="Basic "+this.basicToken;else if(this.clientId&&this.clientSecret)u.Authorization="Basic "+J0.getAuthHeader(this.clientId,this.clientSecret);else if(this.consumerSecret&&this._oauth){let N=D?C2.mergeQueryAndBodyForOAuth(w,F):w,G=this._oauth.authorize({url:B.toString(),method:A,data:N},this.getOAuthAccessTokens());u={...u,...this._oauth.toHeader(G)}}return u}getUrlObjectFromUrlString(u){if(!u.startsWith("http"))u="https://"+u;return new URL(u)}getHttpRequestArgs({url:u,method:D,query:B={},body:A={},headers:w,forceBodyMode:F,enableAuth:N,params:G}){let $=void 0;if(D=D.toUpperCase(),w=w!==null&&w!==void 0?w:{},!w["x-user-agent"])w["x-user-agent"]="Node.twitter-api-v2";let z=this.getUrlObjectFromUrlString(u),Q=z.origin+z.pathname;if(G)C2.applyRequestParametersToUrl(z,G);let Z=C2.formatQueryToString(B);if(C2.moveUrlQueryParamsIntoObject(z,Z),!(A instanceof Buffer))UY(A);let J=F!==null&&F!==void 0?F:C2.autoDetectBodyType(z);if(N!==!1){let W=l0.BODY_METHODS.has(D)&&J==="url";w=this.writeAuthHeaders({headers:w,bodyInSignature:W,method:D,query:Z,url:z,body:A})}if(l0.BODY_METHODS.has(D))$=C2.constructBodyParams(A,w,J)||void 0;return C2.addQueryParamsToUrl(z,Z),{rawUrl:Q,url:z,method:D,headers:w,body:$}}async applyPreRequestConfigHooks(u){var D;let B=this.getUrlObjectFromUrlString(u.url);for(let A of this.getPlugins()){let w=await((D=A.onBeforeRequestConfig)===null||D===void 0?void 0:D.call(A,{client:this,url:B,params:u}));if(w)return w}}applyPreStreamRequestConfigHooks(u){var D;let B=this.getUrlObjectFromUrlString(u.url);for(let A of this.getPlugins())(D=A.onBeforeStreamRequestConfig)===null||D===void 0||D.call(A,{client:this,url:B,params:u})}async applyPreRequestHooks(u,D,B){await this.applyPluginMethod("onBeforeRequest",{client:this,url:this.getUrlObjectFromUrlString(u.url),params:u,computedParams:D,requestOptions:B})}async applyPostRequestHooks(u,D,B,A){return await this.applyPluginMethod("onAfterRequest",{client:this,url:this.getUrlObjectFromUrlString(u.url),params:u,computedParams:D,requestOptions:B,response:A})}applyResponseErrorHooks(u,D,B,A){return A.catch(PY.bind(this,u,D,B))}}l0.BODY_METHODS=new Set(["POST","PUT","PATCH"]);class D0{constructor(u,D={}){if(this._currentUser=null,this._currentUserV2=null,u instanceof D0)this._requestMaker=u._requestMaker;else this._requestMaker=new l0(D),this._requestMaker.initializeToken(u)}setPrefix(u){this._prefix=u}cloneWithPrefix(u){let D=this.constructor(this);return D.setPrefix(u),D}getActiveTokens(){return this._requestMaker.getActiveTokens()}getPlugins(){return this._requestMaker.getPlugins()}getPluginOfType(u){return this.getPlugins().find((D)=>D instanceof u)}hasHitRateLimit(u){var D;if(this.isRateLimitStatusObsolete(u))return!1;return((D=this.getLastRateLimitStatus(u))===null||D===void 0?void 0:D.remaining)===0}isRateLimitStatusObsolete(u){let D=this.getLastRateLimitStatus(u);if(D===void 0)return!0;return D.reset*1000<Date.now()}getLastRateLimitStatus(u){let D=u.match(/^https?:\/\//)?u:this._prefix+u;return this._requestMaker.getRateLimits()[D]}getCurrentUserObject(u=!1){if(!u&&this._currentUser){if(this._currentUser.value)return Promise.resolve(this._currentUser.value);return this._currentUser.promise}return this._currentUser=g8(()=>this.get("account/verify_credentials.json",{tweet_mode:"extended"},{prefix:e2})),this._currentUser.promise}getCurrentUserV2Object(u=!1){if(!u&&this._currentUserV2){if(this._currentUserV2.value)return Promise.resolve(this._currentUserV2.value);return this._currentUserV2.promise}return this._currentUserV2=g8(()=>this.get("users/me",void 0,{prefix:o2})),this._currentUserV2.promise}async get(u,D={},{fullResponse:B,prefix:A=this._prefix,...w}={}){if(A)u=A+u;let F=await this._requestMaker.send({url:u,method:"GET",query:D,...w});return B?F:F.data}async delete(u,D={},{fullResponse:B,prefix:A=this._prefix,...w}={}){if(A)u=A+u;let F=await this._requestMaker.send({url:u,method:"DELETE",query:D,...w});return B?F:F.data}async post(u,D,{fullResponse:B,prefix:A=this._prefix,...w}={}){if(A)u=A+u;let F=await this._requestMaker.send({url:u,method:"POST",body:D,...w});return B?F:F.data}async put(u,D,{fullResponse:B,prefix:A=this._prefix,...w}={}){if(A)u=A+u;let F=await this._requestMaker.send({url:u,method:"PUT",body:D,...w});return B?F:F.data}async patch(u,D,{fullResponse:B,prefix:A=this._prefix,...w}={}){if(A)u=A+u;let F=await this._requestMaker.send({url:u,method:"PATCH",body:D,...w});return B?F:F.data}getStream(u,D,{prefix:B=this._prefix,...A}={}){return this._requestMaker.sendStream({url:B?B+u:u,method:"GET",query:D,...A})}postStream(u,D,{prefix:B=this._prefix,...A}={}){return this._requestMaker.sendStream({url:B?B+u:u,method:"POST",body:D,...A})}}class P2 extends D0{constructor(u){if(!(u instanceof D0))throw Error("You must instance SubTwitterApi instance from existing TwitterApi instance.");super(u)}}class d0 extends j0{constructor(){super(...arguments);this.hasFinishedFetch=!1}refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.push(...B),this.hasFinishedFetch=B.length===0}getNextQueryParams(u){let D=BigInt(this._realData[this._realData.length-1].id_str);return{...this.injectQueryParams(u),max_id:(D-BigInt(1)).toString()}}getPageLengthFromRequest(u){return u.data.length}isFetchLastOver(u){return!u.data.length}canFetchNextPage(u){return u.length>0}getItemArray(){return this.tweets}get tweets(){return this._realData}get done(){return super.done||this.hasFinishedFetch}}class b8 extends d0{constructor(){super(...arguments);this._endpoint="statuses/home_timeline.json"}}class j8 extends d0{constructor(){super(...arguments);this._endpoint="statuses/mentions_timeline.json"}}class KD extends d0{constructor(){super(...arguments);this._endpoint="statuses/user_timeline.json"}}class l8 extends d0{constructor(){super(...arguments);this._endpoint="lists/statuses.json"}}class SD extends d0{constructor(){super(...arguments);this._endpoint="favorites/list.json"}}class d8 extends w2{constructor(){super(...arguments);this._endpoint="mutes/users/list.json"}refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.users.push(...B.users),this._realData.next_cursor=B.next_cursor}getPageLengthFromRequest(u){return u.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class r8 extends w2{constructor(){super(...arguments);this._endpoint="mutes/users/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.ids.push(...B.ids),this._realData.next_cursor=B.next_cursor}getPageLengthFromRequest(u){return u.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class i8 extends w2{constructor(){super(...arguments);this._endpoint="followers/list.json"}refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.users.push(...B.users),this._realData.next_cursor=B.next_cursor}getPageLengthFromRequest(u){return u.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class n8 extends w2{constructor(){super(...arguments);this._endpoint="followers/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.ids.push(...B.ids),this._realData.next_cursor=B.next_cursor}getPageLengthFromRequest(u){return u.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class p8 extends w2{constructor(){super(...arguments);this._endpoint="friends/list.json"}refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.users.push(...B.users),this._realData.next_cursor=B.next_cursor}getPageLengthFromRequest(u){return u.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class a8 extends w2{constructor(){super(...arguments);this._endpoint="friends/ids.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.ids.push(...B.ids),this._realData.next_cursor=B.next_cursor}getPageLengthFromRequest(u){return u.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class s8 extends j0{constructor(){super(...arguments);this._endpoint="users/search.json"}refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.push(...B)}getNextQueryParams(u){var D;let B=Number((D=this._queryParams.page)!==null&&D!==void 0?D:"1");return{...this._queryParams,page:B+1,...u?{count:u}:{}}}getPageLengthFromRequest(u){return u.data.length}isFetchLastOver(u){return!u.data.length}canFetchNextPage(u){return u.length>0}getItemArray(){return this.users}get users(){return this._realData}}class xD extends w2{constructor(){super(...arguments);this._endpoint="friendships/incoming.json",this._maxResultsWhenFetchLast=5000}refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.ids.push(...B.ids),this._realData.next_cursor=B.next_cursor}getPageLengthFromRequest(u){return u.data.ids.length}getItemArray(){return this.ids}get ids(){return this._realData.ids}}class t8 extends xD{constructor(){super(...arguments);this._endpoint="friendships/outgoing.json"}}class RD extends w2{refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.lists.push(...B.lists),this._realData.next_cursor=B.next_cursor}getPageLengthFromRequest(u){return u.data.lists.length}getItemArray(){return this.lists}get lists(){return this._realData.lists}}class o8 extends RD{constructor(){super(...arguments);this._endpoint="lists/memberships.json"}}class e8 extends RD{constructor(){super(...arguments);this._endpoint="lists/ownerships.json"}}class u4 extends RD{constructor(){super(...arguments);this._endpoint="lists/subscriptions.json"}}class D4 extends w2{refreshInstanceFromResult(u,D){let B=u.data;if(this._rateLimit=u.rateLimit,D)this._realData.users.push(...B.users),this._realData.next_cursor=B.next_cursor}getPageLengthFromRequest(u){return u.data.users.length}getItemArray(){return this.users}get users(){return this._realData.users}}class B4 extends D4{constructor(){super(...arguments);this._endpoint="lists/members.json"}}class A4 extends D4{constructor(){super(...arguments);this._endpoint="lists/subscribers.json"}}class r0 extends P2{constructor(){super(...arguments);this._prefix=e2}singleTweet(u,D={}){return this.get("statuses/show.json",{tweet_mode:"extended",id:u,...D})}tweets(u,D={}){return this.post("statuses/lookup.json",{tweet_mode:"extended",id:u,...D})}oembedTweet(u,D={}){return this.get("oembed",{url:`https://x.com/i/statuses/${u}`,...D},{prefix:"https://publish.x.com/"})}async homeTimeline(u={}){let D={tweet_mode:"extended",...u},B=await this.get("statuses/home_timeline.json",D,{fullResponse:!0});return new b8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async mentionTimeline(u={}){let D={tweet_mode:"extended",...u},B=await this.get("statuses/mentions_timeline.json",D,{fullResponse:!0});return new j8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async userTimeline(u,D={}){let B={tweet_mode:"extended",user_id:u,...D},A=await this.get("statuses/user_timeline.json",B,{fullResponse:!0});return new KD({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:B})}async userTimelineByUsername(u,D={}){let B={tweet_mode:"extended",screen_name:u,...D},A=await this.get("statuses/user_timeline.json",B,{fullResponse:!0});return new KD({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:B})}async favoriteTimeline(u,D={}){let B={tweet_mode:"extended",user_id:u,...D},A=await this.get("favorites/list.json",B,{fullResponse:!0});return new SD({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:B})}async favoriteTimelineByUsername(u,D={}){let B={tweet_mode:"extended",screen_name:u,...D},A=await this.get("favorites/list.json",B,{fullResponse:!0});return new SD({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:B})}user(u){return this.get("users/show.json",{tweet_mode:"extended",...u})}users(u){return this.get("users/lookup.json",{tweet_mode:"extended",...u})}verifyCredentials(u={}){return this.get("account/verify_credentials.json",u)}async listMutedUsers(u={}){let D={tweet_mode:"extended",...u},B=await this.get("mutes/users/list.json",D,{fullResponse:!0});return new d8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async listMutedUserIds(u={}){let D={stringify_ids:!0,...u},B=await this.get("mutes/users/ids.json",D,{fullResponse:!0});return new r8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async userFriendList(u={}){let D={...u},B=await this.get("friends/list.json",D,{fullResponse:!0});return new p8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async userFollowerList(u={}){let D={...u},B=await this.get("followers/list.json",D,{fullResponse:!0});return new i8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async userFollowerIds(u={}){let D={stringify_ids:!0,...u},B=await this.get("followers/ids.json",D,{fullResponse:!0});return new n8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async userFollowingIds(u={}){let D={stringify_ids:!0,...u},B=await this.get("friends/ids.json",D,{fullResponse:!0});return new a8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async searchUsers(u,D={}){let B={q:u,tweet_mode:"extended",page:1,...D},A=await this.get("users/search.json",B,{fullResponse:!0});return new s8({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:B})}friendship(u){return this.get("friendships/show.json",u)}friendships(u){return this.get("friendships/lookup.json",u)}friendshipsNoRetweets(){return this.get("friendships/no_retweets/ids.json",{stringify_ids:!0})}async friendshipsIncoming(u={}){let D={stringify_ids:!0,...u},B=await this.get("friendships/incoming.json",D,{fullResponse:!0});return new xD({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async friendshipsOutgoing(u={}){let D={stringify_ids:!0,...u},B=await this.get("friendships/outgoing.json",D,{fullResponse:!0});return new t8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}accountSettings(){return this.get("account/settings.json")}userProfileBannerSizes(u){return this.get("users/profile_banner.json",u)}list(u){return this.get("lists/show.json",{tweet_mode:"extended",...u})}lists(u={}){return this.get("lists/list.json",{tweet_mode:"extended",...u})}async listMembers(u={}){let D={tweet_mode:"extended",...u},B=await this.get("lists/members.json",D,{fullResponse:!0});return new B4({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}listGetMember(u){return this.get("lists/members/show.json",{tweet_mode:"extended",...u})}async listMemberships(u={}){let D={tweet_mode:"extended",...u},B=await this.get("lists/memberships.json",D,{fullResponse:!0});return new o8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async listOwnerships(u={}){let D={tweet_mode:"extended",...u},B=await this.get("lists/ownerships.json",D,{fullResponse:!0});return new e8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async listStatuses(u){let D={tweet_mode:"extended",...u},B=await this.get("lists/statuses.json",D,{fullResponse:!0});return new l8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}async listSubscribers(u={}){let D={tweet_mode:"extended",...u},B=await this.get("lists/subscribers.json",D,{fullResponse:!0});return new A4({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}listGetSubscriber(u){return this.get("lists/subscribers/show.json",{tweet_mode:"extended",...u})}async listSubscriptions(u={}){let D={tweet_mode:"extended",...u},B=await this.get("lists/subscriptions.json",D,{fullResponse:!0});return new u4({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}mediaInfo(u){return this.get("media/upload.json",{command:"STATUS",media_id:u},{prefix:g2})}filterStream({autoConnect:u,...D}={}){let B={};for(let[w,F]of Object.entries(D))if(w==="follow"||w==="track")B[w]=F.toString();else if(w==="locations"){let N=F;B.locations=WD(N).map((G)=>`${G.lng},${G.lat}`).join(",")}else B[w]=F;return this.stream.postStream("statuses/filter.json",B,{autoConnect:u})}sampleStream({autoConnect:u,...D}={}){return this.stream.getStream("statuses/sample.json",D,{autoConnect:u})}get stream(){let u=new HD(this);return u.setPrefix(xY),u}trendsByPlace(u,D={}){return this.get("trends/place.json",{id:u,...D})}trendsAvailable(){return this.get("trends/available.json")}trendsClosest(u,D){return this.get("trends/closest.json",{lat:u,long:D})}geoPlace(u){return this.get("geo/id/:place_id.json",void 0,{params:{place_id:u}})}geoSearch(u){return this.get("geo/search.json",u)}geoReverseGeoCode(u){return this.get("geo/reverse_geocode.json",u)}rateLimitStatuses(...u){return this.get("application/rate_limit_status.json",{resources:u})}supportedLanguages(){return this.get("help/languages.json")}}import*as B0 from"fs";async function w4(u){let D=await F4(u);if(typeof D==="number")return new Promise((B,A)=>{B0.readFile(D,(w,F)=>{if(w)return A(w);B(F)})});else if(D instanceof Buffer)return D;else return D.readFile()}function F4(u){if(typeof u==="string")return B0.promises.open(u,"r");else if(typeof u==="number")return u;else if(typeof u==="object"&&!(u instanceof Buffer))return u;else if(!(u instanceof Buffer))throw Error("Given file is not valid, please check its type.");else return u}async function IY(u){if(typeof u==="number")return(await new Promise((B,A)=>{B0.fstat(u,(w,F)=>{if(w)A(w);B(F)})})).size;else if(u instanceof Buffer)return u.length;else return(await u.stat()).size}function qY(u,D,B){if(typeof B==="string")return B;else if(typeof u==="string"&&!D)return zU(u);else if(typeof D==="string")return ZU(D);throw Error("You must specify type if file is a file handle or Buffer.")}function zU(u){if(u.endsWith(".jpeg")||u.endsWith(".jpg"))return m.Jpeg;if(u.endsWith(".png"))return m.Png;if(u.endsWith(".webp"))return m.Webp;if(u.endsWith(".gif"))return m.Gif;if(u.endsWith(".mpeg4")||u.endsWith(".mp4"))return m.Mp4;if(u.endsWith(".mov")||u.endsWith(".mov"))return m.Mov;if(u.endsWith(".srt"))return m.Srt;return _8({instance:"TwitterApiv1ReadWrite",method:"uploadMedia",problem:"options.mimeType is missing and filename couldn't help to resolve MIME type, so it will fallback to image/jpeg",resolution:"If you except to give filenames without extensions, please specify explicitlty the MIME type using options.mimeType"}),m.Jpeg}function ZU(u){if(_8({instance:"TwitterApiv1ReadWrite",method:"uploadMedia",problem:"you're using options.type",resolution:"Remove options.type argument and migrate to options.mimeType which takes the real MIME type. If you're using type=longmp4, add options.longVideo alongside of mimeType=EUploadMimeType.Mp4"}),u==="gif")return m.Gif;if(u==="jpg")return m.Jpeg;if(u==="png")return m.Png;if(u==="webp")return m.Webp;if(u==="srt")return m.Srt;if(u==="mp4"||u==="longmp4")return m.Mp4;if(u==="mov")return m.Mov;return u}function mY(u,D){if(u===m.Mp4||u===m.Mov)return D==="tweet"?"TweetVideo":"DmVideo";if(u===m.Gif)return D==="tweet"?"TweetGif":"DmGif";if(u===m.Srt)return"Subtitles";else return D==="tweet"?"TweetImage":"DmImage"}function N4(u){return new Promise((D)=>setTimeout(D,u*1000))}async function G4(u,D,B=0,A){if(u instanceof Buffer){let F=u.slice(B,B+D);return[F,F.length]}if(!A)throw Error("Well, we will need a buffer to store file content.");let w;if(typeof u==="number")w=await new Promise((F,N)=>{B0.read(u,A,0,D,B,(G,$)=>{if(G)N(G);F($)})});else w=(await u.read(A,0,D,B)).bytesRead;return[A,w]}var v4="media/upload.json";class i0 extends r0{constructor(){super(...arguments);this._prefix=e2}get readOnly(){return this}tweet(u,D={}){let B={status:u,tweet_mode:"extended",...D};return this.post("statuses/update.json",B)}async quote(u,D,B={}){let A="https://x.com/i/statuses/"+D;return this.tweet(u,{...B,attachment_url:A})}async tweetThread(u){let D=[];for(let B of u){let A=D.length?D[D.length-1]:null,w={...typeof B==="string"?{status:B}:B},F=A?A.id_str:w.in_reply_to_status_id,N=w.status;if(F)D.push(await this.reply(N,F,w));else D.push(await this.tweet(N,w))}return D}reply(u,D,B={}){return this.tweet(u,{auto_populate_reply_metadata:!0,in_reply_to_status_id:D,...B})}deleteTweet(u){return this.post("statuses/destroy/:id.json",{tweet_mode:"extended"},{params:{id:u}})}reportUserAsSpam(u){return this.post("users/report_spam.json",{tweet_mode:"extended",...u})}updateFriendship(u){return this.post("friendships/update.json",u)}createFriendship(u){return this.post("friendships/create.json",u)}destroyFriendship(u){return this.post("friendships/destroy.json",u)}updateAccountSettings(u){return this.post("account/settings.json",u)}updateAccountProfile(u){return this.post("account/update_profile.json",u)}async updateAccountProfileBanner(u,D={}){let B={banner:await w4(u),...D};return this.post("account/update_profile_banner.json",B,{forceBodyMode:"form-data"})}async updateAccountProfileImage(u,D={}){let B={tweet_mode:"extended",image:await w4(u),...D};return this.post("account/update_profile_image.json",B,{forceBodyMode:"form-data"})}removeAccountProfileBanner(){return this.post("account/remove_profile_banner.json")}createList(u){return this.post("lists/create.json",{tweet_mode:"extended",...u})}updateList(u){return this.post("lists/update.json",{tweet_mode:"extended",...u})}removeList(u){return this.post("lists/destroy.json",{tweet_mode:"extended",...u})}addListMembers(u){let B=u.user_id&&ku(u.user_id)||u.screen_name&&ku(u.screen_name)?"lists/members/create_all.json":"lists/members/create.json";return this.post(B,u)}removeListMembers(u){let B=u.user_id&&ku(u.user_id)||u.screen_name&&ku(u.screen_name)?"lists/members/destroy_all.json":"lists/members/destroy.json";return this.post(B,u)}subscribeToList(u){return this.post("lists/subscribers/create.json",{tweet_mode:"extended",...u})}unsubscribeOfList(u){return this.post("lists/subscribers/destroy.json",{tweet_mode:"extended",...u})}createMediaMetadata(u,D){return this.post("media/metadata/create.json",{media_id:u,...D},{prefix:g2,forceBodyMode:"json"})}createMediaSubtitles(u,D){return this.post("media/subtitles/create.json",{media_id:u,media_category:"TweetVideo",subtitle_info:{subtitles:D}},{prefix:g2,forceBodyMode:"json"})}deleteMediaSubtitles(u,...D){return this.post("media/subtitles/delete.json",{media_id:u,media_category:"TweetVideo",subtitle_info:{subtitles:D.map((B)=>({language_code:B}))}},{prefix:g2,forceBodyMode:"json"})}async uploadMedia(u,D={},B=!1){var A;let w=(A=D.chunkLength)!==null&&A!==void 0?A:1048576,{fileHandle:F,mediaCategory:N,fileSize:G,mimeType:$}=await this.getUploadMediaRequirements(u,D);try{let z=await this.post(v4,{command:"INIT",total_bytes:G,media_type:$,media_category:N,additional_owners:D.additionalOwners,shared:D.shared?!0:void 0},{prefix:g2});await this.mediaChunkedUpload(F,w,z.media_id_string,D.maxConcurrentUploads);let Q=await this.post(v4,{command:"FINALIZE",media_id:z.media_id_string},{prefix:g2});if(Q.processing_info&&Q.processing_info.state!=="succeeded")await this.awaitForMediaProcessingCompletion(Q);if(B)return Q;else return Q.media_id_string}finally{if(typeof u==="number")$4.close(u,()=>{});else if(typeof F==="object"&&!(F instanceof Buffer))F.close()}}async awaitForMediaProcessingCompletion(u){var D;while(!0){u=await this.mediaInfo(u.media_id_string);let{processing_info:B}=u;if(!B||B.state==="succeeded")return;if((D=B.error)===null||D===void 0?void 0:D.code){let{name:A,message:w}=B.error;throw Error(`Failed to process media: ${A} - ${w}.`)}if(B.state==="failed")throw Error("Failed to process the media.");if(B.check_after_secs)await N4(B.check_after_secs);else await N4(5)}}async getUploadMediaRequirements(u,{mimeType:D,type:B,target:A,longVideo:w}={}){let F;try{F=await F4(u);let N=qY(u,B,D),G;if(N===m.Mp4&&(!D&&!B&&A!=="dm"||w))G="amplify_video";else G=mY(N,A!==null&&A!==void 0?A:"tweet");return{fileHandle:F,mediaCategory:G,fileSize:await IY(F),mimeType:N}}catch(N){if(typeof u==="number")$4.close(u,()=>{});else if(typeof F==="object"&&!(F instanceof Buffer))F.close();throw N}}async mediaChunkedUpload(u,D,B,A=3){let w=0;if(A<1)throw RangeError("Bad maxConcurrentUploads parameter.");let F=u instanceof Buffer?void 0:Buffer.alloc(D),N,G,$=0;[N,G]=await G4(u,D,$,F),$+=G;let z=new Set;while(G){let Q=N.slice(0,G);if(Q.length){let Z=this.post(v4,{command:"APPEND",media_id:B,segment_index:w,media:Q},{prefix:g2});z.add(Z),Z.then(()=>{z.delete(Z)}),w++}if(z.size>=A)await Promise.race(z);[N,G]=await G4(u,D,$,F),$+=G}await Promise.all([...z])}}class gY extends i0{constructor(){super(...arguments);this._prefix=e2}get readWrite(){return this}sendDm({recipient_id:u,custom_profile_id:D,...B}){let A={event:{type:u0.Create,[u0.Create]:{target:{recipient_id:u},message_data:B}}};if(D)A.event[u0.Create].custom_profile_id=D;return this.post("direct_messages/events/new.json",A,{forceBodyMode:"json"})}getDmEvent(u){return this.get("direct_messages/events/show.json",{id:u})}deleteDm(u){return this.delete("direct_messages/events/destroy.json",{id:u})}async listDmEvents(u={}){let D={...u},B=await this.get("direct_messages/events/list.json",D,{fullResponse:!0});return new q8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}newWelcomeDm(u,D){let B={[u0.WelcomeCreate]:{name:u,message_data:D}};return this.post("direct_messages/welcome_messages/new.json",B,{forceBodyMode:"json"})}getWelcomeDm(u){return this.get("direct_messages/welcome_messages/show.json",{id:u})}deleteWelcomeDm(u){return this.delete("direct_messages/welcome_messages/destroy.json",{id:u})}updateWelcomeDm(u,D){let B={message_data:D};return this.put("direct_messages/welcome_messages/update.json",B,{forceBodyMode:"json",query:{id:u}})}async listWelcomeDms(u={}){let D={...u},B=await this.get("direct_messages/welcome_messages/list.json",D,{fullResponse:!0});return new m8({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D})}newWelcomeDmRule(u){return this.post("direct_messages/welcome_messages/rules/new.json",{welcome_message_rule:{welcome_message_id:u}},{forceBodyMode:"json"})}getWelcomeDmRule(u){return this.get("direct_messages/welcome_messages/rules/show.json",{id:u})}deleteWelcomeDmRule(u){return this.delete("direct_messages/welcome_messages/rules/destroy.json",{id:u})}async listWelcomeDmRules(u={}){let D={...u};return this.get("direct_messages/welcome_messages/rules/list.json",D)}async setWelcomeDm(u,D=!0){var B;let A=await this.listWelcomeDmRules();if((B=A.welcome_message_rules)===null||B===void 0?void 0:B.length){for(let w of A.welcome_message_rules)if(await this.deleteWelcomeDmRule(w.id),D)await this.deleteWelcomeDm(w.welcome_message_id)}return this.newWelcomeDmRule(u)}markDmAsRead(u,D){return this.post("direct_messages/mark_read.json",{last_read_event_id:u,recipient_id:D},{forceBodyMode:"url"})}indicateDmTyping(u){return this.post("direct_messages/indicate_typing.json",{recipient_id:u},{forceBodyMode:"url"})}async downloadDmImage(u){if(typeof u!=="string"){let B=u[u0.Create].message_data.attachment;if(!B)throw Error("The given direct message doesn't contain any attachment");u=B.media.media_url_https}let D=await this.get(u,void 0,{forceParseMode:"buffer",prefix:""});if(!D.length)throw Error("Image not found. Make sure you are logged with credentials able to access direct messages, and check the URL.");return D}}var HD=gY;class q{constructor(u){this.result=u}get tweets(){return q.tweets(this.result)}static tweets(u){var D,B;return(B=(D=u.includes)===null||D===void 0?void 0:D.tweets)!==null&&B!==void 0?B:[]}tweetById(u){return q.tweetById(this.result,u)}static tweetById(u,D){return this.tweets(u).find((B)=>B.id===D)}retweet(u){return q.retweet(this.result,u)}static retweet(u,D){var B;let A=((B=D.referenced_tweets)!==null&&B!==void 0?B:[]).filter((w)=>w.type==="retweeted").map((w)=>w.id);return this.tweets(u).find((w)=>A.includes(w.id))}quote(u){return q.quote(this.result,u)}static quote(u,D){var B;let A=((B=D.referenced_tweets)!==null&&B!==void 0?B:[]).filter((w)=>w.type==="quoted").map((w)=>w.id);return this.tweets(u).find((w)=>A.includes(w.id))}repliedTo(u){return q.repliedTo(this.result,u)}static repliedTo(u,D){var B;let A=((B=D.referenced_tweets)!==null&&B!==void 0?B:[]).filter((w)=>w.type==="replied_to").map((w)=>w.id);return this.tweets(u).find((w)=>A.includes(w.id))}author(u){return q.author(this.result,u)}static author(u,D){let B=D.author_id;return B?this.users(u).find((A)=>A.id===B):void 0}repliedToAuthor(u){return q.repliedToAuthor(this.result,u)}static repliedToAuthor(u,D){let B=D.in_reply_to_user_id;return B?this.users(u).find((A)=>A.id===B):void 0}get users(){return q.users(this.result)}static users(u){var D,B;return(B=(D=u.includes)===null||D===void 0?void 0:D.users)!==null&&B!==void 0?B:[]}userById(u){return q.userById(this.result,u)}static userById(u,D){return this.users(u).find((B)=>B.id===D)}pinnedTweet(u){return q.pinnedTweet(this.result,u)}static pinnedTweet(u,D){return D.pinned_tweet_id?this.tweets(u).find((B)=>B.id===D.pinned_tweet_id):void 0}get media(){return q.media(this.result)}static media(u){var D,B;return(B=(D=u.includes)===null||D===void 0?void 0:D.media)!==null&&B!==void 0?B:[]}medias(u){return q.medias(this.result,u)}static medias(u,D){var B,A;let w=(A=(B=D.attachments)===null||B===void 0?void 0:B.media_keys)!==null&&A!==void 0?A:[];return this.media(u).filter((F)=>w.includes(F.media_key))}get polls(){return q.polls(this.result)}static polls(u){var D,B;return(B=(D=u.includes)===null||D===void 0?void 0:D.polls)!==null&&B!==void 0?B:[]}poll(u){return q.poll(this.result,u)}static poll(u,D){var B,A;let w=(A=(B=D.attachments)===null||B===void 0?void 0:B.poll_ids)!==null&&A!==void 0?A:[];if(w.length){let F=w[0];return this.polls(u).find((N)=>N.id===F)}return}get places(){return q.places(this.result)}static places(u){var D,B;return(B=(D=u.includes)===null||D===void 0?void 0:D.places)!==null&&B!==void 0?B:[]}place(u){return q.place(this.result,u)}static place(u,D){var B;let A=(B=D.geo)===null||B===void 0?void 0:B.place_id;return A?this.places(u).find((w)=>w.id===A):void 0}listOwner(u){return q.listOwner(this.result,u)}static listOwner(u,D){let B=D.owner_id;return B?this.users(u).find((A)=>A.id===B):void 0}spaceCreator(u){return q.spaceCreator(this.result,u)}static spaceCreator(u,D){let B=D.creator_id;return B?this.users(u).find((A)=>A.id===B):void 0}spaceHosts(u){return q.spaceHosts(this.result,u)}static spaceHosts(u,D){var B;let A=(B=D.host_ids)!==null&&B!==void 0?B:[];return this.users(u).filter((w)=>A.includes(w.id))}spaceSpeakers(u){return q.spaceSpeakers(this.result,u)}static spaceSpeakers(u,D){var B;let A=(B=D.speaker_ids)!==null&&B!==void 0?B:[];return this.users(u).filter((w)=>A.includes(w.id))}spaceInvitedUsers(u){return q.spaceInvitedUsers(this.result,u)}static spaceInvitedUsers(u,D){var B;let A=(B=D.invited_user_ids)!==null&&B!==void 0?B:[];return this.users(u).filter((w)=>A.includes(w.id))}}class UD extends I8{updateIncludes(u){if(u.errors){if(!this._realData.errors)this._realData.errors=[];this._realData.errors=[...this._realData.errors,...u.errors]}if(!u.includes)return;if(!this._realData.includes)this._realData.includes={};let D=this._realData.includes;for(let[B,A]of Object.entries(u.includes)){if(!D[B])D[B]=[];D[B]=[...D[B],...A]}}assertUsable(){if(this.unusable)throw Error("Unable to use this paginator to fetch more data, as it does not contain any metadata. Check .errors property for more details.")}get meta(){return this._realData.meta}get includes(){var u;if(!((u=this._realData)===null||u===void 0?void 0:u.includes))return new q(this._realData);if(this._includesInstance)return this._includesInstance;return this._includesInstance=new q(this._realData)}get errors(){var u;return(u=this._realData.errors)!==null&&u!==void 0?u:[]}get unusable(){return this.errors.length>0&&!this._realData.meta&&!this._realData.data}}class q2 extends UD{refreshInstanceFromResult(u,D){var B;let A=u.data,w=(B=A.data)!==null&&B!==void 0?B:[];if(this._rateLimit=u.rateLimit,!this._realData.data)this._realData.data=[];if(D)this._realData.meta.result_count+=A.meta.result_count,this._realData.meta.next_token=A.meta.next_token,this._realData.data.push(...w);else this._realData.meta.result_count+=A.meta.result_count,this._realData.meta.previous_token=A.meta.previous_token,this._realData.data.unshift(...w);this.updateIncludes(A)}getNextQueryParams(u){return this.assertUsable(),{...this.injectQueryParams(u),pagination_token:this._realData.meta.next_token}}getPreviousQueryParams(u){return this.assertUsable(),{...this.injectQueryParams(u),pagination_token:this._realData.meta.previous_token}}getPageLengthFromRequest(u){var D,B;return(B=(D=u.data.data)===null||D===void 0?void 0:D.length)!==null&&B!==void 0?B:0}isFetchLastOver(u){var D;return!((D=u.data.data)===null||D===void 0?void 0:D.length)||!this.canFetchNextPage(u.data)}canFetchNextPage(u){var D;return!!((D=u.meta)===null||D===void 0?void 0:D.next_token)}}class z4 extends UD{refreshInstanceFromResult(u,D){var B;let A=u.data,w=(B=A.data)!==null&&B!==void 0?B:[];if(this._rateLimit=u.rateLimit,!this._realData.data)this._realData.data=[];if(D)this._realData.meta.oldest_id=A.meta.oldest_id,this._realData.meta.result_count+=A.meta.result_count,this._realData.meta.next_token=A.meta.next_token,this._realData.data.push(...w);else this._realData.meta.newest_id=A.meta.newest_id,this._realData.meta.result_count+=A.meta.result_count,this._realData.data.unshift(...w);this.updateIncludes(A)}getNextQueryParams(u){this.assertUsable();let D={...this.injectQueryParams(u)};if(this._realData.meta.next_token)D.next_token=this._realData.meta.next_token;else{if(D.start_time)D.since_id=this.dateStringToSnowflakeId(D.start_time),delete D.start_time;if(D.end_time)delete D.end_time;D.until_id=this._realData.meta.oldest_id}return D}getPreviousQueryParams(u){return this.assertUsable(),{...this.injectQueryParams(u),since_id:this._realData.meta.newest_id}}getPageLengthFromRequest(u){var D,B;return(B=(D=u.data.data)===null||D===void 0?void 0:D.length)!==null&&B!==void 0?B:0}isFetchLastOver(u){var D;return!((D=u.data.data)===null||D===void 0?void 0:D.length)||!this.canFetchNextPage(u.data)}canFetchNextPage(u){return!!u.meta.next_token}getItemArray(){return this.tweets}dateStringToSnowflakeId(u){let D=BigInt("1288834974657"),B=new Date(u);if(isNaN(B.valueOf()))throw Error("Unable to convert start_time/end_time to a valid date. A ISO 8601 DateTime is excepted, please check your input.");return(BigInt(B.valueOf())-D<<BigInt("22")).toString()}get tweets(){var u;return(u=this._realData.data)!==null&&u!==void 0?u:[]}get meta(){return super.meta}}class n0 extends q2{refreshInstanceFromResult(u,D){super.refreshInstanceFromResult(u,D);let B=u.data;if(D)this._realData.meta.oldest_id=B.meta.oldest_id;else this._realData.meta.newest_id=B.meta.newest_id}getItemArray(){return this.tweets}get tweets(){var u;return(u=this._realData.data)!==null&&u!==void 0?u:[]}get meta(){return super.meta}}class Z4 extends z4{constructor(){super(...arguments);this._endpoint="tweets/search/recent"}}class J4 extends z4{constructor(){super(...arguments);this._endpoint="tweets/search/all"}}class Q4 extends n0{constructor(){super(...arguments);this._endpoint="tweets/:id/quote_tweets"}}class W4 extends n0{constructor(){super(...arguments);this._endpoint="users/:id/timelines/reverse_chronological"}}class X4 extends n0{constructor(){super(...arguments);this._endpoint="users/:id/tweets"}}class Y4 extends n0{constructor(){super(...arguments);this._endpoint="users/:id/mentions"}}class h4 extends n0{constructor(){super(...arguments);this._endpoint="users/:id/bookmarks"}}class K4 extends q2{get tweets(){var u;return(u=this._realData.data)!==null&&u!==void 0?u:[]}get meta(){return super.meta}getItemArray(){return this.tweets}}class S4 extends K4{constructor(){super(...arguments);this._endpoint="users/:id/liked_tweets"}}class x4 extends K4{constructor(){super(...arguments);this._endpoint="lists/:id/tweets"}}class _2 extends q2{getItemArray(){return this.users}get users(){var u;return(u=this._realData.data)!==null&&u!==void 0?u:[]}get meta(){return super.meta}}class R4 extends _2{constructor(){super(...arguments);this._endpoint="users/:id/blocking"}}class H4 extends _2{constructor(){super(...arguments);this._endpoint="users/:id/muting"}}class U4 extends _2{constructor(){super(...arguments);this._endpoint="users/:id/followers"}}class c4 extends _2{constructor(){super(...arguments);this._endpoint="users/:id/following"}}class M4 extends _2{constructor(){super(...arguments);this._endpoint="lists/:id/members"}}class L4 extends _2{constructor(){super(...arguments);this._endpoint="lists/:id/followers"}}class E4 extends _2{constructor(){super(...arguments);this._endpoint="tweets/:id/liking_users"}}class O4 extends _2{constructor(){super(...arguments);this._endpoint="tweets/:id/retweeted_by"}}class cD extends q2{getItemArray(){return this.lists}get lists(){var u;return(u=this._realData.data)!==null&&u!==void 0?u:[]}get meta(){return super.meta}}class C4 extends cD{constructor(){super(...arguments);this._endpoint="users/:id/owned_lists"}}class P4 extends cD{constructor(){super(...arguments);this._endpoint="users/:id/list_memberships"}}class k4 extends cD{constructor(){super(...arguments);this._endpoint="users/:id/followed_lists"}}class p0 extends P2{constructor(){super(...arguments);this._prefix=_0}}class MD extends q2{getItemArray(){return this.events}get events(){var u;return(u=this._realData.data)!==null&&u!==void 0?u:[]}get meta(){return super.meta}}class y4 extends MD{constructor(){super(...arguments);this._endpoint="dm_events"}}class V4 extends MD{constructor(){super(...arguments);this._endpoint="dm_conversations/with/:participant_id/dm_events"}}class T4 extends MD{constructor(){super(...arguments);this._endpoint="dm_conversations/:dm_conversation_id/dm_events"}}class a0 extends P2{constructor(){super(...arguments);this._prefix=o2}get labs(){if(this._labs)return this._labs;return this._labs=new p0(this)}async search(u,D={}){let B=typeof u==="string"?{...D,query:u}:{...u},A=await this.get("tweets/search/recent",B,{fullResponse:!0});return new Z4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:B})}async searchAll(u,D={}){let B={...D,query:u},A=await this.get("tweets/search/all",B,{fullResponse:!0});return new J4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:B})}singleTweet(u,D={}){return this.get("tweets/:id",D,{params:{id:u}})}tweets(u,D={}){return this.get("tweets",{ids:u,...D})}tweetCountRecent(u,D={}){return this.get("tweets/counts/recent",{query:u,...D})}tweetCountAll(u,D={}){return this.get("tweets/counts/all",{query:u,...D})}async tweetRetweetedBy(u,D={}){let{asPaginator:B,...A}=D,w=await this.get("tweets/:id/retweeted_by",A,{fullResponse:!0,params:{id:u}});if(!B)return w.data;return new O4({realData:w.data,rateLimit:w.rateLimit,instance:this,queryParams:A,sharedParams:{id:u}})}async tweetLikedBy(u,D={}){let{asPaginator:B,...A}=D,w=await this.get("tweets/:id/liking_users",A,{fullResponse:!0,params:{id:u}});if(!B)return w.data;return new E4({realData:w.data,rateLimit:w.rateLimit,instance:this,queryParams:A,sharedParams:{id:u}})}async homeTimeline(u={}){let D=await this.getCurrentUserV2Object(),B=await this.get("users/:id/timelines/reverse_chronological",u,{fullResponse:!0,params:{id:D.data.id}});return new W4({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:u,sharedParams:{id:D.data.id}})}async userTimeline(u,D={}){let B=await this.get("users/:id/tweets",D,{fullResponse:!0,params:{id:u}});return new X4({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D,sharedParams:{id:u}})}async userMentionTimeline(u,D={}){let B=await this.get("users/:id/mentions",D,{fullResponse:!0,params:{id:u}});return new Y4({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D,sharedParams:{id:u}})}async quotes(u,D={}){let B=await this.get("tweets/:id/quote_tweets",D,{fullResponse:!0,params:{id:u}});return new Q4({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:D,sharedParams:{id:u}})}async bookmarks(u={}){let D=await this.getCurrentUserV2Object(),B=await this.get("users/:id/bookmarks",u,{fullResponse:!0,params:{id:D.data.id}});return new h4({realData:B.data,rateLimit:B.rateLimit,instance:this,queryParams:u,sharedParams:{id:D.data.id}})}me(u={}){return this.get("users/me",u)}user(u,D={}){return this.get("users/:id",D,{params:{id:u}})}users(u,D={}){let B=Array.isArray(u)?u.join(","):u;return this.get("users",{...D,ids:B})}userByUsername(u,D={}){return this.get("users/by/username/:username",D,{params:{username:u}})}usersByUsernames(u,D={}){return u=Array.isArray(u)?u.join(","):u,this.get("users/by",{...D,usernames:u})}async followers(u,D={}){let{asPaginator:B,...A}=D,w={id:u};if(!B)return this.get("users/:id/followers",A,{params:w});let F=await this.get("users/:id/followers",A,{fullResponse:!0,params:w});return new U4({realData:F.data,rateLimit:F.rateLimit,instance:this,queryParams:A,sharedParams:w})}async following(u,D={}){let{asPaginator:B,...A}=D,w={id:u};if(!B)return this.get("users/:id/following",A,{params:w});let F=await this.get("users/:id/following",A,{fullResponse:!0,params:w});return new c4({realData:F.data,rateLimit:F.rateLimit,instance:this,queryParams:A,sharedParams:w})}async userLikedTweets(u,D={}){let B={id:u},A=await this.get("users/:id/liked_tweets",D,{fullResponse:!0,params:B});return new S4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:{...D},sharedParams:B})}async userBlockingUsers(u,D={}){let B={id:u},A=await this.get("users/:id/blocking",D,{fullResponse:!0,params:B});return new R4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:{...D},sharedParams:B})}async userMutingUsers(u,D={}){let B={id:u},A=await this.get("users/:id/muting",D,{fullResponse:!0,params:B});return new H4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:{...D},sharedParams:B})}list(u,D={}){return this.get("lists/:id",D,{params:{id:u}})}async listsOwned(u,D={}){let B={id:u},A=await this.get("users/:id/owned_lists",D,{fullResponse:!0,params:B});return new C4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:{...D},sharedParams:B})}async listMemberships(u,D={}){let B={id:u},A=await this.get("users/:id/list_memberships",D,{fullResponse:!0,params:B});return new P4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:{...D},sharedParams:B})}async listFollowed(u,D={}){let B={id:u},A=await this.get("users/:id/followed_lists",D,{fullResponse:!0,params:B});return new k4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:{...D},sharedParams:B})}async listTweets(u,D={}){let B={id:u},A=await this.get("lists/:id/tweets",D,{fullResponse:!0,params:B});return new x4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:{...D},sharedParams:B})}async listMembers(u,D={}){let B={id:u},A=await this.get("lists/:id/members",D,{fullResponse:!0,params:B});return new M4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:{...D},sharedParams:B})}async listFollowers(u,D={}){let B={id:u},A=await this.get("lists/:id/followers",D,{fullResponse:!0,params:B});return new L4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:{...D},sharedParams:B})}async listDmEvents(u={}){let D=await this.get("dm_events",u,{fullResponse:!0});return new y4({realData:D.data,rateLimit:D.rateLimit,instance:this,queryParams:{...u}})}async listDmEventsWithParticipant(u,D={}){let B={participant_id:u},A=await this.get("dm_conversations/with/:participant_id/dm_events",D,{fullResponse:!0,params:B});return new V4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:{...D},sharedParams:B})}async listDmEventsOfConversation(u,D={}){let B={dm_conversation_id:u},A=await this.get("dm_conversations/:dm_conversation_id/dm_events",D,{fullResponse:!0,params:B});return new T4({realData:A.data,rateLimit:A.rateLimit,instance:this,queryParams:{...D},sharedParams:B})}space(u,D={}){return this.get("spaces/:id",D,{params:{id:u}})}spaces(u,D={}){return this.get("spaces",{ids:u,...D})}spacesByCreators(u,D={}){return this.get("spaces/by/creator_ids",{user_ids:u,...D})}searchSpaces(u){return this.get("spaces/search",u)}spaceBuyers(u,D={}){return this.get("spaces/:id/buyers",D,{params:{id:u}})}spaceTweets(u,D={}){return this.get("spaces/:id/tweets",D,{params:{id:u}})}searchStream({autoConnect:u,...D}={}){return this.getStream("tweets/search/stream",D,{payloadIsError:XD,autoConnect:u})}streamRules(u={}){return this.get("tweets/search/stream/rules",u)}updateStreamRules(u,D={}){return this.post("tweets/search/stream/rules",u,{query:D})}sampleStream({autoConnect:u,...D}={}){return this.getStream("tweets/sample/stream",D,{payloadIsError:XD,autoConnect:u})}sample10Stream({autoConnect:u,...D}={}){return this.getStream("tweets/sample10/stream",D,{payloadIsError:XD,autoConnect:u})}complianceJobs(u){return this.get("compliance/jobs",u)}complianceJob(u){return this.get("compliance/jobs/:id",void 0,{params:{id:u}})}async sendComplianceJob(u){let D=await this.post("compliance/jobs",{type:u.type,name:u.name}),B=u.ids instanceof Buffer?u.ids:Buffer.from(u.ids.join(`
45
+ `));return await this.put(D.data.upload_url,B,{forceBodyMode:"raw",enableAuth:!1,headers:{"Content-Type":"text/plain"},prefix:""}),D}async complianceJobResult(u){let D=u;while(D.status!=="complete"){if(D.status==="expired"||D.status==="failed")throw Error("Job failed to be completed.");await new Promise((A)=>setTimeout(A,3500)),D=(await this.complianceJob(u.id)).data}return(await this.get(u.download_url,void 0,{enableAuth:!1,prefix:""})).trim().split(`
46
+ `).filter((A)=>A).map((A)=>JSON.parse(A))}async usage(u={}){return this.get("usage/tweets",u)}community(u,D={}){return this.get("communities/:id",D,{params:{id:u}})}searchCommunities(u,D={}){return this.get("communities/search",{query:u,...D})}}class s0 extends p0{constructor(){super(...arguments);this._prefix=_0}get readOnly(){return this}}class t0 extends a0{constructor(){super(...arguments);this._prefix=o2}get readOnly(){return this}get labs(){if(this._labs)return this._labs;return this._labs=new s0(this)}hideReply(u,D){return this.put("tweets/:id/hidden",{hidden:D},{params:{id:u}})}like(u,D){return this.post("users/:id/likes",{tweet_id:D},{params:{id:u}})}unlike(u,D){return this.delete("users/:id/likes/:tweet_id",void 0,{params:{id:u,tweet_id:D}})}retweet(u,D){return this.post("users/:id/retweets",{tweet_id:D},{params:{id:u}})}unretweet(u,D){return this.delete("users/:id/retweets/:tweet_id",void 0,{params:{id:u,tweet_id:D}})}tweet(u,D={}){if(typeof u==="object")D=u;else D={text:u,...D};return this.post("tweets",D)}async uploadMedia(u,D,B=1048576){let A=D.media_category;if(!D.media_category){if(D.media_type.includes("gif"))A="tweet_gif";else if(D.media_type.includes("image"))A="tweet_image";else if(D.media_type.includes("video"))A="tweet_video"}let w={additional_owners:D.additional_owners,media_type:D.media_type,total_bytes:u.length,media_category:A},N=(await this.post("media/upload/initialize",w)).data.id,G=Math.ceil(u.length/B),$=new Uint8Array(u);for(let Q=0;Q<G;Q++){let Z=Q*B,J=Math.min(Z+B,u.length),W=$.slice(Z,J),Y=Buffer.from(W),M={segment_index:Q,media:Y};await this.post(`media/upload/${N}/append`,M,{forceBodyMode:"form-data"})}if((await this.post(`media/upload/${N}/finalize`)).data.processing_info)await this.waitForMediaProcessing(N);return N}async waitForMediaProcessing(u){var D;let A=(await this.get("media/upload",{command:"STATUS",media_id:u})).data.processing_info;if(!A)return;switch(A.state){case"succeeded":return;case"failed":throw Error(`Media processing failed: ${(D=A.error)===null||D===void 0?void 0:D.message}`);case"pending":case"in_progress":{let w=A===null||A===void 0?void 0:A.check_after_secs;if(w&&w>0)await new Promise((F)=>setTimeout(F,w*1000)),await this.waitForMediaProcessing(u)}}}createMediaMetadata(u,D){return this.post("media/metadata",{id:u,metadata:D})}reply(u,D,B={}){var A;let w={in_reply_to_tweet_id:D,...(A=B.reply)!==null&&A!==void 0?A:{}};return this.post("tweets",{text:u,...B,reply:w})}quote(u,D,B={}){return this.tweet(u,{...B,quote_tweet_id:D})}async tweetThread(u){var D,B;let A=[];for(let w of u){let F=A.length?A[A.length-1]:null,N={...typeof w==="string"?{text:w}:w},G=F?F.data.id:(D=N.reply)===null||D===void 0?void 0:D.in_reply_to_tweet_id,$=(B=N.text)!==null&&B!==void 0?B:"";if(G)A.push(await this.reply($,G,N));else A.push(await this.tweet($,N))}return A}deleteTweet(u){return this.delete("tweets/:id",void 0,{params:{id:u}})}async bookmark(u){let D=await this.getCurrentUserV2Object();return this.post("users/:id/bookmarks",{tweet_id:u},{params:{id:D.data.id}})}async deleteBookmark(u){let D=await this.getCurrentUserV2Object();return this.delete("users/:id/bookmarks/:tweet_id",void 0,{params:{id:D.data.id,tweet_id:u}})}follow(u,D){return this.post("users/:id/following",{target_user_id:D},{params:{id:u}})}unfollow(u,D){return this.delete("users/:source_user_id/following/:target_user_id",void 0,{params:{source_user_id:u,target_user_id:D}})}block(u,D){return this.post("users/:id/blocking",{target_user_id:D},{params:{id:u}})}unblock(u,D){return this.delete("users/:source_user_id/blocking/:target_user_id",void 0,{params:{source_user_id:u,target_user_id:D}})}mute(u,D){return this.post("users/:id/muting",{target_user_id:D},{params:{id:u}})}unmute(u,D){return this.delete("users/:source_user_id/muting/:target_user_id",void 0,{params:{source_user_id:u,target_user_id:D}})}createList(u){return this.post("lists",u)}updateList(u,D={}){return this.put("lists/:id",D,{params:{id:u}})}removeList(u){return this.delete("lists/:id",void 0,{params:{id:u}})}addListMember(u,D){return this.post("lists/:id/members",{user_id:D},{params:{id:u}})}removeListMember(u,D){return this.delete("lists/:id/members/:user_id",void 0,{params:{id:u,user_id:D}})}subscribeToList(u,D){return this.post("users/:id/followed_lists",{list_id:D},{params:{id:u}})}unsubscribeOfList(u,D){return this.delete("users/:id/followed_lists/:list_id",void 0,{params:{id:u,list_id:D}})}pinList(u,D){return this.post("users/:id/pinned_lists",{list_id:D},{params:{id:u}})}unpinList(u,D){return this.delete("users/:id/pinned_lists/:list_id",void 0,{params:{id:u,list_id:D}})}sendDmInConversation(u,D){return this.post("dm_conversations/:dm_conversation_id/messages",D,{params:{dm_conversation_id:u}})}sendDmToParticipant(u,D){return this.post("dm_conversations/with/:participant_id/messages",D,{params:{participant_id:u}})}createDmConversation(u){return this.post("dm_conversations",u)}}class _Y extends s0{constructor(){super(...arguments);this._prefix=_0}get readWrite(){return this}}var fY=_Y;class bY extends t0{constructor(){super(...arguments);this._prefix=o2}get readWrite(){return this}get labs(){if(this._labs)return this._labs;return this._labs=new fY(this)}}var jY=bY;class Tu extends D0{get v1(){if(this._v1)return this._v1;return this._v1=new r0(this)}get v2(){if(this._v2)return this._v2;return this._v2=new a0(this)}async currentUser(u=!1){return await this.getCurrentUserObject(u)}async currentUserV2(u=!1){return await this.getCurrentUserV2Object(u)}search(u,D){return this.v2.search(u,D)}async generateAuthLink(u="oob",{authAccessType:D,linkMode:B="authenticate",forceLogin:A,screenName:w}={}){let F=await this.post("https://api.x.com/oauth/request_token",{oauth_callback:u,x_auth_access_type:D}),N=`https://api.x.com/oauth/${B}?oauth_token=${encodeURIComponent(F.oauth_token)}`;if(A!==void 0)N+=`&force_login=${encodeURIComponent(A)}`;if(w!==void 0)N+=`&screen_name=${encodeURIComponent(w)}`;if(this._requestMaker.hasPlugins())this._requestMaker.applyPluginMethod("onOAuth1RequestToken",{client:this._requestMaker,url:N,oauthResult:F});return{url:N,...F}}async login(u){let D=this.getActiveTokens();if(D.type!=="oauth-1.0a")throw Error("You must setup TwitterApi instance with consumer keys to accept OAuth 1.0 login");let B=await this.post("https://api.x.com/oauth/access_token",{oauth_token:D.accessToken,oauth_verifier:u}),A=new this.constructor({appKey:D.appKey,appSecret:D.appSecret,accessToken:B.oauth_token,accessSecret:B.oauth_token_secret},this._requestMaker.clientSettings);return{accessToken:B.oauth_token,accessSecret:B.oauth_token_secret,userId:B.user_id,screenName:B.screen_name,client:A}}async appLogin(){let u=this.getActiveTokens();if(u.type!=="oauth-1.0a")throw Error("You must setup TwitterApi instance with consumer keys to accept app-only login");let B=await new this.constructor({username:u.appKey,password:u.appSecret},this._requestMaker.clientSettings).post("https://api.x.com/oauth2/token",{grant_type:"client_credentials"});return new this.constructor(B.access_token,this._requestMaker.clientSettings)}generateOAuth2AuthLink(u,D={}){var B,A;if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. You can find your client ID in Twitter Developer Portal. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let w=(B=D.state)!==null&&B!==void 0?B:J0.generateRandomString(32),F=J0.getCodeVerifier(),N=J0.getCodeChallengeFromVerifier(F),G=(A=D.scope)!==null&&A!==void 0?A:"",$=Array.isArray(G)?G.join(" "):G,z=new URL("https://x.com/i/oauth2/authorize"),Q={response_type:"code",client_id:this._requestMaker.clientId,redirect_uri:u,state:w,code_challenge:N,code_challenge_method:"s256",scope:$};C2.addQueryParamsToUrl(z,Q);let Z={url:z.toString(),state:w,codeVerifier:F,codeChallenge:N};if(this._requestMaker.hasPlugins())this._requestMaker.applyPluginMethod("onOAuth2RequestToken",{client:this._requestMaker,result:Z,redirectUri:u});return Z}async loginWithOAuth2({code:u,codeVerifier:D,redirectUri:B}){if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let A=await this.post("https://api.x.com/2/oauth2/token",{code:u,code_verifier:D,redirect_uri:B,grant_type:"authorization_code",client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret});return this.parseOAuth2AccessTokenResult(A)}async refreshOAuth2Token(u){if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");let D=await this.post("https://api.x.com/2/oauth2/token",{refresh_token:u,grant_type:"refresh_token",client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret});return this.parseOAuth2AccessTokenResult(D)}async revokeOAuth2Token(u,D="access_token"){if(!this._requestMaker.clientId)throw Error("Twitter API instance is not initialized with client ID. Please build an instance with: new TwitterApi({ clientId: '<yourClientId>' })");return await this.post("https://api.x.com/2/oauth2/revoke",{client_id:this._requestMaker.clientId,client_secret:this._requestMaker.clientSecret,token:u,token_type_hint:D})}parseOAuth2AccessTokenResult(u){let D=new this.constructor(u.access_token,this._requestMaker.clientSettings),B=u.scope.split(" ").filter((A)=>A);return{client:D,expiresIn:u.expires_in,accessToken:u.access_token,scope:B,refreshToken:u.refresh_token}}}class Iu extends Tu{get v1(){if(this._v1)return this._v1;return this._v1=new i0(this)}get v2(){if(this._v2)return this._v2;return this._v2=new t0(this)}get readOnly(){return this}}class LD extends P2{constructor(){super(...arguments);this._prefix=f0}}class ED extends LD{constructor(){super(...arguments);this._prefix=f0}get readOnly(){return this}}class OD extends P2{constructor(){super(...arguments);this._prefix=b0}}class CD extends OD{constructor(){super(...arguments);this._prefix=b0}get readOnly(){return this}}class lY extends CD{constructor(){super(...arguments);this._prefix=b0}get readWrite(){return this}}var dY=lY;class rY extends ED{constructor(){super(...arguments);this._prefix=f0}get readWrite(){return this}get sandbox(){if(this._sandbox)return this._sandbox;return this._sandbox=new dY(this)}}var iY=rY;class I4 extends Iu{get v1(){if(this._v1)return this._v1;return this._v1=new HD(this)}get v2(){if(this._v2)return this._v2;return this._v2=new jY(this)}get readWrite(){return this}get ads(){if(this._ads)return this._ads;return this._ads=new iY(this)}static getErrors(u){var D;if(typeof u!=="object")return[];if(!("data"in u))return[];return(D=u.data.errors)!==null&&D!==void 0?D:[]}static getProfileImageInSize(u,D){let B=u.split("/").pop(),A=["normal","bigger","mini"],w=u;for(let N of A)if(B.includes(`_${N}`)){w=u.replace(`_${N}`,"");break}if(D==="original")return w;let F=w.lastIndexOf(".");if(F!==-1){let N=w.slice(F+1);return w.slice(0,F)+"_"+D+"."+N}else return w+"_"+D}}var JU={clientId:process.env.X_CLIENT_ID,clientSecret:process.env.X_SECRET,redirectPath:"/auth/oauth/x/callback",scope:["tweet.read","users.read","offline.access"]};class pY extends g0{config;client;oauthStates=new Map;constructor(u={}){super();this.config={...JU,...u},this.client=new I4({clientId:this.config.clientId,clientSecret:this.config.clientSecret})}getRedirectUrl(){let{url:u,codeVerifier:D,state:B}=this.client.generateOAuth2AuthLink(`${process.env.HOST_NAME}${this.config.redirectPath}`,{scope:this.config.scope});return this.oauthStates.set(B,{state:B,codeVerifier:D}),nY.to(u),u}async onCallback(u){let D=u.search.get("code"),B=u.search.get("state"),A=this.oauthStates.get(B);if(!A)throw Error("Invalid or expired OAuth state");let w=await this.client.loginWithOAuth2({code:D,codeVerifier:A.codeVerifier,redirectUri:`${process.env.HOST_NAME}${this.config.redirectPath}`});this.oauthStates.delete(B);let{data:F}=await w.client.v2.me({"user.fields":["name","username","entities"]}),{name:N,email:G,id:$="",username:z}=F??{};return{name:N,email:G,username:z,providerId:$}}}class aY extends j{kernel;jobs=[];constructor(u){super();this.kernel=u}boot(){}}class sY{name;cron;callback(){}onTick(){}onComplete(){}static exp(u){return u}}export{Q0 as Z,mu as _,q4 as $,QY as aa,S6 as ba,_1 as ca,f1 as da,x6 as ea,$D as fa,zD as ga,zY as ha,ZY as ia,JY as ja,WY as ka,XY as la,hY as ma,ZD as na,JD as oa,KY as pa,g0 as qa,SY as ra,pY as sa,aY as ta,sY as ua};
47
+
48
+ //# debugId=6F86DC4EC116930664756E2164756E21